Skip to content
Snippets Groups Projects
Select Git revision
  • d5e9ab6e61729f533dbed5c2b6b27307ce6c3b55
  • wip-bootstrap default
  • dualcore
  • ch3/leds
  • ch3/time
  • master
6 results

machine_pulse.py

Blame
    • Paul Sokolovsky's avatar
      d5e9ab6e
      extmod/machine_pulse: Make time_pulse_us() not throw exceptions. · d5e9ab6e
      Paul Sokolovsky authored
      machine.time_pulse_us() is intended to provide very fine timing, including
      while working with signal bursts, where each transition is tracked in row.
      Throwing and handling an exception may take too much time and "signal loss".
      So instead, in case of a timeout, just return negative value. Cases of
      timeout while waiting for initial signal stabilization, and during actual
      timing, are recognized.
      
      The documentation is updated accordingly, and rewritten somewhat to clarify
      the function behavior.
      d5e9ab6e
      History
      extmod/machine_pulse: Make time_pulse_us() not throw exceptions.
      Paul Sokolovsky authored
      machine.time_pulse_us() is intended to provide very fine timing, including
      while working with signal bursts, where each transition is tracked in row.
      Throwing and handling an exception may take too much time and "signal loss".
      So instead, in case of a timeout, just return negative value. Cases of
      timeout while waiting for initial signal stabilization, and during actual
      timing, are recognized.
      
      The documentation is updated accordingly, and rewritten somewhat to clarify
      the function behavior.
    machine_pulse.py 836 B