avr: fixed clobber lists.
This commit is contained in:
@@ -35,10 +35,10 @@ com2CalcAndAddChecksumByte:
|
|||||||
; - X : pointer to packet buffer
|
; - X : pointer to packet buffer
|
||||||
; OUT:
|
; OUT:
|
||||||
; - CFLAG: set if okay, clear otherwise
|
; - CFLAG: set if okay, clear otherwise
|
||||||
; MODIFIED REGS: R16, R17 (R18, R20, X)
|
; MODIFIED REGS: R16, R17 (R18, R19, R20, X)
|
||||||
|
|
||||||
com2CheckMessageInBuffer:
|
com2CheckMessageInBuffer:
|
||||||
rcall com2CalcMsgChecksum ; R16, R18, (R17, R20, X)
|
rcall com2CalcMsgChecksum ; (R16, R17, R18, R19, R20, X)
|
||||||
ld r17, X
|
ld r17, X
|
||||||
cp r16, r17 ; should be equal
|
cp r16, r17 ; should be equal
|
||||||
brne com2CheckMessageInBuffer_error
|
brne com2CheckMessageInBuffer_error
|
||||||
@@ -58,7 +58,7 @@ com2CheckMessageInBuffer_error:
|
|||||||
; @return r16 crc8 checksum
|
; @return r16 crc8 checksum
|
||||||
; @return X points to position of checksum byte
|
; @return X points to position of checksum byte
|
||||||
; @param X pointer to packet buffer (points to checksum byte upon return)
|
; @param X pointer to packet buffer (points to checksum byte upon return)
|
||||||
; @clobbers R16, R18, R19, (R17, R20, X)
|
; @clobbers R16, R18 (R17, R19, R20, X)
|
||||||
|
|
||||||
com2CalcMsgChecksum:
|
com2CalcMsgChecksum:
|
||||||
adiw xh:xl, COM2_MSG_OFFS_MSGLEN
|
adiw xh:xl, COM2_MSG_OFFS_MSGLEN
|
||||||
@@ -79,8 +79,7 @@ com2CalcMsgChecksum:
|
|||||||
; @return X points directly after last checked byte
|
; @return X points directly after last checked byte
|
||||||
; @param X pointer to data to calc crc8 for
|
; @param X pointer to data to calc crc8 for
|
||||||
; @param r18 number of bytes to calc crc8 for
|
; @param r18 number of bytes to calc crc8 for
|
||||||
; @param r19 polynomial to use
|
; @clobbers: R16, R17, R18, R19, R20, X
|
||||||
; @clobbers: R16, R17, R18, R20, X
|
|
||||||
|
|
||||||
com2CrcCalc:
|
com2CrcCalc:
|
||||||
ldi r16, 0xff ; start crc
|
ldi r16, 0xff ; start crc
|
||||||
|
|||||||
Reference in New Issue
Block a user