File MpuController.hpp
FileList > fw > rbcx-coprocessor > include > MpuController.hpp
Go to the source code of this file.
#include "I2cController.hpp"
#include "rbcx.pb.h"
#include <stdbool.h>
Classes
Type | Name |
---|---|
struct | mpu_t |
Public Types
Type | Name |
---|---|
typedef struct mpu_t | mpu_t |
Public Functions
Macros
Public Types Documentation
typedef mpu_t
typedef struct mpu_t mpu_t;
Public Functions Documentation
function getExternalSensorDWord
uint32_t getExternalSensorDWord (
int position
)
function getXFineGain
int8_t getXFineGain ()
function getXGyroOffsetTC
int8_t getXGyroOffsetTC ()
function getYFineGain
int8_t getYFineGain ()
function getYGyroOffsetTC
int8_t getYGyroOffsetTC ()
function getZFineGain
int8_t getZFineGain ()
function getZGyroOffsetTC
int8_t getZGyroOffsetTC ()
function mpuCreate
void mpuCreate ()
function mpuDispatch
void mpuDispatch (
const CoprocReq_MpuReq & request
)
function mpuInitialize
void mpuInitialize ()
Power on and prepare for general usage. This will activate the device and take it out of sleep mode (which must be done after start-up). This function also sets both the accelerometer and the gyroscope to their most sensitive settings, namely +/- 2g and +/- 250 degrees/sec, and sets the clock source to use the X Gyro for reference, which is slightly better than the default internal clock source.
function mpuReset
void mpuReset ()
function mpuTick
void mpuTick ()
function mpu_getAccelFIFOEnabled
bool mpu_getAccelFIFOEnabled ()
Get accelerometer FIFO enabled value. When set to 1, this bit enables ACCEL_XOUT_H, ACCEL_XOUT_L, ACCEL_YOUT_H, ACCEL_YOUT_L, ACCEL_ZOUT_H, and ACCEL_ZOUT_L (Registers 59 to 64) to be written into the FIFO mpu6050.buffer.
Returns:
Current accelerometer FIFO enabled value
See also: mpu_RA_FIFO_EN
function mpu_getAccelXSelfTest
bool mpu_getAccelXSelfTest ()
Get self-test enabled setting for accelerometer X axis.
Returns:
Self-test enabled value
See also: mpu_RA_ACCEL_CONFIG
function mpu_getAccelYSelfTest
bool mpu_getAccelYSelfTest ()
Get self-test enabled value for accelerometer Y axis.
Returns:
Self-test enabled value
See also: mpu_RA_ACCEL_CONFIG
function mpu_getAccelZSelfTest
bool mpu_getAccelZSelfTest ()
Get self-test enabled value for accelerometer Z axis.
Returns:
Self-test enabled value
See also: mpu_RA_ACCEL_CONFIG
function mpu_getAcceleration
void mpu_getAcceleration (
int16_t * x,
int16_t * y,
int16_t * z
)
Get 3-axis accelerometer readings. These registers store the most recent accelerometer measurements. Accelerometer measurements are written to these registers at the Sample Rate as defined in Register 25.
The accelerometer measurement registers, along with the temperature measurement registers, gyroscope measurement registers, and external sensor data registers, are composed of two sets of registers: an internal register set and a user-facing read register set.
The data within the accelerometer sensors' internal register set is always updated at the Sample Rate. Meanwhile, the user-facing read register set duplicates the internal register set's data values whenever the serial interface is idle. This guarantees that a burst read of sensor registers will read measurements from the same sampling instant. Note that if burst reads are not used, the user is responsible for ensuring a set of single byte reads correspond to a single sampling instant by checking the Data Ready interrupt.
Each 16-bit accelerometer measurement has a full scale defined in ACCEL_FS (Register 28). For each full scale setting, the accelerometers' sensitivity per LSB in ACCEL_xOUT is shown in the table below:
Parameters:
x
16-bit signed integer container for X-axis accelerationy
16-bit signed integer container for Y-axis accelerationz
16-bit signed integer container for Z-axis acceleration
See also: mpu_RA_GYRO_XOUT_H
function mpu_getAccelerationX
int16_t mpu_getAccelerationX ()
Get X-axis accelerometer reading.
Returns:
X-axis acceleration measurement in 16-bit 2's complement format
See also: getMotion6()
See also: mpu_RA_ACCEL_XOUT_H
function mpu_getAccelerationY
int16_t mpu_getAccelerationY ()
Get Y-axis accelerometer reading.
Returns:
Y-axis acceleration measurement in 16-bit 2's complement format
See also: getMotion6()
See also: mpu_RA_ACCEL_YOUT_H
function mpu_getAccelerationZ
int16_t mpu_getAccelerationZ ()
Get Z-axis accelerometer reading.
Returns:
Z-axis acceleration measurement in 16-bit 2's complement format
See also: getMotion6()
See also: mpu_RA_ACCEL_ZOUT_H
function mpu_getAccelerometerPowerOnDelay
uint8_t mpu_getAccelerometerPowerOnDelay ()
Get accelerometer power-on delay. The accelerometer data path provides samples to the sensor registers, Motion detection, Zero Motion detection, and Free Fall detection modules. The signal path contains filters which must be flushed on wake-up with new samples before the detection modules begin operations. The default wake-up delay, of 4ms can be lengthened by up to 3ms. This additional delay is specified in ACCEL_ON_DELAY in units of 1 LSB = 1 ms. The user may select any value above zero unless instructed otherwise by InvenSense. Please refer to Section 8 of the MPU-6000/MPU-6050 Product Specification document for further information regarding the detection modules.
Returns:
Current accelerometer power-on delay
See also: mpu_RA_MOT_DETECT_CTRL
See also: mpu_DETECT_ACCEL_ON_DELAY_BIT
function mpu_getAuxVDDIOLevel
uint8_t mpu_getAuxVDDIOLevel ()
Get the auxiliary I2C supply voltage level. When set to 1, the auxiliary I2C bus high logic level is VDD. When cleared to 0, the auxiliary I2C bus high logic level is VLOGIC. This does not apply to the MPU-6000, which does not have a VLOGIC pin.
Returns:
I2C supply voltage level (0=VLOGIC, 1=VDD)
function mpu_getClockOutputEnabled
bool mpu_getClockOutputEnabled ()
Get reference clock output enabled status. When this bit is equal to 1, a reference clock output is provided at the CLKOUT pin. When this bit is equal to 0, the clock output is disabled. For further information regarding CLKOUT, please refer to the MPU-60X0 Product Specification document.
Returns:
Current reference clock output enabled status
See also: mpu_RA_INT_PIN_CFG
See also: mpu_INTCFG_CLKOUT_EN_BIT
function mpu_getClockSource
uint8_t mpu_getClockSource ()
Get clock source setting.
Returns:
Current clock source setting
See also: mpu_RA_PWR_MGMT_1
See also: mpu_PWR1_CLKSEL_BIT
See also: mpu_PWR1_CLKSEL_LENGTH
function mpu_getDHPFMode
uint8_t mpu_getDHPFMode ()
Get the high-pass filter configuration. The DHPF is a filter module in the path leading to motion detectors (Free Fall, Motion threshold, and Zero Motion). The high pass filter output is not available to the data registers (see Figure in Section 8 of the MPU-6000/ MPU-6050 Product Specification document).
The high pass filter has three modes:
Returns:
Current high-pass filter configuration
See also: mpu_DHPF_RESET
See also: mpu_RA_ACCEL_CONFIG
function mpu_getDLPFMode
uint8_t mpu_getDLPFMode ()
Get digital low-pass filter configuration. The DLPF_CFG parameter sets the digital low pass filter configuration. It also determines the internal sampling rate used by the device as shown in the table below.
Note: The accelerometer output rate is 1kHz. This means that for a Sample Rate greater than 1kHz, the same accelerometer sample may be output to the FIFO, DMP, and sensor registers more than once.
Returns:
DLFP configuration
See also: mpu_RA_CONFIG
See also: mpu_CFG_DLPF_CFG_BIT
See also: mpu_CFG_DLPF_CFG_LENGTH
function mpu_getDMPConfig1
uint8_t mpu_getDMPConfig1 ()
function mpu_getDMPConfig2
uint8_t mpu_getDMPConfig2 ()
function mpu_getDMPEnabled
bool mpu_getDMPEnabled ()
function mpu_getDMPInt0Status
bool mpu_getDMPInt0Status ()
function mpu_getDMPInt1Status
bool mpu_getDMPInt1Status ()
function mpu_getDMPInt2Status
bool mpu_getDMPInt2Status ()
function mpu_getDMPInt3Status
bool mpu_getDMPInt3Status ()
function mpu_getDMPInt4Status
bool mpu_getDMPInt4Status ()
function mpu_getDMPInt5Status
bool mpu_getDMPInt5Status ()
function mpu_getDeviceID
uint8_t mpu_getDeviceID ()
function mpu_getExternalFrameSync
uint8_t mpu_getExternalFrameSync ()
Get external FSYNC configuration. Configures the external Frame Synchronization (FSYNC) pin sampling. An external signal connected to the FSYNC pin can be sampled by configuring EXT_SYNC_SET. Signal changes to the FSYNC pin are latched so that short strobes may be captured. The latched FSYNC signal will be sampled at the Sampling Rate, as defined in register 25. After sampling, the latch will reset to the current FSYNC signal state.
The sampled value will be reported in place of the least significant bit in a sensor data register determined by the value of EXT_SYNC_SET according to the following table.
Returns:
FSYNC configuration value
function mpu_getExternalSensorByte
uint8_t mpu_getExternalSensorByte (
int position
)
Read single byte from external sensor data register. These registers store data read from external sensors by the Slave 0, 1, 2, and 3 on the auxiliary I2C interface. Data read by Slave 4 is stored in I2C_SLV4_DI (Register 53).
External sensor data is written to these registers at the Sample Rate as defined in Register 25. This access rate can be reduced by using the Slave Delay Enable registers (Register 103).
External sensor data registers, along with the gyroscope measurement registers, accelerometer measurement registers, and temperature measurement registers, are composed of two sets of registers: an internal register set and a user-facing read register set.
The data within the external sensors' internal register set is always updated at the Sample Rate (or the reduced access rate) whenever the serial interface is idle. This guarantees that a burst read of sensor registers will read measurements from the same sampling instant. Note that if burst reads are not used, the user is responsible for ensuring a set of single byte reads correspond to a single sampling instant by checking the Data Ready interrupt.
Data is placed in these external sensor data registers according to I2C_SLV0_CTRL, I2C_SLV1_CTRL, I2C_SLV2_CTRL, and I2C_SLV3_CTRL (Registers 39, 42, 45, and 48). When more than zero bytes are read (I2C_SLVx_LEN > 0) from an enabled slave (I2C_SLVx_EN = 1), the slave is read at the Sample Rate (as defined in Register 25) or delayed rate (if specified in Register 52 and 103). During each Sample cycle, slave reads are performed in order of Slave number. If all slaves are enabled with more than zero bytes to be read, the order will be Slave 0, followed by Slave 1, Slave 2, and Slave 3.
Each enabled slave will have EXT_SENS_DATA registers associated with it by number of bytes read (I2C_SLVx_LEN) in order of slave number, starting from EXT_SENS_DATA_00. Note that this means enabling or disabling a slave may change the higher numbered slaves' associated registers. Furthermore, if fewer total bytes are being read from the external sensors as a result of such a change, then the data remaining in the registers which no longer have an associated slave device (i.e. high numbered registers) will remain in these previously allocated registers unless reset.
If the sum of the read lengths of all SLVx transactions exceed the number of available EXT_SENS_DATA registers, the excess bytes will be dropped. There are 24 EXT_SENS_DATA registers and hence the total read lengths between all the slaves cannot be greater than 24 or some bytes will be lost.
Note: Slave 4's behavior is distinct from that of Slaves 0-3. For further information regarding the characteristics of Slave 4, please refer to Registers 49 to 53.
EXAMPLE: Suppose that Slave 0 is enabled with 4 bytes to be read (I2C_SLV0_EN = 1 and I2C_SLV0_LEN = 4) while Slave 1 is enabled with 2 bytes to be read so that I2C_SLV1_EN = 1 and I2C_SLV1_LEN = 2. In such a situation, EXT_SENS_DATA _00 through _03 will be associated with Slave 0, while EXT_SENS_DATA _04 and 05 will be associated with Slave 1. If Slave 2 is enabled as well, registers starting from EXT_SENS_DATA_06 will be allocated to Slave 2.
If Slave 2 is disabled while Slave 3 is enabled in this same situation, then registers starting from EXT_SENS_DATA_06 will be allocated to Slave 3 instead.
REGISTER ALLOCATION FOR DYNAMIC DISABLE VS. NORMAL DISABLE: If a slave is disabled at any time, the space initially allocated to the slave in the EXT_SENS_DATA register, will remain associated with that slave. This is to avoid dynamic adjustment of the register allocation.
The allocation of the EXT_SENS_DATA registers is recomputed only when (1) all slaves are disabled, or (2) the I2C_MST_RST bit is set (Register 106).
This above is also true if one of the slaves gets NACKed and stops functioning.
Parameters:
position
Starting position (0-23)
Returns:
Byte read from register
function mpu_getExternalSensorWord
uint16_t mpu_getExternalSensorWord (
int position
)
Read word (2 bytes) from external sensor data registers.
Parameters:
position
Starting position (0-21)
Returns:
Word read from register
See also: getExternalSensorByte()
function mpu_getExternalShadowDelayEnabled
bool mpu_getExternalShadowDelayEnabled ()
Get external data shadow delay enabled status. This register is used to specify the timing of external sensor data shadowing. When DELAY_ES_SHADOW is set to 1, shadowing of external sensor data is delayed until all data has been received.
Returns:
Current external data shadow delay enabled status.
See also: mpu_RA_I2C_MST_DELAY_CTRL
See also: mpu_DELAYCTRL_DELAY_ES_SHADOW_BIT
function mpu_getFIFOByte
uint8_t mpu_getFIFOByte ()
function mpu_getFIFOBytes
void mpu_getFIFOBytes (
uint8_t * data,
uint8_t length
)
function mpu_getFIFOCount
uint16_t mpu_getFIFOCount ()
function mpu_getFIFOEnabled
bool mpu_getFIFOEnabled ()
Get FIFO enabled status. When this bit is set to 0, the FIFO mpu6050.buffer is disabled. The FIFO mpu6050.buffer cannot be written to or read from while disabled. The FIFO mpu6050.buffer's state does not change unless the MPU-60X0 is power cycled.
Returns:
Current FIFO enabled status
See also: mpu_RA_USER_CTRL
See also: mpu_USERCTRL_FIFO_EN_BIT
function mpu_getFSyncInterruptEnabled
bool mpu_getFSyncInterruptEnabled ()
Get FSYNC pin interrupt enabled setting. Will be set 0 for disabled, 1 for enabled.
Returns:
Current interrupt enabled setting
See also: mpu_RA_INT_PIN_CFG
See also: mpu_INTCFG_FSYNC_INT_EN_BIT
function mpu_getFSyncInterruptLevel
bool mpu_getFSyncInterruptLevel ()
Get FSYNC interrupt logic level mode.
Returns:
Current FSYNC interrupt mode (0=active-high, 1=active-low)
See also: getFSyncInterruptMode()
See also: mpu_RA_INT_PIN_CFG
See also: mpu_INTCFG_FSYNC_INT_LEVEL_BIT
function mpu_getFreefallDetectionCounterDecrement
uint8_t mpu_getFreefallDetectionCounterDecrement ()
Get Free Fall detection counter decrement configuration. Detection is registered by the Free Fall detection module after accelerometer measurements meet their respective threshold conditions over a specified number of samples. When the threshold conditions are met, the corresponding detection counter increments by 1. The user may control the rate at which the detection counter decrements when the threshold condition is not met by configuring FF_COUNT. The decrement rate can be set according to the following table:
When FF_COUNT is configured to 0 (reset), any non-qualifying sample will reset the counter to 0. For further information on Free Fall detection, please refer to Registers 29 to 32.
Returns:
Current decrement configuration
See also: mpu_RA_MOT_DETECT_CTRL
See also: mpu_DETECT_FF_COUNT_BIT
function mpu_getFreefallDetectionDuration
uint8_t mpu_getFreefallDetectionDuration ()
Get free-fall event duration threshold. This register configures the duration counter threshold for Free Fall event detection. The duration counter ticks at 1kHz, therefore FF_DUR has a unit of 1 LSB = 1 ms.
The Free Fall duration counter increments while the absolute value of the accelerometer measurements are each less than the detection threshold (Register 29). The Free Fall interrupt is triggered when the Free Fall duration counter reaches the time specified in this register.
For more details on the Free Fall detection interrupt, see Section 8.2 of the MPU-6000/MPU-6050 Product Specification document as well as Registers 56 and 58 of this document.
Returns:
Current free-fall duration threshold value (LSB = 1ms)
See also: mpu_RA_FF_DUR
function mpu_getFreefallDetectionThreshold
uint8_t mpu_getFreefallDetectionThreshold ()
Get free-fall event acceleration threshold. This register configures the detection threshold for Free Fall event detection. The unit of FF_THR is 1LSB = 2mg. Free Fall is detected when the absolute value of the accelerometer measurements for the three axes are each less than the detection threshold. This condition increments the Free Fall duration counter (Register 30). The Free Fall interrupt is triggered when the Free Fall duration counter reaches the time specified in FF_DUR.
For more details on the Free Fall detection interrupt, see Section 8.2 of the MPU-6000/MPU-6050 Product Specification document as well as Registers 56 and 58 of this document.
Returns:
Current free-fall acceleration threshold value (LSB = 2mg)
See also: mpu_RA_FF_THR
function mpu_getFullScaleAccelRange
uint8_t mpu_getFullScaleAccelRange ()
Get full-scale accelerometer range. The FS_SEL parameter allows setting the full-scale range of the accelerometer sensors, as described in the table below.
Returns:
Current full-scale accelerometer range setting
See also: mpu_ACCEL_FS_2
See also: mpu_RA_ACCEL_CONFIG
See also: mpu_ACONFIG_AFS_SEL_BIT
See also: mpu_ACONFIG_AFS_SEL_LENGTH
function mpu_getFullScaleGyroRange
uint8_t mpu_getFullScaleGyroRange ()
Get full-scale gyroscope range. The FS_SEL parameter allows setting the full-scale range of the gyro sensors, as described in the table below.
Returns:
Current full-scale gyroscope range setting
See also: mpu_GYRO_FS_250
See also: mpu_RA_GYRO_CONFIG
See also: mpu_GCONFIG_FS_SEL_BIT
See also: mpu_GCONFIG_FS_SEL_LENGTH
function mpu_getI2CBypassEnabled
bool mpu_getI2CBypassEnabled ()
Get I2C bypass enabled status. When this bit is equal to 1 and I2C_MST_EN (Register 106 bit[5]) is equal to 0, the host application processor will be able to directly access the auxiliary I2C bus of the MPU-60X0. When this bit is equal to 0, the host application processor will not be able to directly access the auxiliary I2C bus of the MPU-60X0 regardless of the state of I2C_MST_EN (Register 106 bit[5]).
Returns:
Current I2C bypass enabled status
See also: mpu_RA_INT_PIN_CFG
See also: mpu_INTCFG_I2C_BYPASS_EN_BIT
function mpu_getI2CMasterModeEnabled
bool mpu_getI2CMasterModeEnabled ()
Get I2C Master Mode enabled status. When this mode is enabled, the MPU-60X0 acts as the I2C Master to the external sensor slave devices on the auxiliary I2C bus. When this bit is cleared to 0, the auxiliary I2C bus lines (AUX_DA and AUX_CL) are logically driven by the primary I2C bus (SDA and SCL). This is a precondition to enabling Bypass Mode. For further information regarding Bypass Mode, please refer to Register 55.
Returns:
Current I2C Master Mode enabled status
See also: mpu_RA_USER_CTRL
See also: mpu_USERCTRL_I2C_MST_EN_BIT
function mpu_getIntDMPEnabled
bool mpu_getIntDMPEnabled ()
function mpu_getIntDMPStatus
bool mpu_getIntDMPStatus ()
function mpu_getIntDataReadyEnabled
bool mpu_getIntDataReadyEnabled ()
Get Data Ready interrupt enabled setting. This event occurs each time a write operation to all of the sensor registers has been completed. Will be set 0 for disabled, 1 for enabled.
Returns:
Current interrupt enabled status
See also: mpu_RA_INT_ENABLE
See also: mpu_INTERRUPT_DATA_RDY_BIT
function mpu_getIntDataReadyStatus
bool mpu_getIntDataReadyStatus ()
Get Data Ready interrupt status. This bit automatically sets to 1 when a Data Ready interrupt has been generated. The bit clears to 0 after the register has been read.
Returns:
Current interrupt status
See also: mpu_RA_INT_STATUS
See also: mpu_INTERRUPT_DATA_RDY_BIT
function mpu_getIntEnabled
uint8_t mpu_getIntEnabled ()
Get full interrupt enabled status. Full register byte for all interrupts, for quick reading. Each bit will be set 0 for disabled, 1 for enabled.
Returns:
Current interrupt enabled status
See also: mpu_RA_INT_ENABLE
See also: mpu_INTERRUPT_FF_BIT
function mpu_getIntFIFOBufferOverflowEnabled
bool mpu_getIntFIFOBufferOverflowEnabled ()
Get FIFO Buffer Overflow interrupt enabled status. Will be set 0 for disabled, 1 for enabled.
Returns:
Current interrupt enabled status
See also: mpu_RA_INT_ENABLE
See also: mpu_INTERRUPT_FIFO_OFLOW_BIT
function mpu_getIntFIFOBufferOverflowStatus
bool mpu_getIntFIFOBufferOverflowStatus ()
Get FIFO Buffer Overflow interrupt status. This bit automatically sets to 1 when a Free Fall interrupt has been generated. The bit clears to 0 after the register has been read.
Returns:
Current interrupt status
See also: mpu_RA_INT_STATUS
See also: mpu_INTERRUPT_FIFO_OFLOW_BIT
function mpu_getIntFreefallEnabled
bool mpu_getIntFreefallEnabled ()
Get Free Fall interrupt enabled status. Will be set 0 for disabled, 1 for enabled.
Returns:
Current interrupt enabled status
See also: mpu_RA_INT_ENABLE
See also: mpu_INTERRUPT_FF_BIT
function mpu_getIntFreefallStatus
bool mpu_getIntFreefallStatus ()
Get Free Fall interrupt status. This bit automatically sets to 1 when a Free Fall interrupt has been generated. The bit clears to 0 after the register has been read.
Returns:
Current interrupt status
See also: mpu_RA_INT_STATUS
See also: mpu_INTERRUPT_FF_BIT
function mpu_getIntI2CMasterEnabled
bool mpu_getIntI2CMasterEnabled ()
Get I2C Master interrupt enabled status. This enables any of the I2C Master interrupt sources to generate an interrupt. Will be set 0 for disabled, 1 for enabled.
Returns:
Current interrupt enabled status
See also: mpu_RA_INT_ENABLE
See also: mpu_INTERRUPT_I2C_MST_INT_BIT
function mpu_getIntI2CMasterStatus
bool mpu_getIntI2CMasterStatus ()
Get I2C Master interrupt status. This bit automatically sets to 1 when an I2C Master interrupt has been generated. For a list of I2C Master interrupts, please refer to Register 54. The bit clears to 0 after the register has been read.
Returns:
Current interrupt status
See also: mpu_RA_INT_STATUS
See also: mpu_INTERRUPT_I2C_MST_INT_BIT
function mpu_getIntMotionEnabled
bool mpu_getIntMotionEnabled ()
Get Motion Detection interrupt enabled status. Will be set 0 for disabled, 1 for enabled.
Returns:
Current interrupt enabled status
See also: mpu_RA_INT_ENABLE
See also: mpu_INTERRUPT_MOT_BIT
function mpu_getIntMotionStatus
bool mpu_getIntMotionStatus ()
Get Motion Detection interrupt status. This bit automatically sets to 1 when a Motion Detection interrupt has been generated. The bit clears to 0 after the register has been read.
Returns:
Current interrupt status
See also: mpu_RA_INT_STATUS
See also: mpu_INTERRUPT_MOT_BIT
function mpu_getIntPLLReadyEnabled
bool mpu_getIntPLLReadyEnabled ()
function mpu_getIntPLLReadyStatus
bool mpu_getIntPLLReadyStatus ()
function mpu_getIntStatus
uint8_t mpu_getIntStatus ()
Get full set of interrupt status bits. These bits clear to 0 after the register has been read. Very useful for getting multiple INT statuses, since each single bit read clears all of them because it has to read the whole byte.
Returns:
Current interrupt status
See also: mpu_RA_INT_STATUS
function mpu_getIntZeroMotionEnabled
bool mpu_getIntZeroMotionEnabled ()
Get Zero Motion Detection interrupt enabled status. Will be set 0 for disabled, 1 for enabled.
Returns:
Current interrupt enabled status
See also: mpu_RA_INT_ENABLE
See also: mpu_INTERRUPT_ZMOT_BIT
function mpu_getIntZeroMotionStatus
bool mpu_getIntZeroMotionStatus ()
Get Zero Motion Detection interrupt status. This bit automatically sets to 1 when a Zero Motion Detection interrupt has been generated. The bit clears to 0 after the register has been read.
Returns:
Current interrupt status
See also: mpu_RA_INT_STATUS
See also: mpu_INTERRUPT_ZMOT_BIT
function mpu_getInterruptDrive
bool mpu_getInterruptDrive ()
Get interrupt drive mode. Will be set 0 for push-pull, 1 for open-drain.
Returns:
Current interrupt drive mode (0=push-pull, 1=open-drain)
See also: mpu_RA_INT_PIN_CFG
See also: mpu_INTCFG_INT_OPEN_BIT
function mpu_getInterruptLatch
bool mpu_getInterruptLatch ()
Get interrupt latch mode. Will be set 0 for 50us-pulse, 1 for latch-until-int-cleared.
Returns:
Current latch mode (0=50us-pulse, 1=latch-until-int-cleared)
See also: mpu_RA_INT_PIN_CFG
See also: mpu_INTCFG_LATCH_INT_EN_BIT
function mpu_getInterruptLatchClear
bool mpu_getInterruptLatchClear ()
Get interrupt latch clear mode. Will be set 0 for status-read-only, 1 for any-register-read.
Returns:
Current latch clear mode (0=status-read-only, 1=any-register-read)
See also: mpu_RA_INT_PIN_CFG
See also: mpu_INTCFG_INT_RD_CLEAR_BIT
function mpu_getInterruptMode
bool mpu_getInterruptMode ()
Get interrupt logic level mode. Will be set 0 for active-high, 1 for active-low.
Returns:
Current interrupt mode (0=active-high, 1=active-low)
See also: mpu_RA_INT_PIN_CFG
See also: mpu_INTCFG_INT_LEVEL_BIT
function mpu_getLostArbitration
bool mpu_getLostArbitration ()
Get master arbitration lost status. This bit automatically sets to 1 when the I2C Master has lost arbitration of the auxiliary I2C bus (an error condition). This triggers an interrupt if the I2C_MST_INT_EN bit in the INT_ENABLE register (Register 56) is asserted.
Returns:
Master arbitration lost status
See also: mpu_RA_I2C_MST_STATUS
function mpu_getMasterClockSpeed
uint8_t mpu_getMasterClockSpeed ()
Get I2C master clock speed. I2C_MST_CLK is a 4 bit unsigned value which configures a divider on the MPU-60X0 internal 8MHz clock. It sets the I2C master clock speed according to the following table:
Returns:
Current I2C master clock speed
See also: mpu_RA_I2C_MST_CTRL
function mpu_getMotion6
void mpu_getMotion6 (
int16_t * ax,
int16_t * ay,
int16_t * az,
int16_t * gx,
int16_t * gy,
int16_t * gz
)
Get raw 6-axis motion sensor readings (accel/gyro). Retrieves all currently available motion sensor values.
Parameters:
ax
16-bit signed integer container for accelerometer X-axis valueay
16-bit signed integer container for accelerometer Y-axis valueaz
16-bit signed integer container for accelerometer Z-axis valuegx
16-bit signed integer container for gyroscope X-axis valuegy
16-bit signed integer container for gyroscope Y-axis valuegz
16-bit signed integer container for gyroscope Z-axis value
See also: getAcceleration()
See also: getRotation()
See also: mpu_RA_ACCEL_XOUT_H
function mpu_getMotion9
void mpu_getMotion9 (
int16_t * ax,
int16_t * ay,
int16_t * az,
int16_t * gx,
int16_t * gy,
int16_t * gz,
int16_t * mx,
int16_t * my,
int16_t * mz
)
Get raw 9-axis motion sensor readings (accel/gyro/compass). FUNCTION NOT FULLY IMPLEMENTED YET.
Parameters:
ax
16-bit signed integer container for accelerometer X-axis valueay
16-bit signed integer container for accelerometer Y-axis valueaz
16-bit signed integer container for accelerometer Z-axis valuegx
16-bit signed integer container for gyroscope X-axis valuegy
16-bit signed integer container for gyroscope Y-axis valuegz
16-bit signed integer container for gyroscope Z-axis valuemx
16-bit signed integer container for magnetometer X-axis valuemy
16-bit signed integer container for magnetometer Y-axis valuemz
16-bit signed integer container for magnetometer Z-axis value
See also: getMotion6()
See also: getAcceleration()
See also: getRotation()
See also: mpu_RA_ACCEL_XOUT_H
function mpu_getMotionDetectionCounterDecrement
uint8_t mpu_getMotionDetectionCounterDecrement ()
Get Motion detection counter decrement configuration. Detection is registered by the Motion detection module after accelerometer measurements meet their respective threshold conditions over a specified number of samples. When the threshold conditions are met, the corresponding detection counter increments by 1. The user may control the rate at which the detection counter decrements when the threshold condition is not met by configuring MOT_COUNT. The decrement rate can be set according to the following table:
When MOT_COUNT is configured to 0 (reset), any non-qualifying sample will reset the counter to 0. For further information on Motion detection, please refer to Registers 29 to 32.
function mpu_getMotionDetectionDuration
uint8_t mpu_getMotionDetectionDuration ()
Get motion detection event duration threshold. This register configures the duration counter threshold for Motion interrupt generation. The duration counter ticks at 1 kHz, therefore MOT_DUR has a unit of 1LSB = 1ms. The Motion detection duration counter increments when the absolute value of any of the accelerometer measurements exceeds the Motion detection threshold (Register 31). The Motion detection interrupt is triggered when the Motion detection counter reaches the time count specified in this register.
For more details on the Motion detection interrupt, see Section 8.3 of the MPU-6000/MPU-6050 Product Specification document.
Returns:
Current motion detection duration threshold value (LSB = 1ms)
See also: mpu_RA_MOT_DUR
function mpu_getMotionDetectionThreshold
uint8_t mpu_getMotionDetectionThreshold ()
Get motion detection event acceleration threshold. This register configures the detection threshold for Motion interrupt generation. The unit of MOT_THR is 1LSB = 2mg. Motion is detected when the absolute value of any of the accelerometer measurements exceeds this Motion detection threshold. This condition increments the Motion detection duration counter (Register 32). The Motion detection interrupt is triggered when the Motion Detection counter reaches the time count specified in MOT_DUR (Register 32).
The Motion interrupt will indicate the axis and polarity of detected motion in MOT_DETECT_STATUS (Register 97).
For more details on the Motion detection interrupt, see Section 8.3 of the MPU-6000/MPU-6050 Product Specification document as well as Registers 56 and 58 of this document.
Returns:
Current motion detection acceleration threshold value (LSB = 2mg)
See also: mpu_RA_MOT_THR
function mpu_getMultiMasterEnabled
bool mpu_getMultiMasterEnabled ()
Get multi-master enabled value. Multi-master capability allows multiple I2C masters to operate on the same bus. In circuits where multi-master capability is required, set MULT_MST_EN to 1. This will increase current drawn by approximately 30uA.
In circuits where multi-master capability is required, the state of the I2C bus must always be monitored by each separate I2C Master. Before an I2C Master can assume arbitration of the bus, it must first confirm that no other I2C Master has arbitration of the bus. When MULT_MST_EN is set to 1, the MPU-60X0's bus arbitration detection logic is turned on, enabling it to detect when the bus is available.
Returns:
Current multi-master enabled value
See also: mpu_RA_I2C_MST_CTRL
function mpu_getOTPBankValid
uint8_t mpu_getOTPBankValid ()
function mpu_getPassthroughStatus
bool mpu_getPassthroughStatus ()
Get FSYNC interrupt status. This bit reflects the status of the FSYNC interrupt from an external device into the MPU-60X0. This is used as a way to pass an external interrupt through the MPU-60X0 to the host application processor. When set to 1, this bit will cause an interrupt if FSYNC_INT_EN is asserted in INT_PIN_CFG (Register 55).
Returns:
FSYNC interrupt status
See also: mpu_RA_I2C_MST_STATUS
function mpu_getRate
uint8_t mpu_getRate ()
Get gyroscope output rate divider. The sensor register output, FIFO output, DMP sampling, Motion detection, Zero Motion detection, and Free Fall detection are all based on the Sample Rate. The Sample Rate is generated by dividing the gyroscope output rate by SMPLRT_DIV:
Sample Rate = Gyroscope Output Rate / (1 + SMPLRT_DIV)
where Gyroscope Output Rate = 8kHz when the DLPF is disabled (DLPF_CFG = 0 or 7), and 1kHz when the DLPF is enabled (see Register 26).
Note: The accelerometer output rate is 1kHz. This means that for a Sample Rate greater than 1kHz, the same accelerometer sample may be output to the FIFO, DMP, and sensor registers more than once.
For a diagram of the gyroscope and accelerometer signal paths, see Section 8 of the MPU-6000/MPU-6050 Product Specification document.
Returns:
Current sample rate
See also: mpu_RA_SMPLRT_DIV
function mpu_getRotation
void mpu_getRotation (
int16_t * x,
int16_t * y,
int16_t * z
)
Get 3-axis gyroscope readings. These gyroscope measurement registers, along with the accelerometer measurement registers, temperature measurement registers, and external sensor data registers, are composed of two sets of registers: an internal register set and a user-facing read register set. The data within the gyroscope sensors' internal register set is always updated at the Sample Rate. Meanwhile, the user-facing read register set duplicates the internal register set's data values whenever the serial interface is idle. This guarantees that a burst read of sensor registers will read measurements from the same sampling instant. Note that if burst reads are not used, the user is responsible for ensuring a set of single byte reads correspond to a single sampling instant by checking the Data Ready interrupt.
Each 16-bit gyroscope measurement has a full scale defined in FS_SEL (Register 27). For each full scale setting, the gyroscopes' sensitivity per LSB in GYRO_xOUT is shown in the table below:
Parameters:
x
16-bit signed integer container for X-axis rotationy
16-bit signed integer container for Y-axis rotationz
16-bit signed integer container for Z-axis rotation
See also: getMotion6()
See also: mpu_RA_GYRO_XOUT_H
function mpu_getRotationX
int16_t mpu_getRotationX ()
Get X-axis gyroscope reading.
Returns:
X-axis rotation measurement in 16-bit 2's complement format
See also: getMotion6()
See also: mpu_RA_GYRO_XOUT_H
function mpu_getRotationY
int16_t mpu_getRotationY ()
Get Y-axis gyroscope reading.
Returns:
Y-axis rotation measurement in 16-bit 2's complement format
See also: getMotion6()
See also: mpu_RA_GYRO_YOUT_H
function mpu_getRotationZ
int16_t mpu_getRotationZ ()
Get Z-axis gyroscope reading.
Returns:
Z-axis rotation measurement in 16-bit 2's complement format
See also: getMotion6()
See also: mpu_RA_GYRO_ZOUT_H
function mpu_getSlate4InputByte
uint8_t mpu_getSlate4InputByte ()
Get last available byte read from Slave 4. This register stores the data read from Slave 4. This field is populated after a read transaction.
Returns:
Last available byte read from to Slave 4
See also: mpu_RA_I2C_SLV4_DI
function mpu_getSlave0FIFOEnabled
bool mpu_getSlave0FIFOEnabled ()
Get Slave 0 FIFO enabled value. When set to 1, this bit enables EXT_SENS_DATA registers (Registers 73 to 96) associated with Slave 0 to be written into the FIFO mpu6050.buffer.
Returns:
Current Slave 0 FIFO enabled value
See also: mpu_RA_FIFO_EN
function mpu_getSlave0Nack
bool mpu_getSlave0Nack ()
Get Slave 0 NACK status. This bit automatically sets to 1 when the I2C Master receives a NACK in a transaction with Slave 0. This triggers an interrupt if the I2C_MST_INT_EN bit in the INT_ENABLE register (Register 56) is asserted.
Returns:
Slave 0 NACK interrupt status
See also: mpu_RA_I2C_MST_STATUS
function mpu_getSlave1FIFOEnabled
bool mpu_getSlave1FIFOEnabled ()
Get Slave 1 FIFO enabled value. When set to 1, this bit enables EXT_SENS_DATA registers (Registers 73 to 96) associated with Slave 1 to be written into the FIFO mpu6050.buffer.
Returns:
Current Slave 1 FIFO enabled value
See also: mpu_RA_FIFO_EN
function mpu_getSlave1Nack
bool mpu_getSlave1Nack ()
Get Slave 1 NACK status. This bit automatically sets to 1 when the I2C Master receives a NACK in a transaction with Slave 1. This triggers an interrupt if the I2C_MST_INT_EN bit in the INT_ENABLE register (Register 56) is asserted.
Returns:
Slave 1 NACK interrupt status
See also: mpu_RA_I2C_MST_STATUS
function mpu_getSlave2FIFOEnabled
bool mpu_getSlave2FIFOEnabled ()
Get Slave 2 FIFO enabled value. When set to 1, this bit enables EXT_SENS_DATA registers (Registers 73 to 96) associated with Slave 2 to be written into the FIFO mpu6050.buffer.
Returns:
Current Slave 2 FIFO enabled value
See also: mpu_RA_FIFO_EN
function mpu_getSlave2Nack
bool mpu_getSlave2Nack ()
Get Slave 2 NACK status. This bit automatically sets to 1 when the I2C Master receives a NACK in a transaction with Slave 2. This triggers an interrupt if the I2C_MST_INT_EN bit in the INT_ENABLE register (Register 56) is asserted.
Returns:
Slave 2 NACK interrupt status
See also: mpu_RA_I2C_MST_STATUS
function mpu_getSlave3FIFOEnabled
bool mpu_getSlave3FIFOEnabled ()
Get Slave 3 FIFO enabled value. When set to 1, this bit enables EXT_SENS_DATA registers (Registers 73 to 96) associated with Slave 3 to be written into the FIFO mpu6050.buffer.
Returns:
Current Slave 3 FIFO enabled value
See also: mpu_RA_MST_CTRL
function mpu_getSlave3Nack
bool mpu_getSlave3Nack ()
Get Slave 3 NACK status. This bit automatically sets to 1 when the I2C Master receives a NACK in a transaction with Slave 3. This triggers an interrupt if the I2C_MST_INT_EN bit in the INT_ENABLE register (Register 56) is asserted.
Returns:
Slave 3 NACK interrupt status
See also: mpu_RA_I2C_MST_STATUS
function mpu_getSlave4Address
uint8_t mpu_getSlave4Address ()
Get the I2C address of Slave 4. Note that Bit 7 (MSB) controls read/write mode. If Bit 7 is set, it's a read operation, and if it is cleared, then it's a write operation. The remaining bits (6-0) are the 7-bit device address of the slave device.
Returns:
Current address for Slave 4
See also: getSlaveAddress()
See also: mpu_RA_I2C_SLV4_ADDR
function mpu_getSlave4Enabled
bool mpu_getSlave4Enabled ()
Get the enabled value for the Slave 4. When set to 1, this bit enables Slave 4 for data transfer operations. When cleared to 0, this bit disables Slave 4 from data transfer operations.
Returns:
Current enabled value for Slave 4
See also: mpu_RA_I2C_SLV4_CTRL
function mpu_getSlave4InterruptEnabled
bool mpu_getSlave4InterruptEnabled ()
Get the enabled value for Slave 4 transaction interrupts. When set to 1, this bit enables the generation of an interrupt signal upon completion of a Slave 4 transaction. When cleared to 0, this bit disables the generation of an interrupt signal upon completion of a Slave 4 transaction. The interrupt status can be observed in Register 54.
Returns:
Current enabled value for Slave 4 transaction interrupts.
See also: mpu_RA_I2C_SLV4_CTRL
function mpu_getSlave4IsDone
bool mpu_getSlave4IsDone ()
Get Slave 4 transaction done status. Automatically sets to 1 when a Slave 4 transaction has completed. This triggers an interrupt if the I2C_MST_INT_EN bit in the INT_ENABLE register (Register 56) is asserted and if the SLV_4_DONE_INT bit is asserted in the I2C_SLV4_CTRL register (Register 52).
Returns:
Slave 4 transaction done status
See also: mpu_RA_I2C_MST_STATUS
function mpu_getSlave4MasterDelay
uint8_t mpu_getSlave4MasterDelay ()
Get Slave 4 master delay value. This configures the reduced access rate of I2C slaves relative to the Sample Rate. When a slave's access rate is decreased relative to the Sample Rate, the slave is accessed every: This base Sample Rate in turn is determined by SMPLRT_DIV (register 25) and DLPF_CFG (register 26). Whether a slave's access rate is reduced relative to the Sample Rate is determined by I2C_MST_DELAY_CTRL (register 103). For further information regarding the Sample Rate, please refer to register 25.
Returns:
Current Slave 4 master delay value
See also: mpu_RA_I2C_SLV4_CTRL
function mpu_getSlave4Nack
bool mpu_getSlave4Nack ()
Get Slave 4 NACK status. This bit automatically sets to 1 when the I2C Master receives a NACK in a transaction with Slave 4. This triggers an interrupt if the I2C_MST_INT_EN bit in the INT_ENABLE register (Register 56) is asserted.
Returns:
Slave 4 NACK interrupt status
See also: mpu_RA_I2C_MST_STATUS
function mpu_getSlave4Register
uint8_t mpu_getSlave4Register ()
Get the active internal register for the Slave 4. Read/write operations for this slave will be done to whatever internal register address is stored in this MPU register.
Returns:
Current active register for Slave 4
See also: mpu_RA_I2C_SLV4_REG
function mpu_getSlave4WriteMode
bool mpu_getSlave4WriteMode ()
Get write mode for Slave 4. When set to 1, the transaction will read or write data only. When cleared to 0, the transaction will write a register address prior to reading or writing data. This should equal 0 when specifying the register address within the Slave device to/from which the ensuing data transaction will take place.
Returns:
Current write mode for Slave 4 (0 = register address + data, 1 = data only)
See also: mpu_RA_I2C_SLV4_CTRL
function mpu_getSlaveAddress
uint8_t mpu_getSlaveAddress (
uint8_t num
)
Get the I2C address of the specified slave (0-3). Note that Bit 7 (MSB) controls read/write mode. If Bit 7 is set, it's a read operation, and if it is cleared, then it's a write operation. The remaining bits (6-0) are the 7-bit device address of the slave device.
In read mode, the result of the read is placed in the lowest available EXT_SENS_DATA register. For further information regarding the allocation of read results, please refer to the EXT_SENS_DATA register description (Registers 73 - 96).
The MPU-6050 supports a total of five slaves, but Slave 4 has unique characteristics, and so it has its own functions (getSlave4* and setSlave4*).
I2C data transactions are performed at the Sample Rate, as defined in Register 25. The user is responsible for ensuring that I2C data transactions to and from each enabled Slave can be completed within a single period of the Sample Rate.
The I2C slave access rate can be reduced relative to the Sample Rate. This reduced access rate is determined by I2C_MST_DLY (Register 52). Whether a slave's access rate is reduced relative to the Sample Rate is determined by I2C_MST_DELAY_CTRL (Register 103).
The processing order for the slaves is fixed. The sequence followed for processing the slaves is Slave 0, Slave 1, Slave 2, Slave 3 and Slave 4. If a particular Slave is disabled it will be skipped.
Each slave can either be accessed at the sample rate or at a reduced sample rate. In a case where some slaves are accessed at the Sample Rate and some slaves are accessed at the reduced rate, the sequence of accessing the slaves (Slave 0 to Slave 4) is still followed. However, the reduced rate slaves will be skipped if their access rate dictates that they should not be accessed during that particular cycle. For further information regarding the reduced access rate, please refer to Register 52. Whether a slave is accessed at the Sample Rate or at the reduced rate is determined by the Delay Enable bits in Register 103.
Parameters:
num
Slave number (0-3)
Returns:
Current address for specified slave
See also: mpu_RA_I2C_SLV0_ADDR
function mpu_getSlaveDataLength
uint8_t mpu_getSlaveDataLength (
uint8_t num
)
Get number of bytes to read for the specified slave (0-3). Specifies the number of bytes transferred to and from Slave 0. Clearing this bit to 0 is equivalent to disabling the register by writing 0 to I2C_SLV0_EN.
Parameters:
num
Slave number (0-3)
Returns:
Number of bytes to read for specified slave
See also: mpu_RA_I2C_SLV0_CTRL
function mpu_getSlaveDelayEnabled
bool mpu_getSlaveDelayEnabled (
uint8_t num
)
Get slave delay enabled status. When a particular slave delay is enabled, the rate of access for the that slave device is reduced. When a slave's access rate is decreased relative to the Sample Rate, the slave is accessed every: This base Sample Rate in turn is determined by SMPLRT_DIV (register * 25) and DLPF_CFG (register 26).
For further information regarding I2C_MST_DLY, please refer to register 52. For further information regarding the Sample Rate, please refer to register 25.
Parameters:
num
Slave number (0-4)
Returns:
Current slave delay enabled status.
See also: mpu_RA_I2C_MST_DELAY_CTRL
See also: mpu_DELAYCTRL_I2C_SLV0_DLY_EN_BIT
function mpu_getSlaveEnabled
bool mpu_getSlaveEnabled (
uint8_t num
)
Get the enabled value for the specified slave (0-3). When set to 1, this bit enables Slave 0 for data transfer operations. When cleared to 0, this bit disables Slave 0 from data transfer operations.
Parameters:
num
Slave number (0-3)
Returns:
Current enabled value for specified slave
See also: mpu_RA_I2C_SLV0_CTRL
function mpu_getSlaveReadWriteTransitionEnabled
bool mpu_getSlaveReadWriteTransitionEnabled ()
Get slave read/write transition enabled value. The I2C_MST_P_NSR bit configures the I2C Master's transition from one slave read to the next slave read. If the bit equals 0, there will be a restart between reads. If the bit equals 1, there will be a stop followed by a start of the following read. When a write transaction follows a read transaction, the stop followed by a start of the successive write will be always used.
Returns:
Current slave read/write transition enabled value
See also: mpu_RA_I2C_MST_CTRL
function mpu_getSlaveRegister
uint8_t mpu_getSlaveRegister (
uint8_t num
)
Get the active internal register for the specified slave (0-3). Read/write operations for this slave will be done to whatever internal register address is stored in this MPU register.
The MPU-6050 supports a total of five slaves, but Slave 4 has unique characteristics, and so it has its own functions.
Parameters:
num
Slave number (0-3)
Returns:
Current active register for specified slave
See also: mpu_RA_I2C_SLV0_REG
function mpu_getSlaveWordByteSwap
bool mpu_getSlaveWordByteSwap (
uint8_t num
)
Get word pair byte-swapping enabled for the specified slave (0-3). When set to 1, this bit enables byte swapping. When byte swapping is enabled, the high and low bytes of a word pair are swapped. Please refer to I2C_SLV0_GRP for the pairing convention of the word pairs. When cleared to 0, bytes transferred to and from Slave 0 will be written to EXT_SENS_DATA registers in the order they were transferred.
Parameters:
num
Slave number (0-3)
Returns:
Current word pair byte-swapping enabled value for specified slave
See also: mpu_RA_I2C_SLV0_CTRL
function mpu_getSlaveWordGroupOffset
bool mpu_getSlaveWordGroupOffset (
uint8_t num
)
Get word pair grouping order offset for the specified slave (0-3). This sets specifies the grouping order of word pairs received from registers. When cleared to 0, bytes from register addresses 0 and 1, 2 and 3, etc (even, then odd register addresses) are paired to form a word. When set to 1, bytes from register addresses are paired 1 and 2, 3 and 4, etc. (odd, then even register addresses) are paired to form a word.
Parameters:
num
Slave number (0-3)
Returns:
Current word pair grouping order offset for specified slave
See also: mpu_RA_I2C_SLV0_CTRL
function mpu_getSlaveWriteMode
bool mpu_getSlaveWriteMode (
uint8_t num
)
Get write mode for the specified slave (0-3). When set to 1, the transaction will read or write data only. When cleared to 0, the transaction will write a register address prior to reading or writing data. This should equal 0 when specifying the register address within the Slave device to/from which the ensuing data transaction will take place.
Parameters:
num
Slave number (0-3)
Returns:
Current write mode for specified slave (0 = register address + data, 1 = data only)
See also: mpu_RA_I2C_SLV0_CTRL
function mpu_getSleepEnabled
bool mpu_getSleepEnabled ()
Get sleep mode status. Setting the SLEEP bit in the register puts the device into very low power sleep mode. In this mode, only the serial interface and internal registers remain active, allowing for a very low standby current. Clearing this bit puts the device back into normal mode. To save power, the individual standby selections for each of the gyros should be used if any gyro axis is not used by the application.
Returns:
Current sleep mode enabled status
See also: mpu_RA_PWR_MGMT_1
See also: mpu_PWR1_SLEEP_BIT
function mpu_getStandbyXAccelEnabled
bool mpu_getStandbyXAccelEnabled ()
function mpu_getStandbyXGyroEnabled
bool mpu_getStandbyXGyroEnabled ()
function mpu_getStandbyYAccelEnabled
bool mpu_getStandbyYAccelEnabled ()
function mpu_getStandbyYGyroEnabled
bool mpu_getStandbyYGyroEnabled ()
function mpu_getStandbyZAccelEnabled
bool mpu_getStandbyZAccelEnabled ()
function mpu_getStandbyZGyroEnabled
bool mpu_getStandbyZGyroEnabled ()
function mpu_getTempFIFOEnabled
bool mpu_getTempFIFOEnabled ()
Get temperature FIFO enabled value. When set to 1, this bit enables TEMP_OUT_H and TEMP_OUT_L (Registers 65 and 66) to be written into the FIFO mpu6050.buffer.
Returns:
Current temperature FIFO enabled value
See also: mpu_RA_FIFO_EN
function mpu_getTempSensorEnabled
bool mpu_getTempSensorEnabled ()
Get temperature sensor enabled status. Control the usage of the internal temperature sensor.
Note: this register stores the disabled value, but for consistency with the rest of the code, the function is named and used with standard true/false values to indicate whether the sensor is enabled or disabled, respectively.
Returns:
Current temperature sensor enabled status
See also: mpu_RA_PWR_MGMT_1
See also: mpu_PWR1_TEMP_DIS_BIT
function mpu_getTemperature
int16_t mpu_getTemperature ()
Get current internal temperature.
Returns:
Temperature reading in 16-bit 2's complement format
See also: mpu_RA_TEMP_OUT_H
function mpu_getWaitForExternalSensorEnabled
bool mpu_getWaitForExternalSensorEnabled ()
Get wait-for-external-sensor-data enabled value. When the WAIT_FOR_ES bit is set to 1, the Data Ready interrupt will be delayed until External Sensor data from the Slave Devices are loaded into the EXT_SENS_DATA registers. This is used to ensure that both the internal sensor data (i.e. from gyro and accel) and external sensor data have been loaded to their respective data registers (i.e. the data is synced) when the Data Ready interrupt is triggered.
Returns:
Current wait-for-external-sensor-data enabled value
See also: mpu_RA_I2C_MST_CTRL
function mpu_getWakeCycleEnabled
bool mpu_getWakeCycleEnabled ()
Get wake cycle enabled status. When this bit is set to 1 and SLEEP is disabled, the MPU-60X0 will cycle between sleep mode and waking up to take a single sample of data from active sensors at a rate determined by LP_WAKE_CTRL (register 108).
Returns:
Current sleep mode enabled status
See also: mpu_RA_PWR_MGMT_1
See also: mpu_PWR1_CYCLE_BIT
function mpu_getWakeFrequency
uint8_t mpu_getWakeFrequency ()
function mpu_getXAccelOffset
int16_t mpu_getXAccelOffset ()
function mpu_getXGyroFIFOEnabled
bool mpu_getXGyroFIFOEnabled ()
Get gyroscope X-axis FIFO enabled value. When set to 1, this bit enables GYRO_XOUT_H and GYRO_XOUT_L (Registers 67 and 68) to be written into the FIFO mpu6050.buffer.
Returns:
Current gyroscope X-axis FIFO enabled value
See also: mpu_RA_FIFO_EN
function mpu_getXGyroOffset
int16_t mpu_getXGyroOffset ()
function mpu_getXNegMotionDetected
bool mpu_getXNegMotionDetected ()
Get X-axis negative motion detection interrupt status.
Returns:
Motion detection status
See also: mpu_RA_MOT_DETECT_STATUS
See also: mpu_MOTION_MOT_XNEG_BIT
function mpu_getXPosMotionDetected
bool mpu_getXPosMotionDetected ()
Get X-axis positive motion detection interrupt status.
Returns:
Motion detection status
See also: mpu_RA_MOT_DETECT_STATUS
See also: mpu_MOTION_MOT_XPOS_BIT
function mpu_getYAccelOffset
int16_t mpu_getYAccelOffset ()
function mpu_getYGyroFIFOEnabled
bool mpu_getYGyroFIFOEnabled ()
Get gyroscope Y-axis FIFO enabled value. When set to 1, this bit enables GYRO_YOUT_H and GYRO_YOUT_L (Registers 69 and 70) to be written into the FIFO mpu6050.buffer.
Returns:
Current gyroscope Y-axis FIFO enabled value
See also: mpu_RA_FIFO_EN
function mpu_getYGyroOffset
int16_t mpu_getYGyroOffset ()
function mpu_getYNegMotionDetected
bool mpu_getYNegMotionDetected ()
Get Y-axis negative motion detection interrupt status.
Returns:
Motion detection status
See also: mpu_RA_MOT_DETECT_STATUS
See also: mpu_MOTION_MOT_YNEG_BIT
function mpu_getYPosMotionDetected
bool mpu_getYPosMotionDetected ()
Get Y-axis positive motion detection interrupt status.
Returns:
Motion detection status
See also: mpu_RA_MOT_DETECT_STATUS
See also: mpu_MOTION_MOT_YPOS_BIT
function mpu_getZAccelOffset
int16_t mpu_getZAccelOffset ()
function mpu_getZGyroFIFOEnabled
bool mpu_getZGyroFIFOEnabled ()
Get gyroscope Z-axis FIFO enabled value. When set to 1, this bit enables GYRO_ZOUT_H and GYRO_ZOUT_L (Registers 71 and 72) to be written into the FIFO mpu6050.buffer.
Returns:
Current gyroscope Z-axis FIFO enabled value
See also: mpu_RA_FIFO_EN
function mpu_getZGyroOffset
int16_t mpu_getZGyroOffset ()
function mpu_getZNegMotionDetected
bool mpu_getZNegMotionDetected ()
Get Z-axis negative motion detection interrupt status.
Returns:
Motion detection status
See also: mpu_RA_MOT_DETECT_STATUS
See also: mpu_MOTION_MOT_ZNEG_BIT
function mpu_getZPosMotionDetected
bool mpu_getZPosMotionDetected ()
Get Z-axis positive motion detection interrupt status.
Returns:
Motion detection status
See also: mpu_RA_MOT_DETECT_STATUS
See also: mpu_MOTION_MOT_ZPOS_BIT
function mpu_getZeroMotionDetected
bool mpu_getZeroMotionDetected ()
Get zero motion detection interrupt status.
Returns:
Motion detection status
See also: mpu_RA_MOT_DETECT_STATUS
See also: mpu_MOTION_MOT_ZRMOT_BIT
function mpu_getZeroMotionDetectionDuration
uint8_t mpu_getZeroMotionDetectionDuration ()
Get zero motion detection event duration threshold. This register configures the duration counter threshold for Zero Motion interrupt generation. The duration counter ticks at 16 Hz, therefore ZRMOT_DUR has a unit of 1 LSB = 64 ms. The Zero Motion duration counter increments while the absolute value of the accelerometer measurements are each less than the detection threshold (Register 33). The Zero Motion interrupt is triggered when the Zero Motion duration counter reaches the time count specified in this register.
For more details on the Zero Motion detection interrupt, see Section 8.4 of the MPU-6000/MPU-6050 Product Specification document, as well as Registers 56 and 58 of this document.
Returns:
Current zero motion detection duration threshold value (LSB = 64ms)
See also: mpu_RA_ZRMOT_DUR
function mpu_getZeroMotionDetectionThreshold
uint8_t mpu_getZeroMotionDetectionThreshold ()
Get zero motion detection event acceleration threshold. This register configures the detection threshold for Zero Motion interrupt generation. The unit of ZRMOT_THR is 1LSB = 2mg. Zero Motion is detected when the absolute value of the accelerometer measurements for the 3 axes are each less than the detection threshold. This condition increments the Zero Motion duration counter (Register 34). The Zero Motion interrupt is triggered when the Zero Motion duration counter reaches the time count specified in ZRMOT_DUR (Register 34).
Unlike Free Fall or Motion detection, Zero Motion detection triggers an interrupt both when Zero Motion is first detected and when Zero Motion is no longer detected.
When a zero motion event is detected, a Zero Motion Status will be indicated in the MOT_DETECT_STATUS register (Register 97). When a motion-to-zero-motion condition is detected, the status bit is set to 1. When a zero-motion-to- motion condition is detected, the status bit is set to 0.
For more details on the Zero Motion detection interrupt, see Section 8.4 of the MPU-6000/MPU-6050 Product Specification document as well as Registers 56 and 58 of this document.
Returns:
Current zero motion detection acceleration threshold value (LSB = 2mg)
See also: mpu_RA_ZRMOT_THR
function mpu_readMemoryBlock
void mpu_readMemoryBlock (
uint8_t * data,
uint16_t dataSize,
uint8_t bank,
uint8_t address
)
function mpu_readMemoryByte
uint8_t mpu_readMemoryByte ()
function mpu_reset
void mpu_reset ()
Trigger a full device reset. A small delay of ~50ms may be desirable after triggering a reset.
See also: mpu_RA_PWR_MGMT_1
See also: mpu_PWR1_DEVICE_RESET_BIT
function mpu_resetAccelerometerPath
void mpu_resetAccelerometerPath ()
Reset accelerometer signal path. The reset will revert the signal path analog to digital converters and filters to their power up configurations.
See also: mpu_RA_SIGNAL_PATH_RESET
See also: mpu_PATHRESET_ACCEL_RESET_BIT
function mpu_resetDMP
void mpu_resetDMP ()
function mpu_resetFIFO
void mpu_resetFIFO ()
Reset the FIFO. This bit resets the FIFO mpu6050.buffer when set to 1 while FIFO_EN equals 0. This bit automatically clears to 0 after the reset has been triggered.
See also: mpu_RA_USER_CTRL
See also: mpu_USERCTRL_FIFO_RESET_BIT
function mpu_resetGyroscopePath
void mpu_resetGyroscopePath ()
Reset gyroscope signal path. The reset will revert the signal path analog to digital converters and filters to their power up configurations.
See also: mpu_RA_SIGNAL_PATH_RESET
See also: mpu_PATHRESET_GYRO_RESET_BIT
function mpu_resetI2CMaster
void mpu_resetI2CMaster ()
Reset the I2C Master. This bit resets the I2C Master when set to 1 while I2C_MST_EN equals 0. This bit automatically clears to 0 after the reset has been triggered.
See also: mpu_RA_USER_CTRL
See also: mpu_USERCTRL_I2C_MST_RESET_BIT
function mpu_resetSensors
void mpu_resetSensors ()
Reset all sensor registers and signal paths. When set to 1, this bit resets the signal paths for all sensors (gyroscopes, accelerometers, and temperature sensor). This operation will also clear the sensor registers. This bit automatically clears to 0 after the reset has been triggered.
When resetting only the signal path (and not the sensor registers), please use Register 104, SIGNAL_PATH_RESET.
See also: mpu_RA_USER_CTRL
See also: mpu_USERCTRL_SIG_COND_RESET_BIT
function mpu_resetTemperaturePath
void mpu_resetTemperaturePath ()
Reset temperature sensor signal path. The reset will revert the signal path analog to digital converters and filters to their power up configurations.
See also: mpu_RA_SIGNAL_PATH_RESET
See also: mpu_PATHRESET_TEMP_RESET_BIT
function mpu_setAccelFIFOEnabled
void mpu_setAccelFIFOEnabled (
bool enabled
)
Set accelerometer FIFO enabled value.
Parameters:
enabled
New accelerometer FIFO enabled value
See also: getAccelFIFOEnabled()
See also: mpu_RA_FIFO_EN
function mpu_setAccelXSelfTest
void mpu_setAccelXSelfTest (
bool enabled
)
Get self-test enabled setting for accelerometer X axis.
Parameters:
enabled
Self-test enabled value
See also: mpu_RA_ACCEL_CONFIG
function mpu_setAccelYSelfTest
void mpu_setAccelYSelfTest (
bool enabled
)
Get self-test enabled value for accelerometer Y axis.
Parameters:
enabled
Self-test enabled value
See also: mpu_RA_ACCEL_CONFIG
function mpu_setAccelZSelfTest
void mpu_setAccelZSelfTest (
bool enabled
)
Set self-test enabled value for accelerometer Z axis.
Parameters:
enabled
Self-test enabled value
See also: mpu_RA_ACCEL_CONFIG
function mpu_setAccelerometerPowerOnDelay
void mpu_setAccelerometerPowerOnDelay (
uint8_t delay
)
Set accelerometer power-on delay.
Parameters:
delay
New accelerometer power-on delay (0-3)
See also: getAccelerometerPowerOnDelay()
See also: mpu_RA_MOT_DETECT_CTRL
See also: mpu_DETECT_ACCEL_ON_DELAY_BIT
function mpu_setAuxVDDIOLevel
void mpu_setAuxVDDIOLevel (
uint8_t level
)
Set the auxiliary I2C supply voltage level. When set to 1, the auxiliary I2C bus high logic level is VDD. When cleared to 0, the auxiliary I2C bus high logic level is VLOGIC. This does not apply to the MPU-6000, which does not have a VLOGIC pin.
Parameters:
level
I2C supply voltage level (0=VLOGIC, 1=VDD)
function mpu_setClockOutputEnabled
void mpu_setClockOutputEnabled (
bool enabled
)
Set reference clock output enabled status. When this bit is equal to 1, a reference clock output is provided at the CLKOUT pin. When this bit is equal to 0, the clock output is disabled. For further information regarding CLKOUT, please refer to the MPU-60X0 Product Specification document.
Parameters:
enabled
New reference clock output enabled status
See also: mpu_RA_INT_PIN_CFG
See also: mpu_INTCFG_CLKOUT_EN_BIT
function mpu_setClockSource
void mpu_setClockSource (
uint8_t source
)
Set clock source setting. An internal 8MHz oscillator, gyroscope based clock, or external sources can be selected as the MPU-60X0 clock source. When the internal 8 MHz oscillator or an external source is chosen as the clock source, the MPU-60X0 can operate in low power modes with the gyroscopes disabled.
Upon power up, the MPU-60X0 clock source defaults to the internal oscillator. However, it is highly recommended that the device be configured to use one of the gyroscopes (or an external clock source) as the clock reference for improved stability. The clock source can be selected according to the following table:
Parameters:
source
New clock source setting
See also: getClockSource()
See also: mpu_RA_PWR_MGMT_1
See also: mpu_PWR1_CLKSEL_BIT
See also: mpu_PWR1_CLKSEL_LENGTH
function mpu_setDHPFMode
void mpu_setDHPFMode (
uint8_t mode
)
Set the high-pass filter configuration.
Parameters:
bandwidth
New high-pass filter configuration
See also: setDHPFMode()
See also: mpu_DHPF_RESET
See also: mpu_RA_ACCEL_CONFIG
function mpu_setDLPFMode
void mpu_setDLPFMode (
uint8_t bandwidth
)
Set digital low-pass filter configuration.
Parameters:
mode
New DLFP configuration setting
See also: getDLPFBandwidth()
See also: mpu_DLPF_BW_256
See also: mpu_RA_CONFIG
See also: mpu_CFG_DLPF_CFG_BIT
See also: mpu_CFG_DLPF_CFG_LENGTH
function mpu_setDMPConfig1
void mpu_setDMPConfig1 (
uint8_t config
)
function mpu_setDMPConfig2
void mpu_setDMPConfig2 (
uint8_t config
)
function mpu_setDMPEnabled
void mpu_setDMPEnabled (
bool enabled
)
function mpu_setDeviceID
void mpu_setDeviceID (
uint8_t id
)
function mpu_setExternalFrameSync
void mpu_setExternalFrameSync (
uint8_t sync
)
Set external FSYNC configuration.
See also: getExternalFrameSync()
See also: mpu_RA_CONFIG
Parameters:
sync
New FSYNC configuration value
function mpu_setExternalShadowDelayEnabled
void mpu_setExternalShadowDelayEnabled (
bool enabled
)
Set external data shadow delay enabled status.
Parameters:
enabled
New external data shadow delay enabled status.
See also: getExternalShadowDelayEnabled()
See also: mpu_RA_I2C_MST_DELAY_CTRL
See also: mpu_DELAYCTRL_DELAY_ES_SHADOW_BIT
function mpu_setFIFOByte
void mpu_setFIFOByte (
uint8_t data
)
function mpu_setFIFOEnabled
void mpu_setFIFOEnabled (
bool enabled
)
Set FIFO enabled status.
Parameters:
enabled
New FIFO enabled status
See also: getFIFOEnabled()
See also: mpu_RA_USER_CTRL
See also: mpu_USERCTRL_FIFO_EN_BIT
function mpu_setFSyncInterruptEnabled
void mpu_setFSyncInterruptEnabled (
bool enabled
)
Set FSYNC pin interrupt enabled setting.
Parameters:
enabled
New FSYNC pin interrupt enabled setting
See also: getFSyncInterruptEnabled()
See also: mpu_RA_INT_PIN_CFG
See also: mpu_INTCFG_FSYNC_INT_EN_BIT
function mpu_setFSyncInterruptLevel
void mpu_setFSyncInterruptLevel (
bool level
)
Set FSYNC interrupt logic level mode.
Parameters:
mode
New FSYNC interrupt mode (0=active-high, 1=active-low)
See also: getFSyncInterruptMode()
See also: mpu_RA_INT_PIN_CFG
See also: mpu_INTCFG_FSYNC_INT_LEVEL_BIT
function mpu_setFreefallDetectionCounterDecrement
void mpu_setFreefallDetectionCounterDecrement (
uint8_t decrement
)
Set Free Fall detection counter decrement configuration.
Parameters:
decrement
New decrement configuration value
See also: getFreefallDetectionCounterDecrement()
See also: mpu_RA_MOT_DETECT_CTRL
See also: mpu_DETECT_FF_COUNT_BIT
function mpu_setFreefallDetectionDuration
void mpu_setFreefallDetectionDuration (
uint8_t duration
)
Get free-fall event duration threshold.
Parameters:
duration
New free-fall duration threshold value (LSB = 1ms)
See also: getFreefallDetectionDuration()
See also: mpu_RA_FF_DUR
function mpu_setFreefallDetectionThreshold
void mpu_setFreefallDetectionThreshold (
uint8_t threshold
)
Get free-fall event acceleration threshold.
Parameters:
threshold
New free-fall acceleration threshold value (LSB = 2mg)
See also: getFreefallDetectionThreshold()
See also: mpu_RA_FF_THR
function mpu_setFullScaleAccelRange
void mpu_setFullScaleAccelRange (
uint8_t range
)
Set full-scale accelerometer range.
Parameters:
range
New full-scale accelerometer range setting
See also: getFullScaleAccelRange()
function mpu_setFullScaleGyroRange
void mpu_setFullScaleGyroRange (
uint8_t range
)
Set full-scale gyroscope range.
Parameters:
range
New full-scale gyroscope range value
See also: getFullScaleRange()
See also: mpu_GYRO_FS_250
See also: mpu_RA_GYRO_CONFIG
See also: mpu_GCONFIG_FS_SEL_BIT
See also: mpu_GCONFIG_FS_SEL_LENGTH
function mpu_setI2CBypassEnabled
void mpu_setI2CBypassEnabled (
bool enabled
)
Set I2C bypass enabled status. When this bit is equal to 1 and I2C_MST_EN (Register 106 bit[5]) is equal to 0, the host application processor will be able to directly access the auxiliary I2C bus of the MPU-60X0. When this bit is equal to 0, the host application processor will not be able to directly access the auxiliary I2C bus of the MPU-60X0 regardless of the state of I2C_MST_EN (Register 106 bit[5]).
Parameters:
enabled
New I2C bypass enabled status
See also: mpu_RA_INT_PIN_CFG
See also: mpu_INTCFG_I2C_BYPASS_EN_BIT
function mpu_setI2CMasterModeEnabled
void mpu_setI2CMasterModeEnabled (
bool enabled
)
Set I2C Master Mode enabled status.
Parameters:
enabled
New I2C Master Mode enabled status
See also: getI2CMasterModeEnabled()
See also: mpu_RA_USER_CTRL
See also: mpu_USERCTRL_I2C_MST_EN_BIT
function mpu_setIntDMPEnabled
void mpu_setIntDMPEnabled (
bool enabled
)
function mpu_setIntDataReadyEnabled
void mpu_setIntDataReadyEnabled (
bool enabled
)
Set Data Ready interrupt enabled status.
Parameters:
enabled
New interrupt enabled status
See also: getIntDataReadyEnabled()
See also: mpu_RA_INT_CFG
See also: mpu_INTERRUPT_DATA_RDY_BIT
function mpu_setIntEnabled
void mpu_setIntEnabled (
uint8_t enabled
)
Set full interrupt enabled status. Full register byte for all interrupts, for quick reading. Each bit should be set 0 for disabled, 1 for enabled.
Parameters:
enabled
New interrupt enabled status
See also: getIntFreefallEnabled()
See also: mpu_RA_INT_ENABLE
See also: mpu_INTERRUPT_FF_BIT
function mpu_setIntFIFOBufferOverflowEnabled
void mpu_setIntFIFOBufferOverflowEnabled (
bool enabled
)
Set FIFO Buffer Overflow interrupt enabled status.
Parameters:
enabled
New interrupt enabled status
See also: getIntFIFOBufferOverflowEnabled()
See also: mpu_RA_INT_ENABLE
See also: mpu_INTERRUPT_FIFO_OFLOW_BIT
function mpu_setIntFreefallEnabled
void mpu_setIntFreefallEnabled (
bool enabled
)
Set Free Fall interrupt enabled status.
Parameters:
enabled
New interrupt enabled status
See also: getIntFreefallEnabled()
See also: mpu_RA_INT_ENABLE
See also: mpu_INTERRUPT_FF_BIT
function mpu_setIntI2CMasterEnabled
void mpu_setIntI2CMasterEnabled (
bool enabled
)
Set I2C Master interrupt enabled status.
Parameters:
enabled
New interrupt enabled status
See also: getIntI2CMasterEnabled()
See also: mpu_RA_INT_ENABLE
See also: mpu_INTERRUPT_I2C_MST_INT_BIT
function mpu_setIntMotionEnabled
void mpu_setIntMotionEnabled (
bool enabled
)
Set Motion Detection interrupt enabled status.
Parameters:
enabled
New interrupt enabled status
See also: getIntMotionEnabled()
See also: mpu_RA_INT_ENABLE
See also: mpu_INTERRUPT_MOT_BIT
function mpu_setIntPLLReadyEnabled
void mpu_setIntPLLReadyEnabled (
bool enabled
)
function mpu_setIntZeroMotionEnabled
void mpu_setIntZeroMotionEnabled (
bool enabled
)
Set Zero Motion Detection interrupt enabled status.
Parameters:
enabled
New interrupt enabled status
See also: getIntZeroMotionEnabled()
See also: mpu_RA_INT_ENABLE
See also: mpu_INTERRUPT_ZMOT_BIT
function mpu_setInterruptDrive
void mpu_setInterruptDrive (
bool drive
)
Set interrupt drive mode.
Parameters:
drive
New interrupt drive mode (0=push-pull, 1=open-drain)
See also: getInterruptDrive()
See also: mpu_RA_INT_PIN_CFG
See also: mpu_INTCFG_INT_OPEN_BIT
function mpu_setInterruptLatch
void mpu_setInterruptLatch (
bool latch
)
Set interrupt latch mode.
Parameters:
latch
New latch mode (0=50us-pulse, 1=latch-until-int-cleared)
See also: getInterruptLatch()
See also: mpu_RA_INT_PIN_CFG
See also: mpu_INTCFG_LATCH_INT_EN_BIT
function mpu_setInterruptLatchClear
void mpu_setInterruptLatchClear (
bool clear
)
Set interrupt latch clear mode.
Parameters:
clear
New latch clear mode (0=status-read-only, 1=any-register-read)
See also: getInterruptLatchClear()
See also: mpu_RA_INT_PIN_CFG
See also: mpu_INTCFG_INT_RD_CLEAR_BIT
function mpu_setInterruptMode
void mpu_setInterruptMode (
bool mode
)
Set interrupt logic level mode.
Parameters:
mode
New interrupt mode (0=active-high, 1=active-low)
See also: getInterruptMode()
See also: mpu_RA_INT_PIN_CFG
See also: mpu_INTCFG_INT_LEVEL_BIT
function mpu_setMasterClockSpeed
void mpu_setMasterClockSpeed (
uint8_t speed
)
Set I2C master clock speed. @reparam speed Current I2C master clock speed
See also: mpu_RA_I2C_MST_CTRL
function mpu_setMemoryBank
void mpu_setMemoryBank (
uint8_t bank,
bool prefetchEnabled,
bool userBank
)
function mpu_setMemoryStartAddress
void mpu_setMemoryStartAddress (
uint8_t address
)
function mpu_setMotionDetectionCounterDecrement
void mpu_setMotionDetectionCounterDecrement (
uint8_t decrement
)
Set Motion detection counter decrement configuration.
Parameters:
decrement
New decrement configuration value
See also: getMotionDetectionCounterDecrement()
See also: mpu_RA_MOT_DETECT_CTRL
See also: mpu_DETECT_MOT_COUNT_BIT
function mpu_setMotionDetectionDuration
void mpu_setMotionDetectionDuration (
uint8_t duration
)
Set motion detection event duration threshold.
Parameters:
duration
New motion detection duration threshold value (LSB = 1ms)
See also: getMotionDetectionDuration()
See also: mpu_RA_MOT_DUR
function mpu_setMotionDetectionThreshold
void mpu_setMotionDetectionThreshold (
uint8_t threshold
)
Set free-fall event acceleration threshold.
Parameters:
threshold
New motion detection acceleration threshold value (LSB = 2mg)
See also: getMotionDetectionThreshold()
See also: mpu_RA_MOT_THR
function mpu_setMultiMasterEnabled
void mpu_setMultiMasterEnabled (
bool enabled
)
Set multi-master enabled value.
Parameters:
enabled
New multi-master enabled value
See also: getMultiMasterEnabled()
See also: mpu_RA_I2C_MST_CTRL
function mpu_setOTPBankValid
void mpu_setOTPBankValid (
bool enabled
)
function mpu_setRate
void mpu_setRate (
uint8_t rate
)
Set gyroscope sample rate divider.
Parameters:
rate
New sample rate divider
See also: getRate()
See also: mpu_RA_SMPLRT_DIV
function mpu_setSlave0FIFOEnabled
void mpu_setSlave0FIFOEnabled (
bool enabled
)
Set Slave 0 FIFO enabled value.
Parameters:
enabled
New Slave 0 FIFO enabled value
See also: getSlave0FIFOEnabled()
See also: mpu_RA_FIFO_EN
function mpu_setSlave1FIFOEnabled
void mpu_setSlave1FIFOEnabled (
bool enabled
)
Set Slave 1 FIFO enabled value.
Parameters:
enabled
New Slave 1 FIFO enabled value
See also: getSlave1FIFOEnabled()
See also: mpu_RA_FIFO_EN
function mpu_setSlave2FIFOEnabled
void mpu_setSlave2FIFOEnabled (
bool enabled
)
Set Slave 2 FIFO enabled value.
Parameters:
enabled
New Slave 2 FIFO enabled value
See also: getSlave2FIFOEnabled()
See also: mpu_RA_FIFO_EN
function mpu_setSlave3FIFOEnabled
void mpu_setSlave3FIFOEnabled (
bool enabled
)
Set Slave 3 FIFO enabled value.
Parameters:
enabled
New Slave 3 FIFO enabled value
See also: getSlave3FIFOEnabled()
See also: mpu_RA_MST_CTRL
function mpu_setSlave4Address
void mpu_setSlave4Address (
uint8_t address
)
Set the I2C address of Slave 4.
Parameters:
address
New address for Slave 4
See also: getSlave4Address()
See also: mpu_RA_I2C_SLV4_ADDR
function mpu_setSlave4Enabled
void mpu_setSlave4Enabled (
bool enabled
)
Set the enabled value for Slave 4.
Parameters:
enabled
New enabled value for Slave 4
See also: getSlave4Enabled()
See also: mpu_RA_I2C_SLV4_CTRL
function mpu_setSlave4InterruptEnabled
void mpu_setSlave4InterruptEnabled (
bool enabled
)
Set the enabled value for Slave 4 transaction interrupts.
Parameters:
enabled
New enabled value for Slave 4 transaction interrupts.
See also: getSlave4InterruptEnabled()
See also: mpu_RA_I2C_SLV4_CTRL
function mpu_setSlave4MasterDelay
void mpu_setSlave4MasterDelay (
uint8_t delay
)
Set Slave 4 master delay value.
Parameters:
delay
New Slave 4 master delay value
See also: getSlave4MasterDelay()
See also: mpu_RA_I2C_SLV4_CTRL
function mpu_setSlave4OutputByte
void mpu_setSlave4OutputByte (
uint8_t data
)
Set new byte to write to Slave 4. This register stores the data to be written into the Slave 4. If I2C_SLV4_RW is set 1 (set to read), this register has no effect.
Parameters:
data
New byte to write to Slave 4
See also: mpu_RA_I2C_SLV4_DO
function mpu_setSlave4Register
void mpu_setSlave4Register (
uint8_t reg
)
Set the active internal register for Slave 4.
Parameters:
reg
New active register for Slave 4
See also: getSlave4Register()
See also: mpu_RA_I2C_SLV4_REG
function mpu_setSlave4WriteMode
void mpu_setSlave4WriteMode (
bool mode
)
Set write mode for the Slave 4.
Parameters:
mode
New write mode for Slave 4 (0 = register address + data, 1 = data only)
See also: getSlave4WriteMode()
See also: mpu_RA_I2C_SLV4_CTRL
function mpu_setSlaveAddress
void mpu_setSlaveAddress (
uint8_t num,
uint8_t address
)
Set the I2C address of the specified slave (0-3).
Parameters:
num
Slave number (0-3)address
New address for specified slave
See also: getSlaveAddress()
See also: mpu_RA_I2C_SLV0_ADDR
function mpu_setSlaveDataLength
void mpu_setSlaveDataLength (
uint8_t num,
uint8_t length
)
Set number of bytes to read for the specified slave (0-3).
Parameters:
num
Slave number (0-3)length
Number of bytes to read for specified slave
See also: getSlaveDataLength()
See also: mpu_RA_I2C_SLV0_CTRL
function mpu_setSlaveDelayEnabled
void mpu_setSlaveDelayEnabled (
uint8_t num,
bool enabled
)
Set slave delay enabled status.
Parameters:
num
Slave number (0-4)enabled
New slave delay enabled status.
See also: mpu_RA_I2C_MST_DELAY_CTRL
See also: mpu_DELAYCTRL_I2C_SLV0_DLY_EN_BIT
function mpu_setSlaveEnabled
void mpu_setSlaveEnabled (
uint8_t num,
bool enabled
)
Set the enabled value for the specified slave (0-3).
Parameters:
num
Slave number (0-3)enabled
New enabled value for specified slave
See also: getSlaveEnabled()
See also: mpu_RA_I2C_SLV0_CTRL
function mpu_setSlaveOutputByte
void mpu_setSlaveOutputByte (
uint8_t num,
uint8_t data
)
Write byte to Data Output container for specified slave. This register holds the output data written into Slave when Slave is set to write mode. For further information regarding Slave control, please refer to Registers 37 to 39 and immediately following.
Parameters:
num
Slave number (0-3)data
Byte to write
See also: mpu_RA_I2C_SLV0_DO
function mpu_setSlaveReadWriteTransitionEnabled
void mpu_setSlaveReadWriteTransitionEnabled (
bool enabled
)
Set slave read/write transition enabled value.
Parameters:
enabled
New slave read/write transition enabled value
See also: getSlaveReadWriteTransitionEnabled()
See also: mpu_RA_I2C_MST_CTRL
function mpu_setSlaveRegister
void mpu_setSlaveRegister (
uint8_t num,
uint8_t reg
)
Set the active internal register for the specified slave (0-3).
Parameters:
num
Slave number (0-3)reg
New active register for specified slave
See also: getSlaveRegister()
See also: mpu_RA_I2C_SLV0_REG
function mpu_setSlaveWordByteSwap
void mpu_setSlaveWordByteSwap (
uint8_t num,
bool enabled
)
Set word pair byte-swapping enabled for the specified slave (0-3).
Parameters:
num
Slave number (0-3)enabled
New word pair byte-swapping enabled value for specified slave
See also: getSlaveWordByteSwap()
See also: mpu_RA_I2C_SLV0_CTRL
function mpu_setSlaveWordGroupOffset
void mpu_setSlaveWordGroupOffset (
uint8_t num,
bool enabled
)
Set word pair grouping order offset for the specified slave (0-3).
Parameters:
num
Slave number (0-3)enabled
New word pair grouping order offset for specified slave
See also: getSlaveWordGroupOffset()
See also: mpu_RA_I2C_SLV0_CTRL
function mpu_setSlaveWriteMode
void mpu_setSlaveWriteMode (
uint8_t num,
bool mode
)
Set write mode for the specified slave (0-3).
Parameters:
num
Slave number (0-3)mode
New write mode for specified slave (0 = register address + data, 1 = data only)
See also: getSlaveWriteMode()
See also: mpu_RA_I2C_SLV0_CTRL
function mpu_setSleepEnabled
void mpu_setSleepEnabled (
bool enabled
)
Set sleep mode status.
Parameters:
enabled
New sleep mode enabled status
See also: getSleepEnabled()
See also: mpu_RA_PWR_MGMT_1
See also: mpu_PWR1_SLEEP_BIT
function mpu_setStandbyXAccelEnabled
void mpu_setStandbyXAccelEnabled (
bool enabled
)
function mpu_setStandbyXGyroEnabled
void mpu_setStandbyXGyroEnabled (
bool enabled
)
function mpu_setStandbyYAccelEnabled
void mpu_setStandbyYAccelEnabled (
bool enabled
)
function mpu_setStandbyYGyroEnabled
void mpu_setStandbyYGyroEnabled (
bool enabled
)
function mpu_setStandbyZAccelEnabled
void mpu_setStandbyZAccelEnabled (
bool enabled
)
function mpu_setStandbyZGyroEnabled
void mpu_setStandbyZGyroEnabled (
bool enabled
)
function mpu_setTempFIFOEnabled
void mpu_setTempFIFOEnabled (
bool enabled
)
Set temperature FIFO enabled value.
Parameters:
enabled
New temperature FIFO enabled value
See also: getTempFIFOEnabled()
See also: mpu_RA_FIFO_EN
function mpu_setTempSensorEnabled
void mpu_setTempSensorEnabled (
bool enabled
)
Set temperature sensor enabled status. Note: this register stores the disabled value, but for consistency with the rest of the code, the function is named and used with standard true/false values to indicate whether the sensor is enabled or disabled, respectively.
Parameters:
enabled
New temperature sensor enabled status
See also: getTempSensorEnabled()
See also: mpu_RA_PWR_MGMT_1
See also: mpu_PWR1_TEMP_DIS_BIT
function mpu_setWaitForExternalSensorEnabled
void mpu_setWaitForExternalSensorEnabled (
bool enabled
)
Set wait-for-external-sensor-data enabled value.
Parameters:
enabled
New wait-for-external-sensor-data enabled value
See also: getWaitForExternalSensorEnabled()
See also: mpu_RA_I2C_MST_CTRL
function mpu_setWakeCycleEnabled
void mpu_setWakeCycleEnabled (
bool enabled
)
Set wake cycle enabled status.
Parameters:
enabled
New sleep mode enabled status
See also: getWakeCycleEnabled()
See also: mpu_RA_PWR_MGMT_1
See also: mpu_PWR1_CYCLE_BIT
function mpu_setWakeFrequency
void mpu_setWakeFrequency (
uint8_t frequency
)
function mpu_setXAccelOffset
void mpu_setXAccelOffset (
int16_t offset
)
function mpu_setXFineGain
void mpu_setXFineGain (
int8_t gain
)
function mpu_setXGyroFIFOEnabled
void mpu_setXGyroFIFOEnabled (
bool enabled
)
Set gyroscope X-axis FIFO enabled value.
Parameters:
enabled
New gyroscope X-axis FIFO enabled value
See also: getXGyroFIFOEnabled()
See also: mpu_RA_FIFO_EN
function mpu_setXGyroOffset
void mpu_setXGyroOffset (
int16_t offset
)
function mpu_setXGyroOffsetTC
void mpu_setXGyroOffsetTC (
int8_t offset
)
function mpu_setYAccelOffset
void mpu_setYAccelOffset (
int16_t offset
)
function mpu_setYFineGain
void mpu_setYFineGain (
int8_t gain
)
function mpu_setYGyroFIFOEnabled
void mpu_setYGyroFIFOEnabled (
bool enabled
)
Set gyroscope Y-axis FIFO enabled value.
Parameters:
enabled
New gyroscope Y-axis FIFO enabled value
See also: getYGyroFIFOEnabled()
See also: mpu_RA_FIFO_EN
function mpu_setYGyroOffset
void mpu_setYGyroOffset (
int16_t offset
)
function mpu_setYGyroOffsetTC
void mpu_setYGyroOffsetTC (
int8_t offset
)
function mpu_setZAccelOffset
void mpu_setZAccelOffset (
int16_t offset
)
function mpu_setZFineGain
void mpu_setZFineGain (
int8_t gain
)
function mpu_setZGyroFIFOEnabled
void mpu_setZGyroFIFOEnabled (
bool enabled
)
Set gyroscope Z-axis FIFO enabled value.
Parameters:
enabled
New gyroscope Z-axis FIFO enabled value
See also: getZGyroFIFOEnabled()
See also: mpu_RA_FIFO_EN
function mpu_setZGyroOffset
void mpu_setZGyroOffset (
int16_t offset
)
function mpu_setZGyroOffsetTC
void mpu_setZGyroOffsetTC (
int8_t offset
)
function mpu_setZeroMotionDetectionDuration
void mpu_setZeroMotionDetectionDuration (
uint8_t duration
)
Set zero motion detection event duration threshold.
Parameters:
duration
New zero motion detection duration threshold value (LSB = 1ms)
See also: getZeroMotionDetectionDuration()
See also: mpu_RA_ZRMOT_DUR
function mpu_setZeroMotionDetectionThreshold
void mpu_setZeroMotionDetectionThreshold (
uint8_t threshold
)
Set zero motion detection event acceleration threshold.
Parameters:
threshold
New zero motion detection acceleration threshold value (LSB = 2mg)
See also: getZeroMotionDetectionThreshold()
See also: mpu_RA_ZRMOT_THR
function mpu_switchSPIEnabled
void mpu_switchSPIEnabled (
bool enabled
)
Switch from I2C to SPI mode (MPU-6000 only) If this is set, the primary SPI interface will be enabled in place of the disabled primary I2C interface.
function mpu_testConnection
bool mpu_testConnection ()
Verify the I2C connection. Make sure the device is connected and responds as expected.
Returns:
True if connection is valid, false otherwise
function mpu_writeMemoryByte
void mpu_writeMemoryByte (
uint8_t data
)
Macro Definition Documentation
define mpu_ACCEL_FIFO_EN_BIT
#define mpu_ACCEL_FIFO_EN_BIT 3
define mpu_ACCEL_FS_16
#define mpu_ACCEL_FS_16 0x03
define mpu_ACCEL_FS_2
#define mpu_ACCEL_FS_2 0x00
define mpu_ACCEL_FS_4
#define mpu_ACCEL_FS_4 0x01
define mpu_ACCEL_FS_8
#define mpu_ACCEL_FS_8 0x02
define mpu_ACONFIG_ACCEL_HPF_BIT
#define mpu_ACONFIG_ACCEL_HPF_BIT 2
define mpu_ACONFIG_ACCEL_HPF_LENGTH
#define mpu_ACONFIG_ACCEL_HPF_LENGTH 3
define mpu_ACONFIG_AFS_SEL_BIT
#define mpu_ACONFIG_AFS_SEL_BIT 4
define mpu_ACONFIG_AFS_SEL_LENGTH
#define mpu_ACONFIG_AFS_SEL_LENGTH 2
define mpu_ACONFIG_XA_ST_BIT
#define mpu_ACONFIG_XA_ST_BIT 7
define mpu_ACONFIG_YA_ST_BIT
#define mpu_ACONFIG_YA_ST_BIT 6
define mpu_ACONFIG_ZA_ST_BIT
#define mpu_ACONFIG_ZA_ST_BIT 5
define mpu_ADDRESS_AD0_HIGH
#define mpu_ADDRESS_AD0_HIGH 0x69
define mpu_ADDRESS_AD0_LOW
#define mpu_ADDRESS_AD0_LOW 0x68
define mpu_BANKSEL_CFG_USER_BANK_BIT
#define mpu_BANKSEL_CFG_USER_BANK_BIT 5
define mpu_BANKSEL_MEM_SEL_BIT
#define mpu_BANKSEL_MEM_SEL_BIT 4
define mpu_BANKSEL_MEM_SEL_LENGTH
#define mpu_BANKSEL_MEM_SEL_LENGTH 5
define mpu_BANKSEL_PRFTCH_EN_BIT
#define mpu_BANKSEL_PRFTCH_EN_BIT 6
define mpu_CFG_DLPF_CFG_BIT
#define mpu_CFG_DLPF_CFG_BIT 2
define mpu_CFG_DLPF_CFG_LENGTH
#define mpu_CFG_DLPF_CFG_LENGTH 3
define mpu_CFG_EXT_SYNC_SET_BIT
#define mpu_CFG_EXT_SYNC_SET_BIT 5
define mpu_CFG_EXT_SYNC_SET_LENGTH
#define mpu_CFG_EXT_SYNC_SET_LENGTH 3
define mpu_CLOCK_DIV_258
#define mpu_CLOCK_DIV_258 0x8
define mpu_CLOCK_DIV_267
#define mpu_CLOCK_DIV_267 0x7
define mpu_CLOCK_DIV_276
#define mpu_CLOCK_DIV_276 0x6
define mpu_CLOCK_DIV_286
#define mpu_CLOCK_DIV_286 0x5
define mpu_CLOCK_DIV_296
#define mpu_CLOCK_DIV_296 0x4
define mpu_CLOCK_DIV_308
#define mpu_CLOCK_DIV_308 0x3
define mpu_CLOCK_DIV_320
#define mpu_CLOCK_DIV_320 0x2
define mpu_CLOCK_DIV_333
#define mpu_CLOCK_DIV_333 0x1
define mpu_CLOCK_DIV_348
#define mpu_CLOCK_DIV_348 0x0
define mpu_CLOCK_DIV_364
#define mpu_CLOCK_DIV_364 0xF
define mpu_CLOCK_DIV_381
#define mpu_CLOCK_DIV_381 0xE
define mpu_CLOCK_DIV_400
#define mpu_CLOCK_DIV_400 0xD
define mpu_CLOCK_DIV_421
#define mpu_CLOCK_DIV_421 0xC
define mpu_CLOCK_DIV_444
#define mpu_CLOCK_DIV_444 0xB
define mpu_CLOCK_DIV_471
#define mpu_CLOCK_DIV_471 0xA
define mpu_CLOCK_DIV_500
#define mpu_CLOCK_DIV_500 0x9
define mpu_CLOCK_INTERNAL
#define mpu_CLOCK_INTERNAL 0x00
define mpu_CLOCK_KEEP_RESET
#define mpu_CLOCK_KEEP_RESET 0x07
define mpu_CLOCK_PLL_EXT19M
#define mpu_CLOCK_PLL_EXT19M 0x05
define mpu_CLOCK_PLL_EXT32K
#define mpu_CLOCK_PLL_EXT32K 0x04
define mpu_CLOCK_PLL_XGYRO
#define mpu_CLOCK_PLL_XGYRO 0x01
define mpu_CLOCK_PLL_YGYRO
#define mpu_CLOCK_PLL_YGYRO 0x02
define mpu_CLOCK_PLL_ZGYRO
#define mpu_CLOCK_PLL_ZGYRO 0x03
define mpu_DEFAULT_ADDRESS
#define mpu_DEFAULT_ADDRESS mpu_ADDRESS_AD0_LOW
define mpu_DELAYCTRL_DELAY_ES_SHADOW_BIT
#define mpu_DELAYCTRL_DELAY_ES_SHADOW_BIT 7
define mpu_DELAYCTRL_I2C_SLV0_DLY_EN_BIT
#define mpu_DELAYCTRL_I2C_SLV0_DLY_EN_BIT 0
define mpu_DELAYCTRL_I2C_SLV1_DLY_EN_BIT
#define mpu_DELAYCTRL_I2C_SLV1_DLY_EN_BIT 1
define mpu_DELAYCTRL_I2C_SLV2_DLY_EN_BIT
#define mpu_DELAYCTRL_I2C_SLV2_DLY_EN_BIT 2
define mpu_DELAYCTRL_I2C_SLV3_DLY_EN_BIT
#define mpu_DELAYCTRL_I2C_SLV3_DLY_EN_BIT 3
define mpu_DELAYCTRL_I2C_SLV4_DLY_EN_BIT
#define mpu_DELAYCTRL_I2C_SLV4_DLY_EN_BIT 4
define mpu_DETECT_ACCEL_ON_DELAY_BIT
#define mpu_DETECT_ACCEL_ON_DELAY_BIT 5
define mpu_DETECT_ACCEL_ON_DELAY_LENGTH
#define mpu_DETECT_ACCEL_ON_DELAY_LENGTH 2
define mpu_DETECT_DECREMENT_1
#define mpu_DETECT_DECREMENT_1 0x1
define mpu_DETECT_DECREMENT_2
#define mpu_DETECT_DECREMENT_2 0x2
define mpu_DETECT_DECREMENT_4
#define mpu_DETECT_DECREMENT_4 0x3
define mpu_DETECT_DECREMENT_RESET
#define mpu_DETECT_DECREMENT_RESET 0x0
define mpu_DETECT_FF_COUNT_BIT
#define mpu_DETECT_FF_COUNT_BIT 3
define mpu_DETECT_FF_COUNT_LENGTH
#define mpu_DETECT_FF_COUNT_LENGTH 2
define mpu_DETECT_MOT_COUNT_BIT
#define mpu_DETECT_MOT_COUNT_BIT 1
define mpu_DETECT_MOT_COUNT_LENGTH
#define mpu_DETECT_MOT_COUNT_LENGTH 2
define mpu_DHPF_0P63
#define mpu_DHPF_0P63 0x04
define mpu_DHPF_1P25
#define mpu_DHPF_1P25 0x03
define mpu_DHPF_2P5
#define mpu_DHPF_2P5 0x02
define mpu_DHPF_5
#define mpu_DHPF_5 0x01
define mpu_DHPF_HOLD
#define mpu_DHPF_HOLD 0x07
define mpu_DHPF_RESET
#define mpu_DHPF_RESET 0x00
define mpu_DLPF_BW_10
#define mpu_DLPF_BW_10 0x05
define mpu_DLPF_BW_188
#define mpu_DLPF_BW_188 0x01
define mpu_DLPF_BW_20
#define mpu_DLPF_BW_20 0x04
define mpu_DLPF_BW_256
#define mpu_DLPF_BW_256 0x00
define mpu_DLPF_BW_42
#define mpu_DLPF_BW_42 0x03
define mpu_DLPF_BW_5
#define mpu_DLPF_BW_5 0x06
define mpu_DLPF_BW_98
#define mpu_DLPF_BW_98 0x02
define mpu_DMPINT_0_BIT
#define mpu_DMPINT_0_BIT 0
define mpu_DMPINT_1_BIT
#define mpu_DMPINT_1_BIT 1
define mpu_DMPINT_2_BIT
#define mpu_DMPINT_2_BIT 2
define mpu_DMPINT_3_BIT
#define mpu_DMPINT_3_BIT 3
define mpu_DMPINT_4_BIT
#define mpu_DMPINT_4_BIT 4
define mpu_DMPINT_5_BIT
#define mpu_DMPINT_5_BIT 5
define mpu_DMP_MEMORY_BANKS
#define mpu_DMP_MEMORY_BANKS 8
define mpu_DMP_MEMORY_BANK_SIZE
#define mpu_DMP_MEMORY_BANK_SIZE 256
define mpu_DMP_MEMORY_CHUNK_SIZE
#define mpu_DMP_MEMORY_CHUNK_SIZE 16
define mpu_EXT_SYNC_ACCEL_XOUT_L
#define mpu_EXT_SYNC_ACCEL_XOUT_L 0x5
define mpu_EXT_SYNC_ACCEL_YOUT_L
#define mpu_EXT_SYNC_ACCEL_YOUT_L 0x6
define mpu_EXT_SYNC_ACCEL_ZOUT_L
#define mpu_EXT_SYNC_ACCEL_ZOUT_L 0x7
define mpu_EXT_SYNC_DISABLED
#define mpu_EXT_SYNC_DISABLED 0x0
define mpu_EXT_SYNC_GYRO_XOUT_L
#define mpu_EXT_SYNC_GYRO_XOUT_L 0x2
define mpu_EXT_SYNC_GYRO_YOUT_L
#define mpu_EXT_SYNC_GYRO_YOUT_L 0x3
define mpu_EXT_SYNC_GYRO_ZOUT_L
#define mpu_EXT_SYNC_GYRO_ZOUT_L 0x4
define mpu_EXT_SYNC_TEMP_OUT_L
#define mpu_EXT_SYNC_TEMP_OUT_L 0x1
define mpu_GCONFIG_FS_SEL_BIT
#define mpu_GCONFIG_FS_SEL_BIT 4
define mpu_GCONFIG_FS_SEL_LENGTH
#define mpu_GCONFIG_FS_SEL_LENGTH 2
define mpu_GYRO_FS_1000
#define mpu_GYRO_FS_1000 0x02
define mpu_GYRO_FS_2000
#define mpu_GYRO_FS_2000 0x03
define mpu_GYRO_FS_250
#define mpu_GYRO_FS_250 0x00
define mpu_GYRO_FS_500
#define mpu_GYRO_FS_500 0x01
define mpu_I2C_MST_CLK_BIT
#define mpu_I2C_MST_CLK_BIT 3
define mpu_I2C_MST_CLK_LENGTH
#define mpu_I2C_MST_CLK_LENGTH 4
define mpu_I2C_MST_P_NSR_BIT
#define mpu_I2C_MST_P_NSR_BIT 4
define mpu_I2C_SLV4_ADDR_BIT
#define mpu_I2C_SLV4_ADDR_BIT 6
define mpu_I2C_SLV4_ADDR_LENGTH
#define mpu_I2C_SLV4_ADDR_LENGTH 7
define mpu_I2C_SLV4_EN_BIT
#define mpu_I2C_SLV4_EN_BIT 7
define mpu_I2C_SLV4_INT_EN_BIT
#define mpu_I2C_SLV4_INT_EN_BIT 6
define mpu_I2C_SLV4_MST_DLY_BIT
#define mpu_I2C_SLV4_MST_DLY_BIT 4
define mpu_I2C_SLV4_MST_DLY_LENGTH
#define mpu_I2C_SLV4_MST_DLY_LENGTH 5
define mpu_I2C_SLV4_REG_DIS_BIT
#define mpu_I2C_SLV4_REG_DIS_BIT 5
define mpu_I2C_SLV4_RW_BIT
#define mpu_I2C_SLV4_RW_BIT 7
define mpu_I2C_SLV_ADDR_BIT
#define mpu_I2C_SLV_ADDR_BIT 6
define mpu_I2C_SLV_ADDR_LENGTH
#define mpu_I2C_SLV_ADDR_LENGTH 7
define mpu_I2C_SLV_BYTE_SW_BIT
#define mpu_I2C_SLV_BYTE_SW_BIT 6
define mpu_I2C_SLV_EN_BIT
#define mpu_I2C_SLV_EN_BIT 7
define mpu_I2C_SLV_GRP_BIT
#define mpu_I2C_SLV_GRP_BIT 4
define mpu_I2C_SLV_LEN_BIT
#define mpu_I2C_SLV_LEN_BIT 3
define mpu_I2C_SLV_LEN_LENGTH
#define mpu_I2C_SLV_LEN_LENGTH 4
define mpu_I2C_SLV_REG_DIS_BIT
#define mpu_I2C_SLV_REG_DIS_BIT 5
define mpu_I2C_SLV_RW_BIT
#define mpu_I2C_SLV_RW_BIT 7
define mpu_INTCFG_CLKOUT_EN_BIT
#define mpu_INTCFG_CLKOUT_EN_BIT 0
define mpu_INTCFG_FSYNC_INT_EN_BIT
#define mpu_INTCFG_FSYNC_INT_EN_BIT 2
define mpu_INTCFG_FSYNC_INT_LEVEL_BIT
#define mpu_INTCFG_FSYNC_INT_LEVEL_BIT 3
define mpu_INTCFG_I2C_BYPASS_EN_BIT
#define mpu_INTCFG_I2C_BYPASS_EN_BIT 1
define mpu_INTCFG_INT_LEVEL_BIT
#define mpu_INTCFG_INT_LEVEL_BIT 7
define mpu_INTCFG_INT_OPEN_BIT
#define mpu_INTCFG_INT_OPEN_BIT 6
define mpu_INTCFG_INT_RD_CLEAR_BIT
#define mpu_INTCFG_INT_RD_CLEAR_BIT 4
define mpu_INTCFG_LATCH_INT_EN_BIT
#define mpu_INTCFG_LATCH_INT_EN_BIT 5
define mpu_INTCLEAR_ANYREAD
#define mpu_INTCLEAR_ANYREAD 0x01
define mpu_INTCLEAR_STATUSREAD
#define mpu_INTCLEAR_STATUSREAD 0x00
define mpu_INTDRV_OPENDRAIN
#define mpu_INTDRV_OPENDRAIN 0x01
define mpu_INTDRV_PUSHPULL
#define mpu_INTDRV_PUSHPULL 0x00
define mpu_INTERRUPT_DATA_RDY_BIT
#define mpu_INTERRUPT_DATA_RDY_BIT 0
define mpu_INTERRUPT_DMP_INT_BIT
#define mpu_INTERRUPT_DMP_INT_BIT 1
define mpu_INTERRUPT_FF_BIT
#define mpu_INTERRUPT_FF_BIT 7
define mpu_INTERRUPT_FIFO_OFLOW_BIT
#define mpu_INTERRUPT_FIFO_OFLOW_BIT 4
define mpu_INTERRUPT_I2C_MST_INT_BIT
#define mpu_INTERRUPT_I2C_MST_INT_BIT 3
define mpu_INTERRUPT_MOT_BIT
#define mpu_INTERRUPT_MOT_BIT 6
define mpu_INTERRUPT_PLL_RDY_INT_BIT
#define mpu_INTERRUPT_PLL_RDY_INT_BIT 2
define mpu_INTERRUPT_ZMOT_BIT
#define mpu_INTERRUPT_ZMOT_BIT 5
define mpu_INTLATCH_50USPULSE
#define mpu_INTLATCH_50USPULSE 0x00
define mpu_INTLATCH_WAITCLEAR
#define mpu_INTLATCH_WAITCLEAR 0x01
define mpu_INTMODE_ACTIVEHIGH
#define mpu_INTMODE_ACTIVEHIGH 0x00
define mpu_INTMODE_ACTIVELOW
#define mpu_INTMODE_ACTIVELOW 0x01
define mpu_MOTION_MOT_XNEG_BIT
#define mpu_MOTION_MOT_XNEG_BIT 7
define mpu_MOTION_MOT_XPOS_BIT
#define mpu_MOTION_MOT_XPOS_BIT 6
define mpu_MOTION_MOT_YNEG_BIT
#define mpu_MOTION_MOT_YNEG_BIT 5
define mpu_MOTION_MOT_YPOS_BIT
#define mpu_MOTION_MOT_YPOS_BIT 4
define mpu_MOTION_MOT_ZNEG_BIT
#define mpu_MOTION_MOT_ZNEG_BIT 3
define mpu_MOTION_MOT_ZPOS_BIT
#define mpu_MOTION_MOT_ZPOS_BIT 2
define mpu_MOTION_MOT_ZRMOT_BIT
#define mpu_MOTION_MOT_ZRMOT_BIT 0
define mpu_MST_I2C_LOST_ARB_BIT
#define mpu_MST_I2C_LOST_ARB_BIT 5
define mpu_MST_I2C_SLV0_NACK_BIT
#define mpu_MST_I2C_SLV0_NACK_BIT 0
define mpu_MST_I2C_SLV1_NACK_BIT
#define mpu_MST_I2C_SLV1_NACK_BIT 1
define mpu_MST_I2C_SLV2_NACK_BIT
#define mpu_MST_I2C_SLV2_NACK_BIT 2
define mpu_MST_I2C_SLV3_NACK_BIT
#define mpu_MST_I2C_SLV3_NACK_BIT 3
define mpu_MST_I2C_SLV4_DONE_BIT
#define mpu_MST_I2C_SLV4_DONE_BIT 6
define mpu_MST_I2C_SLV4_NACK_BIT
#define mpu_MST_I2C_SLV4_NACK_BIT 4
define mpu_MST_PASS_THROUGH_BIT
#define mpu_MST_PASS_THROUGH_BIT 7
define mpu_MULT_MST_EN_BIT
#define mpu_MULT_MST_EN_BIT 7
define mpu_PATHRESET_ACCEL_RESET_BIT
#define mpu_PATHRESET_ACCEL_RESET_BIT 1
define mpu_PATHRESET_GYRO_RESET_BIT
#define mpu_PATHRESET_GYRO_RESET_BIT 2
define mpu_PATHRESET_TEMP_RESET_BIT
#define mpu_PATHRESET_TEMP_RESET_BIT 0
define mpu_PWR1_CLKSEL_BIT
#define mpu_PWR1_CLKSEL_BIT 2
define mpu_PWR1_CLKSEL_LENGTH
#define mpu_PWR1_CLKSEL_LENGTH 3
define mpu_PWR1_CYCLE_BIT
#define mpu_PWR1_CYCLE_BIT 5
define mpu_PWR1_DEVICE_RESET_BIT
#define mpu_PWR1_DEVICE_RESET_BIT 7
define mpu_PWR1_SLEEP_BIT
#define mpu_PWR1_SLEEP_BIT 6
define mpu_PWR1_TEMP_DIS_BIT
#define mpu_PWR1_TEMP_DIS_BIT 3
define mpu_PWR2_LP_WAKE_CTRL_BIT
#define mpu_PWR2_LP_WAKE_CTRL_BIT 7
define mpu_PWR2_LP_WAKE_CTRL_LENGTH
#define mpu_PWR2_LP_WAKE_CTRL_LENGTH 2
define mpu_PWR2_STBY_XA_BIT
#define mpu_PWR2_STBY_XA_BIT 5
define mpu_PWR2_STBY_XG_BIT
#define mpu_PWR2_STBY_XG_BIT 2
define mpu_PWR2_STBY_YA_BIT
#define mpu_PWR2_STBY_YA_BIT 4
define mpu_PWR2_STBY_YG_BIT
#define mpu_PWR2_STBY_YG_BIT 1
define mpu_PWR2_STBY_ZA_BIT
#define mpu_PWR2_STBY_ZA_BIT 3
define mpu_PWR2_STBY_ZG_BIT
#define mpu_PWR2_STBY_ZG_BIT 0
define mpu_RA_ACCEL_CONFIG
#define mpu_RA_ACCEL_CONFIG 0x1C
define mpu_RA_ACCEL_XOUT_H
#define mpu_RA_ACCEL_XOUT_H 0x3B
define mpu_RA_ACCEL_XOUT_L
#define mpu_RA_ACCEL_XOUT_L 0x3C
define mpu_RA_ACCEL_YOUT_H
#define mpu_RA_ACCEL_YOUT_H 0x3D
define mpu_RA_ACCEL_YOUT_L
#define mpu_RA_ACCEL_YOUT_L 0x3E
define mpu_RA_ACCEL_ZOUT_H
#define mpu_RA_ACCEL_ZOUT_H 0x3F
define mpu_RA_ACCEL_ZOUT_L
#define mpu_RA_ACCEL_ZOUT_L 0x40
define mpu_RA_BANK_SEL
#define mpu_RA_BANK_SEL 0x6D
define mpu_RA_CONFIG
#define mpu_RA_CONFIG 0x1A
define mpu_RA_DMP_CFG_1
#define mpu_RA_DMP_CFG_1 0x70
define mpu_RA_DMP_CFG_2
#define mpu_RA_DMP_CFG_2 0x71
define mpu_RA_DMP_INT_STATUS
#define mpu_RA_DMP_INT_STATUS 0x39
define mpu_RA_EXT_SENS_DATA_00
#define mpu_RA_EXT_SENS_DATA_00 0x49
define mpu_RA_EXT_SENS_DATA_01
#define mpu_RA_EXT_SENS_DATA_01 0x4A
define mpu_RA_EXT_SENS_DATA_02
#define mpu_RA_EXT_SENS_DATA_02 0x4B
define mpu_RA_EXT_SENS_DATA_03
#define mpu_RA_EXT_SENS_DATA_03 0x4C
define mpu_RA_EXT_SENS_DATA_04
#define mpu_RA_EXT_SENS_DATA_04 0x4D
define mpu_RA_EXT_SENS_DATA_05
#define mpu_RA_EXT_SENS_DATA_05 0x4E
define mpu_RA_EXT_SENS_DATA_06
#define mpu_RA_EXT_SENS_DATA_06 0x4F
define mpu_RA_EXT_SENS_DATA_07
#define mpu_RA_EXT_SENS_DATA_07 0x50
define mpu_RA_EXT_SENS_DATA_08
#define mpu_RA_EXT_SENS_DATA_08 0x51
define mpu_RA_EXT_SENS_DATA_09
#define mpu_RA_EXT_SENS_DATA_09 0x52
define mpu_RA_EXT_SENS_DATA_10
#define mpu_RA_EXT_SENS_DATA_10 0x53
define mpu_RA_EXT_SENS_DATA_11
#define mpu_RA_EXT_SENS_DATA_11 0x54
define mpu_RA_EXT_SENS_DATA_12
#define mpu_RA_EXT_SENS_DATA_12 0x55
define mpu_RA_EXT_SENS_DATA_13
#define mpu_RA_EXT_SENS_DATA_13 0x56
define mpu_RA_EXT_SENS_DATA_14
#define mpu_RA_EXT_SENS_DATA_14 0x57
define mpu_RA_EXT_SENS_DATA_15
#define mpu_RA_EXT_SENS_DATA_15 0x58
define mpu_RA_EXT_SENS_DATA_16
#define mpu_RA_EXT_SENS_DATA_16 0x59
define mpu_RA_EXT_SENS_DATA_17
#define mpu_RA_EXT_SENS_DATA_17 0x5A
define mpu_RA_EXT_SENS_DATA_18
#define mpu_RA_EXT_SENS_DATA_18 0x5B
define mpu_RA_EXT_SENS_DATA_19
#define mpu_RA_EXT_SENS_DATA_19 0x5C
define mpu_RA_EXT_SENS_DATA_20
#define mpu_RA_EXT_SENS_DATA_20 0x5D
define mpu_RA_EXT_SENS_DATA_21
#define mpu_RA_EXT_SENS_DATA_21 0x5E
define mpu_RA_EXT_SENS_DATA_22
#define mpu_RA_EXT_SENS_DATA_22 0x5F
define mpu_RA_EXT_SENS_DATA_23
#define mpu_RA_EXT_SENS_DATA_23 0x60
define mpu_RA_FF_DUR
#define mpu_RA_FF_DUR 0x1E
define mpu_RA_FF_THR
#define mpu_RA_FF_THR 0x1D
define mpu_RA_FIFO_COUNTH
#define mpu_RA_FIFO_COUNTH 0x72
define mpu_RA_FIFO_COUNTL
#define mpu_RA_FIFO_COUNTL 0x73
define mpu_RA_FIFO_EN
#define mpu_RA_FIFO_EN 0x23
define mpu_RA_FIFO_R_W
#define mpu_RA_FIFO_R_W 0x74
define mpu_RA_GYRO_CONFIG
#define mpu_RA_GYRO_CONFIG 0x1B
define mpu_RA_GYRO_XOUT_H
#define mpu_RA_GYRO_XOUT_H 0x43
define mpu_RA_GYRO_XOUT_L
#define mpu_RA_GYRO_XOUT_L 0x44
define mpu_RA_GYRO_YOUT_H
#define mpu_RA_GYRO_YOUT_H 0x45
define mpu_RA_GYRO_YOUT_L
#define mpu_RA_GYRO_YOUT_L 0x46
define mpu_RA_GYRO_ZOUT_H
#define mpu_RA_GYRO_ZOUT_H 0x47
define mpu_RA_GYRO_ZOUT_L
#define mpu_RA_GYRO_ZOUT_L 0x48
define mpu_RA_I2C_MST_CTRL
#define mpu_RA_I2C_MST_CTRL 0x24
define mpu_RA_I2C_MST_DELAY_CTRL
#define mpu_RA_I2C_MST_DELAY_CTRL 0x67
define mpu_RA_I2C_MST_STATUS
#define mpu_RA_I2C_MST_STATUS 0x36
define mpu_RA_I2C_SLV0_ADDR
#define mpu_RA_I2C_SLV0_ADDR 0x25
define mpu_RA_I2C_SLV0_CTRL
#define mpu_RA_I2C_SLV0_CTRL 0x27
define mpu_RA_I2C_SLV0_DO
#define mpu_RA_I2C_SLV0_DO 0x63
define mpu_RA_I2C_SLV0_REG
#define mpu_RA_I2C_SLV0_REG 0x26
define mpu_RA_I2C_SLV1_ADDR
#define mpu_RA_I2C_SLV1_ADDR 0x28
define mpu_RA_I2C_SLV1_CTRL
#define mpu_RA_I2C_SLV1_CTRL 0x2A
define mpu_RA_I2C_SLV1_DO
#define mpu_RA_I2C_SLV1_DO 0x64
define mpu_RA_I2C_SLV1_REG
#define mpu_RA_I2C_SLV1_REG 0x29
define mpu_RA_I2C_SLV2_ADDR
#define mpu_RA_I2C_SLV2_ADDR 0x2B
define mpu_RA_I2C_SLV2_CTRL
#define mpu_RA_I2C_SLV2_CTRL 0x2D
define mpu_RA_I2C_SLV2_DO
#define mpu_RA_I2C_SLV2_DO 0x65
define mpu_RA_I2C_SLV2_REG
#define mpu_RA_I2C_SLV2_REG 0x2C
define mpu_RA_I2C_SLV3_ADDR
#define mpu_RA_I2C_SLV3_ADDR 0x2E
define mpu_RA_I2C_SLV3_CTRL
#define mpu_RA_I2C_SLV3_CTRL 0x30
define mpu_RA_I2C_SLV3_DO
#define mpu_RA_I2C_SLV3_DO 0x66
define mpu_RA_I2C_SLV3_REG
#define mpu_RA_I2C_SLV3_REG 0x2F
define mpu_RA_I2C_SLV4_ADDR
#define mpu_RA_I2C_SLV4_ADDR 0x31
define mpu_RA_I2C_SLV4_CTRL
#define mpu_RA_I2C_SLV4_CTRL 0x34
define mpu_RA_I2C_SLV4_DI
#define mpu_RA_I2C_SLV4_DI 0x35
define mpu_RA_I2C_SLV4_DO
#define mpu_RA_I2C_SLV4_DO 0x33
define mpu_RA_I2C_SLV4_REG
#define mpu_RA_I2C_SLV4_REG 0x32
define mpu_RA_INT_ENABLE
#define mpu_RA_INT_ENABLE 0x38
define mpu_RA_INT_PIN_CFG
#define mpu_RA_INT_PIN_CFG 0x37
define mpu_RA_INT_STATUS
#define mpu_RA_INT_STATUS 0x3A
define mpu_RA_MEM_R_W
#define mpu_RA_MEM_R_W 0x6F
define mpu_RA_MEM_START_ADDR
#define mpu_RA_MEM_START_ADDR 0x6E
define mpu_RA_MOT_DETECT_CTRL
#define mpu_RA_MOT_DETECT_CTRL 0x69
define mpu_RA_MOT_DETECT_STATUS
#define mpu_RA_MOT_DETECT_STATUS 0x61
define mpu_RA_MOT_DUR
#define mpu_RA_MOT_DUR 0x20
define mpu_RA_MOT_THR
#define mpu_RA_MOT_THR 0x1F
define mpu_RA_PWR_MGMT_1
#define mpu_RA_PWR_MGMT_1 0x6B
define mpu_RA_PWR_MGMT_2
#define mpu_RA_PWR_MGMT_2 0x6C
define mpu_RA_SIGNAL_PATH_RESET
#define mpu_RA_SIGNAL_PATH_RESET 0x68
define mpu_RA_SMPLRT_DIV
#define mpu_RA_SMPLRT_DIV 0x19
define mpu_RA_TEMP_OUT_H
#define mpu_RA_TEMP_OUT_H 0x41
define mpu_RA_TEMP_OUT_L
#define mpu_RA_TEMP_OUT_L 0x42
define mpu_RA_USER_CTRL
#define mpu_RA_USER_CTRL 0x6A
define mpu_RA_WHO_AM_I
#define mpu_RA_WHO_AM_I 0x75
define mpu_RA_XA_OFFS_H
#define mpu_RA_XA_OFFS_H 0x06
define mpu_RA_XA_OFFS_L_TC
#define mpu_RA_XA_OFFS_L_TC 0x07
define mpu_RA_XG_OFFS_TC
#define mpu_RA_XG_OFFS_TC 0x00
define mpu_RA_XG_OFFS_USRH
#define mpu_RA_XG_OFFS_USRH 0x13
define mpu_RA_XG_OFFS_USRL
#define mpu_RA_XG_OFFS_USRL 0x14
define mpu_RA_X_FINE_GAIN
#define mpu_RA_X_FINE_GAIN 0x03
define mpu_RA_YA_OFFS_H
#define mpu_RA_YA_OFFS_H 0x08
define mpu_RA_YA_OFFS_L_TC
#define mpu_RA_YA_OFFS_L_TC 0x09
define mpu_RA_YG_OFFS_TC
#define mpu_RA_YG_OFFS_TC 0x01
define mpu_RA_YG_OFFS_USRH
#define mpu_RA_YG_OFFS_USRH 0x15
define mpu_RA_YG_OFFS_USRL
#define mpu_RA_YG_OFFS_USRL 0x16
define mpu_RA_Y_FINE_GAIN
#define mpu_RA_Y_FINE_GAIN 0x04
define mpu_RA_ZA_OFFS_H
#define mpu_RA_ZA_OFFS_H 0x0A
define mpu_RA_ZA_OFFS_L_TC
#define mpu_RA_ZA_OFFS_L_TC 0x0B
define mpu_RA_ZG_OFFS_TC
#define mpu_RA_ZG_OFFS_TC 0x02
define mpu_RA_ZG_OFFS_USRH
#define mpu_RA_ZG_OFFS_USRH 0x17
define mpu_RA_ZG_OFFS_USRL
#define mpu_RA_ZG_OFFS_USRL 0x18
define mpu_RA_ZRMOT_DUR
#define mpu_RA_ZRMOT_DUR 0x22
define mpu_RA_ZRMOT_THR
#define mpu_RA_ZRMOT_THR 0x21
define mpu_RA_Z_FINE_GAIN
#define mpu_RA_Z_FINE_GAIN 0x05
define mpu_SLV0_FIFO_EN_BIT
#define mpu_SLV0_FIFO_EN_BIT 0
define mpu_SLV1_FIFO_EN_BIT
#define mpu_SLV1_FIFO_EN_BIT 1
define mpu_SLV2_FIFO_EN_BIT
#define mpu_SLV2_FIFO_EN_BIT 2
define mpu_SLV_3_FIFO_EN_BIT
#define mpu_SLV_3_FIFO_EN_BIT 5
define mpu_TC_OFFSET_BIT
#define mpu_TC_OFFSET_BIT 6
define mpu_TC_OFFSET_LENGTH
#define mpu_TC_OFFSET_LENGTH 6
define mpu_TC_OTP_BNK_VLD_BIT
#define mpu_TC_OTP_BNK_VLD_BIT 0
define mpu_TC_PWR_MODE_BIT
#define mpu_TC_PWR_MODE_BIT 7
define mpu_TEMP_FIFO_EN_BIT
#define mpu_TEMP_FIFO_EN_BIT 7
define mpu_USERCTRL_DMP_EN_BIT
#define mpu_USERCTRL_DMP_EN_BIT 7
define mpu_USERCTRL_DMP_RESET_BIT
#define mpu_USERCTRL_DMP_RESET_BIT 3
define mpu_USERCTRL_FIFO_EN_BIT
#define mpu_USERCTRL_FIFO_EN_BIT 6
define mpu_USERCTRL_FIFO_RESET_BIT
#define mpu_USERCTRL_FIFO_RESET_BIT 2
define mpu_USERCTRL_I2C_IF_DIS_BIT
#define mpu_USERCTRL_I2C_IF_DIS_BIT 4
define mpu_USERCTRL_I2C_MST_EN_BIT
#define mpu_USERCTRL_I2C_MST_EN_BIT 5
define mpu_USERCTRL_I2C_MST_RESET_BIT
#define mpu_USERCTRL_I2C_MST_RESET_BIT 1
define mpu_USERCTRL_SIG_COND_RESET_BIT
#define mpu_USERCTRL_SIG_COND_RESET_BIT 0
define mpu_VDDIO_LEVEL_VDD
#define mpu_VDDIO_LEVEL_VDD 1
define mpu_VDDIO_LEVEL_VLOGIC
#define mpu_VDDIO_LEVEL_VLOGIC 0
define mpu_WAIT_FOR_ES_BIT
#define mpu_WAIT_FOR_ES_BIT 6
define mpu_WAKE_FREQ_10
#define mpu_WAKE_FREQ_10 0x3
define mpu_WAKE_FREQ_1P25
#define mpu_WAKE_FREQ_1P25 0x0
define mpu_WAKE_FREQ_2P5
#define mpu_WAKE_FREQ_2P5 0x1
define mpu_WAKE_FREQ_5
#define mpu_WAKE_FREQ_5 0x2
define mpu_WHO_AM_I_BIT
#define mpu_WHO_AM_I_BIT 6
define mpu_WHO_AM_I_LENGTH
#define mpu_WHO_AM_I_LENGTH 6
define mpu_XG_FIFO_EN_BIT
#define mpu_XG_FIFO_EN_BIT 6
define mpu_YG_FIFO_EN_BIT
#define mpu_YG_FIFO_EN_BIT 5
define mpu_ZG_FIFO_EN_BIT
#define mpu_ZG_FIFO_EN_BIT 4
The documentation for this class was generated from the following file fw/rbcx-coprocessor/include/MpuController.hpp