mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-09-10 17:15:43 +00:00
Compare commits
10 Commits
0.6.369
...
arm-dac-wo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f52faeb5d6 | ||
|
|
bfe468ef1d | ||
|
|
474d100b56 | ||
|
|
208bee10f2 | ||
|
|
3e6478b0bb | ||
|
|
3e1826a332 | ||
|
|
73853d651a | ||
|
|
dfb401b950 | ||
|
|
9632b3379f | ||
|
|
6241f3f3b7 |
@@ -30,11 +30,9 @@ Configure the hardware via your `config.h`:
|
||||
#define DRIVER_COUNT 2
|
||||
#define DRIVER_1_LED_TOTAL 25
|
||||
#define DRIVER_2_LED_TOTAL 24
|
||||
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
|
||||
```
|
||||
|
||||
!> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`.
|
||||
|
||||
Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations.
|
||||
|
||||
Define these arrays listing all the LEDs in your `<keyboard>.c`:
|
||||
@@ -126,25 +124,21 @@ Configure the hardware via your `config.h`:
|
||||
|
||||
---
|
||||
|
||||
From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example:
|
||||
From this point forward the configuration is the same for all the drivers. The struct rgb_led array tells the system for each led, what key electrical matrix it represents, what the physical position is on the board, and if the led is for a modifier key or not. Here is a brief example:
|
||||
|
||||
```C
|
||||
const led_config_t g_led_config = { {
|
||||
// Key Matrix to LED Index
|
||||
{ 5, NO_LED, NO_LED, 0 },
|
||||
{ NO_LED, NO_LED, NO_LED, NO_LED },
|
||||
{ 4, NO_LED, NO_LED, 1 },
|
||||
{ 3, NO_LED, NO_LED, 2 }
|
||||
}, {
|
||||
// LED Index to Physical Position
|
||||
{ 188, 16 }, { 187, 48 }, { 149, 64 }, { 112, 64 }, { 37, 48 }, { 38, 16 }
|
||||
}, {
|
||||
// LED Index to Flag
|
||||
1, 4, 4, 4, 4, 1
|
||||
} };
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
/* {row | col << 4}
|
||||
* | {x=0..224, y=0..64}
|
||||
* | | flags
|
||||
* | | | */
|
||||
{{0|(0<<4)}, {20.36*0, 21.33*0}, 1},
|
||||
{{0|(1<<4)}, {20.36*1, 21.33*0}, 4},
|
||||
....
|
||||
}
|
||||
```
|
||||
|
||||
The first part, `// Key Matrix to LED Index`, tells the system what key this LED represents by using the key's electrical matrix row & col. The second part, `// LED Index to Physical Position` represents the LED's physical position on the keyboard. The first value, `x`, is between 0-224 (inclusive), and the second value, `y`, is between 0-64 (inclusive). This range is due to effect that calculate the center or halves for their animations. The easiest way to calculate these positions is imagine your keyboard is a grid, and the top left of the keyboard represents x, y coordinate 0, 0 and the bottom right of your keyboard represents 224, 64. Using this as a basis, you can use the following formula to calculate the physical position:
|
||||
The first part, `{row | col << 4}`, tells the system what key this LED represents by using the key's electrical matrix row & col. The second part, `{x=0..224, y=0..64}` represents the LED's physical position on the keyboard. The `x` is between (inclusive) 0-224, and `y` is between (inclusive) 0-64 as the effects are based on this range. The easiest way to calculate these positions is imagine your keyboard is a grid, and the top left of the keyboard represents x, y coordinate 0, 0 and the bottom right of your keyboard represents 224, 64. Using this as a basis, you can use the following formula to calculate the physical position:
|
||||
|
||||
```C
|
||||
x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION
|
||||
@@ -153,7 +147,7 @@ y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION
|
||||
|
||||
Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout.
|
||||
|
||||
`// LED Index to Flag` is a bitmask, whether or not a certain LEDs is of a certain type. It is recommended that LEDs are set to only 1 type.
|
||||
`flags` is a bitmask, whether or not a certain LEDs is of a certain type. It is recommended that LEDs are set to only 1 type.
|
||||
|
||||
## Flags
|
||||
|
||||
@@ -161,8 +155,8 @@ Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based
|
||||
|------------------------------------|-------------------------------------------|
|
||||
|`#define HAS_FLAGS(bits, flags)` |Returns true if `bits` has all `flags` set.|
|
||||
|`#define HAS_ANY_FLAGS(bits, flags)`|Returns true if `bits` has any `flags` set.|
|
||||
|`#define LED_FLAG_NONE 0x00` |If this LED has no flags. |
|
||||
|`#define LED_FLAG_ALL 0xFF` |If this LED has all flags. |
|
||||
|`#define LED_FLAG_NONE 0x00` |If thes LED has no flags. |
|
||||
|`#define LED_FLAG_ALL 0xFF` |If thes LED has all flags. |
|
||||
|`#define LED_FLAG_MODIFIER 0x01` |If the Key for this LED is a modifier. |
|
||||
|`#define LED_FLAG_UNDERGLOW 0x02` |If the LED is for underglow. |
|
||||
|`#define LED_FLAG_KEYLIGHT 0x04` |If the LED is for key backlight. |
|
||||
@@ -203,10 +197,7 @@ enum rgb_matrix_effects {
|
||||
RGB_MATRIX_RAINBOW_PINWHEELS, // Full dual gradients spinning two halfs of keyboard
|
||||
RGB_MATRIX_RAINDROPS, // Randomly changes a single key's hue
|
||||
RGB_MATRIX_JELLYBEAN_RAINDROPS, // Randomly changes a single key's hue and saturation
|
||||
#if define(RGB_MATRIX_FRAMEBUFFER_EFFECTS)
|
||||
RGB_MATRIX_TYPING_HEATMAP, // How hot is your WPM!
|
||||
RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation
|
||||
#endif
|
||||
#if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES)
|
||||
RGB_MATRIX_SOLID_REACTIVE_SIMPLE, // Pulses keys hit to hue & value then fades value out
|
||||
RGB_MATRIX_SOLID_REACTIVE, // Static single hue, pulses keys hit to shifted hue then fades to current hue
|
||||
@@ -242,7 +233,6 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con
|
||||
|`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` |
|
||||
|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` |
|
||||
|`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` |
|
||||
|`#define DISABLE_RGB_MATRIX_TYPING_HEATMAP` |Disables `RGB_MATRIX_TYPING_HEATMAP` |
|
||||
|`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` |
|
||||
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` |
|
||||
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |
|
||||
|
||||
@@ -37,9 +37,9 @@ QMK uses [Hue, Saturation, and Value](https://en.wikipedia.org/wiki/HSL_and_HSV)
|
||||
|
||||
<img src="gitbook/images/color-wheel.svg" alt="HSV Color Wheel" width="250"/>
|
||||
|
||||
Changing the **Hue** cycles around the circle.<br>
|
||||
Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.<br>
|
||||
Changing the **Value** sets the overall brightness.<br>
|
||||
Changing the **Hue** cycles around the circle.
|
||||
Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.
|
||||
Changing the **Value** sets the overall brightness.
|
||||
|
||||
## Keycodes
|
||||
|
||||
@@ -77,7 +77,8 @@ Your RGB lighting can be configured by placing these `#define`s in your `config.
|
||||
|`RGBLIGHT_SLEEP` |*Not defined*|If defined, the RGB lighting will be switched off when the host goes to sleep|
|
||||
|`RGBLIGHT_SPLIT` |*Not defined*|If defined, synchronization functionality for split keyboards is added|
|
||||
|
||||
## Effects and Animations
|
||||
## Animations
|
||||
|
||||
|
||||
Not only can this lighting be whatever color you want,
|
||||
if `RGBLIGHT_EFFECT_xxxx` or `RGBLIGHT_ANIMATIONS` is defined, you also have a number of animation modes at your disposal:
|
||||
@@ -99,54 +100,29 @@ Check out [this video](https://youtube.com/watch?v=VKrpPAHlisY) for a demonstrat
|
||||
|
||||
Note: For versions older than 0.6.117, The mode numbers were written directly. In `quantum/rgblight.h` there is a contrast table between the old mode number and the current symbol.
|
||||
|
||||
### Effect and Animation Toggles
|
||||
|
||||
Use these defines to add or remove animations from the firmware. When you are running low on flash space, it can be helpful to disable animations you are not using.
|
||||
|
||||
|Define |Default |Description |
|
||||
|------------------------------------|-------------|-------------------------------------------------------------------------------------|
|
||||
|`RGBLIGHT_ANIMATIONS` |*Not defined*|Enable all additional animation modes. |
|
||||
|`RGBLIGHT_EFFECT_ALTERNATING` |*Not defined*|Enable alternating animation mode. |
|
||||
|`RGBLIGHT_EFFECT_BREATHING` |*Not defined*|Enable breathing animation mode. |
|
||||
|`RGBLIGHT_EFFECT_CHRISTMAS` |*Not defined*|Enable christmas animation mode. |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT` |*Not defined*|Enable knight animation mode. |
|
||||
|`RGBLIGHT_EFFECT_RAINBOW_MOOD` |*Not defined*|Enable rainbow mood animation mode. |
|
||||
|`RGBLIGHT_EFFECT_RAINBOW_SWIRL` |*Not defined*|Enable rainbow swirl animation mode. |
|
||||
|`RGBLIGHT_EFFECT_RGB_TEST` |*Not defined*|Enable RGB test animation mode. |
|
||||
|`RGBLIGHT_EFFECT_SNAKE` |*Not defined*|Enable snake animation mode. |
|
||||
|`RGBLIGHT_EFFECT_STATIC_GRADIENT` |*Not defined*|Enable static gradient mode. |
|
||||
|
||||
### Effect and Animation Settings
|
||||
|
||||
The following options are used to tweak the various animations:
|
||||
The following options can be used to tweak the various animations:
|
||||
|
||||
|Define |Default |Description |
|
||||
|------------------------------------|-------------|-------------------------------------------------------------------------------------|
|
||||
|`RGBLIGHT_EFFECT_BREATHING` |*Not defined*|If defined, enable breathing animation mode. |
|
||||
|`RGBLIGHT_EFFECT_RAINBOW_MOOD` |*Not defined*|If defined, enable rainbow mood animation mode. |
|
||||
|`RGBLIGHT_EFFECT_RAINBOW_SWIRL` |*Not defined*|If defined, enable rainbow swirl animation mode. |
|
||||
|`RGBLIGHT_EFFECT_SNAKE` |*Not defined*|If defined, enable snake animation mode. |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT` |*Not defined*|If defined, enable knight animation mode. |
|
||||
|`RGBLIGHT_EFFECT_CHRISTMAS` |*Not defined*|If defined, enable christmas animation mode. |
|
||||
|`RGBLIGHT_EFFECT_STATIC_GRADIENT` |*Not defined*|If defined, enable static gradient mode. |
|
||||
|`RGBLIGHT_EFFECT_RGB_TEST` |*Not defined*|If defined, enable RGB test animation mode. |
|
||||
|`RGBLIGHT_EFFECT_ALTERNATING` |*Not defined*|If defined, enable alternating animation mode. |
|
||||
|`RGBLIGHT_ANIMATIONS` |*Not defined*|If defined, enables all additional animation modes |
|
||||
|`RGBLIGHT_EFFECT_BREATHE_CENTER` |*Not defined*|If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 |
|
||||
|`RGBLIGHT_EFFECT_BREATHE_MAX` |`255` |The maximum brightness for the breathing mode. Valid values are 1 to 255 |
|
||||
|`RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL`|`1000` |How long to wait between light changes for the "Christmas" animation, in milliseconds|
|
||||
|`RGBLIGHT_EFFECT_CHRISTMAS_STEP` |`2` |The number of LEDs to group the red/green colors by for the "Christmas" animation |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel |
|
||||
|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel |
|
||||
|`RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL`|`1000` |How long to wait between light changes for the "Christmas" animation, in milliseconds|
|
||||
|`RGBLIGHT_EFFECT_CHRISTMAS_STEP` |`2` |The number of LEDs to group the red/green colors by for the "Christmas" animation |
|
||||
|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`360` |Range adjustment for the rainbow swirl effect to get different swirls |
|
||||
|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
|
||||
|
||||
### Example Usage to Reduce Memory Footprint
|
||||
1. Remove `RGBLIGHT_ANIMATIONS` from `config.h`.
|
||||
1. Selectively add the animations you want to enable. The following would enable two animations and save about 4KiB:
|
||||
|
||||
```diff
|
||||
#undef RGBLED_NUM
|
||||
-#define RGBLIGHT_ANIMATIONS
|
||||
+#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
+#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
```
|
||||
|
||||
### Animation Speed
|
||||
|
||||
You can also modify the speeds that the different modes animate at:
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ QMK has a staggering number of features for building your keyboard. It can take
|
||||
* [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a PS/2 mouse directly to your keyboard.
|
||||
* [RGB Light](feature_rgblight.md) - RGB lighting for your keyboard.
|
||||
* [RGB Matrix](feature_rgb_matrix.md) - RGB Matrix lights for per key lighting.
|
||||
* [Space Cadet](feature_space_cadet.md) - Use your left/right shift keys to type parenthesis and brackets.
|
||||
* [Space Cadet](feature_space_cadet_shift.md) - Use your left/right shift keys to type parenthesis and brackets.
|
||||
* [Stenography](feature_stenography.md) - Put your keyboard into Plover mode for stenography use.
|
||||
* [Swap Hands](feature_swap_hands.md) - Mirror your keyboard for one handed usage.
|
||||
* [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want.
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
@@ -1,95 +0,0 @@
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum layer {
|
||||
_BASE,
|
||||
_FN,
|
||||
_BACKLIT
|
||||
};
|
||||
|
||||
|
||||
#define FN MO(_FN)
|
||||
#define BACKLIT MO(_BACKLIT)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* BASE
|
||||
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | \ |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||
* | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | BACKSP |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||
* | LCTRL | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | HOME |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||
* | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | FN | END |
|
||||
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
|
||||
* | | LALT | LGUI | SPACE | RGUI | RALT | |
|
||||
* '-----------------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_BASE] = LAYOUT_ortho_7u(
|
||||
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_BSLS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_HOME,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN, KC_END,
|
||||
KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT
|
||||
),
|
||||
|
||||
/* FUNCTION
|
||||
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | ` |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||
* | | | | | | | | | | | UP | | | DEL |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||
* | | VOLD | VOLU | MUTE | | | | | | | LEFT | RIGHT | | PG_UP |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||
* | | | | | | | | | | | DOWN | | | PG_DN |
|
||||
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
|
||||
* | | | | | | | |
|
||||
* '-----------------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_FN] = LAYOUT_ortho_7u(
|
||||
_______, 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_GRV,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, KC_DEL,
|
||||
_______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, KC_PGUP,
|
||||
BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, KC_PGDN,
|
||||
_______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* BACKLIT
|
||||
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||
* | | RGBTOG | RGBMOD | RGBHUI | RGBHUD | RGBSAI | RGBSAD | RGBVAI | RGBVAD | | | | | |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||
* | | | | | | | | | | | | | | |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||
* | | | | | | | | | | | | | | |
|
||||
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
|
||||
* | | | | | | | |
|
||||
* '-----------------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_BACKLIT] = LAYOUT_ortho_7u(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
@@ -19,18 +19,20 @@
|
||||
#include "haptic.h"
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
#include "rgb_matrix.h"
|
||||
#include "rgblight.h"
|
||||
|
||||
led_config_t g_led_config = { {
|
||||
{ 5, NO_LED, NO_LED, 0 },
|
||||
{ NO_LED, NO_LED, NO_LED, NO_LED },
|
||||
{ 4, NO_LED, NO_LED, 1 },
|
||||
{ 3, NO_LED, NO_LED, 2 }
|
||||
}, {
|
||||
{ 188, 16 }, { 187, 48 }, { 149, 64 }, { 112, 64 }, { 37, 48 }, { 38, 16 }
|
||||
}, {
|
||||
4, 4, 4, 4, 4, 4
|
||||
} };
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
/*{row | col << 4}
|
||||
| {x=0..224, y=0..64}
|
||||
| | modifier
|
||||
| | | */
|
||||
{{1|(3<<4)}, {188, 16}, 4},
|
||||
{{3|(3<<4)}, {187, 48}, 4},
|
||||
{{4|(2<<4)}, {149, 64}, 4},
|
||||
{{4|(1<<4)}, {112, 64}, 4},
|
||||
{{3|(0<<4)}, {37, 48}, 4},
|
||||
{{1|(0<<4)}, {38, 16}, 4}
|
||||
};
|
||||
#endif
|
||||
|
||||
uint8_t *o_fb;
|
||||
@@ -46,12 +48,12 @@ uint16_t counterst = 0;
|
||||
#define ScreenOffInterval 60000 /* milliseconds */
|
||||
static uint16_t last_flush;
|
||||
|
||||
volatile uint8_t led_numlock = false;
|
||||
volatile uint8_t led_capslock = false;
|
||||
volatile uint8_t led_numlock = false;
|
||||
volatile uint8_t led_capslock = false;
|
||||
volatile uint8_t led_scrolllock = false;
|
||||
|
||||
static uint8_t layer;
|
||||
static bool queue_for_send = false;
|
||||
static bool queue_for_send = false;
|
||||
static uint8_t encoder_value = 32;
|
||||
|
||||
__attribute__ ((weak))
|
||||
@@ -62,13 +64,13 @@ void draw_ui(void) {
|
||||
|
||||
/* Boston MK title is 55 x 10 pixels */
|
||||
#define NAME_X 0
|
||||
#define NAME_Y 0
|
||||
#define NAME_Y 0
|
||||
|
||||
draw_string(NAME_X + 1, NAME_Y + 2, "BOSTON MK", PIXEL_ON, NORM, 0);
|
||||
|
||||
/* Layer indicator is 41 x 10 pixels */
|
||||
#define LAYER_INDICATOR_X 60
|
||||
#define LAYER_INDICATOR_Y 0
|
||||
#define LAYER_INDICATOR_Y 0
|
||||
|
||||
draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0);
|
||||
draw_rect_filled_soft(LAYER_INDICATOR_X + 32, LAYER_INDICATOR_Y + 1, 9, 9, PIXEL_ON, NORM);
|
||||
@@ -86,7 +88,7 @@ void draw_ui(void) {
|
||||
draw_pixel(MATRIX_DISPLAY_X + y + y + 3, MATRIX_DISPLAY_Y + x + x + 3,(matrix_get_row(x) & (1 << y)) > 0, NORM);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 12, 12, PIXEL_ON, NORM);
|
||||
/* hadron oled location on thumbnail */
|
||||
draw_rect_filled_soft(MATRIX_DISPLAY_X + 5, MATRIX_DISPLAY_Y + 2, 6, 2, PIXEL_ON, NORM);
|
||||
@@ -193,7 +195,7 @@ void matrix_init_kb(void) {
|
||||
queue_for_send = true;
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
if (queue_for_send) {
|
||||
#ifdef QWIIC_MICRO_OLED_ENABLE
|
||||
|
||||
@@ -27,8 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// #define MASTER_RIGHT
|
||||
#define EE_HANDS
|
||||
|
||||
#undef USE_I2C
|
||||
#undef SSD1306OLED
|
||||
// #define SSD1306OLED
|
||||
|
||||
#define USE_SERIAL_PD2
|
||||
|
||||
@@ -36,42 +35,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// #define TAPPING_TERM 100
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
# undef RGBLED_NUM
|
||||
# define RGBLED_NUM 27
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 27
|
||||
|
||||
# define RGBLIGHT_HUE_STEP 8
|
||||
# define RGBLIGHT_SAT_STEP 8
|
||||
# define RGBLIGHT_VAL_STEP 8
|
||||
# define RGBLIGHT_LIMIT_VAL 100
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#define RGBLIGHT_LIMIT_VAL 100
|
||||
#endif
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||
# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
|
||||
|
||||
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||
# define DISABLE_RGB_MATRIX_CYCLE_ALL
|
||||
# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||
# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||
# define DISABLE_RGB_MATRIX_DUAL_BEACON
|
||||
# define DISABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||
# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||
// #define DISABLE_RGB_MATRIX_RAINDROPS
|
||||
// #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||
# define DISABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
# define B6_AUDIO
|
||||
#define B6_AUDIO
|
||||
// #define NO_MUSIC_MODE
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "drashna.h"
|
||||
#ifdef PROTOCOL_LUFA
|
||||
#include "lufa.h"
|
||||
#include "split_util.h"
|
||||
#endif
|
||||
#ifdef SSD1306OLED
|
||||
#include "ssd1306.h"
|
||||
#endif
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
#include "oled_driver.h"
|
||||
#endif
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
extern uint8_t is_master;
|
||||
@@ -10,7 +20,7 @@ extern rgblight_config_t rgblight_config;
|
||||
#endif
|
||||
|
||||
enum crkbd_keycodes {
|
||||
RGBRST = NEW_SAFE_RANGE
|
||||
RGBRST = NEW_SAFE_RANGE
|
||||
};
|
||||
|
||||
#define LAYOUT_crkbd_base( \
|
||||
@@ -21,7 +31,7 @@ enum crkbd_keycodes {
|
||||
LAYOUT_wrapper( \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \
|
||||
KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RGUI_T(KC_QUOT), \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, CTL_T(K2A), OS_RSFT, \
|
||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE \
|
||||
)
|
||||
#define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__)
|
||||
@@ -105,38 +115,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
};
|
||||
|
||||
void matrix_init_keymap(void) {
|
||||
#ifndef CONVERT_TO_PROTON_C
|
||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
#endif
|
||||
|
||||
#ifndef CONVERT_TO_PROTON_C
|
||||
setPinOutput(D5);
|
||||
writePinHigh(D5);
|
||||
|
||||
setPinOutput(B0);
|
||||
writePinHigh(B0);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
if (is_master) {
|
||||
return OLED_ROTATION_270;
|
||||
} else {
|
||||
return rotation;
|
||||
}
|
||||
}
|
||||
// When add source files to SRC in rules.mk, you can use functions.
|
||||
const char *read_logo(void);
|
||||
char layer_state_str[24];
|
||||
char modifier_state_str[24];
|
||||
char host_led_state_str[24];
|
||||
char keylog_str[24] = {};
|
||||
char keylogs_str[21] = {};
|
||||
int keylogs_str_idx = 0;
|
||||
|
||||
void render_crkbd_logo(void) {
|
||||
static const char PROGMEM crkbd_logo[] = {
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4,
|
||||
0};
|
||||
oled_write_P(crkbd_logo, false);
|
||||
}
|
||||
|
||||
#define KEYLOG_LEN (int)(32 / OLED_FONT_WIDTH)
|
||||
char keylog_str[KEYLOG_LEN] = {};
|
||||
uint8_t keylogs_str_idx = 0;
|
||||
uint16_t log_timer = 0;
|
||||
// const char *read_mode_icon(bool swap);
|
||||
// void set_timelog(void);
|
||||
// const char *read_timelog(void);
|
||||
|
||||
const char code_to_name[60] = {
|
||||
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
|
||||
@@ -146,124 +153,261 @@ const char code_to_name[60] = {
|
||||
'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\',
|
||||
'#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
|
||||
|
||||
void add_keylog(uint16_t keycode) {
|
||||
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) ||
|
||||
(keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; }
|
||||
void set_keylog(uint16_t keycode, keyrecord_t *record) {
|
||||
char name = ' ';
|
||||
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; }
|
||||
if (keycode < 60) {
|
||||
name = code_to_name[keycode];
|
||||
}
|
||||
// update keylog
|
||||
snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c",
|
||||
record->event.key.row, record->event.key.col,
|
||||
keycode, name);
|
||||
|
||||
for (uint8_t i = KEYLOG_LEN - 1; i > 0; i--) {
|
||||
keylog_str[i] = keylog_str[i - 1];
|
||||
// update keylogs
|
||||
if (keylogs_str_idx == sizeof(keylogs_str) - 1) {
|
||||
keylogs_str_idx = 0;
|
||||
for (int i = 0; i < sizeof(keylogs_str) - 1; i++) {
|
||||
keylogs_str[i] = ' ';
|
||||
}
|
||||
if (keycode < 60) {
|
||||
keylog_str[0] = code_to_name[keycode];
|
||||
}
|
||||
log_timer = timer_read();
|
||||
}
|
||||
|
||||
keylogs_str[keylogs_str_idx] = name;
|
||||
keylogs_str_idx++;
|
||||
}
|
||||
|
||||
void update_log(void) {
|
||||
if (timer_elapsed(log_timer) > 750) {
|
||||
add_keylog(0);
|
||||
}
|
||||
const char *read_keylog(void) {
|
||||
return keylog_str;
|
||||
}
|
||||
|
||||
const char *read_keylogs(void) {
|
||||
return keylogs_str;
|
||||
}
|
||||
|
||||
|
||||
const char* read_modifier_state(void) {
|
||||
uint8_t modifiers = get_mods();
|
||||
uint8_t one_shot = get_oneshot_mods();
|
||||
|
||||
snprintf(modifier_state_str, sizeof(modifier_state_str), "Mods:%s %s %s %s",
|
||||
(modifiers & MOD_MASK_CTRL || one_shot & MOD_MASK_CTRL) ? "CTL" : " ",
|
||||
(modifiers & MOD_MASK_GUI || one_shot & MOD_MASK_GUI) ? "GUI" : " ",
|
||||
(modifiers & MOD_MASK_ALT || one_shot & MOD_MASK_ALT) ? "ALT" : " ",
|
||||
(modifiers & MOD_MASK_SHIFT || one_shot & MOD_MASK_SHIFT) ? "SFT" : " "
|
||||
);
|
||||
|
||||
return modifier_state_str;
|
||||
}
|
||||
|
||||
const char *read_host_led_state(void) {
|
||||
uint8_t leds = host_keyboard_leds();
|
||||
|
||||
snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s",
|
||||
(leds & (1 << USB_LED_NUM_LOCK)) ? "on" : "- ",
|
||||
(leds & (1 << USB_LED_CAPS_LOCK)) ? "on" : "- ",
|
||||
(leds & (1 << USB_LED_SCROLL_LOCK)) ? "on" : "- "
|
||||
);
|
||||
|
||||
return host_led_state_str;
|
||||
}
|
||||
|
||||
const char* read_layer_state(void) {
|
||||
switch (biton32(layer_state)) {
|
||||
case _RAISE:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise ");
|
||||
break;
|
||||
case _LOWER:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower ");
|
||||
break;
|
||||
case _ADJUST:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust ");
|
||||
break;
|
||||
default:
|
||||
switch (biton32(default_layer_state)) {
|
||||
case _QWERTY:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Qwerty ");
|
||||
break;
|
||||
case _COLEMAK:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Colemak");
|
||||
break;
|
||||
case _DVORAK:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Dvorak ");
|
||||
break;
|
||||
case _WORKMAN:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Workman");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return layer_state_str;
|
||||
}
|
||||
|
||||
void matrix_scan_keymap(void) {
|
||||
iota_gfx_task();
|
||||
}
|
||||
|
||||
void matrix_render_user(struct CharacterMatrix *matrix) {
|
||||
if (is_master) {
|
||||
//If you want to change the display of OLED, you need to change here
|
||||
matrix_write_ln(matrix, read_layer_state());
|
||||
matrix_write_ln(matrix, read_modifier_state());
|
||||
// matrix_write_ln(matrix, read_keylog());
|
||||
matrix_write_ln(matrix, read_keylogs());
|
||||
// matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui));
|
||||
// matrix_write(matrix, read_host_led_state());
|
||||
//matrix_write_ln(matrix, read_timelog());
|
||||
} else {
|
||||
matrix_write(matrix, read_logo());
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) {
|
||||
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
||||
memcpy(dest->display, source->display, sizeof(dest->display));
|
||||
dest->dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
void iota_gfx_task_user(void) {
|
||||
struct CharacterMatrix matrix;
|
||||
matrix_clear(&matrix);
|
||||
matrix_render_user(&matrix);
|
||||
matrix_update(&display, &matrix);
|
||||
}
|
||||
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) { add_keylog(keycode); }
|
||||
return true;
|
||||
switch (keycode) {
|
||||
case KC_A ... KC_SLASH:
|
||||
case KC_F1 ... KC_F12:
|
||||
case KC_INSERT ... KC_UP:
|
||||
case KC_KP_SLASH ... KC_KP_DOT:
|
||||
case KC_F13 ... KC_F24:
|
||||
if (record->event.pressed) { set_keylog(keycode, record); }
|
||||
break;
|
||||
// set_timelog();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
if (is_master) {
|
||||
return OLED_ROTATION_270;
|
||||
} else {
|
||||
return rotation;
|
||||
}
|
||||
}
|
||||
|
||||
void render_crkbd_logo(void) {
|
||||
static const char PROGMEM crkbd_logo[] = {
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4,
|
||||
0};
|
||||
oled_write_P(crkbd_logo, false);
|
||||
}
|
||||
|
||||
|
||||
void render_status(void) {
|
||||
|
||||
oled_write_P(PSTR("Layer"), false);
|
||||
switch (biton32(layer_state)) {
|
||||
case 0:
|
||||
oled_write_P(PSTR("Base "), false);
|
||||
break;
|
||||
case _RAISE:
|
||||
oled_write_P(PSTR("Raise"), false);
|
||||
break;
|
||||
case _LOWER:
|
||||
oled_write_P(PSTR("Lower"), false);
|
||||
break;
|
||||
case _ADJUST:
|
||||
oled_write_P(PSTR("Adjst"), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_P(PSTR("Unkn "), false);
|
||||
break;
|
||||
}
|
||||
oled_write_P(PSTR("Lyout"), false);
|
||||
switch (biton32(default_layer_state)) {
|
||||
case _QWERTY:
|
||||
oled_write_P(PSTR("QWRTY"), false);
|
||||
break;
|
||||
case _COLEMAK:
|
||||
oled_write_P(PSTR("COLMK"), false);
|
||||
break;
|
||||
case _DVORAK:
|
||||
oled_write_P(PSTR("DVRAK"), false);
|
||||
break;
|
||||
case _WORKMAN:
|
||||
oled_write_P(PSTR("WRKMN"), false);
|
||||
break;
|
||||
case _NORMAN:
|
||||
oled_write_P(PSTR("NORMN"), false);
|
||||
break;
|
||||
case _MALTRON:
|
||||
oled_write_P(PSTR("MLTRN"), false);
|
||||
break;
|
||||
case _EUCALYN:
|
||||
oled_write_P(PSTR("ECLYN"), false);
|
||||
break;
|
||||
case _CARPLAX:
|
||||
oled_write_P(PSTR("CRPLX"), false);
|
||||
break;
|
||||
}
|
||||
oled_write_P(PSTR("Layer"), false);
|
||||
switch (biton32(layer_state)) {
|
||||
case 0:
|
||||
oled_write_P(PSTR("Base "), false);
|
||||
break;
|
||||
case _RAISE:
|
||||
oled_write_P(PSTR("Raise"), false);
|
||||
break;
|
||||
case _LOWER:
|
||||
oled_write_P(PSTR("Lower"), false);
|
||||
break;
|
||||
case _ADJUST:
|
||||
oled_write_P(PSTR("Adjst"), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_P(PSTR("Unkn "), false);
|
||||
break;
|
||||
}
|
||||
oled_write_P(PSTR("Lyout"), false);
|
||||
switch (biton32(default_layer_state)) {
|
||||
case _QWERTY:
|
||||
oled_write_P(PSTR("QWRTY"), false);
|
||||
break;
|
||||
case _COLEMAK:
|
||||
oled_write_P(PSTR("COLMK"), false);
|
||||
break;
|
||||
case _DVORAK:
|
||||
oled_write_P(PSTR("DVRAK"), false);
|
||||
break;
|
||||
case _WORKMAN:
|
||||
oled_write_P(PSTR("WRKMN"), false);
|
||||
break;
|
||||
case _NORMAN:
|
||||
oled_write_P(PSTR("NORMN"), false);
|
||||
break;
|
||||
case _MALTRON:
|
||||
oled_write_P(PSTR("MLTRN"), false);
|
||||
break;
|
||||
case _EUCALYN:
|
||||
oled_write_P(PSTR("ECLYN"), false);
|
||||
break;
|
||||
case _CARPLAX:
|
||||
oled_write_P(PSTR("CRPLX"), false);
|
||||
break;
|
||||
}
|
||||
|
||||
uint8_t modifiers = get_mods();
|
||||
uint8_t one_shot = get_oneshot_mods();
|
||||
uint8_t modifiers = get_mods();
|
||||
uint8_t one_shot = get_oneshot_mods();
|
||||
|
||||
oled_write_P(PSTR("Mods:"), false);
|
||||
oled_write_P( (modifiers & MOD_MASK_SHIFT || one_shot & MOD_MASK_SHIFT) ? PSTR(" SFT ") : PSTR(" "), false);
|
||||
oled_write_P( (modifiers & MOD_MASK_CTRL || one_shot & MOD_MASK_CTRL ) ? PSTR(" CTL ") : PSTR(" "), false);
|
||||
oled_write_P( (modifiers & MOD_MASK_ALT || one_shot & MOD_MASK_ALT ) ? PSTR(" ALT ") : PSTR(" "), false);
|
||||
oled_write_P( (modifiers & MOD_MASK_GUI || one_shot & MOD_MASK_GUI ) ? PSTR(" GUI ") : PSTR(" "), false);
|
||||
oled_write_P(PSTR("Mods:"), false);
|
||||
oled_write_P( (modifiers & MOD_MASK_CTRL || one_shot & MOD_MASK_CTRL ) ? PSTR(" CTL ") : PSTR(" "), false);
|
||||
oled_write_P( (modifiers & MOD_MASK_GUI || one_shot & MOD_MASK_GUI ) ? PSTR(" GUI ") : PSTR(" "), false);
|
||||
oled_write_P( (modifiers & MOD_MASK_ALT || one_shot & MOD_MASK_ALT ) ? PSTR(" ALT ") : PSTR(" "), false);
|
||||
oled_write_P( (modifiers & MOD_MASK_SHIFT || one_shot & MOD_MASK_SHIFT) ? PSTR(" SFT ") : PSTR(" "), false);
|
||||
|
||||
|
||||
oled_write_P(PSTR("BTMGK"), false);
|
||||
oled_write_P(PSTR("BTMGK"), false);
|
||||
static const char PROGMEM mode_logo[4][4] = {
|
||||
{0x95,0x96,0x0a,0},
|
||||
{0xb5,0xb6,0x0a,0},
|
||||
{0x97,0x98,0x0a,0},
|
||||
{0xb7,0xb8,0x0a,0} };
|
||||
|
||||
if (keymap_config.swap_lalt_lgui) {
|
||||
oled_write_P(PSTR(" Mac "), false);
|
||||
} else {
|
||||
oled_write_P(PSTR(" Win "), false);
|
||||
}
|
||||
if (keymap_config.swap_lalt_lgui != false) {
|
||||
oled_write_P(mode_logo[0], false);
|
||||
oled_write_P(mode_logo[1], false);
|
||||
} else {
|
||||
oled_write_P(mode_logo[2], false);
|
||||
oled_write_P(mode_logo[3], false);
|
||||
}
|
||||
|
||||
uint8_t led_usb_state = host_keyboard_leds();
|
||||
oled_write_P(PSTR("Lock:"), false);
|
||||
oled_write_P(led_usb_state & (1<<USB_LED_NUM_LOCK) ? PSTR(" NUM ") : PSTR(" "), false);
|
||||
oled_write_P(led_usb_state & (1<<USB_LED_CAPS_LOCK) ? PSTR(" CAPS") : PSTR(" "), false);
|
||||
oled_write_P(led_usb_state & (1<<USB_LED_SCROLL_LOCK) ? PSTR(" SCRL") : PSTR(" "), false);
|
||||
|
||||
oled_write(keylog_str, false);
|
||||
uint8_t led_usb_state = host_keyboard_leds();
|
||||
oled_write_P(PSTR("Lock:"), false);
|
||||
oled_write_P(led_usb_state & (1<<USB_LED_NUM_LOCK) ? PSTR(" NUM ") : PSTR(" "), false);
|
||||
oled_write_P(led_usb_state & (1<<USB_LED_CAPS_LOCK) ? PSTR(" CAPS") : PSTR(" "), false);
|
||||
oled_write_P(led_usb_state & (1<<USB_LED_SCROLL_LOCK) ? PSTR(" SCRL") : PSTR(" "), false);
|
||||
}
|
||||
|
||||
|
||||
void oled_task_user(void) {
|
||||
if (is_master) {
|
||||
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
||||
} else {
|
||||
render_crkbd_logo();
|
||||
oled_scroll_left(); // Turns on scrolling
|
||||
}
|
||||
if (is_master) {
|
||||
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
||||
} else {
|
||||
render_crkbd_logo();
|
||||
oled_scroll_left(); // Turns on scrolling
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_scan_keymap(void) { update_log(); }
|
||||
#endif
|
||||
|
||||
uint16_t get_tapping_term(uint16_t keycode) {
|
||||
switch (keycode) {
|
||||
case ALT_T(KC_A):
|
||||
return TAPPING_TERM + 100;
|
||||
default:
|
||||
return TAPPING_TERM;
|
||||
}
|
||||
switch (keycode) {
|
||||
case ALT_T(KC_A):
|
||||
return TAPPING_TERM + 100;
|
||||
default:
|
||||
return TAPPING_TERM;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,10 +14,9 @@ MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||
RGBLIGHT_STARTUP_ANIMATION = yes
|
||||
RGB_MATRIX_ENABLE = WS2812
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
@@ -25,7 +24,3 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
BOOTLOADER = qmk-dfu
|
||||
|
||||
OLED_DRIVER_ENABLE = yes
|
||||
|
||||
ifneq ($(strip $(OLED_DRIVER_ENABLE)), yes)
|
||||
RGB_MATRIX_SPLIT_RIGHT=yes
|
||||
endif
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//Following line allows macro to read current RGB settings
|
||||
extern rgblight_config_t rgblight_config;
|
||||
#endif
|
||||
|
||||
extern uint8_t is_master;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
@@ -236,7 +241,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
void matrix_init_user(void) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
UPDATE_KEYMAP_STATUS();
|
||||
#endif
|
||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
//#define USE_MATRIX_I2C
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
#define SSD1306OLED
|
||||
|
||||
#define USE_SERIAL_PD2
|
||||
|
||||
#define TAPPING_FORCE_HOLD
|
||||
#define TAPPING_TERM 300
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 27
|
||||
#define RGBLIGHT_LIMIT_VAL 120
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
@@ -1,39 +0,0 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "rs.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = LAYOUT_kc(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
TAB , Q , W , E , R , T , Y , U , I , O , P ,EQL ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
ESCC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
|
||||
//|----+----+----+----+----+----+ |----+----+----+----+----+----|
|
||||
LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,ENTS,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
LALT,LGUI,SPC , BSPC,CODE,FN
|
||||
// `----+----+----' `+---+----+----'c
|
||||
),
|
||||
[_CODE] = LAYOUT_kc(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
GRV ,EXLM, AT ,HASH, DLR,PERC, CIRC,LPLT,ASTR,RPGT,NEQL, ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, 1 , 2 , 3 , 4 , 5 , MINS,LBRC, UP ,RBRC, ,BSLS,
|
||||
//|----+----+----+----+----+----+ |----+----+----+----+----+----|
|
||||
, 6 , 7 , 8 , 9 , 0 , AMPR,LEFT,DOWN,RGHT, ,PIPE,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
, ,DOT , , ,
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
[_FN] = LAYOUT_kc(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
, F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10, F11,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
LTOG,LHUI,LSAI,LVAI,LRST,BRMU, VOLU, ,PGUP, , , ,
|
||||
//|----+----+----+----+----+----+ |----+----+----+----+----+----|
|
||||
LMOD,LHUD,LSAD,LVAD,RST ,BRMD, VOLD,CTRA,PGDN,CTRE, , ,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
, , , MUTE, ,
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
};
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
#ifdef SSD1306OLED
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "ssd1306.h"
|
||||
#ifdef PROTOCOL_LUFA
|
||||
#include "lufa.h"
|
||||
#include "split_util.h"
|
||||
#endif
|
||||
|
||||
extern uint8_t is_master;
|
||||
|
||||
// When add source files to SRC in rules.mk, you can use functions.
|
||||
const char *read_logo(void);
|
||||
const char *read_keylog(void);
|
||||
const char *read_keylogs(void);
|
||||
void set_keylog(uint16_t keycode, keyrecord_t *record);
|
||||
|
||||
void matrix_scan_user(void) { iota_gfx_task(); }
|
||||
|
||||
typedef struct {
|
||||
uint8_t state;
|
||||
char name[8];
|
||||
} LAYER_DISPLAY_NAME;
|
||||
|
||||
#define LAYER_DISPLAY_MAX 5
|
||||
const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = {
|
||||
{0, "Base"},
|
||||
{2, "Code"},
|
||||
{4, "Fn"},
|
||||
{6, "Fn+Code"},
|
||||
{__UINT8_MAX__, "?"},
|
||||
};
|
||||
static uint8_t layer_name_idx;
|
||||
static char layer_status_buf[24] = "Layer: Base\n";
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
// Following line allows macro to read current RGB settings
|
||||
extern rgblight_config_t rgblight_config;
|
||||
void update_keymap_status(void) {
|
||||
snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "Layer:%s RGB: %d\n",
|
||||
layer_display_name[layer_name_idx].name, rgblight_config.mode);
|
||||
}
|
||||
#else
|
||||
void update_keymap_status(void) {
|
||||
snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "Layer:%s\n",
|
||||
layer_display_name[layer_name_idx].name);
|
||||
}
|
||||
#endif
|
||||
|
||||
void matrix_init_user(void) {
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
update_keymap_status();
|
||||
}
|
||||
|
||||
// declared in users/rs/rs.c
|
||||
void rgb_mod_changed_keymap(void) {
|
||||
update_keymap_status();
|
||||
}
|
||||
|
||||
// declared in users/rs/rs.c
|
||||
void keylog_set_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
set_keylog(keycode, record);
|
||||
}
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
for (layer_name_idx = 0; layer_name_idx < LAYER_DISPLAY_MAX; ++layer_name_idx) {
|
||||
if (state == 0 && layer_display_name[layer_name_idx].state == default_layer_state) {
|
||||
break;
|
||||
} else if (state != 0 && layer_display_name[layer_name_idx].state == state) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
update_keymap_status();
|
||||
return state;
|
||||
}
|
||||
|
||||
static inline void render_keymap_status(struct CharacterMatrix *matrix) {
|
||||
matrix_write(matrix, layer_status_buf);
|
||||
}
|
||||
|
||||
void matrix_render_user(struct CharacterMatrix *matrix) {
|
||||
if (is_master) {
|
||||
render_keymap_status(matrix);
|
||||
matrix_write_ln(matrix, read_keylog());
|
||||
matrix_write_ln(matrix, read_keylogs());
|
||||
} else {
|
||||
matrix_write(matrix, read_logo());
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) {
|
||||
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
||||
memcpy(dest->display, source->display, sizeof(dest->display));
|
||||
dest->dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
void iota_gfx_task_user(void) {
|
||||
struct CharacterMatrix matrix;
|
||||
matrix_clear(&matrix);
|
||||
matrix_render_user(&matrix);
|
||||
matrix_update(&display, &matrix);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,19 +0,0 @@
|
||||
# RS40: Code Friendly 40% Keymap
|
||||
|
||||
This keymap is an evolution of my previous keymap optimized for coding with a 60% keyboards like the Iris. I tried to keep the simplicity of my previous keymap with all the keys necessary for coding on a single layer in addition to the base one.
|
||||
|
||||
Because I sometime have to use my internal keyboard I my macbook, a karabiner configuration is also provided to get most of the features of this keyboard, including the code layer / backspace on right command key etc.
|
||||
|
||||
See [rs readme](../../../../users/rs/readme.md) for a list of other keyboards supported by this keymap.
|
||||
|
||||
## Base Layer
|
||||
|
||||
[](http://www.keyboard-layout-editor.com/##@_backcolor=%23d8c1f5&switchMount=cherry&pcb:false&plate:true%3B&@_x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=E&_x:8%3B&=I%3B&@_y:-0.87&x:2%3B&=W&_x:1%3B&=R&_x:6%3B&=U&_x:1%3B&=O%3B&@_y:-0.8799999999999999&x:5%3B&=T&_x:4%3B&=Y%3B&@_y:-0.87&c=%233a1ee6&t=%23b84465%3B&=Tab&_c=%236750f2&t=%2344b8b8%3B&=Q&_x:12%3B&=P&_c=%233a1ee6&t=%23b84465&a:5%3B&=+%0A%2F=%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=D&_x:8%3B&=K%3B&@_y:-0.8700000000000001&x:2%3B&=S&_x:1%3B&=F&_x:6%3B&=J&_x:1%3B&=L%3B&@_y:-0.8799999999999999&x:5%3B&=G&_x:4%3B&=H%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465&a:5%3B&=Esc%0ACtrl&_c=%236750f2&t=%2344b8b8&a:7%3B&=A&_x:12&a:5%3B&=%2F:%0A%2F%3B&_c=%233a1ee6&t=%23b84465%3B&=%22%0A'%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=C&_x:8&a:5%3B&=%3C%0A,%3B&@_y:-0.8700000000000001&x:2&a:7%3B&=X&_x:1%3B&=V&_x:6%3B&=M&_x:1&a:5%3B&=%3E%0A.%3B&@_y:-0.8799999999999999&x:5&a:7%3B&=B&_x:4%3B&=N%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=Shift&_c=%236750f2&t=%2344b8b8%3B&=Z&_x:12&a:5%3B&=%3F%0A%2F%2F&_c=%233a1ee6&t=%23b84465&a:7%3B&=Enter%3B&@_y:-0.17999999999999972&x:11.75%3B&=Fn%3B&@_ry:0.25&y:2.95&x:3.3%3B&=Alt%3B&@_r:12&ry:1.75&y:0.5&x:4.8%3B&=Cmd%3B&@_r:35&rx:6.5&ry:4.25&y:-0.75&x:-0.75&c=%23d12424&t=%23ffffff&h:1.5%3B&=Space%3B&@_r:-35&rx:13&y:-2.75&x:-3.0999999999999996&h:1.5%3B&=Back%20Space%3B&@_r:-12&rx:0&ry:0&y:5.55&x:9.55&c=%233a1ee6&t=%23b84465%3B&=Code)
|
||||
|
||||
## Code Layer
|
||||
|
||||
[](http://www.keyboard-layout-editor.com/##@_backcolor=%23d8c1f5&switchMount=cherry&pcb:false&plate:true%3B&@_x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=%23&_x:8%3B&=*%3B&@_y:-0.87&x:2%3B&=%2F@&_x:1%3B&=$&_x:6&a:5%3B&=%3C%0A(&_x:1%3B&=%3E%0A)%3B&@_y:-0.8799999999999999&x:5&a:7%3B&=%25&_x:4%3B&=%5E%3B&@_y:-0.87&c=%233a1ee6&t=%23b84465%3B&=Tab&_c=%236750f2&t=%2344b8b8%3B&=!&_x:12%3B&=!%2F=&_c=%233a1ee6&t=%23b84465&a:5%3B&=+%0A%2F=%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=3&_x:8%3B&=↑%3B&@_y:-0.8700000000000001&x:2%3B&=2&_x:1%3B&=4&_x:6&a:5%3B&=%7B%0A%5B&_x:1%3B&=%7D%0A%5D%3B&@_y:-0.8799999999999999&x:5&a:7%3B&=5&_x:4&a:5%3B&=%2F_%0A-%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=Esc%0ACtrl&_c=%236750f2&t=%2344b8b8&a:7%3B&=1&_x:12&a:5%3B&=%2F:%0A%2F%3B&_c=%233a1ee6&t=%23b84465%3B&=%7C%0A%5C%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=8&_x:8%3B&=↓%3B&@_y:-0.8700000000000001&x:2%3B&=7&_x:1%3B&=9&_x:6%3B&=←&_x:1%3B&=→%3B&@_y:-0.8799999999999999&x:5%3B&=0&_x:4%3B&=%2F&%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=Shift&_c=%236750f2&t=%2344b8b8%3B&=6&_x:12&a:5%3B&=%3F%0A%2F%2F&_c=%233a1ee6&t=%23b84465&a:7%3B&=Enter%3B&@_y:-0.17999999999999972&x:11.75%3B&=Fn%3B&@_ry:0.25&y:2.95&x:3.3%3B&=Alt%3B&@_r:12&ry:1.75&y:0.5&x:4.8%3B&=Cmd%3B&@_r:35&rx:6.5&ry:4.25&y:-0.75&x:-0.75&c=%23d12424&t=%23ffffff&h:1.5%3B&=.%3B&@_r:-35&rx:13&y:-2.75&x:-3.0999999999999996&h:1.5%3B&=Back%20Space%3B&@_r:-12&rx:0&ry:0&y:5.55&x:9.55&c=%233a1ee6&t=%23b84465%3B&=Code)
|
||||
|
||||
## Fn Layer
|
||||
|
||||
[](http://www.keyboard-layout-editor.com/##@_backcolor=%23d8c1f5&switchMount=cherry&pcb:false&plate:true%3B&@_x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=F3&_x:8%3B&=F8%3B&@_y:-0.87&x:2%3B&=F2&_x:1%3B&=F4&_x:6%3B&=F7&_x:1%3B&=F9%3B&@_y:-0.8799999999999999&x:5%3B&=F5&_x:4%3B&=F6%3B&@_y:-0.87&c=%233a1ee6&t=%23b84465%3B&=&_c=%236750f2&t=%2344b8b8%3B&=F1&_x:12%3B&=F10&_c=%233a1ee6&t=%23b84465%3B&=F11%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8%3B&=RGB%20Value+&_x:8%3B&=Page%20Up%3B&@_y:-0.8700000000000001&x:2%3B&=RGB%20Sat+&_x:1%3B&=RGB%20Reset&_x:6%3B&=&_x:1%3B&=%3B&@_y:-0.8799999999999999&x:5%3B&=Bright+&_x:4%3B&=Vol+%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=RGB%20Toggle&_c=%236750f2&t=%2344b8b8%3B&=RGB%20Hue+&_x:12%3B&=&_c=%233a1ee6&t=%23b84465%3B&=%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8%3B&=RGB%20Value-&_x:8%3B&=Page%20Down%3B&@_y:-0.8700000000000001&x:2%3B&=RGB%20Sat-&_x:1%3B&=Reset&_x:6%3B&=Ctrl+A&_x:1%3B&=Ctrl+E%3B&@_y:-0.8799999999999999&x:5%3B&=Bright-&_x:4%3B&=Vol-%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=RGB%20Mode&_c=%236750f2&t=%2344b8b8%3B&=RGB%20Hue-&_x:12%3B&=&_c=%233a1ee6&t=%23b84465%3B&=%3B&@_y:-0.17999999999999972&x:11.75%3B&=Fn%3B&@_ry:0.25&y:2.95&x:3.3%3B&=%3B&@_r:12&ry:1.75&y:0.5&x:4.8%3B&=%3B&@_r:35&rx:6.5&ry:4.25&y:-0.75&x:-0.75&c=%23d12424&t=%23ffffff&h:1.5%3B&=%3B&@_r:-35&rx:13&y:-2.75&x:-3.0999999999999996&h:1.5%3B&=Mute%3B&@_r:-12&rx:0&ry:0&y:5.55&x:9.55&c=%233a1ee6&t=%23b84465%3B&=Code)
|
||||
@@ -1,32 +0,0 @@
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||
TAP_DANCE_ENABLE = no
|
||||
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
# If you want to change the display of OLED, you need to change here
|
||||
SRC += oled.c \
|
||||
./lib/glcdfont.c \
|
||||
./lib/rgb_state_reader.c \
|
||||
./lib/layer_state_reader.c \
|
||||
./lib/logo_reader.c \
|
||||
./lib/keylogger.c \
|
||||
@@ -51,65 +51,78 @@ void led_set_kb(uint8_t usb_led) {
|
||||
// 05 06 06 05
|
||||
// 15 14 07 07 14 15 3
|
||||
|
||||
/* {row | col << 4} logical layout rows/cols
|
||||
* | {x=0..224, y=0..64} physical layout
|
||||
* | | | modifier
|
||||
* | | | */
|
||||
#define RGB_MATRIX_LEFT_LEDS \
|
||||
{ { 0xFF }, { 85, 16 }, 2 }, /* 1 */ \
|
||||
{ { 0xFF }, { 50, 13 }, 2 }, /* 2 */ \
|
||||
{ { 0xFF }, { 16, 20 }, 2 }, /* 3 */ \
|
||||
{ { 0xFF }, { 16, 38 }, 2 }, /* 4 */ \
|
||||
{ { 0xFF }, { 50, 48 }, 2 }, /* 5 */ \
|
||||
{ { 0xFF }, { 85, 52 }, 2 }, /* 6 */ \
|
||||
{ { 3 | ( 5 << 4 ) }, { 95, 63 }, 1 }, /* 7 */ \
|
||||
{ { 2 | ( 5 << 4 ) }, { 85, 39 }, 4 }, /* 8 */ \
|
||||
{ { 1 | ( 5 << 4 ) }, { 85, 21 }, 4 }, /* 9 */ \
|
||||
{ { 0 | ( 5 << 4 ) }, { 85, 4 }, 4 }, /* 10 */ \
|
||||
{ { 0 | ( 4 << 4 ) }, { 68, 02 }, 4 }, /* 11 */ \
|
||||
{ { 1 | ( 4 << 4 ) }, { 68, 19 }, 4 }, /* 12 */ \
|
||||
{ { 2 | ( 4 << 4 ) }, { 68, 37 }, 4 }, /* 13 */ \
|
||||
{ { 3 | ( 4 << 4 ) }, { 80, 58 }, 1 }, /* 14 */ \
|
||||
{ { 3 | ( 3 << 4 ) }, { 60, 55 }, 1 }, /* 15 */ \
|
||||
{ { 2 | ( 3 << 4 ) }, { 50, 35 }, 4 }, /* 16 */ \
|
||||
{ { 1 | ( 3 << 4 ) }, { 50, 13 }, 4 }, /* 17 */ \
|
||||
{ { 0 | ( 3 << 4 ) }, { 50, 0 }, 4 }, /* 18 */ \
|
||||
{ { 0 | ( 2 << 4 ) }, { 33, 3 }, 4 }, /* 19 */ \
|
||||
{ { 1 | ( 2 << 4 ) }, { 33, 20 }, 4 }, /* 20 */ \
|
||||
{ { 2 | ( 2 << 4 ) }, { 33, 37 }, 4 }, /* 21 */ \
|
||||
{ { 2 | ( 1 << 4 ) }, { 16, 42 }, 4 }, /* 22 */ \
|
||||
{ { 1 | ( 1 << 4 ) }, { 16, 24 }, 4 }, /* 23 */ \
|
||||
{ { 0 | ( 1 << 4 ) }, { 16, 7 }, 4 }, /* 24 */ \
|
||||
{ { 0 | ( 0 << 4 ) }, { 0, 7 }, 1 }, /* 25 */ \
|
||||
{ { 1 | ( 0 << 4 ) }, { 0, 24 }, 1 }, /* 26 */ \
|
||||
{ { 2 | ( 0 << 4 ) }, { 0, 41 }, 1 }, /* 27 */
|
||||
|
||||
#define RGB_MATRIX_RIGHT_LEDS \
|
||||
{ { 0xFF }, { 139, 16 }, 2 }, /* 1 */ \
|
||||
{ { 0xFF }, { 174, 13 }, 2 }, /* 2 */ \
|
||||
{ { 0xFF }, { 208, 20 }, 2 }, /* 3 */ \
|
||||
{ { 0xFF }, { 208, 38 }, 2 }, /* 4 */ \
|
||||
{ { 0xFF }, { 174, 48 }, 2 }, /* 5 */ \
|
||||
{ { 0xFF }, { 139, 52 }, 2 }, /* 6 */ \
|
||||
{ { 7 | ( 5 << 4 ) }, { 129, 63 }, 1 }, /* 7 */ \
|
||||
{ { 6 | ( 5 << 4 ) }, { 139, 39 }, 4 }, /* 8 */ \
|
||||
{ { 5 | ( 5 << 4 ) }, { 139, 21 }, 4 }, /* 9 */ \
|
||||
{ { 4 | ( 5 << 4 ) }, { 139, 4 }, 4 }, /* 10 */ \
|
||||
{ { 4 | ( 4 << 4 ) }, { 156, 02 }, 4 }, /* 11 */ \
|
||||
{ { 5 | ( 4 << 4 ) }, { 156, 19 }, 4 }, /* 12 */ \
|
||||
{ { 6 | ( 4 << 4 ) }, { 156, 37 }, 4 }, /* 13 */ \
|
||||
{ { 7 | ( 4 << 4 ) }, { 144, 58 }, 1 }, /* 14 */ \
|
||||
{ { 7 | ( 3 << 4 ) }, { 164, 55 }, 1 }, /* 15 */ \
|
||||
{ { 6 | ( 3 << 4 ) }, { 174, 35 }, 4 }, /* 16 */ \
|
||||
{ { 5 | ( 3 << 4 ) }, { 174, 13 }, 4 }, /* 17 */ \
|
||||
{ { 4 | ( 3 << 4 ) }, { 174, 0 }, 4 }, /* 18 */ \
|
||||
{ { 4 | ( 2 << 4 ) }, { 191, 3 }, 4 }, /* 19 */ \
|
||||
{ { 5 | ( 2 << 4 ) }, { 191, 20 }, 4 }, /* 20 */ \
|
||||
{ { 6 | ( 2 << 4 ) }, { 191, 37 }, 4 }, /* 21 */ \
|
||||
{ { 6 | ( 1 << 4 ) }, { 208, 42 }, 4 }, /* 22 */ \
|
||||
{ { 5 | ( 1 << 4 ) }, { 208, 24 }, 4 }, /* 23 */ \
|
||||
{ { 4 | ( 1 << 4 ) }, { 208, 7 }, 4 }, /* 24 */ \
|
||||
{ { 4 | ( 0 << 4 ) }, { 224, 7 }, 1 }, /* 25 */ \
|
||||
{ { 5 | ( 0 << 4 ) }, { 224, 24 }, 1 }, /* 26 */ \
|
||||
{ { 6 | ( 0 << 4 ) }, { 224, 41 }, 1 }, /* 27 */
|
||||
|
||||
#ifdef RGB_MATRIX_SPLIT_RIGHT
|
||||
led_config_t g_led_config = { {
|
||||
{ 51, 50, 45, 44, 37, 36, NO_LED },
|
||||
{ 52, 49, 46, 43, 38, 35, NO_LED },
|
||||
{ 53, 48, 47, 42, 39, 34, NO_LED },
|
||||
{ NO_LED, NO_LED, NO_LED, 41, 40, 33, NO_LED },
|
||||
{ 24, 23, 18, 17, 10, 9, NO_LED },
|
||||
{ 25, 22, 19, 16, 11, 8, NO_LED },
|
||||
{ 26, 21, 20, 15, 12, 7, NO_LED },
|
||||
{ NO_LED, NO_LED, NO_LED, 14, 13, 6, NO_LED }
|
||||
}, {
|
||||
{ 139, 16 }, { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 },
|
||||
{ 139, 39 }, { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 },
|
||||
{ 164, 55 }, { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 },
|
||||
{ 208, 42 }, { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 }, { 85, 16 },
|
||||
{ 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 }, { 85, 39 },
|
||||
{ 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 }, { 60, 55 },
|
||||
{ 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 }, { 16, 42 },
|
||||
{ 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 }
|
||||
}, {
|
||||
2, 2, 2, 2, 2, 2, 1,
|
||||
4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 1, 1, 1, 2,
|
||||
2, 2, 2, 2, 2, 1, 4,
|
||||
4, 4, 4, 4, 4, 1, 1,
|
||||
4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 1, 1, 1
|
||||
} };
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
RGB_MATRIX_RIGHT_LEDS
|
||||
RGB_MATRIX_LEFT_LEDS
|
||||
};
|
||||
#else
|
||||
led_config_t g_led_config = { {
|
||||
{ 24, 23, 18, 17, 10, 9, NO_LED },
|
||||
{ 25, 22, 19, 16, 11, 8, NO_LED },
|
||||
{ 26, 21, 20, 15, 12, 7, NO_LED },
|
||||
{ NO_LED, NO_LED, NO_LED, 14, 13, 6, NO_LED },
|
||||
{ 51, 50, 45, 44, 37, 36, NO_LED },
|
||||
{ 52, 49, 46, 43, 38, 35, NO_LED },
|
||||
{ 53, 48, 47, 42, 39, 34, NO_LED },
|
||||
{ NO_LED, NO_LED, NO_LED, 41, 40, 33, NO_LED }
|
||||
}, {
|
||||
{ 85, 16 }, { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 },
|
||||
{ 85, 39 }, { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 },
|
||||
{ 60, 55 }, { 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 },
|
||||
{ 16, 42 }, { 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 }, { 139, 16 },
|
||||
{ 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 }, { 139, 39 },
|
||||
{ 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 }, { 164, 55 },
|
||||
{ 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 }, { 208, 42 },
|
||||
{ 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 }
|
||||
}, {
|
||||
2, 2, 2, 2, 2, 2, 1,
|
||||
4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 1, 1, 1, 2,
|
||||
2, 2, 2, 2, 2, 1, 4,
|
||||
4, 4, 4, 4, 4, 1, 1,
|
||||
4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 1, 1, 1
|
||||
} };
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
RGB_MATRIX_LEFT_LEDS
|
||||
RGB_MATRIX_RIGHT_LEDS
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "rgb.h"
|
||||
#include "rgb_matrix_types.h"
|
||||
|
||||
// Optional override functions below.
|
||||
// You can leave any or all of these undefined.
|
||||
@@ -53,32 +52,76 @@ void led_set_kb(uint8_t usb_led) {
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
||||
led_config_t g_led_config = { {
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
|
||||
{ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 },
|
||||
{ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, 43 },
|
||||
{ 44, NO_LED, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 },
|
||||
{ 58, 59, 60, 61, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 62, 63, NO_LED, 64, 65, 66 }
|
||||
}, {
|
||||
// Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Ins
|
||||
{ 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 202, 0 }, { 225, 0 },
|
||||
// Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , Del
|
||||
{ 7, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 }, { 225, 16 },
|
||||
// Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Pgup
|
||||
{ 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, { 225, 32 },
|
||||
// LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Pgdn
|
||||
{ 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 }, { 210, 48 }, { 225, 48 },
|
||||
// Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right
|
||||
{ 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 }
|
||||
}, {
|
||||
// Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Ins
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||
// Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , Del
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||
// Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Pgup
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||
// LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Pgdn
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
|
||||
// Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right
|
||||
1, 1, 1, 4, 1, 1, 1, 1, 1
|
||||
} };
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
{{0|(0<<4)}, {15*0, 0}, 4}, // Esc
|
||||
{{0|(1<<4)}, {15*1, 0}, 4}, // 1
|
||||
{{0|(2<<4)}, {15*2, 0}, 4}, // 2
|
||||
{{0|(3<<4)}, {15*3, 0}, 4}, // 3
|
||||
{{0|(4<<4)}, {15*4, 0}, 4}, // 4
|
||||
{{0|(5<<4)}, {15*5, 0}, 4}, // 5
|
||||
{{0|(6<<4)}, {15*6, 0}, 4}, // 6
|
||||
{{0|(7<<4)}, {15*7, 0}, 4}, // 7
|
||||
{{0|(8<<4)}, {15*8, 0}, 4}, // 8
|
||||
{{0|(9<<4)}, {15*9, 0}, 4}, // 9
|
||||
{{0|(10<<4)}, {15*10, 0}, 4}, // 0
|
||||
{{0|(11<<4)}, {15*11, 0}, 4}, // -
|
||||
{{0|(12<<4)}, {15*12, 0}, 4}, // =
|
||||
{{0|(13<<4)}, {15*13.5, 0}, 1}, // Backspace
|
||||
{{0|(14<<4)}, {15*15, 0}, 1}, // Ins
|
||||
|
||||
{{1|(0<<4)}, {15*0.5, 16}, 1}, // Tab
|
||||
{{1|(1<<4)}, {15*1.5, 16}, 4}, // Q
|
||||
{{1|(2<<4)}, {15*2.5, 16}, 4}, // W
|
||||
{{1|(3<<4)}, {15*3.5, 16}, 4}, // E
|
||||
{{1|(4<<4)}, {15*4.5, 16}, 4}, // R
|
||||
{{1|(5<<4)}, {15*5.5, 16}, 4}, // T
|
||||
{{1|(6<<4)}, {15*6.5, 16}, 4}, // Y
|
||||
{{1|(7<<4)}, {15*7.5, 16}, 4}, // U
|
||||
{{1|(8<<4)}, {15*8.5, 16}, 4}, // I
|
||||
{{1|(9<<4)}, {15*9.5, 16}, 4}, // O
|
||||
{{1|(10<<4)}, {15*10.5, 16}, 4}, // P
|
||||
{{1|(11<<4)}, {15*11.5, 16}, 4}, // [
|
||||
{{1|(12<<4)}, {15*12.5, 16}, 4}, // ]
|
||||
{{1|(13<<4)}, {15*13.75, 16}, 1}, //
|
||||
{{1|(14<<4)}, {15*15, 16}, 1}, // Del
|
||||
|
||||
{{2|(0<<4)}, {15*0.75, 32}, 1}, // Capslock
|
||||
{{2|(1<<4)}, {15*1.75, 32}, 4}, // A
|
||||
{{2|(2<<4)}, {15*2.75, 32}, 4}, // S
|
||||
{{2|(3<<4)}, {15*3.75, 32}, 4}, // D
|
||||
{{2|(4<<4)}, {15*4.75, 32}, 4}, // F
|
||||
{{2|(5<<4)}, {15*5.75, 32}, 4}, // G
|
||||
{{2|(6<<4)}, {15*6.75, 32}, 4}, // H
|
||||
{{2|(7<<4)}, {15*7.75, 32}, 4}, // J
|
||||
{{2|(8<<4)}, {15*8.75, 32}, 4}, // K
|
||||
{{2|(9<<4)}, {15*9.75, 32}, 4}, // L
|
||||
{{2|(10<<4)}, {15*10.75, 32}, 4}, // ;
|
||||
{{2|(11<<4)}, {15*11.75, 32}, 4}, // '
|
||||
{{2|(13<<4)}, {15*13.25, 32}, 1}, // Enter
|
||||
{{2|(14<<4)}, {15*15, 32}, 1}, // Pgup
|
||||
|
||||
{{3|(0<<4)}, {15*1.25, 48}, 1}, // LShift
|
||||
{{3|(2<<4)}, {15*2, 48}, 4}, // Z
|
||||
{{3|(3<<4)}, {15*3, 48}, 4}, // X
|
||||
{{3|(4<<4)}, {15*4, 48}, 4}, // C
|
||||
{{3|(5<<4)}, {15*5, 48}, 4}, // V
|
||||
{{3|(6<<4)}, {15*6, 48}, 4}, // B
|
||||
{{3|(7<<4)}, {15*7, 48}, 4}, // N
|
||||
{{3|(8<<4)}, {15*8, 48}, 4}, // M
|
||||
{{3|(9<<4)}, {15*9, 48}, 4}, // ,
|
||||
{{3|(10<<4)}, {15*10, 48}, 4}, // .
|
||||
{{3|(11<<4)}, {15*11, 48}, 4}, // /
|
||||
{{3|(12<<4)}, {15*12.75, 48}, 1}, // Shift
|
||||
{{3|(13<<4)}, {15*14, 48}, 1}, // Up
|
||||
{{3|(14<<4)}, {15*15, 48}, 1}, // Pgdn
|
||||
|
||||
{{4|(0<<4)}, {15*0.25, 64}, 1}, // Ctrl
|
||||
{{4|(1<<4)}, {15*1.5, 64}, 1}, // GUI
|
||||
{{4|(2<<4)}, {15*2.25, 64}, 1}, // Alt
|
||||
{{4|(3<<4)}, {15*6.75, 64}, 4}, // Space
|
||||
{{4|(9<<4)}, {15*9, 64}, 1}, // RAlt
|
||||
{{4|(10<<4)}, {15*10.25, 64}, 1}, // FN
|
||||
{{4|(12<<4)}, {15*13, 64}, 1}, // Left
|
||||
{{4|(13<<4)}, {15*14, 64}, 1}, // Down
|
||||
{{4|(14<<4)}, {15*15, 64}, 1}, // Right
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . |Tap(/) Shft| U | ESC |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Ctrl | Alt | Cmd | Space | Alt | Fn | L | D | R |
|
||||
* | Ctrl | Alt | Cmd | Space | Cmd | Fn | L | D | R |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
@@ -21,16 +21,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
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,
|
||||
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, _______, RSFT_T(KC_SLSH) , KC_UP, KC_ESCAPE,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT
|
||||
),
|
||||
|
||||
/* FN Layer
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | Mute | Prev | Next |
|
||||
* | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | MUTE | Vol- | Vol+ |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | | | Vol- | Vol+ | Play/Pause |
|
||||
* | | | | | | | | | | | Prev | Next | Play/Pause |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | |Scr- |Scr+ | |PG_UP|RESET|
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
@@ -40,8 +40,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
LAYOUT_directional(
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL,
|
||||
_______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, _______, KC_MRWD, KC_MFFD,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC__VOLDOWN, KC__VOLUP,
|
||||
_______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, KC_MUTE, KC__VOLDOWN, KC__VOLUP,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MRWD, KC_MFFD,
|
||||
KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, _______, KC_PGUP, RESET,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END
|
||||
),
|
||||
|
||||
@@ -10,7 +10,9 @@ Settings:
|
||||
* Del is available as `Fn` + `Backspace`
|
||||
* `/ ?` are available when you tap the right shift. Otherwise RShift is shift when held down
|
||||
* RESET is available as `Fn`+ ` ESC`
|
||||
* Underglow toggle is available as `Fn` + `Q`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus!
|
||||
* Underglow toggle and mode selection are available as `Fn` + `Q` and `Fn` + `S`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus!
|
||||
* Media play/pause doesn't seem to work with anything but iTunes at the moment. FML
|
||||
|
||||
|
||||
### Initial Installation
|
||||
|
||||
@@ -49,7 +51,7 @@ Hope this helps!
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| Shift | Z | X | C | V | B | N | M | , | . | Tap:/ RSh | U | ESC |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| Ctrl | Alt | Cmd | Space | Alt | Fn | L | D | R |
|
||||
| Ctrl | Alt | Cmd | Space | Cmd | Fn | L | D | R |
|
||||
`-----------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
@@ -59,9 +61,9 @@ FN Layer
|
||||
,-----------------------------------------------------------------------------------------.
|
||||
| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | MUTE | Prev | Next |
|
||||
| |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | MUTE | Vol- | Vol+ |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| | | | | | | | | | | Vol- | Vol+ | Play/Pause |
|
||||
| | | | | | | | | | | Prev | Next | Play/Pause |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| | | | | | | | |Scr- |Scr+ | | PG_UP |RESET|
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
|
||||
@@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | | Up |Shift|
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Ctrl | Alt | Gui | Space |Gui/_ML| Alt | Left| Down|Right|
|
||||
* | Ctrl | Alt | Gui | Space / _NL |Gui/_ML| Alt | Left| Down|Right|
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_BL] = LAYOUT_all(
|
||||
@@ -30,25 +30,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
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,
|
||||
LT(_FL, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_A, KC_UP, KC_RSFT,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_NO, LM(_ML, MOD_RGUI), KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_NO, LT(_NL, KC_SPC), KC_NO, LM(_ML, MOD_RGUI), KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||
|
||||
/* ,-----------------------------------------------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | PgUp| | | | | Up | | | | | |
|
||||
* | | | | | | | |PgUp | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | |Home |PgDwn| End | | | Left| Down|Right| | | |
|
||||
* | | | | | | | Left| Down| Up |Right| | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | | | | | | |
|
||||
* | | | | | | | |PgDwn| | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FL] = LAYOUT_all(
|
||||
_______, 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_NO, KC_DEL,
|
||||
_______, _______, _______, KC_PGUP, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______,
|
||||
_______, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______,
|
||||
_______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______,
|
||||
_______, KC_NO, _______, _______, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
/* ,-----------------------------------------------------------------------------------------.
|
||||
@@ -64,11 +64,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ML] = LAYOUT_all(
|
||||
KC_MEDIA_EJECT, BR_DOWN, BR_UP, BL_TOGG, RGB_TOG, _______, _______, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_NO, _______,
|
||||
KC_MEDIA_EJECT, BR_DOWN, BR_UP, _______, _______, _______, _______, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_NO, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_BRTG, BL_INC, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, RGB_MODE_REVERSE, BL_DEC, RGB_MODE_FORWARD),
|
||||
_______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
/* ,-----------------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | % | ( | ) | < | > | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | * | 0 | 1 | 2 | 3 | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | . | - | 4 | 5 | 6 | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | , | = | 7 | 8 | 9 | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_NL] = LAYOUT_all(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_PERCENT, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LEFT_ANGLE_BRACKET, KC_RIGHT_ANGLE_BRACKET, KC_NO, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_ASTERISK, KC_0, KC_1, KC_2, KC_3, _______, RESET,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_DOT, KC_MINS, KC_4, KC_5, KC_6, _______,
|
||||
_______, KC_NO, _______, _______, _______, _______, _______, _______, KC_COMMA, KC_EQL, KC_7, KC_8, KC_9, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
BACKLIGHT_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = no
|
||||
RGBLIGHT_ENABLE = no
|
||||
126
keyboards/dztech/boards/GENERIC_STM32_F303XC/board.c
Normal file
126
keyboards/dztech/boards/GENERIC_STM32_F303XC/board.c
Normal file
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#include "hal.h"
|
||||
|
||||
#if HAL_USE_PAL || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief PAL setup.
|
||||
* @details Digital I/O ports static configuration as defined in @p board.h.
|
||||
* This variable is used by the HAL when initializing the PAL driver.
|
||||
*/
|
||||
const PALConfig pal_default_config = {
|
||||
#if STM32_HAS_GPIOA
|
||||
{VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR,
|
||||
VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
|
||||
#endif
|
||||
#if STM32_HAS_GPIOB
|
||||
{VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR,
|
||||
VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
|
||||
#endif
|
||||
#if STM32_HAS_GPIOC
|
||||
{VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR,
|
||||
VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
|
||||
#endif
|
||||
#if STM32_HAS_GPIOD
|
||||
{VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR,
|
||||
VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
|
||||
#endif
|
||||
#if STM32_HAS_GPIOE
|
||||
{VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR,
|
||||
VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH},
|
||||
#endif
|
||||
#if STM32_HAS_GPIOF
|
||||
{VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR,
|
||||
VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH},
|
||||
#endif
|
||||
#if STM32_HAS_GPIOG
|
||||
{VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR,
|
||||
VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH},
|
||||
#endif
|
||||
#if STM32_HAS_GPIOH
|
||||
{VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR,
|
||||
VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH},
|
||||
#endif
|
||||
#if STM32_HAS_GPIOI
|
||||
{VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR,
|
||||
VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
void enter_bootloader_mode_if_requested(void);
|
||||
|
||||
/**
|
||||
* @brief Early initialization code.
|
||||
* @details This initialization must be performed just after stack setup
|
||||
* and before any other initialization.
|
||||
*/
|
||||
void __early_init(void) {
|
||||
enter_bootloader_mode_if_requested();
|
||||
stm32_clock_init();
|
||||
}
|
||||
|
||||
#if HAL_USE_SDC || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief SDC card detection.
|
||||
*/
|
||||
bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
|
||||
|
||||
(void)sdcp;
|
||||
/* TODO: Fill the implementation.*/
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SDC card write protection detection.
|
||||
*/
|
||||
bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
|
||||
|
||||
(void)sdcp;
|
||||
/* TODO: Fill the implementation.*/
|
||||
return false;
|
||||
}
|
||||
#endif /* HAL_USE_SDC */
|
||||
|
||||
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief MMC_SPI card detection.
|
||||
*/
|
||||
bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
|
||||
|
||||
(void)mmcp;
|
||||
/* TODO: Fill the implementation.*/
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief MMC_SPI card write protection detection.
|
||||
*/
|
||||
bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
|
||||
|
||||
(void)mmcp;
|
||||
/* TODO: Fill the implementation.*/
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Board-specific initialization code.
|
||||
* @todo Add your board-specific code, if any.
|
||||
*/
|
||||
void boardInit(void) {
|
||||
}
|
||||
1187
keyboards/dztech/boards/GENERIC_STM32_F303XC/board.h
Normal file
1187
keyboards/dztech/boards/GENERIC_STM32_F303XC/board.h
Normal file
File diff suppressed because it is too large
Load Diff
5
keyboards/dztech/boards/GENERIC_STM32_F303XC/board.mk
Normal file
5
keyboards/dztech/boards/GENERIC_STM32_F303XC/board.mk
Normal file
@@ -0,0 +1,5 @@
|
||||
# List of all the board related files.
|
||||
BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC/board.c
|
||||
|
||||
# Required include directories
|
||||
BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC
|
||||
7
keyboards/dztech/dz40rgb/bootloader_defs.h
Normal file
7
keyboards/dztech/dz40rgb/bootloader_defs.h
Normal file
@@ -0,0 +1,7 @@
|
||||
/* Address for jumping to bootloader on STM32 chips. */
|
||||
/* It is chip dependent, the correct number can be looked up here:
|
||||
* http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
|
||||
* This also requires a patch to chibios:
|
||||
* <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
|
||||
*/
|
||||
#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800
|
||||
520
keyboards/dztech/dz40rgb/chconf.h
Normal file
520
keyboards/dztech/dz40rgb/chconf.h
Normal file
@@ -0,0 +1,520 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file templates/chconf.h
|
||||
* @brief Configuration file template.
|
||||
* @details A copy of this file must be placed in each project directory, it
|
||||
* contains the application specific kernel settings.
|
||||
*
|
||||
* @addtogroup config
|
||||
* @details Kernel related settings and hooks.
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef CHCONF_H
|
||||
#define CHCONF_H
|
||||
|
||||
#define _CHIBIOS_RT_CONF_
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name System timers settings
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief System time counter resolution.
|
||||
* @note Allowed values are 16 or 32 bits.
|
||||
*/
|
||||
#define CH_CFG_ST_RESOLUTION 32
|
||||
|
||||
/**
|
||||
* @brief System tick frequency.
|
||||
* @details Frequency of the system timer that drives the system ticks. This
|
||||
* setting also defines the system tick time unit.
|
||||
*/
|
||||
#define CH_CFG_ST_FREQUENCY 100000
|
||||
|
||||
/**
|
||||
* @brief Time delta constant for the tick-less mode.
|
||||
* @note If this value is zero then the system uses the classic
|
||||
* periodic tick. This value represents the minimum number
|
||||
* of ticks that is safe to specify in a timeout directive.
|
||||
* The value one is not valid, timeouts are rounded up to
|
||||
* this value.
|
||||
*/
|
||||
#define CH_CFG_ST_TIMEDELTA 2
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name Kernel parameters and options
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Round robin interval.
|
||||
* @details This constant is the number of system ticks allowed for the
|
||||
* threads before preemption occurs. Setting this value to zero
|
||||
* disables the preemption for threads with equal priority and the
|
||||
* round robin becomes cooperative. Note that higher priority
|
||||
* threads can still preempt, the kernel is always preemptive.
|
||||
* @note Disabling the round robin preemption makes the kernel more compact
|
||||
* and generally faster.
|
||||
* @note The round robin preemption is not supported in tickless mode and
|
||||
* must be set to zero in that case.
|
||||
*/
|
||||
#define CH_CFG_TIME_QUANTUM 0
|
||||
|
||||
/**
|
||||
* @brief Managed RAM size.
|
||||
* @details Size of the RAM area to be managed by the OS. If set to zero
|
||||
* then the whole available RAM is used. The core memory is made
|
||||
* available to the heap allocator and/or can be used directly through
|
||||
* the simplified core memory allocator.
|
||||
*
|
||||
* @note In order to let the OS manage the whole RAM the linker script must
|
||||
* provide the @p __heap_base__ and @p __heap_end__ symbols.
|
||||
* @note Requires @p CH_CFG_USE_MEMCORE.
|
||||
*/
|
||||
#define CH_CFG_MEMCORE_SIZE 0
|
||||
|
||||
/**
|
||||
* @brief Idle thread automatic spawn suppression.
|
||||
* @details When this option is activated the function @p chSysInit()
|
||||
* does not spawn the idle thread. The application @p main()
|
||||
* function becomes the idle thread and must implement an
|
||||
* infinite loop.
|
||||
*/
|
||||
#define CH_CFG_NO_IDLE_THREAD FALSE
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name Performance options
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief OS optimization.
|
||||
* @details If enabled then time efficient rather than space efficient code
|
||||
* is used when two possible implementations exist.
|
||||
*
|
||||
* @note This is not related to the compiler optimization options.
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_OPTIMIZE_SPEED TRUE
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name Subsystem options
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Time Measurement APIs.
|
||||
* @details If enabled then the time measurement APIs are included in
|
||||
* the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_TM TRUE
|
||||
|
||||
/**
|
||||
* @brief Threads registry APIs.
|
||||
* @details If enabled then the registry APIs are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_REGISTRY TRUE
|
||||
|
||||
/**
|
||||
* @brief Threads synchronization APIs.
|
||||
* @details If enabled then the @p chThdWait() function is included in
|
||||
* the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_WAITEXIT TRUE
|
||||
|
||||
/**
|
||||
* @brief Semaphores APIs.
|
||||
* @details If enabled then the Semaphores APIs are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_SEMAPHORES TRUE
|
||||
|
||||
/**
|
||||
* @brief Semaphores queuing mode.
|
||||
* @details If enabled then the threads are enqueued on semaphores by
|
||||
* priority rather than in FIFO order.
|
||||
*
|
||||
* @note The default is @p FALSE. Enable this if you have special
|
||||
* requirements.
|
||||
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||
*/
|
||||
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
|
||||
|
||||
/**
|
||||
* @brief Mutexes APIs.
|
||||
* @details If enabled then the mutexes APIs are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_MUTEXES TRUE
|
||||
|
||||
/**
|
||||
* @brief Enables recursive behavior on mutexes.
|
||||
* @note Recursive mutexes are heavier and have an increased
|
||||
* memory footprint.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||
*/
|
||||
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
|
||||
|
||||
/**
|
||||
* @brief Conditional Variables APIs.
|
||||
* @details If enabled then the conditional variables APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||
*/
|
||||
#define CH_CFG_USE_CONDVARS TRUE
|
||||
|
||||
/**
|
||||
* @brief Conditional Variables APIs with timeout.
|
||||
* @details If enabled then the conditional variables APIs with timeout
|
||||
* specification are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_CONDVARS.
|
||||
*/
|
||||
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
|
||||
|
||||
/**
|
||||
* @brief Events Flags APIs.
|
||||
* @details If enabled then the event flags APIs are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_EVENTS TRUE
|
||||
|
||||
/**
|
||||
* @brief Events Flags APIs with timeout.
|
||||
* @details If enabled then the events APIs with timeout specification
|
||||
* are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_EVENTS.
|
||||
*/
|
||||
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
|
||||
|
||||
/**
|
||||
* @brief Synchronous Messages APIs.
|
||||
* @details If enabled then the synchronous messages APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_MESSAGES TRUE
|
||||
|
||||
/**
|
||||
* @brief Synchronous Messages queuing mode.
|
||||
* @details If enabled then messages are served by priority rather than in
|
||||
* FIFO order.
|
||||
*
|
||||
* @note The default is @p FALSE. Enable this if you have special
|
||||
* requirements.
|
||||
* @note Requires @p CH_CFG_USE_MESSAGES.
|
||||
*/
|
||||
#define CH_CFG_USE_MESSAGES_PRIORITY TRUE
|
||||
|
||||
/**
|
||||
* @brief Mailboxes APIs.
|
||||
* @details If enabled then the asynchronous messages (mailboxes) APIs are
|
||||
* included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||
*/
|
||||
#define CH_CFG_USE_MAILBOXES TRUE
|
||||
|
||||
/**
|
||||
* @brief Core Memory Manager APIs.
|
||||
* @details If enabled then the core memory manager APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_MEMCORE TRUE
|
||||
|
||||
/**
|
||||
* @brief Heap Allocator APIs.
|
||||
* @details If enabled then the memory heap allocator APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
|
||||
* @p CH_CFG_USE_SEMAPHORES.
|
||||
* @note Mutexes are recommended.
|
||||
*/
|
||||
#define CH_CFG_USE_HEAP TRUE
|
||||
|
||||
/**
|
||||
* @brief Memory Pools Allocator APIs.
|
||||
* @details If enabled then the memory pools allocator APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_MEMPOOLS TRUE
|
||||
|
||||
/**
|
||||
* @brief Dynamic Threads APIs.
|
||||
* @details If enabled then the dynamic threads creation APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_WAITEXIT.
|
||||
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
|
||||
*/
|
||||
#define CH_CFG_USE_DYNAMIC TRUE
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name Debug options
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Debug option, kernel statistics.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#define CH_DBG_STATISTICS FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, system state check.
|
||||
* @details If enabled the correct call protocol for system APIs is checked
|
||||
* at runtime.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, parameters checks.
|
||||
* @details If enabled then the checks on the API functions input
|
||||
* parameters are activated.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#define CH_DBG_ENABLE_CHECKS FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, consistency checks.
|
||||
* @details If enabled then all the assertions in the kernel code are
|
||||
* activated. This includes consistency checks inside the kernel,
|
||||
* runtime anomalies and port-defined checks.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#define CH_DBG_ENABLE_ASSERTS FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, trace buffer.
|
||||
* @details If enabled then the trace buffer is activated.
|
||||
*
|
||||
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
|
||||
*/
|
||||
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
|
||||
|
||||
/**
|
||||
* @brief Trace buffer entries.
|
||||
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
|
||||
* different from @p CH_DBG_TRACE_MASK_DISABLED.
|
||||
*/
|
||||
#define CH_DBG_TRACE_BUFFER_SIZE 128
|
||||
|
||||
/**
|
||||
* @brief Debug option, stack checks.
|
||||
* @details If enabled then a runtime stack check is performed.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
* @note The stack check is performed in a architecture/port dependent way.
|
||||
* It may not be implemented or some ports.
|
||||
* @note The default failure mode is to halt the system with the global
|
||||
* @p panic_msg variable set to @p NULL.
|
||||
*/
|
||||
#define CH_DBG_ENABLE_STACK_CHECK TRUE
|
||||
|
||||
/**
|
||||
* @brief Debug option, stacks initialization.
|
||||
* @details If enabled then the threads working area is filled with a byte
|
||||
* value when a thread is created. This can be useful for the
|
||||
* runtime measurement of the used stack.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#define CH_DBG_FILL_THREADS FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, threads profiling.
|
||||
* @details If enabled then a field is added to the @p thread_t structure that
|
||||
* counts the system ticks occurred while executing the thread.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
* @note This debug option is not currently compatible with the
|
||||
* tickless mode.
|
||||
*/
|
||||
#define CH_DBG_THREADS_PROFILING FALSE
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name Kernel hooks
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Threads descriptor structure extension.
|
||||
* @details User fields added to the end of the @p thread_t structure.
|
||||
*/
|
||||
#define CH_CFG_THREAD_EXTRA_FIELDS \
|
||||
/* Add threads custom fields here.*/
|
||||
|
||||
/**
|
||||
* @brief Threads initialization hook.
|
||||
* @details User initialization code added to the @p chThdInit() API.
|
||||
*
|
||||
* @note It is invoked from within @p chThdInit() and implicitly from all
|
||||
* the threads creation APIs.
|
||||
*/
|
||||
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
|
||||
/* Add threads initialization code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Threads finalization hook.
|
||||
* @details User finalization code added to the @p chThdExit() API.
|
||||
*/
|
||||
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
|
||||
/* Add threads finalization code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Context switch hook.
|
||||
* @details This hook is invoked just before switching between threads.
|
||||
*/
|
||||
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
|
||||
/* Context switch code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ISR enter hook.
|
||||
*/
|
||||
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
|
||||
/* IRQ prologue code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ISR exit hook.
|
||||
*/
|
||||
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
|
||||
/* IRQ epilogue code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Idle thread enter hook.
|
||||
* @note This hook is invoked within a critical zone, no OS functions
|
||||
* should be invoked from here.
|
||||
* @note This macro can be used to activate a power saving mode.
|
||||
*/
|
||||
#define CH_CFG_IDLE_ENTER_HOOK() { \
|
||||
/* Idle-enter code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Idle thread leave hook.
|
||||
* @note This hook is invoked within a critical zone, no OS functions
|
||||
* should be invoked from here.
|
||||
* @note This macro can be used to deactivate a power saving mode.
|
||||
*/
|
||||
#define CH_CFG_IDLE_LEAVE_HOOK() { \
|
||||
/* Idle-leave code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Idle Loop hook.
|
||||
* @details This hook is continuously invoked by the idle thread loop.
|
||||
*/
|
||||
#define CH_CFG_IDLE_LOOP_HOOK() { \
|
||||
/* Idle loop code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief System tick event hook.
|
||||
* @details This hook is invoked in the system tick handler immediately
|
||||
* after processing the virtual timers queue.
|
||||
*/
|
||||
#define CH_CFG_SYSTEM_TICK_HOOK() { \
|
||||
/* System tick event code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief System halt hook.
|
||||
* @details This hook is invoked in case to a system halting error before
|
||||
* the system is halted.
|
||||
*/
|
||||
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
|
||||
/* System halt code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Trace hook.
|
||||
* @details This hook is invoked each time a new record is written in the
|
||||
* trace buffer.
|
||||
*/
|
||||
#define CH_CFG_TRACE_HOOK(tep) { \
|
||||
/* Trace code here.*/ \
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Port-specific settings (override port settings defaulted in chcore.h). */
|
||||
/*===========================================================================*/
|
||||
|
||||
#endif /* CHCONF_H */
|
||||
|
||||
/** @} */
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#define DEBOUNCE 3
|
||||
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
|
||||
#define RGB_MATRIX_KEYPRESSES
|
||||
#define DISABLE_RGB_MATRIX_SPLASH
|
||||
#define DISABLE_RGB_MATRIX_MULTISPLASH
|
||||
|
||||
@@ -52,7 +52,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, E_3, D_3, F_3},
|
||||
{0, E_2, D_2, F_2},
|
||||
{0, E_1, D_1, F_1},
|
||||
|
||||
|
||||
{0, E_13, D_13, F_13},
|
||||
{0, E_14, D_14, F_14},
|
||||
|
||||
@@ -71,25 +71,70 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
|
||||
};
|
||||
|
||||
led_config_t g_led_config = { {
|
||||
{ 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
|
||||
{ 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 },
|
||||
{ 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28 },
|
||||
{ 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42 }
|
||||
}, {
|
||||
{ 223, 0 }, { 203, 0 }, { 183, 0 }, { 162, 0 }, { 142, 0 }, { 122, 0 }, { 101, 0 }, { 81, 0 }, { 61, 0 }, { 40, 0 }, { 20, 0 }, { 0, 0 },
|
||||
{ 223, 10 }, { 0, 10 }, { 223, 21 }, { 203, 21 }, { 183, 21 }, { 162, 21 }, { 142, 21 }, { 122, 21 }, { 101, 21 }, { 81, 21 }, { 61, 21 }, { 40, 21 },
|
||||
{ 20, 21 }, { 0, 21 }, { 223, 31 }, { 0, 31 }, { 223, 42 }, { 203, 42 }, { 183, 42 }, { 162, 42 }, { 142, 42 }, { 122, 42 }, { 101, 42 }, { 81, 42 },
|
||||
{ 61, 42 }, { 40, 42 }, { 20, 42 }, { 0, 42 }, { 223, 53 }, { 0, 53 }, { 223, 63 }, { 203, 63 }, { 183, 63 }, { 162, 63 }, { 142, 63 }, { 122, 63 },
|
||||
{ 101, 63 }, { 81, 63 }, { 61, 63 }, { 40, 63 }, { 20, 63 }, { 0, 63 }
|
||||
}, {
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1
|
||||
} };
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
|
||||
{{0|(11<<4)}, {20.36*11, 0}, 1},
|
||||
{{0|(10<<4)}, {20.36*10, 0}, 1},
|
||||
{{0|(9<<4)}, {20.36*9, 0}, 1},
|
||||
{{0|(8<<4)}, {20.36*8, 0}, 1},
|
||||
{{0|(7<<4)}, {20.36*7, 0}, 1},
|
||||
{{0|(6<<4)}, { 20.36*6, 0}, 1},
|
||||
{{0|(5<<4)}, { 20.36*5, 0}, 1},
|
||||
{{0|(4<<4)}, { 20.36*4, 0}, 1},
|
||||
{{0|(3<<4)}, { 20.36*3, 0}, 1},
|
||||
{{0|(2<<4)}, { 20.36*2, 0}, 1},
|
||||
{{0|(1<<4)}, { 20.36*1, 0}, 1},
|
||||
{{0|(0<<4)}, { 20.36*0, 0}, 1},
|
||||
|
||||
{{0|(12<<4)}, {20.36*11, 21.33*0.5}, 1},
|
||||
{{0|(13<<4)}, {20.36*0,21.33*0.5}, 1},
|
||||
|
||||
{{1|(11<<4)}, {20.36*11, 21.33}, 1},
|
||||
{{1|(10<<4)}, {20.36*10, 21.33}, 4},
|
||||
{{1|(9<<4)}, {20.36*9, 21.33}, 4},
|
||||
{{1|(8<<4)}, {20.36*8, 21.33}, 4},
|
||||
{{1|(7<<4)}, {20.36*7, 21.33}, 4},
|
||||
{{1|(6<<4)}, { 20.36*6, 21.33}, 4},
|
||||
{{1|(5<<4)}, { 20.36*5, 21.33}, 4},
|
||||
{{1|(4<<4)}, { 20.36*4, 21.33}, 4},
|
||||
{{1|(3<<4)}, { 20.36*3, 21.33}, 4},
|
||||
{{1|(2<<4)}, { 20.36*2, 21.33}, 4},
|
||||
{{1|(1<<4)}, { 20.36*1, 21.33}, 4},
|
||||
{{1|(0<<4)}, { 20.36*0, 21.33}, 1},
|
||||
|
||||
{{1|(12<<4)}, {20.36*11, 21.33*1.5}, 1},
|
||||
{{1|(13<<4)}, {20.36*0,21.33*1.5}, 1},
|
||||
|
||||
{{2|(11<<4)}, {20.36*11, 21.33*2}, 1},
|
||||
{{2|(10<<4)}, {20.36*10, 21.33*2}, 4},
|
||||
{{2|(9<<4)}, {20.36*9, 21.33*2}, 4},
|
||||
{{2|(8<<4)}, {20.36*8, 21.33*2}, 4},
|
||||
{{2|(7<<4)}, {20.36*7, 21.33*2}, 4},
|
||||
{{2|(6<<4)}, { 20.36*6, 21.33*2}, 4},
|
||||
{{2|(5<<4)}, { 20.36*5, 21.33*2}, 4},
|
||||
{{2|(4<<4)}, { 20.36*4, 21.33*2}, 4},
|
||||
{{2|(3<<4)}, { 20.36*3, 21.33*2}, 4},
|
||||
{{2|(2<<4)}, { 20.36*2, 21.33*2}, 4},
|
||||
{{2|(1<<4)}, { 20.36*1, 21.33*2}, 4},
|
||||
{{2|(0<<4)}, { 20.36*0, 21.33*2}, 1},
|
||||
|
||||
{{2|(12<<4)}, {20.36*11, 21.33*2.5}, 1},
|
||||
{{2|(13<<4)}, {20.36*0,21.33*2.5}, 1},
|
||||
|
||||
{{3|(11<<4)}, {20.36*11, 21.33*3}, 1},
|
||||
{{3|(10<<4)}, {20.36*10, 21.33*3}, 1},
|
||||
{{3|(9<<4)}, {20.36*9, 21.33*3}, 1},
|
||||
{{3|(8<<4)}, {20.36*8, 21.33*3}, 1},
|
||||
{{3|(7<<4)}, {20.36*7, 21.33*3}, 1},
|
||||
{{3|(6<<4)}, { 20.36*6, 21.33*3}, 1},
|
||||
{{3|(5<<4)}, { 20.36*5, 21.33*3}, 1},
|
||||
{{3|(4<<4)}, { 20.36*4, 21.33*3}, 1},
|
||||
{{3|(3<<4)}, { 20.36*3, 21.33*3}, 1},
|
||||
{{3|(2<<4)}, { 20.36*2, 21.33*3}, 1},
|
||||
{{3|(1<<4)}, { 20.36*1, 21.33*3}, 1},
|
||||
{{3|(0<<4)}, { 20.36*0, 21.33*3}, 1}
|
||||
|
||||
};
|
||||
#else
|
||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
/* Refer to IS31 manual for these locations
|
||||
@@ -160,44 +205,93 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
|
||||
};
|
||||
|
||||
led_config_t g_led_config = { {
|
||||
{ 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
|
||||
{ 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 },
|
||||
{ 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28 },
|
||||
{ 52, 51, 50, 49, 48, NO_LED, 47, 46, 45, 44, 43, 42 }
|
||||
}, {
|
||||
{ 223, 0 }, { 203, 0 }, { 183, 0 }, { 162, 0 }, { 142, 0 }, { 122, 0 }, { 101, 0 }, { 81, 0 }, { 61, 0 }, { 40, 0 }, { 20, 0 }, { 0, 0 },
|
||||
{ 223, 10 }, { 0, 10 }, { 223, 21 }, { 203, 21 }, { 183, 21 }, { 162, 21 }, { 142, 21 }, { 122, 21 }, { 101, 21 }, { 81, 21 }, { 61, 21 }, { 40, 21 },
|
||||
{ 20, 21 }, { 0, 21 }, { 223, 31 }, { 0, 31 }, { 223, 42 }, { 203, 42 }, { 183, 42 }, { 162, 42 }, { 142, 42 }, { 122, 42 }, { 101, 42 }, { 81, 42 },
|
||||
{ 61, 42 }, { 40, 42 }, { 20, 42 }, { 0, 42 }, { 223, 53 }, { 0, 53 }, { 223, 63 }, { 203, 63 }, { 183, 63 }, { 162, 63 }, { 142, 63 }, { 111, 63 },
|
||||
{ 81, 63 }, { 61, 63 }, { 40, 63 }, { 20, 63 }, { 0, 63 }
|
||||
}, {
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1
|
||||
} };
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
|
||||
{{0|(11<<4)}, {20.36*11, 0}, 1},
|
||||
{{0|(10<<4)}, {20.36*10, 0}, 1},
|
||||
{{0|(9<<4)}, {20.36*9, 0}, 1},
|
||||
{{0|(8<<4)}, {20.36*8, 0}, 1},
|
||||
{{0|(7<<4)}, {20.36*7, 0}, 1},
|
||||
{{0|(6<<4)}, { 20.36*6, 0}, 1},
|
||||
{{0|(5<<4)}, { 20.36*5, 0}, 1},
|
||||
{{0|(4<<4)}, { 20.36*4, 0}, 1},
|
||||
{{0|(3<<4)}, { 20.36*3, 0}, 1},
|
||||
{{0|(2<<4)}, { 20.36*2, 0}, 1},
|
||||
{{0|(1<<4)}, { 20.36*1, 0}, 1},
|
||||
{{0|(0<<4)}, { 20.36*0, 0}, 1},
|
||||
|
||||
{{0|(12<<4)}, {20.36*11, 21.33*0.5}, 1},
|
||||
{{0|(13<<4)}, {20.36*0,21.33*0.5}, 1},
|
||||
|
||||
{{1|(11<<4)}, {20.36*11, 21.33}, 1},
|
||||
{{1|(10<<4)}, {20.36*10, 21.33}, 4},
|
||||
{{1|(9<<4)}, {20.36*9, 21.33}, 4},
|
||||
{{1|(8<<4)}, {20.36*8, 21.33}, 4},
|
||||
{{1|(7<<4)}, {20.36*7, 21.33}, 4},
|
||||
{{1|(6<<4)}, { 20.36*6, 21.33}, 4},
|
||||
{{1|(5<<4)}, { 20.36*5, 21.33}, 4},
|
||||
{{1|(4<<4)}, { 20.36*4, 21.33}, 4},
|
||||
{{1|(3<<4)}, { 20.36*3, 21.33}, 4},
|
||||
{{1|(2<<4)}, { 20.36*2, 21.33}, 4},
|
||||
{{1|(1<<4)}, { 20.36*1, 21.33}, 4},
|
||||
{{1|(0<<4)}, { 20.36*0, 21.33}, 1},
|
||||
|
||||
{{1|(12<<4)}, {20.36*11, 21.33*1.5}, 1},
|
||||
{{1|(13<<4)}, {20.36*0,21.33*1.5}, 1},
|
||||
|
||||
{{2|(11<<4)}, {20.36*11, 21.33*2}, 1},
|
||||
{{2|(10<<4)}, {20.36*10, 21.33*2}, 4},
|
||||
{{2|(9<<4)}, {20.36*9, 21.33*2}, 4},
|
||||
{{2|(8<<4)}, {20.36*8, 21.33*2}, 4},
|
||||
{{2|(7<<4)}, {20.36*7, 21.33*2}, 4},
|
||||
{{2|(6<<4)}, { 20.36*6, 21.33*2}, 4},
|
||||
{{2|(5<<4)}, { 20.36*5, 21.33*2}, 4},
|
||||
{{2|(4<<4)}, { 20.36*4, 21.33*2}, 4},
|
||||
{{2|(3<<4)}, { 20.36*3, 21.33*2}, 4},
|
||||
{{2|(2<<4)}, { 20.36*2, 21.33*2}, 4},
|
||||
{{2|(1<<4)}, { 20.36*1, 21.33*2}, 4},
|
||||
{{2|(0<<4)}, { 20.36*0, 21.33*2}, 1},
|
||||
|
||||
{{2|(12<<4)}, {20.36*11, 21.33*2.5}, 1},
|
||||
{{2|(13<<4)}, {20.36*0,21.33*2.5}, 1},
|
||||
|
||||
{{3|(11<<4)}, {20.36*11, 21.33*3}, 1},
|
||||
{{3|(10<<4)}, {20.36*10, 21.33*3}, 1},
|
||||
{{3|(9<<4)}, {20.36*9, 21.33*3}, 1},
|
||||
{{3|(8<<4)}, {20.36*8, 21.33*3}, 1},
|
||||
{{3|(7<<4)}, {20.36*7, 21.33*3}, 1},
|
||||
{{3|(6<<4)}, { 20.36*5.5, 21.33*3}, 1},
|
||||
{{3|(4<<4)}, { 20.36*4, 21.33*3}, 1},
|
||||
{{3|(3<<4)}, { 20.36*3, 21.33*3}, 1},
|
||||
{{3|(2<<4)}, { 20.36*2, 21.33*3}, 1},
|
||||
{{3|(1<<4)}, { 20.36*1, 21.33*3}, 1},
|
||||
{{3|(0<<4)}, { 20.36*0, 21.33*3}, 1}
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
|
||||
void suspend_power_down_kb(void)
|
||||
{
|
||||
rgb_matrix_set_suspend_state(true);
|
||||
suspend_power_down_user();
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_kb(void)
|
||||
{
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
|
||||
388
keyboards/dztech/dz40rgb/halconf.h
Normal file
388
keyboards/dztech/dz40rgb/halconf.h
Normal file
@@ -0,0 +1,388 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file templates/halconf.h
|
||||
* @brief HAL configuration header.
|
||||
* @details HAL configuration file, this file allows to enable or disable the
|
||||
* various device drivers from your application. You may also use
|
||||
* this file in order to override the device drivers default settings.
|
||||
*
|
||||
* @addtogroup HAL_CONF
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef HALCONF_H
|
||||
#define HALCONF_H
|
||||
|
||||
#include "mcuconf.h"
|
||||
|
||||
/**
|
||||
* @brief Enables the PAL subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_PAL TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the ADC subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_ADC FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the CAN subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_CAN FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the DAC subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_DAC TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the EXT subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_EXT FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the GPT subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_GPT TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the I2C subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_I2C TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the I2S subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_I2S FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the ICU subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_ICU FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the MAC subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_MAC FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the MMC_SPI subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_MMC_SPI FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the PWM subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_PWM FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the QSPI subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_QSPI FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the RTC subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_RTC FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the SDC subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_SDC FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the SERIAL subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_SERIAL FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the SERIAL over USB subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_SERIAL_USB FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the SPI subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_SPI FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the UART subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_UART FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the USB subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_USB TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the WDG subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_WDG FALSE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* ADC driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables synchronous APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
|
||||
#define ADC_USE_WAIT TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||
#define ADC_USE_MUTUAL_EXCLUSION TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* CAN driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Sleep mode related APIs inclusion switch.
|
||||
*/
|
||||
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
|
||||
#define CAN_USE_SLEEP_MODE TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* I2C driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables the mutual exclusion APIs on the I2C bus.
|
||||
*/
|
||||
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||
#define I2C_USE_MUTUAL_EXCLUSION TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* MAC driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables an event sources for incoming packets.
|
||||
*/
|
||||
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
|
||||
#define MAC_USE_ZERO_COPY FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables an event sources for incoming packets.
|
||||
*/
|
||||
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
|
||||
#define MAC_USE_EVENTS TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* MMC_SPI driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Delays insertions.
|
||||
* @details If enabled this options inserts delays into the MMC waiting
|
||||
* routines releasing some extra CPU time for the threads with
|
||||
* lower priority, this may slow down the driver a bit however.
|
||||
* This option is recommended also if the SPI driver does not
|
||||
* use a DMA channel and heavily loads the CPU.
|
||||
*/
|
||||
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||
#define MMC_NICE_WAITING TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* SDC driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Number of initialization attempts before rejecting the card.
|
||||
* @note Attempts are performed at 10mS intervals.
|
||||
*/
|
||||
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
|
||||
#define SDC_INIT_RETRY 100
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Include support for MMC cards.
|
||||
* @note MMC support is not yet implemented so this option must be kept
|
||||
* at @p FALSE.
|
||||
*/
|
||||
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
|
||||
#define SDC_MMC_SUPPORT FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Delays insertions.
|
||||
* @details If enabled this options inserts delays into the MMC waiting
|
||||
* routines releasing some extra CPU time for the threads with
|
||||
* lower priority, this may slow down the driver a bit however.
|
||||
*/
|
||||
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||
#define SDC_NICE_WAITING TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* SERIAL driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Default bit rate.
|
||||
* @details Configuration parameter, this is the baud rate selected for the
|
||||
* default configuration.
|
||||
*/
|
||||
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
|
||||
#define SERIAL_DEFAULT_BITRATE 38400
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Serial buffers size.
|
||||
* @details Configuration parameter, you can change the depth of the queue
|
||||
* buffers depending on the requirements of your application.
|
||||
* @note The default is 16 bytes for both the transmission and receive
|
||||
* buffers.
|
||||
*/
|
||||
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||
#define SERIAL_BUFFERS_SIZE 16
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* SERIAL_USB driver related setting. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Serial over USB buffers size.
|
||||
* @details Configuration parameter, the buffer size must be a multiple of
|
||||
* the USB data endpoint maximum packet size.
|
||||
* @note The default is 256 bytes for both the transmission and receive
|
||||
* buffers.
|
||||
*/
|
||||
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||
#define SERIAL_USB_BUFFERS_SIZE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Serial over USB number of buffers.
|
||||
* @note The default is 2 buffers.
|
||||
*/
|
||||
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
|
||||
#define SERIAL_USB_BUFFERS_NUMBER 2
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* SPI driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables synchronous APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
|
||||
#define SPI_USE_WAIT TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||
#define SPI_USE_MUTUAL_EXCLUSION TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* UART driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables synchronous APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
|
||||
#define UART_USE_WAIT FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||
#define UART_USE_MUTUAL_EXCLUSION FALSE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* USB driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables synchronous APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
|
||||
#define USB_USE_WAIT TRUE
|
||||
#endif
|
||||
|
||||
#endif /* HALCONF_H */
|
||||
|
||||
/** @} */
|
||||
@@ -1,4 +1,5 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
extern bool g_suspend_state;
|
||||
#define _LAYER0 0
|
||||
#define _LAYER1 1
|
||||
#define _LAYER2 2
|
||||
@@ -30,10 +31,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||
rgb_led led;
|
||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||
led = g_rgb_leds[i];
|
||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
||||
rgb_matrix_set_color( i, red, green, blue );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
extern bool g_suspend_state;
|
||||
#define _LAYER0 0
|
||||
#define _LAYER1 1
|
||||
#define _LAYER2 2
|
||||
@@ -52,9 +53,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
|
||||
|
||||
|
||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||
rgb_led led;
|
||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||
led = g_rgb_leds[i];
|
||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
||||
rgb_matrix_set_color( i, red, green, blue );
|
||||
}
|
||||
}
|
||||
|
||||
257
keyboards/dztech/dz40rgb/mcuconf.h
Normal file
257
keyboards/dztech/dz40rgb/mcuconf.h
Normal file
@@ -0,0 +1,257 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef MCUCONF_H
|
||||
#define MCUCONF_H
|
||||
|
||||
/*
|
||||
* STM32F3xx drivers configuration.
|
||||
* The following settings override the default settings present in
|
||||
* the various device driver implementation headers.
|
||||
* Note that the settings for each driver only have effect if the whole
|
||||
* driver is enabled in halconf.h.
|
||||
*
|
||||
* IRQ priorities:
|
||||
* 15...0 Lowest...Highest.
|
||||
*
|
||||
* DMA priorities:
|
||||
* 0...3 Lowest...Highest.
|
||||
*/
|
||||
|
||||
#define STM32F3xx_MCUCONF
|
||||
|
||||
/*
|
||||
* HAL driver system settings.
|
||||
*/
|
||||
#define STM32_NO_INIT FALSE
|
||||
#define STM32_PVD_ENABLE FALSE
|
||||
#define STM32_PLS STM32_PLS_LEV0
|
||||
#define STM32_HSI_ENABLED TRUE
|
||||
#define STM32_LSI_ENABLED TRUE
|
||||
#define STM32_HSE_ENABLED TRUE
|
||||
#define STM32_LSE_ENABLED FALSE
|
||||
#define STM32_SW STM32_SW_PLL
|
||||
#define STM32_PLLSRC STM32_PLLSRC_HSE
|
||||
#define STM32_PREDIV_VALUE 1
|
||||
#define STM32_PLLMUL_VALUE 9
|
||||
#define STM32_HPRE STM32_HPRE_DIV1
|
||||
#define STM32_PPRE1 STM32_PPRE1_DIV2
|
||||
#define STM32_PPRE2 STM32_PPRE2_DIV2
|
||||
#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
|
||||
#define STM32_ADC12PRES STM32_ADC12PRES_DIV1
|
||||
#define STM32_ADC34PRES STM32_ADC34PRES_DIV1
|
||||
#define STM32_USART1SW STM32_USART1SW_PCLK
|
||||
#define STM32_USART2SW STM32_USART2SW_PCLK
|
||||
#define STM32_USART3SW STM32_USART3SW_PCLK
|
||||
#define STM32_UART4SW STM32_UART4SW_PCLK
|
||||
#define STM32_UART5SW STM32_UART5SW_PCLK
|
||||
#define STM32_I2C1SW STM32_I2C1SW_SYSCLK
|
||||
#define STM32_I2C2SW STM32_I2C2SW_SYSCLK
|
||||
#define STM32_TIM1SW STM32_TIM1SW_PCLK2
|
||||
#define STM32_TIM8SW STM32_TIM8SW_PCLK2
|
||||
#define STM32_RTCSEL STM32_RTCSEL_LSI
|
||||
#define STM32_USB_CLOCK_REQUIRED TRUE
|
||||
#define STM32_USBPRE STM32_USBPRE_DIV1P5
|
||||
|
||||
#undef STM32_HSE_BYPASS
|
||||
// #error "oh no"
|
||||
// #endif
|
||||
|
||||
/*
|
||||
* ADC driver system settings.
|
||||
*/
|
||||
#define STM32_ADC_DUAL_MODE FALSE
|
||||
#define STM32_ADC_COMPACT_SAMPLES FALSE
|
||||
#define STM32_ADC_USE_ADC1 FALSE
|
||||
#define STM32_ADC_USE_ADC2 FALSE
|
||||
#define STM32_ADC_USE_ADC3 FALSE
|
||||
#define STM32_ADC_USE_ADC4 FALSE
|
||||
#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1)
|
||||
#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
|
||||
#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)
|
||||
#define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
|
||||
#define STM32_ADC_ADC1_DMA_PRIORITY 2
|
||||
#define STM32_ADC_ADC2_DMA_PRIORITY 2
|
||||
#define STM32_ADC_ADC3_DMA_PRIORITY 2
|
||||
#define STM32_ADC_ADC4_DMA_PRIORITY 2
|
||||
#define STM32_ADC_ADC12_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC3_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC4_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
|
||||
#define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
|
||||
|
||||
/*
|
||||
* CAN driver system settings.
|
||||
*/
|
||||
#define STM32_CAN_USE_CAN1 FALSE
|
||||
#define STM32_CAN_CAN1_IRQ_PRIORITY 11
|
||||
|
||||
/*
|
||||
* DAC driver system settings.
|
||||
*/
|
||||
#define STM32_DAC_DUAL_MODE FALSE
|
||||
#define STM32_DAC_USE_DAC1_CH1 TRUE
|
||||
#define STM32_DAC_USE_DAC1_CH2 TRUE
|
||||
#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10
|
||||
#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10
|
||||
#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2
|
||||
#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
|
||||
|
||||
/*
|
||||
* EXT driver system settings.
|
||||
*/
|
||||
#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI17_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI20_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI33_IRQ_PRIORITY 6
|
||||
|
||||
/*
|
||||
* GPT driver system settings.
|
||||
*/
|
||||
#define STM32_GPT_USE_TIM1 FALSE
|
||||
#define STM32_GPT_USE_TIM2 FALSE
|
||||
#define STM32_GPT_USE_TIM3 FALSE
|
||||
#define STM32_GPT_USE_TIM4 FALSE
|
||||
#define STM32_GPT_USE_TIM6 TRUE
|
||||
#define STM32_GPT_USE_TIM7 TRUE
|
||||
#define STM32_GPT_USE_TIM8 TRUE
|
||||
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
|
||||
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
|
||||
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
|
||||
#define STM32_GPT_TIM4_IRQ_PRIORITY 7
|
||||
#define STM32_GPT_TIM6_IRQ_PRIORITY 7
|
||||
#define STM32_GPT_TIM7_IRQ_PRIORITY 7
|
||||
#define STM32_GPT_TIM8_IRQ_PRIORITY 7
|
||||
|
||||
/*
|
||||
* I2C driver system settings.
|
||||
*/
|
||||
#define STM32_I2C_USE_I2C1 TRUE
|
||||
#define STM32_I2C_USE_I2C2 FALSE
|
||||
#define STM32_I2C_BUSY_TIMEOUT 50
|
||||
#define STM32_I2C_I2C1_IRQ_PRIORITY 10
|
||||
#define STM32_I2C_I2C2_IRQ_PRIORITY 10
|
||||
#define STM32_I2C_USE_DMA TRUE
|
||||
#define STM32_I2C_I2C1_DMA_PRIORITY 1
|
||||
#define STM32_I2C_I2C2_DMA_PRIORITY 1
|
||||
#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
|
||||
|
||||
/*
|
||||
* ICU driver system settings.
|
||||
*/
|
||||
#define STM32_ICU_USE_TIM1 FALSE
|
||||
#define STM32_ICU_USE_TIM2 FALSE
|
||||
#define STM32_ICU_USE_TIM3 FALSE
|
||||
#define STM32_ICU_USE_TIM4 FALSE
|
||||
#define STM32_ICU_USE_TIM8 FALSE
|
||||
#define STM32_ICU_TIM1_IRQ_PRIORITY 7
|
||||
#define STM32_ICU_TIM2_IRQ_PRIORITY 7
|
||||
#define STM32_ICU_TIM3_IRQ_PRIORITY 7
|
||||
#define STM32_ICU_TIM4_IRQ_PRIORITY 7
|
||||
#define STM32_ICU_TIM8_IRQ_PRIORITY 7
|
||||
|
||||
/*
|
||||
* PWM driver system settings.
|
||||
*/
|
||||
#define STM32_PWM_USE_ADVANCED FALSE
|
||||
#define STM32_PWM_USE_TIM1 FALSE
|
||||
#define STM32_PWM_USE_TIM2 FALSE
|
||||
#define STM32_PWM_USE_TIM3 FALSE
|
||||
#define STM32_PWM_USE_TIM4 FALSE
|
||||
#define STM32_PWM_USE_TIM8 FALSE
|
||||
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
|
||||
#define STM32_PWM_TIM2_IRQ_PRIORITY 7
|
||||
#define STM32_PWM_TIM3_IRQ_PRIORITY 7
|
||||
#define STM32_PWM_TIM4_IRQ_PRIORITY 7
|
||||
#define STM32_PWM_TIM8_IRQ_PRIORITY 7
|
||||
|
||||
/*
|
||||
* SERIAL driver system settings.
|
||||
*/
|
||||
#define STM32_SERIAL_USE_USART1 FALSE
|
||||
#define STM32_SERIAL_USE_USART2 FALSE
|
||||
#define STM32_SERIAL_USE_USART3 FALSE
|
||||
#define STM32_SERIAL_USE_UART4 FALSE
|
||||
#define STM32_SERIAL_USE_UART5 FALSE
|
||||
#define STM32_SERIAL_USART1_PRIORITY 12
|
||||
#define STM32_SERIAL_USART2_PRIORITY 12
|
||||
#define STM32_SERIAL_USART3_PRIORITY 12
|
||||
#define STM32_SERIAL_UART4_PRIORITY 12
|
||||
#define STM32_SERIAL_UART5_PRIORITY 12
|
||||
|
||||
/*
|
||||
* SPI driver system settings.
|
||||
*/
|
||||
#define STM32_SPI_USE_SPI1 FALSE
|
||||
#define STM32_SPI_USE_SPI2 FALSE
|
||||
#define STM32_SPI_USE_SPI3 FALSE
|
||||
#define STM32_SPI_SPI1_DMA_PRIORITY 1
|
||||
#define STM32_SPI_SPI2_DMA_PRIORITY 1
|
||||
#define STM32_SPI_SPI3_DMA_PRIORITY 1
|
||||
#define STM32_SPI_SPI1_IRQ_PRIORITY 10
|
||||
#define STM32_SPI_SPI2_IRQ_PRIORITY 10
|
||||
#define STM32_SPI_SPI3_IRQ_PRIORITY 10
|
||||
#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
|
||||
|
||||
/*
|
||||
* ST driver system settings.
|
||||
*/
|
||||
#define STM32_ST_IRQ_PRIORITY 8
|
||||
#define STM32_ST_USE_TIMER 2
|
||||
|
||||
/*
|
||||
* UART driver system settings.
|
||||
*/
|
||||
#define STM32_UART_USE_USART1 FALSE
|
||||
#define STM32_UART_USE_USART2 FALSE
|
||||
#define STM32_UART_USE_USART3 FALSE
|
||||
#define STM32_UART_USART1_IRQ_PRIORITY 12
|
||||
#define STM32_UART_USART2_IRQ_PRIORITY 12
|
||||
#define STM32_UART_USART3_IRQ_PRIORITY 12
|
||||
#define STM32_UART_USART1_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART2_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART3_DMA_PRIORITY 0
|
||||
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
|
||||
|
||||
/*
|
||||
* USB driver system settings.
|
||||
*/
|
||||
#define STM32_USB_USE_USB1 TRUE
|
||||
#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
|
||||
#define STM32_USB_USB1_HP_IRQ_PRIORITY 13
|
||||
#define STM32_USB_USB1_LP_IRQ_PRIORITY 14
|
||||
|
||||
/*
|
||||
* WDG driver system settings.
|
||||
*/
|
||||
#define STM32_WDG_USE_IWDG FALSE
|
||||
|
||||
#endif /* MCUCONF_H */
|
||||
@@ -1,6 +1,50 @@
|
||||
MCU = STM32F303
|
||||
# project specific files
|
||||
|
||||
## chip/board settings
|
||||
# the next two should match the directories in
|
||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||
MCU_FAMILY = STM32
|
||||
MCU_SERIES = STM32F3xx
|
||||
|
||||
# Linker script to use
|
||||
# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||
# or <this_dir>/ld/
|
||||
MCU_LDSCRIPT = STM32F303xC
|
||||
|
||||
# Startup code to use
|
||||
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
|
||||
MCU_STARTUP = stm32f3xx
|
||||
|
||||
# Board: it should exist either in <chibios>/os/hal/boards/
|
||||
# or <this_dir>/boards
|
||||
BOARD = GENERIC_STM32_F303XC
|
||||
|
||||
# Cortex version
|
||||
MCU = cortex-m4
|
||||
|
||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||
ARMV = 7
|
||||
|
||||
USE_FPU = yes
|
||||
|
||||
# Vector table for application
|
||||
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
|
||||
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
|
||||
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
|
||||
OPT_DEFS =
|
||||
|
||||
# Do not put the microcontroller into power saving mode
|
||||
# when we get USB suspend event. We want it to keep updating
|
||||
# backlight effects.
|
||||
OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
|
||||
|
||||
# Options to pass to dfu-util when flashing
|
||||
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
|
||||
DFU_SUFFIX_ARGS = -p DF11 -v 0483
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BACKLIGHT_ENABLE = no
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
|
||||
7
keyboards/dztech/dz60rgb/bootloader_defs.h
Normal file
7
keyboards/dztech/dz60rgb/bootloader_defs.h
Normal file
@@ -0,0 +1,7 @@
|
||||
/* Address for jumping to bootloader on STM32 chips. */
|
||||
/* It is chip dependent, the correct number can be looked up here:
|
||||
* http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
|
||||
* This also requires a patch to chibios:
|
||||
* <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
|
||||
*/
|
||||
#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800
|
||||
520
keyboards/dztech/dz60rgb/chconf.h
Normal file
520
keyboards/dztech/dz60rgb/chconf.h
Normal file
@@ -0,0 +1,520 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file templates/chconf.h
|
||||
* @brief Configuration file template.
|
||||
* @details A copy of this file must be placed in each project directory, it
|
||||
* contains the application specific kernel settings.
|
||||
*
|
||||
* @addtogroup config
|
||||
* @details Kernel related settings and hooks.
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef CHCONF_H
|
||||
#define CHCONF_H
|
||||
|
||||
#define _CHIBIOS_RT_CONF_
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name System timers settings
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief System time counter resolution.
|
||||
* @note Allowed values are 16 or 32 bits.
|
||||
*/
|
||||
#define CH_CFG_ST_RESOLUTION 32
|
||||
|
||||
/**
|
||||
* @brief System tick frequency.
|
||||
* @details Frequency of the system timer that drives the system ticks. This
|
||||
* setting also defines the system tick time unit.
|
||||
*/
|
||||
#define CH_CFG_ST_FREQUENCY 100000
|
||||
|
||||
/**
|
||||
* @brief Time delta constant for the tick-less mode.
|
||||
* @note If this value is zero then the system uses the classic
|
||||
* periodic tick. This value represents the minimum number
|
||||
* of ticks that is safe to specify in a timeout directive.
|
||||
* The value one is not valid, timeouts are rounded up to
|
||||
* this value.
|
||||
*/
|
||||
#define CH_CFG_ST_TIMEDELTA 2
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name Kernel parameters and options
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Round robin interval.
|
||||
* @details This constant is the number of system ticks allowed for the
|
||||
* threads before preemption occurs. Setting this value to zero
|
||||
* disables the preemption for threads with equal priority and the
|
||||
* round robin becomes cooperative. Note that higher priority
|
||||
* threads can still preempt, the kernel is always preemptive.
|
||||
* @note Disabling the round robin preemption makes the kernel more compact
|
||||
* and generally faster.
|
||||
* @note The round robin preemption is not supported in tickless mode and
|
||||
* must be set to zero in that case.
|
||||
*/
|
||||
#define CH_CFG_TIME_QUANTUM 0
|
||||
|
||||
/**
|
||||
* @brief Managed RAM size.
|
||||
* @details Size of the RAM area to be managed by the OS. If set to zero
|
||||
* then the whole available RAM is used. The core memory is made
|
||||
* available to the heap allocator and/or can be used directly through
|
||||
* the simplified core memory allocator.
|
||||
*
|
||||
* @note In order to let the OS manage the whole RAM the linker script must
|
||||
* provide the @p __heap_base__ and @p __heap_end__ symbols.
|
||||
* @note Requires @p CH_CFG_USE_MEMCORE.
|
||||
*/
|
||||
#define CH_CFG_MEMCORE_SIZE 0
|
||||
|
||||
/**
|
||||
* @brief Idle thread automatic spawn suppression.
|
||||
* @details When this option is activated the function @p chSysInit()
|
||||
* does not spawn the idle thread. The application @p main()
|
||||
* function becomes the idle thread and must implement an
|
||||
* infinite loop.
|
||||
*/
|
||||
#define CH_CFG_NO_IDLE_THREAD FALSE
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name Performance options
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief OS optimization.
|
||||
* @details If enabled then time efficient rather than space efficient code
|
||||
* is used when two possible implementations exist.
|
||||
*
|
||||
* @note This is not related to the compiler optimization options.
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_OPTIMIZE_SPEED TRUE
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name Subsystem options
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Time Measurement APIs.
|
||||
* @details If enabled then the time measurement APIs are included in
|
||||
* the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_TM TRUE
|
||||
|
||||
/**
|
||||
* @brief Threads registry APIs.
|
||||
* @details If enabled then the registry APIs are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_REGISTRY TRUE
|
||||
|
||||
/**
|
||||
* @brief Threads synchronization APIs.
|
||||
* @details If enabled then the @p chThdWait() function is included in
|
||||
* the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_WAITEXIT TRUE
|
||||
|
||||
/**
|
||||
* @brief Semaphores APIs.
|
||||
* @details If enabled then the Semaphores APIs are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_SEMAPHORES TRUE
|
||||
|
||||
/**
|
||||
* @brief Semaphores queuing mode.
|
||||
* @details If enabled then the threads are enqueued on semaphores by
|
||||
* priority rather than in FIFO order.
|
||||
*
|
||||
* @note The default is @p FALSE. Enable this if you have special
|
||||
* requirements.
|
||||
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||
*/
|
||||
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
|
||||
|
||||
/**
|
||||
* @brief Mutexes APIs.
|
||||
* @details If enabled then the mutexes APIs are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_MUTEXES TRUE
|
||||
|
||||
/**
|
||||
* @brief Enables recursive behavior on mutexes.
|
||||
* @note Recursive mutexes are heavier and have an increased
|
||||
* memory footprint.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||
*/
|
||||
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
|
||||
|
||||
/**
|
||||
* @brief Conditional Variables APIs.
|
||||
* @details If enabled then the conditional variables APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||
*/
|
||||
#define CH_CFG_USE_CONDVARS TRUE
|
||||
|
||||
/**
|
||||
* @brief Conditional Variables APIs with timeout.
|
||||
* @details If enabled then the conditional variables APIs with timeout
|
||||
* specification are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_CONDVARS.
|
||||
*/
|
||||
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
|
||||
|
||||
/**
|
||||
* @brief Events Flags APIs.
|
||||
* @details If enabled then the event flags APIs are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_EVENTS TRUE
|
||||
|
||||
/**
|
||||
* @brief Events Flags APIs with timeout.
|
||||
* @details If enabled then the events APIs with timeout specification
|
||||
* are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_EVENTS.
|
||||
*/
|
||||
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
|
||||
|
||||
/**
|
||||
* @brief Synchronous Messages APIs.
|
||||
* @details If enabled then the synchronous messages APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_MESSAGES TRUE
|
||||
|
||||
/**
|
||||
* @brief Synchronous Messages queuing mode.
|
||||
* @details If enabled then messages are served by priority rather than in
|
||||
* FIFO order.
|
||||
*
|
||||
* @note The default is @p FALSE. Enable this if you have special
|
||||
* requirements.
|
||||
* @note Requires @p CH_CFG_USE_MESSAGES.
|
||||
*/
|
||||
#define CH_CFG_USE_MESSAGES_PRIORITY TRUE
|
||||
|
||||
/**
|
||||
* @brief Mailboxes APIs.
|
||||
* @details If enabled then the asynchronous messages (mailboxes) APIs are
|
||||
* included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||
*/
|
||||
#define CH_CFG_USE_MAILBOXES TRUE
|
||||
|
||||
/**
|
||||
* @brief Core Memory Manager APIs.
|
||||
* @details If enabled then the core memory manager APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_MEMCORE TRUE
|
||||
|
||||
/**
|
||||
* @brief Heap Allocator APIs.
|
||||
* @details If enabled then the memory heap allocator APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
|
||||
* @p CH_CFG_USE_SEMAPHORES.
|
||||
* @note Mutexes are recommended.
|
||||
*/
|
||||
#define CH_CFG_USE_HEAP TRUE
|
||||
|
||||
/**
|
||||
* @brief Memory Pools Allocator APIs.
|
||||
* @details If enabled then the memory pools allocator APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_MEMPOOLS TRUE
|
||||
|
||||
/**
|
||||
* @brief Dynamic Threads APIs.
|
||||
* @details If enabled then the dynamic threads creation APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_WAITEXIT.
|
||||
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
|
||||
*/
|
||||
#define CH_CFG_USE_DYNAMIC TRUE
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name Debug options
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Debug option, kernel statistics.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#define CH_DBG_STATISTICS FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, system state check.
|
||||
* @details If enabled the correct call protocol for system APIs is checked
|
||||
* at runtime.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, parameters checks.
|
||||
* @details If enabled then the checks on the API functions input
|
||||
* parameters are activated.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#define CH_DBG_ENABLE_CHECKS FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, consistency checks.
|
||||
* @details If enabled then all the assertions in the kernel code are
|
||||
* activated. This includes consistency checks inside the kernel,
|
||||
* runtime anomalies and port-defined checks.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#define CH_DBG_ENABLE_ASSERTS FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, trace buffer.
|
||||
* @details If enabled then the trace buffer is activated.
|
||||
*
|
||||
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
|
||||
*/
|
||||
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
|
||||
|
||||
/**
|
||||
* @brief Trace buffer entries.
|
||||
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
|
||||
* different from @p CH_DBG_TRACE_MASK_DISABLED.
|
||||
*/
|
||||
#define CH_DBG_TRACE_BUFFER_SIZE 128
|
||||
|
||||
/**
|
||||
* @brief Debug option, stack checks.
|
||||
* @details If enabled then a runtime stack check is performed.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
* @note The stack check is performed in a architecture/port dependent way.
|
||||
* It may not be implemented or some ports.
|
||||
* @note The default failure mode is to halt the system with the global
|
||||
* @p panic_msg variable set to @p NULL.
|
||||
*/
|
||||
#define CH_DBG_ENABLE_STACK_CHECK TRUE
|
||||
|
||||
/**
|
||||
* @brief Debug option, stacks initialization.
|
||||
* @details If enabled then the threads working area is filled with a byte
|
||||
* value when a thread is created. This can be useful for the
|
||||
* runtime measurement of the used stack.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#define CH_DBG_FILL_THREADS FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, threads profiling.
|
||||
* @details If enabled then a field is added to the @p thread_t structure that
|
||||
* counts the system ticks occurred while executing the thread.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
* @note This debug option is not currently compatible with the
|
||||
* tickless mode.
|
||||
*/
|
||||
#define CH_DBG_THREADS_PROFILING FALSE
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name Kernel hooks
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Threads descriptor structure extension.
|
||||
* @details User fields added to the end of the @p thread_t structure.
|
||||
*/
|
||||
#define CH_CFG_THREAD_EXTRA_FIELDS \
|
||||
/* Add threads custom fields here.*/
|
||||
|
||||
/**
|
||||
* @brief Threads initialization hook.
|
||||
* @details User initialization code added to the @p chThdInit() API.
|
||||
*
|
||||
* @note It is invoked from within @p chThdInit() and implicitly from all
|
||||
* the threads creation APIs.
|
||||
*/
|
||||
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
|
||||
/* Add threads initialization code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Threads finalization hook.
|
||||
* @details User finalization code added to the @p chThdExit() API.
|
||||
*/
|
||||
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
|
||||
/* Add threads finalization code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Context switch hook.
|
||||
* @details This hook is invoked just before switching between threads.
|
||||
*/
|
||||
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
|
||||
/* Context switch code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ISR enter hook.
|
||||
*/
|
||||
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
|
||||
/* IRQ prologue code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ISR exit hook.
|
||||
*/
|
||||
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
|
||||
/* IRQ epilogue code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Idle thread enter hook.
|
||||
* @note This hook is invoked within a critical zone, no OS functions
|
||||
* should be invoked from here.
|
||||
* @note This macro can be used to activate a power saving mode.
|
||||
*/
|
||||
#define CH_CFG_IDLE_ENTER_HOOK() { \
|
||||
/* Idle-enter code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Idle thread leave hook.
|
||||
* @note This hook is invoked within a critical zone, no OS functions
|
||||
* should be invoked from here.
|
||||
* @note This macro can be used to deactivate a power saving mode.
|
||||
*/
|
||||
#define CH_CFG_IDLE_LEAVE_HOOK() { \
|
||||
/* Idle-leave code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Idle Loop hook.
|
||||
* @details This hook is continuously invoked by the idle thread loop.
|
||||
*/
|
||||
#define CH_CFG_IDLE_LOOP_HOOK() { \
|
||||
/* Idle loop code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief System tick event hook.
|
||||
* @details This hook is invoked in the system tick handler immediately
|
||||
* after processing the virtual timers queue.
|
||||
*/
|
||||
#define CH_CFG_SYSTEM_TICK_HOOK() { \
|
||||
/* System tick event code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief System halt hook.
|
||||
* @details This hook is invoked in case to a system halting error before
|
||||
* the system is halted.
|
||||
*/
|
||||
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
|
||||
/* System halt code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Trace hook.
|
||||
* @details This hook is invoked each time a new record is written in the
|
||||
* trace buffer.
|
||||
*/
|
||||
#define CH_CFG_TRACE_HOOK(tep) { \
|
||||
/* Trace code here.*/ \
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Port-specific settings (override port settings defaulted in chcore.h). */
|
||||
/*===========================================================================*/
|
||||
|
||||
#endif /* CHCONF_H */
|
||||
|
||||
/** @} */
|
||||
@@ -32,11 +32,5 @@
|
||||
#define DRIVER_ADDR_1 0b1010000
|
||||
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
|
||||
#define DRIVER_COUNT 2
|
||||
#if defined (dzrgb60_ansi) || defined (dzrgb60_iso)
|
||||
#define DRIVER_1_LED_TOTAL 61
|
||||
#elif defined (dzrgb60_hhkb) || defined (dzrgb60_hhkb_iso)
|
||||
#define DRIVER_1_LED_TOTAL 62
|
||||
#else
|
||||
#define DRIVER_1_LED_TOTAL 63
|
||||
#endif
|
||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
|
||||
|
||||
@@ -65,26 +65,69 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, K_16, J_16, L_16},
|
||||
};
|
||||
|
||||
led_config_t g_led_config = { {
|
||||
{ 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
|
||||
{ 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 28 },
|
||||
{ 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 14 },
|
||||
{ 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED, NO_LED },
|
||||
{ 60, 59, 58, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 56, 55, 54, NO_LED, 53 }
|
||||
}, {
|
||||
{ 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 },
|
||||
{ 220, 24 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 },
|
||||
{ 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 210, 48 },
|
||||
{ 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 222, 64 }, { 202, 64 }, { 182, 64 },
|
||||
{ 162, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 }
|
||||
}, {
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1,
|
||||
1, 4, 1, 1, 1
|
||||
} };
|
||||
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
{{0|(13<<4)}, {16*13.5, 0}, 1},
|
||||
{{0|(12<<4)}, {16*12, 0}, 1},
|
||||
{{0|(11<<4)}, {16*11, 0}, 1},
|
||||
{{0|(10<<4)}, {16*10, 0}, 1},
|
||||
{{0|(9<<4)}, {16*9, 0}, 1},
|
||||
{{0|(8<<4)}, {16*8, 0}, 1},
|
||||
{{0|(7<<4)}, {16*7, 0}, 1},
|
||||
{{0|(6<<4)}, {16*6, 0}, 1},
|
||||
{{0|(5<<4)}, {16*5, 0}, 1},
|
||||
{{0|(4<<4)}, {16*4, 0}, 1},
|
||||
{{0|(3<<4)}, {16*3, 0}, 1},
|
||||
{{0|(2<<4)}, {16*2, 0}, 1},
|
||||
{{0|(1<<4)}, {16*1, 0}, 1},
|
||||
{{0|(0<<4)}, {16*0, 0}, 1},
|
||||
{{2|(13<<4)}, {16*13.75, 24}, 1},
|
||||
{{1|(12<<4)}, {16*12.5, 16}, 4},
|
||||
{{1|(11<<4)}, {16*11.5, 16}, 4},
|
||||
{{1|(10<<4)}, {16*10.5, 16}, 4},
|
||||
{{1|(9<<4)}, { 16*9.5, 16}, 4},
|
||||
{{1|(8<<4)}, { 16*8.5, 16}, 4},
|
||||
{{1|(7<<4)}, { 16*7.5, 16}, 4},
|
||||
{{1|(6<<4)}, { 16*6.5, 16}, 4},
|
||||
{{1|(5<<4)}, { 16*5.5, 16}, 4},
|
||||
{{1|(4<<4)}, { 16*4.5, 16}, 4},
|
||||
{{1|(3<<4)}, { 16*3.5, 16}, 4},
|
||||
{{1|(2<<4)}, { 16*2.5, 16}, 4},
|
||||
{{1|(1<<4)}, { 16*1.5, 16}, 4},
|
||||
{{1|(0<<4)}, { 16*0.25, 16}, 1},
|
||||
{{1|(13<<4)}, {16*12.75, 32}, 1},
|
||||
{{2|(11<<4)}, {16*11.75, 32}, 4},
|
||||
{{2|(10<<4)}, {16*10.75, 32}, 4},
|
||||
{{2|(9<<4)}, {16*9.75, 32}, 4},
|
||||
{{2|(8<<4)}, {16*8.75, 32}, 4},
|
||||
{{2|(7<<4)}, {16*7.75, 32}, 4},
|
||||
{{2|(6<<4)}, { 16*6.75, 32}, 4},
|
||||
{{2|(5<<4)}, { 16*5.75, 32}, 4},
|
||||
{{2|(4<<4)}, { 16*4.75, 32}, 4},
|
||||
{{2|(3<<4)}, { 16*3.75, 32}, 4},
|
||||
{{2|(2<<4)}, { 16*2.75, 32}, 4},
|
||||
{{2|(1<<4)}, { 16*1.75, 32}, 4},
|
||||
{{2|(0<<4)}, { 16*0.375, 32}, 1},
|
||||
{{3|(11<<4)}, {16*13.125, 48}, 1},
|
||||
{{3|(10<<4)}, {16*11.25, 48}, 4},
|
||||
{{3|(9<<4)}, {16*10.25, 48}, 4},
|
||||
{{3|(8<<4)}, {16*9.25, 48}, 4},
|
||||
{{3|(7<<4)}, {16*8.25, 48}, 4},
|
||||
{{3|(6<<4)}, {16*7.25, 48}, 4},
|
||||
{{3|(5<<4)}, {16*6.25, 48}, 4},
|
||||
{{3|(4<<4)}, {16*5.25, 48}, 4},
|
||||
{{3|(3<<4)}, {16*4.25, 48}, 4},
|
||||
{{3|(2<<4)}, {16*3.25, 48}, 4},
|
||||
{{3|(1<<4)}, {16*1.25, 48}, 4},
|
||||
{{3|(0<<4)}, {16*0.625, 48}, 1},
|
||||
{{4|(13<<4)}, {16*13.875, 64}, 1},
|
||||
{{4|(11<<4)}, {16*12.625, 64}, 1},
|
||||
{{4|(10<<4)}, {16*11.375, 64}, 1},
|
||||
{{4|(9<<4)}, {16*10.125, 64}, 1},
|
||||
{{4|(5<<4)}, { 16*6.375, 64}, 4},
|
||||
{{4|(2<<4)}, { 16*2.625, 64}, 1},
|
||||
{{4|(1<<4)}, { 16*1.375, 64}, 1},
|
||||
{{4|(0<<4)}, { 16*0.125, 64}, 1},
|
||||
};
|
||||
#elif defined (dzrgb60_hhkb)
|
||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, H_15, G_15, I_15},
|
||||
@@ -151,26 +194,70 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, K_16, J_16, L_16},
|
||||
};
|
||||
|
||||
led_config_t g_led_config = { {
|
||||
{ 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 },
|
||||
{ 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 },
|
||||
{ 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 0, 29 },
|
||||
{ 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, NO_LED, 42 },
|
||||
{ 61, 60, 59, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, NO_LED, 57, 56, NO_LED, 55 }
|
||||
}, {
|
||||
{ 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 },
|
||||
{ 0, 0 }, { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 },
|
||||
{ 4, 16 }, { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 },
|
||||
{ 224, 48 }, { 202, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 218, 64 },
|
||||
{ 198, 64 }, { 178, 64 }, { 112, 64 }, { 46, 64 }, { 26, 64 }, { 6, 64 }
|
||||
}, {
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||
1, 1, 4, 1, 1, 1
|
||||
} };
|
||||
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
{{2|(12<<4)}, {16*14, 0}, 1},
|
||||
{{0|(13<<4)}, {16*13, 0}, 1},
|
||||
{{0|(12<<4)}, {16*12, 0}, 1},
|
||||
{{0|(11<<4)}, {16*11, 0}, 1},
|
||||
{{0|(10<<4)}, {16*10, 0}, 1},
|
||||
{{0|(9<<4)}, {16*9, 0}, 1},
|
||||
{{0|(8<<4)}, {16*8, 0}, 1},
|
||||
{{0|(7<<4)}, {16*7, 0}, 1},
|
||||
{{0|(6<<4)}, {16*6, 0}, 1},
|
||||
{{0|(5<<4)}, {16*5, 0}, 1},
|
||||
{{0|(4<<4)}, {16*4, 0}, 1},
|
||||
{{0|(3<<4)}, {16*3, 0}, 1},
|
||||
{{0|(2<<4)}, {16*2, 0}, 1},
|
||||
{{0|(1<<4)}, {16*1, 0}, 1},
|
||||
{{0|(0<<4)}, {16*0, 0}, 1},
|
||||
{{1|(13<<4)}, {16*13.75, 16}, 1},
|
||||
{{1|(12<<4)}, {16*12.5, 16}, 4},
|
||||
{{1|(11<<4)}, {16*11.5, 16}, 4},
|
||||
{{1|(10<<4)}, {16*10.5, 16}, 4},
|
||||
{{1|(9<<4)}, { 16*9.5, 16}, 4},
|
||||
{{1|(8<<4)}, { 16*8.5, 16}, 4},
|
||||
{{1|(7<<4)}, { 16*7.5, 16}, 4},
|
||||
{{1|(6<<4)}, { 16*6.5, 16}, 4},
|
||||
{{1|(5<<4)}, { 16*5.5, 16}, 4},
|
||||
{{1|(4<<4)}, { 16*4.5, 16}, 4},
|
||||
{{1|(3<<4)}, { 16*3.5, 16}, 4},
|
||||
{{1|(2<<4)}, { 16*2.5, 16}, 4},
|
||||
{{1|(1<<4)}, { 16*1.5, 16}, 4},
|
||||
{{1|(0<<4)}, { 16*0.25, 16}, 1},
|
||||
{{2|(13<<4)}, {16*12.75, 32}, 1},
|
||||
{{2|(11<<4)}, {16*11.75, 32}, 4},
|
||||
{{2|(10<<4)}, {16*10.75, 32}, 4},
|
||||
{{2|(9<<4)}, {16*9.75, 32}, 4},
|
||||
{{2|(8<<4)}, {16*8.75, 32}, 4},
|
||||
{{2|(7<<4)}, {16*7.75, 32}, 4},
|
||||
{{2|(6<<4)}, { 16*6.75, 32}, 4},
|
||||
{{2|(5<<4)}, { 16*5.75, 32}, 4},
|
||||
{{2|(4<<4)}, { 16*4.75, 32}, 4},
|
||||
{{2|(3<<4)}, { 16*3.75, 32}, 4},
|
||||
{{2|(2<<4)}, { 16*2.75, 32}, 4},
|
||||
{{2|(1<<4)}, { 16*1.75, 32}, 4},
|
||||
{{2|(0<<4)}, { 16*0.375, 32}, 1},
|
||||
{{3|(13<<4)}, {16*14, 48}, 1},
|
||||
{{3|(11<<4)}, {16*12.625, 48}, 4},
|
||||
{{3|(10<<4)}, {16*11.25, 48}, 4},
|
||||
{{3|(9<<4)}, {16*10.25, 48}, 4},
|
||||
{{3|(8<<4)}, {16*9.25, 48}, 4},
|
||||
{{3|(7<<4)}, {16*8.25, 48}, 4},
|
||||
{{3|(6<<4)}, {16*7.25, 48}, 4},
|
||||
{{3|(5<<4)}, {16*6.25, 48}, 4},
|
||||
{{3|(4<<4)}, {16*5.25, 48}, 4},
|
||||
{{3|(3<<4)}, {16*4.25, 48}, 4},
|
||||
{{3|(2<<4)}, {16*3.25, 48}, 4},
|
||||
{{3|(1<<4)}, {16*1.25, 48}, 4},
|
||||
{{3|(0<<4)}, {16*0.625, 48}, 1},
|
||||
{{4|(13<<4)}, {16*13.625, 64}, 1},
|
||||
{{4|(11<<4)}, {16*12.375, 64}, 1},
|
||||
{{4|(10<<4)}, {16*11.125, 64}, 1},
|
||||
{{4|(5<<4)}, { 16*7, 64}, 4},
|
||||
{{4|(2<<4)}, { 16*2.875, 64}, 1},
|
||||
{{4|(1<<4)}, { 16*1.625, 64}, 1},
|
||||
{{4|(0<<4)}, { 16*0.375, 64}, 1},
|
||||
};
|
||||
#elif defined (dzrgb60_hhkb_iso)
|
||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, H_15, G_15, I_15},
|
||||
@@ -237,26 +324,70 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, K_16, J_16, L_16},
|
||||
};
|
||||
|
||||
led_config_t g_led_config = { {
|
||||
{ 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 },
|
||||
{ 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 29 },
|
||||
{ 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 0, 15 },
|
||||
{ 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, NO_LED, 42 },
|
||||
{ 61, 60, 59, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, NO_LED, 57, 56, NO_LED, 55 }
|
||||
}, {
|
||||
{ 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 },
|
||||
{ 0, 0 }, { 220, 24 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 },
|
||||
{ 4, 16 }, { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 },
|
||||
{ 224, 48 }, { 202, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 218, 64 },
|
||||
{ 198, 64 }, { 178, 64 }, { 112, 64 }, { 46, 64 }, { 26, 64 }, { 6, 64 }
|
||||
}, {
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||
1, 1, 4, 1, 1, 1
|
||||
} };
|
||||
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
{{2|(12<<4)}, {16*14, 0}, 1},
|
||||
{{0|(13<<4)}, {16*13, 0}, 1},
|
||||
{{0|(12<<4)}, {16*12, 0}, 1},
|
||||
{{0|(11<<4)}, {16*11, 0}, 1},
|
||||
{{0|(10<<4)}, {16*10, 0}, 1},
|
||||
{{0|(9<<4)}, {16*9, 0}, 1},
|
||||
{{0|(8<<4)}, {16*8, 0}, 1},
|
||||
{{0|(7<<4)}, {16*7, 0}, 1},
|
||||
{{0|(6<<4)}, {16*6, 0}, 1},
|
||||
{{0|(5<<4)}, {16*5, 0}, 1},
|
||||
{{0|(4<<4)}, {16*4, 0}, 1},
|
||||
{{0|(3<<4)}, {16*3, 0}, 1},
|
||||
{{0|(2<<4)}, {16*2, 0}, 1},
|
||||
{{0|(1<<4)}, {16*1, 0}, 1},
|
||||
{{0|(0<<4)}, {16*0, 0}, 1},
|
||||
{{2|(13<<4)}, {16*13.75, 24}, 1},
|
||||
{{1|(12<<4)}, {16*12.5, 16}, 4},
|
||||
{{1|(11<<4)}, {16*11.5, 16}, 4},
|
||||
{{1|(10<<4)}, {16*10.5, 16}, 4},
|
||||
{{1|(9<<4)}, { 16*9.5, 16}, 4},
|
||||
{{1|(8<<4)}, { 16*8.5, 16}, 4},
|
||||
{{1|(7<<4)}, { 16*7.5, 16}, 4},
|
||||
{{1|(6<<4)}, { 16*6.5, 16}, 4},
|
||||
{{1|(5<<4)}, { 16*5.5, 16}, 4},
|
||||
{{1|(4<<4)}, { 16*4.5, 16}, 4},
|
||||
{{1|(3<<4)}, { 16*3.5, 16}, 4},
|
||||
{{1|(2<<4)}, { 16*2.5, 16}, 4},
|
||||
{{1|(1<<4)}, { 16*1.5, 16}, 4},
|
||||
{{1|(0<<4)}, { 16*0.25, 16}, 1},
|
||||
{{1|(13<<4)}, {16*12.75, 32}, 1},
|
||||
{{2|(11<<4)}, {16*11.75, 32}, 4},
|
||||
{{2|(10<<4)}, {16*10.75, 32}, 4},
|
||||
{{2|(9<<4)}, {16*9.75, 32}, 4},
|
||||
{{2|(8<<4)}, {16*8.75, 32}, 4},
|
||||
{{2|(7<<4)}, {16*7.75, 32}, 4},
|
||||
{{2|(6<<4)}, { 16*6.75, 32}, 4},
|
||||
{{2|(5<<4)}, { 16*5.75, 32}, 4},
|
||||
{{2|(4<<4)}, { 16*4.75, 32}, 4},
|
||||
{{2|(3<<4)}, { 16*3.75, 32}, 4},
|
||||
{{2|(2<<4)}, { 16*2.75, 32}, 4},
|
||||
{{2|(1<<4)}, { 16*1.75, 32}, 4},
|
||||
{{2|(0<<4)}, { 16*0.375, 32}, 1},
|
||||
{{3|(13<<4)}, {16*14, 48}, 1},
|
||||
{{3|(11<<4)}, {16*12.625, 48}, 4},
|
||||
{{3|(10<<4)}, {16*11.25, 48}, 4},
|
||||
{{3|(9<<4)}, {16*10.25, 48}, 4},
|
||||
{{3|(8<<4)}, {16*9.25, 48}, 4},
|
||||
{{3|(7<<4)}, {16*8.25, 48}, 4},
|
||||
{{3|(6<<4)}, {16*7.25, 48}, 4},
|
||||
{{3|(5<<4)}, {16*6.25, 48}, 4},
|
||||
{{3|(4<<4)}, {16*5.25, 48}, 4},
|
||||
{{3|(3<<4)}, {16*4.25, 48}, 4},
|
||||
{{3|(2<<4)}, {16*3.25, 48}, 4},
|
||||
{{3|(1<<4)}, {16*1.25, 48}, 4},
|
||||
{{3|(0<<4)}, {16*0.625, 48}, 1},
|
||||
{{4|(13<<4)}, {16*13.625, 64}, 1},
|
||||
{{4|(11<<4)}, {16*12.375, 64}, 1},
|
||||
{{4|(10<<4)}, {16*11.125, 64}, 1},
|
||||
{{4|(5<<4)}, { 16*7, 64}, 4},
|
||||
{{4|(2<<4)}, { 16*2.875, 64}, 1},
|
||||
{{4|(1<<4)}, { 16*1.625, 64}, 1},
|
||||
{{4|(0<<4)}, { 16*0.375, 64}, 1},
|
||||
};
|
||||
#elif defined (dzrgb60_ansi)
|
||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, K_14, J_14, L_14},
|
||||
@@ -322,26 +453,69 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, K_16, J_16, L_16},
|
||||
};
|
||||
|
||||
led_config_t g_led_config = { {
|
||||
{ 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
|
||||
{ 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 },
|
||||
{ 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 },
|
||||
{ 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED, NO_LED },
|
||||
{ 60, 59, 58, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 56, 55, 54, NO_LED, 53 }
|
||||
}, {
|
||||
{ 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 },
|
||||
{ 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 },
|
||||
{ 214, 24 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 210, 48 },
|
||||
{ 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 222, 64 }, { 202, 64 }, { 182, 64 },
|
||||
{ 162, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 }
|
||||
}, {
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1,
|
||||
1, 4, 1, 1, 1
|
||||
} };
|
||||
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
{{0|(13<<4)}, {16*13.5, 0}, 1},
|
||||
{{0|(12<<4)}, {16*12, 0}, 1},
|
||||
{{0|(11<<4)}, {16*11, 0}, 1},
|
||||
{{0|(10<<4)}, {16*10, 0}, 1},
|
||||
{{0|(9<<4)}, {16*9, 0}, 1},
|
||||
{{0|(8<<4)}, {16*8, 0}, 1},
|
||||
{{0|(7<<4)}, {16*7, 0}, 1},
|
||||
{{0|(6<<4)}, {16*6, 0}, 1},
|
||||
{{0|(5<<4)}, {16*5, 0}, 1},
|
||||
{{0|(4<<4)}, {16*4, 0}, 1},
|
||||
{{0|(3<<4)}, {16*3, 0}, 1},
|
||||
{{0|(2<<4)}, {16*2, 0}, 1},
|
||||
{{0|(1<<4)}, {16*1, 0}, 1},
|
||||
{{0|(0<<4)}, {16*0, 0}, 1},
|
||||
{{1|(13<<4)}, {16*13.75, 16}, 1},
|
||||
{{1|(12<<4)}, {16*12.5, 16}, 4},
|
||||
{{1|(11<<4)}, {16*11.5, 16}, 4},
|
||||
{{1|(10<<4)}, {16*10.5, 16}, 4},
|
||||
{{1|(9<<4)}, { 16*9.5, 16}, 4},
|
||||
{{1|(8<<4)}, { 16*8.5, 16}, 4},
|
||||
{{1|(7<<4)}, { 16*7.5, 16}, 4},
|
||||
{{1|(6<<4)}, { 16*6.5, 16}, 4},
|
||||
{{1|(5<<4)}, { 16*5.5, 16}, 4},
|
||||
{{1|(4<<4)}, { 16*4.5, 16}, 4},
|
||||
{{1|(3<<4)}, { 16*3.5, 16}, 4},
|
||||
{{1|(2<<4)}, { 16*2.5, 16}, 4},
|
||||
{{1|(1<<4)}, { 16*1.5, 16}, 4},
|
||||
{{1|(0<<4)}, { 16*0.25, 16}, 1},
|
||||
{{2|(13<<4)}, {16*13.375, 24}, 1},
|
||||
{{2|(11<<4)}, {16*11.75, 32}, 4},
|
||||
{{2|(10<<4)}, {16*10.75, 32}, 4},
|
||||
{{2|(9<<4)}, {16*9.75, 32}, 4},
|
||||
{{2|(8<<4)}, {16*8.75, 32}, 4},
|
||||
{{2|(7<<4)}, {16*7.75, 32}, 4},
|
||||
{{2|(6<<4)}, { 16*6.75, 32}, 4},
|
||||
{{2|(5<<4)}, { 16*5.75, 32}, 4},
|
||||
{{2|(4<<4)}, { 16*4.75, 32}, 4},
|
||||
{{2|(3<<4)}, { 16*3.75, 32}, 4},
|
||||
{{2|(2<<4)}, { 16*2.75, 32}, 4},
|
||||
{{2|(1<<4)}, { 16*1.75, 32}, 4},
|
||||
{{2|(0<<4)}, { 16*0.375, 32}, 1},
|
||||
{{3|(11<<4)}, {16*13.125, 48}, 1},
|
||||
{{3|(10<<4)}, {16*11.25, 48}, 4},
|
||||
{{3|(9<<4)}, {16*10.25, 48}, 4},
|
||||
{{3|(8<<4)}, {16*9.25, 48}, 4},
|
||||
{{3|(7<<4)}, {16*8.25, 48}, 4},
|
||||
{{3|(6<<4)}, {16*7.25, 48}, 4},
|
||||
{{3|(5<<4)}, {16*6.25, 48}, 4},
|
||||
{{3|(4<<4)}, {16*5.25, 48}, 4},
|
||||
{{3|(3<<4)}, {16*4.25, 48}, 4},
|
||||
{{3|(2<<4)}, {16*3.25, 48}, 4},
|
||||
{{3|(1<<4)}, {16*1.25, 48}, 4},
|
||||
{{3|(0<<4)}, {16*0.625, 48}, 1},
|
||||
{{4|(13<<4)}, {16*13.875, 64}, 1},
|
||||
{{4|(11<<4)}, {16*12.625, 64}, 1},
|
||||
{{4|(10<<4)}, {16*11.375, 64}, 1},
|
||||
{{4|(9<<4)}, {16*10.125, 64}, 1},
|
||||
{{4|(5<<4)}, { 16*6.375, 64}, 4},
|
||||
{{4|(2<<4)}, { 16*2.625, 64}, 1},
|
||||
{{4|(1<<4)}, { 16*1.375, 64}, 1},
|
||||
{{4|(0<<4)}, { 16*0.125, 64}, 1},
|
||||
};
|
||||
#else
|
||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, K_14, J_14, L_14},
|
||||
@@ -409,26 +583,71 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, K_16, J_16, L_16},
|
||||
};
|
||||
|
||||
led_config_t g_led_config = { {
|
||||
{ 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
|
||||
{ 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 },
|
||||
{ 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 },
|
||||
{ 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, NO_LED, 41 },
|
||||
{ 62, 61, 60, NO_LED, NO_LED, 59, NO_LED, NO_LED, 58, 57, 56, 55, NO_LED, 54 }
|
||||
}, {
|
||||
{ 223, 0 }, { 206, 0 }, { 189, 0 }, { 172, 0 }, { 155, 0 }, { 137, 0 }, { 120, 0 }, { 103, 0 }, { 86, 0 }, { 68, 0 }, { 51, 0 }, { 34, 0 }, { 17, 0 }, { 0, 0 },
|
||||
{ 223, 16 }, { 206, 16 }, { 189, 16 }, { 172, 16 }, { 155, 16 }, { 137, 16 }, { 120, 16 }, { 103, 16 }, { 86, 16 }, { 68, 16 }, { 51, 16 }, { 34, 16 }, { 17, 16 }, { 0, 16 },
|
||||
{ 223, 32 }, { 189, 32 }, { 172, 32 }, { 155, 32 }, { 137, 32 }, { 120, 32 }, { 103, 32 }, { 86, 32 }, { 68, 32 }, { 51, 32 }, { 34, 32 }, { 17, 32 }, { 0, 32 }, { 223, 48 },
|
||||
{ 189, 48 }, { 172, 48 }, { 155, 48 }, { 137, 48 }, { 120, 48 }, { 103, 48 }, { 86, 48 }, { 68, 48 }, { 51, 48 }, { 34, 48 }, { 17, 48 }, { 0, 48 }, { 223, 64 }, { 189, 64 },
|
||||
{ 172, 64 }, { 155, 64 }, { 137, 64 }, { 86, 64 }, { 34, 64 }, { 17, 64 }, { 0, 64 }
|
||||
}, {
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
|
||||
1, 1, 1, 4, 1, 1, 1
|
||||
} };
|
||||
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
{{0|(13<<4)}, {17.23*13, 0}, 1},
|
||||
{{0|(12<<4)}, {17.23*12, 0}, 1},
|
||||
{{0|(11<<4)}, {17.23*11, 0}, 1},
|
||||
{{0|(10<<4)}, {17.23*10, 0}, 1},
|
||||
{{0|(9<<4)}, {17.23*9, 0}, 1},
|
||||
{{0|(8<<4)}, {17.23*8, 0}, 1},
|
||||
{{0|(7<<4)}, {17.23*7, 0}, 1},
|
||||
{{0|(6<<4)}, { 17.23*6, 0}, 1},
|
||||
{{0|(5<<4)}, { 17.23*5, 0}, 1},
|
||||
{{0|(4<<4)}, { 17.23*4, 0}, 1},
|
||||
{{0|(3<<4)}, { 17.23*3, 0}, 1},
|
||||
{{0|(2<<4)}, { 17.23*2, 0}, 1},
|
||||
{{0|(1<<4)}, { 17.23*1, 0}, 1},
|
||||
{{0|(0<<4)}, { 17.23*0, 0}, 1},
|
||||
{{1|(13<<4)}, {17.23*13, 16}, 1},
|
||||
{{1|(12<<4)}, {17.23*12, 16}, 4},
|
||||
{{1|(11<<4)}, {17.23*11, 16}, 4},
|
||||
{{1|(10<<4)}, {17.23*10, 16}, 4},
|
||||
{{1|(9<<4)}, {17.23*9, 16}, 4},
|
||||
{{1|(8<<4)}, {17.23*8, 16}, 4},
|
||||
{{1|(7<<4)}, {17.23*7, 16}, 4},
|
||||
{{1|(6<<4)}, { 17.23*6, 16}, 4},
|
||||
{{1|(5<<4)}, { 17.23*5, 16}, 4},
|
||||
{{1|(4<<4)}, { 17.23*4, 16}, 4},
|
||||
{{1|(3<<4)}, { 17.23*3, 16}, 4},
|
||||
{{1|(2<<4)}, { 17.23*2, 16}, 4},
|
||||
{{1|(1<<4)}, { 17.23*1, 16}, 4},
|
||||
{{1|(0<<4)}, { 17.23*0, 16}, 1},
|
||||
{{2|(13<<4)}, {17.23*13, 32}, 1},
|
||||
{{2|(11<<4)}, {17.23*11, 32}, 4},
|
||||
{{2|(10<<4)}, {17.23*10, 32}, 4},
|
||||
{{2|(9<<4)}, {17.23*9, 32}, 4},
|
||||
{{2|(8<<4)}, {17.23*8, 32}, 4},
|
||||
{{2|(7<<4)}, {17.23*7, 32}, 4},
|
||||
{{2|(6<<4)}, { 17.23*6, 32}, 4},
|
||||
{{2|(5<<4)}, { 17.23*5, 32}, 4},
|
||||
{{2|(4<<4)}, { 17.23*4, 32}, 4},
|
||||
{{2|(3<<4)}, { 17.23*3, 32}, 4},
|
||||
{{2|(2<<4)}, { 17.23*2, 32}, 4},
|
||||
{{2|(1<<4)}, { 17.23*1, 32}, 4},
|
||||
{{2|(0<<4)}, { 17.23*0, 32}, 1},
|
||||
{{3|(13<<4)}, {17.23*13, 48}, 1},
|
||||
{{3|(11<<4)}, {17.23*11, 48}, 4},
|
||||
{{3|(10<<4)}, {17.23*10, 48}, 4},
|
||||
{{3|(9<<4)}, {17.23*9, 48}, 4},
|
||||
{{3|(8<<4)}, {17.23*8, 48}, 4},
|
||||
{{3|(7<<4)}, {17.23*7, 48}, 4},
|
||||
{{3|(6<<4)}, { 17.23*6, 48}, 4},
|
||||
{{3|(5<<4)}, { 17.23*5, 48}, 4},
|
||||
{{3|(4<<4)}, { 17.23*4, 48}, 4},
|
||||
{{3|(3<<4)}, { 17.23*3, 48}, 4},
|
||||
{{3|(2<<4)}, { 17.23*2, 48}, 4},
|
||||
{{3|(1<<4)}, { 17.23*1, 48}, 4},
|
||||
{{3|(0<<4)}, { 17.23*0, 48}, 1},
|
||||
{{4|(13<<4)}, {17.23*13, 64}, 1},
|
||||
{{4|(11<<4)}, {17.23*11, 64}, 1},
|
||||
{{4|(10<<4)}, {17.23*10, 64}, 1},
|
||||
{{4|(9<<4)}, {17.23*9, 64}, 1},
|
||||
{{4|(8<<4)}, {17.23*8, 64}, 1},
|
||||
{{4|(5<<4)}, { 17.23*5, 64}, 4},
|
||||
{{4|(2<<4)}, { 17.23*2, 64}, 1},
|
||||
{{4|(1<<4)}, { 17.23*1, 64}, 1},
|
||||
{{4|(0<<4)}, { 17.23*0, 64}, 1},
|
||||
};
|
||||
#endif
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
|
||||
388
keyboards/dztech/dz60rgb/halconf.h
Normal file
388
keyboards/dztech/dz60rgb/halconf.h
Normal file
@@ -0,0 +1,388 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file templates/halconf.h
|
||||
* @brief HAL configuration header.
|
||||
* @details HAL configuration file, this file allows to enable or disable the
|
||||
* various device drivers from your application. You may also use
|
||||
* this file in order to override the device drivers default settings.
|
||||
*
|
||||
* @addtogroup HAL_CONF
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef HALCONF_H
|
||||
#define HALCONF_H
|
||||
|
||||
#include "mcuconf.h"
|
||||
|
||||
/**
|
||||
* @brief Enables the PAL subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_PAL TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the ADC subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_ADC FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the CAN subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_CAN FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the DAC subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_DAC TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the EXT subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_EXT FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the GPT subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_GPT TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the I2C subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_I2C TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the I2S subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_I2S FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the ICU subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_ICU FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the MAC subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_MAC FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the MMC_SPI subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_MMC_SPI FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the PWM subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_PWM FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the QSPI subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_QSPI FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the RTC subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_RTC FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the SDC subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_SDC FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the SERIAL subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_SERIAL FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the SERIAL over USB subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_SERIAL_USB FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the SPI subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_SPI FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the UART subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_UART FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the USB subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_USB TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the WDG subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_WDG FALSE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* ADC driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables synchronous APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
|
||||
#define ADC_USE_WAIT TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||
#define ADC_USE_MUTUAL_EXCLUSION TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* CAN driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Sleep mode related APIs inclusion switch.
|
||||
*/
|
||||
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
|
||||
#define CAN_USE_SLEEP_MODE TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* I2C driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables the mutual exclusion APIs on the I2C bus.
|
||||
*/
|
||||
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||
#define I2C_USE_MUTUAL_EXCLUSION TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* MAC driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables an event sources for incoming packets.
|
||||
*/
|
||||
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
|
||||
#define MAC_USE_ZERO_COPY FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables an event sources for incoming packets.
|
||||
*/
|
||||
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
|
||||
#define MAC_USE_EVENTS TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* MMC_SPI driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Delays insertions.
|
||||
* @details If enabled this options inserts delays into the MMC waiting
|
||||
* routines releasing some extra CPU time for the threads with
|
||||
* lower priority, this may slow down the driver a bit however.
|
||||
* This option is recommended also if the SPI driver does not
|
||||
* use a DMA channel and heavily loads the CPU.
|
||||
*/
|
||||
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||
#define MMC_NICE_WAITING TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* SDC driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Number of initialization attempts before rejecting the card.
|
||||
* @note Attempts are performed at 10mS intervals.
|
||||
*/
|
||||
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
|
||||
#define SDC_INIT_RETRY 100
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Include support for MMC cards.
|
||||
* @note MMC support is not yet implemented so this option must be kept
|
||||
* at @p FALSE.
|
||||
*/
|
||||
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
|
||||
#define SDC_MMC_SUPPORT FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Delays insertions.
|
||||
* @details If enabled this options inserts delays into the MMC waiting
|
||||
* routines releasing some extra CPU time for the threads with
|
||||
* lower priority, this may slow down the driver a bit however.
|
||||
*/
|
||||
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||
#define SDC_NICE_WAITING TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* SERIAL driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Default bit rate.
|
||||
* @details Configuration parameter, this is the baud rate selected for the
|
||||
* default configuration.
|
||||
*/
|
||||
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
|
||||
#define SERIAL_DEFAULT_BITRATE 38400
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Serial buffers size.
|
||||
* @details Configuration parameter, you can change the depth of the queue
|
||||
* buffers depending on the requirements of your application.
|
||||
* @note The default is 16 bytes for both the transmission and receive
|
||||
* buffers.
|
||||
*/
|
||||
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||
#define SERIAL_BUFFERS_SIZE 16
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* SERIAL_USB driver related setting. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Serial over USB buffers size.
|
||||
* @details Configuration parameter, the buffer size must be a multiple of
|
||||
* the USB data endpoint maximum packet size.
|
||||
* @note The default is 256 bytes for both the transmission and receive
|
||||
* buffers.
|
||||
*/
|
||||
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||
#define SERIAL_USB_BUFFERS_SIZE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Serial over USB number of buffers.
|
||||
* @note The default is 2 buffers.
|
||||
*/
|
||||
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
|
||||
#define SERIAL_USB_BUFFERS_NUMBER 2
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* SPI driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables synchronous APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
|
||||
#define SPI_USE_WAIT TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||
#define SPI_USE_MUTUAL_EXCLUSION TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* UART driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables synchronous APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
|
||||
#define UART_USE_WAIT FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||
#define UART_USE_MUTUAL_EXCLUSION FALSE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* USB driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables synchronous APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
|
||||
#define USB_USE_WAIT TRUE
|
||||
#endif
|
||||
|
||||
#endif /* HALCONF_H */
|
||||
|
||||
/** @} */
|
||||
@@ -1,2 +1,6 @@
|
||||
#pragma once
|
||||
#define dzrgb60_ansi
|
||||
#undef DRIVER_1_LED_TOTAL
|
||||
#undef DRIVER_LED_TOTAL
|
||||
#define DRIVER_1_LED_TOTAL 61
|
||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
extern bool g_suspend_state;
|
||||
#define _LAYER0 0
|
||||
#define _LAYER1 1
|
||||
#define _LAYER2 2
|
||||
@@ -38,8 +39,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
};
|
||||
|
||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||
rgb_led led;
|
||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||
led = g_rgb_leds[i];
|
||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
||||
rgb_matrix_set_color( i, red, green, blue );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
extern bool g_suspend_state;
|
||||
#define _LAYER0 0
|
||||
#define _LAYER1 1
|
||||
#define _LAYER2 2
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
#pragma once
|
||||
#define dzrgb60_hhkb
|
||||
#undef DRIVER_1_LED_TOTAL
|
||||
#undef DRIVER_LED_TOTAL
|
||||
#define DRIVER_1_LED_TOTAL 62
|
||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
extern bool g_suspend_state;
|
||||
#define _LAYER0 0
|
||||
#define _LAYER1 1
|
||||
#define _LAYER2 2
|
||||
@@ -39,8 +40,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
|
||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||
rgb_led led;
|
||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||
led = g_rgb_leds[i];
|
||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
||||
rgb_matrix_set_color( i, red, green, blue );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
#pragma once
|
||||
#define dzrgb60_hhkb_iso
|
||||
#undef DRIVER_1_LED_TOTAL
|
||||
#undef DRIVER_LED_TOTAL
|
||||
#define DRIVER_1_LED_TOTAL 62
|
||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
extern bool g_suspend_state;
|
||||
#define _LAYER0 0
|
||||
#define _LAYER1 1
|
||||
#define _LAYER2 2
|
||||
@@ -39,8 +40,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
};
|
||||
|
||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||
rgb_led led;
|
||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||
led = g_rgb_leds[i];
|
||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
||||
rgb_matrix_set_color( i, red, green, blue );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
#pragma once
|
||||
#define dzrgb60_iso
|
||||
#undef DRIVER_1_LED_TOTAL
|
||||
#undef DRIVER_LED_TOTAL
|
||||
#define DRIVER_1_LED_TOTAL 61
|
||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
extern bool g_suspend_state;
|
||||
#define _LAYER0 0
|
||||
#define _LAYER1 1
|
||||
#define _LAYER2 2
|
||||
@@ -38,8 +39,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
};
|
||||
|
||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||
rgb_led led;
|
||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||
led = g_rgb_leds[i];
|
||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
||||
rgb_matrix_set_color( i, red, green, blue );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
extern bool g_suspend_state;
|
||||
|
||||
enum dz60rgb_layers {
|
||||
_QWERTY,
|
||||
@@ -25,6 +26,7 @@ enum dz60rgb_keycodes {
|
||||
#define _V_V_V_ KC_TRNS
|
||||
#define LT_CAPS LT(_NAV, KC_CAPS)
|
||||
#define LT_DEL LT(_RGB, KC_DEL)
|
||||
extern rgb_config_t rgb_matrix_config;
|
||||
extern bool autoshift_enabled;
|
||||
#define MT_SLSH RSFT_T(KC_SLSH)
|
||||
#define MT_APP RALT_T(KC_APP)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
extern bool g_suspend_state;
|
||||
#define _LAYER0 0
|
||||
#define _LAYER1 1
|
||||
#define _LAYER2 2
|
||||
@@ -49,35 +50,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
|
||||
|
||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) {
|
||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||
rgb_matrix_set_color( i, red, green, blue );
|
||||
}
|
||||
}
|
||||
void rgb_matrix_layer_helper(uint8_t red, uint8_t green, uint8_t blue, bool default_layer)
|
||||
{
|
||||
rgb_led led;
|
||||
|
||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||
led = g_rgb_leds[i];
|
||||
|
||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
||||
rgb_matrix_set_color( i, red, green, blue );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void rgb_matrix_indicators_user(void)
|
||||
{
|
||||
uint8_t this_led = host_keyboard_leds();
|
||||
|
||||
|
||||
if (!g_suspend_state) {
|
||||
switch (biton32(layer_state)) {
|
||||
case _LAYER1:
|
||||
rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break;
|
||||
|
||||
|
||||
case _LAYER2:
|
||||
rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break;
|
||||
|
||||
|
||||
case _LAYER4:
|
||||
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (this_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF);
|
||||
}
|
||||
|
||||
|
||||
switch (biton32(layer_state)) {
|
||||
case _LAYER3:
|
||||
if (this_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
@@ -85,7 +91,7 @@ void rgb_matrix_indicators_user(void)
|
||||
} else {
|
||||
rgb_matrix_set_color(13, 0x00, 0x00, 0x00);
|
||||
}
|
||||
|
||||
|
||||
rgb_matrix_set_color(0, 0x00, 0xFF, 0x00);
|
||||
rgb_matrix_set_color(1, 0x00, 0x00, 0x00);
|
||||
rgb_matrix_set_color(1, 0x00, 0xFF, 0x00);
|
||||
|
||||
257
keyboards/dztech/dz60rgb/mcuconf.h
Normal file
257
keyboards/dztech/dz60rgb/mcuconf.h
Normal file
@@ -0,0 +1,257 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef MCUCONF_H
|
||||
#define MCUCONF_H
|
||||
|
||||
/*
|
||||
* STM32F3xx drivers configuration.
|
||||
* The following settings override the default settings present in
|
||||
* the various device driver implementation headers.
|
||||
* Note that the settings for each driver only have effect if the whole
|
||||
* driver is enabled in halconf.h.
|
||||
*
|
||||
* IRQ priorities:
|
||||
* 15...0 Lowest...Highest.
|
||||
*
|
||||
* DMA priorities:
|
||||
* 0...3 Lowest...Highest.
|
||||
*/
|
||||
|
||||
#define STM32F3xx_MCUCONF
|
||||
|
||||
/*
|
||||
* HAL driver system settings.
|
||||
*/
|
||||
#define STM32_NO_INIT FALSE
|
||||
#define STM32_PVD_ENABLE FALSE
|
||||
#define STM32_PLS STM32_PLS_LEV0
|
||||
#define STM32_HSI_ENABLED TRUE
|
||||
#define STM32_LSI_ENABLED TRUE
|
||||
#define STM32_HSE_ENABLED TRUE
|
||||
#define STM32_LSE_ENABLED FALSE
|
||||
#define STM32_SW STM32_SW_PLL
|
||||
#define STM32_PLLSRC STM32_PLLSRC_HSE
|
||||
#define STM32_PREDIV_VALUE 1
|
||||
#define STM32_PLLMUL_VALUE 9
|
||||
#define STM32_HPRE STM32_HPRE_DIV1
|
||||
#define STM32_PPRE1 STM32_PPRE1_DIV2
|
||||
#define STM32_PPRE2 STM32_PPRE2_DIV2
|
||||
#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
|
||||
#define STM32_ADC12PRES STM32_ADC12PRES_DIV1
|
||||
#define STM32_ADC34PRES STM32_ADC34PRES_DIV1
|
||||
#define STM32_USART1SW STM32_USART1SW_PCLK
|
||||
#define STM32_USART2SW STM32_USART2SW_PCLK
|
||||
#define STM32_USART3SW STM32_USART3SW_PCLK
|
||||
#define STM32_UART4SW STM32_UART4SW_PCLK
|
||||
#define STM32_UART5SW STM32_UART5SW_PCLK
|
||||
#define STM32_I2C1SW STM32_I2C1SW_SYSCLK
|
||||
#define STM32_I2C2SW STM32_I2C2SW_SYSCLK
|
||||
#define STM32_TIM1SW STM32_TIM1SW_PCLK2
|
||||
#define STM32_TIM8SW STM32_TIM8SW_PCLK2
|
||||
#define STM32_RTCSEL STM32_RTCSEL_LSI
|
||||
#define STM32_USB_CLOCK_REQUIRED TRUE
|
||||
#define STM32_USBPRE STM32_USBPRE_DIV1P5
|
||||
|
||||
#undef STM32_HSE_BYPASS
|
||||
// #error "oh no"
|
||||
// #endif
|
||||
|
||||
/*
|
||||
* ADC driver system settings.
|
||||
*/
|
||||
#define STM32_ADC_DUAL_MODE FALSE
|
||||
#define STM32_ADC_COMPACT_SAMPLES FALSE
|
||||
#define STM32_ADC_USE_ADC1 FALSE
|
||||
#define STM32_ADC_USE_ADC2 FALSE
|
||||
#define STM32_ADC_USE_ADC3 FALSE
|
||||
#define STM32_ADC_USE_ADC4 FALSE
|
||||
#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1)
|
||||
#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
|
||||
#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)
|
||||
#define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
|
||||
#define STM32_ADC_ADC1_DMA_PRIORITY 2
|
||||
#define STM32_ADC_ADC2_DMA_PRIORITY 2
|
||||
#define STM32_ADC_ADC3_DMA_PRIORITY 2
|
||||
#define STM32_ADC_ADC4_DMA_PRIORITY 2
|
||||
#define STM32_ADC_ADC12_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC3_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC4_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
|
||||
#define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
|
||||
|
||||
/*
|
||||
* CAN driver system settings.
|
||||
*/
|
||||
#define STM32_CAN_USE_CAN1 FALSE
|
||||
#define STM32_CAN_CAN1_IRQ_PRIORITY 11
|
||||
|
||||
/*
|
||||
* DAC driver system settings.
|
||||
*/
|
||||
#define STM32_DAC_DUAL_MODE FALSE
|
||||
#define STM32_DAC_USE_DAC1_CH1 TRUE
|
||||
#define STM32_DAC_USE_DAC1_CH2 TRUE
|
||||
#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10
|
||||
#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10
|
||||
#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2
|
||||
#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
|
||||
|
||||
/*
|
||||
* EXT driver system settings.
|
||||
*/
|
||||
#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI17_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI20_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI33_IRQ_PRIORITY 6
|
||||
|
||||
/*
|
||||
* GPT driver system settings.
|
||||
*/
|
||||
#define STM32_GPT_USE_TIM1 FALSE
|
||||
#define STM32_GPT_USE_TIM2 FALSE
|
||||
#define STM32_GPT_USE_TIM3 FALSE
|
||||
#define STM32_GPT_USE_TIM4 FALSE
|
||||
#define STM32_GPT_USE_TIM6 TRUE
|
||||
#define STM32_GPT_USE_TIM7 TRUE
|
||||
#define STM32_GPT_USE_TIM8 TRUE
|
||||
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
|
||||
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
|
||||
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
|
||||
#define STM32_GPT_TIM4_IRQ_PRIORITY 7
|
||||
#define STM32_GPT_TIM6_IRQ_PRIORITY 7
|
||||
#define STM32_GPT_TIM7_IRQ_PRIORITY 7
|
||||
#define STM32_GPT_TIM8_IRQ_PRIORITY 7
|
||||
|
||||
/*
|
||||
* I2C driver system settings.
|
||||
*/
|
||||
#define STM32_I2C_USE_I2C1 TRUE
|
||||
#define STM32_I2C_USE_I2C2 FALSE
|
||||
#define STM32_I2C_BUSY_TIMEOUT 50
|
||||
#define STM32_I2C_I2C1_IRQ_PRIORITY 10
|
||||
#define STM32_I2C_I2C2_IRQ_PRIORITY 10
|
||||
#define STM32_I2C_USE_DMA TRUE
|
||||
#define STM32_I2C_I2C1_DMA_PRIORITY 1
|
||||
#define STM32_I2C_I2C2_DMA_PRIORITY 1
|
||||
#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
|
||||
|
||||
/*
|
||||
* ICU driver system settings.
|
||||
*/
|
||||
#define STM32_ICU_USE_TIM1 FALSE
|
||||
#define STM32_ICU_USE_TIM2 FALSE
|
||||
#define STM32_ICU_USE_TIM3 FALSE
|
||||
#define STM32_ICU_USE_TIM4 FALSE
|
||||
#define STM32_ICU_USE_TIM8 FALSE
|
||||
#define STM32_ICU_TIM1_IRQ_PRIORITY 7
|
||||
#define STM32_ICU_TIM2_IRQ_PRIORITY 7
|
||||
#define STM32_ICU_TIM3_IRQ_PRIORITY 7
|
||||
#define STM32_ICU_TIM4_IRQ_PRIORITY 7
|
||||
#define STM32_ICU_TIM8_IRQ_PRIORITY 7
|
||||
|
||||
/*
|
||||
* PWM driver system settings.
|
||||
*/
|
||||
#define STM32_PWM_USE_ADVANCED FALSE
|
||||
#define STM32_PWM_USE_TIM1 FALSE
|
||||
#define STM32_PWM_USE_TIM2 FALSE
|
||||
#define STM32_PWM_USE_TIM3 FALSE
|
||||
#define STM32_PWM_USE_TIM4 FALSE
|
||||
#define STM32_PWM_USE_TIM8 FALSE
|
||||
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
|
||||
#define STM32_PWM_TIM2_IRQ_PRIORITY 7
|
||||
#define STM32_PWM_TIM3_IRQ_PRIORITY 7
|
||||
#define STM32_PWM_TIM4_IRQ_PRIORITY 7
|
||||
#define STM32_PWM_TIM8_IRQ_PRIORITY 7
|
||||
|
||||
/*
|
||||
* SERIAL driver system settings.
|
||||
*/
|
||||
#define STM32_SERIAL_USE_USART1 FALSE
|
||||
#define STM32_SERIAL_USE_USART2 FALSE
|
||||
#define STM32_SERIAL_USE_USART3 FALSE
|
||||
#define STM32_SERIAL_USE_UART4 FALSE
|
||||
#define STM32_SERIAL_USE_UART5 FALSE
|
||||
#define STM32_SERIAL_USART1_PRIORITY 12
|
||||
#define STM32_SERIAL_USART2_PRIORITY 12
|
||||
#define STM32_SERIAL_USART3_PRIORITY 12
|
||||
#define STM32_SERIAL_UART4_PRIORITY 12
|
||||
#define STM32_SERIAL_UART5_PRIORITY 12
|
||||
|
||||
/*
|
||||
* SPI driver system settings.
|
||||
*/
|
||||
#define STM32_SPI_USE_SPI1 FALSE
|
||||
#define STM32_SPI_USE_SPI2 FALSE
|
||||
#define STM32_SPI_USE_SPI3 FALSE
|
||||
#define STM32_SPI_SPI1_DMA_PRIORITY 1
|
||||
#define STM32_SPI_SPI2_DMA_PRIORITY 1
|
||||
#define STM32_SPI_SPI3_DMA_PRIORITY 1
|
||||
#define STM32_SPI_SPI1_IRQ_PRIORITY 10
|
||||
#define STM32_SPI_SPI2_IRQ_PRIORITY 10
|
||||
#define STM32_SPI_SPI3_IRQ_PRIORITY 10
|
||||
#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
|
||||
|
||||
/*
|
||||
* ST driver system settings.
|
||||
*/
|
||||
#define STM32_ST_IRQ_PRIORITY 8
|
||||
#define STM32_ST_USE_TIMER 2
|
||||
|
||||
/*
|
||||
* UART driver system settings.
|
||||
*/
|
||||
#define STM32_UART_USE_USART1 FALSE
|
||||
#define STM32_UART_USE_USART2 FALSE
|
||||
#define STM32_UART_USE_USART3 FALSE
|
||||
#define STM32_UART_USART1_IRQ_PRIORITY 12
|
||||
#define STM32_UART_USART2_IRQ_PRIORITY 12
|
||||
#define STM32_UART_USART3_IRQ_PRIORITY 12
|
||||
#define STM32_UART_USART1_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART2_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART3_DMA_PRIORITY 0
|
||||
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
|
||||
|
||||
/*
|
||||
* USB driver system settings.
|
||||
*/
|
||||
#define STM32_USB_USE_USB1 TRUE
|
||||
#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
|
||||
#define STM32_USB_USB1_HP_IRQ_PRIORITY 13
|
||||
#define STM32_USB_USB1_LP_IRQ_PRIORITY 14
|
||||
|
||||
/*
|
||||
* WDG driver system settings.
|
||||
*/
|
||||
#define STM32_WDG_USE_IWDG FALSE
|
||||
|
||||
#endif /* MCUCONF_H */
|
||||
@@ -1,6 +1,43 @@
|
||||
MCU = STM32F303
|
||||
# project specific files
|
||||
|
||||
## chip/board settings
|
||||
# the next two should match the directories in
|
||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||
MCU_FAMILY = STM32
|
||||
MCU_SERIES = STM32F3xx
|
||||
|
||||
# Linker script to use
|
||||
# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||
# or <this_dir>/ld/
|
||||
MCU_LDSCRIPT = STM32F303xC
|
||||
|
||||
# Startup code to use
|
||||
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
|
||||
MCU_STARTUP = stm32f3xx
|
||||
|
||||
# Board: it should exist either in <chibios>/os/hal/boards/
|
||||
# or <this_dir>/boards
|
||||
BOARD = GENERIC_STM32_F303XC
|
||||
|
||||
# Cortex version
|
||||
MCU = cortex-m4
|
||||
|
||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||
ARMV = 7
|
||||
|
||||
USE_FPU = yes
|
||||
|
||||
# Vector table for application
|
||||
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
|
||||
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
|
||||
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
|
||||
OPT_DEFS =
|
||||
|
||||
# Options to pass to dfu-util when flashing
|
||||
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
|
||||
DFU_SUFFIX_ARGS = -p DF11 -v 0483
|
||||
|
||||
|
||||
BACKLIGHT_ENABLE = no
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
|
||||
@@ -26,4 +26,4 @@
|
||||
#define DRIVER_COUNT 2
|
||||
#define DRIVER_1_LED_TOTAL 35
|
||||
#define DRIVER_2_LED_TOTAL 33
|
||||
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
|
||||
|
||||
@@ -73,42 +73,82 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{1, C9_16, C7_15, C6_15}, // LD16
|
||||
{1, C8_16, C7_16, C6_16}, // LD17
|
||||
};
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
{{1|(7<<4)}, {16*7, 16}, 4},
|
||||
{{1|(6<<4)}, {16*6, 16}, 4},
|
||||
{{1|(5<<4)}, {16*5, 16}, 4},
|
||||
{{1|(4<<4)}, {16*4, 16}, 4},
|
||||
{{1|(3<<4)}, {16*3, 16}, 4},
|
||||
{{1|(2<<4)}, {16*2, 16}, 4},
|
||||
{{1|(1<<4)}, {16*1, 16}, 4},
|
||||
{{1|(0<<4)}, {16*0, 16}, 1},
|
||||
{{2|(0<<4)}, {16*0, 32}, 1},
|
||||
{{0|(8<<4)}, {16*8, 0}, 1},
|
||||
{{0|(7<<4)}, {16*7, 0}, 1},
|
||||
{{0|(6<<4)}, {16*6, 0}, 1},
|
||||
{{0|(5<<4)}, {16*5, 0}, 1},
|
||||
{{0|(4<<4)}, {16*4, 0}, 1},
|
||||
{{0|(3<<4)}, {16*3, 0}, 1},
|
||||
{{0|(2<<4)}, {16*2, 0}, 1},
|
||||
{{0|(1<<4)}, {16*1, 0}, 1},
|
||||
{{0|(0<<4)}, {16*0, 0}, 1},
|
||||
{{0|(9<<4)}, {16*9, 0}, 1},
|
||||
{{0|(10<<4)}, {16*10, 0}, 1},
|
||||
{{0|(11<<4)}, {16*11, 0}, 1},
|
||||
{{0|(12<<4)}, {16*12, 0}, 1},
|
||||
{{0|(13<<4)}, {16*13, 0}, 1},
|
||||
{{0|(14<<4)}, {16*14, 0}, 1},
|
||||
{{1|(14<<4)}, {16*14, 16}, 1},
|
||||
{{2|(14<<4)}, {16*14, 32}, 1},
|
||||
{{1|(8<<4)}, {16*8, 16}, 4},
|
||||
{{1|(9<<4)}, {16*9, 16}, 4},
|
||||
{{1|(10<<4)}, {16*10, 16}, 4},
|
||||
{{1|(11<<4)}, {16*11, 16}, 4},
|
||||
{{1|(12<<4)}, {16*12, 16}, 4},
|
||||
{{1|(13<<4)}, {16*13, 16}, 4},
|
||||
{{3|(14<<4)}, {16*14, 48}, 1},
|
||||
{{4|(14<<4)}, {16*14, 64}, 1},
|
||||
{{4|(13<<4)}, {16*13, 64}, 1},
|
||||
{{4|(5<<4)}, {16*5, 64}, 1},
|
||||
{{3|(5<<4)}, {16*5, 48}, 4},
|
||||
{{3|(4<<4)}, {16*4, 48}, 4},
|
||||
{{3|(3<<4)}, {16*3, 48}, 4},
|
||||
{{3|(2<<4)}, {16*2, 48}, 4},
|
||||
{{3|(1<<4)}, {16*1, 48}, 4},
|
||||
{{4|(2<<4)}, {16*2, 64}, 1},
|
||||
{{4|(1<<4)}, {16*1, 64}, 1},
|
||||
{{2|(6<<4)}, {16*6, 32}, 4},
|
||||
{{2|(5<<4)}, {16*5, 32}, 4},
|
||||
{{2|(4<<4)}, {16*4, 32}, 4},
|
||||
{{2|(3<<4)}, {16*3, 32}, 4},
|
||||
{{2|(2<<4)}, {16*2, 32}, 4},
|
||||
{{2|(1<<4)}, {16*1, 32}, 4},
|
||||
{{3|(0<<4)}, {16*0, 48}, 1},
|
||||
{{4|(0<<4)}, {16*0, 64}, 1},
|
||||
{{2|(7<<4)}, {16*7, 32}, 4},
|
||||
{{2|(8<<4)}, {16*8, 32}, 4},
|
||||
{{2|(9<<4)}, {16*9, 32}, 4},
|
||||
{{2|(10<<4)}, {16*10, 32}, 4},
|
||||
{{2|(11<<4)}, {16*11, 32}, 4},
|
||||
{{2|(13<<4)}, {16*13, 32}, 4},
|
||||
{{3|(10<<4)}, {16*10, 48}, 4},
|
||||
{{3|(11<<4)}, {16*11, 48}, 4},
|
||||
{{3|(13<<4)}, {16*13, 48}, 4},
|
||||
{{3|(6<<4)}, {16*6, 48}, 4},
|
||||
{{3|(7<<4)}, {16*7, 48}, 4},
|
||||
{{3|(8<<4)}, {16*8, 48}, 4},
|
||||
{{3|(9<<4)}, {16*9, 48}, 4},
|
||||
{{4|(8<<4)}, {16*8, 64}, 1},
|
||||
{{4|(9<<4)}, {16*9, 64}, 1},
|
||||
{{4|(10<<4)}, {16*10, 64}, 1},
|
||||
{{4|(11<<4)}, {16*11, 64}, 1},
|
||||
};
|
||||
|
||||
led_config_t g_led_config = { {
|
||||
{ 17, 16, 15, 14, 13, 12, 11, 10, 9, 18, 19, 20, 21, 22, 23 },
|
||||
{ 7, 6, 5, 4, 3, 2, 1, 0, 26, 27, 28, 29, 30, 31, 24 },
|
||||
{ 8, 48, 47, 46, 45, 44, 43, 51, 52, 53, 54, 55, NO_LED, 56, 25 },
|
||||
{ 49, 40, 39, 38, 37, 36, 60, 61, 62, 63, 57, 58, NO_LED, 59, 32 },
|
||||
{ 50, 42, 41, NO_LED, NO_LED, 35, NO_LED, NO_LED, 64, 65, 66, 67, NO_LED, 34, 33 }
|
||||
}, {
|
||||
{ 112, 16 }, { 96, 16 }, { 80, 16 }, { 64, 16 }, { 48, 16 }, { 32, 16 }, { 16, 16 }, { 0, 16 }, { 0, 32 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 },
|
||||
{ 32, 0 }, { 16, 0 }, { 0, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 208, 0 }, { 224, 0 }, { 224, 16 }, { 224, 32 }, { 128, 16 }, { 144, 16 }, { 160, 16 }, { 176, 16 },
|
||||
{ 192, 16 }, { 208, 16 }, { 224, 48 }, { 224, 64 }, { 208, 64 }, { 80, 64 }, { 80, 48 }, { 64, 48 }, { 48, 48 }, { 32, 48 }, { 16, 48 }, { 32, 64 }, { 16, 64 }, { 96, 32 }, { 80, 32 },
|
||||
{ 64, 32 }, { 48, 32 }, { 32, 32 }, { 16, 32 }, { 0, 48 }, { 0, 64 }, { 112, 32 }, { 128, 32 }, { 144, 32 }, { 160, 32 }, { 176, 32 }, { 208, 32 }, { 160, 48 }, { 176, 48 }, { 208, 48 },
|
||||
{ 96, 48 }, { 112, 48 }, { 128, 48 }, { 144, 48 }, { 128, 64 }, { 144, 64 }, { 160, 64 }, { 176, 64 }
|
||||
}, {
|
||||
4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4,
|
||||
4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 4, 1, 1, 4, 4,
|
||||
4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 1, 1, 1, 1
|
||||
} };
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
void suspend_power_down_kb(void)
|
||||
{
|
||||
rgb_matrix_set_suspend_state(true);
|
||||
suspend_power_down_user();
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_kb(void)
|
||||
{
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
extern bool g_suspend_state;
|
||||
#define _LAYER0 0
|
||||
#define _LAYER1 1
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
MCU = STM32F303
|
||||
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
|
||||
DFU_SUFFIX_ARGS = -p DF11 -v 0483
|
||||
BACKLIGHT_ENABLE = no
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
|
||||
@@ -107,7 +107,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define DRIVER_COUNT 2
|
||||
#define DRIVER_1_LED_TOTAL 24
|
||||
#define DRIVER_2_LED_TOTAL 24
|
||||
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
|
||||
|
||||
// #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF
|
||||
/* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */
|
||||
|
||||
@@ -269,39 +269,68 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
};
|
||||
|
||||
|
||||
led_config_t g_led_config = { {
|
||||
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
|
||||
{ 28, 33, 38, 43, 47, NO_LED },
|
||||
{ 27, 32, 37, 42, 46, NO_LED },
|
||||
{ 26, 31, 36, 41, 45, NO_LED },
|
||||
{ 25, 30, 35, 40, 44, NO_LED },
|
||||
{ 24, 29, 34, 39, NO_LED, NO_LED },
|
||||
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
|
||||
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
|
||||
{ 0, 5, 10, 15, NO_LED, NO_LED },
|
||||
{ 1, 6, 11, 16, 20, NO_LED },
|
||||
{ 2, 7, 12, 17, 21, NO_LED },
|
||||
{ 3, 8, 13, 18, 22, NO_LED },
|
||||
{ 4, 9, 14, 19, 23, NO_LED },
|
||||
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }
|
||||
}, {
|
||||
{ 137, 0 }, { 154, 0 }, { 172, 0 }, { 189, 0 }, { 206, 0 }, { 137, 12 },
|
||||
{ 154, 12 }, { 172, 12 }, { 189, 12 }, { 206, 12 }, { 137, 25 }, { 154, 25 },
|
||||
{ 172, 25 }, { 189, 25 }, { 206, 25 }, { 137, 38 }, { 154, 38 }, { 172, 38 },
|
||||
{ 189, 38 }, { 206, 38 }, { 154, 51 }, { 172, 51 }, { 189, 51 }, { 206, 51 },
|
||||
{ 86, 0 }, { 68, 0 }, { 51, 0 }, { 34, 0 }, { 17, 0 }, { 86, 12 },
|
||||
{ 68, 12 }, { 51, 12 }, { 34, 12 }, { 17, 12 }, { 86, 25 }, { 68, 25 },
|
||||
{ 51, 25 }, { 34, 25 }, { 17, 25 }, { 86, 38 }, { 68, 38 }, { 51, 38 },
|
||||
{ 34, 38 }, { 17, 38 }, { 68, 51 }, { 51, 51 }, { 34, 51 }, { 17, 51 }
|
||||
}, {
|
||||
4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4,
|
||||
4, 4, 1, 1, 1, 1,
|
||||
4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4,
|
||||
4, 4, 1, 1, 1, 1
|
||||
} };
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
|
||||
/*{row | col << 4}
|
||||
| {x=0..224, y=0..64}
|
||||
| | flags
|
||||
| | | */
|
||||
{{ 8|(0<<4)}, {17.2* 8, 12.8*0}, 4}, // LED 1 on right > Key 6
|
||||
{{ 9|(0<<4)}, {17.2* 9, 12.8*0}, 4}, // LED 2 > Key 7
|
||||
{{10|(0<<4)}, {17.2*10, 12.8*0}, 4}, // LED 3 > Key 8
|
||||
{{11|(0<<4)}, {17.2*11, 12.8*0}, 4}, // LED 4 > Key 9
|
||||
{{12|(0<<4)}, {17.2*12, 12.8*0}, 4}, // LED 5 > Key 0
|
||||
|
||||
{{ 8|(1<<4)}, {17.2* 8, 12.8*1}, 4}, // LED 6
|
||||
{{ 9|(1<<4)}, {17.2* 9, 12.8*1}, 4}, // LED 7
|
||||
{{10|(1<<4)}, {17.2*10, 12.8*1}, 4}, // LED 8
|
||||
{{11|(1<<4)}, {17.2*11, 12.8*1}, 4}, // LED 9
|
||||
{{12|(1<<4)}, {17.2*12, 12.8*1}, 4}, // LED 10
|
||||
|
||||
{{ 8|(2<<4)}, {17.2* 8, 12.8*2}, 4}, // LED 11
|
||||
{{ 9|(2<<4)}, {17.2* 9, 12.8*2}, 4}, // LED 12
|
||||
{{10|(2<<4)}, {17.2*10, 12.8*2}, 4}, // LED 13
|
||||
{{11|(2<<4)}, {17.2*11, 12.8*2}, 4}, // LED 14
|
||||
{{12|(2<<4)}, {17.2*12, 12.8*2}, 4}, // LED 15
|
||||
|
||||
{{ 8|(3<<4)}, {17.2* 8, 12.8*3}, 4}, // LED 16
|
||||
{{ 9|(3<<4)}, {17.2* 9, 12.8*3}, 4}, // LED 17
|
||||
{{10|(3<<4)}, {17.2*10, 12.8*3}, 4}, // LED 18
|
||||
{{11|(3<<4)}, {17.2*11, 12.8*3}, 4}, // LED 19
|
||||
{{12|(3<<4)}, {17.2*12, 12.8*3}, 4}, // LED 20
|
||||
|
||||
{{ 9|(4<<4)}, {17.2* 9, 12.8*4}, 1}, // LED 21
|
||||
{{10|(4<<4)}, {17.2*10, 12.8*4}, 1}, // LED 22
|
||||
{{11|(4<<4)}, {17.2*11, 12.8*4}, 1}, // LED 23
|
||||
{{12|(4<<4)}, {17.2*12, 12.8*4}, 1}, // LED 24
|
||||
|
||||
{{ 5|(0<<4)}, {17.2* 5, 12.8*0}, 4}, // LED 1 on left > Key 5
|
||||
{{ 4|(0<<4)}, {17.2* 4, 12.8*0}, 4}, // LED 2 > Key 4
|
||||
{{ 3|(0<<4)}, {17.2* 3, 12.8*0}, 4}, // LED 3 > Key 3
|
||||
{{ 2|(0<<4)}, {17.2* 2, 12.8*0}, 4}, // LED 4 > Key 2
|
||||
{{ 1|(0<<4)}, {17.2* 1, 12.8*0}, 4}, // LED 5 > Key 1
|
||||
|
||||
{{ 5|(1<<4)}, {17.2* 5, 12.8*1}, 4}, // LED 6
|
||||
{{ 4|(1<<4)}, {17.2* 4, 12.8*1}, 4}, // LED 7
|
||||
{{ 3|(1<<4)}, {17.2* 3, 12.8*1}, 4}, // LED 8
|
||||
{{ 2|(1<<4)}, {17.2* 2, 12.8*1}, 4}, // LED 9
|
||||
{{ 1|(1<<4)}, {17.2* 1, 12.8*1}, 4}, // LED 10
|
||||
|
||||
{{ 5|(2<<4)}, {17.2* 5, 12.8*2}, 4}, // LED 11
|
||||
{{ 4|(2<<4)}, {17.2* 4, 12.8*2}, 4}, // LED 12
|
||||
{{ 3|(2<<4)}, {17.2* 3, 12.8*2}, 4}, // LED 13
|
||||
{{ 2|(2<<4)}, {17.2* 2, 12.8*2}, 4}, // LED 14
|
||||
{{ 1|(2<<4)}, {17.2* 1, 12.8*2}, 4}, // LED 15
|
||||
|
||||
{{ 5|(3<<4)}, {17.2* 5, 12.8*3}, 4}, // LED 16
|
||||
{{ 4|(3<<4)}, {17.2* 4, 12.8*3}, 4}, // LED 17
|
||||
{{ 3|(3<<4)}, {17.2* 3, 12.8*3}, 4}, // LED 18
|
||||
{{ 2|(3<<4)}, {17.2* 2, 12.8*3}, 4}, // LED 19
|
||||
{{ 1|(3<<4)}, {17.2* 1, 12.8*3}, 4}, // LED 20
|
||||
|
||||
{{ 4|(4<<4)}, {17.2* 4, 12.8*4}, 1}, // LED 21
|
||||
{{ 3|(4<<4)}, {17.2* 3, 12.8*4}, 1}, // LED 22
|
||||
{{ 2|(4<<4)}, {17.2* 2, 12.8*4}, 1}, // LED 23
|
||||
{{ 1|(4<<4)}, {17.2* 1, 12.8*4}, 1}, // LED 24 > Key Hack
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "rs.h"
|
||||
|
||||
enum layers {
|
||||
_QWERTY,
|
||||
_HYPER,
|
||||
_SIGN
|
||||
};
|
||||
|
||||
|
||||
#define KC_ KC_TRNS
|
||||
|
||||
#define KC_ESCC MT(MOD_LCTL, KC_ESC)
|
||||
#define KC_ENTS MT(MOD_LSFT, KC_ENT)
|
||||
#define KC_HYPE MO(_HYPER)
|
||||
#define KC_SIGN MO(_SIGN)
|
||||
#define KC_RST RESET
|
||||
// Brightness
|
||||
#define KC_BRUP KC_PAUS
|
||||
#define KC_BRDN KC_SLCK
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = LAYOUT_kc(
|
||||
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||
TAB , Q , W , E , R , T , GRV, BSLS, Y , U , I , O , P ,EQL ,
|
||||
@@ -10,29 +28,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
LSFT, Z , X , C , V , B , SPC, BSPC, N , M ,COMM,DOT ,SLSH,ENTS,
|
||||
//|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
|
||||
FN , ,LCTL,LALT,LGUI, SPC, BSPC, CODE,LEFT, UP ,DOWN,RIGHT
|
||||
SIGN, ,LCTL,LALT,LGUI, SPC, BSPC, HYPE,LEFT, UP ,DOWN,RIGHT
|
||||
//`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
|
||||
),
|
||||
[_CODE] = LAYOUT_kc(
|
||||
|
||||
|
||||
[_HYPER] = LAYOUT_kc(
|
||||
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||
GRV ,EXLM, AT ,HASH, DLR,PERC, , ,CIRC,LPLT,ASTR,RPGT,NEQL, ,
|
||||
GRV , 1 , 2 , 3 , 4 , 5 , , , 6 , 7 , 8 , 9 , 0 , ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, 1 , 2 , 3 , 4 , 5 , , ,MINS,LBRC, UP ,RBRC, ,BSLS,
|
||||
, , ,PGUP, , , , , , , UP ,LBRC,RBRC,BSLS,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, 6 , 7 , 8 , 9 , 0 , DOT, ,AMPR,LEFT,DOWN,RGHT, ,PIPE,
|
||||
, ,HOME,PGDN,END , , , VOLU, ,LEFT,DOWN,RGHT, ,PIPE,
|
||||
//|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
|
||||
, , , , , , , , , , ,
|
||||
, , , , , , VOLD, ,MUTE, , ,
|
||||
//`----+----+----+----+----/----/ \----\----+----+----+----+----'
|
||||
),
|
||||
[_FN] = LAYOUT_kc(
|
||||
|
||||
[_SIGN] = LAYOUT_kc(
|
||||
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||
, F1 , F2 , F3 , F4 , F5 , , , F6 , F7 , F8 , F9 , F10,F11 ,
|
||||
TILD,EXLM, AT ,HASH,DLR ,PERC, , ,CIRC,AMPR,ASTR,LBRC,RBRC, ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , , , , ,BRMU, , , ,PGUP, , , ,
|
||||
RST , F1 , F2 , F3 , F4 , F5 , F6 , , , , ,LCBR,RCBR,PIPE,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , , , , RST,BRMD, VOLU, ,CTRA,PGDN,CTRE, , ,
|
||||
, 1 , 2 , 3 , 4 , 5 , , BRUP, 6 , 7 , 8 , 9 , 0 , ,
|
||||
//|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
|
||||
, , , , , , VOLD,MUTE, , , ,
|
||||
, , , , , , BRDN, , , , ,
|
||||
//`----+----+----+----+----/----/ \----\----+----+----+----+----'
|
||||
),
|
||||
};
|
||||
@@ -1 +1,13 @@
|
||||
See [rs readme](../../../../users/rs/readme.md).
|
||||
# Code friendly 60% keymap
|
||||
|
||||
I developped this keymap to make a better use of 60% ortho keyboards I use like the preonic of the iris. Instead of trying to mimic the Planck layout like the default preonic keymap, this keymap removes the raise and lower layers and offers a simpler hyper layer concept for a few missing sign keys and cursors / media keys.
|
||||
|
||||
The important part for coders is that most important signs needed to code are available at their usual position on a full keyboard, without complex layer gymnastic. Access to [] and {} are available on the hyper layer at their usual emplacement.
|
||||
|
||||
The right thumb is used for both backspace and hyper layer switching. On the hyper layer, in addition to some coding signs, you get the cursor keys arranged in cross, just under your right fingers, so you don't have to move your hand when navigating in code or command line. Other hand gets the home/end page up/down in a similar layout.
|
||||
|
||||
Because you sometime have to use your internal keyboard when you use a macbook, a karabiner configuration is also provided to get most of the features of this keyboard, including the hyper layer / backspace on right command key etc.
|
||||
|
||||
This keymap is also available for other keyboards:
|
||||
- [ortho_5x12/rs](../../../../layouts/community/ortho_5x12/rs/keymap.c)
|
||||
- [Iris/rs](../../../iris/keymaps/rs/keymap.c)
|
||||
|
||||
@@ -114,79 +114,91 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, E_16, D_16, F_16},
|
||||
{0, B_16, A_16, C_16},
|
||||
};
|
||||
|
||||
led_config_t g_led_config = { {
|
||||
{ 0, 1, 4, 5, 12, 13, 36, 20, 21, 24, 25, 16, 17, 28 },
|
||||
{ 2, 6, 7, 14, 15, 37, 38, 22, 23, 26, 27, 18, 19, 30 },
|
||||
{ 3, 8, 9, 32, 33, 39, 40, 44, 45, 48, 49, 52, 31, NO_LED },
|
||||
{ 59, 10, 11, 34, 35, 41, 42, 46, 47, 50, 53, 54, 56, NO_LED },
|
||||
{ 60, 61, 62, NO_LED, NO_LED, 43, 51, 55, 58, 57, NO_LED, NO_LED, NO_LED, NO_LED }
|
||||
}, {
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
/* {row | col << 4}
|
||||
* | {x=0..224, y=0..64}
|
||||
* | | flags
|
||||
* | | | */
|
||||
//cs1
|
||||
{ 0, 0 }, { 17, 0 }, { 0, 16 }, { 0, 32 },
|
||||
//cs2
|
||||
{ 34, 0 }, { 51, 0 }, { 17, 16 }, { 34, 16 },
|
||||
//cs3
|
||||
{ 17, 32 }, { 34, 32 }, { 17, 48 }, { 34, 48 },
|
||||
//cs4
|
||||
{ 68, 0 }, { 85, 0 }, { 51, 16 }, { 68, 16 },
|
||||
//cs5
|
||||
{ 187, 0 }, { 204, 0 }, { 187, 16 }, { 204, 16 },
|
||||
//cs6
|
||||
{ 119, 0 }, { 136, 0 }, { 119, 16 }, { 136, 16 },
|
||||
//cs7
|
||||
{ 153, 0 }, { 170, 0 }, { 153, 16 }, { 170, 16 },
|
||||
//cs8
|
||||
{ 221, 0 }, { 221, 0 }, { 221, 32 }, { 221, 16 },
|
||||
//cs9
|
||||
{ 51, 32 }, { 68, 32 }, { 51, 48 }, { 68, 48 },
|
||||
//cs10
|
||||
{ 102, 0 }, { 85, 16 }, { 102, 16 }, { 85, 32 },
|
||||
//cs11
|
||||
{ 102, 32 }, { 85, 48 }, { 102, 48 }, { 102, 64 },
|
||||
//cs12
|
||||
{ 119, 32 }, { 136, 32 }, { 119, 48 }, { 136, 48 },
|
||||
//cs13
|
||||
{ 153, 32 }, { 170, 32 }, { 153, 48 }, { 136, 48 },
|
||||
//cs14
|
||||
{ 187, 32 }, { 170, 48 }, { 187, 48 }, { 153, 48 },
|
||||
//cs15
|
||||
{ 221, 48 }, { 221, 64 }, { 204, 64 },
|
||||
//cs16
|
||||
{ 0, 48 }, { 0, 64 }, { 17, 64 }, { 34, 64 }
|
||||
}, {
|
||||
//cs1
|
||||
1, 4, 1, 1,
|
||||
//cs2
|
||||
4, 4, 4, 4,
|
||||
//cs3
|
||||
4, 4, 4, 4,
|
||||
//cs4
|
||||
4, 4, 4, 4,
|
||||
//cs5
|
||||
4, 4, 4, 4,
|
||||
//cs6
|
||||
4, 4, 4, 4,
|
||||
//cs7
|
||||
4, 4, 4, 4,
|
||||
//cs8
|
||||
4, 4, 1, 1,
|
||||
//cs9
|
||||
4, 4, 4, 4,
|
||||
//cs10
|
||||
4, 4, 4, 4,
|
||||
//cs11
|
||||
4, 4, 4, 4,
|
||||
//cs12
|
||||
4, 4, 4, 4,
|
||||
//cs13
|
||||
4, 4, 4, 1,
|
||||
//cs14
|
||||
4, 4, 1, 1,
|
||||
//cs15
|
||||
1, 1, 1,
|
||||
//cs16
|
||||
1, 1, 1, 1
|
||||
} };
|
||||
{{0|(0<<4)}, { 0, 0}, 1},
|
||||
{{0|(1<<4)}, { 17, 0}, 4},
|
||||
{{1|(0<<4)}, { 0, 16}, 1},
|
||||
{{2|(0<<4)}, { 0, 32}, 1},
|
||||
|
||||
//cs2
|
||||
{{0|(2<<4)}, { 34, 0}, 4},
|
||||
{{0|(3<<4)}, { 51, 0}, 4},
|
||||
{{1|(1<<4)}, { 17, 16}, 4},
|
||||
{{1|(2<<4)}, { 34, 16}, 4},
|
||||
//cs3
|
||||
{{2|(1<<4)}, { 17, 32}, 4},
|
||||
{{2|(2<<4)}, { 34, 32}, 4},
|
||||
{{3|(1<<4)}, { 17, 48}, 4},
|
||||
{{3|(2<<4)}, { 34, 48}, 4},
|
||||
//cs4
|
||||
{{0|(4<<4)}, { 68, 0}, 4},
|
||||
{{0|(5<<4)}, { 85, 0}, 4},
|
||||
{{1|(3<<4)}, { 51, 16}, 4},
|
||||
{{1|(4<<4)}, { 68, 16}, 4},
|
||||
//cs5
|
||||
{{0|(11<<4)}, {187, 0}, 4},
|
||||
{{0|(12<<4)}, {204, 0}, 4},
|
||||
{{1|(11<<4)}, {187, 16}, 4},
|
||||
{{1|(12<<4)}, {204, 16}, 4},
|
||||
//cs6
|
||||
{{0|(7<<4)}, {119, 0}, 4},
|
||||
{{0|(8<<4)}, {136, 0}, 4},
|
||||
{{1|(7<<4)}, {119, 16}, 4},
|
||||
{{1|(8<<4)}, {136, 16}, 4},
|
||||
//cs7
|
||||
{{0|(9<<4)}, {153, 0}, 4},
|
||||
{{0|(10<<4)}, {170, 0}, 4},
|
||||
{{1|(9<<4)}, {153, 16}, 4},
|
||||
{{1|(10<<4)}, {170, 16}, 4},
|
||||
//cs8
|
||||
{{0|(13<<4)}, {221, 0}, 4},
|
||||
{{0|(14<<4)}, {221, 0}, 4},
|
||||
{{1|(13<<4)}, {221, 32}, 1},
|
||||
{{2|(12<<4)}, {221, 16}, 1},
|
||||
//cs9
|
||||
{{2|(3<<4)}, { 51, 32}, 4},
|
||||
{{2|(4<<4)}, { 68, 32}, 4},
|
||||
{{3|(3<<4)}, { 51, 48}, 4},
|
||||
{{3|(4<<4)}, { 68, 48}, 4},
|
||||
//cs10
|
||||
{{0|(6<<4)}, {102, 0}, 4},
|
||||
{{1|(5<<4)}, { 85, 16}, 4},
|
||||
{{1|(6<<4)}, {102, 16}, 4},
|
||||
{{2|(5<<4)}, { 85, 32}, 4},
|
||||
//cs11
|
||||
{{2|(6<<4)}, {102, 32}, 4},
|
||||
{{3|(5<<4)}, { 85, 48}, 4},
|
||||
{{3|(6<<4)}, {102, 48}, 4},
|
||||
{{4|(5<<4)}, {102, 64}, 4},
|
||||
//cs12
|
||||
{{2|(7<<4)}, {119, 32}, 4},
|
||||
{{2|(8<<4)}, {136, 32}, 4},
|
||||
{{3|(7<<4)}, {119, 48}, 4},
|
||||
{{3|(8<<4)}, {136, 48}, 4},
|
||||
//cs13
|
||||
{{2|(9<<4)}, {153, 32}, 4},
|
||||
{{2|(10<<4)}, {170, 32}, 4},
|
||||
{{3|(9<<4)}, {153, 48}, 4},
|
||||
{{4|(6<<4)}, {136, 48}, 1},
|
||||
//cs14
|
||||
{{2|(11<<4)}, {187, 32}, 4},
|
||||
{{3|(10<<4)}, {170, 48}, 4},
|
||||
{{3|(11<<4)}, {187, 48}, 1},
|
||||
{{4|(7<<4)}, {153, 48}, 1},
|
||||
//cs15
|
||||
{{3|(12<<4)}, {221, 48}, 1},
|
||||
|
||||
{{4|(9<<4)}, {221, 64}, 1},
|
||||
{{4|(8<<4)}, {204, 64}, 1},
|
||||
//cs16
|
||||
{{3|(0<<4)}, { 0, 48}, 1},
|
||||
{{4|(0<<4)}, { 0, 64}, 1},
|
||||
{{4|(1<<4)}, { 17, 64}, 1},
|
||||
{{4|(2<<4)}, { 34, 64}, 1},
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -9,17 +9,23 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "drashna.h"
|
||||
|
||||
// Blank template at the bottom
|
||||
|
||||
enum customKeycodes {
|
||||
URL = 1
|
||||
};
|
||||
|
||||
#define LAYOUT_gergo_wrapper(...) LAYOUT_gergo(__VA_ARGS__)
|
||||
#define LAYOUT_gergo_base( \
|
||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||
) \
|
||||
LAYOUT_gergo_wrapper( \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_PIPE, \
|
||||
KC_TAB, K11, K12, K13, K14, K15, _______, _______, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, _______, _______, _______, _______, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
|
||||
KC_GRV, KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT, _______ \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_PIPE, \
|
||||
KC_TAB, ALT_T(K11), K12, K13, K14, K15, _______, _______, K16, K17, K18, K19, K1A, RGUI_T(KC_QUOT), \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, _______, _______, _______, _______, K26, K27, K28, K29, CTL_T(K2A), OS_RSFT, \
|
||||
_______, _______, KC_SPC, LT(_LOWER, KC_BSPC), LT(_RAISE, KC_DEL), KC_ENT, _______, _______ \
|
||||
)
|
||||
|
||||
#define LAYOUT_gergo_base_wrapper(...) LAYOUT_gergo_base(__VA_ARGS__)
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
CONSOLE_ENABLE = no
|
||||
COMMAND_ENABLE = no
|
||||
|
||||
@@ -19,19 +19,24 @@
|
||||
#include "haptic.h"
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
#include "rgb_matrix.h"
|
||||
#include "rgblight.h"
|
||||
|
||||
led_config_t g_led_config = { {
|
||||
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
|
||||
{ NO_LED, 6, NO_LED, NO_LED, 7, NO_LED, NO_LED, 8, NO_LED, NO_LED, 9, NO_LED, NO_LED, 0, NO_LED },
|
||||
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
|
||||
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
|
||||
{ NO_LED, 5, NO_LED, NO_LED, 4, NO_LED, NO_LED, 3, NO_LED, NO_LED, 2, NO_LED, NO_LED, 1, NO_LED }
|
||||
}, {
|
||||
{ 195, 3 }, { 195, 16 }, { 150, 16 }, { 105, 16 }, { 60, 16 }, { 15, 16 }, { 15, 3 }, { 60, 3 }, { 105, 3 }, { 150, 3 }
|
||||
}, {
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4
|
||||
} };
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
/*{row | col << 4}
|
||||
| {x=0..224, y=0..64}
|
||||
| | modifier
|
||||
| | | */
|
||||
{{1|(13<<4)}, {195, 3}, 4},
|
||||
{{4|(13<<4)}, {195, 16}, 4},
|
||||
{{4|(10<<4)}, {150, 16}, 4},
|
||||
{{4|(7<<4)}, {105, 16}, 4},
|
||||
{{4|(4<<4)}, {60, 16}, 4},
|
||||
{{4|(1<<4)}, {15, 16}, 4},
|
||||
{{1|(1<<4)}, {15, 3}, 4},
|
||||
{{1|(4<<4)}, {60, 3}, 4},
|
||||
{{1|(7<<4)}, {105, 3}, 4},
|
||||
{{1|(10<<4)}, {150, 3}, 4}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -48,12 +53,12 @@ uint16_t counterst = 0;
|
||||
#define ScreenOffInterval 60000 /* milliseconds */
|
||||
static uint16_t last_flush;
|
||||
|
||||
volatile uint8_t led_numlock = false;
|
||||
volatile uint8_t led_capslock = false;
|
||||
volatile uint8_t led_numlock = false;
|
||||
volatile uint8_t led_capslock = false;
|
||||
volatile uint8_t led_scrolllock = false;
|
||||
|
||||
static uint8_t layer;
|
||||
static bool queue_for_send = false;
|
||||
static bool queue_for_send = false;
|
||||
static uint8_t encoder_value = 32;
|
||||
|
||||
__attribute__ ((weak))
|
||||
@@ -64,7 +69,7 @@ void draw_ui(void) {
|
||||
|
||||
/* Layer indicator is 41 x 10 pixels */
|
||||
#define LAYER_INDICATOR_X 5
|
||||
#define LAYER_INDICATOR_Y 0
|
||||
#define LAYER_INDICATOR_Y 0
|
||||
|
||||
draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0);
|
||||
draw_rect_filled_soft(LAYER_INDICATOR_X + 32, LAYER_INDICATOR_Y + 1, 9, 9, PIXEL_ON, NORM);
|
||||
@@ -78,7 +83,7 @@ void draw_ui(void) {
|
||||
for (uint8_t y = 0; y < MATRIX_COLS; y++) {
|
||||
draw_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2,(matrix_get_row(x) & (1 << y)) > 0, NORM);
|
||||
}
|
||||
}
|
||||
}
|
||||
draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 19, 9, PIXEL_ON, NORM);
|
||||
/* hadron oled location on thumbnail */
|
||||
draw_rect_filled_soft(MATRIX_DISPLAY_X + 14, MATRIX_DISPLAY_Y + 2, 3, 1, PIXEL_ON, NORM);
|
||||
@@ -157,7 +162,7 @@ void read_host_led_state(void) {
|
||||
if (led_capslock == false){
|
||||
led_capslock = true;}
|
||||
} else {
|
||||
if (led_capslock == true){
|
||||
if (led_capslock == true){
|
||||
led_capslock = false;}
|
||||
}
|
||||
if (leds & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
@@ -192,7 +197,7 @@ void matrix_init_kb(void) {
|
||||
queue_for_send = true;
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
if (queue_for_send) {
|
||||
#ifdef QWIIC_MICRO_OLED_ENABLE
|
||||
|
||||
@@ -134,4 +134,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define DRIVER_2_LED_TOTAL 32
|
||||
#endif
|
||||
|
||||
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
|
||||
|
||||
@@ -165,37 +165,83 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{1, C9_16, C7_15, C6_15} //D16
|
||||
};
|
||||
|
||||
led_config_t g_led_config = { {
|
||||
{ 36, 35, 34, 33, 32, 31, 30, 6, 5, 4, 3, 2, 1, 0 },
|
||||
{ 37, 38, 39, 40, 41, 42, 43, 7, 8, 9, 10, 11, 12, NO_LED },
|
||||
{ 48, 49, 50, 51, 52, 45, 44, 20, 21, 22, 23, 15, 14, 13 },
|
||||
{ 47, NO_LED, 46, 53, 54, 55, 56, 19, 18, 17, 16, 24, NO_LED, 25 },
|
||||
{ 60, 59, 58, 57, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 29, 28, 27, 26 }
|
||||
}, {
|
||||
//A1-A16
|
||||
{ 224, 0 }, { 204, 0 }, { 187, 0 }, { 170, 0 }, { 153, 0 }, { 136, 0 }, { 119, 0 }, { 119, 16 }, { 136, 16 }, { 153, 16 }, { 170, 16 }, { 187, 16 }, { 204, 16 }, { 224, 32 },
|
||||
{ 224, 16 }, { 197, 32 },
|
||||
//B1-B14
|
||||
{ 170, 48 }, { 153, 48 }, { 136, 48 }, { 119, 48 }, { 119, 32 }, { 136, 32 }, { 153, 32 }, { 170, 32 }, { 187, 48 }, { 214, 48 }, { 224, 64 }, { 204, 64 }, { 187, 64 }, { 170, 64 },
|
||||
//C1-C16
|
||||
{ 102, 0 }, { 85, 0 }, { 68, 0 }, { 51, 0 }, { 34, 0 }, { 17, 0 }, { 0, 0 }, { 0, 16 }, { 17, 16 }, { 34, 16 }, { 51, 16 }, { 68, 16 }, { 85, 16 }, { 102, 16 },
|
||||
{ 102, 32 }, { 85, 32 },
|
||||
//D1-D16
|
||||
{ 32, 48 }, { 10, 48 }, { 0, 32 }, { 17, 32 }, { 34, 32 }, { 51, 32 }, { 68, 32 }, { 51, 48 }, { 68, 48 }, { 85, 48 }, { 102, 48 }, { 102, 64 }, { 34, 68 }, { 17, 68 },
|
||||
{ 0, 68 }
|
||||
}, {
|
||||
//A1-A16
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
4, 4,
|
||||
//B1-B14
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1,
|
||||
//C1-C16
|
||||
4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4,
|
||||
4, 4,
|
||||
//D1-D16
|
||||
4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||
1
|
||||
} };
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
//
|
||||
// C7, C6, C5, C4, C3, C2, C1, A7, A6, A5, A4, A3, A2, A1,
|
||||
// C8, C9, C10, C11, C12, C13, C14, A8, A9, A10, A11, A12, A13, A15,
|
||||
// D4, D5, D6, D7, D8, C16, C15, B5, B6, B7, B8, A16, ---, A14,
|
||||
// D3, ---, D1, D9, D10, D11, D12, B4, B3, B2, B1, B9, ---, B10,
|
||||
// D16, D15, D14, ---, ---, ---, D13, ---, ---, ---, B14, B13, B12, B11
|
||||
/* {row | col << 4}
|
||||
* | {x=0..224, y=0..64}
|
||||
* | | flags
|
||||
* | | | */
|
||||
{{0|(13<<4)}, {224, 0}, 1}, //A1-A16
|
||||
{{0|(12<<4)}, {204, 0}, 4},
|
||||
{{0|(11<<4)}, {187, 0}, 4},
|
||||
{{0|(10<<4)}, {170, 0}, 4},
|
||||
{{0|(9<<4)}, {153, 0}, 4},
|
||||
{{0|(8<<4)}, {136, 0}, 4},
|
||||
{{0|(7<<4)}, {119, 0}, 4},
|
||||
{{1|(7<<4)}, {119, 16}, 4},
|
||||
{{1|(8<<4)}, {136, 16}, 4},
|
||||
{{1|(9<<4)}, {153, 16}, 4},
|
||||
{{1|(10<<4)}, {170, 16}, 4},
|
||||
{{1|(11<<4)}, {187, 16}, 4},
|
||||
{{1|(12<<4)}, {204, 16}, 4},
|
||||
{{2|(13<<4)}, {224, 32}, 1},
|
||||
{{2|(12<<4)}, {224, 16}, 4},
|
||||
{{2|(11<<4)}, {197, 32}, 4},
|
||||
|
||||
{{3|(10<<4)}, {170, 48}, 4}, //B1-B14
|
||||
{{3|(9<<4)}, {153, 48}, 4},
|
||||
{{3|(8<<4)}, {136, 48}, 4},
|
||||
{{3|(7<<4)}, {119, 48}, 4},
|
||||
{{2|(7<<4)}, {119, 32}, 4},
|
||||
{{2|(8<<4)}, {136, 32}, 4},
|
||||
{{2|(9<<4)}, {153, 32}, 4},
|
||||
{{2|(10<<4)}, {170, 32}, 4},
|
||||
{{3|(11<<4)}, {187, 48}, 4},
|
||||
{{3|(13<<4)}, {214, 48}, 1},
|
||||
{{4|(13<<4)}, {224, 64}, 1},
|
||||
{{4|(12<<4)}, {204, 64}, 1},
|
||||
{{4|(11<<4)}, {187, 64}, 1},
|
||||
{{4|(10<<4)}, {170, 64}, 1},
|
||||
|
||||
{{0|(6<<4)}, {102, 0}, 4}, //C1-C16
|
||||
{{0|(5<<4)}, { 85, 0}, 4},
|
||||
{{0|(4<<4)}, { 68, 0}, 4},
|
||||
{{0|(3<<4)}, { 51, 0}, 4},
|
||||
{{0|(2<<4)}, { 34, 0}, 4},
|
||||
{{0|(1<<4)}, { 17, 0}, 4},
|
||||
{{0|(0<<4)}, { 0, 0}, 1},
|
||||
{{1|(0<<4)}, { 0, 16}, 1},
|
||||
{{1|(1<<4)}, { 17, 16}, 4},
|
||||
{{1|(2<<4)}, { 34, 16}, 4},
|
||||
{{1|(3<<4)}, { 51, 16}, 4},
|
||||
{{1|(4<<4)}, { 68, 16}, 4},
|
||||
{{1|(5<<4)}, { 85, 16}, 4},
|
||||
{{1|(6<<4)}, {102, 16}, 4},
|
||||
{{2|(6<<4)}, {102, 32}, 4},
|
||||
{{2|(5<<4)}, { 85, 32}, 4},
|
||||
|
||||
{{3|(2<<4)}, { 32, 48}, 4}, //D1-D16
|
||||
//D2
|
||||
{{3|(0<<4)}, { 10, 48}, 1},
|
||||
{{2|(0<<4)}, { 0, 32}, 1},
|
||||
{{2|(1<<4)}, { 17, 32}, 4},
|
||||
{{2|(2<<4)}, { 34, 32}, 4},
|
||||
{{2|(3<<4)}, { 51, 32}, 4},
|
||||
{{2|(4<<4)}, { 68, 32}, 4},
|
||||
{{3|(3<<4)}, { 51, 48}, 4},
|
||||
{{3|(4<<4)}, { 68, 48}, 4},
|
||||
{{3|(5<<4)}, { 85, 48}, 4},
|
||||
{{3|(6<<4)}, {102, 48}, 4},
|
||||
{{4|(3<<4)}, {102, 64}, 4},
|
||||
{{4|(2<<4)}, { 34, 68}, 1},
|
||||
{{4|(1<<4)}, { 17, 68}, 1},
|
||||
{{4|(0<<4)}, { 0, 68}, 1}
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
@@ -273,37 +319,83 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{1, C9_16, C7_15, C6_15} //D16
|
||||
};
|
||||
|
||||
led_config_t g_led_config = { {
|
||||
{ 36, 35, 34, 33, 32, 31, 30, 6, 5, 4, 3, 2, 1, 0 },
|
||||
{ 37, 38, 39, 40, 41, 42, 43, 7, 8, 9, 10, 11, 12, NO_LED },
|
||||
{ 49, 50, 51, 52, 53, 45, 44, 20, 21, 22, 23, 15, 14, 13 },
|
||||
{ 48, 47, 46, 54, 55, 56, 57, 19, 18, 17, 16, 24, NO_LED, 25 },
|
||||
{ 61, 60, 59, 58, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 29, 28, 27, 26 }
|
||||
}, {
|
||||
//A1-A16
|
||||
{ 224, 0 }, { 204, 0 }, { 187, 0 }, { 170, 0 }, { 153, 0 }, { 136, 0 }, { 119, 0 }, { 119, 16 }, { 136, 16 }, { 153, 16 }, { 170, 16 }, { 187, 16 }, { 204, 16 }, { 224, 8 },
|
||||
{ 204, 32 }, { 187, 32 },
|
||||
//B1-B14
|
||||
{ 170, 48 }, { 153, 48 }, { 136, 48 }, { 119, 48 }, { 119, 32 }, { 136, 32 }, { 153, 32 }, { 170, 32 }, { 187, 48 }, { 214, 48 }, { 224, 64 }, { 204, 64 }, { 187, 64 }, { 170, 64 },
|
||||
//C1-C16
|
||||
{ 102, 0 }, { 85, 0 }, { 68, 0 }, { 51, 0 }, { 34, 0 }, { 17, 0 }, { 0, 0 }, { 0, 16 }, { 17, 16 }, { 34, 16 }, { 51, 16 }, { 68, 16 }, { 85, 16 }, { 102, 16 },
|
||||
{ 102, 32 }, { 85, 32 },
|
||||
//D1-D16
|
||||
{ 32, 48 }, { 17, 48 }, { 0, 48 }, { 0, 32 }, { 17, 32 }, { 34, 32 }, { 51, 32 }, { 68, 32 }, { 51, 48 }, { 68, 48 }, { 85, 48 }, { 102, 48 }, { 102, 64 }, { 34, 68 },
|
||||
{ 17, 68 }, { 0, 68 }
|
||||
}, {
|
||||
//A1-A16
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
4, 4,
|
||||
//B1-B14
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1,
|
||||
//C1-C16
|
||||
4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4,
|
||||
4, 4,
|
||||
//D1-D16
|
||||
4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 1
|
||||
} };
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
//
|
||||
// C7, C6, C5, C4, C3, C2, C1, A7, A6, A5, A4, A3, A2, A1,
|
||||
// C8, C9, C10, C11, C12, C13, C14, A8, A9, A10, A11, A12, A13, ---,
|
||||
// D4, D5, D6, D7, D8, C16, C15, B5, B6, B7, B8, A16, A15, A14,
|
||||
// D3, D2, D1, D9, D10, D11, D12, B4, B3, B2, B1, B9, ---, B10,
|
||||
// D16, D15, D14, ---, ---, ---, D13, ---, ---, ---, B14, B13, B12, B11
|
||||
/* {row | col << 4}
|
||||
* | {x=0..224, y=0..64}
|
||||
* | | flags
|
||||
* | | | */
|
||||
{{0|(13<<4)}, {224, 0}, 1}, //A1-A16
|
||||
{{0|(12<<4)}, {204, 0}, 4},
|
||||
{{0|(11<<4)}, {187, 0}, 4},
|
||||
{{0|(10<<4)}, {170, 0}, 4},
|
||||
{{0|(9<<4)}, {153, 0}, 4},
|
||||
{{0|(8<<4)}, {136, 0}, 4},
|
||||
{{0|(7<<4)}, {119, 0}, 4},
|
||||
{{1|(7<<4)}, {119, 16}, 4},
|
||||
{{1|(8<<4)}, {136, 16}, 4},
|
||||
{{1|(9<<4)}, {153, 16}, 4},
|
||||
{{1|(10<<4)}, {170, 16}, 4},
|
||||
{{1|(11<<4)}, {187, 16}, 4},
|
||||
{{1|(12<<4)}, {204, 16}, 4},
|
||||
{{2|(13<<4)}, {224, 8}, 1},
|
||||
{{2|(12<<4)}, {204, 32}, 4},
|
||||
{{2|(11<<4)}, {187, 32}, 4},
|
||||
|
||||
{{3|(10<<4)}, {170, 48}, 4}, //B1-B14
|
||||
{{3|(9<<4)}, {153, 48}, 4},
|
||||
{{3|(8<<4)}, {136, 48}, 4},
|
||||
{{3|(7<<4)}, {119, 48}, 4},
|
||||
{{2|(7<<4)}, {119, 32}, 4},
|
||||
{{2|(8<<4)}, {136, 32}, 4},
|
||||
{{2|(9<<4)}, {153, 32}, 4},
|
||||
{{2|(10<<4)}, {170, 32}, 4},
|
||||
{{3|(11<<4)}, {187, 48}, 4},
|
||||
{{3|(13<<4)}, {214, 48}, 1},
|
||||
{{4|(13<<4)}, {224, 64}, 1},
|
||||
{{4|(12<<4)}, {204, 64}, 1},
|
||||
{{4|(11<<4)}, {187, 64}, 1},
|
||||
{{4|(10<<4)}, {170, 64}, 1},
|
||||
|
||||
{{0|(6<<4)}, {102, 0}, 4}, //C1-C16
|
||||
{{0|(5<<4)}, { 85, 0}, 4},
|
||||
{{0|(4<<4)}, { 68, 0}, 4},
|
||||
{{0|(3<<4)}, { 51, 0}, 4},
|
||||
{{0|(2<<4)}, { 34, 0}, 4},
|
||||
{{0|(1<<4)}, { 17, 0}, 4},
|
||||
{{0|(0<<4)}, { 0, 0}, 1},
|
||||
{{1|(0<<4)}, { 0, 16}, 1},
|
||||
{{1|(1<<4)}, { 17, 16}, 4},
|
||||
{{1|(2<<4)}, { 34, 16}, 4},
|
||||
{{1|(3<<4)}, { 51, 16}, 4},
|
||||
{{1|(4<<4)}, { 68, 16}, 4},
|
||||
{{1|(5<<4)}, { 85, 16}, 4},
|
||||
{{1|(6<<4)}, {102, 16}, 4},
|
||||
{{2|(6<<4)}, {102, 32}, 4},
|
||||
{{2|(5<<4)}, { 85, 32}, 4},
|
||||
|
||||
{{3|(2<<4)}, { 32, 48}, 4}, //D1-D16
|
||||
{{3|(1<<4)}, { 17, 48}, 4},
|
||||
{{3|(0<<4)}, { 0, 48}, 1},
|
||||
{{2|(0<<4)}, { 0, 32}, 1},
|
||||
{{2|(1<<4)}, { 17, 32}, 4},
|
||||
{{2|(2<<4)}, { 34, 32}, 4},
|
||||
{{2|(3<<4)}, { 51, 32}, 4},
|
||||
{{2|(4<<4)}, { 68, 32}, 4},
|
||||
{{3|(3<<4)}, { 51, 48}, 4},
|
||||
{{3|(4<<4)}, { 68, 48}, 4},
|
||||
{{3|(5<<4)}, { 85, 48}, 4},
|
||||
{{3|(6<<4)}, {102, 48}, 4},
|
||||
{{4|(3<<4)}, {102, 64}, 4},
|
||||
{{4|(2<<4)}, { 34, 68}, 1},
|
||||
{{4|(1<<4)}, { 17, 68}, 1},
|
||||
{{4|(0<<4)}, { 0, 68}, 1}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -400,4 +492,4 @@ void suspend_power_down_kb(void)
|
||||
void suspend_wakeup_init_kb(void)
|
||||
{
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
}
|
||||
}
|
||||
@@ -16,26 +16,15 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
| Knob 1: Vol Dn/Up | | Knob 2: Page Dn/Up |
|
||||
| Press: Mute | Home | Press: Play/Pause |
|
||||
| Hold: Layer 2 | Up | RGB Mode |
|
||||
| Left | Down | Right |
|
||||
*/
|
||||
[0] = LAYOUT(
|
||||
KC_MUTE, KC_HOME, KC_MPLY,
|
||||
MO(1) , KC_UP , RGB_MOD,
|
||||
KC_LEFT, KC_DOWN, KC_RGHT
|
||||
KC_MUTE, KC_HOME, KC_MPLY, \
|
||||
MO(1), KC_UP, RGB_MOD, \
|
||||
KC_LEFT, KC_DOWN, KC_RGHT \
|
||||
),
|
||||
/*
|
||||
| RESET | N/A | Media Stop |
|
||||
| Held: Layer 2 | Home | RGB Mode |
|
||||
| Media Previous | End | Media Next |
|
||||
*/
|
||||
[1] = LAYOUT(
|
||||
RESET , BL_STEP, KC_STOP,
|
||||
_______, KC_HOME, RGB_MOD,
|
||||
KC_MPRV, KC_END , KC_MNXT
|
||||
RESET, BL_STEP, KC_STOP, \
|
||||
_______, KC_HOME, RGB_MOD, \
|
||||
KC_MPRV, KC_END, KC_MNXT \
|
||||
),
|
||||
};
|
||||
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Macro keys for some apps
|
||||
#define SLACKUP LALT(LSFT(KC_UP))
|
||||
#define SLACKDN LALT(LSFT(KC_DOWN))
|
||||
#define RELOAD LGUI(KC_R)
|
||||
|
||||
enum custom_keycodes {
|
||||
PAWFIVE = SAFE_RANGE
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(
|
||||
RESET , PAWFIVE, RELOAD ,
|
||||
SLACKUP, KC_UP , KC_PGUP,
|
||||
SLACKDN, KC_DOWN, KC_PGDN
|
||||
),
|
||||
};
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
// Call the post init code.
|
||||
rgblight_enable_noeeprom(); // enables Rgb, without saving settings
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); // sets mode to Slow breathing without saving
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case PAWFIVE:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("+:pawfive:\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
// Tab right
|
||||
tap_code16(LSFT(LGUI(KC_RBRC)));
|
||||
} else {
|
||||
// Tab left
|
||||
tap_code16(LSFT(LGUI(KC_LBRC)));
|
||||
}
|
||||
}
|
||||
else if (index == 1) {
|
||||
if (clockwise) {
|
||||
// History forward
|
||||
tap_code16(LGUI(KC_RBRC));
|
||||
} else {
|
||||
// History back
|
||||
tap_code16(LGUI(KC_LBRC));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,172 +0,0 @@
|
||||
/* Copyright 2019 Chuck Lauer Vose <vosechu@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// // Debugging
|
||||
// #include <print.h>
|
||||
|
||||
#define BASE TO(_BASE)
|
||||
#define PANIC TO(_PANIC)
|
||||
#define FLIGHT TO(_FLIGHT)
|
||||
#define RCS TO(_RCS)
|
||||
|
||||
enum my_layers {
|
||||
_BASE = 0,
|
||||
_PANIC,
|
||||
_FLIGHT,
|
||||
_RCS
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BASE] = LAYOUT(
|
||||
KC_MUTE, PANIC , XXXXXXX,
|
||||
FLIGHT , XXXXXXX, RCS ,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
[_PANIC] = LAYOUT(
|
||||
RESET , BASE , XXXXXXX,
|
||||
_______, XXXXXXX, _______,
|
||||
KC_F2 , KC_F5 , KC_F9
|
||||
),
|
||||
[_FLIGHT] = LAYOUT(
|
||||
XXXXXXX, _______, KC_M ,
|
||||
BASE , KC_W , _______,
|
||||
KC_A , KC_S , KC_D
|
||||
),
|
||||
[_RCS] = LAYOUT(
|
||||
XXXXXXX, _______, XXXXXXX,
|
||||
_______, KC_I , BASE ,
|
||||
KC_J , KC_K , KC_L
|
||||
)
|
||||
};
|
||||
|
||||
bool base_mode = false;
|
||||
bool panic_mode = false;
|
||||
bool flight_mode = false;
|
||||
bool rcs_mode = false;
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
base_mode = false;
|
||||
panic_mode = false;
|
||||
flight_mode = false;
|
||||
rcs_mode = false;
|
||||
|
||||
switch (biton32(state)) {
|
||||
case _PANIC:
|
||||
panic_mode = true; // For use in encoder evaluation
|
||||
rgblight_sethsv_noeeprom(HSV_RED);
|
||||
break;
|
||||
case _FLIGHT:
|
||||
flight_mode = true; // For use in encoder evaluation
|
||||
rgblight_sethsv_noeeprom(HSV_CYAN);
|
||||
break;
|
||||
case _RCS:
|
||||
rcs_mode = true; // For use in encoder evaluation
|
||||
rgblight_sethsv_noeeprom(HSV_BLUE);
|
||||
break;
|
||||
default: // for any other layers, or the default layer
|
||||
base_mode = true;
|
||||
rgblight_sethsv_noeeprom(HSV_SPRINGGREEN);
|
||||
break;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
// Call the post init code.
|
||||
rgblight_enable_noeeprom(); // enables Rgb, without saving settings
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 1); // sets mode to Slow breathing without saving
|
||||
rgblight_sethsv_noeeprom(HSV_SPRINGGREEN);
|
||||
}
|
||||
|
||||
// bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
// switch (keycode) {
|
||||
// uprintf("Keycode: %s\n", keycode);
|
||||
// if (record->event.pressed) {
|
||||
// print("pressed");
|
||||
// // Do something when pressed
|
||||
// } else {
|
||||
// print("unpressed");
|
||||
// // Do something else when release
|
||||
// }
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if(base_mode == true) {
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
// Volume up
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
// Volume down
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
else if (index == 1) {
|
||||
if (clockwise) {
|
||||
// Time warp faster
|
||||
tap_code(KC_DOT);
|
||||
} else {
|
||||
// Time warp slower
|
||||
tap_code(KC_COMM);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(rcs_mode == true) {
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
// RCS Forward
|
||||
tap_code(KC_H);
|
||||
} else {
|
||||
// RCS Backward
|
||||
tap_code(KC_N);
|
||||
}
|
||||
}
|
||||
else if (index == 1) {
|
||||
if (clockwise) {
|
||||
// RCS Rotate Left
|
||||
tap_code(KC_Q);
|
||||
} else {
|
||||
// RCS Rotate Right
|
||||
tap_code(KC_E);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(flight_mode == true) {
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
// Throttle up
|
||||
tap_code(KC_LSFT);
|
||||
} else {
|
||||
// Throttle down
|
||||
tap_code(KC_LCTL);
|
||||
}
|
||||
}
|
||||
else if (index == 1) {
|
||||
if (clockwise) {
|
||||
// Trim left
|
||||
tap_code16(LALT(KC_A));
|
||||
} else {
|
||||
// Trim right
|
||||
tap_code16(LALT(KC_D));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,23 +29,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define EE_HANDS
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
# undef RGBLED_NUM
|
||||
# define RGBLED_NUM 18 // Number of LEDs
|
||||
# define RGBLED_SPLIT { 9, 9 }
|
||||
# define RGBLIGHT_HUE_STEP 12
|
||||
# define RGBLIGHT_SAT_STEP 12
|
||||
# define RGBLIGHT_VAL_STEP 12
|
||||
# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||
# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 18 // Number of LEDs
|
||||
#define RGBLED_SPLIT { 9, 9 }
|
||||
#define RGBLIGHT_HUE_STEP 12
|
||||
#define RGBLIGHT_SAT_STEP 12
|
||||
#define RGBLIGHT_VAL_STEP 12
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||
|
||||
# define RGBLIGHT_LIMIT_VAL 225
|
||||
#define RGBLIGHT_LIMIT_VAL 225
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
# define C6_AUDIO
|
||||
# ifdef RGBLIGHT_ENABLE
|
||||
# define NO_MUSIC_MODE
|
||||
# endif //RGBLIGHT_ENABLE
|
||||
#define C6_AUDIO
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define NO_MUSIC_MODE
|
||||
#endif //RGBLIGHT_ENABLE
|
||||
#endif //AUDIO_ENABLE
|
||||
|
||||
#define QMK_ESC_OUTPUT F6 // usually COL
|
||||
@@ -55,7 +56,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#undef PRODUCT
|
||||
#ifdef KEYBOARD_keebio_iris_rev2
|
||||
# define PRODUCT Drashna Hacked Iris Rev.2
|
||||
#define PRODUCT Drashna Hacked Iris Rev.2
|
||||
#endif
|
||||
|
||||
#define SHFT_LED1 6
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \
|
||||
KC_TAB , K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \
|
||||
KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, OS_LALT, OS_RGUI, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, OS_LALT, OS_RGUI, K26, K27, K28, K29, CTL_T(K2A), OS_RSFT, \
|
||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE \
|
||||
)
|
||||
#define LAYOUT_iris_base_wrapper(...) LAYOUT_iris_base(__VA_ARGS__)
|
||||
@@ -113,22 +113,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
|
||||
void matrix_init_keymap(void) {
|
||||
#ifndef CONVERT_TO_PROTON_C
|
||||
#ifndef CONVERT_TO_PROTON_C
|
||||
setPinOutput(D5);
|
||||
writePinHigh(D5);
|
||||
|
||||
setPinOutput(B0);
|
||||
writePinHigh(B0);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void keyboard_post_init_keymap(void) {
|
||||
#if BACKLIGHT_ENABLE
|
||||
backlight_enable();
|
||||
backlight_level(5);
|
||||
#ifdef BACKLIGHT_BREATHING
|
||||
breathing_enable();
|
||||
#endif
|
||||
backlight_enable();
|
||||
backlight_level(5);
|
||||
#ifdef BACKLIGHT_BREATHING
|
||||
breathing_enable();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ AUDIO_ENABLE = no
|
||||
NKRO_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = no
|
||||
SWAP_HANDS_ENABLE = no
|
||||
SPACE_CADET_ENABLE = no
|
||||
|
||||
INDICATOR_LIGHTS = no
|
||||
MACROS_ENABLED = no
|
||||
|
||||
@@ -21,15 +21,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "../drashna/config.h"
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
# undef RGBLED_NUM
|
||||
# define RGBLED_NUM 16 // Number of LEDs
|
||||
# undef RGBLED_SPLIT
|
||||
# define RGBLED_SPLIT { 8, 8 }
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 16 // Number of LEDs
|
||||
#undef RGBLED_SPLIT
|
||||
#define RGBLED_SPLIT { 8, 8 }
|
||||
#endif
|
||||
|
||||
#undef PRODUCT
|
||||
#ifdef KEYBOARD_keebio_iris_rev2
|
||||
# define PRODUCT Drashna Hacked Iris LP Rev.2 (Backlit)
|
||||
#define PRODUCT Drashna Hacked Iris LP Rev.2 (Backlit)
|
||||
#endif
|
||||
|
||||
#undef SHFT_LED1
|
||||
|
||||
@@ -21,15 +21,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "../drashna/config.h"
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
# undef RGBLED_NUM
|
||||
# define RGBLED_NUM 16 // Number of LEDs
|
||||
# undef RGBLED_SPLIT
|
||||
# define RGBLED_SPLIT { 8, 8 }
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 16 // Number of LEDs
|
||||
#undef RGBLED_SPLIT
|
||||
#define RGBLED_SPLIT { 8, 8 }
|
||||
#endif
|
||||
|
||||
#undef PRODUCT
|
||||
#ifdef KEYBOARD_keebio_iris_rev2
|
||||
# define PRODUCT Drashna Hacked Iris Rev.2 (16 LED)
|
||||
#define PRODUCT Drashna Hacked Iris Rev.2 (16 LED)
|
||||
#endif
|
||||
|
||||
#undef SHFT_LED1
|
||||
|
||||
@@ -35,4 +35,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define RGBLIGHT_SLEEP
|
||||
#define RGBLIGHT_HUE_STEP 1
|
||||
#define RGBLIGHT_SAT_STEP 1
|
||||
#define RGBLIGHT_VAL_STEP 1
|
||||
#define RGBLIGHT_VAL_STEP 1
|
||||
@@ -1,45 +1,48 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "rs.h"
|
||||
|
||||
enum layers {
|
||||
_QWERTY,
|
||||
_HYPER,
|
||||
};
|
||||
|
||||
#define KC_ KC_TRNS
|
||||
|
||||
#define KC_ESCC MT(MOD_LCTL, KC_ESC)
|
||||
#define KC_ENTS MT(MOD_LSFT, KC_ENT)
|
||||
#define KC_HYPE MO(_HYPER)
|
||||
#define KC_RST RESET
|
||||
// Brightness
|
||||
#define KC_BRUP KC_PAUS
|
||||
#define KC_BRDN KC_SLCK
|
||||
#define KC_BLTG BL_TOGG
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = LAYOUT_kc(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
TAB , Q , W , E , R , T , Y , U , I , O , P ,EQL ,
|
||||
TAB , Q , W , E , R , T , Y , U , I , O , P ,EQL,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
ESCC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
|
||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||
LSFT, Z , X , C , V , B ,SPC, BSPC, N , M ,COMM,DOT ,SLSH,ENTS,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
LALT,LGUI,SPC , BSPC,CODE,FN
|
||||
LALT,LGUI,SPC, BSPC,HYPE,ENT
|
||||
// `----+----+----' `+---+----+----'
|
||||
),
|
||||
[_CODE] = LAYOUT_kc(
|
||||
), // |
|
||||
// |
|
||||
[_HYPER] = LAYOUT_kc( // V
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
, , , , , , , , , , , ,
|
||||
RST , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 ,LBRC,RBRC, ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
GRV ,EXLM, AT ,HASH, DLR,PERC, CIRC,LPLT,ASTR,RPGT,NEQL, ,
|
||||
, , ,PGUP, ,BRUP, , , UP ,LCBR,RCBR,BSLS,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, 1 , 2 , 3 , 4 , 5 , MINS,LBRC, UP ,RBRC, ,BSLS,
|
||||
, ,HOME,PGDN,END ,BRDN, MINS,LEFT,DOWN,RGHT, ,PIPE,
|
||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||
, 6 , 7 , 8 , 9 , 0 , , ,AMPR,LEFT,DOWN,RGHT, ,PIPE,
|
||||
, , , , , ,BLTG, VOLU, , , , , , ,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
, , DOT, , ,
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
[_FN] = LAYOUT_kc(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
, F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10, F11,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, , , , , , , , , , , ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
BLTG,BLUP, , , ,BRMU, , ,PGUP, , , ,
|
||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||
,BLDN, , ,RST ,BRMD, , VOLU, ,CTRA,PGDN,CTRE, , ,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
, , , VOLD,MUTE,
|
||||
, , , VOLD, ,MUTE
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
};
|
||||
|
||||
|
||||
@@ -1 +1,13 @@
|
||||
See [rs readme](../../../../users/rs/readme.md).
|
||||
# Code friendly 60% keymap
|
||||
|
||||
I developped this keymap to make a better use of 60% ortho keyboards I use like the preonic of the iris. Instead of trying to mimic the Planck layout like the default preonic keymap, this keymap removes the raise and lower layers and offers a simpler hyper layer concept for a few missing sign keys and cursors / media keys.
|
||||
|
||||
The important part for coders is that most important signs needed to code are available at their usual position on a full keyboard, without complex layer gymnastic. Access to [] and {} are available on the hyper layer at their usual emplacement.
|
||||
|
||||
The right thumb is used for both backspace and hyper layer switching. On the hyper layer, in addition to some coding signs, you get the cursor keys arranged in cross, just under your right fingers, so you don't have to move your hand when navigating in code or command line. Other hand gets the home/end page up/down in a similar layout.
|
||||
|
||||
Because you sometime have to use your internal keyboard when you use a macbook, a karabiner configuration is also provided to get most of the features of this keyboard, including the hyper layer / backspace on right command key etc.
|
||||
|
||||
This keymap is also available for other keyboards:
|
||||
- [ortho_5x12/rs](../../../../layouts/community/ortho_5x12/rs/keymap.c)
|
||||
- [ErgoTravel/rs](../../../ergotravel/keymaps/rs/keymap.c)
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
BACKLIGHT_ENABLE = yes
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
@@ -21,25 +21,35 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define MATRIX_ROWS 5
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
# undef RGBLED_NUM
|
||||
# define RGBLED_NUM 16
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 16
|
||||
|
||||
# define RGBLIGHT_HUE_STEP 8
|
||||
# define RGBLIGHT_SAT_STEP 8
|
||||
# define RGBLIGHT_VAL_STEP 8
|
||||
# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||
# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
|
||||
#undef LOCKING_SUPPORT_ENABLE
|
||||
#undef LOCKING_RESYNC_ENABLE
|
||||
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#undef PRODUCT
|
||||
#define PRODUCT Drashnas Viterbi Macro Pad
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
# define C6_AUDIO
|
||||
# define NO_MUSIC_MODE
|
||||
#define C6_AUDIO
|
||||
#define NO_MUSIC_MODE
|
||||
#endif
|
||||
|
||||
#define LAYOUT_ortho_5x7( \
|
||||
|
||||
@@ -8,7 +8,6 @@ RGBLIGHT_ENABLE = yes
|
||||
AUDIO_ENABLE = yes
|
||||
NKRO_ENABLE = yes
|
||||
SPLIT_KEYBOARD = no
|
||||
SPACE_CADET_ENABLE = no
|
||||
|
||||
NO_SECRETS = yes
|
||||
MACROS_ENABLED = yes
|
||||
|
||||
@@ -20,6 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "../drashna/config.h"
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
# undef RGBLED_NUM
|
||||
# define RGBLED_NUM 12
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 12
|
||||
#endif
|
||||
|
||||
@@ -20,34 +20,123 @@
|
||||
//
|
||||
// There is a quick-and-dirty implementation of this under ledvis.html
|
||||
|
||||
led_config_t g_led_config = { {
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
|
||||
{ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 },
|
||||
{ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, 43 },
|
||||
{ 44, NO_LED, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 },
|
||||
{ 58, 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, NO_LED, 62, 63, 64, 65, 66 }
|
||||
}, {
|
||||
{ 8, 56 }, { 22, 56 }, { 35, 56 }, { 49, 56 }, { 63, 56 }, { 77, 56 }, { 91, 56 }, { 105, 56 }, { 118, 56 }, { 132, 56 }, { 146, 56 }, { 160, 56 }, { 174, 56 }, { 195, 56 }, { 215, 56 },
|
||||
{ 11, 44 }, { 28, 44 }, { 42, 44 }, { 56, 44 }, { 70, 44 }, { 84, 44 }, { 98, 44 }, { 112, 44 }, { 125, 44 }, { 139, 44 }, { 153, 44 }, { 167, 44 }, { 181, 44 }, { 198, 44 }, { 215, 44 },
|
||||
{ 13, 32 }, { 32, 32 }, { 46, 32 }, { 60, 32 }, { 73, 32 }, { 87, 32 }, { 101, 32 }, { 115, 32 }, { 129, 32 }, { 143, 32 }, { 156, 32 }, { 170, 32 }, { 193, 32 }, { 215, 32 }, { 16, 19 },
|
||||
{ 39, 19 }, { 53, 19 }, { 67, 19 }, { 80, 19 }, { 94, 19 }, { 108, 19 }, { 122, 19 }, { 136, 19 }, { 150, 19 }, { 163, 19 }, { 182, 19 }, { 201, 19 }, { 215, 19 }, { 9, 7 }, { 27, 7 },
|
||||
{ 44, 7 }, { 96, 7 }, { 148, 7 }, { 165, 7 }, { 188, 7 }, { 201, 7 }, { 215, 7 },
|
||||
// Underglow LEDs
|
||||
{ 1, 1 }, { 15, 0 }, { 31, 0 }, { 47, 0 }, { 63, 0 }, { 79, 0 }, { 95, 0 }, { 112, 0 }, { 128, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 208, 0 }, { 222, 1 },
|
||||
{ 224, 13 }, { 224, 25 }, { 224, 38 }, { 224, 50 }, { 222, 62 }, { 191, 64 }, { 179, 64 }, { 167, 64 }, { 153, 64 }, { 139, 64 }, { 125, 64 }, { 112, 64 }, { 98, 64 }, { 84, 64 }, { 70, 64 },
|
||||
{ 56, 64 }, { 42, 64 }, { 28, 64 }, { 1, 62 }, { 0, 50 }, { 0, 38 }, { 0, 25 }, { 0, 13 }
|
||||
}, {
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 4,
|
||||
// Underglow LEDs
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 2, 2, 2, 2, 2, 2
|
||||
} };
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
/* 0 */ { { (0)|(0 << 4) }, { 8, 56 }, 4 }, // KC_ESC
|
||||
/* 1 */ { { (0)|(1 << 4) }, { 22, 56 }, 4 }, // KC_1
|
||||
/* 2 */ { { (0)|(2 << 4) }, { 35, 56 }, 4 }, // KC_2
|
||||
/* 3 */ { { (0)|(3 << 4) }, { 49, 56 }, 4 }, // KC_3
|
||||
/* 4 */ { { (0)|(4 << 4) }, { 63, 56 }, 4 }, // KC_4
|
||||
/* 5 */ { { (0)|(5 << 4) }, { 77, 56 }, 4 }, // KC_5
|
||||
/* 6 */ { { (0)|(6 << 4) }, { 91, 56 }, 4 }, // KC_6
|
||||
/* 7 */ { { (0)|(7 << 4) }, { 105, 56 }, 4 }, // KC_7
|
||||
/* 8 */ { { (0)|(8 << 4) }, { 118, 56 }, 4 }, // KC_8
|
||||
/* 9 */ { { (0)|(9 << 4) }, { 132, 56 }, 4 }, // KC_9
|
||||
/* 10 */ { { (0)|(10 << 4) }, { 146, 56 }, 4 }, // KC_0
|
||||
/* 11 */ { { (0)|(11 << 4) }, { 160, 56 }, 4 }, // KC_MINS
|
||||
/* 12 */ { { (0)|(12 << 4) }, { 174, 56 }, 4 }, // KC_EQL
|
||||
/* 13 */ { { (0)|(13 << 4) }, { 195, 56 }, 4 }, // KC_BSPC
|
||||
/* 14 */ { { (0)|(14 << 4) }, { 215, 56 }, 4 }, // KC_DEL
|
||||
/* 15 */ { { (1)|(0 << 4) }, { 11, 44 }, 4 }, // KC_TAB
|
||||
/* 16 */ { { (1)|(1 << 4) }, { 28, 44 }, 4 }, // KC_Q
|
||||
/* 17 */ { { (1)|(2 << 4) }, { 42, 44 }, 4 }, // KC_W
|
||||
/* 18 */ { { (1)|(3 << 4) }, { 56, 44 }, 4 }, // KC_E
|
||||
/* 19 */ { { (1)|(4 << 4) }, { 70, 44 }, 4 }, // KC_R
|
||||
/* 20 */ { { (1)|(5 << 4) }, { 84, 44 }, 4 }, // KC_T
|
||||
/* 21 */ { { (1)|(6 << 4) }, { 98, 44 }, 4 }, // KC_Y
|
||||
/* 22 */ { { (1)|(7 << 4) }, { 112, 44 }, 4 }, // KC_U
|
||||
/* 23 */ { { (1)|(8 << 4) }, { 125, 44 }, 4 }, // KC_I
|
||||
/* 24 */ { { (1)|(9 << 4) }, { 139, 44 }, 4 }, // KC_O
|
||||
/* 25 */ { { (1)|(10 << 4) }, { 153, 44 }, 4 }, // KC_P
|
||||
/* 26 */ { { (1)|(11 << 4) }, { 167, 44 }, 4 }, // KC_LBRC
|
||||
/* 27 */ { { (1)|(12 << 4) }, { 181, 44 }, 4 }, // KC_RBRC
|
||||
/* 28 */ { { (1)|(13 << 4) }, { 198, 44 }, 4 }, // KC_BSLS
|
||||
/* 29 */ { { (1)|(14 << 4) }, { 215, 44 }, 4 }, // KC_HOME
|
||||
/* 30 */ { { (2)|(0 << 4) }, { 13, 32 }, 1 }, // KC_CAPS
|
||||
/* 31 */ { { (2)|(1 << 4) }, { 32, 32 }, 4 }, // KC_A
|
||||
/* 32 */ { { (2)|(2 << 4) }, { 46, 32 }, 4 }, // KC_S
|
||||
/* 33 */ { { (2)|(3 << 4) }, { 60, 32 }, 4 }, // KC_D
|
||||
/* 34 */ { { (2)|(4 << 4) }, { 73, 32 }, 4 }, // KC_F
|
||||
/* 35 */ { { (2)|(5 << 4) }, { 87, 32 }, 4 }, // KC_G
|
||||
/* 36 */ { { (2)|(6 << 4) }, { 101, 32 }, 4 }, // KC_H
|
||||
/* 37 */ { { (2)|(7 << 4) }, { 115, 32 }, 4 }, // KC_J
|
||||
/* 38 */ { { (2)|(8 << 4) }, { 129, 32 }, 4 }, // KC_K
|
||||
/* 39 */ { { (2)|(9 << 4) }, { 143, 32 }, 4 }, // KC_L
|
||||
/* 40 */ { { (2)|(10 << 4) }, { 156, 32 }, 4 }, // KC_SCLN
|
||||
/* 41 */ { { (2)|(11 << 4) }, { 170, 32 }, 4 }, // KC_QUOT
|
||||
/* _________________________________________ */ // ____
|
||||
/* 42 */ { { (2)|(13 << 4) }, { 193, 32 }, 4 }, // KC_ENT
|
||||
/* 43 */ { { (2)|(14 << 4) }, { 215, 32 }, 4 }, // KC_PGUP
|
||||
/* 44 */ { { (3)|(0 << 4) }, { 16, 19 }, 4 }, // KC_LSFT
|
||||
/* 45 */ { { (3)|(2 << 4) }, { 39, 19 }, 4 }, // KC_Z
|
||||
/* 46 */ { { (3)|(3 << 4) }, { 53, 19 }, 4 }, // KC_X
|
||||
/* 47 */ { { (3)|(4 << 4) }, { 67, 19 }, 4 }, // KC_C
|
||||
/* 48 */ { { (3)|(5 << 4) }, { 80, 19 }, 4 }, // KC_V
|
||||
/* 49 */ { { (3)|(6 << 4) }, { 94, 19 }, 4 }, // KC_B
|
||||
/* 50 */ { { (3)|(7 << 4) }, { 108, 19 }, 4 }, // KC_N
|
||||
/* 51 */ { { (3)|(8 << 4) }, { 122, 19 }, 4 }, // KC_M
|
||||
/* 52 */ { { (3)|(9 << 4) }, { 136, 19 }, 4 }, // KC_COMM
|
||||
/* 53 */ { { (3)|(10 << 4) }, { 150, 19 }, 4 }, // KC_DOT
|
||||
/* 54 */ { { (3)|(11 << 4) }, { 163, 19 }, 4 }, // KC_SLSH
|
||||
/* 55 */ { { (3)|(12 << 4) }, { 182, 19 }, 4 }, // KC_RSFT
|
||||
/* _________________________________________ */ // ____
|
||||
/* 56 */ { { (3)|(13 << 4) }, { 201, 19 }, 4 }, // KC_UP
|
||||
/* 57 */ { { (3)|(14 << 4) }, { 215, 19 }, 4 }, // KC_PGDN
|
||||
/* 58 */ { { (4)|(0 << 4) }, { 9, 7 }, 4 }, // KC_LCTL
|
||||
/* 59 */ { { (4)|(1 << 4) }, { 27, 7 }, 4 }, // KC_LGUI
|
||||
/* 60 */ { { (4)|(2 << 4) }, { 44, 7 }, 4 }, // KC_LALT
|
||||
/* _________________________________________ */ // ____
|
||||
/* _________________________________________ */ // ____
|
||||
/* _________________________________________ */ // ____
|
||||
/* 61 */ { { (4)|(6 << 4) }, { 96, 7 }, 4 }, // KC_SPC
|
||||
/* _________________________________________ */ // ____
|
||||
/* _________________________________________ */ // ____
|
||||
/* _________________________________________ */ // ____
|
||||
/* 62 */ { { (4)|(10 << 4) }, { 148, 7 }, 4 }, // KC_RALT
|
||||
/* 63 */ { { (4)|(11 << 4) }, { 165, 7 }, 4 }, // MO(1)
|
||||
/* 64 */ { { (4)|(12 << 4) }, { 188, 7 }, 4 }, // KC_LEFT
|
||||
/* 65 */ { { (4)|(13 << 4) }, { 201, 7 }, 4 }, // KC_DOWN
|
||||
/* 66 */ { { (4)|(14 << 4) }, { 215, 7 }, 4 }, // KC_RGHT
|
||||
|
||||
// Underglow LEDs
|
||||
{ { 255 }, { 1, 1 }, 2 },
|
||||
{ { 255 }, { 15, 0 }, 2 },
|
||||
{ { 255 }, { 31, 0 }, 2 },
|
||||
{ { 255 }, { 47, 0 }, 2 },
|
||||
{ { 255 }, { 63, 0 }, 2 },
|
||||
{ { 255 }, { 79, 0 }, 2 },
|
||||
{ { 255 }, { 95, 0 }, 2 },
|
||||
{ { 255 }, { 112, 0 }, 2 },
|
||||
{ { 255 }, { 128, 0 }, 2 },
|
||||
{ { 255 }, { 144, 0 }, 2 },
|
||||
{ { 255 }, { 160, 0 }, 2 },
|
||||
{ { 255 }, { 176, 0 }, 2 },
|
||||
{ { 255 }, { 192, 0 }, 2 },
|
||||
{ { 255 }, { 208, 0 }, 2 },
|
||||
{ { 255 }, { 222, 1 }, 2 },
|
||||
{ { 255 }, { 224, 13 }, 2 },
|
||||
{ { 255 }, { 224, 25 }, 2 },
|
||||
{ { 255 }, { 224, 38 }, 2 },
|
||||
{ { 255 }, { 224, 50 }, 2 },
|
||||
{ { 255 }, { 222, 62 }, 2 },
|
||||
{ { 255 }, { 191, 64 }, 2 },
|
||||
{ { 255 }, { 179, 64 }, 2 },
|
||||
{ { 255 }, { 167, 64 }, 2 },
|
||||
{ { 255 }, { 153, 64 }, 2 },
|
||||
{ { 255 }, { 139, 64 }, 2 },
|
||||
{ { 255 }, { 125, 64 }, 2 },
|
||||
{ { 255 }, { 112, 64 }, 2 },
|
||||
{ { 255 }, { 98, 64 }, 2 },
|
||||
{ { 255 }, { 84, 64 }, 2 },
|
||||
{ { 255 }, { 70, 64 }, 2 },
|
||||
{ { 255 }, { 56, 64 }, 2 },
|
||||
{ { 255 }, { 42, 64 }, 2 },
|
||||
{ { 255 }, { 28, 64 }, 2 },
|
||||
{ { 255 }, { 1, 62 }, 2 },
|
||||
{ { 255 }, { 0, 50 }, 2 },
|
||||
{ { 255 }, { 0, 38 }, 2 },
|
||||
{ { 255 }, { 0, 25 }, 2 },
|
||||
{ { 255 }, { 0, 13 }, 2 },
|
||||
};
|
||||
|
||||
#ifdef USB_LED_INDICATOR_ENABLE
|
||||
void rgb_matrix_indicators_kb(void)
|
||||
|
||||
@@ -5,72 +5,134 @@
|
||||
#include "rgb_matrix.h"
|
||||
#include "config_led.h"
|
||||
|
||||
led_config_t g_led_config = { {
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7 },
|
||||
{ 16, 17, 18, 19, 20, 21, 22, 23 },
|
||||
{ 33, 34, 35, 36, 37, 38, 39, 40 },
|
||||
{ 50, 51, 52, 53, 54, 55, 56, 57 },
|
||||
{ 63, 64, 65, 66, 67, 68, 69, 70 },
|
||||
{ 76, 77, 78, 79, 80, 81, 82, 83 },
|
||||
{ 8, 9, 10, 11, 12, 13, 14, 15 },
|
||||
{ 24, 25, 26, 27, 28, 29, 30, 31 },
|
||||
{ 41, 42, 43, 44, 45, 46, 47, 48 },
|
||||
{ 58, 59, 60, 61, 62, 75, 49, 32 },
|
||||
{ 71, 72, 73, 74, 84, 85, 86, NO_LED }
|
||||
}, {
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
// KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS
|
||||
{ 7, 5 }, { 31, 5 }, { 43, 5 }, { 55, 5 }, { 67, 5 }, { 85, 5 }, { 97, 5 }, { 109, 5 },
|
||||
{ 121, 5 }, { 139, 5 }, { 151, 5 }, { 163, 5 }, { 175, 5 }, { 193, 5 }, { 205, 5 }, { 217, 5 },
|
||||
{ { 0|(0<<4) }, { 7, 5 }, 4 },
|
||||
{ { 0|(1<<4) }, { 31, 5 }, 4 },
|
||||
{ { 0|(2<<4) }, { 43, 5 }, 4 },
|
||||
{ { 0|(3<<4) }, { 55, 5 }, 4 },
|
||||
{ { 0|(4<<4) }, { 67, 5 }, 4 },
|
||||
{ { 0|(5<<4) }, { 85, 5 }, 4 },
|
||||
{ { 0|(6<<4) }, { 97, 5 }, 4 },
|
||||
{ { 0|(7<<4) }, { 109, 5 }, 4 },
|
||||
{ { 6|(0<<4) }, { 121, 5 }, 4 },
|
||||
{ { 6|(1<<4) }, { 139, 5 }, 4 },
|
||||
{ { 6|(2<<4) }, { 151, 5 }, 4 },
|
||||
{ { 6|(3<<4) }, { 163, 5 }, 4 },
|
||||
{ { 6|(4<<4) }, { 175, 5 }, 4 },
|
||||
{ { 6|(5<<4) }, { 193, 5 }, 4 },
|
||||
{ { 6|(6<<4) }, { 205, 5 }, 1 },
|
||||
{ { 6|(7<<4) }, { 217, 5 }, 4 },
|
||||
// KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP
|
||||
{ 7, 20 }, { 19, 20 }, { 31, 20 }, { 43, 20 }, { 55, 20 }, { 67, 20 }, { 79, 20 }, { 91, 20 },
|
||||
{ 103, 20 }, { 115, 20 }, { 127, 20 }, { 139, 20 }, { 151, 20 }, { 169, 20 }, { 193, 20 }, { 205, 20 },
|
||||
{ 217, 20 },
|
||||
{ { 1|(0<<4) }, { 7, 20 }, 4 },
|
||||
{ { 1|(1<<4) }, { 19, 20 }, 4 },
|
||||
{ { 1|(2<<4) }, { 31, 20 }, 4 },
|
||||
{ { 1|(3<<4) }, { 43, 20 }, 4 },
|
||||
{ { 1|(4<<4) }, { 55, 20 }, 4 },
|
||||
{ { 1|(5<<4) }, { 67, 20 }, 4 },
|
||||
{ { 1|(6<<4) }, { 79, 20 }, 4 },
|
||||
{ { 1|(7<<4) }, { 91, 20 }, 4 },
|
||||
{ { 7|(0<<4) }, { 103, 20 }, 4 },
|
||||
{ { 7|(1<<4) }, { 115, 20 }, 4 },
|
||||
{ { 7|(2<<4) }, { 127, 20 }, 4 },
|
||||
{ { 7|(3<<4) }, { 139, 20 }, 4 },
|
||||
{ { 7|(4<<4) }, { 151, 20 }, 4 },
|
||||
{ { 7|(5<<4) }, { 169, 20 }, 4 },
|
||||
{ { 7|(6<<4) }, { 193, 20 }, 4 },
|
||||
{ { 7|(7<<4) }, { 205, 20 }, 4 },
|
||||
{ { 9|(7<<4) }, { 217, 20 }, 4 },
|
||||
// KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN
|
||||
{ 10, 30 }, { 25, 30 }, { 37, 30 }, { 49, 30 }, { 61, 30 }, { 73, 30 }, { 85, 30 }, { 97, 30 },
|
||||
{ 109, 30 }, { 121, 30 }, { 133, 30 }, { 145, 30 }, { 157, 30 }, { 172, 30 }, { 193, 30 }, { 205, 30 },
|
||||
{ 217, 30 },
|
||||
{ { 2|(0<<4) }, { 10, 30 }, 4 },
|
||||
{ { 2|(1<<4) }, { 25, 30 }, 4 },
|
||||
{ { 2|(2<<4) }, { 37, 30 }, 4 },
|
||||
{ { 2|(3<<4) }, { 49, 30 }, 4 },
|
||||
{ { 2|(4<<4) }, { 61, 30 }, 4 },
|
||||
{ { 2|(5<<4) }, { 73, 30 }, 4 },
|
||||
{ { 2|(6<<4) }, { 85, 30 }, 4 },
|
||||
{ { 2|(7<<4) }, { 97, 30 }, 4 },
|
||||
{ { 8|(0<<4) }, { 109, 30 }, 4 },
|
||||
{ { 8|(1<<4) }, { 121, 30 }, 4 },
|
||||
{ { 8|(2<<4) }, { 133, 30 }, 4 },
|
||||
{ { 8|(3<<4) }, { 145, 30 }, 4 },
|
||||
{ { 8|(4<<4) }, { 157, 30 }, 4 },
|
||||
{ { 8|(5<<4) }, { 172, 30 }, 4 },
|
||||
{ { 8|(6<<4) }, { 193, 30 }, 4 },
|
||||
{ { 8|(7<<4) }, { 205, 30 }, 4 },
|
||||
{ { 9|(6<<4) }, { 217, 30 }, 4 },
|
||||
// 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_ENT
|
||||
{ 11, 39 }, { 28, 39 }, { 40, 39 }, { 52, 39 }, { 64, 39 }, { 76, 39 }, { 88, 39 }, { 100, 39 },
|
||||
{ 112, 39 }, { 124, 39 }, { 136, 39 }, { 148, 39 }, { 168, 39 },
|
||||
{ { 3|(0<<4) }, { 11, 39 }, 1 },
|
||||
{ { 3|(1<<4) }, { 28, 39 }, 4 },
|
||||
{ { 3|(2<<4) }, { 40, 39 }, 4 },
|
||||
{ { 3|(3<<4) }, { 52, 39 }, 4 },
|
||||
{ { 3|(4<<4) }, { 64, 39 }, 4 },
|
||||
{ { 3|(5<<4) }, { 76, 39 }, 4 },
|
||||
{ { 3|(6<<4) }, { 88, 39 }, 4 },
|
||||
{ { 3|(7<<4) }, { 100, 39 }, 4 },
|
||||
{ { 9|(0<<4) }, { 112, 39 }, 4 },
|
||||
{ { 9|(1<<4) }, { 124, 39 }, 4 },
|
||||
{ { 9|(2<<4) }, { 136, 39 }, 4 },
|
||||
{ { 9|(3<<4) }, { 148, 39 }, 4 },
|
||||
{ { 9|(4<<4) }, { 168, 39 }, 4 },
|
||||
// KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP
|
||||
{ 14, 49 }, { 34, 49 }, { 46, 49 }, { 58, 49 }, { 70, 49 }, { 82, 49 }, { 94, 49 }, { 106, 49 },
|
||||
{ 118, 49 }, { 130, 49 }, { 142, 49 }, { 165, 49 }, { 205, 49 },
|
||||
{ { 4|(0<<4) }, { 14, 49 }, 4 },
|
||||
{ { 4|(1<<4) }, { 34, 49 }, 4 },
|
||||
{ { 4|(2<<4) }, { 46, 49 }, 4 },
|
||||
{ { 4|(3<<4) }, { 58, 49 }, 4 },
|
||||
{ { 4|(4<<4) }, { 70, 49 }, 4 },
|
||||
{ { 4|(5<<4) }, { 82, 49 }, 4 },
|
||||
{ { 4|(6<<4) }, { 94, 49 }, 4 },
|
||||
{ { 4|(7<<4) }, { 106, 49 }, 4 },
|
||||
{ { 10|(0<<4) }, { 118, 49 }, 4 },
|
||||
{ { 10|(1<<4) }, { 130, 49 }, 4 },
|
||||
{ { 10|(2<<4) }, { 142, 49 }, 4 },
|
||||
{ { 10|(3<<4) }, { 165, 49 }, 4 },
|
||||
{ { 9|(5<<4) }, { 205, 49 }, 4 },
|
||||
// KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
{ 8, 59 }, { 23, 59 }, { 38, 59 }, { 83, 59 }, { 129, 59 }, { 144, 59 }, { 159, 59 }, { 174, 59 },
|
||||
{ 193, 59 }, { 205, 59 }, { 217, 59 },
|
||||
{ { 5|(0<<4) }, { 8, 59 }, 4 },
|
||||
{ { 5|(1<<4) }, { 23, 59 }, 4 },
|
||||
{ { 5|(2<<4) }, { 38, 59 }, 4 },
|
||||
{ { 5|(3<<4) }, { 83, 59 }, 4 },
|
||||
{ { 5|(4<<4) }, { 129, 59 }, 4 },
|
||||
{ { 5|(5<<4) }, { 144, 59 }, 4 },
|
||||
{ { 5|(6<<4) }, { 159, 59 }, 4 },
|
||||
{ { 5|(7<<4) }, { 174, 59 }, 4 },
|
||||
{ { 10|(4<<4) }, { 193, 59 }, 4 },
|
||||
{ { 10|(5<<4) }, { 205, 59 }, 4 },
|
||||
{ { 10|(6<<4) }, { 217, 59 }, 4 },
|
||||
// Underglow / Border
|
||||
{ 222, 64 }, { 204, 64 }, { 186, 64 }, { 167, 64 }, { 149, 64 }, { 130, 64 }, { 112, 64 }, { 94, 64 },
|
||||
{ 75, 64 }, { 57, 64 }, { 38, 64 }, { 20, 64 }, { 0, 64 }, { 0, 47 }, { 0, 32 }, { 0, 17 },
|
||||
{ 0, 0 }, { 20, 0 }, { 38, 0 }, { 57, 0 }, { 75, 0 }, { 94, 0 }, { 112, 0 }, { 130, 0 },
|
||||
{ 149, 0 }, { 167, 0 }, { 186, 0 }, { 204, 0 }, { 222, 1 }, { 224, 17 }, { 224, 32 }, { 224, 47 }
|
||||
}, {
|
||||
// KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS
|
||||
4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 1, 4,
|
||||
// KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP
|
||||
4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4,
|
||||
// KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN
|
||||
4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4,
|
||||
// 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_ENT
|
||||
1, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4,
|
||||
// KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP
|
||||
4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4,
|
||||
// KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4,
|
||||
// Underglow / Border
|
||||
2, 2, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 2, 2, 2, 2, 2, 2
|
||||
} };
|
||||
|
||||
{ { 0xFF }, { 222, 64 }, 2 },
|
||||
{ { 0xFF }, { 204, 64 }, 2 },
|
||||
{ { 0xFF }, { 186, 64 }, 2 },
|
||||
{ { 0xFF }, { 167, 64 }, 2 },
|
||||
{ { 0xFF }, { 149, 64 }, 2 },
|
||||
{ { 0xFF }, { 130, 64 }, 2 },
|
||||
{ { 0xFF }, { 112, 64 }, 2 },
|
||||
{ { 0xFF }, { 94, 64 }, 2 },
|
||||
{ { 0xFF }, { 75, 64 }, 2 },
|
||||
{ { 0xFF }, { 57, 64 }, 2 },
|
||||
{ { 0xFF }, { 38, 64 }, 2 },
|
||||
{ { 0xFF }, { 20, 64 }, 2 },
|
||||
{ { 0xFF }, { 0, 64 }, 2 },
|
||||
{ { 0xFF }, { 0, 47 }, 2 },
|
||||
{ { 0xFF }, { 0, 32 }, 2 },
|
||||
{ { 0xFF }, { 0, 17 }, 2 },
|
||||
{ { 0xFF }, { 0, 0 }, 2 },
|
||||
{ { 0xFF }, { 20, 0 }, 2 },
|
||||
{ { 0xFF }, { 38, 0 }, 2 },
|
||||
{ { 0xFF }, { 57, 0 }, 2 },
|
||||
{ { 0xFF }, { 75, 0 }, 2 },
|
||||
{ { 0xFF }, { 94, 0 }, 2 },
|
||||
{ { 0xFF }, { 112, 0 }, 2 },
|
||||
{ { 0xFF }, { 130, 0 }, 2 },
|
||||
{ { 0xFF }, { 149, 0 }, 2 },
|
||||
{ { 0xFF }, { 167, 0 }, 2 },
|
||||
{ { 0xFF }, { 186, 0 }, 2 },
|
||||
{ { 0xFF }, { 204, 0 }, 2 },
|
||||
{ { 0xFF }, { 222, 1 }, 2 },
|
||||
{ { 0xFF }, { 224, 17 }, 2 },
|
||||
{ { 0xFF }, { 224, 32 }, 2 },
|
||||
{ { 0xFF }, { 224, 47 }, 2 },
|
||||
};
|
||||
|
||||
#ifdef USB_LED_INDICATOR_ENABLE
|
||||
void rgb_matrix_indicators_kb(void)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
extern bool g_suspend_state;
|
||||
|
||||
enum ctrl_layers {
|
||||
_QWERTY,
|
||||
@@ -30,6 +31,7 @@ enum ctrl_keycodes {
|
||||
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
|
||||
#define LT_CAPS LT(_NAV, KC_CAPS)
|
||||
#define _V_V_V_ KC_TRNS
|
||||
extern rgb_config_t rgb_matrix_config;
|
||||
extern bool autoshift_enabled;
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#define PERMISSIVE_HOLD
|
||||
#define QMK_KEYS_PER_SCAN 4
|
||||
#define TAPPING_TERM 160
|
||||
@@ -1,69 +0,0 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#include <sendstring_norman.h>
|
||||
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
enum layers {
|
||||
_NORMAN,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE,
|
||||
ADJUST
|
||||
};
|
||||
|
||||
// Defines for task manager and such
|
||||
#define CALTDEL LCTL(LALT(KC_DEL))
|
||||
#define TSKMGR LCTL(LSFT(KC_ESC))
|
||||
#define DSK_LFT LGUI(LCTL(KC_LEFT))
|
||||
#define DSK_RT LGUI(LCTL(KC_RIGHT))
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
|
||||
[_NORMAN] = LAYOUT( \
|
||||
NM_Q, NM_W, NM_D, NM_F, NM_K, NM_J, NM_U, NM_R, NM_L, NM_SCLN, \
|
||||
NM_A, NM_S, NM_E, NM_T, NM_G, NM_Y, NM_N, NM_I, NM_O, NM_H, \
|
||||
NM_Z, NM_X, NM_C, NM_V, NM_B, NM_P, NM_M, NM_COMM, NM_DOT, NM_SLSH, \
|
||||
LGUI_T(KC_ENT), LT(_RAISE, KC_ESC), SFT_T(KC_BSPC), CTL_T(KC_SPC), LT(_LOWER, KC_TAB), ALT_T(KC_ENT) \
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT( \
|
||||
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_PLUS, KC_7, KC_8, KC_9, KC_0, \
|
||||
KC_CIRC, KC_AMPR, KC_TILD, KC_PIPE, KC_BSLS, KC_MINUS, KC_4, KC_5, KC_6, KC_EQL, \
|
||||
KC_DQT, KC_QUOT, KC_UNDS, KC_GRV, _______, KC_ASTR, KC_1, KC_2, KC_3, _______, \
|
||||
_______, _______, _______, _______, MO(_ADJUST), _______ \
|
||||
),
|
||||
|
||||
|
||||
[_LOWER] = LAYOUT( \
|
||||
KC_ESC, KC_HOME, KC_UP, KC_END, _______, _______, KC_LPRN, KC_RPRN, _______, _______,
|
||||
KC_VOLU, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGUP, _______, KC_LBRC, KC_RBRC, _______, _______, \
|
||||
KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, KC_PGDN, _______, KC_LCBR, KC_RCBR, _______, _______, \
|
||||
_______, MO(_ADJUST), _______, _______, _______, _______ \
|
||||
),
|
||||
|
||||
[_ADJUST] = LAYOUT( \
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \
|
||||
_______, DSK_LFT, _______, DSK_RT, _______, TSKMGR, CALTDEL, _______, KC_F11, KC_F12, \
|
||||
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______ \
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
void persistant_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
# Minidox Norman Layout by LeHoff
|
||||
Based on the QWERTY layout created by Khitsule.
|
||||

|
||||
|
||||
[KLE link](http://www.keyboard-layout-editor.com/#/gists/86ec49f9f820a8b9b36f6e0d2ef8fff7)
|
||||
|
||||
## Layers
|
||||
| Layer | Legend |
|
||||
| ----- | ------ |
|
||||
| Base | Top left (black) |
|
||||
| Lower | Bottom right (red) |
|
||||
| Raise | Top right (orange) |
|
||||
| Adjust | Front print |
|
||||
|
||||
## Features
|
||||
* Raise/lower layers focus first on one-handed use
|
||||
* Numpad on right hand with raise layer
|
||||
* Navigation on left hand with lower layer (ESDF)
|
||||
* D refers to desktop left/right on Win 10 (win+ctrl+left/right)
|
||||
* Heavy use of hold/tap dual function keys - from left to right:
|
||||
* Cmd/Enter
|
||||
* Raise/Esc
|
||||
* Shift/Backspace
|
||||
* Ctrl/Space
|
||||
* Lower/Tab
|
||||
* Alt/Enter
|
||||
|
||||
|
||||
## Modifier Placement Rationale
|
||||
|
||||
There are several major driving forces at play:
|
||||
|
||||
* I use MacOS.
|
||||
* I'm Danish so the Alt and Shift-Alt layers in MacOS simply have to work.
|
||||
* I use Vim for coding.
|
||||
* I use org-mode in Emacs to keep track of my time.
|
||||
|
||||
* Space is on the right hand side because I almost exclusively use my right hand thumb for
|
||||
space.
|
||||
* Cmd is on the left since I often use Cmd+click to open a link in a new tab in Safari.
|
||||
* Due to my usage of Vim Esc got a spot on the modifier row.
|
||||
* Tab is on the right to enable easy navigation between winows with Cmd+Tab.
|
||||
* Shift is on the left since org-mode uses Ctrl+arrows to manipulate task state quickly,
|
||||
and since the arrow keys are activated using Lower (which has been moved to the right) and S, E, T,
|
||||
and D, it works well that way.
|
||||
* Ctrl is on the right since Ctrl+<0-9> is used in MacOS to switch between spaces.
|
||||
* Enter is on both sides since Enter is often used together with all of the modifiers. E.g.,
|
||||
Cmd+Enter to send mails in most situations, but Ctrl+Enter is used in Emacs to create a
|
||||
new task in org-mode.
|
||||
|
||||
This means that arrows and digits are being modified from the other hand, which could be
|
||||
bad for gaming, so if you're into that you might want to re-think a few things, but in
|
||||
that case you are probably using a Windows machine and then there are other constraints
|
||||
you have to deal with.
|
||||
|
||||
|
||||
@@ -46,35 +46,72 @@ void set_led_to(int led, uint8_t r, uint8_t g, uint8_t b) {
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
|
||||
__attribute__ ((weak))
|
||||
led_config_t g_led_config = { {
|
||||
{ 27, 26, 20, 19, 12, 11, 4, 3 },
|
||||
{ 28, 25, 21, 18, 13, 10, 5, 2 },
|
||||
{ 29, 24, 22, 17, 14, 9, 6, 1 },
|
||||
{ 30, 31, 23, 16, 15, 8, 7, 0 },
|
||||
{ 60, 59, 52, 51, 44, 43, 37, 36 },
|
||||
{ 61, 58, 53, 50, 45, 42, 38, 35 },
|
||||
{ 62, 57, 54, 49, 46, 41, 39, 34 },
|
||||
{ 63, 56, 55, 48, 47, 40, 32, 33 }
|
||||
}, {
|
||||
{ 3, 35 }, { 0, 26 }, { 0, 17 }, { 0, 6 }, { 14, 5 }, { 15, 16 }, { 16, 25 }, { 17, 34 },
|
||||
{ 31, 29 }, { 31, 19 }, { 30, 11 }, { 30, 1 }, { 45, 0 }, { 45, 8 }, { 46, 17 }, { 46, 27 },
|
||||
{ 60, 27 }, { 60, 18 }, { 60, 9 }, { 60, 0 }, { 74, 2 }, { 74, 11 }, { 75, 20 }, { 74, 28 },
|
||||
{ 89, 30 }, { 89, 19 }, { 89, 7 }, { 70, 38 }, { 82, 41 }, { 93, 45 }, { 104, 50 }, { 74, 64 },
|
||||
{ 149, 64 }, { 119, 50 }, { 130, 45 }, { 141, 41 }, { 153, 38 }, { 134, 7 }, { 134, 19 }, { 134, 30 },
|
||||
{ 149, 28 }, { 148, 20 }, { 149, 11 }, { 149, 2 }, { 163, 0 }, { 163, 9 }, { 163, 18 }, { 163, 27 },
|
||||
{ 177, 27 }, { 177, 17 }, { 178, 8 }, { 178, 0 }, { 193, 1 }, { 193, 11 }, { 192, 19 }, { 192, 29 },
|
||||
{ 206, 34 }, { 207, 25 }, { 208, 16 }, { 209, 5 }, { 224, 6 }, { 223, 17 }, { 223, 26 }, { 220, 35 }
|
||||
}, {
|
||||
4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 4, 4
|
||||
} };
|
||||
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
{{0x73}, { 3, 35}, 4},
|
||||
{{0x72}, { 0, 26}, 4},
|
||||
{{0x71}, { 0, 17}, 4},
|
||||
{{0x70}, { 0, 6}, 4},
|
||||
{{0x60}, { 14, 5}, 4},
|
||||
{{0x61}, { 15, 16}, 4},
|
||||
{{0x62}, { 16, 25}, 4},
|
||||
{{0x63}, { 17, 34}, 4},
|
||||
{{0x53}, { 31, 29}, 4},
|
||||
{{0x52}, { 31, 19}, 4},
|
||||
{{0x51}, { 30, 11}, 4},
|
||||
{{0x50}, { 30, 1}, 4},
|
||||
{{0x40}, { 45, 0}, 4},
|
||||
{{0x41}, { 45, 8}, 4},
|
||||
{{0x42}, { 46, 17}, 4},
|
||||
{{0x43}, { 46, 27}, 4},
|
||||
{{0x33}, { 60, 27}, 4},
|
||||
{{0x32}, { 60, 18}, 4},
|
||||
{{0x31}, { 60, 9}, 4},
|
||||
{{0x30}, { 60, 0}, 4},
|
||||
{{0x20}, { 74, 2}, 4},
|
||||
{{0x21}, { 74, 11}, 4},
|
||||
{{0x22}, { 75, 20}, 4},
|
||||
{{0x23}, { 74, 28}, 4},
|
||||
{{0x12}, { 89, 30}, 4},
|
||||
{{0x11}, { 89, 19}, 4},
|
||||
{{0x10}, { 89, 7}, 4},
|
||||
{{0x00}, { 70, 38}, 1},
|
||||
{{0x01}, { 82, 41}, 1},
|
||||
{{0x02}, { 93, 45}, 1},
|
||||
{{0x03}, {104, 50}, 1},
|
||||
{{0x13}, { 74, 64}, 1},
|
||||
{{0x67}, {149, 64}, 1},
|
||||
{{0x77}, {119, 50}, 1},
|
||||
{{0x76}, {130, 45}, 1},
|
||||
{{0x75}, {141, 41}, 1},
|
||||
{{0x74}, {153, 38}, 1},
|
||||
{{0x64}, {134, 7}, 4},
|
||||
{{0x65}, {134, 19}, 4},
|
||||
{{0x66}, {134, 30}, 4},
|
||||
{{0x57}, {149, 28}, 4},
|
||||
{{0x56}, {148, 20}, 4},
|
||||
{{0x55}, {149, 11}, 4},
|
||||
{{0x54}, {149, 2}, 4},
|
||||
{{0x44}, {163, 0}, 4},
|
||||
{{0x45}, {163, 9}, 4},
|
||||
{{0x46}, {163, 18}, 4},
|
||||
{{0x47}, {163, 27}, 4},
|
||||
{{0x37}, {177, 27}, 4},
|
||||
{{0x36}, {177, 17}, 4},
|
||||
{{0x35}, {178, 8}, 4},
|
||||
{{0x34}, {178, 0}, 4},
|
||||
{{0x24}, {193, 1}, 4},
|
||||
{{0x25}, {193, 11}, 4},
|
||||
{{0x26}, {192, 19}, 4},
|
||||
{{0x27}, {192, 29}, 4},
|
||||
{{0x17}, {206, 34}, 4},
|
||||
{{0x16}, {207, 25}, 4},
|
||||
{{0x15}, {208, 16}, 4},
|
||||
{{0x14}, {209, 5}, 4},
|
||||
{{0x04}, {224, 6}, 4},
|
||||
{{0x05}, {223, 17}, 4},
|
||||
{{0x06}, {223, 26}, 4},
|
||||
{{0x07}, {220, 35}, 4},
|
||||
};
|
||||
|
||||
static struct {
|
||||
uint8_t b;
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
/* Copyright 2019 MechMerlin
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "220.h"
|
||||
|
||||
// Optional override functions below.
|
||||
// You can leave any or all of these undefined.
|
||||
// These are only required if you want to perform custom actions.
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
setPinOutput(C6);
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
|
||||
writePinLow(C6);
|
||||
} else {
|
||||
writePinHigh(C6);
|
||||
}
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
/* Copyright 2019 MechMerlin
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
/* This a shortcut to help you visually see your layout.
|
||||
*
|
||||
* The first section contains all of the arguments representing the physical
|
||||
* layout of the board and position of the keys.
|
||||
*
|
||||
* The second converts the arguments into a two-dimensional array which
|
||||
* represents the switch matrix.
|
||||
*/
|
||||
#define LAYOUT_ortho_6x4( \
|
||||
K00, K01, K02, K03, \
|
||||
K10, K11, K12, K13, \
|
||||
K20, K21, K22, K23, \
|
||||
K30, K31, K32, K33, \
|
||||
K40, K41, K42, K43, \
|
||||
K50, K51, K52, K53 \
|
||||
) { \
|
||||
{ K00, K01, K02, K03 }, \
|
||||
{ K10, K11, K12, K13 }, \
|
||||
{ K20, K21, K22, K23 }, \
|
||||
{ K30, K31, K32, K33 }, \
|
||||
{ K40, K41, K42, K43 }, \
|
||||
{ K50, K51, K52, K53 } \
|
||||
}
|
||||
@@ -1,251 +0,0 @@
|
||||
/*
|
||||
Copyright 2019 MechMerlin
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Noxary
|
||||
#define PRODUCT 220
|
||||
#define DESCRIPTION A custom numpad
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 6
|
||||
#define MATRIX_COLS 4
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { C4, B0, D3, D4, D5, D6 }
|
||||
#define MATRIX_COL_PINS { B4, C5, D2, D1 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/*
|
||||
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||
*/
|
||||
#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||
|
||||
#define BACKLIGHT_PIN B7
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
// #define RGB_DI_PIN E2
|
||||
// #ifdef RGB_DI_PIN
|
||||
// #define RGBLED_NUM 16
|
||||
// #define RGBLIGHT_HUE_STEP 8
|
||||
// #define RGBLIGHT_SAT_STEP 8
|
||||
// #define RGBLIGHT_VAL_STEP 8
|
||||
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||
// /*== all animations enable ==*/
|
||||
// #define RGBLIGHT_ANIMATIONS
|
||||
// /*== or choose animations ==*/
|
||||
// #define RGBLIGHT_EFFECT_BREATHING
|
||||
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
// #define RGBLIGHT_EFFECT_SNAKE
|
||||
// #define RGBLIGHT_EFFECT_KNIGHT
|
||||
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
// #define RGBLIGHT_EFFECT_RGB_TEST
|
||||
// #define RGBLIGHT_EFFECT_ALTERNATING
|
||||
// /*== customize breathing effect ==*/
|
||||
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
||||
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
||||
// /*==== use exp() and sin() ====*/
|
||||
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
||||
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
||||
// #endif
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||
*/
|
||||
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
/* defined by default; to change, uncomment and set to the combination you want */
|
||||
// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP H
|
||||
//#define MAGIC_KEY_HELP_ALT SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER0_ALT GRAVE
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER B
|
||||
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
//#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||
|
||||
/*
|
||||
* HD44780 LCD Display Configuration
|
||||
*/
|
||||
/*
|
||||
#define LCD_LINES 2 //< number of visible lines of the display
|
||||
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||
|
||||
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||
|
||||
#if LCD_IO_MODE
|
||||
#define LCD_PORT PORTB //< port for the LCD lines
|
||||
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||
#define LCD_RS_PIN 3 //< pin for RS line
|
||||
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||
#define LCD_RW_PIN 2 //< pin for RW line
|
||||
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||
#define LCD_E_PIN 1 //< pin for Enable line
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* Bootmagic Lite key configuration */
|
||||
// #define BOOTMAGIC_LITE_ROW 0
|
||||
// #define BOOTMAGIC_LITE_COLUMN 0
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"keyboard_name": "Noxary 220",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 4,
|
||||
"height": 6.5,
|
||||
"layouts": {
|
||||
"LAYOUT_ortho_6x4": {
|
||||
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":0, "y":2.5}, {"x":1, "y":2.5}, {"x":2, "y":2.5}, {"x":3, "y":2.5}, {"x":0, "y":3.5}, {"x":1, "y":3.5}, {"x":2, "y":3.5}, {"x":3, "y":3.5}, {"x":0, "y":4.5}, {"x":1, "y":4.5}, {"x":2, "y":4.5}, {"x":3, "y":4.5}, {"x":0, "y":5.5}, {"x":1, "y":5.5}, {"x":2, "y":5.5}, {"x":3, "y":5.5}]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
/* Copyright 2019 MechMerlin
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// place overrides here
|
||||
@@ -1,76 +0,0 @@
|
||||
/* Copyright 2019 Rozakiin
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Defines the keycodes used by our macros in process_record_user
|
||||
enum custom_keycodes {
|
||||
QMKBEST = SAFE_RANGE,
|
||||
QMKURL
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
LAYOUT_ortho_6x4(
|
||||
KC_ESC, BL_TOGG, BL_DEC, BL_INC,
|
||||
KC_NLCK, KC_SLSH, KC_ASTR, KC_PEQL,
|
||||
KC_7, KC_8, KC_9, KC_PMNS,
|
||||
KC_4, KC_5, KC_6, KC_PPLS,
|
||||
KC_1, KC_2, KC_3, KC_PENT,
|
||||
KC_0, KC_0, KC_DEL, KC_PENT),
|
||||
|
||||
LAYOUT_ortho_6x4(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QMKBEST:
|
||||
if (record->event.pressed) {
|
||||
// when keycode QMKBEST is pressed
|
||||
SEND_STRING("QMK is the best thing ever!");
|
||||
} else {
|
||||
// when keycode QMKBEST is released
|
||||
}
|
||||
break;
|
||||
case QMKURL:
|
||||
if (record->event.pressed) {
|
||||
// when keycode QMKURL is pressed
|
||||
SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
|
||||
} else {
|
||||
// when keycode QMKURL is released
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
# The default keymap for Noxary 220
|
||||
@@ -1,13 +0,0 @@
|
||||
# Noxary 220
|
||||
|
||||
A fully customizable numpad
|
||||
|
||||
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [Rozakiin](https://github.com/rozakiin)
|
||||
Hardware Supported: Noxary 220 PCB
|
||||
Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=95660.0)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make noxary/220:default
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||
@@ -1,83 +0,0 @@
|
||||
# MCU name
|
||||
#MCU = at90usb1286
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# atmega32a bootloadHID
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
|
||||
# If you don't know the bootloader type, then you can specify the
|
||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
||||
|
||||
LAYOUTS = ortho_6x4
|
||||
@@ -1,61 +0,0 @@
|
||||
/* Copyright 2019 MechMerlin
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "260.h"
|
||||
|
||||
// Optional override functions below.
|
||||
// You can leave any or all of these undefined.
|
||||
// These are only required if you want to perform custom actions.
|
||||
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
setPinOutput(B1);
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
/*
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
||||
writePinLow(B1);
|
||||
} else {
|
||||
writePinHigh(B1);
|
||||
}
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
/* Copyright 2019 MechMerlin
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
/* This a shortcut to help you visually see your layout.
|
||||
*
|
||||
* The first section contains all of the arguments representing the physical
|
||||
* layout of the board and position of the keys.
|
||||
*
|
||||
* The second converts the arguments into a two-dimensional array which
|
||||
* represents the switch matrix.
|
||||
*/
|
||||
#define LAYOUT( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \
|
||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, \
|
||||
K400, K401, K402, K406, K410, K411, K412, K414 \
|
||||
) { \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114 }, \
|
||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \
|
||||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, K314 }, \
|
||||
{ K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, KC_NO, K414 } \
|
||||
}
|
||||
@@ -1,251 +0,0 @@
|
||||
/*
|
||||
Copyright 2019 MechMerlin
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0x4E58
|
||||
#define PRODUCT_ID 0x003C
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Noxary
|
||||
#define PRODUCT 260
|
||||
#define DESCRIPTION A custom 60% keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 15
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { F7, F6, F5, F0, B5 }
|
||||
#define MATRIX_COL_PINS { C7, C6, B6, F4, E6, D0, B4, D1, D2, D3, D7, D6, D4, F1, D5 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/*
|
||||
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
|
||||
*/
|
||||
#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||
|
||||
#define BACKLIGHT_PIN B7
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
// #define RGB_DI_PIN E2
|
||||
// #ifdef RGB_DI_PIN
|
||||
// #define RGBLED_NUM 16
|
||||
// #define RGBLIGHT_HUE_STEP 8
|
||||
// #define RGBLIGHT_SAT_STEP 8
|
||||
// #define RGBLIGHT_VAL_STEP 8
|
||||
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||
// /*== all animations enable ==*/
|
||||
// #define RGBLIGHT_ANIMATIONS
|
||||
// /*== or choose animations ==*/
|
||||
// #define RGBLIGHT_EFFECT_BREATHING
|
||||
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
// #define RGBLIGHT_EFFECT_SNAKE
|
||||
// #define RGBLIGHT_EFFECT_KNIGHT
|
||||
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
// #define RGBLIGHT_EFFECT_RGB_TEST
|
||||
// #define RGBLIGHT_EFFECT_ALTERNATING
|
||||
// /*== customize breathing effect ==*/
|
||||
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
||||
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
||||
// /*==== use exp() and sin() ====*/
|
||||
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
||||
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
||||
// #endif
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||
*/
|
||||
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
/* defined by default; to change, uncomment and set to the combination you want */
|
||||
// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP H
|
||||
//#define MAGIC_KEY_HELP_ALT SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER0_ALT GRAVE
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER B
|
||||
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
//#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||
|
||||
/*
|
||||
* HD44780 LCD Display Configuration
|
||||
*/
|
||||
/*
|
||||
#define LCD_LINES 2 //< number of visible lines of the display
|
||||
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||
|
||||
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||
|
||||
#if LCD_IO_MODE
|
||||
#define LCD_PORT PORTB //< port for the LCD lines
|
||||
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||
#define LCD_RS_PIN 3 //< pin for RS line
|
||||
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||
#define LCD_RW_PIN 2 //< pin for RW line
|
||||
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||
#define LCD_E_PIN 1 //< pin for Enable line
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* Bootmagic Lite key configuration */
|
||||
// #define BOOTMAGIC_LITE_ROW 0
|
||||
// #define BOOTMAGIC_LITE_COLUMN 0
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user