pub unsafe extern "C" fn SerialPort_create(
interfaceName: *const c_char,
baudRate: c_int,
dataBits: u8,
parity: c_char,
stopBits: u8,
) -> SerialPortExpand description
Create a new SerialPort instance
§Arguments
interfaceName- identifier or name of the serial interface (e.g. “/dev/ttyS1” or “COM4”)baudRate- the baud rate in baud (e.g. 9600)dataBits- the number of data bits (usually 8)parity- defines what kind of parity to use (‘E’ - even parity, ‘O’ - odd parity, ‘N’ - no parity)stopBits- the number of stop buts (usually 1)
§Returns
the new SerialPort instance