![]() |
LibDriver MPU9250
|
mpu9250 magnetometer driver modules More...
Enumerations | |
| enum | mpu9250_magnetometer_status1_t { MPU9250_MAGNETOMETER_STATUS1_DRDY = (1 << 0) , MPU9250_MAGNETOMETER_STATUS1_DOR = (1 << 1) } |
| mpu9250 magnetometer status1 enumeration definition More... | |
| enum | mpu9250_magnetometer_status2_t { MPU9250_MAGNETOMETER_STATUS2_HOFL = (1 << 3) , MPU9250_MAGNETOMETER_STATUS2_BITM = (1 << 4) } |
| mpu9250 magnetometer status2 enumeration definition More... | |
| enum | mpu9250_magnetometer_mode_t { MPU9250_MAGNETOMETER_MODE_POWER_DOWN = 0x00 , MPU9250_MAGNETOMETER_MODE_SINGLE = 0x01 , MPU9250_MAGNETOMETER_MODE_CONTINUOUS1 = 0x02 , MPU9250_MAGNETOMETER_MODE_CONTINUOUS2 = 0x06 , MPU9250_MAGNETOMETER_MODE_EXT_TRIGGER = 0x04 , MPU9250_MAGNETOMETER_MODE_SELF_TEST = 0x08 , MPU9250_MAGNETOMETER_MODE_FUSE_ROM = 0x0F } |
| mpu9250 magnetometer mode enumeration definition More... | |
| enum | mpu9250_magnetometer_bits_t { MPU9250_MAGNETOMETER_BITS_14 = 0x00 , MPU9250_MAGNETOMETER_BITS_16 = 0x01 } |
| mpu9250 magnetometer bits enumeration definition More... | |
Functions | |
| 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_read (mpu9250_handle_t *handle, int16_t mag_raw[3], float mag_ut[3]) |
| mag read the data | |
| uint8_t | mpu9250_mag_get_info (mpu9250_handle_t *handle, uint8_t *info) |
| magnetometer get the information | |
| uint8_t | mpu9250_mag_get_status1 (mpu9250_handle_t *handle, uint8_t *status) |
| magnetometer get the status1 | |
| 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 | |
| uint8_t | mpu9250_mag_get_mode (mpu9250_handle_t *handle, mpu9250_magnetometer_mode_t *mode) |
| magnetometer get the mode | |
| uint8_t | mpu9250_mag_set_bits (mpu9250_handle_t *handle, mpu9250_magnetometer_bits_t bits) |
| magnetometer set the bits | |
| uint8_t | mpu9250_mag_get_bits (mpu9250_handle_t *handle, mpu9250_magnetometer_bits_t *bits) |
| magnetometer get the bits | |
| uint8_t | mpu9250_mag_set_reset (mpu9250_handle_t *handle, mpu9250_bool_t enable) |
| magnetometer enable or disable reset | |
| uint8_t | mpu9250_mag_get_reset (mpu9250_handle_t *handle, mpu9250_bool_t *enable) |
| magnetometer get the reset status | |
| uint8_t | mpu9250_mag_set_self_test (mpu9250_handle_t *handle, mpu9250_bool_t enable) |
| magnetometer enable or disable self test | |
| 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_iic_disable (mpu9250_handle_t *handle) |
| magnetometer disable the iic | |
| uint8_t | mpu9250_mag_get_asa (mpu9250_handle_t *handle, uint8_t asa[3]) |
| magnetometer get the asa data | |
| uint8_t | mpu9250_mag_set_fifo_mode (mpu9250_handle_t *handle) |
| magnetometer set into fifo mode | |
mpu9250 magnetometer driver modules
mpu9250 magnetometer bits enumeration definition
| Enumerator | |
|---|---|
| MPU9250_MAGNETOMETER_BITS_14 | 14 bits output |
| MPU9250_MAGNETOMETER_BITS_16 | 16 bits output |
Definition at line 425 of file driver_mpu9250.h.
mpu9250 magnetometer mode enumeration definition
Definition at line 411 of file driver_mpu9250.h.
mpu9250 magnetometer status1 enumeration definition
| Enumerator | |
|---|---|
| MPU9250_MAGNETOMETER_STATUS1_DRDY | data is ready |
| MPU9250_MAGNETOMETER_STATUS1_DOR | data overrun |
Definition at line 393 of file driver_mpu9250.h.
mpu9250 magnetometer status2 enumeration definition
| Enumerator | |
|---|---|
| MPU9250_MAGNETOMETER_STATUS2_HOFL | magnetic sensor overflow occurred |
| MPU9250_MAGNETOMETER_STATUS2_BITM | 0: 14bits / 1: 16bits |
Definition at line 402 of file driver_mpu9250.h.
| uint8_t mpu9250_mag_deinit | ( | mpu9250_handle_t * | handle | ) |
magnetometer deinit
| [in] | *handle | pointer to an mpu9250 handle structure |
Definition at line 4893 of file driver_mpu9250.c.
| uint8_t mpu9250_mag_get_asa | ( | mpu9250_handle_t * | handle, |
| uint8_t | asa[3] ) |
magnetometer get the asa data
| [in] | *handle | pointer to an mpu9250 handle structure |
| [out] | *asa | pointer to an asa buffer |
Definition at line 5612 of file driver_mpu9250.c.
| uint8_t mpu9250_mag_get_bits | ( | mpu9250_handle_t * | handle, |
| mpu9250_magnetometer_bits_t * | bits ) |
magnetometer get the bits
| [in] | *handle | pointer to an mpu9250 handle structure |
| [out] | *bits | pointer to a magnetometer bits buffer |
Definition at line 5333 of file driver_mpu9250.c.
| uint8_t mpu9250_mag_get_info | ( | mpu9250_handle_t * | handle, |
| uint8_t * | info ) |
magnetometer get the information
| [in] | *handle | pointer to an mpu9250 handle structure |
| [out] | *info | pointer to an info buffer |
Definition at line 5059 of file driver_mpu9250.c.
| uint8_t mpu9250_mag_get_mode | ( | mpu9250_handle_t * | handle, |
| mpu9250_magnetometer_mode_t * | mode ) |
magnetometer get the mode
| [in] | *handle | pointer to an mpu9250 handle structure |
| [out] | *mode | pointer to a magnetometer mode buffer |
Definition at line 5237 of file driver_mpu9250.c.
| uint8_t mpu9250_mag_get_reset | ( | mpu9250_handle_t * | handle, |
| mpu9250_bool_t * | enable ) |
magnetometer get the reset status
| [in] | *handle | pointer to an mpu9250 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 5429 of file driver_mpu9250.c.
| uint8_t mpu9250_mag_get_self_test | ( | mpu9250_handle_t * | handle, |
| mpu9250_bool_t * | enable ) |
magnetometer get the self test status
| [in] | *handle | pointer to an mpu9250 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 5525 of file driver_mpu9250.c.
| uint8_t mpu9250_mag_get_status1 | ( | mpu9250_handle_t * | handle, |
| uint8_t * | status ) |
magnetometer get the status1
| [in] | *handle | pointer to an mpu9250 handle structure |
| [out] | *status | pointer to a status1 buffer |
Definition at line 5101 of file driver_mpu9250.c.
| uint8_t mpu9250_mag_get_status2 | ( | mpu9250_handle_t * | handle, |
| uint8_t * | status ) |
magnetometer get the status2
| [in] | *handle | pointer to an mpu9250 handle structure |
| [out] | *status | pointer to a status2 buffer |
Definition at line 5143 of file driver_mpu9250.c.
| uint8_t mpu9250_mag_iic_disable | ( | mpu9250_handle_t * | handle | ) |
magnetometer disable the iic
| [in] | *handle | pointer to an mpu9250 handle structure |
Definition at line 5568 of file driver_mpu9250.c.
| uint8_t mpu9250_mag_init | ( | mpu9250_handle_t * | handle | ) |
initialize the magnetometer of mpu9250
| [in] | *handle | pointer to an mpu9250 handle structure |
Definition at line 4741 of file driver_mpu9250.c.
| uint8_t mpu9250_mag_read | ( | mpu9250_handle_t * | handle, |
| int16_t | mag_raw[3], | ||
| float | mag_ut[3] ) |
mag read the data
| [in] | *handle | pointer to an mpu9250 handle structure |
| [out] | *mag_raw | pointer to a mag raw data buffer |
| [out] | *mag_ut | pointer to a converted mag data buffer |
Definition at line 4994 of file driver_mpu9250.c.
| uint8_t mpu9250_mag_set_bits | ( | mpu9250_handle_t * | handle, |
| mpu9250_magnetometer_bits_t | bits ) |
magnetometer set the bits
| [in] | *handle | pointer to an mpu9250 handle structure |
| [in] | bits | magnetometer bits |
Definition at line 5281 of file driver_mpu9250.c.
| uint8_t mpu9250_mag_set_fifo_mode | ( | mpu9250_handle_t * | handle | ) |
magnetometer set into fifo mode
| [in] | *handle | pointer to an mpu9250 handle structure |
Definition at line 5653 of file driver_mpu9250.c.
| uint8_t mpu9250_mag_set_mode | ( | mpu9250_handle_t * | handle, |
| mpu9250_magnetometer_mode_t | mode ) |
magnetometer set the mode
| [in] | *handle | pointer to an mpu9250 handle structure |
| [in] | mode | magnetometer mode |
Definition at line 5185 of file driver_mpu9250.c.
| uint8_t mpu9250_mag_set_reset | ( | mpu9250_handle_t * | handle, |
| mpu9250_bool_t | enable ) |
magnetometer enable or disable reset
| [in] | *handle | pointer to an mpu9250 handle structure |
| [in] | enable | bool value |
Definition at line 5377 of file driver_mpu9250.c.
| uint8_t mpu9250_mag_set_self_test | ( | mpu9250_handle_t * | handle, |
| mpu9250_bool_t | enable ) |
magnetometer enable or disable self test
| [in] | *handle | pointer to an mpu9250 handle structure |
| [in] | enable | bool value |
Definition at line 5473 of file driver_mpu9250.c.