简体   繁体   English

确定是否可以在OSX的用户空间中编写HID设备驱动程序的最佳方法是什么?

[英]What's the best way to determine if a HID device driver can be written in user space on OSX?

I need to write a number of drivers for both HID USB devices as well as some old serial devices. 我需要为HID USB设备和一些旧的串行设备编写许多驱动程序。 The drivers are to pull data off the device and then send the data over to an application that then consumes it. 驱动程序要从设备中提取数据,然后将数据发送到应用程序,然后再使用它。 Since the Apple Docs mention that a lot of USB and HID communication can be done from the user space I had assumed that I would not need to write a kernel extension, at least not for the HID devices. 由于Apple Docs提到可以从用户空间完成许多USB和HID通信,所以我假设我不需要编写内核扩展,至少对于HID设备而言不需要。 Could some one tell me a more solid way to determine this? 有人可以告诉我一种更可靠的方法来确定这一点吗?

Thanks! 谢谢!

If you're writing a single application that must talk to one or more USB HID devices you may well find you can just access the devices straight from the application using the application-level USB APIs. 如果您正在编写一个必须与一个或多个USB HID设备通信的应用程序,则可能会发现您可以使用应用程序级USB API直接从该应用程序访问这些设备。

A kernel driver would be more for something like a networking or mass storage device that needed to integrate with the kernel to be be available to multiple applications. 内核驱动程序将更多地用于网络或大容量存储设备等需要与内核集成以便可用于多个应用程序的设备。

This Apple document Common QA and Roadmap for USB Software Development on Mac OS X goes into some detail on the matter and links to example code too. 此Apple文档在Mac OS X上进行USB软件开发的Common QA和Roadmap对此事进行了详细介绍,并也链接到示例代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在iPhone上找到用户的Documents目录的最佳方法是什么? - What's the best way to find the user's Documents directory on an iPhone? 确保我没有在OSX上使用任何不可用的API的最佳方法是什么? - What is the best way to make sure I am not using any unavailable API's on OSX? 向用户展示加载iPhone的最佳方式是什么? - What's the best way to show the user something is loading on the iPhone? 确定是否轻按了视图中绘制的线条的最佳方法是什么? - What is the best way to determine if a line that was drawn in a view was tapped? 确定视图包含视图行为的最佳方法 - Best way to determine the behavior of a view's containing view 用Parse添加用户关系的最佳方法是什么? - What is the best way to add user relations with Parse? 在Mac的daemon / root进程中获取当前用户语言和区域的最佳方法是什么? - What's the best way to get the current user language and region in daemon/root process in mac? 从iPhone应用程序-> PHP-> MySQL保护用户密码的最佳方法是什么? - What is the best way to go about protecting a user's password going from iPhone app -> PHP -> MySQL? 在用户首次打开应用程序时处理登录屏幕的最佳方法是什么? - What's the best way to handle showing a sign in screen the first time a user opens an app? 备份用户应用数据的最佳方式 - Best way to backUp user's app data
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM