STMicroelectronics / STM32CubeH7

STM32Cube MCU Full Package for the STM32H7 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits))
https://www.st.com/en/embedded-software/stm32cubeh7.html
Other
490 stars 302 forks source link

const-qualify buffers for CRC calculation #218

Closed escherstair closed 2 years ago

escherstair commented 2 years ago

One of the best practise in C language is "const-qualify everything". This brings to more expressive code and gives the compiler more information to optimize the code.

I suggest to const-qualify the buffers used as input for CRC calculation. I mean pBuffer both in the declaration https://github.com/STMicroelectronics/STM32CubeH7/blob/b340b13929e36a3427b8d94e8b1006022f82273f/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_crc.h#L311-L312 and in the definition https://github.com/STMicroelectronics/STM32CubeH7/blob/b340b13929e36a3427b8d94e8b1006022f82273f/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_crc.c#L287 https://github.com/STMicroelectronics/STM32CubeH7/blob/b340b13929e36a3427b8d94e8b1006022f82273f/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_crc.c#L339

ASELSTM commented 2 years ago

Hi @escherstair,

Thank you for your report. This same issue has also been previously reported by other users (link). This is one of the main points in the tasks queue of our development teams.

A global update of the HAL and LL drivers is planned. However, this is likely to require some time to be fully deployed on all IPs and all series. The fix implementation and publication is done progressively. We count on your patience and comprehension.

In order to centralize the issues please allow me to close this one as it is a duplicate of the initial one previously reported . Thank you for your comprehension.

With regards,