fork/GramFirmware

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

CarVacrebase to configurator818d962

gram
577 B28 linesraw
1#ifndef _CORE_KEYBOARDMODE_HPP
2#define _CORE_KEYBOARDMODE_HPP
3
4#include "core/InputMode.hpp"
5#include "core/socd.hpp"
6#include "core/state.hpp"
7
8#include <TUKeyboard.hpp>
9#include <config.pb.h>
10
11class KeyboardMode : public InputMode {
12  public:
13    KeyboardMode();
14    ~KeyboardMode();
15    void SendReport(const InputState &inputs);
16
17    void UpdateOutputs(const InputState &inputs, OutputState &outputs) {}
18
19  protected:
20    void Press(uint8_t keycode, bool press);
21
22  private:
23    TUKeyboard *_keyboard;
24
25    virtual void UpdateKeys(const InputState &inputs) = 0;
26};
27
28#endif