5 #include <twr_scheduler.h>
80 twr_led_channel_t _channel;
82 bool _open_drain_output;
twr_gpio_channel_t
GPIO channels.
bool twr_led_is_pulse(twr_led_t *self)
Check if there is ongoing LED pulse.
void twr_led_set_slot_interval(twr_led_t *self, twr_tick_t interval)
Set slot interval for pattern processing.
void twr_led_set_pattern(twr_led_t *self, uint32_t pattern)
Set custom blinking pattern.
void twr_led_init_virtual(twr_led_t *self, int channel, const twr_led_driver_t *driver, int idle_state)
Initialize virtual LED.
struct twr_led_t twr_led_t
LED instance.
void twr_led_init(twr_led_t *self, twr_gpio_channel_t gpio_channel, bool open_drain_output, int idle_state)
Initialize LED.
void twr_led_blink(twr_led_t *self, int count)
LED blink.
void twr_led_pulse(twr_led_t *self, twr_tick_t duration)
Turn on LED for the specified duration of time.
void twr_led_set_count(twr_led_t *self, int count)
Set count for blinking pattern executed.
void twr_led_set_mode(twr_led_t *self, twr_led_mode_t mode)
Set LED mode.
@ TWR_LED_MODE_TOGGLE
LED toggles between on/off state (this has no effect while processing alternating patterns)
@ TWR_LED_MODE_BLINK
LED blinks.
@ TWR_LED_MODE_BLINK_FAST
LED blinks quickly.
@ TWR_LED_MODE_FLASH
LED flashes repeatedly.
@ TWR_LED_MODE_BLINK_SLOW
LED blinks slowly.
@ TWR_LED_MODE_ON
LED has steady on state.
@ TWR_LED_MODE_OFF
LED has steady off state.
size_t twr_scheduler_task_id_t
Task ID assigned by scheduler.
uint64_t twr_tick_t
Timestamp data type.