davids5 commented on pull request #2177:
URL: https://github.com/apache/incubator-nuttx/pull/2177#issuecomment-726117194


   > @v01d thank you for the details on the matter. It was constructive 
nevertheless.
   > 
   > Do you both agree that this change is correct? Shall I proceed with the 
nxstyle fixes?
   > 
   > _(As a side note, I have still trouble understanding some of the nxstyle 
errors. Is there any guide, or any documentation on code style conventions?)_
   
   Yes it is a good solution. I may tend to not muddy the code with the ifdef 
tree. 
   
   Pulling the compile time change to the preprocessor section,.
   ```
   #if (STM32_SYSCLK_FREQUENCY <= 24000000)
   #define  FLASH_ACR_LATENCY FLASH_ACR_LATENCY_0
   #elif (STM32_SYSCLK_FREQUENCY <= 48000000)
   #define  FLASH_ACR_LATENCY FLASH_ACR_LATENCY_1
   #else
   #define  FLASH_ACR_LATENCY FLASH_ACR_LATENCY_1
   #endif
   ```
   Then the code is 
   
   ```
   regval |= (FLASH_ACR_LATENCY | FLASH_ACR_PRTFBE);
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to