1. 29 Jul, 2015 1 commit
  2. 24 Jun, 2015 1 commit
    • blmorris's avatar
      stmhal/dma.c: Modify dma_init() to accept init struct as an argument · c5175526
      blmorris authored
      This removes hard-coded DMA init params from dma_init(), instead defining
      these parameters in a DMA_InitTypeDef struct that gets passed as an
      argument to dma_init()
      This makes dma_init more generic so it can be used for I2S and SD Card,
      which require different initialization parameters.
      c5175526
  3. 22 Jun, 2015 1 commit
  4. 10 Jun, 2015 1 commit
  5. 28 May, 2015 1 commit
  6. 27 May, 2015 1 commit
  7. 18 Apr, 2015 1 commit
  8. 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
  9. 21 Jan, 2015 1 commit
    • Damien George's avatar
      py: Remove mp_obj_str_builder and use vstr instead. · 05005f67
      Damien George authored
      With this patch str/bytes construction is streamlined.  Always use a
      vstr to build a str/bytes object.  If the size is known beforehand then
      use vstr_init_len to allocate only required memory.  Otherwise use
      vstr_init and the vstr will grow as needed.  Then use
      mp_obj_new_str_from_vstr to create a str/bytes object using the vstr
      memory.
      
      Saves code ROM: 68 bytes on stmhal, 108 bytes on bare-arm, and 336 bytes
      on unix x64.
      05005f67
  10. 01 Jan, 2015 1 commit
  11. 23 Oct, 2014 1 commit
  12. 29 Aug, 2014 1 commit
  13. 22 Jul, 2014 1 commit
  14. 12 Jul, 2014 1 commit
  15. 11 Jul, 2014 1 commit
  16. 03 Jul, 2014 1 commit
  17. 19 Jun, 2014 1 commit
  18. 04 May, 2014 1 commit
  19. 03 May, 2014 2 commits
  20. 02 May, 2014 1 commit
  21. 29 Apr, 2014 1 commit
    • Damien George's avatar
      stmhal: Add documentation in comments, and script to generate HTML. · 8d09640b
      Damien George authored
      Decided to write own script to pull documentation from comments in C code.
      Style for writing auto generated documentation is: start line with ///
      and then use standard markdown to write the comment.  Keywords
      recognised by the scraper begin with backslash.  See code for examples.
      
      Running: python gendoc.py modpyb.c accel.c adc.c dac.c extint.c i2c.c
      led.c pin.c rng.c servo.c spi.c uart.c usrsw.c, will generate a HTML
      structure in gendoc-out/.
      
      gendoc.py is crude but functional.  Needed something quick, and this was
      it.
      8d09640b
  22. 26 Apr, 2014 2 commits
  23. 21 Apr, 2014 1 commit
  24. 20 Apr, 2014 3 commits
  25. 19 Apr, 2014 2 commits
  26. 18 Apr, 2014 1 commit
    • Damien George's avatar
      stmhal: Update ADC, DAC and I2C objects to use new buffer protocol. · 38ae014e
      Damien George authored
      Main reason for expanding buffer protocol API was to support writes to a
      buffer in ADC module (see read_timed).  With this change you can now
      create an array of arbitrary type and ADC.read_timed will store into
      that array in the correct format (byte, int, float).  I wonder though if
      all these changes were really worth it to support just this function.
      Hopefully this enhanced buffer protocol API (with typecode specified)
      will be used elsewhere.
      38ae014e
  27. 16 Apr, 2014 1 commit
  28. 15 Apr, 2014 2 commits
  29. 13 Apr, 2014 1 commit
  30. 11 Apr, 2014 1 commit
  31. 05 Apr, 2014 1 commit
  32. 30 Mar, 2014 2 commits
    • Damien George's avatar
      Merge map.h into obj.h. · df6567e6
      Damien George authored
      Pretty much everyone needs to include map.h, since it's such an integral
      part of the Micro Python object implementation.  Thus, the definitions
      are now in obj.h instead.  map.h is removed.
      df6567e6
    • Damien George's avatar
      Rename rt_* to mp_*. · d17926db
      Damien George authored
      Mostly just a global search and replace.  Except rt_is_true which
      becomes mp_obj_is_true.
      
      Still would like to tidy up some of the names, but this will do for now.
      d17926db
  33. 29 Mar, 2014 1 commit