RS232 is full-duplex (independent Tx and Rx lines) and is used for
point-to-point connections. RS485 commonly uses a shared data line
and multi-drop topologies. To support this, there must be a
mechanism at the driver level to gate the transmitter for each
node, and a protocol to select which node can transmit at any given
time.
The IOSerialDriverSync & related classes assume a full-duplex point-
to-point communication channel, and don't have any built-in
capabilities regarding line turnaround. You should in theory be
able to implement this control protocol in your driver, such that
the superclasses don't need to know or care about the line control
(when it isn't your turn to talk, act as if you are flow-controlled
off).
This is what I've seen. A node's TX driver is controlled directly by
a UART pin such that when the UART has bits going out it drives the
bus. When it doesn't, it listens to that same bus. It handles the pre/
post TX enable timing for you based solely on there being bits going
out.
This means that the logical client (the presumably user-land software
that's sending and receiving the bytes) must somehow "agree" with the
other node(s) on the bus so they take turns transmitting. It doesn't
have to be modeled as as hardware flow-control IF there is some
agreement about who has the TX "token" and how it's passed logically
between nodes. This is was I was referring to when I mentioned a
simple request/response protocol. That makes it clear who's turn it
is to TX.
Because there's only one data pair this is true even if it's just a
point-to-point link between two nodes.
If your RS485 link is wired as a full-duplex point-to-point link,
then your driver should probably work as-is, unless you need
something extra to enable the transmitters.
I do not believe this is physically possible. RS485 is by definition
a "shared pair" medium that thus must be half-duplex. RS422 is the
differential analog of RS232 and has 2 data pairs. I believe that
"full-duplex RS485" is a contradiction in terms even for just 2 devices.