projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed HWB board driver to Buttons driver, to allow for the support of future boards...
[pub/USBasp.git]
/
Demos
/
OTG
/
TestApp
/
TestApp.c
diff --git
a/Demos/OTG/TestApp/TestApp.c
b/Demos/OTG/TestApp/TestApp.c
index
8c8a23f
..
4dc9b44
100644
(file)
--- a/
Demos/OTG/TestApp/TestApp.c
+++ b/
Demos/OTG/TestApp/TestApp.c
@@
-40,7
+40,7
@@
TASK_LIST
\r
{
\r
{ .Task = TestApp_CheckJoystick, .TaskStatus = TASK_RUN },
\r
TASK_LIST
\r
{
\r
{ .Task = TestApp_CheckJoystick, .TaskStatus = TASK_RUN },
\r
- { .Task = TestApp_Check
HWB
, .TaskStatus = TASK_RUN },
\r
+ { .Task = TestApp_Check
Button
, .TaskStatus = TASK_RUN },
\r
{ .Task = TestApp_CheckTemp , .TaskStatus = TASK_RUN },
\r
{ .Task = USB_USBTask , .TaskStatus = TASK_RUN },
\r
};
\r
{ .Task = TestApp_CheckTemp , .TaskStatus = TASK_RUN },
\r
{ .Task = USB_USBTask , .TaskStatus = TASK_RUN },
\r
};
\r
@@
-63,7
+63,7
@@
int main(void)
Temperature_Init();
\r
Joystick_Init();
\r
LEDs_Init();
\r
Temperature_Init();
\r
Joystick_Init();
\r
LEDs_Init();
\r
-
HWB
_Init();
\r
+
Buttons
_Init();
\r
\r
/* Millisecond timer initialization, with output compare interrupt enabled */
\r
OCR0A = 0x7D;
\r
\r
/* Millisecond timer initialization, with output compare interrupt enabled */
\r
OCR0A = 0x7D;
\r
@@
-137,17
+137,17
@@
TASK(TestApp_CheckTemp)
}
\r
}
\r
\r
}
\r
}
\r
\r
-/** Task responsible for checking the
HWB button
position, and start-stopping other tasks and the USB
\r
+/** Task responsible for checking the
board's first button'
position, and start-stopping other tasks and the USB
\r
* interface in response to user joystick movements.
\r
*/
\r
* interface in response to user joystick movements.
\r
*/
\r
-TASK(TestApp_Check
HWB
)
\r
+TASK(TestApp_Check
Button
)
\r
{
\r
static SchedulerDelayCounter_t DelayCounter = 0;
\r
static bool IsPressed;
\r
static bool BlockingJoystickTask;
\r
\r
{
\r
static SchedulerDelayCounter_t DelayCounter = 0;
\r
static bool IsPressed;
\r
static bool BlockingJoystickTask;
\r
\r
- /* Check if
HWB
pressed (start USB) */
\r
- if (
HWB_GetStatus() == true
)
\r
+ /* Check if
board button
pressed (start USB) */
\r
+ if (
Buttons_GetStatus() & BUTTONS_BUTTON1
)
\r
{
\r
/* Debounce - check 100 ticks later to see if button is still being pressed */
\r
if ((IsPressed == false) && (Scheduler_HasDelayElapsed(100, &DelayCounter)))
\r
{
\r
/* Debounce - check 100 ticks later to see if button is still being pressed */
\r
if ((IsPressed == false) && (Scheduler_HasDelayElapsed(100, &DelayCounter)))
\r
@@
-185,7
+185,7
@@
TASK(TestApp_CheckHWB)
}
\r
else
\r
{
\r
}
\r
else
\r
{
\r
- /*
HWB
not pressed - reset debounce interval counter and press handled flag */
\r
+ /*
Board button
not pressed - reset debounce interval counter and press handled flag */
\r
Scheduler_ResetDelay(&DelayCounter);
\r
IsPressed = false;
\r
}
\r
Scheduler_ResetDelay(&DelayCounter);
\r
IsPressed = false;
\r
}
\r