38 #define INVENSENSE3_FIFO_BUFFER_LEN 22
39 #define INVENSENSE3_BUFFER_SIZE INVENSENSE3_FIFO_BUFFER_LEN * 20 + 3
I2C transaction structure.
SPI peripheral structure.
SPI transaction structure.
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
enum invensense3_gyro_range_t gyro_range
Gyro range configuration.
invensense3_accel_range_t
@ INVENSENSE3_ACCEL_RANGE_16G
@ INVENSENSE3_ACCEL_RANGE_4G
@ INVENSENSE3_ACCEL_RANGE_32G
Only possible for ICM40609.
@ INVENSENSE3_ACCEL_RANGE_2G
@ INVENSENSE3_ACCEL_RANGE_8G
void invensense3_periodic(struct invensense3_t *inv)
Should be called periodically to request sensor readings.
uint8_t register_bank
The current register bank communicating with.
enum invensense3_status_t status
Status of the invensense v3 device.
@ INVENSENSE3_GYRO_ODR_4KHZ
@ INVENSENSE3_GYRO_ODR_25HZ
@ INVENSENSE3_GYRO_ODR_500HZ
@ INVENSENSE3_GYRO_ODR_8KHZ
@ INVENSENSE3_GYRO_ODR_1_5625HZ
@ INVENSENSE3_GYRO_ODR_100HZ
@ INVENSENSE3_GYRO_ODR_2KHZ
@ INVENSENSE3_GYRO_ODR_50HZ
@ INVENSENSE3_GYRO_ODR_1KHZ
@ INVENSENSE3_GYRO_ODR_16KHZ
Not possible for ICM40605 and ICM42605.
@ INVENSENSE3_GYRO_ODR_32KHZ
Not possible for ICM40605 and ICM42605.
@ INVENSENSE3_GYRO_ODR_3_125HZ
@ INVENSENSE3_GYRO_ODR_6_25HZ
@ INVENSENSE3_GYRO_ODR_200HZ
@ INVENSENSE3_GYRO_ODR_12_5HZ
struct i2c_periph * p
Peripheral device for communication.
uint8_t tx_buf[2]
Transmit buffer.
enum invensense3_parser_t parser
Parser of the device.
void invensense3_event(struct invensense3_t *inv)
Should be called in the event thread.
uint16_t accel_aaf
Accelerometer Anti-alias filter 3dB Bandwidth configuration [Hz].
uint8_t slave_idx
Slave index used for Slave Select.
struct spi_transaction trans
Transaction used during configuration and measurements.
@ INVENSENSE3_PARSER_FIFO
@ INVENSENSE3_PARSER_REGISTERS
uint32_t timer
Used to time operations during configuration (samples left during measuring)
enum invensense3_accel_odr_t accel_odr
Accelerometer Output Data Rate configuration.
struct spi_periph * p
Peripheral device for communication.
@ INVENSENSE3_ACCEL_ODR_4KHZ
@ INVENSENSE3_ACCEL_ODR_16KHZ
Not possible for ICM40605 and ICM42605.
@ INVENSENSE3_ACCEL_ODR_50HZ
@ INVENSENSE3_ACCEL_ODR_32KHZ
Not possible for ICM40605 and ICM42605.
@ INVENSENSE3_ACCEL_ODR_2KHZ
@ INVENSENSE3_ACCEL_ODR_25HZ
@ INVENSENSE3_ACCEL_ODR_1_5625HZ
@ INVENSENSE3_ACCEL_ODR_8KHZ
@ INVENSENSE3_ACCEL_ODR_6_25HZ
@ INVENSENSE3_ACCEL_ODR_200HZ
@ INVENSENSE3_ACCEL_ODR_100HZ
@ INVENSENSE3_ACCEL_ODR_1KHZ
@ INVENSENSE3_ACCEL_ODR_500HZ
@ INVENSENSE3_ACCEL_ODR_12_5HZ
@ INVENSENSE3_ACCEL_ODR_3_125HZ
enum invensense3_bus_t bus
The communication bus used to connect the device SPI/I2C.
uint8_t config_idx
The current configuration index.
struct i2c_transaction trans
TRansaction used during configuration and measurements.
#define INVENSENSE3_BUFFER_SIZE
@ INVENSENSE3_GYRO_RANGE_62_5DPS
@ INVENSENSE3_GYRO_RANGE_31_25DPS
@ INVENSENSE3_GYRO_RANGE_15_625DPS
@ INVENSENSE3_GYRO_RANGE_500DPS
@ INVENSENSE3_GYRO_RANGE_250DPS
@ INVENSENSE3_GYRO_RANGE_1000DPS
@ INVENSENSE3_GYRO_RANGE_125DPS
@ INVENSENSE3_GYRO_RANGE_2000DPS
int sample_numbers
expected FIFO packet number, assuming reading at PERIODIC_FREQUENCY
enum invensense3_device_t device
The device type detected.
float gyro_samplerate
Sample rate in Hz from the gyro_odr.
float accel_samplerate
Sample rate in Hz from the accel_odr.
enum invensense3_accel_range_t accel_range
Accelerometer range configuration.
enum invensense3_fifo_packet_t sample_size
FIFO packet size.
invensense3_fifo_packet_t
@ INVENSENSE3_SAMPLE_SIZE_PK3
@ INVENSENSE3_SAMPLE_SIZE_PK1
@ INVENSENSE3_SAMPLE_SIZE_PK4
@ INVENSENSE3_SAMPLE_SIZE_PK2
uint8_t slave_addr
The I2C slave address on the bus.
uint16_t gyro_aaf_regs[4]
Gyro Anti-alias filter register values.
uint8_t abi_id
The ABI id used to broadcast the device measurements.
uint16_t accel_aaf_regs[4]
Accelerometer Anti-alias filter register values.
uint8_t rx_buf[INVENSENSE3_BUFFER_SIZE]
Receive buffer.
uint16_t gyro_aaf
Gyro Anti-alias filter 3dB Bandwidth configuration [Hz].
enum invensense3_gyro_odr_t gyro_odr
Gyro Output Data Rate configuration.
void invensense3_init(struct invensense3_t *inv)
Initialize the invensense v3 sensor instance.
Architecture independent SPI (Serial Peripheral Interface) API.
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.