Zephyr API Documentation 4.3.99
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
12
13#ifndef ZEPHYR_INCLUDE_TRACING_TRACING_FORMAT_H
14#define ZEPHYR_INCLUDE_TRACING_TRACING_FORMAT_H
15
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
28
42
49#define TRACING_STRING(fmt, ...) \
50 do { \
51 tracing_format_string(fmt, ##__VA_ARGS__); \
52 } while (false)
53
59#define TRACING_FORMAT_DATA(x) \
60 ((struct tracing_data){.data = (uint8_t *)&(x), .length = sizeof((x))})
61
67#define TRACING_DATA(...) \
68 do { \
69 struct tracing_data arg[] = {__VA_ARGS__}; \
70 \
71 tracing_format_data(arg, sizeof(arg) / \
72 sizeof(struct tracing_data)); \
73 } while (false)
74
81void tracing_format_string(const char *str, ...);
82
90
97void tracing_format_data(tracing_data_t *tracing_data_array, uint32_t count);
98 /* end of subsys_tracing_format_apis */
100
101#ifdef __cplusplus
102}
103#endif
104
105#endif /* ZEPHYR_INCLUDE_TRACING_TRACING_FORMAT_H */
struct tracing_data tracing_data_t
A structure to represent tracing data format.
void tracing_format_data(tracing_data_t *tracing_data_array, uint32_t count)
Tracing a message in tracing data format.
void tracing_format_raw_data(uint8_t *data, uint32_t length)
Tracing a message in raw data format.
void tracing_format_string(const char *str,...)
Tracing a message in string format.
Common toolchain abstraction.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
A structure to represent tracing data format.
Definition tracing_format.h:36
uint8_t * data
Pointer to the data buffer to be traced.
Definition tracing_format.h:38
uint32_t length
Size of the data buffer to be traced.
Definition tracing_format.h:40