CHG: a better micro second (us) spindely function. At average it has 8-10us delay, but its linear. Making error less when you want to wait longer..

SpinDelayCountUs(20) gives a delay of 28us.
SpinDelayCountUs(100) gives a delay of 110us.
SpinDelayCountUs(500) gives a delay of 508us.
This commit is contained in:
iceman1001 2016-09-10 21:43:08 +02:00
commit b4a6775b5e
4 changed files with 116 additions and 107 deletions

View file

@ -65,6 +65,7 @@ uint32_t RAMFUNC GetTickCount();
void StartCountUS();
uint32_t RAMFUNC GetCountUS();
void ResetUSClock(void);
void SpinDelayCountUs(uint32_t us);
//uint32_t RAMFUNC GetDeltaCountUS();
void StartCountSspClk();