Exemplo n.º 1
0
/**
 * Initializes the MSD driver and the associated USB driver.
 * \param  pDescriptors Pointer to Descriptors list for MSD Device.
 * \param  pLuns        Pointer to a list of LUNs
 * \param  numLuns      Number of LUN in list
 * \see MSDLun
 */
void MSDDriver_Initialize(
	const USBDDriverDescriptors *pDescriptors,
	MSDLun *pLuns, unsigned char numLuns)
{
	USBDDriver *pUsbd = USBD_GetDriver();
	USBDDriver_Initialize(pUsbd, pDescriptors, 0);
	MSDFunction_Initialize(pUsbd, 0, pLuns, numLuns);
	USBD_Init();
}
Exemplo n.º 2
0
/**
 * Initializes the USB device CDCMSD device driver.
 */
void CDCMSDDriver_Initialize(
    const USBDDriverDescriptors *pDescriptors,
    MSDLun *pLuns, unsigned char numLuns)
{
    USBDDriver *pUsbd = USBD_GetDriver();

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

    /* CDC */
    CDCDSerial_Initialize(pUsbd, CDCMSDDriverDescriptors_CDC_INTERFACE);

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

    /* Initialize the USB driver */
    USBD_Init();
}
Exemplo n.º 3
0
/**
 * 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();
}