Minor documentation improvements. Remove AS4 project generator script as it is buggy...
[pub/USBasp.git] / Projects / AVRISP-MKII / AVRISP-MKII.c
index cbcf009..9e1337a 100644 (file)
@@ -45,7 +45,7 @@ int main(void)
        V2Protocol_Init();
 
        LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
        V2Protocol_Init();
 
        LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
-       sei();
+       GlobalInterruptEnable();
 
        for (;;)
        {
 
        for (;;)
        {
@@ -101,7 +101,7 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_OUT_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
 
        /* Setup AVRISP Data IN endpoint if it is using a physically different endpoint */
        ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_OUT_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
 
        /* Setup AVRISP Data IN endpoint if it is using a physically different endpoint */
-       if (AVRISP_DATA_IN_EPADDR != AVRISP_DATA_OUT_EPADDR)
+       if ((AVRISP_DATA_IN_EPADDR & ENDPOINT_EPNUM_MASK) != (AVRISP_DATA_OUT_EPADDR & ENDPOINT_EPNUM_MASK))
          ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_IN_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
 
        /* Indicate endpoint configuration success or failure */
          ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_IN_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
 
        /* Indicate endpoint configuration success or failure */