Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit befed73

Browse filesBrowse files
ABOSTMfpistm
authored andcommitted
CheckVariant: Fix UARTx replacing USARTx
Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
1 parent f8bc545 commit befed73
Copy full SHA for befed73

File tree

1 file changed

+20
-0
lines changed
Filter options

1 file changed

+20
-0
lines changed

‎examples/NonReg/CheckVariant/checkIPInstanceTest.ino

Copy file name to clipboardExpand all lines: examples/NonReg/CheckVariant/checkIPInstanceTest.ino
+20Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.