raiden00pl commented on code in PR #21400: URL: https://github.com/apache/nuttx/pull/21400#discussion_r4465066616
########## arch/arm/src/stm32h7/stm32h7rsxx_rcc.c: ########## @@ -61,6 +61,47 @@ # define STM32_PWR_CSR2_SELECTION PWR_CSR2_LDOEN #endif +/* Validate CPRE and BMPRE divisors. They must + * be defined and a power of two between 1 and 512 + */ + +#if (!defined(STM32_CPRE_DIV_VAL) || (STM32_CPRE_DIV_VAL < 1) \ + || (STM32_CPRE_DIV_VAL > 512) || !IS_POWER_OF_2(STM32_CPRE_DIV_VAL)) +#error "STM32_CPRE_DIV_VAL is not defined or illegal" +#endif Review Comment: ```suggestion # error "STM32_CPRE_DIV_VAL is not defined or illegal" #endif ``` ########## arch/arm/src/stm32h7/stm32h7rsxx_rcc.c: ########## @@ -61,6 +61,47 @@ # define STM32_PWR_CSR2_SELECTION PWR_CSR2_LDOEN #endif +/* Validate CPRE and BMPRE divisors. They must + * be defined and a power of two between 1 and 512 + */ + +#if (!defined(STM32_CPRE_DIV_VAL) || (STM32_CPRE_DIV_VAL < 1) \ + || (STM32_CPRE_DIV_VAL > 512) || !IS_POWER_OF_2(STM32_CPRE_DIV_VAL)) +#error "STM32_CPRE_DIV_VAL is not defined or illegal" +#endif Review Comment: ```suggestion # error "STM32_CPRE_DIV_VAL is not defined or illegal" #endif ``` and in other palces -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
