33 lines
920 B
Plaintext
33 lines
920 B
Plaintext
;;********************************************************************************
|
|
;; @module keypad4x4
|
|
;; @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
|
|
;; @ingroup drivers
|
|
;;********************************************************************************
|
|
.ifndef INCLUDE_KEYPAD
|
|
INCLUDE_KEYPAD = 1
|
|
.include "system.h65"
|
|
|
|
;;********************************************************************************
|
|
;; @brief 4x4 Matrix Keypad
|
|
;;********************************************************************************
|
|
.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
|
|
|