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.
flasher.cpp@0:ccaab3b367fc, 2015-11-27 (annotated)
- Committer:
- mahantesh
- Date:
- Fri Nov 27 08:00:50 2015 +0000
- Revision:
- 0:ccaab3b367fc
library
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mahantesh | 0:ccaab3b367fc | 1 | #include "Flasher.h" |
| mahantesh | 0:ccaab3b367fc | 2 | #include "mbed.h" |
| mahantesh | 0:ccaab3b367fc | 3 | |
| mahantesh | 0:ccaab3b367fc | 4 | Flasher::Flasher(PinName pin) : _pin(pin) { |
| mahantesh | 0:ccaab3b367fc | 5 | _pin = 0; |
| mahantesh | 0:ccaab3b367fc | 6 | } |
| mahantesh | 0:ccaab3b367fc | 7 | |
| mahantesh | 0:ccaab3b367fc | 8 | void Flasher::flash(int n) { |
| mahantesh | 0:ccaab3b367fc | 9 | for(int i=0; i<n*2; i++) { |
| mahantesh | 0:ccaab3b367fc | 10 | _pin = !_pin; |
| mahantesh | 0:ccaab3b367fc | 11 | wait(0.2); |
| mahantesh | 0:ccaab3b367fc | 12 | } |
| mahantesh | 0:ccaab3b367fc | 13 | } |