33#include "generated/airframe.h"
40#ifndef GENERIC_COM_I2C_DEV
41#define GENERIC_COM_I2C_DEV i2c0
44#ifndef GENERIC_COM_SLAVE_ADDR
45#define GENERIC_COM_SLAVE_ADDR 0x26
58#define FillBufWith32bit(_buf, _index, _value) { \
59 _buf[_index] = (uint8_t) (_value); \
60 _buf[_index+1] = (uint8_t) ((_value) >> 8); \
61 _buf[_index+2] = (uint8_t) ((_value) >> 16); \
62 _buf[_index+3] = (uint8_t) ((_value) >> 24); \
65#define FillBufWith16bit(_buf, _index, _value) { \
66 _buf[_index] = (uint8_t) (_value); \
67 _buf[_index+1] = (uint8_t) ((_value) >> 8); \
uint8_t autopilot_get_mode(void)
get autopilot mode
struct pprz_autopilot autopilot
Global autopilot structure.
Core autopilot interface common to all firmwares.
uint16_t charge[CHARGE_NB]
Hardware independent code for commands handling.
struct Electrical electrical
Interface for electrical status: supply voltage, current, battery status, etc.
#define GENERIC_COM_I2C_DEV
#define FillBufWith16bit(_buf, _index, _value)
void generic_com_init(void)
#define FillBufWith32bit(_buf, _index, _value)
void generic_com_periodic(void)
void generic_com_event(void)
struct i2c_transaction com_trans
#define GENERIC_COM_SLAVE_ADDR
struct GpsState gps
global GPS state
Device independent GPS code (interface).
bool i2c_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction.
@ I2CTransSuccess
transaction successfully finished by I2C driver
@ I2CTransFailed
transaction failed
@ I2CTransDone
transaction set to done by user level
I2C transaction structure.
static float stateGetAirspeed_f(void)
Get airspeed (float).
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
API to get/set the generic vehicle states.
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.