在NUC123SeriesBSP_CMSIS_V1.01.006\SampleCode\USB\Smpl_VCOM範例主程式中,我想透過PC串口來收發資料,程式會卡在 VCOM_MainProcess();
int main (void)
{
SYS_Init();
VCOM_MainProcess(); //en: Execute VCOM process
}
如果要在主程式中加一段程式UART_WRITE(UART0, 0x31);來傳送資料該如何設定?
int main (void)
{
SYS_Init();
VCOM_MainProcess(); //en: Execute VCOM process
UART_WRITE(UART0, 0x31);
}
/* Check if any data to send to USB & USB is ready to send them out */
if(comRbytes && (gu32TxSize == 0)) {
i32Len = comRbytes;
if(i32Len > EP2_MAX_PKT_SIZE)
i32Len = EP2_MAX_PKT_SIZE;