QMK/keyboards/betalupi_voyager/betalupi_voyager.h

88 lines
2.6 KiB
C
Raw Normal View History

2023-12-31 10:28:51 -08:00
#pragma once
#include "quantum.h"
extern bool mcp23018_leds[];
#define MCP23018_DEFAULT_ADDRESS 0b0100000
#define STATUS_LED_1(status) writePin(B5, (bool)status)
#define STATUS_LED_2(status) writePin(B4, (bool)status)
#define STATUS_LED_3(status) mcp23018_leds[0] = (bool)status
#define STATUS_LED_4(status) mcp23018_leds[1] = (bool)status
/*
// clang-format off
#define LAYOUT( \
k00, k01, k02, k03, k04, k05, k26, k27, k28, k29, k30, k31, \
k06, k07, k08, k09, k10, k11, k32, k33, k34, k35, k36, k37, \
k12, k13, k14, k15, k16, k17, k38, k39, k40, k41, k42, k43, \
k18, k19, k20, k21, k22, k23, k44, k45, k46, k47, k48, k49, \
k24, k25, k50, k51 \
)\
{ \
{ KC_NO, k00, k01, k02, k03, k04, k05 }, \
{ KC_NO, k06, k07, k08, k09, k10, k11 }, \
{ KC_NO, k12, k13, k14, k15, k16, k17 }, \
{ KC_NO, k18, k19, k20, k21, k22, KC_NO }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, k23, KC_NO, KC_NO }, \
{ k24, k25, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
\
{ k26, k27, k28, k29, k30, k31, KC_NO }, \
{ k32, k33, k34, k35, k36, k37, KC_NO }, \
{ k38, k39, k40, k41, k42, k43, KC_NO }, \
{ KC_NO, k45, k46, k47, k48, k49, KC_NO }, \
{ KC_NO, KC_NO, k44, KC_NO, KC_NO, KC_NO, KC_NO }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k50, k51 }, \
}
// clang-format on
*/
// clang-format off
#define LAYOUT( \
k00, k01, k02, k03, k04, k05, \
k06, k07, k08, k09, k10, k11, \
k12, k13, k14, k15, k16, k17, \
k18, k19, k20, k21, k22, k23, \
k24, k25, \
k26, k27, k28, k29, k30, k31, \
k32, k33, k34, k35, k36, k37, \
k38, k39, k40, k41, k42, k43, \
k44, k45, k46, k47, k48, k49, \
k50, k51 \
)\
{ \
{ KC_NO, k00, k01, k02, k03, k04, k05 }, \
{ KC_NO, k06, k07, k08, k09, k10, k11 }, \
{ KC_NO, k12, k13, k14, k15, k16, k17 }, \
{ KC_NO, k18, k19, k20, k21, k22, KC_NO }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, k23, KC_NO, KC_NO }, \
{ k24, k25, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
\
{ k26, k27, k28, k29, k30, k31, KC_NO }, \
{ k32, k33, k34, k35, k36, k37, KC_NO }, \
{ k38, k39, k40, k41, k42, k43, KC_NO }, \
{ KC_NO, k45, k46, k47, k48, k49, KC_NO }, \
{ KC_NO, KC_NO, k44, KC_NO, KC_NO, KC_NO, KC_NO }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k50, k51 }, \
}
// clang-format on
enum voyager_keycodes {
LED_LEVEL = SAFE_RANGE,
BETA_SAFE_RANGE,
};
typedef union {
uint32_t raw;
struct {
bool disable_layer_led : 1;
bool placeholder : 1;
bool led_level : 1;
uint8_t led_level_res : 2; // DO NOT REMOVE
};
} keyboard_config_t;
extern keyboard_config_t keyboard_config;
bool is_transport_connected(void);