Skip to content

Commit

Permalink
samples: servo_motor: add HW PWM choice for NRF52 family
Browse files Browse the repository at this point in the history
Hardware PWM make sense for servo control even in a sample,  add HW PWM
choice for NRF52 family, which support it.

Signed-off-by: Aaron Tsui <aaron.tsui@outlook.com>
  • Loading branch information
overheat authored and nashif committed May 27, 2019
1 parent ad769e9 commit 6ae2457
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion samples/basic/servo_motor/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@

#if defined(CONFIG_SOC_QUARK_SE_C1000) || defined(CONFIG_SOC_QUARK_D2000)
#define PWM_DEV CONFIG_PWM_QMSI_DEV_NAME
#elif defined(CONFIG_PWM_NRF5_SW)
#elif defined(CONFIG_SOC_FAMILY_NRF)
#if defined(CONFIG_PWM_NRF5_SW)
#define PWM_DEV CONFIG_PWM_NRF5_SW_0_DEV_NAME
#else
#define PWM_DEV DT_NORDIC_NRF_PWM_PWM_0_LABEL
#endif /* CONFIG_PWM_NRF5_SW */
#else
#error "Choose supported board or add new board for the application"
#endif

Expand Down

0 comments on commit 6ae2457

Please sign in to comment.