Rename UserConfigBuffer to ValidatedUserConfigBuffer.
This commit is contained in:
@@ -5,7 +5,7 @@ config_buffer_t HardwareConfigBuffer = {hardwareConfig};
|
|||||||
|
|
||||||
static uint8_t userConfig1[USER_CONFIG_SIZE];
|
static uint8_t userConfig1[USER_CONFIG_SIZE];
|
||||||
static uint8_t __attribute__((section (".m_data_2"))) userConfig2[USER_CONFIG_SIZE];
|
static uint8_t __attribute__((section (".m_data_2"))) userConfig2[USER_CONFIG_SIZE];
|
||||||
config_buffer_t UserConfigBuffer = { userConfig1 };
|
config_buffer_t ValidatedUserConfigBuffer = { userConfig1 };
|
||||||
config_buffer_t StagingUserConfigBuffer = { userConfig2 };
|
config_buffer_t StagingUserConfigBuffer = { userConfig2 };
|
||||||
|
|
||||||
bool ParserRunDry;
|
bool ParserRunDry;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
extern bool ParserRunDry;
|
extern bool ParserRunDry;
|
||||||
extern config_buffer_t HardwareConfigBuffer;
|
extern config_buffer_t HardwareConfigBuffer;
|
||||||
extern config_buffer_t UserConfigBuffer;
|
extern config_buffer_t ValidatedUserConfigBuffer;
|
||||||
extern config_buffer_t StagingUserConfigBuffer;
|
extern config_buffer_t StagingUserConfigBuffer;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ static void i2cCallback(I2C_Type *base, i2c_master_handle_t *handle, status_t st
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LastEepromTransferStatus = i2cAsyncRead(
|
LastEepromTransferStatus = i2cAsyncRead(
|
||||||
isHardwareConfig ? HardwareConfigBuffer.buffer : UserConfigBuffer.buffer,
|
isHardwareConfig ? HardwareConfigBuffer.buffer : ValidatedUserConfigBuffer.buffer,
|
||||||
isHardwareConfig ? HARDWARE_CONFIG_SIZE : USER_CONFIG_SIZE
|
isHardwareConfig ? HARDWARE_CONFIG_SIZE : USER_CONFIG_SIZE
|
||||||
);
|
);
|
||||||
IsEepromBusy = true;
|
IsEepromBusy = true;
|
||||||
@@ -119,7 +119,7 @@ status_t EEPROM_LaunchTransfer(eeprom_transfer_t transferType, void (*successCal
|
|||||||
break;
|
break;
|
||||||
case EepromTransfer_WriteHardwareConfiguration:
|
case EepromTransfer_WriteHardwareConfiguration:
|
||||||
case EepromTransfer_WriteUserConfiguration:
|
case EepromTransfer_WriteUserConfiguration:
|
||||||
sourceBuffer = isHardwareConfig ? HardwareConfigBuffer.buffer : UserConfigBuffer.buffer;
|
sourceBuffer = isHardwareConfig ? HardwareConfigBuffer.buffer : ValidatedUserConfigBuffer.buffer;
|
||||||
sourceOffset = 0;
|
sourceOffset = 0;
|
||||||
sourceLength = isHardwareConfig ? HARDWARE_CONFIG_SIZE : USER_CONFIG_SIZE;
|
sourceLength = isHardwareConfig ? HARDWARE_CONFIG_SIZE : USER_CONFIG_SIZE;
|
||||||
LastEepromTransferStatus = writePage();
|
LastEepromTransferStatus = writePage();
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ uint8_t CurrentKeymapIndex = 0;
|
|||||||
void Keymaps_Switch(uint8_t index)
|
void Keymaps_Switch(uint8_t index)
|
||||||
{
|
{
|
||||||
CurrentKeymapIndex = index;
|
CurrentKeymapIndex = index;
|
||||||
UserConfigBuffer.offset = AllKeymaps[index].offset;
|
ValidatedUserConfigBuffer.offset = AllKeymaps[index].offset;
|
||||||
ParseKeymap(&UserConfigBuffer, index, AllKeymapsCount, AllMacrosCount);
|
ParseKeymap(&ValidatedUserConfigBuffer, index, AllKeymapsCount, AllMacrosCount);
|
||||||
LedDisplay_SetText(AllKeymaps[index].abbreviationLen, AllKeymaps[index].abbreviation);
|
LedDisplay_SetText(AllKeymaps[index].abbreviationLen, AllKeymaps[index].abbreviation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -276,8 +276,8 @@ void Macros_StartMacro(uint8_t index)
|
|||||||
MacroPlaying = true;
|
MacroPlaying = true;
|
||||||
currentMacroIndex = index;
|
currentMacroIndex = index;
|
||||||
currentMacroActionIndex = 0;
|
currentMacroActionIndex = 0;
|
||||||
UserConfigBuffer.offset = AllMacros[index].firstMacroActionOffset;
|
ValidatedUserConfigBuffer.offset = AllMacros[index].firstMacroActionOffset;
|
||||||
ParseMacroAction(&UserConfigBuffer, ¤tMacroAction);
|
ParseMacroAction(&ValidatedUserConfigBuffer, ¤tMacroAction);
|
||||||
memset(&MacroMouseReport, 0, sizeof MacroMouseReport);
|
memset(&MacroMouseReport, 0, sizeof MacroMouseReport);
|
||||||
memset(&MacroBasicKeyboardReport, 0, sizeof MacroBasicKeyboardReport);
|
memset(&MacroBasicKeyboardReport, 0, sizeof MacroBasicKeyboardReport);
|
||||||
memset(&MacroMediaKeyboardReport, 0, sizeof MacroMediaKeyboardReport);
|
memset(&MacroMediaKeyboardReport, 0, sizeof MacroMediaKeyboardReport);
|
||||||
@@ -293,5 +293,5 @@ void Macros_ContinueMacro(void)
|
|||||||
MacroPlaying = false;
|
MacroPlaying = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ParseMacroAction(&UserConfigBuffer, ¤tMacroAction);
|
ParseMacroAction(&ValidatedUserConfigBuffer, ¤tMacroAction);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,15 +111,15 @@ void ApplyConfig(void)
|
|||||||
oldKeymapAbbreviationLen = AllKeymaps[CurrentKeymapIndex].abbreviationLen;
|
oldKeymapAbbreviationLen = AllKeymaps[CurrentKeymapIndex].abbreviationLen;
|
||||||
|
|
||||||
uint8_t *temp;
|
uint8_t *temp;
|
||||||
temp = UserConfigBuffer.buffer;
|
temp = ValidatedUserConfigBuffer.buffer;
|
||||||
UserConfigBuffer.buffer = StagingUserConfigBuffer.buffer;
|
ValidatedUserConfigBuffer.buffer = StagingUserConfigBuffer.buffer;
|
||||||
StagingUserConfigBuffer.buffer = temp;
|
StagingUserConfigBuffer.buffer = temp;
|
||||||
|
|
||||||
ParserRunDry = false;
|
ParserRunDry = false;
|
||||||
UserConfigBuffer.offset = 0;
|
ValidatedUserConfigBuffer.offset = 0;
|
||||||
GenericHidOutBuffer[0] = ParseConfig(&UserConfigBuffer);
|
GenericHidOutBuffer[0] = ParseConfig(&ValidatedUserConfigBuffer);
|
||||||
GenericHidOutBuffer[1] = UserConfigBuffer.offset;
|
GenericHidOutBuffer[1] = ValidatedUserConfigBuffer.offset;
|
||||||
GenericHidOutBuffer[2] = UserConfigBuffer.offset >> 8;
|
GenericHidOutBuffer[2] = ValidatedUserConfigBuffer.offset >> 8;
|
||||||
GenericHidOutBuffer[3] = 1;
|
GenericHidOutBuffer[3] = 1;
|
||||||
|
|
||||||
if (GenericHidOutBuffer[0] != UsbResponse_Success) {
|
if (GenericHidOutBuffer[0] != UsbResponse_Success) {
|
||||||
|
|||||||
Reference in New Issue
Block a user