; *************************************************************************** ; 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_GUI2_VALUELABEL_ASM #define AQH_AVR_GUI2_VALUELABEL_ASM ; *************************************************************************** ; defines ; IMGVIEW in flash .equ VLABEL_OFFS_VLABEL = WIDGET_SIZE .equ VLABEL_OFFS_POSTKOMMADIGITS = VLABEL_OFFS_VLABEL+0 .equ VLABEL_OFFS_RESERVED = VLABEL_OFFS_VLABEL+1 .equ VLABEL_SIZE = VLABEL_OFFS_VLABEL+2 ; SDRAM data for IMGVIEW .equ VLABEL_SD_OFFS_VLABEL = WIDGET_SD_SIZE .equ VLABEL_SD_OFFS_VALUE_LO = VLABEL_SD_OFFS_VLABEL+0 .equ VLABEL_SD_OFFS_VALUE_HI = VLABEL_SD_OFFS_VLABEL+1 .equ VLABEL_SD_SIZE = VLABEL_SD_OFFS_VLABEL+2 ; signals .equ VLABEL_SIGNAL_SETVALUE = WIDGET_SIGNAL_NEXTFREE+0 .equ VLABEL_SIGNAL_NEXTFREE = WIDGET_SIGNAL_NEXTFREE+1 ; *************************************************************************** ; code .cseg ; --------------------------------------------------------------------------- ; @routine ImageView_OnCreate @global ; ; @param Z byte address of widget object (for LPM!) ; @return CFLAG set if signal handled ; @clobbers any, !Z ValueLabel_OnCreate: bigcall Widget_OnCreate bigcall Widget_GetSdramPtr ; (none) clr r16 std Y+VLABEL_SD_OFFS_VALUE_LO, r16 std Y+VLABEL_SD_OFFS_VALUE_HI, r16 sec ret ; @end ; --------------------------------------------------------------------------- ; @routine ValueLabel_OnSetValue @global ; ; @param Z byte address of widget object (for LPM!) ; @param X new value for background color ; @return CFLAG set if signal handled ; @clobbers r17 ValueLabel_OnSetValue: bigcall OBJ_IsObject ; (none) brcc ValueLabel_OnSetValue_ret push zl push zh rcall Widget_GetSdramPtr ; (none) std Y+VLABEL_SD_OFFS_VALUE_LO, xl std Y+VLABEL_SD_OFFS_VALUE_HI, xh ldd r17, Y+WIDGET_SD_OFFS_FLAGS ori r17, (1<