Changes based on the review notes

This does a lot of things - all of this together, because it would have been
much harder to split them up into many small commits.

We get rid of the helper macros used in default_layout.c, drop the .raw member
of uhk_key_t, use a singleton keymap, and prepare the prevKeyStates to handle
all slots. Also drops the TRNS macro.

With these changes, default_layout.h became obsolete, and was deleted too.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
This commit is contained in:
Gergely Nagy
2016-12-12 23:10:20 +01:00
parent 0b09fb0055
commit 9f61c3227c
5 changed files with 230 additions and 98 deletions

View File

@@ -6,7 +6,7 @@
#include "fsl_i2c.h"
#include "i2c.h"
#include "i2c_addresses.h"
#include "default_layout.h"
#include "keyboard_layout.h"
static usb_device_endpoint_struct_t UsbKeyboardEndpoints[USB_KEYBOARD_ENDPOINT_COUNT] = {{
USB_KEYBOARD_ENDPOINT_INDEX | (USB_IN << USB_DESCRIPTOR_ENDPOINT_ADDRESS_DIRECTION_SHIFT),
@@ -100,7 +100,7 @@ void UsbKeyboadTask(){
readLeftKeys(leftKeyStates);
fillKeyboardReport(&UsbKeyboardReport[newLayout], leftKeyStates, keyMatrix.keyStates, defaultKeyboardLayout);
fillKeyboardReport(&UsbKeyboardReport[newLayout], leftKeyStates, keyMatrix.keyStates);
// Change to the new layout in atomic operation (int copy). Even if
// the copy is not atomic itself, only single bit changes. So it can