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.
indicator.cpp@2:ff5abf6d887c, 2016-11-22 (annotated)
- Committer:
- YTvW
- Date:
- Tue Nov 22 10:59:11 2016 +0000
- Revision:
- 2:ff5abf6d887c
- Child:
- 3:11ab070a3edb
aanmaak indicator.h
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| YTvW | 2:ff5abf6d887c | 1 | #include "mbed.h" |
| YTvW | 2:ff5abf6d887c | 2 | #include "indicator.h" |
| YTvW | 2:ff5abf6d887c | 3 | |
| YTvW | 2:ff5abf6d887c | 4 | Indicator::Indicator(PinName pin) : _pin(pin) { |
| YTvW | 2:ff5abf6d887c | 5 | _pin = 0; |
| YTvW | 2:ff5abf6d887c | 6 | } |
| YTvW | 2:ff5abf6d887c | 7 | void indicator_thread() |
| YTvW | 2:ff5abf6d887c | 8 | { |
| YTvW | 2:ff5abf6d887c | 9 | while(1) |
| YTvW | 2:ff5abf6d887c | 10 | { |
| YTvW | 2:ff5abf6d887c | 11 | _pin= ledstatus; |
| YTvW | 2:ff5abf6d887c | 12 | } |
| YTvW | 2:ff5abf6d887c | 13 | } |
| YTvW | 2:ff5abf6d887c | 14 | |
| YTvW | 2:ff5abf6d887c | 15 | void Indicator::SetSituation() |
| YTvW | 2:ff5abf6d887c | 16 | { |
| YTvW | 2:ff5abf6d887c | 17 | |
| YTvW | 2:ff5abf6d887c | 18 | } |
| YTvW | 2:ff5abf6d887c | 19 | void Status(int situation,int ledstatus) |
| YTvW | 2:ff5abf6d887c | 20 | { |
| YTvW | 2:ff5abf6d887c | 21 | if(situation == 0) |
| YTvW | 2:ff5abf6d887c | 22 | { |
| YTvW | 2:ff5abf6d887c | 23 | ledstatus = 0; |
| YTvW | 2:ff5abf6d887c | 24 | } |
| YTvW | 2:ff5abf6d887c | 25 | else if(situation==1) |
| YTvW | 2:ff5abf6d887c | 26 | { |
| YTvW | 2:ff5abf6d887c | 27 | ledstatus = 1; |
| YTvW | 2:ff5abf6d887c | 28 | } |
| YTvW | 2:ff5abf6d887c | 29 | |
| YTvW | 2:ff5abf6d887c | 30 | } |
| YTvW | 2:ff5abf6d887c | 31 | void Indicator::SlowFlash(int situation,int ledstatus) |
| YTvW | 2:ff5abf6d887c | 32 | { |
| YTvW | 2:ff5abf6d887c | 33 | |
| YTvW | 2:ff5abf6d887c | 34 | } |
| YTvW | 2:ff5abf6d887c | 35 | void Indicator::FastFlash(int situation,int ledstatus) |
| YTvW | 2:ff5abf6d887c | 36 | { |
| YTvW | 2:ff5abf6d887c | 37 | |
| YTvW | 2:ff5abf6d887c | 38 | } |