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.
button.cpp@2:e3cd1e0c3b78, 2015-10-15 (annotated)
- Committer:
- Oschofield
- Date:
- Thu Oct 15 11:38:52 2015 +0000
- Revision:
- 2:e3cd1e0c3b78
- Parent:
- 1:16b0f2898739
- Child:
- 3:8dca756d9804
.;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Oschofield | 1:16b0f2898739 | 1 | #include "button.h" //header file included |
Oschofield | 1:16b0f2898739 | 2 | |
Oschofield | 1:16b0f2898739 | 3 | |
Oschofield | 1:16b0f2898739 | 4 | Button::Button(string s){ |
Oschofield | 1:16b0f2898739 | 5 | if (s == "user"){ |
Oschofield | 1:16b0f2898739 | 6 | pin = new DigitalIn(PA_0); |
Oschofield | 1:16b0f2898739 | 7 | } |
Oschofield | 1:16b0f2898739 | 8 | } |
Oschofield | 1:16b0f2898739 | 9 | |
Oschofield | 2:e3cd1e0c3b78 | 10 | bool Button::ifPressed(){ |
Oschofield | 2:e3cd1e0c3b78 | 11 | return *pin; |
Oschofield | 1:16b0f2898739 | 12 | } |