资源简介
QST 加速度传感器QMA6981 MTK6737驱动,QST 加速度传感器QMA6981 MTK6737驱动

代码片段和文件信息
/* qma6981 motion sensor driver
*
*
*
* This software is licensed under the terms of the GNU General Public
* License version 2 as published by the Free Software Foundation and
* may be copied distributed and modified under those terms.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#include
#include
#include “qma6981.h“
#define QMA6981_STEP_COUNTER
#ifdef QMA6981_STEP_COUNTER
#define QMA6981_STEP_COUNTER_USE_INT
#define QMA6981_CHECK_ABNORMAL_DATA
//#define QMA6981_STEP_TO_ZERO
#define QMA6981_SELECT_AXIS
#endif
#include
#include
#include
#include
//step counter
#include
#include
#ifdef QMA6981_STEP_COUNTER
#include
#endif
#include
//prize-lixuefeng-20150512-start
#if defined(CONFIG_PRIZE_HARDWARE_INFO)
#include “../../hardware_info/hardware_info.h“
extern struct hardware_info current_gsensor_info;
#endif
//prize-lixuefeng-20150512-end
#define QMA6981_RETRY_COUNT 3
#define qma6981_BUFSIZE 256
#define GSE_TAG “[QMA-Gsensor] “
#define GSE_ERR(fmt args...) pr_err(GSE_TAG “%s %d : “ fmt __FUNCTION__ __LINE__ ##args)
#define GSE_FUN(f) pr_err(GSE_TAG “%s\n“ __FUNCTION__)
#define GSE_DEBUG
#ifdef GSE_DEBUG
#define GSE_LOG(fmt args...) printk(“%s %d : “ fmt __FUNCTION__ __LINE__ ##args)
#else
#define GSE_LOG(fmt args...)
#endif
#define kal_bool bool
#define KAL_TRUE true
#define KAL_FALSE false
static struct acc_hw accel_cust;
static struct acc_hw *hw = &accel_cust;
static int qma6981_init_flag =0;
static DEFINE_MUTEX(qma6981_init_mutex);
static DEFINE_MUTEX(qma6981_mutex);
#if defined(QMA6981_STEP_COUNTER_USE_INT)
//extern struct platform_device *get_acc_platformdev(void);
//struct platform_device *accPltFmDev;
#endif
#if defined(CONFIG_HAS_EARLYSUSPEND)
static void qma6981_early_suspend(struct early_suspend *h);
static void qma6981_late_resume(struct early_suspend *h);
#endif
static struct acc_init_info qma6981_init_info;
#ifdef QMA6981_STEP_COUNTER
static struct step_c_init_info qma6981_step_c_init_info;
static struct wake_lock sc_wakelock;
static kal_bool wake_lock_status = KAL_FALSE;
static int sc_reset_flag = KAL_TRUE;// store last data
static int qma6981_step_c_read_stepCounter(int *data);
static void qma6981_set_wakelock(int en);
#if 1//defined(QMA6981_STEP_TO_ZERO)
static char qma6981_reg13_value = 0x10;
#endif
#define QMA6981_REG13_LOW_VALUE 0x0c //0x0a
#define QMA6981_REG13_HIGH_VALUE 0x11 //0x10
#endif
struct qma6981_data{
struct acc_hw *hw;
struct i2c_client *client;
struct hwmsen_convert cvt;
int sensitivity;
atomic_t layout;
atomic_t trace;
atomic_
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 204 2016-09-21 20:51 accelerometer\Kconfig
文件 149 2016-09-21 20:50 accelerometer\Makefile
文件 81670 2017-09-01 15:44 accelerometer\qma6981\qma6981.c
文件 80524 2017-06-07 12:28 accelerometer\qma6981\qma6981.c.bak
文件 1768 2017-02-15 09:53 accelerometer\qma6981\qma6981.h
文件 24942 2017-02-17 11:35 step_counter\step_counter.c
文件 3710 2017-02-17 11:35 step_counter\step_counter.h
文件 394793 2017-07-04 10:28 图片\config.jpg
文件 428040 2017-07-04 10:27 图片\project.jpg
文件 2069 2017-02-17 10:15 cust_eint.dtsi
文件 88625 2017-02-21 14:55 mt6735.dtsi
文件 34479 2017-03-07 22:29 pri6737t_66_m0.dts
文件 1975 2017-07-04 10:33 移植说明.txt
目录 0 2017-09-01 15:44 accelerometer\qma6981
目录 0 2017-09-01 10:28 accelerometer
目录 0 2017-09-01 10:28 step_counter
目录 0 2017-09-01 15:45 图片
----------- --------- ---------- ----- ----
1142948 17
- 上一篇:二分法Fortran代码
- 下一篇:地籍检查程序
相关资源
- 基于STM32RCT6的步进电机驱动程序
- 直流无刷电机方波驱动 stm32 例程代码
- elantech触控板驱动程序 v13.6.11 官方最
- 联想y470无线网卡驱动 for 32位64位
- 松下plc FP-XH的驱动
- IMX385驱动代码.zip
- 组态王驱动开发包3.0.0.7(中文)
- 飞思卡尔单片机MC9S12XS12G128驱动(硬件
- CASS9.1最新S4数据及驱动+ET199数据及驱
- 带有死区延时的H桥直流电机驱动电路
- USB转串口驱动,FT232R驱动程序,最新
- 德卡D3读卡器测试程序驱动文件
- WinCE下CP210x的驱动程序
- ubuntu9.10 可加载内核模块和字符设备驱
- MCGS触摸屏西门子s7_1200驱动
- FPGA在步进电机驱动上的应用实例及代
- [免费]基于stm32f103ze 的OLED驱动代码
- STM32F103RBT6驱动UC1698控制芯片的160160黑
- RA8806液晶驱动程序
- 内核驱动进程保护演示程序
- STM32F103 DS18B20 V3.5.0固件库驱动程序工
- 组态王中S7-300TCP驱动
- STC12C5A60S2 CH4521 驱动数码管 显示
- STM32F103 CC2500完整驱动(模拟SPI)
- 430系列单片机USBFET下载驱动
- dell阵列卡驱动s100 s300 2008 R2.rar
- keil vcom windows 7 64bit 驱动
- windows ce 系统的GPIO驱动程序
- 2440 cs8900a 网卡驱动程序
- USB 驱动 让电脑与arm进行通信
评论
共有 条评论