Host library for controlling a WiConnect enabled Wi-Fi module.
Dependents: wiconnect-ota_example wiconnect-web_setup_example wiconnect-test-console wiconnect-tcp_server_example ... more
Diff: sdk/mbed/WiconnectSerial.cpp
- Revision:
- 6:8a87a59d0d21
- Parent:
- 1:6ec9998427ad
- Child:
- 16:7f1d6d359787
diff -r 8d91a87ebba2 -r 8a87a59d0d21 sdk/mbed/WiconnectSerial.cpp --- a/sdk/mbed/WiconnectSerial.cpp Mon Aug 11 04:00:39 2014 -0700 +++ b/sdk/mbed/WiconnectSerial.cpp Mon Aug 11 13:55:07 2014 -0700 @@ -8,7 +8,6 @@ * written permission of ACKme Networks. */ -#include <assert.h> #include "Wiconnect.h" #include "internal/common.h" @@ -23,10 +22,10 @@ typedef struct { uint16_t size; + volatile uint16_t count; uint8_t *start, *end; volatile uint8_t *head; volatile uint8_t *tail; - volatile uint16_t count; } SerialRxBuffer; @@ -44,13 +43,14 @@ { if(config.serialRxBuffer != NULL) { - rxBuffer->head = (uint8_t*)config.serialRxBuffer; + rxBuffer->start = (uint8_t*)config.serialRxBuffer; } #ifdef WICONNECT_ENABLE_MALLOC else { - assert(wiconnect->_malloc != NULL); + wiconnect_assert(wiconnect, "WiconnectSerial(), malloc not defined", wiconnect->_malloc != NULL); rxBuffer->start = (uint8_t*)wiconnect->_malloc(config.serialRxBufferSize); + wiconnect_assert(wiconnect, "WiconnectSerial(), malloc failed", rxBuffer->start != NULL); bufferAlloc = true; } #endif