Damien George 9a41b32b3f 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))
2014-10-31 00:12:02 +00:00
..
2014-03-11 23:55:41 -07:00
2014-09-27 19:40:37 -07:00
2014-05-02 23:03:23 +01:00
2014-10-30 23:16:05 +00:00
2014-10-02 17:32:02 +01:00
2014-07-19 16:39:13 +01:00
2014-03-12 18:15:55 -07:00
2014-10-02 14:51:17 +01:00
2014-10-05 21:51:54 +01:00
2014-06-15 00:41:47 +01:00
2014-06-15 22:48:05 -07:00
2014-10-20 00:04:27 +01:00
2014-10-24 11:19:01 +00:00
2014-06-02 21:43:02 +02:00