91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 12KB
    文件類型: .rar
    金幣: 2
    下載: 1 次
    發布日期: 2023-12-19
  • 語言: 其他
  • 標簽: gt911??for??linux??

資源簡介

gt911觸摸屏驅動程序,成功運行與linux 系統中。-------------------------------------------------

資源截圖

代碼片段和文件信息

#include
#include“hjt_ts_gt911.h“




static?const?char?*goodix_input_phys?=?“input/ts“;
static?const?char?*goodix_ts_name?=?“goodix-ts“;
static?struct?workqueue_struct?*goodix_wq;
struct?i2c_client?*?i2c_connect_client?=?NULL;?
int?gtp_rst_gpio;
int?gtp_int_gpio;
u8?config[GTP_CONFIG_MAX_LENGTH?+?GTP_ADDR_LENGTH]
???????????????=?{GTP_REG_CONFIG_DATA>>?8?GTP_REG_CONFIG_DATA?&?0xff};

static?ssize_t?gt91xx_config_read_proc(struct?file?*?char?__user?*?size_t?loff_t*);
static?ssize_t?gt91xx_config_write_proc(struct?file?*?const?char?__user?*?size_tloff_t?*);

static?s8?gtp_i2c_test(struct?i2c_client?*client);
void?gtp_reset_guitar(struct?i2c_client?*client?s32?ms);
s32?gtp_send_cfg(struct?i2c_client?*client);
void?gtp_int_sync(s32?ms);


static?struct?proc_dir_entry?*gt91xx_config_proc?=?NULL;
static?const?struct?file_operations?config_proc_ops?=?{
???.owner?=?THIS_MODULE
???.read?=?gt91xx_config_read_proc
???.write?=?gt91xx_config_write_proc
};
static?int?gtp_register_powermanger(struct?goodix_ts_data?*ts);
static?int?gtp_unregister_powermanger(struct?goodix_ts_data?*ts);






/*******************************************************
Function:
???Read?data?from?the?i2c?slave?device.
Input:
???client:?????i2c?device.
???buf[0~1]:???read?start?address.
???buf[2~len-1]:???read?data?buffer.
???len:????GTP_ADDR_LENGTH?+?read?bytes?count
Output:
???numbers?of?i2c_msgs?to?transfer:?
?????2:?succeed?otherwise:?failed
*********************************************************/
s32?gtp_i2c_read(struct?i2c_client?*client?u8?*buf?s32?len)
{
???struct?i2c_msg?msgs[2];
???s32?ret=-1;
???s32?retries?=?0;


???GTP_DEBUG_FUNC();


???msgs[0].flags?=?!I2C_M_RD;
???msgs[0].addr??=?client->addr;
???msgs[0].len???=?GTP_ADDR_LENGTH;
???msgs[0].buf???=?&buf[0];
???//msgs[0].scl_rate?=?300?*?1000;????//?for?Rockchip?etc.
???
???msgs[1].flags?=?I2C_M_RD;
???msgs[1].addr??=?client->addr;
???msgs[1].len???=?len?-?GTP_ADDR_LENGTH;
???msgs[1].buf???=?&buf[GTP_ADDR_LENGTH];
???//msgs[1].scl_rate?=?300?*?1000;


???while(retries????{
???????ret?=?i2c_transfer(client->adapter?msgs?2);
???????if(ret?==?2)break;
???????retries++;
???}
???if((retries?>=?5))
???{???
???????GTP_ERROR(“I2C?Read:?0x%04X?%d?bytes?failederrcode:?%d!?Process?reset.“?(((u16)(buf[0]?<???????{
???????????gtp_reset_guitar(client?10);??
???????}
???}
???return?ret;
}






/*******************************************************
Function:
???Write?data?to?the?i2c?slave?device.
Input:
???client:?????i2c?device.
???buf[0~1]:???write?start?address.
???buf[2~len-1]:???data?buffer
???len:????GTP_ADDR_LENGTH?+?write?bytes?count
Output:
???numbers?of?i2c_msgs?to?transfer:?
???????1:?succeed?otherwise:?failed
*********************************************************/
s32?gtp_i2c_write(struct?i2c_client?*clientu8?*bufs32?len)
{
???struct?i2c_ms

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????36919??2018-02-27?10:58??gt911\hjt_ts_gt911.c

?????文件??????11676??2018-02-27?10:58??gt911\hjt_ts_gt911.h

?????目錄??????????0??2018-03-21?12:47??gt911

-----------?---------??----------?-----??----

????????????????48595????????????????????3


評論

共有 條評論