Hi all,
I am actualy working on a embedded PC with a RS485 port. I am using devc-8250 as driver. Since this port is Half Duplex, the port is configured in receiver or sender regarding the situation. The hardware side should be able to do configure the port but the controler in my case doesn’t support this. I know it is possible to do that through software side setting and unsetting RTS signal.
I tried some code from the QNX Help, that changes RTS signal status. It works OK. So i can configure the port as a receiver and each time i want to send i change RTS, send data and change RTS again.
I would like to be able to send without taking care of RTS signal. So i thought of listening on the port IRQ. So i attached an ISR to this IRQ. The problem is that if a write something on the port while the port is configured as a receiver, the interrupt doesn’t appear.
Here is my question (finally): is there a way to know when somebody in writing on the port ? Is there a software interrupt for that ? I also tried to read the registers of the port with the function ‘in8s’ but i obtained bad values. I wouldn’t be using this function correctly ???
ThreadCtl(_NTO_TCTL_IO, NULL);
port = mmap_device_io(7, 0x2f8);
in8s(buf, 4, port); // i just want the 4 first registers
Well can somebody help me with that ?
Thx,