1. 21 May, 2017 1 commit
  2. 10 Apr, 2017 1 commit
    • Paul Sokolovsky's avatar
      extmod/machine_signal: Support all Pin's arguments to the constructor. · 605ff91e
      Paul Sokolovsky authored
      This implements the orginal idea is that Signal is a subclass of Pin, and
      thus can accept all the same argument as Pin, and additionally, "inverted"
      param. On the practical side, it allows to avoid many enclosed parenses for
      a typical declararion, e.g. for Zephyr:
      
      Signal(Pin(("GPIO_0", 1))).
      
      Of course, passing a Pin to Signal constructor is still supported and is the
      most generic form (e.g. Unix port will only support such form, as it doesn't
      have "builtin" Pins), what's introduces here is just practical readability
      optimization.
      
      "value" kwarg is treated as applying to a Signal (i.e. accounts for possible
      inversion).
      605ff91e
  3. 21 Mar, 2017 2 commits
  4. 20 Mar, 2017 3 commits
  5. 29 Jan, 2017 1 commit
  6. 04 Jan, 2017 1 commit
  7. 05 Nov, 2016 1 commit
  8. 10 Aug, 2016 2 commits
  9. 26 May, 2016 1 commit
  10. 03 May, 2016 3 commits
  11. 25 Apr, 2016 1 commit
  12. 22 Apr, 2016 1 commit
    • Damien George's avatar
      esp8266: Convert mp_hal_pin_obj_t from pin ptr to simple integer. · a2d5d84e
      Damien George authored
      Most pin I/O can be done just knowing the pin number as a simple
      integer, and it's more efficient this way (code size, speed) because it
      doesn't require a memory lookup to get the pin id from the pin object.
      
      If the full pin object is needed then it can be easily looked up in the
      pin table.
      a2d5d84e
  13. 14 Apr, 2016 3 commits
  14. 24 Mar, 2016 1 commit
  15. 05 Mar, 2016 3 commits
  16. 11 Jan, 2016 1 commit
    • Damien George's avatar
      py: Change first arg of type.make_new from mp_obj_t to mp_obj_type_t*. · 5b3f0b7f
      Damien George authored
      The first argument to the type.make_new method is naturally a uPy type,
      and all uses of this argument cast it directly to a pointer to a type
      structure.  So it makes sense to just have it a pointer to a type from
      the very beginning (and a const pointer at that).  This patch makes
      such a change, and removes all unnecessary casting to/from mp_obj_t.
      5b3f0b7f
  17. 30 May, 2015 1 commit
    • Josef Gajdusek's avatar
      esp8266: Update to SDK version 1.1.0 (MIT-licensed). · 7d8edeff
      Josef Gajdusek authored
      1. Updated linker script, now user app appears to contain exception vector
      table and oesn't work (faults) without it.
      2. Commened out support for GPIO pulldown, which was removed in this SDK
      version without clear explanation, but apparently because it was released
      without proper validation, and now turns out it doesn't work as expected,
      or there's a different function there.
      7d8edeff
  18. 16 Apr, 2015 1 commit
    • Damien George's avatar
      py: Overhaul and simplify printf/pfenv mechanism. · 7f9d1d6a
      Damien George authored
      Previous to this patch the printing mechanism was a bit of a tangled
      mess.  This patch attempts to consolidate printing into one interface.
      
      All (non-debug) printing now uses the mp_print* family of functions,
      mainly mp_printf.  All these functions take an mp_print_t structure as
      their first argument, and this structure defines the printing backend
      through the "print_strn" function of said structure.
      
      Printing from the uPy core can reach the platform-defined print code via
      two paths: either through mp_sys_stdout_obj (defined pert port) in
      conjunction with mp_stream_write; or through the mp_plat_print structure
      which uses the MP_PLAT_PRINT_STRN macro to define how string are printed
      on the platform.  The former is only used when MICROPY_PY_IO is defined.
      
      With this new scheme printing is generally more efficient (less layers
      to go through, less arguments to pass), and, given an mp_print_t*
      structure, one can call mp_print_str for efficiency instead of
      mp_printf("%s", ...).  Code size is also reduced by around 200 bytes on
      Thumb2 archs.
      7f9d1d6a
  19. 13 Feb, 2015 1 commit