开发者

Serial port or USB port using D?

I'm new using the D programming language and I was wondering if D can make us开发者_StackOverflow中文版e of the Serial port or usb port?


That would presumably involve system calls of some kind, which would be in C, but you can call C functions from D, so unless there's a library that will wrap it for you (which I rather doubt), you'll have to figure out what the appropriate C calls are and use them.


Creating bindings to C libraries is pretty straightforward in D, so you might try libusb for cross-system USB access.


Tango can do Serial port. Please refer to

  • tango.io.device.SerialPort module
  • tango.io.device.Device.Device class

Please notice that the URLs refers to a D2 port of Tango.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