词典笔的USB模式
#304
Replies: 2 comments 4 replies
-
|
ntb和uvc根本没做完: pre_run_binary()
{
if [ $ADB_EN = on ];then
mkdir /dev/usb-ffs/adb -m 0770
mount -o uid=2000,gid=2000 -t functionfs adb /dev/usb-ffs/adb
start-stop-daemon --start --quiet --background --exec /usr/bin/adbd
fi
if [ $NTB_EN = on ];then
mkdir /dev/usb-ffs/ntb -m 0770
mount -o uid=2000,gid=2000 -t functionfs ntb /dev/usb-ffs/ntb
# Not start app here
fi
# Add uvc app here with start-stop-daemon
}
UAC也根本没写内容 function_init()
{
# UAC的定义从这里开始
mkdir ${USB_FUNCTIONS_DIR}/uac1.gs0
test_write 1 ${USB_FUNCTIONS_DIR}/uac1.gs0/c_feature_unit
test_write 1 ${USB_FUNCTIONS_DIR}/uac1.gs0/p_feature_unit
mkdir ${USB_FUNCTIONS_DIR}/uac2.gs0
test_write 1 ${USB_FUNCTIONS_DIR}/uac2.gs0/c_feature_unit
test_write 1 ${USB_FUNCTIONS_DIR}/uac2.gs0/p_feature_unit
# 到这里结束
mkdir ${USB_FUNCTIONS_DIR}/ffs.adb
mkdir ${USB_FUNCTIONS_DIR}/ffs.ntb
mkdir ${USB_FUNCTIONS_DIR}/mtp.gs0
mkdir ${USB_FUNCTIONS_DIR}/rndis.gs0
#write /config/usb_gadget/g1/functions/rndis.gs0/wceis 1
mkdir ${USB_FUNCTIONS_DIR}/acm.gs6
mkdir ${USB_FUNCTIONS_DIR}/mass_storage.0
mkdir ${USB_FUNCTIONS_DIR}/uvc.gs6
mkdir ${USB_FUNCTIONS_DIR}/hid.usb0
} |
Beta Was this translation helpful? Give feedback.
4 replies
-
疑似内核没开HID |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Note
本文只阐述了词典笔OS机型的情况,更具体地来说,本文描述的情况仅限A6P机型。
显然词典笔的USB可以被配置成任何模式,不过我发现/usr/bin下有个叫S98usbdevice的脚本,除了adb和mtp之外,它还可以将USB配置成以下模式:
配置文件在/tmp/.usb_config,在开机时由/etc/init.d/.usb_config复制而来。
配置语法如下:
也可以给它传入
stop,start,restart等参数,以实现服务启停。然后USB就没法用了不过重新插入设备之后会触发/usr/bin/usbconfig脚本,该脚本将自动重启USB服务。
UVC被脚本配置成以下格式:
YUYV格式:
640x480,1280x720MJPEG格式:
640x480,1280x720,1920x1080,2560x1440,2592x1944H.264格式:
640x480,1280x720,1920x1080每个分辨率支持的帧率:
30fps,15fps,10fps,5fpsUAC没有被显式配置参数;并且,这俩建立传输通道之后似乎没有要传输的数据?
脚本会根据启用的功能组合自动分配Product ID:
Beta Was this translation helpful? Give feedback.
All reactions