ruuvi.drivers.c  ${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
ruuvi_interface_scheduler.h
Go to the documentation of this file.
1 #ifndef RUUVI_INTERFACE_SCHEDULER_H
2 #define RUUVI_INTERFACE_SCHEDULER_H
19 #include "ruuvi_driver_error.h"
20 #include <stddef.h>
21 
23 #if RI_SCHEDULER_ENABLED
24 #define RUUVI_NRF5_SDK15_SCHEDULER_ENABLED RUUVI_NRF5_SDK15_ENABLED
25 #endif
26 
40 
48 typedef void (*ruuvi_scheduler_event_handler_t) (void * p_event_data,
49  uint16_t event_size);
50 
61 
75 rd_status_t ri_scheduler_event_put (const void * const p_event_data,
76  const uint16_t event_size, const ruuvi_scheduler_event_handler_t handler);
77 
86 
94 
96 #endif
uint32_t rd_status_t
bitfield for representing errors
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.
Ruuvi error codes and error check function.