VFD modular clock firmware
Dependencies: DipCortex-EEprom RTC flw mbed
button.h
00001 /* 00002 * VFD Modular Clock - mbed 00003 * (C) 2011-14 Akafugu Corporation 00004 * 00005 * This program is free software; you can redistribute it and/or modify it under the 00006 * terms of the GNU General Public License as published by the Free Software 00007 * Foundation; either version 2 of the License, or (at your option) any later 00008 * version. 00009 * 00010 * This program is distributed in the hope that it will be useful, but WITHOUT ANY 00011 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 00012 * PARTICULAR PURPOSE. See the GNU General Public License for more details. 00013 * 00014 */ 00015 00016 #ifndef BUTTON_H_ 00017 #define BUTTON_H_ 00018 00019 #include <stdbool.h> 00020 00021 struct BUTTON_STATE 00022 { 00023 bool b1_keydown : 1; 00024 bool b1_keyup : 1; 00025 bool b1_repeat : 1; 00026 bool b2_keydown : 1; 00027 bool b2_keyup : 1; 00028 bool b2_repeat : 1; 00029 bool b3_keydown : 1; 00030 bool b3_keyup : 1; 00031 bool b3_repeat : 1; 00032 bool both_held : 1; 00033 bool none_held : 1; 00034 }; 00035 00036 void initialize_buttons(); 00037 void get_button_state(struct BUTTON_STATE* buttons); 00038 void button_tick(void); 00039 00040 uint8_t get_keystatus(); 00041 00042 #endif
Generated on Wed Jul 13 2022 06:11:41 by 1.7.2