mirror of
https://xff.cz/git/pinephone-keyboard
synced 2024-12-21 20:38:48 -05:00
Make i2c flasger reset the app block flag
This commit is contained in:
parent
574d68aa89
commit
bf0c0e9c97
@ -410,7 +410,7 @@ int main(int ac, char* av[])
|
|||||||
if (i == 10)
|
if (i == 10)
|
||||||
error("Reset command issued over I2C failed, stock firmware failed to report itself within 2.5s");
|
error("Reset command issued over I2C failed, stock firmware failed to report itself within 2.5s");
|
||||||
} else if (!strcmp(entry_type, "manual")) {
|
} else if (!strcmp(entry_type, "manual")) {
|
||||||
printf("Please power off the keyboard by holding the keyboard power key for > 12s, then release the power key and press it shortly, once, to power it on again.\n");
|
printf("Please power cycle the keyboard by removing and reinserting the pinephone.\n");
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
if (is_kb_stock_connected()) {
|
if (is_kb_stock_connected()) {
|
||||||
@ -488,6 +488,9 @@ int main(int ac, char* av[])
|
|||||||
} else if (!strcmp(av[i], "reset")) {
|
} else if (!strcmp(av[i], "reset")) {
|
||||||
printf("Restarting the MCU\n");
|
printf("Restarting the MCU\n");
|
||||||
|
|
||||||
|
uint8_t cmd1[] = {0};
|
||||||
|
wr_buf(REG_SYS_USER_APP_BLOCK, cmd1, sizeof cmd1);
|
||||||
|
|
||||||
// send MCU reset command
|
// send MCU reset command
|
||||||
uint8_t cmd[] = {REG_SYS_COMMAND_MCU_RESET};
|
uint8_t cmd[] = {REG_SYS_COMMAND_MCU_RESET};
|
||||||
wr_buf(REG_SYS_COMMAND, cmd, sizeof cmd);
|
wr_buf(REG_SYS_COMMAND, cmd, sizeof cmd);
|
||||||
|
Loading…
Reference in New Issue
Block a user