BMI160 and stm32 programming. Need main file example

Im trying to communicate with bmi160 sensor magnetometer with stm32f401 mcu. I found on bosch github the api library for this sensor but I dont understand how its works and how to correctly initialiaze to main.c file. For stm32 I got set a i2c communication with HAL_library, but I dont understand how and where I need to put a code for activating for example HAL_I2C_Master_Transmit(). Have anyone a main.c file example for ARM microcontrollers of these sensor?

2 replies