mirror of https://github.com/ARMmbed/mbed-os.git
Adding NOT_SUPPORTED errors to tests
parent
a6c986e60e
commit
9db9ede4a6
|
@ -1,3 +1,11 @@
|
||||||
|
#if !DEVICE_ANALOGIN
|
||||||
|
#error [NOT_SUPPORTED] AnalogIn not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !DEVICE_ANALOGOUT
|
||||||
|
#error [NOT_SUPPORTED] AnalogOut not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "test_env.h"
|
#include "test_env.h"
|
||||||
|
|
||||||
#if defined(TARGET_K64F) | defined (TARGET_K22F)
|
#if defined(TARGET_K64F) | defined (TARGET_K22F)
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
#if !DEVICE_ANALOGIN
|
||||||
|
#error [NOT_SUPPORTED] AnalogIn not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
#include "test_env.h"
|
#include "test_env.h"
|
||||||
|
|
||||||
|
|
|
@ -13,10 +13,13 @@ BusOut bus2(PB03, PB22, PB02, PB23);
|
||||||
BusOut bus1(PA02, PA03, PA04, PA05, PA06, PA07, PA08, PA09, PA10, PA11, PA16, PA17);
|
BusOut bus1(PA02, PA03, PA04, PA05, PA06, PA07, PA08, PA09, PA10, PA11, PA16, PA17);
|
||||||
BusOut bus2(PB10, PB11, PB12, PB13);
|
BusOut bus2(PB10, PB11, PB12, PB13);
|
||||||
|
|
||||||
#else
|
#elif defined(TARGET_FF_ARDUINO)
|
||||||
BusOut bus1(D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14, D15);
|
BusOut bus1(D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14, D15);
|
||||||
BusOut bus2(A5, A4, A3, A2, A1, A0);
|
BusOut bus2(A5, A4, A3, A2, A1, A0);
|
||||||
|
|
||||||
|
#else
|
||||||
|
#error [NOT_SUPPORTED] This test is not supported on this target
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
#if !DEVICE_CAN
|
||||||
|
#error [NOT_SUPPORTED] CAN not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
|
|
||||||
Ticker ticker;
|
Ticker ticker;
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
#if !DEVICE_CAN
|
||||||
|
#error [NOT_SUPPORTED] CAN not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
|
|
||||||
Ticker ticker;
|
Ticker ticker;
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
#if !DEVICE_CAN
|
||||||
|
#error [NOT_SUPPORTED] CAN not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
#include "test_env.h"
|
#include "test_env.h"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
#if !DEVICE_LOCALFILESYSTEM
|
||||||
|
#error [NOT_SUPPORTED] LocalFileSystem not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
|
|
||||||
void led_blink(PinName led) {
|
void led_blink(PinName led) {
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
#if !DEVICE_LOCALFILESYSTEM
|
||||||
|
#error [NOT_SUPPORTED] LocalFileSystem not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
#include "TextLCD.h"
|
#include "TextLCD.h"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
#if !DEVICE_I2C
|
||||||
|
#error [NOT_SUPPORTED] I2C is not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
#include "test_env.h"
|
#include "test_env.h"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
#if !DEVICE_I2CSLAVE
|
||||||
|
#error [NOT_SUPPORTED] I2C Slave is not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
#include "test_env.h"
|
#include "test_env.h"
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#elif defined(TARGET_SAML21J18A)
|
#elif defined(TARGET_SAML21J18A)
|
||||||
#define TIMER_IRQ TC0_IRQn
|
#define TIMER_IRQ TC0_IRQn
|
||||||
#else
|
#else
|
||||||
#error This test can't run on this target.
|
#error [NOT_SUPPORTED] This test can't run on this target.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Serial pc(USBTX, USBRX);
|
Serial pc(USBTX, USBRX);
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
#if !DEVICE_PORTOUT
|
||||||
|
#error [NOT_SUPPORTED] PortOut is not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
|
|
||||||
# if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_LPC4088) || defined(TARGET_LPC2460)
|
# if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_LPC4088) || defined(TARGET_LPC2460)
|
||||||
|
@ -48,7 +52,9 @@
|
||||||
# define LED2 0
|
# define LED2 0
|
||||||
# define LED3 0
|
# define LED3 0
|
||||||
# define LED4 0
|
# define LED4 0
|
||||||
# endif
|
# else
|
||||||
|
#error [NOT_SUPPORTED] This test can't be ran on this target
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define LED_MASK (LED1|LED2|LED3|LED4)
|
#define LED_MASK (LED1|LED2|LED3|LED4)
|
||||||
|
|
|
@ -48,7 +48,7 @@ int main() {
|
||||||
printf("Initialize PWM on pin 24 with duty cycle: %.2f\n", pwm_dp24.read());
|
printf("Initialize PWM on pin 24 with duty cycle: %.2f\n", pwm_dp24.read());
|
||||||
printf("Initialize PWM on pin 18 with duty cycle: %.2f\n", pwm_dp18.read());
|
printf("Initialize PWM on pin 18 with duty cycle: %.2f\n", pwm_dp18.read());
|
||||||
|
|
||||||
#elif defined(TARGET_nRF51822)
|
#elif defined(TARGET_NRF51822)
|
||||||
PwmOut pwm_p24(p24);
|
PwmOut pwm_p24(p24);
|
||||||
PwmOut pwm_p25(p25);
|
PwmOut pwm_p25(p25);
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ int main() {
|
||||||
|
|
||||||
notify_completion(result == value ? true : false);
|
notify_completion(result == value ? true : false);
|
||||||
#else
|
#else
|
||||||
#error This test is not supported on this target.
|
#error [NOT_SUPPORTED] This test is not supported on this target.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
notify_completion(true);
|
notify_completion(true);
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#define TEST_LED LED1
|
#define TEST_LED LED1
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error This test is not supported on this target.
|
#error [NOT_SUPPORTED] This test is not supported on this target
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PwmOut led(TEST_LED);
|
PwmOut led(TEST_LED);
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
#if !DEVICE_SEMIHOST
|
||||||
|
#error [NOT_SUPPORTED] Semihost not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
|
|
||||||
Serial pc(USBTX, USBRX);
|
Serial pc(USBTX, USBRX);
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
|
|
||||||
|
#if !DEVICE_SPI
|
||||||
|
#error [NOT_SUPPORTED] SPI is not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(TARGET_SAMR21G18A)
|
#if defined(TARGET_SAMR21G18A)
|
||||||
SPI spi(PB22, PB02, PB23); // mosi, miso, sclk
|
SPI spi(PB22, PB02, PB23); // mosi, miso, sclk
|
||||||
DigitalOut latchpin(PB03);
|
DigitalOut latchpin(PB03);
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
#if !DEVICE_SPI
|
||||||
|
#error [NOT_SUPPORTED] SPI not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
#include "test_env.h"
|
#include "test_env.h"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
#if !DEVICE_SPISLAVE
|
||||||
|
#error [NOT_SUPPORTED] SPI Slave not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
|
|
||||||
#if defined(TARGET_KL25Z)
|
#if defined(TARGET_KL25Z)
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
#if !DEVICE_LOCALFILESYSTEM
|
||||||
|
#error [NOT_SUPPORTED] LocalFileSystem not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mbed.h"
|
#include "mbed.h"
|
||||||
|
|
||||||
#define TEST_STDIO 0
|
#define TEST_STDIO 0
|
||||||
|
|
Loading…
Reference in New Issue