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