firmware: Post-revert fixup

This commit is contained in:
Ondrej Jirman 2021-08-05 00:58:59 +02:00
parent 4e89074513
commit c55f0a44d5
3 changed files with 3 additions and 4 deletions

View file

@ -45,9 +45,6 @@ General ranges:
0x20: System configuration 0x20: System configuration
bit 0: disable KB scanning (1: scanning disabled, 0: scanning enabled) bit 0: disable KB scanning (1: scanning disabled, 0: scanning enabled)
bit 1: enable USB debug interface
1: enabled
0: disabled
0x21: Charger register address 0x21: Charger register address
0x22: Charger register value 0x22: Charger register value

View file

@ -1932,6 +1932,9 @@ void main(void)
if (jump_to_usb_bootloader) if (jump_to_usb_bootloader)
__asm__ ("ljmp _usb_bootloader_jump"); __asm__ ("ljmp _usb_bootloader_jump");
// get current system config
uint8_t cfg = REG_SYS(CONFIG);
// if the 20ms timer did not expire yet, check if we can // if the 20ms timer did not expire yet, check if we can
// powerdown, otherwise busyloop // powerdown, otherwise busyloop
if (!run_timed_tasks) { if (!run_timed_tasks) {

View file

@ -41,7 +41,6 @@
#define REG_SYS_CONFIG 0x20 #define REG_SYS_CONFIG 0x20
#define REG_SYS_CONFIG_SCAN_BLOCK BIT(0) #define REG_SYS_CONFIG_SCAN_BLOCK BIT(0)
#define REG_SYS_CONFIG_USB_DEBUG_EN BIT(1)
#define REG_SYS_I2CA_ADDR 0x21 #define REG_SYS_I2CA_ADDR 0x21
#define REG_SYS_I2CA_DATA 0x22 #define REG_SYS_I2CA_DATA 0x22