File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
features/frameworks/greentea-client/source Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 1
1
#include " greentea-client/greentea_serial.h"
2
2
3
+ /* *
4
+ * Macros for setting console flow control.
5
+ */
6
+ #define CONSOLE_FLOWCONTROL_RTS 1
7
+ #define CONSOLE_FLOWCONTROL_CTS 2
8
+ #define CONSOLE_FLOWCONTROL_RTSCTS 3
9
+ #define mbed_console_concat_ (x ) CONSOLE_FLOWCONTROL_##x
10
+ #define mbed_console_concat (x ) mbed_console_concat_(x)
11
+ #define CONSOLE_FLOWCONTROL mbed_console_concat (MBED_CONF_TARGET_CONSOLE_UART_FLOW_CONTROL)
12
+
3
13
SingletonPtr<GreenteaSerial> greentea_serial;
4
14
5
- GreenteaSerial::GreenteaSerial () : mbed::RawSerial(USBTX, USBRX, MBED_CONF_PLATFORM_STDIO_BAUD_RATE) {};
15
+ GreenteaSerial::GreenteaSerial () : mbed::RawSerial(USBTX, USBRX, MBED_CONF_PLATFORM_STDIO_BAUD_RATE) {
16
+ #if CONSOLE_FLOWCONTROL == CONSOLE_FLOWCONTROL_RTS
17
+ set_flow_control (SerialBase::RTS, STDIO_UART_RTS, NC);
18
+ #elif CONSOLE_FLOWCONTROL == CONSOLE_FLOWCONTROL_CTS
19
+ set_flow_control (SerialBase::CTS, NC, STDIO_UART_CTS);
20
+ #elif CONSOLE_FLOWCONTROL == CONSOLE_FLOWCONTROL_RTSCTS
21
+ set_flow_control (SerialBase::RTSCTS, STDIO_UART_RTS, STDIO_UART_CTS);
22
+ #endif
23
+ }
You can’t perform that action at this time.
0 commit comments