Closed PetteriAimonen closed 9 months ago
Duplicate of #15
Hi @PetteriAimonen,
Thank you for having reported. Actually, this topic has been already tackled in issue #15 and we are progressively deploying the use of the const
qualifier in our drivers for all firmware. This takes some time to be done.
You can keep on tracking progress on this topic via the above-mentioned issue. Please allow me to close this one. Thank you for your comprehension.
With regards,
So that issue #15 is created in 2020, yet three years later this repository which has several releases since then still doesn't have the fix?
The initialization functions such as HAL_GPIO_Init and HAL_RCC_OscConfig do not modify the initialization structure given as argument.
The argument should be declared as
const
:Then user code can declare the struct
const
also, which will cause it to be placed in flash memory, saving RAM memory for other uses.