diff options
Diffstat (limited to 'hid/lib/drivers/keyboard.h')
-rw-r--r-- | hid/lib/drivers/keyboard.h | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/hid/lib/drivers/keyboard.h b/hid/lib/drivers/keyboard.h index 44ffe61a..39517f68 100644 --- a/hid/lib/drivers/keyboard.h +++ b/hid/lib/drivers/keyboard.h @@ -26,9 +26,41 @@ namespace DRIVERS { - typedef struct { - bool caps; - bool scroll; - bool num; - } KeyboardLedsState; + typedef struct { + bool caps; + bool scroll; + bool num; + } KeyboardLedsState; + + + struct Keyboard : public Driver { + using Driver::Driver; + + virtual void begin() {} + + /** + * Release all keys + */ + virtual void clear() {} + + /** + * Sends key + * @param code ??? + * @param state true pressed, false released + */ + virtual void sendKey(uint8_t code, bool state) {} + + virtual void periodic() {} + + /** + * False if online or unknown. Otherwise true. + */ + virtual bool isOffline() { return false; } + + virtual KeyboardLedsState getLeds() { + KeyboardLedsState result = {}; + return result; + } + + }; } |