1. 05 Aug, 2015 1 commit
  2. 26 Jul, 2015 1 commit
  3. 14 Jul, 2015 1 commit
    • Paul Sokolovsky's avatar
      unix: modsocket: Implement inet_pton() in preference of inet_aton(). · c48740e2
      Paul Sokolovsky authored
      inet_pton supports both ipv4 and ipv6 addresses. Interface is also extensible
      for other address families, but underlying libc inet_pton() function isn't
      really extensible (e.g., it doesn't return length of binary address, i.e. it's
      really hardcoded to AF_INET and AF_INET6). But anyway, on Python side, we could
      extend it to support other addresses.
      c48740e2
  4. 13 Jul, 2015 1 commit
  5. 12 Jul, 2015 1 commit
    • Paul Sokolovsky's avatar
      unix: modsocket: Implement sendto(). · 3b83aeb4
      Paul Sokolovsky authored
      sendto() turns out to be mandatory function to work with UDP. It may seem
      that connect(addr) + send() would achieve the same effect, but what connect()
      appears to do is to set source address filter on a socket to its argument.
      Then everything falls apart: socket sends to a broad-/multi-cast address,
      but reply is sent from real peer address, which doesn't match filter set
      by connect(), so local socket never sees a reply.
      3b83aeb4
  6. 10 Jul, 2015 1 commit
  7. 09 Jul, 2015 1 commit
  8. 08 Jul, 2015 1 commit
    • Paul Sokolovsky's avatar
      modmachine: Implement physical memory access using /dev/mem (Linux, etc). · 354d1752
      Paul Sokolovsky authored
      This requires root access. And on recent Linux kernels, with
      CONFIG_STRICT_DEVMEM option enabled, only address ranges listed in
      /proc/iomem can be accessed. The above compiled-time option can be
      however overriden with boot-time option "iomem=relaxed".
      
      This also removed separate read/write paths - there unlikely would
      be a case when they're different.
      354d1752
  9. 20 Jun, 2015 2 commits
  10. 04 Jun, 2015 1 commit
  11. 03 Jun, 2015 2 commits
  12. 02 Jun, 2015 1 commit
  13. 01 Jun, 2015 1 commit
  14. 30 May, 2015 2 commits
  15. 29 May, 2015 1 commit
    • Paul Sokolovsky's avatar
      unix: Allow to override default sys.path value. · 51726b4d
      Paul Sokolovsky authored
      Using MICROPY_PY_SYS_PATH_DEFAULT macro define. A usecase is building a
      distribution package, which should not have user home path by default in
      sys.path. In such case, MICROPY_PY_SYS_PATH_DEFAULT can be defined on
      make command-line (using CFLAGS_EXTRA).
      51726b4d
  16. 28 May, 2015 1 commit
  17. 27 May, 2015 2 commits
  18. 17 May, 2015 1 commit
  19. 12 May, 2015 1 commit
  20. 10 May, 2015 1 commit
  21. 09 May, 2015 1 commit
  22. 08 May, 2015 2 commits
  23. 07 May, 2015 1 commit
  24. 04 May, 2015 2 commits
  25. 01 May, 2015 1 commit
  26. 28 Apr, 2015 2 commits
  27. 25 Apr, 2015 1 commit
  28. 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
  29. 10 Apr, 2015 1 commit
  30. 09 Apr, 2015 1 commit
  31. 06 Apr, 2015 2 commits
  32. 03 Apr, 2015 1 commit
    • Paul Sokolovsky's avatar
      objstr: Add .splitlines() method. · ac2f7a7f
      Paul Sokolovsky authored
      splitlines() occurs ~179 times in CPython3 standard library, so was
      deemed worthy to implement. The method has subtle semantic differences
      from just .split("\n"). It is also defined as working for any end-of-line
      combination, but this is currently not implemented - it works only with
      LF line-endings (which should be OK for text strings on any platforms,
      but not OK for bytes).
      ac2f7a7f