Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MODSERIAL SerialFileTransfer SimpleSerialProtocol mbed
Diff: main.cpp
- Revision:
- 3:116c45e2a41e
- Parent:
- 0:a0abf3eff698
- Child:
- 4:dfe9a9434a92
diff -r 1c0a9448df44 -r 116c45e2a41e main.cpp
--- a/main.cpp Wed Aug 27 18:03:07 2014 +0000
+++ b/main.cpp Thu Sep 18 17:49:08 2014 +0000
@@ -9,8 +9,9 @@
SFTProtocol fileAcceptor;
int main() {
- //initialise the comm port at 155200 baud
- comms.initialise(115200);
+ //initialise the comm port at 155200 baud and use the default codec
+ SimpleSerialProtocol::Codec codec;
+ comms.initialise(115200, &codec);
//listen for packets of type 1 and relay the data to the onFileStart callback in SFTProtocol
comms.receiveCallback(1, &fileAcceptor, &SFTProtocol::onFileStart);
//listen for packets of type 3 and relay