When using Longduino on a Longan nano using platform-io, pulseIn did not return. Upon further inspection, rdcycle seemed to return a constant value. Marking the inline assembly volatile and enabling the mcount cycle counter seems to solve this problem.
When using Longduino on a Longan nano using platform-io, pulseIn did not return. Upon further inspection,
rdcycle
seemed to return a constant value. Marking the inline assembly volatile and enabling the mcount cycle counter seems to solve this problem.