我用的是USB虚拟串口,程序已经调通了,可以发送“STM32Vrtual”用上位机能接受到“STM32Vrtual”了,但是
我想发a[] 数组的数,为什么上位机只显示出来42个(这42个十六进制的数:48 4D 59 70 84 64 52 58 6B 5A 5A 67 6C 68 56 50 47 48 4A 4D 51 56 59 58 50 57 5A 5D 67 68 60 5D 5C 5C 55
57 5C 5D 58 52 53 4E 与数组a[]的前42个都能对应上),可是后面的就没有了,这么回事??
u8 a[] ={72,77,89,112,132,100,82,88,107,90,90,103,108,104,86,80,71,72,
74,77,81,86,89,88,80,87,90,93,103,104,96,93,92,92,85,87,92,93,88,82,83,
78,76,75,80,86,86,90,90,89,88,87,91,93,96,99,99,97,92,89,86,84,84,86,87,
84,83,81,80,79,79,84,88,91,92,93,92,91,90,91,94,96,96,94,93,89,84,82,82,
83,84,84,85,84,83,82,82,84,87,92,94,95,95,93,92,91,91,91,92,92,90,88,85,
82,80,81,82,83,85,86,86,85,85,87,89,91,94,95,95,94,92,90,89,88,89,89,89,
87,85,83,81,81,82,84,86,88,89,89,88,88,90,91,93,95,95,94,92,89,87,86,86,
86,86,86,85,83,82,82,82,85,87,89,91,91,91,90,91,91,92,93,93,92,90,89,86,
84,84,84,85,85,85,85,84,84,84,};
void USB_Send_Data(u8* data_buffer, u8 len)
{
count_in=len;
UserToPMABufferCopy(data_buffer, ENDP1_TXADDR, count_in);
SetEPTxCount(ENDP1, count_in);
SetEPTxValid(ENDP1);
} |