CheckButton();\r
CheckTemperature();\r
\r
- /* Clear output-compare flag (logic 1 clears the flag) */\r
+ /* Clear millisecond timer's Output Compare flag (logic 1 clears the flag) */\r
TIFR0 |= (1 << OCF0A);\r
\r
USB_USBTask();\r
{\r
static uint16_t MSElapsed = 0;\r
\r
+ /* Timer 0's compare flag is set every millisecond */\r
if (TIFR0 & (1 << OCF0A))\r
MSElapsed++;\r
\r
/* Task runs every 10000 ticks, 10 seconds for this demo */\r
- if (MSElapsed == 1000)\r
+ if (MSElapsed == 10000)\r
{\r
printf_P(PSTR("Current temperature: %d Degrees Celcius\r\n\r\n"),\r
(int8_t)Temperature_GetTemperature());\r
static uint16_t DebounceMSElapsed = 0;\r
static bool IsPressed;\r
\r
+ /* Timer 0's compare flag is set every millisecond */\r
if (TIFR0 & (1 << OCF0A))\r
DebounceMSElapsed++;\r
\r