|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
112 #define Int16FromBuf(_buf,_idx) ((int16_t)((_buf[_idx+1]<<8) | _buf[_idx]))
VIC slots used for the LPC2148 define name e g gps UART1_VIC_SLOT e g modem SPI1_VIC_SLOT SPI1 in mcu_periph spi_arch c or spi_slave_hs_arch c(and some others not using the SPI peripheral yet..) I2C0_VIC_SLOT 8 mcu_periph/i2c_arch.c I2C1_VIC_SLOT 9 mcu_periph/i2c_arch.c USB_VIC_SLOT 10 usb
#define L3G4200_DEFAULT_CTRL_REG1
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
#define L3G4200_REG_STATUS_REG
@ I2CTransFailed
transaction failed
#define L3G4200_REG_CTRL_REG5
#define L3G4200_REG_CTRL_REG1
struct L3g4200Config config
#define L3G4200_REG_CTRL_REG4
#define Int16FromBuf(_buf, _idx)
@ I2CTransSuccess
transaction successfully finished by I2C driver
bool i2c_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction.
bool initialized
config done flag
void l3g4200_read(struct L3g4200 *l3g)
void l3g4200_init(struct L3g4200 *l3g, struct i2c_periph *i2c_p, uint8_t addr)
Initialize L3g4200 struct and set default config options.
static void l3g4200_send_config(struct L3g4200 *l3g)
#define L3G4200_DEFAULT_CTRL_REG5
bool i2c_transceive(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len_w, uint16_t len_r)
Submit a write/read transaction.
static void l3g4200_i2c_tx_reg(struct L3g4200 *l3g, uint8_t reg, uint8_t val)
enum I2CTransactionStatus status
Transaction status.
uint8_t slave_addr
Slave address.
enum L3g4200ConfStatus init_status
init status
#define L3G4200_DEFAULT_CTRL_REG4
void l3g4200_start_configure(struct L3g4200 *l3g)
volatile bool data_available
data ready flag
@ I2CTransDone
transaction set to done by user level
struct i2c_transaction i2c_trans
struct i2c_periph * i2c_p
void l3g4200_set_default_config(struct L3g4200Config *c)
void l3g4200_event(struct L3g4200 *l3g)