资源简介
LIS3DH为意法半导体退出的高性能低功耗三轴加速度传感器。
此资源为其在STM32单片机上的驱动参考代码。
代码片段和文件信息
/******************** (C) COPYRIGHT 2012 STMicroelectronics ********************
* File Name : example_main.c
* Author : MSH Application Team
* Author : Abhishek AnandFabio Tota
* Revision : $Revision: 1.5 $
* Date : $Date: 16/06/2011 12:19:08 $
* Description : Example main file for MKI109V1 board
* HISTORY:
* Date | Modification | Author
* 16/06/2011 | Initial Revision | Fabio Tota
* 11/06/2012 | Support for multiple drivers in the same program | Abhishek Anand
********************************************************************************
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
* AS A RESULT STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* THIS SOFTWARE IS SPECIFICALLY DESIGNED FOR EXCLUSIVE USE WITH ST PARTS.
*
*******************************************************************************/
/* Includes ------------------------------------------------------------------*/
//include files for MKI109V1 board
#include “stm32f10x.h“
#include “usb_lib.h“
#include “usb_desc.h“
#include “hw_config.h“
#include “usb_pwr.h“
#include “led.h“
#include “button.h“
#include “adc_mems.h“
#include “string.h“
#include “spi_mems.h“
#include
//include MEMS driver
#include “lis3dh_driver.h“
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
uint8_t response;
uint8_t USBbuffer[64];
/* Extern variables ----------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
//define for example1 or example2
//#define __EXAMPLE1__H
#define __EXAMPLE2__H
/*******************************************************************************
* Function Name : main.
* Description : Main routine.
* Input : None.
* Output : None.
* Return : None.
*******************************************************************************/
int main(void)
{
uint8_t buffer[26];
uint8_t position=0 old_position=0;
AxesRaw_t data;
//Initialize your hardware here
//function for MKI109V1 board
InitHardware();
SPI_Mems_Init();
EKSTM32_LEDOff(LED1);
EKSTM32_
- 上一篇:高速数模转换器DAC904的PCB图
- 下一篇:RADARSAT_wKA.rar
相关资源
- CompilerTool源码(Delphi).7z
- 某管理系统的Delphi界面设计源码..ra
- yy协议源码
- ubuntu opencv qt 三位一体的摄像头源码
- EC20开发资料,含源码
- 某校园漫游给大学生代做的毕设设计
- QT5串口上位机实现 源码
- 安卓锁机源码
- RFID标签读写程序源码
- 最小二乘法曲线拟合(源码)
- ffdoc FFMPEG的最完整教程FFMPEG的源码剖
- grbl servo master XY结构舵机写字机源码
- QSV转换工具 源码
- 修改网卡MAC地址不需要重启电脑
- xgcom-0.04.2源码
- linux gsm0710 CMUX串口多路复用源码
- zigbee无线温湿度采集源码
- 韩国网游数码宝贝RPG数码宝贝ol模拟服
- 完整项目之QT5开发源码——聊天工具
- 自己编写的malloc源码
- Dubbo新手入门HelloWorld(zookeeper)源码
- UpdateVersion 修改exedll文件版本源码
- 内存遍历工具源码
- 基于51单片机控制的函数信号发生器含
- QT实现图片的简单编辑工具,支持多种
- Opennms从源码编译安装指南
- Spark从入门到精通(高级特性、案例实
- 《Spring微服务实战Spring Microservices i
- 百姓网二手房源出售信息采集爬虫源
- 搜云社工库网站程序源码
评论
共有 条评论