Skip to content
Permalink
Browse files

samples: fade_led: 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 decb773 commit 7727972f938f9d87ad1c0239350b632e6b896fd7
Showing with 2 additions and 28 deletions.
  1. +1 −4 samples/basic/fade_led/sample.yaml
  2. +1 −24 samples/basic/fade_led/src/main.c
@@ -2,10 +2,7 @@ sample:
name: Fade LED
tests:
sample.fade_led:
# FIXME: We should remove those and just rely on depends_on
platform_whitelist: arduino_101
nucleo_f103rb nucleo_f401re nucleo_l476rg nucleo_l496zg hexiwear_k64
nrf51_pca10028 nrf52840_pca10056
tags: drivers pwm
depends_on: pwm
harness: led
filter: DT_ALIAS_PWM_LED0_PWMS_CONTROLLER
@@ -15,33 +15,10 @@
#include <device.h>
#include <drivers/pwm.h>

#if defined(CONFIG_SOC_STM32F401XE) || defined(CONFIG_SOC_STM32L476XX)
#define PWM_DRIVER DT_PWM_STM32_2_DEV_NAME
#define PWM_CHANNEL 1
#elif CONFIG_SOC_STM32F103XB
#define PWM_DRIVER DT_PWM_STM32_1_DEV_NAME
#define PWM_CHANNEL 1
#elif defined(CONFIG_SOC_QUARK_SE_C1000)
#define PWM_DRIVER CONFIG_PWM_QMSI_DEV_NAME
#define PWM_CHANNEL 0
#elif defined(CONFIG_SOC_FAMILY_NRF)
#if defined(CONFIG_PWM_NRF5_SW)
#define PWM_DRIVER CONFIG_PWM_NRF5_SW_0_DEV_NAME
#else
#define PWM_DRIVER DT_NORDIC_NRF_PWM_PWM_0_LABEL
#endif /* CONFIG_PWM_NRF5_SW */
#define PWM_CHANNEL DT_ALIAS_LED0_GPIOS_PIN
#elif defined(CONFIG_SOC_ESP32)
#define PWM_DRIVER CONFIG_PWM_LED_ESP32_DEV_NAME_0
#define PWM_CHANNEL 21
#elif defined(DT_ALIAS_PWM_LED0_PWMS_CONTROLLER) && defined(DT_ALIAS_PWM_LED0_PWMS_CHANNEL)
#if defined(DT_ALIAS_PWM_LED0_PWMS_CONTROLLER) && defined(DT_ALIAS_PWM_LED0_PWMS_CHANNEL)
/* get the defines from dt (based on alias 'pwm-led0') */
#define PWM_DRIVER DT_ALIAS_PWM_LED0_PWMS_CONTROLLER
#define PWM_CHANNEL DT_ALIAS_PWM_LED0_PWMS_CHANNEL
#elif defined(CONFIG_BOARD_HIFIVE1)
/* Blink the blue channel of the RGB LED */
#define PWM_DRIVER DT_ALIAS_LED1_PWMS_CONTROLLER
#define PWM_CHANNEL DT_ALIAS_LED1_PWMS_CHANNEL
#else
#error "Choose supported PWM driver"
#endif

0 comments on commit 7727972

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