1 5. Synchronous api
Felipe Herranz edytuje tę stronę 2018-11-18 20:41:27 +01:00

Synchronous api example

Remember to check the examplesync module for a complete example using the synchronous api

Use

UsbSerial also allows to use it in a synchronous way.

public boolean syncOpen();
public int syncWrite(byte[] buffer, int timeout) // Blocking operation
public int syncRead(byte[] buffer, int timeout) // Blocking operation
public void syncClose();

Flow control is also performed in the same way that the Asynchronous api.

Supported baud rates

300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600