Add keymap stub
This commit is contained in:
parent
5b7266b5f9
commit
0c60ede118
@ -4,7 +4,6 @@
|
||||
#include <ec/kbc.h>
|
||||
|
||||
void kbc_init(void);
|
||||
|
||||
void kbc_event(struct Kbc * kbc);
|
||||
|
||||
#endif // _BOARD_KBC_H
|
||||
|
@ -4,7 +4,6 @@
|
||||
#include <ec/kbscan.h>
|
||||
|
||||
void kbscan_init(void);
|
||||
|
||||
void kbscan_event(void);
|
||||
|
||||
#endif // _BOARD_KBSCAN_H
|
||||
|
8
src/board/system76/galp3-c/include/board/keymap.h
Normal file
8
src/board/system76/galp3-c/include/board/keymap.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef _BOARD_KEYMAP_H
|
||||
#define _BOARD_KEYMAP_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
uint16_t keymap(int layer, int output, int input);
|
||||
|
||||
#endif // _BOARD_KEYMAP_H
|
21
src/board/system76/galp3-c/keymap.c
Normal file
21
src/board/system76/galp3-c/keymap.c
Normal file
@ -0,0 +1,21 @@
|
||||
#include <board/keymap.h>
|
||||
|
||||
// Keymap layers (normal, Fn)
|
||||
#define KM_LAY 2
|
||||
// Keymap output pins
|
||||
#define KM_OUT 16
|
||||
// Keymap input pins
|
||||
#define KM_IN 8
|
||||
|
||||
uint16_t __code KEYMAP[KM_IN][KM_OUT][KM_LAY] = {
|
||||
// TODO
|
||||
{ { 0 } }
|
||||
};
|
||||
|
||||
uint16_t keymap(int layer, int output, int input) {
|
||||
if (layer < KM_LAY && output < KM_OUT && input < KM_IN) {
|
||||
return KEYMAP[input][output][layer];
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user