refactoring into multiple files, not tested on hardware
This commit is contained in:
19
keyboard_input.h
Normal file
19
keyboard_input.h
Normal 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
|
||||
Reference in New Issue
Block a user