Mac OS analog to /dev/ttyUSBxx

后端 未结 3 974
渐次进展
渐次进展 2021-02-14 08:36

I used to linux USB port naming, aka /dev/ttyUSBxx and currently trying to write some test software to read/wrtie raw data to USB ports on iMac, but i find it hard to detect to

3条回答
  •  醉梦人生
    2021-02-14 09:17

    OS X doesn't create a /dev entry for raw access to USB devices, and there's no way to access them as TTY devices.

    Partly this is a different in philosophy between Linux and BSD, partly it's a difference in driver-writing technology, and partly it's a matter of already having a well-defined hierarchy (the IOKit Registry) that would have to be mapped to the /dev hierarchy in some complicated way.

    At any rate, if you want to learn how you should access USB devices on a Mac, start with QA1370. If you're looking to do a quick port of some linux code without actually learning IOKit/IOUSB, it's probably going to be impossible. If you're looking for something else, you'll need to give more info about what you're trying to do.

提交回复
热议问题