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.
Fork of Pswitch_Lib by
Pswitch.h
00001 #include "mbed.h" 00002 00003 class Pswitch { 00004 public: 00005 Pswitch(PinName in); 00006 00007 int read (void); 00008 int count (void); 00009 operator int(); 00010 00011 private : 00012 // objects 00013 DigitalIn _in; 00014 Ticker _ticker; 00015 00016 // function to take a sample, and update flags 00017 void _sample(void); 00018 00019 // counters and flags 00020 int _samples; 00021 int _output; 00022 int _output_last; 00023 int _rising_flag; 00024 00025 }; 00026
Generated on Thu Jul 14 2022 08:41:04 by
1.7.2
