1 #ifndef RUUVI_TASK_LED_H
2 #define RUUVI_TASK_LED_H
51 #define RT_LED_ON (true)
53 #define RT_LED_OFF (false)
75 const size_t num_leds);
191 void rt_led_blink_isr (
void *
const p_context);
192 void rt_led_blink_once_isr (
void *
const p_context);
uint32_t rd_status_t
bitfield for representing errors
Ruuvi error codes and error check function.
uint16_t ri_gpio_id_t
port<<8 + pin
ri_gpio_state_t
States of GPIO pins.
rd_status_t rt_led_init(const ri_gpio_id_t *const leds, const ri_gpio_state_t *const active_states, const size_t num_leds)
LED initialization function.
rd_status_t rt_led_blink_once(const ri_gpio_id_t led, const uint16_t interval_ms)
Function to blink led once.
rd_status_t rt_led_activity_led_set(const ri_gpio_id_t led)
Set LED which is used to indicate activity.
uint16_t rt_led_activity_led_get(void)
Get LED which is used to indicate activity.
bool rt_led_is_init(void)
Check if LED task has been initialized.
rd_status_t rt_led_blink_start(const ri_gpio_id_t led, const uint16_t interval_ms)
Start blinking led at 50 % duty cycle at given interval.
rd_status_t rt_led_blink_stop(const ri_gpio_id_t led)
Stop blinking led and leave the pin as high-drive output in inactive state.
rd_status_t rt_led_write(const ri_gpio_id_t led, const bool state)
LED write function. Set given LED ON or OFF.
void rt_led_activity_indicate(const bool state)
Function to indicate activity in program. Led is turned on while program is active and off while in s...
rd_status_t rt_led_uninit(void)
LED uninitialization function.