stm32l152re端点1发送 PC端bus hound接收,收到的第一字节和第二字节总是不对,请问是什么原因,假设Send_Buffer1[20]={1,2,3,4,5......20},接受到的为 x x 1 2... 18
这是代码,
void EP1_IN_Callback(void)
{
if(j<20)
{
*Send_Buffer = *(Send_Buffer1+j);
*(Send_Buffer+1) = *(Send_Buffer1+j+1);
USB_SIL_Write(EP1_IN, (uint8_t*) Send_Buffer, 2);
SetEPTxValid(ENDP1);
j = j+2;
if(j == 20)
{
j = 0;
*Send_Buffer = 0;
*(Send_Buffer+1) = 0;
}
}
|