
------------------------------------------------------------------------------
7. Test or clear transmit/receive buffer <Main,Alarm,Comm>
------------------------------------------------------------------------------
[Name]
rs_buffer
[Syntax]
#include <bios.h>
int rs_buffer( int channel, int cmnd ) ;
[Argument]
channel Channel number ( = 1, 2 )
cmnd buffer command
[Return]
If successful;
RS_GET_BUF_R, RS_GET_BUF_W commands return buffer size,
RS_CHK_BUF_R, RS_CHK_BUF_W commands return data size in the buffer
RS_CLR_BUF_R, RS_CLR_BUF_W commands return zero.
Returns "-1", if any error.
[Description]
Tests or clears the specified buffer of the specified channel.
Select the communication channel (1 or 2) by the argument "channel".
Specify following buffer command in the argument "cmnd".
cmnd function
---------------+-----------------------------------
RS_GET_BUF_R return receive buffer size
RS_GET_BUF_W return transmit buffer size
RS_CHK_BUF_R return data size in receive buffer
RS_CHK_BUF_W return data size in transmit buffer
RS_CLR_BUF_R clear receive buffer
RS_CLR_BUF_W clear transmit buffer