![]() If an ETX is received, it assumes the next character is the check-sum. ![]() Once the STX is received it reads characters, adding them to the message buffer and calculating the check-sum. The link may be broken and re-established, so a receiving MCU should be able to start receiving mid-packet, and have a simple way of telling when the next packet has begun, so it can ignore data until the end of that partial packet. The function receiveMessage reads from the serial port, discarding all characters until it receives a STX.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |