6502-OS/system/keypad.h65

30 lines
712 B
Plaintext

;********************************************************************************
; @module keypad4x4
; @type driver
; @device 4x4 Matrix Keypad
; @details
; The LCD must be connected to a W65C22N Interface Chip:
; - IO.RA0-7 ->
; @requires KP_IO: Base Address of IO Chip
; @depends IO-W65C22N
;********************************************************************************
.ifndef INCLUDE_KEYPAD
INCLUDE_KEYPAD = 1
.include "system.h65"
.scope kp
KP_IO = IO2
; .import KP_IO
; .ifndef KP_IO
; .fatal "KP_IO is not defined: set it to the base address of the IO chip of the Keypad"
; .endif
Import kp, init, read_irq, read
ImportZp kp,_DEBUG_VAL
BUF_SIZE = 10
.endscope
.endif ; guard