Is there a way to provide context pointer to HAL callback functions
I'm new to ST and am evaluating if the STM32G0 family is a good fit for us. The idea of using the HAL driver interface is appealing as it would allow migration to other chips in the larger STM32 family without code changes.
I'm working on making a little I2C client example using the interrupt interface. In other vendor drivers for this sort of stuff, you can often supply a context pointer to these callbacks to inject user data without the need for hard coding access to global scoped symbols. Am I just missing how to do this with the HAL, or are global symbols the only way? If it is, it will make writing abstrated and testable code a lot more boilerplaty and challenging.
