/** * Initializes the USB device composite device driver. * \param pDescriptors Pointer to Descriptors list for CDC Serial Device. */ void DUALCDCDDriver_Initialize(const USBDDriverDescriptors *pDescriptors) { USBDDriver *pUsbd = USBD_GetDriver(); CDCDSerialPort *pCdcd = &dualcdcdDriver.cdcdSerialPort[0]; TRACE_INFO("DUALCDCDDriver_Initialize\n\r"); pCdcd = &dualcdcdDriver.cdcdSerialPort[0]; CDCDSerialPort_Initialize(pCdcd, pUsbd, 0, 0, DUALCDCDDriverDescriptors_INTERFACENUM0, 2); pCdcd = &dualcdcdDriver.cdcdSerialPort[1]; CDCDSerialPort_Initialize(pCdcd, pUsbd, 0, 0, DUALCDCDDriverDescriptors_INTERFACENUM1, 2); /* Initialize the standard USB driver */ USBDDriver_Initialize(pUsbd, pDescriptors, 0); /* Initialize the USB driver */ USBD_Init(); }
/** * Initializes the USB Device CDC serial driver & USBD Driver. * \param pUsbd Pointer to USBDDriver instance. * \param bInterfaceNb Interface number for the function. */ void CDCDSerial_Initialize( USBDDriver *pUsbd, uint8_t bInterfaceNb) { CDCDSerialPort *pCdcd = &cdcdSerial; TRACE_INFO("CDCDSerial_Initialize\n\r"); /* Initialize serial port function */ CDCDSerialPort_Initialize( pCdcd, pUsbd, (CDCDSerialPortEventHandler)CDCDSerial_EventHandler, 0, bInterfaceNb, 2); }