An example Program for the SimpleSerialProtocol Library, This program will receive a packet, then echo it back to the client

Dependencies:   mbed SimpleSerialProtocol MODSERIAL

A simple example program that receives a packet over serial and echos it back.

I include this java program to show an example client application, all this program does is send packets as fast as it can without filling up its output buffer, the mbed will echo these packets back.

This is a good benchmark of the serial connection, and should show about 11KB/s at 115200baud

/media/uploads/p3p/serialecho.zip

example command: java -jar SerialEcho.jar com3 115200

Revision:
13:e27d84516fa8
Parent:
12:1d1d8425c79c
--- a/main.cpp	Thu Sep 18 17:38:14 2014 +0000
+++ b/main.cpp	Fri Sep 19 15:51:52 2014 +0000
@@ -21,10 +21,8 @@
 SimpleSerialProtocol::Protocol comms(USBTX, USBRX, LED1);
 
 //the main loop
-int main() {
-    SimpleSerialProtocol::Codec codec;
-   
-    comms.initialise(115200, &codec);
+int main() { 
+    comms.initialise(115200);
     comms.receiveCallback(1, &testProtocol, &TestProtocol::onEchoPacket);
         
     while (1) {