Debugging.
This commit is contained in:
34
avr/main.asm
34
avr/main.asm
@@ -17,7 +17,7 @@
|
||||
; ---------------------------------------------------------------------------
|
||||
; COM module
|
||||
|
||||
.equ COM_BIT_LENGTH = 52000 ; 104000=9600, 52000=19200, 26000=38400
|
||||
.equ COM_BIT_LENGTH = 104000 ; 104000=9600, 52000=19200, 26000=38400
|
||||
|
||||
.equ COM_RINGBUFFER_SIZE = 32 ; 32 bytes for now
|
||||
|
||||
@@ -121,6 +121,10 @@ main:
|
||||
ldi yl, LOW(ledA3Sram)
|
||||
ldi yh, HIGH(ledA3Sram)
|
||||
rcall Led_SetPattern
|
||||
|
||||
ldi r17, 219 ; debug
|
||||
rcall COM_EnqueuePing ; debug
|
||||
|
||||
|
||||
main_loop:
|
||||
rcall runModulesUntilIdle
|
||||
@@ -161,6 +165,8 @@ initModules:
|
||||
ldi yl, LOW(ledA3Sram)
|
||||
ldi yh, HIGH(ledA3Sram)
|
||||
rcall Led_Init
|
||||
|
||||
rcall Com_Init
|
||||
ret
|
||||
|
||||
|
||||
@@ -182,9 +188,9 @@ runModulesUntilIdle_Timer: ; repeat this block for every module with run f
|
||||
rcall Timer_Run ;
|
||||
brcs runModulesUntilIdle_Timer ;
|
||||
|
||||
runModulesUntilIdle_Com:
|
||||
rcall Com_Run
|
||||
brcs runModulesUntilIdle_Com
|
||||
;runModulesUntilIdle_Com:
|
||||
; rcall Com_Run
|
||||
; brcs runModulesUntilIdle_Com
|
||||
|
||||
ret
|
||||
|
||||
@@ -227,6 +233,26 @@ onEvery100ms:
|
||||
; USED: depending on called routines
|
||||
|
||||
onEverySecond:
|
||||
; ldi r17, 219
|
||||
; rcall COM_EnqueuePing
|
||||
|
||||
in r15, SREG ; debug
|
||||
cli
|
||||
push r15
|
||||
ldi r18, 0
|
||||
rcall comSendPacketRaw
|
||||
pop r15
|
||||
out SREG, r15
|
||||
|
||||
|
||||
; in r15, SREG ; debug
|
||||
; cli
|
||||
; push r15
|
||||
; ldi r16, 219
|
||||
; rcall comSendByte ; 1101 1011
|
||||
; pop r15
|
||||
; out SREG, r15
|
||||
|
||||
ret
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user