楚
楚辞
Unregistered / Unconfirmed
GUEST, unregistred user!
不知道下面的代码是用什么编写的?如果有请告诉下...谢谢了.主板集成的485,不支持流控的功能(即自动反转),同时收发,485本身为半双工,需要在软件里设定。outportb((base+4),(inportb(base+4) | 2)); /* Set RTS high to enable Driver ( disable Receiver ) */ while (flag) { /* --- Sending data --- */ } outportb((base+4),(inportb(base+4) & 0x0fd)); /* Set RTS low to disable Driver ( enable Receiver ) */ while (flag) { /* --- Receiving data --- */ }