projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added error codes to most StillImageHost demo commands.
[pub/USBasp.git]
/
Demos
/
OTG
/
TestApp
/
TestApp.c
diff --git
a/Demos/OTG/TestApp/TestApp.c
b/Demos/OTG/TestApp/TestApp.c
index
ef903f0
..
562348b
100644
(file)
--- a/
Demos/OTG/TestApp/TestApp.c
+++ b/
Demos/OTG/TestApp/TestApp.c
@@
-51,7
+51,7
@@
int main(void)
CheckButton();
\r
CheckTemperature();
\r
\r
CheckButton();
\r
CheckTemperature();
\r
\r
- /* Clear
output-c
ompare flag (logic 1 clears the flag) */
\r
+ /* Clear
millisecond timer's Output C
ompare flag (logic 1 clears the flag) */
\r
TIFR0 |= (1 << OCF0A);
\r
\r
USB_USBTask();
\r
TIFR0 |= (1 << OCF0A);
\r
\r
USB_USBTask();
\r
@@
-114,11
+114,12
@@
void CheckTemperature(void)
{
\r
static uint16_t MSElapsed = 0;
\r
\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 (TIFR0 & (1 << OCF0A))
\r
MSElapsed++;
\r
\r
/* Task runs every 10000 ticks, 10 seconds for this demo */
\r
- if (MSElapsed == 1000)
\r
+ if (MSElapsed == 1000
0
)
\r
{
\r
printf_P(PSTR("Current temperature: %d Degrees Celcius\r\n\r\n"),
\r
(int8_t)Temperature_GetTemperature());
\r
{
\r
printf_P(PSTR("Current temperature: %d Degrees Celcius\r\n\r\n"),
\r
(int8_t)Temperature_GetTemperature());
\r
@@
-135,6
+136,7
@@
void CheckButton(void)
static uint16_t DebounceMSElapsed = 0;
\r
static bool IsPressed;
\r
\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
if (TIFR0 & (1 << OCF0A))
\r
DebounceMSElapsed++;
\r
\r