1
0
Fork 0
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:
jflyper 2017-06-20 09:45:46 +09:00
parent 7b762e640c
commit d51d66f8f1
4 changed files with 6 additions and 6 deletions

View file

@ -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 */