Skip to content

OS2 tests minor updates for STM32 #3953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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) || \
Expand Down
2 changes: 1 addition & 1 deletion features/unsupported/tests/mbed/digitalinout/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) || \
Expand Down
2 changes: 1 addition & 1 deletion features/unsupported/tests/mbed/interruptin/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
32 changes: 26 additions & 6 deletions features/unsupported/tests/mbed/portinout/main.cpp
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
28 changes: 21 additions & 7 deletions features/unsupported/tests/mbed/portout_portin/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down