Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
37c2996137 | ||
|
|
54503168c9 | ||
|
|
23186d32a3 | ||
|
|
12cdcd5e10 | ||
|
|
86d59f1034 | ||
|
|
c427023b31 | ||
|
|
2493eecc7b | ||
|
|
bb3569dce3 | ||
|
|
b364a40e60 | ||
|
|
d137fdea78 | ||
|
|
ab48ffd5c5 | ||
|
|
32b2486c6b | ||
|
|
55432d0d91 | ||
|
|
59af2cbe64 | ||
|
|
7c1bb9decf | ||
|
|
140c08e521 | ||
|
|
a9c1a5a873 | ||
|
|
3b4b54f6ed | ||
|
|
9c280089aa | ||
|
|
38a0a6a092 | ||
|
|
8294a0de2c | ||
|
|
65c4b6cff1 | ||
|
|
9508b3f333 | ||
|
|
6c871408df | ||
|
|
265d8abee1 | ||
|
|
d13e0b5cfc | ||
|
|
a4581e6620 | ||
|
|
0cbe1eb433 | ||
|
|
969dd8be56 |
No files matched your search
+19
-17
@@ -19,12 +19,14 @@
|
|||||||
#
|
#
|
||||||
# Sets the bootloader defined in the keyboard's/keymap's rules.mk
|
# Sets the bootloader defined in the keyboard's/keymap's rules.mk
|
||||||
# Current options:
|
# Current options:
|
||||||
# atmel-dfu
|
#
|
||||||
# lufa-dfu
|
# halfkay PJRC Teensy
|
||||||
# qmk-dfu
|
# caterina Pro Micro (Sparkfun/generic)
|
||||||
# halfkay
|
# atmel-dfu Atmel factory DFU
|
||||||
# caterina
|
# lufa-dfu LUFA DFU
|
||||||
# bootloadHID
|
# qmk-dfu QMK DFU (LUFA + blinkenlight)
|
||||||
|
# bootloadHID HIDBootFlash compatible (ATmega32A)
|
||||||
|
# USBasp USBaspLoader (ATmega328P)
|
||||||
#
|
#
|
||||||
# BOOTLOADER_SIZE can still be defined manually, but it's recommended
|
# BOOTLOADER_SIZE can still be defined manually, but it's recommended
|
||||||
# you add any possible configuration to this list
|
# you add any possible configuration to this list
|
||||||
@@ -32,40 +34,40 @@
|
|||||||
ifeq ($(strip $(BOOTLOADER)), atmel-dfu)
|
ifeq ($(strip $(BOOTLOADER)), atmel-dfu)
|
||||||
OPT_DEFS += -DBOOTLOADER_ATMEL_DFU
|
OPT_DEFS += -DBOOTLOADER_ATMEL_DFU
|
||||||
OPT_DEFS += -DBOOTLOADER_DFU
|
OPT_DEFS += -DBOOTLOADER_DFU
|
||||||
ifeq ($(strip $(MCU)), atmega32u4)
|
ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4))
|
||||||
BOOTLOADER_SIZE = 4096
|
BOOTLOADER_SIZE = 4096
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(MCU)), at90usb1286)
|
ifeq ($(strip $(MCU)), at90usb1286)
|
||||||
BOOTLOADER_SIZE = 8192
|
BOOTLOADER_SIZE = 8192
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(BOOTLOADER)), lufa-dfu)
|
ifeq ($(strip $(BOOTLOADER)), lufa-dfu)
|
||||||
OPT_DEFS += -DBOOTLOADER_LUFA_DFU
|
OPT_DEFS += -DBOOTLOADER_LUFA_DFU
|
||||||
OPT_DEFS += -DBOOTLOADER_DFU
|
OPT_DEFS += -DBOOTLOADER_DFU
|
||||||
ifeq ($(strip $(MCU)), atmega32u4)
|
ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4))
|
||||||
BOOTLOADER_SIZE = 4096
|
BOOTLOADER_SIZE = 4096
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(MCU)), at90usb1286)
|
ifeq ($(strip $(MCU)), at90usb1286)
|
||||||
BOOTLOADER_SIZE = 8192
|
BOOTLOADER_SIZE = 8192
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(BOOTLOADER)), qmk-dfu)
|
ifeq ($(strip $(BOOTLOADER)), qmk-dfu)
|
||||||
OPT_DEFS += -DBOOTLOADER_QMK_DFU
|
OPT_DEFS += -DBOOTLOADER_QMK_DFU
|
||||||
OPT_DEFS += -DBOOTLOADER_DFU
|
OPT_DEFS += -DBOOTLOADER_DFU
|
||||||
ifeq ($(strip $(MCU)), atmega32u4)
|
ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4))
|
||||||
BOOTLOADER_SIZE = 4096
|
BOOTLOADER_SIZE = 4096
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(MCU)), at90usb1286)
|
ifeq ($(strip $(MCU)), at90usb1286)
|
||||||
BOOTLOADER_SIZE = 8192
|
BOOTLOADER_SIZE = 8192
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(BOOTLOADER)), halfkay)
|
ifeq ($(strip $(BOOTLOADER)), halfkay)
|
||||||
OPT_DEFS += -DBOOTLOADER_HALFKAY
|
OPT_DEFS += -DBOOTLOADER_HALFKAY
|
||||||
ifeq ($(strip $(MCU)), atmega32u4)
|
ifeq ($(strip $(MCU)), atmega32u4)
|
||||||
BOOTLOADER_SIZE = 512
|
BOOTLOADER_SIZE = 512
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(MCU)), at90usb1286)
|
ifeq ($(strip $(MCU)), at90usb1286)
|
||||||
BOOTLOADER_SIZE = 1024
|
BOOTLOADER_SIZE = 1024
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(BOOTLOADER)), caterina)
|
ifeq ($(strip $(BOOTLOADER)), caterina)
|
||||||
|
|||||||
+9
-8
@@ -267,20 +267,21 @@ ifeq ($(strip $(ENCODER_ENABLE)), yes)
|
|||||||
OPT_DEFS += -DENCODER_ENABLE
|
OPT_DEFS += -DENCODER_ENABLE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(HAPTIC_ENABLE)), DRV2605L)
|
HAPTIC_ENABLE ?= no
|
||||||
COMMON_VPATH += $(DRIVER_PATH)/haptic
|
ifneq ($(strip $(HAPTIC_ENABLE)),no)
|
||||||
SRC += haptic.c
|
COMMON_VPATH += $(DRIVER_PATH)/haptic
|
||||||
|
SRC += haptic.c
|
||||||
|
OPT_DEFS += -DHAPTIC_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(filter DRV2605L, $(HAPTIC_ENABLE)), )
|
||||||
SRC += DRV2605L.c
|
SRC += DRV2605L.c
|
||||||
QUANTUM_LIB_SRC += i2c_master.c
|
QUANTUM_LIB_SRC += i2c_master.c
|
||||||
OPT_DEFS += -DHAPTIC_ENABLE
|
|
||||||
OPT_DEFS += -DDRV2605L
|
OPT_DEFS += -DDRV2605L
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(HAPTIC_ENABLE)), SOLENOID)
|
ifneq ($(filter SOLENOID, $(HAPTIC_ENABLE)), )
|
||||||
COMMON_VPATH += $(DRIVER_PATH)/haptic
|
|
||||||
SRC += haptic.c
|
|
||||||
SRC += solenoid.c
|
SRC += solenoid.c
|
||||||
OPT_DEFS += -DHAPTIC_ENABLE
|
|
||||||
OPT_DEFS += -DSOLENOID_ENABLE
|
OPT_DEFS += -DSOLENOID_ENABLE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -119,7 +119,8 @@ The breathing effect is the same as in the hardware PWM implementation.
|
|||||||
|`backlight_step()` |Cycle through backlight levels |
|
|`backlight_step()` |Cycle through backlight levels |
|
||||||
|`backlight_increase()` |Increase the backlight level |
|
|`backlight_increase()` |Increase the backlight level |
|
||||||
|`backlight_decrease()` |Decrease the backlight level |
|
|`backlight_decrease()` |Decrease the backlight level |
|
||||||
|`backlight_level(x)` |Sets the backlight level to specified level |
|
|`backlight_level(x)` |Sets the backlight level, from 0 to |
|
||||||
|
| |`BACKLIGHT_LEVELS` |
|
||||||
|`get_backlight_level()` |Return the current backlight level |
|
|`get_backlight_level()` |Return the current backlight level |
|
||||||
|`is_backlight_enabled()`|Return whether the backlight is currently on |
|
|`is_backlight_enabled()`|Return whether the backlight is currently on |
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "2key2crawl.h"
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
K00, K01, K02, K03, K15, \
|
||||||
|
K10, K11, K12, K13, K14, K16 \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03, KC_NO, KC_NO, KC_NO }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16 }, \
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6090
|
||||||
|
#define DEVICE_VER 0x0002
|
||||||
|
#define MANUFACTURER WoodKeys.click
|
||||||
|
#define PRODUCT 2Key2Crawl
|
||||||
|
#define DESCRIPTION ATX Keycrawl 2018
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 2
|
||||||
|
#define MATRIX_COLS 7
|
||||||
|
|
||||||
|
/* key matrix pins */
|
||||||
|
#define MATRIX_ROW_PINS { C4, C5 }
|
||||||
|
#define MATRIX_COL_PINS { B3, B4, B5, B6, B7, C7, B2 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
|
||||||
|
#define ENCODERS_PAD_A { D0 }
|
||||||
|
#define ENCODERS_PAD_B { D1 }
|
||||||
|
#define ENCODER_RESOLUTION 1
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
#define RGB_DI_PIN C6
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 3
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
LAYOUT(
|
||||||
|
KC_1, KC_2, KC_3, KC_4, KC_5,
|
||||||
|
KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
debug_config.matrix = 1;
|
||||||
|
debug_config.keyboard = 1;
|
||||||
|
debug_config.enable = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void encoder_update_user(int8_t index, bool clockwise) {
|
||||||
|
if (index == 0) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_PGUP);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_PGDN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
LAYOUT(
|
||||||
|
KC_1, KC_2, KC_3, KC_4, KC_5,
|
||||||
|
KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
debug_config.matrix = 1;
|
||||||
|
debug_config.keyboard = 1;
|
||||||
|
debug_config.enable = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void encoder_update_user(int8_t index, bool clockwise) {
|
||||||
|
if (index == 0) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code16(C(KC_T));
|
||||||
|
} else {
|
||||||
|
tap_code16(C(KC_W));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
LAYOUT(
|
||||||
|
KC_1, KC_2, KC_3, KC_4, KC_5,
|
||||||
|
KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
debug_config.matrix = 1;
|
||||||
|
debug_config.keyboard = 1;
|
||||||
|
debug_config.enable = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void encoder_update_user(int8_t index, bool clockwise) {
|
||||||
|
if (index == 0) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_VOLU);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_VOLD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# 2Key2CrawlPad
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A 2x5 macropad/numpad with a rotary encoder, exclusively available at Austin Keycrawl 2018 (12-01-2018).
|
||||||
|
|
||||||
|
Keyboard Maintainer: QMK Community
|
||||||
|
Keyboard Designer: [Cole Markham](https://github.com/colemarkham)
|
||||||
|
Hardware Supported: Crawlpad
|
||||||
|
Hardware Availability: Exclusive to Keycrawl events, contact [awwwwwwyeaahhhhhh](https://www.reddit.com/user/awwwwwwyeaahhhhhh) for more details.
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make 2key2crawl:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u2
|
||||||
|
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# atmega32a bootloadHID
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# comment out to disable the options.
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # [Crawlpad] Custom backlighting code is used, so this should not be enabled
|
||||||
|
AUDIO_ENABLE = no # [Crawlpad] This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below
|
||||||
|
RGBLIGHT_ENABLE = no # [Crawlpad] This can be enabled if a ws2812 strip is connected to the expansion port.
|
||||||
|
ENCODER_ENABLE = yes # [2Key2crawl] Make the knobs turn
|
||||||
@@ -55,16 +55,16 @@
|
|||||||
|
|
||||||
// TODO: refactor with new user EEPROM code (coming soon)
|
// TODO: refactor with new user EEPROM code (coming soon)
|
||||||
#define EEPROM_MAGIC 0x451F
|
#define EEPROM_MAGIC 0x451F
|
||||||
#define EEPROM_MAGIC_ADDR 32
|
#define EEPROM_MAGIC_ADDR 34
|
||||||
// Bump this every time we change what we store
|
// Bump this every time we change what we store
|
||||||
// This will automatically reset the EEPROM with defaults
|
// This will automatically reset the EEPROM with defaults
|
||||||
// and avoid loading invalid data from the EEPROM
|
// and avoid loading invalid data from the EEPROM
|
||||||
#define EEPROM_VERSION 0x08
|
#define EEPROM_VERSION 0x08
|
||||||
#define EEPROM_VERSION_ADDR 34
|
#define EEPROM_VERSION_ADDR 36
|
||||||
|
|
||||||
// Dynamic keymap starts after EEPROM version
|
// Dynamic keymap starts after EEPROM version
|
||||||
#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
|
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
|
||||||
// Dynamic macro starts after dynamic keymaps (35+(4*12*9*2)) = (35+864)
|
// Dynamic macro starts after dynamic keymaps (37+(4*12*9*2)) = (37+864)
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 899
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 901
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 125
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 123
|
||||||
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
@@ -55,17 +55,17 @@
|
|||||||
|
|
||||||
// TODO: refactor with new user EEPROM code (coming soon)
|
// TODO: refactor with new user EEPROM code (coming soon)
|
||||||
#define EEPROM_MAGIC 0x451F
|
#define EEPROM_MAGIC 0x451F
|
||||||
#define EEPROM_MAGIC_ADDR 32
|
#define EEPROM_MAGIC_ADDR 34
|
||||||
// Bump this every time we change what we store
|
// Bump this every time we change what we store
|
||||||
// This will automatically reset the EEPROM with defaults
|
// This will automatically reset the EEPROM with defaults
|
||||||
// and avoid loading invalid data from the EEPROM
|
// and avoid loading invalid data from the EEPROM
|
||||||
#define EEPROM_VERSION 0x08
|
#define EEPROM_VERSION 0x08
|
||||||
#define EEPROM_VERSION_ADDR 34
|
#define EEPROM_VERSION_ADDR 36
|
||||||
|
|
||||||
// Dynamic keymap starts after EEPROM version
|
// Dynamic keymap starts after EEPROM version
|
||||||
#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
|
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
|
||||||
// Dynamic macro starts after dynamic keymaps (35+(4*10*10*2)) = (35+800)
|
// Dynamic macro starts after dynamic keymaps (37+(4*10*10*2)) = (37+800)
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 835
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 837
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 189
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 187
|
||||||
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
|
|
||||||
@@ -250,17 +250,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// EEPROM usage
|
// EEPROM usage
|
||||||
|
|
||||||
#define EEPROM_MAGIC 0x451F
|
#define EEPROM_MAGIC 0x451F
|
||||||
#define EEPROM_MAGIC_ADDR 32
|
#define EEPROM_MAGIC_ADDR 34
|
||||||
// Bump this every time we change what we store
|
// Bump this every time we change what we store
|
||||||
// This will automatically reset the EEPROM with defaults
|
// This will automatically reset the EEPROM with defaults
|
||||||
// and avoid loading invalid data from the EEPROM
|
// and avoid loading invalid data from the EEPROM
|
||||||
#define EEPROM_VERSION 0x08
|
#define EEPROM_VERSION 0x08
|
||||||
#define EEPROM_VERSION_ADDR 34
|
#define EEPROM_VERSION_ADDR 36
|
||||||
|
|
||||||
// Dynamic keymap starts after EEPROM version
|
// Dynamic keymap starts after EEPROM version
|
||||||
#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
|
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
|
||||||
// DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR = DYNAMIC_KEYMAP_EEPROM_ADDR + (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2)
|
// DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR = DYNAMIC_KEYMAP_EEPROM_ADDR + (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2)
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637
|
||||||
// DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE = 1024 - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
|
// DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE = 1024 - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 387
|
||||||
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
+18
-11
@@ -14,17 +14,24 @@ GNU General Public License for more details.
|
|||||||
You should have received a copy of the GNU General Public License
|
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/>.
|
||||||
*/
|
*/
|
||||||
#include "quantum.h"
|
#include "alps64.h"
|
||||||
|
|
||||||
#define LED_ON() do { DDRC |= (1<<5); PORTC |= (1<<5); } while (0)
|
void keyboard_pre_init_kb(void) {
|
||||||
#define LED_OFF() do { DDRC &= ~(1<<5); PORTC &= ~(1<<5); } while (0)
|
// put your keyboard start-up code here
|
||||||
#define LED_TGL() do { DDRC |= (1<<5); PINC |= (1<<5); } while (0)
|
// runs once when the firmware starts up
|
||||||
|
setPinOutput(C5);
|
||||||
|
keyboard_pre_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led)
|
||||||
|
{
|
||||||
|
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
||||||
|
// output high
|
||||||
|
writePinHigh(C5);
|
||||||
|
} else {
|
||||||
|
// Hi-Z
|
||||||
|
writePinLow(C5);
|
||||||
|
}
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
led_set_user(usb_led);
|
||||||
LED_ON();
|
}
|
||||||
_delay_ms(500);
|
|
||||||
LED_OFF();
|
|
||||||
|
|
||||||
matrix_init_user();
|
|
||||||
}
|
|
||||||
@@ -14,8 +14,7 @@ GNU General Public License for more details.
|
|||||||
You should have received a copy of the GNU General Public License
|
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 ALPS64_H
|
#pragma once
|
||||||
#define ALPS64_H
|
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
@@ -105,22 +104,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
{ K60, K61, K62, K63, K64, K65, K66, K67 }, \
|
{ K60, K61, K62, K63, K64, K65, K66, K67 }, \
|
||||||
{ KC_NO, K71, K72, K73, K74, K75, K76, K77 } \
|
{ KC_NO, K71, K72, K73, K74, K75, K76, K77 } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LAYOUT_kc( \
|
|
||||||
K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \
|
|
||||||
K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
|
|
||||||
K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \
|
|
||||||
K31, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, K22, \
|
|
||||||
K30, K40, K50, K60, K70, K00, K10, K20 \
|
|
||||||
) { \
|
|
||||||
{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \
|
|
||||||
{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17 }, \
|
|
||||||
{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27 }, \
|
|
||||||
{ KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, \
|
|
||||||
{ KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47 }, \
|
|
||||||
{ KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
|
|
||||||
{ KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67 }, \
|
|
||||||
{ KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77 } \
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -15,8 +15,7 @@ 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 CONFIG_H
|
#pragma once
|
||||||
#define CONFIG_H
|
|
||||||
|
|
||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
@@ -24,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0xFEED
|
||||||
#define PRODUCT_ID 0x6464
|
#define PRODUCT_ID 0x6464
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER TMK
|
#define MANUFACTURER Hasu
|
||||||
#define PRODUCT Alps64
|
#define PRODUCT Alps64
|
||||||
#define DESCRIPTION TMK keyboard firmware for Alps64
|
#define DESCRIPTION TMK keyboard firmware for Alps64
|
||||||
|
|
||||||
@@ -64,5 +63,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
//#define NO_ACTION_ONESHOT
|
//#define NO_ACTION_ONESHOT
|
||||||
//#define NO_ACTION_MACRO
|
//#define NO_ACTION_MACRO
|
||||||
//#define NO_ACTION_FUNCTION
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,199 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2012 Jun Wako <[email protected]>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* scan matrix
|
|
||||||
*/
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <avr/io.h>
|
|
||||||
#include <util/delay.h>
|
|
||||||
#include "print.h"
|
|
||||||
#include "debug.h"
|
|
||||||
#include "util.h"
|
|
||||||
#include "matrix.h"
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef DEBOUNCE
|
|
||||||
# define DEBOUNCE 5
|
|
||||||
#endif
|
|
||||||
static uint8_t debouncing = DEBOUNCE;
|
|
||||||
|
|
||||||
/* matrix state(1:on, 0:off) */
|
|
||||||
static matrix_row_t matrix[MATRIX_ROWS];
|
|
||||||
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
|
||||||
|
|
||||||
static matrix_row_t read_cols(void);
|
|
||||||
static void init_cols(void);
|
|
||||||
static void unselect_rows(void);
|
|
||||||
static void select_row(uint8_t row);
|
|
||||||
|
|
||||||
|
|
||||||
inline
|
|
||||||
uint8_t matrix_rows(void)
|
|
||||||
{
|
|
||||||
return MATRIX_ROWS;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
uint8_t matrix_cols(void)
|
|
||||||
{
|
|
||||||
return MATRIX_COLS;
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_init(void)
|
|
||||||
{
|
|
||||||
// initialize row and col
|
|
||||||
unselect_rows();
|
|
||||||
init_cols();
|
|
||||||
|
|
||||||
// initialize matrix state: all keys off
|
|
||||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
|
||||||
matrix[i] = 0;
|
|
||||||
matrix_debouncing[i] = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//debug
|
|
||||||
debug_matrix = true;
|
|
||||||
LED_ON();
|
|
||||||
_delay_ms(500);
|
|
||||||
LED_OFF();
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t matrix_scan(void)
|
|
||||||
{
|
|
||||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
|
||||||
select_row(i);
|
|
||||||
_delay_us(30); // without this wait read unstable value.
|
|
||||||
matrix_row_t cols = read_cols();
|
|
||||||
if (matrix_debouncing[i] != cols) {
|
|
||||||
matrix_debouncing[i] = cols;
|
|
||||||
if (debouncing) {
|
|
||||||
debug("bounce!: "); debug_hex(debouncing); debug("\n");
|
|
||||||
}
|
|
||||||
debouncing = DEBOUNCE;
|
|
||||||
}
|
|
||||||
unselect_rows();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (debouncing) {
|
|
||||||
if (--debouncing) {
|
|
||||||
_delay_ms(1);
|
|
||||||
} else {
|
|
||||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
|
||||||
matrix[i] = matrix_debouncing[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
matrix_scan_quantum();
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
bool matrix_is_on(uint8_t row, uint8_t col)
|
|
||||||
{
|
|
||||||
return (matrix[row] & ((matrix_row_t)1<<col));
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
matrix_row_t matrix_get_row(uint8_t row)
|
|
||||||
{
|
|
||||||
return matrix[row];
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_print(void)
|
|
||||||
{
|
|
||||||
print("\nr/c 0123456789ABCDEF\n");
|
|
||||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
|
||||||
phex(row); print(": ");
|
|
||||||
pbin_reverse16(matrix_get_row(row));
|
|
||||||
print("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Column pin configuration
|
|
||||||
* col: 0 1 2 3 4 5 6 7
|
|
||||||
* pin: B0 B1 B2 B3 B4 B5 B6 B7
|
|
||||||
*/
|
|
||||||
static void init_cols(void)
|
|
||||||
{
|
|
||||||
// Input with pull-up(DDR:0, PORT:1)
|
|
||||||
DDRB &= ~0b11111111;
|
|
||||||
PORTB |= 0b11111111;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Returns status of switches(1:on, 0:off) */
|
|
||||||
static matrix_row_t read_cols(void)
|
|
||||||
{
|
|
||||||
// Invert because PIN indicates 'switch on' with low(0) and 'off' with high(1)
|
|
||||||
return ~PINB;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Row pin configuration
|
|
||||||
* row: 0 1 2 3 4 5 6 7
|
|
||||||
* pin: D0 D1 D2 D3 D4 D5 D6 C2
|
|
||||||
*/
|
|
||||||
static void unselect_rows(void)
|
|
||||||
{
|
|
||||||
// Hi-Z(DDR:0, PORT:0) to unselect
|
|
||||||
DDRD &= ~0b01111111;
|
|
||||||
PORTD &= ~0b01111111;
|
|
||||||
DDRC &= ~0b00000100;
|
|
||||||
PORTC &= ~0b00000100;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void select_row(uint8_t row)
|
|
||||||
{
|
|
||||||
// Output low(DDR:1, PORT:0) to select
|
|
||||||
switch (row) {
|
|
||||||
case 0:
|
|
||||||
DDRD |= (1<<0);
|
|
||||||
PORTD &= ~(1<<0);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
DDRD |= (1<<1);
|
|
||||||
PORTD &= ~(1<<1);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
DDRD |= (1<<2);
|
|
||||||
PORTD &= ~(1<<2);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
DDRD |= (1<<3);
|
|
||||||
PORTD &= ~(1<<3);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
DDRD |= (1<<4);
|
|
||||||
PORTD &= ~(1<<4);
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
DDRD |= (1<<5);
|
|
||||||
PORTD &= ~(1<<5);
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
DDRD |= (1<<6);
|
|
||||||
PORTD &= ~(1<<6);
|
|
||||||
break;
|
|
||||||
case 7:
|
|
||||||
DDRC |= (1<<2);
|
|
||||||
PORTC &= ~(1<<2);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,63 +1,19 @@
|
|||||||
|
|
||||||
|
|
||||||
# Target file name (without extension).
|
|
||||||
|
|
||||||
# project specific files
|
|
||||||
SRC = led.c
|
|
||||||
|
|
||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u2
|
MCU = atmega32u2
|
||||||
|
|
||||||
# Processor frequency.
|
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Boot Section Size in *bytes*
|
# Boot Section Size in *bytes*
|
||||||
# Teensy halfKay 512
|
# Teensy halfKay 512
|
||||||
# Teensy++ halfKay 1024
|
# Teensy++ halfKay 1024
|
||||||
# Atmel DFU loader 4096
|
# Atmel DFU loader 4096
|
||||||
# LUFA bootloader 4096
|
# LUFA bootloader 4096
|
||||||
# USBaspLoader 2048
|
# USBaspLoader 2048
|
||||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
# change to no to disable the options.
|
# change to no to disable the options.
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||||
|
|||||||
@@ -0,0 +1,109 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file has been automatically generated using ChibiStudio board
|
||||||
|
* generator plugin. Do not edit manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "hal.h"
|
||||||
|
|
||||||
|
#if HAL_USE_PAL || defined(__DOXYGEN__)
|
||||||
|
/**
|
||||||
|
* @brief PAL setup.
|
||||||
|
* @details Digital I/O ports static configuration as defined in @p board.h.
|
||||||
|
* This variable is used by the HAL when initializing the PAL driver.
|
||||||
|
*/
|
||||||
|
const PALConfig pal_default_config = {
|
||||||
|
#if STM32_HAS_GPIOA
|
||||||
|
{VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR,
|
||||||
|
VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOB
|
||||||
|
{VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR,
|
||||||
|
VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOC
|
||||||
|
{VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR,
|
||||||
|
VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOD
|
||||||
|
{VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR,
|
||||||
|
VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOE
|
||||||
|
{VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR,
|
||||||
|
VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOF
|
||||||
|
{VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR,
|
||||||
|
VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOG
|
||||||
|
{VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR,
|
||||||
|
VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOH
|
||||||
|
{VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR,
|
||||||
|
VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH},
|
||||||
|
#endif
|
||||||
|
#if STM32_HAS_GPIOI
|
||||||
|
{VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR,
|
||||||
|
VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void enter_bootloader_mode_if_requested(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Early initialization code.
|
||||||
|
* @details This initialization must be performed just after stack setup
|
||||||
|
* and before any other initialization.
|
||||||
|
*/
|
||||||
|
void __early_init(void) {
|
||||||
|
enter_bootloader_mode_if_requested();
|
||||||
|
stm32_clock_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
|
||||||
|
/**
|
||||||
|
* @brief MMC_SPI card detection.
|
||||||
|
*/
|
||||||
|
bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
|
||||||
|
|
||||||
|
(void)mmcp;
|
||||||
|
/* TODO: Fill the implementation.*/
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief MMC_SPI card write protection detection.
|
||||||
|
*/
|
||||||
|
bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
|
||||||
|
|
||||||
|
(void)mmcp;
|
||||||
|
/* TODO: Fill the implementation.*/
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Board-specific initialization code.
|
||||||
|
* @todo Add your board-specific code, if any.
|
||||||
|
*/
|
||||||
|
void boardInit(void) {
|
||||||
|
}
|
||||||
@@ -0,0 +1,922 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file has been automatically generated using ChibiStudio board
|
||||||
|
* generator plugin. Do not edit manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BOARD_H
|
||||||
|
#define BOARD_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Setup for ST STM32F072B-Discovery board.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Board identifier.
|
||||||
|
*/
|
||||||
|
#define BOARD_ST_STM32F072B_DISCOVERY
|
||||||
|
#define BOARD_NAME "ST STM32F072B-Discovery"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Board oscillators-related settings.
|
||||||
|
* NOTE: HSE not fitted.
|
||||||
|
*/
|
||||||
|
#if !defined(STM32_LSECLK)
|
||||||
|
#define STM32_LSECLK 32768
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define STM32_LSEDRV (3U << 3U)
|
||||||
|
|
||||||
|
#if !defined(STM32_HSECLK)
|
||||||
|
#define STM32_HSECLK 0U
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define STM32_HSE_BYPASS
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MCU type as defined in the ST header.
|
||||||
|
*/
|
||||||
|
#define STM32F072xB
|
||||||
|
|
||||||
|
/*
|
||||||
|
* IO pins assignments.
|
||||||
|
*/
|
||||||
|
#define GPIOA_BUTTON 0U
|
||||||
|
#define GPIOA_PIN1 1U
|
||||||
|
#define GPIOA_PIN2 2U
|
||||||
|
#define GPIOA_PIN3 3U
|
||||||
|
#define GPIOA_PIN4 4U
|
||||||
|
#define GPIOA_PIN5 5U
|
||||||
|
#define GPIOA_PIN6 6U
|
||||||
|
#define GPIOA_PIN7 7U
|
||||||
|
#define GPIOA_PIN8 8U
|
||||||
|
#define GPIOA_PIN9 9U
|
||||||
|
#define GPIOA_PIN10 10U
|
||||||
|
#define GPIOA_USB_DM 11U
|
||||||
|
#define GPIOA_USB_DP 12U
|
||||||
|
#define GPIOA_SWDIO 13U
|
||||||
|
#define GPIOA_SWCLK 14U
|
||||||
|
#define GPIOA_PIN15 15U
|
||||||
|
|
||||||
|
#define GPIOB_PIN0 0U
|
||||||
|
#define GPIOB_PIN1 1U
|
||||||
|
#define GPIOB_PIN2 2U
|
||||||
|
#define GPIOB_PIN3 3U
|
||||||
|
#define GPIOB_PIN4 4U
|
||||||
|
#define GPIOB_PIN5 5U
|
||||||
|
#define GPIOB_PIN6 6U
|
||||||
|
#define GPIOB_PIN7 7U
|
||||||
|
#define GPIOB_PIN8 8U
|
||||||
|
#define GPIOB_PIN9 9U
|
||||||
|
#define GPIOB_PIN10 10U
|
||||||
|
#define GPIOB_PIN11 11U
|
||||||
|
#define GPIOB_PIN12 12U
|
||||||
|
#define GPIOB_SPI2_SCK 13U
|
||||||
|
#define GPIOB_SPI2_MISO 14U
|
||||||
|
#define GPIOB_SPI2_MOSI 15U
|
||||||
|
|
||||||
|
#define GPIOC_MEMS_CS 0U
|
||||||
|
#define GPIOC_PIN1 1U
|
||||||
|
#define GPIOC_PIN2 2U
|
||||||
|
#define GPIOC_PIN3 3U
|
||||||
|
#define GPIOC_PIN4 4U
|
||||||
|
#define GPIOC_PIN5 5U
|
||||||
|
#define GPIOC_LED_RED 6U
|
||||||
|
#define GPIOC_LED_BLUE 7U
|
||||||
|
#define GPIOC_LED_ORANGE 8U
|
||||||
|
#define GPIOC_LED_GREEN 9U
|
||||||
|
#define GPIOC_PIN10 10U
|
||||||
|
#define GPIOC_PIN11 11U
|
||||||
|
#define GPIOC_PIN12 12U
|
||||||
|
#define GPIOC_PIN13 13U
|
||||||
|
#define GPIOC_OSC32_IN 14U
|
||||||
|
#define GPIOC_OSC32_OUT 15U
|
||||||
|
|
||||||
|
#define GPIOD_PIN0 0U
|
||||||
|
#define GPIOD_PIN1 1U
|
||||||
|
#define GPIOD_PIN2 2U
|
||||||
|
#define GPIOD_PIN3 3U
|
||||||
|
#define GPIOD_PIN4 4U
|
||||||
|
#define GPIOD_PIN5 5U
|
||||||
|
#define GPIOD_PIN6 6U
|
||||||
|
#define GPIOD_PIN7 7U
|
||||||
|
#define GPIOD_PIN8 8U
|
||||||
|
#define GPIOD_PIN9 9U
|
||||||
|
#define GPIOD_PIN10 10U
|
||||||
|
#define GPIOD_PIN11 11U
|
||||||
|
#define GPIOD_PIN12 12U
|
||||||
|
#define GPIOD_PIN13 13U
|
||||||
|
#define GPIOD_PIN14 14U
|
||||||
|
#define GPIOD_PIN15 15U
|
||||||
|
|
||||||
|
#define GPIOE_PIN0 0U
|
||||||
|
#define GPIOE_PIN1 1U
|
||||||
|
#define GPIOE_PIN2 2U
|
||||||
|
#define GPIOE_PIN3 3U
|
||||||
|
#define GPIOE_PIN4 4U
|
||||||
|
#define GPIOE_PIN5 5U
|
||||||
|
#define GPIOE_PIN6 6U
|
||||||
|
#define GPIOE_PIN7 7U
|
||||||
|
#define GPIOE_PIN8 8U
|
||||||
|
#define GPIOE_PIN9 9U
|
||||||
|
#define GPIOE_PIN10 10U
|
||||||
|
#define GPIOE_PIN11 11U
|
||||||
|
#define GPIOE_PIN12 12U
|
||||||
|
#define GPIOE_PIN13 13U
|
||||||
|
#define GPIOE_PIN14 14U
|
||||||
|
#define GPIOE_PIN15 15U
|
||||||
|
|
||||||
|
#define GPIOF_OSC_IN 0U
|
||||||
|
#define GPIOF_OSC_OUT 1U
|
||||||
|
#define GPIOF_PIN2 2U
|
||||||
|
#define GPIOF_PIN3 3U
|
||||||
|
#define GPIOF_PIN4 4U
|
||||||
|
#define GPIOF_PIN5 5U
|
||||||
|
#define GPIOF_PIN6 6U
|
||||||
|
#define GPIOF_PIN7 7U
|
||||||
|
#define GPIOF_PIN8 8U
|
||||||
|
#define GPIOF_PIN9 9U
|
||||||
|
#define GPIOF_PIN10 10U
|
||||||
|
#define GPIOF_PIN11 11U
|
||||||
|
#define GPIOF_PIN12 12U
|
||||||
|
#define GPIOF_PIN13 13U
|
||||||
|
#define GPIOF_PIN14 14U
|
||||||
|
#define GPIOF_PIN15 15U
|
||||||
|
|
||||||
|
/*
|
||||||
|
* IO lines assignments.
|
||||||
|
*/
|
||||||
|
#define LINE_BUTTON PAL_LINE(GPIOA, 0U)
|
||||||
|
#define LINE_USB_DM PAL_LINE(GPIOA, 11U)
|
||||||
|
#define LINE_USB_DP PAL_LINE(GPIOA, 12U)
|
||||||
|
#define LINE_SWDIO PAL_LINE(GPIOA, 13U)
|
||||||
|
#define LINE_SWCLK PAL_LINE(GPIOA, 14U)
|
||||||
|
|
||||||
|
#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U)
|
||||||
|
#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U)
|
||||||
|
#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U)
|
||||||
|
|
||||||
|
#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U)
|
||||||
|
#define LINE_LED_RED PAL_LINE(GPIOC, 6U)
|
||||||
|
#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U)
|
||||||
|
#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U)
|
||||||
|
#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U)
|
||||||
|
#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U)
|
||||||
|
#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define LINE_OSC_IN PAL_LINE(GPIOF, 0U)
|
||||||
|
#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* I/O ports initial setup, this configuration is established soon after reset
|
||||||
|
* in the initialization code.
|
||||||
|
* Please refer to the STM32 Reference Manual for details.
|
||||||
|
*/
|
||||||
|
#define PIN_MODE_INPUT(n) (0U << ((n) * 2U))
|
||||||
|
#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U))
|
||||||
|
#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U))
|
||||||
|
#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U))
|
||||||
|
#define PIN_ODR_LOW(n) (0U << (n))
|
||||||
|
#define PIN_ODR_HIGH(n) (1U << (n))
|
||||||
|
#define PIN_OTYPE_PUSHPULL(n) (0U << (n))
|
||||||
|
#define PIN_OTYPE_OPENDRAIN(n) (1U << (n))
|
||||||
|
#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U))
|
||||||
|
#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U))
|
||||||
|
#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U))
|
||||||
|
#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U))
|
||||||
|
#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U))
|
||||||
|
#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U))
|
||||||
|
#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U))
|
||||||
|
#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOA setup:
|
||||||
|
*
|
||||||
|
* PA0 - BUTTON (input floating).
|
||||||
|
* PA1 - PIN1 (input pullup).
|
||||||
|
* PA2 - PIN2 (input pullup).
|
||||||
|
* PA3 - PIN3 (input pullup).
|
||||||
|
* PA4 - PIN4 (input pullup).
|
||||||
|
* PA5 - PIN5 (input pullup).
|
||||||
|
* PA6 - PIN6 (input pullup).
|
||||||
|
* PA7 - PIN7 (input pullup).
|
||||||
|
* PA8 - PIN8 (input pullup).
|
||||||
|
* PA9 - PIN9 (input pullup).
|
||||||
|
* PA10 - PIN10 (input pullup).
|
||||||
|
* PA11 - USB_DM (input floating).
|
||||||
|
* PA12 - USB_DP (input floating).
|
||||||
|
* PA13 - SWDIO (alternate 0).
|
||||||
|
* PA14 - SWCLK (alternate 0).
|
||||||
|
* PA15 - PIN15 (input pullup).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN1) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN2) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN3) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN4) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN5) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN6) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN7) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN8) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN9) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN10) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_USB_DM) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_USB_DP) | \
|
||||||
|
PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \
|
||||||
|
PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \
|
||||||
|
PIN_MODE_INPUT(GPIOA_PIN15))
|
||||||
|
#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOA_PIN15))
|
||||||
|
#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOA_SWDIO) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOA_SWCLK) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOA_PIN15))
|
||||||
|
#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN1) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN2) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN3) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN4) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN5) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN6) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN7) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN8) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN9) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN10) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \
|
||||||
|
PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOA_PIN15))
|
||||||
|
#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN1) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN2) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN3) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN4) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN5) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN6) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN7) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN8) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN9) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN10) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_USB_DM) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_USB_DP) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_SWDIO) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_SWCLK) | \
|
||||||
|
PIN_ODR_HIGH(GPIOA_PIN15))
|
||||||
|
#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN1, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN2, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN3, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN4, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN5, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN6, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN7, 0U))
|
||||||
|
#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN9, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN10, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOA_PIN15, 0U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOB setup:
|
||||||
|
*
|
||||||
|
* PB0 - PIN0 (input pullup).
|
||||||
|
* PB1 - PIN1 (input pullup).
|
||||||
|
* PB2 - PIN2 (input pullup).
|
||||||
|
* PB3 - PIN3 (input pullup).
|
||||||
|
* PB4 - PIN4 (input pullup).
|
||||||
|
* PB5 - PIN5 (input pullup).
|
||||||
|
* PB6 - PIN6 (input pullup).
|
||||||
|
* PB7 - PIN7 (input pullup).
|
||||||
|
* PB8 - PIN8 (input pullup).
|
||||||
|
* PB9 - PIN9 (input pullup).
|
||||||
|
* PB10 - PIN10 (input pullup).
|
||||||
|
* PB11 - PIN11 (input pullup).
|
||||||
|
* PB12 - PIN12 (input pullup).
|
||||||
|
* PB13 - SPI2_SCK (alternate 0).
|
||||||
|
* PB14 - SPI2_MISO (alternate 0).
|
||||||
|
* PB15 - SPI2_MOSI (alternate 0).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN1) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN2) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN3) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN4) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN5) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN6) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN7) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN8) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN9) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN10) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN11) | \
|
||||||
|
PIN_MODE_INPUT(GPIOB_PIN12) | \
|
||||||
|
PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \
|
||||||
|
PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \
|
||||||
|
PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI))
|
||||||
|
#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI))
|
||||||
|
#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOB_PIN2) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOB_PIN3) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOB_PIN4) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI))
|
||||||
|
#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN1) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN2) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN3) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN4) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN5) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN6) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN7) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN8) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN9) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN10) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN11) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOB_PIN12) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI))
|
||||||
|
#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN1) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN2) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN3) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN4) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN5) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN6) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN7) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN8) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN9) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN10) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN11) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_PIN12) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \
|
||||||
|
PIN_ODR_HIGH(GPIOB_SPI2_MOSI))
|
||||||
|
#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN1, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN2, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN3, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN4, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN5, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN6, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN7, 0U))
|
||||||
|
#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN9, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN10, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN11, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_PIN12, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOC setup:
|
||||||
|
*
|
||||||
|
* PC0 - MEMS_CS (output pushpull maximum).
|
||||||
|
* PC1 - PIN1 (input pullup).
|
||||||
|
* PC2 - PIN2 (input pullup).
|
||||||
|
* PC3 - PIN3 (input pullup).
|
||||||
|
* PC4 - PIN4 (input pullup).
|
||||||
|
* PC5 - PIN5 (input pullup).
|
||||||
|
* PC6 - LED_RED (output pushpull maximum).
|
||||||
|
* PC7 - LED_BLUE (output pushpull maximum).
|
||||||
|
* PC8 - LED_ORANGE (output pushpull maximum).
|
||||||
|
* PC9 - LED_GREEN (output pushpull maximum).
|
||||||
|
* PC10 - PIN10 (input pullup).
|
||||||
|
* PC11 - PIN11 (input pullup).
|
||||||
|
* PC12 - PIN12 (input pullup).
|
||||||
|
* PC13 - PIN13 (input pullup).
|
||||||
|
* PC14 - OSC32_IN (input floating).
|
||||||
|
* PC15 - OSC32_OUT (input floating).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN1) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN2) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN3) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN4) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN5) | \
|
||||||
|
PIN_MODE_OUTPUT(GPIOC_LED_RED) | \
|
||||||
|
PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \
|
||||||
|
PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \
|
||||||
|
PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN10) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN11) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN12) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_PIN13) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_OSC32_IN) | \
|
||||||
|
PIN_MODE_INPUT(GPIOC_OSC32_OUT))
|
||||||
|
#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT))
|
||||||
|
#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOC_LED_RED) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \
|
||||||
|
PIN_OSPEED_HIGH(GPIOC_OSC32_OUT))
|
||||||
|
#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN1) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN2) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN3) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN4) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN5) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN10) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN11) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN12) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOC_PIN13) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT))
|
||||||
|
#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN1) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN2) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN3) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN4) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN5) | \
|
||||||
|
PIN_ODR_LOW(GPIOC_LED_RED) | \
|
||||||
|
PIN_ODR_LOW(GPIOC_LED_BLUE) | \
|
||||||
|
PIN_ODR_LOW(GPIOC_LED_ORANGE) | \
|
||||||
|
PIN_ODR_LOW(GPIOC_LED_GREEN) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN10) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN11) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN12) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_PIN13) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_OSC32_IN) | \
|
||||||
|
PIN_ODR_HIGH(GPIOC_OSC32_OUT))
|
||||||
|
#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN1, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN2, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN3, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN4, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN5, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_LED_BLUE, 0U))
|
||||||
|
#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN10, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN11, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN12, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_PIN13, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOD setup:
|
||||||
|
*
|
||||||
|
* PD0 - PIN0 (input pullup).
|
||||||
|
* PD1 - PIN1 (input pullup).
|
||||||
|
* PD2 - PIN2 (input pullup).
|
||||||
|
* PD3 - PIN3 (input pullup).
|
||||||
|
* PD4 - PIN4 (input pullup).
|
||||||
|
* PD5 - PIN5 (input pullup).
|
||||||
|
* PD6 - PIN6 (input pullup).
|
||||||
|
* PD7 - PIN7 (input pullup).
|
||||||
|
* PD8 - PIN8 (input pullup).
|
||||||
|
* PD9 - PIN9 (input pullup).
|
||||||
|
* PD10 - PIN10 (input pullup).
|
||||||
|
* PD11 - PIN11 (input pullup).
|
||||||
|
* PD12 - PIN12 (input pullup).
|
||||||
|
* PD13 - PIN13 (input pullup).
|
||||||
|
* PD14 - PIN14 (input pullup).
|
||||||
|
* PD15 - PIN15 (input pullup).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN1) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN2) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN3) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN4) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN5) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN6) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN7) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN8) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN9) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN10) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN11) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN12) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN13) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN14) | \
|
||||||
|
PIN_MODE_INPUT(GPIOD_PIN15))
|
||||||
|
#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOD_PIN15))
|
||||||
|
#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOD_PIN15))
|
||||||
|
#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN1) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN2) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN3) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN4) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN5) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN6) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN7) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN8) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN9) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN10) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN11) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN12) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN13) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN14) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOD_PIN15))
|
||||||
|
#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN1) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN2) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN3) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN4) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN5) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN6) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN7) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN8) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN9) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN10) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN11) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN12) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN13) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN14) | \
|
||||||
|
PIN_ODR_HIGH(GPIOD_PIN15))
|
||||||
|
#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN1, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN2, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN3, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN4, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN5, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN6, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN7, 0U))
|
||||||
|
#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN9, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN10, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN11, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN12, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN13, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN14, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOD_PIN15, 0U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOE setup:
|
||||||
|
*
|
||||||
|
* PE0 - PIN0 (input pullup).
|
||||||
|
* PE1 - PIN1 (input pullup).
|
||||||
|
* PE2 - PIN2 (input pullup).
|
||||||
|
* PE3 - PIN3 (input pullup).
|
||||||
|
* PE4 - PIN4 (input pullup).
|
||||||
|
* PE5 - PIN5 (input pullup).
|
||||||
|
* PE6 - PIN6 (input pullup).
|
||||||
|
* PE7 - PIN7 (input pullup).
|
||||||
|
* PE8 - PIN8 (input pullup).
|
||||||
|
* PE9 - PIN9 (input pullup).
|
||||||
|
* PE10 - PIN10 (input pullup).
|
||||||
|
* PE11 - PIN11 (input pullup).
|
||||||
|
* PE12 - PIN12 (input pullup).
|
||||||
|
* PE13 - PIN13 (input pullup).
|
||||||
|
* PE14 - PIN14 (input pullup).
|
||||||
|
* PE15 - PIN15 (input pullup).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN1) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN2) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN3) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN4) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN5) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN6) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN7) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN8) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN9) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN10) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN11) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN12) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN13) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN14) | \
|
||||||
|
PIN_MODE_INPUT(GPIOE_PIN15))
|
||||||
|
#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOE_PIN15))
|
||||||
|
#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOE_PIN15))
|
||||||
|
#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN1) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN2) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN3) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN4) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN5) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN6) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN7) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN8) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN9) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN10) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN11) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN12) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN13) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN14) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOE_PIN15))
|
||||||
|
#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN1) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN2) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN3) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN4) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN5) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN6) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN7) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN8) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN9) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN10) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN11) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN12) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN13) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN14) | \
|
||||||
|
PIN_ODR_HIGH(GPIOE_PIN15))
|
||||||
|
#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN1, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN2, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN3, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN4, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN5, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN6, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN7, 0U))
|
||||||
|
#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN9, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN10, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN11, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN12, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN13, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN14, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOE_PIN15, 0U))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPIOF setup:
|
||||||
|
*
|
||||||
|
* PF0 - OSC_IN (input floating).
|
||||||
|
* PF1 - OSC_OUT (input floating).
|
||||||
|
* PF2 - PIN2 (input pullup).
|
||||||
|
* PF3 - PIN3 (input pullup).
|
||||||
|
* PF4 - PIN4 (input pullup).
|
||||||
|
* PF5 - PIN5 (input pullup).
|
||||||
|
* PF6 - PIN6 (input pullup).
|
||||||
|
* PF7 - PIN7 (input pullup).
|
||||||
|
* PF8 - PIN8 (input pullup).
|
||||||
|
* PF9 - PIN9 (input pullup).
|
||||||
|
* PF10 - PIN10 (input pullup).
|
||||||
|
* PF11 - PIN11 (input pullup).
|
||||||
|
* PF12 - PIN12 (input pullup).
|
||||||
|
* PF13 - PIN13 (input pullup).
|
||||||
|
* PF14 - PIN14 (input pullup).
|
||||||
|
* PF15 - PIN15 (input pullup).
|
||||||
|
*/
|
||||||
|
#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_OSC_OUT) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN2) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN3) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN4) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN5) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN6) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN7) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN8) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN9) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN10) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN11) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN12) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN13) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN14) | \
|
||||||
|
PIN_MODE_INPUT(GPIOF_PIN15))
|
||||||
|
#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \
|
||||||
|
PIN_OTYPE_PUSHPULL(GPIOF_PIN15))
|
||||||
|
#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \
|
||||||
|
PIN_OSPEED_VERYLOW(GPIOF_PIN15))
|
||||||
|
#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \
|
||||||
|
PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN2) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN3) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN4) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN5) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN6) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN7) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN8) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN9) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN10) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN11) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN12) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN13) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN14) | \
|
||||||
|
PIN_PUPDR_PULLUP(GPIOF_PIN15))
|
||||||
|
#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_OSC_OUT) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN2) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN3) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN4) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN5) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN6) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN7) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN8) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN9) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN10) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN11) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN12) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN13) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN14) | \
|
||||||
|
PIN_ODR_HIGH(GPIOF_PIN15))
|
||||||
|
#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN2, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN3, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN4, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN5, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN6, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN7, 0U))
|
||||||
|
#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN9, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN10, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN11, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN12, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN13, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN14, 0U) | \
|
||||||
|
PIN_AFIO_AF(GPIOF_PIN15, 0U))
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(_FROM_ASM_)
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
void boardInit(void);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif /* _FROM_ASM_ */
|
||||||
|
|
||||||
|
#endif /* BOARD_H */
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# List of all the board related files.
|
||||||
|
BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c
|
||||||
|
|
||||||
|
# Required include directories
|
||||||
|
BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY
|
||||||
@@ -0,0 +1,703 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- STM32F0xx board Template -->
|
||||||
|
<board
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="http://www.chibios.org/xml/schema/boards/stm32f0xx_board.xsd">
|
||||||
|
<configuration_settings>
|
||||||
|
<templates_path>resources/gencfg/processors/boards/stm32f0xx/templates</templates_path>
|
||||||
|
<output_path>..</output_path>
|
||||||
|
<hal_version>3.0.x</hal_version>
|
||||||
|
</configuration_settings>
|
||||||
|
<board_name>ST STM32F072B-Discovery</board_name>
|
||||||
|
<board_id>ST_STM32F072B_DISCOVERY</board_id>
|
||||||
|
<board_functions></board_functions>
|
||||||
|
<subtype>STM32F072xB</subtype>
|
||||||
|
<clocks HSEFrequency="0" HSEBypass="true" LSEFrequency="0"
|
||||||
|
LSEBypass="false" LSEDrive="3 High Drive (default)" />
|
||||||
|
<ports>
|
||||||
|
<GPIOA>
|
||||||
|
<pin0
|
||||||
|
ID="BUTTON"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin1
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin2
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin3
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin4
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin5
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin6
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin7
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin8
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin9
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin10
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin11
|
||||||
|
ID="USB_DM"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin12
|
||||||
|
ID="USB_DP"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin13
|
||||||
|
ID="SWDIO"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Alternate"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin14
|
||||||
|
ID="SWCLK"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullDown"
|
||||||
|
Level="High"
|
||||||
|
Mode="Alternate"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin15
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
</GPIOA>
|
||||||
|
<GPIOB>
|
||||||
|
<pin0
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin1
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin2
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin3
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin4
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin5
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin6
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin7
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin8
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin9
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin10
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin11
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin12
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin13
|
||||||
|
ID="SPI2_SCK"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Alternate"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin14
|
||||||
|
ID="SPI2_MISO"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Alternate"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin15
|
||||||
|
ID="SPI2_MOSI"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Alternate"
|
||||||
|
Alternate="0" />
|
||||||
|
</GPIOB>
|
||||||
|
<GPIOC>
|
||||||
|
<pin0
|
||||||
|
ID="MEMS_CS"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Output"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin1
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin2
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin3
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin4
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin5
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin6
|
||||||
|
ID="LED_RED"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="Low"
|
||||||
|
Mode="Output"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin7
|
||||||
|
ID="LED_BLUE"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="Low"
|
||||||
|
Mode="Output"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin8
|
||||||
|
ID="LED_ORANGE"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="Low"
|
||||||
|
Mode="Output"
|
||||||
|
Alternate="0" ></pin8>
|
||||||
|
<pin9
|
||||||
|
ID="LED_GREEN"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="Low"
|
||||||
|
Mode="Output"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin10
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin11
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin12
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin13
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin14
|
||||||
|
ID="OSC32_IN"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin15
|
||||||
|
ID="OSC32_OUT"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Maximum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
</GPIOC>
|
||||||
|
<GPIOD>
|
||||||
|
<pin0
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin1
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin2
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin3
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin4
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin5
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin6
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin7
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin8
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin9
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin10
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin11
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin12
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin13
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin14
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin15
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
</GPIOD>
|
||||||
|
<GPIOE>
|
||||||
|
<pin0 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin1 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin2 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin3 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin4 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin5 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin6 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin7 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin8 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin9 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin10 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin11 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin12 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin13 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin14 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
<pin15 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp"
|
||||||
|
Level="High" Mode="Input" Alternate="0" />
|
||||||
|
</GPIOE>
|
||||||
|
<GPIOF>
|
||||||
|
<pin0
|
||||||
|
ID="OSC_IN"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin1
|
||||||
|
ID="OSC_OUT"
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="Floating"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin2
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin3
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin4
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin5
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin6
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin7
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin8
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin9
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin10
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin11
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin12
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin13
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin14
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
<pin15
|
||||||
|
ID=""
|
||||||
|
Type="PushPull"
|
||||||
|
Speed="Minimum"
|
||||||
|
Resistor="PullUp"
|
||||||
|
Level="High"
|
||||||
|
Mode="Input"
|
||||||
|
Alternate="0" />
|
||||||
|
</GPIOF>
|
||||||
|
</ports>
|
||||||
|
</board>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
/* Address for jumping to bootloader on STM32 chips. */
|
||||||
|
/* It is chip dependent, the correct number can be looked up here (page 175):
|
||||||
|
* http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
|
||||||
|
* This also requires a patch to chibios:
|
||||||
|
* <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
|
||||||
|
*/
|
||||||
|
#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800
|
||||||
@@ -0,0 +1,524 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file templates/chconf.h
|
||||||
|
* @brief Configuration file template.
|
||||||
|
* @details A copy of this file must be placed in each project directory, it
|
||||||
|
* contains the application specific kernel settings.
|
||||||
|
*
|
||||||
|
* @addtogroup config
|
||||||
|
* @details Kernel related settings and hooks.
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CHCONF_H
|
||||||
|
#define CHCONF_H
|
||||||
|
|
||||||
|
#define _CHIBIOS_RT_CONF_
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name System timers settings
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System time counter resolution.
|
||||||
|
* @note Allowed values are 16 or 32 bits.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_ST_RESOLUTION 32
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System tick frequency.
|
||||||
|
* @details Frequency of the system timer that drives the system ticks. This
|
||||||
|
* setting also defines the system tick time unit.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_ST_FREQUENCY 10000
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time delta constant for the tick-less mode.
|
||||||
|
* @note If this value is zero then the system uses the classic
|
||||||
|
* periodic tick. This value represents the minimum number
|
||||||
|
* of ticks that is safe to specify in a timeout directive.
|
||||||
|
* The value one is not valid, timeouts are rounded up to
|
||||||
|
* this value.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_ST_TIMEDELTA 2
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Kernel parameters and options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Round robin interval.
|
||||||
|
* @details This constant is the number of system ticks allowed for the
|
||||||
|
* threads before preemption occurs. Setting this value to zero
|
||||||
|
* disables the preemption for threads with equal priority and the
|
||||||
|
* round robin becomes cooperative. Note that higher priority
|
||||||
|
* threads can still preempt, the kernel is always preemptive.
|
||||||
|
* @note Disabling the round robin preemption makes the kernel more compact
|
||||||
|
* and generally faster.
|
||||||
|
* @note The round robin preemption is not supported in tickless mode and
|
||||||
|
* must be set to zero in that case.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_TIME_QUANTUM 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Managed RAM size.
|
||||||
|
* @details Size of the RAM area to be managed by the OS. If set to zero
|
||||||
|
* then the whole available RAM is used. The core memory is made
|
||||||
|
* available to the heap allocator and/or can be used directly through
|
||||||
|
* the simplified core memory allocator.
|
||||||
|
*
|
||||||
|
* @note In order to let the OS manage the whole RAM the linker script must
|
||||||
|
* provide the @p __heap_base__ and @p __heap_end__ symbols.
|
||||||
|
* @note Requires @p CH_CFG_USE_MEMCORE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_MEMCORE_SIZE 0
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread automatic spawn suppression.
|
||||||
|
* @details When this option is activated the function @p chSysInit()
|
||||||
|
* does not spawn the idle thread. The application @p main()
|
||||||
|
* function becomes the idle thread and must implement an
|
||||||
|
* infinite loop.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_NO_IDLE_THREAD FALSE
|
||||||
|
|
||||||
|
/* Use __WFI in the idle thread for waiting. Does lower the power
|
||||||
|
* consumption. */
|
||||||
|
#define CORTEX_ENABLE_WFI_IDLE TRUE
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Performance options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OS optimization.
|
||||||
|
* @details If enabled then time efficient rather than space efficient code
|
||||||
|
* is used when two possible implementations exist.
|
||||||
|
*
|
||||||
|
* @note This is not related to the compiler optimization options.
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_OPTIMIZE_SPEED FALSE
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Subsystem options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time Measurement APIs.
|
||||||
|
* @details If enabled then the time measurement APIs are included in
|
||||||
|
* the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_TM FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads registry APIs.
|
||||||
|
* @details If enabled then the registry APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_REGISTRY TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads synchronization APIs.
|
||||||
|
* @details If enabled then the @p chThdWait() function is included in
|
||||||
|
* the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_WAITEXIT TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Semaphores APIs.
|
||||||
|
* @details If enabled then the Semaphores APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_SEMAPHORES TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Semaphores queuing mode.
|
||||||
|
* @details If enabled then the threads are enqueued on semaphores by
|
||||||
|
* priority rather than in FIFO order.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE. Enable this if you have special
|
||||||
|
* requirements.
|
||||||
|
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Mutexes APIs.
|
||||||
|
* @details If enabled then the mutexes APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MUTEXES TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables recursive behavior on mutexes.
|
||||||
|
* @note Recursive mutexes are heavier and have an increased
|
||||||
|
* memory footprint.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Conditional Variables APIs.
|
||||||
|
* @details If enabled then the conditional variables APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_CONDVARS TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Conditional Variables APIs with timeout.
|
||||||
|
* @details If enabled then the conditional variables APIs with timeout
|
||||||
|
* specification are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_CONDVARS.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Events Flags APIs.
|
||||||
|
* @details If enabled then the event flags APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_EVENTS TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Events Flags APIs with timeout.
|
||||||
|
* @details If enabled then the events APIs with timeout specification
|
||||||
|
* are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_EVENTS.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Synchronous Messages APIs.
|
||||||
|
* @details If enabled then the synchronous messages APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MESSAGES TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Synchronous Messages queuing mode.
|
||||||
|
* @details If enabled then messages are served by priority rather than in
|
||||||
|
* FIFO order.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE. Enable this if you have special
|
||||||
|
* requirements.
|
||||||
|
* @note Requires @p CH_CFG_USE_MESSAGES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Mailboxes APIs.
|
||||||
|
* @details If enabled then the asynchronous messages (mailboxes) APIs are
|
||||||
|
* included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MAILBOXES TRUE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Core Memory Manager APIs.
|
||||||
|
* @details If enabled then the core memory manager APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MEMCORE FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Heap Allocator APIs.
|
||||||
|
* @details If enabled then the memory heap allocator APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
|
||||||
|
* @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
* @note Mutexes are recommended.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_HEAP FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Memory Pools Allocator APIs.
|
||||||
|
* @details If enabled then the memory pools allocator APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_MEMPOOLS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Dynamic Threads APIs.
|
||||||
|
* @details If enabled then the dynamic threads creation APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_WAITEXIT.
|
||||||
|
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_USE_DYNAMIC FALSE
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Debug options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, kernel statistics.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_STATISTICS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, system state check.
|
||||||
|
* @details If enabled the correct call protocol for system APIs is checked
|
||||||
|
* at runtime.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, parameters checks.
|
||||||
|
* @details If enabled then the checks on the API functions input
|
||||||
|
* parameters are activated.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_ENABLE_CHECKS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, consistency checks.
|
||||||
|
* @details If enabled then all the assertions in the kernel code are
|
||||||
|
* activated. This includes consistency checks inside the kernel,
|
||||||
|
* runtime anomalies and port-defined checks.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_ENABLE_ASSERTS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, trace buffer.
|
||||||
|
* @details If enabled then the trace buffer is activated.
|
||||||
|
*
|
||||||
|
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Trace buffer entries.
|
||||||
|
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
|
||||||
|
* different from @p CH_DBG_TRACE_MASK_DISABLED.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_TRACE_BUFFER_SIZE 128
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, stack checks.
|
||||||
|
* @details If enabled then a runtime stack check is performed.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note The stack check is performed in a architecture/port dependent way.
|
||||||
|
* It may not be implemented or some ports.
|
||||||
|
* @note The default failure mode is to halt the system with the global
|
||||||
|
* @p panic_msg variable set to @p NULL.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_ENABLE_STACK_CHECK FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, stacks initialization.
|
||||||
|
* @details If enabled then the threads working area is filled with a byte
|
||||||
|
* value when a thread is created. This can be useful for the
|
||||||
|
* runtime measurement of the used stack.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_FILL_THREADS FALSE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, threads profiling.
|
||||||
|
* @details If enabled then a field is added to the @p thread_t structure that
|
||||||
|
* counts the system ticks occurred while executing the thread.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note This debug option is not currently compatible with the
|
||||||
|
* tickless mode.
|
||||||
|
*/
|
||||||
|
#define CH_DBG_THREADS_PROFILING FALSE
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Kernel hooks
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads descriptor structure extension.
|
||||||
|
* @details User fields added to the end of the @p thread_t structure.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_THREAD_EXTRA_FIELDS \
|
||||||
|
/* Add threads custom fields here.*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads initialization hook.
|
||||||
|
* @details User initialization code added to the @p chThdInit() API.
|
||||||
|
*
|
||||||
|
* @note It is invoked from within @p chThdInit() and implicitly from all
|
||||||
|
* the threads creation APIs.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
|
||||||
|
/* Add threads initialization code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads finalization hook.
|
||||||
|
* @details User finalization code added to the @p chThdExit() API.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
|
||||||
|
/* Add threads finalization code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Context switch hook.
|
||||||
|
* @details This hook is invoked just before switching between threads.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
|
||||||
|
/* Context switch code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief ISR enter hook.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
|
||||||
|
/* IRQ prologue code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief ISR exit hook.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
|
||||||
|
/* IRQ epilogue code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread enter hook.
|
||||||
|
* @note This hook is invoked within a critical zone, no OS functions
|
||||||
|
* should be invoked from here.
|
||||||
|
* @note This macro can be used to activate a power saving mode.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IDLE_ENTER_HOOK() { \
|
||||||
|
/* Idle-enter code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread leave hook.
|
||||||
|
* @note This hook is invoked within a critical zone, no OS functions
|
||||||
|
* should be invoked from here.
|
||||||
|
* @note This macro can be used to deactivate a power saving mode.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IDLE_LEAVE_HOOK() { \
|
||||||
|
/* Idle-leave code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle Loop hook.
|
||||||
|
* @details This hook is continuously invoked by the idle thread loop.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IDLE_LOOP_HOOK() { \
|
||||||
|
/* Idle loop code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System tick event hook.
|
||||||
|
* @details This hook is invoked in the system tick handler immediately
|
||||||
|
* after processing the virtual timers queue.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_SYSTEM_TICK_HOOK() { \
|
||||||
|
/* System tick event code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System halt hook.
|
||||||
|
* @details This hook is invoked in case to a system halting error before
|
||||||
|
* the system is halted.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
|
||||||
|
/* System halt code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Trace hook.
|
||||||
|
* @details This hook is invoked each time a new record is written in the
|
||||||
|
* trace buffer.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_TRACE_HOOK(tep) { \
|
||||||
|
/* Trace code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Port-specific settings (override port settings defaulted in chcore.h). */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#endif /* CHCONF_H */
|
||||||
|
|
||||||
|
/** @} */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "chimera65.h"
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT_default( \
|
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
|
||||||
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \
|
||||||
|
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \
|
||||||
|
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \
|
||||||
|
K400, K401, K402, K406, K409, K410, K411, K412, K413, K415 \
|
||||||
|
) { \
|
||||||
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, KC_NO }, \
|
||||||
|
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \
|
||||||
|
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \
|
||||||
|
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \
|
||||||
|
{ K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, K409, K410, K411, K412, K413, KC_NO, K415 } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Jun Wako <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xCA04
|
||||||
|
#define PRODUCT_ID 0xC024
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||||
|
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||||
|
#define MANUFACTURER CannonKeys
|
||||||
|
#define PRODUCT Chimera65
|
||||||
|
#define DESCRIPTION Chimera65 Keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 16
|
||||||
|
|
||||||
|
#define MATRIX_COL_PINS { B11, B10, B2, B1, A5, A4, A3, A2, A1, F0, C15, C14, A9, A8, A10, B3 }
|
||||||
|
#define MATRIX_ROW_PINS { A13, A14, A15, C13, B8 }
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
#define BACKLIGHT_LEVELS 6
|
||||||
|
#define BACKLIGHT_BREATHING
|
||||||
|
#define BREATHING_PERIOD 6
|
||||||
|
|
||||||
|
/* define if matrix has ghost */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
// EEPROM usage
|
||||||
|
// TODO: refactor with new user EEPROM code (coming soon)
|
||||||
|
#define EEPROM_MAGIC 0x451F
|
||||||
|
#define EEPROM_MAGIC_ADDR 34
|
||||||
|
// Bump this every time we change what we store
|
||||||
|
// This will automatically reset the EEPROM with defaults
|
||||||
|
// and avoid loading invalid data from the EEPROM
|
||||||
|
#define EEPROM_VERSION 0x02
|
||||||
|
#define EEPROM_VERSION_ADDR 36
|
||||||
|
|
||||||
|
|
||||||
|
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
|
||||||
|
// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635
|
||||||
|
// start + layer * rows * col * 2
|
||||||
|
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
|
||||||
|
#define EEPROM_CUSTOM_BACKLIGHT 678
|
||||||
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 679
|
||||||
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 202
|
||||||
|
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
@@ -0,0 +1,354 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file templates/halconf.h
|
||||||
|
* @brief HAL configuration header.
|
||||||
|
* @details HAL configuration file, this file allows to enable or disable the
|
||||||
|
* various device drivers from your application. You may also use
|
||||||
|
* this file in order to override the device drivers default settings.
|
||||||
|
*
|
||||||
|
* @addtogroup HAL_CONF
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _HALCONF_H_
|
||||||
|
#define _HALCONF_H_
|
||||||
|
|
||||||
|
#include "mcuconf.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the PAL subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_PAL TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the ADC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_ADC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the CAN subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_CAN FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the DAC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_DAC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the EXT subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_EXT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the GPT subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_GPT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the I2C subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_I2C TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the I2S subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_I2S FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the ICU subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_ICU FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the MAC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_MAC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the MMC_SPI subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_MMC_SPI FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the PWM subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_PWM TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the RTC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_RTC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SDC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SDC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SERIAL subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SERIAL FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SERIAL over USB subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SERIAL_USB FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SPI subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SPI FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the UART subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_UART FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the USB subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_USB TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the WDG subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_WDG FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* ADC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define ADC_USE_WAIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define ADC_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* CAN driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sleep mode related APIs inclusion switch.
|
||||||
|
*/
|
||||||
|
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
|
||||||
|
#define CAN_USE_SLEEP_MODE TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* I2C driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the mutual exclusion APIs on the I2C bus.
|
||||||
|
*/
|
||||||
|
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define I2C_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* MAC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables an event sources for incoming packets.
|
||||||
|
*/
|
||||||
|
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
|
||||||
|
#define MAC_USE_ZERO_COPY FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables an event sources for incoming packets.
|
||||||
|
*/
|
||||||
|
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
|
||||||
|
#define MAC_USE_EVENTS TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* MMC_SPI driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Delays insertions.
|
||||||
|
* @details If enabled this options inserts delays into the MMC waiting
|
||||||
|
* routines releasing some extra CPU time for the threads with
|
||||||
|
* lower priority, this may slow down the driver a bit however.
|
||||||
|
* This option is recommended also if the SPI driver does not
|
||||||
|
* use a DMA channel and heavily loads the CPU.
|
||||||
|
*/
|
||||||
|
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||||
|
#define MMC_NICE_WAITING TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SDC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Number of initialization attempts before rejecting the card.
|
||||||
|
* @note Attempts are performed at 10mS intervals.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_INIT_RETRY 100
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Include support for MMC cards.
|
||||||
|
* @note MMC support is not yet implemented so this option must be kept
|
||||||
|
* at @p FALSE.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_MMC_SUPPORT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Delays insertions.
|
||||||
|
* @details If enabled this options inserts delays into the MMC waiting
|
||||||
|
* routines releasing some extra CPU time for the threads with
|
||||||
|
* lower priority, this may slow down the driver a bit however.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_NICE_WAITING TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SERIAL driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Default bit rate.
|
||||||
|
* @details Configuration parameter, this is the baud rate selected for the
|
||||||
|
* default configuration.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_DEFAULT_BITRATE 38400
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serial buffers size.
|
||||||
|
* @details Configuration parameter, you can change the depth of the queue
|
||||||
|
* buffers depending on the requirements of your application.
|
||||||
|
* @note The default is 64 bytes for both the transmission and receive
|
||||||
|
* buffers.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_BUFFERS_SIZE 16
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SERIAL_USB driver related setting. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serial over USB buffers size.
|
||||||
|
* @details Configuration parameter, the buffer size must be a multiple of
|
||||||
|
* the USB data endpoint maximum packet size.
|
||||||
|
* @note The default is 64 bytes for both the transmission and receive
|
||||||
|
* buffers.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_USB_BUFFERS_SIZE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SPI driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define SPI_USE_WAIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define SPI_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* USB driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define USB_USE_WAIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _HALCONF_H_ */
|
||||||
|
|
||||||
|
/** @} */
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Chimera65",
|
||||||
|
"url": "https://cannonkeys.com",
|
||||||
|
"maintainer": "awkannan",
|
||||||
|
"width": 16,
|
||||||
|
"height": 5
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012,2013 Jun Wako <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _BASE 0
|
||||||
|
#define _FN1 1
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_BASE] = LAYOUT_default(
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUBS, KC_ENT, KC_PGUP,
|
||||||
|
KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
[_FN1] = LAYOUT_default(
|
||||||
|
KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
BL_INC, BL_DEC, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012,2013 Jun Wako <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _BASE 0
|
||||||
|
#define _FN1 1
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_BASE] = LAYOUT_default(
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUBS, KC_ENT, KC_PGUP,
|
||||||
|
KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
[_FN1] = LAYOUT_default(
|
||||||
|
KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
BL_INC, BL_DEC, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# rules.mk overrides to enable VIA
|
||||||
|
|
||||||
|
RAW_ENABLE = yes
|
||||||
|
DYNAMIC_KEYMAP_ENABLE = yes
|
||||||
|
|
||||||
@@ -0,0 +1,176 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _MCUCONF_H_
|
||||||
|
#define _MCUCONF_H_
|
||||||
|
|
||||||
|
/*
|
||||||
|
* STM32F0xx drivers configuration.
|
||||||
|
* The following settings override the default settings present in
|
||||||
|
* the various device driver implementation headers.
|
||||||
|
* Note that the settings for each driver only have effect if the whole
|
||||||
|
* driver is enabled in halconf.h.
|
||||||
|
*
|
||||||
|
* IRQ priorities:
|
||||||
|
* 3...0 Lowest...Highest.
|
||||||
|
*
|
||||||
|
* DMA priorities:
|
||||||
|
* 0...3 Lowest...Highest.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define STM32F0xx_MCUCONF
|
||||||
|
// #define STM32F070xB
|
||||||
|
|
||||||
|
/*
|
||||||
|
* HAL driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_NO_INIT FALSE
|
||||||
|
#define STM32_PVD_ENABLE FALSE
|
||||||
|
#define STM32_PLS STM32_PLS_LEV0
|
||||||
|
#define STM32_HSI_ENABLED TRUE
|
||||||
|
#define STM32_HSI14_ENABLED TRUE
|
||||||
|
#define STM32_HSI48_ENABLED FALSE
|
||||||
|
#define STM32_LSI_ENABLED TRUE
|
||||||
|
#define STM32_HSE_ENABLED FALSE
|
||||||
|
#define STM32_LSE_ENABLED FALSE
|
||||||
|
#define STM32_SW STM32_SW_PLL
|
||||||
|
#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2
|
||||||
|
#define STM32_PREDIV_VALUE 1
|
||||||
|
#define STM32_PLLMUL_VALUE 12
|
||||||
|
#define STM32_HPRE STM32_HPRE_DIV1
|
||||||
|
#define STM32_PPRE STM32_PPRE_DIV1
|
||||||
|
#define STM32_ADCSW STM32_ADCSW_HSI14
|
||||||
|
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
||||||
|
#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
|
||||||
|
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
||||||
|
#define STM32_ADCSW STM32_ADCSW_HSI14
|
||||||
|
#define STM32_USBSW STM32_USBSW_HSI48
|
||||||
|
#define STM32_CECSW STM32_CECSW_HSI
|
||||||
|
#define STM32_I2C1SW STM32_I2C1SW_HSI
|
||||||
|
#define STM32_USART1SW STM32_USART1SW_PCLK
|
||||||
|
#define STM32_RTCSEL STM32_RTCSEL_LSI
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ADC driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_ADC_USE_ADC1 FALSE
|
||||||
|
#define STM32_ADC_ADC1_DMA_PRIORITY 2
|
||||||
|
#define STM32_ADC_IRQ_PRIORITY 2
|
||||||
|
#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2
|
||||||
|
|
||||||
|
/*
|
||||||
|
* EXT driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3
|
||||||
|
#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3
|
||||||
|
#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3
|
||||||
|
#define STM32_EXT_EXTI16_IRQ_PRIORITY 3
|
||||||
|
#define STM32_EXT_EXTI17_IRQ_PRIORITY 3
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GPT driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_GPT_USE_TIM1 FALSE
|
||||||
|
#define STM32_GPT_USE_TIM2 FALSE
|
||||||
|
#define STM32_GPT_USE_TIM3 FALSE
|
||||||
|
#define STM32_GPT_USE_TIM14 FALSE
|
||||||
|
#define STM32_GPT_TIM1_IRQ_PRIORITY 2
|
||||||
|
#define STM32_GPT_TIM2_IRQ_PRIORITY 2
|
||||||
|
#define STM32_GPT_TIM3_IRQ_PRIORITY 2
|
||||||
|
#define STM32_GPT_TIM14_IRQ_PRIORITY 2
|
||||||
|
|
||||||
|
/*
|
||||||
|
* I2C driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_I2C_USE_I2C1 TRUE
|
||||||
|
#define STM32_I2C_USE_I2C2 FALSE
|
||||||
|
#define STM32_I2C_BUSY_TIMEOUT 50
|
||||||
|
#define STM32_I2C_I2C1_IRQ_PRIORITY 3
|
||||||
|
#define STM32_I2C_I2C2_IRQ_PRIORITY 3
|
||||||
|
#define STM32_I2C_USE_DMA TRUE
|
||||||
|
#define STM32_I2C_I2C1_DMA_PRIORITY 1
|
||||||
|
#define STM32_I2C_I2C2_DMA_PRIORITY 1
|
||||||
|
#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
|
||||||
|
#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
|
||||||
|
#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ICU driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_ICU_USE_TIM1 FALSE
|
||||||
|
#define STM32_ICU_USE_TIM2 FALSE
|
||||||
|
#define STM32_ICU_USE_TIM3 FALSE
|
||||||
|
#define STM32_ICU_TIM1_IRQ_PRIORITY 3
|
||||||
|
#define STM32_ICU_TIM2_IRQ_PRIORITY 3
|
||||||
|
#define STM32_ICU_TIM3_IRQ_PRIORITY 3
|
||||||
|
|
||||||
|
/*
|
||||||
|
* PWM driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_PWM_USE_ADVANCED FALSE
|
||||||
|
#define STM32_PWM_USE_TIM1 FALSE
|
||||||
|
#define STM32_PWM_USE_TIM2 FALSE
|
||||||
|
#define STM32_PWM_USE_TIM3 TRUE
|
||||||
|
#define STM32_PWM_TIM1_IRQ_PRIORITY 3
|
||||||
|
#define STM32_PWM_TIM2_IRQ_PRIORITY 3
|
||||||
|
#define STM32_PWM_TIM3_IRQ_PRIORITY 3
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SERIAL driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_SERIAL_USE_USART1 FALSE
|
||||||
|
#define STM32_SERIAL_USE_USART2 FALSE
|
||||||
|
#define STM32_SERIAL_USART1_PRIORITY 3
|
||||||
|
#define STM32_SERIAL_USART2_PRIORITY 3
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPI driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_SPI_USE_SPI1 FALSE
|
||||||
|
#define STM32_SPI_USE_SPI2 TRUE
|
||||||
|
#define STM32_SPI_SPI1_DMA_PRIORITY 1
|
||||||
|
#define STM32_SPI_SPI2_DMA_PRIORITY 1
|
||||||
|
#define STM32_SPI_SPI1_IRQ_PRIORITY 2
|
||||||
|
#define STM32_SPI_SPI2_IRQ_PRIORITY 2
|
||||||
|
#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
|
||||||
|
#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
|
||||||
|
#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ST driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_ST_IRQ_PRIORITY 2
|
||||||
|
#define STM32_ST_USE_TIMER 2
|
||||||
|
|
||||||
|
/*
|
||||||
|
* UART driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_UART_USE_USART1 FALSE
|
||||||
|
#define STM32_UART_USE_USART2 FALSE
|
||||||
|
#define STM32_UART_USART1_IRQ_PRIORITY 3
|
||||||
|
#define STM32_UART_USART2_IRQ_PRIORITY 3
|
||||||
|
#define STM32_UART_USART1_DMA_PRIORITY 0
|
||||||
|
#define STM32_UART_USART2_DMA_PRIORITY 0
|
||||||
|
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* USB driver system settings.
|
||||||
|
*/
|
||||||
|
#define STM32_USB_USE_USB1 TRUE
|
||||||
|
#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
|
||||||
|
#define STM32_USB_USB1_LP_IRQ_PRIORITY 3
|
||||||
|
|
||||||
|
#endif /* _MCUCONF_H_ */
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# Chimera65
|
||||||
|
|
||||||
|
Chimera65 Keyboard
|
||||||
|
|
||||||
|
Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan)
|
||||||
|
Hardware Supported: STM32F072CBT6
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make cannonkeys/chimera65:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
# project specific files
|
||||||
|
# SRC = ssd1306.c
|
||||||
|
## chip/board settings
|
||||||
|
# the next two should match the directories in
|
||||||
|
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||||
|
MCU_FAMILY = STM32
|
||||||
|
MCU_SERIES = STM32F0xx
|
||||||
|
# linker script to use
|
||||||
|
# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||||
|
# or <this_dir>/ld/
|
||||||
|
MCU_LDSCRIPT = STM32F072xB
|
||||||
|
# startup code to use
|
||||||
|
# is should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
||||||
|
MCU_STARTUP = stm32f0xx
|
||||||
|
# it should exist either in <chibios>/os/hal/boards/
|
||||||
|
# or <this_dir>/boards
|
||||||
|
BOARD = ST_STM32F072B_DISCOVERY
|
||||||
|
# Cortex version
|
||||||
|
# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
|
||||||
|
MCU = cortex-m0
|
||||||
|
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||||
|
ARMV = 6
|
||||||
|
# If you want to be able to jump to bootloader from firmware on STM32 MCUs,
|
||||||
|
# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in
|
||||||
|
# ./bootloader_defs.h or in ./boards/<FOO>/bootloader_defs.h (if you have
|
||||||
|
# a custom board definition that you plan to reuse).
|
||||||
|
# If you're not setting it here, leave it commented out.
|
||||||
|
# It is chip dependent, the correct number can be looked up here (page 175):
|
||||||
|
# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
|
||||||
|
# This also requires a patch to chibios:
|
||||||
|
# <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
|
||||||
|
#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# comment out to disable the options.
|
||||||
|
#
|
||||||
|
|
||||||
|
# project specific files
|
||||||
|
VPATH += keyboards/cannonkeys/stm32f072
|
||||||
|
SRC = keyboard.c \
|
||||||
|
led.c
|
||||||
|
|
||||||
|
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
|
||||||
|
|
||||||
|
#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
|
CUSTOM_MATRIX = no # Custom matrix file
|
||||||
|
# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason
|
||||||
|
RGBLIGHT_ENABLE = no
|
||||||
|
|
||||||
|
# RAW_ENABLE = yes
|
||||||
|
# DYNAMIC_KEYMAP_ENABLE = yes
|
||||||
@@ -86,10 +86,9 @@ void matrix_init_board(void);
|
|||||||
void matrix_init_kb(void){
|
void matrix_init_kb(void){
|
||||||
eeprom_init_kb();
|
eeprom_init_kb();
|
||||||
/* MOSI pin*/
|
/* MOSI pin*/
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_ALTERNATE(0));
|
palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_ALTERNATE(0));
|
||||||
wait_ms(500);
|
wait_ms(500);
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
leds_init();
|
leds_init();
|
||||||
#endif
|
#endif
|
||||||
backlight_init_ports();
|
backlight_init_ports();
|
||||||
|
|||||||
@@ -29,11 +29,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
/* key matrix size */
|
/* key matrix size */
|
||||||
// Rows are doubled-up
|
// Rows are doubled-up
|
||||||
#define MATRIX_ROWS 8
|
#define MATRIX_ROWS 8
|
||||||
#define MATRIX_COLS 7
|
#define MATRIX_COLS 6
|
||||||
#define MATRIX_ROW_PINS { D4, C6, D7, E6 }
|
#define MATRIX_ROW_PINS { D4, C6, D7, E6 }
|
||||||
|
|
||||||
// wiring of each half
|
// wiring of each half
|
||||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
|
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 }
|
||||||
// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
|
// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
|
||||||
|
|
||||||
/* define if matrix has ghost */
|
/* define if matrix has ghost */
|
||||||
|
|||||||
+16
-16
@@ -42,14 +42,14 @@
|
|||||||
|
|
||||||
#ifdef RGB_MATRIX_SPLIT_RIGHT
|
#ifdef RGB_MATRIX_SPLIT_RIGHT
|
||||||
led_config_t g_led_config = { {
|
led_config_t g_led_config = { {
|
||||||
{ 51, 50, 45, 44, 37, 36, NO_LED },
|
{ 51, 50, 45, 44, 37, 36 },
|
||||||
{ 52, 49, 46, 43, 38, 35, NO_LED },
|
{ 52, 49, 46, 43, 38, 35 },
|
||||||
{ 53, 48, 47, 42, 39, 34, NO_LED },
|
{ 53, 48, 47, 42, 39, 34 },
|
||||||
{ NO_LED, NO_LED, NO_LED, 41, 40, 33, NO_LED },
|
{ NO_LED, NO_LED, NO_LED, 41, 40, 33 },
|
||||||
{ 24, 23, 18, 17, 10, 9, NO_LED },
|
{ 24, 23, 18, 17, 10, 9 },
|
||||||
{ 25, 22, 19, 16, 11, 8, NO_LED },
|
{ 25, 22, 19, 16, 11, 8 },
|
||||||
{ 26, 21, 20, 15, 12, 7, NO_LED },
|
{ 26, 21, 20, 15, 12, 7 },
|
||||||
{ NO_LED, NO_LED, NO_LED, 14, 13, 6, NO_LED }
|
{ NO_LED, NO_LED, NO_LED, 14, 13, 6 }
|
||||||
}, {
|
}, {
|
||||||
{ 139, 16 }, { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 },
|
{ 139, 16 }, { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 },
|
||||||
{ 139, 39 }, { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 },
|
{ 139, 39 }, { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 },
|
||||||
@@ -71,14 +71,14 @@ led_config_t g_led_config = { {
|
|||||||
} };
|
} };
|
||||||
#else
|
#else
|
||||||
led_config_t g_led_config = { {
|
led_config_t g_led_config = { {
|
||||||
{ 24, 23, 18, 17, 10, 9, NO_LED },
|
{ 24, 23, 18, 17, 10, 9 },
|
||||||
{ 25, 22, 19, 16, 11, 8, NO_LED },
|
{ 25, 22, 19, 16, 11, 8 },
|
||||||
{ 26, 21, 20, 15, 12, 7, NO_LED },
|
{ 26, 21, 20, 15, 12, 7 },
|
||||||
{ NO_LED, NO_LED, NO_LED, 14, 13, 6, NO_LED },
|
{ NO_LED, NO_LED, NO_LED, 14, 13, 6 },
|
||||||
{ 51, 50, 45, 44, 37, 36, NO_LED },
|
{ 51, 50, 45, 44, 37, 36 },
|
||||||
{ 52, 49, 46, 43, 38, 35, NO_LED },
|
{ 52, 49, 46, 43, 38, 35 },
|
||||||
{ 53, 48, 47, 42, 39, 34, NO_LED },
|
{ 53, 48, 47, 42, 39, 34 },
|
||||||
{ NO_LED, NO_LED, NO_LED, 41, 40, 33, NO_LED }
|
{ NO_LED, NO_LED, NO_LED, 41, 40, 33 }
|
||||||
}, {
|
}, {
|
||||||
{ 85, 16 }, { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 },
|
{ 85, 16 }, { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 },
|
||||||
{ 85, 39 }, { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 },
|
{ 85, 39 }, { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 },
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
|
||||||
|
|
||||||
#define _QWERTY 0
|
|
||||||
#define _LOWER 1
|
|
||||||
#define _RAISE 2
|
|
||||||
#define _ADJUST 16
|
|
||||||
|
|
||||||
enum custom_keycodes {
|
enum custom_keycodes {
|
||||||
QWERTY = SAFE_RANGE,
|
LOWER = SAFE_RANGE,
|
||||||
LOWER,
|
|
||||||
RAISE,
|
RAISE,
|
||||||
ADJUST,
|
};
|
||||||
|
|
||||||
|
enum layer_names {
|
||||||
|
_QWERTY,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_ADJUST,
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
@@ -29,12 +27,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | ` | \ | ALt | Ctrl |||||||| Lower| Space| LGui|||||||| Enter| Space| Raise|||||||| Left | Down | Up | Right|
|
* | ` | \ | ALt | Ctrl |||||||| Lower| Space| LGui|||||||| Enter| Space| Raise|||||||| Left | Down | Up | Right|
|
||||||
* ,----------------------------------------------------------------------------------------------------------------------.
|
* ,----------------------------------------------------------------------------------------------------------------------.
|
||||||
*/
|
*/
|
||||||
[_QWERTY] = LAYOUT( \
|
[_QWERTY] = LAYOUT(
|
||||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_MINS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_MINS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, \
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC,
|
||||||
RAISE, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
RAISE, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DEL, KC_PSCR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DEL, KC_PSCR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
KC_GRV,KC_BSLS, KC_LALT, KC_LCTL, LOWER, KC_SPC,KC_LGUI, KC_ENT ,KC_SPC , RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
KC_GRV,KC_BSLS, KC_LALT, KC_LCTL, LOWER, KC_SPC,KC_LGUI, KC_ENT ,KC_SPC , RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Lower
|
/* Lower
|
||||||
@@ -51,11 +49,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* ,----------------------------------------------------------------------------------------------------------------------.
|
* ,----------------------------------------------------------------------------------------------------------------------.
|
||||||
*/
|
*/
|
||||||
[_LOWER] = LAYOUT(
|
[_LOWER] = LAYOUT(
|
||||||
XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, \
|
XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX,
|
||||||
XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
RAISE, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
RAISE, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, \
|
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, LOWER, KC_SPC ,XXXXXXX, XXXXXXX, KC_SPC , RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
|
XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, LOWER, KC_SPC ,XXXXXXX, XXXXXXX, KC_SPC , RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Raise
|
/* Raise
|
||||||
@@ -72,11 +70,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* ,----------------------------------------------------------------------------------------------------------------------.
|
* ,----------------------------------------------------------------------------------------------------------------------.
|
||||||
*/
|
*/
|
||||||
[_RAISE] = LAYOUT(
|
[_RAISE] = LAYOUT(
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
RAISE, KC_HOME,KC_PGDOWN, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
RAISE, KC_HOME,KC_PGDOWN, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, \
|
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, LOWER, KC_SPC ,XXXXXXX, XXXXXXX, KC_SPC , RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
|
XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, LOWER, KC_SPC ,XXXXXXX, XXXXXXX, KC_SPC , RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
),
|
),
|
||||||
|
|
||||||
/* Adjust (Both Raise and Lower Together)
|
/* Adjust (Both Raise and Lower Together)
|
||||||
@@ -93,11 +91,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* ,----------------------------------------------------------------------------------------------------------------------.
|
* ,----------------------------------------------------------------------------------------------------------------------.
|
||||||
*/
|
*/
|
||||||
[_ADJUST] = LAYOUT(
|
[_ADJUST] = LAYOUT(
|
||||||
RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, BL_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, BL_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
RAISE, XXXXXXX, RGB_HUI, RGB_SAI, RGB_VAI, BL_INC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
RAISE, XXXXXXX, RGB_HUI, RGB_SAI, RGB_VAI, BL_INC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
EEP_RST, XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, \
|
EEP_RST, XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, LOWER, KC_SPC ,XXXXXXX, XXXXXXX, KC_SPC, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
|
XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, LOWER, KC_SPC ,XXXXXXX, XXXXXXX, KC_SPC, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -112,7 +110,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
|
||||||
case RAISE:
|
case RAISE:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
layer_on(_RAISE);
|
layer_on(_RAISE);
|
||||||
@@ -122,15 +119,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
|
||||||
case ADJUST:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
layer_on(_ADJUST);
|
|
||||||
} else {
|
|
||||||
layer_off(_ADJUST);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
|
This is the c configuration file for the keymap
|
||||||
|
|
||||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
Copyright 2015 Jack Humbert
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -15,20 +18,16 @@ 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/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <avr/io.h>
|
#pragma once
|
||||||
#include "stdint.h"
|
|
||||||
#include "led.h"
|
|
||||||
|
|
||||||
|
|
||||||
void led_set(uint8_t usb_led)
|
/* Use I2C or Serial, not both */
|
||||||
{
|
|
||||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
#define USE_SERIAL
|
||||||
// output high
|
// #define USE_I2C
|
||||||
DDRC |= (1<<5);
|
|
||||||
PORTC |= (1<<5);
|
/* Select hand configuration */
|
||||||
} else {
|
|
||||||
// Hi-Z
|
#define MASTER_LEFT
|
||||||
DDRC &= ~(1<<5);
|
// #define MASTER_RIGHT
|
||||||
PORTC &= ~(1<<5);
|
// #define EE_HANDS
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,219 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "keymap_jp.h"
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
enum layers { _QWERTY, _LOWER, _RAISE, _ADJUST };
|
||||||
|
|
||||||
|
enum custom_keycodes { JP = SAFE_RANGE, US, SHIFT, LOWER, RAISE, ADJUST,
|
||||||
|
CSTM_0, CSTM_1, CSTM_2, CSTM_3, CSTM_4, CSTM_5, CSTM_6, CSTM_7, CSTM_8, CSTM_9,
|
||||||
|
CIRC, AT, LBRC, RBRC, BSLS, AMPR, QUOT, LPRN, RPRN, EQL, TILD, PIPE, GRV, LCBR,
|
||||||
|
PLUS, ASTR, RCBR, UNDS, MINS, SCLN, COMM, DOT, SLSH, EXLM, HASH, DLR, PERC, DEL };
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Qwerty
|
||||||
|
* ,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | ESC | 1 | 2 | 3 | 4 | 5 | ZKHK | | ZKHK | 6 | 7 | 8 | 9 | 0 | ` |
|
||||||
|
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
* | TAB | Q | W | E | R | T | MHEN | |HENKAN| Y | U | I | O | P | \ |
|
||||||
|
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
* | CTRL | A | S | D | F | G | EISU | <- ONLY FOR MAC -> | KANA | H | J | K | L | ; | ' |
|
||||||
|
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
|
||||||
|
* | SHIFT| Z | X | C | V | B | SHIFT| | SHIFT| N | M | , | . | / | SHIFT|
|
||||||
|
* |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
|
||||||
|
* | SHIFT|ADJUST| ALT | GUI |||||||| LOWER| SPACE| |||||||| | ENTER| RAISE|||||||| GUI | ALT |ADJUST| SHIFT|
|
||||||
|
* ,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
*/
|
||||||
|
[_QWERTY] = LAYOUT( \
|
||||||
|
KC_ESC, CSTM_1, CSTM_2, CSTM_3, CSTM_4, CSTM_5, JP_KANA, JP_KANA, CSTM_6, CSTM_7, CSTM_8, CSTM_9, CSTM_0, GRV , \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, JP_MHEN, JP_HENK, KC_Y, KC_U, KC_I, KC_O, KC_P, BSLS , \
|
||||||
|
KC_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G, JP_MEISU, JP_MKANA,KC_H, KC_J, KC_K, KC_L, SCLN, QUOT , \
|
||||||
|
SHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, SHIFT , SHIFT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFT , \
|
||||||
|
SHIFT, ADJUST, KC_LALT, KC_LCTL, LOWER, KC_SPC ,XXXXXXX, XXXXXXX,KC_ENT , RAISE, KC_LCTL, KC_LALT, ADJUST, SHIFT \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | F11 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F12 |
|
||||||
|
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
* | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | |
|
||||||
|
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
* | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | |
|
||||||
|
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
|
||||||
|
* | |||||||||||||||||||||| - | _ | | | | + | = | [ | ] |||||||| |
|
||||||
|
* |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
|
||||||
|
* | | | | |||||||| | ESC | |||||||| | BKSP | |||||||| | | | |
|
||||||
|
* ,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
*/
|
||||||
|
[_LOWER] = LAYOUT(
|
||||||
|
KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 , \
|
||||||
|
TILD, EXLM, AT, HASH, DLR, PERC, _______, _______, CIRC, AMPR, ASTR, LPRN, RPRN, PIPE , \
|
||||||
|
_______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0 , _______, \
|
||||||
|
_______, XXXXXXX, XXXXXXX, XXXXXXX, MINS, UNDS, _______, _______, PLUS, EQL, LBRC, RBRC, XXXXXXX, _______, \
|
||||||
|
_______, _______, _______, _______, _______, KC_ESC ,_______, _______,KC_BSPC, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Raise
|
||||||
|
* ,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | F11 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F12 |
|
||||||
|
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
* | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | |
|
||||||
|
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
* | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | |
|
||||||
|
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
|
||||||
|
* | |||||||| [ | ] | - | _ | | | | + | = |||||||||||||||||||||| |
|
||||||
|
* |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
|
||||||
|
* | | | | |||||||| | ESC | |||||||| | BKSP | |||||||| | | | |
|
||||||
|
* ,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
*/
|
||||||
|
[_RAISE] = LAYOUT(
|
||||||
|
KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 , \
|
||||||
|
TILD, EXLM, AT, HASH, DLR, PERC, _______, _______, CIRC, AMPR, ASTR, LPRN, RPRN, PIPE , \
|
||||||
|
_______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0 , _______, \
|
||||||
|
_______, XXXXXXX, LBRC, RBRC, MINS, UNDS, _______, _______, PLUS, EQL, XXXXXXX, XXXXXXX, XXXXXXX, _______, \
|
||||||
|
_______, _______, _______, _______, _______, KC_ESC ,_______, _______,KC_BSPC, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Adjust
|
||||||
|
* ,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | US | | JP | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
* | | HOME |PAGEDN|PAGEUP| END |||||||| | | | LEFT | DOWN | UP | RIGHT|||||||| |
|
||||||
|
* |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
|
||||||
|
* | | | { | } | | | | | | | | { | } | | |
|
||||||
|
* |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
|
||||||
|
* | | | | |||||||| | | |||||||| | | |||||||| | | | |
|
||||||
|
* ,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
*/
|
||||||
|
[_ADJUST] = LAYOUT(
|
||||||
|
_______, _______, _______, _______, _______, _______, US , JP, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, _______, \
|
||||||
|
_______, _______, LCBR, RCBR, _______, _______, _______, _______, _______, _______, LCBR, RCBR, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______,_______, _______,_______, _______, _______, _______, _______, _______ \
|
||||||
|
)};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define JP_LAYOUT true
|
||||||
|
#define US_LAYOUT false
|
||||||
|
|
||||||
|
#ifdef MASTER_LEFT
|
||||||
|
bool LAYOUT_STATUS = US_LAYOUT;
|
||||||
|
#else
|
||||||
|
bool LAYOUT_STATUS = JP_LAYOUT;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
bool SHIFT_PRESSED = false;
|
||||||
|
|
||||||
|
void persistent_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define SEND_STRING_RESTORE(STR) (SHIFT_PRESSED ? SEND_STRING(STR SS_DOWN(X_LSHIFT)) : SEND_STRING(STR SS_UP(X_LSHIFT)))
|
||||||
|
|
||||||
|
#define KEY(CODE) (record->event.pressed ? SEND_STRING(SS_DOWN(X_##CODE)) : SEND_STRING_RESTORE(SS_UP(X_##CODE)))
|
||||||
|
|
||||||
|
#define KEY_SHIFT(CODE) (record->event.pressed ? SEND_STRING(SS_DOWN(X_LSHIFT) SS_DOWN(X_##CODE)) : SEND_STRING_RESTORE(SS_UP(X_##CODE)))
|
||||||
|
|
||||||
|
#define KEY_UPSHIFT(CODE) (record->event.pressed ? SEND_STRING(SS_UP(X_LSHIFT) SS_DOWN(X_##CODE)) : SEND_STRING_RESTORE(SS_UP(X_##CODE)))
|
||||||
|
|
||||||
|
#define SHIFT_DU(CODE_DOWN, CODE_UP) (SHIFT_PRESSED ? CODE_DOWN : CODE_UP)
|
||||||
|
#define CASE_US(CODE, US, JP) \
|
||||||
|
case CODE: \
|
||||||
|
(LAYOUT_STATUS == JP_LAYOUT ? JP : US); \
|
||||||
|
return false;
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
CASE_US(CSTM_0, KEY(0), SHIFT_DU(KEY_SHIFT(9), KEY(0)));
|
||||||
|
CASE_US(CSTM_1, KEY(1), KEY(1));
|
||||||
|
CASE_US(CSTM_2, KEY(2), SHIFT_DU(KEY_UPSHIFT(LBRACKET), KEY(2)));
|
||||||
|
CASE_US(CSTM_3, KEY(3), KEY(3));
|
||||||
|
CASE_US(CSTM_4, KEY(4), KEY(4));
|
||||||
|
CASE_US(CSTM_5, KEY(5), KEY(5));
|
||||||
|
CASE_US(CSTM_6, KEY(6), SHIFT_DU(KEY_UPSHIFT(EQUAL), KEY(6)));
|
||||||
|
CASE_US(CSTM_7, KEY(7), SHIFT_DU(KEY_SHIFT(6), KEY(7)));
|
||||||
|
CASE_US(CSTM_8, KEY(8), SHIFT_DU(KEY_SHIFT(QUOTE), KEY(8)));
|
||||||
|
CASE_US(CSTM_9, KEY(9), SHIFT_DU(KEY_SHIFT(8), KEY(9)));
|
||||||
|
CASE_US(DEL, KEY(DELETE), KEY_UPSHIFT(BSPACE));
|
||||||
|
CASE_US(TILD, KEY_SHIFT(GRAVE), KEY_SHIFT(EQUAL));
|
||||||
|
CASE_US(EXLM, KEY_SHIFT(1), KEY_SHIFT(1));
|
||||||
|
CASE_US(AT, KEY_SHIFT(2), KEY(LBRACKET));
|
||||||
|
CASE_US(HASH, KEY_SHIFT(3), KEY_SHIFT(3));
|
||||||
|
CASE_US(DLR, KEY_SHIFT(4), KEY_SHIFT(4));
|
||||||
|
CASE_US(PERC, KEY_SHIFT(5), KEY_SHIFT(5));
|
||||||
|
CASE_US(CIRC, KEY_SHIFT(6), KEY(EQUAL));
|
||||||
|
CASE_US(AMPR, KEY_SHIFT(7), KEY_SHIFT(6));
|
||||||
|
CASE_US(ASTR, KEY_SHIFT(8), KEY_SHIFT(QUOTE));
|
||||||
|
CASE_US(LPRN, KEY_SHIFT(9), KEY_SHIFT(8));
|
||||||
|
CASE_US(RPRN, KEY_SHIFT(0), KEY_SHIFT(9));
|
||||||
|
CASE_US(LBRC, KEY(LBRACKET), SHIFT_DU(KEY_SHIFT(RBRACKET), KEY(RBRACKET)));
|
||||||
|
CASE_US(RBRC, KEY(RBRACKET), SHIFT_DU(KEY_SHIFT(NONUS_HASH), KEY(NONUS_HASH)));
|
||||||
|
CASE_US(LCBR, KEY_SHIFT(LBRACKET), KEY_SHIFT(RBRACKET));
|
||||||
|
CASE_US(RCBR, KEY_SHIFT(RBRACKET), KEY_SHIFT(NONUS_HASH));
|
||||||
|
CASE_US(GRV, KEY(GRAVE), SHIFT_DU(KEY_SHIFT(EQUAL), KEY_SHIFT(LBRACKET)));
|
||||||
|
CASE_US(BSLS, KEY(BSLASH), SHIFT_DU(KEY_SHIFT(INT3), KEY(INT3)));
|
||||||
|
CASE_US(PIPE, KEY_SHIFT(BSLASH), KEY_SHIFT(INT3));
|
||||||
|
CASE_US(MINS, KEY(MINUS), SHIFT_DU(KEY_SHIFT(INT1), KEY(MINUS)));
|
||||||
|
CASE_US(UNDS, KEY_SHIFT(MINUS), KEY_SHIFT(INT1));
|
||||||
|
CASE_US(EQL, KEY(EQUAL), SHIFT_DU(KEY_SHIFT(SCOLON), KEY_SHIFT(MINUS)));
|
||||||
|
CASE_US(PLUS, KEY_SHIFT(EQUAL), KEY_SHIFT(SCOLON));
|
||||||
|
CASE_US(SCLN, KEY(SCOLON), SHIFT_DU(KEY_UPSHIFT(QUOTE), KEY(SCOLON)));
|
||||||
|
CASE_US(QUOT, KEY(QUOTE), SHIFT_DU(KEY_SHIFT(2), KEY_SHIFT(7)));
|
||||||
|
case JP:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
LAYOUT_STATUS = JP_LAYOUT;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case US:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
LAYOUT_STATUS = US_LAYOUT;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case SHIFT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING(SS_DOWN(X_LSHIFT));
|
||||||
|
SHIFT_PRESSED = true;
|
||||||
|
} else {
|
||||||
|
SEND_STRING(SS_UP(X_LSHIFT));
|
||||||
|
SHIFT_PRESSED = false;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
}
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
}
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case ADJUST:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"keyboard":"ergodash/rev1","keymap":"m47ch4ns_keymap","layout":"LAYOUT_3key_1us","layers":[["KC_ESC","KC_1","KC_2","KC_3","KC_4","KC_5","KC_NO","KC_NO","KC_6","KC_7","KC_8","KC_9","KC_0","KC_GRV","KC_TAB","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_NO","KC_NO","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_BSLS","KC_LCTL","KC_A","KC_S","KC_D","KC_F","KC_G","KC_NO","KC_NO","KC_H","KC_J","KC_K","KC_L","KC_SCLN","KC_QUOT","KC_LSFT","KC_Z","KC_X","KC_C","KC_V","KC_B","KC_LSFT","KC_RSFT","KC_N","KC_M","KC_COMM","KC_DOT","KC_SLSH","KC_RSFT","KC_LSFT","ANY(ADJUST)","KC_LALT","KC_LGUI","ANY(LOWER)","KC_SPC","KC_ENT","ANY(RAISE)","KC_RGUI","KC_RALT","ANY(ADJUST)","KC_RSFT"],["KC_F11","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_TRNS","KC_TRNS","KC_F6","KC_F7","KC_F8","KC_F9","KC_F10","KC_F12","KC_TRNS","KC_EXLM","KC_AT","KC_HASH","KC_DLR","KC_PERC","KC_TRNS","KC_TRNS","KC_CIRC","KC_AMPR","KC_ASTR","KC_LPRN","KC_RPRN","KC_PIPE","KC_TRNS","KC_1","KC_2","KC_3","KC_4","KC_5","KC_TRNS","KC_TRNS","KC_6","KC_7","KC_8","KC_9","KC_0","KC_TRNS","KC_TRNS","KC_NO","KC_NO","KC_NO","KC_MINS","KC_UNDS","KC_TRNS","KC_TRNS","KC_PLUS","KC_EQL","KC_LBRC","KC_RBRC","KC_NO","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_ESC","KC_BSPC","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS"],["KC_F11","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_TRNS","KC_TRNS","KC_F6","KC_F7","KC_F8","KC_F9","KC_F10","KC_F12","KC_TRNS","KC_EXLM","KC_AT","KC_HASH","KC_DLR","KC_PERC","KC_TRNS","KC_TRNS","KC_CIRC","KC_AMPR","KC_ASTR","KC_LPRN","KC_RPRN","KC_PIPE","KC_TRNS","KC_1","KC_2","KC_3","KC_4","KC_5","KC_TRNS","KC_TRNS","KC_6","KC_7","KC_8","KC_9","KC_0","KC_TRNS","KC_TRNS","KC_NO","KC_LBRC","KC_RBRC","KC_MINS","KC_UNDS","KC_TRNS","KC_TRNS","KC_PLUS","KC_EQL","KC_NO","KC_NO","KC_NO","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_ESC","KC_BSPC","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS"],["KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_HOME","KC_PGDN","KC_PGUP","KC_END","KC_TRNS","KC_TRNS","KC_TRNS","KC_LEFT","KC_DOWN","KC_UP","KC_RGHT","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_LCBR","KC_RCBR","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS"]],"author":"","notes":""}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
# m47ch4n's keymap for Ergodash rev1
|
||||||
|
|
||||||
|
This is the m47ch4n's keymap configuration for Ergodash rev1.
|
||||||
|
There are four layers, QWERTY(default), LOWER, RAISE and ADJSUT.
|
||||||
|
|
||||||
|
## Layers
|
||||||
|
|
||||||
|
### Qwerty
|
||||||
|
|
||||||
|
```
|
||||||
|
,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
| ESC | 1 | 2 | 3 | 4 | 5 | ZKHK | | ZKHK | 6 | 7 | 8 | 9 | 0 | ` |
|
||||||
|
|------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
| TAB | Q | W | E | R | T | MHEN | |HENKAN| Y | U | I | O | P | \ |
|
||||||
|
|------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
| CTRL | A | S | D | F | G | EISU |<-- ONLY FOR MAC -->| KANA | H | J | K | L | ; | ' |
|
||||||
|
|------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
|
||||||
|
| SHIFT| Z | X | C | V | B | SHIFT| | SHIFT| N | M | , | . | / | SHIFT|
|
||||||
|
|-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
|
||||||
|
| SHIFT|ADJUST| ALT | GUI |||||||| LOWER| SPACE| |||||||| | ENTER| RAISE|||||||| GUI | ALT |ADJUST| SHIFT|
|
||||||
|
,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
```
|
||||||
|
|
||||||
|
### Lower
|
||||||
|
|
||||||
|
```
|
||||||
|
,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
| F11 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F12 |
|
||||||
|
|------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
| ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | |
|
||||||
|
|------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
| | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | |
|
||||||
|
|------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
|
||||||
|
| |||||||||||||||||||||| - | _ | | | | + | = | [ | ] |||||||| |
|
||||||
|
|-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
|
||||||
|
| | | | |||||||| | ESC | |||||||| | BKSP | |||||||| | | | |
|
||||||
|
,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
```
|
||||||
|
|
||||||
|
### Raise
|
||||||
|
|
||||||
|
```
|
||||||
|
,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
| F11 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F12 |
|
||||||
|
|------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
| ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | |
|
||||||
|
|------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
| | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | |
|
||||||
|
|------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
|
||||||
|
| |||||||| [ | ] | - | _ | | | | + | = |||||||||||||||||||||| |
|
||||||
|
|-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
|
||||||
|
| | | | |||||||| | ESC | |||||||| | BKSP | |||||||| | | | |
|
||||||
|
,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
```
|
||||||
|
|
||||||
|
### Adjust
|
||||||
|
|
||||||
|
```
|
||||||
|
,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
| | | | | | | US | | JP | | | | | | |
|
||||||
|
|------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
| | | | | | | | | | | | | | | |
|
||||||
|
|------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------|
|
||||||
|
| | HOME |PAGEDN|PAGEUP| END |||||||| | | | LEFT | DOWN | UP | RIGHT|||||||| |
|
||||||
|
|------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------|
|
||||||
|
| | | { | } | | | | | | | | { | } | | |
|
||||||
|
|-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------|
|
||||||
|
| | | | |||||||| | | |||||||| | | |||||||| | | | |
|
||||||
|
,----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
```
|
||||||
|
|
||||||
|
If your pc connect this keyboard with JIS(JP) layout, you should press JP MODE key.
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
BACKLIGHT_ENABLE = no
|
||||||
|
RGBLIGHT_ENABLE = no
|
||||||
|
AUDIO_ENABLE = no
|
||||||
@@ -198,13 +198,13 @@
|
|||||||
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \
|
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \
|
||||||
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \
|
||||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \
|
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \
|
||||||
K400, K401, K402, K406, K411, K413, K414, K415 \
|
K400, K401, K403, K406, K411, K413, K414, K415 \
|
||||||
) { \
|
) { \
|
||||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \
|
||||||
{ K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \
|
{ K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \
|
||||||
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \
|
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \
|
||||||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \
|
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \
|
||||||
{ K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414, K415 } \
|
{ K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, KC_NO, K413, K414, K415 } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LAYOUT_65_ansi_7u_wk( \
|
#define LAYOUT_65_ansi_7u_wk( \
|
||||||
@@ -212,13 +212,13 @@
|
|||||||
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \
|
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \
|
||||||
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \
|
||||||
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \
|
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \
|
||||||
K400, K401, K402, K406, K411, K413, K414, K415 \
|
K400, K401, K403, K406, K411, K413, K414, K415 \
|
||||||
) LAYOUT_65_all_7u_wk( \
|
) LAYOUT_65_all_7u_wk( \
|
||||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \
|
||||||
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \
|
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \
|
||||||
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \
|
||||||
K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \
|
K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \
|
||||||
K400, K401, K402, K406, K411, K413, K414, K415 \
|
K400, K401, K403, K406, K411, K413, K414, K415 \
|
||||||
)
|
)
|
||||||
|
|
||||||
#define LAYOUT_65_ansi_7u_wk_splitbs( \
|
#define LAYOUT_65_ansi_7u_wk_splitbs( \
|
||||||
@@ -226,13 +226,13 @@
|
|||||||
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \
|
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \
|
||||||
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \
|
||||||
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \
|
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \
|
||||||
K400, K401, K402, K406, K411, K413, K414, K415 \
|
K400, K401, K403, K406, K411, K413, K414, K415 \
|
||||||
) LAYOUT_65_all_7u_wk( \
|
) LAYOUT_65_all_7u_wk( \
|
||||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
||||||
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \
|
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \
|
||||||
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \
|
||||||
K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \
|
K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \
|
||||||
K400, K401, K402, K406, K411, K413, K414, K415 \
|
K400, K401, K403, K406, K411, K413, K414, K415 \
|
||||||
)
|
)
|
||||||
|
|
||||||
#define LAYOUT_65_iso_7u_wk( \
|
#define LAYOUT_65_iso_7u_wk( \
|
||||||
@@ -240,13 +240,13 @@
|
|||||||
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \
|
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \
|
||||||
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K114, K214, K215, \
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K114, K214, K215, \
|
||||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \
|
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \
|
||||||
K400, K401, K402, K406, K411, K413, K414, K415 \
|
K400, K401, K403, K406, K411, K413, K414, K415 \
|
||||||
) LAYOUT_65_all_7u_wk( \
|
) LAYOUT_65_all_7u_wk( \
|
||||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015, \
|
||||||
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \
|
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \
|
||||||
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \
|
||||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \
|
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \
|
||||||
K400, K401, K402, K406, K411, K413, K414, K415 \
|
K400, K401, K403, K406, K411, K413, K414, K415 \
|
||||||
)
|
)
|
||||||
|
|
||||||
// layout with bottom row 1.5,blocker,1.5,7,1.5, blocker, <-,v,->
|
// layout with bottom row 1.5,blocker,1.5,7,1.5, blocker, <-,v,->
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum keyboard_layers {
|
||||||
|
_BL = 0, // Base Layer
|
||||||
|
_FL, // Function Layer
|
||||||
|
_LL // Lights layer
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_BL] = LAYOUT_65_ansi_7u_wk_splitbs(
|
||||||
|
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_HOME,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP,
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, LT(_FL, KC_UP), KC_DEL,
|
||||||
|
MO(_LL), KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
|
[_FL] = LAYOUT_65_ansi_7u_wk_splitbs(
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, _______,
|
||||||
|
_______, _______, _______, _______, RESET, _______, _______, _______, _______, KC_SLCK, KC_PAUS, KC_UP, _______, _______, _______,
|
||||||
|
_______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______),
|
||||||
|
|
||||||
|
[_LL] = LAYOUT_65_ansi_7u_wk_splitbs(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_VAD,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAD,
|
||||||
|
_______, _______, _______, _______, _______, RGB_RMOD, RGB_HUD, RGB_MOD),
|
||||||
|
};
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# crd's Keymap
|
||||||
|
|
||||||
|
Difference from base layout:
|
||||||
|
* split backspace
|
||||||
|
* blocker bottom row
|
||||||
|
* HHKB Fn layer on Up key when held
|
||||||
|
* lights layer on left Ctrl
|
||||||
+280
-8
@@ -1,18 +1,290 @@
|
|||||||
{
|
{
|
||||||
"keyboard_name": "freyr",
|
"keyboard_name": "freyr",
|
||||||
"url": "",
|
"url": "",
|
||||||
"maintainer": "qmk",
|
"maintainer": "vuhopkep",
|
||||||
"width": 21.25,
|
"width": 18.25,
|
||||||
"height": 6.5,
|
"height": 6.25,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT_all": {
|
"LAYOUT_all": {
|
||||||
"layout": [{"label":"Esc", "x":3, "y":0.25}, {"label":"F1", "x":5, "y":0.25}, {"label":"F2", "x":6, "y":0.25}, {"label":"F3", "x":7, "y":0.25}, {"label":"F4", "x":8, "y":0.25}, {"label":"F5", "x":9.5, "y":0.25}, {"label":"F6", "x":10.5, "y":0.25}, {"label":"F7", "x":11.5, "y":0.25}, {"label":"F8", "x":12.5, "y":0.25}, {"label":"F9", "x":14, "y":0.25}, {"label":"F10", "x":15, "y":0.25}, {"label":"F11", "x":16, "y":0.25}, {"label":"F12", "x":17, "y":0.25}, {"label":"PrtSc", "x":18.25, "y":0.25}, {"label":"Scroll Lock", "x":19.25, "y":0.25}, {"label":"Pause", "x":20.25, "y":0.25}, {"label":"~", "x":3, "y":1.5}, {"label":"!", "x":4, "y":1.5}, {"label":"@", "x":5, "y":1.5}, {"label":"#", "x":6, "y":1.5}, {"label":"$", "x":7, "y":1.5}, {"label":"%", "x":8, "y":1.5}, {"label":"^", "x":9, "y":1.5}, {"label":"&", "x":10, "y":1.5}, {"label":"*", "x":11, "y":1.5}, {"label":"(", "x":12, "y":1.5}, {"label":")", "x":13, "y":1.5}, {"label":"_", "x":14, "y":1.5}, {"label":"+", "x":15, "y":1.5}, {"label":"Backspace", "x":16, "y":1.5, "w":2}, {"label":"Insert", "x":18.25, "y":1.5}, {"label":"Home", "x":19.25, "y":1.5}, {"label":"PgUp", "x":20.25, "y":1.5}, {"label":"Tab", "x":3, "y":2.5, "w":1.5}, {"label":"Q", "x":4.5, "y":2.5}, {"label":"W", "x":5.5, "y":2.5}, {"label":"E", "x":6.5, "y":2.5}, {"label":"R", "x":7.5, "y":2.5}, {"label":"T", "x":8.5, "y":2.5}, {"label":"Y", "x":9.5, "y":2.5}, {"label":"U", "x":10.5, "y":2.5}, {"label":"I", "x":11.5, "y":2.5}, {"label":"O", "x":12.5, "y":2.5}, {"label":"P", "x":13.5, "y":2.5}, {"label":"{", "x":14.5, "y":2.5}, {"label":"}", "x":15.5, "y":2.5}, {"label":"Enter", "x":16.75, "y":2.5, "w":1.25, "h":2}, {"label":"Delete", "x":18.25, "y":2.5}, {"label":"End", "x":19.25, "y":2.5}, {"label":"PgDn", "x":20.25, "y":2.5}, {"label":"Caps", "x":3, "y":3.5, "w":1.25}, {"label":"A", "x":4.75, "y":3.5}, {"label":"S", "x":5.75, "y":3.5}, {"label":"D", "x":6.75, "y":3.5}, {"label":"F", "x":7.75, "y":3.5}, {"label":"G", "x":8.75, "y":3.5}, {"label":"H", "x":9.75, "y":3.5}, {"label":"J", "x":10.75, "y":3.5}, {"label":"K", "x":11.75, "y":3.5}, {"label":"L", "x":12.75, "y":3.5}, {"label":":", "x":13.75, "y":3.5}, {"label":"\"", "x":14.75, "y":3.5}, {"x":15.75, "y":3.5}, {"label":"Shift", "x":3, "y":4.5, "w":1.25}, {"x":4.25, "y":4.5}, {"label":"Z", "x":5.25, "y":4.5}, {"label":"X", "x":6.25, "y":4.5}, {"label":"C", "x":7.25, "y":4.5}, {"label":"V", "x":8.25, "y":4.5}, {"label":"B", "x":9.25, "y":4.5}, {"label":"N", "x":10.25, "y":4.5}, {"label":"M", "x":11.25, "y":4.5}, {"label":"<", "x":12.25, "y":4.5}, {"label":">", "x":13.25, "y":4.5}, {"label":"?", "x":14.25, "y":4.5}, {"x":15.25, "y":4.5}, {"x":16.25, "y":4.5, "w":1.75}, {"label":"\u2191", "x":19.25, "y":4.5}, {"label":"Ctrl", "x":3, "y":5.5, "w":1.25}, {"label":"Win", "x":4.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":5.5, "y":5.5, "w":1.25}, {"x":6.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":13, "y":5.5, "w":1.25}, {"label":"Win", "x":14.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":15.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":16.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":18.25, "y":5.5}, {"label":"\u2193", "x":19.25, "y":5.5}, {"label":"\u2192", "x":20.25, "y":5.5}]
|
"key_count": 91,
|
||||||
|
"layout": [
|
||||||
|
{"label":"Esc (k00)", "x":0, "y":0},
|
||||||
|
{"label":"F1 (k01)", "x":2, "y":0},
|
||||||
|
{"label":"F2 (k02)", "x":3, "y":0},
|
||||||
|
{"label":"F3 (k03)", "x":4, "y":0},
|
||||||
|
{"label":"F4 (k04)", "x":5, "y":0},
|
||||||
|
{"label":"F5 (k06)", "x":6.5, "y":0},
|
||||||
|
{"label":"F6 (k07)", "x":7.5, "y":0},
|
||||||
|
{"label":"F7 (k08)", "x":8.5, "y":0},
|
||||||
|
{"label":"F8 (k09)", "x":9.5, "y":0},
|
||||||
|
{"label":"F9 (k60)", "x":11, "y":0},
|
||||||
|
{"label":"F10 (k61)", "x":12, "y":0},
|
||||||
|
{"label":"F11 (k62)", "x":13, "y":0},
|
||||||
|
{"label":"F12 (k63)", "x":14, "y":0},
|
||||||
|
{"label":"PrtSc (k64)", "x":15.25, "y":0},
|
||||||
|
{"label":"Scroll Lock (k65)", "x":16.25, "y":0},
|
||||||
|
{"label":"Pause (k66)", "x":17.25, "y":0},
|
||||||
|
{"label":"~ (k10)", "x":0, "y":1.25},
|
||||||
|
{"label":"! (k11)", "x":1, "y":1.25},
|
||||||
|
{"label":"@ (k12)", "x":2, "y":1.25},
|
||||||
|
{"label":"# (k13)", "x":3, "y":1.25},
|
||||||
|
{"label":"$ (k14)", "x":4, "y":1.25},
|
||||||
|
{"label":"% (k15)", "x":5, "y":1.25},
|
||||||
|
{"label":"^ (k16)", "x":6, "y":1.25},
|
||||||
|
{"label":"& (k17)", "x":7, "y":1.25},
|
||||||
|
{"label":"* (k18)", "x":8, "y":1.25},
|
||||||
|
{"label":"( (k19)", "x":9, "y":1.25},
|
||||||
|
{"label":") (k70)", "x":10, "y":1.25},
|
||||||
|
{"label":"_ (k71)", "x":11, "y":1.25},
|
||||||
|
{"label":"+ (k72)", "x":12, "y":1.25},
|
||||||
|
{"label":"Backspace (k73)", "x":13, "y":1.25},
|
||||||
|
{"label":"Backspace2 (k74)", "x":14, "y":1.25},
|
||||||
|
{"label":"Insert (k75)", "x":15.25, "y":1.25},
|
||||||
|
{"label":"Home (k76)", "x":16.25, "y":1.25},
|
||||||
|
{"label":"PgUp (k67)", "x":17.25, "y":1.25},
|
||||||
|
{"label":"Tab (k20)", "x":0, "y":2.25, "w":1.5},
|
||||||
|
{"label":"Q (k21)", "x":1.5, "y":2.25},
|
||||||
|
{"label":"W (k22)", "x":2.5, "y":2.25},
|
||||||
|
{"label":"E (k23)", "x":3.5, "y":2.25},
|
||||||
|
{"label":"R (k24)", "x":4.5, "y":2.25},
|
||||||
|
{"label":"T (k25)", "x":5.5, "y":2.25},
|
||||||
|
{"label":"Y (k26)", "x":6.5, "y":2.25},
|
||||||
|
{"label":"U (k27)", "x":7.5, "y":2.25},
|
||||||
|
{"label":"I (k28)", "x":8.5, "y":2.25},
|
||||||
|
{"label":"O (k29)", "x":9.5, "y":2.25},
|
||||||
|
{"label":"P (k80)", "x":10.5, "y":2.25},
|
||||||
|
{"label":"{ (k81)", "x":11.5, "y":2.25},
|
||||||
|
{"label":"} (k82)", "x":12.5, "y":2.25},
|
||||||
|
{"label":"| (k83)", "x":13.5, "y":2.25, "w":1.5},
|
||||||
|
{"label":"Delete (k78)", "x":15.25, "y":2.25},
|
||||||
|
{"label":"End (k77)", "x":16.25, "y":2.25},
|
||||||
|
{"label":"PgDn (k68)", "x":17.25, "y":2.25},
|
||||||
|
{"label":"Caps Lock (k30)", "x":0, "y":3.25, "w":1.75},
|
||||||
|
{"label":"A (k31)", "x":1.75, "y":3.25},
|
||||||
|
{"label":"S (k32)", "x":2.75, "y":3.25},
|
||||||
|
{"label":"D (k33)", "x":3.75, "y":3.25},
|
||||||
|
{"label":"F (k34)", "x":4.75, "y":3.25},
|
||||||
|
{"label":"G (k35)", "x":5.75, "y":3.25},
|
||||||
|
{"label":"H (k36)", "x":6.75, "y":3.25},
|
||||||
|
{"label":"J (k37)", "x":7.75, "y":3.25},
|
||||||
|
{"label":"K (k38)", "x":8.75, "y":3.25},
|
||||||
|
{"label":"L (k39)", "x":9.75, "y":3.25},
|
||||||
|
{"label":": (k90)", "x":10.75, "y":3.25},
|
||||||
|
{"label":"\" (k91)", "x":11.75, "y":3.25},
|
||||||
|
{"label":"~ (k92)", "x":12.75, "y":3.25},
|
||||||
|
{"label":"Enter (k84)", "x":13.75, "y":3.25, "w":1.25},
|
||||||
|
{"label":"Shift (k40)", "x":0, "y":4.25, "w":1.25},
|
||||||
|
{"label":"| (k41)", "x":1.25, "y":4.25},
|
||||||
|
{"label":"Z (k42)", "x":2.25, "y":4.25},
|
||||||
|
{"label":"X (k43)", "x":3.25, "y":4.25},
|
||||||
|
{"label":"C (k44)", "x":4.25, "y":4.25},
|
||||||
|
{"label":"V (k45)", "x":5.25, "y":4.25},
|
||||||
|
{"label":"B (k46)", "x":6.25, "y":4.25},
|
||||||
|
{"label":"N (k47)", "x":7.25, "y":4.25},
|
||||||
|
{"label":"M (k48)", "x":8.25, "y":4.25},
|
||||||
|
{"label":"< (k49)", "x":9.25, "y":4.25},
|
||||||
|
{"label":"> (k95)", "x":10.25, "y":4.25},
|
||||||
|
{"label":"? (k94)", "x":11.25, "y":4.25},
|
||||||
|
{"label":"JP Ro (k85)", "x":12.25, "y":4.25},
|
||||||
|
{"label":"Shift (k93)", "x":13.25, "y":4.25, "w":1.75},
|
||||||
|
{"label":"Up (k79)", "x":16.25, "y":4.25},
|
||||||
|
{"label":"Ctrl (k50)", "x":0, "y":5.25, "w":1.25},
|
||||||
|
{"label":"Win (k51)", "x":1.25, "y":5.25, "w":1.25},
|
||||||
|
{"label":"Alt (k52)", "x":2.5, "y":5.25, "w":1.25},
|
||||||
|
{"label":"Space (k53)", "x":3.75, "y":5.25, "w":6.25},
|
||||||
|
{"label":"Alt (k54)", "x":10, "y":5.25, "w":1.25},
|
||||||
|
{"label":"Win (k55)", "x":11.25, "y":5.25, "w":1.25},
|
||||||
|
{"label":"Menu (k56)", "x":12.5, "y":5.25, "w":1.25},
|
||||||
|
{"label":"Ctrl (k57)", "x":13.75, "y":5.25, "w":1.25},
|
||||||
|
{"label":"Left (k58)", "x":15.25, "y":5.25},
|
||||||
|
{"label":"Down (k59)", "x":16.25, "y":5.25},
|
||||||
|
{"label":"Right (k69)", "x":17.25, "y":5.25}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"LAYOUT_tkl_ansi": {
|
"LAYOUT_tkl_ansi": {
|
||||||
"layout": [{"label":"Esc", "x":3, "y":0.25}, {"label":"F1", "x":5, "y":0.25}, {"label":"F2", "x":6, "y":0.25}, {"label":"F3", "x":7, "y":0.25}, {"label":"F4", "x":8, "y":0.25}, {"label":"F5", "x":9.5, "y":0.25}, {"label":"F6", "x":10.5, "y":0.25}, {"label":"F7", "x":11.5, "y":0.25}, {"label":"F8", "x":12.5, "y":0.25}, {"label":"F9", "x":14, "y":0.25}, {"label":"F10", "x":15, "y":0.25}, {"label":"F11", "x":16, "y":0.25}, {"label":"F12", "x":17, "y":0.25}, {"label":"PrtSc", "x":18.25, "y":0.25}, {"label":"Scroll Lock", "x":19.25, "y":0.25}, {"label":"Pause", "x":20.25, "y":0.25}, {"label":"~", "x":3, "y":1.5}, {"label":"!", "x":4, "y":1.5}, {"label":"@", "x":5, "y":1.5}, {"label":"#", "x":6, "y":1.5}, {"label":"$", "x":7, "y":1.5}, {"label":"%", "x":8, "y":1.5}, {"label":"^", "x":9, "y":1.5}, {"label":"&", "x":10, "y":1.5}, {"label":"*", "x":11, "y":1.5}, {"label":"(", "x":12, "y":1.5}, {"label":")", "x":13, "y":1.5}, {"label":"_", "x":14, "y":1.5}, {"label":"+", "x":15, "y":1.5}, {"label":"Backspace", "x":16, "y":1.5, "w":2}, {"label":"Insert", "x":18.25, "y":1.5}, {"label":"Home", "x":19.25, "y":1.5}, {"label":"PgUp", "x":20.25, "y":1.5}, {"label":"Tab", "x":3, "y":2.5, "w":1.5}, {"label":"Q", "x":4.5, "y":2.5}, {"label":"W", "x":5.5, "y":2.5}, {"label":"E", "x":6.5, "y":2.5}, {"label":"R", "x":7.5, "y":2.5}, {"label":"T", "x":8.5, "y":2.5}, {"label":"Y", "x":9.5, "y":2.5}, {"label":"U", "x":10.5, "y":2.5}, {"label":"I", "x":11.5, "y":2.5}, {"label":"O", "x":12.5, "y":2.5}, {"label":"P", "x":13.5, "y":2.5}, {"label":"{", "x":14.5, "y":2.5}, {"label":"}", "x":15.5, "y":2.5}, {"label":"|", "x":16.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":18.25, "y":2.5}, {"label":"End", "x":19.25, "y":2.5}, {"label":"PgDn", "x":20.25, "y":2.5}, {"label":"Caps Lock", "x":3, "y":3.5, "w":1.75}, {"label":"A", "x":4.75, "y":3.5}, {"label":"S", "x":5.75, "y":3.5}, {"label":"D", "x":6.75, "y":3.5}, {"label":"F", "x":7.75, "y":3.5}, {"label":"G", "x":8.75, "y":3.5}, {"label":"H", "x":9.75, "y":3.5}, {"label":"J", "x":10.75, "y":3.5}, {"label":"K", "x":11.75, "y":3.5}, {"label":"L", "x":12.75, "y":3.5}, {"label":":", "x":13.75, "y":3.5}, {"label":"\"", "x":14.75, "y":3.5}, {"label":"Enter", "x":15.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":3, "y":4.5, "w":2.25}, {"label":"Z", "x":5.25, "y":4.5}, {"label":"X", "x":6.25, "y":4.5}, {"label":"C", "x":7.25, "y":4.5}, {"label":"V", "x":8.25, "y":4.5}, {"label":"B", "x":9.25, "y":4.5}, {"label":"N", "x":10.25, "y":4.5}, {"label":"M", "x":11.25, "y":4.5}, {"label":"<", "x":12.25, "y":4.5}, {"label":">", "x":13.25, "y":4.5}, {"label":"?", "x":14.25, "y":4.5}, {"label":"Shift", "x":15.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":19.25, "y":4.5}, {"label":"Ctrl", "x":3, "y":5.5, "w":1.25}, {"label":"Win", "x":4.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":5.5, "y":5.5, "w":1.25}, {"x":6.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":13, "y":5.5, "w":1.25}, {"label":"Win", "x":14.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":15.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":16.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":18.25, "y":5.5}, {"label":"\u2193", "x":19.25, "y":5.5}, {"label":"\u2192", "x":20.25, "y":5.5}]
|
"key_count": 87,
|
||||||
|
"layout": [
|
||||||
|
{"label":"Esc", "x":0, "y":0},
|
||||||
|
{"label":"F1", "x":2, "y":0},
|
||||||
|
{"label":"F2", "x":3, "y":0},
|
||||||
|
{"label":"F3", "x":4, "y":0},
|
||||||
|
{"label":"F4", "x":5, "y":0},
|
||||||
|
{"label":"F5", "x":6.5, "y":0},
|
||||||
|
{"label":"F6", "x":7.5, "y":0},
|
||||||
|
{"label":"F7", "x":8.5, "y":0},
|
||||||
|
{"label":"F8", "x":9.5, "y":0},
|
||||||
|
{"label":"F9", "x":11, "y":0},
|
||||||
|
{"label":"F10", "x":12, "y":0},
|
||||||
|
{"label":"F11", "x":13, "y":0},
|
||||||
|
{"label":"F12", "x":14, "y":0},
|
||||||
|
{"label":"PrtSc", "x":15.25, "y":0},
|
||||||
|
{"label":"Scroll Lock", "x":16.25, "y":0},
|
||||||
|
{"label":"Pause", "x":17.25, "y":0},
|
||||||
|
{"label":"~", "x":0, "y":1.25},
|
||||||
|
{"label":"!", "x":1, "y":1.25},
|
||||||
|
{"label":"@", "x":2, "y":1.25},
|
||||||
|
{"label":"#", "x":3, "y":1.25},
|
||||||
|
{"label":"$", "x":4, "y":1.25},
|
||||||
|
{"label":"%", "x":5, "y":1.25},
|
||||||
|
{"label":"^", "x":6, "y":1.25},
|
||||||
|
{"label":"&", "x":7, "y":1.25},
|
||||||
|
{"label":"*", "x":8, "y":1.25},
|
||||||
|
{"label":"(", "x":9, "y":1.25},
|
||||||
|
{"label":")", "x":10, "y":1.25},
|
||||||
|
{"label":"_", "x":11, "y":1.25},
|
||||||
|
{"label":"+", "x":12, "y":1.25},
|
||||||
|
{"label":"Backspace", "x":13, "y":1.25, "w":2},
|
||||||
|
{"label":"Insert", "x":15.25, "y":1.25},
|
||||||
|
{"label":"Home", "x":16.25, "y":1.25},
|
||||||
|
{"label":"PgUp", "x":17.25, "y":1.25},
|
||||||
|
{"label":"Tab", "x":0, "y":2.25, "w":1.5},
|
||||||
|
{"label":"Q", "x":1.5, "y":2.25},
|
||||||
|
{"label":"W", "x":2.5, "y":2.25},
|
||||||
|
{"label":"E", "x":3.5, "y":2.25},
|
||||||
|
{"label":"R", "x":4.5, "y":2.25},
|
||||||
|
{"label":"T", "x":5.5, "y":2.25},
|
||||||
|
{"label":"Y", "x":6.5, "y":2.25},
|
||||||
|
{"label":"U", "x":7.5, "y":2.25},
|
||||||
|
{"label":"I", "x":8.5, "y":2.25},
|
||||||
|
{"label":"O", "x":9.5, "y":2.25},
|
||||||
|
{"label":"P", "x":10.5, "y":2.25},
|
||||||
|
{"label":"{", "x":11.5, "y":2.25},
|
||||||
|
{"label":"}", "x":12.5, "y":2.25},
|
||||||
|
{"label":"|", "x":13.5, "y":2.25, "w":1.5},
|
||||||
|
{"label":"Delete", "x":15.25, "y":2.25},
|
||||||
|
{"label":"End", "x":16.25, "y":2.25},
|
||||||
|
{"label":"PgDn", "x":17.25, "y":2.25},
|
||||||
|
{"label":"Caps Lock", "x":0, "y":3.25, "w":1.75},
|
||||||
|
{"label":"A", "x":1.75, "y":3.25},
|
||||||
|
{"label":"S", "x":2.75, "y":3.25},
|
||||||
|
{"label":"D", "x":3.75, "y":3.25},
|
||||||
|
{"label":"F", "x":4.75, "y":3.25},
|
||||||
|
{"label":"G", "x":5.75, "y":3.25},
|
||||||
|
{"label":"H", "x":6.75, "y":3.25},
|
||||||
|
{"label":"J", "x":7.75, "y":3.25},
|
||||||
|
{"label":"K", "x":8.75, "y":3.25},
|
||||||
|
{"label":"L", "x":9.75, "y":3.25},
|
||||||
|
{"label":":", "x":10.75, "y":3.25},
|
||||||
|
{"label":"\"", "x":11.75, "y":3.25},
|
||||||
|
{"label":"Enter", "x":12.75, "y":3.25, "w":2.25},
|
||||||
|
{"label":"Shift", "x":0, "y":4.25, "w":2.25},
|
||||||
|
{"label":"Z", "x":2.25, "y":4.25},
|
||||||
|
{"label":"X", "x":3.25, "y":4.25},
|
||||||
|
{"label":"C", "x":4.25, "y":4.25},
|
||||||
|
{"label":"V", "x":5.25, "y":4.25},
|
||||||
|
{"label":"B", "x":6.25, "y":4.25},
|
||||||
|
{"label":"N", "x":7.25, "y":4.25},
|
||||||
|
{"label":"M", "x":8.25, "y":4.25},
|
||||||
|
{"label":"<", "x":9.25, "y":4.25},
|
||||||
|
{"label":">", "x":10.25, "y":4.25},
|
||||||
|
{"label":"?", "x":11.25, "y":4.25},
|
||||||
|
{"label":"Shift", "x":12.25, "y":4.25, "w":2.75},
|
||||||
|
{"label":"Up", "x":16.25, "y":4.25},
|
||||||
|
{"label":"Ctrl", "x":0, "y":5.25, "w":1.25},
|
||||||
|
{"label":"Win", "x":1.25, "y":5.25, "w":1.25},
|
||||||
|
{"label":"Alt", "x":2.5, "y":5.25, "w":1.25},
|
||||||
|
{"label":"Space", "x":3.75, "y":5.25, "w":6.25},
|
||||||
|
{"label":"Alt", "x":10, "y":5.25, "w":1.25},
|
||||||
|
{"label":"Win", "x":11.25, "y":5.25, "w":1.25},
|
||||||
|
{"label":"Menu", "x":12.5, "y":5.25, "w":1.25},
|
||||||
|
{"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25},
|
||||||
|
{"label":"Left", "x":15.25, "y":5.25},
|
||||||
|
{"label":"Down", "x":16.25, "y":5.25},
|
||||||
|
{"label":"Right", "x":17.25, "y":5.25}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"LAYOUT_tkl_iso": {
|
"LAYOUT_tkl_iso": {
|
||||||
"layout": [{"label":"Esc", "x":3, "y":0.25}, {"label":"F1", "x":5, "y":0.25}, {"label":"F2", "x":6, "y":0.25}, {"label":"F3", "x":7, "y":0.25}, {"label":"F4", "x":8, "y":0.25}, {"label":"F5", "x":9.5, "y":0.25}, {"label":"F6", "x":10.5, "y":0.25}, {"label":"F7", "x":11.5, "y":0.25}, {"label":"F8", "x":12.5, "y":0.25}, {"label":"F9", "x":14, "y":0.25}, {"label":"F10", "x":15, "y":0.25}, {"label":"F11", "x":16, "y":0.25}, {"label":"F12", "x":17, "y":0.25}, {"label":"PrtSc", "x":18.25, "y":0.25}, {"label":"Scroll Lock", "x":19.25, "y":0.25}, {"label":"Pause", "x":20.25, "y":0.25}, {"label":"~", "x":3, "y":1.5}, {"label":"!", "x":4, "y":1.5}, {"label":"@", "x":5, "y":1.5}, {"label":"#", "x":6, "y":1.5}, {"label":"$", "x":7, "y":1.5}, {"label":"%", "x":8, "y":1.5}, {"label":"^", "x":9, "y":1.5}, {"label":"&", "x":10, "y":1.5}, {"label":"*", "x":11, "y":1.5}, {"label":"(", "x":12, "y":1.5}, {"label":")", "x":13, "y":1.5}, {"label":"_", "x":14, "y":1.5}, {"label":"+", "x":15, "y":1.5}, {"label":"Backspace", "x":16, "y":1.5, "w":2}, {"label":"Insert", "x":18.25, "y":1.5}, {"label":"Home", "x":19.25, "y":1.5}, {"label":"PgUp", "x":20.25, "y":1.5}, {"label":"Tab", "x":3, "y":2.5, "w":1.5}, {"label":"Q", "x":4.5, "y":2.5}, {"label":"W", "x":5.5, "y":2.5}, {"label":"E", "x":6.5, "y":2.5}, {"label":"R", "x":7.5, "y":2.5}, {"label":"T", "x":8.5, "y":2.5}, {"label":"Y", "x":9.5, "y":2.5}, {"label":"U", "x":10.5, "y":2.5}, {"label":"I", "x":11.5, "y":2.5}, {"label":"O", "x":12.5, "y":2.5}, {"label":"P", "x":13.5, "y":2.5}, {"label":"{", "x":14.5, "y":2.5}, {"label":"}", "x":15.5, "y":2.5}, {"label":"Enter", "x":16.75, "y":2.5, "w":1.25, "h":2}, {"label":"Delete", "x":18.25, "y":2.5}, {"label":"End", "x":19.25, "y":2.5}, {"label":"PgDn", "x":20.25, "y":2.5}, {"label":"Caps Lock", "x":3, "y":3.5, "w":1.75}, {"label":"A", "x":4.75, "y":3.5}, {"label":"S", "x":5.75, "y":3.5}, {"label":"D", "x":6.75, "y":3.5}, {"label":"F", "x":7.75, "y":3.5}, {"label":"G", "x":8.75, "y":3.5}, {"label":"H", "x":9.75, "y":3.5}, {"label":"J", "x":10.75, "y":3.5}, {"label":"K", "x":11.75, "y":3.5}, {"label":"L", "x":12.75, "y":3.5}, {"label":":", "x":13.75, "y":3.5}, {"label":"\"", "x":14.75, "y":3.5}, {"x":15.75, "y":3.5}, {"label":"Shift", "x":3, "y":4.5, "w":1.25}, {"x":4.25, "y":4.5}, {"label":"Z", "x":5.25, "y":4.5}, {"label":"X", "x":6.25, "y":4.5}, {"label":"C", "x":7.25, "y":4.5}, {"label":"V", "x":8.25, "y":4.5}, {"label":"B", "x":9.25, "y":4.5}, {"label":"N", "x":10.25, "y":4.5}, {"label":"M", "x":11.25, "y":4.5}, {"label":"<", "x":12.25, "y":4.5}, {"label":">", "x":13.25, "y":4.5}, {"label":"?", "x":14.25, "y":4.5}, {"label":"Shift", "x":15.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":19.25, "y":4.5}, {"label":"Ctrl", "x":3, "y":5.5, "w":1.25}, {"label":"Win", "x":4.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":5.5, "y":5.5, "w":1.25}, {"x":6.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":13, "y":5.5, "w":1.25}, {"label":"Win", "x":14.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":15.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":16.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":18.25, "y":5.5}, {"label":"\u2193", "x":19.25, "y":5.5}, {"label":"\u2192", "x":20.25, "y":5.5}]
|
"key_count": 88,
|
||||||
|
"layout": [
|
||||||
|
{"label":"Esc", "x":0, "y":0},
|
||||||
|
{"label":"F1", "x":2, "y":0},
|
||||||
|
{"label":"F2", "x":3, "y":0},
|
||||||
|
{"label":"F3", "x":4, "y":0},
|
||||||
|
{"label":"F4", "x":5, "y":0},
|
||||||
|
{"label":"F5", "x":6.5, "y":0},
|
||||||
|
{"label":"F6", "x":7.5, "y":0},
|
||||||
|
{"label":"F7", "x":8.5, "y":0},
|
||||||
|
{"label":"F8", "x":9.5, "y":0},
|
||||||
|
{"label":"F9", "x":11, "y":0},
|
||||||
|
{"label":"F10", "x":12, "y":0},
|
||||||
|
{"label":"F11", "x":13, "y":0},
|
||||||
|
{"label":"F12", "x":14, "y":0},
|
||||||
|
{"label":"PrtSc", "x":15.25, "y":0},
|
||||||
|
{"label":"Scroll Lock", "x":16.25, "y":0},
|
||||||
|
{"label":"Pause", "x":17.25, "y":0},
|
||||||
|
{"label":"\u00ac", "x":0, "y":1.25},
|
||||||
|
{"label":"!", "x":1, "y":1.25},
|
||||||
|
{"label":"\"", "x":2, "y":1.25},
|
||||||
|
{"label":"\u00a3", "x":3, "y":1.25},
|
||||||
|
{"label":"$", "x":4, "y":1.25},
|
||||||
|
{"label":"%", "x":5, "y":1.25},
|
||||||
|
{"label":"^", "x":6, "y":1.25},
|
||||||
|
{"label":"&", "x":7, "y":1.25},
|
||||||
|
{"label":"*", "x":8, "y":1.25},
|
||||||
|
{"label":"(", "x":9, "y":1.25},
|
||||||
|
{"label":")", "x":10, "y":1.25},
|
||||||
|
{"label":"_", "x":11, "y":1.25},
|
||||||
|
{"label":"+", "x":12, "y":1.25},
|
||||||
|
{"label":"Backspace", "x":13, "y":1.25, "w":2},
|
||||||
|
{"label":"Insert", "x":15.25, "y":1.25},
|
||||||
|
{"label":"Home", "x":16.25, "y":1.25},
|
||||||
|
{"label":"PgUp", "x":17.25, "y":1.25},
|
||||||
|
{"label":"Tab", "x":0, "y":2.25, "w":1.5},
|
||||||
|
{"label":"Q", "x":1.5, "y":2.25},
|
||||||
|
{"label":"W", "x":2.5, "y":2.25},
|
||||||
|
{"label":"E", "x":3.5, "y":2.25},
|
||||||
|
{"label":"R", "x":4.5, "y":2.25},
|
||||||
|
{"label":"T", "x":5.5, "y":2.25},
|
||||||
|
{"label":"Y", "x":6.5, "y":2.25},
|
||||||
|
{"label":"U", "x":7.5, "y":2.25},
|
||||||
|
{"label":"I", "x":8.5, "y":2.25},
|
||||||
|
{"label":"O", "x":9.5, "y":2.25},
|
||||||
|
{"label":"P", "x":10.5, "y":2.25},
|
||||||
|
{"label":"{", "x":11.5, "y":2.25},
|
||||||
|
{"label":"}", "x":12.5, "y":2.25},
|
||||||
|
{"label":"Delete", "x":15.25, "y":2.25},
|
||||||
|
{"label":"End", "x":16.25, "y":2.25},
|
||||||
|
{"label":"PgDn", "x":17.25, "y":2.25},
|
||||||
|
{"label":"Caps Lock", "x":0, "y":3.25, "w":1.75},
|
||||||
|
{"label":"A", "x":1.75, "y":3.25},
|
||||||
|
{"label":"S", "x":2.75, "y":3.25},
|
||||||
|
{"label":"D", "x":3.75, "y":3.25},
|
||||||
|
{"label":"F", "x":4.75, "y":3.25},
|
||||||
|
{"label":"G", "x":5.75, "y":3.25},
|
||||||
|
{"label":"H", "x":6.75, "y":3.25},
|
||||||
|
{"label":"J", "x":7.75, "y":3.25},
|
||||||
|
{"label":"K", "x":8.75, "y":3.25},
|
||||||
|
{"label":"L", "x":9.75, "y":3.25},
|
||||||
|
{"label":":", "x":10.75, "y":3.25},
|
||||||
|
{"label":"@", "x":11.75, "y":3.25},
|
||||||
|
{"label":"~", "x":12.75, "y":3.25},
|
||||||
|
{"label":"Enter", "x":13.75, "y":2.25, "w":1.25, "h":2},
|
||||||
|
{"label":"Shift", "x":0, "y":4.25, "w":1.25},
|
||||||
|
{"label":"|", "x":1.25, "y":4.25},
|
||||||
|
{"label":"Z", "x":2.25, "y":4.25},
|
||||||
|
{"label":"X", "x":3.25, "y":4.25},
|
||||||
|
{"label":"C", "x":4.25, "y":4.25},
|
||||||
|
{"label":"V", "x":5.25, "y":4.25},
|
||||||
|
{"label":"B", "x":6.25, "y":4.25},
|
||||||
|
{"label":"N", "x":7.25, "y":4.25},
|
||||||
|
{"label":"M", "x":8.25, "y":4.25},
|
||||||
|
{"label":"<", "x":9.25, "y":4.25},
|
||||||
|
{"label":">", "x":10.25, "y":4.25},
|
||||||
|
{"label":"?", "x":11.25, "y":4.25},
|
||||||
|
{"label":"Shift", "x":12.25, "y":4.25, "w":2.75},
|
||||||
|
{"label":"Up", "x":16.25, "y":4.25},
|
||||||
|
{"label":"Ctrl", "x":0, "y":5.25, "w":1.25},
|
||||||
|
{"label":"Win", "x":1.25, "y":5.25, "w":1.25},
|
||||||
|
{"label":"Alt", "x":2.5, "y":5.25, "w":1.25},
|
||||||
|
{"label":"Space", "x":3.75, "y":5.25, "w":6.25},
|
||||||
|
{"label":"AltGr", "x":10, "y":5.25, "w":1.25},
|
||||||
|
{"label":"Win", "x":11.25, "y":5.25, "w":1.25},
|
||||||
|
{"label":"Menu", "x":12.5, "y":5.25, "w":1.25},
|
||||||
|
{"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25},
|
||||||
|
{"label":"Left", "x":15.25, "y":5.25},
|
||||||
|
{"label":"Down", "x":16.25, "y":5.25},
|
||||||
|
{"label":"Right", "x":17.25, "y":5.25}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -253,7 +253,7 @@ uint32_t processFakeSteno(bool lookup) {
|
|||||||
P( RB, SEND(KC_K););
|
P( RB, SEND(KC_K););
|
||||||
P( RG, SEND(KC_L););
|
P( RG, SEND(KC_L););
|
||||||
P( RS, SEND(KC_SCLN););
|
P( RS, SEND(KC_SCLN););
|
||||||
P( RZ, SEND(KC_COMM););
|
P( RZ, SEND(KC_QUOT););
|
||||||
P( LNO, SEND(KC_1););
|
P( LNO, SEND(KC_1););
|
||||||
P( RNO, SEND(KC_1););
|
P( RNO, SEND(KC_1););
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012,2013 Jun Wako <[email protected]> <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Hardware function pre initialisation.
|
||||||
|
* See https://docs.qmk.fm/#/custom_quantum_functions?id=example-keyboard_pre_init_user-implementation
|
||||||
|
*/
|
||||||
|
void keyboard_pre_init_user(void) {
|
||||||
|
// Call the keyboard pre init code.
|
||||||
|
|
||||||
|
// Set our LED pins as output
|
||||||
|
setPinOutput(C3);
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
|
// Flash the led 1 sec on startup.
|
||||||
|
writePinHigh(C3);
|
||||||
|
wait_ms(1000);
|
||||||
|
writePinLow(C3);
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012,2013 Jun Wako <[email protected]> <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* Alps64 physical definition macro */
|
||||||
|
#define LAYOUT( \
|
||||||
|
k00, k01, k02, k03 , k04 , k05 , k06, k07 , k08 , k09 , k010 , k011, k012, k013 , \
|
||||||
|
k10, k11, k12, k13 , k14 , k15 , k16, k17 , k18 , k19 , k110 , k111, k112, \
|
||||||
|
k20, k21, k22, k23 , k24 , k25 , k26, k27 , k28 , k29 , k210 , k211, k212, k213 , \
|
||||||
|
k30, k31, k32, k33 , k34 , k35 , k36, k37 , k38 , k39 , k310 , k311, k312, \
|
||||||
|
k40, k41, k42, k46, k411, k412, k413 \
|
||||||
|
) { \
|
||||||
|
{ k00, k01, k02, k03 , k04 , k05 , k06, k07 , k08 , k09 , k010 , k011, k012, k013 }, \
|
||||||
|
{ k10, k11, k12, k13 , k14 , k15 , k16, k17 , k18 , k19 , k110 , k111, k112, KC_NO }, \
|
||||||
|
{ k20, k21, k22, k23 , k24 , k25 , k26, k27 , k28 , k29 , k210 , k211, k212, k213 }, \
|
||||||
|
{ k30, k31, k32, k33 , k34 , k35 , k36, k37 , k38 , k39 , k310 , k311, k312, KC_NO }, \
|
||||||
|
{ k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, KC_NO, k411, k412, k413 }, \
|
||||||
|
}
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Jun Wako <[email protected]> <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6464
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER 4sStylZ and others makers
|
||||||
|
#define PRODUCT AEK64
|
||||||
|
#define DESCRIPTION QMK keyboard firmware for AEK64 handwired
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 14
|
||||||
|
|
||||||
|
// Originally made for a Teensy 2++
|
||||||
|
#define MATRIX_COL_PINS { F0, E6, E7, B0, B1, B2, B3, B4, B5, B6, B7, D0, D1, D2 }
|
||||||
|
#define MATRIX_ROW_PINS { E0, E1, C0, C1, C2 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* define if matrix has ghost */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
// #define LOCKING_SUPPORT_ENABLE
|
||||||
|
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
//#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* Enable the space-cadet options */
|
||||||
|
#define RSPC_KEYS KC_RSFT, KC_TRNS, KC_PGUP
|
||||||
|
#define RCPC_KEYS KC_RCTL, KC_TRNS, KC_PGDOWN
|
||||||
|
#define LSPO_KEYS KC_LSFT, KC_TRNS, KC_HOME
|
||||||
|
#define LCPO_KEYS KC_LCTL, KC_TRNS, KC_END
|
||||||
|
|
||||||
|
/* Enable double tab */
|
||||||
|
#define TAPPING_TERM 175
|
||||||
|
|
||||||
|
#define COMBO_COUNT 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "aek64",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 14.75,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [{"label":"Esc", "x":0, "y":0, "w":1.25}, {"label":"1", "x":1.25, "y":0}, {"label":"2", "x":2.25, "y":0}, {"label":"3", "x":3.25, "y":0}, {"label":"4", "x":4.25, "y":0}, {"label":"5", "x":5.25, "y":0}, {"label":"6", "x":6.25, "y":0}, {"label":"7", "x":7.25, "y":0}, {"label":"8", "x":8.25, "y":0}, {"label":"9", "x":9.25, "y":0}, {"label":"0", "x":10.25, "y":0}, {"label":"\u00b0", "x":11.25, "y":0}, {"label":"+", "x":12.25, "y":0}, {"label":"Backspace", "x":13.25, "y":0, "w":1.75}, {"label":"Tab", "x":0, "y":1, "w":1.75}, {"label":"A", "x":1.75, "y":1}, {"label":"Z", "x":2.75, "y":1}, {"label":"E", "x":3.75, "y":1}, {"label":"R", "x":4.75, "y":1}, {"label":"T", "x":5.75, "y":1}, {"label":"Y", "x":6.75, "y":1}, {"label":"U", "x":7.75, "y":1}, {"label":"I", "x":8.75, "y":1}, {"label":"O", "x":9.75, "y":1}, {"label":"P", "x":10.75, "y":1}, {"label":"{", "x":11.75, "y":1}, {"label":"}", "x":12.75, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":2}, {"label":"Q", "x":2, "y":2}, {"label":"S", "x":3, "y":2}, {"label":"D", "x":4, "y":2}, {"label":"F", "x":5, "y":2}, {"label":"G", "x":6, "y":2}, {"label":"H", "x":7, "y":2}, {"label":"J", "x":8, "y":2}, {"label":"K", "x":9, "y":2}, {"label":"L", "x":10, "y":2}, {"label":"M", "x":11, "y":2}, {"label":"%", "x":12, "y":2}, {"label":"µ", "x":13, "y":2}, {"label":"Enter", "x":14, "y":1, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.5}, {"label":">", "x":1.5, "y":3}, {"label":"W", "x":2.5, "y":3}, {"label":"X", "x":3.5, "y":3}, {"label":"C", "x":4.5, "y":3}, {"label":"V", "x":5.5, "y":3}, {"label":"B", "x":6.5, "y":3}, {"label":"N", "x":7.5, "y":3}, {"label":"?", "x":8.5, "y":3}, {"label":".", "x":9.5, "y":3}, {"label":"/", "x":10.5, "y":3}, {"label":"§", "x":11.5, "y":3}, {"label":"Shift", "x":12.5, "y":3, "w":2.5}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Opt", "x":1.5, "y":4, "w":1.25}, {"label":"Cmd", "x":2.75, "y":4, "w":1.5}, {"label":"Space", "x":4.25, "y":4, "w":6.5}, {"label":"Cmd", "x":10.75, "y":4, "w":1.5}, {"label":"Opt", "x":12.25, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Implement Super-alt↯tab
|
||||||
|
// See https://docs.qmk.fm/#/feature_macros?id=super-alt↯tab
|
||||||
|
bool is_alt_tab_active = false;
|
||||||
|
uint16_t alt_tab_timer = 0;
|
||||||
|
|
||||||
|
// Defining all the custom keycodes.
|
||||||
|
enum custom_keycodes {
|
||||||
|
ALT_TAB = SAFE_RANGE
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM lock_combo[] = {KC_J, KC_K, KC_L, KC_SCLN, COMBO_END};
|
||||||
|
combo_t key_combos[COMBO_COUNT] = {COMBO(lock_combo, LGUI(KC_O))};
|
||||||
|
|
||||||
|
// Define the keycodes for one qwerty layer and one Fn layer.
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* 0: qwerty
|
||||||
|
* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬─────────────┐
|
||||||
|
* │ ` Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │
|
||||||
|
* ├─────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┬───────┤
|
||||||
|
* │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │
|
||||||
|
* ├─────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┴┐ Enter│
|
||||||
|
* │ Layer 2 │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │
|
||||||
|
* ├──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┴──────┤
|
||||||
|
* │ Shift│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │
|
||||||
|
* ├──────┼──────┼──────┼──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┼──────┬──────┬──────┤
|
||||||
|
* │ Ctrl │ Alt │↯ATab │ Space │ Gui │ Alt │ Ctrl │
|
||||||
|
* └──────┴──────┴──────┴──────────────────────────────────────────────────────────────┴──────┴──────┴──────┘
|
||||||
|
*
|
||||||
|
* Hidden features :
|
||||||
|
* - Left Shift is also Home on a single tap.
|
||||||
|
* - Left Ctrl is also End on a single tap.
|
||||||
|
* - Right Shift is also page-up on a single tap.
|
||||||
|
* - Right Ctrl is also page-down on a single tap.
|
||||||
|
* - Press JKLM for Windows + L (Session lock)
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT( \
|
||||||
|
KC_GESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC,
|
||||||
|
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC,
|
||||||
|
MO(1) , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT ,
|
||||||
|
KC_LSPO , KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSPC ,
|
||||||
|
KC_LCPO , KC_LALT, ALT_TAB, KC_SPC, KC_LGUI, KC_RALT, KC_RCPC
|
||||||
|
),
|
||||||
|
|
||||||
|
/* 1: second layer for media keys and many advanced features ç
|
||||||
|
* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬─────────────┐
|
||||||
|
* │Alt F4│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │
|
||||||
|
* ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┬───────┤
|
||||||
|
* │ │ │ │PrtScn│ Brt+ │ Brt- │Ctrl A│ Home │ Up │ End │ ‽ │ ↑ │ ⸮ │ │ │
|
||||||
|
* ├─────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┴┐ │
|
||||||
|
* │ │ Cut │ Copy │Paste │ Del │ Del │ Left │ Down │Right │ ← │ ↓ │ → │ │ │
|
||||||
|
* ├──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┴──────┤
|
||||||
|
* │ │ │ Mute │ Vol- │ Vol+ │ │ │ │ │ │ │Reset │ │
|
||||||
|
* ├──────┼──────┼──────┼──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┼──────┬──────┬──────┤
|
||||||
|
* │ │ │ │ │ │ │ │
|
||||||
|
* └──────┴──────┴──────┴──────────────────────────────────────────────────────────────┴──────┴──────┴──────┘
|
||||||
|
*/
|
||||||
|
[1] = LAYOUT( \
|
||||||
|
LALT(KC_F4), KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______,
|
||||||
|
_______ , _______ , _______ , KC_PSCR , KC_BRIU , KC_BRID, LCTL(KC_A), KC_HOME, KC_UP , KC_END , UC(0x203D) , UC(0x8593), UC(0x2E2E),
|
||||||
|
_______ , _______ , LSFT(KC_DEL), LCTL(KC_INS), LSFT(KC_INS), KC_DEL , KC_DEL , KC_LEFT, KC_DOWN, KC_RIGHT, UC(0x8592) , UC(0x8595), UC(0x8594), _______,
|
||||||
|
_______ , _______ , KC_MUTE , KC_VOLD , KC_VOLU , _______, _______ , _______, _______, _______ , _______ , RESET , _______ ,
|
||||||
|
_______ , _______ , _______ , _______, _______ , _______ , _______
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
// Set the unicode input mode for using UC.
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
set_unicode_input_mode(UC_LNX);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Processing all the key pressed.
|
||||||
|
// Alt+tab.
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
|
||||||
|
// Depending keycodes…
|
||||||
|
switch (keycode) { // This will do most of the grunt work with the keycodes.
|
||||||
|
case ALT_TAB:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (!is_alt_tab_active) {
|
||||||
|
is_alt_tab_active = true;
|
||||||
|
register_code(KC_LALT);
|
||||||
|
}
|
||||||
|
alt_tab_timer = timer_read();
|
||||||
|
register_code(KC_TAB);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_TAB);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) { // The very important timer.
|
||||||
|
if (is_alt_tab_active) {
|
||||||
|
if (timer_elapsed(alt_tab_timer) > 750) {
|
||||||
|
unregister_code(KC_LALT);
|
||||||
|
is_alt_tab_active = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Define the keycodes for one qwerty layer and one Fn layer.
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* 0: qwerty
|
||||||
|
* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬─────────────┐
|
||||||
|
* │ ` Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bksp │
|
||||||
|
* ├─────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┬───────┤
|
||||||
|
* │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │
|
||||||
|
* ├─────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┴┐ Enter│
|
||||||
|
* │ Layer 2 │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │
|
||||||
|
* ├──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┴──────┤
|
||||||
|
* │ Shift│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │
|
||||||
|
* ├──────┼──────┼──────┼──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┼──────┬──────┬──────┤
|
||||||
|
* │ Ctrl │ Alt │ Gui │ Space │ Gui │ Alt │ Ctrl │
|
||||||
|
* └──────┴──────┴──────┴──────────────────────────────────────────────────────────────┴──────┴──────┴──────┘
|
||||||
|
*
|
||||||
|
* Hidden features :
|
||||||
|
* - Left Shift is also Home on a single tap.
|
||||||
|
* - Left Ctrl is also End on a single tap.
|
||||||
|
* - Right Shift is also page-up on a single tap.
|
||||||
|
* - Right Ctrl is also page-down on a single tap.
|
||||||
|
* - Press JKLM for Windows + L (Session lock)
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC,
|
||||||
|
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC,
|
||||||
|
MO(1) , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT ,
|
||||||
|
KC_LSPO, KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSPC ,
|
||||||
|
KC_LCPO, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCPC
|
||||||
|
),
|
||||||
|
|
||||||
|
/* 1: second layer for media keys and many advanced features ç
|
||||||
|
* ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬─────────────┐
|
||||||
|
* │Alt F4│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │
|
||||||
|
* ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┬───────┤
|
||||||
|
* │ │ │ │ │ │ │Ctrl A│ Home │ Up │ End │ │ │ │ │ │
|
||||||
|
* ├─────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼─────┴┐ │
|
||||||
|
* │ │ Cut │ Copy │Paste │ Del │ Del │ Left │ Down │Right │ │ │ │ │ │
|
||||||
|
* ├──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┴──────┴──────┤
|
||||||
|
* │ │ │ Mute │ Vol- │ Vol+ │ │ │ │ │ │ │Reset │ │
|
||||||
|
* ├──────┼──────┼──────┼──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┼──────┬──────┬──────┤
|
||||||
|
* │ │ │ │ │ │ │ │
|
||||||
|
* └──────┴──────┴──────┴──────────────────────────────────────────────────────────────┴──────┴──────┴──────┘
|
||||||
|
*/
|
||||||
|
[1] = LAYOUT(
|
||||||
|
LALT(KC_F4), KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______,
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______, LCTL(KC_A), KC_HOME, KC_UP , KC_END , _______ , _______ , _______ ,
|
||||||
|
_______ , _______ , LSFT(KC_DEL), LCTL(KC_INS), LSFT(KC_INS), KC_DEL , KC_DEL , KC_LEFT, KC_DOWN, KC_RIGHT, _______ , _______ , _______ , _______,
|
||||||
|
_______ , _______ , KC_MUTE , KC_VOLD , KC_VOLU , _______, _______ , _______, _______, _______ , _______ , RESET , _______ ,
|
||||||
|
_______ , _______ , _______ , _______, _______ , _______ , _______
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# AEK64
|
||||||
|
|
||||||
|
An Alps-only 60% handwired ISO AEK based on the original AEK plate.
|
||||||
|
|
||||||
|
Keyboard Maintainer: QMK Community
|
||||||
|
Hardware Supported: AEK II ISO
|
||||||
|
Hardware Availability: buy an used one and salvage / cut the plate and rip-off the switchs. For the case, a GH60 can be good.
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make aek64:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
|
|
||||||
|
# Known issues
|
||||||
|
|
||||||
|
* The Unicode characters on the keymap don’t work.
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# Target file name (without extension).
|
||||||
|
|
||||||
|
# project specific files
|
||||||
|
|
||||||
|
# MCU name
|
||||||
|
MCU = at90usb1286
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
BOOTLOADER = halfKay
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change to no to disable the options.
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA
|
||||||
|
UNICODE_ENABLE = yes # Enable support for arrow keys icon on the second layer.
|
||||||
|
COMBO_ENABLE = yes # Enable combo for special function when using multiple keys at once.
|
||||||
|
TAP_DANCE_ENABLE = no # Enable use multiple tap
|
||||||
|
NKRO_ENABLE = yes
|
||||||
@@ -56,16 +56,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
// TODO: refactor with new user EEPROM code (coming soon)
|
// TODO: refactor with new user EEPROM code (coming soon)
|
||||||
#define EEPROM_MAGIC 0x451F
|
#define EEPROM_MAGIC 0x451F
|
||||||
#define EEPROM_MAGIC_ADDR 32
|
#define EEPROM_MAGIC_ADDR 34
|
||||||
// Bump this every time we change what we store
|
// Bump this every time we change what we store
|
||||||
// This will automatically reset the EEPROM with defaults
|
// This will automatically reset the EEPROM with defaults
|
||||||
// and avoid loading invalid data from the EEPROM
|
// and avoid loading invalid data from the EEPROM
|
||||||
#define EEPROM_VERSION 0x08
|
#define EEPROM_VERSION 0x08
|
||||||
#define EEPROM_VERSION_ADDR 34
|
#define EEPROM_VERSION_ADDR 36
|
||||||
|
|
||||||
// Dynamic keymap starts after EEPROM version
|
// Dynamic keymap starts after EEPROM version
|
||||||
#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
|
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
|
||||||
// Dynamic macro starts after dynamic keymaps (35+(4*10*9*2)) = (35+720)
|
// Dynamic macro starts after dynamic keymaps (37+(4*10*9*2)) = (37+720)
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 755
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 757
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 269 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 267 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
|
||||||
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
@@ -136,19 +136,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
// TODO: refactor with new user EEPROM code (coming soon)
|
// TODO: refactor with new user EEPROM code (coming soon)
|
||||||
#define EEPROM_MAGIC 0x451F
|
#define EEPROM_MAGIC 0x451F
|
||||||
#define EEPROM_MAGIC_ADDR 32
|
#define EEPROM_MAGIC_ADDR 34
|
||||||
// Bump this every time we change what we store
|
// Bump this every time we change what we store
|
||||||
// This will automatically reset the EEPROM with defaults
|
// This will automatically reset the EEPROM with defaults
|
||||||
// and avoid loading invalid data from the EEPROM
|
// and avoid loading invalid data from the EEPROM
|
||||||
#define EEPROM_VERSION 0x08
|
#define EEPROM_VERSION 0x08
|
||||||
#define EEPROM_VERSION_ADDR 34
|
#define EEPROM_VERSION_ADDR 36
|
||||||
|
|
||||||
// Backlight config starts after EEPROM version
|
// Backlight config starts after EEPROM version
|
||||||
#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35
|
#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37
|
||||||
// Dynamic keymap starts after backlight config (35+32)
|
// Dynamic keymap starts after backlight config (37+32)
|
||||||
#define DYNAMIC_KEYMAP_EEPROM_ADDR 67
|
#define DYNAMIC_KEYMAP_EEPROM_ADDR 69
|
||||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
|
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
|
||||||
// Dynamic macro starts after dynamic keymaps (67+(4*5*14*2)) = (67+560)
|
// Dynamic macro starts after dynamic keymaps (69+(4*5*14*2)) = (69+560)
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 627
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 629
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 398
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 396
|
||||||
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
@@ -155,16 +155,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
// TODO: refactor with new user EEPROM code (coming soon)
|
// TODO: refactor with new user EEPROM code (coming soon)
|
||||||
#define EEPROM_MAGIC 0x451F
|
#define EEPROM_MAGIC 0x451F
|
||||||
#define EEPROM_MAGIC_ADDR 32
|
#define EEPROM_MAGIC_ADDR 34
|
||||||
// Bump this every time we change what we store
|
// Bump this every time we change what we store
|
||||||
// This will automatically reset the EEPROM with defaults
|
// This will automatically reset the EEPROM with defaults
|
||||||
// and avoid loading invalid data from the EEPROM
|
// and avoid loading invalid data from the EEPROM
|
||||||
#define EEPROM_VERSION 0x08
|
#define EEPROM_VERSION 0x08
|
||||||
#define EEPROM_VERSION_ADDR 34
|
#define EEPROM_VERSION_ADDR 36
|
||||||
|
|
||||||
// Dynamic keymap starts after EEPROM version
|
// Dynamic keymap starts after EEPROM version
|
||||||
#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
|
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
|
||||||
// Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480)
|
// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480)
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 675 // **** CHANGE THIS BASED ON MATRIX_ROWS & MATRIX_COLS ****
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 677 // **** CHANGE THIS BASED ON MATRIX_ROWS & MATRIX_COLS ****
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 349 // **** CHANGE THIS BASED ON 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR ****
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 347 // **** CHANGE THIS BASED ON 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR ****
|
||||||
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
/* Copyright 2017 Benjamin Kesselring
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
|
||||||
|
|
||||||
|
#define TAPPING_TOGGLE 5
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
/* Copyright 2020 Drew Smathers
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Keyboard Layers
|
||||||
|
enum layer_names {
|
||||||
|
_QW,
|
||||||
|
_QW_MAC,
|
||||||
|
_FN,
|
||||||
|
_MOUSE,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Some short-cut aliases
|
||||||
|
#define Z_LALT LALT_T(KC_ESC)
|
||||||
|
#define Z_MAC DF(_QW_MAC)
|
||||||
|
#define Z_PC DF(_QW)
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_QW] = LAYOUT_ortho_5x15( /* QWERTY */
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, XXXXXXX, XXXXXXX, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, \
|
||||||
|
Z_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RALT, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCTL, XXXXXXX, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
|
||||||
|
TT(_FN), XXXXXXX, XXXXXXX, TT(_MOUSE), KC_EQL, KC_BSPC, KC_DEL, XXXXXXX, KC_ENT, KC_SPC, KC_MINUS, KC_GRAVE, KC_LBRC, KC_RBRC, XXXXXXX \
|
||||||
|
),
|
||||||
|
|
||||||
|
[_QW_MAC] = LAYOUT_ortho_5x15( /* QWERTY MAC */
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_BRMU, KC_MUTE, KC__VOLUP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BRMD, XXXXXXX, KC__VOLDOWN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, \
|
||||||
|
Z_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RALT, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCMD, XXXXXXX, KC_RCMD, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
|
||||||
|
TT(_FN), KC_LCTL, XXXXXXX, TT(_MOUSE), KC_EQL, KC_BSPC, KC_DEL, XXXXXXX, KC_ENT, KC_SPC, KC_MINUS, KC_GRAVE, KC_LBRC, KC_RBRC, KC_RCTL \
|
||||||
|
),
|
||||||
|
|
||||||
|
[_FN] = LAYOUT_ortho_5x15( /* FUNCTION */
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, RESET, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, \
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, Z_MAC, _______, XXXXXXX, KC_HOME, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
|
TT(_FN), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, Z_PC, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
|
||||||
|
),
|
||||||
|
|
||||||
|
[_MOUSE] = LAYOUT_ortho_5x15( /* MOUSE */
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX, XXXXXXX, \
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, XXXXXXX, \
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
|
TT(_FN), XXXXXXX, XXXXXXX, TT(_MOUSE), XXXXXXX, KC_ACL1, KC_ACL2, XXXXXXX, KC_BTN2, KC_BTN1, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# Drew's thumb-friendly keymap for idobo boards
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# Copyright 2013 Jun Wako <[email protected]>
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
MOUSEKEY_ENABLE = yes
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
#ifndef CONFIG_H
|
#pragma once
|
||||||
#define CONFIG_H
|
|
||||||
|
|
||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
@@ -46,5 +45,3 @@
|
|||||||
#define RGBLIGHT_SAT_STEP 8
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
#define RGBLIGHT_VAL_STEP 8
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -2,12 +2,8 @@
|
|||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#ifdef KEYBOARD_kbdfans_kbd75_rev1
|
#if defined(KEYBOARD_kbdfans_kbd75_rev1)
|
||||||
#include "rev1.h"
|
#include "rev1.h"
|
||||||
#endif
|
#elif defined(KEYBOARD_kbdfans_kbd75_rev2)
|
||||||
|
|
||||||
#ifdef KEYBOARD_kbdfans_kbd75_rev2
|
|
||||||
#include "../rev1/rev1.h"
|
|
||||||
#include "rev2.h"
|
#include "rev2.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -28,6 +28,96 @@
|
|||||||
"LAYOUT_iso": {
|
"LAYOUT_iso": {
|
||||||
"key_count": 84,
|
"key_count": 84,
|
||||||
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Delete", "x":15, "y":0}, {"label":"\u00ac", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"\"", "x":2, "y":1}, {"label":"\u00a3", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, {"label":"Page Up", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"@", "x":11.75, "y":3}, {"label":"~", "x":12.75, "y":3}, {"label":"Page Down", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"label":"|", "x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"AltGr", "x":10, "y":5, "w":1.5}, {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}]
|
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Delete", "x":15, "y":0}, {"label":"\u00ac", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"\"", "x":2, "y":1}, {"label":"\u00a3", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, {"label":"Page Up", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"@", "x":11.75, "y":3}, {"label":"~", "x":12.75, "y":3}, {"label":"Page Down", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"label":"|", "x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"AltGr", "x":10, "y":5, "w":1.5}, {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_75_iso": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"Esc", "x":0, "y":0},
|
||||||
|
{"label":"F1", "x":1, "y":0},
|
||||||
|
{"label":"F2", "x":2, "y":0},
|
||||||
|
{"label":"F3", "x":3, "y":0},
|
||||||
|
{"label":"F4", "x":4, "y":0},
|
||||||
|
{"label":"F5", "x":5, "y":0},
|
||||||
|
{"label":"F6", "x":6, "y":0},
|
||||||
|
{"label":"F7", "x":7, "y":0},
|
||||||
|
{"label":"F8", "x":8, "y":0},
|
||||||
|
{"label":"F9", "x":9, "y":0},
|
||||||
|
{"label":"F10", "x":10, "y":0},
|
||||||
|
{"label":"F11", "x":11, "y":0},
|
||||||
|
{"label":"F12", "x":12, "y":0},
|
||||||
|
{"label":"PrtSc", "x":13, "y":0},
|
||||||
|
{"label":"Scroll Lock", "x":14, "y":0},
|
||||||
|
{"label":"Pause", "x":15, "y":0},
|
||||||
|
{"label":"`", "x":0, "y":1},
|
||||||
|
{"label":"1", "x":1, "y":1},
|
||||||
|
{"label":"2", "x":2, "y":1},
|
||||||
|
{"label":"3", "x":3, "y":1},
|
||||||
|
{"label":"4", "x":4, "y":1},
|
||||||
|
{"label":"5", "x":5, "y":1},
|
||||||
|
{"label":"6", "x":6, "y":1},
|
||||||
|
{"label":"7", "x":7, "y":1},
|
||||||
|
{"label":"8", "x":8, "y":1},
|
||||||
|
{"label":"9", "x":9, "y":1},
|
||||||
|
{"label":"0", "x":10, "y":1},
|
||||||
|
{"label":"-", "x":11, "y":1},
|
||||||
|
{"label":"=", "x":12, "y":1},
|
||||||
|
{"label":"Backspace", "x":13, "y":1, "w":2},
|
||||||
|
{"label":"Home", "x":15, "y":1},
|
||||||
|
{"label":"Tab", "x":0, "y":2, "w":1.5},
|
||||||
|
{"label":"Q", "x":1.5, "y":2},
|
||||||
|
{"label":"W", "x":2.5, "y":2},
|
||||||
|
{"label":"E", "x":3.5, "y":2},
|
||||||
|
{"label":"R", "x":4.5, "y":2},
|
||||||
|
{"label":"T", "x":5.5, "y":2},
|
||||||
|
{"label":"Y", "x":6.5, "y":2},
|
||||||
|
{"label":"U", "x":7.5, "y":2},
|
||||||
|
{"label":"I", "x":8.5, "y":2},
|
||||||
|
{"label":"O", "x":9.5, "y":2},
|
||||||
|
{"label":"P", "x":10.5, "y":2},
|
||||||
|
{"label":"[", "x":11.5, "y":2},
|
||||||
|
{"label":"]", "x":12.5, "y":2},
|
||||||
|
{"label":"PgUp", "x":15, "y":2},
|
||||||
|
{"label":"Caps Lock", "x":0, "y":3, "w":1.75},
|
||||||
|
{"label":"A", "x":1.75, "y":3},
|
||||||
|
{"label":"S", "x":2.75, "y":3},
|
||||||
|
{"label":"D", "x":3.75, "y":3},
|
||||||
|
{"label":"F", "x":4.75, "y":3},
|
||||||
|
{"label":"G", "x":5.75, "y":3},
|
||||||
|
{"label":"H", "x":6.75, "y":3},
|
||||||
|
{"label":"J", "x":7.75, "y":3},
|
||||||
|
{"label":"K", "x":8.75, "y":3},
|
||||||
|
{"label":"L", "x":9.75, "y":3},
|
||||||
|
{"label":";", "x":10.75, "y":3},
|
||||||
|
{"label":"'", "x":11.75, "y":3},
|
||||||
|
{"label":"ISO #", "x":12.75, "y":3},
|
||||||
|
{"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2},
|
||||||
|
{"label":"PgDn", "x":15, "y":3},
|
||||||
|
{"label":"Shift", "x":0, "y":4, "w":1.25},
|
||||||
|
{"label":"ISO \\", "x":1.25, "y":4},
|
||||||
|
{"label":"Z", "x":2.25, "y":4},
|
||||||
|
{"label":"X", "x":3.25, "y":4},
|
||||||
|
{"label":"C", "x":4.25, "y":4},
|
||||||
|
{"label":"V", "x":5.25, "y":4},
|
||||||
|
{"label":"B", "x":6.25, "y":4},
|
||||||
|
{"label":"N", "x":7.25, "y":4},
|
||||||
|
{"label":"M", "x":8.25, "y":4},
|
||||||
|
{"label":",", "x":9.25, "y":4},
|
||||||
|
{"label":".", "x":10.25, "y":4},
|
||||||
|
{"label":"/", "x":11.25, "y":4},
|
||||||
|
{"label":"Shift", "x":12.25, "y":4, "w":1.75},
|
||||||
|
{"label":"Up", "x":14, "y":4},
|
||||||
|
{"label":"End", "x":15, "y":4},
|
||||||
|
{"label":"Ctrl", "x":0, "y":5, "w":1.25},
|
||||||
|
{"label":"GUI", "x":1.25, "y":5, "w":1.25},
|
||||||
|
{"label":"Alt", "x":2.5, "y":5, "w":1.25},
|
||||||
|
{"label":"Space", "x":3.75, "y":5, "w":6.25},
|
||||||
|
{"label":"AltGr", "x":10, "y":5},
|
||||||
|
{"label":"Fn", "x":11, "y":5},
|
||||||
|
{"label":"Ctrl", "x":12, "y":5},
|
||||||
|
{"label":"Left", "x":13, "y":5},
|
||||||
|
{"label":"Down", "x":14, "y":5},
|
||||||
|
{"label":"Right", "x":15, "y":5}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
#ifndef REV1_H
|
#pragma once
|
||||||
#define REV1_H
|
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "kbd75.h"
|
||||||
#include "../kbd75.h"
|
|
||||||
|
|
||||||
/* LAYOUT
|
/* LAYOUT
|
||||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||||
@@ -20,7 +18,7 @@
|
|||||||
* └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───┴───┴───┘
|
* └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───┴───┴───┘
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// LAYOUT for all possible switch positions on a KBD75
|
// LAYOUT for all possible switch positions on a KBD75 rev 1
|
||||||
#define LAYOUT( \
|
#define LAYOUT( \
|
||||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
||||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \
|
||||||
@@ -44,7 +42,7 @@
|
|||||||
* └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘
|
* └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LAYOUT_ansi_1u( \
|
#define LAYOUT_ansi_1u( \
|
||||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
||||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \
|
||||||
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \
|
||||||
@@ -53,13 +51,15 @@
|
|||||||
K500, K501, K503, K506, K510, K511, K512, K513, K514, K515 \
|
K500, K501, K503, K506, K510, K511, K512, K513, K514, K515 \
|
||||||
) { \
|
) { \
|
||||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \
|
||||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \
|
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \
|
||||||
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \
|
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \
|
||||||
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \
|
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \
|
||||||
{ K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \
|
{ K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \
|
||||||
{ K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, K514, K515 } \
|
{ K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, K514, K515 } \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_75_ansi LAYOUT_ansi_1u
|
||||||
|
|
||||||
#define LAYOUT_iso_1u( \
|
#define LAYOUT_iso_1u( \
|
||||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
||||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \
|
||||||
@@ -76,6 +76,22 @@
|
|||||||
{ K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, K514, K515 } \
|
{ K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, K514, K515 } \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_75_iso( \
|
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
||||||
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \
|
||||||
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \
|
||||||
|
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K214, K313, K315, \
|
||||||
|
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \
|
||||||
|
K500, K501, K503, K506, K510, K511, K512, K513, K514, K515 \
|
||||||
|
) LAYOUT_iso_1u( \
|
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
||||||
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \
|
||||||
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K313, K215, \
|
||||||
|
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K214, K315, \
|
||||||
|
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \
|
||||||
|
K500, K501, K503, K506, K510, K511, K512, K513, K514, K515 \
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
/* normal bottom row ──────────────────────── ↓ ─── ↓
|
/* normal bottom row ──────────────────────── ↓ ─── ↓
|
||||||
* ┌────┬────┬────┬────────────────────────┬─────┬─────┬───┬───┬───┐
|
* ┌────┬────┬────┬────────────────────────┬─────┬─────┬───┬───┬───┐
|
||||||
@@ -83,7 +99,7 @@
|
|||||||
* └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┘
|
* └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┘
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LAYOUT_ansi( \
|
#define LAYOUT_ansi( \
|
||||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
||||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \
|
||||||
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \
|
||||||
@@ -114,5 +130,3 @@
|
|||||||
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \
|
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \
|
||||||
{ K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \
|
{ K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,44 +1,8 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
# Bootloader selection
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
BOOTLOADER = atmel-dfu
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Boot Section Size in *bytes*
|
|
||||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
@@ -53,4 +17,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
|||||||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
AUDIO_ENABLE = no
|
AUDIO_ENABLE = no
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
|
|
||||||
|
LAYOUTS = 75_ansi 75_iso
|
||||||
@@ -32,6 +32,96 @@
|
|||||||
|
|
||||||
"LAYOUT_numpad": {
|
"LAYOUT_numpad": {
|
||||||
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Delete", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"label":"Home", "x":13, "y":1}, {"label":"_", "x":14, "y":1}, {"label":"+", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"|", "x":11.5, "y":2, "w":1.5}, {"label":"Page Up", "x":13, "y":2}, {"label":"{", "x":14, "y":2}, {"label":"}", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":"Enter", "x":10.75, "y":3, "w":2.25}, {"label":"Page Down", "x":13, "y":3}, {"label":":", "x":14, "y":3}, {"label":"\"", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"?", "x":9.25, "y":4}, {"label":"Shift", "x":10.25, "y":4, "w":1.75}, {"label":"\u2191", "x":12, "y":4}, {"label":"End", "x":13, "y":4}, {"label":"<", "x":14, "y":4}, {"label":">", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":1.25}, {"x":5, "y":5, "w":2.25}, {"x":7.25, "y":5, "w":1.75}, {"x":9, "y":5}, {"label":"Alt", "x":10, "y":5}, {"label":"\u2190", "x":11, "y":5}, {"label":"\u2193", "x":12, "y":5}, {"label":"\u2192", "x":13, "y":5}, {"label":"Fn", "x":14, "y":5}, {"label":"Ctrl", "x":15, "y":5}]
|
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Delete", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"label":"Home", "x":13, "y":1}, {"label":"_", "x":14, "y":1}, {"label":"+", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"|", "x":11.5, "y":2, "w":1.5}, {"label":"Page Up", "x":13, "y":2}, {"label":"{", "x":14, "y":2}, {"label":"}", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":"Enter", "x":10.75, "y":3, "w":2.25}, {"label":"Page Down", "x":13, "y":3}, {"label":":", "x":14, "y":3}, {"label":"\"", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"?", "x":9.25, "y":4}, {"label":"Shift", "x":10.25, "y":4, "w":1.75}, {"label":"\u2191", "x":12, "y":4}, {"label":"End", "x":13, "y":4}, {"label":"<", "x":14, "y":4}, {"label":">", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":1.25}, {"x":5, "y":5, "w":2.25}, {"x":7.25, "y":5, "w":1.75}, {"x":9, "y":5}, {"label":"Alt", "x":10, "y":5}, {"label":"\u2190", "x":11, "y":5}, {"label":"\u2193", "x":12, "y":5}, {"label":"\u2192", "x":13, "y":5}, {"label":"Fn", "x":14, "y":5}, {"label":"Ctrl", "x":15, "y":5}]
|
||||||
|
},
|
||||||
|
|
||||||
|
"LAYOUT_75_iso": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"Esc", "x":0, "y":0},
|
||||||
|
{"label":"F1", "x":1, "y":0},
|
||||||
|
{"label":"F2", "x":2, "y":0},
|
||||||
|
{"label":"F3", "x":3, "y":0},
|
||||||
|
{"label":"F4", "x":4, "y":0},
|
||||||
|
{"label":"F5", "x":5, "y":0},
|
||||||
|
{"label":"F6", "x":6, "y":0},
|
||||||
|
{"label":"F7", "x":7, "y":0},
|
||||||
|
{"label":"F8", "x":8, "y":0},
|
||||||
|
{"label":"F9", "x":9, "y":0},
|
||||||
|
{"label":"F10", "x":10, "y":0},
|
||||||
|
{"label":"F11", "x":11, "y":0},
|
||||||
|
{"label":"F12", "x":12, "y":0},
|
||||||
|
{"label":"PrtSc", "x":13, "y":0},
|
||||||
|
{"label":"Scroll Lock", "x":14, "y":0},
|
||||||
|
{"label":"Pause", "x":15, "y":0},
|
||||||
|
{"label":"`", "x":0, "y":1},
|
||||||
|
{"label":"1", "x":1, "y":1},
|
||||||
|
{"label":"2", "x":2, "y":1},
|
||||||
|
{"label":"3", "x":3, "y":1},
|
||||||
|
{"label":"4", "x":4, "y":1},
|
||||||
|
{"label":"5", "x":5, "y":1},
|
||||||
|
{"label":"6", "x":6, "y":1},
|
||||||
|
{"label":"7", "x":7, "y":1},
|
||||||
|
{"label":"8", "x":8, "y":1},
|
||||||
|
{"label":"9", "x":9, "y":1},
|
||||||
|
{"label":"0", "x":10, "y":1},
|
||||||
|
{"label":"-", "x":11, "y":1},
|
||||||
|
{"label":"=", "x":12, "y":1},
|
||||||
|
{"label":"Backspace", "x":13, "y":1, "w":2},
|
||||||
|
{"label":"Home", "x":15, "y":1},
|
||||||
|
{"label":"Tab", "x":0, "y":2, "w":1.5},
|
||||||
|
{"label":"Q", "x":1.5, "y":2},
|
||||||
|
{"label":"W", "x":2.5, "y":2},
|
||||||
|
{"label":"E", "x":3.5, "y":2},
|
||||||
|
{"label":"R", "x":4.5, "y":2},
|
||||||
|
{"label":"T", "x":5.5, "y":2},
|
||||||
|
{"label":"Y", "x":6.5, "y":2},
|
||||||
|
{"label":"U", "x":7.5, "y":2},
|
||||||
|
{"label":"I", "x":8.5, "y":2},
|
||||||
|
{"label":"O", "x":9.5, "y":2},
|
||||||
|
{"label":"P", "x":10.5, "y":2},
|
||||||
|
{"label":"[", "x":11.5, "y":2},
|
||||||
|
{"label":"]", "x":12.5, "y":2},
|
||||||
|
{"label":"PgUp", "x":15, "y":2},
|
||||||
|
{"label":"Caps Lock", "x":0, "y":3, "w":1.75},
|
||||||
|
{"label":"A", "x":1.75, "y":3},
|
||||||
|
{"label":"S", "x":2.75, "y":3},
|
||||||
|
{"label":"D", "x":3.75, "y":3},
|
||||||
|
{"label":"F", "x":4.75, "y":3},
|
||||||
|
{"label":"G", "x":5.75, "y":3},
|
||||||
|
{"label":"H", "x":6.75, "y":3},
|
||||||
|
{"label":"J", "x":7.75, "y":3},
|
||||||
|
{"label":"K", "x":8.75, "y":3},
|
||||||
|
{"label":"L", "x":9.75, "y":3},
|
||||||
|
{"label":";", "x":10.75, "y":3},
|
||||||
|
{"label":"'", "x":11.75, "y":3},
|
||||||
|
{"label":"ISO #", "x":12.75, "y":3},
|
||||||
|
{"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2},
|
||||||
|
{"label":"PgDn", "x":15, "y":3},
|
||||||
|
{"label":"Shift", "x":0, "y":4, "w":1.25},
|
||||||
|
{"label":"ISO \\", "x":1.25, "y":4},
|
||||||
|
{"label":"Z", "x":2.25, "y":4},
|
||||||
|
{"label":"X", "x":3.25, "y":4},
|
||||||
|
{"label":"C", "x":4.25, "y":4},
|
||||||
|
{"label":"V", "x":5.25, "y":4},
|
||||||
|
{"label":"B", "x":6.25, "y":4},
|
||||||
|
{"label":"N", "x":7.25, "y":4},
|
||||||
|
{"label":"M", "x":8.25, "y":4},
|
||||||
|
{"label":",", "x":9.25, "y":4},
|
||||||
|
{"label":".", "x":10.25, "y":4},
|
||||||
|
{"label":"/", "x":11.25, "y":4},
|
||||||
|
{"label":"Shift", "x":12.25, "y":4, "w":1.75},
|
||||||
|
{"label":"Up", "x":14, "y":4},
|
||||||
|
{"label":"End", "x":15, "y":4},
|
||||||
|
{"label":"Ctrl", "x":0, "y":5, "w":1.25},
|
||||||
|
{"label":"GUI", "x":1.25, "y":5, "w":1.25},
|
||||||
|
{"label":"Alt", "x":2.5, "y":5, "w":1.25},
|
||||||
|
{"label":"Space", "x":3.75, "y":5, "w":6.25},
|
||||||
|
{"label":"AltGr", "x":10, "y":5},
|
||||||
|
{"label":"Fn", "x":11, "y":5},
|
||||||
|
{"label":"Ctrl", "x":12, "y":5},
|
||||||
|
{"label":"Left", "x":13, "y":5},
|
||||||
|
{"label":"Down", "x":14, "y":5},
|
||||||
|
{"label":"Right", "x":15, "y":5}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,135 @@
|
|||||||
#ifndef REV2_H
|
#pragma once
|
||||||
#define REV2_H
|
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "kbd75.h"
|
||||||
#include "../kbd75.h"
|
|
||||||
|
|
||||||
|
/* LAYOUT
|
||||||
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤
|
||||||
|
* │1.5U │ │ │ │ │ │ │ │ │ │ │ │ │1.5U │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤
|
||||||
|
* │1.75U │ │ │ │ │ │ │ │ │ │ │ │2.25U │ │
|
||||||
|
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤
|
||||||
|
* │2.25U │ │ │ │ │ │ │ │ │ │ │1.75U │ │ │
|
||||||
|
* ├────┬───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤
|
||||||
|
* │1.25│1.25│1.25│2.25U │1.25│2.75U │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───┴───┴───┘
|
||||||
|
*/
|
||||||
|
|
||||||
|
// LAYOUT for all possible switch positions on a KBD75 rev 1
|
||||||
|
#define LAYOUT( \
|
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
||||||
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \
|
||||||
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \
|
||||||
|
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \
|
||||||
|
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \
|
||||||
|
K500, K501, K503, K504, K506, K508, K510, K511, K512, K513, K514, K515 \
|
||||||
|
) { \
|
||||||
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \
|
||||||
|
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \
|
||||||
|
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \
|
||||||
|
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \
|
||||||
|
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \
|
||||||
|
{ K500, K501, KC_NO, K503, K504, KC_NO, K506, KC_NO, K508, KC_NO, K510, K511, K512, K513, K514, K515 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* 1U bottom row ─────────────────────────── ↓ ─ ↓ ─ ↓
|
||||||
|
* ┌────┬────┬────┬────────────────────────┬───┬───┬───┬───┬───┬───┐
|
||||||
|
* │1.25│1.25│1.25│6.25U │1U │1U │1U │1U │1U │1U │
|
||||||
|
* └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define LAYOUT_ansi_1u( \
|
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
||||||
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \
|
||||||
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \
|
||||||
|
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \
|
||||||
|
K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \
|
||||||
|
K500, K501, K503, K506, K510, K511, K512, K513, K514, K515 \
|
||||||
|
) { \
|
||||||
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \
|
||||||
|
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \
|
||||||
|
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \
|
||||||
|
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \
|
||||||
|
{ K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \
|
||||||
|
{ K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, K514, K515 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_75_ansi LAYOUT_ansi_1u
|
||||||
|
|
||||||
|
#define LAYOUT_iso_1u( \
|
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
||||||
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \
|
||||||
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K313, K215, \
|
||||||
|
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K214, K315, \
|
||||||
|
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \
|
||||||
|
K500, K501, K503, K506, K510, K511, K512, K513, K514, K515 \
|
||||||
|
) { \
|
||||||
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \
|
||||||
|
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \
|
||||||
|
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \
|
||||||
|
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \
|
||||||
|
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \
|
||||||
|
{ K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, K514, K515 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_75_iso( \
|
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
||||||
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \
|
||||||
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \
|
||||||
|
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K214, K313, K315, \
|
||||||
|
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \
|
||||||
|
K500, K501, K503, K506, K510, K511, K512, K513, K514, K515 \
|
||||||
|
) LAYOUT_iso_1u( \
|
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
||||||
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \
|
||||||
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K313, K215, \
|
||||||
|
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K214, K315, \
|
||||||
|
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \
|
||||||
|
K500, K501, K503, K506, K510, K511, K512, K513, K514, K515 \
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
/* normal bottom row ──────────────────────── ↓ ─── ↓
|
||||||
|
* ┌────┬────┬────┬────────────────────────┬─────┬─────┬───┬───┬───┐
|
||||||
|
* │1.25│1.25│1.25│6.25U │1.5U │1.5U │1U │1U │1U │
|
||||||
|
* └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┘
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define LAYOUT_ansi( \
|
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
||||||
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \
|
||||||
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \
|
||||||
|
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \
|
||||||
|
K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \
|
||||||
|
K500, K501, K503, K506, K510, K512, K513, K514, K515 \
|
||||||
|
) { \
|
||||||
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \
|
||||||
|
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \
|
||||||
|
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \
|
||||||
|
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \
|
||||||
|
{ K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \
|
||||||
|
{ K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_iso( \
|
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
||||||
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \
|
||||||
|
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K313, K215, \
|
||||||
|
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K214, K315, \
|
||||||
|
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \
|
||||||
|
K500, K501, K503, K506, K510, K512, K513, K514, K515 \
|
||||||
|
) { \
|
||||||
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \
|
||||||
|
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \
|
||||||
|
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \
|
||||||
|
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \
|
||||||
|
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \
|
||||||
|
{ K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \
|
||||||
|
}
|
||||||
|
|
||||||
// LAYOUT for all possible switch positions on a KBD75 rev 2
|
// LAYOUT for all possible switch positions on a KBD75 rev 2
|
||||||
#define LAYOUT_numpad( \
|
#define LAYOUT_numpad( \
|
||||||
@@ -21,5 +147,3 @@
|
|||||||
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \
|
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \
|
||||||
{ K500, K501, KC_NO, K503, K504, KC_NO, K506, KC_NO, K508, K509, K510, K511, K512, K513, K514, K515 } \
|
{ K500, K501, KC_NO, K503, K504, KC_NO, K506, KC_NO, K508, K509, K510, K511, K512, K513, K514, K515 } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,44 +1,8 @@
|
|||||||
# MCU name
|
# MCU name
|
||||||
MCU = atmega32u4
|
MCU = atmega32u4
|
||||||
|
|
||||||
# Processor frequency.
|
# Bootloader selection
|
||||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
BOOTLOADER = atmel-dfu
|
||||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
|
||||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
|
||||||
# automatically to create a 32-bit value in your source code.
|
|
||||||
#
|
|
||||||
# This will be an integer division of F_USB below, as it is sourced by
|
|
||||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
|
||||||
# does not *change* the processor frequency - it should merely be updated to
|
|
||||||
# reflect the processor speed set externally so that the code can use accurate
|
|
||||||
# software delays.
|
|
||||||
F_CPU = 16000000
|
|
||||||
|
|
||||||
#
|
|
||||||
# LUFA specific
|
|
||||||
#
|
|
||||||
# Target architecture (see library "Board Types" documentation).
|
|
||||||
ARCH = AVR8
|
|
||||||
|
|
||||||
# Input clock frequency.
|
|
||||||
# This will define a symbol, F_USB, in all source code files equal to the
|
|
||||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
|
||||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
|
||||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
|
||||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
|
||||||
# at the end, this will be done automatically to create a 32-bit value in your
|
|
||||||
# source code.
|
|
||||||
#
|
|
||||||
# If no clock division is performed on the input clock inside the AVR (via the
|
|
||||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
|
||||||
F_USB = $(F_CPU)
|
|
||||||
|
|
||||||
# Interrupt driven control endpoint task(+60)
|
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
|
||||||
|
|
||||||
|
|
||||||
# Boot Section Size in *bytes*
|
|
||||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
|
||||||
|
|
||||||
|
|
||||||
# Build Options
|
# Build Options
|
||||||
@@ -53,4 +17,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
|||||||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
AUDIO_ENABLE = no
|
AUDIO_ENABLE = no
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
|
|
||||||
|
LAYOUTS = 75_ansi 75_iso
|
||||||
@@ -69,16 +69,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
// TODO: refactor with new user EEPROM code (coming soon)
|
// TODO: refactor with new user EEPROM code (coming soon)
|
||||||
#define EEPROM_MAGIC 0x451F
|
#define EEPROM_MAGIC 0x451F
|
||||||
#define EEPROM_MAGIC_ADDR 32
|
#define EEPROM_MAGIC_ADDR 34
|
||||||
// Bump this every time we change what we store
|
// Bump this every time we change what we store
|
||||||
// This will automatically reset the EEPROM with defaults
|
// This will automatically reset the EEPROM with defaults
|
||||||
// and avoid loading invalid data from the EEPROM
|
// and avoid loading invalid data from the EEPROM
|
||||||
#define EEPROM_VERSION 0x08
|
#define EEPROM_VERSION 0x08
|
||||||
#define EEPROM_VERSION_ADDR 34
|
#define EEPROM_VERSION_ADDR 36
|
||||||
|
|
||||||
// Dynamic keymap starts after EEPROM version
|
// Dynamic keymap starts after EEPROM version
|
||||||
#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
|
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
|
||||||
// Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480)
|
// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480)
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 515
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 509 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
|
||||||
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
@@ -69,16 +69,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
// TODO: refactor with new user EEPROM code (coming soon)
|
// TODO: refactor with new user EEPROM code (coming soon)
|
||||||
#define EEPROM_MAGIC 0x451F
|
#define EEPROM_MAGIC 0x451F
|
||||||
#define EEPROM_MAGIC_ADDR 32
|
#define EEPROM_MAGIC_ADDR 34
|
||||||
// Bump this every time we change what we store
|
// Bump this every time we change what we store
|
||||||
// This will automatically reset the EEPROM with defaults
|
// This will automatically reset the EEPROM with defaults
|
||||||
// and avoid loading invalid data from the EEPROM
|
// and avoid loading invalid data from the EEPROM
|
||||||
#define EEPROM_VERSION 0x08
|
#define EEPROM_VERSION 0x08
|
||||||
#define EEPROM_VERSION_ADDR 34
|
#define EEPROM_VERSION_ADDR 36
|
||||||
|
|
||||||
// Dynamic keymap starts after EEPROM version
|
// Dynamic keymap starts after EEPROM version
|
||||||
#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
|
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
|
||||||
// Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480)
|
// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480)
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 515
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 509 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
|
||||||
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
@@ -69,16 +69,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
// TODO: refactor with new user EEPROM code (coming soon)
|
// TODO: refactor with new user EEPROM code (coming soon)
|
||||||
#define EEPROM_MAGIC 0x451F
|
#define EEPROM_MAGIC 0x451F
|
||||||
#define EEPROM_MAGIC_ADDR 32
|
#define EEPROM_MAGIC_ADDR 34
|
||||||
// Bump this every time we change what we store
|
// Bump this every time we change what we store
|
||||||
// This will automatically reset the EEPROM with defaults
|
// This will automatically reset the EEPROM with defaults
|
||||||
// and avoid loading invalid data from the EEPROM
|
// and avoid loading invalid data from the EEPROM
|
||||||
#define EEPROM_VERSION 0x08
|
#define EEPROM_VERSION 0x08
|
||||||
#define EEPROM_VERSION_ADDR 34
|
#define EEPROM_VERSION_ADDR 36
|
||||||
|
|
||||||
// Dynamic keymap starts after EEPROM version
|
// Dynamic keymap starts after EEPROM version
|
||||||
#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
|
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
|
||||||
// Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480)
|
// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480)
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 515
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 509 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
|
||||||
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
@@ -78,16 +78,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
// TODO: refactor with new user EEPROM code (coming soon)
|
// TODO: refactor with new user EEPROM code (coming soon)
|
||||||
#define EEPROM_MAGIC 0x451F
|
#define EEPROM_MAGIC 0x451F
|
||||||
#define EEPROM_MAGIC_ADDR 32
|
#define EEPROM_MAGIC_ADDR 34
|
||||||
// Bump this every time we change what we store
|
// Bump this every time we change what we store
|
||||||
// This will automatically reset the EEPROM with defaults
|
// This will automatically reset the EEPROM with defaults
|
||||||
// and avoid loading invalid data from the EEPROM
|
// and avoid loading invalid data from the EEPROM
|
||||||
#define EEPROM_VERSION 0x08
|
#define EEPROM_VERSION 0x08
|
||||||
#define EEPROM_VERSION_ADDR 34
|
#define EEPROM_VERSION_ADDR 36
|
||||||
|
|
||||||
// Dynamic keymap starts after EEPROM version
|
// Dynamic keymap starts after EEPROM version
|
||||||
#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
|
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
|
||||||
// Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480)
|
// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480)
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 515
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 517
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 509 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 507 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
|
||||||
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
@@ -55,16 +55,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
// TODO: refactor with new user EEPROM code (coming soon)
|
// TODO: refactor with new user EEPROM code (coming soon)
|
||||||
#define EEPROM_MAGIC 0x451F
|
#define EEPROM_MAGIC 0x451F
|
||||||
#define EEPROM_MAGIC_ADDR 32
|
#define EEPROM_MAGIC_ADDR 34
|
||||||
// Bump this every time we change what we store
|
// Bump this every time we change what we store
|
||||||
// This will automatically reset the EEPROM with defaults
|
// This will automatically reset the EEPROM with defaults
|
||||||
// and avoid loading invalid data from the EEPROM
|
// and avoid loading invalid data from the EEPROM
|
||||||
#define EEPROM_VERSION 0x08
|
#define EEPROM_VERSION 0x08
|
||||||
#define EEPROM_VERSION_ADDR 34
|
#define EEPROM_VERSION_ADDR 36
|
||||||
|
|
||||||
// Dynamic keymap starts after EEPROM version
|
// Dynamic keymap starts after EEPROM version
|
||||||
#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
|
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
|
||||||
// Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480)
|
// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480)
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 387 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
|
||||||
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
@@ -136,19 +136,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
// TODO: refactor with new user EEPROM code (coming soon)
|
// TODO: refactor with new user EEPROM code (coming soon)
|
||||||
#define EEPROM_MAGIC 0x451F
|
#define EEPROM_MAGIC 0x451F
|
||||||
#define EEPROM_MAGIC_ADDR 32
|
#define EEPROM_MAGIC_ADDR 34
|
||||||
// Bump this every time we change what we store
|
// Bump this every time we change what we store
|
||||||
// This will automatically reset the EEPROM with defaults
|
// This will automatically reset the EEPROM with defaults
|
||||||
// and avoid loading invalid data from the EEPROM
|
// and avoid loading invalid data from the EEPROM
|
||||||
#define EEPROM_VERSION 0x08
|
#define EEPROM_VERSION 0x08
|
||||||
#define EEPROM_VERSION_ADDR 34
|
#define EEPROM_VERSION_ADDR 36
|
||||||
|
|
||||||
// Backlight config starts after EEPROM version
|
// Backlight config starts after EEPROM version
|
||||||
#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35
|
#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37
|
||||||
// Dynamic keymap starts after backlight config (35+32)
|
// Dynamic keymap starts after backlight config (37+32)
|
||||||
#define DYNAMIC_KEYMAP_EEPROM_ADDR 67
|
#define DYNAMIC_KEYMAP_EEPROM_ADDR 69
|
||||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
|
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
|
||||||
// Dynamic macro starts after dynamic keymaps (67+(4*5*15*2)) = (67+600)
|
// Dynamic macro starts after dynamic keymaps (69+(4*5*15*2)) = (69+600)
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 667
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 669
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 398
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 396
|
||||||
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
"width": 4,
|
"width": 4,
|
||||||
"height": 5,
|
"height": 5,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT_numpad_5x4": {
|
||||||
"key_count": 17,
|
"key_count": 17,
|
||||||
"layout": [
|
"layout": [
|
||||||
{"label":"K00 (D1,C7)", "x":0, "y":0},
|
{"label":"K00 (D1,C7)", "x":0, "y":0},
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/* Copyright 2019 Ian Canino ([email protected])
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
@@ -0,0 +1,182 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum plaid_layers {
|
||||||
|
_QWERTY,
|
||||||
|
_DVORAK,
|
||||||
|
_COLEMAK,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_FUNCTION,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum plaid_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LED };
|
||||||
|
|
||||||
|
#define LOWER MO(_LOWER)
|
||||||
|
#define RAISE MO(_RAISE)
|
||||||
|
|
||||||
|
#define LED_ON 1
|
||||||
|
#define LED_OFF 0
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwerty
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Tab | A | S | D | F | G | H | J | K | L | ; | " |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | LS/( | Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | LGUI | Alt | [ |Lower | Space |Raise | ] | RGUI | \ | RS/) |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = LAYOUT_planck_mit(KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_LCTL, KC_LGUI, KC_LALT, KC_LBRC, LOWER, KC_SPC, RAISE, KC_RBRC, KC_RGUI, KC_BSLS, KC_RSPC),
|
||||||
|
|
||||||
|
/* Colemak
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Esc | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Tab | A | R | S | T | D | H | N | E | I | O | " |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | LS/( | Z | X | C | V | B | K | M | , | . | / |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | LGUI | Alt | [ |Lower | Space |Raise | ] | RGUI | \ | RS/) |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_COLEMAK] = LAYOUT_planck_mit(KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_RBRC, KC_RGUI, KC_BSLS, KC_RSPC),
|
||||||
|
|
||||||
|
/* Dvorak
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Esc | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Tab | A | O | E | U | I | D | H | T | N | S | / |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | LGUI | Alt | [ |Lower | Space |Raise | ] | RGUI | \ | RS/) |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_DVORAK] = LAYOUT_planck_mit(KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, KC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_RBRC, KC_RGUI, KC_BSLS, KC_RSPC),
|
||||||
|
|
||||||
|
/* LOWER
|
||||||
|
* ,----------------------------------------------------------------------------.
|
||||||
|
* | | | MPRV | MPLY | MNXT | | | | PGUP| UP | PGDN|PSCR |
|
||||||
|
* |------+------+------+------+------+-----+-----+-----+-----+-----------+-----+
|
||||||
|
* | | | MUTE | VOLD | VOLU | | | | LEFT| DOWN|RIGHT| |
|
||||||
|
* |------+------+------+------+------+-----+-----+-----+-----+-----+-----+-----+
|
||||||
|
* | | | MAIL | WBAK | WFWD | | | | HOME| | END | |
|
||||||
|
* |------+------+------+------+------+-----+-----+-----+-----+-----------+-----+
|
||||||
|
* | | | | | | DEL | | | | | |
|
||||||
|
* `----------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_LOWER] = LAYOUT_planck_mit(KC_NO, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_MAIL, KC_WBAK, KC_WFWD, KC_NO, KC_NO, KC_NO, KC_HOME, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO),
|
||||||
|
|
||||||
|
/* RAISE
|
||||||
|
* ,--------------------------------------------------------------------------------.
|
||||||
|
* | NLCK | 1 | 2 | 3 | - | | | | ! | # | $ | + |
|
||||||
|
* |------+------+------+------+------+-----+-----+-----+------+------+------+------+
|
||||||
|
* | / | 4 | 5 | 6 | + | | | | % | ! | ! | = |
|
||||||
|
* |------+------+------+------+------+-----+-----+-----+------+------+------+------+
|
||||||
|
* | * | 7 | 8 | 9 | , | | | | _ | - | @ | ~ |
|
||||||
|
* |------+------+------+------+------+-----+-----+-----+------+------+------+------+
|
||||||
|
* | | 0 | . | Ent | = | | | | | | ` |
|
||||||
|
* `--------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_RAISE] = LAYOUT_planck_mit(KC_NLCK, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_NO, KC_NO, KC_NO, KC_EXLM, KC_HASH, KC_DLR, KC_PLUS, KC_PSLS, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_NO, KC_NO, KC_NO, KC_PERC, KC_ASTR, KC_AMPR, KC_EQL, KC_PAST, KC_P7, KC_P8, KC_P9, KC_PCMM, KC_NO, KC_NO, KC_NO, KC_UNDS, KC_MINS, KC_AT, KC_TILDE, KC_NO, KC_P0, KC_PDOT, KC_PENT, KC_PEQL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_GRV),
|
||||||
|
|
||||||
|
/* Function (Lower + Raise)
|
||||||
|
* ,-----------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | RESET| LCA_T(F1) | LCA_T(F2) | LCA_T(F3) | LCA_T(F4) | LCA_T(F5) | LCA_T(F6) | LCA_T(F7) | | | | |
|
||||||
|
* |------+------------+-----------+-----------+-----------+-----------+-----------+-----------+------+------+------+------+
|
||||||
|
* | | | | | | QWERTY | DVORAK | COLEMAK | | | | |
|
||||||
|
* |------+------------+-----------+-----------+-----------+-----------+-----------+-----------+------+------+------+------+
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* |------+------------+-----------+-----------+-----------+-----------+-----------+-----------+------+------+------+------+
|
||||||
|
* | | | | | | LED | | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_FUNCTION] = LAYOUT_planck_mit(RESET, LCA_T(KC_F1), LCA_T(KC_F2), LCA_T(KC_F3), LCA_T(KC_F4), LCA_T(KC_F5), LCA_T(KC_F6), LCA_T(KC_F7), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, QWERTY, DVORAK, COLEMAK, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LED, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO)};
|
||||||
|
|
||||||
|
// constants to toggle LED behavior
|
||||||
|
|
||||||
|
// Setup config struct for LED
|
||||||
|
typedef union {
|
||||||
|
uint32_t raw;
|
||||||
|
struct {
|
||||||
|
bool red_mode : 1;
|
||||||
|
bool green_mode : 1;
|
||||||
|
};
|
||||||
|
} led_config_t;
|
||||||
|
led_config_t led_config;
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) { led_config.raw = eeconfig_read_user(); }
|
||||||
|
|
||||||
|
void eeconfig_init_user(void) { // EEPROM is getting reset!
|
||||||
|
led_config.raw = 0;
|
||||||
|
led_config.red_mode = LED_ON;
|
||||||
|
led_config.green_mode = LED_ON;
|
||||||
|
eeconfig_update_user(led_config.raw);
|
||||||
|
eeconfig_update_user(led_config.raw);
|
||||||
|
}
|
||||||
|
|
||||||
|
// When LOWER and RAISE are held together, go to the FUNCTION layer
|
||||||
|
uint32_t layer_state_set_user(uint32_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _FUNCTION); }
|
||||||
|
|
||||||
|
// Runs constantly in the background, in a loop.
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
uint8_t layer = biton32(layer_state);
|
||||||
|
|
||||||
|
switch (layer) {
|
||||||
|
case _LOWER:
|
||||||
|
writePinHigh(LED_RED);
|
||||||
|
break;
|
||||||
|
case _RAISE:
|
||||||
|
writePinHigh(LED_GREEN);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
writePinLow(LED_GREEN);
|
||||||
|
writePinLow(LED_RED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case COLEMAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_COLEMAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case DVORAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_DVORAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LED:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (led_config.red_mode == LED_ON && led_config.green_mode == LED_ON) {
|
||||||
|
led_config.red_mode = LED_OFF;
|
||||||
|
led_config.green_mode = LED_OFF;
|
||||||
|
} else if (led_config.red_mode == LED_OFF && led_config.green_mode == LED_OFF) {
|
||||||
|
led_config.red_mode = LED_ON;
|
||||||
|
led_config.green_mode = LED_ON;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
eeconfig_update_user(led_config.raw);
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|

|
||||||
|
|
||||||
|
# The Half Deaf Chef Plaid Layout
|
||||||
|
|
||||||
|
Opinionated keymaps optimized for programmers. The Left and Right Shift tap as parenthesis and the bracket keys are to either side of the layer keys (LOWER, RAISE). A 'right-side' up number pad in a layer with a complementary 'symbol' pad on the opposite side. An additional layer is provided to switch to virtual console on Linux based systems running xorg. These changes are propagated among all the layouts.
|
||||||
@@ -290,46 +290,55 @@ void encoder_update(bool clockwise) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void dip_switch_update_user(uint8_t index, bool active) {
|
void dip_switch_update_user(uint8_t index, bool active) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 0:
|
case 0: {
|
||||||
if (active) {
|
#ifdef AUDIO_ENABLE
|
||||||
#ifdef AUDIO_ENABLE
|
static bool play_sound = false;
|
||||||
PLAY_SONG(plover_song);
|
#endif
|
||||||
#endif
|
if (active) {
|
||||||
layer_on(_ADJUST);
|
#ifdef AUDIO_ENABLE
|
||||||
} else {
|
if (play_sound) { PLAY_SONG(plover_song); }
|
||||||
#ifdef AUDIO_ENABLE
|
#endif
|
||||||
PLAY_SONG(plover_gb_song);
|
layer_on(_ADJUST);
|
||||||
#endif
|
} else {
|
||||||
layer_off(_ADJUST);
|
#ifdef AUDIO_ENABLE
|
||||||
}
|
if (play_sound) { PLAY_SONG(plover_gb_song); }
|
||||||
break;
|
#endif
|
||||||
case 1:
|
layer_off(_ADJUST);
|
||||||
if (active) {
|
}
|
||||||
muse_mode = true;
|
#ifdef AUDIO_ENABLE
|
||||||
} else {
|
play_sound = true;
|
||||||
muse_mode = false;
|
#endif
|
||||||
#ifdef AUDIO_ENABLE
|
break;
|
||||||
stop_all_notes();
|
}
|
||||||
#endif
|
case 1:
|
||||||
}
|
if (active) {
|
||||||
}
|
muse_mode = true;
|
||||||
|
} else {
|
||||||
|
muse_mode = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
void matrix_scan_user(void) {
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
if (muse_mode) {
|
if (muse_mode) {
|
||||||
if (muse_counter == 0) {
|
if (muse_counter == 0) {
|
||||||
uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
|
uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
|
||||||
if (muse_note != last_muse_note) {
|
if (muse_note != last_muse_note) {
|
||||||
stop_note(compute_freq_for_midi_note(last_muse_note));
|
stop_note(compute_freq_for_midi_note(last_muse_note));
|
||||||
play_note(compute_freq_for_midi_note(muse_note), 0xF);
|
play_note(compute_freq_for_midi_note(muse_note), 0xF);
|
||||||
last_muse_note = muse_note;
|
last_muse_note = muse_note;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
muse_counter = (muse_counter + 1) % muse_tempo;
|
||||||
|
} else {
|
||||||
|
if (muse_counter) {
|
||||||
|
stop_all_notes();
|
||||||
|
muse_counter = 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
muse_counter = (muse_counter + 1) % muse_tempo;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool music_mask_user(uint16_t keycode) {
|
bool music_mask_user(uint16_t keycode) {
|
||||||
|
|||||||
@@ -260,40 +260,43 @@ void encoder_update_user(uint8_t index, bool clockwise) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void dip_switch_update_user(uint8_t index, bool active) {
|
void dip_switch_update_user(uint8_t index, bool active) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 0:
|
case 0:
|
||||||
if (active) {
|
if (active) {
|
||||||
layer_on(_ADJUST);
|
layer_on(_ADJUST);
|
||||||
} else {
|
} else {
|
||||||
layer_off(_ADJUST);
|
layer_off(_ADJUST);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (active) {
|
if (active) {
|
||||||
muse_mode = true;
|
muse_mode = true;
|
||||||
} else {
|
} else {
|
||||||
muse_mode = false;
|
muse_mode = false;
|
||||||
#ifdef AUDIO_ENABLE
|
}
|
||||||
stop_all_notes();
|
}
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
void matrix_scan_user(void) {
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
if (muse_mode) {
|
if (muse_mode) {
|
||||||
if (muse_counter == 0) {
|
if (muse_counter == 0) {
|
||||||
uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
|
uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()];
|
||||||
if (muse_note != last_muse_note) {
|
if (muse_note != last_muse_note) {
|
||||||
stop_note(compute_freq_for_midi_note(last_muse_note));
|
stop_note(compute_freq_for_midi_note(last_muse_note));
|
||||||
play_note(compute_freq_for_midi_note(muse_note), 0xF);
|
play_note(compute_freq_for_midi_note(muse_note), 0xF);
|
||||||
last_muse_note = muse_note;
|
last_muse_note = muse_note;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
muse_counter = (muse_counter + 1) % muse_tempo;
|
||||||
|
} else {
|
||||||
|
if (muse_counter) {
|
||||||
|
stop_all_notes();
|
||||||
|
muse_counter = 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
muse_counter = (muse_counter + 1) % muse_tempo;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool music_mask_user(uint16_t keycode) {
|
bool music_mask_user(uint16_t keycode) {
|
||||||
|
|||||||
@@ -57,16 +57,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
// TODO: refactor with new user EEPROM code (coming soon)
|
// TODO: refactor with new user EEPROM code (coming soon)
|
||||||
#define EEPROM_MAGIC 0x451F
|
#define EEPROM_MAGIC 0x451F
|
||||||
#define EEPROM_MAGIC_ADDR 32
|
#define EEPROM_MAGIC_ADDR 34
|
||||||
// Bump this every time we change what we store
|
// Bump this every time we change what we store
|
||||||
// This will automatically reset the EEPROM with defaults
|
// This will automatically reset the EEPROM with defaults
|
||||||
// and avoid loading invalid data from the EEPROM
|
// and avoid loading invalid data from the EEPROM
|
||||||
#define EEPROM_VERSION 0x08
|
#define EEPROM_VERSION 0x08
|
||||||
#define EEPROM_VERSION_ADDR 34
|
#define EEPROM_VERSION_ADDR 36
|
||||||
|
|
||||||
// Dynamic keymap starts after EEPROM version
|
// Dynamic keymap starts after EEPROM version
|
||||||
#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
|
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
|
||||||
// Dynamic macro starts after dynamic keymaps (35+(4*13*4*2)) = (35+416)
|
// Dynamic macro starts after dynamic keymaps (37+(4*13*4*2)) = (37+416)
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 451
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 453
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 573 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 571 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR
|
||||||
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
@@ -57,16 +57,16 @@
|
|||||||
|
|
||||||
// TODO: refactor with new user EEPROM code (coming soon)
|
// TODO: refactor with new user EEPROM code (coming soon)
|
||||||
#define EEPROM_MAGIC 0x451F
|
#define EEPROM_MAGIC 0x451F
|
||||||
#define EEPROM_MAGIC_ADDR 32
|
#define EEPROM_MAGIC_ADDR 34
|
||||||
// Bump this every time we change what we store
|
// Bump this every time we change what we store
|
||||||
// This will automatically reset the EEPROM with defaults
|
// This will automatically reset the EEPROM with defaults
|
||||||
// and avoid loading invalid data from the EEPROM
|
// and avoid loading invalid data from the EEPROM
|
||||||
#define EEPROM_VERSION 0x08
|
#define EEPROM_VERSION 0x08
|
||||||
#define EEPROM_VERSION_ADDR 34
|
#define EEPROM_VERSION_ADDR 36
|
||||||
|
|
||||||
// Dynamic keymap starts after EEPROM version
|
// Dynamic keymap starts after EEPROM version
|
||||||
#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
|
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
|
||||||
// Dynamic macro starts after dynamic keymaps (35+(4*5*4*2)) = (35+160)
|
// Dynamic macro starts after dynamic keymaps (37+(4*5*4*2)) = (37+160)
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 195
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 197
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 829
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 827
|
||||||
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "TheVanKeyboards Caravan",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 13.75,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"K00", "x":0, "y":0},
|
||||||
|
{"label":"K01", "x":1, "y":0},
|
||||||
|
{"label":"K02", "x":2, "y":0},
|
||||||
|
{"label":"K03", "x":3, "y":0},
|
||||||
|
{"label":"K04", "x":4, "y":0},
|
||||||
|
{"label":"K05", "x":5, "y":0},
|
||||||
|
{"label":"K06", "x":7, "y":0},
|
||||||
|
{"label":"K07", "x":8, "y":0},
|
||||||
|
{"label":"K08", "x":9, "y":0},
|
||||||
|
{"label":"K09", "x":10, "y":0},
|
||||||
|
{"label":"K0A", "x":11, "y":0},
|
||||||
|
{"label":"K0B", "x":12, "y":0, "w":1.75},
|
||||||
|
{"label":"K10", "x":0, "y":1, "w":1.25},
|
||||||
|
{"label":"K11", "x":1.25, "y":1},
|
||||||
|
{"label":"K12", "x":2.25, "y":1},
|
||||||
|
{"label":"K13", "x":3.25, "y":1},
|
||||||
|
{"label":"K14", "x":4.25, "y":1},
|
||||||
|
{"label":"K15", "x":5.25, "y":1},
|
||||||
|
{"label":"K16", "x":7.25, "y":1},
|
||||||
|
{"label":"K17", "x":8.25, "y":1},
|
||||||
|
{"label":"K18", "x":9.25, "y":1},
|
||||||
|
{"label":"K19", "x":10.25, "y":1},
|
||||||
|
{"label":"K1A", "x":11.25, "y":1},
|
||||||
|
{"label":"K1B", "x":12.25, "y":1, "w":1.5},
|
||||||
|
{"label":"K20", "x":0, "y":2, "w":1.75},
|
||||||
|
{"label":"K21", "x":1.75, "y":2},
|
||||||
|
{"label":"K22", "x":2.75, "y":2},
|
||||||
|
{"label":"K23", "x":3.75, "y":2},
|
||||||
|
{"label":"K24", "x":4.75, "y":2},
|
||||||
|
{"label":"K25", "x":5.75, "y":2},
|
||||||
|
{"label":"K26", "x":7.75, "y":2},
|
||||||
|
{"label":"K27", "x":8.75, "y":2},
|
||||||
|
{"label":"K28", "x":9.75, "y":2},
|
||||||
|
{"label":"K29", "x":10.75, "y":2},
|
||||||
|
{"label":"K2A", "x":11.75, "y":2},
|
||||||
|
{"label":"K2B", "x":12.75, "y":2},
|
||||||
|
{"label":"K30", "x":0, "y":3, "w":1.25},
|
||||||
|
{"label":"K31", "x":1.25, "y":3, "w":1.5},
|
||||||
|
{"label":"K32", "x":2.75, "y":3, "w":1.25},
|
||||||
|
{"label":"K33", "x":4, "y":3, "w":2.25},
|
||||||
|
{"label":"K37", "x":7.25, "y":3, "w":2},
|
||||||
|
{"label":"K38", "x":9.25, "y":3, "w":1.25},
|
||||||
|
{"label":"K39", "x":10.5, "y":3, "w":1.5},
|
||||||
|
{"label":"K3B", "x":12, "y":3, "w":1.75}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
/* Copyright 2019 funderburker
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#define LT1_SPC LT(1, KC_SPC)
|
||||||
|
#define LT2_SPC LT(2, KC_BSPC)
|
||||||
|
#define TSKMNGR C(S(KC_ESC))
|
||||||
|
#define ALT_TAB A(KC_TAB)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
// Default layer
|
||||||
|
[0] = LAYOUT_all(
|
||||||
|
KC_TRNS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
|
||||||
|
KC_TRNS, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
|
KC_TRNS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(3),
|
||||||
|
KC_TRNS, KC_LGUI, KC_LALT, LT1_SPC, LT2_SPC, KC_RALT, KC_RCTL
|
||||||
|
),
|
||||||
|
|
||||||
|
// Fn1 layer
|
||||||
|
[1] = LAYOUT_all(
|
||||||
|
KC_GRV, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
|
||||||
|
C(KC_C), KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, KC_TRNS,
|
||||||
|
C(KC_V), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS,
|
||||||
|
C(KC_X), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
// Fn2 layer
|
||||||
|
[2] = LAYOUT_all(
|
||||||
|
ALT_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL,
|
||||||
|
TSKMNGR, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
// Fn3 layer
|
||||||
|
[3] = LAYOUT_all(
|
||||||
|
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_CAPS, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, BL_STEP, BL_DEC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 HnahKB
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x0000
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER HnahKB
|
||||||
|
#define PRODUCT VN66
|
||||||
|
#define DESCRIPTION A compact keyboard for VNMK
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 14
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS \
|
||||||
|
{ B1, B2, B3, D2, F7 }
|
||||||
|
#define MATRIX_COL_PINS \
|
||||||
|
{ F6, F5, F4, F1, F0, C6, C7, B5, B4, D7, D6, D4, D5, D3 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
|
||||||
|
#define BACKLIGHT_PIN B6
|
||||||
|
#define BACKLIGHT_BREATHING
|
||||||
|
#define BACKLIGHT_LEVELS 4
|
||||||
|
|
||||||
|
#define RGB_DI_PIN E2
|
||||||
|
#ifdef RGB_DI_PIN
|
||||||
|
#define RGBLED_NUM 20
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||||
|
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||||
|
// /*== all animations enable ==*/
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#endif
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCE 3
|
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||||
|
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||||
|
*/
|
||||||
|
#define GRAVE_ESC_CTRL_OVERRIDE
|
||||||
|
|
||||||
|
#define ENCODERS_PAD_A {B0}
|
||||||
|
#define ENCODERS_PAD_B {B7}
|
||||||
|
#define ENCODER_RESOLUTION 2
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "vn66",
|
||||||
|
"url": "fb.com/groups/VietNamMechKey/",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 19.25,
|
||||||
|
"height": 5.25,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_all": {
|
||||||
|
"layout": [{"label":"ESC", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Insert", "x":15.25, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.25, "y":1}, {"label":"Caps", "x":0, "y":2, "w":1.25}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":13.75, "y":2, "w":1.25}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14.25, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"x":3.5, "y":4, "w":6}, {"label":"Alt", "x":9.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":10.75, "y":4}, {"label":"Menu", "x":11.75, "y":4, "w":1.25}, {"label":"\u2190", "x":13.25, "y":4.25}, {"label":"\u2193", "x":14.25, "y":4.25}, {"label":"\u2192", "x":15.25, "y":4.25}]
|
||||||
|
},
|
||||||
|
"LAYOUT_ansi": {
|
||||||
|
"layout": [{"label":"ESC", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0, "w":2}, {"label":"Insert", "x":15.25, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.25, "y":1}, {"label":"Caps", "x":0, "y":2, "w":1.25}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14.25, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"x":3.5, "y":4, "w":6}, {"label":"Alt", "x":9.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":10.75, "y":4}, {"label":"Menu", "x":11.75, "y":4, "w":1.25}, {"label":"\u2190", "x":13.25, "y":4.25}, {"label":"\u2193", "x":14.25, "y":4.25}, {"label":"\u2192", "x":15.25, "y":4.25}]
|
||||||
|
},
|
||||||
|
"LAYOUT_iso": {
|
||||||
|
"layout": [{"label":"ESC", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0, "w":2}, {"label":"Insert", "x":15.25, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Delete", "x":15.25, "y":1}, {"label":"Caps", "x":0, "y":2, "w":1.25}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14.25, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"x":3.5, "y":4, "w":6}, {"label":"Alt", "x":9.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":10.75, "y":4}, {"label":"Menu", "x":11.75, "y":4, "w":1.25}, {"label":"\u2190", "x":13.25, "y":4.25}, {"label":"\u2193", "x":14.25, "y":4.25}, {"label":"\u2192", "x":15.25, "y":4.25}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/* Copyright 2019 HnahKB
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
/* Copyright 2019 HnahKB
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum hnah_layers{
|
||||||
|
_QWERTY,
|
||||||
|
_LOWER
|
||||||
|
};
|
||||||
|
|
||||||
|
#define LOWER MO(_LOWER)
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_QWERTY] = LAYOUT_all( /* Base */
|
||||||
|
GRAVE_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_INS,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
|
||||||
|
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, LOWER, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
[_LOWER] = LAYOUT_all( /* Base */
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_COMM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (clockwise == 0) {
|
||||||
|
#ifdef MOUSEKEY_ENABLE
|
||||||
|
tap_code(KC_MS_WH_DOWN);
|
||||||
|
#else
|
||||||
|
tap_code(KC_VOLD);
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
#ifdef MOUSEKEY_ENABLE
|
||||||
|
tap_code(KC_MS_WH_UP);
|
||||||
|
#else
|
||||||
|
tap_code(KC_VOLU);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The default keymap for vn66
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# vn66
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A compact 60% keyboard for VNMK
|
||||||
|
|
||||||
|
Keyboard Maintainer: VNMK Community
|
||||||
|
Hardware Supported: VN66 PCB rev.2
|
||||||
|
Hardware Availability: [https://geekhack.org/index.php?topic=101754.0]
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make vn66:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# atmega32a bootloadHID
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
|
||||||
|
# If you don't know the bootloader type, then you can specify the
|
||||||
|
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
||||||
|
ENCODER_ENABLE = yes
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
/* Copyright 2019 HnahKB
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "vn66.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
led_init_ports();
|
||||||
|
matrix_init_user();
|
||||||
|
};
|
||||||
|
|
||||||
|
void led_init_ports(void) {
|
||||||
|
setPinOutput(E6);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
||||||
|
// Turn Caps Lock LED on
|
||||||
|
writePinLow(E6);
|
||||||
|
} else {
|
||||||
|
// Turn Caps Lock LED off
|
||||||
|
writePinHigh(E6);
|
||||||
|
}
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
/* Copyright 2019 HnahKB
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* This a shortcut to help you visually see your layout.
|
||||||
|
*
|
||||||
|
* The first section contains all of the arguments representing the physical
|
||||||
|
* layout of the board and position of the keys.
|
||||||
|
*
|
||||||
|
* The second converts the arguments into a two-dimensional array which
|
||||||
|
* represents the switch matrix.
|
||||||
|
*/
|
||||||
|
#define LAYOUT_all( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k4d, k4c,\
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k4b,\
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
|
||||||
|
k40, k41, k42, k44, k45, k46, k47, k48, k49, k4a \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d }, \
|
||||||
|
{ k40, k41, k42, KC_NO, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d }, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_ansi( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k4c,\
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k4b,\
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
|
||||||
|
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
|
||||||
|
k40, k41, k42, k44, k45, k46, k47, k48, k49, k4a \
|
||||||
|
) LAYOUT_all( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, KC_NO, k4c,\
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k4b,\
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, k2d, \
|
||||||
|
k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
|
||||||
|
k40, k41, k42, k44, k45, k46, k47, k48, k49, k4a \
|
||||||
|
)
|
||||||
|
|
||||||
|
#define LAYOUT_iso( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k4c,\
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k4b,\
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
|
||||||
|
k40, k41, k42, k44, k45, k46, k47, k48, k49, k4a \
|
||||||
|
) LAYOUT_all( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, KC_NO, k4c,\
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO, k4b,\
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
|
||||||
|
k40, k41, k42, k44, k45, k46, k47, k48, k49, k4a \
|
||||||
|
)
|
||||||
|
|
||||||
@@ -127,16 +127,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
// TODO: refactor with new user EEPROM code (coming soon)
|
// TODO: refactor with new user EEPROM code (coming soon)
|
||||||
#define EEPROM_MAGIC 0x451F
|
#define EEPROM_MAGIC 0x451F
|
||||||
#define EEPROM_MAGIC_ADDR 32
|
#define EEPROM_MAGIC_ADDR 34
|
||||||
// Bump this every time we change what we store
|
// Bump this every time we change what we store
|
||||||
// This will automatically reset the EEPROM with defaults
|
// This will automatically reset the EEPROM with defaults
|
||||||
// and avoid loading invalid data from the EEPROM
|
// and avoid loading invalid data from the EEPROM
|
||||||
#define EEPROM_VERSION 0x08
|
#define EEPROM_VERSION 0x08
|
||||||
#define EEPROM_VERSION_ADDR 34
|
#define EEPROM_VERSION_ADDR 36
|
||||||
|
|
||||||
// Dynamic keymap starts after EEPROM version
|
// Dynamic keymap starts after EEPROM version
|
||||||
#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
|
#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
|
||||||
// Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480)
|
// Dynamic macro starts after dynamic keymaps (37+(4*10*6*2)) = (37+480)
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 675 // **** CHANGE THIS BASED ON MATRIX_ROWS & MATRIX_COLS ****
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 677 // **** CHANGE THIS BASED ON MATRIX_ROWS & MATRIX_COLS ****
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 349 // **** CHANGE THIS BASED ON 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR ****
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 347 // **** CHANGE THIS BASED ON 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR ****
|
||||||
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
@@ -125,18 +125,18 @@
|
|||||||
|
|
||||||
// TODO: refactor with new user EEPROM code (coming soon)
|
// TODO: refactor with new user EEPROM code (coming soon)
|
||||||
#define EEPROM_MAGIC 0x451F
|
#define EEPROM_MAGIC 0x451F
|
||||||
#define EEPROM_MAGIC_ADDR 32
|
#define EEPROM_MAGIC_ADDR 34
|
||||||
// Bump this every time we change what we store
|
// Bump this every time we change what we store
|
||||||
// This will automatically reset the EEPROM with defaults
|
// This will automatically reset the EEPROM with defaults
|
||||||
// and avoid loading invalid data from the EEPROM
|
// and avoid loading invalid data from the EEPROM
|
||||||
#define EEPROM_VERSION 0x08
|
#define EEPROM_VERSION 0x08
|
||||||
#define EEPROM_VERSION_ADDR 34
|
#define EEPROM_VERSION_ADDR 36
|
||||||
|
|
||||||
// Backlight config starts after EEPROM version
|
// Backlight config starts after EEPROM version
|
||||||
#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35
|
#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 37
|
||||||
// Dynamic keymap starts after backlight config (35+31)
|
// Dynamic keymap starts after backlight config (37+31)
|
||||||
#define DYNAMIC_KEYMAP_EEPROM_ADDR 66
|
#define DYNAMIC_KEYMAP_EEPROM_ADDR 68
|
||||||
// Dynamic macro starts after dynamic keymaps (66+(4*5*15*2)) = (66+600)
|
// Dynamic macro starts after dynamic keymaps (68+(4*5*15*2)) = (68+600)
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 666
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 668
|
||||||
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 358
|
#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 356
|
||||||
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
#define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
Loaded 100 of 137 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user