|
SDK for TESAIoT Dev Kit
API reference & tutorials (ModusToolbox)
|
#include <stdbool.h>#include <stdint.h>Go to the source code of this file.
Data Structures | |
| struct | radio_status_s |
| struct | radio_scheduler_config_t |
Typedefs | |
| typedef struct radio_status_s | radio_status_t |
| typedef void(*) | radio_boot_mode_persist_fn_t(radio_boot_mode_t mode) |
| typedef bool(*) | radio_boot_mode_load_fn_t(radio_boot_mode_t *out) |
| typedef void(*) | radio_scheduler_on_state_fn_t(const radio_status_t *st) |
Enumerations | |
| enum | radio_mode_t { RADIO_MODE_UNKNOWN = 0 , RADIO_MODE_BLE_ADV , RADIO_MODE_BLE_PAIRED , RADIO_MODE_SWITCHING_TO_WIFI , RADIO_MODE_WIFI_ACTIVE , RADIO_MODE_SWITCHING_TO_BLE , RADIO_MODE_WIFI_FAILED } |
| enum | radio_boot_mode_t { RADIO_BOOT_AUTO = 0 , RADIO_BOOT_FORCE_BLE = 1 , RADIO_BOOT_FORCE_WIFI = 2 } |
Functions | |
| bool | radio_scheduler_init (const radio_scheduler_config_t *cfg) |
| Create the arbiter (legal pre-scheduler); true on success or double-init. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| const char * | radio_mode_str (radio_mode_t m) |
| Pure mode-to-string map; static literal, out-of-range returns "invalid" — s is safe. | |
| typedef struct radio_status_s radio_status_t |
| typedef void(*) radio_boot_mode_persist_fn_t(radio_boot_mode_t mode) |
| typedef bool(*) radio_boot_mode_load_fn_t(radio_boot_mode_t *out) |
| typedef void(*) radio_scheduler_on_state_fn_t(const radio_status_t *st) |
| enum radio_mode_t |
| enum radio_boot_mode_t |