void VCOM_GetInData(uint8_t *pu8EpBuf)
{
uint8_t u8KeyValue=0;
uint8_t i;
char KeyValue[16]="Key Value:";
u8KeyValue = 10;
for(i=0;i<8;i++)
{
*rcv_buf=0x30+i;
rcv_buf++;
}
if(u8KeyValue != 0)
{
u8KeyValue = 0x31;
gsVcomDevice.u32DataSize = 8;
pu8EpBuf = rcv_buf;
//gsVcomDevice.pu8Data = &u8KeyValue;
//pu8EpBuf[0] = 0x30 + u8KeyValue;
DrvUSB_DataIn(BULK_IN_EP_NUM, pu8EpBuf, gsVcomDevice.u32DataSize);
}
else
DrvUSB_DataIn(BULK_IN_EP_NUM, pu8EpBuf, 0);
}
例子中是一次发一个字节的例子,我想改成一次发8个,但是为什么不行,谢谢 |