6502-OS/system/keypad.h65

33 lines
914 B
Plaintext
Raw Normal View History

2024-08-08 20:15:50 +02:00
;;********************************************************************************
2024-08-08 21:11:25 +02:00
;; @file
;; @brief 4x4 Matrix Keypad driver
2024-08-08 20:15:50 +02:00
;; @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
2024-08-08 20:39:25 +02:00
;; @ingroup drivers
2024-08-08 20:15:50 +02:00
;;********************************************************************************
2023-12-08 22:56:35 +01:00
.ifndef INCLUDE_KEYPAD
INCLUDE_KEYPAD = 1
.include "system.h65"
2024-08-08 20:15:50 +02:00
;;********************************************************************************
;; @brief 4x4 Matrix Keypad
;;********************************************************************************
2023-12-08 22:56:35 +01:00
.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