Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
core.h
Go to the documentation of this file.
1
9
10#ifndef INFUSE_SDK_INCLUDE_INFUSE_VALIDATION_CORE_H_
11#define INFUSE_SDK_INCLUDE_INFUSE_VALIDATION_CORE_H_
12
13#include <zephyr/kernel.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
24
25/* clang-format off */
34#define _VALIDATION_REPORT(system, result, fmt, ...) \
35 printk("%06d:%s:%s:" fmt "\n", k_uptime_get_32(), system, \
36 result __VA_OPT__(,) __VA_ARGS__)
37/* clang-format on */
38
46#define VALIDATION_REPORT_INFO(system, fmt, ...) \
47 _VALIDATION_REPORT(system, "INFO", fmt, __VA_ARGS__)
48
57#define VALIDATION_REPORT_VALUE(system, name, fmt, ...) \
58 printk("%06d:%s:VAL:" name ":" fmt "\n", k_uptime_get_32(), system, __VA_ARGS__)
59
67#define VALIDATION_REPORT_ERROR(system, fmt, ...) \
68 _VALIDATION_REPORT(system, "ERROR", fmt, __VA_ARGS__)
69
77#define VALIDATION_REPORT_PASS(system, fmt, ...) \
78 _VALIDATION_REPORT(system, "PASS", fmt, __VA_ARGS__)
79
83
84#ifdef __cplusplus
85}
86#endif
87
88#endif /* INFUSE_SDK_INCLUDE_INFUSE_VALIDATION_CORE_H_ */