你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

HAL庫 UART中斷接收問題

[复制链接]
天天地天天 提问时间:2017-7-11 15:49 /
調回函數,這樣用,我只能收到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);
        }
}

收藏 评论0 发布时间:2017-7-11 15:49

举报

0个回答

所属标签

相似问题

关于意法半导体
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
招聘信息
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
关注我们
st-img 微信公众号
st-img 手机版