58 lines
1.4 KiB
NASM
58 lines
1.4 KiB
NASM
; ***************************************************************************
|
|
; 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_KEYPAD_NUM_ASM
|
|
#define AQH_AVR_GUI2_KEYPAD_NUM_ASM
|
|
|
|
|
|
|
|
; ***************************************************************************
|
|
; defines
|
|
|
|
|
|
|
|
; ***************************************************************************
|
|
; code
|
|
|
|
.cseg
|
|
|
|
|
|
|
|
; ---------------------------------------------------------------------------
|
|
; @routine NumKeyPad_new @global
|
|
;
|
|
; @return CFLAG set of okay, cleared otherwise
|
|
; @return Y address of newly created object
|
|
; @param X parent widget
|
|
; @param r16 value for OBJECT_OFFS_OPTS
|
|
; @param r17 value for WIDGET_OFFS_PACK
|
|
; @clobbers any
|
|
|
|
NumKeyPad_new:
|
|
ldi r20, 5 ; keys per row
|
|
ldi r21, 2 ; rows
|
|
ldi r22, LOW(numKeyPadKeys*2) ; key defs
|
|
ldi r23, HIGH(numKeyPadKeys*2)
|
|
bigjmp KeyPad_new
|
|
; @end
|
|
|
|
|
|
|
|
|
|
|
|
; ***************************************************************************
|
|
; data in FLASH
|
|
|
|
numKeyPadKeys:
|
|
.db '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 0, 0
|
|
|
|
|
|
|
|
#endif
|