fork microbit-dal
Dependencies: BLE_API mbed-dev-bin nRF51822
Fork of microbit-dal by
Diff: source/bluetooth/MicroBitUARTService.cpp
- Revision:
- 3:d86a4ddc1867
- Parent:
- 1:8aa5cdb4ab67
- Child:
- 8:ec4465853952
--- a/source/bluetooth/MicroBitUARTService.cpp Thu Apr 07 00:55:10 2016 +0000 +++ b/source/bluetooth/MicroBitUARTService.cpp Thu Apr 07 11:59:16 2016 +0100 @@ -254,7 +254,7 @@ SERIAL_DEBUG->printf("tx size: %d", size); #endif - uint8_t temp[size] = { 0 }; + uint8_t temp[size]; circularCopy(txBuffer, txBufferSize, temp, txBufferTail, txBufferHead); @@ -359,7 +359,7 @@ */ ManagedString MicroBitUARTService::read(int len, MicroBitSerialMode mode) { - uint8_t buf[len + 1] = { 0 }; + uint8_t buf[len + 1]; int ret = read(buf, len, mode); @@ -426,7 +426,7 @@ //calculate our local buffer size int localBuffSize = (preservedTail > foundIndex) ? (rxBufferSize - preservedTail) + foundIndex : foundIndex - preservedTail; - uint8_t localBuff[localBuffSize + 1] = { 0 }; + uint8_t localBuff[localBuffSize + 1]; circularCopy(rxBuffer, rxBufferSize, localBuff, preservedTail, foundIndex); @@ -536,4 +536,4 @@ return (txBufferSize - txBufferTail) + txBufferHead; return txBufferHead - txBufferTail; -} +} \ No newline at end of file