usbhost OTG

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lf12345678910/article/details/78029209

http://blog.csdn.net/kc58236582/article/details/54691334

 libusbhost

UsbHostManager的hal层

monitorUsbHostBus对应的JNI函数是在com_android_server_UsbHostManager.cpp的android_server_UsbHostManager_monitorUsbHostBus函数,在这个函数调用了usb_host_init函数,创建了一个INotify的fd,以及创建了一个usb_host_context对象。usb_host_run函数就是循环读取INotify的fd的事件,我们把usb_device_added, usb_device_removed两个回调函数也传入了usb_host_run函数了。

猜你喜欢

转载自blog.csdn.net/lf12345678910/article/details/78029209
OTG
今日推荐