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 {
151
151
152
152
virtual ~AnalogIn ()
153
153
{
154
- // Do nothing
154
+ lock ();
155
+ analogin_free (&_adc);
156
+ unlock ();
155
157
}
156
158
157
159
protected:
Original file line number Diff line number Diff line change @@ -117,6 +117,9 @@ class QSPI : private NonCopyable<QSPI> {
117
117
118
118
virtual ~QSPI ()
119
119
{
120
+ lock ();
121
+ qspi_free (&_qspi);
122
+ unlock ();
120
123
}
121
124
122
125
/* * Configure the data transmission format
Original file line number Diff line number Diff line change @@ -287,6 +287,10 @@ SerialBase::~SerialBase()
287
287
for (int irq = 0 ; irq < IrqCnt; irq++) {
288
288
attach (nullptr , (IrqType)irq);
289
289
}
290
+
291
+ if (_rx_enabled || _tx_enabled) {
292
+ serial_free (&_serial);
293
+ }
290
294
}
291
295
292
296
#if DEVICE_SERIAL_FC
You can’t perform that action at this time.
0 commit comments