当前位置: 动力学知识库 > 问答 > 编程问答 >

objective c - Mac Application - Disable specific USB port

问题描述:

There is any way to I disable/enable a specific USB Port with my application ?

网友答案:

I'm not aware of any way to do this from user space, and even within the kernel it could be tricky: I think you would need to install a dummy I/O Kit driver which matches all USB devices and/or interfaces. This could be tricky as existing drivers would take precedence, so you'd need to work around that. Once matched, you would check the port in the driver's probe() method and return true if it was one of the disallowed ports. This would stop other drivers from grabbing the device, which would essentially disable it.

分享给朋友:
您可能感兴趣的文章:
随机阅读: