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.
Dependencies: BLE_API mbed-dev-bin nRF51822
Fork of microbit-dal by
Diff: source/drivers/MicroBitSerial.cpp
- Revision:
- 6:2e1c2e0d8c7a
- Parent:
- 3:d86a4ddc1867
- Child:
- 8:ec4465853952
--- a/source/drivers/MicroBitSerial.cpp Thu Apr 07 11:59:19 2016 +0100
+++ b/source/drivers/MicroBitSerial.cpp Thu Apr 07 23:39:31 2016 +0100
@@ -148,7 +148,7 @@
if(nextTail == txBuffHead)
{
MicroBitEvent(MICROBIT_ID_NOTIFY, MICROBIT_SERIAL_EVT_TX_EMPTY);
- detach(IrqType::TxIrq);
+ detach(Serial::TxIrq);
}
//update our tail!
@@ -185,7 +185,7 @@
fiber_wake_on_event(MICROBIT_ID_NOTIFY, MICROBIT_SERIAL_EVT_TX_EMPTY);
//set the TX interrupt
- attach(this, &MicroBitSerial::dataWritten, IrqType::TxIrq);
+ attach(this, &MicroBitSerial::dataWritten, Serial::TxIrq);
return copiedBytes;
}
@@ -231,7 +231,7 @@
if((status & MICROBIT_SERIAL_RX_BUFF_INIT))
{
//ensure that we receive no interrupts after freeing our buffer
- detach(IrqType::RxIrq);
+ detach(Serial::RxIrq);
free(this->rxBuff);
}
@@ -245,7 +245,7 @@
//set the receive interrupt
status |= MICROBIT_SERIAL_RX_BUFF_INIT;
- attach(this, &MicroBitSerial::dataReceived, IrqType::RxIrq);
+ attach(this, &MicroBitSerial::dataReceived, Serial::RxIrq);
return MICROBIT_OK;
}
@@ -259,7 +259,7 @@
if((status & MICROBIT_SERIAL_TX_BUFF_INIT))
{
//ensure that we receive no interrupts after freeing our buffer
- detach(IrqType::TxIrq);
+ detach(Serial::TxIrq);
free(this->txBuff);
}
@@ -813,17 +813,17 @@
lockRx();
if(txBufferedSize() > 0)
- detach(IrqType::TxIrq);
+ detach(Serial::TxIrq);
- detach(IrqType::RxIrq);
+ detach(Serial::RxIrq);
serial_free(&_serial);
serial_init(&_serial, tx, rx);
- attach(this, &MicroBitSerial::dataReceived, IrqType::RxIrq);
+ attach(this, &MicroBitSerial::dataReceived, Serial::RxIrq);
if(txBufferedSize() > 0)
- attach(this, &MicroBitSerial::dataWritten, IrqType::TxIrq);
+ attach(this, &MicroBitSerial::dataWritten, Serial::TxIrq);
this->baud(this->baudrate);
