Replace multiple wait macros with calls (saves 10 bytes).
This commit is contained in:
@@ -80,7 +80,7 @@ COM2_SendPacketWithAttn:
|
||||
push r15
|
||||
in r15, SREG
|
||||
cli
|
||||
Utils_WaitNanoSecs COM_BIT_LENGTH, 0, r22 ; wait for one bit duration
|
||||
rcall com2WaitForOneBitLength ; wait for one bit duration (R22)
|
||||
; check for ATTN line: busy?
|
||||
cbi COM_PORT_ATTN, COM_PINNUM_ATTN ; disable pullup on ATTN
|
||||
cbi COM_DDR_ATTN, COM_PINNUM_ATTN ; set ATTN as input
|
||||
@@ -90,7 +90,7 @@ COM2_SendPacketWithAttn:
|
||||
|
||||
cbi COM_PORT_ATTN, COM_PINNUM_ATTN ; set ATTN low
|
||||
sbi COM_DDR_ATTN, COM_PINNUM_ATTN ; set ATTN as output
|
||||
Utils_WaitNanoSecs COM_BIT_LENGTH, 0, r22 ; wait for one bit duration
|
||||
rcall com2WaitForOneBitLength ; wait for one bit duration (R22)
|
||||
|
||||
adiw xh:xl, COM2_MSG_OFFS_MSGLEN
|
||||
ld r16, X
|
||||
@@ -122,6 +122,20 @@ COM2_SendPacketWithAttn_retNc:
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; wait for one bit length (minus cycles for call and ret).
|
||||
;
|
||||
; IN:
|
||||
; - nothing
|
||||
; OUT:
|
||||
; - nothing
|
||||
; REGS: r22
|
||||
|
||||
com2WaitForOneBitLength:
|
||||
Utils_WaitNanoSecs COM_BIT_LENGTH, 3+4, r22 ; wait for one bit duration (minus RCALL/RET)
|
||||
ret
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; send packet over wire, expects ATTN to be low.
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user