Zephyr API Documentation  3.6.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
7#ifndef ZEPHYR_INCLUDE_TRACING_TRACING_FORMAT_H
8#define ZEPHYR_INCLUDE_TRACING_TRACING_FORMAT_H
9
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
24typedef struct tracing_data {
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
67void tracing_format_string(const char *str, ...);
68
76
83void 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 toolchain abstraction.
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.
__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:24
uint8_t * data
Definition: tracing_format.h:25
uint32_t length
Definition: tracing_format.h:26