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.
flash/flash.h@0:feaa05d35ccf, 2012-03-07 (annotated)
- Committer:
- AlexAllen
- Date:
- Wed Mar 07 20:02:35 2012 +0000
- Revision:
- 0:feaa05d35ccf
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| AlexAllen | 0:feaa05d35ccf | 1 | #ifndef FLASHY |
| AlexAllen | 0:feaa05d35ccf | 2 | |
| AlexAllen | 0:feaa05d35ccf | 3 | /* Lights up each LED in turn starting from the left going |
| AlexAllen | 0:feaa05d35ccf | 4 | to the right and then back again */ |
| AlexAllen | 0:feaa05d35ccf | 5 | void lightup(); |
| AlexAllen | 0:feaa05d35ccf | 6 | |
| AlexAllen | 0:feaa05d35ccf | 7 | // 5 second timer counting down on LEDs |
| AlexAllen | 0:feaa05d35ccf | 8 | void timer(); |
| AlexAllen | 0:feaa05d35ccf | 9 | |
| AlexAllen | 0:feaa05d35ccf | 10 | /* flashes all LEDs on and off at once "times" number of time |
| AlexAllen | 0:feaa05d35ccf | 11 | with a gap of "gap" seconds between flashes */ |
| AlexAllen | 0:feaa05d35ccf | 12 | void flash(int times, float gap); |
| AlexAllen | 0:feaa05d35ccf | 13 | |
| AlexAllen | 0:feaa05d35ccf | 14 | // Single flash on led1 for "gap" seconds |
| AlexAllen | 0:feaa05d35ccf | 15 | void flash1(float gap); |
| AlexAllen | 0:feaa05d35ccf | 16 | |
| AlexAllen | 0:feaa05d35ccf | 17 | // Single flash on led1 for "gap" seconds |
| AlexAllen | 0:feaa05d35ccf | 18 | void flash2(float gap); |
| AlexAllen | 0:feaa05d35ccf | 19 | |
| AlexAllen | 0:feaa05d35ccf | 20 | /* inifite loop indicating something has failed terminally |
| AlexAllen | 0:feaa05d35ccf | 21 | and mbed needs reseting. Flashes outer then inner LEDs */ |
| AlexAllen | 0:feaa05d35ccf | 22 | void errormsg1(float gap); |
| AlexAllen | 0:feaa05d35ccf | 23 | |
| AlexAllen | 0:feaa05d35ccf | 24 | /* inifite loop indicating something has failed terminally |
| AlexAllen | 0:feaa05d35ccf | 25 | and mbed needs reseting. Flashes outer then inner LEDs */ |
| AlexAllen | 0:feaa05d35ccf | 26 | void errormsg2(float gap); |
| AlexAllen | 0:feaa05d35ccf | 27 | |
| AlexAllen | 0:feaa05d35ccf | 28 | // LEDs light up one at a time until all are lit |
| AlexAllen | 0:feaa05d35ccf | 29 | void signal(float gap); |
| AlexAllen | 0:feaa05d35ccf | 30 | |
| AlexAllen | 0:feaa05d35ccf | 31 | #define FLASHY 1 |
| AlexAllen | 0:feaa05d35ccf | 32 | #endif |