MAGIC value for powerReason should be stored in RTC backup on Horus (#7096)
- Allows the radio main application to start correctly when coming from an app in RAM - Refactoring of the `UNEXPECTED_SHUTDOWN()` process - Saves the RTC battery as BACKUP RAM is not needed on normal shutdown - On PWR OFF on an ALERT, the radio won't show the next alert before shutting down - Bootloader flashable through the SD Manager
This commit is contained in:
@@ -51,6 +51,7 @@ DMA_TypeDef dma2;
|
||||
USART_TypeDef Usart0, Usart1, Usart2, Usart3, Usart4;
|
||||
SysTick_Type systick;
|
||||
ADC_Common_TypeDef adc;
|
||||
RTC_TypeDef rtc;
|
||||
#else
|
||||
Pio Pioa, Piob, Pioc;
|
||||
Pmc pmc;
|
||||
@@ -672,7 +673,7 @@ void lockFlash()
|
||||
{
|
||||
}
|
||||
|
||||
void flashWrite(uint32_t *address, uint32_t *buffer)
|
||||
void flashWrite(uint32_t *address, const uint32_t *buffer)
|
||||
{
|
||||
simuSleep(100);
|
||||
}
|
||||
|
||||
@@ -86,6 +86,7 @@ extern DMA_Stream_TypeDef dma1_stream0, dma1_stream1, dma1_stream2, dma1_stream3
|
||||
extern DMA_TypeDef dma2;
|
||||
extern SysTick_Type systick;
|
||||
extern ADC_Common_TypeDef adc;
|
||||
extern RTC_TypeDef rtc;
|
||||
#undef SysTick
|
||||
#define SysTick (&systick)
|
||||
#undef GPIOA
|
||||
@@ -166,6 +167,8 @@ extern ADC_Common_TypeDef adc;
|
||||
#define DMA2 (&dma2)
|
||||
#undef ADC
|
||||
#define ADC (&adc)
|
||||
#undef RTC
|
||||
#define RTC (&rtc)
|
||||
#elif defined(PCBSKY9X)
|
||||
extern Pmc pmc;
|
||||
#undef PMC
|
||||
|
||||
Reference in New Issue
Block a user