fork/GramFirmware
git clone https://git.julia.blue/fork/GramFirmware
818d962
gram
1#ifndef _INPUT_GPIOBUTTONINPUT_HPP 2#define _INPUT_GPIOBUTTONINPUT_HPP 3 4#include "core/InputSource.hpp" 5#include "core/state.hpp" 6#include "stdlib.hpp" 7 8#include <config.pb.h> 9 10typedef struct { 11Button button ; 12uint pin ; 13}GpioButtonMapping ; 14 15class GpioButtonInput :public InputSource { 16public : 17GpioButtonInput (const GpioButtonMapping * button_mappings ,size_t button_count ); 18InputScanSpeed ScanSpeed (); 19void UpdateInputs (InputState & inputs ); 20 21protected : 22const GpioButtonMapping * _button_mappings ; 23size_t _button_count ; 24 25private : 26virtual void UpdateButtonState (InputState & inputs ,size_t button_mapping_index ,bool pressed ); 27}; 28 29#endif