}
}
-/* Wait for a specific timer value t */
-#define tmr_wait(t) while (TMR0 != t);
-
void tmr_uwait(unsigned us)
{
- unsigned t0 = TMR0;
-
- while (us >= 32768) {
- tmr_wait(t0);
- us -= 32768;
- }
while (us >= 16384) {
tmr_cwait(128);
us -= 16384;
void tmr_mwait(unsigned ms)
{
- unsigned t0 = TMR0;
-
- while (ms >= 32) {
- tmr_wait(t0);
- ms -= 32;
- }
while (ms >= 16) {
tmr_cwait(128);
ms -= 16;