Function pros_sys::serial::serial_write_byte
source · pub unsafe extern "C" fn serial_write_byte(
port: u8,
buffer: u8
) -> i32Expand description
Write the given byte to the port’s output buffer.
\note Data in the port’s output buffer is written to the serial port as soon as possible on a FIFO basis and can not be done manually by the user.
This function uses the following values of errno when an error state is reached: EINVAL - The given value is not within the range of V5 ports (1-21). EACCES - Another resource is currently trying to access the port. EIO - Serious internal write error.
\param port The V5 port number from 1-21 \param buffer The byte to write
\return The number of bytes written or PROS_ERR if the operation failed, setting errno.