|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
124 #define Int16FromBuf(_buf,_idx) ((int16_t)((_buf[_idx]<<8) | _buf[_idx+1]))
uint8_t smplrt_div
Sample rate divider.
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
void itg3200_start_configure(struct Itg3200 *itg)
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
struct Itg3200Config config
uint8_t fs_sel
Full scale range.
uint16_t len_r
Number of bytes to read/receive.
static void itg3200_i2c_tx_reg(struct Itg3200 *itg, uint8_t reg, uint8_t val)
#define ITG3200_DEFAULT_FS_SEL
Default full scale range +- 2000°/s.
void itg3200_init(struct Itg3200 *itg, struct i2c_periph *i2c_p, uint8_t addr)
Initialize Itg3200 struct and set default config options.
#define ITG3200_REG_SMPLRT_DIV
bool initialized
config done flag
@ I2CTransTx
transmit only transaction
uint8_t int_cfg
Interrupt config.
@ I2CTransFailed
transaction failed
#define ITG3200_DEFAULT_DLPF_CFG
Default internal sampling (1kHz, 42Hz LP Bandwidth)
uint8_t len_w
Number of bytes to write/transmit.
@ I2CTransSuccess
transaction successfully finished by I2C driver
enum Itg3200ConfStatus init_status
init status
#define ITG3200_DEFAULT_INT_CFG
Default interrupt config: RAW_RDY_EN.
struct i2c_periph * i2c_p
#define Int16FromBuf(_buf, _idx)
#define ITG3200_DEFAULT_SMPLRT_DIV
Default sample rate divider.
struct i2c_transaction i2c_trans
#define ITG3200_DEFAULT_CLK_SEL
Default clock: PLL with X gyro reference.
#define ITG3200_REG_PWR_MGM
enum Itg3200DLPF dlpf_cfg
Digital Low Pass Filter.
enum I2CTransactionStatus status
Transaction status.
#define ITG3200_REG_INT_CFG
@ I2CTransTxRx
transmit and receive transaction
uint8_t slave_addr
Slave address.
uint8_t clk_sel
Clock select.
#define ITG3200_REG_INT_STATUS
@ I2CTransDone
transaction set to done by user level
static bool i2c_submit(struct i2c_periph *p, struct i2c_transaction *t)
Submit a I2C transaction.
enum I2CTransactionType type
Transaction type.
volatile bool data_available
data ready flag
void itg3200_set_default_config(struct Itg3200Config *c)
void itg3200_read(struct Itg3200 *itg)
#define ITG3200_REG_DLPF_FS
void itg3200_event(struct Itg3200 *itg)
static void itg3200_send_config(struct Itg3200 *itg)