Add a test mode

This commit is contained in:
Eric Tang
2018-07-05 20:15:33 -07:00
parent 2ef5c49090
commit 86196d438c
3 changed files with 122 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
#include "usb_protocol_handler.h"
#include "usb_commands/usb_command_switch_keymap.h"
#include "keymap.h"
#include "test_mode.h"
void UsbCommand_SwitchKeymap(void)
{
@@ -9,6 +10,8 @@ void UsbCommand_SwitchKeymap(void)
if (keymapLength > KEYMAP_ABBREVIATION_LENGTH) {
SetUsbTxBufferUint8(0, UsbStatusCode_SwitchKeymap_InvalidAbbreviationLength);
} else if (keymapLength == 1 && keymapAbbrev[0] == 1) {
TestMode_Activate();
}
if (!SwitchKeymapByAbbreviation(keymapLength, keymapAbbrev)) {