Changed HWB board driver to Buttons driver, to allow for the support of future boards...
[pub/USBasp.git] / Demos / Device / Joystick / Joystick.c
index a5c3242..b2de42f 100644 (file)
@@ -58,7 +58,7 @@ int main(void)
        /* Hardware Initialization */\r
        Joystick_Init();\r
        LEDs_Init();\r
-       HWB_Init();\r
+       Buttons_Init();\r
        \r
        /* Indicate USB not ready */\r
        UpdateStatus(Status_USBNotReady);\r
@@ -173,7 +173,7 @@ bool GetNextReport(USB_JoystickReport_Data_t* ReportData)
        if (JoyStatus_LCL & JOY_PRESS)\r
          ReportData->Button  = (1 << 1);\r
          \r
-       if (HWB_GetStatus())\r
+       if (Buttons_GetStatus() & BUTTONS_BUTTON1)\r
          ReportData->Button |= (1 << 0);\r
          \r
        /* Check if the new report is different to the previous report */\r