Move most code in system76 boards into system76/common
This commit is contained in:
committed by
Jeremy Soller
parent
185459b031
commit
42e88d03b3
@@ -23,22 +23,6 @@ void board_init(void) {
|
||||
gpio_set(&SWI_N, true);
|
||||
}
|
||||
|
||||
void board_event(void) {
|
||||
if (main_cycle == 0) {
|
||||
if (gpio_get(&ACIN_N)) {
|
||||
// Discharging (no AC adapter)
|
||||
gpio_set(&LED_BAT_CHG, false);
|
||||
gpio_set(&LED_BAT_FULL, false);
|
||||
} else if (battery_status & 0x0020) {
|
||||
// Fully charged
|
||||
// TODO: turn off charger
|
||||
gpio_set(&LED_BAT_CHG, false);
|
||||
gpio_set(&LED_BAT_FULL, true);
|
||||
} else {
|
||||
// Charging
|
||||
// TODO: detect no battery connected
|
||||
gpio_set(&LED_BAT_CHG, true);
|
||||
gpio_set(&LED_BAT_FULL, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
void board_on_ac(bool ac) { /* Fix unused variable */ ac = ac; }
|
||||
|
||||
void board_event(void) {}
|
||||
|
Reference in New Issue
Block a user