1. 27 Nov, 2014 1 commit
  2. 31 Oct, 2014 1 commit
    • Damien George's avatar
      stmhal: Add ioctl to USB_VCP object, so it works with select. · 9a41b32b
      Damien George authored
      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():
              if uart.any():
      pass_through(pyb.USB_VCP(), pyb.UART(1, 9600))
  3. 26 Oct, 2014 1 commit
    • Damien George's avatar
      stmhal: Improve REPL control codes; improve pyboard.py script. · bc1488a0
      Damien George authored
      Improvements are:
      2 ctrl-C's are now needed to truly kill running script on pyboard, so
      make CDC interface allow multiple ctrl-C's through at once (ie sending
      b'\x03\x03' to pyboard now counts as 2 ctrl-C's).
      ctrl-C in friendly-repl can now stop multi-line input.
      In raw-repl mode, use ctrl-D to indicate end of running script, and also
      end of any error message.  Thus, output of raw-repl is always at least 2
      ctrl-D's and it's much easier to parse.
      pyboard.py is now a bit faster, handles exceptions from pyboard better
      (prints them and exits with exit code 1), prints out the pyboard output
      while the script is running (instead of waiting till the end), and
      allows to follow the output of a previous script when run with no
  4. 25 Oct, 2014 1 commit
    • Damien George's avatar
      py: Add mp_pending_exception global variable, for VM soft interrupt. · 124df6f8
      Damien George authored
      This allows to implement KeyboardInterrupt on unix, and a much safer
      ctrl-C in stmhal port.  First ctrl-C is a soft one, with hope that VM
      will notice it; second ctrl-C is a hard one that kills anything (for
      both unix and stmhal).
      One needs to check for a pending exception in the VM only for jump
      opcodes.  Others can't produce an infinite loop (infinite recursion is
      caught by stack check).
  5. 31 Jul, 2014 1 commit
    • Damien George's avatar
      stmhal: Add USB_VCP class/object, for direct USB VCP control. · 3c4db9f9
      Damien George authored
      Before, pyb.stdin/pyb.stdout allowed some kind of access to the USB VCP
      device, but it was basic access.
      This patch adds a proper USB_VCP class and object with much more control
      over the USB VCP device.  Create an object with pyb.USB_VCP(), then use
      this object as if it were a UART object.  It has send, recv, read,
      write, and other methods.  send and recv allow a timeout to be specified.
      Addresses issue 774.
  6. 10 May, 2014 1 commit
  7. 03 May, 2014 1 commit
    • Damien George's avatar
      Add license header to (almost) all files. · 04b9147e
      Damien George authored
      Blanket wide to all .c and .h files.  Some files originating from ST are
      difficult to deal with (license wise) so it was left out of those.
      Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
  8. 16 Apr, 2014 3 commits
  9. 14 Apr, 2014 1 commit
  10. 13 Apr, 2014 1 commit
  11. 30 Mar, 2014 1 commit
    • Damien George's avatar
      stmhal: Implement selector for USB device mode; improve boot up. · 038df431
      Damien George authored
      Can now choose at boot up whether the USB device is CDC+MSC or CDC+HID.
      Choice is made by an option in boot.py, with default being CDC+MSC.
      HID+MSC is not currently supported, but should be easy to implement.
      Boot up now has ability to change the reset mode: hold down USR switch
      while booting and LEDs will count from 1 to 7 to indicate the boot mode.
      Release USR when correct mode is selected.  Current modes are 1 (normal
      boot), 2 (safe mode), 3 (reset FS mode).
  12. 24 Mar, 2014 1 commit
  13. 23 Mar, 2014 1 commit
    • Damien George's avatar
      stmhal: Fix issues with USB CDC init and receive. · f357a192
      Damien George authored
      Late USB enumeration could clear settings after they had been set.
      Now fixed by not clearing some settings on init.
      RX was blocking if received characters were not being processed, so
      CTRL-C would not be picked up.  Now "fixed" by not blocking, but
      instead discarding incoming characters if they overflow the buffer.
  14. 22 Mar, 2014 4 commits
  15. 15 Mar, 2014 4 commits
  16. 14 Mar, 2014 1 commit