diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-05-06 07:50:34 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-05-06 07:50:34 +0000 |
commit | 63a8f66d92b5d7018a4d962f4f7b23774a621771 (patch) | |
tree | 49359656bc06962f6508e5896551343842461e36 /Demos/Device/Joystick | |
parent | f11f69fd2989899b3088ea7d11b981f2d68c05e0 (diff) | |
download | lufa-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/Joystick')
-rw-r--r-- | Demos/Device/Joystick/Joystick.c | 4 | ||||
-rw-r--r-- | Demos/Device/Joystick/Joystick.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Demos/Device/Joystick/Joystick.c b/Demos/Device/Joystick/Joystick.c index a5c3242fe..b2de42fc2 100644 --- a/Demos/Device/Joystick/Joystick.c +++ b/Demos/Device/Joystick/Joystick.c @@ -58,7 +58,7 @@ int main(void) /* Hardware Initialization */
Joystick_Init();
LEDs_Init();
- HWB_Init();
+ Buttons_Init();
/* Indicate USB not ready */
UpdateStatus(Status_USBNotReady);
@@ -173,7 +173,7 @@ bool GetNextReport(USB_JoystickReport_Data_t* ReportData) if (JoyStatus_LCL & JOY_PRESS)
ReportData->Button = (1 << 1);
- if (HWB_GetStatus())
+ if (Buttons_GetStatus() & BUTTONS_BUTTON1)
ReportData->Button |= (1 << 0);
/* Check if the new report is different to the previous report */
diff --git a/Demos/Device/Joystick/Joystick.h b/Demos/Device/Joystick/Joystick.h index 2a5cc2588..c274b5bc5 100644 --- a/Demos/Device/Joystick/Joystick.h +++ b/Demos/Device/Joystick/Joystick.h @@ -48,7 +48,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: */
|