|
SDK for TESAIoT Dev Kit
API reference & tutorials (ModusToolbox)
|
Functions | |
| void | radio_scheduler_set_on_state (radio_scheduler_on_state_fn_t cb) |
| Install the state hook; must precede radio_scheduler_init() or the first transition is missed. | |
| bool | radio_scheduler_init (const radio_scheduler_config_t *cfg) |
| Create the arbiter (legal pre-scheduler); true on success or double-init. | |
| void | nus_radio_emit_state_event (const struct radio_status_s *st) |
| The shipped on_state hook — only ever used as a function pointer, never called directly. | |
| radio_mode_t | radio_scheduler_get_mode (void) |
| Lock-free mode read — the canonical single-RF Wi-Fi/BLE exclusivity guard. | |
| void | radio_scheduler_get_status (radio_status_t *out) |
| Full status snapshot under the scheduler mutex, 50 ms timeout; copy ssid out. | |
| bool | radio_scheduler_request_mode (radio_mode_t target) |
| Queue an asynchronous mode transition; confirm via the hook or by polling the mode. | |
| bool | radio_scheduler_set_wifi_creds (const char *ssid, const char *password, const char *security, bool auto_switch) |
| Save Wi-Fi credentials through the consumer's LFS hook, optionally queueing the switch. | |
| void | radio_scheduler_set_boot_mode (radio_boot_mode_t mode) |
| Persist a boot preference through the persist hook; with NULL hooks nothing survives reboot. | |
| radio_boot_mode_t | radio_scheduler_get_boot_mode (void) |
| The persisted boot mode; with the shipped NULL hooks every boot loads as AUTO. | |
| const char * | radio_mode_str (radio_mode_t m) |
| Pure mode-to-string map; static literal, out-of-range returns "invalid" — s is safe. | |
Ten symbols: the single-RF BLE / Wi-Fi arbiter (radio_scheduler_*, radio_mode_str) and its state-event emitter (nus_radio_emit_state_event). Compiled only with ENABLE_PAGE_BENTO_BUDDY=1 (default 0, proj_cm33_ns/Makefile:64, :305); rebuild after make getlibs — Flag gate (read first).
Declarations: radio_scheduler.h (all radio_scheduler_*, radio_mode_str, the radio_status_t / radio_scheduler_config_t types) and nus_commands.h (nus_radio_emit_state_event). Implementation radio_scheduler.c / nus_commands.c is archived in libbento_secure.a.
The three symbols radio_scheduler_set_on_state(), radio_scheduler_init() and nus_radio_emit_state_event() occur in one shipped block (proj_cm33_ns/main.c:325-357) — documenting them together is what the firmware does. That block, rendered once:
| void radio_scheduler_set_on_state | ( | radio_scheduler_on_state_fn_t | cb | ) |
Install the state hook; must precede radio_scheduler_init() or the first transition is missed.
| bool radio_scheduler_init | ( | const radio_scheduler_config_t * | cfg | ) |
Create the arbiter (legal pre-scheduler); true on success or double-init.
| void nus_radio_emit_state_event | ( | const struct radio_status_s * | st | ) |
The shipped on_state hook — only ever used as a function pointer, never called directly.
| radio_mode_t radio_scheduler_get_mode | ( | void | ) |
Lock-free mode read — the canonical single-RF Wi-Fi/BLE exclusivity guard.
The archived definition (rendered with radio_scheduler_get_status()) shows the mutex-free read.
| void radio_scheduler_get_status | ( | radio_status_t * | out | ) |
Full status snapshot under the scheduler mutex, 50 ms timeout; copy ssid out.
| bool radio_scheduler_request_mode | ( | radio_mode_t | target | ) |
Queue an asynchronous mode transition; confirm via the hook or by polling the mode.
| bool radio_scheduler_set_wifi_creds | ( | const char * | ssid, |
| const char * | password, | ||
| const char * | security, | ||
| bool | auto_switch ) |
Save Wi-Fi credentials through the consumer's LFS hook, optionally queueing the switch.
| void radio_scheduler_set_boot_mode | ( | radio_boot_mode_t | mode | ) |
Persist a boot preference through the persist hook; with NULL hooks nothing survives reboot.
| radio_boot_mode_t radio_scheduler_get_boot_mode | ( | void | ) |
The persisted boot mode; with the shipped NULL hooks every boot loads as AUTO.
| const char * radio_mode_str | ( | radio_mode_t | m | ) |
Pure mode-to-string map; static literal, out-of-range returns "invalid" — s is safe.