Skip to content

Commit c3d4d30

Browse files
author
Bogdan Marinescu
committed
Added DEVICE_SERIAL_FC as an indicator for the flow control implementation
1 parent 53cd647 commit c3d4d30

File tree

5 files changed

+6
-28
lines changed

5 files changed

+6
-28
lines changed

libraries/mbed/api/SerialBase.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,15 @@ class SerialBase {
107107
*/
108108
void send_break();
109109

110+
#if DEVICE_SERIAL_FC
110111
/** Set the flow control type on the serial port
111112
*
112113
* @param type the flow control type (Disabled, RTS, CTS, RTSCTS)
113114
* @param flow1 the first flow control pin (RTS for RTS or RTSCTS, CTS for CTS)
114115
* @param flow2 the second flow control pin (CTS for RTSCTS)
115116
*/
116117
void set_flow_control(Flow type, PinName flow1=NC, PinName flow2=NC);
118+
#endif
117119

118120
static void _irq_handler(uint32_t id, SerialIrq irq_type);
119121

libraries/mbed/common/SerialBase.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ void SerialBase::send_break() {
8181
serial_break_clear(&_serial);
8282
}
8383

84+
#ifdef DEVICE_SERIAL_FC
8485
void SerialBase::set_flow_control(Flow type, PinName flow1, PinName flow2) {
8586
FlowControl flow_type = (FlowControl)type;
8687
switch(type) {
@@ -100,6 +101,7 @@ void SerialBase::set_flow_control(Flow type, PinName flow1, PinName flow2) {
100101
break;
101102
}
102103
}
104+
#endif
103105

104106
} // namespace mbed
105107

libraries/mbed/common/not_implemented.c

Lines changed: 0 additions & 28 deletions
This file was deleted.

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/device.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#define DEVICE_ANALOGOUT 1
2727

2828
#define DEVICE_SERIAL 1
29+
#define DEVICE_SERIAL_FC 1
2930

3031
#define DEVICE_I2C 1
3132
#define DEVICE_I2CSLAVE 1

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X/device.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#define DEVICE_ANALOGOUT 0
2727

2828
#define DEVICE_SERIAL 1
29+
#define DEVICE_SERIAL_FC 1
2930

3031
#define DEVICE_I2C 1
3132
#define DEVICE_I2CSLAVE 0

0 commit comments

Comments
 (0)