aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/KeyboardMouse
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-05-06 07:50:34 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-05-06 07:50:34 +0000
commit63a8f66d92b5d7018a4d962f4f7b23774a621771 (patch)
tree49359656bc06962f6508e5896551343842461e36 /Demos/Device/KeyboardMouse
parentf11f69fd2989899b3088ea7d11b981f2d68c05e0 (diff)
downloadlufa-63a8f66d92b5d7018a4d962f4f7b23774a621771.tar.gz
lufa-63a8f66d92b5d7018a4d962f4f7b23774a621771.tar.bz2
lufa-63a8f66d92b5d7018a4d962f4f7b23774a621771.zip
Changed HWB board driver to Buttons driver, to allow for the support of future boards with more than one mounted GPIO button.
Diffstat (limited to 'Demos/Device/KeyboardMouse')
-rw-r--r--Demos/Device/KeyboardMouse/KeyboardMouse.c8
-rw-r--r--Demos/Device/KeyboardMouse/KeyboardMouse.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/Demos/Device/KeyboardMouse/KeyboardMouse.c b/Demos/Device/KeyboardMouse/KeyboardMouse.c
index dc039eec0..5c9332849 100644
--- a/Demos/Device/KeyboardMouse/KeyboardMouse.c
+++ b/Demos/Device/KeyboardMouse/KeyboardMouse.c
@@ -240,8 +240,8 @@ TASK(USB_Keyboard)
{
uint8_t JoyStatus_LCL = Joystick_GetStatus();
- /* Check if HWB is not pressed, if so mouse mode enabled */
- if (!(HWB_GetStatus()))
+ /* Check if board button is not pressed, if so mouse mode enabled */
+ if (!(Buttons_GetStatus() & BUTTONS_BUTTON1))
{
if (JoyStatus_LCL & JOY_UP)
KeyboardReportData.KeyCode[0] = 0x04; // A
@@ -311,8 +311,8 @@ TASK(USB_Mouse)
{
uint8_t JoyStatus_LCL = Joystick_GetStatus();
- /* Check if HWB is pressed, if so mouse mode enabled */
- if (HWB_GetStatus())
+ /* Check if board button is pressed, if so mouse mode enabled */
+ if (Buttons_GetStatus() & BUTTONS_BUTTON1)
{
if (JoyStatus_LCL & JOY_UP)
MouseReportData.Y = 1;
diff --git a/Demos/Device/KeyboardMouse/KeyboardMouse.h b/Demos/Device/KeyboardMouse/KeyboardMouse.h
index a69293c41..9a1fee1f4 100644
--- a/Demos/Device/KeyboardMouse/KeyboardMouse.h
+++ b/Demos/Device/KeyboardMouse/KeyboardMouse.h
@@ -45,7 +45,7 @@
#include <LUFA/Drivers/USB/USB.h> // USB Functionality
#include <LUFA/Drivers/Board/Joystick.h> // Joystick driver
#include <LUFA/Drivers/Board/LEDs.h> // LEDs driver
- #include <LUFA/Drivers/Board/HWB.h> // Hardware Button driver
+ #include <LUFA/Drivers/Board/Buttons.h> // Board Buttons driver
#include <LUFA/Scheduler/Scheduler.h> // Simple scheduler for task management
/* Task Definitions: */