File tree Expand file tree Collapse file tree 2 files changed +11
-22
lines changed Expand file tree Collapse file tree 2 files changed +11
-22
lines changed Original file line number Diff line number Diff line change @@ -329,26 +329,26 @@ class SerialBase : private NonCopyable<SerialBase> {
329
329
330
330
#if DEVICE_SERIAL_ASYNCH
331
331
CThunk<SerialBase> _thunk_irq;
332
- DMAUsage _tx_usage;
333
- DMAUsage _rx_usage;
332
+ DMAUsage _tx_usage = DMA_USAGE_NEVER ;
333
+ DMAUsage _rx_usage = DMA_USAGE_NEVER ;
334
334
event_callback_t _tx_callback;
335
335
event_callback_t _rx_callback;
336
- bool _tx_asynch_set;
337
- bool _rx_asynch_set;
336
+ bool _tx_asynch_set = false ;
337
+ bool _rx_asynch_set = false ;
338
338
#endif
339
339
340
- serial_t _serial;
340
+ serial_t _serial {} ;
341
341
Callback<void ()> _irq[IrqCnt];
342
342
int _baud;
343
- bool _rx_enabled;
344
- bool _tx_enabled;
343
+ bool _rx_enabled = true ;
344
+ bool _tx_enabled = true ;
345
345
const PinName _tx_pin;
346
346
const PinName _rx_pin;
347
347
348
348
#if DEVICE_SERIAL_FC
349
- Flow _flow_type;
350
- PinName _flow1;
351
- PinName _flow2;
349
+ Flow _flow_type = Disabled ;
350
+ PinName _flow1 = NC ;
351
+ PinName _flow2 = NC ;
352
352
#endif
353
353
354
354
#endif
Original file line number Diff line number Diff line change @@ -25,20 +25,9 @@ namespace mbed {
25
25
26
26
SerialBase::SerialBase (PinName tx, PinName rx, int baud) :
27
27
#if DEVICE_SERIAL_ASYNCH
28
- _thunk_irq (this ), _tx_usage(DMA_USAGE_NEVER),
29
- _rx_usage(DMA_USAGE_NEVER), _tx_callback(NULL ),
30
- _rx_callback(NULL ), _tx_asynch_set(false ),
31
- _rx_asynch_set(false ),
28
+ _thunk_irq (this ),
32
29
#endif
33
- _serial (),
34
30
_baud (baud),
35
- #if DEVICE_SERIAL_FC
36
- _flow_type (Disabled),
37
- _flow1(NC),
38
- _flow2(NC),
39
- #endif
40
- _rx_enabled (true ),
41
- _tx_enabled (true ),
42
31
_tx_pin (tx),
43
32
_rx_pin (rx)
44
33
{
You can’t perform that action at this time.
0 commit comments