This commit is contained in:
Jeremy Soller 2020-02-12 14:36:56 -07:00
parent 2a4255ce15
commit b830386e80
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1

View File

@ -8,6 +8,8 @@
extern uint8_t sci_extra;
uint8_t ecos = 0;
static uint8_t fcmd = 0;
static uint8_t fdat = 0;
static uint8_t fbuf[4] = { 0, 0, 0, 0 };
@ -81,6 +83,8 @@ uint8_t acpi_read(uint8_t addr) {
ACPI_16(0x2E, battery_remaining_capacity);
ACPI_16(0x32, battery_voltage);
ACPI_8(0x68, ecos);
ACPI_8(0xCC, sci_extra);
// Set size of flash (from old firmware)
@ -108,6 +112,10 @@ void acpi_write(uint8_t addr, uint8_t data) {
lid_wake = (bool)(data & (1 << 2));
break;
case 0x68:
ecos = data;
break;
case 0xF8:
fcmd = data;
fcommand();