gui: started working on keypads.
This commit is contained in:
57
avr/modules/lcd2/gui/base/keypad_num.asm
Normal file
57
avr/modules/lcd2/gui/base/keypad_num.asm
Normal file
@@ -0,0 +1,57 @@
|
||||
; ***************************************************************************
|
||||
; 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
|
||||
Reference in New Issue
Block a user