Fixed compilation errors with MD-9600 and Module 17 targets

This commit is contained in:
Silvano Seva 2022-03-24 19:09:00 +01:00
parent ab3d148449
commit 5ffd6e5c43
2 changed files with 5 additions and 5 deletions

View File

@ -464,15 +464,15 @@ void _ui_drawMenuBackup(ui_state_t* ui_state)
// Shutdown RF stage // Shutdown RF stage
state.rtxShutdown = true; state.rtxShutdown = true;
#ifndef PLATFORM_LINUX
if(platform_getPttStatus() == 1) if(platform_getPttStatus() == 1)
{ {
platform_ledOn(GREEN); platform_ledOn(GREEN);
#if !defined(PLATFORM_LINUX) && !defined(PLATFORM_MOD17)
eflash_dump(); eflash_dump();
platform_terminate(); platform_terminate();
NVIC_SystemReset(); NVIC_SystemReset();
#endif
} }
#endif
} }
void _ui_drawMenuRestore(ui_state_t* ui_state) void _ui_drawMenuRestore(ui_state_t* ui_state)
@ -497,15 +497,15 @@ void _ui_drawMenuRestore(ui_state_t* ui_state)
// Shutdown RF stage // Shutdown RF stage
state.rtxShutdown = true; state.rtxShutdown = true;
#ifndef PLATFORM_LINUX
if(platform_getPttStatus() == 1) if(platform_getPttStatus() == 1)
{ {
platform_ledOn(GREEN); platform_ledOn(GREEN);
#if !defined(PLATFORM_LINUX) && !defined(PLATFORM_MOD17)
eflash_restore(); eflash_restore();
platform_terminate(); platform_terminate();
NVIC_SystemReset(); NVIC_SystemReset();
#endif
} }
#endif
} }
void _ui_drawMenuInfo(ui_state_t* ui_state) void _ui_drawMenuInfo(ui_state_t* ui_state)

View File

@ -159,7 +159,7 @@ bool platform_pwrButtonStatus()
*/ */
__disable_irq(); __disable_irq();
uint32_t prevRowState = GPIOD->ODR & (1 << 4); /* Row 3 is PD4 */ 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); delayUs(10);
uint32_t btnStatus = GPIOE->IDR & 0x01; /* Col 3 is PE0 */ uint32_t btnStatus = GPIOE->IDR & 0x01; /* Col 3 is PE0 */
GPIOD->ODR |= prevRowState; /* Restore PD4 */ GPIOD->ODR |= prevRowState; /* Restore PD4 */