dwm_evt_listener_register
Registers event listeners. User applications can wait for the events registered to listen to by dwm_evt_wait. 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 remain asleep.
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(uint16_t)
- Parameters
input – event_id_map, user_context_data
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)
user_context_data – data that the user wants inside 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