User`s manual

BL1600 System Development s 55
void replyOpto22( char *reply, byte count,
int delays )
The slave replies to the masters inquiry. The function puts the reply in
the following format.
[count+2] [ ] [ ]...[ ] [CRC hi] [CRC lo]
PARAMETERS: reply is the slaves reply string.
count is the length of the reply not including the two CRC bytes.
Because two CRC bytes are appended at the end, the longest reply is
252 bytes.
delays is the number of delays before the message is transmitted
back. Each delay is ~50 ms when the real-time kernel (RTK) is used.
If the RTK is not used, the software-generated delay is approximately
50 ms. The delay is implemented with suspend() if the RTK is used.
Otherwise, the delay is a software countdown delay.
Miscellaneous RS-485 Network Functions
void misticware( char *tbuf, char count )
Gateway for RS-485 9th-bit binary communication. The receive buffer
and the transmit buffer must be already set up, and interrupt-driven
transmission must already be initialized.
PARAMETERS: tbuf is the transmit buffer. Data in the buffer should
already be in the correct format.
count is the number of bytes to be transmitted.
void optodelay()
Produces a delay of ~50 ms. The delay is implemented with suspend()
if the real-time kernel is used. Otherwise, the delay is a software
countdown delay.
int rbuf
_
there()
Monitors the receive buffer for a completed command or reply.
RETURN VALUE:
1 if a completed command or reply is available.
0 if a completed command or reply is not available.
void op
_
send
_
z1( char *tbuf, byte count )
Is called by misticware() to initiate transmission of data.
void op
_
rec
_
z1()
Is called by misticware() to reset and to ready the receiver for data
reception.