AnsweredAssumed Answered

How to properly use HandleTypeDef in librairies

Question asked by Matthieu Tanguay on Jul 2, 2017



I have a temperature sensor connected to the I2C1 bus of my board. To help me with basic configuration I use STM32 Cube to generate the base of my code. I usually then go on to write my own libraires to use at later time. It is probably not the most optimal, but helps my understanding quite a bit. Somewhere close to the top of the code there is multiple (I2C,TIM,USAT)_HandleTypeDef. How to I go around using these in other files? Do I need to redefine them in all the file I write them in or simply pass them around as arguments to functions?


Thank you in advance