From 07baf079b905ffc9372f5afa37d4138d67016be0 Mon Sep 17 00:00:00 2001 From: Filip Jagodzinski Date: Tue, 9 Jul 2019 10:53:08 +0200 Subject: [PATCH] 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. --- hal/serial_api.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hal/serial_api.h b/hal/serial_api.h index 68ed74a139..32eb362fb3 100644 --- a/hal/serial_api.h +++ b/hal/serial_api.h @@ -211,6 +211,7 @@ void serial_break_clear(serial_t *obj); */ void serial_pinout_tx(PinName tx); +#if DEVICE_SERIAL_FC /** Configure the serial for the flow control. It sets flow control in the hardware * if a serial peripheral supports it, otherwise software emulation is used. * @@ -220,6 +221,7 @@ void serial_pinout_tx(PinName tx); * @param txflow The RX pin name */ void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, PinName txflow); +#endif /** Get the pins that support Serial TX * @@ -239,6 +241,7 @@ const PinMap *serial_tx_pinmap(void); */ const PinMap *serial_rx_pinmap(void); +#if DEVICE_SERIAL_FC /** Get the pins that support Serial CTS * * Return a PinMap array of pins that support Serial CTS. The @@ -256,6 +259,7 @@ const PinMap *serial_cts_pinmap(void); * @return PinMap array */ const PinMap *serial_rts_pinmap(void); +#endif #if DEVICE_SERIAL_ASYNCH