
Function Reference
------------------------------------------------------------------------------
1. Initialize communication channel <Main,Alarm,Comm>
------------------------------------------------------------------------------
[Name]
rs_open
[Syntax]
#include <bios.h>
int rs_open( int channel, ser_t *param, char *mode ) ;
struct RS_PACKET {
unsigned baud ; /* baud rate */
unsigned stop_bit ; /* stop bit length */
unsigned parity ; /* parity check */
unsigned data_bit ; /* character length */
unsigned hardflow ; /* hardware flow ctrl */
unsigned dc_enable ; /* DC code flow ctrl */
unsigned dc_put ; /* send DC code */
unsigned dc1_code ; /* DC1 code */
unsigned dc2_code ; /* DC2 code */
unsigned dc3_code ; /* DC3 code */
unsigned dc4_code ; /* DC4 code */
} ;
typedef struct RS_PACKET ser_t ;
[Argument]
channel channel number ( = 1, 2 )
param communication parameter
mode communication mode
[Return]
Returns zero if successful. If any error, returns non-zero value.
[Description]
Specified communication channel is initialized with specified
condition and opened for data transmission.
Specify channel number, 1 or 2, by the argument "channel".