Skip to content
Snippets Groups Projects
  1. May 17, 2019
  2. Mar 08, 2019
  3. Feb 13, 2019
  4. Oct 23, 2018
  5. Sep 27, 2018
  6. Jul 08, 2018
    • Damien George's avatar
      py/objmodule: Make mp_obj_module_get_globals an inline function. · 4cd853fb
      Damien George authored
      Because this function is simple it saves code size to have it inlined.
      Being an auxiliary helper function (and only used in the py/ core) the
      argument should always be an mp_obj_module_t*, so there's no need for the
      assert (and having it would require including assert.h in obj.h).
      4cd853fb
  7. Jun 27, 2018
    • Paul Sokolovsky's avatar
      extmod/moducryptolib: Add ucryptolib module with crypto functions. · 567bc2d6
      Paul Sokolovsky authored
      The API follows guidelines of https://www.python.org/dev/peps/pep-0272/,
      but is optimized for code size, with the idea that full PEP 0272
      compatibility can be added with a simple Python wrapper mode.
      
      The naming of the module follows (u)hashlib pattern.
      
      At the bare minimum, this module is expected to provide:
      
      * AES128, ECB (i.e. "null") mode, encrypt only
      
      Implementation in this commit is based on axTLS routines, and implements
      following:
      
      * AES 128 and 256
      * ECB and CBC modes
      * encrypt and decrypt
      567bc2d6
  8. Feb 20, 2018
  9. Oct 04, 2017
    • Damien George's avatar
      all: Remove inclusion of internal py header files. · a3dc1b19
      Damien George authored
      Header files that are considered internal to the py core and should not
      normally be included directly are:
          py/nlr.h - internal nlr configuration and declarations
          py/bc0.h - contains bytecode macro definitions
          py/runtime0.h - contains basic runtime enums
      
      Instead, the top-level header files to include are one of:
          py/obj.h - includes runtime0.h and defines everything to use the
              mp_obj_t type
          py/runtime.h - includes mpstate.h and hence nlr.h, obj.h, runtime0.h,
              and defines everything to use the general runtime support functions
      
      Additional, specific headers (eg py/objlist.h) can be included if needed.
      a3dc1b19
  10. Jul 31, 2017
  11. Jan 26, 2017
  12. Jan 22, 2017
  13. Dec 21, 2016
    • Paul Sokolovsky's avatar
      extmod/modutimeq: Refactor into optimized class. · d02f6a99
      Paul Sokolovsky authored
          import utimeq, utime
          # Max queue size, the queue allocated statically on creation
          q = utimeq.utimeq(10)
          q.push(utime.ticks_ms(), data1, data2)
          res = [0, 0, 0]
          # Items in res are filled up with results
          q.pop(res)
      d02f6a99
  14. Nov 20, 2016
  15. Sep 21, 2016
  16. Jun 28, 2016
  17. Jun 14, 2016
  18. May 10, 2016
  19. May 02, 2016
  20. Apr 28, 2016
    • Paul Sokolovsky's avatar
      extmod/modwebrepl: Module to handle WebREPL protocol. · 25d0f7d5
      Paul Sokolovsky authored
      While just a websocket is enough for handling terminal part of WebREPL,
      handling file transfer operations requires demultiplexing and acting
      upon, which is encapsulated in _webrepl class provided by this module,
      which wraps a websocket object.
      25d0f7d5
  21. Apr 12, 2016
  22. Mar 24, 2016
  23. Jan 17, 2016
  24. Dec 12, 2015
  25. Dec 06, 2015
  26. Dec 04, 2015
  27. Nov 29, 2015
  28. Oct 26, 2015
  29. Oct 12, 2015
  30. Oct 06, 2015
  31. May 04, 2015
  32. Apr 16, 2015
    • Damien George's avatar
    • 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
  33. Apr 11, 2015
  34. Mar 20, 2015
    • Paul Sokolovsky's avatar
      py: Implement core of OrderedDict type. · 0ef01d0a
      Paul Sokolovsky authored
      Given that there's already support for "fixed table" maps, which are
      essentially ordered maps, the implementation of OrderedDict just extends
      "fixed table" maps by adding an "is ordered" flag and add/remove
      operations, and reuses 95% of objdict code, just making methods tolerant
      to both dict and OrderedDict.
      
      Some things are missing so far, like CPython-compatible repr and comparison.
      
      OrderedDict is Disabled by default; enabled on unix and stmhal ports.
      0ef01d0a
Loading