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:7a4785cc33b1, 2012-06-09 (annotated)
- Committer:
- ufukbatmaz
- Date:
- Sat Jun 09 11:37:38 2012 +0000
- Revision:
- 0:7a4785cc33b1
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| ufukbatmaz | 0:7a4785cc33b1 | 1 | #include "Flasher.h" |
| ufukbatmaz | 0:7a4785cc33b1 | 2 | #include "mbed.h" |
| ufukbatmaz | 0:7a4785cc33b1 | 3 | |
| ufukbatmaz | 0:7a4785cc33b1 | 4 | Flasher::Flasher(PinName pin) : _pin(pin) { |
| ufukbatmaz | 0:7a4785cc33b1 | 5 | _pin = 0; |
| ufukbatmaz | 0:7a4785cc33b1 | 6 | } |
| ufukbatmaz | 0:7a4785cc33b1 | 7 | |
| ufukbatmaz | 0:7a4785cc33b1 | 8 | void Flasher::flash(int n) { |
| ufukbatmaz | 0:7a4785cc33b1 | 9 | for(int i=0; i<n*2; i++) { |
| ufukbatmaz | 0:7a4785cc33b1 | 10 | _pin = !_pin; |
| ufukbatmaz | 0:7a4785cc33b1 | 11 | wait(0.2); |
| ufukbatmaz | 0:7a4785cc33b1 | 12 | } |
| ufukbatmaz | 0:7a4785cc33b1 | 13 | } |