在线时间76 小时
UID3388682
ST金币0
蝴蝶豆0
注册时间2017-5-23
高级会员
- 最后登录
- 2020-10-23
|
a0a.1 32b0c
調回函數,這樣用,我只能收到1次字串後我就再也收不到下次字串了,請問這會是什麼原因呢?找了好幾天就是沒找到原因....
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
/* Prevent unused argument(s) compilation warning */
//UNUSED(huart);
/* NOTE : This function should not be modified, when the callback is needed,
the HAL_UART_RxCpltCallback can be implemented in the user file.
*/
if(huart->Instance == USART1)
{
Uart1.write = (++Uart1.write == uart1_buffer_size) ? 0 : Uart1.write;
Uart1.buffer[Uart1.write] = Uart1.Rx_buffer[0];
HAL_UART_Receive_IT(&huart1,(uint8_t*)Uart1.Rx_buffer,1);
}
}
|
|