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: tests/loopback.h
- Revision:
- 118:da77017d6c09
- Parent:
- 117:e59a616ffe16
- Parent:
- 116:8b58efef3528
- Child:
- 119:544578fd290c
--- a/tests/loopback.h Tue Dec 31 22:00:53 2013 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -#include "MTSSerial.h" - -using namespace mts; - -void loopback() { - char buf[16]; - int size = 16; - int tmp = 0; - //MTSSerial* serial = new MTSSerial(PTD3, PTD2); - MTSSerial* serial = new MTSSerial(PTC4, PTC3); - serial->baud(9600); - - wait(3); - printf("starting loopback\n\r"); - - while (true) { - if ((tmp = serial->read(buf, size)) < 0) { - printf("read failed\n\r"); - } - if ((tmp = serial->write(buf, tmp)) < 0) { - printf("write failed\n\r"); - } - } -} \ No newline at end of file