LibDriver MPU9250
Loading...
Searching...
No Matches
driver_mpu9250.h
Go to the documentation of this file.
1
36
37#ifndef DRIVER_MPU9250_H
38#define DRIVER_MPU9250_H
39
40#include <stdio.h>
41#include <stdint.h>
42#include <string.h>
43
44#ifdef __cplusplus
45extern "C"{
46#endif
47
53
58
67
76
80typedef enum
81{
85
98
108
118
133
150
166
185
189typedef enum
190{
195
206
217
229
239
248
257
269
281
304
313
322
331
340
351
366
380
384
389
398
407
421
430
434
439
448
464
477
488
492
497
501typedef struct mpu9250_handle_s
502{
503 uint8_t iic_addr;
504 uint8_t (*iic_init)(void);
505 uint8_t (*iic_deinit)(void);
506 uint8_t (*iic_read)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
507 uint8_t (*iic_write)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len);
508 uint8_t (*spi_init)(void);
509 uint8_t (*spi_deinit)(void);
510 uint8_t (*spi_read)(uint8_t reg, uint8_t *buf, uint16_t len);
511 uint8_t (*spi_write)(uint8_t reg, uint8_t *buf, uint16_t len);
512 void (*delay_ms)(uint32_t ms);
513 void (*debug_print)(const char *const fmt, ...);
514 void (*receive_callback)(uint8_t type);
515 void (*dmp_tap_callback)(uint8_t count, uint8_t direction);
516 void (*dmp_orient_callback)(uint8_t orientation);
517 uint8_t inited;
518 uint8_t mag_inited;
519 uint8_t mag_asa[3];
520 uint8_t iic_spi;
521 uint8_t dmp_inited;
522 uint16_t orient;
523 uint16_t mask;
524 uint8_t buf[1024];
526
542
546
553
560#define DRIVER_MPU9250_LINK_INIT(HANDLE, STRUCTURE) memset(HANDLE, 0, sizeof(STRUCTURE))
561
568#define DRIVER_MPU9250_LINK_IIC_INIT(HANDLE, FUC) (HANDLE)->iic_init = FUC
569
576#define DRIVER_MPU9250_LINK_IIC_DEINIT(HANDLE, FUC) (HANDLE)->iic_deinit = FUC
577
584#define DRIVER_MPU9250_LINK_IIC_READ(HANDLE, FUC) (HANDLE)->iic_read = FUC
585
592#define DRIVER_MPU9250_LINK_IIC_WRITE(HANDLE, FUC) (HANDLE)->iic_write = FUC
593
600#define DRIVER_MPU9250_LINK_SPI_INIT(HANDLE, FUC) (HANDLE)->spi_init = FUC
601
608#define DRIVER_MPU9250_LINK_SPI_DEINIT(HANDLE, FUC) (HANDLE)->spi_deinit = FUC
609
616#define DRIVER_MPU9250_LINK_SPI_READ(HANDLE, FUC) (HANDLE)->spi_read = FUC
617
624#define DRIVER_MPU9250_LINK_SPI_WRITE(HANDLE, FUC) (HANDLE)->spi_write = FUC
625
632#define DRIVER_MPU9250_LINK_DELAY_MS(HANDLE, FUC) (HANDLE)->delay_ms = FUC
633
640#define DRIVER_MPU9250_LINK_DEBUG_PRINT(HANDLE, FUC) (HANDLE)->debug_print = FUC
641
648#define DRIVER_MPU9250_LINK_RECEIVE_CALLBACK(HANDLE, FUC) (HANDLE)->receive_callback = FUC
649
653
660
669uint8_t mpu9250_info(mpu9250_info_t *info);
670
681
692
703
714
726
739uint8_t mpu9250_init(mpu9250_handle_t *handle);
740
752uint8_t mpu9250_deinit(mpu9250_handle_t *handle);
753
774uint8_t mpu9250_read(mpu9250_handle_t *handle,
775 int16_t (*accel_raw)[3], float (*accel_g)[3],
776 int16_t (*gyro_raw)[3], float (*gyro_dps)[3],
777 int16_t (*mag_raw)[3], float (*mag_ut)[3],
778 uint16_t *len
779 );
780
793uint8_t mpu9250_read_temperature(mpu9250_handle_t *handle, int16_t (*raw), float *degrees);
794
806uint8_t mpu9250_set_fifo(mpu9250_handle_t *handle, mpu9250_bool_t enable);
807
819uint8_t mpu9250_get_fifo(mpu9250_handle_t *handle, mpu9250_bool_t *enable);
820
832
845
858
871
884
895uint8_t mpu9250_fifo_reset(mpu9250_handle_t *handle);
896
909
921
934
946
959
971
984
997
1010
1022uint8_t mpu9250_set_ptat(mpu9250_handle_t *handle, mpu9250_bool_t enable);
1023
1035uint8_t mpu9250_get_ptat(mpu9250_handle_t *handle, mpu9250_bool_t *enable);
1036
1049
1062
1074uint8_t mpu9250_set_sleep(mpu9250_handle_t *handle, mpu9250_bool_t enable);
1075
1087uint8_t mpu9250_get_sleep(mpu9250_handle_t *handle, mpu9250_bool_t *enable);
1088
1101
1114
1128
1142
1154uint8_t mpu9250_get_fifo_count(mpu9250_handle_t *handle, uint16_t* count);
1155
1168uint8_t mpu9250_fifo_get(mpu9250_handle_t *handle, uint8_t *buf, uint16_t len);
1169
1182uint8_t mpu9250_fifo_set(mpu9250_handle_t *handle, uint8_t *buf, uint16_t len);
1183
1196
1208uint8_t mpu9250_set_sample_rate_divider(mpu9250_handle_t *handle, uint8_t d);
1209
1221uint8_t mpu9250_get_sample_rate_divider(mpu9250_handle_t *handle, uint8_t *d);
1222
1235
1248
1261
1274
1287
1300
1314
1328
1341
1354
1367uint8_t mpu9250_set_gyroscope_choice(mpu9250_handle_t *handle, uint8_t choice);
1368
1380uint8_t mpu9250_get_gyroscope_choice(mpu9250_handle_t *handle, uint8_t *choice);
1381
1395
1409
1422
1435
1447
1460uint8_t mpu9250_set_accelerometer_choice(mpu9250_handle_t *handle, uint8_t choice);
1461
1474uint8_t mpu9250_get_accelerometer_choice(mpu9250_handle_t *handle, uint8_t *choice);
1475
1488
1501
1514
1527
1540
1553
1566
1579
1591uint8_t mpu9250_set_accelerometer_x_offset(mpu9250_handle_t *handle, int16_t offset);
1592
1604uint8_t mpu9250_get_accelerometer_x_offset(mpu9250_handle_t *handle, int16_t *offset);
1605
1617uint8_t mpu9250_set_accelerometer_y_offset(mpu9250_handle_t *handle, int16_t offset);
1618
1630uint8_t mpu9250_get_accelerometer_y_offset(mpu9250_handle_t *handle, int16_t *offset);
1631
1643uint8_t mpu9250_set_accelerometer_z_offset(mpu9250_handle_t *handle, int16_t offset);
1644
1656uint8_t mpu9250_get_accelerometer_z_offset(mpu9250_handle_t *handle, int16_t *offset);
1657
1669uint8_t mpu9250_accelerometer_offset_convert_to_register(mpu9250_handle_t *handle, float mg, int16_t *reg);
1670
1682uint8_t mpu9250_accelerometer_offset_convert_to_data(mpu9250_handle_t *handle, int16_t reg, float *mg);
1683
1695uint8_t mpu9250_set_gyro_x_offset(mpu9250_handle_t *handle, int16_t offset);
1696
1708uint8_t mpu9250_get_gyro_x_offset(mpu9250_handle_t *handle, int16_t *offset);
1709
1721uint8_t mpu9250_set_gyro_y_offset(mpu9250_handle_t *handle, int16_t offset);
1722
1734uint8_t mpu9250_get_gyro_y_offset(mpu9250_handle_t *handle, int16_t *offset);
1735
1747uint8_t mpu9250_set_gyro_z_offset(mpu9250_handle_t *handle, int16_t offset);
1748
1760uint8_t mpu9250_get_gyro_z_offset(mpu9250_handle_t *handle, int16_t *offset);
1761
1773uint8_t mpu9250_gyro_offset_convert_to_register(mpu9250_handle_t *handle, float dps, int16_t *reg);
1774
1786uint8_t mpu9250_gyro_offset_convert_to_data(mpu9250_handle_t *handle, int16_t reg, float *dps);
1787
1801
1815
1828
1841
1854
1867
1880
1893
1906
1919
1932
1945
1958
1971
1984
1997
2011
2025
2037uint8_t mpu9250_get_interrupt_status(mpu9250_handle_t *handle, uint8_t *status);
2038
2050uint8_t mpu9250_set_gyroscope_x_test(mpu9250_handle_t *handle, uint8_t data);
2051
2063uint8_t mpu9250_get_gyroscope_x_test(mpu9250_handle_t *handle, uint8_t *data);
2064
2076uint8_t mpu9250_set_gyroscope_y_test(mpu9250_handle_t *handle, uint8_t data);
2077
2089uint8_t mpu9250_get_gyroscope_y_test(mpu9250_handle_t *handle, uint8_t *data);
2090
2102uint8_t mpu9250_set_gyroscope_z_test(mpu9250_handle_t *handle, uint8_t data);
2103
2115uint8_t mpu9250_get_gyroscope_z_test(mpu9250_handle_t *handle, uint8_t *data);
2116
2128uint8_t mpu9250_set_accelerometer_x_test(mpu9250_handle_t *handle, uint8_t data);
2129
2141uint8_t mpu9250_get_accelerometer_x_test(mpu9250_handle_t *handle, uint8_t *data);
2142
2154uint8_t mpu9250_set_accelerometer_y_test(mpu9250_handle_t *handle, uint8_t data);
2155
2167uint8_t mpu9250_get_accelerometer_y_test(mpu9250_handle_t *handle, uint8_t *data);
2168
2180uint8_t mpu9250_set_accelerometer_z_test(mpu9250_handle_t *handle, uint8_t data);
2181
2193uint8_t mpu9250_get_accelerometer_z_test(mpu9250_handle_t *handle, uint8_t *data);
2194
2206uint8_t mpu9250_set_motion_threshold(mpu9250_handle_t *handle, uint8_t threshold);
2207
2219uint8_t mpu9250_get_motion_threshold(mpu9250_handle_t *handle, uint8_t *threshold);
2220
2232uint8_t mpu9250_motion_threshold_convert_to_register(mpu9250_handle_t *handle, float mg, uint8_t *reg);
2233
2245uint8_t mpu9250_motion_threshold_convert_to_data(mpu9250_handle_t *handle, uint8_t reg, float *mg);
2246
2259uint8_t mpu9250_self_test(mpu9250_handle_t *handle, int32_t gyro_offset_raw[3], int32_t accel_offset_raw[3]);
2260
2273
2286
2299
2312
2325
2338
2351
2364
2379
2394
2409
2424
2438uint8_t mpu9250_set_iic_address(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t addr_7bit);
2439
2453uint8_t mpu9250_get_iic_address(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t *addr_7bit);
2454
2468uint8_t mpu9250_set_iic_register(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t reg);
2469
2483uint8_t mpu9250_get_iic_register(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t *reg);
2484
2498uint8_t mpu9250_set_iic_data_out(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t data);
2499
2513uint8_t mpu9250_get_iic_data_out(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t *data);
2514
2529
2544
2559
2574
2589
2604
2619
2634
2649uint8_t mpu9250_set_iic_transferred_len(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t len);
2650
2664uint8_t mpu9250_get_iic_transferred_len(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t *len);
2665
2677uint8_t mpu9250_get_iic_status(mpu9250_handle_t *handle, uint8_t *status);
2678
2692
2706
2719
2732
2745
2758
2771
2784
2797uint8_t mpu9250_set_iic_delay(mpu9250_handle_t *handle, uint8_t delay);
2798
2810uint8_t mpu9250_get_iic_delay(mpu9250_handle_t *handle, uint8_t *delay);
2811
2823uint8_t mpu9250_set_iic4_data_out(mpu9250_handle_t *handle, uint8_t data);
2824
2836uint8_t mpu9250_get_iic4_data_out(mpu9250_handle_t *handle, uint8_t *data);
2837
2849uint8_t mpu9250_set_iic4_data_in(mpu9250_handle_t *handle, uint8_t data);
2850
2862uint8_t mpu9250_get_iic4_data_in(mpu9250_handle_t *handle, uint8_t *data);
2863
2877uint8_t mpu9250_read_extern_sensor_data(mpu9250_handle_t *handle, uint8_t *data, uint8_t len);
2878
2882
2889
2904
2917uint8_t mpu9250_dmp_set_pedometer_walk_time(mpu9250_handle_t *handle, uint32_t ms);
2918
2931uint8_t mpu9250_dmp_get_pedometer_walk_time(mpu9250_handle_t *handle, uint32_t *ms);
2932
2945uint8_t mpu9250_dmp_set_pedometer_step_count(mpu9250_handle_t *handle, uint32_t count);
2946
2959uint8_t mpu9250_dmp_get_pedometer_step_count(mpu9250_handle_t *handle, uint32_t *count);
2960
2973uint8_t mpu9250_dmp_set_shake_reject_timeout(mpu9250_handle_t *handle, uint16_t ms);
2974
2987uint8_t mpu9250_dmp_get_shake_reject_timeout(mpu9250_handle_t *handle, uint16_t *ms);
2988
3001uint8_t mpu9250_dmp_set_shake_reject_time(mpu9250_handle_t *handle, uint16_t ms);
3002
3015uint8_t mpu9250_dmp_get_shake_reject_time(mpu9250_handle_t *handle, uint16_t *ms);
3016
3029uint8_t mpu9250_dmp_set_shake_reject_thresh(mpu9250_handle_t *handle, uint16_t dps);
3030
3043uint8_t mpu9250_dmp_get_shake_reject_thresh(mpu9250_handle_t *handle, uint16_t *dps);
3044
3057uint8_t mpu9250_dmp_set_tap_time_multi(mpu9250_handle_t *handle, uint16_t ms);
3058
3071uint8_t mpu9250_dmp_get_tap_time_multi(mpu9250_handle_t *handle, uint16_t *ms);
3072
3085uint8_t mpu9250_dmp_set_tap_time(mpu9250_handle_t *handle, uint16_t ms);
3086
3099uint8_t mpu9250_dmp_get_tap_time(mpu9250_handle_t *handle, uint16_t *ms);
3100
3114uint8_t mpu9250_dmp_set_min_tap_count(mpu9250_handle_t *handle, uint8_t cnt);
3115
3128uint8_t mpu9250_dmp_get_min_tap_count(mpu9250_handle_t *handle, uint8_t *cnt);
3129
3143
3157
3171
3185
3198uint8_t mpu9250_dmp_set_gyro_bias(mpu9250_handle_t *handle, int32_t bias[3]);
3199
3212uint8_t mpu9250_dmp_set_accel_bias(mpu9250_handle_t *handle, int32_t bias[3]);
3213
3226uint8_t mpu9250_dmp_set_orientation(mpu9250_handle_t *handle, int8_t mat[9]);
3227
3244uint8_t mpu9250_dmp_set_feature(mpu9250_handle_t *handle, uint16_t mask);
3245
3259uint8_t mpu9250_dmp_set_fifo_rate(mpu9250_handle_t *handle, uint16_t rate);
3260
3273uint8_t mpu9250_dmp_get_fifo_rate(mpu9250_handle_t *handle, uint16_t *rate);
3274
3289
3304
3320uint8_t mpu9250_dmp_set_tap_thresh(mpu9250_handle_t *handle, mpu9250_axis_t axis, uint16_t mg_ms);
3321
3336uint8_t mpu9250_dmp_get_tap_thresh(mpu9250_handle_t *handle, mpu9250_axis_t axis, uint16_t *mg_ms);
3337
3362uint8_t mpu9250_dmp_read(mpu9250_handle_t *handle,
3363 int16_t (*accel_raw)[3], float (*accel_g)[3],
3364 int16_t (*gyro_raw)[3], float (*gyro_dps)[3],
3365 int32_t (*quat)[4],
3366 float *pitch, float *roll, float *yaw,
3367 uint16_t *l
3368 );
3369
3382uint8_t mpu9250_dmp_set_tap_callback(mpu9250_handle_t *handle, void (*callback)(uint8_t count, uint8_t direction));
3383
3396uint8_t mpu9250_dmp_set_orient_callback(mpu9250_handle_t *handle, void (*callback)(uint8_t orientation));
3397
3411
3428 int32_t gyro_offset_raw[3], int32_t accel_offset_raw[3],
3429 int32_t gyro_offset[3], int32_t accel_offset[3]);
3430
3434
3441
3455uint8_t mpu9250_mag_init(mpu9250_handle_t *handle);
3456
3468uint8_t mpu9250_mag_deinit(mpu9250_handle_t *handle);
3469
3483uint8_t mpu9250_mag_read(mpu9250_handle_t *handle, int16_t mag_raw[3], float mag_ut[3]);
3484
3497uint8_t mpu9250_mag_get_info(mpu9250_handle_t *handle, uint8_t *info);
3498
3511uint8_t mpu9250_mag_get_status1(mpu9250_handle_t *handle, uint8_t *status);
3512
3525uint8_t mpu9250_mag_get_status2(mpu9250_handle_t *handle, uint8_t *status);
3526
3540
3554
3568
3582
3596
3609uint8_t mpu9250_mag_get_reset(mpu9250_handle_t *handle, mpu9250_bool_t *enable);
3610
3624
3638
3651
3664uint8_t mpu9250_mag_get_asa(mpu9250_handle_t *handle, uint8_t asa[3]);
3665
3678
3682
3689
3703uint8_t mpu9250_set_reg(mpu9250_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len);
3704
3718uint8_t mpu9250_get_reg(mpu9250_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len);
3719
3723
3727
3728#ifdef __cplusplus
3729}
3730#endif
3731
3732#endif
uint8_t mpu9250_get_addr_pin(mpu9250_handle_t *handle, mpu9250_address_t *addr_pin)
get the chip address pin
uint8_t mpu9250_set_accelerometer_z_test(mpu9250_handle_t *handle, uint8_t data)
set the accelerometer z test
uint8_t mpu9250_get_accel_compare_with_previous_sample(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
get the accel compare with previous sample status
uint8_t mpu9250_get_interrupt_pin_type(mpu9250_handle_t *handle, mpu9250_pin_type_t *type)
get the interrupt pin type
uint8_t mpu9250_set_accelerometer_low_pass_filter(mpu9250_handle_t *handle, mpu9250_accelerometer_low_pass_filter_t filter)
set the accelerometer low pass filter
uint8_t mpu9250_set_wake_on_motion(mpu9250_handle_t *handle, mpu9250_bool_t enable)
enable or disable wake on motion
uint8_t mpu9250_set_accel_compare_with_previous_sample(mpu9250_handle_t *handle, mpu9250_bool_t enable)
enable or disable accel compare with previous sample
uint8_t mpu9250_set_fifo_mode(mpu9250_handle_t *handle, mpu9250_fifo_mode mode)
set the fifo mode
uint8_t mpu9250_get_iic_read_mode(mpu9250_handle_t *handle, mpu9250_iic_read_mode_t *mode)
get the iic read mode
uint8_t mpu9250_self_test(mpu9250_handle_t *handle, int32_t gyro_offset_raw[3], int32_t accel_offset_raw[3])
run the self test
uint8_t mpu9250_set_addr_pin(mpu9250_handle_t *handle, mpu9250_address_t addr_pin)
set the chip address pin
uint8_t mpu9250_set_accelerometer_z_offset(mpu9250_handle_t *handle, int16_t offset)
set the accelerometer z offset
uint8_t mpu9250_get_interrupt_read_clear(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
get the interrupt reading clear status
uint8_t mpu9250_set_ptat(mpu9250_handle_t *handle, mpu9250_bool_t enable)
enable or disable the temperature sensor
uint8_t mpu9250_get_iic_master(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
get the iic master status
uint8_t mpu9250_get_iic_enable(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_bool_t *enable)
get the iic status
uint8_t mpu9250_get_iic4_enable(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
get the iic4 status
uint8_t mpu9250_get_fsync_interrupt_level(mpu9250_handle_t *handle, mpu9250_pin_level_t *level)
get the fsync interrupt level
uint8_t mpu9250_set_fifo_enable(mpu9250_handle_t *handle, mpu9250_fifo_t fifo, mpu9250_bool_t enable)
enable or disable the fifo function
uint8_t mpu9250_get_fifo_mode(mpu9250_handle_t *handle, mpu9250_fifo_mode *mode)
get the fifo mode
uint8_t mpu9250_get_accelerometer_low_pass_filter(mpu9250_handle_t *handle, mpu9250_accelerometer_low_pass_filter_t *filter)
get the accelerometer low pass filter
uint8_t mpu9250_set_standby_mode(mpu9250_handle_t *handle, mpu9250_source_t source, mpu9250_bool_t enable)
set source into standby mode
uint8_t mpu9250_set_iic_wait_for_external_sensor(mpu9250_handle_t *handle, mpu9250_bool_t enable)
enable or disable iic wait for external sensor
uint8_t mpu9250_get_gyro_z_offset(mpu9250_handle_t *handle, int16_t *offset)
get the gyro z offset
uint8_t mpu9250_get_iic_mode(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_iic_mode_t *mode)
get the iic mode
uint8_t mpu9250_get_iic_bypass(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
get the iic bypass status
uint8_t mpu9250_get_gyroscope_y_test(mpu9250_handle_t *handle, uint8_t *data)
get the gyroscope y test
uint8_t mpu9250_get_sample_rate_divider(mpu9250_handle_t *handle, uint8_t *d)
get the sample rate divider
uint8_t mpu9250_set_cycle_wake_up(mpu9250_handle_t *handle, mpu9250_bool_t enable)
enable or disable the cycle wake up mode
uint8_t mpu9250_set_accelerometer_y_test(mpu9250_handle_t *handle, uint8_t data)
set the accelerometer y test
uint8_t mpu9250_get_wake_on_motion(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
get the wake on motion status
uint8_t mpu9250_set_interrupt_latch(mpu9250_handle_t *handle, mpu9250_bool_t enable)
enable or disable the interrupt latch
uint8_t mpu9250_set_iic4_data_in(mpu9250_handle_t *handle, uint8_t data)
set the iic4 data in
uint8_t mpu9250_get_gyro_y_offset(mpu9250_handle_t *handle, int16_t *offset)
get the gyro y offset
mpu9250_accelerometer_range_t
mpu9250 accelerometer range enumeration definition
uint8_t mpu9250_get_accelerometer_z_offset(mpu9250_handle_t *handle, int16_t *offset)
get the accelerometer z offset
uint8_t mpu9250_get_iic_byte_swap(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_bool_t *enable)
get the iic byte swap status
uint8_t mpu9250_get_fifo_count(mpu9250_handle_t *handle, uint16_t *count)
get the fifo counter value
uint8_t mpu9250_get_iic_master_reset(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
get the iic master reset status
uint8_t mpu9250_set_extern_sync(mpu9250_handle_t *handle, mpu9250_extern_sync_t sync)
set the extern sync type
uint8_t mpu9250_accelerometer_offset_convert_to_data(mpu9250_handle_t *handle, int16_t reg, float *mg)
convert the register raw data to the accelerometer offset
uint8_t mpu9250_get_iic4_interrupt(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
get the iic4 interrupt status
uint8_t mpu9250_fifo_get(mpu9250_handle_t *handle, uint8_t *buf, uint16_t len)
fifo read bytes
uint8_t mpu9250_get_accelerometer_test(mpu9250_handle_t *handle, mpu9250_axis_t axis, mpu9250_bool_t *enable)
get the accelerometer test
mpu9250_pin_type_t
mpu9250 pin type enumeration definition
uint8_t mpu9250_set_gyro_standby(mpu9250_handle_t *handle, mpu9250_bool_t enable)
enable or disable the gyro standby
mpu9250_signal_path_reset_t
mpu9250 signal path reset enumeration definition
uint8_t mpu9250_set_iic_multi_master(mpu9250_handle_t *handle, mpu9250_bool_t enable)
enable or disable iic multi master
uint8_t mpu9250_get_sleep(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
get the sleep status
uint8_t mpu9250_get_accelerometer_z_test(mpu9250_handle_t *handle, uint8_t *data)
get the accelerometer z test
uint8_t mpu9250_set_signal_path_reset(mpu9250_handle_t *handle, mpu9250_signal_path_reset_t path)
set the signal path reset
uint8_t mpu9250_get_accelerometer_range(mpu9250_handle_t *handle, mpu9250_accelerometer_range_t *range)
get the accelerometer range
uint8_t mpu9250_get_ptat(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
get the temperature sensor status
uint8_t mpu9250_get_iic_multi_master(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
get the iic multi master status
mpu9250_iic_delay_t
mpu9250 iic delay enumeration definition
uint8_t mpu9250_get_iic_data_out(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t *data)
get the iic data out
uint8_t mpu9250_set_iic_transferred_len(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t len)
set the iic transferred length
uint8_t mpu9250_fifo_reset(mpu9250_handle_t *handle)
reset the fifo
uint8_t mpu9250_set_iic_read_mode(mpu9250_handle_t *handle, mpu9250_iic_read_mode_t mode)
set the iic read mode
uint8_t mpu9250_accelerometer_offset_convert_to_register(mpu9250_handle_t *handle, float mg, int16_t *reg)
convert the accelerometer offset to the register raw data
uint8_t mpu9250_get_sensor_reset(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
get the sensor reset status
mpu9250_address_t
mpu9250 address enumeration definition
mpu9250_gyroscope_range_t
mpu9250 gyroscope range enumeration definition
uint8_t mpu9250_set_iic4_data_out(mpu9250_handle_t *handle, uint8_t data)
set the iic4 data out
uint8_t mpu9250_set_iic_register(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t reg)
set the iic register
uint8_t mpu9250_get_accelerometer_choice(mpu9250_handle_t *handle, uint8_t *choice)
get the accelerometer choice
uint8_t mpu9250_set_iic_data_out(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t data)
set the iic data out
uint8_t mpu9250_set_fsync_interrupt(mpu9250_handle_t *handle, mpu9250_bool_t enable)
enable or disable the fsync interrupt
uint8_t mpu9250_get_iic4_transaction_mode(mpu9250_handle_t *handle, mpu9250_iic4_transaction_mode_t *mode)
get the iic4 transaction mode
uint8_t mpu9250_get_interrupt(mpu9250_handle_t *handle, mpu9250_interrupt_t type, mpu9250_bool_t *enable)
get the interrupt status
uint8_t mpu9250_set_accelerometer_y_offset(mpu9250_handle_t *handle, int16_t offset)
set the accelerometer y offset
uint8_t mpu9250_motion_threshold_convert_to_data(mpu9250_handle_t *handle, uint8_t reg, float *mg)
convert the register raw data to the motion threshold
uint8_t mpu9250_set_iic_bypass(mpu9250_handle_t *handle, mpu9250_bool_t enable)
enable or disable the iic bypass
uint8_t mpu9250_get_standby_mode(mpu9250_handle_t *handle, mpu9250_source_t source, mpu9250_bool_t *enable)
get the source mode
uint8_t mpu9250_get_clock_source(mpu9250_handle_t *handle, mpu9250_clock_source_t *clock_source)
get the chip clock source
uint8_t mpu9250_info(mpu9250_info_t *info)
get the chip's information
uint8_t mpu9250_set_accelerometer_test(mpu9250_handle_t *handle, mpu9250_axis_t axis, mpu9250_bool_t enable)
set the accelerometer test
uint8_t mpu9250_set_interrupt_level(mpu9250_handle_t *handle, mpu9250_pin_level_t level)
set the interrupt level
uint8_t mpu9250_set_gyroscope_x_test(mpu9250_handle_t *handle, uint8_t data)
set the gyroscope x test
uint8_t mpu9250_get_iic4_data_out(mpu9250_handle_t *handle, uint8_t *data)
get the iic4 data out
uint8_t mpu9250_set_interrupt_read_clear(mpu9250_handle_t *handle, mpu9250_bool_t enable)
enable or disable the interrupt reading clear
uint8_t mpu9250_get_extern_sync(mpu9250_handle_t *handle, mpu9250_extern_sync_t *sync)
get the extern sync type
uint8_t mpu9250_set_interface(mpu9250_handle_t *handle, mpu9250_interface_t interface)
set the chip interface
uint8_t mpu9250_get_interface(mpu9250_handle_t *handle, mpu9250_interface_t *interface)
get the chip interface
mpu9250_iic_transaction_mode_t
mpu9250 iic transaction mode enumeration definition
mpu9250_iic_slave_t
mpu9250 iic slave enumeration definition
uint8_t mpu9250_irq_handler(mpu9250_handle_t *handle)
irq handler
uint8_t mpu9250_set_gyroscope_y_test(mpu9250_handle_t *handle, uint8_t data)
set the gyroscope y test
uint8_t mpu9250_get_gyro_standby(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
get the gyro standby status
uint8_t mpu9250_set_iic_mode(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_iic_mode_t mode)
set the iic mode
mpu9250_interrupt_t
mpu9250 interrupt enumeration definition
uint8_t mpu9250_get_gyroscope_x_test(mpu9250_handle_t *handle, uint8_t *data)
get the gyroscope x test
uint8_t mpu9250_get_fsync_interrupt(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
get the fsync interrupt status
mpu9250_extern_sync_t
mpu9250 extern sync enumeration definition
uint8_t mpu9250_gyro_offset_convert_to_data(mpu9250_handle_t *handle, int16_t reg, float *dps)
convert the register raw data to the gyro offset
uint8_t mpu9250_sensor_reset(mpu9250_handle_t *handle)
reset all sensors
mpu9250_source_t
mpu9250 source enumeration definition
uint8_t mpu9250_set_iic_delay_enable(mpu9250_handle_t *handle, mpu9250_iic_delay_t delay, mpu9250_bool_t enable)
enable or disable the iic delay
struct mpu9250_info_s mpu9250_info_t
mpu9250 information structure definition
uint8_t mpu9250_get_iic_transaction_mode(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_iic_transaction_mode_t *mode)
get the iic transaction mode
mpu9250_interface_t
mpu9250 interface enumeration definition
mpu9250_bool_t
mpu9250 bool enumeration definition
uint8_t mpu9250_set_iic_transaction_mode(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_iic_transaction_mode_t mode)
set the iic transaction mode
uint8_t mpu9250_get_accelerometer_y_test(mpu9250_handle_t *handle, uint8_t *data)
get the accelerometer y test
uint8_t mpu9250_set_gyro_y_offset(mpu9250_handle_t *handle, int16_t offset)
set the gyro y offset
uint8_t mpu9250_get_gyroscope_z_test(mpu9250_handle_t *handle, uint8_t *data)
get the gyroscope z test
uint8_t mpu9250_set_interrupt(mpu9250_handle_t *handle, mpu9250_interrupt_t type, mpu9250_bool_t enable)
enable or disable the interrupt
uint8_t mpu9250_get_accelerometer_x_test(mpu9250_handle_t *handle, uint8_t *data)
get the accelerometer x test
uint8_t mpu9250_set_motion_threshold(mpu9250_handle_t *handle, uint8_t threshold)
set the motion_threshold
mpu9250_iic_status_t
mpu9250 iic status enumeration definition
uint8_t mpu9250_set_fsync_interrupt_level(mpu9250_handle_t *handle, mpu9250_pin_level_t level)
set the fsync interrupt level
uint8_t mpu9250_get_low_pass_filter(mpu9250_handle_t *handle, mpu9250_low_pass_filter_t *filter)
get the low pass filter
uint8_t mpu9250_get_interrupt_status(mpu9250_handle_t *handle, uint8_t *status)
get the interrupt status
uint8_t mpu9250_set_gyroscope_choice(mpu9250_handle_t *handle, uint8_t choice)
set the gyroscope choice
uint8_t mpu9250_set_iic_fifo_enable(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_bool_t enable)
enable or disable the iic fifo
uint8_t mpu9250_deinit(mpu9250_handle_t *handle)
close the chip
uint8_t mpu9250_read(mpu9250_handle_t *handle, int16_t(*accel_raw)[3], float(*accel_g)[3], int16_t(*gyro_raw)[3], float(*gyro_dps)[3], int16_t(*mag_raw)[3], float(*mag_ut)[3], uint16_t *len)
read the data
struct mpu9250_handle_s mpu9250_handle_t
mpu9250 handle structure definition
uint8_t mpu9250_read_temperature(mpu9250_handle_t *handle, int16_t(*raw), float *degrees)
read the temperature
uint8_t mpu9250_get_accelerometer_y_offset(mpu9250_handle_t *handle, int16_t *offset)
get the accelerometer y offset
uint8_t mpu9250_get_fifo_enable(mpu9250_handle_t *handle, mpu9250_fifo_t fifo, mpu9250_bool_t *enable)
get the fifo function status
uint8_t mpu9250_set_fifo_1024kb(mpu9250_handle_t *handle)
set fifo 1024kb
uint8_t mpu9250_get_gyroscope_range(mpu9250_handle_t *handle, mpu9250_gyroscope_range_t *range)
get the gyroscope range
uint8_t mpu9250_get_interrupt_level(mpu9250_handle_t *handle, mpu9250_pin_level_t *level)
get the interrupt level
uint8_t mpu9250_motion_threshold_convert_to_register(mpu9250_handle_t *handle, float mg, uint8_t *reg)
convert the motion threshold to the register raw data
uint8_t mpu9250_set_low_pass_filter(mpu9250_handle_t *handle, mpu9250_low_pass_filter_t filter)
set the low pass filter
uint8_t mpu9250_set_gyroscope_test(mpu9250_handle_t *handle, mpu9250_axis_t axis, mpu9250_bool_t enable)
set the gyroscope test
uint8_t mpu9250_set_clock_source(mpu9250_handle_t *handle, mpu9250_clock_source_t clock_source)
set the chip clock source
uint8_t mpu9250_get_gyroscope_test(mpu9250_handle_t *handle, mpu9250_axis_t axis, mpu9250_bool_t *enable)
get the gyroscope test
uint8_t mpu9250_device_reset(mpu9250_handle_t *handle)
reset the chip
uint8_t mpu9250_set_low_power_accel_output_rate(mpu9250_handle_t *handle, mpu9250_low_power_accel_output_rate_t rate)
set the low power accel output rate
uint8_t mpu9250_get_cycle_wake_up(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
get the cycle wake up mode status
mpu9250_low_pass_filter_t
mpu9250 low pass filter enumeration definition
uint8_t mpu9250_get_iic_group_order(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_iic_group_order_t *order)
get the iic group order
uint8_t mpu9250_get_iic4_data_in(mpu9250_handle_t *handle, uint8_t *data)
get the iic4 data in
uint8_t mpu9250_set_iic_clock(mpu9250_handle_t *handle, mpu9250_iic_clock_t clk)
set the iic clock
uint8_t mpu9250_get_disable_iic_slave(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
get the iic slave status
uint8_t mpu9250_get_iic_delay_enable(mpu9250_handle_t *handle, mpu9250_iic_delay_t delay, mpu9250_bool_t *enable)
get the iic delay status
uint8_t mpu9250_set_disable_iic_slave(mpu9250_handle_t *handle, mpu9250_bool_t enable)
enable or disable the iic slave mode
uint8_t mpu9250_get_iic_transferred_len(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t *len)
get the iic transferred length
uint8_t mpu9250_get_gyro_x_offset(mpu9250_handle_t *handle, int16_t *offset)
get the gyro x offset
uint8_t mpu9250_set_iic_address(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t addr_7bit)
set the iic address
mpu9250_fifo_mode
mpu9250 fifo mode enumeration definition
mpu9250_low_power_accel_output_rate_t
mpu9250 low power accel output rate enumeration definition
uint8_t mpu9250_get_iic_status(mpu9250_handle_t *handle, uint8_t *status)
get the iic status
uint8_t mpu9250_read_extern_sensor_data(mpu9250_handle_t *handle, uint8_t *data, uint8_t len)
read the extern sensor data
uint8_t mpu9250_set_sample_rate_divider(mpu9250_handle_t *handle, uint8_t d)
set the sample rate divider
uint8_t mpu9250_fifo_set(mpu9250_handle_t *handle, uint8_t *buf, uint16_t len)
fifo write bytes
uint8_t mpu9250_get_iic_fifo_enable(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_bool_t *enable)
get the iic fifo status
uint8_t mpu9250_set_gyro_x_offset(mpu9250_handle_t *handle, int16_t offset)
set the gyro x offset
uint8_t mpu9250_set_accelerometer_x_offset(mpu9250_handle_t *handle, int16_t offset)
set the accelerometer x offset
mpu9250_iic_read_mode_t
mpu9250 iic read mode enumeration definition
uint8_t mpu9250_set_accelerometer_x_test(mpu9250_handle_t *handle, uint8_t data)
set the accelerometer x test
uint8_t mpu9250_set_fifo(mpu9250_handle_t *handle, mpu9250_bool_t enable)
enable or disable fifo
uint8_t mpu9250_get_fifo_reset(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
get the fifo reset status
uint8_t mpu9250_init(mpu9250_handle_t *handle)
initialize the chip
uint8_t mpu9250_set_iic_enable(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_bool_t enable)
enable or disable the iic
uint8_t mpu9250_get_iic_delay(mpu9250_handle_t *handle, uint8_t *delay)
get the iic delay
mpu9250_iic4_transaction_mode_t
mpu9250 iic4 transaction mode enumeration definition
uint8_t mpu9250_set_iic_delay(mpu9250_handle_t *handle, uint8_t delay)
set the iic delay
uint8_t mpu9250_set_accelerometer_choice(mpu9250_handle_t *handle, uint8_t choice)
set the accelerometer choice
mpu9250_iic_clock_t
mpu9250 iic clock enumeration definition
uint8_t mpu9250_set_iic4_interrupt(mpu9250_handle_t *handle, mpu9250_bool_t enable)
enable or disable the iic4 interrupt
uint8_t mpu9250_set_gyroscope_range(mpu9250_handle_t *handle, mpu9250_gyroscope_range_t range)
set the gyroscope range
mpu9250_iic_group_order_t
mpu9250 iic group order enumeration definition
uint8_t mpu9250_iic_master_reset(mpu9250_handle_t *handle)
reset the iic master controller
uint8_t mpu9250_get_device_reset(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
get the device reset status
uint8_t mpu9250_get_accelerometer_x_offset(mpu9250_handle_t *handle, int16_t *offset)
get the accelerometer x offset
uint8_t mpu9250_set_iic_byte_swap(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_bool_t enable)
enable or disable the iic byte swap
uint8_t mpu9250_set_gyro_z_offset(mpu9250_handle_t *handle, int16_t offset)
set the gyro z offset
uint8_t mpu9250_set_interrupt_pin_type(mpu9250_handle_t *handle, mpu9250_pin_type_t type)
set the interrupt pin type
uint8_t mpu9250_get_fifo(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
get the fifo status
uint8_t mpu9250_set_iic4_transaction_mode(mpu9250_handle_t *handle, mpu9250_iic4_transaction_mode_t mode)
set the iic4 transaction mode
uint8_t mpu9250_get_interrupt_latch(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
get the interrupt latch status
uint8_t mpu9250_get_gyroscope_choice(mpu9250_handle_t *handle, uint8_t *choice)
get the gyroscope choice
uint8_t mpu9250_set_gyroscope_z_test(mpu9250_handle_t *handle, uint8_t data)
set the gyroscope z test
uint8_t mpu9250_set_iic_master(mpu9250_handle_t *handle, mpu9250_bool_t enable)
enable or disable the iic master mode
uint8_t mpu9250_get_iic_register(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t *reg)
get the iic register
uint8_t mpu9250_set_accelerometer_range(mpu9250_handle_t *handle, mpu9250_accelerometer_range_t range)
set the accelerometer range
uint8_t mpu9250_gyro_offset_convert_to_register(mpu9250_handle_t *handle, float dps, int16_t *reg)
convert the gyro offset to the register raw data
uint8_t mpu9250_get_iic_wait_for_external_sensor(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
get the iic wait for external sensor status
mpu9250_iic_mode_t
mpu9250 iic mode enumeration definition
mpu9250_axis_t
mpu9250 axis enumeration definition
uint8_t mpu9250_get_iic_clock(mpu9250_handle_t *handle, mpu9250_iic_clock_t *clk)
get the iic clock
mpu9250_accelerometer_low_pass_filter_t
mpu9250 accelerometer low pass filter enumeration definition
uint8_t mpu9250_set_iic_group_order(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, mpu9250_iic_group_order_t order)
set the iic group order
uint8_t mpu9250_get_motion_threshold(mpu9250_handle_t *handle, uint8_t *threshold)
get the motion_threshold
uint8_t mpu9250_set_sleep(mpu9250_handle_t *handle, mpu9250_bool_t enable)
enable or disable the sleep mode
uint8_t mpu9250_get_iic_address(mpu9250_handle_t *handle, mpu9250_iic_slave_t slave, uint8_t *addr_7bit)
get the iic address
uint8_t mpu9250_get_low_power_accel_output_rate(mpu9250_handle_t *handle, mpu9250_low_power_accel_output_rate_t *rate)
get the low power accel output rate
uint8_t mpu9250_set_iic4_enable(mpu9250_handle_t *handle, mpu9250_bool_t enable)
enable or disable the iic4
mpu9250_pin_level_t
mpu9250 pin level enumeration definition
mpu9250_fifo_t
mpu9250 fifo enumeration definition
mpu9250_clock_source_t
mpu9250 clock source enumeration definition
uint8_t mpu9250_force_fifo_reset(mpu9250_handle_t *handle)
force reset the fifo
@ MPU9250_ACCELEROMETER_RANGE_4G
@ MPU9250_ACCELEROMETER_RANGE_2G
@ MPU9250_ACCELEROMETER_RANGE_16G
@ MPU9250_ACCELEROMETER_RANGE_8G
@ MPU9250_PIN_TYPE_PUSH_PULL
@ MPU9250_PIN_TYPE_OPEN_DRAIN
@ MPU9250_SIGNAL_PATH_RESET_TEMP
@ MPU9250_SIGNAL_PATH_RESET_ACCEL
@ MPU9250_SIGNAL_PATH_RESET_GYRO
@ MPU9250_IIC_DELAY_ES_SHADOW
@ MPU9250_IIC_DELAY_SLAVE_2
@ MPU9250_IIC_DELAY_SLAVE_0
@ MPU9250_IIC_DELAY_SLAVE_1
@ MPU9250_IIC_DELAY_SLAVE_3
@ MPU9250_IIC_DELAY_SLAVE_4
@ MPU9250_ADDRESS_AD0_LOW
@ MPU9250_ADDRESS_AD0_HIGH
@ MPU9250_GYROSCOPE_RANGE_2000DPS
@ MPU9250_GYROSCOPE_RANGE_250DPS
@ MPU9250_GYROSCOPE_RANGE_500DPS
@ MPU9250_GYROSCOPE_RANGE_1000DPS
@ MPU9250_IIC_TRANSACTION_MODE_REG_DATA
@ MPU9250_IIC_TRANSACTION_MODE_DATA
@ MPU9250_IIC_SLAVE_3
@ MPU9250_IIC_SLAVE_2
@ MPU9250_IIC_SLAVE_4
@ MPU9250_IIC_SLAVE_0
@ MPU9250_IIC_SLAVE_1
@ MPU9250_INTERRUPT_MOTION
@ MPU9250_INTERRUPT_DATA_READY
@ MPU9250_INTERRUPT_FSYNC_INT
@ MPU9250_INTERRUPT_DMP
@ MPU9250_INTERRUPT_FIFO_OVERFLOW
@ MPU9250_EXTERN_SYNC_GYRO_YOUT_L
@ MPU9250_EXTERN_SYNC_ACCEL_XOUT_L
@ MPU9250_EXTERN_SYNC_TEMP_OUT_L
@ MPU9250_EXTERN_SYNC_ACCEL_ZOUT_L
@ MPU9250_EXTERN_SYNC_GYRO_ZOUT_L
@ MPU9250_EXTERN_SYNC_ACCEL_YOUT_L
@ MPU9250_EXTERN_SYNC_INPUT_DISABLED
@ MPU9250_EXTERN_SYNC_GYRO_XOUT_L
@ MPU9250_SOURCE_GYRO_X
@ MPU9250_SOURCE_ACC_Z
@ MPU9250_SOURCE_GYRO_Y
@ MPU9250_SOURCE_GYRO_Z
@ MPU9250_SOURCE_ACC_X
@ MPU9250_SOURCE_ACC_Y
@ MPU9250_INTERFACE_SPI
@ MPU9250_INTERFACE_IIC
@ MPU9250_BOOL_TRUE
@ MPU9250_BOOL_FALSE
@ MPU9250_IIC_STATUS_IIC_SLV0_NACK
@ MPU9250_IIC_STATUS_IIC_SLV1_NACK
@ MPU9250_IIC_STATUS_IIC_SLV4_NACK
@ MPU9250_IIC_STATUS_IIC_SLV2_NACK
@ MPU9250_IIC_STATUS_IIC_LOST_ARB
@ MPU9250_IIC_STATUS_IIC_SLV4_DONE
@ MPU9250_IIC_STATUS_IIC_SLV3_NACK
@ MPU9250_IIC_STATUS_PASS_THROUGH
@ MPU9250_LOW_PASS_FILTER_3
@ MPU9250_LOW_PASS_FILTER_4
@ MPU9250_LOW_PASS_FILTER_5
@ MPU9250_LOW_PASS_FILTER_2
@ MPU9250_LOW_PASS_FILTER_7
@ MPU9250_LOW_PASS_FILTER_6
@ MPU9250_LOW_PASS_FILTER_1
@ MPU9250_LOW_PASS_FILTER_0
@ MPU9250_FIFO_MODE_NORMAL
@ MPU9250_FIFO_MODE_STREAM
@ MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_0P98
@ MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_31P25
@ MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_125
@ MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_3P91
@ MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_7P81
@ MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_1P95
@ MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_250
@ MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_0P24
@ MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_0P49
@ MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_500
@ MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_62P50
@ MPU9250_LOW_POWER_ACCEL_OUTPUT_RATE_15P63
@ MPU9250_IIC_READ_MODE_RESTART
@ MPU9250_IIC_READ_MODE_STOP_AND_START
@ MPU9250_IIC4_TRANSACTION_MODE_DATA
@ MPU9250_IIC4_TRANSACTION_MODE_REG
@ MPU9250_IIC_CLOCK_471_KHZ
@ MPU9250_IIC_CLOCK_267_KHZ
@ MPU9250_IIC_CLOCK_348_KHZ
@ MPU9250_IIC_CLOCK_333_KHZ
@ MPU9250_IIC_CLOCK_296_KHZ
@ MPU9250_IIC_CLOCK_276_KHZ
@ MPU9250_IIC_CLOCK_444_KHZ
@ MPU9250_IIC_CLOCK_364_KHZ
@ MPU9250_IIC_CLOCK_421_KHZ
@ MPU9250_IIC_CLOCK_286_KHZ
@ MPU9250_IIC_CLOCK_500_KHZ
@ MPU9250_IIC_CLOCK_320_KHZ
@ MPU9250_IIC_CLOCK_308_KHZ
@ MPU9250_IIC_CLOCK_258_KHZ
@ MPU9250_IIC_CLOCK_381_KHZ
@ MPU9250_IIC_CLOCK_400_KHZ
@ MPU9250_IIC_GROUP_ORDER_EVEN
@ MPU9250_IIC_GROUP_ORDER_ODD
@ MPU9250_IIC_MODE_READ
@ MPU9250_IIC_MODE_WRITE
@ MPU9250_AXIS_X
@ MPU9250_AXIS_Z
@ MPU9250_AXIS_Y
@ MPU9250_ACCELEROMETER_LOW_PASS_FILTER_6
@ MPU9250_ACCELEROMETER_LOW_PASS_FILTER_1
@ MPU9250_ACCELEROMETER_LOW_PASS_FILTER_3
@ MPU9250_ACCELEROMETER_LOW_PASS_FILTER_4
@ MPU9250_ACCELEROMETER_LOW_PASS_FILTER_2
@ MPU9250_ACCELEROMETER_LOW_PASS_FILTER_5
@ MPU9250_ACCELEROMETER_LOW_PASS_FILTER_0
@ MPU9250_ACCELEROMETER_LOW_PASS_FILTER_7
@ MPU9250_PIN_LEVEL_HIGH
@ MPU9250_PIN_LEVEL_LOW
@ MPU9250_FIFO_XG
@ MPU9250_FIFO_YG
@ MPU9250_FIFO_ZG
@ MPU9250_FIFO_ACCEL
@ MPU9250_FIFO_TEMP
@ MPU9250_CLOCK_SOURCE_PLL
@ MPU9250_CLOCK_SOURCE_STOP_CLOCK
@ MPU9250_CLOCK_SOURCE_INTERNAL_20MHZ
mpu9250_dmp_feature_t
mpu9250 dmp feature enumeration definition
uint8_t mpu9250_dmp_set_accel_bias(mpu9250_handle_t *handle, int32_t bias[3])
dmp set the accel bias
uint8_t mpu9250_dmp_set_tap_callback(mpu9250_handle_t *handle, void(*callback)(uint8_t count, uint8_t direction))
dmp set the tap callback
uint8_t mpu9250_dmp_get_fifo_rate(mpu9250_handle_t *handle, uint16_t *rate)
dmp get the fifo rate
uint8_t mpu9250_dmp_set_gyro_bias(mpu9250_handle_t *handle, int32_t bias[3])
dmp set the gyro bias
uint8_t mpu9250_dmp_set_shake_reject_timeout(mpu9250_handle_t *handle, uint16_t ms)
dmp set the shake reject timeout
uint8_t mpu9250_dmp_get_pedometer_walk_time(mpu9250_handle_t *handle, uint32_t *ms)
dmp get the pedometer walk time
uint8_t mpu9250_dmp_get_tap_time_multi(mpu9250_handle_t *handle, uint16_t *ms)
dmp get max time between taps to register as a multi tap
uint8_t mpu9250_dmp_set_6x_quaternion(mpu9250_handle_t *handle, mpu9250_bool_t enable)
dmp enable or disable generate 6 axis quaternions from dmp
uint8_t mpu9250_dmp_set_orientation(mpu9250_handle_t *handle, int8_t mat[9])
dmp set the orientation
mpu9250_dmp_orient_t
mpu9250 dmp orient enumeration definition
uint8_t mpu9250_dmp_set_fifo_rate(mpu9250_handle_t *handle, uint16_t rate)
dmp set the fifo rate
uint8_t mpu9250_dmp_load_firmware(mpu9250_handle_t *handle)
load the dmp firmware
uint8_t mpu9250_dmp_set_3x_quaternion(mpu9250_handle_t *handle, mpu9250_bool_t enable)
dmp enable or disable generate 3 axis quaternions from dmp
uint8_t mpu9250_dmp_set_tap_axes(mpu9250_handle_t *handle, mpu9250_axis_t axis, mpu9250_bool_t enable)
dmp enable or disable the tap axes
uint8_t mpu9250_dmp_get_tap_axes(mpu9250_handle_t *handle, mpu9250_axis_t axis, mpu9250_bool_t *enable)
dmp get the tap axes status
uint8_t mpu9250_dmp_set_enable(mpu9250_handle_t *handle, mpu9250_bool_t enable)
enable or disable the dmp
uint8_t mpu9250_dmp_set_feature(mpu9250_handle_t *handle, uint16_t mask)
dmp enable or disable the dmp feature
uint8_t mpu9250_dmp_set_shake_reject_thresh(mpu9250_handle_t *handle, uint16_t dps)
dmp set the shake reject thresh
uint8_t mpu9250_dmp_set_orient_callback(mpu9250_handle_t *handle, void(*callback)(uint8_t orientation))
dmp set the orient callback
uint8_t mpu9250_dmp_set_interrupt_mode(mpu9250_handle_t *handle, mpu9250_dmp_interrupt_mode_t mode)
dmp set the interrupt mode
uint8_t mpu9250_dmp_get_shake_reject_time(mpu9250_handle_t *handle, uint16_t *ms)
dmp get the shake reject time
uint8_t mpu9250_dmp_get_pedometer_step_count(mpu9250_handle_t *handle, uint32_t *count)
dmp get the pedometer step count
uint8_t mpu9250_dmp_set_pedometer_step_count(mpu9250_handle_t *handle, uint32_t count)
dmp set the pedometer step count
uint8_t mpu9250_dmp_get_tap_thresh(mpu9250_handle_t *handle, mpu9250_axis_t axis, uint16_t *mg_ms)
dmp get the tap thresh
uint8_t mpu9250_dmp_set_shake_reject_time(mpu9250_handle_t *handle, uint16_t ms)
dmp set the shake reject time
uint8_t mpu9250_dmp_get_min_tap_count(mpu9250_handle_t *handle, uint8_t *cnt)
dmp get the min tap count
uint8_t mpu9250_dmp_get_tap_time(mpu9250_handle_t *handle, uint16_t *ms)
dmp get the tap time
mpu9250_dmp_interrupt_mode_t
mpu9250 dmp interrupt mode enumeration definition
uint8_t mpu9250_dmp_set_gyro_calibrate(mpu9250_handle_t *handle, mpu9250_bool_t enable)
dmp enable or disable gyro calibrate
uint8_t mpu9250_dmp_get_shake_reject_timeout(mpu9250_handle_t *handle, uint16_t *ms)
dmp get the shake reject timeout
uint8_t mpu9250_dmp_gyro_accel_raw_offset_convert(mpu9250_handle_t *handle, int32_t gyro_offset_raw[3], int32_t accel_offset_raw[3], int32_t gyro_offset[3], int32_t accel_offset[3])
dmp gyro accel raw offset convert
uint8_t mpu9250_dmp_set_tap_time(mpu9250_handle_t *handle, uint16_t ms)
dmp set the tap time
uint8_t mpu9250_dmp_set_tap_thresh(mpu9250_handle_t *handle, mpu9250_axis_t axis, uint16_t mg_ms)
dmp set the tap thresh
uint8_t mpu9250_dmp_set_min_tap_count(mpu9250_handle_t *handle, uint8_t cnt)
dmp set the min tap count
uint8_t mpu9250_dmp_set_pedometer_walk_time(mpu9250_handle_t *handle, uint32_t ms)
dmp set the pedometer walk time
uint8_t mpu9250_dmp_read(mpu9250_handle_t *handle, 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 read the data
uint8_t mpu9250_dmp_set_tap_time_multi(mpu9250_handle_t *handle, uint16_t ms)
dmp set max time between taps to register as a multi tap
mpu9250_dmp_tap_t
mpu9250 dmp tap enumeration definition
uint8_t mpu9250_dmp_get_shake_reject_thresh(mpu9250_handle_t *handle, uint16_t *dps)
dmp get the shake reject thresh
@ MPU9250_DMP_FEATURE_6X_QUAT
@ MPU9250_DMP_FEATURE_3X_QUAT
@ MPU9250_DMP_FEATURE_GYRO_CAL
@ MPU9250_DMP_FEATURE_PEDOMETER
@ MPU9250_DMP_FEATURE_SEND_CAL_GYRO
@ MPU9250_DMP_FEATURE_SEND_RAW_ACCEL
@ MPU9250_DMP_FEATURE_TAP
@ MPU9250_DMP_FEATURE_SEND_RAW_GYRO
@ MPU9250_DMP_FEATURE_ORIENT
@ MPU9250_DMP_ORIENT_REVERSE_PORTRAIT
@ MPU9250_DMP_ORIENT_REVERSE_LANDSCAPE
@ MPU9250_DMP_ORIENT_PORTRAIT
@ MPU9250_DMP_ORIENT_LANDSCAPE
@ MPU9250_DMP_INTERRUPT_MODE_CONTINUOUS
@ MPU9250_DMP_INTERRUPT_MODE_GESTURE
@ MPU9250_DMP_TAP_X_DOWN
@ MPU9250_DMP_TAP_X_UP
@ MPU9250_DMP_TAP_Y_DOWN
@ MPU9250_DMP_TAP_Z_UP
@ MPU9250_DMP_TAP_Z_DOWN
@ MPU9250_DMP_TAP_Y_UP
uint8_t mpu9250_set_reg(mpu9250_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
set the chip register
uint8_t mpu9250_get_reg(mpu9250_handle_t *handle, uint8_t reg, uint8_t *buf, uint16_t len)
get the chip register
uint8_t mpu9250_mag_get_status1(mpu9250_handle_t *handle, uint8_t *status)
magnetometer get the status1
mpu9250_magnetometer_bits_t
mpu9250 magnetometer bits enumeration definition
uint8_t mpu9250_mag_get_status2(mpu9250_handle_t *handle, uint8_t *status)
magnetometer get the status2
uint8_t mpu9250_mag_set_mode(mpu9250_handle_t *handle, mpu9250_magnetometer_mode_t mode)
magnetometer set the mode
mpu9250_magnetometer_status2_t
mpu9250 magnetometer status2 enumeration definition
uint8_t mpu9250_mag_iic_disable(mpu9250_handle_t *handle)
magnetometer disable the iic
uint8_t mpu9250_mag_get_mode(mpu9250_handle_t *handle, mpu9250_magnetometer_mode_t *mode)
magnetometer get the mode
uint8_t mpu9250_mag_get_self_test(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
magnetometer get the self test status
uint8_t mpu9250_mag_get_bits(mpu9250_handle_t *handle, mpu9250_magnetometer_bits_t *bits)
magnetometer get the bits
uint8_t mpu9250_mag_set_bits(mpu9250_handle_t *handle, mpu9250_magnetometer_bits_t bits)
magnetometer set the bits
mpu9250_magnetometer_mode_t
mpu9250 magnetometer mode enumeration definition
uint8_t mpu9250_mag_set_reset(mpu9250_handle_t *handle, mpu9250_bool_t enable)
magnetometer enable or disable reset
uint8_t mpu9250_mag_get_info(mpu9250_handle_t *handle, uint8_t *info)
magnetometer get the information
uint8_t mpu9250_mag_get_asa(mpu9250_handle_t *handle, uint8_t asa[3])
magnetometer get the asa data
uint8_t mpu9250_mag_get_reset(mpu9250_handle_t *handle, mpu9250_bool_t *enable)
magnetometer get the reset status
uint8_t mpu9250_mag_init(mpu9250_handle_t *handle)
initialize the magnetometer of mpu9250
uint8_t mpu9250_mag_deinit(mpu9250_handle_t *handle)
magnetometer deinit
uint8_t mpu9250_mag_set_fifo_mode(mpu9250_handle_t *handle)
magnetometer set into fifo mode
uint8_t mpu9250_mag_set_self_test(mpu9250_handle_t *handle, mpu9250_bool_t enable)
magnetometer enable or disable self test
mpu9250_magnetometer_status1_t
mpu9250 magnetometer status1 enumeration definition
uint8_t mpu9250_mag_read(mpu9250_handle_t *handle, int16_t mag_raw[3], float mag_ut[3])
mag read the data
@ MPU9250_MAGNETOMETER_BITS_16
@ MPU9250_MAGNETOMETER_BITS_14
@ MPU9250_MAGNETOMETER_STATUS2_BITM
@ MPU9250_MAGNETOMETER_STATUS2_HOFL
@ MPU9250_MAGNETOMETER_MODE_CONTINUOUS1
@ MPU9250_MAGNETOMETER_MODE_SELF_TEST
@ MPU9250_MAGNETOMETER_MODE_EXT_TRIGGER
@ MPU9250_MAGNETOMETER_MODE_SINGLE
@ MPU9250_MAGNETOMETER_MODE_POWER_DOWN
@ MPU9250_MAGNETOMETER_MODE_FUSE_ROM
@ MPU9250_MAGNETOMETER_MODE_CONTINUOUS2
@ MPU9250_MAGNETOMETER_STATUS1_DOR
@ MPU9250_MAGNETOMETER_STATUS1_DRDY
mpu9250 handle structure definition
uint8_t buf[1024]
void(* dmp_tap_callback)(uint8_t count, uint8_t direction)
uint8_t(* spi_init)(void)
void(* delay_ms)(uint32_t ms)
uint8_t(* spi_read)(uint8_t reg, uint8_t *buf, uint16_t len)
void(* receive_callback)(uint8_t type)
uint8_t(* spi_write)(uint8_t reg, uint8_t *buf, uint16_t len)
void(* debug_print)(const char *const fmt,...)
uint8_t(* iic_init)(void)
uint8_t(* spi_deinit)(void)
void(* dmp_orient_callback)(uint8_t orientation)
uint8_t(* iic_write)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
uint8_t(* iic_read)(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
uint8_t(* iic_deinit)(void)
mpu9250 information structure definition
uint32_t driver_version
char manufacturer_name[32]