Defines | Functions
inv_mpu_dmp_motion_driver.h File Reference

DMP image and interface functions. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define ANDROID_ORIENT_LANDSCAPE   (0x01)
#define ANDROID_ORIENT_PORTRAIT   (0x00)
#define ANDROID_ORIENT_REVERSE_LANDSCAPE   (0x03)
#define ANDROID_ORIENT_REVERSE_PORTRAIT   (0x02)
#define DMP_FEATURE_6X_LP_QUAT   (0x010)
#define DMP_FEATURE_ANDROID_ORIENT   (0x002)
#define DMP_FEATURE_GYRO_CAL   (0x020)
#define DMP_FEATURE_LP_QUAT   (0x004)
#define DMP_FEATURE_PEDOMETER   (0x008)
#define DMP_FEATURE_SEND_CAL_GYRO   (0x100)
#define DMP_FEATURE_SEND_RAW_ACCEL   (0x040)
#define DMP_FEATURE_SEND_RAW_GYRO   (0x080)
#define DMP_FEATURE_TAP   (0x001)
#define DMP_INT_CONTINUOUS   (0x02)
#define DMP_INT_GESTURE   (0x01)
#define INV_WXYZ_QUAT   (0x100)
#define TAP_X   (0x01)
#define TAP_X_DOWN   (0x02)
#define TAP_X_UP   (0x01)
#define TAP_XYZ   (0x07)
#define TAP_Y   (0x02)
#define TAP_Y_DOWN   (0x04)
#define TAP_Y_UP   (0x03)
#define TAP_Z   (0x04)
#define TAP_Z_DOWN   (0x06)
#define TAP_Z_UP   (0x05)

Functions

int dmp_enable_6x_lp_quat (unsigned char enable)
 Generate 6-axis quaternions from the dmp-> In this driver, the 3-axis and 6-axis DMP quaternion features are mutually exclusive.
int dmp_enable_feature (unsigned short mask)
 Enable DMP features. The following #define's are used in the input mask:
DMP_FEATURE_TAP
DMP_FEATURE_ANDROID_ORIENT
DMP_FEATURE_LP_QUAT
DMP_FEATURE_6X_LP_QUAT
DMP_FEATURE_GYRO_CAL
DMP_FEATURE_SEND_RAW_ACCEL
DMP_FEATURE_SEND_RAW_GYRO
NOTE: DMP_FEATURE_LP_QUAT and DMP_FEATURE_6X_LP_QUAT are mutually exclusive.
NOTE: DMP_FEATURE_SEND_RAW_GYRO and DMP_FEATURE_SEND_CAL_GYRO are also mutually exclusive.
int dmp_enable_gyro_cal (unsigned char enable)
 Calibrate the gyro data in the dmp-> After eight seconds of no motion, the DMP will compute gyro biases and subtract them from the quaternion output. If dmp_enable_feature is called with DMP_FEATURE_SEND_CAL_GYRO, the biases will also be subtracted from the gyro output.
int dmp_enable_lp_quat (unsigned char enable)
 Generate 3-axis quaternions from the dmp-> In this driver, the 3-axis and 6-axis DMP quaternion features are mutually exclusive.
int dmp_get_enabled_features (unsigned short *mask)
 Get list of currently enabled DMP features.
int dmp_get_fifo_rate (unsigned short *rate)
 Get DMP output rate.
void dmp_init_structures ()
int dmp_load_motion_driver_firmware (void)
 Load the DMP with this image.
int dmp_read_fifo (short *gyro, short *accel, long *quat, unsigned long *timestamp, short *sensors, unsigned char *more)
 Get one packet from the FIFO. If sensors does not contain a particular sensor, disregard the data returned to that pointer.
sensors can contain a combination of the following flags:
INV_X_GYRO, INV_Y_GYRO, INV_Z_GYRO
INV_XYZ_GYRO
INV_XYZ_ACCEL
INV_WXYZ_QUAT
If the FIFO has no new data, sensors will be zero.
If the FIFO is disabled, sensors will be zero and this function will return a non-zero error code.
int dmp_select_device (int device)
int dmp_set_accel_bias (long *bias)
 Push accel biases to the dmp-> These biases will be removed from the DMP 6-axis quaternion.
int dmp_set_fifo_rate (unsigned short rate)
 Set DMP output rate. Only used when DMP is on.
int dmp_set_gyro_bias (long *bias)
 Push gyro biases to the dmp-> Because the gyro integration is handled in the DMP, any gyro biases calculated by the MPL should be pushed down to DMP memory to remove 3-axis quaternion drift.
NOTE: If the DMP-based gyro calibration is enabled, the DMP will overwrite the biases written to this location once a new one is computed.
int dmp_set_interrupt_mode (unsigned char mode)
 Specify when a DMP interrupt should occur. A DMP interrupt can be configured to trigger on either of the two conditions below:
a. One FIFO period has elapsed (set by mpu_set_sample_rate).
b. A tap event has been detected.
int dmp_set_orientation (unsigned short orient)
 Push gyro and accel orientation to the dmp-> The orientation is represented here as the output of inv_orientation_matrix_to_scalar.

Detailed Description

DMP image and interface functions.

All functions are preceded by the dmp_ prefix to differentiate among MPL and general driver function calls.

Definition in file inv_mpu_dmp_motion_driver.h.



segbot_firmware
Author(s): Jose Bigio, Jack O'Quin, Tim Eckel (NewPing library)
autogenerated on Fri Aug 28 2015 13:02:53