RK3188红外遥控配置新手版

1 kernel/drivers/input/remotectl/rkxx_remotectl.c中添加:

RK3188红外遥控配置新手版_第1张图片
Paste_Image.png

static struct rkxx_remotectl_button remotectl_button[]添加
{
.usercode = 0x20df,
.nbuttons = 13,
.key_table = &remote_key_table_xxxxxxx[0],
},
这里xxxxxx对应上图的remote_key_table_xxxxxx

2 编辑device/rockchip/rksdk/rkxx-remotectl.kl键值与kernel/include/linux/input.h相对应

RK3188红外遥控配置新手版_第2张图片
Paste_Image.png

3 编译固件,烧录,如不能运行,检查keycode是否正确,可通过串口查看,先在 kernel/drivers/input/remotectl/rkxx_remotectl.c开启

if 1

            printk("u=0x%x\n",((ddata->scanData)&0xFFFF));

endif

if 1

            printk("RMC_GETDATA=%x\n",(ddata->scanData&0xFFFF));

endif

if 1

    printk("[%s]input_sync ddata->keycode=0x%0x \n",  __func__, ddata->keycode);

endif

然后按下遥控器,观察串口打印输出:

RK3188红外遥控配置新手版_第3张图片
Paste_Image.png

其中u=0x20df是遥控用户码,u=0x20df中20便是遥控码,替换第一步中对应的0xxx重新编译内核即可。

你可能感兴趣的:(RK3188红外遥控配置新手版)