nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ LED_EFFECT_LED_CLOCK

#define LED_EFFECT_LED_CLOCK ( _ticks,
_color )

#include <include/caf/led_effect.h>

Value:
{ \
.steps = ((const struct led_effect_step[]) { \
{ \
.color = LED_NOCOLOR(), \
.substep_count = 1, \
.substep_time = LED_CLOCK_SLEEP_PERIOD, \
}, \
LISTIFY(_ticks, _LED_CLOCK_TIK, (,), _color) \
}), \
.step_count = (2 * _ticks + 1), \
.loop_forever = true, \
}
#define LED_CLOCK_SLEEP_PERIOD
Period of time when the LED is turned off (LED clock effect).
Definition led_effect.h:265
#define LED_NOCOLOR()
Definition led_effect.h:106
Single step of a LED effect.
Definition led_effect.h:38

Create LED clock effect initializer.

LED blinks a defined number of times, then it is turned off for a defined period of time. The sequence is repeated periodically.

Note
You can pass only one additional argument to the UTIL_LISTIFY macro, which in this case is LED color. Period is defined separately.
Parameters
_ticksNumber of ticks.
_colorSelected LED color.