I am integrating PWM into my project which uses SDK_15.2.0.
My config.sh contains:
#define NRFX_PWM_ENABLED 1 #define NRFX_PWM0_ENABLED 1
and I have included nrfx_pwm.c.
Compiling the project I get this error:
'NRFX_PWM0_INST_IDX' undeclared here (not in a function); did you mean 'NRFX_PWM_INSTANCE'?
Trying to sort this problem out, I realized that the nrfx_pwm.c is completely grayed out. It starts with:
#if NRFX_CHECK(NRFX_PWM_ENABLED) ....
Hence, apparently NRFX_PWM_ENABLED is not defined.
How do I fix this?