Skip to content

Commit befed73

Browse files
ABOSTMfpistm
authored andcommitted
CheckVariant: Fix UARTx replacing USARTx
Signed-off-by: Alexandre Bourdiol <[email protected]>
1 parent f8bc545 commit befed73

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

examples/NonReg/CheckVariant/checkIPInstanceTest.ino

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,39 @@ USART_TypeDef* getSerialInstance(void) {
3939
#elif SERIAL_UART_INSTANCE == 3
4040
return USART3;
4141
#elif SERIAL_UART_INSTANCE == 4
42+
#if defined(UART4_BASE)
43+
return UART4;
44+
#else
4245
return USART4;
46+
#endif
4347
#elif SERIAL_UART_INSTANCE == 5
48+
#if defined(UART5_BASE)
49+
return UART5;
50+
#else
4451
return USART5;
52+
#endif
4553
#elif SERIAL_UART_INSTANCE == 6
4654
return USART6;
4755
#elif SERIAL_UART_INSTANCE == 7
56+
#if defined(UART7_BASE)
57+
return UART7;
58+
#else
4859
return USART7;
60+
#endif
4961
#elif SERIAL_UART_INSTANCE == 8
62+
#if defined(UART8_BASE)
63+
return UART8;
64+
#else
5065
return USART8;
66+
#endif
5167
#elif SERIAL_UART_INSTANCE == 9
5268
return USART9;
5369
#elif SERIAL_UART_INSTANCE == 10
70+
#if defined(UART10_BASE)
71+
return UART10;
72+
#else
5473
return USART10;
74+
#endif
5575
#else
5676
return NULL;
5777
#endif

0 commit comments

Comments
 (0)