tetete
Diff: AsyncSerial.cpp
- Revision:
- 15:278f7f125495
- Parent:
- 14:54cbbb00bd19
- Child:
- 16:96935ea8f8b0
--- a/AsyncSerial.cpp Mon Aug 28 12:25:37 2017 +0000 +++ b/AsyncSerial.cpp Tue Jul 24 02:38:17 2018 +0000 @@ -20,20 +20,12 @@ #include "AsyncSerial.hpp" AsyncSerial::AsyncSerial(PinName txpin, PinName rxpin, uint32_t baudrate, uint32_t buffer_size){ - - //led = new DigitalOut(LED2); - // RawSerial port init serial = new RawSerial(txpin, rxpin, baudrate); // FIFO init fifo_tx = new FIFO<uint8_t>(buffer_size); fifo_rx = new FIFO<uint8_t>(buffer_size); - - // Debug - //led->write(1); - //led->write(0); // Went off - fifo_tx->clear(); fifo_rx->clear(); @@ -44,17 +36,13 @@ serial->attach(callback(this, &AsyncSerial::ISR_TX), SerialBase::TxIrq); serial->attach(callback(this, &AsyncSerial::ISR_RX), SerialBase::RxIrq); - // Debug - //led->write(0); // Didnt go off - return; } AsyncSerial::~AsyncSerial(){ serial->attach(NULL, serial->TxIrq); serial->attach(NULL, serial->RxIrq); - led->write(1); - + delete serial; return; }