avr: move ds18b20 screen code into module file.
This commit is contained in:
46
avr/main.asm
46
avr/main.asm
@@ -233,7 +233,7 @@ initialWait:
|
||||
initialWait_l1: ; wait R16 x 10 milliseconds
|
||||
ldi r17, 200
|
||||
initialWait_l2: ; wait for 10ms
|
||||
Utils_WaitNanoSecs 50000, 0, r22 ; wait for 50 microseconds
|
||||
rcall Utils_WaitFor50MicroSecs ; (R22)
|
||||
dec r17
|
||||
brne initialWait_l2
|
||||
dec r16
|
||||
@@ -241,47 +241,3 @@ initialWait_l2: ; wait for 10ms
|
||||
ret
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef MODULES_DS18B20
|
||||
printDs:
|
||||
in r15, SREG ; debug
|
||||
push r15
|
||||
cli
|
||||
ldi r18, 0
|
||||
ldi r19, 2
|
||||
rcall LCD_SetCursor
|
||||
|
||||
ldi zl, LOW(textDs18b20)
|
||||
ldi zh, HIGH(textDs18b20)
|
||||
rcall LCD_PrintFromFlash
|
||||
|
||||
ldi xl, LOW(ds18b20DataBuffer)
|
||||
ldi xh, HIGH(ds18b20DataBuffer)
|
||||
ldi r23, 9
|
||||
printDs_loop1:
|
||||
ld r16, X+
|
||||
rcall LCD_PrintHexByte
|
||||
|
||||
ldi r16, 32
|
||||
rcall LCD_PrintChar
|
||||
dec r23
|
||||
brne printDs_loop1
|
||||
pop r15
|
||||
out SREG, r15
|
||||
ret
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef MODULES_SI7021
|
||||
# ifdef MODULES_LCD
|
||||
textDs18b20: .db "Rec: ", 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user