资源简介
mtk 6582 android4.4版本上的APDS-9930驱动,配置好gpio和中断就可以使用,增加了自动校准功能。

代码片段和文件信息
/* drivers/hwmon/mt6516/amit/APDS9930.c - APDS9930 ALS/PS driver
*
* Author: MingHsien Hsieh
*
* 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
#include
#include
#include
#include
#include
#include
#include ject.h>
#include
#include
#include
#include
#include
#include
#define POWER_NONE_MACRO MT65XX_POWER_NONE
#include
#include
#include
#include
#include
#include
#include “APDS9930.h“
#include
/******************************************************************************
* configuration
*******************************************************************************/
/*----------------------------------------------------------------------------*/
#define APDS9930_DEV_NAME “APDS9930“
/*----------------------------------------------------------------------------*/
#define APS_TAG “[ALS/PS] “
#define APS_FUN(f) printk(KERN_INFO APS_TAG“%s\n“ __FUNCTION__)
#define APS_ERR(fmt args...) printk(KERN_ERR APS_TAG“%s %d : “fmt __FUNCTION__ __LINE__ ##args)
#define APS_LOG(fmt args...) printk(KERN_ERR APS_TAG fmt ##args)
#define APS_DBG(fmt args...) printk(KERN_INFO APS_TAG fmt ##args)
#define I2C_FLAG_WRITE 0
#define I2C_FLAG_READ 1
/******************************************************************************
* extern functions
*******************************************************************************/
extern void mt_eint_mask(unsigned int eint_num);
extern void mt_eint_unmask(unsigned int eint_num);
extern void mt_eint_set_hw_debounce(unsigned int eint_num unsigned int ms);
extern void mt_eint_set_polarity(unsigned int eint_num unsigned int pol);
extern unsigned int mt_eint_set_sens(unsigned int eint_num unsigned int sens);
extern void mt_eint_registration(unsigned int eint_num unsigned int flow void (EINT_FUNC_PTR)(void) unsigned int is_auto_umask);
extern void mt_eint_print_status(void);
/*----------------------------------------------------------------------------*/
static struct i2c_client *APDS9930_i2c_client = NULL;
/*----------------------------------------------------------------------------*/
static const stru
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3223 2013-12-05 11:37 cust_alsps.c
文件 56400 2013-11-26 22:40 APDS9930.c
文件 1811 2013-11-26 22:40 APDS9930.h
----------- --------- ---------- ----- ----
61434 3
- 上一篇:java实现分治法寻找最近点对
- 下一篇:Android开发 心电图绘制
相关资源
- u-blox_Android_GNSS_Driver_v3.10驱动源码+中
- 指纹传感器FPC1080在android下的驱动
- mysql-connector-java-5.0.8-bin驱动jar
- sqlserver数据库驱动jar
- sql server驱动jar包
- sqlserver2016数据库连接驱动及demo
- mysql 5.6以上版本的数据库驱动
- Android底层开发技术实战详解-内核、移
- 手机网络USB共享驱动_for_XP
- rt3070驱动Linux
- Cucumber:行为驱动开发指南
- hibernate所需的13个1个mysql驱动包+3个日
- 最新版的JDBC驱动jar包
- Java的mysql数据库驱动包mysql-connector-
- informix数据库jdbc驱动
- Android驱动USB摄像头源码
- Java3D驱动程序
- JDBC连接MySQL数据库8.0.13的驱动包
- mysql-connector-java5.1.30
- oracle驱动jar包后解压缩即可
- mysql-5.5.27驱动
- oracle数据库驱动jar包
- 达梦数据库连接方式及jdbc驱动包.ra
- mongo-java-driver-3.2.2.jar
- Android wifi资料合集驱动、应用
- 短信猫驱动+代码+测试程序开箱即用版
- android 收音机 FM 驱动 hal层 框架层以及
- mssql-jdbc-7.4.1.jre8.jar
- mssql-jdbc-8.4.0.jre8.jar
- Java测试驱动开发
评论
共有 条评论