遥控器驱动分析

本文深入探讨了Android系统中遥控器驱动程序如何与远程配置模块进行交互,包括遥控器驱动程序如何通过调用内核空间的ioctl将用户空间参数和码值传递给内核空间,以及远程配置模块如何通过用户空间的ioctl将remote.conf文件参数传给内核空间。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. device/amlogic/f16ref/init.rc中的:

# remote 

service remotecfg /system/bin/remotecfg /system/etc/remote.conf

    class main

    oneshot

通过remotecfg模块调用remote.conf


2. external/remoteconf下的代码生成remotecfg模块 ,该模块通过用户空间的ioctl将remote.conf中的参数传给内核空间


3 .遥控器驱动程序 kernel/drivers/amlogic/input/irremote/remote_kbd.c通过调用内核空间的ioctl ,把用户空间的参数和码值拷贝到内核空间。

static const struct file_operations remote_fops = {

.owner      = THIS_MODULE,

.open       =remote_config_open,

.ioctl      = remote_config_ioctl,

.release        = remote_config_release,

};



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值