Thundersoft
/
PirSensor_for_TT_Mxx
Creating a project about PriSensor for TT_Mxx
PirSensor/PirSensor.h@0:8f7f050af5a8, 2019-03-21 (annotated)
- Committer:
- ThunderSoft
- Date:
- Thu Mar 21 10:01:07 2019 +0000
- Revision:
- 0:8f7f050af5a8
Add PriSenor code for TT_Mxx
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ThunderSoft | 0:8f7f050af5a8 | 1 | #ifndef PIRSENSOR_H |
ThunderSoft | 0:8f7f050af5a8 | 2 | #define PIRSENSOR_H |
ThunderSoft | 0:8f7f050af5a8 | 3 | |
ThunderSoft | 0:8f7f050af5a8 | 4 | #include "mbed.h" |
ThunderSoft | 0:8f7f050af5a8 | 5 | |
ThunderSoft | 0:8f7f050af5a8 | 6 | |
ThunderSoft | 0:8f7f050af5a8 | 7 | |
ThunderSoft | 0:8f7f050af5a8 | 8 | class PirSensor { |
ThunderSoft | 0:8f7f050af5a8 | 9 | |
ThunderSoft | 0:8f7f050af5a8 | 10 | |
ThunderSoft | 0:8f7f050af5a8 | 11 | public: |
ThunderSoft | 0:8f7f050af5a8 | 12 | /** |
ThunderSoft | 0:8f7f050af5a8 | 13 | * @brief |
ThunderSoft | 0:8f7f050af5a8 | 14 | */ |
ThunderSoft | 0:8f7f050af5a8 | 15 | PirSensor(PinName pin); |
ThunderSoft | 0:8f7f050af5a8 | 16 | |
ThunderSoft | 0:8f7f050af5a8 | 17 | PirSensor(); |
ThunderSoft | 0:8f7f050af5a8 | 18 | |
ThunderSoft | 0:8f7f050af5a8 | 19 | /** |
ThunderSoft | 0:8f7f050af5a8 | 20 | * @brief Handle the event about door status. |
ThunderSoft | 0:8f7f050af5a8 | 21 | * @param func handle of function. |
ThunderSoft | 0:8f7f050af5a8 | 22 | */ |
ThunderSoft | 0:8f7f050af5a8 | 23 | void handleCallback(Callback<void()> func); |
ThunderSoft | 0:8f7f050af5a8 | 24 | private: |
ThunderSoft | 0:8f7f050af5a8 | 25 | InterruptIn *interruptPin; |
ThunderSoft | 0:8f7f050af5a8 | 26 | |
ThunderSoft | 0:8f7f050af5a8 | 27 | }; |
ThunderSoft | 0:8f7f050af5a8 | 28 | |
ThunderSoft | 0:8f7f050af5a8 | 29 | |
ThunderSoft | 0:8f7f050af5a8 | 30 | |
ThunderSoft | 0:8f7f050af5a8 | 31 | |
ThunderSoft | 0:8f7f050af5a8 | 32 | |
ThunderSoft | 0:8f7f050af5a8 | 33 | |
ThunderSoft | 0:8f7f050af5a8 | 34 | #endif |