Skip to content
Closed
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
3 changes: 1 addition & 2 deletions libraries/mbed/api/SerialBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,7 @@ class SerialBase {

protected:
SerialBase(PinName tx, PinName rx);
virtual ~SerialBase() {
}
virtual ~SerialBase();

int _base_getc();
int _base_putc(int c);
Expand Down
4 changes: 4 additions & 0 deletions libraries/mbed/common/SerialBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ SerialBase::SerialBase(PinName tx, PinName rx) :
serial_irq_handler(&_serial, SerialBase::_irq_handler, (uint32_t)this);
}

SerialBase::~SerialBase() {
serial_free(&_serial);
}

void SerialBase::baud(int baudrate) {
serial_baud(&_serial, baudrate);
_baud = baudrate;
Expand Down