Skip to content

5. Synchronous api

Felipe Herranz edited this page Nov 18, 2018 · 1 revision

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

Clone this wiki locally