Skip to content

Commit 8b5dd6e

Browse files
committed
Merge pull request #1613 from bridadan/fixing-test-not-supported
Fixing issue with NOT_SUPPORTED messages
2 parents 768fbd7 + 3362325 commit 8b5dd6e

File tree

20 files changed

+46
-45
lines changed

20 files changed

+46
-45
lines changed

libraries/tests/mbed/analog/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "test_env.h"
2+
13
#if !DEVICE_ANALOGIN
24
#error [NOT_SUPPORTED] AnalogIn not supported
35
#endif
@@ -6,8 +8,6 @@
68
#error [NOT_SUPPORTED] AnalogOut not supported
79
#endif
810

9-
#include "test_env.h"
10-
1111
#if defined(TARGET_K64F) | defined (TARGET_K22F)
1212
AnalogIn in(A0);
1313
AnalogOut out(DAC0_OUT);

libraries/tests/mbed/analog_pot/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
#include "mbed.h"
2+
#include "test_env.h"
3+
14
#if !DEVICE_ANALOGIN
25
#error [NOT_SUPPORTED] AnalogIn not supported
36
#endif
47

5-
#include "mbed.h"
6-
#include "test_env.h"
7-
88
AnalogIn pot1(A0);
99
AnalogIn pot2(A1);
1010

libraries/tests/mbed/can/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
#include "mbed.h"
2+
13
#if !DEVICE_CAN
24
#error [NOT_SUPPORTED] CAN not supported
35
#endif
46

5-
#include "mbed.h"
6-
77
Ticker ticker;
88
DigitalOut led1(LED1);
99
DigitalOut led2(LED2);

libraries/tests/mbed/can_interrupt/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
#include "mbed.h"
2+
13
#if !DEVICE_CAN
24
#error [NOT_SUPPORTED] CAN not supported
35
#endif
46

5-
#include "mbed.h"
6-
77
Ticker ticker;
88
DigitalOut led1(LED1);
99
DigitalOut led2(LED2);

libraries/tests/mbed/can_loopback/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
#include "mbed.h"
2+
#include "test_env.h"
3+
14
#if !DEVICE_CAN
25
#error [NOT_SUPPORTED] CAN not supported
36
#endif
47

5-
#include "mbed.h"
6-
#include "test_env.h"
7-
88
#if defined(TARGET_LPC1549)
99
CAN can1(D9, D8);
1010
#elif defined(TARGET_LPC1768) || defined(TARGET_LPC4088)

libraries/tests/mbed/dir/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
#include "mbed.h"
2+
13
#if !DEVICE_LOCALFILESYSTEM
24
#error [NOT_SUPPORTED] LocalFileSystem not supported
35
#endif
46

