diff options
author | Damien George <damien.p.george@gmail.com> | 2014-10-31 00:12:02 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-10-31 00:12:02 +0000 |
commit | 9a41b32b3f58246cbe69db237877775b4d2fe920 (patch) | |
tree | e77af30b8e341f38cfaf1fd6ca4055384cbc0ebf /docs/tutorial/fading_led.rst | |
parent | efc49c5591d23f606a2e6203f9b4e4976aa3e6e3 (diff) | |
download | micropython-9a41b32b3f58246cbe69db237877775b4d2fe920.tar.gz micropython-9a41b32b3f58246cbe69db237877775b4d2fe920.zip |
stmhal: Add ioctl to USB_VCP object, so it works with select.
This patch also enables non-blocking streams on stmhal port.
One can now make a USB-UART pass-through function:
def pass_through(usb, uart):
while True:
select.select([usb, uart], [], [])
if usb.any():
uart.write(usb.read(256))
if uart.any():
usb.write(uart.read(256))
pass_through(pyb.USB_VCP(), pyb.UART(1, 9600))
Diffstat (limited to 'docs/tutorial/fading_led.rst')
0 files changed, 0 insertions, 0 deletions