Serial communication protocol generic implementation
Dependents: ClassFRDM ClassLPC
Revision 2:ba93026839a9, committed 2015-03-19
- Comitter:
- askksa12543
- Date:
- Thu Mar 19 12:02:52 2015 +0000
- Parent:
- 1:9cfb17f74dcd
- Commit message:
- initial receive test
Changed in this revision
| main.cpp | Show diff for this revision Revisions of this file |
| mbed.bld | Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Mar 19 11:54:05 2015 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-#include "mbed.h"
-#include "DataComm.h"
-
-DataComm test; //create data communication protocol variable
-char data[4] = "Hi!"; //test data
-int size = 3;
-DigitalOut myled(LED1); // red led on board
-
-int main()
-{
- myled = 1; //turn off led
- test.setClockOut(D8); //clock out pin
- test.setSerialOut(D7); //data out pin
- test.setClock(2000); //set 2 second clock
- test.initiate_connection(); //send preamble
- test.send_data(data, size); //send data
- test.close_connection(); //send postamble
- myled = 0; //turn on led to indicate completion of code
-}
--- a/mbed.bld Thu Mar 19 11:54:05 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/7e07b6fb45cf \ No newline at end of file