1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 06:15:16 +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

@ -152,7 +152,7 @@ void enableGPIOPowerUsageAndNoiseReductions(void)
bool isMPUSoftReset(void)
{
if (RCC->CSR & RCC_CSR_SFTRSTF)
if (cachedRccCsrValue & RCC_CSR_SFTRSTF)
return true;
else
return false;
@ -167,7 +167,7 @@ void systemInit(void)
// Configure NVIC preempt/priority groups
NVIC_PriorityGroupConfig(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 */