openaliro
Aliro reader: UWB/CCC core and ESP32-S3/C5/C6 port
Loading...
Searching...
No Matches
woz_diag.h
Go to the documentation of this file.
1
3
#ifndef WOZ_DIAG_H
4
#define WOZ_DIAG_H
5
6
#include "woz_log.h"
7
8
#ifdef __cplusplus
9
extern
"C"
{
10
#endif
11
12
/* Runtime gate for the per-frame trace (defined in ccc_shim_rx.c). On ESP-IDF
13
* it defaults off: DIAGK is synchronous printf from inside the UWB task, and at
14
* 115200 baud the trace saturates the console against ~1.8 ms ranging-slot
15
* deadlines (bench-correlated with late RESPONSE arms). Re-enable at runtime
16
* with the app shell's `uwbdiag on`. Zephyr and host builds keep the always-on
17
* default (fast RTT/stdout console, unchanged behavior). */
18
extern
volatile
int
woz_uwb_diag_on;
19
20
#ifdef __cplusplus
21
}
22
#endif
23
24
#if defined(ESP_PLATFORM)
25
#define WOZ_UWB_DIAG_DEFAULT 0
26
#else
27
#define WOZ_UWB_DIAG_DEFAULT 1
28
#endif
29
30
#if defined(CONFIG_WOZ_PRETTY_SHELL)
31
#define DIAGK(...) \
32
do { \
33
if (0) { \
34
woz_printf(__VA_ARGS__); \
35
} \
36
} while (0)
37
#else
38
#define DIAGK(...) \
39
do { \
40
if (woz_uwb_diag_on) { \
41
woz_printf(__VA_ARGS__); \
42
} \
43
} while (0)
44
#endif
45
46
#endif
/* WOZ_DIAG_H */
modules
woz_uwb
src
facade
woz_diag.h
Generated by
1.9.8