diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-07-20 02:27:32 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-07-20 02:27:32 +0000 |
commit | 8a68203d3451c50c573c6baf4850e72d8dbabfcb (patch) | |
tree | 273d8ce3cd833c2004413229a2846e24b332eb6f /Demos/OTG/TestApp | |
parent | cf313989e6f451a3b6058db94929a51bc1b5e68b (diff) | |
download | lufa-8a68203d3451c50c573c6baf4850e72d8dbabfcb.tar.gz lufa-8a68203d3451c50c573c6baf4850e72d8dbabfcb.tar.bz2 lufa-8a68203d3451c50c573c6baf4850e72d8dbabfcb.zip |
Added error codes to most StillImageHost demo commands.
Diffstat (limited to 'Demos/OTG/TestApp')
-rw-r--r-- | Demos/OTG/TestApp/TestApp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Demos/OTG/TestApp/TestApp.c b/Demos/OTG/TestApp/TestApp.c index ef903f089..562348bf8 100644 --- a/Demos/OTG/TestApp/TestApp.c +++ b/Demos/OTG/TestApp/TestApp.c @@ -51,7 +51,7 @@ int main(void) CheckButton();
CheckTemperature();
- /* Clear output-compare flag (logic 1 clears the flag) */
+ /* Clear millisecond timer's Output Compare flag (logic 1 clears the flag) */
TIFR0 |= (1 << OCF0A);
USB_USBTask();
@@ -114,11 +114,12 @@ void CheckTemperature(void) {
static uint16_t MSElapsed = 0;
+ /* Timer 0's compare flag is set every millisecond */
if (TIFR0 & (1 << OCF0A))
MSElapsed++;
/* Task runs every 10000 ticks, 10 seconds for this demo */
- if (MSElapsed == 1000)
+ if (MSElapsed == 10000)
{
printf_P(PSTR("Current temperature: %d Degrees Celcius\r\n\r\n"),
(int8_t)Temperature_GetTemperature());
@@ -135,6 +136,7 @@ void CheckButton(void) static uint16_t DebounceMSElapsed = 0;
static bool IsPressed;
+ /* Timer 0's compare flag is set every millisecond */
if (TIFR0 & (1 << OCF0A))
DebounceMSElapsed++;
|