receiving works again.
This commit is contained in:
@@ -78,7 +78,7 @@ uartBitbang_RawReceiveMsg:
|
||||
breq uartBitbang_RawReceiveMsg_forMe
|
||||
cpi r16, 0xff
|
||||
breq uartBitbang_RawReceiveMsg_forMe
|
||||
clr r16
|
||||
clr r16 ; not for me
|
||||
rjmp uartBitbang_RawReceiveMsg_clcRet
|
||||
uartBitbang_RawReceiveMsg_forMe:
|
||||
subi r19, 1
|
||||
@@ -87,10 +87,10 @@ uartBitbang_RawReceiveMsg_forMe:
|
||||
; read size of msg payload (e.g. number of msg bytes following minus CRC byte)
|
||||
rcall uartBitbang_ReceiveByte ; read byte (R16, R17, R20, R21, R22)
|
||||
brcc uartBitbang_RawReceiveMsg_eIo
|
||||
inc r16 ; account for crc byte
|
||||
subi r19, 1
|
||||
brcs uartBitbang_RawReceiveMsg_eBadSize
|
||||
st X+, r16 ; store msg payload size
|
||||
inc r16 ; account for crc byte
|
||||
sub r19, r16 ; check msg size against remaining buffer size
|
||||
brcs uartBitbang_RawReceiveMsg_eBadSize
|
||||
mov r19, r16
|
||||
|
||||
Reference in New Issue
Block a user