![]() |
BSB Developer Docs
|
Spawns events on nwp callbacks and processes them in queue. More...
Go to the source code of this file.
Typedefs | |
| typedef struct BleIncomingNwpEventProcessor | BleIncomingNwpEventProcessor |
| Opaque BleIncomingNwpEventProcessor type declaration. | |
Functions | |
| BleIncomingNwpEventProcessor * | ble_incoming_nwp_event_processor_alloc (void *context) |
| Allocates processor instance during ble initialization. | |
| void | ble_incoming_nwp_event_processor_subscribe (BleIncomingNwpEventProcessor *instance, FuriEventLoop *event_loop) |
| Subscribes inner queue to event_loop. | |
| void | ble_incoming_nwp_event_processor_unsubscribe (BleIncomingNwpEventProcessor *instance, FuriEventLoop *event_loop) |
| Unsubscribe queue from event loop on stop. | |
| void | ble_incoming_nwp_event_processor_spawn_event (BleIncomingNwpEventProcessor *instance, BleIncomingNwpEventType type, size_t data_size, void *data) |
| Spawns event of desired type and puts it into queue for further processing. | |
Spawns events on nwp callbacks and processes them in queue.
| BleIncomingNwpEventProcessor * ble_incoming_nwp_event_processor_alloc | ( | void * | context | ) |
Allocates processor instance during ble initialization.
| [in] | context | context for future use in spawned events |
| void ble_incoming_nwp_event_processor_spawn_event | ( | BleIncomingNwpEventProcessor * | instance, |
| BleIncomingNwpEventType | type, | ||
| size_t | data_size, | ||
| void * | data ) |
Spawns event of desired type and puts it into queue for further processing.
| [in] | instance | processor instance |
| [in] | type | event type from ble_incoming_nwp_event_type_enum.h |
| [in] | data_size | size of incoming data received from nwp |
| [in] | data | payload received from nwp |
| void ble_incoming_nwp_event_processor_subscribe | ( | BleIncomingNwpEventProcessor * | instance, |
| FuriEventLoop * | event_loop ) |
Subscribes inner queue to event_loop.
This is called when worker thread spawns and creates event_loop
| [in] | instance | processor instance |
| [in] | event_loop | used for all events happening inside |
| void ble_incoming_nwp_event_processor_unsubscribe | ( | BleIncomingNwpEventProcessor * | instance, |
| FuriEventLoop * | event_loop ) |
Unsubscribe queue from event loop on stop.
| [in] | instance | processor instance |
| [in] | event_loop | which needs to be unsubscribed |