forked from mirror/qmk_firmware
Changed HWB board driver to Buttons driver, to allow for the support of future boards with more than one mounted GPIO button.
This commit is contained in:
@@ -81,7 +81,7 @@ int main(void)
|
||||
/* Hardware Initialization */
|
||||
Joystick_Init();
|
||||
LEDs_Init();
|
||||
HWB_Init();
|
||||
Buttons_Init();
|
||||
|
||||
/* Millisecond timer initialization, with output compare interrupt enabled for the idle timing */
|
||||
OCR0A = 0x7D;
|
||||
@@ -305,7 +305,7 @@ void CreateMouseReport(USB_MouseReport_Data_t* ReportData)
|
||||
if (JoyStatus_LCL & JOY_PRESS)
|
||||
ReportData->Button = (1 << 0);
|
||||
|
||||
if (HWB_GetStatus())
|
||||
if (Buttons_GetStatus() & BUTTONS_BUTTON1)
|
||||
ReportData->Button |= (1 << 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,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: */
|
||||
|
||||
Reference in New Issue
Block a user