avr: introduce reference counter for network buffers.

This commit is contained in:
Martin Preuss
2025-08-18 18:03:24 +02:00
parent 0dc4a3a952
commit 9b1badb310
3 changed files with 57 additions and 6 deletions

View File

@@ -52,7 +52,7 @@ l_loop:
brcs l_loop
rjmp l_end ; use cleared CFLAG
l_foundfree:
ldi r16, 0x80 ; mark as used
ldi r16, 0x10 ; mark as used
st X, r16
mov r16, r17
sec ; set CFLAG, return bufnum in r16, pointre in X