hi2c2 in an external .c
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-01 7:23 AM
Hello to all.
I'm coding an I2C comunication and the IDE (1.4.0) create the Private variable I2C_HandleTypeDef hi2c2; and then the function MX_I2C2_Init. Everithing ok.
I'm using an external .c file to handle the I2C communication and how can I access to the hi2c2 from my read/write functions in my .c module?
Thanks in advance, Manu.
Solved! Go to Solution.
- Labels:
-
I2C
-
STM32CubeIDE
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-01 7:51 AM
Add "extern I2C_HandleTypeDef hi2c2;" either in your .c file, or in an included header.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-01 7:51 AM
Add "extern I2C_HandleTypeDef hi2c2;" either in your .c file, or in an included header.
