From 5ffd6e5c437e2c18aabfbdce996f4c566685b93e Mon Sep 17 00:00:00 2001 From: Silvano Seva Date: Thu, 24 Mar 2022 19:09:00 +0100 Subject: [PATCH] Fixed compilation errors with MD-9600 and Module 17 targets --- openrtx/src/ui/ui_menu.c | 8 ++++---- platform/targets/MD-9600/platform.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openrtx/src/ui/ui_menu.c b/openrtx/src/ui/ui_menu.c index 9fa77ac5..7a093a50 100644 --- a/openrtx/src/ui/ui_menu.c +++ b/openrtx/src/ui/ui_menu.c @@ -464,15 +464,15 @@ void _ui_drawMenuBackup(ui_state_t* ui_state) // Shutdown RF stage state.rtxShutdown = true; - #ifndef PLATFORM_LINUX if(platform_getPttStatus() == 1) { platform_ledOn(GREEN); + #if !defined(PLATFORM_LINUX) && !defined(PLATFORM_MOD17) eflash_dump(); platform_terminate(); NVIC_SystemReset(); + #endif } - #endif } void _ui_drawMenuRestore(ui_state_t* ui_state) @@ -497,15 +497,15 @@ void _ui_drawMenuRestore(ui_state_t* ui_state) // Shutdown RF stage state.rtxShutdown = true; - #ifndef PLATFORM_LINUX if(platform_getPttStatus() == 1) { platform_ledOn(GREEN); + #if !defined(PLATFORM_LINUX) && !defined(PLATFORM_MOD17) eflash_restore(); platform_terminate(); NVIC_SystemReset(); + #endif } - #endif } void _ui_drawMenuInfo(ui_state_t* ui_state) diff --git a/platform/targets/MD-9600/platform.c b/platform/targets/MD-9600/platform.c index cebc9e89..5126b539 100644 --- a/platform/targets/MD-9600/platform.c +++ b/platform/targets/MD-9600/platform.c @@ -159,7 +159,7 @@ bool platform_pwrButtonStatus() */ __disable_irq(); uint32_t prevRowState = GPIOD->ODR & (1 << 4); /* Row 3 is PD4 */ - GPIOD->BSRRH = 1 << 4; /* PD4 low */ + GPIOD->BSRR = 1 << (4 + 16); /* PD4 low */ delayUs(10); uint32_t btnStatus = GPIOE->IDR & 0x01; /* Col 3 is PE0 */ GPIOD->ODR |= prevRowState; /* Restore PD4 */