TOF based Presence Detector
Dependencies: BLE_API X_NUCLEO_6180XA1 X_NUCLEO_IDB0XA1 mbed
Fork of BLE_HeartRate_IDB0XA1 by
bricks/stop.h@29:eceecbe28088, 2018-08-20 (annotated)
- Committer:
- hux
- Date:
- Mon Aug 20 16:43:10 2018 +0000
- Revision:
- 29:eceecbe28088
- Parent:
- 28:a23b16555909
made in Shanghai
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hux | 28:a23b16555909 | 1 | // stop.h - stop button functionality |
hux | 28:a23b16555909 | 2 | |
hux | 28:a23b16555909 | 3 | #ifndef _STOP_H_ |
hux | 28:a23b16555909 | 4 | #define _STOP_H_ |
hux | 28:a23b16555909 | 5 | |
hux | 28:a23b16555909 | 6 | #include <mbed.h> |
hux | 28:a23b16555909 | 7 | |
hux | 28:a23b16555909 | 8 | class StopButton : private InterruptIn |
hux | 28:a23b16555909 | 9 | { |
hux | 28:a23b16555909 | 10 | public: |
hux | 28:a23b16555909 | 11 | void set(); // set stop request |
hux | 28:a23b16555909 | 12 | void clear(); // clear stop request |
hux | 28:a23b16555909 | 13 | bool request(); // stop requested? |
hux | 28:a23b16555909 | 14 | |
hux | 28:a23b16555909 | 15 | public: // construction |
hux | 28:a23b16555909 | 16 | StopButton(PinName pin = USER_BUTTON); |
hux | 28:a23b16555909 | 17 | }; |
hux | 28:a23b16555909 | 18 | |
hux | 28:a23b16555909 | 19 | #endif // _STOP_H_ |