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: BLE_API X_NUCLEO_IDB0XA1 mbed
Fork of N06_NAND by
bricks/stop.h@26:dce30a5341bb, 2018-05-19 (annotated)
- Committer:
- hux
- Date:
- Sat May 19 14:10:17 2018 +0000
- Revision:
- 26:dce30a5341bb
- Parent:
- 25:339931243be4
Published
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| hux | 25:339931243be4 | 1 | // stop.h - stop button functionality |
| hux | 25:339931243be4 | 2 | |
| hux | 25:339931243be4 | 3 | #ifndef _STOP_H_ |
| hux | 25:339931243be4 | 4 | #define _STOP_H_ |
| hux | 25:339931243be4 | 5 | |
| hux | 25:339931243be4 | 6 | #include <mbed.h> |
| hux | 25:339931243be4 | 7 | |
| hux | 25:339931243be4 | 8 | class StopButton : private InterruptIn |
| hux | 25:339931243be4 | 9 | { |
| hux | 25:339931243be4 | 10 | public: |
| hux | 25:339931243be4 | 11 | void set(); // set stop request |
| hux | 25:339931243be4 | 12 | void clear(); // clear stop request |
| hux | 25:339931243be4 | 13 | bool request(); // stop requested? |
| hux | 25:339931243be4 | 14 | |
| hux | 25:339931243be4 | 15 | public: // construction |
| hux | 25:339931243be4 | 16 | StopButton(PinName pin = USER_BUTTON); |
| hux | 25:339931243be4 | 17 | }; |
| hux | 25:339931243be4 | 18 | |
| hux | 25:339931243be4 | 19 | #endif // _STOP_H_ |
