aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--README.md6
-rw-r--r--keyboard/clueboard1/Makefile136
-rw-r--r--keyboard/clueboard1/clueboard1.c23
-rw-r--r--keyboard/clueboard1/clueboard1.h52
-rw-r--r--keyboard/clueboard1/config.h96
-rw-r--r--keyboard/clueboard1/keymaps/keymap_default.c184
-rw-r--r--keyboard/clueboard1/led.c32
-rw-r--r--keyboard/clueboard2/Makefile140
-rw-r--r--keyboard/clueboard2/backlight.c41
-rw-r--r--keyboard/clueboard2/clueboard2.c44
-rw-r--r--keyboard/clueboard2/clueboard2.h57
-rw-r--r--keyboard/clueboard2/config.h100
-rw-r--r--keyboard/clueboard2/keymaps/keymap_default.c183
-rw-r--r--keyboard/clueboard2/keymaps/keymap_max.c147
-rw-r--r--keyboard/clueboard2/keymaps/keymap_skully.c108
-rw-r--r--keyboard/clueboard2/led.c36
-rw-r--r--keyboard/cluepad/Makefile136
-rw-r--r--keyboard/cluepad/backlight.c54
-rw-r--r--keyboard/cluepad/cluepad.c39
-rw-r--r--keyboard/cluepad/cluepad.h41
-rw-r--r--keyboard/cluepad/config.h102
-rw-r--r--keyboard/cluepad/keymaps/keymap_default.c122
-rwxr-xr-xnew_project.sh5
-rw-r--r--quantum/rgblight.c9
25 files changed, 1891 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index 8b8c45169..a082ea22e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,8 +16,8 @@ build/
16.vagrant/ 16.vagrant/
17.DS_STORE 17.DS_STORE
18 18
19# Eclipse Settings 19# Eclipse/PyCharm/Other IDE Settings
20.cproject 20.cproject
21.project 21.project
22.settings/ 22.settings/
23 23.idea
diff --git a/README.md b/README.md
index 749c97c8f..d20557f59 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,13 @@
1# Quantum MK Firmware 1# Quantum Mechanical Keyboard Firmware
2 2
3This is a keyboard firmware based on the [tmk_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.co) and the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard. 3This is a keyboard firmware based on the [tmk_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.co), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/).
4 4
5QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, TMK. 5QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, TMK.
6 6
7This documentation is edited and maintained by Erez Zukerman of ErgoDox EZ. If you spot any typos or inaccuracies, please [open an issue](https://github.com/jackhumbert/qmk_firmware/issues/new). 7This documentation is edited and maintained by Erez Zukerman of ErgoDox EZ. If you spot any typos or inaccuracies, please [open an issue](https://github.com/jackhumbert/qmk_firmware/issues/new).
8 8
9The OLKB product firmwares are maintained by Jack, the Ergodox EZ by Erez, and the Clueboard by [skullydazed](/skullydazed).
10
9## Important background info: TMK documentation 11## Important background info: TMK documentation
10 12
11The documentation below explains QMK customizations and elaborates on some of the more useful features of TMK. To understand the base firmware, and especially what *layers* are and how they work, please see [TMK_README.md](/TMK_README.md). 13The documentation below explains QMK customizations and elaborates on some of the more useful features of TMK. To understand the base firmware, and especially what *layers* are and how they work, please see [TMK_README.md](/TMK_README.md).
diff --git a/keyboard/clueboard1/Makefile b/keyboard/clueboard1/Makefile
new file mode 100644
index 000000000..50cde1517
--- /dev/null
+++ b/keyboard/clueboard1/Makefile
@@ -0,0 +1,136 @@
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# Target file name (without extension).
42TARGET = clueboard1
43
44
45# Directory common source filess exist
46TOP_DIR = ../..
47TMK_DIR = ../../tmk_core
48
49# Directory keyboard dependent files exist
50TARGET_DIR = .
51
52# # project specific files
53SRC = clueboard1.c \
54 led.c
55
56ifdef KEYMAP
57 SRC := keymaps/keymap_$(KEYMAP).c $(SRC)
58else
59 SRC := keymaps/keymap_default.c $(SRC)
60endif
61
62CONFIG_H = config.h
63
64# MCU name
65MCU = atmega32u4
66
67# Processor frequency.
68# This will define a symbol, F_CPU, in all source code files equal to the
69# processor frequency in Hz. You can then use this symbol in your source code to
70# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
71# automatically to create a 32-bit value in your source code.
72#
73# This will be an integer division of F_USB below, as it is sourced by
74# F_USB after it has run through any CPU prescalers. Note that this value
75# does not *change* the processor frequency - it should merely be updated to
76# reflect the processor speed set externally so that the code can use accurate
77# software delays.
78F_CPU = 16000000
79
80
81#
82# LUFA specific
83#
84# Target architecture (see library "Board Types" documentation).
85ARCH = AVR8
86
87# Input clock frequency.
88# This will define a symbol, F_USB, in all source code files equal to the
89# input clock frequency (before any prescaling is performed) in Hz. This value may
90# differ from F_CPU if prescaling is used on the latter, and is required as the
91# raw input clock is fed directly to the PLL sections of the AVR for high speed
92# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
93# at the end, this will be done automatically to create a 32-bit value in your
94# source code.
95#
96# If no clock division is performed on the input clock inside the AVR (via the
97# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
98F_USB = $(F_CPU)
99
100# Interrupt driven control endpoint task(+60)
101OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
102
103
104# Boot Section Size in *bytes*
105# Teensy halfKay 512
106# Teensy++ halfKay 1024
107# Atmel DFU loader 4096
108# LUFA bootloader 4096
109# USBaspLoader 2048
110OPT_DEFS += -DBOOTLOADER_SIZE=4096
111
112
113# Build Options
114# comment out to disable the options.
115#
116BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
117# MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
118EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
119CONSOLE_ENABLE = yes # Console for debug(+400)
120COMMAND_ENABLE = yes # Commands for debug and configuration
121NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
122# RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality
123# MIDI_ENABLE = YES # MIDI controls
124# UNICODE_ENABLE = YES # Unicode
125# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
126
127
128# Optimize size but this may cause error "relocation truncated to fit"
129#EXTRALDFLAGS = -Wl,--relax
130
131# Search Path
132VPATH += $(TARGET_DIR)
133VPATH += $(TOP_DIR)
134VPATH += $(TMK_DIR)
135
136include $(TOP_DIR)/quantum/quantum.mk
diff --git a/keyboard/clueboard1/clueboard1.c b/keyboard/clueboard1/clueboard1.c
new file mode 100644
index 000000000..289e4644d
--- /dev/null
+++ b/keyboard/clueboard1/clueboard1.c
@@ -0,0 +1,23 @@
1#include "clueboard1.h"
2
3__attribute__ ((weak))
4void matrix_init_user(void) {
5 // leave these blank
6}
7
8__attribute__ ((weak))
9void matrix_scan_user(void) {
10 // leave these blank
11}
12
13void matrix_init_kb(void) {
14 #ifdef RGBLIGHT_ENABLE
15 rgblight_init();
16 #endif
17
18 matrix_init_user();
19}
20
21void matrix_scan_kb(void) {
22 matrix_scan_user();
23}
diff --git a/keyboard/clueboard1/clueboard1.h b/keyboard/clueboard1/clueboard1.h
new file mode 100644
index 000000000..839a81a15
--- /dev/null
+++ b/keyboard/clueboard1/clueboard1.h
@@ -0,0 +1,52 @@
1#ifndef CLUEBOARD1_H
2#define CLUEBOARD1_H
3
4#include "matrix.h"
5#include "keymap_common.h"
6#include <stddef.h>
7
8
9/* Clueboard matrix layout
10 * ,-----------------------------------------------------------. ,---.
11 * | 00| 01| 02| 03| 04| 05| 06| 07| 08| 09| 0A| 0B| 0C| 0D| 0E| | 0F|
12 * |-----------------------------------------------------------| |---|
13 * | 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 1A| 1B| 1C| 1D| | 1F|
14 * |-----------------------------------------------------------| `---'
15 * | 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 2A| 2B| 2C| 2D|
16 * |------------------------------------------------------------.
17 * | 30| 31| 32| 33| 34| 35| 36| 37| 38| 39| 3A| 3B| 3C| 3D|3E|
18 * |------------------------------------------------------------------.
19 * | 40| 41| 42| 43| 45| 46| 49| 4A| 4B| 4C| 4D| 4E| 4F|
20 * `------------------------------------------------------------------'
21 * ,-----------------------------------------------------------. ,---.
22 * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Yen| BS| |Ins|
23 * |-----------------------------------------------------------| |---|
24 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|
25 * |-----------------------------------------------------------| `---'
26 * |Caps | A| S| D| F| G| H| J| k| L| ;| '| # | Ent|
27 * |--------------------------------------------------------------.
28 * |Shift| \| Z| X| C| V| B| N| M| ,| .| /| \|Shift| Up|
29 * |------------------------------------------------------------------.
30 * |Ctrl|Alt|Gui |MHen| Space| Space|Henk|Gui |Ctrl| Fn|Left|Down|Rgt|
31 * `------------------------------------------------------------------'
32 */
33// The first section contains all of the arguements
34// The second converts the arguments into a two-dimensional array
35#define KEYMAP( \
36 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \
37 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \
38 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \
39 k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \
40 k40, k41, k42, k43, k45, k46, k49, k4A, k4B, k4C, k4D, k4E, k4F \
41) { \
42 { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \
43 { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, KC_NO, k1F }, \
44 { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \
45 { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \
46 { k40, k41, k42, k43, KC_NO, k45, k46, KC_NO, KC_NO, k49, k4A, k4B, k4C, k4D, k4E, k4F } \
47}
48
49void matrix_init_user(void);
50void matrix_scan_user(void);
51
52#endif
diff --git a/keyboard/clueboard1/config.h b/keyboard/clueboard1/config.h
new file mode 100644
index 000000000..2b20c3873
--- /dev/null
+++ b/keyboard/clueboard1/config.h
@@ -0,0 +1,96 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along 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 0x2301
26#define DEVICE_VER 0x0003
27#define MANUFACTURER Clueboard
28#define PRODUCT Clueboard
29#define DESCRIPTION QMK keyboard firmware for Clueboard
30
31/* key matrix size */
32#define MATRIX_ROWS 5
33#define MATRIX_COLS 16
34
35// COLS: Left to right, ROWS: Top to bottom
36
37/* Column pin configuration
38 * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
39 * pin: B3 F1 F4 F5 F6 C7 C6 B6 B5 B4 D7 D6 D4 F7 B0 B1
40 */
41#define COLS (int []){ B3, F1, F4, F5, F6, C7, C6, B6, B5, B4, D7, D6, D4, F7, B0, B1 }
42
43 /* Row pin configuration
44 * row: 0 1 2 3 4
45 * pin: D1 D0 D2 D5 D3
46 */
47#define ROWS (int []){ D1, D0, D2, D5, D3 }
48
49/* COL2ROW or ROW2COL */
50#define DIODE_DIRECTION COL2ROW
51
52/* define if matrix has ghost */
53//#define MATRIX_HAS_GHOST
54
55/* Set 0 if debouncing isn't needed */
56#define DEBOUNCE 5
57
58/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
59#define LOCKING_SUPPORT_ENABLE
60/* Locking resynchronize hack */
61#define LOCKING_RESYNC_ENABLE
62
63/* key combination for command */
64#define IS_COMMAND() ( \
65 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
66)
67
68/* Underlight configuration
69 */
70 #define ws2812_PORTREG PORTB
71 #define ws2812_DDRREG DDRB
72 #define ws2812_pin 2
73 #define RGBLED_NUM 14 // Number of LEDs
74 #define RGBLIGHT_HUE_STEP 10
75 #define RGBLIGHT_SAT_STEP 17
76 #define RGBLIGHT_VAL_STEP 17
77
78/*
79 * Feature disable options
80 * These options are also useful to firmware size reduction.
81 */
82
83/* disable debug print */
84//#define NO_DEBUG
85
86/* disable print */
87//#define NO_PRINT
88
89/* disable action features */
90//#define NO_ACTION_LAYER
91//#define NO_ACTION_TAPPING
92//#define NO_ACTION_ONESHOT
93//#define NO_ACTION_MACRO
94//#define NO_ACTION_FUNCTION
95
96#endif
diff --git a/keyboard/clueboard1/keymaps/keymap_default.c b/keyboard/clueboard1/keymaps/keymap_default.c
new file mode 100644
index 000000000..3f4f3c414
--- /dev/null
+++ b/keyboard/clueboard1/keymaps/keymap_default.c
@@ -0,0 +1,184 @@
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
18const 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
88enum 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
102const 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
116void 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/keyboard/clueboard1/led.c b/keyboard/clueboard1/led.c
new file mode 100644
index 000000000..f0dd5662d
--- /dev/null
+++ b/keyboard/clueboard1/led.c
@@ -0,0 +1,32 @@
1 /*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#include <avr/io.h>
19#include "stdint.h"
20#include "led.h"
21
22
23void led_set_kb(uint8_t usb_led) {
24 DDRF |= (1<<0);
25 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
26 // Turn capslock on
27 PORTF |= (1<<0);
28 } else {
29 // Turn capslock off
30 PORTF &= ~(1<<0);
31 }
32}
diff --git a/keyboard/clueboard2/Makefile b/keyboard/clueboard2/Makefile
new file mode 100644
index 000000000..788c20487
--- /dev/null
+++ b/keyboard/clueboard2/Makefile
@@ -0,0 +1,140 @@
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# Target file name (without extension).
42TARGET = clueboard2
43
44
45# Directory common source filess exist
46TOP_DIR = ../..
47TMK_DIR = ../../tmk_core
48
49# Directory keyboard dependent files exist
50TARGET_DIR = .
51
52# # project specific files
53SRC = clueboard2.c led.c
54
55ifdef KEYMAP
56 SRC := keymaps/keymap_$(KEYMAP).c $(SRC)
57else
58 SRC := keymaps/keymap_default.c $(SRC)
59endif
60
61CONFIG_H = config.h
62
63# MCU name
64#MCU = at90usb1287
65MCU = atmega32u4
66
67# Processor frequency.
68# This will define a symbol, F_CPU, in all source code files equal to the
69# processor frequency in Hz. You can then use this symbol in your source code to
70# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
71# automatically to create a 32-bit value in your source code.
72#
73# This will be an integer division of F_USB below, as it is sourced by
74# F_USB after it has run through any CPU prescalers. Note that this value
75# does not *change* the processor frequency - it should merely be updated to
76# reflect the processor speed set externally so that the code can use accurate
77# software delays.
78F_CPU = 16000000
79
80
81#
82# LUFA specific
83#
84# Target architecture (see library "Board Types" documentation).
85ARCH = AVR8
86
87# Input clock frequency.
88# This will define a symbol, F_USB, in all source code files equal to the
89# input clock frequency (before any prescaling is performed) in Hz. This value may
90# differ from F_CPU if prescaling is used on the latter, and is required as the
91# raw input clock is fed directly to the PLL sections of the AVR for high speed
92# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
93# at the end, this will be done automatically to create a 32-bit value in your
94# source code.
95#
96# If no clock division is performed on the input clock inside the AVR (via the
97# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
98F_USB = $(F_CPU)
99
100# Interrupt driven control endpoint task(+60)
101OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
102
103
104# Boot Section Size in *bytes*
105# Teensy halfKay 512
106# Teensy++ halfKay 1024
107# Atmel DFU loader 4096
108# LUFA bootloader 4096
109# USBaspLoader 2048
110OPT_DEFS += -DBOOTLOADER_SIZE=4096
111
112
113# Build Options
114# comment out to disable the options.
115#
116BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
117# MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
118EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
119CONSOLE_ENABLE = yes # Console for debug(+400)
120COMMAND_ENABLE = yes # Commands for debug and configuration
121NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
122RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality
123BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
124# MIDI_ENABLE = YES # MIDI controls
125# UNICODE_ENABLE = YES # Unicode
126# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
127
128#ifdef BACKLIGHT_ENABLE
129 SRC := backlight.c $(SRC)
130#endif
131
132# Optimize size but this may cause error "relocation truncated to fit"
133#EXTRALDFLAGS = -Wl,--relax
134
135# Search Path
136VPATH += $(TARGET_DIR)
137VPATH += $(TOP_DIR)
138VPATH += $(TMK_DIR)
139
140include $(TOP_DIR)/quantum/quantum.mk
diff --git a/keyboard/clueboard2/backlight.c b/keyboard/clueboard2/backlight.c
new file mode 100644
index 000000000..5dfa4ba0a
--- /dev/null
+++ b/keyboard/clueboard2/backlight.c
@@ -0,0 +1,41 @@
1
2#include <avr/io.h>
3#include "backlight.h"
4#include "print.h"
5
6/* Clueboard 2.0 LED locations:
7 *
8 * Capslock: B4, pull high to turn on
9 * LCtrl: Shared with Capslock, DO NOT INSTALL LED'S IN BOTH
10 * Page Up: B7, pull high to turn on
11 * Escape: D6, pull high to turn on
12 * Arrows: D4, pull high to turn on
13 */
14
15void init_backlight_pin(void) {
16 print("init_backlight_pin()\n");
17 // Set our LED pins as output
18 DDRD |= (1<<6); // Esc
19 DDRB |= (1<<7); // Page Up
20 DDRD |= (1<<4); // Arrows
21
22 // Set our LED pins low
23 PORTD &= ~(1<<6); // Esc
24 PORTB &= ~(1<<7); // Page Up
25 PORTD &= ~(1<<4); // Arrows
26}
27
28void backlight_set(uint8_t level) {
29 if ( level == 0 ) {
30 // Turn off light
31 PORTD |= (1<<6); // Esc
32 PORTB |= (1<<7); // Page Up
33 PORTD |= (1<<4); // Arrows
34 } else {
35 // Turn on light
36 PORTD &= ~(1<<6); // Esc
37 PORTB &= ~(1<<7); // Page Up
38 PORTD &= ~(1<<4); // Arrows
39 }
40}
41
diff --git a/keyboard/clueboard2/clueboard2.c b/keyboard/clueboard2/clueboard2.c
new file mode 100644
index 000000000..437f8d1e4
--- /dev/null
+++ b/keyboard/clueboard2/clueboard2.c
@@ -0,0 +1,44 @@
1#include "clueboard2.h"
2
3#ifdef BACKLIGHT_ENABLE
4#include "backlight.h"
5#endif
6
7__attribute__ ((weak))
8void matrix_init_user(void) {
9 // leave these blank
10};
11
12__attribute__ ((weak))
13void matrix_scan_user(void) {
14 // leave these blank
15};
16
17void matrix_init_kb(void) {
18 // put your keyboard start-up code here
19 // runs once when the firmware starts up
20 if (matrix_init_user) {
21 (*matrix_init_user)();
22 }
23 led_init_ports();
24
25 #ifdef BACKLIGHT_ENABLE
26 init_backlight_pin();
27 #endif
28
29 #ifdef RGBLIGHT_ENABLE
30 rgblight_init();
31 #endif
32
33 // JTAG disable for PORT F. write JTD bit twice within four cycles.
34 MCUCR |= (1<<JTD);
35 MCUCR |= (1<<JTD);
36};
37
38void matrix_scan_kb(void) {
39 // put your looping keyboard code here
40 // runs every cycle (a lot)
41 if (matrix_scan_user) {
42 (*matrix_scan_user)();
43 }
44};
diff --git a/keyboard/clueboard2/clueboard2.h b/keyboard/clueboard2/clueboard2.h
new file mode 100644
index 000000000..9f0d42d2b
--- /dev/null
+++ b/keyboard/clueboard2/clueboard2.h
@@ -0,0 +1,57 @@
1#ifndef CLUEBOARD2_H
2#define CLUEBOARD2_H
3
4#include "matrix.h"
5#include "keymap_common.h"
6#include <stddef.h>
7
8
9/* Clueboard matrix layout
10 * ,-----------------------------------------------------------. ,---.
11 * | 00| 01| 02| 03| 04| 05| 06| 07| 50| 51| 52| 53| 54| 55| 56| | 57|
12 * |-----------------------------------------------------------| |---|
13 * | 10| 11| 12| 13| 14| 15| 16| 17| 60| 61| 62| 63| 64| 65| | 67|
14 * |-----------------------------------------------------------| `---'
15 * | 20| 21| 22| 23| 24| 25| 26| 27| 70| 71| 72| 73| 74| 75|
16 * |------------------------------------------------------------.
17 * | 30| 31| 32| 33| 34| 35| 36| 37| 80| 81| 82| 83| 84| 85|86|
18 * |------------------------------------------------------------------.
19 * | 40| 41| 42| 43| 45| 46| 90| 91| 92| 93| 94| 95| 96|
20 * `------------------------------------------------------------------'
21 * ,-----------------------------------------------------------. ,---.
22 * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Yen| BS| |Ins|
23 * |-----------------------------------------------------------| |---|
24 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|
25 * |-----------------------------------------------------------| `---'
26 * |Caps | A| S| D| F| G| H| J| k| L| ;| '| # | Ent|
27 * |--------------------------------------------------------------.
28 * |Shift| \| Z| X| C| V| B| N| M| ,| .| /| \|Shift| Up|
29 * |------------------------------------------------------------------.
30 * |Ctrl|Alt|Gui |MHen| Space| Space|Henk|Gui |Ctrl| Fn|Left|Down|Rgt|
31 * `------------------------------------------------------------------'
32 */
33// The first section contains all of the arguments
34// The second converts the arguments into a two-dimensional array
35#define KEYMAP( \
36 k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k55, k56, k57, \
37 k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \
38 k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k74, k75, \
39 k30, k31, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k84, k85, k86, \
40 k40, k41, k42, k43, k45, k46, k90, k92, k93, k94, k95, k96, k97 \
41) { \
42 { k00, k01, k02, k03, k04, k05, k06, k07 }, \
43 { k10, k11, k12, k13, k14, k15, k16, k17 }, \
44 { k20, k21, k22, k23, k24, k25, k26, k27 }, \
45 { k30, k31, k32, k33, k34, k35, k36, k37 }, \
46 { k40, k41, k42, k43, KC_NO, k45, k46, KC_NO }, \
47 { k50, k51, k52, k53, k54, k55, k56, k57 }, \
48 { k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \
49 { k70, k71, k72, k73, k74, k75, KC_NO, KC_NO }, \
50 { k80, k81, k82, k83, k84, k85, k86, KC_NO }, \
51 { k90, KC_NO, k92, k93, k94, k95, k96, k97 } \
52}
53
54void matrix_init_user(void);
55void matrix_scan_user(void);
56
57#endif
diff --git a/keyboard/clueboard2/config.h b/keyboard/clueboard2/config.h
new file mode 100644
index 000000000..04166c20f
--- /dev/null
+++ b/keyboard/clueboard2/config.h
@@ -0,0 +1,100 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along 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// COLS: Left to right, ROWS: Top to bottom
36
37/* Column pin configuration
38 * col: 0 1 2 3 4 5 6 7
39 * pin: F0 F1 F4 F5 F6 F7 E6 B1
40 */
41#define COLS (int []){ F0, F1, F4, F5, F6, F7, E6, B1 }
42
43 /* Row pin configuration
44 * row: 0 1 2 3 4 5 6 7 8 9
45 * pin: B2 C7 C6 B6 B5 B0 B3 D5 D3 D2
46 */
47#define ROWS (int []){ B2, C7, C6, B6, B5, B0, B3, D5, D3, D2 }
48
49/* COL2ROW or ROW2COL */
50#define DIODE_DIRECTION COL2ROW
51
52/* define if matrix has ghost */
53//#define MATRIX_HAS_GHOST
54
55/* Set 0 if debouncing isn't needed */
56#define DEBOUNCE 5
57
58/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
59#define LOCKING_SUPPORT_ENABLE
60/* Locking resynchronize hack */
61#define LOCKING_RESYNC_ENABLE
62
63/* key combination for command */
64#define IS_COMMAND() ( \
65 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
66)
67
68/* Backlight configuration
69 */
70#define BACKLIGHT_LEVELS 1
71
72/* Underlight configuration
73 */
74 #define ws2812_PORTREG PORTD
75 #define ws2812_DDRREG DDRD
76 #define ws2812_pin 7
77 #define RGBLED_NUM 14 // Number of LEDs
78 #define RGBLIGHT_HUE_STEP 10
79 #define RGBLIGHT_SAT_STEP 17
80 #define RGBLIGHT_VAL_STEP 17
81
82/*
83 * Feature disable options
84 * These options are also useful to firmware size reduction.
85 */
86
87/* disable debug print */
88//#define NO_DEBUG
89
90/* disable print */
91//#define NO_PRINT
92
93/* disable action features */
94//#define NO_ACTION_LAYER
95//#define NO_ACTION_TAPPING
96//#define NO_ACTION_ONESHOT
97//#define NO_ACTION_MACRO
98//#define NO_ACTION_FUNCTION
99
100#endif
diff --git a/keyboard/clueboard2/keymaps/keymap_default.c b/keyboard/clueboard2/keymaps/keymap_default.c
new file mode 100644
index 000000000..73179f94c
--- /dev/null
+++ b/keyboard/clueboard2/keymaps/keymap_default.c
@@ -0,0 +1,183 @@
1#include "clueboard2.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
18const 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
88enum 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
102const 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
116void 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 break;
146 case RGBLED_INCREASE_HUE:
147 if (record->event.pressed) {
148 rgblight_increase_hue();
149 }
150 break;
151 case RGBLED_DECREASE_HUE:
152 if (record->event.pressed) {
153 rgblight_decrease_hue();
154 }
155 break;
156 case RGBLED_INCREASE_SAT:
157 if (record->event.pressed) {
158 rgblight_increase_sat();
159 }
160 break;
161 case RGBLED_DECREASE_SAT:
162 if (record->event.pressed) {
163 rgblight_decrease_sat();
164 }
165 break;
166 case RGBLED_INCREASE_VAL:
167 if (record->event.pressed) {
168 rgblight_increase_val();
169 }
170 break;
171 case RGBLED_DECREASE_VAL:
172 if (record->event.pressed) {
173 rgblight_decrease_val();
174 }
175 break;
176 case RGBLED_STEP_MODE:
177 if (record->event.pressed) {
178 rgblight_step();
179 }
180 break;
181 #endif
182 }
183}
diff --git a/keyboard/clueboard2/keymaps/keymap_max.c b/keyboard/clueboard2/keymaps/keymap_max.c
new file mode 100644
index 000000000..714d6390d
--- /dev/null
+++ b/keyboard/clueboard2/keymaps/keymap_max.c
@@ -0,0 +1,147 @@
1#include "clueboard2.h"
2
3#ifdef ENABLE_RGBLIGHT
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
18const 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| Alt| Gui| MHen| Space| Space| Hen| Gui| Alt| Ctrl|Left|Down|Rght|
30 * `----------------------------------------------------------------------------------'
31 */
32[_BL] = KEYMAP(
33 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_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 MO(_FL), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL), KC_UP, \
37 KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, KC_RCTL, 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_TRNS,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 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), KC_PGUP, \
57 KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END),
58
59 /* Keymap _RS: Reset/Underlight layer
60 * ,--------------------------------------------------------------------------. ,----.
61 * | | | | | | | | | | | | | | | | | |
62 * |--------------------------------------------------------------------------| |----|
63 * | | | | |RESET| | | | | | | | | | | |
64 * |--------------------------------------------------------------------------| `----'
65 * | | | _RS| | | | | | | | | | | |
66 * |-----------------------------------------------------------------------------.
67 * | | | | | | | | | | | | | | | |
68 * |------------------------------------------------------------------------|----|----.
69 * | | | | | | | | | | _FL| | | |
70 * `----------------------------------------------------------------------------------'
71 */
72[_RS] = KEYMAP(
73 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(0), F(6), \
74 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(7), \
75 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, \
76 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(4), \
77 KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, F(1), F(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(3), F(5), F(2)),
78};
79
80enum function_id {
81 RGBLED_TOGGLE,
82 RGBLED_STEP_MODE,
83 RGBLED_INCREASE_HUE,
84 RGBLED_DECREASE_HUE,
85 RGBLED_INCREASE_SAT,
86 RGBLED_DECREASE_SAT,
87 RGBLED_INCREASE_VAL,
88 RGBLED_DECREASE_VAL,
89};
90
91const uint16_t PROGMEM fn_actions[] = {
92 [0] = ACTION_FUNCTION(RGBLED_TOGGLE),
93 [1] = ACTION_FUNCTION(RGBLED_STEP_MODE),
94 [2] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
95 [3] = ACTION_FUNCTION(RGBLED_DECREASE_HUE),
96 [4] = ACTION_FUNCTION(RGBLED_INCREASE_SAT),
97 [5] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
98 [6] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
99 [7] = ACTION_FUNCTION(RGBLED_DECREASE_VAL),
100};
101
102void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
103 switch (id) {
104 case RGBLED_TOGGLE:
105 //led operations
106 if (record->event.pressed) {
107 rgblight_toggle();
108 }
109
110 break;
111 case RGBLED_INCREASE_HUE:
112 if (record->event.pressed) {
113 rgblight_increase_hue();
114 }
115 break;
116 case RGBLED_DECREASE_HUE:
117 if (record->event.pressed) {
118 rgblight_decrease_hue();
119 }
120 break;
121 case RGBLED_INCREASE_SAT:
122 if (record->event.pressed) {
123 rgblight_increase_sat();
124 }
125 break;
126 case RGBLED_DECREASE_SAT:
127 if (record->event.pressed) {
128 rgblight_decrease_sat();
129 }
130 break;
131 case RGBLED_INCREASE_VAL:
132 if (record->event.pressed) {
133 rgblight_increase_val();
134 }
135 break;
136 case RGBLED_DECREASE_VAL:
137 if (record->event.pressed) {
138 rgblight_decrease_val();
139 }
140 break;
141 case RGBLED_STEP_MODE:
142 if (record->event.pressed) {
143 rgblight_step();
144 }
145 break;
146 }
147}
diff --git a/keyboard/clueboard2/keymaps/keymap_skully.c b/keyboard/clueboard2/keymaps/keymap_skully.c
new file mode 100644
index 000000000..74a03f2f3
--- /dev/null
+++ b/keyboard/clueboard2/keymaps/keymap_skully.c
@@ -0,0 +1,108 @@
1#include "clueboard2.h"
2
3// Used for SHIFT_ESC
4#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
5
6// Each layer gets a name for readability, which is then used in the keymap matrix below.
7// The underscores don't mean anything - you can have a layer called STUFF or any other name.
8// Layer names don't all need to be of the same length, obviously, and you can also skip them
9// entirely and just use numbers.
10#define _BL 0
11#define _FL 1
12#define _RS 2
13
14const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
15 /* Keymap _BL: (Base Layer) Default Layer
16 * ,--------------------------------------------------------------------------. ,----.
17 * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| BS| |PGUP|
18 * |--------------------------------------------------------------------------| |----|
19 * | Tab| Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |PGDN|
20 * |--------------------------------------------------------------------------| `----'
21 * |Capslck| A| S| D| F| G| H| J| K| L| ;| '| # | Ent|
22 * |-----------------------------------------------------------------------------.
23 * |Shift| BS| Z| X| C| V| B| N| M| ,| .| /| BS|Shift| UP|
24 * |------------------------------------------------------------------------|----|----.
25 * | Ctrl| Gui| Alt| MHen| Space| Space| Hen| Alt| Ctrl| _FL|LEFT|DOWN|RGHT|
26 * `----------------------------------------------------------------------------------'
27 */
28[_BL] = KEYMAP(
29 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, \
30 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, \
31 KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \
32 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, \
33 KC_LCTL,KC_LALT,KC_LGUI,MO(_FL), KC_SPC, KC_SPC, MO(_FL), KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT),
34
35 /* Keymap _FL: Function Layer
36 * ,--------------------------------------------------------------------------. ,----.
37 * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN|
38 * |--------------------------------------------------------------------------| |----|
39 * | | | | | | | | |PScr|SLck|Paus| | | | |BLDE|
40 * |--------------------------------------------------------------------------| `----'
41 * | | | _RS| | | | | | | | | | | |
42 * |-----------------------------------------------------------------------------.
43 * | | | | | | | | | | | | | | |PGUP|
44 * |------------------------------------------------------------------------|----|----.
45 * | | | | | | | | | | _FL|HOME|PGDN| END|
46 * `----------------------------------------------------------------------------------'
47 */
48[_FL] = KEYMAP(
49 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, \
50 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, \
51 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, \
52 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, \
53 KC_TRNS,KC_TRNS,KC_TRNS,MO(_FL), KC_TRNS,KC_TRNS, MO(_FL),KC_TRNS,KC_TRNS,MO(_FL),KC_HOME,KC_PGDN,KC_END),
54
55 /* Keymap _RS: Reset layer
56 * ,--------------------------------------------------------------------------. ,----.
57 * | | | | | | | | | | | | | | | | | |
58 * |--------------------------------------------------------------------------| |----|
59 * | | | | |RESET| | | | | | | | | | | |
60 * |--------------------------------------------------------------------------| `----'
61 * | | | _RS| | | | | | | | | | | |
62 * |-----------------------------------------------------------------------------.
63 * | | | | | | | | | | | | | | | |
64 * |------------------------------------------------------------------------|----|----.
65 * | | | | | | | | | | _FL| | | |
66 * `----------------------------------------------------------------------------------'
67 */
68[_RS] = KEYMAP(
69 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, \
70 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, \
71 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, \
72 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, \
73 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),
74};
75
76enum function_id {
77 SHIFT_ESC,
78};
79
80const uint16_t PROGMEM fn_actions[] = {
81 [0] = ACTION_FUNCTION(SHIFT_ESC),
82};
83
84void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
85 static uint8_t shift_esc_shift_mask;
86 switch (id) {
87 case SHIFT_ESC:
88 shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
89 if (record->event.pressed) {
90 if (shift_esc_shift_mask) {
91 add_key(KC_GRV);
92 send_keyboard_report();
93 } else {
94 add_key(KC_ESC);
95 send_keyboard_report();
96 }
97 } else {
98 if (shift_esc_shift_mask) {
99 del_key(KC_GRV);
100 send_keyboard_report();
101 } else {
102 del_key(KC_ESC);
103 send_keyboard_report();
104 }
105 }
106 break;
107 }
108}
diff --git a/keyboard/clueboard2/led.c b/keyboard/clueboard2/led.c
new file mode 100644
index 000000000..3d074e5d2
--- /dev/null
+++ b/keyboard/clueboard2/led.c
@@ -0,0 +1,36 @@
1 /*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#include <avr/io.h>
19#include "stdint.h"
20#include "led.h"
21
22
23void led_init_ports() {
24 // * Set our LED pins as output
25 DDRB |= (1<<4);
26}
27
28void led_set_kb(uint8_t usb_led) {
29 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
30 // Turn capslock on
31 PORTB |= (1<<4);
32 } else {
33 // Turn capslock off
34 PORTB &= ~(1<<4);
35 }
36}
diff --git a/keyboard/cluepad/Makefile b/keyboard/cluepad/Makefile
new file mode 100644
index 000000000..cfa130d75
--- /dev/null
+++ b/keyboard/cluepad/Makefile
@@ -0,0 +1,136 @@
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# Target file name (without extension).
42TARGET = cluepad
43
44
45# Directory common source filess exist
46TOP_DIR = ../..
47TMK_DIR = ../../tmk_core
48
49# Directory keyboard dependent files exist
50TARGET_DIR = .
51
52# # project specific files
53SRC = cluepad.c backlight.c
54
55ifdef KEYMAP
56 SRC := keymaps/keymap_$(KEYMAP).c $(SRC)
57else
58 SRC := keymaps/keymap_default.c $(SRC)
59endif
60
61CONFIG_H = config.h
62
63# MCU name
64#MCU = at90usb1287
65MCU = atmega32u4
66
67# Processor frequency.
68# This will define a symbol, F_CPU, in all source code files equal to the
69# processor frequency in Hz. You can then use this symbol in your source code to
70# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
71# automatically to create a 32-bit value in your source code.
72#
73# This will be an integer division of F_USB below, as it is sourced by
74# F_USB after it has run through any CPU prescalers. Note that this value
75# does not *change* the processor frequency - it should merely be updated to
76# reflect the processor speed set externally so that the code can use accurate
77# software delays.
78F_CPU = 16000000
79
80
81#
82# LUFA specific
83#
84# Target architecture (see library "Board Types" documentation).
85ARCH = AVR8
86
87# Input clock frequency.
88# This will define a symbol, F_USB, in all source code files equal to the
89# input clock frequency (before any prescaling is performed) in Hz. This value may
90# differ from F_CPU if prescaling is used on the latter, and is required as the
91# raw input clock is fed directly to the PLL sections of the AVR for high speed
92# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
93# at the end, this will be done automatically to create a 32-bit value in your
94# source code.
95#
96# If no clock division is performed on the input clock inside the AVR (via the
97# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
98F_USB = $(F_CPU)
99
100# Interrupt driven control endpoint task(+60)
101OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
102
103
104# Boot Section Size in *bytes*
105# Teensy halfKay 512
106# Teensy++ halfKay 1024
107# Atmel DFU loader 4096
108# LUFA bootloader 4096
109# USBaspLoader 2048
110OPT_DEFS += -DBOOTLOADER_SIZE=4096
111
112
113# Build Options
114# comment out to disable the options.
115#
116BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
117# MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
118EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
119CONSOLE_ENABLE = yes # Console for debug(+400)
120COMMAND_ENABLE = yes # Commands for debug and configuration
121NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
122BACKLIGHT_ENABLE = yes # Enable numpad's backlight functionality
123RGBLIGHT_ENABLE = yes
124# MIDI_ENABLE = YES # MIDI controls
125# UNICODE_ENABLE = YES # Unicode
126# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
127
128# Optimize size but this may cause error "relocation truncated to fit"
129#EXTRALDFLAGS = -Wl,--relax
130
131# Search Path
132VPATH += $(TARGET_DIR)
133VPATH += $(TOP_DIR)
134VPATH += $(TMK_DIR)
135
136include $(TOP_DIR)/quantum/quantum.mk
diff --git a/keyboard/cluepad/backlight.c b/keyboard/cluepad/backlight.c
new file mode 100644
index 000000000..a9caed1df
--- /dev/null
+++ b/keyboard/cluepad/backlight.c
@@ -0,0 +1,54 @@
1#include <avr/io.h>
2#include "backlight.h"
3#include "led.h"
4
5#include "print.h"
6
7int pwm_level;
8
9void led_set_kb(uint8_t usb_led)
10{
11 print("led_set\n");
12}
13
14void 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
26void 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/keyboard/cluepad/cluepad.c b/keyboard/cluepad/cluepad.c
new file mode 100644
index 000000000..d55b99960
--- /dev/null
+++ b/keyboard/cluepad/cluepad.c
@@ -0,0 +1,39 @@
1#include "cluepad.h"
2
3__attribute__ ((weak))
4void matrix_init_user(void) {
5 // leave these blank
6};
7
8__attribute__ ((weak))
9void matrix_scan_user(void) {
10 // leave these blank
11};
12
13void matrix_init_kb(void) {
14 // put your keyboard start-up code here
15 // runs once when the firmware starts up
16 if (matrix_init_user) {
17 (*matrix_init_user)();
18 }
19
20 #ifdef BACKLIGHT_ENABLE
21 init_backlight_pin();
22 #endif
23
24 #ifdef RGBLIGHT_ENABLE
25 rgblight_init();
26 #endif
27
28 // JTAG disable for PORT F. write JTD bit twice within four cycles.
29 MCUCR |= (1<<JTD);
30 MCUCR |= (1<<JTD);
31};
32
33void matrix_scan_kb(void) {
34 // put your looping keyboard code here
35 // runs every cycle (a lot)
36 if (matrix_scan_user) {
37 (*matrix_scan_user)();
38 }
39};
diff --git a/keyboard/cluepad/cluepad.h b/keyboard/cluepad/cluepad.h
new file mode 100644
index 000000000..36bf591e4
--- /dev/null
+++ b/keyboard/cluepad/cluepad.h
@@ -0,0 +1,41 @@
1#ifndef CLUEPAD_H
2#define CLUEPAD_H
3
4#include "matrix.h"
5#include "keymap_common.h"
6#include <stddef.h>
7
8
9/* Cluepad matrix layout
10 * .-------------------.
11 * |NLCK| /| *| -|
12 * |-------------------|
13 * | 7| 8| 9| |
14 * |--------------| |
15 * | 4| 5| 6| +|
16 * |-------------------|
17 * | 1| 2| 3| |
18 * |--------------| |
19 * | 0| .| Ent|
20 * '-------------------'
21 */
22// The first section contains all of the arguments
23// The second converts the arguments into a two-dimensional array
24#define KEYMAP( \
25 k00, k01, k02, k03, \
26 k10, k11, k12, k13, \
27 k20, k21, k22, \
28 k30, k31, k32, k33, \
29 k40, k42 \
30) { \
31 { k00, k01, k02, k03, }, \
32 { k10, k11, k12, k13, }, \
33 { k20, k21, k22, KC_NO, }, \
34 { k30, k31, k32, k33, }, \
35 { k40, KC_NO, k42, KC_NO } \
36}
37
38void matrix_init_user(void);
39void matrix_scan_user(void);
40
41#endif
diff --git a/keyboard/cluepad/config.h b/keyboard/cluepad/config.h
new file mode 100644
index 000000000..5ed421a6e
--- /dev/null
+++ b/keyboard/cluepad/config.h
@@ -0,0 +1,102 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along 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 0x2312
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Clueboard
28#define PRODUCT Cluepad with RGB Underlighting
29#define DESCRIPTION QMK keyboard firmware for Cluepad
30
31/* key matrix size */
32#define MATRIX_ROWS 5
33#define MATRIX_COLS 4
34
35// COLS: Left to right, ROWS: Top to bottom
36
37/* Column pin configuration
38 * col: 0 1 2 3
39 * pin: F4 E6 B1 D2
40 */
41#define COLS (int []){ F4, E6, B1, D2 }
42
43 /* Row pin configuration
44 * row: 0 1 2 3 4
45 * pin:
46 */
47#define ROWS (int []){ B0, D3, D5, D4, D6 }
48
49/* COL2ROW or ROW2COL */
50#define DIODE_DIRECTION COL2ROW
51
52/* define if matrix has ghost */
53//#define MATRIX_HAS_GHOST
54
55/* Set 0 if debouncing isn't needed */
56#define DEBOUNCE 5
57
58/* Number of backlighting levels */
59#define BACKLIGHT_LEVELS 3
60
61/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
62#define LOCKING_SUPPORT_ENABLE
63/* Locking resynchronize hack */
64#define LOCKING_RESYNC_ENABLE
65
66/* key combination for command */
67#define IS_COMMAND() ( \
68 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
69)
70
71/* Underlight configuration
72 */
73 #define ws2812_PORTREG PORTF
74 #define ws2812_DDRREG DDRF
75 #define ws2812_pin 6
76 #define RGBLED_NUM 4 // 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/* Debug forcibly enabled */
90#define ALWAYS_DEBUG
91
92/* disable print */
93//#define NO_PRINT
94
95/* disable action features */
96//#define NO_ACTION_LAYER
97//#define NO_ACTION_TAPPING
98//#define NO_ACTION_ONESHOT
99//#define NO_ACTION_MACRO
100//#define NO_ACTION_FUNCTION
101
102#endif
diff --git a/keyboard/cluepad/keymaps/keymap_default.c b/keyboard/cluepad/keymaps/keymap_default.c
new file mode 100644
index 000000000..8ba49952f
--- /dev/null
+++ b/keyboard/cluepad/keymaps/keymap_default.c
@@ -0,0 +1,122 @@
1#include "cluepad.h"
2
3#include "backlight.h"
4#include "rgblight.h"
5
6// Each layer gets a name for readability, which is then used in the keymap matrix below.
7// The underscores don't mean anything - you can have a layer called STUFF or any other name.
8// Layer names don't all need to be of the same length, obviously, and you can also skip them
9// entirely and just use numbers.
10#define _BL 0
11#define _FL 1
12#define _RS 2
13
14const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
15 /* Keymap _BL: (Base Layer) Default Layer
16 * .-------------------.
17 * |NL F| /| *| -|
18 * |-------------------|
19 * | 7| 8| 9| |
20 * |--------------| |
21 * | 4| 5| 6| +|
22 * |-------------------|
23 * | 1| 2| 3| |
24 * |--------------| |
25 * | 0| .| Ent|
26 * '-------------------'
27 */
28[_BL] = KEYMAP(
29 LT(_FL, KC_NLCK), KC_PSLS, KC_PAST, KC_PMNS, \
30 KC_P7, KC_P8, KC_P9, KC_PPLS, \
31 KC_P4, KC_P5, KC_P6, \
32 KC_P1, KC_P2, KC_P3, KC_PENT, \
33 KC_P0, KC_PDOT),
34
35 /* Keymap _FL: Function Layer
36 * .-------------------.
37 * |NL F| | | Fn0|
38 * |-------------------|
39 * | | Fn4| | |
40 * |--------------| |
41 * | Fn3|BL_S| Fn2| Fn6|
42 * |-------------------|
43 * | | Fn5| | |
44 * |--------------| |
45 * | Fn1| | Fn7|
46 * '-------------------'
47 */
48[_FL] = KEYMAP(
49 LT(_FL, KC_NLCK), KC_TRNS, KC_TRNS, F(0), \
50 KC_TRNS, F(4), KC_TRNS, F(6), \
51 F(3), BL_STEP, F(2), \
52 KC_TRNS, F(5), KC_TRNS, F(7), \
53 F(1), KC_TRNS)
54};
55
56enum function_id {
57 RGBLED_TOGGLE,
58 RGBLED_STEP_MODE,
59 RGBLED_INCREASE_HUE,
60 RGBLED_DECREASE_HUE,
61 RGBLED_INCREASE_SAT,
62 RGBLED_DECREASE_SAT,
63 RGBLED_INCREASE_VAL,
64 RGBLED_DECREASE_VAL,
65};
66
67const uint16_t PROGMEM fn_actions[] = {
68 [0] = ACTION_FUNCTION(RGBLED_TOGGLE),
69 [1] = ACTION_FUNCTION(RGBLED_STEP_MODE),
70 [2] = ACTION_FUNCTION(RGBLED_INCREASE_HUE),
71 [3] = ACTION_FUNCTION(RGBLED_DECREASE_HUE),
72 [4] = ACTION_FUNCTION(RGBLED_INCREASE_SAT),
73 [5] = ACTION_FUNCTION(RGBLED_DECREASE_SAT),
74 [6] = ACTION_FUNCTION(RGBLED_INCREASE_VAL),
75 [7] = ACTION_FUNCTION(RGBLED_DECREASE_VAL),
76};
77
78void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
79 switch (id) {
80 case RGBLED_TOGGLE:
81 if (record->event.pressed) {
82 rgblight_toggle();
83 }
84 break;
85 case RGBLED_INCREASE_HUE:
86 if (record->event.pressed) {
87 rgblight_increase_hue();
88 }
89 break;
90 case RGBLED_DECREASE_HUE:
91 if (record->event.pressed) {
92 rgblight_decrease_hue();
93 }
94 break;
95 case RGBLED_INCREASE_SAT:
96 if (record->event.pressed) {
97 rgblight_increase_sat();
98 }
99 break;
100 case RGBLED_DECREASE_SAT:
101 if (record->event.pressed) {
102 rgblight_decrease_sat();
103 }
104 break;
105 case RGBLED_INCREASE_VAL:
106 if (record->event.pressed) {
107 rgblight_increase_val();
108 }
109 break;
110 case RGBLED_DECREASE_VAL:
111 if (record->event.pressed) {
112 rgblight_decrease_val();
113 }
114 break;
115 case RGBLED_STEP_MODE:
116 if (record->event.pressed) {
117 rgblight_step();
118 }
119 break;
120 }
121}
122
diff --git a/new_project.sh b/new_project.sh
index 28de9c2f9..7def54318 100755
--- a/new_project.sh
+++ b/new_project.sh
@@ -2,6 +2,11 @@
2# Script to make a new quantum project 2# Script to make a new quantum project
3# Jack Humbert 2015 3# Jack Humbert 2015
4 4
5if [ -z "$1" ]; then
6 echo "Usage: $0 <keyboard_name>"
7 exit 1
8fi
9
5KEYBOARD=$1 10KEYBOARD=$1
6KEYBOARD_UPPERCASE=$(echo $1 | awk '{print toupper($0)}') 11KEYBOARD_UPPERCASE=$(echo $1 | awk '{print toupper($0)}')
7 12
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index 5623c65de..789af73d8 100644
--- a/quantum/rgblight.c
+++ b/quantum/rgblight.c
@@ -189,8 +189,13 @@ void rgblight_mode(uint8_t mode) {
189 } else { 189 } else {
190 rgblight_config.mode = mode; 190 rgblight_config.mode = mode;
191 } 191 }
192<<<<<<< HEAD
192 eeconfig_update_rgblight(rgblight_config.raw); 193 eeconfig_update_rgblight(rgblight_config.raw);
193 dprintf("rgblight mode: %u\n", rgblight_config.mode); 194 dprintf("rgblight mode: %u\n", rgblight_config.mode);
195=======
196 eeconfig_write_rgblight(rgblight_config.raw);
197 xprintf("rgblight mode: %u\n", rgblight_config.mode);
198>>>>>>> pr/286
194 if (rgblight_config.mode == 1) { 199 if (rgblight_config.mode == 1) {
195 rgblight_timer_disable(); 200 rgblight_timer_disable();
196 } else if (rgblight_config.mode >=2 && rgblight_config.mode <=23) { 201 } else if (rgblight_config.mode >=2 && rgblight_config.mode <=23) {
@@ -207,7 +212,7 @@ void rgblight_mode(uint8_t mode) {
207void rgblight_toggle(void) { 212void rgblight_toggle(void) {
208 rgblight_config.enable ^= 1; 213 rgblight_config.enable ^= 1;
209 eeconfig_update_rgblight(rgblight_config.raw); 214 eeconfig_update_rgblight(rgblight_config.raw);
210 dprintf("rgblight toggle: rgblight_config.enable = %u\n", rgblight_config.enable); 215 xprintf("rgblight toggle: rgblight_config.enable = %u\n", rgblight_config.enable);
211 if (rgblight_config.enable) { 216 if (rgblight_config.enable) {
212 rgblight_mode(rgblight_config.mode); 217 rgblight_mode(rgblight_config.mode);
213 } else { 218 } else {
@@ -300,7 +305,7 @@ void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val){
300 rgblight_config.sat = sat; 305 rgblight_config.sat = sat;
301 rgblight_config.val = val; 306 rgblight_config.val = val;
302 eeconfig_update_rgblight(rgblight_config.raw); 307 eeconfig_update_rgblight(rgblight_config.raw);
303 dprintf("rgblight set hsv [EEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val); 308 xprintf("rgblight set hsv [EEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val);
304 } 309 }
305} 310}
306 311