diff options
author | Jack Humbert <jack.humb@gmail.com> | 2016-06-29 16:21:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-29 16:21:41 -0400 |
commit | 215c2119af5281072d5a6efb0308408793cadd08 (patch) | |
tree | 995bb9788a4f40b835d7713af3eb3015e9f43689 | |
parent | 755b17f8fc0f484261108f912af38430b27e9c95 (diff) | |
download | qmk_firmware-215c2119af5281072d5a6efb0308408793cadd08.tar.gz qmk_firmware-215c2119af5281072d5a6efb0308408793cadd08.zip |
Implements subprojects and updates projects for this (#459)
* non-working commit
* working
* subprojects implemented for planck
* pass a subproject variable through to c
* consolidates clueboard revisions
* thanks for letting me know about conflicts..
* turn off audio for yang's
* corrects starting paths for subprojects
* messing around with travis
* semicolon
* travis script
* travis script
* script for travis
* correct directory (probably), amend files to commit
* remove origin before adding
* git pull, correct syntax
* git checkout
* git pull origin branch
* where are we?
* where are we?
* merging
* force things to happen
* adds commit message, adds add
* rebase, no commit message
* rebase branch
* idk!
* try just pull
* fetch - merge
* specify repo branch
* checkout
* goddammit
* merge? idk
* pls
* after all
* don't split up keyboards
* syntax
* adds quick for all-keyboards
* trying out new script
* script update
* lowercase
* all keyboards
* stop replacing compiled.hex automatically
* adds if statement
* skip automated build branches
* forces push to automated build branch
* throw an add in there
* upstream?
* adds AUTOGEN
* ignore all .hex files again
* testing out new repo
* global ident
* generate script, keyboard_keymap.hex
* skip generation for now, print pandoc info, submodule update
* try trusty
* and sudo
* try generate
* updates subprojects to keyboards
* no idea
* updates to keyboards
* cleans up clueboard stuff
* setup to use local readme
* updates cluepad, planck experimental
* remove extra led.c [ci skip]
* disable power up for now
* config files updates
* makefile updates
* .h file updates, config tuning
* disable audio for yang
44 files changed, 480 insertions, 475 deletions
diff --git a/.travis.yml b/.travis.yml index 151f8618d..f5ae78c89 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -1,39 +1,21 @@ | |||
1 | os: | 1 | os: linux |
2 | - linux | 2 | dist: trusty |
3 | 3 | sudo: required | |
4 | language: | 4 | language: c |
5 | - c | 5 | compiler: avr-gcc |
6 | 6 | branches: | |
7 | compiler: | 7 | except: |
8 | - avr-gcc | 8 | - /^.*-automated-build$/ |
9 | |||
10 | env: | 9 | env: |
11 | - KEYBOARD=alps64 | 10 | global: |
12 | - KEYBOARD=arrow_pad | 11 | - secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM= |
13 | - KEYBOARD=atomic | ||
14 | - KEYBOARD=atreus | ||
15 | - KEYBOARD=bantam44 | ||
16 | - KEYBOARD=clueboard1 | ||
17 | - KEYBOARD=clueboard2 | ||
18 | - KEYBOARD=cluepad | ||
19 | - KEYBOARD=ergodox_ez | ||
20 | - KEYBOARD=gh60 | ||
21 | - KEYBOARD=hhkb | ||
22 | - KEYBOARD=jd45 | ||
23 | - KEYBOARD=kc60 | ||
24 | - KEYBOARD=phantom | ||
25 | - KEYBOARD=planck | ||
26 | - KEYBOARD=preonic | ||
27 | - KEYBOARD=retro_refit | ||
28 | - KEYBOARD=satan | ||
29 | - KEYBOARD=sixkeyboard | ||
30 | |||
31 | script: | 12 | script: |
32 | - cd keyboards/$KEYBOARD && make all-keymaps | 13 | - make all-keyboards quick AUTOGEN=true |
33 | |||
34 | addons: | 14 | addons: |
35 | apt: | 15 | apt: |
36 | packages: | 16 | packages: |
37 | - avr-libc | 17 | - avr-libc |
38 | - gcc-avr | 18 | - gcc-avr |
39 | - dfu-programmer | 19 | - dfu-programmer |
20 | - pandoc | ||
21 | after_success: bash util/travis_compiled_push.sh \ No newline at end of file | ||
@@ -10,19 +10,32 @@ abs_tmk_root := $(patsubst %/,%,$(dir $(mkfile_path))) | |||
10 | ifneq (,$(findstring /keyboards/,$(starting_makefile))) | 10 | ifneq (,$(findstring /keyboards/,$(starting_makefile))) |
11 | possible_keyboard:=$(patsubst %/,%,$(dir $(patsubst $(abs_tmk_root)/keyboards/%,%,$(starting_makefile)))) | 11 | possible_keyboard:=$(patsubst %/,%,$(dir $(patsubst $(abs_tmk_root)/keyboards/%,%,$(starting_makefile)))) |
12 | ifneq (,$(findstring /keymaps/,$(possible_keyboard))) | 12 | ifneq (,$(findstring /keymaps/,$(possible_keyboard))) |
13 | KEYBOARD_DIR:=$(firstword $(subst /keymaps/, ,$(possible_keyboard))) | ||
14 | KEYMAP_DIR:=$(lastword $(subst /keymaps/, ,$(possible_keyboard))) | 13 | KEYMAP_DIR:=$(lastword $(subst /keymaps/, ,$(possible_keyboard))) |
15 | tmk_root = ../../../.. | 14 | KEYBOARD_DIR:=$(firstword $(subst /keymaps/, ,$(possible_keyboard))) |
15 | ifneq (,$(findstring /,$(KEYBOARD_DIR))) | ||
16 | # SUBPROJECT_DIR:=$(lastword $(subst /, ,$(KEYBOARD_DIR))) | ||
17 | # KEYBOARD_DIR:=$(firstword $(subst /, ,$(KEYBOARD_DIR))) | ||
18 | tmk_root = ../../.. | ||
19 | else | ||
20 | tmk_root = ../../../.. | ||
21 | endif | ||
16 | else | 22 | else |
17 | KEYBOARD_DIR:=$(possible_keyboard) | ||
18 | KEYMAP_DIR:=default | 23 | KEYMAP_DIR:=default |
19 | tmk_root = ../.. | 24 | KEYBOARD_DIR:=$(possible_keyboard) |
25 | ifneq (,$(findstring /,$(KEYBOARD_DIR))) | ||
26 | # SUBPROJECT_DIR:=$(lastword $(subst /, ,$(KEYBOARD_DIR))) | ||
27 | # KEYBOARD_DIR:=$(firstword $(subst /, ,$(KEYBOARD_DIR))) | ||
28 | tmk_root = ../../.. | ||
29 | else | ||
30 | tmk_root = ../.. | ||
31 | endif | ||
20 | endif | 32 | endif |
21 | else | 33 | else |
22 | tmk_root = . | 34 | tmk_root = . |
23 | endif | 35 | endif |
24 | # $(info $(KEYBOARD_DIR)) | 36 | # $(info $(KEYBOARD_DIR)) |
25 | # $(info $(KEYMAP_DIR)) | 37 | # $(info $(KEYMAP_DIR)) |
38 | # $(info $(SUBPROJECT_DIR)) | ||
26 | 39 | ||
27 | # Directory common source filess exist | 40 | # Directory common source filess exist |
28 | TOP_DIR = $(tmk_root) | 41 | TOP_DIR = $(tmk_root) |
@@ -32,6 +45,7 @@ TMK_PATH = $(TOP_DIR)/$(TMK_DIR) | |||
32 | QUANTUM_DIR = quantum | 45 | QUANTUM_DIR = quantum |
33 | QUANTUM_PATH = $(TOP_DIR)/$(QUANTUM_DIR) | 46 | QUANTUM_PATH = $(TOP_DIR)/$(QUANTUM_DIR) |
34 | 47 | ||
48 | |||
35 | ifdef keyboard | 49 | ifdef keyboard |
36 | KEYBOARD ?= $(keyboard) | 50 | KEYBOARD ?= $(keyboard) |
37 | endif | 51 | endif |
@@ -41,7 +55,16 @@ endif | |||
41 | ifndef KEYBOARD | 55 | ifndef KEYBOARD |
42 | KEYBOARD=planck | 56 | KEYBOARD=planck |
43 | endif | 57 | endif |
58 | |||
59 | # converts things to keyboards/subproject | ||
60 | ifneq (,$(findstring /,$(KEYBOARD))) | ||
61 | TEMP:=$(KEYBOARD) | ||
62 | KEYBOARD:=$(firstword $(subst /, ,$(TEMP))) | ||
63 | SUBPROJECT:=$(lastword $(subst /, ,$(TEMP))) | ||
64 | endif | ||
65 | |||
44 | KEYBOARD_PATH = $(TOP_DIR)/keyboards/$(KEYBOARD) | 66 | KEYBOARD_PATH = $(TOP_DIR)/keyboards/$(KEYBOARD) |
67 | |||
45 | ifneq ("$(wildcard $(KEYBOARD_PATH)/$(KEYBOARD).c)","") | 68 | ifneq ("$(wildcard $(KEYBOARD_PATH)/$(KEYBOARD).c)","") |
46 | KEYBOARD_FILE = keyboards/$(KEYBOARD)/$(KEYBOARD).c | 69 | KEYBOARD_FILE = keyboards/$(KEYBOARD)/$(KEYBOARD).c |
47 | ifndef ARCH | 70 | ifndef ARCH |
@@ -51,6 +74,28 @@ else | |||
51 | $(error "$(KEYBOARD_PATH)/$(KEYBOARD).c" does not exist) | 74 | $(error "$(KEYBOARD_PATH)/$(KEYBOARD).c" does not exist) |
52 | endif | 75 | endif |
53 | 76 | ||
77 | ifdef sub | ||
78 | SUBPROJECT=$(sub) | ||
79 | endif | ||
80 | ifdef subproject | ||
81 | SUBPROJECT=$(subproject) | ||
82 | endif | ||
83 | |||
84 | ifdef SUBPROJECT_DEFAULT | ||
85 | SUBPROJECT?=$(SUBPROJECT_DEFAULT) | ||
86 | endif | ||
87 | |||
88 | ifdef SUBPROJECT | ||
89 | SUBPROJECT_PATH = $(TOP_DIR)/keyboards/$(KEYBOARD)/$(SUBPROJECT) | ||
90 | ifneq ("$(wildcard $(SUBPROJECT_PATH)/$(SUBPROJECT).c)","") | ||
91 | OPT_DEFS += -DSUBPROJECT_$(SUBPROJECT) | ||
92 | SUBPROJECT_FILE = keyboards/$(KEYBOARD)/$(SUBPROJECT)/$(SUBPROJECT).c | ||
93 | -include $(SUBPROJECT_PATH)/Makefile | ||
94 | else | ||
95 | $(error "$(SUBPROJECT_PATH)/$(SUBPROJECT).c" does not exist) | ||
96 | endif | ||
97 | endif | ||
98 | |||
54 | ifdef keymap | 99 | ifdef keymap |
55 | KEYMAP ?= $(keymap) | 100 | KEYMAP ?= $(keymap) |
56 | endif | 101 | endif |
@@ -68,7 +113,13 @@ else | |||
68 | $(error "$(KEYMAP_PATH)/keymap.c" does not exist) | 113 | $(error "$(KEYMAP_PATH)/keymap.c" does not exist) |
69 | endif | 114 | endif |
70 | 115 | ||
71 | TARGET ?= $(KEYBOARD)_$(KEYMAP) | 116 | ifdef SUBPROJECT |
117 | TARGET ?= $(KEYBOARD)_$(SUBPROJECT)_$(KEYMAP) | ||
118 | else | ||
119 | TARGET ?= $(KEYBOARD)_$(KEYMAP) | ||
120 | endif | ||
121 | |||
122 | |||
72 | 123 | ||
73 | ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","") | 124 | ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","") |
74 | CONFIG_H = $(KEYMAP_PATH)/config.h | 125 | CONFIG_H = $(KEYMAP_PATH)/config.h |
@@ -83,6 +134,10 @@ SRC += $(KEYBOARD_FILE) \ | |||
83 | $(QUANTUM_DIR)/keymap.c \ | 134 | $(QUANTUM_DIR)/keymap.c \ |
84 | $(QUANTUM_DIR)/keycode_config.c | 135 | $(QUANTUM_DIR)/keycode_config.c |
85 | 136 | ||
137 | ifdef SUBPROJECT | ||
138 | SRC += $(SUBPROJECT_FILE) | ||
139 | endif | ||
140 | |||
86 | ifndef CUSTOM_MATRIX | 141 | ifndef CUSTOM_MATRIX |
87 | SRC += $(QUANTUM_DIR)/matrix.c | 142 | SRC += $(QUANTUM_DIR)/matrix.c |
88 | endif | 143 | endif |
@@ -104,6 +159,9 @@ endif | |||
104 | 159 | ||
105 | # Search Path | 160 | # Search Path |
106 | VPATH += $(KEYMAP_PATH) | 161 | VPATH += $(KEYMAP_PATH) |
162 | ifdef SUBPROJECT | ||
163 | VPATH += $(SUBPROJECT_PATH) | ||
164 | endif | ||
107 | VPATH += $(KEYBOARD_PATH) | 165 | VPATH += $(KEYBOARD_PATH) |
108 | VPATH += $(TOP_DIR) | 166 | VPATH += $(TOP_DIR) |
109 | VPATH += $(TMK_PATH) | 167 | VPATH += $(TMK_PATH) |
diff --git a/keyboards/clueboard1/Makefile b/keyboards/clueboard/Makefile index a2599d214..d6f4bfcae 100644 --- a/keyboards/clueboard1/Makefile +++ b/keyboards/clueboard/Makefile | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | SUBPROJECT_DEFAULT = rev2 | ||
2 | 3 | ||
3 | # MCU name | 4 | # MCU name |
4 | MCU = atmega32u4 | 5 | MCU = atmega32u4 |
diff --git a/keyboards/clueboard1/clueboard1.c b/keyboards/clueboard/clueboard.c index 5785f447f..13195bda6 100644 --- a/keyboards/clueboard1/clueboard1.c +++ b/keyboards/clueboard/clueboard.c | |||
@@ -1,4 +1,9 @@ | |||
1 | #include "clueboard1.h" | 1 | #include "clueboard.h" |
2 | |||
3 | void led_init_ports() { | ||
4 | // * Set our LED pins as output | ||
5 | DDRB |= (1<<4); | ||
6 | } | ||
2 | 7 | ||
3 | void led_set_kb(uint8_t usb_led) { | 8 | void led_set_kb(uint8_t usb_led) { |
4 | DDRF |= (1<<0); | 9 | DDRF |= (1<<0); |
diff --git a/keyboards/clueboard/clueboard.h b/keyboards/clueboard/clueboard.h new file mode 100644 index 000000000..4f2a3c1df --- /dev/null +++ b/keyboards/clueboard/clueboard.h | |||
@@ -0,0 +1,13 @@ | |||
1 | #ifndef CLUEBOARD_H | ||
2 | #define CLUEBOARD_H | ||
3 | |||
4 | #ifdef SUBPROJECT_rev1 | ||
5 | #include "rev1.h" | ||
6 | #endif | ||
7 | #ifdef SUBPROJECT_rev2 | ||
8 | #include "rev2.h" | ||
9 | #endif | ||
10 | |||
11 | #include "quantum.h" | ||
12 | |||
13 | #endif | ||
diff --git a/keyboards/clueboard1/config.h b/keyboards/clueboard/config.h index 16338ddb0..ceac80795 100644 --- a/keyboards/clueboard1/config.h +++ b/keyboards/clueboard/config.h | |||
@@ -22,29 +22,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
22 | 22 | ||
23 | /* USB Device descriptor parameter */ | 23 | /* USB Device descriptor parameter */ |
24 | #define VENDOR_ID 0xC1ED | 24 | #define VENDOR_ID 0xC1ED |
25 | #define PRODUCT_ID 0x2301 | ||
26 | #define DEVICE_VER 0x0003 | ||
27 | #define MANUFACTURER Clueboard | 25 | #define MANUFACTURER Clueboard |
28 | #define PRODUCT Clueboard | 26 | #define PRODUCT Clueboard |
29 | #define DESCRIPTION QMK keyboard firmware for Clueboard | 27 | #define DESCRIPTION QMK keyboard firmware for Clueboard |
30 | 28 | ||
31 | /* key matrix size */ | ||
32 | #define MATRIX_ROWS 5 | ||
33 | #define MATRIX_COLS 16 | ||
34 | |||
35 | // ROWS: Top to bottom, COLS: Left to right | ||
36 | /* Column pin configuration | ||
37 | * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ||
38 | * pin: B3 F1 F4 F5 F6 C7 C6 B6 B5 B4 D7 D6 D4 F7 B0 B1 | ||
39 | */ | ||
40 | #define MATRIX_COL_PINS { B3, F1, F4, F5, F6, C7, C6, B6, B5, B4, D7, D6, D4, F7, B0, B1 } | ||
41 | /* Row pin configuration | ||
42 | * row: 0 1 2 3 4 | ||
43 | * pin: D1 D0 D2 D5 D3 | ||
44 | */ | ||
45 | #define MATRIX_ROW_PINS { D1, D0, D2, D5, D3 } | ||
46 | #define UNUSED_PINS | ||
47 | |||
48 | /* COL2ROW or ROW2COL */ | 29 | /* COL2ROW or ROW2COL */ |
49 | #define DIODE_DIRECTION COL2ROW | 30 | #define DIODE_DIRECTION COL2ROW |
50 | 31 | ||
@@ -64,16 +45,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
64 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | 45 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ |
65 | ) | 46 | ) |
66 | 47 | ||
67 | /* Underlight configuration | ||
68 | */ | ||
69 | #define ws2812_PORTREG PORTB | ||
70 | #define ws2812_DDRREG DDRB | ||
71 | #define ws2812_pin 2 | ||
72 | #define RGBLED_NUM 14 // Number of LEDs | ||
73 | #define RGBLIGHT_HUE_STEP 10 | ||
74 | #define RGBLIGHT_SAT_STEP 17 | ||
75 | #define RGBLIGHT_VAL_STEP 17 | ||
76 | |||
77 | /* | 48 | /* |
78 | * Feature disable options | 49 | * Feature disable options |
79 | * These options are also useful to firmware size reduction. | 50 | * These options are also useful to firmware size reduction. |
@@ -92,4 +63,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
92 | //#define NO_ACTION_MACRO | 63 | //#define NO_ACTION_MACRO |
93 | //#define NO_ACTION_FUNCTION | 64 | //#define NO_ACTION_FUNCTION |
94 | 65 | ||
66 | |||
67 | #ifdef SUBPROJECT_rev1 | ||
68 | #include "rev1/config.h" | ||
69 | #endif | ||
70 | #ifdef SUBPROJECT_rev2 | ||
71 | #include "rev2/config.h" | ||
72 | #endif | ||
73 | |||
95 | #endif | 74 | #endif |
diff --git a/keyboards/clueboard2/keymaps/default/keymap.c b/keyboards/clueboard/keymaps/default/keymap.c index 1795e68cd..89f71e83a 100644 --- a/keyboards/clueboard2/keymaps/default/keymap.c +++ b/keyboards/clueboard/keymaps/default/keymap.c | |||
@@ -1,4 +1,4 @@ | |||
1 | #include "clueboard2.h" | 1 | #include "clueboard.h" |
2 | 2 | ||
3 | // Used for SHIFT_ESC | 3 | // Used for SHIFT_ESC |
4 | #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) | 4 | #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) |
@@ -138,6 +138,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { | |||
138 | if (record->event.pressed) { | 138 | if (record->event.pressed) { |
139 | rgblight_toggle(); | 139 | rgblight_toggle(); |
140 | } | 140 | } |
141 | |||
141 | break; | 142 | break; |
142 | case RGBLED_INCREASE_HUE: | 143 | case RGBLED_INCREASE_HUE: |
143 | if (record->event.pressed) { | 144 | if (record->event.pressed) { |
diff --git a/keyboards/clueboard/keymaps/max/Makefile b/keyboards/clueboard/keymaps/max/Makefile new file mode 100644 index 000000000..950dadf84 --- /dev/null +++ b/keyboards/clueboard/keymaps/max/Makefile | |||
@@ -0,0 +1,49 @@ | |||
1 | #---------------------------------------------------------------------------- | ||
2 | # On command line: | ||
3 | # | ||
4 | # make all = Make software. | ||
5 | # | ||
6 | # make clean = Clean out built project files. | ||
7 | # | ||
8 | # make coff = Convert ELF to AVR COFF. | ||
9 | # | ||
10 | # make extcoff = Convert ELF to AVR Extended COFF. | ||
11 | # | ||
12 | # make program = Download the hex file to the device. | ||
13 | # Please customize your programmer settings(PROGRAM_CMD) | ||
14 | # | ||
15 | # make teensy = Download the hex file to the device, using teensy_loader_cli. | ||
16 | # (must have teensy_loader_cli installed). | ||
17 | # | ||
18 | # make dfu = Download the hex file to the device, using dfu-programmer (must | ||
19 | # have dfu-programmer installed). | ||
20 | # | ||
21 | # make flip = Download the hex file to the device, using Atmel FLIP (must | ||
22 | # have Atmel FLIP installed). | ||
23 | # | ||
24 | # make dfu-ee = Download the eeprom file to the device, using dfu-programmer | ||
25 | # (must have dfu-programmer installed). | ||
26 | # | ||
27 | # make flip-ee = Download the eeprom file to the device, using Atmel FLIP | ||
28 | # (must have Atmel FLIP installed). | ||
29 | # | ||
30 | # make debug = Start either simulavr or avarice as specified for debugging, | ||
31 | # with avr-gdb or avr-insight as the front end for debugging. | ||
32 | # | ||
33 | # make filename.s = Just compile filename.c into the assembler code only. | ||
34 | # | ||
35 | # make filename.i = Create a preprocessed source file for use in submitting | ||
36 | # bug reports to the GCC project. | ||
37 | # | ||
38 | # To rebuild project do "make clean" then "make all". | ||
39 | #---------------------------------------------------------------------------- | ||
40 | |||
41 | # Build Options | ||
42 | # change to "no" to disable the options, or define them in the makefile.mk in | ||
43 | # the appropriate keymap folder that will get included automatically | ||
44 | # | ||
45 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
46 | |||
47 | ifndef QUANTUM_DIR | ||
48 | include ../../../../Makefile | ||
49 | endif \ No newline at end of file | ||
diff --git a/keyboards/clueboard2/keymaps/max/keymap.c b/keyboards/clueboard/keymaps/max/keymap.c index 65a101c2b..82c93401d 100644 --- a/keyboards/clueboard2/keymaps/max/keymap.c +++ b/keyboards/clueboard/keymaps/max/keymap.c | |||
@@ -1,4 +1,4 @@ | |||
1 | #include "clueboard2.h" | 1 | #include "clueboard.h" |
2 | 2 | ||
3 | // Used for SHIFT_ESC | 3 | // Used for SHIFT_ESC |
4 | #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) | 4 | #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) |
diff --git a/keyboards/clueboard2/keymaps/skully/keymap.c b/keyboards/clueboard/keymaps/skully/keymap.c index 74a03f2f3..df6f054e0 100644 --- a/keyboards/clueboard2/keymaps/skully/keymap.c +++ b/keyboards/clueboard/keymaps/skully/keymap.c | |||
@@ -1,4 +1,4 @@ | |||
1 | #include "clueboard2.h" | 1 | #include "clueboard.h" |
2 | 2 | ||
3 | // Used for SHIFT_ESC | 3 | // Used for SHIFT_ESC |
4 | #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) | 4 | #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) |
diff --git a/keyboards/clueboard/rev1/Makefile b/keyboards/clueboard/rev1/Makefile new file mode 100644 index 000000000..80a942d06 --- /dev/null +++ b/keyboards/clueboard/rev1/Makefile | |||
@@ -0,0 +1,5 @@ | |||
1 | BACKLIGHT_ENABLE = no | ||
2 | |||
3 | ifndef QUANTUM_DIR | ||
4 | include ../../../Makefile | ||
5 | endif | ||
diff --git a/keyboards/clueboard/rev1/config.h b/keyboards/clueboard/rev1/config.h new file mode 100644 index 000000000..9bb58f56e --- /dev/null +++ b/keyboards/clueboard/rev1/config.h | |||
@@ -0,0 +1,37 @@ | |||
1 | #ifndef REV2_CONFIG_H | ||
2 | #define REV2_CONFIG_H | ||
3 | |||
4 | #include "../config.h" | ||
5 | |||
6 | #define PRODUCT_ID 0x2301 | ||
7 | #define DEVICE_VER 0x0003 | ||
8 | |||
9 | /* key matrix size */ | ||
10 | #define MATRIX_ROWS 5 | ||
11 | #define MATRIX_COLS 16 | ||
12 | |||
13 | // ROWS: Top to bottom, COLS: Left to right | ||
14 | /* Column pin configuration | ||
15 | * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ||
16 | * pin: B3 F1 F4 F5 F6 C7 C6 B6 B5 B4 D7 D6 D4 F7 B0 B1 | ||
17 | */ | ||
18 | #define MATRIX_COL_PINS { B3, F1, F4, F5, F6, C7, C6, B6, B5, B4, D7, D6, D4, F7, B0, B1 } | ||
19 | /* Row pin configuration | ||
20 | * row: 0 1 2 3 4 | ||
21 | * pin: D1 D0 D2 D5 D3 | ||
22 | */ | ||
23 | #define MATRIX_ROW_PINS { D1, D0, D2, D5, D3 } | ||
24 | #define UNUSED_PINS | ||
25 | |||
26 | /* Underlight configuration | ||
27 | */ | ||
28 | #define ws2812_PORTREG PORTB | ||
29 | #define ws2812_DDRREG DDRB | ||
30 | #define ws2812_pin 2 | ||
31 | #define RGBLED_NUM 14 // Number of LEDs | ||
32 | #define RGBLIGHT_HUE_STEP 10 | ||
33 | #define RGBLIGHT_SAT_STEP 17 | ||
34 | #define RGBLIGHT_VAL_STEP 17 | ||
35 | |||
36 | |||
37 | #endif \ No newline at end of file | ||
diff --git a/keyboards/clueboard/rev1/rev1.c b/keyboards/clueboard/rev1/rev1.c new file mode 100644 index 000000000..520a869e5 --- /dev/null +++ b/keyboards/clueboard/rev1/rev1.c | |||
@@ -0,0 +1 @@ | |||
#include "rev1.h" | |||
diff --git a/keyboards/clueboard1/clueboard1.h b/keyboards/clueboard/rev1/rev1.h index 3c6c33342..abdfd079b 100644 --- a/keyboards/clueboard1/clueboard1.h +++ b/keyboards/clueboard/rev1/rev1.h | |||
@@ -1,8 +1,7 @@ | |||
1 | #ifndef CLUEBOARD1_H | 1 | #ifndef REV1_H |
2 | #define CLUEBOARD1_H | 2 | #define REV1_H |
3 | |||
4 | #include "quantum.h" | ||
5 | 3 | ||
4 | #include "../clueboard.h" | ||
6 | 5 | ||
7 | /* Clueboard matrix layout | 6 | /* Clueboard matrix layout |
8 | * ,-----------------------------------------------------------. ,---. | 7 | * ,-----------------------------------------------------------. ,---. |
@@ -30,6 +29,7 @@ | |||
30 | */ | 29 | */ |
31 | // The first section contains all of the arguements | 30 | // The first section contains all of the arguements |
32 | // The second converts the arguments into a two-dimensional array | 31 | // The second converts the arguments into a two-dimensional array |
32 | |||
33 | #define KEYMAP( \ | 33 | #define KEYMAP( \ |
34 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ | 34 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ |
35 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ | 35 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ |
diff --git a/keyboards/clueboard/rev2/Makefile b/keyboards/clueboard/rev2/Makefile new file mode 100644 index 000000000..cea967b79 --- /dev/null +++ b/keyboards/clueboard/rev2/Makefile | |||
@@ -0,0 +1,5 @@ | |||
1 | BACKLIGHT_ENABLE = yes | ||
2 | |||
3 | ifndef QUANTUM_DIR | ||
4 | include ../../../Makefile | ||
5 | endif | ||
diff --git a/keyboards/clueboard/rev2/config.h b/keyboards/clueboard/rev2/config.h new file mode 100644 index 000000000..e2f8336be --- /dev/null +++ b/keyboards/clueboard/rev2/config.h | |||
@@ -0,0 +1,40 @@ | |||
1 | #ifndef REV2_CONFIG_H | ||
2 | #define REV2_CONFIG_H | ||
3 | |||
4 | #include "../config.h" | ||
5 | |||
6 | #define PRODUCT_ID 0x2320 | ||
7 | #define DEVICE_VER 0x0001 | ||
8 | |||
9 | /* key matrix size */ | ||
10 | #define MATRIX_ROWS 10 | ||
11 | #define MATRIX_COLS 8 | ||
12 | |||
13 | // ROWS: Top to bottom, COLS: Left to right | ||
14 | /* Row pin configuration | ||
15 | * row: 0 1 2 3 4 5 6 7 8 9 | ||
16 | * pin: B2 C7 C6 B6 B5 B0 B3 D5 D3 D2 | ||
17 | */ | ||
18 | #define MATRIX_ROW_PINS { B2, C7, C6, B6, B5, B0, B3, D5, D3, D2 } | ||
19 | /* Column pin configuration | ||
20 | * col: 0 1 2 3 4 5 6 7 | ||
21 | * pin: F0 F1 F4 F5 F6 F7 E6 B1 | ||
22 | */ | ||
23 | #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, E6, B1 } | ||
24 | #define UNUSED_PINS | ||
25 | |||
26 | /* Backlight configuration | ||
27 | */ | ||
28 | #define BACKLIGHT_LEVELS 1 | ||
29 | |||
30 | /* Underlight configuration | ||
31 | */ | ||
32 | #define ws2812_PORTREG PORTD | ||
33 | #define ws2812_DDRREG DDRD | ||
34 | #define ws2812_pin 7 | ||
35 | #define RGBLED_NUM 14 // Number of LEDs | ||
36 | #define RGBLIGHT_HUE_STEP 10 | ||
37 | #define RGBLIGHT_SAT_STEP 17 | ||
38 | #define RGBLIGHT_VAL_STEP 17 | ||
39 | |||
40 | #endif \ No newline at end of file | ||
diff --git a/keyboards/clueboard/rev2/rev2.c b/keyboards/clueboard/rev2/rev2.c new file mode 100644 index 000000000..7a8ec368e --- /dev/null +++ b/keyboards/clueboard/rev2/rev2.c | |||
@@ -0,0 +1,47 @@ | |||
1 | #include "rev2.h" | ||
2 | #include <avr/io.h> | ||
3 | #include "backlight.h" | ||
4 | #include "print.h" | ||
5 | |||
6 | void matrix_init_kb(void) { | ||
7 | // put your keyboard start-up code here | ||
8 | // runs once when the firmware starts up | ||
9 | matrix_init_user(); | ||
10 | led_init_ports(); | ||
11 | |||
12 | // JTAG disable for PORT F. write JTD bit twice within four cycles. | ||
13 | MCUCR |= (1<<JTD); | ||
14 | MCUCR |= (1<<JTD); | ||
15 | } | ||
16 | |||
17 | |||
18 | void matrix_scan_kb(void) { | ||
19 | matrix_scan_user(); | ||
20 | } | ||
21 | |||
22 | void backlight_init_ports(void) { | ||
23 | print("init_backlight_pin()\n"); | ||
24 | // Set our LED pins as output | ||
25 | DDRD |= (1<<6); // Esc | ||
26 | DDRB |= (1<<7); // Page Up | ||
27 | DDRD |= (1<<4); // Arrows | ||
28 | |||
29 | // Set our LED pins low | ||
30 | PORTD &= ~(1<<6); // Esc | ||
31 | PORTB &= ~(1<<7); // Page Up | ||
32 | PORTD &= ~(1<<4); // Arrows | ||
33 | } | ||
34 | |||
35 | void backlight_set(uint8_t level) { | ||
36 | if ( level == 0 ) { | ||
37 | // Turn off light | ||
38 | PORTD |= (1<<6); // Esc | ||
39 | PORTB |= (1<<7); // Page Up | ||
40 | PORTD |= (1<<4); // Arrows | ||
41 | } else { | ||
42 | // Turn on light | ||
43 | PORTD &= ~(1<<6); // Esc | ||
44 | PORTB &= ~(1<<7); // Page Up | ||
45 | PORTD &= ~(1<<4); // Arrows | ||
46 | } | ||
47 | } | ||
diff --git a/keyboards/clueboard2/clueboard2.h b/keyboards/clueboard/rev2/rev2.h index e474b3101..912de405d 100644 --- a/keyboards/clueboard2/clueboard2.h +++ b/keyboards/clueboard/rev2/rev2.h | |||
@@ -1,8 +1,7 @@ | |||
1 | #ifndef CLUEBOARD2_H | 1 | #ifndef REV2_H |
2 | #define CLUEBOARD2_H | 2 | #define REV2_H |
3 | |||
4 | #include "quantum.h" | ||
5 | 3 | ||
4 | #include "../clueboard.h" | ||
6 | 5 | ||
7 | /* Clueboard matrix layout | 6 | /* Clueboard matrix layout |
8 | * ,-----------------------------------------------------------. ,---. | 7 | * ,-----------------------------------------------------------. ,---. |
@@ -30,6 +29,7 @@ | |||
30 | */ | 29 | */ |
31 | // The first section contains all of the arguments | 30 | // The first section contains all of the arguments |
32 | // The second converts the arguments into a two-dimensional array | 31 | // The second converts the arguments into a two-dimensional array |
32 | |||
33 | #define KEYMAP( \ | 33 | #define KEYMAP( \ |
34 | k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k55, k56, k57, \ | 34 | k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k55, k56, k57, \ |
35 | k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \ | 35 | k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \ |
diff --git a/keyboards/clueboard1/keymaps/default/keymap.c b/keyboards/clueboard1/keymaps/default/keymap.c deleted file mode 100644 index 3f4f3c414..000000000 --- a/keyboards/clueboard1/keymaps/default/keymap.c +++ /dev/null | |||
@@ -1,184 +0,0 @@ | |||
1 | #include "clueboard1.h" | ||
2 | |||
3 | #ifdef RGBLIGHT_ENABLE | ||
4 | #include "rgblight.h" | ||
5 | #endif | ||
6 | |||
7 | // Used for SHIFT_ESC | ||
8 | #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) | ||
9 | |||
10 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
11 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
12 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
13 | // entirely and just use numbers. | ||
14 | #define _BL 0 | ||
15 | #define _FL 1 | ||
16 | #define _RS 2 | ||
17 | |||
18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
19 | /* Keymap _BL: (Base Layer) Default Layer | ||
20 | * ,--------------------------------------------------------------------------. ,----. | ||
21 | * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| BS| |PGUP| | ||
22 | * |--------------------------------------------------------------------------| |----| | ||
23 | * | Tab| Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |PGDN| | ||
24 | * |--------------------------------------------------------------------------| `----' | ||
25 | * |Capslck| A| S| D| F| G| H| J| K| L| ;| '| # | Ent| | ||
26 | * |-----------------------------------------------------------------------------. | ||
27 | * |Shift| BS| Z| X| C| V| B| N| M| ,| .| /| BS|Shift| UP| | ||
28 | * |------------------------------------------------------------------------|----|----. | ||
29 | * | Ctrl| Gui| Alt| MHen| Space| Space| Hen| Alt| Ctrl| _FL|LEFT|DOWN|RGHT| | ||
30 | * `----------------------------------------------------------------------------------' | ||
31 | */ | ||
32 | [_BL] = KEYMAP( | ||
33 | F(0), 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_GRV, KC_BSPC, KC_PGUP, \ | ||
34 | 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_PGDN, \ | ||
35 | 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, \ | ||
36 | 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_RO, KC_RSFT, KC_UP, \ | ||
37 | KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), | ||
38 | |||
39 | /* Keymap _FL: Function Layer | ||
40 | * ,--------------------------------------------------------------------------. ,----. | ||
41 | * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN| | ||
42 | * |--------------------------------------------------------------------------| |----| | ||
43 | * | | | | | | | | |PScr|SLck|Paus| | | | |BLDE| | ||
44 | * |--------------------------------------------------------------------------| `----' | ||
45 | * | | | _RS| | | | | | | | | | | | | ||
46 | * |-----------------------------------------------------------------------------. | ||
47 | * | | | | | | | | | | | | | | |PGUP| | ||
48 | * |------------------------------------------------------------------------|----|----. | ||
49 | * | | | | | | | | | | _FL|HOME|PGDN| END| | ||
50 | * `----------------------------------------------------------------------------------' | ||
51 | */ | ||
52 | [_FL] = KEYMAP( | ||
53 | KC_GRV, 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_DEL, BL_STEP, \ | ||
54 | KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
55 | KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
56 | 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_PGUP, \ | ||
57 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), KC_HOME, KC_PGDN, KC_END), | ||
58 | |||
59 | /* Keymap _RS: Reset layer | ||
60 | * ,--------------------------------------------------------------------------. ,----. | ||
61 | * | | | | | | | | | | | | | | | | | | | ||
62 | * |--------------------------------------------------------------------------| |----| | ||
63 | * | | | | |RESET| | | | | | | | | | | | | ||
64 | * |--------------------------------------------------------------------------| `----' | ||
65 | * | | | _RS| | | | | | | | | | | | | ||
66 | * |-----------------------------------------------------------------------------. | ||
67 | * | | | | | | | | | | | | | | | | | ||
68 | * |------------------------------------------------------------------------|----|----. | ||
69 | * | | | | | | | | | | _FL| | | | | ||
70 | * `----------------------------------------------------------------------------------' | ||
71 | */ | ||
72 | [_RS] = KEYMAP( | ||
73 | #ifdef RGBLIGHT_ENABLE | ||
74 | 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, F(1), F(7), \ | ||
75 | KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(8), \ | ||
76 | KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
77 | MO(_FL), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), F(5), \ | ||
78 | KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, F(2), F(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(4), F(6), F(3)), | ||
79 | #else | ||
80 | 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, \ | ||
81 | KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
82 | KC_TRNS, KC_TRNS, MO(_RS),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ | ||
83 | 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, \ | ||
84 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), KC_TRNS, KC_TRNS, KC_TRNS), | ||
85 | #endif | ||
86 | }; | ||
87 | |||
88 | enum function_id { | ||
89 | SHIFT_ESC, | ||
90 | #ifdef RGBLIGHT_ENABLE | ||
91 | RGBLED_TOGGLE, | ||
92 | RGBLED_STEP_MODE, | ||
93 | RGBLED_INCREASE_HUE, | ||
94 | RGBLED_DECREASE_HUE, | ||
95 | RGBLED_INCREASE_SAT, | ||
96 | RGBLED_DECREASE_SAT, | ||
97 | RGBLED_INCREASE_VAL, | ||
98 | RGBLED_DECREASE_VAL | ||
99 | #endif | ||
100 | }; | ||
101 | |||
102 | const uint16_t PROGMEM fn_actions[] = { | ||
103 | [0] = ACTION_FUNCTION(SHIFT_ESC), | ||
104 | #ifdef RGBLIGHT_ENABLE | ||
105 | [1] = ACTION_FUNCTION(RGBLED_TOGGLE), | ||
106 | [2] = ACTION_FUNCTION(RGBLED_STEP_MODE), | ||
107 | [3] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), | ||
108 | [4] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), | ||
109 | [5] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), | ||
110 | [6] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), | ||
111 | [7] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), | ||
112 | [8] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), | ||
113 | #endif | ||
114 | }; | ||
115 | |||
116 | void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { | ||
117 | static uint8_t shift_esc_shift_mask; | ||
118 | switch (id) { | ||
119 | case SHIFT_ESC: | ||
120 | shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; | ||
121 | if (record->event.pressed) { | ||
122 | if (shift_esc_shift_mask) { | ||
123 | add_key(KC_GRV); | ||
124 | send_keyboard_report(); | ||
125 | } else { | ||
126 | add_key(KC_ESC); | ||
127 | send_keyboard_report(); | ||
128 | } | ||
129 | } else { | ||
130 | if (shift_esc_shift_mask) { | ||
131 | del_key(KC_GRV); | ||
132 | send_keyboard_report(); | ||
133 | } else { | ||
134 | del_key(KC_ESC); | ||
135 | send_keyboard_report(); | ||
136 | } | ||
137 | } | ||
138 | break; | ||
139 | //led operations | ||
140 | #ifdef RGBLIGHT_ENABLE | ||
141 | case RGBLED_TOGGLE: | ||
142 | if (record->event.pressed) { | ||
143 | rgblight_toggle(); | ||
144 | } | ||
145 | |||
146 | break; | ||
147 | case RGBLED_INCREASE_HUE: | ||
148 | if (record->event.pressed) { | ||
149 | rgblight_increase_hue(); | ||
150 | } | ||
151 | break; | ||
152 | case RGBLED_DECREASE_HUE: | ||
153 | if (record->event.pressed) { | ||
154 | rgblight_decrease_hue(); | ||
155 | } | ||
156 | break; | ||
157 | case RGBLED_INCREASE_SAT: | ||
158 | if (record->event.pressed) { | ||
159 | rgblight_increase_sat(); | ||
160 | } | ||
161 | break; | ||
162 | case RGBLED_DECREASE_SAT: | ||
163 | if (record->event.pressed) { | ||
164 | rgblight_decrease_sat(); | ||
165 | } | ||
166 | break; | ||
167 | case RGBLED_INCREASE_VAL: | ||
168 | if (record->event.pressed) { | ||
169 | rgblight_increase_val(); | ||
170 | } | ||
171 | break; | ||
172 | case RGBLED_DECREASE_VAL: | ||
173 | if (record->event.pressed) { | ||
174 | rgblight_decrease_val(); | ||
175 | } | ||
176 | break; | ||
177 | case RGBLED_STEP_MODE: | ||
178 | if (record->event.pressed) { | ||
179 | rgblight_step(); | ||
180 | } | ||
181 | break; | ||
182 | #endif | ||
183 | } | ||
184 | } | ||
diff --git a/keyboards/clueboard2/config.h b/keyboards/clueboard2/config.h deleted file mode 100644 index 2887519af..000000000 --- a/keyboards/clueboard2/config.h +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | /* | ||
2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 2 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #ifndef CONFIG_H | ||
19 | #define CONFIG_H | ||
20 | |||
21 | #include "config_common.h" | ||
22 | |||
23 | /* USB Device descriptor parameter */ | ||
24 | #define VENDOR_ID 0xC1ED | ||
25 | #define PRODUCT_ID 0x2320 | ||
26 | #define DEVICE_VER 0x0001 | ||
27 | #define MANUFACTURER Clueboard | ||
28 | #define PRODUCT Clueboard with RGB Underlighting | ||
29 | #define DESCRIPTION QMK keyboard firmware for Clueboard | ||
30 | |||
31 | /* key matrix size */ | ||
32 | #define MATRIX_ROWS 10 | ||
33 | #define MATRIX_COLS 8 | ||
34 | |||
35 | // ROWS: Top to bottom, COLS: Left to right | ||
36 | /* Row pin configuration | ||
37 | * row: 0 1 2 3 4 5 6 7 8 9 | ||
38 | * pin: B2 C7 C6 B6 B5 B0 B3 D5 D3 D2 | ||
39 | */ | ||
40 | #define MATRIX_ROW_PINS { B2, C7, C6, B6, B5, B0, B3, D5, D3, D2 } | ||
41 | /* Column pin configuration | ||
42 | * col: 0 1 2 3 4 5 6 7 | ||
43 | * pin: F0 F1 F4 F5 F6 F7 E6 B1 | ||
44 | */ | ||
45 | #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, E6, B1 } | ||
46 | #define UNUSED_PINS | ||
47 | |||
48 | /* COL2ROW or ROW2COL */ | ||
49 | #define DIODE_DIRECTION COL2ROW | ||
50 | |||
51 | /* define if matrix has ghost */ | ||
52 | //#define MATRIX_HAS_GHOST | ||
53 | |||
54 | /* Set 0 if debouncing isn't needed */ | ||
55 | #define DEBOUNCING_DELAY 5 | ||
56 | |||
57 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
58 | #define LOCKING_SUPPORT_ENABLE | ||
59 | /* Locking resynchronize hack */ | ||
60 | #define LOCKING_RESYNC_ENABLE | ||
61 | |||
62 | /* key combination for command */ | ||
63 | #define IS_COMMAND() ( \ | ||
64 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | ||
65 | ) | ||
66 | |||
67 | /* Backlight configuration | ||
68 | */ | ||
69 | #define BACKLIGHT_LEVELS 1 | ||
70 | |||
71 | /* Underlight configuration | ||
72 | */ | ||
73 | #define ws2812_PORTREG PORTD | ||
74 | #define ws2812_DDRREG DDRD | ||
75 | #define ws2812_pin 7 | ||
76 | #define RGBLED_NUM 14 // Number of LEDs | ||
77 | #define RGBLIGHT_HUE_STEP 10 | ||
78 | #define RGBLIGHT_SAT_STEP 17 | ||
79 | #define RGBLIGHT_VAL_STEP 17 | ||
80 | |||
81 | /* | ||
82 | * Feature disable options | ||
83 | * These options are also useful to firmware size reduction. | ||
84 | */ | ||
85 | |||
86 | /* disable debug print */ | ||
87 | //#define NO_DEBUG | ||
88 | |||
89 | /* disable print */ | ||
90 | //#define NO_PRINT | ||
91 | |||
92 | /* disable action features */ | ||
93 | //#define NO_ACTION_LAYER | ||
94 | //#define NO_ACTION_TAPPING | ||
95 | //#define NO_ACTION_ONESHOT | ||
96 | //#define NO_ACTION_MACRO | ||
97 | //#define NO_ACTION_FUNCTION | ||
98 | |||
99 | #endif | ||
diff --git a/keyboards/clueboard2/keymaps/max/Makefile b/keyboards/clueboard2/keymaps/max/Makefile deleted file mode 100644 index 22b5b94e3..000000000 --- a/keyboards/clueboard2/keymaps/max/Makefile +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | |||
2 | |||
3 | # Build Options | ||
4 | # change to "no" to disable the options, or define them in the Makefile in | ||
5 | # the appropriate keymap folder that will get included automatically | ||
6 | # | ||
7 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
8 | |||
9 | ifndef QUANTUM_DIR | ||
10 | include ../../../../Makefile | ||
11 | endif \ No newline at end of file | ||
diff --git a/keyboards/cluepad/Makefile b/keyboards/cluepad/Makefile index eb7a58025..a331ff4dc 100644 --- a/keyboards/cluepad/Makefile +++ b/keyboards/cluepad/Makefile | |||
@@ -1,8 +1,4 @@ | |||
1 | 1 | ||
2 | |||
3 | # # project specific files | ||
4 | SRC = backlight.c | ||
5 | |||
6 | # MCU name | 2 | # MCU name |
7 | #MCU = at90usb1287 | 3 | #MCU = at90usb1287 |
8 | MCU = atmega32u4 | 4 | MCU = atmega32u4 |
diff --git a/keyboards/cluepad/backlight.c b/keyboards/cluepad/backlight.c deleted file mode 100644 index a9caed1df..000000000 --- a/keyboards/cluepad/backlight.c +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | #include <avr/io.h> | ||
2 | #include "backlight.h" | ||
3 | #include "led.h" | ||
4 | |||
5 | #include "print.h" | ||
6 | |||
7 | int pwm_level; | ||
8 | |||
9 | void led_set_kb(uint8_t usb_led) | ||
10 | { | ||
11 | print("led_set\n"); | ||
12 | } | ||
13 | |||
14 | void init_backlight_pin(void) | ||
15 | { | ||
16 | // Set C7 to output | ||
17 | DDRC |= (1<<7); | ||
18 | |||
19 | // Initialize the timer | ||
20 | TC4H = 0x03; | ||
21 | OCR4C = 0xFF; | ||
22 | TCCR4A = 0b10000010; | ||
23 | TCCR4B = 0b00000001; | ||
24 | } | ||
25 | |||
26 | void backlight_set(uint8_t level) | ||
27 | { | ||
28 | // Determine the PWM level | ||
29 | switch (level) | ||
30 | { | ||
31 | case 0: | ||
32 | // 33% | ||
33 | pwm_level = 0x54; | ||
34 | break; | ||
35 | case 1: | ||
36 | // 66% | ||
37 | pwm_level = 0xA8; | ||
38 | break; | ||
39 | case 2: | ||
40 | // 100% | ||
41 | pwm_level = 0xFF; | ||
42 | break; | ||
43 | case 3: | ||
44 | // 0% | ||
45 | pwm_level = 0x00; | ||
46 | break; | ||
47 | default: | ||
48 | xprintf("Unknown level: %d\n", level); | ||
49 | } | ||
50 | |||
51 | // Write the PWM level to the timer | ||
52 | TC4H = pwm_level >> 8; | ||
53 | OCR4A = 0xFF & pwm_level; | ||
54 | } | ||
diff --git a/keyboards/cluepad/cluepad.c b/keyboards/cluepad/cluepad.c index cbbdccb30..1867b617f 100644 --- a/keyboards/cluepad/cluepad.c +++ b/keyboards/cluepad/cluepad.c | |||
@@ -1,15 +1,60 @@ | |||
1 | #include "cluepad.h" | 1 | #include "cluepad.h" |
2 | 2 | ||
3 | int pwm_level; | ||
4 | |||
3 | void matrix_init_kb(void) { | 5 | void matrix_init_kb(void) { |
4 | // put your keyboard start-up code here | 6 | // put your keyboard start-up code here |
5 | // runs once when the firmware starts up | 7 | // runs once when the firmware starts up |
6 | matrix_init_user(); | 8 | matrix_init_user(); |
7 | 9 | ||
8 | #ifdef BACKLIGHT_ENABLE | ||
9 | init_backlight_pin(); | ||
10 | #endif | ||
11 | |||
12 | // JTAG disable for PORT F. write JTD bit twice within four cycles. | 10 | // JTAG disable for PORT F. write JTD bit twice within four cycles. |
13 | MCUCR |= (1<<JTD); | 11 | MCUCR |= (1<<JTD); |
14 | MCUCR |= (1<<JTD); | 12 | MCUCR |= (1<<JTD); |
15 | }; | 13 | }; |
14 | |||
15 | void led_set_kb(uint8_t usb_led) | ||
16 | { | ||
17 | print("led_set\n"); | ||
18 | } | ||
19 | |||
20 | void backlight_init_ports(void) | ||
21 | { | ||
22 | // Set C7 to output | ||
23 | DDRC |= (1<<7); | ||
24 | |||
25 | // Initialize the timer | ||
26 | TC4H = 0x03; | ||
27 | OCR4C = 0xFF; | ||
28 | TCCR4A = 0b10000010; | ||
29 | TCCR4B = 0b00000001; | ||
30 | } | ||
31 | |||
32 | void backlight_set(uint8_t level) | ||
33 | { | ||
34 | // Determine the PWM level | ||
35 | switch (level) | ||
36 | { | ||
37 | case 0: | ||
38 | // 33% | ||
39 | pwm_level = 0x54; | ||
40 | break; | ||
41 | case 1: | ||
42 | // 66% | ||
43 | pwm_level = 0xA8; | ||
44 | break; | ||
45 | case 2: | ||
46 | // 100% | ||
47 | pwm_level = 0xFF; | ||
48 | break; | ||
49 | case 3: | ||
50 | // 0% | ||
51 | pwm_level = 0x00; | ||
52 | break; | ||
53 | default: | ||
54 | xprintf("Unknown level: %d\n", level); | ||
55 | } | ||
56 | |||
57 | // Write the PWM level to the timer | ||
58 | TC4H = pwm_level >> 8; | ||
59 | OCR4A = 0xFF & pwm_level; | ||
60 | } | ||
diff --git a/keyboards/cluepad/cluepad.h b/keyboards/cluepad/cluepad.h index 615a9111e..5e4a5999e 100644 --- a/keyboards/cluepad/cluepad.h +++ b/keyboards/cluepad/cluepad.h | |||
@@ -1,9 +1,7 @@ | |||
1 | #ifndef CLUEPAD_H | 1 | #ifndef CLUEPAD_H |
2 | #define CLUEPAD_H | 2 | #define CLUEPAD_H |
3 | 3 | ||
4 | #include "matrix.h" | 4 | #include "quantum.h" |
5 | #include "keymap.h" | ||
6 | #include <stddef.h> | ||
7 | 5 | ||
8 | 6 | ||
9 | /* Cluepad matrix layout | 7 | /* Cluepad matrix layout |
diff --git a/keyboards/planck/Makefile b/keyboards/planck/Makefile index 08e9205cb..23944f92e 100644 --- a/keyboards/planck/Makefile +++ b/keyboards/planck/Makefile | |||
@@ -1,4 +1,5 @@ | |||
1 | 1 | ||
2 | SUBPROJECT_DEFAULT = rev4 | ||
2 | 3 | ||
3 | # MCU name | 4 | # MCU name |
4 | #MCU = at90usb1287 | 5 | #MCU = at90usb1287 |
diff --git a/keyboards/planck/config.h b/keyboards/planck/config.h index da2b000f6..4dd1d22a9 100644 --- a/keyboards/planck/config.h +++ b/keyboards/planck/config.h | |||
@@ -23,7 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
23 | /* USB Device descriptor parameter */ | 23 | /* USB Device descriptor parameter */ |
24 | #define VENDOR_ID 0xFEED | 24 | #define VENDOR_ID 0xFEED |
25 | #define PRODUCT_ID 0x6060 | 25 | #define PRODUCT_ID 0x6060 |
26 | #define DEVICE_VER 0x0001 | ||
27 | #define MANUFACTURER Ortholinear Keyboards | 26 | #define MANUFACTURER Ortholinear Keyboards |
28 | #define PRODUCT The Planck Keyboard | 27 | #define PRODUCT The Planck Keyboard |
29 | #define DESCRIPTION A compact ortholinear keyboard | 28 | #define DESCRIPTION A compact ortholinear keyboard |
@@ -79,4 +78,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
79 | //#define NO_ACTION_MACRO | 78 | //#define NO_ACTION_MACRO |
80 | //#define NO_ACTION_FUNCTION | 79 | //#define NO_ACTION_FUNCTION |
81 | 80 | ||
81 | #ifdef SUBPROJECT_rev3 | ||
82 | #include "rev3/config.h" | ||
83 | #endif | ||
84 | #ifdef SUBPROJECT_rev4 | ||
85 | #include "rev4/config.h" | ||
86 | #endif | ||
87 | |||
82 | #endif | 88 | #endif |
diff --git a/keyboards/planck/keymaps/experimental/config.h b/keyboards/planck/keymaps/experimental/config.h index a9117e0ee..985e250ab 100644 --- a/keyboards/planck/keymaps/experimental/config.h +++ b/keyboards/planck/keymaps/experimental/config.h | |||
@@ -4,5 +4,6 @@ | |||
4 | #include "../../config.h" | 4 | #include "../../config.h" |
5 | 5 | ||
6 | #define LEADER_TIMEOUT 300 | 6 | #define LEADER_TIMEOUT 300 |
7 | #define BACKLIGHT_BREATHING | ||
7 | 8 | ||
8 | #endif | 9 | #endif |
diff --git a/keyboards/planck/keymaps/yang/Makefile b/keyboards/planck/keymaps/yang/Makefile index f4908d703..6b18762fa 100644 --- a/keyboards/planck/keymaps/yang/Makefile +++ b/keyboards/planck/keymaps/yang/Makefile | |||
@@ -3,6 +3,7 @@ | |||
3 | # the appropriate keymap folder that will get included automatically | 3 | # the appropriate keymap folder that will get included automatically |
4 | # | 4 | # |
5 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | 5 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. |
6 | AUDIO_ENABLE = no | ||
6 | 7 | ||
7 | ifndef QUANTUM_DIR | 8 | ifndef QUANTUM_DIR |
8 | include ../../../../Makefile | 9 | include ../../../../Makefile |
diff --git a/keyboards/planck/planck.h b/keyboards/planck/planck.h index 81c0e8cb4..8cfee5d1c 100644 --- a/keyboards/planck/planck.h +++ b/keyboards/planck/planck.h | |||
@@ -1,6 +1,13 @@ | |||
1 | #ifndef PLANCK_H | 1 | #ifndef PLANCK_H |
2 | #define PLANCK_H | 2 | #define PLANCK_H |
3 | 3 | ||
4 | #ifdef SUBPROJECT_rev3 | ||
5 | #include "rev3.h" | ||
6 | #endif | ||
7 | #ifdef SUBPROJECT_rev4 | ||
8 | #include "rev4.h" | ||
9 | #endif | ||
10 | |||
4 | #include "quantum.h" | 11 | #include "quantum.h" |
5 | 12 | ||
6 | #define PLANCK_MIT( \ | 13 | #define PLANCK_MIT( \ |
diff --git a/keyboards/planck/rev3/Makefile b/keyboards/planck/rev3/Makefile new file mode 100644 index 000000000..559409682 --- /dev/null +++ b/keyboards/planck/rev3/Makefile | |||
@@ -0,0 +1,5 @@ | |||
1 | AUDIO_ENABLE = no # Audio output on port C6 | ||
2 | |||
3 | ifndef QUANTUM_DIR | ||
4 | include ../../../Makefile | ||
5 | endif \ No newline at end of file | ||
diff --git a/keyboards/planck/rev3/config.h b/keyboards/planck/rev3/config.h new file mode 100644 index 000000000..fa50a5622 --- /dev/null +++ b/keyboards/planck/rev3/config.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef REV3_CONFIG_H | ||
2 | #define REV3_CONFIG_H | ||
3 | |||
4 | #include "../config.h" | ||
5 | |||
6 | #define DEVICE_VER 0x0003 | ||
7 | |||
8 | #endif \ No newline at end of file | ||
diff --git a/keyboards/planck/rev3/rev3.c b/keyboards/planck/rev3/rev3.c new file mode 100644 index 000000000..9ccd1d880 --- /dev/null +++ b/keyboards/planck/rev3/rev3.c | |||
@@ -0,0 +1 @@ | |||
#include "rev3.h" \ No newline at end of file | |||
diff --git a/keyboards/planck/rev3/rev3.h b/keyboards/planck/rev3/rev3.h new file mode 100644 index 000000000..628951d97 --- /dev/null +++ b/keyboards/planck/rev3/rev3.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef REV3_H | ||
2 | #define REV3_H | ||
3 | |||
4 | #include "../planck.h" | ||
5 | |||
6 | #endif \ No newline at end of file | ||
diff --git a/keyboards/planck/rev4/Makefile b/keyboards/planck/rev4/Makefile new file mode 100644 index 000000000..01d848e98 --- /dev/null +++ b/keyboards/planck/rev4/Makefile | |||
@@ -0,0 +1,5 @@ | |||
1 | AUDIO_ENABLE = yes # Audio output on port C6 | ||
2 | |||
3 | ifndef QUANTUM_DIR | ||
4 | include ../../../Makefile | ||
5 | endif \ No newline at end of file | ||
diff --git a/keyboards/planck/rev4/config.h b/keyboards/planck/rev4/config.h new file mode 100644 index 000000000..98189fba7 --- /dev/null +++ b/keyboards/planck/rev4/config.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef REV4_CONFIG_H | ||
2 | #define REV4_CONFIG_H | ||
3 | |||
4 | #include "../config.h" | ||
5 | |||
6 | #define DEVICE_VER 0x0004 | ||
7 | |||
8 | #endif \ No newline at end of file | ||
diff --git a/keyboards/planck/rev4/rev4.c b/keyboards/planck/rev4/rev4.c new file mode 100644 index 000000000..98a75d2ed --- /dev/null +++ b/keyboards/planck/rev4/rev4.c | |||
@@ -0,0 +1 @@ | |||
#include "rev4.h" \ No newline at end of file | |||
diff --git a/keyboards/planck/rev4/rev4.h b/keyboards/planck/rev4/rev4.h new file mode 100644 index 000000000..e4cf1800b --- /dev/null +++ b/keyboards/planck/rev4/rev4.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef REV4_H | ||
2 | #define REV4_H | ||
3 | |||
4 | #include "../planck.h" | ||
5 | |||
6 | #endif \ No newline at end of file | ||
diff --git a/keyboards/readme.md b/keyboards/readme.md index 5574619db..e97986546 100644 --- a/keyboards/readme.md +++ b/keyboards/readme.md | |||
@@ -23,8 +23,7 @@ Made in Taiwan using advanced robotic manufacturing, the ErgoDox EZ is a fully-a | |||
23 | 23 | ||
24 | Designed and built in Felton, CA, Clueboards keyboard emphasize quality and locally sourced components, available on [clueboard.co](http://clueboard.co) | 24 | Designed and built in Felton, CA, Clueboards keyboard emphasize quality and locally sourced components, available on [clueboard.co](http://clueboard.co) |
25 | 25 | ||
26 | * [Clueboard rev.1](/keyboards/clueboard1/) - The old Clueboard. | 26 | * [Clueboard](/keyboards/clueboard/) - The 66% custom keyboard. |
27 | * [Clueboard rev.2](/keyboards/clueboard2/) - New and improved! The Clueboard, revision 2. | ||
28 | * [Cluepad](/keyboards/cluepad/) - A mechanical numpad with QMK superpowers. | 27 | * [Cluepad](/keyboards/cluepad/) - A mechanical numpad with QMK superpowers. |
29 | 28 | ||
30 | 29 | ||
diff --git a/quantum/audio/audio.h b/quantum/audio/audio.h index 00d45f7ac..47f326ea0 100644 --- a/quantum/audio/audio.h +++ b/quantum/audio/audio.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef AUDIO_H | ||
2 | #define AUDIO_H | ||
3 | |||
1 | #include <stdint.h> | 4 | #include <stdint.h> |
2 | #include <stdbool.h> | 5 | #include <stdbool.h> |
3 | #include <avr/io.h> | 6 | #include <avr/io.h> |
@@ -7,9 +10,6 @@ | |||
7 | #include "voices.h" | 10 | #include "voices.h" |
8 | #include "quantum.h" | 11 | #include "quantum.h" |
9 | 12 | ||
10 | #ifndef AUDIO_H | ||
11 | #define AUDIO_H | ||
12 | |||
13 | // Largely untested PWM audio mode (doesn't sound as good) | 13 | // Largely untested PWM audio mode (doesn't sound as good) |
14 | // #define PWM_AUDIO | 14 | // #define PWM_AUDIO |
15 | 15 | ||
diff --git a/quantum/matrix.c b/quantum/matrix.c index 6e9f92727..f5744658c 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c | |||
@@ -86,29 +86,29 @@ uint8_t matrix_cols(void) { | |||
86 | return MATRIX_COLS; | 86 | return MATRIX_COLS; |
87 | } | 87 | } |
88 | 88 | ||
89 | void matrix_power_up(void) { | 89 | // void matrix_power_up(void) { |
90 | #if DIODE_DIRECTION == COL2ROW | 90 | // #if DIODE_DIRECTION == COL2ROW |
91 | for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { | 91 | // for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { |
92 | /* DDRxn */ | 92 | // /* DDRxn */ |
93 | _SFR_IO8((row_pins[r] >> 4) + 1) |= _BV(row_pins[r] & 0xF); | 93 | // _SFR_IO8((row_pins[r] >> 4) + 1) |= _BV(row_pins[r] & 0xF); |
94 | toggle_row(r); | 94 | // toggle_row(r); |
95 | } | 95 | // } |
96 | for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) { | 96 | // for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) { |
97 | /* PORTxn */ | 97 | // /* PORTxn */ |
98 | _SFR_IO8((col_pins[c] >> 4) + 2) |= _BV(col_pins[c] & 0xF); | 98 | // _SFR_IO8((col_pins[c] >> 4) + 2) |= _BV(col_pins[c] & 0xF); |
99 | } | 99 | // } |
100 | #else | 100 | // #else |
101 | for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) { | 101 | // for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) { |
102 | /* DDRxn */ | 102 | // /* DDRxn */ |
103 | _SFR_IO8((col_pins[c] >> 4) + 1) |= _BV(col_pins[c] & 0xF); | 103 | // _SFR_IO8((col_pins[c] >> 4) + 1) |= _BV(col_pins[c] & 0xF); |
104 | toggle_col(c); | 104 | // toggle_col(c); |
105 | } | 105 | // } |
106 | for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { | 106 | // for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { |
107 | /* PORTxn */ | 107 | // /* PORTxn */ |
108 | _SFR_IO8((row_pins[r] >> 4) + 2) |= _BV(row_pins[r] & 0xF); | 108 | // _SFR_IO8((row_pins[r] >> 4) + 2) |= _BV(row_pins[r] & 0xF); |
109 | } | 109 | // } |
110 | #endif | 110 | // #endif |
111 | } | 111 | // } |
112 | 112 | ||
113 | void matrix_init(void) { | 113 | void matrix_init(void) { |
114 | /* frees PORTF by setting the JTD bit twice within four cycles */ | 114 | /* frees PORTF by setting the JTD bit twice within four cycles */ |
@@ -14,8 +14,7 @@ For an easy-to-read version of this document and the repository, check out [http | |||
14 | * [Preonic](/keyboards/preonic/) | 14 | * [Preonic](/keyboards/preonic/) |
15 | * [Atomic](/keyboards/atomic/) | 15 | * [Atomic](/keyboards/atomic/) |
16 | * [ErgoDox EZ](/keyboards/ergodox_ez/) | 16 | * [ErgoDox EZ](/keyboards/ergodox_ez/) |
17 | * [Clueboard rev.1](/keyboards/clueboard1/) | 17 | * [Clueboard](/keyboards/clueboard/) |
18 | * [Clueboard rev.2](/keyboards/clueboard2/) | ||
19 | * [Cluepad](/keyboards/cluepad/) | 18 | * [Cluepad](/keyboards/cluepad/) |
20 | 19 | ||
21 | The project also includes community support for [lots of other keyboards](/keyboards/). | 20 | The project also includes community support for [lots of other keyboards](/keyboards/). |
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index aaaba1c2c..e37ba0f83 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk | |||
@@ -51,6 +51,13 @@ ifeq ($(COLOR),true) | |||
51 | BOLD=\033[1m | 51 | BOLD=\033[1m |
52 | endif | 52 | endif |
53 | 53 | ||
54 | ifdef quick | ||
55 | QUICK = $(quick) | ||
56 | endif | ||
57 | |||
58 | QUICK ?= false | ||
59 | AUTOGEN ?= false | ||
60 | |||
54 | ifneq ($(shell awk --version 2>/dev/null),) | 61 | ifneq ($(shell awk --version 2>/dev/null),) |
55 | AWK=awk | 62 | AWK=awk |
56 | else | 63 | else |
@@ -524,7 +531,12 @@ extcoff: $(BUILD_DIR)/$(TARGET).elf | |||
524 | @$(SILENT) || printf "$(MSG_FLASH) $@" | $(AWK_CMD) | 531 | @$(SILENT) || printf "$(MSG_FLASH) $@" | $(AWK_CMD) |
525 | $(eval CMD=$(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature $< $@) | 532 | $(eval CMD=$(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature $< $@) |
526 | @$(BUILD_CMD) | 533 | @$(BUILD_CMD) |
527 | @$(COPY) $@ $(TARGET).hex | 534 | @if $(AUTOGEN); then \ |
535 | $(SILENT) || printf "Copying $(TARGET).hex to keymaps/$(KEYMAP)/$(KEYBOARD)_$(KEYMAP).hex\n"; \ | ||
536 | $(COPY) $@ $(KEYMAP_PATH)/$(KEYBOARD)_$(KEYMAP).hex; \ | ||
537 | else \ | ||
538 | $(COPY) $@ $(TARGET).hex; \ | ||
539 | fi | ||
528 | 540 | ||
529 | %.eep: %.elf | 541 | %.eep: %.elf |
530 | @$(SILENT) || printf "$(MSG_EEPROM) $@" | $(AWK_CMD) | 542 | @$(SILENT) || printf "$(MSG_EEPROM) $@" | $(AWK_CMD) |
@@ -570,7 +582,7 @@ $(OBJDIR)/%.o : %.c | |||
570 | $(OBJDIR)/%.o : %.cpp | 582 | $(OBJDIR)/%.o : %.cpp |
571 | @mkdir -p $(@D) | 583 | @mkdir -p $(@D) |
572 | @$(SILENT) || printf "$(MSG_COMPILING_CPP) $<" | $(AWK_CMD) | 584 | @$(SILENT) || printf "$(MSG_COMPILING_CPP) $<" | $(AWK_CMD) |
573 | $(CC) -c $(ALL_CPPFLAGS) $< -o $@ | 585 | $(eval CMD=$(CC) -c $(ALL_CPPFLAGS) $< -o $@) |
574 | @$(BUILD_CMD) | 586 | @$(BUILD_CMD) |
575 | 587 | ||
576 | # Compile: create assembler files from C source files. | 588 | # Compile: create assembler files from C source files. |
@@ -600,9 +612,11 @@ $(OBJDIR)/%.o : %.S | |||
600 | clean: begin clean_list end | 612 | clean: begin clean_list end |
601 | 613 | ||
602 | clean_list : | 614 | clean_list : |
603 | $(REMOVE) -r $(TOP_DIR)/$(BUILD_DIR) | 615 | @$(REMOVE) -r $(BUILD_DIR) |
604 | $(REMOVE) -r $(KEYBOARD_PATH)/$(BUILD_DIR) | 616 | @$(REMOVE) -r $(TOP_DIR)/$(BUILD_DIR) |
605 | $(REMOVE) -r $(KEYMAP_PATH)/$(BUILD_DIR) | 617 | @$(REMOVE) -r $(KEYBOARD_PATH)/$(BUILD_DIR) |
618 | @if $$SUBPROJECT; then $(REMOVE) -r $(SUBPROJECT_PATH)/$(BUILD_DIR); fi | ||
619 | @$(REMOVE) -r $(KEYMAP_PATH)/$(BUILD_DIR) | ||
606 | 620 | ||
607 | show_path: | 621 | show_path: |
608 | @echo VPATH=$(VPATH) | 622 | @echo VPATH=$(VPATH) |
diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh new file mode 100644 index 000000000..01317f4be --- /dev/null +++ b/util/travis_compiled_push.sh | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | set -o errexit -o nounset | ||
4 | |||
5 | rev=$(git rev-parse --short HEAD) | ||
6 | |||
7 | git config --global user.name "Travis CI" | ||
8 | git config --global user.email "jack.humb+travis.ci@gmail.com" | ||
9 | |||
10 | find . -name ".build" | xargs rm -rf | ||
11 | cd .. | ||
12 | git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git | ||
13 | cd qmk.fm | ||
14 | git submodule update --init --recursive | ||
15 | rm -rf keyboard | ||
16 | rm -rf keyboards | ||
17 | cp -r ../qmk_firmware/keyboards . | ||
18 | cp ../qmk_firmware/readme.md qmk_readme.md | ||
19 | ./generate.sh | ||
20 | |||
21 | git add -A | ||
22 | git commit -m "generated from qmk_firmware/$TRAVIS_BRANCH@${rev}" | ||
23 | git push \ No newline at end of file | ||