Browse Source

firmware: Post-revert fixup

master
Ondrej Jirman 1 year ago
parent
commit
c55f0a44d5
  1. 3
      README.i2c-intf
  2. 3
      firmware/main.c
  3. 1
      firmware/registers.h

3
README.i2c-intf

@ -45,9 +45,6 @@ General ranges: @@ -45,9 +45,6 @@ General ranges:
0x20: System configuration
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
0x22: Charger register value

3
firmware/main.c

@ -1932,6 +1932,9 @@ void main(void) @@ -1932,6 +1932,9 @@ void main(void)
if (jump_to_usb_bootloader)
__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
// powerdown, otherwise busyloop
if (!run_timed_tasks) {

1
firmware/registers.h

@ -41,7 +41,6 @@ @@ -41,7 +41,6 @@
#define REG_SYS_CONFIG 0x20
#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_DATA 0x22

Loading…
Cancel
Save