Skip to content
Permalink
Browse files

samples: servo_motor: add HW PWM choice for NRF52 family

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 Mar 22, 2019
1 parent ad769e9 commit 6ae245749176496c6aa01343d8aa5d718474ec9d
Showing with 5 additions and 1 deletion.
  1. +5 −1 samples/basic/servo_motor/src/main.c
@@ -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

0 comments on commit 6ae2457

Please sign in to comment.
You can’t perform that action at this time.