avr: added routines to write text from SDRAM
This commit is contained in:
@@ -461,7 +461,7 @@ Widget_SubFlags_ret:
|
||||
|
||||
Widget_Clear:
|
||||
rcall Widget_LoadDisplayRegs
|
||||
rcall Widget_MakeAbsPos ; (R16, R17)
|
||||
rcall Widget_MakeAbsPos ; (R16, R17)
|
||||
rcall Widget_GetSdramPtr ; (none)
|
||||
adiw zh:zl, WIDGET_OFFS_OPTS_LO ; get OPTS low
|
||||
lpm r14, Z
|
||||
@@ -671,6 +671,54 @@ Widget_DrawColoredTextFlash_loopEnd:
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_DrawTextSDRAM @global
|
||||
;
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
; @param R5:R4 X relative to widget
|
||||
; @param R7:R6 Y relative to widget
|
||||
; @param X pointer to text in SDRAM
|
||||
; @clobbers any, !Z
|
||||
|
||||
Widget_DrawTextSDRAM:
|
||||
rcall Widget_GetSdramPtr ; (none)
|
||||
rcall Widget_SelectColors ; (R16)
|
||||
rjmp Widget_DrawColoredTextSDRAM
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Widget_DrawColoredTextSDRAM @global
|
||||
;
|
||||
; @param Z byte address of widget object (for LPM!)
|
||||
; @param R1:R0 background color
|
||||
; @param R3:R2 foreground color
|
||||
; @param R5:R4 X relative to widget
|
||||
; @param R7:R6 Y relative to widget
|
||||
; @param X pointer to text in SDRAM
|
||||
; @clobbers any, !Z
|
||||
|
||||
Widget_DrawColoredTextSDRAM:
|
||||
rcall widgetCalcAbsPosAndBorders ; (R16, R17)
|
||||
Widget_DrawColoredTextSDRAM_loop:
|
||||
ld r16, X
|
||||
tst r16
|
||||
breq Widget_DrawColoredTextSDRAM_loopEnd
|
||||
push xl
|
||||
push xh
|
||||
rcall widgetDrawChar ; (any, !Y, !R6, !R7, !R8, !R9, !R10, !R11)
|
||||
pop xh
|
||||
pop xl
|
||||
brcc Widget_DrawColoredTextSDRAM_loopEnd
|
||||
adiw xh:xl, 1
|
||||
rjmp Widget_DrawColoredTextSDRAM_loop
|
||||
Widget_DrawColoredTextSDRAM_loopEnd:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine widgetCalcAbsPosAndBorders
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user