sub_rs_set_config |
Top Previous Next |
Got to SUB-20 page |
Synopsis int sub_rs_set_config( sub_handle hndl, int config, int baud)
Configure SUB-20 UART (Universal Asynchronous Receiver Transmitter). Parameters •config - UART configuration. Config should be assembled as a combination of the following flags
To disable UART provide configuration without RS_RX_ENABLE and RS_TX_ENABLE.
•baud - Desired baudrate. Maximum baudrate is 2Mbps. The actual baudrate may slightly differ from the desired as actual baudrate is an integer quotient from dividing the 16MHz reference clock. Return value On success function returns 0. Otherwise error code. Example /* Set 9660 bps, 8 data bits, no parity, 1 stop bit */ sub_rs_set_config( hndl, RS_RX_ENABLE|RS_TX_ENABLE|RS_CHAR_8|RS_PARITY_NONE|RS_STOP_1, 9600 );
|