Welcome to the Parallax Discussion Forums, sign-up to participate.
JonnyMac wrote: »
What is the purpose of param1 in __builtin_propeller_waitcnt(target, param1)?
targetCnt = CNT + freq; // set up initial interval
// do something useful that takes less than "freq" cycles
// now sleep until interval is finished
targetCnt = __builtin_propeller_waitcnt(targetCnt, freq);
// targetCnt has been updated to the next CNT to wait for
} while (condition);