fdsg

Dependencies:   BLE_API MicroBitEffectsPedal nRF51822

Fork of microbit-dal by Lancaster University

Revision:
23:6055f6c19fa6
Parent:
22:23d7b9a4b082
Child:
25:27299423d813
--- a/source/drivers/MicroBitSerial.cpp	Wed Jul 13 12:17:54 2016 +0100
+++ b/source/drivers/MicroBitSerial.cpp	Wed Jul 13 12:17:56 2016 +0100
@@ -164,13 +164,9 @@
   * @param len the length of the string, and ultimately the maximum number of bytes
   *        that will be copied dependent on the state of txBuff
   *
-  * @param mode determines whether to configure the current fiber context or not. If
-  *             The mode is SYNC_SPINWAIT, the context will not be configured, otherwise
-  *             no context will be configured.
-  *
   * @return the number of bytes copied into the buffer.
   */
-int MicroBitSerial::setTxInterrupt(uint8_t *string, int len, MicroBitSerialMode mode)
+int MicroBitSerial::setTxInterrupt(uint8_t *string, int len)
 {
     int copiedBytes = 0;
 
@@ -186,8 +182,7 @@
             break;
     }
 
-    if(mode != SYNC_SPINWAIT)
-        fiber_wake_on_event(MICROBIT_ID_NOTIFY, MICROBIT_SERIAL_EVT_TX_EMPTY);
+    fiber_wake_on_event(MICROBIT_ID_NOTIFY, MICROBIT_SERIAL_EVT_TX_EMPTY);
 
     //set the TX interrupt
     attach(this, &MicroBitSerial::dataWritten, Serial::TxIrq);
@@ -411,7 +406,7 @@
 
     uint8_t toTransmit[2] =  { c, '\0'};
 
-    int bytesWritten = setTxInterrupt(toTransmit, 1, mode);
+    int bytesWritten = setTxInterrupt(toTransmit, 1);
 
     send(mode);
 
@@ -489,7 +484,7 @@
             return result;
     }
 
-    int bytesWritten = setTxInterrupt(buffer, bufferLen, mode);
+    int bytesWritten = setTxInterrupt(buffer, bufferLen);
 
     send(mode);