darrylring opened a new pull request, #19918:
URL: https://github.com/apache/nuttx/pull/19918

   ## Summary
   
   The C preprocessor is used to check SPI frequency and clock source for each 
SPI peripheral. SPI1-3 and 5-6 were checked correctly, but SPI4 was not. 
Instead, SPI1 was checked a second time.
   
   ## Impact
   
   SPI4 macros will be checked correctly, and duplicate errors for missing SPI1 
values will not be shown.
   
   ## Testing
   
   Before, with SPI1, SPI4, and SPI5 enabled, but no clock selection macros:
   
   ```
   .../nuttx/arch/arm/src/stm32h5/stm32_spi.c:188:6: error: #error Must define 
STM32_RCC_CCIPR3_SPI1SEL in board.h
     188 | #    error Must define STM32_RCC_CCIPR3_SPI1SEL in board.h
         |      ^~~~~
   .../nuttx/arch/arm/src/stm32h5/stm32_spi.c:227:6: error: #error Must define 
STM32_RCC_CCIPR3_SPI1SEL in board.h
     227 | #    error Must define STM32_RCC_CCIPR3_SPI1SEL in board.h
         |      ^~~~~
   .../nuttx/arch/arm/src/stm32h5/stm32_spi.c:240:6: error: #error Must define 
STM32_RCC_CCIPR3_SPI5SEL in board.h
     240 | #    error Must define STM32_RCC_CCIPR3_SPI5SEL in board.h
         |      ^~~~~
   
   ```
   
   After:
   
   ```
   .../nuttx/arch/arm/src/stm32h5/stm32_spi.c:188:6: error: #error Must define 
STM32_RCC_CCIPR3_SPI1SEL in board.h
     188 | #    error Must define STM32_RCC_CCIPR3_SPI1SEL in board.h
         |      ^~~~~
   .../nuttx/arch/arm/src/stm32h5/stm32_spi.c:227:6: error: #error Must define 
STM32_RCC_CCIPR3_SPI4SEL in board.h
     227 | #    error Must define STM32_RCC_CCIPR3_SPI4SEL in board.h
         |      ^~~~~
   .../nuttx/arch/arm/src/stm32h5/stm32_spi.c:240:6: error: #error Must define 
STM32_RCC_CCIPR3_SPI5SEL in board.h
     240 | #    error Must define STM32_RCC_CCIPR3_SPI5SEL in board.h
   ```


-- 
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]

Reply via email to