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:
- 7:19da09fe546b
- Parent:
- 6:78a965b2d2df
--- a/main.cpp Mon Apr 14 01:53:10 2014 +0000 +++ b/main.cpp Mon Apr 14 03:04:28 2014 +0000 @@ -2,14 +2,18 @@ #include "mbed.h" #include "shell.h" +#include "LEDColors.h" Ticker *scanTicker; Shell *usbSerialShell; +LEDColors *ledColors; + bool scanUSBSerialRxFlag; -void setScanUSBSerialRxFlag() +void at10msTick() { scanUSBSerialRxFlag = true; + ledColors->tick10ms(); } //----------------------------------------------------------------------------- @@ -23,8 +27,10 @@ // start polling for characters scanTicker = new Ticker(); - scanTicker->attach(&setScanUSBSerialRxFlag, 0.01); + scanTicker->attach(&at10msTick, 0.01); scanUSBSerialRxFlag = false; + + ledColors = new LEDColors(); } //-----------------------------------------------------------------------------