![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
A first try to test how interrupt, timeout and ticker interact.
Revision 2:87c848ac42d9, committed 2014-08-30
- Comitter:
- fdufnews
- Date:
- Sat Aug 30 14:33:18 2014 +0000
- Parent:
- 1:d07b9b4d4264
- Commit message:
- updated comments
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sat Aug 30 14:29:31 2014 +0000 +++ b/main.cpp Sat Aug 30 14:33:18 2014 +0000 @@ -33,15 +33,15 @@ } /** Function called at end of onEnd timeout, sets new timeout defined by led1 state -onEnd calls offEnd which calls onEnd making an oscillator*/ + onEnd calls offEnd which calls onEnd making an oscillator*/ void onEnd(void){ redLED=0; // led off float delay = led1?F_DELAY1:F_DELAY2; // sets new delay conditionned by led1 state redOff.attach(&offEnd,delay); // update delay } -/** Function called at end ofEnd off timeout, sets new timeout defined by led1 state -offEnd calls onEnd which calls offEnd making an oscillator*/ +/** Function called at end of offEnd timeout, sets new timeout defined by led1 state + offEnd calls onEnd which calls offEnd making an oscillator*/ void offEnd(void){ redLED=1; // led on float delay = led1?F_DELAY1:F_DELAY2; // sets new delay conditionned by led1 state @@ -49,7 +49,7 @@ } /** Function to manage PWM for orange LED -at each new tick rampPWM is called changing PWM value ramping up and down the LED*/ + at each new tick rampPWM is called changing PWM value ramping up and down the LED*/ void rampPWM(void){ static int rampDir=0;