X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=tmr.c;fp=tmr.c;h=09e6c2d3cef8dbbb1fe0170442bac3c77175bd8e;hb=82184529ca82b955e227b50ad07837f14619a055;hp=34a9733e5737aebf2f95e9f0c070fd76ffd0a027;hpb=a0556afb8953ae458fb0fe7bcc68bde851f0e630;p=rgblamp.git diff --git a/tmr.c b/tmr.c index 34a9733..09e6c2d 100644 --- a/tmr.c +++ b/tmr.c @@ -119,17 +119,8 @@ void tmr_isr() } } -/* 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; @@ -139,12 +130,6 @@ void tmr_uwait(unsigned us) void tmr_mwait(unsigned ms) { - unsigned t0 = TMR0; - - while (ms >= 32) { - tmr_wait(t0); - ms -= 32; - } while (ms >= 16) { tmr_cwait(128); ms -= 16;