refactoring into multiple files, not tested on hardware

This commit is contained in:
Adolfo Reyna
2025-12-09 18:41:03 -05:00
parent bc0e082b89
commit 47956bf64c
8 changed files with 552 additions and 439 deletions

19
keyboard_input.h Normal file
View File

@@ -0,0 +1,19 @@
#ifndef KEYBOARD_INPUT_H
#define KEYBOARD_INPUT_H
#include "tusb.h"
struct KeyEvent {
char ascii;
bool is_enter;
bool is_backspace;
bool is_printable;
};
/**
* Parses a raw HID keyboard report and returns true if a new key press was detected.
* The result is stored in the provided KeyEvent pointer.
*/
bool parse_keyboard_report(hid_keyboard_report_t const *report, KeyEvent* result);
#endif // KEYBOARD_INPUT_H