5-
#include "mbed.h"
6-
77
void led_blink(PinName led) {
88
DigitalOut myled(led);
99
while (1) {

libraries/tests/mbed/freopen/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
#include "mbed.h"
2+
13
#if !DEVICE_LOCALFILESYSTEM
24
#error [NOT_SUPPORTED] LocalFileSystem not supported
35
#endif
46

5-
#include "mbed.h"
67
#include "TextLCD.h"
78

89
int main() {

libraries/tests/mbed/i2c_master/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
#include "mbed.h"
2+
#include "test_env.h"
3+
14
#if !DEVICE_I2C
25
#error [NOT_SUPPORTED] I2C is not supported
36
#endif
47

5-
#include "mbed.h"
6-
#include "test_env.h"
7-
88
#define SIZE (10)
99
#define ADDR (0x90)
1010

libraries/tests/mbed/i2c_slave/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
#include "mbed.h"
2+
#include "test_env.h"
3+
14
#if !DEVICE_I2CSLAVE
25
#error [NOT_SUPPORTED] I2C Slave is not supported
36
#endif
47

5-
#include "mbed.h"
6-
#include "test_env.h"
7-
88
#define SIZE (10)
99
#define ADDR (0x90)
1010

libraries/tests/mbed/interruptin/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
#include "test_env.h"
2+
13
#if !DEVICE_INTERRUPTIN
24
#error [NOT_SUPPORTED] InterruptIn is not supported
35
#endif
46

5-
#include "test_env.h"
6-
77
DigitalOut myled(LED1);
88
DigitalOut led2(LED2);
99

libraries/tests/mbed/interruptin_2/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
#include "mbed.h"
2+
13
#if !DEVICE_INTERRUPTIN
24
#error [NOT_SUPPORTED] InterruptIn is not supported
35
#endif
46

5-
#include "mbed.h"
6-
77
#if defined(TARGET_LPC4088)
88
InterruptIn button(p18);
99
InterruptIn button1(p17);

libraries/tests/mbed/portout/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
#include "mbed.h"
2+
13
#if !DEVICE_PORTOUT
24
#error [NOT_SUPPORTED] PortOut is not supported
35
#endif
46

5-
#include "mbed.h"
6-
77
# if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_LPC4088) || defined(TARGET_LPC2460)
88
# define LED_PORT Port1
99
# define LED1 (1 << 18) // P1.18

libraries/tests/mbed/portout_portin/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "test_env.h"
2+
13
#if !DEVICE_PORTIN
24
#error [NOT_SUPPORTED] PortIn is not supported
35
#endif
@@ -6,8 +8,6 @@
68
#error [NOT_SUPPORTED] PortOut is not supported
79
#endif
810

9-
#include "test_env.h"
10-
1111
#if defined(TARGET_K64F) || defined(TARGET_KL05Z)
1212
#define P1_1 (1 << 16)
1313
#define P1_2 (1 << 17)

libraries/tests/mbed/reset/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
#include "mbed.h"
2+
13
#if !DEVICE_SEMIHOST
24
#error [NOT_SUPPORTED] Semihost not supported
35
#endif
46

5-
#include "mbed.h"
6-
77
Serial pc(USBTX, USBRX);
88

99
extern "C" void mbed_reset();

libraries/tests/mbed/rtc/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
#include "mbed.h"
2+
#include "test_env.h"
3+
14
#if !DEVICE_RTC
25
#error [NOT_SUPPORTED] RTC is not supported
36
#endif
47

5-
#include "mbed.h"
6-
#include "test_env.h"
7-
88
#define CUSTOM_TIME 1256729737
99

1010
int main() {

libraries/tests/mbed/sleep/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
#include "test_env.h"
2+
13
#if !DEVICE_SLEEP
24
#error [NOT_SUPPORTED] Sleep is not supported
35
#endif
46

5-
#include "test_env.h"
6-
77
#if defined(TARGET_LPC4088)
88
InterruptIn wkp(P2_10);
99
#elif defined(TARGET_K22F)

libraries/tests/mbed/sleep_timeout/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
#include "mbed.h"
2+
13
#if !DEVICE_SLEEP
24
#error [NOT_SUPPORTED] Sleep is not supported
35
#endif
46

5-
#include "mbed.h"
6-
77
DigitalOut led1(LED1);
88
DigitalOut led2(LED2);
99
Timeout to1;

libraries/tests/mbed/spi_master/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
#include "mbed.h"
2+
#include "test_env.h"
3+
14
#if !DEVICE_SPI
25
#error [NOT_SUPPORTED] SPI not supported
36
#endif
47

5-
#include "mbed.h"
6-
#include "test_env.h"
7-
88
#if defined(TARGET_KL25Z)
99
SPI spi(PTD2, PTD3, PTD1); // mosi, miso, sclk
1010
DigitalOut cs(PTA13);

libraries/tests/mbed/spi_slave/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
#include "mbed.h"
2+
13
#if !DEVICE_SPISLAVE
24
#error [NOT_SUPPORTED] SPI Slave not supported
35
#endif
46

5-
#include "mbed.h"
6-
77
#if defined(TARGET_KL25Z)
88
SPISlave device(PTD2, PTD3, PTD1, PTD0); // mosi, miso, sclk, ssel
99
#elif defined(TARGET_nRF51822)

libraries/tests/mbed/stdio_benchmark/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
#include "mbed.h"
2+
13
#if !DEVICE_LOCALFILESYSTEM
24
#error [NOT_SUPPORTED] LocalFileSystem not supported
35
#endif
46

5-
#include "mbed.h"
6-
77
#define TEST_STDIO 0
88

99
int main() {

0 commit comments

Comments
 (0)