dwm_evt_listener_register
In user applications, the command is used to register to listen for the events coming from the firmware. For example, the event can be triggered when LE finishes position calculation and when distances are calculated. This call applies only for end-user applications and it cannot be used with SPI or UART. In low-power mode, the event listener has to be registered to wake up from sleep. Otherwise, the user application will stay in sleep state.
Events that the user can listen to:
DWM_EVT_LOC_READY
DWM_EVT_USR_DATA_READY
DWM_EVT_USR_DATA_SENT
DWM_EVT_BH_INITIALIZED
DWM_EVT_UWBMAC_JOINED_CHANGED
DWM_EVT_UWB_SCAN_READY
-
void dwm_evt_listener_register(uint32_t evt_id_map, void *context)
- Parameters
input – event_id_map, context
event_id_map – 32 bits wide bit map (flags of the events that user wants to/don’t want to listen to has to be set/cleared respectively, see dwm_evt_wait)
context – data that the user wants to pass to the callback context
output – Status code
C code example
dwm_evt_listener_register(DWM_EVT_LOC_READY | DWM_EVT_USR_DATA_READY | DWM_EVT_USR_DATA_SENT | DWM_EVT_UWB_SCAN_READY | DWM_EVT_BH_INITIALIZED | DWM_EVT_UWBMAC_JOINED_CHANGED, NULL);
SPI/UART example
Not available on these interfaces