Skip to content

当使用从机的RTU时,当数据中包含0x0A,数据前会被插入0x0D,导致数据传输出错! #60

@wickman19760418

Description

@wickman19760418

由于 rtthread 的 serial.c 驱动程序的“_serial_poll_tx”函数中,会在转义字符"\n"前,插入"\r";而RTU模式中的数据中极有可能包含“0x0A”,因此容易导致发送的数据中被插入了“0x0D”,从而导致主机端校验出错!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions