Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "std.h"
#include "generated/airframe.h"
#include "subsystems/sensors/infrared.h"
#include "mcu_periph/i2c.h"
Go to the source code of this file.
Macros | |
#define | infrared_i2cEvent() |
#define | infrared_i2cDownlink() DOWNLINK_SEND_DEBUG_IR_I2C(DefaultChannel, DefaultDevice, &ir_i2c.ir1, &ir_i2c.ir2, &ir_i2c.ir3) |
#define | infrared_i2c_SetConfWord(_v) |
Functions | |
void | infrared_i2c_init (void) |
Initialisation. More... | |
void | infrared_i2c_update (void) |
void | infrared_i2c_hor_event (void) |
void | infrared_i2c_ver_event (void) |
Variables | |
struct Infrared_raw | ir_i2c |
bool | ir_i2c_data_hor_available |
bool | ir_i2c_data_ver_available |
uint8_t | ir_i2c_conf_word |
bool | ir_i2c_conf_hor_done |
bool | ir_i2c_conf_ver_done |
struct i2c_transaction irh_trans | irv_trans |
#define infrared_i2c_SetConfWord | ( | _v | ) |
Definition at line 54 of file infrared_i2c.h.
#define infrared_i2cDownlink | ( | ) | DOWNLINK_SEND_DEBUG_IR_I2C(DefaultChannel, DefaultDevice, &ir_i2c.ir1, &ir_i2c.ir2, &ir_i2c.ir3) |
Definition at line 52 of file infrared_i2c.h.
#define infrared_i2cEvent | ( | ) |
Definition at line 47 of file infrared_i2c.h.
void infrared_i2c_hor_event | ( | void | ) |
Definition at line 133 of file infrared_i2c.c.
References FilterIR, i2c_receive(), i2c_transmit(), I2CTransDone, Infrared_raw::ir1, Infrared_raw::ir2, IR_HOR_I2C_ADDR, IR_HOR_I2C_SELECT_IR1, IR_HOR_I2C_SELECT_IR2, IR_HOR_OC_BIT, ir_i2c, ir_i2c_conf_hor_done, ir_i2c_conf_word, IR_I2C_CONFIGURE_HOR, ir_i2c_data_hor_available, ir_i2c_data_ver_available, ir_i2c_hor_status, IR_I2C_IDLE, IR_I2C_IR1_NEUTRAL, IR_I2C_IR1_SELECTED, IR_I2C_IR2_NEUTRAL, IR_I2C_IR2_SELECTED, IR_I2C_READ_IR1, IR_I2C_READ_IR2, IR_START_CONV, and UpdateIRValue.
void infrared_i2c_init | ( | void | ) |
Initialisation.
Definition at line 87 of file infrared_i2c.c.
References I2CTransDone, infrared_struct_init(), ir_i2c_conf_hor_done, ir_i2c_conf_ver_done, ir_i2c_conf_word, ir_i2c_data_hor_available, ir_i2c_data_ver_available, ir_i2c_hor_status, IR_I2C_IDLE, irv_trans, and i2c_transaction::status.
Referenced by infrared_init().
void infrared_i2c_update | ( | void | ) |
Definition at line 101 of file infrared_i2c.c.
References i2c_transaction::buf, i2c_receive(), i2c_transmit(), I2CTransDone, IR_HOR_I2C_ADDR, IR_HOR_OC_BIT, ir_i2c_conf_hor_done, ir_i2c_conf_ver_done, ir_i2c_conf_word, IR_I2C_CONFIGURE_HOR, ir_i2c_data_hor_available, ir_i2c_data_ver_available, ir_i2c_hor_status, IR_I2C_IDLE, IR_I2C_READ_IR1, IR_START_CONV, IR_VER_I2C_ADDR, IR_VER_OC_BIT, irv_trans, i2c_transaction::status, and ValidConfWord.
Referenced by infrared_update().
void infrared_i2c_ver_event | ( | void | ) |
Definition at line 195 of file infrared_i2c.c.
References i2c_transaction::buf, FilterIR, I2CTransDone, I2CTransRx, I2CTransTx, Infrared_raw::ir3, ir_i2c, ir_i2c_conf_ver_done, ir_i2c_conf_word, ir_i2c_data_hor_available, ir_i2c_data_ver_available, IR_I2C_TOP_NEUTRAL, irv_trans, i2c_transaction::status, i2c_transaction::type, and UpdateIRValue.
struct Infrared_raw ir_i2c |
Definition at line 48 of file infrared_i2c.c.
Referenced by infrared_i2c_hor_event(), and infrared_i2c_ver_event().
bool ir_i2c_conf_hor_done |
Definition at line 51 of file infrared_i2c.c.
Referenced by infrared_i2c_hor_event(), infrared_i2c_init(), and infrared_i2c_update().
bool ir_i2c_conf_ver_done |
Definition at line 38 of file infrared_i2c.h.
uint8_t ir_i2c_conf_word |
Definition at line 50 of file infrared_i2c.c.
Referenced by infrared_i2c_hor_event(), infrared_i2c_init(), infrared_i2c_update(), and infrared_i2c_ver_event().
bool ir_i2c_data_hor_available |
Definition at line 49 of file infrared_i2c.c.
Referenced by infrared_i2c_hor_event(), infrared_i2c_init(), infrared_i2c_update(), and infrared_i2c_ver_event().
bool ir_i2c_data_ver_available |
Definition at line 36 of file infrared_i2c.h.
struct i2c_transaction irh_trans irv_trans |
Definition at line 67 of file infrared_i2c.c.
Referenced by infrared_i2c_init(), infrared_i2c_update(), and infrared_i2c_ver_event().