Minor documentation improvements. Remove AS4 project generator script as it is buggy...
[pub/USBasp.git] / Demos / Device / ClassDriver / Joystick / Joystick.c
index 45c24b2..f9a0c24 100644 (file)
@@ -7,7 +7,7 @@
 */
 
 /*
 */
 
 /*
-  Copyright 2011  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2012  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
@@ -48,11 +48,12 @@ USB_ClassInfo_HID_Device_t Joystick_HID_Interface =
                .Config =
                        {
                                .InterfaceNumber              = 0,
                .Config =
                        {
                                .InterfaceNumber              = 0,
-
-                               .ReportINEndpointNumber       = JOYSTICK_EPNUM,
-                               .ReportINEndpointSize         = JOYSTICK_EPSIZE,
-                               .ReportINEndpointDoubleBank   = false,
-
+                               .ReportINEndpoint             =
+                                       {
+                                               .Address              = JOYSTICK_EPADDR,
+                                               .Size                 = JOYSTICK_EPSIZE,
+                                               .Banks                = 1,
+                                       },
                                .PrevReportINBuffer           = PrevJoystickHIDReportBuffer,
                                .PrevReportINBufferSize       = sizeof(PrevJoystickHIDReportBuffer),
                        },
                                .PrevReportINBuffer           = PrevJoystickHIDReportBuffer,
                                .PrevReportINBufferSize       = sizeof(PrevJoystickHIDReportBuffer),
                        },
@@ -67,7 +68,7 @@ int main(void)
        SetupHardware();
 
        LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
        SetupHardware();
 
        LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
-       sei();
+       GlobalInterruptEnable();
 
        for (;;)
        {
 
        for (;;)
        {