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.
Dependencies: mbed-dev mbed-rtos
Stoplicht.cpp@0:87617851c15a, 2016-01-14 (annotated)
- Committer:
- jeroenvz
- Date:
- Thu Jan 14 18:52:40 2016 +0000
- Revision:
- 0:87617851c15a
Definitief
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jeroenvz | 0:87617851c15a | 1 | #include "Stoplicht.h" |
jeroenvz | 0:87617851c15a | 2 | |
jeroenvz | 0:87617851c15a | 3 | Stoplicht::Stoplicht(PinName rood, PinName groen){ |
jeroenvz | 0:87617851c15a | 4 | mGroen = new DigitalOut(groen); |
jeroenvz | 0:87617851c15a | 5 | mRood = new DigitalOut(rood); |
jeroenvz | 0:87617851c15a | 6 | *mGroen = true; |
jeroenvz | 0:87617851c15a | 7 | *mRood = true; |
jeroenvz | 0:87617851c15a | 8 | } |
jeroenvz | 0:87617851c15a | 9 | |
jeroenvz | 0:87617851c15a | 10 | void Stoplicht::set_Groen(){ |
jeroenvz | 0:87617851c15a | 11 | *mRood = true; |
jeroenvz | 0:87617851c15a | 12 | *mGroen = false; |
jeroenvz | 0:87617851c15a | 13 | mStoplichtRood = false; |
jeroenvz | 0:87617851c15a | 14 | } |
jeroenvz | 0:87617851c15a | 15 | |
jeroenvz | 0:87617851c15a | 16 | void Stoplicht::set_Rood(){ |
jeroenvz | 0:87617851c15a | 17 | *mGroen = true; |
jeroenvz | 0:87617851c15a | 18 | *mRood = false; |
jeroenvz | 0:87617851c15a | 19 | mStoplichtRood = true; |
jeroenvz | 0:87617851c15a | 20 | } |
jeroenvz | 0:87617851c15a | 21 | |
jeroenvz | 0:87617851c15a | 22 | bool Stoplicht::get_Status(){ |
jeroenvz | 0:87617851c15a | 23 | return mStoplichtRood; |
jeroenvz | 0:87617851c15a | 24 | } |