omap3530上移植AMT 6000 系列USB型触摸屏+tslib(7)

case 0x80: /* up */
        dev->x = (pkt[1] & 0x7f) | ((pkt[2] & 0x07) << 7);
        dev->y = (pkt[3] & 0x7f) | ((pkt[4] & 0x07) << 7);
        dev->touch = 0;
        dbg("%s: up %d,%d", __func__, dev->x, dev->y);
        return 1;

default:
        dbg("%s: Unknown return %d", __func__, pkt[0]);
        break;
    }

return 0;
}
#endif

/*****************************************************************************
 * the different device descriptors
 */
#ifdef MULTI_PACKET
static void usbtouch_process_multi(struct usbtouch_usb *usbtouch,
                   unsigned char *pkt, int len);
#endif

static struct usbtouch_device_info usbtouch_dev_info[] = {
#ifdef CONFIG_TOUCHSCREEN_USB_EGALAX
    [DEVTYPE_EGALAX] = {
        .min_xc        = 0x0,
        .max_xc        = 0x07ff,
        .min_yc        = 0x0,
        .max_yc        = 0x07ff,
        .rept_size    = 16,
        .process_pkt    = usbtouch_process_multi,
        .get_pkt_len    = egalax_get_pkt_len,
        .read_data    = egalax_read_data,
    },
#endif

#ifdef CONFIG_TOUCHSCREEN_USB_PANJIT
    [DEVTYPE_PANJIT] = {
        .min_xc        = 0x0,
        .max_xc        = 0x0fff,
        .min_yc        = 0x0,
        .max_yc        = 0x0fff,
        .rept_size    = 8,
        .read_data    = panjit_read_data,
    },
#endif

#ifdef CONFIG_TOUCHSCREEN_USB_3M
    [DEVTYPE_3M] = {
        .min_xc        = 0x0,
        .max_xc        = 0x4000,
        .min_yc        = 0x0,
        .max_yc        = 0x4000,
        .rept_size    = 11,
        .read_data    = mtouch_read_data,
        .init        = mtouch_init,
    },
#endif

#ifdef CONFIG_TOUCHSCREEN_USB_ITM
    [DEVTYPE_ITM] = {
        .min_xc        = 0x0,
        .max_xc        = 0x0fff,
        .min_yc        = 0x0,
        .max_yc        = 0x0fff,
        .max_press    = 0xff,
        .rept_size    = 8,
        .read_data    = itm_read_data,
    },
#endif

#ifdef CONFIG_TOUCHSCREEN_USB_ETURBO
    [DEVTYPE_ETURBO] = {
        .min_xc        = 0x0,
        .max_xc        = 0x07ff,
        .min_yc        = 0x0,
        .max_yc        = 0x07ff,
        .rept_size    = 8,
        .process_pkt    = usbtouch_process_multi,
        .get_pkt_len    = eturbo_get_pkt_len,
        .read_data    = eturbo_read_data,
    },
#endif

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wwxzdz.html