Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
samples: blink_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 12, 2019
1 parent aca5edf commit decb773
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 30 deletions.
5 changes: 0 additions & 5 deletions samples/basic/blink_led/README.rst
Expand Up @@ -39,11 +39,6 @@ nrf52840_pca10056
================= =================
No special board setup is necessary because there is an on-board LED connected. No special board setup is necessary because there is an on-board LED connected.


Arduino 101
===========
You will need to connect the LED to ground and PWM0 via the shield.
You may need a current limiting resistor. See your LED datasheet.

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


Expand Down
4 changes: 1 addition & 3 deletions samples/basic/blink_led/sample.yaml
Expand Up @@ -3,9 +3,7 @@ sample:
tests: tests:
sample.blink_led: sample.blink_led:
# FIXME: We should remove those and just rely on depends_on # FIXME: We should remove those and just rely on depends_on
platform_whitelist: arduino_101 filter: DT_ALIAS_PWM_LED0_PWMS_CONTROLLER
nucleo_f103rb nucleo_f302r8 nucleo_f401re nucleo_l476rg stm32f4_disco
hexiwear_k64 colibri_imx7d_m4 nrf52832_mdk nrf52840_mdk, nucleo_l496zg
tags: drivers pwm tags: drivers pwm
depends_on: pwm depends_on: pwm
harness: led harness: led
23 changes: 1 addition & 22 deletions samples/basic/blink_led/src/main.c
Expand Up @@ -15,28 +15,7 @@
#include <device.h> #include <device.h>
#include <drivers/pwm.h> #include <drivers/pwm.h>


#if defined(CONFIG_SOC_STM32F401XE) || defined(CONFIG_SOC_STM32F412ZG) || \ #if defined(DT_ALIAS_PWM_LED0_PWMS_CONTROLLER) && defined(DT_ALIAS_PWM_LED0_PWMS_CHANNEL)
defined(CONFIG_SOC_STM32F413XX) || defined(CONFIG_SOC_STM32L476XX) || \
defined(CONFIG_SOC_STM32F407XG) || defined(CONFIG_SOC_STM32F302X8)
#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_BOARD_COLIBRI_IMX7D_M4)
#define PWM_DRIVER PWM_1_LABEL
#define PWM_CHANNEL 0
#elif defined(DT_ALIAS_PWM_LED0_PWMS_CONTROLLER) && defined(DT_ALIAS_PWM_LED0_PWMS_CHANNEL)
/* get the defines from dt (based on alias 'pwm-led0') */ /* get the defines from dt (based on alias 'pwm-led0') */
#define PWM_DRIVER DT_ALIAS_PWM_LED0_PWMS_CONTROLLER #define PWM_DRIVER DT_ALIAS_PWM_LED0_PWMS_CONTROLLER
#define PWM_CHANNEL DT_ALIAS_PWM_LED0_PWMS_CHANNEL #define PWM_CHANNEL DT_ALIAS_PWM_LED0_PWMS_CHANNEL
Expand Down

0 comments on commit decb773

Please sign in to comment.