Change charge display off to sleep (#3153)

This commit is contained in:
Pezsma
2026-04-29 19:57:17 +02:00
committed by GitHub
parent c9f310f548
commit ab986a0378
18 changed files with 1195 additions and 826 deletions
+2 -1
View File
@@ -128,7 +128,8 @@ constexpr GPIO gpio_q_invert = gpio[GPIO0_13];
constexpr GPIO gpio_vaa_disable = gpio[GPIO4_1]; // VAA disable (P8_1)
constexpr GPIO gpio_1v2_enable = gpio[GPIO4_7]; // 1V2 enable (P8_7)
constexpr GPIO gpio_3v3aux_disable = gpio[GPIO5_15]; // 3V3 aux disable (P6_7)
constexpr GPIO gpio_vbus_enable = gpio[GPIO8_4]; // VBUS_IN_EN P8_4 ->LOW
constexpr GPIO gpio_vin_enable = gpio[GPIO8_5]; // VIN_IN_EN P8_5 ->HIGH
// PRALINE RF path control
constexpr GPIO gpio_tx_enable = gpio[GPIO3_4]; // TX enable (P6_5)
// constexpr GPIO gpio_mix_enable_n = gpio[GPIO3_2]; // Mixer enable inverted (P6_3)
+3 -1
View File
@@ -246,7 +246,9 @@ bool I2cDev_PPmod::send_poweroff_command() {
if (isLocked()) return false; // device is busy
Command cmd = Command::COMMAND_POWER_OFF;
uint8_t tmp = 0; // result of the ack. 0 = no, 1 = ok
i2c_read((uint8_t*)&cmd, 2, &tmp, 1);
if (!i2c_read((uint8_t*)&cmd, 2, &tmp, 1)) {
return false;
}
return (tmp == 1);
}
+11 -1
View File
@@ -115,7 +115,9 @@ enum Pins {
PA_1,
PA_2,
// Port 8 pins (PRALINE power control and LED4)
P8_1,
P8_1, // VAA_EN
P8_4, // VBUS_IN_EN
P8_5, // VIN_IN_EN
P8_6,
P8_7,
// Port E pins (PRALINE transceiver control)
@@ -227,6 +229,8 @@ constexpr Pin pins[]{
[PA_2] = {0xA, 2},
// Port 8 pins
[P8_1] = {8, 1},
[P8_4] = {8, 4},
[P8_5] = {8, 5},
[P8_6] = {8, 6},
[P8_7] = {8, 7},
// Port E pins (function 4 = GPIO)
@@ -333,6 +337,8 @@ enum GPIOs {
GPIO4_14,
// Power control and LED4
GPIO4_1,
GPIO8_4,
GPIO8_5,
GPIO4_6,
GPIO4_7,
// RF path control
@@ -445,6 +451,8 @@ constexpr GPIO gpio[] = {
#ifdef PRALINE
[GPIO4_14] = {pins[P9_2], 4, 14, 0}, // RFFC5072 mixer data
[GPIO4_1] = {pins[P8_1], 4, 1, 0}, // VAA disable
[GPIO8_4] = {pins[P8_4], 8, 4, 0}, // VBUS_IN_EN
[GPIO8_5] = {pins[P8_5], 8, 5, 0}, // VIN_IN_EN
[GPIO4_6] = {pins[P8_6], 4, 6, 0}, // LED4
[GPIO4_7] = {pins[P8_7], 4, 7, 0}, // 1V2 enable
[GPIO4_8] = {pins[PA_1], 4, 8, 0}, // LPF enable
@@ -462,6 +470,8 @@ constexpr GPIO gpio[] = {
// Placeholder entries for non-PRALINE builds (use P0_0 as dummy)
[GPIO4_14] = {pins[P0_0], 4, 14, 0},
[GPIO4_1] = {pins[P0_0], 4, 1, 0},
[GPIO8_4] = {pins[P0_0], 8, 4, 0},
[GPIO8_5] = {pins[P0_0], 8, 5, 0},
[GPIO4_6] = {pins[P0_0], 4, 6, 0},
[GPIO4_7] = {pins[P0_0], 4, 7, 0},
[GPIO4_8] = {pins[P0_0], 4, 8, 0},