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.
Diff: main.cpp
- Revision:
- 6:78a965b2d2df
- Parent:
- 5:03b7c237c4c4
- Child:
- 7:19da09fe546b
--- a/main.cpp Mon Apr 14 01:47:31 2014 +0000 +++ b/main.cpp Mon Apr 14 01:53:10 2014 +0000 @@ -3,9 +3,9 @@ #include "mbed.h" #include "shell.h" -Ticker messageTicker, scanTicker; +Ticker *scanTicker; +Shell *usbSerialShell; bool scanUSBSerialRxFlag; -Shell *usbSerialShell; void setScanUSBSerialRxFlag() { @@ -22,7 +22,8 @@ usbSerialShell->sendHelloWorld(); // start polling for characters - scanTicker.attach(&setScanUSBSerialRxFlag, 0.01); + scanTicker = new Ticker(); + scanTicker->attach(&setScanUSBSerialRxFlag, 0.01); scanUSBSerialRxFlag = false; } //-----------------------------------------------------------------------------