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:b001170d4346, 2018-10-26 (annotated)
- Committer:
- tradasic
- Date:
- Fri Oct 26 16:03:41 2018 +0000
- Revision:
- 0:b001170d4346
o
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| tradasic | 0:b001170d4346 | 1 | #include "Flasher.h" |
| tradasic | 0:b001170d4346 | 2 | #include "mbed.h" |
| tradasic | 0:b001170d4346 | 3 | Flasher::Flasher(PinName pin) : _pin(pin) { |
| tradasic | 0:b001170d4346 | 4 | _pin = 0; |
| tradasic | 0:b001170d4346 | 5 | } |
| tradasic | 0:b001170d4346 | 6 | void Flasher::flash(int n) { |
| tradasic | 0:b001170d4346 | 7 | for(int i=0; i<n*2; i++) { |
| tradasic | 0:b001170d4346 | 8 | _pin = !_pin; |
| tradasic | 0:b001170d4346 | 9 | wait(0.2); |
| tradasic | 0:b001170d4346 | 10 | } |
| tradasic | 0:b001170d4346 | 11 | } |