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.
Dependencies: EthernetInterfacePlusHostname NTPClient Onewire RdWebServer SDFileSystem-RTOS mbed-rtos mbed-src
PulsePin.h
00001 #ifndef __PULSEPIN__H 00002 #define __PULSEPIN__H 00003 #include "mbed.h" 00004 00005 class PulsePin 00006 { 00007 public: 00008 PulsePin(DigitalIn& pin, bool risingEdge, int pinStableTimeMs); 00009 bool Service(); 00010 int GetPulseRateMs(); 00011 int GetPulseCount(); 00012 void SetPulseCount(int pulseCount); 00013 00014 private: 00015 DigitalIn& _pin; 00016 Timer _pinTimer; 00017 bool _curPinState; 00018 bool _firstEdgeDetected; 00019 int _lastStableTimeMs; 00020 int _waitForPinStabilisationMs; 00021 bool _detectRisingEdge; 00022 int _timeBetweenEdgesMs; 00023 int _pulseCount; 00024 int _pinTimerMinutes; 00025 }; 00026 00027 00028 #endif
Generated on Tue Jul 12 2022 18:43:11 by
1.7.2