1. 22 Jul, 2015 1 commit
  2. 21 Jul, 2015 1 commit
  3. 28 Apr, 2015 1 commit
  4. 22 Apr, 2015 1 commit
  5. 18 Apr, 2015 1 commit
  6. 16 Apr, 2015 2 commits
    • blmorris's avatar
      stmhal: Use new %q format to print qstr's in a few more places. · 4c459213
      blmorris authored
      Saves 68 bytes.
      4c459213
    • 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
  7. 20 Mar, 2015 1 commit
  8. 09 Mar, 2015 1 commit
  9. 23 Feb, 2015 2 commits
  10. 13 Feb, 2015 1 commit
  11. 08 Jan, 2015 1 commit
  12. 07 Jan, 2015 1 commit
  13. 01 Jan, 2015 1 commit
  14. 08 Dec, 2014 1 commit
    • Paul Sokolovsky's avatar
      modsys: Add sys.print_exception(exc, file=sys.stdout) function. · 46c3ab20
      Paul Sokolovsky authored
      The function is modeled after traceback.print_exception(), but unbloated,
      and put into existing module to save overhead on adding another module.
      Compliant traceback.print_exception() is intended to be implemented in
      micropython-lib in terms of sys.print_exception().
      
      This change required refactoring mp_obj_print_exception() to take pfenv_t
      interface arguments.
      
      Addresses #751.
      46c3ab20
  15. 10 Oct, 2014 1 commit
  16. 05 Oct, 2014 4 commits
  17. 04 Oct, 2014 1 commit
    • Damien George's avatar
      stmhal: Allow pyb.freq() function to change SYSCLK frequency. · 24119176
      Damien George authored
      Eg pyb.freq(120000000) sets the CPU to 120MHz.  The frequency can be set
      at any point in the code, and can be changed as many times as you like.
      Note that any active timers will need to be reconfigured after a freq
      change.
      
      Valid range is 24MHz to 168MHz (but not all freqs are supported).  The
      code maintains a 48MHz clock for the USB at all times and it's possible
      to change the frequency at a USB REPL and keep the REPL alive (well,
      most of the time it stays, sometimes it resets the USB for some reason).
      Note that USB does not work with pyb.freq of 24MHz.
      24119176
  18. 29 Sep, 2014 1 commit
  19. 28 Sep, 2014 1 commit
    • Dave Hylands's avatar
      Fix timer overflow code. · 39296b40
      Dave Hylands authored
      Teensy doesn't need to worry about overflows since all of
      its timers are only 16-bit.
      
      For PWM, the pulse width needs to be able to vary from 0..period+1
      (pulse-width == period+1 corresponds to 100% PWM)
      
      I couldn't test the 0xffffffff cases since we can't currently get a
      period that big in python. With a prescaler of 0, that corresponds
      to a freq of 0.039 (i.e. cycle every 25.56 seconds), and we can't
      set that using freq or period.
      
      I also tested both stmhal and teensy with floats disabled, which
      required a few other code changes to compile.
      39296b40
  20. 25 Sep, 2014 1 commit
  21. 24 Sep, 2014 1 commit
    • Dave Hylands's avatar
      Add pulse_width_percent to teensy. · 53d5fa64
      Dave Hylands authored
      Fix stmhal and teensy print routines to report actual prescaler an period.
      Fix teensy build to use soft-float
      Add USE_ARDUINO_TOOLCHAIN option to teensy build
      53d5fa64
  22. 21 Sep, 2014 1 commit
    • Damien George's avatar
      stmhal: Add pulse_width_ratio to timer channel object. · 0e58c581
      Damien George authored
      This allows to set the pulse width (for PWM mode) as a ratio relative to
      the period of the timer.  Eg, 0.5 is a 50% duty cycle.  You can set the
      ratio in the channel init, or using channel.pulse_width_ratio; the
      latter can also read the pulse width as a ratio.
      0e58c581
  23. 19 Sep, 2014 1 commit
  24. 29 Aug, 2014 1 commit
  25. 13 Aug, 2014 1 commit
  26. 03 Jul, 2014 1 commit
  27. 02 Jul, 2014 1 commit
  28. 30 Jun, 2014 1 commit
  29. 19 Jun, 2014 1 commit
  30. 03 May, 2014 2 commits
  31. 02 May, 2014 1 commit
  32. 26 Apr, 2014 2 commits
  33. 21 Apr, 2014 1 commit