■ USB 读TF卡功能。 ok
打开对应配置
阅读文档:
hcRTOS USB gadget mass-storage 驱动说明.pdf
对应配置上
操作步骤:
hc1512a@dbE100(nsh)# exit
hc1512a@dbE100# ls
hc1512a@dbE100# usb
hc1512a@dbE100(usb)# help
Commands available:
help Show available cmds
exit Exit from current cmd set
history Show history cmds
g_get_cap usb/sd get cap
at_cmd send AT command to 4G net device
hid_mouse_demo usb hid: get input event from USB Mouse, and send these data to usb hid gadget
hid_kbd_demo usb hid: get input event from USB keyboard, and send these data to usb hid gadget
hid usb hid: get input event from USB keyboard
hid_gadget_test hid gadget test
g_zero setup USB as zero device demo
g_ncm setup USB as NCM device demo
g_serial_test setup USB as serial console test demo
g_serial setup USB as serial console
g_mass_storage setup USB as mass-storage device
gadget usb debug test for OTG switch
host usb debug test for switch to host
hc1512a@dbE100(usb)# g_mass_storage -p 0 /dev/mmcblk0p2
logic unit numbers: 1
logic unit(LUN:0) path: /dev/mmcblk0p2
==> (usb gadget) (lun:0) file:/dev/mmcblk0p2
hc1512a@dbE100(usb)# ==> usb#0 gadget connect