Compare commits
65 Commits
Author | SHA1 | Date | |
---|---|---|---|
095b28e006 | |||
8a27703ef4 | |||
006abbfd6f | |||
95e7e10061 | |||
87dc2efda8 | |||
ed99581161 | |||
83d33caf63 | |||
6834febece | |||
8def9bc642 | |||
3fc5a05d66 | |||
1147fc24ad | |||
d4056a11d3 | |||
1572375bfb | |||
0284431ad9 | |||
8e86e22187 | |||
9c4b9bbccc | |||
0537a59920 | |||
d21b287e7d | |||
c50e80e13b | |||
738a9fc16c | |||
b89cec9ebc | |||
38299ff2ef | |||
61c53ad75e | |||
9234f9c964 | |||
2869d51ba8 | |||
bc7fe1223d | |||
f804bd3d2d | |||
72fd49b146 | |||
7e9a7af672 | |||
11773a5546 | |||
b2175e1849 | |||
ffc2ae057b | |||
a012113d63 | |||
c691396ae5 | |||
860f6d65b8 | |||
85d2d4fee5 | |||
a57c9648e9 | |||
e9755521ab | |||
bbecd276d2 | |||
4d4b845cf5 | |||
0fab3bbde3 | |||
b2877470ce | |||
e0c9cfad86 | |||
5a34ec7565 | |||
237da3ac8d | |||
ade22f8e2c | |||
96cb9f4661 | |||
8f0ec565f4 | |||
6a4a4a2875 | |||
5e463086cd | |||
c37ce43437 | |||
f2fcffab0d | |||
aa62b60eaf | |||
612a418ce9 | |||
6bdef6b8c2 | |||
b292d30a25 | |||
7f0a205232 | |||
1f5d5e5314 | |||
8ffeaec3aa | |||
bbea9dadbc | |||
81756d7b21 | |||
c5c112ae29 | |||
3d7bfae232 | |||
b666921e25 | |||
b4f4576631 |
29
Makefile
29
Makefile
@ -67,7 +67,7 @@ $(eval $(call NEXT_PATH_ELEMENT))
|
||||
# It's really a very simple if else chain, if you squint enough,
|
||||
# but the makefile syntax makes it very verbose.
|
||||
# If we are in a subfolder of keyboards
|
||||
#
|
||||
#
|
||||
# *** No longer needed **
|
||||
#
|
||||
# ifeq ($(CURRENT_PATH_ELEMENT),keyboards)
|
||||
@ -307,11 +307,6 @@ define PARSE_KEYBOARD
|
||||
KEYBOARD_FOLDER_PATH_3 := $$(patsubst %/,%,$$(dir $$(KEYBOARD_FOLDER_PATH_2)))
|
||||
KEYBOARD_FOLDER_PATH_4 := $$(patsubst %/,%,$$(dir $$(KEYBOARD_FOLDER_PATH_3)))
|
||||
KEYBOARD_FOLDER_PATH_5 := $$(patsubst %/,%,$$(dir $$(KEYBOARD_FOLDER_PATH_4)))
|
||||
KEYBOARD_FOLDER_1 := $$(notdir $$(KEYBOARD_FOLDER_PATH_1))
|
||||
KEYBOARD_FOLDER_2 := $$(notdir $$(KEYBOARD_FOLDER_PATH_2))
|
||||
KEYBOARD_FOLDER_3 := $$(notdir $$(KEYBOARD_FOLDER_PATH_3))
|
||||
KEYBOARD_FOLDER_4 := $$(notdir $$(KEYBOARD_FOLDER_PATH_4))
|
||||
KEYBOARD_FOLDER_5 := $$(notdir $$(KEYBOARD_FOLDER_PATH_5))
|
||||
|
||||
KEYMAPS :=
|
||||
# get a list of all keymaps
|
||||
@ -325,35 +320,35 @@ define PARSE_KEYBOARD
|
||||
$$(KEYBOARD_FOLDER_3) $$(KEYBOARD_FOLDER_4) $$(KEYBOARD_FOLDER_5), $$(KEYMAPS)))
|
||||
|
||||
KEYBOARD_LAYOUTS :=
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_5)/rules.mk)","")
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_5)/rules.mk)","")
|
||||
LAYOUTS :=
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_5)/rules.mk)
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_5)/rules.mk)
|
||||
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
||||
endif
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_4)/rules.mk)","")
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_4)/rules.mk)","")
|
||||
LAYOUTS :=
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_4)/rules.mk)
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_4)/rules.mk)
|
||||
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
||||
endif
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_3)/rules.mk)","")
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_3)/rules.mk)","")
|
||||
LAYOUTS :=
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_3)/rules.mk)
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_3)/rules.mk)
|
||||
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
||||
endif
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_2)/rules.mk)","")
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_2)/rules.mk)","")
|
||||
LAYOUTS :=
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_2)/rules.mk)
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_2)/rules.mk)
|
||||
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
||||
endif
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_1)/rules.mk)","")
|
||||
ifneq ("$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_1)/rules.mk)","")
|
||||
LAYOUTS :=
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_1)/rules.mk)
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_1)/rules.mk)
|
||||
KEYBOARD_LAYOUTS := $$(sort $$(LAYOUTS) $$(KEYBOARD_LAYOUTS))
|
||||
endif
|
||||
|
||||
LAYOUT_KEYMAPS :=
|
||||
$$(foreach LAYOUT,$$(KEYBOARD_LAYOUTS),$$(eval LAYOUT_KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/layouts/*/$$(LAYOUT)/*/.)))))
|
||||
|
||||
|
||||
KEYMAPS := $$(sort $$(KEYMAPS) $$(LAYOUT_KEYMAPS))
|
||||
|
||||
# if the rule after removing the start of it is empty (we haven't specified a kemap or target)
|
||||
|
13
common.mk
13
common.mk
@ -3,16 +3,16 @@ include message.mk
|
||||
# Directory common source files exist
|
||||
TOP_DIR = .
|
||||
TMK_DIR = tmk_core
|
||||
TMK_PATH = $(TOP_DIR)/$(TMK_DIR)
|
||||
LIB_PATH = $(TOP_DIR)/lib
|
||||
TMK_PATH = $(TMK_DIR)
|
||||
LIB_PATH = lib
|
||||
|
||||
QUANTUM_DIR = quantum
|
||||
QUANTUM_PATH = $(TOP_DIR)/$(QUANTUM_DIR)
|
||||
QUANTUM_PATH = $(QUANTUM_DIR)
|
||||
|
||||
DRIVER_DIR = drivers
|
||||
DRIVER_PATH = $(TOP_DIR)/$(DRIVER_DIR)
|
||||
DRIVER_PATH = $(DRIVER_DIR)
|
||||
|
||||
BUILD_DIR := $(TOP_DIR)/.build
|
||||
BUILD_DIR := .build
|
||||
|
||||
COMMON_VPATH := $(TOP_DIR)
|
||||
COMMON_VPATH += $(TMK_PATH)
|
||||
@ -21,4 +21,5 @@ COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/audio
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/process_keycode
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/api
|
||||
COMMON_VPATH += $(DRIVER_PATH)
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/split_common
|
||||
COMMON_VPATH += $(DRIVER_PATH)
|
||||
|
@ -197,6 +197,12 @@ ifeq ($(strip $(USB_HID_ENABLE)), yes)
|
||||
include $(TMK_DIR)/protocol/usb_hid.mk
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(strip $(HD44780_ENABLE)), yes)
|
||||
SRC += drivers/avr/hd44780.c
|
||||
OPT_DEFS += -DHD44780_ENABLE
|
||||
endif
|
||||
|
||||
QUANTUM_SRC:= \
|
||||
$(QUANTUM_DIR)/quantum.c \
|
||||
$(QUANTUM_DIR)/keymap_common.c \
|
||||
@ -204,5 +210,17 @@ QUANTUM_SRC:= \
|
||||
$(QUANTUM_DIR)/process_keycode/process_leader.c
|
||||
|
||||
ifndef CUSTOM_MATRIX
|
||||
QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c
|
||||
ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
|
||||
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c
|
||||
else
|
||||
QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
|
||||
OPT_DEFS += -DSPLIT_KEYBOARD
|
||||
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_flags.c \
|
||||
$(QUANTUM_DIR)/split_common/split_util.c \
|
||||
$(QUANTUM_DIR)/split_common/i2c.c \
|
||||
$(QUANTUM_DIR)/split_common/serial.c
|
||||
endif
|
||||
|
@ -55,18 +55,22 @@
|
||||
* [Userspace](feature_userspace.md)
|
||||
|
||||
* [Keycodes](keycodes.md)
|
||||
* [Backlight](feature_backlight.md#backlight-keycodes)
|
||||
* [Basic](keycodes_basic.md)
|
||||
* [Quantum](quantum_keycodes.md)
|
||||
* [Audio](feature_audio.md#audio-keycodes)
|
||||
* [Backlight](feature_backlight.md#backlight-keycodes)
|
||||
* [Bluetooth](feature_bluetooth.md#bluetooth-keycodes)
|
||||
* [Bootmagic](feature_bootmagic.md#bootmagic-keycodes)
|
||||
* [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers)
|
||||
* [Mod+Key](feature_advanced_keycodes.md#modifier-keys)
|
||||
* [Mod Tap](feature_advanced_keycodes.md#mod-tap)
|
||||
* [Mouse Keys](feature_mouse_keys.md#mapping-mouse-actions-to-keyboard-keys)
|
||||
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
|
||||
* [Quantum](quantum_keycodes.md)
|
||||
* [RGB Light](feature_rgblight.md#rgblight-keycodes)
|
||||
* [RGB Matrix](feature_rgb_matrix.md#keycodes)
|
||||
* [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes)
|
||||
* [Stenography](feature_stenography.md#keycode-reference)
|
||||
* [Swap Hands](feature_swap_hands.md#swap-keycodes)
|
||||
* [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes)
|
||||
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||
|
||||
|
@ -43,7 +43,9 @@
|
||||
* [Pointing Device](feature_pointing_device.md)
|
||||
* [PS/2 Mouse](feature_ps2_mouse.md)
|
||||
* [RGB Lighting](feature_rgblight.md)
|
||||
* [Space Cadet](feature_space_cadet.md)
|
||||
* [RGB Matrix](feature_rgb_matrix.md)
|
||||
* [Space Cadet Shift](feature_space_cadet.md)
|
||||
* [Space Cadet Shift Enter](feature_space_shift_cadet.md)
|
||||
* [Stenography](feature_stenography.md)
|
||||
* [Swap Hands](feature_swap_hands.md)
|
||||
* [Tap Dance](feature_tap_dance.md)
|
||||
@ -53,18 +55,22 @@
|
||||
* [Userspace](feature_userspace.md)
|
||||
|
||||
* [Keycodes](keycodes.md)
|
||||
* [Backlight](feature_backlight.md#backlight-keycodes)
|
||||
* [Basic](keycodes_basic.md)
|
||||
* [Quantum](quantum_keycodes.md)
|
||||
* [Audio](feature_audio.md#audio-keycodes)
|
||||
* [Backlight](feature_backlight.md#backlight-keycodes)
|
||||
* [Bluetooth](feature_bluetooth.md#bluetooth-keycodes)
|
||||
* [Bootmagic](feature_bootmagic.md#bootmagic-keycodes)
|
||||
* [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers)
|
||||
* [Mod+Key](feature_advanced_keycodes.md#modifier-keys)
|
||||
* [Mod Tap](feature_advanced_keycodes.md#mod-tap)
|
||||
* [Mouse Keys](feature_mouse_keys.md#mapping-mouse-actions-to-keyboard-keys)
|
||||
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
|
||||
* [Quantum](quantum_keycodes.md)
|
||||
* [RGB Light](feature_rgblight.md#rgblight-keycodes)
|
||||
* [RGB Matrix](feature_rgb_matrix.md#keycodes)
|
||||
* [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes)
|
||||
* [Stenography](feature_stenography.md#keycode-reference)
|
||||
* [Swap Hands](feature_swap_hands.md#swap-keycodes)
|
||||
* [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes)
|
||||
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||
|
||||
|
@ -126,14 +126,18 @@ If you define these options you will enable the associated feature, which may in
|
||||
* how long before a tap becomes a hold, if set above 500, a key tapped during the tapping term will turn it into a hold too
|
||||
* `#define RETRO_TAPPING`
|
||||
* tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release
|
||||
* See [Retro Tapping](feature_advanced_keycodes.md#retro-tapping) for details
|
||||
* `#define TAPPING_TOGGLE 2`
|
||||
* how many taps before triggering the toggle
|
||||
* `#define PERMISSIVE_HOLD`
|
||||
* makes tap and hold keys work better for fast typers who don't want tapping term set above 500
|
||||
* See [Permissive Hold](feature_advanced_keycodes.md#permissive-hold) for details
|
||||
* `#define IGNORE_MOD_TAP_INTERRUPT`
|
||||
* makes it possible to do rolling combos (zx) with keys that convert to other keys on hold
|
||||
* See [Mod tap interrupt](feature_advanced_keycodes.md#mod-tap-interrupt) for details
|
||||
* `#define TAPPING_FORCE_HOLD`
|
||||
* makes it possible to use a dual role key as modifier shortly after having been tapped
|
||||
* See [Hold after tap](feature_advanced_keycodes.md#hold-after-tap)
|
||||
* `#define LEADER_TIMEOUT 300`
|
||||
* how long before the leader key times out
|
||||
* `#define ONESHOT_TIMEOUT 300`
|
||||
@ -175,6 +179,16 @@ If you define these options you will enable the associated feature, which may in
|
||||
* `#define MOUSEKEY_MAX_SPEED 7`
|
||||
* `#define MOUSEKEY_WHEEL_DELAY 0`
|
||||
|
||||
## Split Keyboard Options
|
||||
|
||||
Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk
|
||||
|
||||
* `#define SPLIT_HAND_PIN B7`
|
||||
* For using high/low pin to determine handedness, low = right hand, high = left hand. Replace 'B7' with the pin you are using. This is optional and you can still use the EEHANDS method or MASTER_LEFT / MASTER_RIGHT defines like the stock Let's Split uses.
|
||||
|
||||
* `#define USE_I2C`
|
||||
* For using I2C instead of Serial (defaults to serial)
|
||||
|
||||
# The `rules.mk` File
|
||||
|
||||
This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features.
|
||||
@ -228,3 +242,5 @@ Use these to enable or disable building certain features. The more you have enab
|
||||
* Unicode
|
||||
* `BLUETOOTH_ENABLE`
|
||||
* Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
* `SPLIT_KEYBOARD`
|
||||
* Enables split keyboard support (dual MCU like the let's split and bakingpy's boards) and includes all necessary files located at quantum/split_common
|
||||
|
@ -203,3 +203,9 @@ With default settings, `a` will be sent on the first release, then `a` will be s
|
||||
With `TAPPING_FORCE_HOLD`, the second press will be interpreted as a Shift, allowing to use it as a modifier shortly after having used it as a tap.
|
||||
|
||||
!> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tapping Toggle).
|
||||
|
||||
# Retro Tapping
|
||||
|
||||
When you hold a dual function key, and haven't pressed anything when you release the key, normally nothing happens. However, if you enable this, if you release the key without pressing another key, it will send the original key, even if it is outside of the tapping term.
|
||||
|
||||
For instance, if you're using `LT(2, KC_SPACE)`, if you hold the key, don't hit anything else and then release it, normally, nothing happens. But with `RETRO_TAPPING` defined in your `config.h`, it will send `KC_SPACE`.
|
||||
|
@ -3,6 +3,7 @@
|
||||
Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any AVR keyboard that allows access to certain PWM-capable pins, you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes.
|
||||
|
||||
Up to two simultaneous audio voices are supported, one driven by timer 1 and another driven by timer 3. The following pins can be defined as audio outputs in config.h:
|
||||
|
||||
Timer 1:
|
||||
`#define B5_AUDIO`
|
||||
`#define B6_AUDIO`
|
||||
@ -58,6 +59,13 @@ PLAY_LOOP(my_song);
|
||||
|
||||
It's advised that you wrap all audio features in `#ifdef AUDIO_ENABLE` / `#endif` to avoid causing problems when audio isn't built into the keyboard.
|
||||
|
||||
The available keycodes for audio are:
|
||||
|
||||
* `AU_ON` - Turn audio mode on
|
||||
* `AU_OFF` - Turn audio mode off
|
||||
* `AU_TOG` - Toggle audio mode
|
||||
|
||||
|
||||
## Music Mode
|
||||
|
||||
The music mode maps your columns to a chromatic scale, and your rows to octaves. This works best with ortholinear keyboards, but can be made to work with others. All keycodes less than `0xFF` get blocked, so you won't type while playing notes - if you have special keys/mods, those will still work. A work-around for this is to jump to a different layer with KC_NOs before (or after) enabling music mode.
|
||||
@ -145,6 +153,23 @@ You can configure the default, min and max frequencies, the stepping and built i
|
||||
|
||||
This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile.
|
||||
|
||||
|
||||
## Audio Keycodes
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------------|---------|----------------------------------|
|
||||
|`AU_ON` | |Audio mode on |
|
||||
|`AU_OFF` | |Audio mode off |
|
||||
|`AU_TOG` | |Toggles Audio mode |
|
||||
|`CLICKY_TOGGLE` |`CK_TOGG`|Toggles Audio clicky mode |
|
||||
|`CLICKY_UP` |`CK_UP` |Increases frequency of the clicks |
|
||||
|`CLICKY_DOWN` |`CK_DOWN`|Decreases frequency of the clicks |
|
||||
|`CLICKY_RESET` |`CK_RST` |Resets frequency to default |
|
||||
|`MU_ON` | |Turns on Music Mode |
|
||||
|`MU_OFF` | |Turns off Music Mode |
|
||||
|`MU_TOG` | |Toggles Music Mode |
|
||||
|`MU_MOD` | |Cycles through the music modes |
|
||||
|
||||
<!-- FIXME: this formatting needs work
|
||||
|
||||
## Audio
|
||||
|
56
docs/feature_hd44780.md
Normal file
56
docs/feature_hd44780.md
Normal file
@ -0,0 +1,56 @@
|
||||
# HD44780 LCD Displays
|
||||
|
||||
This is an integration of Peter Fleury's LCD library. This page will explain the basics. [For in depth documentation visit his page.](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html)
|
||||
|
||||
You can enable support for HD44780 Displays by setting the `HD44780_ENABLE` flag in your keyboards `rules.mk` to yes. This will use about 400 KB of extra space.
|
||||
|
||||
## Configuration
|
||||
|
||||
You will need to configure the pins used by your display and its number of lines and collumn in your keyboards `config.h`.
|
||||
|
||||
Uncomment the section labled HD44780 and change the parameters as needed.
|
||||
````
|
||||
/*
|
||||
* HD44780 LCD Display Configuration
|
||||
*/
|
||||
|
||||
#define LCD_LINES 2 //< number of visible lines of the display
|
||||
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||
#if LCD_IO_MODE
|
||||
#define LCD_PORT PORTB //< port for the LCD lines
|
||||
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||
#define LCD_RS_PIN 3 //< pin for RS line
|
||||
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||
#define LCD_RW_PIN 2 //< pin for RW line
|
||||
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||
#define LCD_E_PIN 1 //< pin for Enable line
|
||||
#endif
|
||||
````
|
||||
|
||||
Should you need to configure other properties you can copy them from `quantum/hd44780.h` and set them in your `config.h`
|
||||
|
||||
## Usage
|
||||
|
||||
To initialize your display call lcd_init() with one of these parameters:
|
||||
````
|
||||
LCD_DISP_OFF : display off
|
||||
LCD_DISP_ON : display on, cursor off
|
||||
LCD_DISP_ON_CURSOR : display on, cursor on
|
||||
LCD_DISP_ON_CURSOR_BLINK : display on, cursor on flashing
|
||||
````
|
||||
This is best done in your keyboards `matrix_init_kb` or your keymaps `matrix_init_user`.
|
||||
It is advised to clear the display before use.
|
||||
To do so call `lcd_clrsrc()`.
|
||||
|
||||
To now print something to your Display you first call `lcd_gotoxy(column, line)`. To go to the start of the first line you would call `lcd_gotoxy(0, 0)` and then print a string with `lcd_puts("example string")`.
|
||||
|
||||
There are more posible methods to control the display. [For in depth documentation please visit the linked page.](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html)
|
@ -31,6 +31,20 @@ The reason for this, is that `<name>.h` won't be added in time to add settings (
|
||||
|
||||
So you should use the `config.h` for QMK settings, and the `<name>.h` file for user or keymap specific settings.
|
||||
|
||||
`/users/<name>/rules.mk` will be included in the build _after_ the `rules.mk` from your keymap. This allows you to have features in your userspace `rules.mk` that depend on individual QMK features that may or may not be available on a specific keyboard. For example, if you have RGB control features shared between all your keyboards that support RGB lighting, you can `define RGB_ENABLE` in your keymap `rules.mk` and then check for the variable in your userspace `rules.mk` like this:
|
||||
```make
|
||||
ifdef RGB_ENABLE
|
||||
# Include my fancy rgb functions source here
|
||||
endif
|
||||
```
|
||||
Because of this, any time you turn on QMK features in your `users/<name>/rules.mk`, you should conditionally enable them only if the flag isn't already defined, like this:
|
||||
```make
|
||||
ifndef TAP_DANCE_ENABLE
|
||||
TAP_DANCE_ENABLE = yes
|
||||
endif
|
||||
```
|
||||
This will ensure that you can explicitly turn off features for an individual keymap.
|
||||
|
||||
## Readme
|
||||
|
||||
Please include authorship (your name, github username, email), and optionally [a license that's GPL compatible](https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses).
|
||||
@ -122,4 +136,4 @@ By default the userspace used will be the same as the keymap name. In some situa
|
||||
|
||||
```
|
||||
USER_NAME := mylayout
|
||||
```
|
||||
```
|
||||
|
@ -9,6 +9,7 @@ QMK has a staggering number of features for building your keyboard. It can take
|
||||
* [Backlight](feature_backlight.md) - LED lighting support for your keyboard.
|
||||
* [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys.
|
||||
* [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself.
|
||||
* [HD44780 LCD Display](feature_hd44780.md) - Support for LCD character displays using the HD44780 standard.
|
||||
* [Key Lock](feature_key_lock.md) - Lock a key in the "down" state.
|
||||
* [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout.
|
||||
* [Leader Key](feature_leader_key.md) - Tap the leader key followed by a sequence to trigger custom behavior.
|
||||
|
@ -19,8 +19,7 @@ And be sure to select "HTTPS", and select the link and copy it:
|
||||
From here, enter `git clone ` into the command line, and then paste your link:
|
||||
|
||||
```
|
||||
**[terminal]
|
||||
**[prompt you@computer]**[path ~]**[delimiter $ ]**[command git clone https://github.com/whoeveryouare/qmk_firmware.git]
|
||||
user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git
|
||||
Cloning into 'qmk_firmware'...
|
||||
remote: Counting objects: 46625, done.
|
||||
remote: Compressing objects: 100% (2/2), done.
|
||||
@ -33,13 +32,12 @@ Checking out files: 100% (2799/2799), done.
|
||||
You now have your QMK fork on your local machine, and you can add your keymap, compile it and flash it to your board. Once you're happy with your changes, you can add, commit, and push them to your fork like this:
|
||||
|
||||
```
|
||||
**[terminal]
|
||||
**[prompt you@computer]**[path ~/qmk_firmware]**[delimiter $ ]**[command git add .]
|
||||
**[prompt you@computer]**[path ~/qmk_firmware]**[delimiter $ ]**[command git commit -m "adding my keymap"]
|
||||
user@computer:~$ git add .
|
||||
user@computer:~$ git commit -m "adding my keymap"
|
||||
[master cccb1608] adding my keymap
|
||||
1 file changed, 1 insertion(+)
|
||||
create mode 100644 keyboards/planck/keymaps/mine/keymap.c
|
||||
**[prompt you@computer]**[path ~/qmk_firmware]**[delimiter $ ]**[command git push]
|
||||
user@computer:~$ git push
|
||||
Counting objects: 1, done.
|
||||
Delta compression using up to 4 threads.
|
||||
Compressing objects: 100% (1/1), done.
|
||||
|
@ -6,12 +6,16 @@ This page attempts to explain the basic information you need to know to work wit
|
||||
|
||||
QMK is a fork of [Jun Wako](https://github.com/tmk)'s [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
|
||||
|
||||
### Userspace Structure
|
||||
|
||||
Within the folder `users` is a directory for each user. This is a place for users to put code that they might use between keyboards. See the docs for [Userspace feature](feature_userspace.md) for more information.
|
||||
|
||||
### Keyboard Project Structure
|
||||
|
||||
Within the folder `keyboards` and its subfolder `handwired` is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within it you'll find the following structure:
|
||||
|
||||
* `keymaps/`: Different keymaps that can be built
|
||||
* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`
|
||||
* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `rules.mk`.
|
||||
* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`.
|
||||
|
||||
### Keymap Structure
|
||||
@ -25,23 +29,26 @@ In every keymap folder, the following files may be found. Only `keymap.c` is req
|
||||
|
||||
# The `config.h` File
|
||||
|
||||
There are 2 `config.h` locations:
|
||||
There are 3 possible `config.h` locations:
|
||||
|
||||
* keyboard (`/keyboards/<keyboard>/config.h`)
|
||||
* userspace (`/users/<user>/config.h`)
|
||||
* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/config.h`)
|
||||
|
||||
If the keymap `config.h` exists, that file is included by the build system and the keyboard `config.h` is not included. If you wish to override settings in your keymap's `config.h` you will need to include some glue code:
|
||||
The build system automatically picks up the config files in the above order. If you wish to override any setting set by a previous `config.h` you will need to first include some boilerplate code for the settings you wish to change.
|
||||
|
||||
```
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "config_common.h"
|
||||
#pragma once
|
||||
```
|
||||
|
||||
If you want to override a setting from the parent `config.h` file, you need to `#undef` and then `#define` the setting again, like this:
|
||||
Then to override a setting from the previous `config.h` file you must `#undef` and then `#define` the setting again.
|
||||
|
||||
```c
|
||||
The boilerplate code and setting look like this together:
|
||||
|
||||
```
|
||||
#pragma once
|
||||
|
||||
// overrides go here!
|
||||
#undef MY_SETTING
|
||||
#define MY_SETTING 4
|
||||
```
|
||||
|
@ -133,6 +133,10 @@ This consumes about 5390 bytes.
|
||||
|
||||
This enables [key lock](feature_key_lock.md). This consumes an additional 260 bytes.
|
||||
|
||||
`SPLIT_KEYBOARD`
|
||||
|
||||
This enables split keyboard support (dual MCU like the let's split and bakingpy's boards) and includes all necessary files located at quantum/split_common
|
||||
|
||||
## Customizing Makefile Options on a Per-Keymap Basis
|
||||
|
||||
If your keymap directory has a file called `rules.mk` any options you set in that file will take precedence over other `rules.mk` options for your particular keyboard.
|
||||
|
205
docs/keycodes.md
205
docs/keycodes.md
@ -191,27 +191,6 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|`KC_NO` | |Ignore this key (NOOP) |
|
||||
|`KC_TRANSPARENT` |`KC_TRNS` |Use the next lowest non-transparent key |
|
||||
|
||||
## [Mouse Keys](feature_mouse_keys.md)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------------|---------|---------------------------|
|
||||
|`KC_MS_UP` |`KC_MS_U`|Mouse Cursor Up |
|
||||
|`KC_MS_DOWN` |`KC_MS_D`|Mouse Cursor Down |
|
||||
|`KC_MS_LEFT` |`KC_MS_L`|Mouse Cursor Left |
|
||||
|`KC_MS_RIGHT` |`KC_MS_R`|Mouse Cursor Right |
|
||||
|`KC_MS_BTN1` |`KC_BTN1`|Mouse Button 1 |
|
||||
|`KC_MS_BTN2` |`KC_BTN2`|Mouse Button 2 |
|
||||
|`KC_MS_BTN3` |`KC_BTN3`|Mouse Button 3 |
|
||||
|`KC_MS_BTN4` |`KC_BTN4`|Mouse Button 4 |
|
||||
|`KC_MS_BTN5` |`KC_BTN5`|Mouse Button 5 |
|
||||
|`KC_MS_WH_UP` |`KC_WH_U`|Mouse Wheel Up |
|
||||
|`KC_MS_WH_DOWN` |`KC_WH_D`|Mouse Wheel Down |
|
||||
|`KC_MS_WH_LEFT` |`KC_WH_L`|Mouse Wheel Left |
|
||||
|`KC_MS_WH_RIGHT`|`KC_WH_R`|Mouse Wheel Right |
|
||||
|`KC_MS_ACCEL0` |`KC_ACL0`|Set mouse acceleration to 0|
|
||||
|`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1|
|
||||
|`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2|
|
||||
|
||||
## [Quantum Keycodes](quantum_keycodes.md#qmk-keycodes)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
@ -227,6 +206,36 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|`M(n)` | |Call macro `n` |
|
||||
|`MACROTAP(n)`| |Macro-tap `n` idk FIXME |
|
||||
|
||||
## [Audio Keys](feature_audio.md)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------------|---------|----------------------------------|
|
||||
|`AU_ON` | |Audio mode on |
|
||||
|`AU_OFF` | |Audio mode off |
|
||||
|`AU_TOG` | |Toggles Audio mode |
|
||||
|`CLICKY_TOGGLE` |`CK_TOGG`|Toggles Audio clicky mode |
|
||||
|`CLICKY_UP` |`CK_UP` |Increases frequency of the clicks |
|
||||
|`CLICKY_DOWN` |`CK_DOWN`|Decreases frequency of the clicks |
|
||||
|`CLICKY_RESET` |`CK_RST` |Resets frequency to default |
|
||||
|`MU_ON` | |Turns on Music Mode |
|
||||
|`MU_OFF` | |Turns off Music Mode |
|
||||
|`MU_TOG` | |Toggles Music Mode |
|
||||
|`MU_MOD` | |Cycles through the music modes |
|
||||
|
||||
|
||||
|
||||
## [Backlighting](feature_backlight.md)
|
||||
|
||||
|Key |Description |
|
||||
|---------|------------------------------------------|
|
||||
|`BL_TOGG`|Turn the backlight on or off |
|
||||
|`BL_STEP`|Cycle through backlight levels |
|
||||
|`BL_ON` |Set the backlight to max brightness |
|
||||
|`BL_OFF` |Turn the backlight off |
|
||||
|`BL_INC` |Increase the backlight level |
|
||||
|`BL_DEC` |Decrease the backlight level |
|
||||
|`BL_BRTG`|Toggle backlight breathing |
|
||||
|
||||
## [Bootmagic](feature_bootmagic.md)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
@ -251,17 +260,88 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides |
|
||||
|`MAGIC_TOGGLE_NKRO` | |Turn NKRO on or off |
|
||||
|
||||
## [Backlighting](feature_backlight.md)
|
||||
## [Bluetooth](feature_bluetooth.md)
|
||||
|
||||
|Key |Description |
|
||||
|---------|------------------------------------------|
|
||||
|`BL_TOGG`|Turn the backlight on or off |
|
||||
|`BL_STEP`|Cycle through backlight levels |
|
||||
|`BL_ON` |Set the backlight to max brightness |
|
||||
|`BL_OFF` |Turn the backlight off |
|
||||
|`BL_INC` |Increase the backlight level |
|
||||
|`BL_DEC` |Decrease the backlight level |
|
||||
|`BL_BRTG`|Toggle backlight breathing |
|
||||
|Key |Description |
|
||||
|----------|----------------------------------------------|
|
||||
|`OUT_AUTO`|Automatically switch between USB and Bluetooth|
|
||||
|`OUT_USB` |USB only |
|
||||
|`OUT_BT` |Bluetooth only |
|
||||
|
||||
|
||||
## [Layer Switching](feature_advanced_keycodes.md# Switching and Toggling Layers)
|
||||
|
||||
|Key |Description |
|
||||
|-----------------|---------------------------------------------------------------------|
|
||||
|`DF(layer)` |Switches the default layer |
|
||||
|`MO(layer)` |Momentarily activates layer, switches off when you let go |
|
||||
|`LM(layer, mod)` |As `MO(layer)` but with `mod` active |
|
||||
|`LT(layer, kc)` |Momentarily activates layer if held, sends kc if tapped |
|
||||
|`TG(layer)` |Toggles the layer (enables it if no active, and vise versa) |
|
||||
|`TO(layer)` |Activates layer and deactivates all other layers |
|
||||
|`TT(layer)` |Momentarily activates layer if held, toggles it if tapped repeatedly |
|
||||
|
||||
## [Mouse Keys](feature_mouse_keys.md)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------------|---------|---------------------------|
|
||||
|`KC_MS_UP` |`KC_MS_U`|Mouse Cursor Up |
|
||||
|`KC_MS_DOWN` |`KC_MS_D`|Mouse Cursor Down |
|
||||
|`KC_MS_LEFT` |`KC_MS_L`|Mouse Cursor Left |
|
||||
|`KC_MS_RIGHT` |`KC_MS_R`|Mouse Cursor Right |
|
||||
|`KC_MS_BTN1` |`KC_BTN1`|Mouse Button 1 |
|
||||
|`KC_MS_BTN2` |`KC_BTN2`|Mouse Button 2 |
|
||||
|`KC_MS_BTN3` |`KC_BTN3`|Mouse Button 3 |
|
||||
|`KC_MS_BTN4` |`KC_BTN4`|Mouse Button 4 |
|
||||
|`KC_MS_BTN5` |`KC_BTN5`|Mouse Button 5 |
|
||||
|`KC_MS_WH_UP` |`KC_WH_U`|Mouse Wheel Up |
|
||||
|`KC_MS_WH_DOWN` |`KC_WH_D`|Mouse Wheel Down |
|
||||
|`KC_MS_WH_LEFT` |`KC_WH_L`|Mouse Wheel Left |
|
||||
|`KC_MS_WH_RIGHT`|`KC_WH_R`|Mouse Wheel Right |
|
||||
|`KC_MS_ACCEL0` |`KC_ACL0`|Set mouse acceleration to 0|
|
||||
|`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1|
|
||||
|`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2|
|
||||
|
||||
## [Modifiers](feature_advanced_keycodes.md#modifier-keys)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------|---------- |----------------------------------------------------|
|
||||
|`KC_HYPR` | |Hold Left Control, Shift, Alt and GUI |
|
||||
|`KC_MEH` | |Hold Left Control, Shift and Alt |
|
||||
|`LCTL(kc)`| |Hold Left Control and press `kc` |
|
||||
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
||||
|`LALT(kc)`| |Hold Left Alt and press `kc` |
|
||||
|`LGUI(kc)`|`LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||
|`RALT(kc)`| |Hold Right Alt and press `kc` |
|
||||
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)`|Hold Right GUI and press `kc` |
|
||||
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|
||||
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
||||
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|
||||
|`ALTG(kc)`| |Hold Right Control and Alt and press `kc` |
|
||||
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and GUI and press `kc` |
|
||||
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
||||
|
||||
## [Mod-Tap Keys](feature_advanced_keycodes.md#mod-tap)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|------------|---------------------------------------|-------------------------------------------------------|
|
||||
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
||||
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|
||||
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
||||
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
||||
|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped |
|
||||
|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
||||
|`LGUI_T(kc)`|`LCMD_T(kc)`, `RWIN_T(kc)`, `GUI_T(kc)`|Left GUI when held, `kc` when tapped |
|
||||
|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
||||
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|
||||
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped|
|
||||
|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
|
||||
|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped |
|
||||
|`ALL_T(kc)` | |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|
||||
|`SCMD_T(kc)`|`SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
||||
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
||||
|
||||
## [RGB Lighting](feature_rgblight.md)
|
||||
|
||||
@ -309,55 +389,6 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|`PRINT_ON` |Start printing everything the user types|
|
||||
|`PRINT_OFF`|Stop printing everything the user types |
|
||||
|
||||
## [Bluetooth](feature_bluetooth.md)
|
||||
|
||||
|Key |Description |
|
||||
|----------|----------------------------------------------|
|
||||
|`OUT_AUTO`|Automatically switch between USB and Bluetooth|
|
||||
|`OUT_USB` |USB only |
|
||||
|`OUT_BT` |Bluetooth only |
|
||||
|
||||
## [Modifiers](quantum_keycodes.md#modifiers)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------|---------- |----------------------------------------------------|
|
||||
|`KC_HYPR` | |Hold Left Control, Shift, Alt and GUI |
|
||||
|`KC_MEH` | |Hold Left Control, Shift and Alt |
|
||||
|`LCTL(kc)`| |Hold Left Control and press `kc` |
|
||||
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
||||
|`LALT(kc)`| |Hold Left Alt and press `kc` |
|
||||
|`LGUI(kc)`|`LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||
|`RALT(kc)`| |Hold Right Alt and press `kc` |
|
||||
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)`|Hold Right GUI and press `kc` |
|
||||
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|
||||
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
||||
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|
||||
|`ALTG(kc)`| |Hold Right Control and Alt and press `kc` |
|
||||
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and GUI and press `kc` |
|
||||
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
||||
|
||||
## [Mod-Tap Keys](quantum_keycodes.md#mod-tap-keys)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|------------|---------------------------------------|-------------------------------------------------------|
|
||||
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
||||
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|
||||
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
||||
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
||||
|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped |
|
||||
|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
||||
|`LGUI_T(kc)`|`LCMD_T(kc)`, `RWIN_T(kc)`, `GUI_T(kc)`|Left GUI when held, `kc` when tapped |
|
||||
|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
||||
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|
||||
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped|
|
||||
|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
|
||||
|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped |
|
||||
|`ALL_T(kc)` | |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|
||||
|`SCMD_T(kc)`|`SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
||||
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
||||
|
||||
## [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
@ -396,19 +427,13 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|`TT(layer)` |Normally acts like MO unless it's tapped multiple times, which toggles `layer` on |
|
||||
|`LM(layer, mod)`|Momentarily turn on `layer` (like MO) with `mod` active as well. |
|
||||
|
||||
## [One Shot Keys](quantum_keycodes.md#one-shot-keys)
|
||||
## [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
|
||||
|
||||
|Key |Description |
|
||||
|------------|----------------------------------|
|
||||
|`OSM(mod)` |Hold `mod` for one keypress |
|
||||
|`OSL(layer)`|Switch to `layer` for one keypress|
|
||||
|
||||
## [Unicode Support](feature_unicode.md)
|
||||
|
||||
|Key |Aliases| |
|
||||
|------------|-------|-------------------------------------------------|
|
||||
|`UNICODE(n)`|`UC(n)`|Send Unicode character `n` |
|
||||
|`X(n)` | |Send Unicode character `n` via a different method|
|
||||
|
||||
## [Swap Hands](feature_swap_hands.md)
|
||||
|
||||
@ -421,3 +446,9 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|`SH_MOFF` |Momentarily turns off swap. |
|
||||
|`SH_TG` |Toggles swap on and off with every key press. |
|
||||
|`SH_TT` |Toggles with a tap; momentary when held. |
|
||||
## [Unicode Support](feature_unicode.md)
|
||||
|
||||
|Key |Aliases| |
|
||||
|------------|-------|-------------------------------------------------|
|
||||
|`UNICODE(n)`|`UC(n)`|Send Unicode character `n` |
|
||||
|`X(n)` | |Send Unicode character `n` via a different method|
|
||||
|
592
drivers/avr/hd44780.c
Normal file
592
drivers/avr/hd44780.c
Normal file
File diff suppressed because it is too large
Load Diff
371
drivers/avr/hd44780.h
Normal file
371
drivers/avr/hd44780.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -15,15 +15,15 @@
|
||||
void i2c_init(void)
|
||||
{
|
||||
TWSR = 0; /* no prescaler */
|
||||
TWBR = (uint8_t)TWBR_val;
|
||||
TWBR = (uint8_t)TWBR_val;
|
||||
}
|
||||
|
||||
i2c_status_t i2c_start(uint8_t address, uint16_t timeout)
|
||||
{
|
||||
// reset TWI control register
|
||||
TWCR = 0;
|
||||
// transmit START condition
|
||||
TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
|
||||
// reset TWI control register
|
||||
TWCR = 0;
|
||||
// transmit START condition
|
||||
TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN);
|
||||
|
||||
uint16_t timeout_timer = timer_read();
|
||||
while( !(TWCR & (1<<TWINT)) ) {
|
||||
@ -32,13 +32,13 @@ i2c_status_t i2c_start(uint8_t address, uint16_t timeout)
|
||||
}
|
||||
}
|
||||
|
||||
// check if the start condition was successfully transmitted
|
||||
if(((TW_STATUS & 0xF8) != TW_START) && ((TW_STATUS & 0xF8) != TW_REP_START)){ return I2C_STATUS_ERROR; }
|
||||
// check if the start condition was successfully transmitted
|
||||
if(((TW_STATUS & 0xF8) != TW_START) && ((TW_STATUS & 0xF8) != TW_REP_START)){ return I2C_STATUS_ERROR; }
|
||||
|
||||
// load slave address into data register
|
||||
TWDR = address;
|
||||
// start transmission of address
|
||||
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||
// load slave address into data register
|
||||
TWDR = address;
|
||||
// start transmission of address
|
||||
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||
|
||||
timeout_timer = timer_read();
|
||||
while( !(TWCR & (1<<TWINT)) ) {
|
||||
@ -47,19 +47,19 @@ i2c_status_t i2c_start(uint8_t address, uint16_t timeout)
|
||||
}
|
||||
}
|
||||
|
||||
// check if the device has acknowledged the READ / WRITE mode
|
||||
uint8_t twst = TW_STATUS & 0xF8;
|
||||
if ( (twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK) ) return I2C_STATUS_ERROR;
|
||||
// check if the device has acknowledged the READ / WRITE mode
|
||||
uint8_t twst = TW_STATUS & 0xF8;
|
||||
if ( (twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK) ) return I2C_STATUS_ERROR;
|
||||
|
||||
return I2C_STATUS_SUCCESS;
|
||||
return I2C_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
i2c_status_t i2c_write(uint8_t data, uint16_t timeout)
|
||||
{
|
||||
// load data into data register
|
||||
TWDR = data;
|
||||
// start transmission of data
|
||||
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||
// load data into data register
|
||||
TWDR = data;
|
||||
// start transmission of data
|
||||
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||
|
||||
uint16_t timeout_timer = timer_read();
|
||||
while( !(TWCR & (1<<TWINT)) ) {
|
||||
@ -68,16 +68,16 @@ i2c_status_t i2c_write(uint8_t data, uint16_t timeout)
|
||||
}
|
||||
}
|
||||
|
||||
if( (TW_STATUS & 0xF8) != TW_MT_DATA_ACK ){ return I2C_STATUS_ERROR; }
|
||||
if( (TW_STATUS & 0xF8) != TW_MT_DATA_ACK ){ return I2C_STATUS_ERROR; }
|
||||
|
||||
return I2C_STATUS_SUCCESS;
|
||||
return I2C_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
int16_t i2c_read_ack(uint16_t timeout)
|
||||
{
|
||||
|
||||
// start TWI module and acknowledge data after reception
|
||||
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWEA);
|
||||
// start TWI module and acknowledge data after reception
|
||||
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWEA);
|
||||
|
||||
uint16_t timeout_timer = timer_read();
|
||||
while( !(TWCR & (1<<TWINT)) ) {
|
||||
@ -86,15 +86,15 @@ int16_t i2c_read_ack(uint16_t timeout)
|
||||
}
|
||||
}
|
||||
|
||||
// return received data from TWDR
|
||||
return TWDR;
|
||||
// return received data from TWDR
|
||||
return TWDR;
|
||||
}
|
||||
|
||||
int16_t i2c_read_nack(uint16_t timeout)
|
||||
{
|
||||
|
||||
// start receiving without acknowledging reception
|
||||
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||
// start receiving without acknowledging reception
|
||||
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||
|
||||
uint16_t timeout_timer = timer_read();
|
||||
while( !(TWCR & (1<<TWINT)) ) {
|
||||
@ -103,39 +103,39 @@ int16_t i2c_read_nack(uint16_t timeout)
|
||||
}
|
||||
}
|
||||
|
||||
// return received data from TWDR
|
||||
return TWDR;
|
||||
// return received data from TWDR
|
||||
return TWDR;
|
||||
}
|
||||
|
||||
i2c_status_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout)
|
||||
{
|
||||
i2c_status_t status = i2c_start(address | I2C_WRITE, timeout);
|
||||
if (status) return status;
|
||||
|
||||
for (uint16_t i = 0; i < length; i++) {
|
||||
status = i2c_write(data[i], timeout);
|
||||
if (status) return status;
|
||||
}
|
||||
|
||||
status = i2c_stop(timeout);
|
||||
if (status) return status;
|
||||
|
||||
return I2C_STATUS_SUCCESS;
|
||||
for (uint16_t i = 0; i < length; i++) {
|
||||
status = i2c_write(data[i], timeout);
|
||||
if (status) return status;
|
||||
}
|
||||
|
||||
status = i2c_stop(timeout);
|
||||
if (status) return status;
|
||||
|
||||
return I2C_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout)
|
||||
{
|
||||
i2c_status_t status = i2c_start(address | I2C_READ, timeout);
|
||||
if (status) return status;
|
||||
if (status) return status;
|
||||
|
||||
for (uint16_t i = 0; i < (length-1); i++) {
|
||||
for (uint16_t i = 0; i < (length-1); i++) {
|
||||
status = i2c_read_ack(timeout);
|
||||
if (status >= 0) {
|
||||
data[i] = status;
|
||||
} else {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
status = i2c_read_nack(timeout);
|
||||
if (status >= 0 ) {
|
||||
@ -147,47 +147,47 @@ i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16
|
||||
status = i2c_stop(timeout);
|
||||
if (status) return status;
|
||||
|
||||
return I2C_STATUS_SUCCESS;
|
||||
return I2C_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)
|
||||
{
|
||||
i2c_status_t status = i2c_start(devaddr | 0x00, timeout);
|
||||
if (status) return status;
|
||||
|
||||
status = i2c_write(regaddr, timeout);
|
||||
if (status) return status;
|
||||
|
||||
for (uint16_t i = 0; i < length; i++) {
|
||||
status = i2c_write(regaddr, timeout);
|
||||
if (status) return status;
|
||||
|
||||
for (uint16_t i = 0; i < length; i++) {
|
||||
status = i2c_write(data[i], timeout);
|
||||
if (status) return status;
|
||||
}
|
||||
if (status) return status;
|
||||
}
|
||||
|
||||
status = i2c_stop(timeout);
|
||||
status = i2c_stop(timeout);
|
||||
if (status) return status;
|
||||
|
||||
return I2C_STATUS_SUCCESS;
|
||||
return I2C_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)
|
||||
{
|
||||
i2c_status_t status = i2c_start(devaddr, timeout);
|
||||
if (status) return status;
|
||||
if (status) return status;
|
||||
|
||||
status = i2c_write(regaddr, timeout);
|
||||
if (status) return status;
|
||||
|
||||
status = i2c_start(devaddr | 0x01, timeout);
|
||||
if (status) return status;
|
||||
if (status) return status;
|
||||
|
||||
for (uint16_t i = 0; i < (length-1); i++) {
|
||||
status = i2c_read_ack(timeout);
|
||||
for (uint16_t i = 0; i < (length-1); i++) {
|
||||
status = i2c_read_ack(timeout);
|
||||
if (status >= 0) {
|
||||
data[i] = status;
|
||||
} else {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
status = i2c_read_nack(timeout);
|
||||
if (status >= 0 ) {
|
||||
@ -199,13 +199,13 @@ i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16
|
||||
status = i2c_stop(timeout);
|
||||
if (status) return status;
|
||||
|
||||
return I2C_STATUS_SUCCESS;
|
||||
return I2C_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
i2c_status_t i2c_stop(uint16_t timeout)
|
||||
{
|
||||
// transmit STOP condition
|
||||
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
|
||||
// transmit STOP condition
|
||||
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
|
||||
|
||||
uint16_t timeout_timer = timer_read();
|
||||
while(TWCR & (1<<TWSTO)) {
|
||||
@ -215,4 +215,4 @@ i2c_status_t i2c_stop(uint16_t timeout)
|
||||
}
|
||||
|
||||
return I2C_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
@ -28,4 +28,4 @@ i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint1
|
||||
i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
|
||||
i2c_status_t i2c_stop(uint16_t timeout);
|
||||
|
||||
#endif // I2C_MASTER_H
|
||||
#endif // I2C_MASTER_H
|
@ -5,96 +5,64 @@
|
||||
#include <avr/io.h>
|
||||
#include <util/twi.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "i2c_slave.h"
|
||||
|
||||
void i2c_init(uint8_t address){
|
||||
// load address into TWI address register
|
||||
TWAR = (address << 1);
|
||||
// set the TWCR to enable address matching and enable TWI, clear TWINT, enable TWI interrupt
|
||||
TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN);
|
||||
// load address into TWI address register
|
||||
TWAR = (address << 1);
|
||||
// set the TWCR to enable address matching and enable TWI, clear TWINT, enable TWI interrupt
|
||||
TWCR = (1 << TWIE) | (1 << TWEA) | (1 << TWINT) | (1 << TWEN);
|
||||
}
|
||||
|
||||
void i2c_stop(void){
|
||||
// clear acknowledge and enable bits
|
||||
TWCR &= ~( (1<<TWEA) | (1<<TWEN) );
|
||||
// clear acknowledge and enable bits
|
||||
TWCR &= ~((1 << TWEA) | (1 << TWEN));
|
||||
}
|
||||
|
||||
ISR(TWI_vect){
|
||||
|
||||
// temporary stores the received data
|
||||
uint8_t data;
|
||||
|
||||
// own address has been acknowledged
|
||||
if( (TWSR & 0xF8) == TW_SR_SLA_ACK ){
|
||||
buffer_address = 0xFF;
|
||||
// clear TWI interrupt flag, prepare to receive next byte and acknowledge
|
||||
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEA) | (1<<TWEN);
|
||||
}
|
||||
else if( (TWSR & 0xF8) == TW_SR_DATA_ACK ){ // data has been received in slave receiver mode
|
||||
|
||||
// save the received byte inside data
|
||||
data = TWDR;
|
||||
|
||||
// check wether an address has already been transmitted or not
|
||||
if(buffer_address == 0xFF){
|
||||
|
||||
buffer_address = data;
|
||||
|
||||
// clear TWI interrupt flag, prepare to receive next byte and acknowledge
|
||||
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEA) | (1<<TWEN);
|
||||
}
|
||||
else{ // if a databyte has already been received
|
||||
|
||||
// store the data at the current address
|
||||
rxbuffer[buffer_address] = data;
|
||||
|
||||
// increment the buffer address
|
||||
buffer_address++;
|
||||
|
||||
// if there is still enough space inside the buffer
|
||||
if(buffer_address < 0xFF){
|
||||
// clear TWI interrupt flag, prepare to receive next byte and acknowledge
|
||||
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEA) | (1<<TWEN);
|
||||
}
|
||||
else{
|
||||
// Don't acknowledge
|
||||
TWCR &= ~(1<<TWEA);
|
||||
// clear TWI interrupt flag, prepare to receive last byte.
|
||||
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEN);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( (TWSR & 0xF8) == TW_ST_DATA_ACK ){ // device has been addressed to be a transmitter
|
||||
|
||||
// copy data from TWDR to the temporary memory
|
||||
data = TWDR;
|
||||
|
||||
// if no buffer read address has been sent yet
|
||||
if( buffer_address == 0xFF ){
|
||||
buffer_address = data;
|
||||
}
|
||||
|
||||
// copy the specified buffer address into the TWDR register for transmission
|
||||
TWDR = txbuffer[buffer_address];
|
||||
// increment buffer read address
|
||||
buffer_address++;
|
||||
|
||||
// if there is another buffer address that can be sent
|
||||
if(buffer_address < 0xFF){
|
||||
// clear TWI interrupt flag, prepare to send next byte and receive acknowledge
|
||||
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEA) | (1<<TWEN);
|
||||
}
|
||||
else{
|
||||
// Don't acknowledge
|
||||
TWCR &= ~(1<<TWEA);
|
||||
// clear TWI interrupt flag, prepare to receive last byte.
|
||||
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEN);
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
// if none of the above apply prepare TWI to be addressed again
|
||||
TWCR |= (1<<TWIE) | (1<<TWEA) | (1<<TWEN);
|
||||
}
|
||||
}
|
||||
uint8_t ack = 1;
|
||||
// temporary stores the received data
|
||||
//uint8_t data;
|
||||
|
||||
switch(TW_STATUS){
|
||||
case TW_SR_SLA_ACK:
|
||||
// The device is now a slave receiver
|
||||
slave_has_register_set = false;
|
||||
break;
|
||||
|
||||
case TW_SR_DATA_ACK:
|
||||
// This device is a slave receiver and has received data
|
||||
// First byte is the location then the bytes will be writen in buffer with auto-incriment
|
||||
if(!slave_has_register_set){
|
||||
buffer_address = TWDR;
|
||||
|
||||
if (buffer_address >= RX_BUFFER_SIZE){ // address out of bounds dont ack
|
||||
ack = 0;
|
||||
buffer_address = 0;
|
||||
}
|
||||
slave_has_register_set = true; // address has been receaved now fill in buffer
|
||||
} else {
|
||||
rxbuffer[buffer_address] = TWDR;
|
||||
buffer_address++;
|
||||
}
|
||||
break;
|
||||
|
||||
case TW_ST_SLA_ACK:
|
||||
case TW_ST_DATA_ACK:
|
||||
// This device is a slave transmitter and master has requested data
|
||||
TWDR = txbuffer[buffer_address];
|
||||
buffer_address++;
|
||||
break;
|
||||
|
||||
case TW_BUS_ERROR:
|
||||
// We got an error, reset i2c
|
||||
TWCR = 0;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Reset i2c state mahcine to be ready for next interrupt
|
||||
TWCR |= (1 << TWIE) | (1 << TWINT) | (ack << TWEA) | (1 << TWEN);
|
||||
}
|
@ -8,12 +8,16 @@
|
||||
#ifndef I2C_SLAVE_H
|
||||
#define I2C_SLAVE_H
|
||||
|
||||
#define TX_BUFFER_SIZE 30
|
||||
#define RX_BUFFER_SIZE 30
|
||||
|
||||
volatile uint8_t buffer_address;
|
||||
volatile uint8_t txbuffer[0xFF];
|
||||
volatile uint8_t rxbuffer[0xFF];
|
||||
static volatile bool slave_has_register_set = false;
|
||||
volatile uint8_t txbuffer[TX_BUFFER_SIZE];
|
||||
volatile uint8_t rxbuffer[RX_BUFFER_SIZE];
|
||||
|
||||
void i2c_init(uint8_t address);
|
||||
void i2c_stop(void);
|
||||
ISR(TWI_vect);
|
||||
|
||||
#endif // I2C_SLAVE_H
|
||||
#endif // I2C_SLAVE_H
|
@ -5,7 +5,8 @@
|
||||
|
||||
|
||||
#define _BASE 0
|
||||
#define _RAISE 1
|
||||
#define _QWERTY 1
|
||||
#define _RAISE 2
|
||||
#define _NAVIGATION 3
|
||||
|
||||
|
||||
@ -13,8 +14,12 @@
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
//Switch Layouts
|
||||
#define SWBASE M(_BASE)
|
||||
#define SWQWERTY M(_QWERTY)
|
||||
|
||||
// layer access
|
||||
#define RSESPC LT( 1, KC_SPC)
|
||||
#define RSESPC LT( 2, KC_SPC)
|
||||
#define NAVSPC LT( 3, KC_SPC)
|
||||
|
||||
// Key Combos
|
||||
@ -24,41 +29,59 @@
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[_BASE] = LAYOUT( \
|
||||
KC_KP_SLASH, KC_KP_ASTERISK, KC_PMNS, KC_PPLS, KC_PSCREEN, KC_CAPS, 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_P7, KC_P8, KC_P9, KC_LBRC, KC_RBRC, KC_GRV, 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_P4, KC_P5, KC_P6, KC_HOME, KC_END, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, KC_BSLS, \
|
||||
KC_P1, KC_P2, KC_P3, KC_SLCK, KC_PGUP, KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, \
|
||||
KC_P0, KC_PDOT, KC_PENT, KC_UP, KC_PGDN, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), KC_PGUP, \
|
||||
CTLALTDEL, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, CTRLSFT, KC_LGUI, KC_LALT, RSESPC, NAVSPC, NAVSPC, RSESPC, KC_RGUI, KC_RALT, KC_APPLICATION, KC_RCTL, KC_PGDN \
|
||||
CTLALTSFT, 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_PSCREEN, KC_PAUSE, KC_CAPS, KC_INSERT, KC_EQL, \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_LBRC, KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, \
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_END, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_PGUP, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
|
||||
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_DEL, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PGDN, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, SFT_T(KC_ENT), KC_P1, KC_P2, KC_P3, KC_UP, KC_BSLASH, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \
|
||||
KC_LCTL, CTRLSFT, KC_LGUI, KC_LALT, RSESPC, NAVSPC, KC_LCTL, KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT, NAVSPC, RSESPC, KC_RALT, KC_RGUI, KC_APPLICATION, KC_RCTL \
|
||||
),
|
||||
[_QWERTY] = LAYOUT( \
|
||||
CTLALTSFT, 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_PSCREEN, KC_PAUSE, KC_CAPS, KC_INSERT, KC_EQL, \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_LBRC, KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_END, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_DEL, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PGDN, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, SFT_T(KC_ENT), KC_P1, KC_P2, KC_P3, KC_UP, KC_BSLASH, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \
|
||||
KC_LCTL, CTRLSFT, KC_LGUI, KC_LALT, RSESPC, NAVSPC, KC_LCTL, KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT, NAVSPC, RSESPC, KC_RALT, KC_RGUI, KC_APPLICATION, KC_RCTL \
|
||||
),
|
||||
[_RAISE] = LAYOUT( \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAUSE, KC_NUMLOCK, 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, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, XXXXXXX, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, XXXXXXX, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX \
|
||||
CTLALTDEL, SWBASE, SWQWERTY, 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, XXXXXXX, _______, _______, \
|
||||
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, LCTL(KC_PGUP), KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
|
||||
KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, LCTL(KC_PGDN), KC_6, KC_7, KC_8, KC_9, KC_0, _______, \
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, LSFT(KC_BSLASH), XXXXXXX, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
[_NAVIGATION] = LAYOUT( \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAUSE, KC_NUMLOCK, 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, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, XXXXXXX, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_DEL, _______, XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, XXXXXXX, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX \
|
||||
CTLALTDEL, SWBASE, SWQWERTY, 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, XXXXXXX, XXXXXXX, _______, \
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, LCTL(KC_PGUP), XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, \
|
||||
KC_DEL, _______, XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, LCTL(KC_PGDN), XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, \
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, LSFT(KC_BSLASH), XXXXXXX, XXXXXXX, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
)
|
||||
// ),
|
||||
/// [_NAVIGATION] = {
|
||||
// {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, LCTL(KC_BSPC) },
|
||||
// {KC_DEL, LCTL(KC_A), XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL},
|
||||
// {LCTL(KC_LSFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, KC_RSFT, KC_RSFT, KC_ENT},
|
||||
// {LCTL(LALT(KC_LSFT)),LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, LCTL(KC_LEFT), LCTL(KC_DOWN), LCTL(KC_UP), LCTL(KC_RGHT)}
|
||||
// }
|
||||
|
||||
|
||||
};
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {
|
||||
case _BASE:
|
||||
if (record->event.pressed) {
|
||||
persistent_default_layer_set(1UL<<_BASE);
|
||||
}
|
||||
break;
|
||||
case _QWERTY:
|
||||
if (record->event.pressed) {
|
||||
persistent_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
@ -48,7 +48,7 @@
|
||||
* @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
|
||||
#define CH_CFG_ST_FREQUENCY 100000
|
||||
|
||||
/**
|
||||
* @brief Time delta constant for the tick-less mode.
|
||||
|
@ -1,3 +0,0 @@
|
||||
#include "../config.h"
|
||||
|
||||
#define TAPPING_TERM 600 // ms
|
43
keyboards/dc01/arrow/arrow.c
Normal file
43
keyboards/dc01/arrow/arrow.c
Normal file
@ -0,0 +1,43 @@
|
||||
/* Copyright 2018 Yiancar
|
||||
*
|
||||
* 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 "arrow.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
41
keyboards/dc01/arrow/arrow.h
Normal file
41
keyboards/dc01/arrow/arrow.h
Normal file
@ -0,0 +1,41 @@
|
||||
/* Copyright 2018 Yiancar
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
#ifndef ARROW_H
|
||||
#define ARROW_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define XXX KC_NO
|
||||
|
||||
// This a shortcut to help you visually see your layout.
|
||||
// The first section contains all of the arguments
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
#define LAYOUT_all( \
|
||||
K00, K01, K02, \
|
||||
K10, K11, K12, \
|
||||
\
|
||||
K31, \
|
||||
K40, K41, K42 \
|
||||
) \
|
||||
{ \
|
||||
{ K00, K01, K02 }, \
|
||||
{ K10, K11, K12 }, \
|
||||
{ XXX, XXX, XXX }, \
|
||||
{ XXX, K31, XXX }, \
|
||||
{ K40, K41, K42 } \
|
||||
}
|
||||
|
||||
#endif
|
151
keyboards/dc01/arrow/config.h
Normal file
151
keyboards/dc01/arrow/config.h
Normal file
@ -0,0 +1,151 @@
|
||||
/*
|
||||
Copyright 2018 Yiancar
|
||||
|
||||
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 0x1012
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Mechboards
|
||||
#define PRODUCT DC01 Arrow
|
||||
#define DESCRIPTION Arrow cluster of DC01 keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 3
|
||||
|
||||
/*
|
||||
* 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 { B0, C7, C6, B6, B4 }
|
||||
#define MATRIX_COL_PINS { F0, B7, D2 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
// #define BACKLIGHT_PIN B7
|
||||
// #define BACKLIGHT_BREATHING
|
||||
// #define BACKLIGHT_LEVELS 3
|
||||
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
/* 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
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
//#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
12
keyboards/dc01/arrow/info.json
Normal file
12
keyboards/dc01/arrow/info.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"keyboard_name": "DC01 Arrow Cluster",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 3,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_all": {
|
||||
"layout": [{"label":"Insert", "x":0, "y":0}, {"label":"Home", "x":1, "y":0}, {"label":"PgUp", "x":2, "y":0}, {"label":"Delete", "x":0, "y":1}, {"label":"End", "x":1, "y":1}, {"label":"PgDn", "x":2, "y":1}, {"label":"\u2191", "x":1, "y":3}, {"label":"\u2190", "x":0, "y":4}, {"label":"\u2193", "x":1, "y":4}, {"label":"\u2192", "x":2, "y":4}]
|
||||
}
|
||||
}
|
||||
}
|
42
keyboards/dc01/arrow/keymaps/default/keymap.c
Normal file
42
keyboards/dc01/arrow/keymaps/default/keymap.c
Normal file
@ -0,0 +1,42 @@
|
||||
/* Copyright 2018 REPLACE_WITH_YOUR_NAME
|
||||
*
|
||||
* 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
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_all( /* Base */
|
||||
KC_INS, KC_HOME, KC_PGUP, \
|
||||
KC_DEL, KC_END, KC_PGDN, \
|
||||
\
|
||||
KC_UP, \
|
||||
KC_LEFT, KC_DOWN, KC_RIGHT \
|
||||
),
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
}
|
3
keyboards/dc01/arrow/keymaps/default/readme.md
Normal file
3
keyboards/dc01/arrow/keymaps/default/readme.md
Normal file
@ -0,0 +1,3 @@
|
||||
# The default ANSI keymap for DC01 Arrow cluster
|
||||
|
||||
When using the arrow module individually, this keymap will take effect. When using the keyboard as a whole please edit the keymap of the left module.
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user