Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
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 <
toolchain/common.h
>
11
12
#ifdef __cplusplus
13
extern
"C"
{
14
#endif
15
19
typedef
struct
tracing_data
{
20
uint8_t
*
data
;
21
uint32_t
length
;
22
} __packed
tracing_data_t
;
23
27
#define TRACING_STRING(fmt, ...) \
28
do { \
29
tracing_format_string(fmt, ##__VA_ARGS__); \
30
} while (false)
31
35
#define TRACING_FORMAT_DATA(x) \
36
((struct tracing_data){.data = (uint8_t *)&(x), .length = sizeof((x))})
37
43
#define TRACING_DATA(...) \
44
do { \
45
struct tracing_data arg[] = {__VA_ARGS__}; \
46
\
47
tracing_format_data(arg, sizeof(arg) / \
48
sizeof(struct tracing_data)); \
49
} while (false)
50
57
void
tracing_format_string
(
const
char
*str, ...);
58
65
void
tracing_format_raw_data
(
uint8_t
*
data
,
uint32_t
length);
66
73
void
tracing_format_data
(
tracing_data_t
*tracing_data_array,
uint32_t
count
);
74
75
#ifdef __cplusplus
76
}
77
#endif
78
79
#endif
common.h
Common toolchain abstraction.
count
ZTEST_BMEM int count
Definition:
main.c:33
uint32_t
__UINT32_TYPE__ uint32_t
Definition:
stdint.h:60
uint8_t
__UINT8_TYPE__ uint8_t
Definition:
stdint.h:58
tracing_data
A structure to represent tracing data format.
Definition:
tracing_format.h:19
tracing_data::data
uint8_t * data
Definition:
tracing_format.h:20
tracing_data::length
uint32_t length
Definition:
tracing_format.h:21
data
static fdata_t data[2]
Definition:
test_fifo_contexts.c:15
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.
include
tracing
tracing_format.h
Generated on Sun Oct 9 2022 09:21:57 for Zephyr API Documentation by
1.9.4