|
1 | 1 | #include "test_env.h"
|
2 | 2 |
|
| 3 | +#if !DEVICE_PORTINOUT |
| 4 | + #error [NOT_SUPPORTED] PortInOut is not supported |
| 5 | +#endif |
| 6 | + |
3 | 7 | #if defined(TARGET_K64F)
|
4 | 8 | #define P1_1 (1 << 16)
|
5 | 9 | #define P1_2 (1 << 17)
|
|
103 | 107 | defined(TARGET_NUCLEO_F411RE) || \
|
104 | 108 | defined(TARGET_NUCLEO_L053R8) || \
|
105 | 109 | defined(TARGET_NUCLEO_L073RZ) || \
|
| 110 | + defined(TARGET_NUCLEO_L476RG) || \ |
| 111 | + defined(TARGET_NUCLEO_F446RE) || \ |
106 | 112 | defined(TARGET_NUCLEO_L152RE)
|
107 |
| -#define P1_1 (1 << 6) // PC_6 |
108 |
| -#define P1_2 (1 << 5) // PC_5 |
109 |
| -#define PORT_1 PortC |
| 113 | +#define P1_1 (1 << 3) // PB_3 (D3) |
| 114 | +#define P1_2 (1 << 10) // PB_10 (D6) |
| 115 | +#define PORT_1 PortB |
110 | 116 |
|
111 |
| -#define P2_1 (1 << 8) // PB_8 |
112 |
| -#define P2_2 (1 << 9) // PB_9 |
113 |
| -#define PORT_2 PortB |
| 117 | +#define P2_1 (1 << 10) // PA_10 (D2) |
| 118 | +#define P2_2 (1 << 8) // PA_8 (D7) |
| 119 | +#define PORT_2 PortA |
| 120 | + |
| 121 | +#elif defined(TARGET_NUCLEO_F767ZI) || \ |
| 122 | + defined(TARGET_NUCLEO_F303ZE) || \ |
| 123 | + defined(TARGET_NUCLEO_F207ZG) || \ |
| 124 | + defined(TARGET_NUCLEO_F746ZG) |
| 125 | +#define P1_1 (1 << 13) // PE_13 (D3) |
| 126 | +#define P1_2 (1 << 11) // PE_11 (D5) |
| 127 | +#define PORT_1 PortE |
| 128 | + |
| 129 | +#define P2_1 (1 << 15) // PF_15 (D2) |
| 130 | +#define P2_2 (1 << 14) // PF_14 (D4) |
| 131 | +#define PORT_2 PortF |
114 | 132 |
|
115 | 133 | #elif defined(TARGET_EFM32LG_STK3600) || defined(TARGET_EFM32GG_STK3700) || defined(TARGET_EFM32WG_STK3800)
|
116 | 134 | #define P1_1 (1 << 0) // PD0
|
|
193 | 211 | #define P2_2 (1 << 1) /*P5_1*/
|
194 | 212 | #define PORT_2 Port5
|
195 | 213 |
|
| 214 | +#else |
| 215 | +#error [NOT_SUPPORTED] This test is not defined on this target |
196 | 216 | #endif
|
197 | 217 |
|
198 | 218 | #define MASK_1 (P1_1 | P1_2)
|
|
0 commit comments