avr: new uart_bitbang module works now.

This commit is contained in:
Martin Preuss
2024-10-20 23:09:24 +02:00
parent c90c33ec11
commit efc91241d9
8 changed files with 137 additions and 318 deletions

View File

@@ -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