Move keyboard event handling into action.c

Since keyboard_layout.[ch] has gained more features, and handles more than just
filling out the keyboard report, move it to action.[ch] instead. I see no sane
way to separate the keyboard and mouse report filling, unless we want to loop
over key states twice, hence them being in the same file.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
This commit is contained in:
Gergely Nagy
2016-12-15 18:32:28 +01:00
parent 440c6d8ca8
commit 39dd0df58c
8 changed files with 123 additions and 158 deletions

View File

@@ -3,7 +3,7 @@
#include "fsl_i2c.h"
#include "i2c.h"
#include "reset_button.h"
#include "keyboard_layout.h"
#include "action.h"
static usb_device_endpoint_struct_t UsbMouseEndpoints[USB_MOUSE_ENDPOINT_COUNT] = {{
USB_MOUSE_ENDPOINT_INDEX | (USB_IN << USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_SHIFT),
@@ -37,7 +37,7 @@ usb_device_class_struct_t UsbMouseClass = {
USB_DEVICE_CONFIGURATION_COUNT,
};
static usb_mouse_report_t UsbMouseReport;
usb_mouse_report_t UsbMouseReport;
static volatile usb_status_t UsbMouseAction(void)
{