def run_uart_to_uart(): device = GlasgowDevice() assembly = HardwareAssembly(device=device) uart_a = UARTInterface(assembly, pin_rx="A2", pin_tx="A3") uart_b = UARTInterface(assembly, pin_rx="B0", pin_tx="B1") async def launch(): async with assembly: await device.set_voltage("AB", 3.3) await uart_a.set_baud(9600) await uart_b.set_baud(9600) await uart_a.write(b"Hello!") await uart_a.flush() assert (await uart_b.read(6)) == b"Hello!" assert (await uart_b.statistics())["rx_errors"] == 0 asyncio.run(launch())