1. 11 Apr, 2017 1 commit
  2. 04 Apr, 2017 2 commits
  3. 01 Apr, 2017 1 commit
  4. 31 Mar, 2017 3 commits
  5. 30 Mar, 2017 7 commits
  6. 29 Mar, 2017 3 commits
  7. 28 Mar, 2017 5 commits
  8. 24 Mar, 2017 1 commit
    • Damien George's avatar
      py/modbuiltins: For round() builtin use nearbyint instead of round. · 125eae1b
      Damien George authored
      The C nearbyint function has exactly the semantics that Python's round()
      requires, whereas C's round() requires extra steps to handle rounding of
      numbers half way between integers.  So using nearbyint reduces code size
      and potentially eliminates any source of errors in the handling of half-way
      numbers.
      
      Also, bare-metal implementations of nearbyint can be more efficient than
      round, so further code size is saved (and efficiency improved).
      
      nearbyint is provided in the C99 standard so it should be available on all
      supported platforms.
      125eae1b
  9. 23 Mar, 2017 1 commit
  10. 22 Mar, 2017 3 commits
  11. 20 Mar, 2017 2 commits
    • Damien George's avatar
      stmhal/pendsv: Disable interrupts during a thread switch. · ebbaf7ee
      Damien George authored
      We can actually handle interrupts during a thread switch (because we always
      have a valid stack), but only if those interrupts don't access any of the
      thread state (because the state may not correspond to the stack pointer).
      So to be on the safe side we disable interrupts during the very short
      period of the thread state+stack switch.
      ebbaf7ee
    • Damien George's avatar
      stmhal: Enable micropython.schedule(). · a5159edc
      Damien George authored
      ExtInt, Timer and CAN IRQ callbacks are made to work with the scheduler.
      They are still hard IRQs by default, but one can now call
      micropython.schedule within the hard IRQ to schedule a soft callback.
      a5159edc
  12. 10 Mar, 2017 3 commits
  13. 02 Mar, 2017 4 commits
  14. 17 Feb, 2017 1 commit
  15. 16 Feb, 2017 1 commit
    • Damien George's avatar
      py: Add iter_buf to getiter type method. · ae8d8675
      Damien George authored
      Allows to iterate over the following without allocating on the heap:
      - tuple
      - list
      - string, bytes
      - bytearray, array
      - dict (not dict.keys, dict.values, dict.items)
      - set, frozenset
      
      Allows to call the following without heap memory:
      - all, any, min, max, sum
      
      TODO: still need to allocate stack memory in bytecode for iter_buf.
      ae8d8675
  16. 15 Feb, 2017 2 commits