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