Paparazzi UAS
v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
|
#include "std.h"
#include "modules/com/generic_com.h"
#include "mcu_periph/i2c.h"
#include "state.h"
#include "subsystems/gps.h"
#include "subsystems/electrical.h"
#include "generated/airframe.h"
#include "inter_mcu.h"
#include "autopilot.h"
#include "subsystems/navigation/common_nav.h"
Go to the source code of this file.
Macros | |
#define | NB_DATA 24 |
#define | GENERIC_COM_I2C_DEV i2c0 |
#define | GENERIC_COM_SLAVE_ADDR 0x26 |
#define | FillBufWith32bit(_buf, _index, _value) |
#define | FillBufWith16bit(_buf, _index, _value) |
Functions | |
void | generic_com_init (void) |
void | generic_com_periodic (void) |
void | generic_com_event (void) |
void | start_com (void) |
void | stop_com (void) |
Variables | |
struct i2c_transaction | com_trans |
bool | active_com |
#define FillBufWith16bit | ( | _buf, | |
_index, | |||
_value | |||
) |
Definition at line 65 of file generic_com.c.
Referenced by generic_com_periodic().
#define FillBufWith32bit | ( | _buf, | |
_index, | |||
_value | |||
) |
Definition at line 58 of file generic_com.c.
Referenced by generic_com_periodic().
#define GENERIC_COM_I2C_DEV i2c0 |
Definition at line 41 of file generic_com.c.
Referenced by generic_com_periodic(), and stop_com().
#define GENERIC_COM_SLAVE_ADDR 0x26 |
Definition at line 45 of file generic_com.c.
Referenced by generic_com_periodic(), and stop_com().
#define NB_DATA 24 |
Definition at line 38 of file generic_com.c.
Referenced by generic_com_periodic(), MPPT_ask(), MPPT_init(), and MPPT_periodic().
void generic_com_event | ( | void | ) |
Definition at line 92 of file generic_com.c.
References com_trans, I2CTransDone, I2CTransFailed, I2CTransSuccess, and i2c_transaction::status.
void generic_com_init | ( | void | ) |
Definition at line 52 of file generic_com.c.
References active_com, com_trans, I2CTransDone, and i2c_transaction::status.
void generic_com_periodic | ( | void | ) |
Definition at line 70 of file generic_com.c.
References active_com, LlaCoor_i::alt, autopilot, autopilot_get_mode(), i2c_transaction::buf, com_trans, GpsState::course, electrical, energy, FillBufWith16bit, FillBufWith32bit, pprz_autopilot::flight_time, GENERIC_COM_I2C_DEV, GENERIC_COM_SLAVE_ADDR, gps, GpsState::gspeed, i2c_transmit(), I2CTransDone, LlaCoor_i::lat, GpsState::lla_pos, LlaCoor_i::lon, MAX_PPRZ, nav_block, NB_DATA, stateGetAirspeed_f(), i2c_transaction::status, and Electrical::vsupply.
void start_com | ( | void | ) |
Definition at line 100 of file generic_com.c.
References active_com, com_trans, I2CTransDone, and i2c_transaction::status.
void stop_com | ( | void | ) |
Definition at line 106 of file generic_com.c.
References active_com, i2c_transaction::buf, com_trans, GENERIC_COM_I2C_DEV, GENERIC_COM_SLAVE_ADDR, and i2c_transmit().
bool active_com |
Definition at line 50 of file generic_com.c.
Referenced by generic_com_init(), generic_com_periodic(), start_com(), and stop_com().
struct i2c_transaction com_trans |
Definition at line 48 of file generic_com.c.
Referenced by generic_com_event(), generic_com_init(), generic_com_periodic(), start_com(), and stop_com().