D:/gitt/MicrochipFor32/bsp_MPU6050/inv_mpu_dmp_motion_driver.h 文件参考D:/gitt/MicrochipFor32/bsp_MPU6050/inv_mpu_dmp_motion_driver.hDMP image and interface functions.
此图展示该文件直接或间接的被哪些文件引用了:宏定义 #define TAP_X (0x01)#define TAP_Y (0x02)#define TAP_Z (0x04)#define TAP_XYZ (0x07)#define TAP_X_UP (0x01)#define TAP_X_DOWN (0x02)#define TAP_Y_UP (0x03)#define TAP_Y_DOWN (0x04)#define TAP_Z_UP (0x05)#define TAP_Z_DOWN (0x06)#define ANDROID_ORIENT_PORTRAIT (0x00)#define ANDROID_ORIENT_LANDSCAPE (0x01)#define ANDROID_ORIENT_REVERSE_PORTRAIT (0x02)#define ANDROID_ORIENT_REVERSE_LANDSCAPE (0x03)#define DMP_INT_GESTURE (0x01)#define DMP_INT_CONTINUOUS (0x02)#define DMP_FEATURE_TAP (0x001)#define DMP_FEATURE_ANDROID_ORIENT (0x002)#define DMP_FEATURE_LP_QUAT (0x004)#define DMP_FEATURE_PEDOMETER (0x008)#define DMP_FEATURE_6X_LP_QUAT (0x010)#define DMP_FEATURE_GYRO_CAL (0x020)#define DMP_FEATURE_SEND_RAW_ACCEL (0x040)#define DMP_FEATURE_SEND_RAW_GYRO (0x080)#define DMP_FEATURE_SEND_CAL_GYRO (0x100)#define INV_WXYZ_QUAT (0x100)函数 int dmp_load_motion_driver_firmware (void)Load the DMP with this image. int dmp_set_fifo_rate (unsigned short rate)Set DMP output rate. Only used when DMP is on. int dmp_get_fifo_rate (unsigned short *rate)Get DMP output rate. 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_get_enabled_features (unsigned short *mask)Get list of currently enabled DMP features. 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. 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_accel_bias (long *bias)Push accel biases to the DMP. These biases will be removed from the DMP 6-axis quaternion. int dmp_register_tap_cb (void(*func)(unsigned char, unsigned char))Register a function to be executed on a tap event. The tap direction is represented by one of the following: TAP_X_UP TAP_X_DOWN TAP_Y_UP TAP_Y_DOWN TAP_Z_UP TAP_Z_DOWN int dmp_set_tap_thresh (unsigned char axis, unsigned short thresh)Set tap threshold for a specific axis. int dmp_set_tap_axes (unsigned char axis)Set which axes will register a tap. int dmp_set_tap_count (unsigned char min_taps)Set minimum number of taps needed for an interrupt. int dmp_set_tap_time (unsigned short time)Set length between valid taps. int dmp_set_tap_time_multi (unsigned short time)Set max time between taps to register as a multi-tap. int dmp_set_shake_reject_thresh (long sf, unsigned short thresh)Set shake rejection threshold. If the DMP detects a gyro sample larger than thresh, taps are rejected. int dmp_set_shake_reject_time (unsigned short time)Set shake rejection time. Sets the length of time that the gyro must be outside of the threshold set by gyro_set_shake_reject_thresh before taps are rejected. A mandatory 60 ms is added to this parameter. int dmp_set_shake_reject_timeout (unsigned short time)Set shake rejection timeout. Sets the length of time after a shake rejection that the gyro must stay inside of the threshold before taps can be detected again. A mandatory 60 ms is added to this parameter. int dmp_register_android_orient_cb (void(*func)(unsigned char))Register a function to be executed on a android orientation event. 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_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_get_pedometer_step_count (unsigned long *count)Get current step count. int dmp_set_pedometer_step_count (unsigned long count)Overwrite current step count. WARNING: This function writes to DMP memory and could potentially encounter a race condition if called while the pedometer is enabled. int dmp_get_pedometer_walk_time (unsigned long *time)Get duration of walking time. int dmp_set_pedometer_walk_time (unsigned long time)Overwrite current walk time. WARNING: This function writes to DMP memory and could potentially encounter a race condition if called while the pedometer is enabled. 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_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. 详细描述DMP image and interface functions. All functions are preceded by the dmp_ prefix to differentiate among MPL and general driver function calls.
在文件 inv_mpu_dmp_motion_driver.h 中定义.