3 #if RUUVI_NRF5_SDK15_SCHEDULER_ENABLED
8 #include "sdk_errors.h"
9 #include "app_scheduler.h"
11 static bool m_is_init =
false;
49 ret_code_t err_code = NRF_SUCCESS;
53 err_code |= NRF_ERROR_NULL;
57 err_code = app_sched_event_put (p_event_data, event_size,
58 (app_sched_event_handler_t) handler);
62 err_code |= NRF_ERROR_INVALID_STATE;
uint32_t rd_status_t
bitfield for representing errors
rd_status_t ruuvi_nrf5_sdk15_to_ruuvi_error(const ret_code_t error)
convert nrf5 sdk15 error code into Ruuvi error code.
#define RD_SUCCESS
Internal Error.
#define RD_ERROR_INVALID_STATE
Invalid state, operation disallowed in this state.
rd_status_t ri_scheduler_event_put(const void *const p_event_data, const uint16_t event_size, const ruuvi_scheduler_event_handler_t handler)
Schedule given task to be executed on next call to ri_scheduler_execute.
void(* ruuvi_scheduler_event_handler_t)(void *p_event_data, uint16_t event_size)
Type definition for scheduler event handler.
rd_status_t ri_scheduler_execute(void)
Executes all scheduled tasks.
bool ri_scheduler_is_init(void)
Check if scheduler is initialized.
rd_status_t ri_scheduler_init(void)
Enable implementation selected by application.
rd_status_t ri_scheduler_uninit(void)
Uninitialize scheduler.
Header to enable and disable module compilation.
#define RI_SCHEDULER_LENGTH
#define RI_SCHEDULER_SIZE
Ruuvi error codes and error check function.
Interface functions to scheduler.