Exemple #1
0
/**
 * Initializes the USB device composite device driver.
 */
void HIDAUDDDriver_Initialize(const USBDDriverDescriptors *pDescriptors)
{
	USBDDriver *pUsbd = USBD_GetDriver();

	/* Initialize the standard USB driver */
	USBDDriver_Initialize(pUsbd,
						  pDescriptors,
						  bAltInterfaces);

	/* HID */
	HIDDKeyboard_Initialize(pUsbd, HIDAUDDDriverDescriptors_HID_INTERFACE);
	/* Audio */
	AUDDFunction_Initialize(pUsbd, HIDAUDDDriverDescriptors_AUD_INTERFACE);

	/* Initialize the USB driver */
	USBD_Init();
}
Exemple #2
0
/**
 * Initializes the USB device composite device driver.
 */
void CDCHIDDDriver_Initialize(const USBDDriverDescriptors *pDescriptors)
{
	USBDDriver *pUsbd = USBD_GetDriver();

	/* Initialize the standard USB driver */
	USBDDriver_Initialize(pUsbd,
						  pDescriptors,
						  0);

	/* CDC */
	CDCDSerial_Initialize(pUsbd, CDCHIDDDriverDescriptors_CDC_INTERFACE);
	/* HID */
	HIDDKeyboard_Initialize(pUsbd, CDCHIDDDriverDescriptors_HID_INTERFACE);

	/* Initialize the USB driver */
	USBD_Init();
}
/**
 * Initializes the USB device HIDMSD device driver.
 */
void HIDMSDDriver_Initialize(
    const USBDDriverDescriptors *pDescriptors,
    MSDLun *pLuns, uint8_t numLuns)
{
    USBDDriver *pUsbd = USBD_GetDriver();

    /* Initialize the standard USB driver */
    USBDDriver_Initialize(pUsbd,
                          pDescriptors,
                          0);

    /* HID */
    HIDDKeyboard_Initialize(pUsbd, HIDMSDDriverDescriptors_HID_INTERFACE);

    /* MSD */
    MSDFunction_Initialize(pUsbd, HIDMSDDriverDescriptors_MSD_INTERFACE,
                           pLuns, numLuns);

    /* Initialize the USB driver */
    USBD_Init();
}