{
while ((s_cdcVcom.attach != 1) || (s_cdcVcom.startTransactions != 1))
{
- __NOP();
};
USB_DeviceSendRequest((usb_device_handle)baseAddr, USB_CDC_VCOM_BULK_IN_ENDPOINT, (uint8_t *)buf, count);
while (!s_sendComplete)
{
- __NOP();
};
s_sendComplete = 0;
}
/* Waiting for the USB ready. */
while ((s_cdcVcom.attach != 1) || (s_cdcVcom.startTransactions != 1))
{
- __NOP();
};
do
/* Waiting for data received by virtual com. */
while (s_recvSize <= 0)
{
- __NOP();
};
/* When receive request is error. */
/* Waiting for the USB ready and transfer started. */
while ((s_cdcVcom.attach != 1) || (s_cdcVcom.startTransactions != 1))
{
- __NOP();
};
s_recvSize = 0;
}
/* enable USB IP clock,user code. */
#endif /* USB_DEVICE_CONFIG_LPCIP3511HS */
}
+
+void
+USB0_IRQHandler (void)
+{
+ USB_DeviceKhciIsrFunction (s_cdcVcom.deviceHandle);
+}