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.
PirSensor.cpp
00001 #include "PirSensor.h" 00002 00003 00004 00005 #if defined(__TT_M4G9__) 00006 #define DEFAULT_DOR_PIN PK1 00007 #endif 00008 00009 00010 #if defined(__TT_M3HQ__) 00011 #define DEFAULT_DOR_PIN PJ4 00012 #endif 00013 00014 00015 PirSensor::PirSensor() 00016 { 00017 interruptPin = new InterruptIn(DEFAULT_DOR_PIN); 00018 } 00019 00020 PirSensor::PirSensor(PinName pin) 00021 { 00022 interruptPin = new InterruptIn(pin); 00023 } 00024 00025 void PirSensor::handleCallback(Callback<void()> func) 00026 { 00027 interruptPin->fall(func); 00028 }
Generated on Thu Jul 21 2022 09:30:48 by
1.7.2