Merge pull request #3953 from jeromecoutant/PR_LOOP_TESTS

OS2 tests minor updates for STM32
pull/3536/merge
Sam Grove 2017-03-22 12:07:21 +00:00 committed by GitHub
commit 18dee8f2f2
5 changed files with 51 additions and 16 deletions

View File

@ -9,11 +9,12 @@ DigitalIn in(dp2);
// port pin), D1 is used as USBTX
DigitalOut out(D7);
DigitalIn in(D2);
#elif defined(TARGET_STM) && defined(TARGET_FF_ARDUINO)
// TARGET_FF_ARDUINO cannot be used
// D0 is used as USBRX for some NUCLEO64
// D7 is not used for some NUCLEO32
DigitalOut out(D9);
DigitalOut out(D3);
DigitalIn in(D2);
#elif defined(TARGET_DISCO_L053C8) || \

View File

@ -14,7 +14,7 @@ DigitalInOut d2(D7);
// TARGET_FF_ARDUINO cannot be used
// D0 is used as USBRX for some NUCLEO64
// D7 is not used for some NUCLEO32
DigitalInOut d1(D9);
DigitalInOut d1(D3);
DigitalInOut d2(D2);
#elif defined(TARGET_DISCO_L053C8) || \

View File

@ -44,7 +44,7 @@ void in_handler() {
// D0 is used as USBRX for some NUCLEO64
// D7 is not used for some NUCLEO32
#define PIN_OUT D2
#define PIN_IN D9
#define PIN_IN D3
#elif defined(TARGET_DISCO_L053C8) || \
defined(TARGET_DISCO_F334C8)

View File

@ -1,5 +1,9 @@
#include "test_env.h"
#if !DEVICE_PORTINOUT
#error [NOT_SUPPORTED] PortInOut is not supported
#endif
#if defined(TARGET_K64F)
#define P1_1 (1 << 16)
#define P1_2 (1 << 17)
@ -103,14 +107,28 @@
defined(TARGET_NUCLEO_F411RE) || \
defined(TARGET_NUCLEO_L053R8) || \
defined(TARGET_NUCLEO_L073RZ) || \
defined(TARGET_NUCLEO_L476RG) || \
defined(TARGET_NUCLEO_F446RE) || \
defined(TARGET_NUCLEO_L152RE)
#define P1_1 (1 << 6) // PC_6
#define P1_2 (1 << 5) // PC_5
#define PORT_1 PortC
#define P1_1 (1 << 3) // PB_3 (D3)
#define P1_2 (1 << 10) // PB_10 (D6)
#define PORT_1 PortB
#define P2_1 (1 << 8) // PB_8
#define P2_2 (1 << 9) // PB_9
#define PORT_2 PortB
#define P2_1 (1 << 10) // PA_10 (D2)
#define P2_2 (1 << 8) // PA_8 (D7)
#define PORT_2 PortA
#elif defined(TARGET_NUCLEO_F767ZI) || \
defined(TARGET_NUCLEO_F303ZE) || \
defined(TARGET_NUCLEO_F207ZG) || \
defined(TARGET_NUCLEO_F746ZG)
#define P1_1 (1 << 13) // PE_13 (D3)
#define P1_2 (1 << 11) // PE_11 (D5)
#define PORT_1 PortE
#define P2_1 (1 << 15) // PF_15 (D2)
#define P2_2 (1 << 14) // PF_14 (D4)
#define PORT_2 PortF
#elif defined(TARGET_EFM32LG_STK3600) || defined(TARGET_EFM32GG_STK3700) || defined(TARGET_EFM32WG_STK3800)
#define P1_1 (1 << 0) // PD0
@ -193,6 +211,8 @@
#define P2_2 (1 << 1) /*P5_1*/
#define PORT_2 Port5
#else
#error [NOT_SUPPORTED] This test is not defined on this target
#endif
#define MASK_1 (P1_1 | P1_2)

View File

@ -121,14 +121,28 @@
defined(TARGET_NUCLEO_F411RE) || \
defined(TARGET_NUCLEO_L053R8) || \
defined(TARGET_NUCLEO_L073RZ) || \
defined(TARGET_NUCLEO_L476RG) || \
defined(TARGET_NUCLEO_F446RE) || \
defined(TARGET_NUCLEO_L152RE)
#define P1_1 (1 << 6) // PC_6
#define P1_2 (1 << 5) // PC_5
#define PORT_1 PortC
#define P1_1 (1 << 3) // PB_3 (D3)
#define P1_2 (1 << 10) // PB_10 (D6)
#define PORT_1 PortB
#define P2_1 (1 << 8) // PB_8
#define P2_2 (1 << 9) // PB_9
#define PORT_2 PortB
#define P2_1 (1 << 10) // PA_10 (D2)
#define P2_2 (1 << 8) // PA_8 (D7)
#define PORT_2 PortA
#elif defined(TARGET_NUCLEO_F767ZI) || \
defined(TARGET_NUCLEO_F303ZE) || \
defined(TARGET_NUCLEO_F207ZG) || \
defined(TARGET_NUCLEO_F746ZG)
#define P1_1 (1 << 13) // PE_13 (D3)
#define P1_2 (1 << 11) // PE_11 (D5)
#define PORT_1 PortE
#define P2_1 (1 << 15) // PF_15 (D2)
#define P2_2 (1 << 14) // PF_14 (D4)
#define PORT_2 PortF
#elif defined(TARGET_EFM32LG_STK3600) || defined(TARGET_EFM32GG_STK3700) || defined(TARGET_EFM32WG_STK3800)
#define P1_1 (1 << 0) // PD0
@ -212,7 +226,7 @@
#define PORT_2 Port5
#else
#error [NOT_SUPPORTED] This test is not supported on this target
#error [NOT_SUPPORTED] This test is not defined on this target
#endif
#define MASK_1 (P1_1 | P1_2)