Solution for Bluetooth SIG hands-on training course
Dependencies: BLE_API mbed-dev-bin nRF51822-bluetooth-mdw
Fork of microbit-dal-bluetooth-mdw_starter by
Diff: source/bluetooth/MicroBitUARTService.cpp
- Revision:
- 29:62f8b007debf
- Parent:
- 8:ec4465853952
- Child:
- 58:2ac8d45f1b08
diff -r 379e18ebd43b -r 62f8b007debf source/bluetooth/MicroBitUARTService.cpp --- a/source/bluetooth/MicroBitUARTService.cpp Wed Jul 13 12:18:06 2016 +0100 +++ b/source/bluetooth/MicroBitUARTService.cpp Wed Jul 13 12:18:07 2016 +0100 @@ -67,6 +67,8 @@ */ MicroBitUARTService::MicroBitUARTService(BLEDevice &_ble, uint8_t rxBufferSize, uint8_t txBufferSize) : ble(_ble) { + rxBufferSize += 1; + txBufferSize += 1; txBuffer = (uint8_t *)malloc(txBufferSize); rxBuffer = (uint8_t *)malloc(rxBufferSize);