Creating a project about PriSensor for TT_Mxx

Committer:
ThunderSoft
Date:
Wed May 15 13:13:42 2019 +0000
Revision:
3:65b6e5b2be31
Parent:
0:8f7f050af5a8
Cancel delay.

Who changed what in which revision?

UserRevisionLine numberNew 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