1. 01 Jan, 2015 1 commit
  2. 27 Dec, 2014 1 commit
  3. 08 Dec, 2014 1 commit
  4. 30 Nov, 2014 1 commit
  5. 29 Nov, 2014 1 commit
  6. 02 Nov, 2014 1 commit
  7. 22 Oct, 2014 1 commit
  8. 09 Oct, 2014 1 commit
  9. 05 Oct, 2014 2 commits
  10. 04 Oct, 2014 1 commit
    • Damien George's avatar
      stmhal: Allow pyb.freq() function to change SYSCLK frequency. · 24119176
      Damien George authored
      Eg pyb.freq(120000000) sets the CPU to 120MHz.  The frequency can be set
      at any point in the code, and can be changed as many times as you like.
      Note that any active timers will need to be reconfigured after a freq
      Valid range is 24MHz to 168MHz (but not all freqs are supported).  The
      code maintains a 48MHz clock for the USB at all times and it's possible
      to change the frequency at a USB REPL and keep the REPL alive (well,
      most of the time it stays, sometimes it resets the USB for some reason).
      Note that USB does not work with pyb.freq of 24MHz.
  11. 02 Oct, 2014 1 commit
  12. 28 Sep, 2014 1 commit
  13. 25 Aug, 2014 3 commits
  14. 16 Aug, 2014 1 commit
  15. 31 Jul, 2014 2 commits
    • Damien George's avatar
      stmhal: Change 0:/ and 1:/ to /flash and /sd; add CWD support. · 65dd7bc1
      Damien George authored
      Some important changes to the way the file system is structured on the
      1. 0: and 1: drive names are now replaced with POSIX inspired
      directories, namely /flash and /sd.
      2. Filesystem now supports the notion of a current working directory.
      Supports the standard Python way of manipulating it: os.chdir and
      3. On boot up, current directory is /flash if no SD inserted, else /sd
      if SD inserted.  Then runs boot.py and main.py from the current dir.
      This is the same as the old behaviour, but is much more consistent and
      flexible (eg you can os.chdir in boot.py to change where main.py is run
      4. sys.path (for import) is now set to '' (current dir), plus /flash
      and /flash/lib, and then /sd and /sd/lib if SD inserted.  This, along
      with CWD, means that import now works properly.  You can import a file
      from the current directory.
      5. os.listdir is fixed to return just the basename, not the full path.
      See issue #537 for background and discussion.
    • 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.
  16. 20 Jul, 2014 1 commit
  17. 03 Jul, 2014 1 commit
  18. 19 Jun, 2014 1 commit
  19. 15 Jun, 2014 1 commit
    • Damien George's avatar
      stmhal: Add Python function to set UART for REPL. · 25479281
      Damien George authored
      This adds a hook to get/set pyb_uart_global_debug from Python, using
      pyb.repl_uart().  You can set it to an arbitrary UART object, and then
      the REPL (in and out) is repeated on this UART object (as well as on USB
      Ultimately, this will be replaced with a proper Pythonic interface to
      set sys.stdin and sys.stdout.
  20. 14 Jun, 2014 1 commit
  21. 08 Jun, 2014 1 commit
  22. 21 May, 2014 1 commit
  23. 19 May, 2014 1 commit
  24. 18 May, 2014 2 commits
  25. 08 May, 2014 1 commit
  26. 05 May, 2014 1 commit
  27. 03 May, 2014 3 commits
  28. 29 Apr, 2014 1 commit
    • Damien George's avatar
      stmhal: Add documentation in comments, and script to generate HTML. · 8d09640b
      Damien George authored
      Decided to write own script to pull documentation from comments in C code.
      Style for writing auto generated documentation is: start line with ///
      and then use standard markdown to write the comment.  Keywords
      recognised by the scraper begin with backslash.  See code for examples.
      Running: python gendoc.py modpyb.c accel.c adc.c dac.c extint.c i2c.c
      led.c pin.c rng.c servo.c spi.c uart.c usrsw.c, will generate a HTML
      structure in gendoc-out/.
      gendoc.py is crude but functional.  Needed something quick, and this was
  29. 26 Apr, 2014 1 commit
  30. 21 Apr, 2014 3 commits
    • Damien George's avatar
      stmhal: Make switch a class, to follow suit of all other modules. · 6125ba4a
      Damien George authored
      Instead of pyb.switch() as a function, it's more consistent (with
      respect to all the other modules and peripherals) to have
      pyb.Switch() create a switch object.  This then generalises to having
      multiple switches.  Call the object to get its state.  Use sw.callback
      to set the callback function for when the switch is pressed.
    • Damien George's avatar
      stmhal: Add Timer class: simple TIM control, incl callback on IRQ. · 7fdfa937
      Damien George authored
      Simple but functional timer control.  More sophistication will
      eventually be added, or for now just use direct register access :)
      Also added pyb.freq() function to get MCU clock frequencies.
    • Damien George's avatar
      stmhal: Rename USART to UART. · 75337003
      Damien George authored
      It's really a UART because there is no external clock line (and hence no
      synchronous ability, at least in the implementation of this module).
      USART should be reserved for a module that has "S"ynchronous capabilities.
      Also, UART is shorter and easier to type :)
  31. 19 Apr, 2014 1 commit