Added button handler, program selects

This commit is contained in:
true
2023-11-05 11:56:41 -08:00
parent 7013cac8f1
commit aa7bcf6c03
3 changed files with 111 additions and 0 deletions

25
include/btn.h Normal file
View File

@@ -0,0 +1,25 @@
#ifndef __INC_BTN_H
#define __INC_BTN_H
#include <stdint.h>
#define SR_CLK 0
#define SR_DAT 1
#define SR_LAT 16
#define BTN_STICK_UP (1 << 14)
#define BTN_STICK_DN (1 << 11)
#define BTN_STICK_LF (1 << 12)
#define BTN_STICK_RT (1 << 15)
#define BTN_STICK_SEL (1 << 13)
#define BTN_READ0 17
#define BTN_READ1 18
uint16_t btn_read();
#endif