A custom implementation of the app_scheduler that replaces the SDK app_scheduler.
More...
|
#define | APP_SCHED_EVT_SIZE(_event_data_size) ALIGN_NUM(sizeof(uint32_t), (offsetof(app_sched_event_t, event_data) + (_event_data_size))) |
| Macro that calculates the size of event structure for the given amount of attached data.
|
|
#define | APP_SCHED_INIT(_isched, _max_event_data_size, _pool_size) |
| Initialize SDK scheduler emulation. More...
|
|
A custom implementation of the app_scheduler that replaces the SDK app_scheduler.
#define APP_SCHED_INIT |
( |
|
_isched, |
|
|
|
_max_event_data_size, |
|
|
|
_pool_size |
|
) |
| |
Value:do { \
NRF_BALLOC_DEF(__app_scheduler_event_pool, \
&__app_scheduler_event_pool, \
(_max_event_data_size))); \
} while (0)
Initialize SDK scheduler emulation.
- Parameters
-
[in] | _isched | Instance of app_isched used to manage app_scheduler events. |
[in] | _max_event_data_size | Maximum size of data attached to event. |
[in] | _pool_size | Event pool size. |
Function for scheduling an event.
Puts an event into the event queue.
- Parameters
-
[in] | p_event_data | Pointer to event data that is to be scheduled. |
[in] | event_size | Size of event data that is to be scheduled. |
[in] | handler | Event handler that will receive the event. |
- Returns
- NRF_SUCCESS on success, otherwise an error code.
uint8_t app_sched_get_max_utilization |
( |
void |
| ) |
|
Get maximum scheduler utilization.
- Returns
- Maximum number of events stored in the scheduler.
uint32_t app_sched_init |
( |
app_isched_t * |
p_isched, |
|
|
const nrf_balloc_t * |
p_pool, |
|
|
unsigned int |
max_event_data_size |
|
) |
| |
Initialize SDK scheduler emmulation.
- Note
- This is internal function. Use of APP_SCHED_INIT() macro is recommended.
- Parameters
-
[in] | p_isched | Instance of app_isched used to manage app_scheduler events. |
[in] | p_pool | Instance of app_balloc_pool used to store events. |
[in] | max_event_data_size | Maximum size of data attached to event. |
- Returns
- NRF_SUCCESS on success, otherwise an error code.