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

◆ LED_COLOR

#define LED_COLOR (   _r,
  _g,
  _b 
)

#include <include/caf/led_effect.h>

Value:
{ \
.c = { \
COLOR_BRIGHTNESS_TO_PCT(_r), \
COLOR_BRIGHTNESS_TO_PCT(_g), \
COLOR_BRIGHTNESS_TO_PCT(_b) \
} \
}

Create LED color initializer for LED turned on.

Note
As arguments, pass the brightness levels for every color channel.
The macro returns the structure initializer that once expanded contains commas not placed in brackets. This means that when passed as an argument, this argument cannot be passed simply to another macro. Use LED_COLOR_ARG_PASS macro for the preprocessor to treat it as a single argument again.