uasyncio - block uart.write when reading.

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
prem111
Posts: 127
Joined: Sun Feb 23, 2020 3:18 pm

uasyncio - block uart.write when reading.

Post by prem111 » Sat Apr 30, 2022 9:53 pm

Hi. Is it possible to prevent writing to uart when data is read? in two separate threads (one for read, one for write)

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: uasyncio - block uart.write when reading.

Post by pythoncoder » Sun May 01, 2022 9:41 am

You could use a Lock - see also this ref.
Peter Hinch
Index to my micropython libraries.

Post Reply