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

@@ -34,16 +34,7 @@ CPRO_WriteReportValue:
; set msg id
adiw xh:xl, CPRO_PACKET_VALUE_OFFS_MSGID
ldi r18, 1
lds r16, com2LastMsgId
lds r17, com2LastMsgId+1
add r16, r18
dec r18
adc r17, r18
sts com2LastMsgId, r16
sts com2LastMsgId+1, r17
st X+, r16
st X+, r17
rcall COM2_AddNextMsgIdToBuffer ; (r16, r17, r18)
sbiw xh:xl, CPRO_PACKET_VALUE_OFFS_MSGID+2 ; go back to begin of msg
; calc and add checksum