Skip to content
Permalink
Browse files

samples: servo_motor: remove whitelisting

Remove whitelisting and enable broader testing on all boards with needed
features.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
  • Loading branch information...
nashif committed Jul 6, 2019
1 parent 7727972 commit e99c4d2ddad0004bae3c862c1a91ce5f8c98fb7e
@@ -25,13 +25,6 @@ BBC micro:bit
You will need to connect the motor's red wire to external 5V, the black wire to
ground and the white wire to pad 0 on the edge connector.

Arduino 101
===========

You will need to connect the motor's red wire to 5V, the black wire to ground
and the white wire to PWM 0 via the shield.


Building and Running
********************

@@ -2,8 +2,7 @@ sample:
name: Servo Motor using PWM
tests:
sample.servo_motor:
# FIXME: We should remove those and just rely on depends_on
platform_whitelist: arduino_101 bbc_microbit
tags: drivers pwm
depends_on: pwm
harness: motor
filter: DT_ALIAS_PWM_0_LABEL
@@ -15,15 +15,7 @@
#include <device.h>
#include <drivers/pwm.h>

#if defined(CONFIG_SOC_QUARK_SE_C1000)
#define PWM_DEV CONFIG_PWM_QMSI_DEV_NAME
#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
#ifndef DT_ALIAS_PWM_0_LABEL
#error "Choose supported board or add new board for the application"
#endif

@@ -46,7 +38,7 @@ void main(void)

printk("PWM demo app-servo control\n");

pwm_dev = device_get_binding(PWM_DEV);
pwm_dev = device_get_binding(DT_ALIAS_PWM_0_LABEL);
if (!pwm_dev) {
printk("Cannot find PWM device!\n");
return;

0 comments on commit e99c4d2

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