58#define ITG320X_I2C_ADDRESS_1 (0x68)
59#define ITG320X_I2C_ADDRESS_2 (0x69)
63#define ITG320X_ID (0x68)
162#if MODULE_ITG320X_INT || DOXYGEN
179#if MODULE_ITG320X_INT || DOXYGEN
208#if MODULE_ITG320X_INT || DOXYGEN
Low-level GPIO peripheral driver interface definitions.
int itg320x_read(const itg320x_t *dev, itg320x_data_t *data)
Read one sample of angular rates in tenths of a degree per second.
itg320x_lpf_bw_t
Low pass filter bandwidth.
int itg320x_init_int(const itg320x_t *dev, itg320x_drdy_int_cb_t cb, void *arg)
Initialize and activate the DRDY interrupt of ITG320X sensor device.
int itg320x_power_up(itg320x_t *dev)
Power up the sensor.
int itg320x_read_temp(const itg320x_t *dev, int16_t *temp)
Read temperature in tenths of a degree Celsius.
itg320x_clk_sel_t
Clock source selection (ITG320X_REG_PWR_MGM<2:0>)
int itg320x_read_raw(const itg320x_t *dev, itg320x_raw_data_t *raw)
Read one sample of raw sensor data as 16 bit two's complements.
void(* itg320x_drdy_int_cb_t)(void *)
ITG320X data ready interrupt (DRDY) callback function type.
int itg320x_init(itg320x_t *dev, const itg320x_params_t *params)
Initialize the ITG320X sensor device.
itg320x_int_drive_t
Drive type for INT output pin (ITG320X_REG_INT_CFG<6>)
int itg320x_data_ready(const itg320x_t *dev)
Data-ready status function.
itg320x_error_codes_t
Named return values.
itg320x_int_level_t
Logic level for INT output pin (ITG320X_REG_INT_CFG<7>)
int itg320x_power_down(itg320x_t *dev)
Power down the sensor.
@ ITG320X_LPF_BW_20
20 Hz, ISR = 1 kHz
@ ITG320X_LPF_BW_98
98 Hz, ISR = 1 kHz
@ ITG320X_LPF_BW_10
10 Hz, ISR = 1 kHz
@ ITG320X_LPF_BW_42
42 Hz, ISR = 1 kHz
@ ITG320X_LPF_BW_5
5 Hz, ISR = 1 kHz (default)
@ ITG320X_LPF_BW_256
256 Hz, ISR = 8 kHz
@ ITG320X_LPF_BW_188
188 Hz, ISR = 1 kHz
@ ITG320X_CLK_PLL_19M
PLL with external 19.2 MHz reference.
@ ITG320X_CLK_PLL_Y_GYRO
PLL with X Gyro reference.
@ ITG320X_CLK_INTERNAL
Internal oscillator.
@ ITG320X_CLK_PLL_Z_GYRO
PLL with X Gyro reference.
@ ITG320X_CLK_PLL_X_GYRO
PLL with X Gyro reference (default)
@ ITG320X_CLK_PLL_32K
PLL with external 32.768 kHz reference.
@ ITG320X_INT_PUSH_PULL
INT output is of type push/pull (default)
@ ITG320X_INT_OPEN_DRAIN
INT output is of type open drain.
@ ITG320X_ERROR_I2C
I2C communication error.
@ ITG320X_ERROR_RAW_DATA
reading raw data failed
@ ITG320X_ERROR_NO_DATA
no data are available
@ ITG320X_ERROR_WRONG_ID
wrong id read
@ ITG320X_INT_LOW
INT output is active low.
@ ITG320X_INT_HIGH
INT output is active high (default)
uint_fast8_t i2c_t
Default i2c_t type definition.
Low-level I2C peripheral driver interface definition.
Angular rate values in tenths of a degree per second.
int16_t z
angular rate y-axis (yaw)
int16_t x
angular rate x-axis (roll)
int16_t y
angular rate y-axis (pitch)
ITG320X device initialization parameters.
itg320x_int_level_t int_level
Logic level for INT output pin (default ITG320X_INT_LOW)
uint8_t addr
I2C slave address (default ITG320X_I2C_ADDRESS_1)
uint8_t isr_div
Internal sample rate divider ISR_DIV (default 99) ODR = ISR / (ISR_DIV + 1) where internal sample rat...
gpio_t int_pin
DRDY interrupt pin: GPIO_UNDEF if not used.
i2c_t dev
I2C device (default I2C_DEV(0))
itg320x_int_drive_t int_drive
Drive type for INT output pin (default ITG320X_INT_PUSH_PULL.
itg320x_clk_sel_t clk_sel
Clock source selection (default ITG320X_CLK_PLL_X_GYRO)
itg320x_lpf_bw_t lpf_bw
Low pass filter bandwidth (default ITG320X_LPF_BW_5, ISR 1 kHz)
Raw data set as two complements.
int16_t x
angular rate x-axis as 16 bit two's complements (roll)
int16_t y
angular rate y-axis as 16 bit two's complements (pitch)
int16_t z
angular rate z-axis as 16 bit two's complements (yaw)
ITG320X sensor device data structure type.
itg320x_params_t params
device initialization parameters