Prepare intmodule bootpin

This commit is contained in:
Raphael Coeffic
2021-12-17 15:17:49 +01:00
parent 0f970c93c9
commit cd4b782cfe
3 changed files with 28 additions and 13 deletions
+8
View File
@@ -876,10 +876,18 @@ int cliSet(const char **argv)
}
if (module == 0) {
if (level) {
#if defined(INTMODULE_BOOTCMD_INVERTED)
GPIO_ResetBits(INTMODULE_BOOTCMD_GPIO, INTMODULE_BOOTCMD_GPIO_PIN);
#else
GPIO_SetBits(INTMODULE_BOOTCMD_GPIO, INTMODULE_BOOTCMD_GPIO_PIN);
#endif
serialPrint("%s: bootpin set", argv[0]);
} else {
#if defined(INTMODULE_BOOTCMD_INVERTED)
GPIO_SetBits(INTMODULE_BOOTCMD_GPIO, INTMODULE_BOOTCMD_GPIO_PIN);
#else
GPIO_ResetBits(INTMODULE_BOOTCMD_GPIO, INTMODULE_BOOTCMD_GPIO_PIN);
#endif
serialPrint("%s: bootpin reset", argv[0]);
}
}