1. 12 Oct, 2014 1 commit
    • Damien George's avatar
      stmhal: Enable module weak links. · 0107e903
      Damien George authored
      os, time, select modules are now prefixed with u, but are still
      available (via weak links) as their original names.
      ure and ujson now available as re and json via weak links.
  2. 11 Oct, 2014 1 commit
  3. 30 Sep, 2014 1 commit
    • Damien George's avatar
      stmhal: Add network and usocket module. · 3a1c4c5b
      Damien George authored
      As per issue #876, the network module is used to configure NICs
      (hardware modules) and configure routing.  The usocket module is
      supposed to implement the normal Python socket module and selects the
      underlying NIC using routing logic.
      Right now the routing logic is brain dead: first-initialised,
      first-used.  And the routing table is just a list of registered NICs.
      cc3k and wiznet5k work, but not at the same time due to C name clashes
      (to be fixed).
      Note that the usocket module has alias socket, so that one can import
      socket and it works as normal.  But you can also override socket with
      your own module, using usocket at the backend.
  4. 25 Sep, 2014 1 commit
  5. 17 Sep, 2014 1 commit
  6. 07 Sep, 2014 2 commits
  7. 01 Sep, 2014 1 commit
    • Damien George's avatar
      stmhal: Add wiznet5k module, to control WIZnet ethernet adaptor. · bcf041f1
      Damien George authored
      Allows to create socket objects that support TCP and UDP in server and
      client mode.  Interface is very close to standard Python socket class,
      except bind and accept do not work the same (due to hardware not
      supporting them in the usual way).
      Not compiled by default.  To compile this module, use:
      make MICROPY_PY_WIZNET5K=1
  8. 25 Aug, 2014 2 commits
    • Damien George's avatar
      stmhal: Make enable_irq and disable_irq inline functions. · e5cbb703
      Damien George authored
      These functions are generally 1 machine instruction, and are used in
      critical code, so makes sense to have them inline.
      Also leave these functions uninverted (ie 0 means enable, 1 means
      disable) and provide macro constants if you really need to distinguish
      the states.  This makes for smaller code as well (combined with
      Applied to teensy port as well.
    • Dave Hylands's avatar
      Add save/restore_irq · 9480138f
      Dave Hylands authored
      Factored irq functions into a separate file.
  9. 24 Aug, 2014 1 commit
  10. 12 Aug, 2014 2 commits
  11. 25 Jul, 2014 1 commit
    • Dave Hylands's avatar
      Add support for storing args during an exception raised by an irq. · 5b7fd20f
      Dave Hylands authored
      The user code should call micropython.alloc_emergency_exception_buf(size)
      where size is the size of the buffer used to print the argument
      passed to the exception.
      With the test code from #732, and a call to
      micropython.alloc_emergenncy_exception_buf(100) the following error is
      now printed:
      >>> import heartbeat_irq
      Uncaught exception in Timer(4) interrupt handler
      Traceback (most recent call last):
        File "0://heartbeat_irq.py", line 14, in heartbeat_cb
      NameError: name 'led' is not defined
  12. 19 Jul, 2014 1 commit
    • Damien George's avatar
      py: Add stream reading of n unicode chars; unicode support by default. · 1694bc73
      Damien George authored
      With unicode enabled, this patch allows reading a fixed number of
      characters from text-mode streams; eg file.read(5) will read 5 unicode
      chars, which can made of more than 5 bytes.
      For an ASCII stream (ie no chars > 127) it only needs to do 1 read.  If
      there are lots of non-ASCII chars in a stream, then it needs multiple
      reads of the underlying object.
      Adds a new test for this case.  Enables unicode support by default on
      unix and stmhal ports.
  13. 03 Jul, 2014 1 commit
  14. 28 Jun, 2014 1 commit
  15. 16 Jun, 2014 1 commit
  16. 11 Jun, 2014 1 commit
  17. 08 Jun, 2014 1 commit
  18. 01 Jun, 2014 1 commit
    • Damien George's avatar
      Rename bultins config variables to MICROPY_PY_BUILTINS_*. · fb510b3b
      Damien George authored
      This renames:
      See issue #35 for discussion.
  19. 24 May, 2014 1 commit
  20. 21 May, 2014 1 commit
    • Damien George's avatar
      Tidy up some configuration options. · 58ebde46
      Damien George authored
      See issue #35.
  21. 11 May, 2014 2 commits
  22. 10 May, 2014 1 commit
  23. 03 May, 2014 3 commits
  24. 17 Apr, 2014 1 commit
  25. 13 Apr, 2014 2 commits
  26. 10 Apr, 2014 1 commit
    • Damien George's avatar
      stmhal: Add stm module, which contains some constants for the MCU. · 3f489845
      Damien George authored
      Also contains raw memory read/write functions, read8, read16, read32,
      write8, write16, write32.  Can now do:
      stm.write16(stm.GPIOA + stm.GPIO_BSRRL, 1 << 13)
      This turns on the red LED.
      With the new constant folding, the above constants for the GPIO address
      are actually compiled to constants (and the addition done) at compile
      time.  For viper code and inline assembler, this optimisation will make
      a big difference.  In the inline assembler, using these constants would
      not be possible without this constant folding.
  27. 05 Apr, 2014 2 commits
  28. 25 Mar, 2014 1 commit
  29. 24 Mar, 2014 1 commit
  30. 22 Mar, 2014 1 commit
  31. 17 Mar, 2014 1 commit
  32. 15 Mar, 2014 1 commit