cc3000 driver with expanded buffers.
Fork of cc3000_hostdriver_mbedsocket by
Diff: cc3000_spi.cpp
- Revision:
- 56:9ab991c1d2db
- Parent:
- 53:66e86aa98dbe
- Child:
- 57:8caf996d7b6a
--- a/cc3000_spi.cpp Tue May 06 21:22:41 2014 +0000 +++ b/cc3000_spi.cpp Tue May 06 22:38:34 2014 +0000 @@ -122,9 +122,7 @@ // If the magic number is overwitten - buffer overrun occurred - we will be stuck here forever! uint8_t *transmit_buffer = _simple_link.get_transmit_buffer(); if (transmit_buffer[CC3000_TX_BUFFER_SIZE - 1] != CC3000_BUFFER_MAGIC_NUMBER) { - // we're probably going to die anyway, if a real buffer overrun has happened. - // try to fix it up and go anyway. - jls - transmit_buffer[CC3000_TX_BUFFER_SIZE - 1] = CC3000_BUFFER_MAGIC_NUMBER; + NVIC_SystemReset(); } if (_spi_info.spi_state == eSPI_STATE_POWERUP) { @@ -242,7 +240,7 @@ if (received_buffer[CC3000_RX_BUFFER_SIZE - 1] != CC3000_BUFFER_MAGIC_NUMBER) { // we're probably going to die anyway, if a real buffer overrun has happened. // try to fix it up and go anyway. - jls - received_buffer[CC3000_RX_BUFFER_SIZE - 1] = CC3000_BUFFER_MAGIC_NUMBER; + NVIC_SystemReset(); } _spi_info.spi_state = eSPI_STATE_IDLE;