CCLib icon indicating copy to clipboard operation
CCLib copied to clipboard

Suggestion to change cc_delay to make it MCU speed agnostic

Open mikkel75 opened this issue 8 years ago • 1 comments

It seems like the cc_delay function is heavily dependent on MCU speed, thus the timing on the CC interface won't be valid for faster MCUs. I suggest to change the function to take the MCU speed into account or use Arduino delay functions.

Any input?

mikkel75 avatar Nov 15 '17 15:11 mikkel75

Good observation! I don´t think this really matters, the ccXXXX might already be fast enough for the pulses generated.

This worked for me though:

void cc_delay( uint16_t d )
{
  delayMicroseconds( d);
}

rvt avatar Jun 01 '20 06:06 rvt