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.
pull/10994/head
Filip Jagodzinski 2019-07-09 10:53:08 +02:00
parent f0ec856020
commit 07baf079b9
1 changed files with 4 additions and 0 deletions

View File

@ -211,6 +211,7 @@ void serial_break_clear(serial_t *obj);
*/ */
void serial_pinout_tx(PinName tx); void serial_pinout_tx(PinName tx);
#if DEVICE_SERIAL_FC
/** Configure the serial for the flow control. It sets flow control in the hardware /** 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. * 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 * @param txflow The RX pin name
*/ */
void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, PinName txflow); void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, PinName txflow);
#endif
/** Get the pins that support Serial TX /** Get the pins that support Serial TX
* *
@ -239,6 +241,7 @@ const PinMap *serial_tx_pinmap(void);
*/ */
const PinMap *serial_rx_pinmap(void); const PinMap *serial_rx_pinmap(void);
#if DEVICE_SERIAL_FC
/** Get the pins that support Serial CTS /** Get the pins that support Serial CTS
* *
* Return a PinMap array of pins that support Serial CTS. The * Return a PinMap array of pins that support Serial CTS. The
@ -256,6 +259,7 @@ const PinMap *serial_cts_pinmap(void);
* @return PinMap array * @return PinMap array
*/ */
const PinMap *serial_rts_pinmap(void); const PinMap *serial_rts_pinmap(void);
#endif
#if DEVICE_SERIAL_ASYNCH #if DEVICE_SERIAL_ASYNCH