diff --git a/avr/devices/c03/test/w_mainmenu.asm b/avr/devices/c03/test/w_mainmenu.asm new file mode 100644 index 0000000..b5cc8ec --- /dev/null +++ b/avr/devices/c03/test/w_mainmenu.asm @@ -0,0 +1,133 @@ +; *************************************************************************** +; copyright : (C) 2026 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + +#ifndef AQH_AVR_W_MAINMENU_ASM +#define AQH_AVR_W_MAINMENU_ASM + + +; *************************************************************************** +; defines + +.equ MAINMENU_OFFS_BEGIN = WIDGET_SIZE +.equ MAINMENU_SIZE = MAINMENU_OFFS_BEGIN+0 + +.equ MAINMENU_SIGNAL_CLIMATE = WIDGET_SIGNAL_NEXTFREE+0 +.equ MAINMENU_SIGNAL_LIGHT = WIDGET_SIGNAL_NEXTFREE+1 +.equ MAINMENU_SIGNAL_WINDOWS = WIDGET_SIGNAL_NEXTFREE+2 +.equ MAINMENU_SIGNAL_DEBUG = WIDGET_SIGNAL_NEXTFREE+3 +.equ MAINMENU_SIGNAL_NEXTFREE = WIDGET_SIGNAL_NEXTFREE+4 + + +.equ MAINMENU_SEL_CLIMATE = 1 +.equ MAINMENU_SEL_LIGHT = 2 +.equ MAINMENU_SEL_WINDOWS = 3 +.equ MAINMENU_SEL_DEBUG = 4 + + +; *************************************************************************** +; code + +.cseg + + + +; --------------------------------------------------------------------------- +; @routine MainMenu_new +; +; @param X pointer to parent window +; @return CFLAG set of okay, cleared otherwise +; @return Y address of newly created object + + +MainMenu_new: + ; create HLayout + ldi r16, 0 ; OPTS + ldi r17, (WIDGET_PACK_FILLED<