diff --git a/right/src/config/parse_keymap.c b/right/src/config/parse_keymap.c index c2da2f1..7e47fb3 100644 --- a/right/src/config/parse_keymap.c +++ b/right/src/config/parse_keymap.c @@ -193,8 +193,7 @@ static bool parseLayer(serialized_buffer_t *buffer, uint8_t layer) { return false; } -bool ParseKeymap(uint8_t *data) { - serialized_buffer_t *buffer = &(serialized_buffer_t){ data, 0 }; +bool ParseKeymap(serialized_buffer_t *buffer) {; uint16_t abbreviationLen; uint16_t nameLen; uint16_t descriptionLen; diff --git a/right/src/config/parse_keymap.h b/right/src/config/parse_keymap.h index 89d3d3a..89074d8 100644 --- a/right/src/config/parse_keymap.h +++ b/right/src/config/parse_keymap.h @@ -56,6 +56,6 @@ // Functions: - bool ParseKeymap(uint8_t *data); + bool ParseKeymap(serialized_buffer_t *buffer); #endif diff --git a/right/src/usb_protocol_handler.c b/right/src/usb_protocol_handler.c index e5c2581..8b5f391 100644 --- a/right/src/usb_protocol_handler.c +++ b/right/src/usb_protocol_handler.c @@ -193,7 +193,11 @@ void uploadConfig() void applyConfig() { - setError(ParseKeymap(ConfigBuffer)); + serialized_buffer_t buffer = { ConfigBuffer, 0 }; + + GenericHidOutBuffer[0] = ParseKeymap(&buffer); + GenericHidOutBuffer[1] = buffer.offset; + GenericHidOutBuffer[2] = buffer.offset >> 8; } void setLedPwm()