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.
Dependents: NerfUS_cmake_add_library_from_mbed NerfUS NerfUSGameCoordinator
source/MbedBlinker.cpp@0:e67c78f2b4f4, 2017-02-16 (annotated)
- Committer:
- Maxime Dupuis
- Date:
- Thu Feb 16 11:42:32 2017 -0500
- Revision:
- 0:e67c78f2b4f4
- Child:
- 1:001a600870d9
Initial commit
Add a BlinkerInterface from which different hardware implementations
could be made (e.g. for the LPC1768)
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Maxime Dupuis |
0:e67c78f2b4f4 | 1 | #include "MbedBlinker.hpp" |
| Maxime Dupuis |
0:e67c78f2b4f4 | 2 | |
| Maxime Dupuis |
0:e67c78f2b4f4 | 3 | MbedBlinker::MbedBlinker(DigitalOut led) : |
| Maxime Dupuis |
0:e67c78f2b4f4 | 4 | led(led) |
| Maxime Dupuis |
0:e67c78f2b4f4 | 5 | { |
| Maxime Dupuis |
0:e67c78f2b4f4 | 6 | } |
| Maxime Dupuis |
0:e67c78f2b4f4 | 7 | |
| Maxime Dupuis |
0:e67c78f2b4f4 | 8 | void MbedBlinker::blink() |
| Maxime Dupuis |
0:e67c78f2b4f4 | 9 | { |
| Maxime Dupuis |
0:e67c78f2b4f4 | 10 | led = 1; |
| Maxime Dupuis |
0:e67c78f2b4f4 | 11 | wait(0.5); |
| Maxime Dupuis |
0:e67c78f2b4f4 | 12 | led = 0; |
| Maxime Dupuis |
0:e67c78f2b4f4 | 13 | wait(0.5); |
| Maxime Dupuis |
0:e67c78f2b4f4 | 14 | } |