class jumper.jemu_uart.JemuUart(uart_device_path, vlab)

Represents a UART device.

Returns:data available on the UART device. Returns an empty bytes string if no data is available.

Reads a single line from UART.

Parameters:line_separator – Substring for separating lines. Usually b’\r\n’ or b’\n’
Returns:A byte string of data read from the device, including line_separator
wait_until_uart_receives(data, timeout=None)

Blocks until specified data is received on UART. If the device is paused, this function will continue the execution and will pause the device when the data is ready or timeout occured. If the device is running, the function will not pause the device.

  • data – Expected bytes string.
  • timeout – Emulation time specified in milliseconds. jumper.vlab.TimeoutException is raised if timeout occurred before data was available in the buffer.

The data available on in the UART buffer when the specified data was received. Note that this can be more than the data provided in the data parameter.


Writes data to UART

Parameters:data – Data to write