X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tmr.h;fp=tmr.h;h=e985e1cfc0aff31be6d4e57510d4c452e3f4d37d;hb=63426eb2c3d465e0099bf425e7552457abfb867b;hp=a204ab000675ed0f362c26465e95c3cc010c0d21;hpb=a3982b963fd174f5d267e88ad97388f1697f6f83;p=rgblamp.git diff --git a/tmr.h b/tmr.h index a204ab0..e985e1c 100644 --- a/tmr.h +++ b/tmr.h @@ -98,8 +98,8 @@ void tmr_isr(); /* 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. */