BlueNinja BSP  0.5
Cerevo BlueNinja(CDP-TZ01B) Board Support Packageリファレンスマニュアル
MPU-9250.c ファイル

9-axis sensor(InvenSense MPU-9250) driver for TZ10xx. [詳解]

#include <stdint.h>
#include <stdbool.h>
#include "TZ10xx.h"
#include "PMU_TZ10xx.h"
#include "GPIO_TZ10xx.h"
#include "SPI_TZ10xx.h"
#include "utils.h"
#include "MPU-9250.h"

列挙型

enum  MPU9250_STAT { MPU9250_STAT_NONE = 0, MPU9250_STAT_IDLE, MPU9250_STAT_MAESUREING }
 

関数

bool MPU9250_drv_init (TZ10XX_DRIVER_SPI *spi_drv)
 Initialize MPU9250 driver. [詳解]
 
bool MPU9250_drv_start_maesure (MPU9250_BIT_GYRO_FS_SEL gyro_fs, MPU9250_BIT_ACCEL_FS_SEL accel_fs, MPU9250_BIT_DLPF_CFG dlpf_cfg, MPU9250_BIT_A_DLPFCFG a_dlpfcfg)
 Start maesure. [詳解]
 
bool MPU9250_drv_stop_maesure (void)
 Stop maesure. [詳解]
 
bool MPU9250_drv_read_gyro (MPU9250_gyro_val *gyro_val)
 Read maesured gyro value. [詳解]
 
bool MPU9250_drv_read_accel (MPU9250_accel_val *accel_val)
 Read maesured accel value. [詳解]
 
bool MPU9250_drv_read_temperature (MPU9250_temperature_val *temperature_val)
 Read maesured temperature value. [詳解]
 
bool MPU9250_drv_read_magnetometer (MPU9250_magnetometer_val *magnetometer_val)
 Read magnetometer value. [詳解]
 

詳解

9-axis sensor(InvenSense MPU-9250) driver for TZ10xx.

著者
Cerevo Inc.

関数詳解

bool MPU9250_drv_init ( TZ10XX_DRIVER_SPI *  spi_drv)

Initialize MPU9250 driver.

引数
[in]spi_drvTZ10xx driver information.
戻り値
Initialize result
戻り値
trueSuccess.
falseFailed.
bool MPU9250_drv_read_accel ( MPU9250_accel_val accel_val)

Read maesured accel value.

引数
[out]accel_valRead values.
戻り値
Read result.
戻り値
trueSuccess.
falseFailed.
bool MPU9250_drv_read_gyro ( MPU9250_gyro_val gyro_val)

Read maesured gyro value.

引数
[out]gyro_valRead values.
戻り値
Read result.
戻り値
trueSuccess.
falseFailed.
bool MPU9250_drv_read_magnetometer ( MPU9250_magnetometer_val magnetometer_val)

Read magnetometer value.

引数
[out]magnetometer_valRead values.
戻り値
Read result.
戻り値
trueSuccess.
falseFailed.
bool MPU9250_drv_read_temperature ( MPU9250_temperature_val temperature_val)

Read maesured temperature value.

引数
[out]temperature_valRead values.
戻り値
Read result.
戻り値
trueSuccess.
falseFailed.
bool MPU9250_drv_start_maesure ( MPU9250_BIT_GYRO_FS_SEL  gyro_fs,
MPU9250_BIT_ACCEL_FS_SEL  accel_fs,
MPU9250_BIT_DLPF_CFG  dlpf_cfg,
MPU9250_BIT_A_DLPFCFG  a_dlpfcfg 
)

Start maesure.

引数
[in]gyro_fsGyro full scale select.
[in]accel_fsAccel full scale select.
[in]dlpf_cfgGyro DLPF config.
[in]a_dlpfcfgAccel DLPF config.
戻り値
Result
戻り値
trueSuccess.
falseFailed.
bool MPU9250_drv_stop_maesure ( void  )

Stop maesure.

戻り値
Result
戻り値
trueSuccess.
falseFailed.