Fixed SPI driver not explicitly setting /SS and MISO pins as inputs when SPI_Init...
[pub/USBasp.git] / LUFA / Drivers / USB / LowLevel / USBController.c
index a7dbdca..f6b1b12 100644 (file)
@@ -156,7 +156,7 @@ void USB_ResetInterface(void)
                #endif
        }
        
-       #if (defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR))
+       #if (defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR))
        USB_OTGPAD_On();
        #endif
 }
@@ -203,6 +203,7 @@ static void USB_Init_Device(void)
                                                           ENDPOINT_DIR_OUT, USB_ControlEndpointSize,
                                                           ENDPOINT_BANK_SINGLE);               
 
+       USB_INT_Clear(USB_INT_SUSPI);
        USB_INT_Enable(USB_INT_SUSPI);
        USB_INT_Enable(USB_INT_EORSTI);
 
@@ -217,7 +218,6 @@ static void USB_Init_Host(void)
        USB_ControlPipeSize = PIPE_CONTROLPIPE_DEFAULT_SIZE;
 
        USB_Host_HostMode_On();
-       USB_CLK_Unfreeze();
        
        USB_Host_VBUS_Auto_Off();
        USB_Host_VBUS_Manual_Enable();
@@ -225,5 +225,7 @@ static void USB_Init_Host(void)
 
        USB_INT_Enable(USB_INT_SRPI);
        USB_INT_Enable(USB_INT_BCERRI);
+
+       USB_Attach();
 }
 #endif