From c38209f6d669b22feb24d5321bb35fa0c3128a82 Mon Sep 17 00:00:00 2001 From: Brian Daniels Date: Wed, 2 Mar 2016 13:13:36 -0600 Subject: [PATCH] Adding more [NOT_SUPPORTED] messages to tests --- libraries/tests/mbed/analog_in/main.cpp | 2 ++ libraries/tests/mbed/interruptin/main.cpp | 6 +++++- libraries/tests/mbed/interruptin_2/main.cpp | 4 ++++ libraries/tests/mbed/portout_portin/main.cpp | 13 ++++++++++++- libraries/tests/mbed/rtc/main.cpp | 4 ++++ libraries/tests/mbed/sleep/main.cpp | 4 ++++ libraries/tests/mbed/sleep_timeout/main.cpp | 4 ++++ 7 files changed, 35 insertions(+), 2 deletions(-) diff --git a/libraries/tests/mbed/analog_in/main.cpp b/libraries/tests/mbed/analog_in/main.cpp index 157885df36..b422a78fd6 100644 --- a/libraries/tests/mbed/analog_in/main.cpp +++ b/libraries/tests/mbed/analog_in/main.cpp @@ -21,6 +21,8 @@ DigitalOut indicator(LED1); #else +#error [NOT_SUPPORTED] This test is not supported on this target + #endif uint8_t successes = 0; diff --git a/libraries/tests/mbed/interruptin/main.cpp b/libraries/tests/mbed/interruptin/main.cpp index fc79b978d0..dfe783b6ce 100644 --- a/libraries/tests/mbed/interruptin/main.cpp +++ b/libraries/tests/mbed/interruptin/main.cpp @@ -1,3 +1,7 @@ +#if !DEVICE_INTERRUPTIN + #error [NOT_SUPPORTED] InterruptIn is not supported +#endif + #include "test_env.h" DigitalOut myled(LED1); @@ -101,7 +105,7 @@ void in_handler() { #define PIN_OUT PB02 #define PIN_IN PB03 -#elif defined(TARGET_SAML21J18A) +#elif defined(TARGET_SAML21J18A) #define PIN_OUT PA02 #define PIN_IN PA03 diff --git a/libraries/tests/mbed/interruptin_2/main.cpp b/libraries/tests/mbed/interruptin_2/main.cpp index a418d35755..84d31751ef 100644 --- a/libraries/tests/mbed/interruptin_2/main.cpp +++ b/libraries/tests/mbed/interruptin_2/main.cpp @@ -1,3 +1,7 @@ +#if !DEVICE_INTERRUPTIN + #error [NOT_SUPPORTED] InterruptIn is not supported +#endif + #include "mbed.h" #if defined(TARGET_LPC4088) diff --git a/libraries/tests/mbed/portout_portin/main.cpp b/libraries/tests/mbed/portout_portin/main.cpp index 10fcafa79d..95fdb1bbd0 100644 --- a/libraries/tests/mbed/portout_portin/main.cpp +++ b/libraries/tests/mbed/portout_portin/main.cpp @@ -1,3 +1,11 @@ +#if !DEVICE_PORTIN + #error [NOT_SUPPORTED] PortIn is not supported +#endif + +#if !DEVICE_PORTOUT + #error [NOT_SUPPORTED] PortOut is not supported +#endif + #include "test_env.h" #if defined(TARGET_K64F) || defined(TARGET_KL05Z) @@ -90,7 +98,7 @@ #define P2_1 (1 << 1) // PA_1 #define P2_2 (1 << 2) // PA_2 #define PORT_2 PortA - + #elif defined(TARGET_NUCLEO_F030R8) || \ defined(TARGET_NUCLEO_F070RB) || \ defined(TARGET_NUCLEO_F072RB) || \ @@ -176,6 +184,9 @@ #define P2_2 (1 << 1) /*PB01*/ #define PORT_2 PortB +#else +#error [NOT_SUPPORTED] This test is not supported on this target + #endif #define MASK_1 (P1_1 | P1_2) diff --git a/libraries/tests/mbed/rtc/main.cpp b/libraries/tests/mbed/rtc/main.cpp index 505e70b5af..8185fb1224 100644 --- a/libraries/tests/mbed/rtc/main.cpp +++ b/libraries/tests/mbed/rtc/main.cpp @@ -1,3 +1,7 @@ +#if !DEVICE_RTC + #error [NOT_SUPPORTED] RTC is not supported +#endif + #include "mbed.h" #include "test_env.h" diff --git a/libraries/tests/mbed/sleep/main.cpp b/libraries/tests/mbed/sleep/main.cpp index 40d6bbb3a9..bde55d41aa 100644 --- a/libraries/tests/mbed/sleep/main.cpp +++ b/libraries/tests/mbed/sleep/main.cpp @@ -1,3 +1,7 @@ +#if !DEVICE_SLEEP + #error [NOT_SUPPORTED] Sleep is not supported +#endif + #include "test_env.h" #if defined(TARGET_LPC4088) diff --git a/libraries/tests/mbed/sleep_timeout/main.cpp b/libraries/tests/mbed/sleep_timeout/main.cpp index 0f8adbfb87..02f8975a52 100644 --- a/libraries/tests/mbed/sleep_timeout/main.cpp +++ b/libraries/tests/mbed/sleep_timeout/main.cpp @@ -1,3 +1,7 @@ +#if !DEVICE_SLEEP + #error [NOT_SUPPORTED] Sleep is not supported +#endif + #include "mbed.h" DigitalOut led1(LED1);