Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d093c84fb4 | ||
|
|
95d7197394 | ||
|
|
989774ced9 | ||
|
|
0e29276a56 | ||
|
|
5b90d78518 | ||
|
|
d2eb4b43c7 | ||
|
|
a545324693 | ||
|
|
27b02c32b5 |
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
|
||||
The format is loosely based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to the [UHK Versioning](VERSIONING.md) conventions.
|
||||
|
||||
## [8.2.4] - 2018-05-21
|
||||
|
||||
Device Protocol: 4.3.**1** | Module Protocol: 4.0.0 | User Config: 4.0.1 | Hardware Config: 1.0.0
|
||||
|
||||
- Fix the bug that made the hardware and user configuration not load from the EEPROM on some hosts right after firmware update.
|
||||
- Set the signature of the hardware config to "FTY" in the RAM when the keyboard is in factory reset mode, allowing Agent to be aware of the factory reset state. `DEVICEPROTOCOL:PATCH`
|
||||
- Load the hardware and user configuration from the EEPROM even in factory reset mode.
|
||||
- Set key debounce timeout from 60ms to 80ms. This should further reduce key chattering.
|
||||
|
||||
## [8.2.3] - 2018-05-15
|
||||
|
||||
Device Protocol: 4.3.0 | Module Protocol: 4.0.0 | User Config: 4.0.1 | Hardware Config: 1.0.0
|
||||
|
||||
Submodule lib/agent updated: e294727ac5...ab8ae31324
@@ -11,6 +11,8 @@ config_buffer_t HardwareConfigBuffer = { hardwareConfig };
|
||||
config_buffer_t StagingUserConfigBuffer = { stagingUserConfig };
|
||||
config_buffer_t ValidatedUserConfigBuffer = { validatedUserConfig };
|
||||
|
||||
hardware_config_t *HardwareConfig = (hardware_config_t*)hardwareConfig;
|
||||
|
||||
bool ParserRunDry;
|
||||
|
||||
bool IsConfigBufferIdValid(config_buffer_id_t configBufferId)
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
#include "fsl_common.h"
|
||||
#include "basic_types.h"
|
||||
|
||||
// Macros:
|
||||
|
||||
#define HARDWARE_CONFIG_SIGNATURE_LENGTH 3
|
||||
|
||||
// Typedefs:
|
||||
|
||||
typedef enum {
|
||||
@@ -14,6 +18,19 @@
|
||||
ConfigBufferId_ValidatedUserConfig,
|
||||
} config_buffer_id_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t signatureLength;
|
||||
char signature[HARDWARE_CONFIG_SIGNATURE_LENGTH];
|
||||
uint8_t majorVersion;
|
||||
uint8_t minorVersion;
|
||||
uint8_t patchVersion;
|
||||
uint8_t brandId;
|
||||
uint8_t deviceId;
|
||||
uint32_t uniqueId;
|
||||
bool isVendorModeOn;
|
||||
bool isIso;
|
||||
} hardware_config_t;
|
||||
|
||||
// Variables:
|
||||
|
||||
extern bool ParserRunDry;
|
||||
@@ -21,8 +38,9 @@
|
||||
extern config_buffer_t HardwareConfigBuffer;
|
||||
extern config_buffer_t StagingUserConfigBuffer;
|
||||
extern config_buffer_t ValidatedUserConfigBuffer;
|
||||
extern hardware_config_t *HardwareConfig;
|
||||
|
||||
// Functions:
|
||||
// Functions:
|
||||
|
||||
bool IsConfigBufferIdValid(config_buffer_id_t configBufferId);
|
||||
config_buffer_t* ConfigBufferIdToConfigBuffer(config_buffer_id_t configBufferId);
|
||||
|
||||
@@ -33,10 +33,10 @@ static void initInterruptPriorities(void)
|
||||
{
|
||||
NVIC_SetPriority(PIT_I2C_WATCHDOG_IRQ_ID, 1);
|
||||
NVIC_SetPriority(PIT_TIMER_IRQ_ID, 2);
|
||||
NVIC_SetPriority(I2C_EEPROM_BUS_IRQ_ID, 2);
|
||||
NVIC_SetPriority(PIT_KEY_SCANNER_IRQ_ID, 3);
|
||||
NVIC_SetPriority(PIT_KEY_DEBOUNCER_IRQ_ID, 3);
|
||||
NVIC_SetPriority(I2C_MAIN_BUS_IRQ_ID, 3);
|
||||
NVIC_SetPriority(I2C_EEPROM_BUS_IRQ_ID, 3);
|
||||
NVIC_SetPriority(USB_IRQ_ID, 3);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
// Macros:
|
||||
|
||||
#define KEY_DEBOUNCER_INTERVAL_MSEC 1
|
||||
#define KEY_DEBOUNCER_TIMEOUT_MSEC 60
|
||||
#define KEY_DEBOUNCER_TIMEOUT_MSEC 80
|
||||
|
||||
// Functions:
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
uint8_t IconsAndLayerTextsBrightness = 0xff;
|
||||
uint8_t AlphanumericSegmentsBrightness = 0xff;
|
||||
bool ledIconStates[LedDisplayIcon_Last];
|
||||
char LedDisplay_DebugString[] = " ";
|
||||
|
||||
static const uint16_t capitalLetterToSegmentMap[] = {
|
||||
0b0000000011110111,
|
||||
@@ -116,8 +117,12 @@ void LedDisplay_UpdateIcons(void)
|
||||
|
||||
void LedDisplay_UpdateText(void)
|
||||
{
|
||||
#if LED_DISPLAY_DEBUG_MODE == 0
|
||||
keymap_reference_t *currentKeymap = AllKeymaps + CurrentKeymapIndex;
|
||||
LedDisplay_SetText(currentKeymap->abbreviationLen, currentKeymap->abbreviation);
|
||||
#else
|
||||
LedDisplay_SetText(strlen(LedDisplay_DebugString), LedDisplay_DebugString);
|
||||
#endif
|
||||
}
|
||||
|
||||
void LedDisplay_UpdateAll(void)
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
#include <stdbool.h>
|
||||
#include "layer.h"
|
||||
|
||||
// Macros:
|
||||
|
||||
#define LED_DISPLAY_DEBUG_MODE 0
|
||||
|
||||
// Typedefs:
|
||||
|
||||
typedef enum {
|
||||
@@ -20,6 +24,7 @@
|
||||
|
||||
extern uint8_t IconsAndLayerTextsBrightness;
|
||||
extern uint8_t AlphanumericSegmentsBrightness;
|
||||
extern char LedDisplay_DebugString[];
|
||||
|
||||
// Functions:
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "key_scanner.h"
|
||||
#include "usb_commands/usb_command_apply_config.h"
|
||||
#include "peripherals/reset_button.h"
|
||||
#include "config_parser/config_globals.h"
|
||||
#include "usb_report_updater.h"
|
||||
|
||||
static bool IsEepromInitialized = false;
|
||||
@@ -21,6 +22,10 @@ static void userConfigurationReadFinished(void)
|
||||
|
||||
static void hardwareConfigurationReadFinished(void)
|
||||
{
|
||||
if (IsFactoryResetModeEnabled) {
|
||||
HardwareConfig->signatureLength = HARDWARE_CONFIG_SIGNATURE_LENGTH;
|
||||
strncpy(HardwareConfig->signature, "FTY", HARDWARE_CONFIG_SIGNATURE_LENGTH);
|
||||
}
|
||||
EEPROM_LaunchTransfer(EepromOperation_Read, ConfigBufferId_StagingUserConfig, userConfigurationReadFinished);
|
||||
}
|
||||
|
||||
@@ -29,9 +34,9 @@ int main(void)
|
||||
InitClock();
|
||||
InitPeripherals();
|
||||
|
||||
if (!RESET_BUTTON_IS_PRESSED) {
|
||||
EEPROM_LaunchTransfer(EepromOperation_Read, ConfigBufferId_HardwareConfig, hardwareConfigurationReadFinished);
|
||||
}
|
||||
IsFactoryResetModeEnabled = RESET_BUTTON_IS_PRESSED;
|
||||
|
||||
EEPROM_LaunchTransfer(EepromOperation_Read, ConfigBufferId_HardwareConfig, hardwareConfigurationReadFinished);
|
||||
|
||||
if (IsBusPalOn) {
|
||||
init_hardware();
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#include "fsl_port.h"
|
||||
#include "bootloader/wormhole.h"
|
||||
|
||||
bool IsFactoryResetModeEnabled = false;
|
||||
|
||||
void RESET_BUTTON_IRQ_HANDLER(void)
|
||||
{
|
||||
Wormhole.magicNumber = WORMHOLE_MAGIC_NUMBER;
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
|
||||
#define RESET_BUTTON_IS_PRESSED !GPIO_ReadPinInput(RESET_BUTTON_GPIO, RESET_BUTTON_PIN)
|
||||
|
||||
// Variables:
|
||||
|
||||
extern bool IsFactoryResetModeEnabled;
|
||||
|
||||
// Functions:
|
||||
|
||||
void InitResetButton(void);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "usb_commands/usb_command_apply_config.h"
|
||||
#include "config_parser/config_globals.h"
|
||||
#include "config_parser/parse_config.h"
|
||||
#include "peripherals/reset_button.h"
|
||||
#include "usb_protocol_handler.h"
|
||||
#include "keymap.h"
|
||||
|
||||
@@ -35,6 +36,10 @@ void UsbCommand_ApplyConfig(void)
|
||||
ValidatedUserConfigBuffer.buffer = StagingUserConfigBuffer.buffer;
|
||||
StagingUserConfigBuffer.buffer = temp;
|
||||
|
||||
if (IsFactoryResetModeEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
ParserRunDry = false;
|
||||
ValidatedUserConfigBuffer.offset = 0;
|
||||
parseConfigStatus = ParseConfig(&ValidatedUserConfigBuffer);
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
"commander": "^2.11.0",
|
||||
"shelljs": "^0.7.8"
|
||||
},
|
||||
"firmwareVersion": "8.2.3",
|
||||
"deviceProtocolVersion": "4.3.0",
|
||||
"firmwareVersion": "8.2.4",
|
||||
"deviceProtocolVersion": "4.3.1",
|
||||
"moduleProtocolVersion": "4.0.0",
|
||||
"userConfigVersion": "4.0.0",
|
||||
"userConfigVersion": "4.0.1",
|
||||
"hardwareConfigVersion": "1.0.0",
|
||||
"devices": [
|
||||
{
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
|
||||
#define FIRMWARE_MAJOR_VERSION 8
|
||||
#define FIRMWARE_MINOR_VERSION 2
|
||||
#define FIRMWARE_PATCH_VERSION 3
|
||||
#define FIRMWARE_PATCH_VERSION 4
|
||||
|
||||
#define DEVICE_PROTOCOL_MAJOR_VERSION 4
|
||||
#define DEVICE_PROTOCOL_MINOR_VERSION 3
|
||||
#define DEVICE_PROTOCOL_PATCH_VERSION 0
|
||||
#define DEVICE_PROTOCOL_PATCH_VERSION 1
|
||||
|
||||
#define MODULE_PROTOCOL_MAJOR_VERSION 4
|
||||
#define MODULE_PROTOCOL_MINOR_VERSION 0
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#define USER_CONFIG_MAJOR_VERSION 4
|
||||
#define USER_CONFIG_MINOR_VERSION 0
|
||||
#define USER_CONFIG_PATCH_VERSION 0
|
||||
#define USER_CONFIG_PATCH_VERSION 1
|
||||
|
||||
#define HARDWARE_CONFIG_MAJOR_VERSION 1
|
||||
#define HARDWARE_CONFIG_MINOR_VERSION 0
|
||||
|
||||
Reference in New Issue
Block a user