Device support for ICM20948 IMU sensor. More...
Device support for ICM20948 IMU sensor.
#include <icm20948.h>
Classes | |
struct | Config |
struct | Icm20948Vect |
Public Types | |
enum | icm20948_accel_range_t { ICM20948_ACCEL_RANGE_2_G , ICM20948_ACCEL_RANGE_4_G , ICM20948_ACCEL_RANGE_8_G , ICM20948_ACCEL_RANGE_16_G } |
enum | icm20948_gyro_range_t { ICM20948_GYRO_RANGE_250_DPS , ICM20948_GYRO_RANGE_500_DPS , ICM20948_GYRO_RANGE_1000_DPS , ICM20948_GYRO_RANGE_2000_DPS } |
enum | ak09916_data_rate_t { AK09916_MAG_DATARATE_SHUTDOWN = 0x0 , AK09916_MAG_DATARATE_SINGLE = 0x1 , AK09916_MAG_DATARATE_10_HZ = 0x2 , AK09916_MAG_DATARATE_20_HZ = 0x4 , AK09916_MAG_DATARATE_50_HZ = 0x6 , AK09916_MAG_DATARATE_100_HZ = 0x8 } |
enum | Result { OK = 0 , ERR } |
Data rates/modes for the embedded AsahiKASEI AK09916 3-axis magnetometer
|
inline |
|
inline |
|
inline |
|
inline |
Read / Write a single byte to a given register address for an I2C slave device on the auxiliary I2C bus
slv_addr | the 7-bit I2C address of the slave device |
reg_addr | the register address to write to |
value | the value to write |
|
inline |
Set the I2C clock rate for the auxillary I2C bus to 345.60kHz and disable repeated start
|
inline |
Enable or disable the I2C mastercontroller
enable_i2c_master | true: enable false: disable |
|
inline |
Get the accelerometer's measurement range.
icm20948_accel_range_t
).
|
inline |
|
inline |
Get the gyro's measurement range.
icm20948_gyro_range_t
).
|
inline |
|
inline |
Get the current magnetometer measurement rate
|
inline |
|
inline |
|
inline |
|
inline |
Get and reset the transport error flag
Initialize the Icm20948 device
config | Configuration settings |
|
inline |
Updates the measurement data for all sensors simultaneously
Reads an 8 bit value
reg | the register address to read from |
|
inline |
Get the accelerometer's measurement range.
icm20x_accel_range_t
).
|
inline |
Read a single byte from a given register address for an I2C slave device on the auxiliary I2C bus
slv_addr | the 7-bit I2C address of the slave device |
reg_addr | the register address to read from |
|
inline |
Get the gyro's measurement range.
icm20x_gyro_range_t
).
|
inline |
slv_addr | |
mag_reg_addr | |
num_finished_checks |
Read from a reg address a defined number of bytes
|
inline |
Reset the internal registers and restores the default settings
Reset the I2C master
|
inline |
|
inline |
Sets the accelerometer's measurement range.
new_accel_range | Measurement range to be set. Must be an icm20948_accel_range_t . |
|
inline |
Sets the accelerometer's data rate divisor.
new_accel_divisor | The accelerometer's data rate divisor (uint16_t ). This 12-bit value must be <= 4095 |
|
inline |
Sets register bank.
bank_number | The bank to set to active |
|
inline |
Sets the gyro's measurement range.
new_gyro_range | Measurement range to be set. Must be an icm20948_gyro_range_t . |
|
inline |
Sets the gyro's data rate divisor.
new_gyro_divisor | The gyro's data rate divisor (uint8_t ). |
|
inline |
Sets the bypass status of the I2C master bus support.
bypass_i2c | Set to true to bypass the internal I2C master circuitry, connecting the external I2C bus to the main I2C bus. Set to false to re-connect |
|
inline |
Set the magnetometer measurement rate
rate | The rate to set. |
|
inline |
|
inline |
Writes a 16 bit value MSB first
reg | the register address to write to |
value | the value to write to the register |
|
inline |
Writes an 8 bit value
reg | the register address to write to |
value | the value to write to the register |
|
inline |
Sets the accelerometer's measurement range.
new_accel_range | Measurement range to be set. Must be an icm20x_accel_range_t . |
|
inline |
|
inline |
Write a single byte to a given register address for an I2C slave device on the auxiliary I2C bus
slv_addr | the 7-bit I2C address of the slave device |
reg_addr | the register address to write to |
value | the value to write |
|
inline |
Sets the gyro's measurement range.
new_gyro_range | Measurement range to be set. Must be an icm20x_gyro_range_t . |
|
inline |