Code: Select all
If OpenSerialPort(0, "/dev/ttyUSB0", 115200, #PB_SerialPort_NoParity, 8, 1, #PB_SerialPort_NoHandshake, 1024, 1024)
SerialPortTimeouts(Port, 10000, 10000, 200, 1000, 10000)
t=ElapsedMilliseconds()
ReadSerialPortData(0, @x, 1)
Debug ElapsedMilliseconds()-t
EndIf