1. 14 Nov, 2015 1 commit
    • Paul Sokolovsky's avatar
      stmhal/modmachine: Initial attempt to add I2C & SPI classes. · 16d42368
      Paul Sokolovsky authored
      In new hardware API, these classes implement master modes of interfaces,
      and "mode" parameter is not accepted. Trying to implement new HW API
      in terms of older pyb module leaves variuos corner cases:
      In new HW API, I2C(1) means "I2C #1 in master mode" (? depends on
      interpretation), while in old API, it means "I2C #1, with no settings
      For I2C class, it's easy to make mode optional, because that's last
      positional param, but for SPI, there's "baudrate" after it (which
      is inconsistent with I2C, which requires "baudrate" to be kwonly-arg).
  2. 31 Oct, 2015 1 commit
    • Damien George's avatar
      all: Add py/mphal.h and use it in all ports. · 731f3592
      Damien George authored
      py/mphal.h contains declarations for generic mp_hal_XXX functions, such
      as stdio and delay/ticks, which ports should provide definitions for.  A
      port will also provide mphalport.h with further HAL declarations.
  3. 30 Oct, 2015 1 commit
  4. 19 Oct, 2015 2 commits
  5. 07 Aug, 2015 1 commit
  6. 05 Aug, 2015 2 commits
  7. 29 Jul, 2015 2 commits
  8. 22 Mar, 2015 2 commits
  9. 04 Mar, 2015 2 commits
  10. 13 Feb, 2015 2 commits
  11. 21 Jan, 2015 1 commit
  12. 07 Jan, 2015 1 commit
  13. 01 Jan, 2015 1 commit
  14. 27 Dec, 2014 1 commit
  15. 08 Dec, 2014 1 commit
  16. 30 Nov, 2014 1 commit
  17. 29 Nov, 2014 1 commit
  18. 02 Nov, 2014 1 commit
  19. 22 Oct, 2014 1 commit
  20. 09 Oct, 2014 1 commit
  21. 05 Oct, 2014 2 commits
  22. 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.
  23. 02 Oct, 2014 1 commit
  24. 28 Sep, 2014 1 commit
  25. 25 Aug, 2014 3 commits
  26. 16 Aug, 2014 1 commit
  27. 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.
  28. 20 Jul, 2014 1 commit
  29. 03 Jul, 2014 1 commit
  30. 19 Jun, 2014 1 commit