Use ## to create sections (Learn more)
void usleep(int us)
const int cycles = (3 * us) >> 1;
/* TIMER_FREQ * us / 1000000 =
* 24000000 / 16 * us / 1000000 =
* 1.5 * us = 3 * us / 2
int timer_start = TIMER2_VALUE;
int timer_val = TIMER2_VALUE;
if(timer_val > timer_start) /* timer wrapped */
timer_start += (TIMER_FREQ / HZ)
if(timer_start - timer_val >= cycles)
Share the private access URL responsibly.
Anyone will be able to find and view this paste. Google will index it.
All that is necessary for the triumph of evil is that good men do nothing. Do something.