avr: new uart_bitbang module works now.
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
; @param %1 pointer to byte containing max number of buffers ever used
|
||||
; @param %2 pointer to byte containing number of buffers currently in use
|
||||
; @param %3 pointer to byte containing the write pointer
|
||||
; @param %4 pointer to routine to calculate buffer pos (e.g. uartBitbang_BufferPosToX)
|
||||
; @return CFLAG set if okay, clear otherwise
|
||||
; @return X pos to allocated buffer
|
||||
; @clobbers R16, R17, R21
|
||||
@@ -62,7 +63,7 @@ l0:
|
||||
clr r17 ; wraparound
|
||||
l1:
|
||||
sts @3, r17 ; store new writepos for next caller
|
||||
rcall COM2_BufferPosToX ; (R16, R17)
|
||||
rcall @4 ; *_BufferPosToX(R16, R17)
|
||||
out SREG, r21 ; restore global interrupt enable bit in SREG
|
||||
sec
|
||||
rjmp l_end
|
||||
|
||||
Reference in New Issue
Block a user