跳转到内容

protocol::UartRxSync API

文档稀疏
符号
23
已记录
3
修订版本
0.1.0+855c407f828e

20 / 23 个公开 API 符号没有说明。

命名空间

1

1

protocol::UartRxSync

带帧头同步功能的串口接收器,基于中断和 DMA。 典型使用场景是固定帧格式传感器:先用中断逐字节找帧头,再交给 DMA 接收整帧剩余部分。 这样既能保持同步,也能减少每个字节都进中断带来的开销。

protocol/UartRxSync/UartRxSync.hpp:56

函数

12

protocol::UartRxSync::UartRxSync

                    protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::UartRxSync (UART_HandleTypeDef *huart)
                  

上游未提供说明。

protocol/UartRxSync/UartRxSync.hpp:62

protocol::UartRxSync::decode

                    virtual bool protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::decode (const uint8_t data[DecodeWithHeader ? FrameLen :FrameLen - HeaderLen])=0
                  

上游未提供说明。

protocol/UartRxSync/UartRxSync.hpp:198

protocol::UartRxSync::header

                    virtual const std::array< uint8_t, HeaderLen > & protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::header () const =0
                  

上游未提供说明。

protocol/UartRxSync/UartRxSync.hpp:197

protocol::UartRxSync::receiveCallback

                    void protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::receiveCallback ()
                  

上游未提供说明。

protocol/UartRxSync/UartRxSync.hpp:86

protocol::UartRxSync::~UartRxSync

                    virtual protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::~UartRxSync ()=default
                  

上游未提供说明。

protocol/UartRxSync/UartRxSync.hpp:63

枚举

1

protocol::UartRxSync::SyncState

上游未提供说明。

DMAActive
上游未提供说明。
Receiving
上游未提供说明。
Stopped
上游未提供说明。
WaitHead
上游未提供说明。
protocol/UartRxSync/UartRxSync.hpp:64

变量

5

protocol::UartRxSync::rx_buffer_

                    uint8_t protocol::UartRxSync< HeaderLen, FrameLen, DecodeWithHeader >::rx_buffer_[FrameLen] [FrameLen]
                  

上游未提供说明。

protocol/UartRxSync/UartRxSync.hpp:209

宏定义

2

UartRxSync_DefineCallback

Deprecated 旧式宏包装,建议直接使用类实例的回调注册方式。 这个宏保留主要是为了兼容旧代码,新的代码请直接调用 RegisterCallback 对应的能力。

protocol/UartRxSync/UartRxSync.hpp:40

文件

1

protocol/UartRxSync/UartRxSync.hpp

带帧头同步的 UART 接收器。 syhanjin 2026-02-01 通过“找帧头 + DMA 收剩余帧”来降低丢包风险,适合固定帧格式传感器。

protocol/UartRxSync/UartRxSync.hpp