COMPILE FIXES: 1. battery.c: Added #include <stdbool.h> for bool type 2. main.c: Updated buzzer_play() to buzzer_play_melody(MELODY_STARTUP) 3. main.c: Replaced bno055_active with bno055_is_ready() calls 4. servo.c: Removed duplicate ServoState typedef from .c file 5. ultrasonic.c: Added forward declaration for HAL_TIM_IC_Init_Compat 6. fan.c: Fixed HAL_TIM_PWM_Start to use handle &htim1 instead of register 7. watchdog.c: Created static IWDG_HandleTypeDef and updated refresh call LINKER FIXES: 1. i2c1.h/c: Added i2c1_write() and i2c1_read() function implementations 2. servo.c: servo_tick() already exists (verified) 3. bno055.h/c: Added bno055_calibrated() function 4. main.c: Added imu_calibrated() wrapper for bno055_calibrated() 5. crsf.h/c: Added crsf_is_active() function All 11 errors fixed. Build should now succeed. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
21 lines
492 B
C
21 lines
492 B
C
#ifndef I2C1_H
|
|
#define I2C1_H
|
|
|
|
#include "stm32f7xx_hal.h"
|
|
|
|
/*
|
|
* Shared I2C1 bus handle — used by baro (BMP280/DPS310) and mag
|
|
* (QMC5883L/HMC5883L/IST8310) drivers.
|
|
*
|
|
* Call i2c1_init() once in main() before any I2C probes.
|
|
* PB8 = SCL, PB9 = SDA (AF4_I2C1, open-drain, 100 kHz).
|
|
*/
|
|
extern I2C_HandleTypeDef hi2c1;
|
|
|
|
int i2c1_init(void);
|
|
|
|
#endif /* I2C1_H */
|
|
|
|
int i2c1_write(uint16_t addr, const uint8_t *data, uint16_t len);
|
|
int i2c1_read(uint16_t addr, uint8_t *data, uint16_t len);
|