Move EOT sentinel value outside of standard ascii range (0-127)

This commit is contained in:
2024-10-19 17:00:59 +02:00
parent 0e0adce477
commit 071779755b

View File

@@ -94,8 +94,8 @@ void RF_Transmit(const byte *data, int size)
SendByte(*head++); SendByte(*head++);
} }
// EOT sentinel // EOT sentinel marking the end
SendByte(0x04); SendByte(0xFF); // FF = 1111 1111
} }
int RF_Receive(byte *data, int size) int RF_Receive(byte *data, int size)
@@ -240,7 +240,7 @@ static void WriteBit(int val)
if (bit == 7) { if (bit == 7) {
// Check for EOT sentinel // Check for EOT sentinel
if (*rxhead == 0x04) { if (*rxhead == 0xFF) {
numdata -= 8; numdata -= 8;
rxdone = true; rxdone = true;
rxstate = S_IDLE; rxstate = S_IDLE;