fork/GramFirmware

git clone https://git.julia.blue/fork/GramFirmware

Jonathan HaylettMerge pull request #7 from JonnyHaystack/v23ab6a9b

v0.1.0
534 B24 linesraw
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
8typedef struct {
9    bool InputState::*button;
10    uint pin;
11} GpioButtonMapping;
12
13class GpioButtonInput : public InputSource {
14  public:
15    GpioButtonInput(GpioButtonMapping *button_mappings, size_t button_count);
16    InputScanSpeed ScanSpeed();
17    void UpdateInputs(InputState &inputs);
18
19  protected:
20    GpioButtonMapping *_button_mappings;
21    size_t _button_count;
22};
23
24#endif