write

open override fun write(data: ByteArray?, length: Int): Int

Write data to the serial communication port. Timeout default 3 seconds.

Return

int - Number of bytes written.

Parameters

data

Write buffer.

length

Length to read.


open override fun write(data: ByteArray?, length: Int, timeout: Int): Int

Write data to the serial communication port.

Return

int - Number of bytes written.

Parameters

data

Write buffer.

length

Length to read.

timeout

Timeout for the write operation. Default 3 seconds.