diff --git a/boards/arduino-due/Makefile.features b/boards/arduino-due/Makefile.features index 9ac4a53d6b..9b7846ee4a 100644 --- a/boards/arduino-due/Makefile.features +++ b/boards/arduino-due/Makefile.features @@ -1 +1 @@ -FEATURES_PROVIDED = periph_gpio periph_spi +FEATURES_PROVIDED = periph_gpio periph_spi periph_random diff --git a/boards/cc2538dk/Makefile.features b/boards/cc2538dk/Makefile.features index 0f33fa5629..42f40abd5f 100644 --- a/boards/cc2538dk/Makefile.features +++ b/boards/cc2538dk/Makefile.features @@ -1 +1 @@ -FEATURES_PROVIDED = periph_gpio +FEATURES_PROVIDED = periph_gpio periph_random periph_cpuid diff --git a/boards/iot-lab_M3/Makefile.features b/boards/iot-lab_M3/Makefile.features index 0717f0e9f1..0c2220101c 100644 --- a/boards/iot-lab_M3/Makefile.features +++ b/boards/iot-lab_M3/Makefile.features @@ -1 +1 @@ -FEATURES_PROVIDED = transceiver periph_gpio periph_uart periph_spi periph_i2c +FEATURES_PROVIDED = transceiver periph_gpio periph_uart periph_spi periph_i2c periph_rtt diff --git a/boards/msba2/Makefile.features b/boards/msba2/Makefile.features index 762734b956..75b005a0cb 100644 --- a/boards/msba2/Makefile.features +++ b/boards/msba2/Makefile.features @@ -1 +1 @@ -FEATURES_PROVIDED = transceiver +FEATURES_PROVIDED = transceiver periph_pwm diff --git a/boards/native/Makefile.features b/boards/native/Makefile.features index 762734b956..91747cc078 100644 --- a/boards/native/Makefile.features +++ b/boards/native/Makefile.features @@ -1 +1 @@ -FEATURES_PROVIDED = transceiver +FEATURES_PROVIDED = transceiver periph_cpuid diff --git a/boards/pca10000/Makefile.features b/boards/pca10000/Makefile.features index 0f33fa5629..c21f92a56a 100644 --- a/boards/pca10000/Makefile.features +++ b/boards/pca10000/Makefile.features @@ -1 +1 @@ -FEATURES_PROVIDED = periph_gpio +FEATURES_PROVIDED = periph_gpio periph_random periph_rtt periph_cpuid diff --git a/boards/pca10005/Makefile.features b/boards/pca10005/Makefile.features index 0f33fa5629..c21f92a56a 100644 --- a/boards/pca10005/Makefile.features +++ b/boards/pca10005/Makefile.features @@ -1 +1 @@ -FEATURES_PROVIDED = periph_gpio +FEATURES_PROVIDED = periph_gpio periph_random periph_rtt periph_cpuid diff --git a/boards/stm32f4discovery/Makefile.features b/boards/stm32f4discovery/Makefile.features index 9ac4a53d6b..548a0f3f4c 100644 --- a/boards/stm32f4discovery/Makefile.features +++ b/boards/stm32f4discovery/Makefile.features @@ -1 +1 @@ -FEATURES_PROVIDED = periph_gpio periph_spi +FEATURES_PROVIDED = periph_gpio periph_spi periph_pwm periph_random diff --git a/boards/yunjia-nrf51822/Makefile.features b/boards/yunjia-nrf51822/Makefile.features index 0f33fa5629..c21f92a56a 100644 --- a/boards/yunjia-nrf51822/Makefile.features +++ b/boards/yunjia-nrf51822/Makefile.features @@ -1 +1 @@ -FEATURES_PROVIDED = periph_gpio +FEATURES_PROVIDED = periph_gpio periph_random periph_rtt periph_cpuid diff --git a/tests/periph_cpuid/Makefile b/tests/periph_cpuid/Makefile index f85cbd9e8e..e078803205 100644 --- a/tests/periph_cpuid/Makefile +++ b/tests/periph_cpuid/Makefile @@ -1,6 +1,6 @@ export APPLICATION = periph_cpuid include ../Makefile.tests_common -#BOARD_WHITELIST := native +FEATURES_REQUIRED = periph_cpuid include $(RIOTBASE)/Makefile.include diff --git a/tests/periph_cpuid/main.c b/tests/periph_cpuid/main.c index 3e80cac87b..7eedaca10b 100644 --- a/tests/periph_cpuid/main.c +++ b/tests/periph_cpuid/main.c @@ -25,9 +25,6 @@ #include "cpu-conf.h" #include "periph/cpuid.h" -/* only compile this test if CPUID getter is defined for the platform */ -#if CPUID_ID_LEN - int main(void) { uint8_t id[CPUID_ID_LEN]; @@ -47,14 +44,3 @@ int main(void) return 0; } - -#else - -int main(void) -{ - puts("Test for the CPUID driver"); - puts("Error: the CPUID driver is not defined for this platform"); - return 0; -} - -#endif /* CPUID_ID_LEN */ diff --git a/tests/periph_gpio/main.c b/tests/periph_gpio/main.c index fdd0690131..f9955f2c3a 100644 --- a/tests/periph_gpio/main.c +++ b/tests/periph_gpio/main.c @@ -25,9 +25,6 @@ #include "periph/gpio.h" #include "hwtimer.h" -/* only compile this if at least one GPIO device is defined */ -#if GPIO_NUMOF - uint32_t state = 0; uint32_t old_state = 0; @@ -93,14 +90,3 @@ int main(void) return 0; } - -#else - -int main(void) -{ - puts("No low-level GPIO device defined for this platform."); - - return 0; -} - -#endif /* GPIO_NUMOF */ diff --git a/tests/periph_gpio_exti/main.c b/tests/periph_gpio_exti/main.c index 1b17e46e8e..ade3a22b11 100644 --- a/tests/periph_gpio_exti/main.c +++ b/tests/periph_gpio_exti/main.c @@ -24,9 +24,6 @@ #include "periph_conf.h" #include "periph/gpio.h" -/* only compile this if at least one GPIO device is defined */ -#if GPIO_NUMOF - #define ACTIVE_FLANK GPIO_RISING #define PULL GPIO_NOPULL @@ -187,14 +184,3 @@ int main(void) return 0; } - -#else - -int main(void) -{ - puts("No low-level GPIO device defined for this platform."); - - return 0; -} - -#endif /* GPIO_NUMOF */ diff --git a/tests/periph_pwm/Makefile b/tests/periph_pwm/Makefile index bc2e352ffe..4c1404fbc8 100644 --- a/tests/periph_pwm/Makefile +++ b/tests/periph_pwm/Makefile @@ -1,9 +1,7 @@ export APPLICATION = periph_pwm include ../Makefile.tests_common -BOARD_BLACKLIST := chronos mbed_lpc1768 msb-430 msb-430h native qemu-i386 redbee-econotag telosb \ - wsn430-v1_3b wsn430-v1_4 z1 -# all listed boards: no periph_conf.h defined, +FEATURES_REQUIRED = periph_pwm USEMODULE += vtimer DISABLE_MODULE += auto_init diff --git a/tests/periph_pwm/main.c b/tests/periph_pwm/main.c index a3e4b3c313..7e66c76922 100644 --- a/tests/periph_pwm/main.c +++ b/tests/periph_pwm/main.c @@ -30,9 +30,6 @@ #include "vtimer.h" #include "periph/pwm.h" -/* only compile this test if PWM devices are defined */ -#if PWM_NUMOF - #define WAIT (10000) #define STEP (10) @@ -77,15 +74,3 @@ int main(void) return 0; } - -#else - -int main(void) -{ - puts("\nRIOT PWM test"); - puts("There are no PWM devices defined for this board!"); - - return 0; -} - -#endif /* PWM_NUMOF */ diff --git a/tests/periph_random/Makefile b/tests/periph_random/Makefile index 5bd2c194f8..7d0f3f16b8 100644 --- a/tests/periph_random/Makefile +++ b/tests/periph_random/Makefile @@ -1,9 +1,7 @@ export APPLICATION = periph_random include ../Makefile.tests_common -BOARD_BLACKLIST := chronos mbed_lpc1768 msb-430 msb-430h native qemu-i386 redbee-econotag telosb \ - wsn430-v1_3b wsn430-v1_4 z1 -# all listed boards: no periph_conf.h defined, +FEATURES_REQUIRED = periph_random USEMODULE += vtimer diff --git a/tests/periph_random/main.c b/tests/periph_random/main.c index 90c1a2cb0b..20a49d1e5b 100644 --- a/tests/periph_random/main.c +++ b/tests/periph_random/main.c @@ -24,9 +24,6 @@ #include #include -/* only compile test if a random number generator is defined */ -#if RANDOM_NUMOF - #define LIMIT (20U) int main(void) @@ -66,14 +63,3 @@ int main(void) return 0; } - -#else - -int main(void) -{ - puts("Random number generator low-level driver test"); - puts("There is no (pseudo) random generator implementation for your platform"); - return 0; -} - -#endif /* RANDOM_NUMOF */ diff --git a/tests/periph_rtt/Makefile b/tests/periph_rtt/Makefile index a719175a62..869af1510c 100644 --- a/tests/periph_rtt/Makefile +++ b/tests/periph_rtt/Makefile @@ -1,9 +1,7 @@ export APPLICATION = periph_rtt include ../Makefile.tests_common -BOARD_BLACKLIST := chronos mbed_lpc1768 msb-430 msb-430h native qemu-i386 redbee-econotag telosb \ - wsn430-v1_3b wsn430-v1_4 z1 -# all listed boards: no periph_conf.h defined, +FEATURES_REQUIRED = periph_rtt DISABLE_MODULE += auto_init diff --git a/tests/periph_rtt/main.c b/tests/periph_rtt/main.c index 8dcddadb5f..6d2788ccf3 100644 --- a/tests/periph_rtt/main.c +++ b/tests/periph_rtt/main.c @@ -28,9 +28,6 @@ #include "periph_conf.h" #include "periph/rtt.h" -/* only compile this test if a RTT device is defined */ -#if RTT_NUMOF - #define TICKS_TO_WAIT (10 * RTT_FREQUENCY) void cb(void *arg) @@ -59,15 +56,3 @@ int main(void) puts("Done setting up the RTT, wait for many Hellos"); return 0; } - -#else - -int main(void) -{ - puts("\nRIOT RTT low-level driver test"); - puts("There are no RTT devices defined for this board!"); - - return 0; -} - -#endif /* RTT_NUMOF */