Implementing a cycle-precise delay loop in C++ for embedded system
In a recent work on Marlin's printer firmware, I found a pending pull request about waiting for precise, ideally nanosecond timed, delays.
While it looked like easy at first, the implementation proved tricky. This post explains...