-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Description
When I tried to implement PWM for the onboard rgb led on an nrf52840 dongle an error occurs in the devicetree_unfixed.h file zephyr/include/generated/devicetree_unfixed.h:1306:36: error: 'DT_N_S_pwmleds_S_pwm_led_0' undeclared
the same error occurs for ...led_1, 2 etc.
Code
#define RED_NODE DT_ALIAS(red_pwm_led)
#if DT_NODE_HAS_STATUS(RED_NODE, okay)
#define RED_CTLR_NODE DT_PWMS_CTLR(RED_NODE)
#define RED_CHANNEL DT_PWMS_CHANNEL(RED_NODE)
#define RED_FLAGS DT_PWMS_FLAGS(RED_NODE)
enum { RED, GREEN, BLUE };
const struct device *pwm_dev[3];
pwm_dev[RED] = DEVICE_DT_GET(RED_CTLR_NODE); //This line invokes the error
Logs and console output
zephyr/include/generated/devicetree_unfixed.h:1306:36: error: 'DT_N_S_pwmleds_S_pwm_led_0' undeclared
Environment (please complete the following information):
- Windows 10
- Segger nrf connect 1.5.0 sdk Zephyr