| LibDriver MPU9250 1.0.0 MPU9250 full function driver

driver_mpu9250_basic.h
Go to the documentation of this file.
1
37 #ifndef DRIVER_MPU9250_BASIC_H
38 #define DRIVER_MPU9250_BASIC_H
39
40 #include "driver_mpu9250_interface.h"
41
42 #ifdef __cplusplus
43 extern "C"{
44 #endif
45
56 #define MPU9250_BASIC_DEFAULT_CLOCK_SOURCE MPU9250_CLOCK_SOURCE_PLL
57 #define MPU9250_BASIC_DEFAULT_RATE 50
58 #define MPU9250_BASIC_DEFAULT_LOW_PASS_FILTER MPU9250_LOW_PASS_FILTER_3
59 #define MPU9250_BASIC_DEFAULT_CYCLE_WAKE_UP MPU9250_BOOL_FALSE
60 #define MPU9250_BASIC_DEFAULT_INTERRUPT_PIN_LEVEL MPU9250_PIN_LEVEL_LOW
61 #define MPU9250_BASIC_DEFAULT_INTERRUPT_PIN_TYPE MPU9250_PIN_TYPE_PUSH_PULL
62 #define MPU9250_BASIC_DEFAULT_ACCELEROMETER_RANGE MPU9250_ACCELEROMETER_RANGE_2G
63 #define MPU9250_BASIC_DEFAULT_GYROSCOPE_RANGE MPU9250_GYROSCOPE_RANGE_2000DPS
64 #define MPU9250_BASIC_DEFAULT_INTERRUPT_MOTION MPU9250_BOOL_FALSE
65 #define MPU9250_BASIC_DEFAULT_INTERRUPT_FIFO_OVERFLOW MPU9250_BOOL_FALSE
66 #define MPU9250_BASIC_DEFAULT_INTERRUPT_DMP MPU9250_BOOL_FALSE
67 #define MPU9250_BASIC_DEFAULT_INTERRUPT_FSYNC_INT MPU9250_BOOL_FALSE
68 #define MPU9250_BASIC_DEFAULT_INTERRUPT_DATA_READY MPU9250_BOOL_FALSE
69 #define MPU9250_BASIC_DEFAULT_INTERRUPT_LATCH MPU9250_BOOL_TRUE
70 #define MPU9250_BASIC_DEFAULT_INTERRUPT_READ_CLEAR MPU9250_BOOL_TRUE
71 #define MPU9250_BASIC_DEFAULT_EXTERN_SYNC MPU9250_EXTERN_SYNC_INPUT_DISABLED
72 #define MPU9250_BASIC_DEFAULT_FSYNC_INTERRUPT MPU9250_BOOL_FALSE
73 #define MPU9250_BASIC_DEFAULT_FSYNC_INTERRUPT_LEVEL MPU9250_PIN_LEVEL_LOW
74 #define MPU9250_BASIC_DEFAULT_IIC_MASTER MPU9250_BOOL_FALSE
75 #define MPU9250_BASIC_DEFAULT_IIC_BYPASS MPU9250_BOOL_FALSE
76 #define MPU9250_BASIC_DEFAULT_GYROSCOPE_STANDBY MPU9250_BOOL_FALSE
77 #define MPU9250_BASIC_DEFAULT_FIFO_MODE MPU9250_FIFO_MODE_NORMAL
78 #define MPU9250_BASIC_DEFAULT_GYROSCOPE_CHOICE 0
79 #define MPU9250_BASIC_DEFAULT_ACCELEROMETER_CHOICE 0
80 #define MPU9250_BASIC_DEFAULT_ACCELEROMETER_LOW_PASS_FILTER MPU9250_ACCELEROMETER_LOW_PASS_FILTER_3
81 #define MPU9250_BASIC_DEFAULT_LOW_POWER_ACCEL_OUTPUT_RATE MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_62P50
82 #define MPU9250_BASIC_DEFAULT_WAKE_ON_MOTION MPU9250_BOOL_FALSE
83 #define MPU9250_BASIC_DEFAULT_ACCELEROMETER_COMPARE MPU9250_BOOL_TRUE
84 #define MPU9250_BASIC_DEFAULT_MAGNETOMETER_MODE MPU9250_MAGNETOMETER_MODE_CONTINUOUS2
85 #define MPU9250_BASIC_DEFAULT_MAGNETOMETER_BITS MPU9250_MAGNETOMETER_BITS_16
96 uint8_t mpu9250_basic_init(mpu9250_interface_t interface, mpu9250_address_t addr_pin);
97
105 uint8_t mpu9250_basic_deinit(void);
106
117 uint8_t mpu9250_basic_read(float g[3], float dps[3], float ut[3]);
118
127 uint8_t mpu9250_basic_read_temperature(float *degrees);
128
133 #ifdef __cplusplus
134 }
135 #endif
136
137 #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_basic_deinit
uint8_t mpu9250_basic_deinit(void)
basic example deinit
Definition: driver_mpu9250_basic.c:717
mpu9250_basic_init
uint8_t mpu9250_basic_init(mpu9250_interface_t interface, mpu9250_address_t addr_pin)
basic example init
Definition: driver_mpu9250_basic.c:50
mpu9250_basic_read_temperature
uint8_t mpu9250_basic_read_temperature(float *degrees)
basic example read temperature
Definition: driver_mpu9250_basic.c:649
mpu9250_basic_read
uint8_t mpu9250_basic_read(float g[3], float dps[3], float ut[3])
basic example read
Definition: driver_mpu9250_basic.c:672