1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 21:35:44 +03:00

Refactor / rename PERSISTENT_OBJECT_BOOTLOADER_REQUEST to PERSISTENT_OBJECT_RESET_REASON

This commit is contained in:
jflyper 2019-02-04 17:54:02 +09:00
parent af84f9e99d
commit 85cd4df2ea
6 changed files with 24 additions and 20 deletions

View file

@ -45,7 +45,7 @@ void systemReset(void)
void systemResetToBootloader(void)
{
persistentObjectWrite(PERSISTENT_OBJECT_BOOTMODE_REQUEST, BOOTLOADER_REQUEST_COOKIE);
persistentObjectWrite(PERSISTENT_OBJECT_RESET_REASON, RESET_BOOTLOADER_REQUEST);
__disable_irq();
NVIC_SystemReset();
}
@ -191,12 +191,12 @@ void(*bootJump)(void);
void checkForBootLoaderRequest(void)
{
uint32_t bootloaderRequest = persistentObjectRead(PERSISTENT_OBJECT_BOOTMODE_REQUEST);
uint32_t bootloaderRequest = persistentObjectRead(PERSISTENT_OBJECT_RESET_REASON);
if (bootloaderRequest != BOOTLOADER_REQUEST_COOKIE) {
if (bootloaderRequest != RESET_BOOTLOADER_REQUEST) {
return;
}
persistentObjectWrite(PERSISTENT_OBJECT_BOOTMODE_REQUEST, 0);
persistentObjectWrite(PERSISTENT_OBJECT_RESET_REASON, RESET_NONE);
void (*SysMemBootJump)(void);