Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 15:278f7f125495, committed 2018-07-24
- Comitter:
- babylonica
- Date:
- Tue Jul 24 02:38:17 2018 +0000
- Parent:
- 14:54cbbb00bd19
- Child:
- 16:96935ea8f8b0
- Commit message:
- Minor fixes;
Changed in this revision
| AsyncSerial.cpp | Show annotated file Show diff for this revision Revisions of this file |
| AsyncSerial.hpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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;
}
--- a/AsyncSerial.hpp Mon Aug 28 12:25:37 2017 +0000
+++ b/AsyncSerial.hpp Tue Jul 24 02:38:17 2018 +0000
@@ -34,11 +34,8 @@
*/
class AsyncSerial{
private:
-
- DigitalOut *led;
-
-
-
+ //DigitalOut *led;
+
// Serial port
RawSerial *serial;