Ringbuffer: clear first byte.
This commit is contained in:
@@ -63,6 +63,17 @@ RingBuffer_Alloc:
|
|||||||
RingBuffer_Alloc_l1:
|
RingBuffer_Alloc_l1:
|
||||||
std y+RINGBUFFER_OFFS_WRITEPOS, r19
|
std y+RINGBUFFER_OFFS_WRITEPOS, r19
|
||||||
mov r16, r20
|
mov r16, r20
|
||||||
|
|
||||||
|
; preset first byte (this is the length byte in COM module) with 0
|
||||||
|
push yl
|
||||||
|
push yh
|
||||||
|
clr r17
|
||||||
|
add yl, r16
|
||||||
|
adc yh, r17
|
||||||
|
st y+RINGBUFFER_OFFS_DATA, r17
|
||||||
|
pop yh
|
||||||
|
pop yl
|
||||||
|
|
||||||
out SREG, r21 ; restore global interrupt enable bit in SREG
|
out SREG, r21 ; restore global interrupt enable bit in SREG
|
||||||
sec
|
sec
|
||||||
ret
|
ret
|
||||||
|
|||||||
Reference in New Issue
Block a user