资源简介
MPU-6050 模块 整合3轴陀螺仪 3轴加速器 姿态模块 用stm32调试可用
![](http://www.nz998.com/pic/67877.jpg)
代码片段和文件信息
/*
$License:
Copyright (C) 2011-2012 InvenSense Corporation All Rights Reserved.
See included License.txt for License information.
$
*/
/**
* @addtogroup DRIVERS Sensor Driver layer
* @brief Hardware drivers to communicate with sensors via I2C.
*
* @{
* @file inv_mpu.c
* @brief An I2C-based driver for Invensense gyroscopes.
* @details This driver currently works for the following devices:
* MPU6050
* MPU6500
* MPU9150 (or MPU6050 w/ AK8975 on the auxiliary bus)
* MPU9250 (or MPU6500 w/ AK8963 on the auxiliary bus)
*/
#include
#include
#include
#include
#include
#include “inv_mpu.h“
#include “stm32f10x.h“
#include “STM32_I2C.h“
#include “delay.h“
#include “Time.h“
#include “usart.h“
/* The following functions must be defined for this platform:
* i2c_write(unsigned char slave_addr unsigned char reg_addr
* unsigned char length unsigned char const *data)
* i2c_read(unsigned char slave_addr unsigned char reg_addr
* unsigned char length unsigned char *data)
* delay_ms(unsigned long num_ms)
* get_ms(unsigned long *count)
* reg_int_cb(void (*cb)(void) unsigned char port unsigned char pin)
* labs(long x)
* fabsf(float x)
* min(int a int b)
*/
#define MPU6050
#define MOTION_DRIVER_TARGET_MSP430
#if defined MOTION_DRIVER_TARGET_MSP430
/*#include “msp430.h“
#include “msp430_i2c.h“
#include “msp430_clock.h“
#include “msp430_interrupt.h“ */
#define i2c_write i2cwrite
#define i2c_read i2cread
#define delay_ms delay_ms
#define get_ms get_ms
//static int reg_int_cb(struct int_param_s *int_param)
//{
// /*return msp430_reg_int_cb(int_param->cb int_param->pin int_param->lp_exit
// int_param->active_low);*/
// return 0;
//}
//#define log_i(...) do {} while (0)
//#define log_e(...) do {} while (0)
#define log_e PrintChar
#define log_i PrintChar
/* labs is already defined by TI‘s toolchain. */
/* fabs is for doubles. fabsf is for floats. */
#define fabs fabsf
#define min(ab) ((a
#elif defined EMPL_TARGET_MSP430
#include “msp430.h“
#include “msp430_i2c.h“
#include “msp430_clock.h“
#include “msp430_interrupt.h“
#include “log.h“
#define i2c_write msp430_i2c_write
#define i2c_read msp430_i2c_read
#define delay_ms msp430_delay_ms
#define get_ms msp430_get_clock_ms
static inline int reg_int_cb(struct int_param_s *int_param)
{
return msp430_reg_int_cb(int_param->cb int_param->pin int_param->lp_exit
int_param->active_low);
}
#define log_i MPL_LOGI
#define log_e MPL_LOGE
/* labs is already defined by TI‘s toolchain. */
/* fabs is for doubles. fabsf is for floats. */
#define fabs fabsf
#define min(ab) ((a#elif defined EMPL_TARGET_UC3L0
/* Instead of using the
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 19342 2013-09-01 19:06 DMp\eMPL\dmpKey.h
文件 6765 2013-09-01 19:06 DMp\eMPL\dmpmap.h
文件 84559 2013-09-01 19:06 DMp\eMPL\inv_mpu.c
文件 4452 2013-09-01 19:06 DMp\eMPL\inv_mpu.h
文件 58392 2013-09-01 19:06 DMp\eMPL\inv_mpu_dmp_motion_driver.c
文件 3538 2013-09-01 19:06 DMp\eMPL\inv_mpu_dmp_motion_driver.h
文件 17273 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\CoreSupport\core_cm3.c
文件 85714 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\CoreSupport\core_cm3.h
文件 25107 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\Release_Notes_for_STM32F10x_CMSIS.html
文件 15763 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_cl.s
文件 15500 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd.s
文件 15767 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd_vl.s
文件 12373 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld.s
文件 13653 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld_vl.s
文件 12762 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md.s
文件 14070 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md_vl.s
文件 15952 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_xl.s
文件 12955 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_cl.s
文件 13042 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_hd.s
文件 12451 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_hd_vl.s
文件 9698 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_ld.s
文件 10445 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_ld_vl.s
文件 10154 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_md.s
文件 10941 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_md_vl.s
文件 13143 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_xl.s
文件 16629 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_cl.s
文件 16231 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_hd.s
文件 15791 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_hd_vl.s
文件 12653 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_ld.s
文件 12952 2013-09-01 19:06 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_ld_vl.s
............此处省略187个文件信息
- 上一篇:矩阵键盘的简易计算器带仿真代码
- 下一篇:远方企业V6系统手册
相关资源
- stm32f407上的两个can发送和接收例程
- STM32 led 时钟
- STM32 2.4G通信例程
- 直流无刷电机方波驱动 stm32 例程代码
- STM32中文资料
- STM32蓝牙和串口程序
- STM32f103超声波模块例程
- stm32f103c8t6 4 oled.rar
- mpu6050+hmc5883L.rar
- stm32f030 IAP Demo(原创)
- STM32基于rt_thread操作系统的SDHC卡文件
- NRF24L01实现51与STM32双向通讯
- STM32F103 串口程序(完整版)
- stm32 ds18b20 温度传感器 测试通过
- stm32官方例程
- STM32F103定时器中断程序
- [免费]基于stm32f103ze 的OLED驱动代码
- STM32F103RBT6驱动UC1698控制芯片的160160黑
- STM32F103 DS18B20 V3.5.0固件库驱动程序工
- STM32定时器使用入门。看了这个程序会
- SIM908 SDIO FSMC STM32 FIFO
- STM32F103 CC2500完整驱动(模拟SPI)
- AD7606采集程序
- stm32 用SPI 方式读写 SDHC
- stm32通过DMA方式采集ADC数据
- 意法半导体STM全系列微控制器STM32ST
- 基于STM32芯片的SX1278 驱动 LORA.rar
- STM32的PCB封装库,以及原理图库,48
- SX1280.rar
- STM32 DS3231驱动.zip
评论
共有 条评论