Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d189582c1 | ||
|
|
c6b667623a | ||
|
|
d96380e654 | ||
|
|
7e80686f1e | ||
|
|
e967471c4f | ||
|
|
eca3f9d935 |
No files matched your search
+4
-1
@@ -231,13 +231,16 @@ endif
|
|||||||
# We can assume a ChibiOS target When MCU_FAMILY is defined since it's
|
# We can assume a ChibiOS target When MCU_FAMILY is defined since it's
|
||||||
# not used for LUFA
|
# not used for LUFA
|
||||||
ifdef MCU_FAMILY
|
ifdef MCU_FAMILY
|
||||||
FIRMWARE_FORMAT?=bin
|
|
||||||
PLATFORM=CHIBIOS
|
PLATFORM=CHIBIOS
|
||||||
|
PLATFORM_KEY=chibios
|
||||||
|
FIRMWARE_FORMAT?=bin
|
||||||
else ifdef ARM_ATSAM
|
else ifdef ARM_ATSAM
|
||||||
PLATFORM=ARM_ATSAM
|
PLATFORM=ARM_ATSAM
|
||||||
|
PLATFORM_KEY=arm_atsam
|
||||||
FIRMWARE_FORMAT=bin
|
FIRMWARE_FORMAT=bin
|
||||||
else
|
else
|
||||||
PLATFORM=AVR
|
PLATFORM=AVR
|
||||||
|
PLATFORM_KEY=avr
|
||||||
FIRMWARE_FORMAT?=hex
|
FIRMWARE_FORMAT?=hex
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ all: elf
|
|||||||
|
|
||||||
VPATH += $(COMMON_VPATH)
|
VPATH += $(COMMON_VPATH)
|
||||||
PLATFORM:=TEST
|
PLATFORM:=TEST
|
||||||
|
PLATFORM_KEY:=test
|
||||||
|
|
||||||
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
|
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
|
||||||
include tests/$(TEST)/rules.mk
|
include tests/$(TEST)/rules.mk
|
||||||
|
|||||||
+2
-10
@@ -35,11 +35,7 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
|||||||
MUSIC_ENABLE := 1
|
MUSIC_ENABLE := 1
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
|
||||||
SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c
|
SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c
|
||||||
ifeq ($(PLATFORM),AVR)
|
SRC += $(QUANTUM_DIR)/audio/audio_$(PLATFORM_KEY).c
|
||||||
SRC += $(QUANTUM_DIR)/audio/audio.c
|
|
||||||
else
|
|
||||||
SRC += $(QUANTUM_DIR)/audio/audio_arm.c
|
|
||||||
endif
|
|
||||||
SRC += $(QUANTUM_DIR)/audio/voices.c
|
SRC += $(QUANTUM_DIR)/audio/voices.c
|
||||||
SRC += $(QUANTUM_DIR)/audio/luts.c
|
SRC += $(QUANTUM_DIR)/audio/luts.c
|
||||||
endif
|
endif
|
||||||
@@ -315,11 +311,7 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
|
|||||||
else
|
else
|
||||||
SRC += $(QUANTUM_DIR)/backlight/backlight_driver_common.c
|
SRC += $(QUANTUM_DIR)/backlight/backlight_driver_common.c
|
||||||
ifeq ($(strip $(BACKLIGHT_DRIVER)), pwm)
|
ifeq ($(strip $(BACKLIGHT_DRIVER)), pwm)
|
||||||
ifeq ($(PLATFORM),AVR)
|
SRC += $(QUANTUM_DIR)/backlight/backlight_$(PLATFORM_KEY).c
|
||||||
SRC += $(QUANTUM_DIR)/backlight/backlight_avr.c
|
|
||||||
else
|
|
||||||
SRC += $(QUANTUM_DIR)/backlight/backlight_arm.c
|
|
||||||
endif
|
|
||||||
else
|
else
|
||||||
SRC += $(QUANTUM_DIR)/backlight/backlight_$(strip $(BACKLIGHT_DRIVER)).c
|
SRC += $(QUANTUM_DIR)/backlight/backlight_$(strip $(BACKLIGHT_DRIVER)).c
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -42,9 +42,13 @@ We've tried to make QMK as easy to set up as possible. You only have to prepare
|
|||||||
You will need to install MSYS2, Git, and the QMK CLI.
|
You will need to install MSYS2, Git, and the QMK CLI.
|
||||||
|
|
||||||
* Follow the installation instructions on the [MSYS2 homepage](http://www.msys2.org).
|
* Follow the installation instructions on the [MSYS2 homepage](http://www.msys2.org).
|
||||||
* Close any open MSYS2 terminals and open a new MSYS2 MinGW 64-bit terminal.
|
* Close any open MSYS2 terminals and open a new MSYS2 MinGW 64-bit terminal. NOTE: This is **not** the same as the MSYS terminal that opens when installation is completed.
|
||||||
|
|
||||||
After opening a new MSYS2 MinGW 64-bit terminal run these commands:
|
After opening a new MSYS2 MinGW 64-bit terminal, make sure `pacman` is up to date with:
|
||||||
|
|
||||||
|
pacman -Syu
|
||||||
|
|
||||||
|
You may be asked to close and reopen the window. Do this and keep running the above command until it says `there is nothing to do`. Then run the following:
|
||||||
|
|
||||||
pacman -S git python3-pip
|
pacman -S git python3-pip
|
||||||
python3 -m pip install qmk
|
python3 -m pip install qmk
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -30,4 +30,4 @@ SRC = keyboards/wilba_tech/wt_main.c \
|
|||||||
keyboards/wilba_tech/wt_rgb_backlight.c \
|
keyboards/wilba_tech/wt_rgb_backlight.c \
|
||||||
drivers/issi/is31fl3733.c \
|
drivers/issi/is31fl3733.c \
|
||||||
quantum/color.c \
|
quantum/color.c \
|
||||||
drivers/arm/i2c_master.c
|
drivers/chibios/i2c_master.c
|
||||||
@@ -28,4 +28,4 @@ SRC = keyboards/wilba_tech/wt_main.c \
|
|||||||
keyboards/wilba_tech/wt_rgb_backlight.c \
|
keyboards/wilba_tech/wt_rgb_backlight.c \
|
||||||
drivers/issi/is31fl3733.c \
|
drivers/issi/is31fl3733.c \
|
||||||
quantum/color.c \
|
quantum/color.c \
|
||||||
drivers/arm/i2c_master.c
|
drivers/chibios/i2c_master.c
|
||||||
@@ -30,4 +30,4 @@ SRC = keyboards/wilba_tech/wt_main.c \
|
|||||||
keyboards/wilba_tech/wt_rgb_backlight.c \
|
keyboards/wilba_tech/wt_rgb_backlight.c \
|
||||||
drivers/issi/is31fl3733.c \
|
drivers/issi/is31fl3733.c \
|
||||||
quantum/color.c \
|
quantum/color.c \
|
||||||
drivers/arm/i2c_master.c
|
drivers/chibios/i2c_master.c
|
||||||
@@ -30,4 +30,4 @@ SRC = keyboards/wilba_tech/wt_main.c \
|
|||||||
keyboards/wilba_tech/wt_rgb_backlight.c \
|
keyboards/wilba_tech/wt_rgb_backlight.c \
|
||||||
drivers/issi/is31fl3733.c \
|
drivers/issi/is31fl3733.c \
|
||||||
quantum/color.c \
|
quantum/color.c \
|
||||||
drivers/arm/i2c_master.c
|
drivers/chibios/i2c_master.c
|
||||||
@@ -41,6 +41,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
/* Encoders */
|
/* Encoders */
|
||||||
#define ENCODERS_PAD_A { F4, F6 }
|
#define ENCODERS_PAD_A { F4, F6 }
|
||||||
#define ENCODERS_PAD_B { F5, F7 }
|
#define ENCODERS_PAD_B { F5, F7 }
|
||||||
|
#define ENCODER_RESOLUTION 2
|
||||||
|
// if you want to reverse encoder direction
|
||||||
|
// #define ENCODER_DIRECTION_FLIP
|
||||||
|
|
||||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
#define DEBOUNCE 5
|
#define DEBOUNCE 5
|
||||||
|
|||||||
@@ -116,55 +116,55 @@ void encoder_update_user(uint8_t index, bool clockwise) {
|
|||||||
if (currentLayer % 2 == 0) {
|
if (currentLayer % 2 == 0) {
|
||||||
// default layer
|
// default layer
|
||||||
// Zoom
|
// Zoom
|
||||||
tap_code16(!clockwise ? G(KC_EQL) : G(KC_MINS));
|
tap_code16(!clockwise ? G(KC_MINS) : G(KC_EQL));
|
||||||
} else {
|
} else {
|
||||||
// Fn Layer
|
// Fn Layer
|
||||||
// rotate canvas
|
// rotate canvas
|
||||||
tap_code(!clockwise ? KC_QUOT : KC_MINS);
|
tap_code(!clockwise ? KC_MINS : KC_QUOT);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MAC_PS_1:
|
case MAC_PS_1:
|
||||||
if (currentLayer % 2 == 0) {
|
if (currentLayer % 2 == 0) {
|
||||||
// default layer
|
// default layer
|
||||||
// Zoom
|
// Zoom
|
||||||
tap_code16(!clockwise ? G(KC_EQL) : G(KC_MINS));
|
tap_code16(!clockwise ? G(KC_MINS) : G(KC_EQL));
|
||||||
} else {
|
} else {
|
||||||
// Fn Layer
|
// Fn Layer
|
||||||
// undo / redo
|
// undo / redo
|
||||||
tap_code16(!clockwise ? S(G(KC_Z)) : G(KC_Z));
|
tap_code16(!clockwise ? G(KC_Z) : S(G(KC_Z)));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WIN_CS_1:
|
case WIN_CS_1:
|
||||||
if (currentLayer % 2 == 0) {
|
if (currentLayer % 2 == 0) {
|
||||||
// default layer
|
// default layer
|
||||||
// Zoom
|
// Zoom
|
||||||
tap_code16(!clockwise ? C(KC_EQL) : C(KC_MINS));
|
tap_code16(!clockwise ? C(KC_MINS) : C(KC_EQL));
|
||||||
} else {
|
} else {
|
||||||
// Fn Layer
|
// Fn Layer
|
||||||
// rotate canvas
|
// rotate canvas
|
||||||
tap_code(!clockwise ? KC_QUOT : KC_MINS);
|
tap_code(!clockwise ? KC_MINS : KC_QUOT);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WIN_PS_1:
|
case WIN_PS_1:
|
||||||
if (currentLayer % 2 == 0) {
|
if (currentLayer % 2 == 0) {
|
||||||
// default layer
|
// default layer
|
||||||
// Zoom
|
// Zoom
|
||||||
tap_code16(!clockwise ? C(KC_SCLN) : C(KC_MINS));
|
tap_code16(!clockwise ? C(KC_MINS) : C(KC_SCLN));
|
||||||
} else {
|
} else {
|
||||||
// Fn Layer
|
// Fn Layer
|
||||||
// undo / redo
|
// undo / redo
|
||||||
tap_code16(!clockwise ? C(S(KC_Z)) : C(KC_Z));
|
tap_code16(!clockwise ? C(KC_Z) : C(S(KC_Z)));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IOS_CS_1:
|
case IOS_CS_1:
|
||||||
if (currentLayer % 2 == 0) {
|
if (currentLayer % 2 == 0) {
|
||||||
// default layer
|
// default layer
|
||||||
// Zoom
|
// Zoom
|
||||||
tap_code16(!clockwise ? G(KC_SCLN) : G(KC_MINS));
|
tap_code16(!clockwise ? G(KC_MINS) : G(KC_SCLN));
|
||||||
} else {
|
} else {
|
||||||
// Fn Layer
|
// Fn Layer
|
||||||
// rotate canvas
|
// rotate canvas
|
||||||
tap_code(!clockwise ? KC_EQL : KC_MINS);
|
tap_code(!clockwise ? KC_MINS : KC_EQL);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -176,55 +176,55 @@ void encoder_update_user(uint8_t index, bool clockwise) {
|
|||||||
if (currentLayer % 2 == 0) {
|
if (currentLayer % 2 == 0) {
|
||||||
// default layer
|
// default layer
|
||||||
// size of brush
|
// size of brush
|
||||||
tap_code(!clockwise ? KC_RBRC : KC_LBRC);
|
tap_code(!clockwise ? KC_LBRC : KC_RBRC);
|
||||||
} else {
|
} else {
|
||||||
// Fn Layer
|
// Fn Layer
|
||||||
// opacity of brush
|
// opacity of brush
|
||||||
tap_code16(!clockwise ? G(KC_RBRC) : G(KC_LBRC));
|
tap_code16(!clockwise ? G(KC_LBRC) : G(KC_RBRC));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MAC_PS_1:
|
case MAC_PS_1:
|
||||||
if (currentLayer % 2 == 0) {
|
if (currentLayer % 2 == 0) {
|
||||||
// default layer
|
// default layer
|
||||||
// size of brush
|
// size of brush
|
||||||
tap_code(!clockwise ? KC_RBRC : KC_LBRC);
|
tap_code(!clockwise ? KC_LBRC : KC_RBRC);
|
||||||
} else {
|
} else {
|
||||||
// Fn Layer
|
// Fn Layer
|
||||||
// opacity of brush
|
// opacity of brush
|
||||||
tap_code16(!clockwise ? KC_RCBR : KC_LCBR);
|
tap_code16(!clockwise ? KC_LCBR : KC_RCBR);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WIN_CS_1:
|
case WIN_CS_1:
|
||||||
if (currentLayer % 2 == 0) {
|
if (currentLayer % 2 == 0) {
|
||||||
// default layer
|
// default layer
|
||||||
// rotate canvas
|
// rotate canvas
|
||||||
tap_code(!clockwise ? KC_RBRC : KC_LBRC);
|
tap_code(!clockwise ? KC_LBRC : KC_RBRC);
|
||||||
} else {
|
} else {
|
||||||
// Fn Layer
|
// Fn Layer
|
||||||
// opacity of brush
|
// opacity of brush
|
||||||
tap_code16(!clockwise ? C(KC_RBRC) : C(KC_LBRC));
|
tap_code16(!clockwise ? C(KC_LBRC) : C(KC_RBRC));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WIN_PS_1:
|
case WIN_PS_1:
|
||||||
if (currentLayer % 2 == 0) {
|
if (currentLayer % 2 == 0) {
|
||||||
// default layer
|
// default layer
|
||||||
// rotate canvas
|
// rotate canvas
|
||||||
tap_code(!clockwise ? KC_RBRC : KC_LBRC);
|
tap_code(!clockwise ? KC_LBRC : KC_RBRC);
|
||||||
} else {
|
} else {
|
||||||
// Fn Layer
|
// Fn Layer
|
||||||
// opacity of brush
|
// opacity of brush
|
||||||
tap_code16(!clockwise ? KC_RCBR : KC_LCBR);
|
tap_code16(!clockwise ? KC_LCBR : KC_RCBR);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IOS_CS_1:
|
case IOS_CS_1:
|
||||||
if (currentLayer % 2 == 0) {
|
if (currentLayer % 2 == 0) {
|
||||||
// default layer
|
// default layer
|
||||||
// size of brush
|
// size of brush
|
||||||
tap_code(!clockwise ? KC_BSLS : KC_RBRC);
|
tap_code(!clockwise ? KC_RBRC : KC_BSLS);
|
||||||
} else {
|
} else {
|
||||||
// Fn Layer
|
// Fn Layer
|
||||||
// opacity of brush
|
// opacity of brush
|
||||||
tap_code16(!clockwise ? G(KC_BSLS) : G(KC_RBRC));
|
tap_code16(!clockwise ? G(KC_RBRC) : G(KC_BSLS));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ A left hand device with rotary encoder, for artists.
|
|||||||
|
|
||||||
* Keyboard Maintainer: [niltea](https://github.com/niltea)
|
* Keyboard Maintainer: [niltea](https://github.com/niltea)
|
||||||
* Hardware Supported: Palette1202
|
* Hardware Supported: Palette1202
|
||||||
* Hardware Availability: [Pixiv Booth](https://booth.pm/)
|
* Hardware Availability: [Pixiv Booth](https://niltea.booth.pm/)
|
||||||
* [PCB & Case](https://github.com/niltea/Palette1202)
|
* [PCB & Case](https://github.com/niltea/Palette1202)
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
#else
|
#else
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "drivers/arm/i2c_master.h"
|
#include "drivers/chibios/i2c_master.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(RGB_BACKLIGHT_DAWN60)
|
#if defined(RGB_BACKLIGHT_DAWN60)
|
||||||
|
|||||||
@@ -3,18 +3,18 @@
|
|||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#define LAYOUT( \
|
#define LAYOUT( \
|
||||||
K00, K01, K02, K03, K04, K05, K20, K21, K22, K23, K24, K25, \
|
K00, K01, K02, K03, K04, K05, K40, K41, K42, K43, K44, K45,\
|
||||||
K40, K41, K42, K43, K44, K45, K60, K61, K62, K63, K64, K65, \
|
K10, K11, K12, K13, K14, K15, K50, K51, K52, K53, K54, K55,\
|
||||||
K10, K11, K12, K13, K14, K15, K30, K31, K32, K33, K34, K35, \
|
K20, K21, K22, K23, K24, K25, K60, K61, K62, K63, K64, K65,\
|
||||||
K50, K51, K52, K53, K54, K55, K70, K71, K72, K73, K74, K75 \
|
K30, K31, K32, K33, K34, K35, K70, K71, K72, K73, K74, K75 \
|
||||||
) { \
|
) { \
|
||||||
{ K00, K01, K02, K03, K04, K05 }, \
|
{ K00, K01, K02, K03, K04, K05 }, \
|
||||||
{ K10, K11, K12, K13, K14, K15 }, \
|
{ K10, K11, K12, K13, K14, K15 }, \
|
||||||
{ K20, K21, K22, K23, K24, K25 }, \
|
{ K20, K21, K22, K23, K24, K25 }, \
|
||||||
{ K30, K31, K32, K33, K34, K35 }, \
|
{ K30, K31, K32, K33, K34, K35 }, \
|
||||||
{ K40, K41, K42, K43, K44, K45 }, \
|
{ K40, K41, K42, K43, K44, K45 }, \
|
||||||
{ K50, K51, K52, K53, K54, K55 }, \
|
{ K50, K51, K52, K53, K54, K55 }, \
|
||||||
{ K60, K61, K62, K63, K64, K65 }, \
|
{ K60, K61, K62, K63, K64, K65 }, \
|
||||||
{ K70, K71, K72, K73, K74, K75 } \
|
{ K70, K71, K72, K73, K74, K75 } \
|
||||||
}
|
}
|
||||||
|
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -179,7 +179,7 @@ HEX = $(OBJCOPY) -O $(FORMAT)
|
|||||||
EEP =
|
EEP =
|
||||||
BIN = $(OBJCOPY) -O binary
|
BIN = $(OBJCOPY) -O binary
|
||||||
|
|
||||||
COMMON_VPATH += $(DRIVER_PATH)/arm
|
COMMON_VPATH += $(DRIVER_PATH)/chibios
|
||||||
|
|
||||||
THUMBFLAGS = -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB
|
THUMBFLAGS = -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB
|
||||||
|
|
||||||
|
|||||||
+2
-12
@@ -1,13 +1,5 @@
|
|||||||
COMMON_DIR = common
|
COMMON_DIR = common
|
||||||
ifeq ($(PLATFORM),AVR)
|
PLATFORM_COMMON_DIR = $(COMMON_DIR)/$(PLATFORM_KEY)
|
||||||
PLATFORM_COMMON_DIR = $(COMMON_DIR)/avr
|
|
||||||
else ifeq ($(PLATFORM),CHIBIOS)
|
|
||||||
PLATFORM_COMMON_DIR = $(COMMON_DIR)/chibios
|
|
||||||
else ifeq ($(PLATFORM),ARM_ATSAM)
|
|
||||||
PLATFORM_COMMON_DIR = $(COMMON_DIR)/arm_atsam
|
|
||||||
else
|
|
||||||
PLATFORM_COMMON_DIR = $(COMMON_DIR)/test
|
|
||||||
endif
|
|
||||||
|
|
||||||
TMK_COMMON_SRC += $(COMMON_DIR)/host.c \
|
TMK_COMMON_SRC += $(COMMON_DIR)/host.c \
|
||||||
$(COMMON_DIR)/keyboard.c \
|
$(COMMON_DIR)/keyboard.c \
|
||||||
@@ -179,6 +171,4 @@ endif
|
|||||||
|
|
||||||
# Search Path
|
# Search Path
|
||||||
VPATH += $(TMK_PATH)/$(COMMON_DIR)
|
VPATH += $(TMK_PATH)/$(COMMON_DIR)
|
||||||
ifeq ($(PLATFORM),CHIBIOS)
|
VPATH += $(TMK_PATH)/$(PLATFORM_COMMON_DIR)
|
||||||
VPATH += $(TMK_PATH)/$(COMMON_DIR)/chibios
|
|
||||||
endif
|
|
||||||
@@ -562,8 +562,6 @@ void process_action(keyrecord_t *record, action_t action) {
|
|||||||
action_macro_play(action_get_macro(record, action.func.id, action.func.opt));
|
action_macro_play(action_get_macro(record, action.func.id, action.func.opt));
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case ACT_COMMAND:
|
|
||||||
break;
|
|
||||||
#ifdef SWAP_HANDS_ENABLE
|
#ifdef SWAP_HANDS_ENABLE
|
||||||
case ACT_SWAP_HANDS:
|
case ACT_SWAP_HANDS:
|
||||||
switch (action.swap.code) {
|
switch (action.swap.code) {
|
||||||
@@ -1041,9 +1039,6 @@ void debug_action(action_t action) {
|
|||||||
case ACT_MACRO:
|
case ACT_MACRO:
|
||||||
dprint("ACT_MACRO");
|
dprint("ACT_MACRO");
|
||||||
break;
|
break;
|
||||||
case ACT_COMMAND:
|
|
||||||
dprint("ACT_COMMAND");
|
|
||||||
break;
|
|
||||||
case ACT_FUNCTION:
|
case ACT_FUNCTION:
|
||||||
dprint("ACT_FUNCTION");
|
dprint("ACT_FUNCTION");
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -87,9 +87,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
* 1100|1111| id(8) Macro record?
|
* 1100|1111| id(8) Macro record?
|
||||||
*
|
*
|
||||||
* 1101|xxxx xxxx xxxx (reserved)
|
* 1101|xxxx xxxx xxxx (reserved)
|
||||||
*
|
* 1110|xxxx xxxx xxxx (reserved)
|
||||||
* ACT_COMMAND(1110):
|
|
||||||
* 1110|opt | id(8) Built-in Command exec
|
|
||||||
*
|
*
|
||||||
* ACT_FUNCTION(1111):
|
* ACT_FUNCTION(1111):
|
||||||
* 1111| address(12) Function?
|
* 1111| address(12) Function?
|
||||||
@@ -115,7 +113,6 @@ enum action_kind_id {
|
|||||||
ACT_LAYER_TAP_EXT = 0b1011, /* Layer 16-31 */
|
ACT_LAYER_TAP_EXT = 0b1011, /* Layer 16-31 */
|
||||||
/* Extensions */
|
/* Extensions */
|
||||||
ACT_MACRO = 0b1100,
|
ACT_MACRO = 0b1100,
|
||||||
ACT_COMMAND = 0b1110,
|
|
||||||
ACT_FUNCTION = 0b1111
|
ACT_FUNCTION = 0b1111
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -167,11 +164,6 @@ typedef union {
|
|||||||
uint8_t page : 2;
|
uint8_t page : 2;
|
||||||
uint8_t kind : 4;
|
uint8_t kind : 4;
|
||||||
} usage;
|
} usage;
|
||||||
struct action_command {
|
|
||||||
uint8_t id : 8;
|
|
||||||
uint8_t opt : 4;
|
|
||||||
uint8_t kind : 4;
|
|
||||||
} command;
|
|
||||||
struct action_function {
|
struct action_function {
|
||||||
uint8_t id : 8;
|
uint8_t id : 8;
|
||||||
uint8_t opt : 4;
|
uint8_t opt : 4;
|
||||||
@@ -287,8 +279,6 @@ enum layer_param_tap_op {
|
|||||||
#define ACTION_MACRO(id) ACTION(ACT_MACRO, (id))
|
#define ACTION_MACRO(id) ACTION(ACT_MACRO, (id))
|
||||||
#define ACTION_MACRO_TAP(id) ACTION(ACT_MACRO, FUNC_TAP << 8 | (id))
|
#define ACTION_MACRO_TAP(id) ACTION(ACT_MACRO, FUNC_TAP << 8 | (id))
|
||||||
#define ACTION_MACRO_OPT(id, opt) ACTION(ACT_MACRO, (opt) << 8 | (id))
|
#define ACTION_MACRO_OPT(id, opt) ACTION(ACT_MACRO, (opt) << 8 | (id))
|
||||||
/* Command */
|
|
||||||
#define ACTION_COMMAND(id, opt) ACTION(ACT_COMMAND, (opt) << 8 | (id))
|
|
||||||
/* Function */
|
/* Function */
|
||||||
enum function_opts {
|
enum function_opts {
|
||||||
FUNC_TAP = 0x8, /* indciates function is tappable */
|
FUNC_TAP = 0x8, /* indciates function is tappable */
|
||||||
|
|||||||
+68
-53
@@ -15,66 +15,83 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef REPORT_H
|
#pragma once
|
||||||
#define REPORT_H
|
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "keycode.h"
|
#include "keycode.h"
|
||||||
|
|
||||||
/* report id */
|
/* HID report IDs */
|
||||||
#define REPORT_ID_KEYBOARD 1
|
enum hid_report_ids {
|
||||||
#define REPORT_ID_MOUSE 2
|
REPORT_ID_KEYBOARD = 1,
|
||||||
#define REPORT_ID_SYSTEM 3
|
REPORT_ID_MOUSE,
|
||||||
#define REPORT_ID_CONSUMER 4
|
REPORT_ID_SYSTEM,
|
||||||
#define REPORT_ID_NKRO 5
|
REPORT_ID_CONSUMER,
|
||||||
|
REPORT_ID_NKRO
|
||||||
|
};
|
||||||
|
|
||||||
/* mouse buttons */
|
/* Mouse buttons */
|
||||||
#define MOUSE_BTN1 (1 << 0)
|
enum mouse_buttons {
|
||||||
#define MOUSE_BTN2 (1 << 1)
|
MOUSE_BTN1 = (1 << 0),
|
||||||
#define MOUSE_BTN3 (1 << 2)
|
MOUSE_BTN2 = (1 << 1),
|
||||||
#define MOUSE_BTN4 (1 << 3)
|
MOUSE_BTN3 = (1 << 2),
|
||||||
#define MOUSE_BTN5 (1 << 4)
|
MOUSE_BTN4 = (1 << 3),
|
||||||
|
MOUSE_BTN5 = (1 << 4)
|
||||||
|
};
|
||||||
|
|
||||||
/* Consumer Page(0x0C)
|
// clang-format off
|
||||||
* following are supported by Windows: http://msdn.microsoft.com/en-us/windows/hardware/gg463372.aspx
|
|
||||||
* see also https://docs.microsoft.com/en-us/windows-hardware/drivers/hid/display-brightness-control
|
/* Consumer Page (0x0C)
|
||||||
|
*
|
||||||
|
* See https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf#page=75
|
||||||
*/
|
*/
|
||||||
#define AUDIO_MUTE 0x00E2
|
enum consumer_usages {
|
||||||
#define AUDIO_VOL_UP 0x00E9
|
// 15.5 Display Controls (https://www.usb.org/sites/default/files/hutrr41_0.pdf)
|
||||||
#define AUDIO_VOL_DOWN 0x00EA
|
BRIGHTNESS_UP = 0x06F,
|
||||||
#define TRANSPORT_NEXT_TRACK 0x00B5
|
BRIGHTNESS_DOWN = 0x070,
|
||||||
#define TRANSPORT_PREV_TRACK 0x00B6
|
// 15.7 Transport Controls
|
||||||
#define TRANSPORT_STOP 0x00B7
|
TRANSPORT_RECORD = 0x0B2,
|
||||||
#define TRANSPORT_STOP_EJECT 0x00CC
|
TRANSPORT_FAST_FORWARD = 0x0B3,
|
||||||
#define TRANSPORT_PLAY_PAUSE 0x00CD
|
TRANSPORT_REWIND = 0x0B4,
|
||||||
#define BRIGHTNESS_UP 0x006F
|
TRANSPORT_NEXT_TRACK = 0x0B5,
|
||||||
#define BRIGHTNESS_DOWN 0x0070
|
TRANSPORT_PREV_TRACK = 0x0B6,
|
||||||
/* application launch */
|
TRANSPORT_STOP = 0x0B7,
|
||||||
#define AL_CC_CONFIG 0x0183
|
TRANSPORT_EJECT = 0x0B8,
|
||||||
#define AL_EMAIL 0x018A
|
TRANSPORT_STOP_EJECT = 0x0CC,
|
||||||
#define AL_CALCULATOR 0x0192
|
TRANSPORT_PLAY_PAUSE = 0x0CD,
|
||||||
#define AL_LOCAL_BROWSER 0x0194
|
// 15.9.1 Audio Controls - Volume
|
||||||
/* application control */
|
AUDIO_MUTE = 0x0E2,
|
||||||
#define AC_SEARCH 0x0221
|
AUDIO_VOL_UP = 0x0E9,
|
||||||
#define AC_HOME 0x0223
|
AUDIO_VOL_DOWN = 0x0EA,
|
||||||
#define AC_BACK 0x0224
|
// 15.15 Application Launch Buttons
|
||||||
#define AC_FORWARD 0x0225
|
AL_CC_CONFIG = 0x183,
|
||||||
#define AC_STOP 0x0226
|
AL_EMAIL = 0x18A,
|
||||||
#define AC_REFRESH 0x0227
|
AL_CALCULATOR = 0x192,
|
||||||
#define AC_BOOKMARKS 0x022A
|
AL_LOCAL_BROWSER = 0x194,
|
||||||
/* supplement for Bluegiga iWRAP HID(not supported by Windows?) */
|
AL_LOCK = 0x19E,
|
||||||
#define AL_LOCK 0x019E
|
// 15.16 Generic GUI Application Controls
|
||||||
#define TRANSPORT_RECORD 0x00B2
|
AC_MINIMIZE = 0x206,
|
||||||
#define TRANSPORT_FAST_FORWARD 0x00B3
|
AC_SEARCH = 0x221,
|
||||||
#define TRANSPORT_REWIND 0x00B4
|
AC_HOME = 0x223,
|
||||||
#define TRANSPORT_EJECT 0x00B8
|
AC_BACK = 0x224,
|
||||||
#define AC_MINIMIZE 0x0206
|
AC_FORWARD = 0x225,
|
||||||
|
AC_STOP = 0x226,
|
||||||
|
AC_REFRESH = 0x227,
|
||||||
|
AC_BOOKMARKS = 0x22A
|
||||||
|
};
|
||||||
|
|
||||||
/* Generic Desktop Page(0x01) - system power control */
|
/* Generic Desktop Page (0x01)
|
||||||
#define SYSTEM_POWER_DOWN 0x0081
|
*
|
||||||
#define SYSTEM_SLEEP 0x0082
|
* See https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf#page=26
|
||||||
#define SYSTEM_WAKE_UP 0x0083
|
*/
|
||||||
|
enum desktop_usages {
|
||||||
|
// 4.5.1 System Controls - Power Controls
|
||||||
|
SYSTEM_POWER_DOWN = 0x81,
|
||||||
|
SYSTEM_SLEEP = 0x82,
|
||||||
|
SYSTEM_WAKE_UP = 0x83
|
||||||
|
};
|
||||||
|
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
#define NKRO_SHARED_EP
|
#define NKRO_SHARED_EP
|
||||||
/* key report size(NKRO or boot mode) */
|
/* key report size(NKRO or boot mode) */
|
||||||
@@ -253,5 +270,3 @@ void clear_keys_from_report(report_keyboard_t* keyboard_report);
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
|
||||||
Reference in new issue
Block a user