/* Wait for c clocks, 0 <= c < 128. */
#define tmr_cwait(c) \
do { \
- unsigned t0 = TMR0; \
- while (TMR0 - t0 <= c); \
+ unsigned char t0 = TMR0; \
+ while ((unsigned char)(TMR0 - t0) <= c); \
} while (0)
/* Wait for a number of us. This is pretty accurate. */