android自动旋转加载驱动,[求助]加载Android USB Gadget HID 驱动

有个问题请教一下,我想加载一个Android USB Gadget HID驱动,内核编译都完成了,现在需要修改init.usb.configfs.rc文件让驱动加载起来,驱动是基于configfs的,根据文档说明需要配置相关属性如下:

For a keyboard the protocol and the subclass are 1, the report_length is 8,

while the report_desc is:

$ hd my_report_desc

00000000  05 01 09 06 a1 01 05 07  19 e0 29 e7 15 00 25 01  |..........)...%.|

00000010  75 01 95 08 81 02 95 01  75 08 81 03 95 05 75 01  |u.......u.....u.|

00000020  05 08 19 01 29 05 91 02  95 01 75 03 91 03 95 06  |....).....u.....|

00000030  75 08 15 00 25 65 05 07  19 00 29 65 81 00 c0     |u...%e....)e...|

0000003f

Such a sequence of bytes can be stored to the attribute with echo:

$ echo -ne \\x05\\x01\\x09\\x06\\xa1.....

在init.usb.configfs.rc中使用write对相关属性写入字符串,我想请教一下怎么使用writ写入report_desc里的byte数据

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值