Skip to content

Commit bddf766

Browse files
committed
Update SerialLoop after the Serial options change
Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
1 parent 7a29181 commit bddf766

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

examples/NonReg/SerialLoop/SerialLoop.ino

+12-3
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,21 @@
1212

1313
/*
1414
* 1 - Connect Rx/Tx of the desired Serial
15-
* 2 - Define SERIAL_PORT_TESTED by settinh Serial number to use 1,2,...
16-
* ! Ensure this Serialx is enabled thanks 'Serial interface menu'!
15+
* 2 - Define SERIAL_PORT_TESTED by setting Serial number to use 1,2,...
16+
* ! Ensure Serial feature is enabled thanks 'Serial interface menu'!
1717
* 3 - Optionnal: comment unwanted speed in serialSpeed array.
1818
*/
19+
#if defined(SERIAL_UART_INSTANCE) && (SERIAL_UART_INSTANCE == 2)
20+
#define SERIAL_PORT_TESTED Serial1
21+
HardwareSerial Serial1(USART1);
22+
#else
23+
#define SERIAL_PORT_TESTED Serial2
24+
HardwareSerial Serial2(USART2);
25+
#endif
26+
// or
27+
//HardwareSerial Serialx(rxpin, txpin)
28+
1929
#define DECL_CONFIG(x) {#x, x}
20-
#define SERIAL_PORT_TESTED Serial3
2130

2231
typedef struct serialTest_s serialTest;
2332
struct serialTest_s {

0 commit comments

Comments
 (0)