资源简介
STM32 MPU6050-DMP-欧拉角串口输出 滤波 移植 IIC I2C模拟
代码片段和文件信息
/*
$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 2012-12-14 11:16 DMp\eMPL\dmpKey.h
文件 6765 2012-12-14 11:16 DMp\eMPL\dmpmap.h
文件 84559 2013-07-25 14:17 DMp\eMPL\inv_mpu.c
文件 4452 2013-06-13 17:19 DMp\eMPL\inv_mpu.h
文件 58392 2013-06-13 21:03 DMp\eMPL\inv_mpu_dmp_motion_driver.c
文件 3538 2013-06-13 16:52 DMp\eMPL\inv_mpu_dmp_motion_driver.h
文件 17273 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\CoreSupport\core_cm3.c
文件 85714 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\CoreSupport\core_cm3.h
文件 25107 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\Release_Notes_for_STM32F10x_CMSIS.html
文件 15763 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_cl.s
文件 15500 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd.s
文件 15767 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd_vl.s
文件 12373 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld.s
文件 13653 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld_vl.s
文件 12762 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md.s
文件 14070 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md_vl.s
文件 15952 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_xl.s
文件 12955 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_cl.s
文件 13042 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_hd.s
文件 12451 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_hd_vl.s
文件 9698 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_ld.s
文件 10445 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_ld_vl.s
文件 10154 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_md.s
文件 10941 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_md_vl.s
文件 13143 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_xl.s
文件 16629 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_cl.s
文件 16231 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_hd.s
文件 15791 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_hd_vl.s
文件 12653 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_ld.s
文件 12952 2010-10-18 20:09 DMp\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_ld_vl.s
............此处省略125个文件信息
- 上一篇:video_capture.rar
- 下一篇:float与16进制互转 工具
相关资源
- STM32的FSMC驱动ILI9341屏幕
- STM32系列flash
- Ti的DAC8552、DAC8554驱动程序
- AD5761R驱动程序,支持STM32
- stm32串行驱动12864字符,图片
- STM32 定时器捕获PWM波 以及占空比
- STM32学习笔记STM32学习笔记
- STM32 USART1 USART2 UASRT3 UART4 UART5串口通信
- STM32F103产生正弦波DEMO
- STM32 MCP2515 CAN 通信收发程序,调试通
- stm32f103rc_hcsr04.rar
- STM32F103 WS2812真彩LED灯驱动例程
- stm32PWM呼吸灯
- STM32-DS18B20程序
- 基于STM32的寝室指纹门锁设计
- stm32f1对MLX90614ESF读取数据
- STM32F407ZGT6用TB6600驱动器驱动4257步进电
- STM32f103vET6 最小系统原理图
- stm32控制舵机程序
- LORA实现收发,SX1278+STM32F103
- STM32F103任意频率三角波+正弦波产生
- STM32L452ADC初始化+外部电压采集+温度传
- mpu6050检测角度
- 第十届蓝桥杯嵌入式比赛备赛 资料汇
- stm32利用定时器的PWM输出驱动蜂鸣器播
- 实验20 PWM DAC实验.rar
- ADS1220 stm32f407vet6驱动硬件spi2带部分翻
- 基于AD绘制的STM32F103VET6最小系统板
- 基于AD绘制的STM32F405最小系统板
- STM32F013ZET6原理图
评论
共有 条评论