Skip to content

Commit 07baf07

Browse files
author
Filip Jagodzinski
committed
HAL: Serial: Add DEVICE_SERIAL_FC guards
Functions related to serial flow control should not be exposed if DEVICE_SERIAL_FC is not defined * serial_set_flow_control, * serial_cts_pinmap, * serial_rts_pinmap.
1 parent f0ec856 commit 07baf07

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hal/serial_api.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ void serial_break_clear(serial_t *obj);
211211
*/
212212
void serial_pinout_tx(PinName tx);
213213

214+
#if DEVICE_SERIAL_FC
214215
/** Configure the serial for the flow control. It sets flow control in the hardware
215216
* if a serial peripheral supports it, otherwise software emulation is used.
216217
*
@@ -220,6 +221,7 @@ void serial_pinout_tx(PinName tx);
220221
* @param txflow The RX pin name
221222
*/
222223
void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, PinName txflow);
224+
#endif
223225

224226
/** Get the pins that support Serial TX
225227
*
@@ -239,6 +241,7 @@ const PinMap *serial_tx_pinmap(void);
239241
*/
240242
const PinMap *serial_rx_pinmap(void);
241243

244+
#if DEVICE_SERIAL_FC
242245
/** Get the pins that support Serial CTS
243246
*
244247
* Return a PinMap array of pins that support Serial CTS. The
@@ -256,6 +259,7 @@ const PinMap *serial_cts_pinmap(void);
256259
* @return PinMap array
257260
*/
258261
const PinMap *serial_rts_pinmap(void);
262+
#endif
259263

260264
#if DEVICE_SERIAL_ASYNCH
261265

0 commit comments

Comments
 (0)