Zephyr Project API
3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
tracing_format.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2019 Intel corporation
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifndef ZEPHYR_INCLUDE_TRACING_TRACING_FORMAT_H
8
#define ZEPHYR_INCLUDE_TRACING_TRACING_FORMAT_H
9
10
#include <
zephyr/toolchain/common.h
>
11
12
#ifdef __cplusplus
13
extern
"C"
{
14
#endif
15
24
typedef
struct
tracing_data
{
25
uint8_t
*
data
;
26
uint32_t
length
;
27
} __packed
tracing_data_t
;
28
35
#define TRACING_STRING(fmt, ...) \
36
do { \
37
tracing_format_string(fmt, ##__VA_ARGS__); \
38
} while (false)
39
45
#define TRACING_FORMAT_DATA(x) \
46
((struct tracing_data){.data = (uint8_t *)&(x), .length = sizeof((x))})
47
53
#define TRACING_DATA(...) \
54
do { \
55
struct tracing_data arg[] = {__VA_ARGS__}; \
56
\
57
tracing_format_data(arg, sizeof(arg) / \
58
sizeof(struct tracing_data)); \
59
} while (false)
60
67
void
tracing_format_string
(
const
char
*str, ...);
68
75
void
tracing_format_raw_data
(
uint8_t
*
data
,
uint32_t
length);
76
83
void
tracing_format_data
(
tracing_data_t
*tracing_data_array,
uint32_t
count
);
84
/* end of subsys_tracing_format_apis */
86
87
#ifdef __cplusplus
88
}
89
#endif
90
91
#endif
/* ZEPHYR_INCLUDE_TRACING_TRACING_FORMAT_H */
common.h
Common toolchain abstraction.
count
ZTEST_BMEM int count
Definition
main.c:33
tracing_data_t
struct tracing_data tracing_data_t
A structure to represent tracing data format.
tracing_format_data
void tracing_format_data(tracing_data_t *tracing_data_array, uint32_t count)
Tracing a message in tracing data format.
tracing_format_raw_data
void tracing_format_raw_data(uint8_t *data, uint32_t length)
Tracing a message in raw data format.
tracing_format_string
void tracing_format_string(const char *str,...)
Tracing a message in string format.
uint32_t
__UINT32_TYPE__ uint32_t
Definition
stdint.h:90
uint8_t
__UINT8_TYPE__ uint8_t
Definition
stdint.h:88
tracing_data
A structure to represent tracing data format.
Definition
tracing_format.h:24
tracing_data::data
uint8_t * data
Definition
tracing_format.h:25
tracing_data::length
uint32_t length
Definition
tracing_format.h:26
data
static fdata_t data[2]
Definition
test_fifo_contexts.c:15
include
zephyr
tracing
tracing_format.h
Generated on Sun Sep 15 2024 17:01:30 for Zephyr Project API by
1.9.8