27 #ifndef SUBSYSTEMS_SENSORS_INFRARED_I2C_H
28 #define SUBSYSTEMS_SENSORS_INFRARED_I2C_H
31 #include "generated/airframe.h"
47 #define infrared_i2cEvent() { \
48 if (irh_trans.status == I2CTransSuccess) infrared_i2c_hor_event(); \
49 if (irv_trans.status == I2CTransSuccess) infrared_i2c_ver_event(); \
52 #define infrared_i2cDownlink() DOWNLINK_SEND_DEBUG_IR_I2C(DefaultChannel, DefaultDevice, &ir_i2c.ir1, &ir_i2c.ir2, &ir_i2c.ir3)
54 #define infrared_i2c_SetConfWord(_v) { \
55 ir_i2c_conf_hor_done = false; \
56 ir_i2c_conf_ver_done = false; \
57 ir_i2c_conf_word = _v; \
60 #endif // SUBSYSTEMS_SENSORS_INFRARED_I2C_H
void infrared_i2c_update(void)
void infrared_i2c_hor_event(void)
bool ir_i2c_conf_hor_done
struct i2c_transaction irh_trans irv_trans
void infrared_i2c_ver_event(void)
void infrared_i2c_init(void)
Initialisation.
I2C transaction structure.
struct Infrared_raw ir_i2c
bool ir_i2c_conf_ver_done
bool ir_i2c_data_hor_available
bool ir_i2c_data_ver_available
Architecture independent I2C (Inter-Integrated Circuit Bus) API.