add enable macro for CCID interface

This commit is contained in:
Conor Patrick
2019-08-24 15:49:02 +08:00
parent ccd9a04146
commit 3b4c154fd1
3 changed files with 46 additions and 28 deletions

View File

@ -707,7 +707,6 @@ void init_usb()
// Enable USB Clock
SET_BIT(RCC->APB1ENR1, RCC_APB1ENR1_USBFSEN);
#if DEBUG_LEVEL > 0
USBD_Composite_Set_Classes(&USBD_HID, &USBD_CCID, &USBD_CDC);
in_endpoint_to_class[HID_EPIN_ADDR & 0x7F] = 0;
out_endpoint_to_class[HID_EPOUT_ADDR & 0x7F] = 0;
@ -720,17 +719,10 @@ void init_usb()
USBD_Init(&Solo_USBD_Device, &Solo_Desc, 0);
USBD_RegisterClass(&Solo_USBD_Device, &USBD_Composite);
// USBD_RegisterClass(&Solo_USBD_Device, &USBD_HID);
//
// USBD_RegisterClass(&Solo_USBD_Device, &USBD_CDC);
#if DEBUG_LEVEL > 0
USBD_CDC_RegisterInterface(&Solo_USBD_Device, &USBD_Interface_fops_FS);
#else
USBD_Init(&Solo_USBD_Device, &Solo_Desc, 0);
USBD_RegisterClass(&Solo_USBD_Device, &USBD_HID);
#endif
//Y
USBD_Start(&Solo_USBD_Device);
//Y
}
void init_pwm(void)