A library for talking to Multi-Tech's Cellular SocketModem Devices.
Dependents: M2X_dev axeda_wrapper_dev MTS_M2x_Example1 MTS_Cellular_Connect_Example ... more
Diff: io/MTSSerial.cpp
- Revision:
- 142:3b40320f3f73
- Parent:
- 141:571e0ef6c8dc
- Child:
- 144:52cb5b6667cc
--- a/io/MTSSerial.cpp Sat Jan 04 05:28:45 2014 +0000 +++ b/io/MTSSerial.cpp Sat Jan 04 21:09:13 2014 +0000 @@ -48,9 +48,10 @@ if(rxBuffer.write(byte) != 1) { printf("[ERROR] Serial Rx Byte Dropped [%c][0x%02X]\r\n", byte, byte); if(byte == 0xFF) { - serial.attach(NULL, Serial::RxIrq); - serial.attach(this, &MTSSerial::handleRead, Serial::RxIrq); - printf("[INFO] Reset the RxIrq.\n\r"); + // hack so we dont hang - fix later + puts("[ERR] Comm errors, must reboot"); + fflush(stdout); + NVIC_SystemReset(); } return; }