类
查看源码protocol::UartRxSync
带帧头同步功能的串口接收器,基于中断和 DMA。 典型使用场景是固定帧格式传感器:先用中断逐字节找帧头,再交给 DMA 接收整帧剩余部分。 这样既能保持同步,也能减少每个字节都进中断带来的开销。
构造与析构
2UartRxSync
protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::UartRxSync (UART_HandleTypeDef *huart, Buffer &buffer)
上游未提供说明。
protocol/UartRxSync/UartRxSync.hpp:65~UartRxSync
virtual protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::~UartRxSync ()=default
上游未提供说明。
protocol/UartRxSync/UartRxSync.hpp:69成员函数
10_decode
void protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::_decode ()
上游未提供说明。
protocol/UartRxSync/UartRxSync.hpp:236check_header
bool protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::check_header ()
上游未提供说明。
protocol/UartRxSync/UartRxSync.hpp:219decode
virtual bool protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::decode (const uint8_t data[DecodeWithHeader ? FrameLen :FrameLen - HeaderLen])=0
上游未提供说明。
protocol/UartRxSync/UartRxSync.hpp:203errorHandler
void protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::errorHandler ()
上游未提供说明。
protocol/UartRxSync/UartRxSync.hpp:149header
virtual const std::array< uint8_t, HeaderLen > & protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::header () const =0
上游未提供说明。
protocol/UartRxSync/UartRxSync.hpp:202huart
UART_HandleTypeDef * protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::huart () const
上游未提供说明。
protocol/UartRxSync/UartRxSync.hpp:199isConnected
bool protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::isConnected () const
上游未提供说明。
protocol/UartRxSync/UartRxSync.hpp:193receiveCallback
void protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::receiveCallback ()
上游未提供说明。
protocol/UartRxSync/UartRxSync.hpp:92startReceive
bool protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::startReceive ()
上游未提供说明。
protocol/UartRxSync/UartRxSync.hpp:82timeout
virtual uint32_t protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::timeout () const
上游未提供说明。
protocol/UartRxSync/UartRxSync.hpp:205成员变量
5hdr_idx_
size_t protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::hdr_idx_
上游未提供说明。
protocol/UartRxSync/UartRxSync.hpp:216huart_
UART_HandleTypeDef* protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::huart_
上游未提供说明。
protocol/UartRxSync/UartRxSync.hpp:208rx_buffer_
Buffer& protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::rx_buffer_
上游未提供说明。
protocol/UartRxSync/UartRxSync.hpp:214state_
SyncState protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::state_
上游未提供说明。
protocol/UartRxSync/UartRxSync.hpp:210watchdog_
service::Watchdog protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::watchdog_
上游未提供说明。
protocol/UartRxSync/UartRxSync.hpp:212嵌套类型
2Buffer
using protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::Buffer = memory::DMABuffer<FrameLen>
上游未提供说明。
protocol/UartRxSync/UartRxSync.hpp:63SyncState
上游未提供说明。
DMAActive- 上游未提供说明。
Receiving- 上游未提供说明。
Stopped- 上游未提供说明。
WaitHead- 上游未提供说明。