MPU-9250 motion sensor.
More...
MPU-9250 motion sensor.
◆ drv_mpu9250_enable()
uint32_t drv_mpu9250_enable |
( |
bool |
enable | ) |
|
Function for enabling or disabling the MPU-9250 driver.
- Parameters
-
[in] | enable | Enables the device. |
- Return values
-
◆ drv_mpu9250_init()
Function for initializing the MPU-9250 driver.
- Parameters
-
[in] | p_params | Pointer to the init paramter structure. |
- Return values
-
◆ drv_mpu9250_int_register()
int drv_mpu9250_int_register |
( |
struct int_param_s * |
p_int_param | ) |
|
Function for enabling and registering the MPU-9250 interrupt callback.
- Parameters
-
[in] | p_int_param | Pointer to the interrupt parameter structure. |
- Return values
-
◆ drv_mpu9250_ms_get()
int drv_mpu9250_ms_get |
( |
unsigned long * |
p_count | ) |
|
Function for getting a timestamp in milliseconds.
- Parameters
-
[out] | p_count | Pointer to the timestamp. |
- Return values
-
◆ drv_mpu9250_read()
int drv_mpu9250_read |
( |
unsigned char |
slave_addr, |
|
|
unsigned char |
reg_addr, |
|
|
unsigned char |
length, |
|
|
unsigned char * |
p_data |
|
) |
| |
Function for reading a MPU-9250 register.
- Parameters
-
[in] | slave_addr | Slave address on the TWI bus. |
[in] | reg_addr | Register address to read. |
[in] | length | Length of the data to read. |
[out] | p_data | Pointer to where the data should be stored. |
- Return values
-
◆ drv_mpu9250_write()
int drv_mpu9250_write |
( |
unsigned char |
slave_addr, |
|
|
unsigned char |
reg_addr, |
|
|
unsigned char |
length, |
|
|
unsigned char const * |
p_data |
|
) |
| |
Function for writing to a MPU-9250 register.
- Parameters
-
[in] | slave_addr | Slave address on the TWI bus. |
[in] | reg_addr | Register address to write. |
[in] | length | Length of the data to write. |
[in] | p_data | Pointer to the data to write. |
- Return values
-