-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathlayout.h
46 lines (39 loc) · 867 Bytes
/
layout.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef LAYOUT_H_
#define LAYOUT_H_
#include <array>
#include <cstdint>
#include <span>
#include <stdexcept>
struct Keycode {
uint8_t keycode;
bool is_custom : 1;
uint8_t custom_info : 7;
};
struct GPIO {
uint8_t source; // in
uint8_t sink; // out
};
size_t GetKeyboardNumLayers();
size_t GetTotalNumGPIOs();
uint8_t GetGPIOPin(size_t gpio_idx);
size_t GetTotalScans();
uint8_t GetSourceGPIO(size_t scan_idx);
uint8_t GetSinkGPIO(size_t scan_idx);
bool IsSourceChange(size_t scan_idx);
Keycode GetKeycodeAtLayer(uint8_t layer, size_t scan_idx);
enum BuiltInCustomKeyCode {
// Do not change the order of the mouse buttons, nor adding new items in
// between mouse buttons.
MSE_L = 0,
MSE_R,
MSE_M,
MSE_BACK,
MSE_FORWARD,
LAYER_SWITCH,
ENTER_CONFIG,
CONFIG_SEL,
BOOTSEL,
REBOOT,
TOTAL_BUILT_IN_KC
};
#endif /* LAYOUT_H_ */