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@7:1e9cd1481e80, 2015-10-22 (annotated)
- Committer:
- Oschofield
- Date:
- Thu Oct 22 10:50:37 2015 +0000
- Revision:
- 7:1e9cd1481e80
- Parent:
- 4:5d531bd3c4ea
- Child:
- 8:ad8e2dd314a2
.;
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 | 7:1e9cd1481e80 | 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 | 7:1e9cd1481e80 | 12 | } |