测试代码如下:
- while (1)
- {
- memcpy(TestBuff,"This message from VCP0n",23);
- USB2PC(TestBuff,23,CDC_IN_EP1);
- HAL_Delay(1000);
- memcpy(TestBuff,"This message from VCP1n",23);
- USB2PC(TestBuff,23,CDC_IN_EP3);
- HAL_Delay(1000);
- }
复制代码USB收发测试效果如下(点开查看大图):
测试代码如下:
- while (1)
- {
- memcpy(TestBuff,"This message from VCP0n",23);
- USB2PC(TestBuff,23,CDC_IN_EP1);
- HAL_Delay(1000);
- memcpy(TestBuff,"This message from VCP1n",23);
- USB2PC(TestBuff,23,CDC_IN_EP3);
- HAL_Delay(1000);
- memcpy(TestBuff,"This message from VCP2n",23);
- USB2PC(TestBuff,23,CDC_IN_EP5);
- HAL_Delay(1000);
- }
|