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:
Dean Camera 2009-05-06 07:50:34 +00:00
parent f11f69fd29
commit 63a8f66d92
25 changed files with 163 additions and 131 deletions

View file

@ -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);
}