Send the final position of the configuration parser to the host

This commit is contained in:
Eric Tang
2017-07-03 19:42:45 -07:00
parent ebb154472c
commit c7977c905c
3 changed files with 7 additions and 4 deletions

View File

@@ -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;

View File

@@ -56,6 +56,6 @@
// Functions:
bool ParseKeymap(uint8_t *data);
bool ParseKeymap(serialized_buffer_t *buffer);
#endif

View File

@@ -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()