avr: split code in multiple files and routines.
This commit is contained in:
@@ -74,11 +74,11 @@ com2ReceivePacketRaw_error:
|
||||
; - x : ptr to buffer to send
|
||||
; OUT:
|
||||
; - CFLAGS: set if okay, cleared otherwise (errorcode in R16)
|
||||
; REGS: R15, R16, R22 (R17, R21, X)
|
||||
; REGS: R16, R22 (R17, R21, X)
|
||||
|
||||
COM2_SendPacketWithAttn:
|
||||
in r15, SREG
|
||||
push r15
|
||||
in r15, SREG
|
||||
cli
|
||||
Utils_WaitNanoSecs COM_BIT_LENGTH, 0, r22 ; wait for one bit duration
|
||||
; check for ATTN line: busy?
|
||||
@@ -103,8 +103,8 @@ COM2_SendPacketWithAttn:
|
||||
cbi COM_DDR_ATTN, COM_PINNUM_ATTN ; release ATTN line (by setting direction to IN)
|
||||
brcc COM2_SendPacketWithAttn_ioError
|
||||
; packet successfully sent
|
||||
out SREG, r15
|
||||
pop r15
|
||||
out SREG, r15
|
||||
sec
|
||||
ret
|
||||
|
||||
|
||||
Reference in New Issue
Block a user