mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 21:35:44 +03:00
Use cached value instead of RCC->CSR
This commit is contained in:
parent
7b762e640c
commit
d51d66f8f1
4 changed files with 6 additions and 6 deletions
|
@ -149,7 +149,7 @@ void enableGPIOPowerUsageAndNoiseReductions(void)
|
|||
|
||||
bool isMPUSoftReset(void)
|
||||
{
|
||||
if (RCC->CSR & RCC_CSR_SFTRSTF)
|
||||
if (cachedRccCsrValue & RCC_CSR_SFTRSTF)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
@ -164,7 +164,7 @@ void systemInit(void)
|
|||
// Configure NVIC preempt/priority groups
|
||||
HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITY_GROUPING);
|
||||
|
||||
// cache RCC->CSR value to use it in isMPUSoftreset() and others
|
||||
// cache RCC->CSR value to use it in isMPUSoftReset() and others
|
||||
cachedRccCsrValue = RCC->CSR;
|
||||
|
||||
/* Accounts for OP Bootloader, set the Vector Table base address as specified in .ld file */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue