avr: added titled windows
This commit is contained in:
@@ -213,6 +213,14 @@ onEveryLoop:
|
||||
|
||||
|
||||
|
||||
test:
|
||||
#ifdef MODULES_GUI
|
||||
bigcall WinNetStats_Init
|
||||
#endif
|
||||
ret
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
@@ -223,6 +231,7 @@ onEveryLoop:
|
||||
|
||||
;.include "common/debug.asm"
|
||||
|
||||
.include "modules/lcd2/gui/titledwindow.asm"
|
||||
;.include "modules/lcd2/font/font2.asm"
|
||||
;.include "modules/lcd2/font/font3.asm"
|
||||
;.include "modules/lcd2/font/font16x26.asm"
|
||||
@@ -234,6 +243,9 @@ onEveryLoop:
|
||||
;.include "common/tree_t.asm"
|
||||
;.include "common/divide.asm"
|
||||
|
||||
.include "modules/lcd2/gui/style.asm"
|
||||
.include "win_netstats.asm"
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; defines for network interface
|
||||
@@ -245,93 +257,9 @@ onEveryLoop:
|
||||
|
||||
|
||||
|
||||
test:
|
||||
#ifdef MODULES_GUI
|
||||
ldi yl, LOW(mainWindow)
|
||||
ldi yh, HIGH(mainWindow)
|
||||
ldi zl, LOW(mainWindowInFlash*2);
|
||||
ldi zh, HIGH(mainWindowInFlash*2);
|
||||
ldi r17, WIN_SIZE
|
||||
testCopyWinLoop:
|
||||
lpm r16, Z+
|
||||
st Y+, r16
|
||||
dec r17
|
||||
brne testCopyWinLoop
|
||||
|
||||
ldi yl, LOW(mainWindow)
|
||||
ldi yh, HIGH(mainWindow)
|
||||
bigcall Window_Clear
|
||||
#if 1
|
||||
ldi zl, LOW(mainWindowTitle*2)
|
||||
ldi zh, HIGH(mainWindowTitle*2)
|
||||
; print title at 10/2
|
||||
ldi r16, 10
|
||||
mov r4, r16
|
||||
clr r5
|
||||
ldi r16, 2
|
||||
mov r6, r16
|
||||
clr r7
|
||||
bigcall Window_DrawTextFlash
|
||||
#else
|
||||
ldi zl, LOW(ili9341Font6x8_1*2)
|
||||
ldi zh, HIGH(ili9341Font6x8_1*2)
|
||||
|
||||
ldi r16, LOW(0b0000000000000000)
|
||||
mov r0, r16
|
||||
ldi r16, HIGH(0b0000000000000000)
|
||||
mov r1, r16
|
||||
|
||||
ldi r16, LOW(0b1111111111111111)
|
||||
mov r2, r16
|
||||
ldi r16, HIGH(0b1111111111111111)
|
||||
mov r3, r16
|
||||
|
||||
ldi r16, 10
|
||||
mov r4, r16
|
||||
clr r5
|
||||
ldi r16, 20
|
||||
mov r6, r16
|
||||
clr r7
|
||||
|
||||
ldi r16, 'A'
|
||||
bigcall Display_DrawChar
|
||||
|
||||
add r4, r18
|
||||
adc r5, r19
|
||||
|
||||
ldi r16, 'B'
|
||||
bigcall Display_DrawChar
|
||||
|
||||
#endif
|
||||
ret
|
||||
|
||||
|
||||
testHandler:
|
||||
ret
|
||||
|
||||
|
||||
#ifdef MODULES_GUI
|
||||
mainWindowInFlash:
|
||||
.dw testHandler ; handler
|
||||
.dw 0 ; X
|
||||
.dw 0 ; Y
|
||||
.dw DISPLAY_WIDTH
|
||||
.dw DISPLAY_HEIGHT
|
||||
; 0bRRRRRGGGGGGBBBBB
|
||||
.dw 0b0000000000011111 ; blue
|
||||
; .dw 0b1111100000000000 ; red
|
||||
.dw 0b1111111111111111 ; white
|
||||
.dw (ili9341Font6x8_1*2)
|
||||
|
||||
mainWindowTitle: .db "AQHOME", 0, 0
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
.dseg
|
||||
|
||||
mainWindow: .byte WIN_SIZE
|
||||
|
||||
heapStart:
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user