tag 标签: ft5206

相关博文
  • 热度 20
    2012-4-18 10:34
    2673 次阅读|
    1 个评论
         static int __devexit ft5x0x_ts_remove(struct i2c_client *client)   {       struct ft5x0x_ts_data *ft5x0x_ts = i2c_get_clientdata(client);      #ifdef CONFIG_HAS_EARLYSUSPEND       unregister_early_suspend(ft5x0x_ts-early_suspend);   #endif       free_irq(client-irq, ft5x0x_ts);       input_unregister_device(ft5x0x_ts-input_dev);       kfree(ft5x0x_ts);       cancel_work_sync(ft5x0x_ts-pen_event_work);       destroy_workqueue(ft5x0x_ts-ts_workqueue);       i2c_set_cleintdata(client, NULL);          return 0;   }       static const struct i2c_device_id  ft5x0x_ts_id[] = {       {FT5X0X_NAME, 0}   };   MODULE_DEVICE_TABLE(i2c, ft5x0x_id);      static struct i2c_driver ft5x0x_ts_driver = {       .probe    = ft5x0x_ts_probe,       .remove   = __devexit_p(ft5x0x_ts_remove),       .id_table = ft5x0x_ts_id,       .driver   = {           .name  = FT5X0X_TS,           .owner = THIS_MODULE,       },   };      static int __init ft5x0x_ts_init(void)   {       int ret;          ret = i2c_add_driver(ft5x0x_ts_driver);          return ret;   }      static void __exit ft5x0x_ts_exit(void)   {       i2c_delete_driver(ft5x0x_ts_driver);   }      module_init(ft5x0x_ts_init);   module_exit(ft5x0x_ts_exit);    
  • 热度 26
    2012-4-18 10:31
    32384 次阅读|
    1 个评论
    view plaincopyprint? static void ft5x0x_ts_release(void)   {       struct ft5x0x_ts_data *data = i2c_get_clientdata(this_client);      #ifdef FT5X0X_MULTI_TOUCH       input_report_abs(data-input_dev, ABS_MT_TOUCH_MAJOR, 0);       input_report_abs(data-input_dev, ABS_MT_WIDTH_MAJOR, 0);       input_report_key(data-input_dev, BTN_TOUCH, 0);   #else       input_report_abs(data-input_dev, ABS_PRESSURE, 0);       input_report_key(data-input_dev, BTN_TOUCH, 0);   #endif       input_sync(data-input_dev);   }      static int ft5x0x_read_data(void)   {       struct ft5x0x_ts_data *data = i2c_get_clientdata(this_client);       struct ts_event *event = data-event;       u32 buf = {0};       int ret = -1;          #ifdef FT5X0X_MULTI_TOUCH       ret = ft5x0x_i2c_rxdata(buf, 31);   #else       ret = ft5x0x_i2c_rxdata(buf, 7);   #endif       if (ret 0) {           printk("%s read_data i2c_rxdata failed: %d\n", __func__, ret);       }          memset(event, 0, sizeof(struct ts_event));       event-touch_point = buf 0x07;          if (event-touch_point == 0) {           ft5x0x_ts_release();           return 1;       }      #ifdef FT5X0X_MULTI_TOUCH       switch (event-touch_point) {           case 5:               event-x5 = (s16)(buf 0x0F)8 | (s16)buf ;               event-y5 = (s16)(buf 0x0F)8 | (s16)buf ;           case 4:               event-x4 = (s16)(buf 0x0F)8 | (s16)buf ;               event-y4 = (s16)(buf 0x0F)8 | (s16)buf ;           case 3:               event-x3 = (s16)(buf 0x0F)8 | (s16)buf ;               event-y3 = (s16)(buf 0x0F)8 | (s16)buf ;           case 2:               event-x2 = (s16)(buf 0x0F)8 | (s16)buf ;               event-y2 = (s16)(buf 0x0F)8 | (s16)buf ;           case 1:               event-x1 = (s16)(buf 0x0F)8 | (s16)buf ;               event-y1 = (s16)(buf 0x0F)8 | (s16)buf ;               break;           default:               return -1;       }   #else       if (event-touch_point == 1) {            event-x1 = (s16)(buf 0x0F)8 | (s16)buf ;           event-y1 = (s16)(buf 0x0F)8 | (s16)buf ;       }   #endif          event-pressure = 200;          return 0;   }      static void ft5x0x_reprot_value(void)   {       struct ft5x0x_ts_data *data = i2c_get_clientdata(this_client);       struct ts_event *event = data-event;      #ifdef FT5X0X_MULTI_TOUCH       switch(event-touch_point) {           case 5:               input_report_abs(data-input_dev, ABS_MT_TOUCH_MAJOR, event-pressure);               input_report_abs(data-input_dev, ABS_MT_POSITION_X,  event-x5);               input_report_abs(data-input_dev, ABS_MT_POSITION_Y,  event-y5);               input_report_abs(data-input_dev, ABS_MT_WIDTH_MAJOR, event-pressure);               input_mt_sync(data-input_dev);           case 4:               input_report_abs(data-input_dev, ABS_MT_TOUCH_MAJOR, event-pressure);               input_report_abs(data-input_dev, ABS_MT_POSITION_X,  event-x4);               input_report_abs(data-input_dev, ABS_MT_POSITION_Y,  event-y4);               input_report_abs(data-input_dev, ABS_MT_WIDTH_MAJOR, event-pressure);               input_mt_sync(data-input_dev);           case 3:               input_report_abs(data-input_dev, ABS_MT_TOUCH_MAJOR, event-pressure);               input_report_abs(data-input_dev, ABS_MT_POSITION_X,  event-x3);               input_report_abs(data-input_dev, ABS_MT_POSITION_Y,  event-y3);               input_report_abs(data-input_dev, ABS_MT_WIDTH_MAJOR, event-pressure);               input_mt_sync(data-input_dev);           case 2:               input_report_abs(data-input_dev, ABS_MT_TOUCH_MAJOR, event-pressure);               input_report_abs(data-input_dev, ABS_MT_POSITION_X,  event-x2);               input_report_abs(data-input_dev, ABS_MT_POSITION_Y,  event-y2);               input_report_abs(data-input_dev, ABS_MT_WIDTH_MAJOR, event-pressure);               input_mt_sync(data-input_dev);           case 1:               input_report_abs(data-input_dev, ABS_MT_TOUCH_MAJOR, event-pressure);               input_report_abs(data-input_dev, ABS_MT_POSITION_X,  event-x1);               input_report_abs(data-input_dev, ABS_MT_POSITION_Y,  event-y1);               input_report_abs(data-input_dev, ABS_MT_WIDTH_MAJOR, event-pressure);               input_mt_sync(data-input_dev);               break;           default:               break;       }   #else       if (event-touch_point == 1) {           input_report_abs(data-input_dev, ABS_X, event-x1);           input_report_abs(data-input_dev, ABS_Y, event-y1);           input_report_abs(data-input_dev, ABS_PRESSURE, event-pressure);       }       input_report_key(data-input_dev, BTN_TOUCH, 1);   #endif          input_sync(data-input_dev);     //摘自:http://blog.csdn.net/sunsea1026/article/details/7415803  
  • 热度 22
    2012-3-22 09:38
    2639 次阅读|
    0 个评论
      产品描述 l 支持2.8" - 12.1"的触控面板 l 真实多点触控,多达10点 l 采用跳频技术,超强抗RF干扰能力 l 优异防水、防静电特性 l 高信噪比:≥ 150 l 高线性度:≤ ±1mm l 高解析度:≥ 100 DPI l 低功耗 l 适用于多种类型(如Glass、Film等)的触摸屏 l 环境自适应校正 l 内置MCU,Flash l 支持I2C,SPI接口 l 通道 28Tx/ 16Rx     INTRODUCTION  The FT5x06 Series ICs are single-chip capacitive touch panel controller ICs with a built-in 8 bit Micro-controller unit (MCU).They  adopt the mutual capacitance approach, which supports true multi-touch capability. In conjunction with a mutual capacitive touch  panel, the FT5x06 have user-friendly input functions, which can be applied on many portable devices, such as cellular phones, MIDs,  netbook and notebook personal computers.  The FT5x06 series ICs include FT5206/FT5306/FT5406, the difference of their specifications will be listed individually in this  datasheet. FEATURES   Mutual Capacitive Sensing Techniques   True Multi-touch with up to 10 Points of Absolution X and  Y Coordinates   Immune to RF Interferences   Auto-calibration: Insensitive to Capacitance and Environ- mental Variations   Supports up to 28 Transmit Lines and 16 Receive Lines   Supports up to 12.1” Touch Screen    Full Programmable Scan Sequences with Individual Ad- justable Receive Lines and Transmit Lines to Support  Various Applications   High Report Rate: More than 100Hz   Touch Resolution of 100 Dots per Inch (dpi) or above --  depending on the Panel Size   Optional Interfaces :I2C/SPI   2.7V to 3.6V Operating Voltage   Supports 1.8V/AVDD IOVCC       Capable of Driving Single Channel (transmit/receive) Re- sistance: Up to15K    Capable of Supporting Single Channel (transmit/receive)  Capacitance: 60 pF   Optimal Sensing Mutual Capacitor: 1pF~4pF   12-Bit ADC Accuracy   Built-in MCU with 28KB Program Memory, 6KB Data  Memory and 256B Internal Data Space   11 Internal Interrupt Sources and 2 External Interrupt  Sources   3 Operating Modes   Active   Monitor   Hibernate   Operating Temperature Range: -20°C to +85°C