icm20648.h File Reference
Driver for the Invensense ICM20648 6-axis motion sensor.
- Version
- 5.5.0
License
Copyright 2017 Silicon Laboratories, Inc. http://www.silabs.com
This file is licensed under the Silicon Labs License Agreement. See the file "Silabs_License_Agreement.txt" for details. Before using this software for any purpose, you must agree to the terms of that agreement.
Definition in file
icm20648.h
.
#include <stdint.h>
#include "icm20648_config.h"
Functions |
|
uint32_t | ICM20648_accelBandwidthSet (uint8_t accelBw) |
Sets the bandwidth of the accelerometer.
|
|
uint32_t | ICM20648_accelDataRead (float *accel) |
Reads the raw acceleration value and converts to g value based on the actual resolution.
|
|
uint32_t | ICM20648_accelFullscaleSet (uint8_t accelFs) |
Sets the full scale value of the accelerometer.
|
|
uint32_t | ICM20648_accelGyroCalibrate (float *accelBiasScaled, float *gyroBiasScaled) |
Accelerometer and gyroscope calibration function. Reads the gyroscope and accelerometer values while the device is at rest and in level. The resulting values are loaded to the accel and gyro bias registers to cancel the static offset error.
|
|
uint32_t | ICM20648_accelResolutionGet (float *accelRes) |
Gets the actual resolution of the accelerometer.
|
|
float | ICM20648_accelSampleRateSet (float sampleRate) |
Sets the sample rate of the gyroscope.
|
|
void | ICM20648_bankSelect (uint8_t bank) |
Select the desired register bank.
|
|
uint32_t | ICM20648_cycleModeEnable (bool enable) |
Enables or disables the cycle mode operation of the accel and gyro.
|
|
uint32_t | ICM20648_deInit (void) |
De-initializes the ICM20648 sensor by disconnecting the supply and SPI lines.
|
|
uint32_t | ICM20648_getDeviceID (uint8_t *devID) |
Reads the device ID of the ICM20648.
|
|
uint32_t | ICM20648_gyroBandwidthSet (uint8_t gyroBw) |
Sets the bandwidth of the gyroscope.
|
|
uint32_t | ICM20648_gyroCalibrate (float *gyroBiasScaled) |
Gyroscope calibration function. Reads the gyroscope values while the device is at rest and in level. The resulting values are loaded to the gyro bias registers to cancel the static offset error.
|
|
uint32_t | ICM20648_gyroDataRead (float *gyro) |
Reads the raw gyroscope value and converts to deg/sec value based on the actual resolution.
|
|
uint32_t | ICM20648_gyroFullscaleSet (uint8_t gyroFs) |
Sets the full scale value of the gyroscope.
|
|
uint32_t | ICM20648_gyroResolutionGet (float *gyroRes) |
Gets the actual resolution of the gyroscope.
|
|
float | ICM20648_gyroSampleRateSet (float sampleRate) |
Sets the sample rate of the accelerometer.
|
|
uint32_t | ICM20648_init (void) |
Initializes the ICM20648 sensor. Enables the power supply and SPI lines, sets up the host SPI controller, configures the chip control interface, clock generator and interrupt line.
|
|
uint32_t | ICM20648_interruptEnable (bool dataReadyEnable, bool womEnable) |
Enables or disables the interrupts in the ICM20648 chip.
|
|
uint32_t | ICM20648_interruptStatusRead (uint32_t *intStatus) |
Reads the interrupt status registers of the ICM20648 chip.
|
|
bool | ICM20648_isDataReady (void) |
Checks if new data is available for read.
|
|
uint32_t | ICM20648_lowPowerModeEnter (bool enAccel, bool enGyro, bool enTemp) |
Enables or disables the sensors in low power mode in the ICM20648 chip.
|
|
void | ICM20648_registerRead (uint16_t addr, int numBytes, uint8_t *data) |
Reads register from the ICM20648 device.
|
|
void | ICM20648_registerWrite (uint16_t addr, uint8_t data) |
Writes a register in the ICM20648 device.
|
|
uint32_t | ICM20648_reset (void) |
Performs soft reset on the ICM20648 chip.
|
|
uint32_t | ICM20648_sampleRateSet (float sampleRate) |
Sets the sample rate both of the accelerometer and the gyroscope.
|
|
uint32_t | ICM20648_sensorEnable (bool accel, bool gyro, bool temp) |
Enables or disables the sensors in the ICM20648 chip.
|
|
uint32_t | ICM20648_sleepModeEnable (bool enable) |
Enables or disables the sleep mode of the device.
|
|
uint32_t | ICM20648_spiInit (void) |
Initializes the SPI bus in order to communicate with the ICM20648.
|
|
uint32_t | ICM20648_temperatureRead (float *temperature) |
Reads the temperature sensor raw value and converts to Celsius.
|
|
uint32_t | ICM20648_wakeOnMotionITEnable (bool enable, uint8_t womThreshold, float sampleRate) |
Sets up and enables the Wake-up On Motion feature.
|
|