summaryrefslogtreecommitdiff
path: root/src/keypad.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/keypad.c')
-rw-r--r--src/keypad.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/keypad.c b/src/keypad.c
index 2ff7be4..e0073e9 100644
--- a/src/keypad.c
+++ b/src/keypad.c
@@ -1,5 +1,6 @@
#include "keypad.h"
+/// @brief Define you keymaps here
int map[]={
KEY_X, // 0
KEY_ONE, // 1
@@ -19,6 +20,12 @@ int map[]={
KEY_V // F
};
+/**
+ * @brief Get hex from keycode (used only in this file)
+ *
+ * @param keycode
+ * @return int
+ */
int KeypadGetKey(int keycode){
for(int i=0;i<16;i++){
if(map[i]==keycode)
@@ -27,7 +34,6 @@ int KeypadGetKey(int keycode){
return -1;
}
-
int KeypadGetPressed(){
for(int i=0;i<16;i++){
if(IsKeyDown(map[i]))