| LibDriver MPU9250 1.0.0 MPU9250 full function driver

driver_mpu9250_dmp.h
Go to the documentation of this file.
1
37 #ifndef DRIVER_MPU9250_DMP_H
38 #define DRIVER_MPU9250_DMP_H
39
40 #include "driver_mpu9250_interface.h"
41
42 #ifdef __cplusplus
43 extern "C"{
44 #endif
45
54 #define MPU9250_DMP_DEFAULT_CLOCK_SOURCE MPU9250_CLOCK_SOURCE_PLL
55 #define MPU9250_DMP_DEFAULT_RATE 50
56 #define MPU9250_DMP_DEFAULT_ACCELEROMETER_RANGE MPU9250_ACCELEROMETER_RANGE_2G
57 #define MPU9250_DMP_DEFAULT_GYROSCOPE_RANGE MPU9250_GYROSCOPE_RANGE_2000DPS
58 #define MPU9250_DMP_DEFAULT_LOW_PASS_FILTER MPU9250_LOW_PASS_FILTER_3
59 #define MPU9250_DMP_DEFAULT_CYCLE_WAKE_UP MPU9250_BOOL_FALSE
60 #define MPU9250_DMP_DEFAULT_INTERRUPT_PIN_LEVEL MPU9250_PIN_LEVEL_LOW
61 #define MPU9250_DMP_DEFAULT_INTERRUPT_PIN_TYPE MPU9250_PIN_TYPE_PUSH_PULL
62 #define MPU9250_DMP_DEFAULT_INTERRUPT_MOTION MPU9250_BOOL_TRUE
63 #define MPU9250_DMP_DEFAULT_INTERRUPT_FIFO_OVERFLOW MPU9250_BOOL_TRUE
64 #define MPU9250_DMP_DEFAULT_INTERRUPT_DMP MPU9250_BOOL_FALSE
65 #define MPU9250_DMP_DEFAULT_INTERRUPT_FSYNC_INT MPU9250_BOOL_FALSE
66 #define MPU9250_DMP_DEFAULT_INTERRUPT_DATA_READY MPU9250_BOOL_FALSE
67 #define MPU9250_DMP_DEFAULT_INTERRUPT_LATCH MPU9250_BOOL_TRUE
68 #define MPU9250_DMP_DEFAULT_INTERRUPT_READ_CLEAR MPU9250_BOOL_TRUE
69 #define MPU9250_DMP_DEFAULT_EXTERN_SYNC MPU9250_EXTERN_SYNC_INPUT_DISABLED
70 #define MPU9250_DMP_DEFAULT_FSYNC_INTERRUPT MPU9250_BOOL_FALSE
71 #define MPU9250_DMP_DEFAULT_FSYNC_INTERRUPT_LEVEL MPU9250_PIN_LEVEL_LOW
72 #define MPU9250_DMP_DEFAULT_IIC_MASTER MPU9250_BOOL_FALSE
73 #define MPU9250_DMP_DEFAULT_IIC_BYPASS MPU9250_BOOL_FALSE
74 #define MPU9250_DMP_DEFAULT_PEOMETER_WALK_TIME 200
75 #define MPU9250_DMP_DEFAULT_PEOMETER_STEP_COUNT 0
76 #define MPU9250_DMP_DEFAULT_SHAKE_REJECT_TIMEOUT 10
77 #define MPU9250_DMP_DEFAULT_SHAKE_REJECT_TIME 40
78 #define MPU9250_DMP_DEFAULT_SHAKE_REJECT_THRESH 200
79 #define MPU9250_DMP_DEFAULT_TAP_TIME_MULTI 200
80 #define MPU9250_DMP_DEFAULT_TAP_TIME 100
81 #define MPU9250_DMP_DEFAULT_MIN_TAP_COUNT 1
82 #define MPU9250_DMP_DEFAULT_TAP_X_THRESH 250
83 #define MPU9250_DMP_DEFAULT_TAP_Y_THRESH 250
84 #define MPU9250_DMP_DEFAULT_TAP_Z_THRESH 250
85 #define MPU9250_DMP_DEFAULT_INTERRUPT_MODE MPU9250_DMP_INTERRUPT_MODE_CONTINUOUS
86 #define MPU9250_DMP_DEFAULT_MOTION_THRESHOLD 200
87 #define MPU9250_DMP_DEFAULT_GYROSCOPE_STANDBY MPU9250_BOOL_FALSE
88 #define MPU9250_DMP_DEFAULT_FIFO_MODE MPU9250_FIFO_MODE_NORMAL
89 #define MPU9250_DMP_DEFAULT_GYROSCOPE_CHOICE 0
90 #define MPU9250_DMP_DEFAULT_ACCELEROMETER_CHOICE 0
91 #define MPU9250_DMP_DEFAULT_ACCELEROMETER_LOW_PASS_FILTER MPU9250_ACCELEROMETER_LOW_PASS_FILTER_3
92 #define MPU9250_DMP_DEFAULT_LOW_POWER_ACCEL_OUTPUT_RATE MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_62P50
93 #define MPU9250_DMP_DEFAULT_ACCELEROMETER_COMPARE MPU9250_BOOL_TRUE
94 #define MPU9250_DMP_DEFAULT_MAGNETOMETER_MODE MPU9250_MAGNETOMETER_MODE_CONTINUOUS2
95 #define MPU9250_DMP_DEFAULT_MAGNETOMETER_BITS MPU9250_MAGNETOMETER_BITS_16
96 #define MPU9250_DMP_DEFAULT_IIC_CLOCK MPU9250_IIC_CLOCK_400_KHZ
97 #define MPU9250_DMP_DEFAULT_IIC_MULTI_MASTER MPU9250_BOOL_TRUE
98 #define MPU9250_DMP_DEFAULT_IIC_WAIT_FOR_EXTERNAL_SENSOR MPU9250_BOOL_FALSE
99 #define MPU9250_DMP_DEFAULT_IIC_READ_MODE MPU9250_IIC_READ_MODE_RESTART
100 #define MPU9250_DMP_DEFAULT_IIC_DELAY MPU9250_BOOL_FALSE
109 uint8_t mpu9250_dmp_irq_handler(void);
110
123 uint8_t mpu9250_dmp_init(mpu9250_interface_t interface, mpu9250_address_t addr_pin,
124 void (*receive_callback)(uint8_t type),
125 void (*tap_callback)(uint8_t count, uint8_t direction),
126 void (*orient_callback)(uint8_t orientation)
127 );
128
136 uint8_t mpu9250_dmp_deinit(void);
137
154 uint8_t mpu9250_dmp_read_all(int16_t (*accel_raw)[3], float (*accel_g)[3],
155 int16_t (*gyro_raw)[3], float (*gyro_dps)[3],
156 int32_t (*quat)[4],
157 float *pitch, float *roll, float *yaw,
158 uint16_t *l
159 );
160
169 uint8_t mpu9250_dmp_get_pedometer_counter(uint32_t *cnt);
170
175 #ifdef __cplusplus
176 }
177 #endif
178
179 #endif
driver_mpu9250_interface.h
driver mpu9250 interface header file
mpu9250_address_t
mpu9250_address_t
mpu9250 address enumeration definition
Definition: driver_mpu9250.h:72
mpu9250_interface_t
mpu9250_interface_t
mpu9250 interface enumeration definition
Definition: driver_mpu9250.h:63
mpu9250_dmp_irq_handler
uint8_t mpu9250_dmp_irq_handler(void)
dmp irq
Definition: driver_mpu9250_dmp.c:48
mpu9250_dmp_deinit
uint8_t mpu9250_dmp_deinit(void)
dmp example deinit
Definition: driver_mpu9250_dmp.c:1017
mpu9250_dmp_init
uint8_t mpu9250_dmp_init(mpu9250_interface_t interface, mpu9250_address_t addr_pin, void(*receive_callback)(uint8_t type), void(*tap_callback)(uint8_t count, uint8_t direction), void(*orient_callback)(uint8_t orientation))
dmp example init
Definition: driver_mpu9250_dmp.c:72
mpu9250_dmp_get_pedometer_counter
uint8_t mpu9250_dmp_get_pedometer_counter(uint32_t *cnt)
dmp example get pedometer counter
Definition: driver_mpu9250_dmp.c:964
mpu9250_dmp_read_all
uint8_t mpu9250_dmp_read_all(int16_t(*accel_raw)[3], float(*accel_g)[3], int16_t(*gyro_raw)[3], float(*gyro_dps)[3], int32_t(*quat)[4], float *pitch, float *roll, float *yaw, uint16_t *l)
dmp example read
Definition: driver_mpu9250_dmp.c:991