wavesoft / CCLib

An arduino library that implements the CC.Debugger protocol of TI
GNU General Public License v3.0
170 stars 78 forks source link

Suggestion to change cc_delay to make it MCU speed agnostic #20

Open mikkel75 opened 6 years ago

mikkel75 commented 6 years ago

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?

rvt commented 4 years ago

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);
}