HAL2 User Data pointers tp *non* const
This is a feature request.
In HAL2, we can configure an STM32CubeMX2 project to use User Data pointers (pointers managed only by the application, not the HAL2 library). E.g. setting USE_HAL_UART_USER_DATA to 1 will add the field `const void *p_user_data;` to hal_uart_handle_t.
This pointer can be added to other handles: timers, SPI, I2C, FLASH, …
I would the pointer to be a pointer-to-mutable, or in other words to remove the “const” from p_user_data.
If this is not possible/wanted by ST, please let me know why it was designed like this. I am personally using this pointer to keep track of the amount of successful read/write and errors for UART communication, so it points to a custom-defined structure that is non-const.
