/* Initializes the MSD driver and the associated USB driver.  */
void MSDDriver_Initialize(MSDLun *defLuns, unsigned char numLuns)
/* Initializes the MSD driver and the associated USB driver.  */
void MSDDriver_Initialize(MSDLun *defLuns, unsigned char numLuns)
{
  TRACE_INFO("MSD init\n\r");
    msdDriver.commandState.state = 0;
    msdDriver.commandState.postprocess = 0;
    msdDriver.commandState.length = 0;
    msdDriver.commandState.transfer.semaphore = 0;
    msdDriver.luns = defLuns;
    msdDriver.maxLun = (unsigned char) (numLuns - 1);
    MSDDriver_Reset();
    USBDDriver_Initialize(&usbdDriver, &msdDriverDescriptors, 0);
    USBD_Init();
}