2022-03-28 16:55:58 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
2023-08-19 15:37:42 +02:00
|
|
|
#include "BBQ10Keyboard.h"
|
2022-03-28 16:55:58 +02:00
|
|
|
#include "InputBroker.h"
|
2024-10-21 16:53:36 +10:00
|
|
|
#include "MPR121Keyboard.h"
|
2023-03-08 19:13:46 -08:00
|
|
|
#include "Wire.h"
|
2023-03-11 22:48:08 +01:00
|
|
|
#include "concurrency/OSThread.h"
|
2022-03-28 16:55:58 +02:00
|
|
|
|
2025-07-21 19:33:24 +02:00
|
|
|
class TCA8418KeyboardBase;
|
|
|
|
|
|
2023-01-21 14:34:29 +01:00
|
|
|
class KbI2cBase : public Observable<const InputEvent *>, public concurrency::OSThread
|
2022-03-28 16:55:58 +02:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
explicit KbI2cBase(const char *name);
|
2025-09-22 21:06:23 -05:00
|
|
|
void toggleBacklight(bool on);
|
2022-03-28 16:55:58 +02:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
virtual int32_t runOnce() override;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
const char *_originName;
|
2023-03-08 19:13:46 -08:00
|
|
|
|
|
|
|
|
TwoWire *i2cBus = 0;
|
2023-08-19 15:37:42 +02:00
|
|
|
|
|
|
|
|
BBQ10Keyboard Q10keyboard;
|
2024-10-21 16:53:36 +10:00
|
|
|
MPR121Keyboard MPRkeyboard;
|
2025-07-21 19:33:24 +02:00
|
|
|
TCA8418KeyboardBase &TCAKeyboard;
|
2023-08-22 11:23:19 +02:00
|
|
|
bool is_sym = false;
|
2025-03-27 08:31:57 -05:00
|
|
|
};
|