File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,9 @@ class AnalogIn {
151151
152152 virtual ~AnalogIn ()
153153 {
154- // Do nothing
154+ lock ();
155+ analogin_free (&_adc);
156+ unlock ();
155157 }
156158
157159protected:
Original file line number Diff line number Diff line change @@ -117,6 +117,9 @@ class QSPI : private NonCopyable<QSPI> {
117117
118118 virtual ~QSPI ()
119119 {
120+ lock ();
121+ qspi_free (&_qspi);
122+ unlock ();
120123 }
121124
122125 /* * Configure the data transmission format
Original file line number Diff line number Diff line change @@ -287,6 +287,10 @@ SerialBase::~SerialBase()
287287 for (int irq = 0 ; irq < IrqCnt; irq++) {
288288 attach (nullptr , (IrqType)irq);
289289 }
290+
291+ if (_rx_enabled || _tx_enabled) {
292+ serial_free (&_serial);
293+ }
290294}
291295
292296#if DEVICE_SERIAL_FC
You can’t perform that action at this time.
0 commit comments