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.
Dependents: NJU6063_HelloWorld
Switch.h
00001 #ifndef MBED_SWITCH_H 00002 #define MBED_SWITCH_H 00003 00004 #include "mbed.h" 00005 00006 class Switch 00007 { 00008 private: 00009 DigitalIn _sw0; 00010 DigitalIn _sw1; 00011 Ticker _swchecker; 00012 00013 uint8_t buffer[2]; 00014 uint8_t swst[2]; 00015 uint8_t sw[2]; 00016 uint8_t prev[2]; 00017 00018 public: 00019 Switch( PinName sw0, PinName sw1); 00020 ~Switch(){}; 00021 void begin(void); 00022 void swcheck(void); 00023 uint8_t negedge(uint8_t no); 00024 uint8_t posedge(uint8_t no); 00025 void clear(uint8_t no); 00026 uint8_t level(uint8_t no); 00027 }; 00028 00029 #endif //MBED_SWITCH_H
Generated on Mon Jul 18 2022 02:20:28 by
1.7.2