Adding NOT_SUPPORTED errors to tests

pull/1621/head
Brian Daniels 2016-02-26 11:51:35 -06:00 committed by adustm
parent a6c986e60e
commit 9db9ede4a6
19 changed files with 89 additions and 20 deletions

View File

@ -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"
#if defined(TARGET_K64F) | defined (TARGET_K22F)

View File

@ -1,3 +1,7 @@
#if !DEVICE_ANALOGIN
#error [NOT_SUPPORTED] AnalogIn not supported
#endif
#include "mbed.h"
#include "test_env.h"

View File

@ -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 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 bus2(A5, A4, A3, A2, A1, A0);
#else
#error [NOT_SUPPORTED] This test is not supported on this target
#endif
int i;

View File

@ -1,3 +1,7 @@
#if !DEVICE_CAN
#error [NOT_SUPPORTED] CAN not supported
#endif
#include "mbed.h"
Ticker ticker;

View File

@ -1,3 +1,7 @@
#if !DEVICE_CAN
#error [NOT_SUPPORTED] CAN not supported
#endif
#include "mbed.h"
Ticker ticker;

View File

@ -1,3 +1,7 @@
#if !DEVICE_CAN
#error [NOT_SUPPORTED] CAN not supported
#endif
#include "mbed.h"
#include "test_env.h"

View File

@ -1,3 +1,7 @@
#if !DEVICE_LOCALFILESYSTEM
#error [NOT_SUPPORTED] LocalFileSystem not supported
#endif
#include "mbed.h"
void led_blink(PinName led) {

View File

@ -1,3 +1,7 @@
#if !DEVICE_LOCALFILESYSTEM
#error [NOT_SUPPORTED] LocalFileSystem not supported
#endif
#include "mbed.h"
#include "TextLCD.h"

View File

@ -1,3 +1,7 @@
#if !DEVICE_I2C
#error [NOT_SUPPORTED] I2C is not supported
#endif
#include "mbed.h"
#include "test_env.h"

View File

@ -1,3 +1,7 @@
#if !DEVICE_I2CSLAVE
#error [NOT_SUPPORTED] I2C Slave is not supported
#endif
#include "mbed.h"
#include "test_env.h"

View File

@ -16,7 +16,7 @@
#elif defined(TARGET_SAML21J18A)
#define TIMER_IRQ TC0_IRQn
#else
#error This test can't run on this target.
#error [NOT_SUPPORTED] This test can't run on this target.
#endif
Serial pc(USBTX, USBRX);

View File

@ -1,3 +1,7 @@
#if !DEVICE_PORTOUT
#error [NOT_SUPPORTED] PortOut is not supported
#endif
#include "mbed.h"
# if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_LPC4088) || defined(TARGET_LPC2460)
@ -48,7 +52,9 @@
# define LED2 0
# define LED3 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)

View File

@ -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 18 with duty cycle: %.2f\n", pwm_dp18.read());
#elif defined(TARGET_nRF51822)
#elif defined(TARGET_NRF51822)
PwmOut pwm_p24(p24);
PwmOut pwm_p25(p25);
@ -177,7 +177,7 @@ int main() {
notify_completion(result == value ? true : false);
#else
#error This test is not supported on this target.
#error [NOT_SUPPORTED] This test is not supported on this target.
#endif
notify_completion(true);

View File

@ -33,7 +33,7 @@
#define TEST_LED LED1
#else
#error This test is not supported on this target.
#error [NOT_SUPPORTED] This test is not supported on this target
#endif
PwmOut led(TEST_LED);

View File

@ -1,3 +1,7 @@
#if !DEVICE_SEMIHOST
#error [NOT_SUPPORTED] Semihost not supported
#endif
#include "mbed.h"
Serial pc(USBTX, USBRX);

View File

@ -1,5 +1,9 @@
#include "mbed.h"
#if !DEVICE_SPI
#error [NOT_SUPPORTED] SPI is not supported
#endif
#if defined(TARGET_SAMR21G18A)
SPI spi(PB22, PB02, PB23); // mosi, miso, sclk
DigitalOut latchpin(PB03);

View File

@ -1,3 +1,7 @@
#if !DEVICE_SPI
#error [NOT_SUPPORTED] SPI not supported
#endif
#include "mbed.h"
#include "test_env.h"

View File

@ -1,3 +1,7 @@
#if !DEVICE_SPISLAVE
#error [NOT_SUPPORTED] SPI Slave not supported
#endif
#include "mbed.h"
#if defined(TARGET_KL25Z)

View File

@ -1,3 +1,7 @@
#if !DEVICE_LOCALFILESYSTEM
#error [NOT_SUPPORTED] LocalFileSystem not supported
#endif
#include "mbed.h"
#define TEST_STDIO 0