Hi All,
I am trying to make a project for RGB lights using nRF52-DK using NCS.
#define PWM_NODE DT_ALIAS(rgb_pwm)
#define PWM_PIN(channel) DT_PROP(PWM_NODE, ch##channel##_pin)
struct led {
const struct device *pwm_dev;
size_t id;
struct led_color color;
uint16_t effect_step;
uint16_t effect_substep;
struct k_delayed_work work;
};
static struct led leds;
static const size_t led_pins[3] = {
PWM_PIN(0),
PWM_PIN(1),
PWM_PIN(2),
};
In these lines of code I am getting the following error -
'DT_N_ALIAS_rgb_pwm_P_ch0_pin' undeclared here (not in a function)
I am unable to understand why I am getting this error. Please help me to solve this.
Regards,
Zolu