ruuvi.drivers.c  ${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
ruuvi_interface_yield.h
Go to the documentation of this file.
1 #ifndef RUUVI_INTERFACE_YIELD_H
2 #define RUUVI_INTERFACE_YIELD_H
22 #include "ruuvi_driver_error.h"
23 #include <stdbool.h>
24 
26 #if RI_YIELD_ENABLED
27 #define RUUVI_NRF5_SDK15_YIELD_ENABLED RUUVI_NRF5_SDK15_ENABLED
28 #endif
29 
35 typedef void (*ri_yield_state_ind_fp_t) (const bool active);
36 
43  indication);
44 
54 
64 
74 
85 
99 rd_status_t ri_delay_ms (uint32_t time);
100 
113 rd_status_t ri_delay_us (uint32_t time);
114 
124 
127 #endif
uint32_t rd_status_t
bitfield for representing errors
Header to enable and disable module compilation.
Ruuvi error codes and error check function.
rd_status_t ri_yield_uninit(void)
Uninitializes yielding functions.
rd_status_t ri_yield_init(void)
Initializes yielding functions.
bool ri_yield_is_interrupt_context(void)
Check if current execution is in interrupt context.
rd_status_t ri_yield(void)
Function which will release execution.
void ri_yield_indication_set(const ri_yield_state_ind_fp_t indication)
rd_status_t ri_delay_us(uint32_t time)
Delay a given number of microseconds.
void(* ri_yield_state_ind_fp_t)(const bool active)
Enable implementation selected by application.
rd_status_t ri_delay_ms(uint32_t time)
Delay a given number of milliseconds.
rd_status_t ri_yield_low_power_enable(const bool enable)
Initializes yielding functions.