Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion drivers/AnalogIn.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ class AnalogIn {

virtual ~AnalogIn()
{
// Do nothing
lock();
analogin_free(&_adc);
unlock();
}

protected:
Expand Down
3 changes: 3 additions & 0 deletions drivers/QSPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ class QSPI : private NonCopyable<QSPI> {

virtual ~QSPI()
{
lock();
qspi_free(&_qspi);
unlock();
}

/** Configure the data transmission format
Expand Down
4 changes: 4 additions & 0 deletions drivers/source/SerialBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,10 @@ SerialBase::~SerialBase()
for (int irq = 0; irq < IrqCnt; irq++) {
attach(nullptr, (IrqType)irq);
}

if (_rx_enabled || _tx_enabled) {
serial_free(&_serial);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder how come this was not added in #10924 where we have added enable/disable output.

}
}

#if DEVICE_SERIAL_FC
Expand Down