mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #11839 from JanneKiiskila/SerialBase-compwarning
SerialBase.h|cpp [-Wreorder] compiler warning fixpull/11842/head
commit
dd70938d25
|
@ -329,26 +329,26 @@ protected:
|
||||||
|
|
||||||
#if DEVICE_SERIAL_ASYNCH
|
#if DEVICE_SERIAL_ASYNCH
|
||||||
CThunk<SerialBase> _thunk_irq;
|
CThunk<SerialBase> _thunk_irq;
|
||||||
DMAUsage _tx_usage;
|
DMAUsage _tx_usage = DMA_USAGE_NEVER;
|
||||||
DMAUsage _rx_usage;
|
DMAUsage _rx_usage = DMA_USAGE_NEVER;
|
||||||
event_callback_t _tx_callback;
|
event_callback_t _tx_callback;
|
||||||
event_callback_t _rx_callback;
|
event_callback_t _rx_callback;
|
||||||
bool _tx_asynch_set;
|
bool _tx_asynch_set = false;
|
||||||
bool _rx_asynch_set;
|
bool _rx_asynch_set = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
serial_t _serial;
|
serial_t _serial {};
|
||||||
Callback<void()> _irq[IrqCnt];
|
Callback<void()> _irq[IrqCnt];
|
||||||
int _baud;
|
int _baud;
|
||||||
bool _rx_enabled;
|
bool _rx_enabled = true;
|
||||||
bool _tx_enabled;
|
bool _tx_enabled = true;
|
||||||
const PinName _tx_pin;
|
const PinName _tx_pin;
|
||||||
const PinName _rx_pin;
|
const PinName _rx_pin;
|
||||||
|
|
||||||
#if DEVICE_SERIAL_FC
|
#if DEVICE_SERIAL_FC
|
||||||
Flow _flow_type;
|
Flow _flow_type = Disabled;
|
||||||
PinName _flow1;
|
PinName _flow1 = NC;
|
||||||
PinName _flow2;
|
PinName _flow2 = NC;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -25,20 +25,9 @@ namespace mbed {
|
||||||
|
|
||||||
SerialBase::SerialBase(PinName tx, PinName rx, int baud) :
|
SerialBase::SerialBase(PinName tx, PinName rx, int baud) :
|
||||||
#if DEVICE_SERIAL_ASYNCH
|
#if DEVICE_SERIAL_ASYNCH
|
||||||
_thunk_irq(this), _tx_usage(DMA_USAGE_NEVER),
|
_thunk_irq(this),
|
||||||
_rx_usage(DMA_USAGE_NEVER), _tx_callback(NULL),
|
|
||||||
_rx_callback(NULL), _tx_asynch_set(false),
|
|
||||||
_rx_asynch_set(false),
|
|
||||||
#endif
|
#endif
|
||||||
_serial(),
|
|
||||||
_baud(baud),
|
_baud(baud),
|
||||||
#if DEVICE_SERIAL_FC
|
|
||||||
_flow_type(Disabled),
|
|
||||||
_flow1(NC),
|
|
||||||
_flow2(NC),
|
|
||||||
#endif
|
|
||||||
_rx_enabled(true),
|
|
||||||
_tx_enabled(true),
|
|
||||||
_tx_pin(tx),
|
_tx_pin(tx),
|
||||||
_rx_pin(rx)
|
_rx_pin(rx)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue