电阻屏NS2009
tslib OK,ts_calibrate,ts_test可以正常运行。
littlevgl demo可以正常显示,但是,触摸 错误输出“ input input1: Poll touch data failed: ”
    lv_indev_drv_t indev_drv;
     lv_indev_drv_init(&indev_drv);          /*Basic initialization*/
     evdev_init();
     indev_drv.type = LV_INDEV_TYPE_POINTER; /*See below.*/
     indev_drv.read =  evdev_read;            /*See below.*/
     lv_indev_drv_register(&indev_drv);      /*Register the driver in LittlevGL*/
。。。
/*Handle LitlevGL tasks (tickless mode)*/
    while(1) {
        lv_tick_inc(5);
        lv_task_handler();
        usleep(5000);
    }
哪里配置还有问题
/*-------------------------------------------------
 * Mouse or touchpad as evdev interface (for Linux based systems)
 *------------------------------------------------*/
#ifndef USE_EVDEV
#define USE_EVDEV           1
#endif
#if USE_EVDEV
#define EVDEV_NAME   "/dev/input/event1"        /*You can use the "evtest" Linux tool to get the list of devices and test them*/
#define EVDEV_SWAP_AXES         0               /*Swap the x and y axes of the touchscreen*/
#define EVDEV_SCALE             0               /* Scale input, e.g. if touchscreen resolution does not match display resolution */
#if EVDEV_SCALE
#define EVDEV_SCALE_HOR_RES     (800)     /* Horizontal resolution of touchscreen */
#define EVDEV_SCALE_VER_RES     (480)        /* Vertical resolution of touchscreen */
#endif  /*EVDEV_SCALE*/
#define EVDEV_CALIBRATE         0               /*Scale and offset the touchscreen coordinates by using maximum and minimum values for each axis*/
#if EVDEV_CALIBRATE
#define EVDEV_HOR_MIN   3800                    /*If EVDEV_XXX_MIN > EVDEV_XXX_MAX the XXX axis is automatically inverted*/
#define EVDEV_HOR_MAX   200
#define EVDEV_VER_MIN   200
#define EVDEV_VER_MAX   3800
#endif  /*EVDEV_SCALE*/
#endif  /*USE_EVDEV*/
最近编辑记录 john78 (2018-12-07 14:37:14)
离线
https://github.com/qq516333132/f1c100s_linux/blob/zero-4.13.y/drivers/input/touchscreen/ns2009.c
static void ns2009_ts_poll(struct input_polled_dev *dev)
{
struct ns2009_data *data = dev->private;
int ret;ret = ns2009_ts_report(data);
if (ret)
dev_err(&dev->input->dev, "Poll touch data failed: %d\n", ret);
}
没事没事, 只是 ns2009 驱动读到某次数据异常而已。
离线
但是触摸不对啊,和画面对不上?
另外,这个怎么使用 tslib校准好的数据? /dev/input/event1--这个输出已经校准了吗?
离线
tslib OK,ts_calibrate,ts_test可以正常运行。
这个需要怎么在LitlevGL中调用?
离线