Thundersoft
/
ReedSwitch_for_TT_Mxx
Creating a project for TT_Mxx
DoorStatus/DoorStatus.cpp
- Committer:
- ThunderSoft
- Date:
- 2019-04-26
- Revision:
- 1:c55bc0872920
- Parent:
- 0:a0f5041497e4
File content as of revision 1:c55bc0872920:
#include "DoorStatus.h" #if defined(__TT_M4G9__) #define DEFAULT_DOR_PIN PL0 #endif #if defined(__TT_M3HQ__) #define DEFAULT_DOR_PIN PK7 #endif DoorStatus::DoorStatus() { interruptPin = new InterruptIn(DEFAULT_DOR_PIN); } DoorStatus::DoorStatus(PinName pin) { interruptPin = new InterruptIn(pin); } void DoorStatus::handleCallback(Callback<void()> func) { interruptPin->fall(func); }