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

◆ LED_EFFECT_LED_BREATH

#define LED_EFFECT_LED_BREATH ( _period,
_color )

#include <include/caf/led_effect.h>

Value:
{ \
.steps = ((const struct led_effect_step[]) { \
{ \
.color = _color, \
.substep_count = _BREATH_SUBSTEPS, \
.substep_time = ((_period + (_BREATH_SUBSTEPS - 1)) \
/ _BREATH_SUBSTEPS), \
}, \
{ \
.color = _color, \
.substep_count = 1, \
.substep_time = _period, \
}, \
{ \
.color = LED_NOCOLOR(), \
.substep_count = _BREATH_SUBSTEPS, \
.substep_time = ((_period + (_BREATH_SUBSTEPS - 1)) \
/ _BREATH_SUBSTEPS), \
}, \
{ \
.color = LED_NOCOLOR(), \
.substep_count = 1, \
.substep_time = _period, \
}, \
}), \
.step_count = 4, \
.loop_forever = true, \
}
#define LED_NOCOLOR()
Definition led_effect.h:106
Single step of a LED effect.
Definition led_effect.h:38

Create LED breathing effect initializer.

LED color is smoothly, gradually changed between the LED turned off and the selected color.

Parameters
_periodPeriod of time for single substep.
_colorSelected LED color.