forked from Github/qmk_firmware
Compare commits
51 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
670a9b7f83 | ||
![]() |
acd3e79add | ||
![]() |
8680c50d07 | ||
![]() |
8bcefc92d0 | ||
![]() |
547eb55553 | ||
![]() |
7209266ea1 | ||
![]() |
4ed474b66a | ||
![]() |
3220b24819 | ||
![]() |
fd0ba01d68 | ||
![]() |
7c0f2ae6d1 | ||
![]() |
93a97ec6e5 | ||
![]() |
b68d8fe82e | ||
![]() |
4cdb86c730 | ||
![]() |
e8b27a965d | ||
![]() |
9b46fabe08 | ||
![]() |
8e3cbe030c | ||
![]() |
7e1d28673f | ||
![]() |
94f104cb6c | ||
![]() |
0db65190c2 | ||
![]() |
2b78840ef7 | ||
![]() |
b32ad8b90c | ||
![]() |
831d765b52 | ||
![]() |
8d46bb9cab | ||
![]() |
c6184d2e7e | ||
![]() |
ec302295b6 | ||
![]() |
f542c0589b | ||
![]() |
d53cbd2dc6 | ||
![]() |
5c4707eafc | ||
![]() |
819364ea23 | ||
![]() |
b9c38cfec8 | ||
![]() |
d591ab6263 | ||
![]() |
7871a465d3 | ||
![]() |
fd23a0e909 | ||
![]() |
62ba66d618 | ||
![]() |
febaf9dec4 | ||
![]() |
6464dfc91d | ||
![]() |
d3f3da5112 | ||
![]() |
7dcf9237d5 | ||
![]() |
bce391a663 | ||
![]() |
2835a70749 | ||
![]() |
94c4b6bd74 | ||
![]() |
f5b9690ec7 | ||
![]() |
16f367348a | ||
![]() |
aa65cd7a90 | ||
![]() |
86532fa8d3 | ||
![]() |
0f0062b492 | ||
![]() |
9d5b4ec975 | ||
![]() |
e52930df24 | ||
![]() |
60eae7335b | ||
![]() |
af89752bff | ||
![]() |
c7f8548d9a |
4
Vagrantfile
vendored
4
Vagrantfile
vendored
@@ -7,6 +7,8 @@ Vagrant.configure(2) do |config|
|
||||
|
||||
# VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit
|
||||
config.vm.box = "generic/debian9"
|
||||
|
||||
config.vm.synced_folder '.', '/vagrant'
|
||||
|
||||
# This section allows you to customize the Virtualbox VM
|
||||
# settings, ie showing the GUI or upping the memory
|
||||
@@ -64,7 +66,7 @@ Vagrant.configure(2) do |config|
|
||||
# If this causes issues you can run a 'vagrant destroy' and then
|
||||
# add a # before ,run: (or change "always" to "once") and run 'vagrant up' to get a working
|
||||
# non-updated box and then attempt to troubleshoot or open a Github issue
|
||||
config.vm.provision "shell", inline: "/bin/sh -c 'yes | /vagrant/util/qmk_install.sh'", run: "always"
|
||||
config.vm.provision "shell", inline: "/vagrant/util/qmk_install.sh", run: "always"
|
||||
|
||||
config.vm.post_up_message = <<-EOT
|
||||
|
||||
|
@@ -30,9 +30,11 @@ 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`:
|
||||
@@ -124,21 +126,25 @@ Configure the hardware via your `config.h`:
|
||||
|
||||
---
|
||||
|
||||
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:
|
||||
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:
|
||||
|
||||
```C
|
||||
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},
|
||||
....
|
||||
}
|
||||
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
|
||||
} };
|
||||
```
|
||||
|
||||
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:
|
||||
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:
|
||||
|
||||
```C
|
||||
x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION
|
||||
@@ -147,7 +153,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.
|
||||
|
||||
`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.
|
||||
`// 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
|
||||
|
||||
@@ -155,8 +161,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 thes LED has no flags. |
|
||||
|`#define LED_FLAG_ALL 0xFF` |If thes LED has all flags. |
|
||||
|`#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_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. |
|
||||
@@ -191,13 +197,18 @@ enum rgb_matrix_effects {
|
||||
RGB_MATRIX_CYCLE_ALL, // Full keyboard solid hue cycling through full gradient
|
||||
RGB_MATRIX_CYCLE_LEFT_RIGHT, // Full gradient scrolling left to right
|
||||
RGB_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom
|
||||
RGB_MATRIX_CYCLE_OUT_IN, // Full gradient scrolling out to in
|
||||
RGB_MATRIX_CYCLE_OUT_IN_DUAL, // Full dual gradients scrolling out to in
|
||||
RGB_MATRIX_RAINBOW_MOVING_CHEVRON, // Full gradent Chevron shapped scrolling left to right
|
||||
RGB_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard
|
||||
RGB_MATRIX_RAINBOW_BEACON, // Full tighter gradient spinning around center of keyboard
|
||||
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
|
||||
@@ -227,12 +238,15 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con
|
||||
|`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` |
|
||||
|`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` |
|
||||
|`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` |
|
||||
|`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN` |Disables `RGB_MATRIX_CYCLE_OUT_IN` |
|
||||
|`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL` |Disables `RGB_MATRIX_CYCLE_OUT_IN_DUAL` |
|
||||
|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |
|
||||
|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` |
|
||||
|`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` |
|
||||
|`#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.
|
||||
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.
|
||||
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>
|
||||
|
||||
## Keycodes
|
||||
|
||||
@@ -77,8 +77,7 @@ 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|
|
||||
|
||||
## Animations
|
||||
|
||||
## Effects and 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:
|
||||
@@ -100,29 +99,54 @@ 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.
|
||||
|
||||
The following options can be used to tweak the various animations:
|
||||
### 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:
|
||||
|
||||
|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_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_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel |
|
||||
|`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_RAINBOW_SWIRL_RANGE` |`255` |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:
|
||||
|
||||
@@ -152,44 +176,100 @@ const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64};
|
||||
|
||||
If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h) for the full list, but the most commonly used functions include:
|
||||
|
||||
|Function |Description |
|
||||
|--------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
|`rgblight_enable()` |Turn LEDs on, based on their previous state |
|
||||
|`rgblight_enable_noeeprom()` |Turn LEDs on, based on their previous state (not written to EEPROM) |
|
||||
|`rgblight_disable()` |Turn LEDs off |
|
||||
|`rgblight_disable_noeeprom()` |Turn LEDs off (not written to EEPROM) |
|
||||
|`rgblight_mode(x)` |Set the mode, if RGB animations are enabled |
|
||||
|`rgblight_mode_noeeprom(x)` |Set the mode, if RGB animations are enabled (not written to EEPROM) |
|
||||
|`rgblight_setrgb(r, g, b)` |Set all LEDs to the given RGB value where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_setrgb_at(r, g, b, led)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM) |
|
||||
### Utility Functions
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------------------------------------------------------------|
|
||||
|`sethsv(hue, sat, val, ledbuf)` |Set ledbuf to the given HSV value |
|
||||
|`sethsv_raw(hue, sat, val, ledbuf)` |Set ledbuf to the given HSV value without RGBLIGHT_LIMIT_VAL check |
|
||||
|`setrgb(r, g, b, ledbuf)` |Set ledbuf to the given RGB value where `r`/`g`/`b` |
|
||||
|
||||
### Low level Functions
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------------------------------------|
|
||||
|`rgblight_set()` |Flash out led buffers to LEDs |
|
||||
|`rgblight_set_clipping_range(pos, num)` |Set clipping Range. see [Clipping Range](#clipping-range) |
|
||||
|
||||
Example:
|
||||
```c
|
||||
sethsv(HSV_WHITE, (LED_TYPE *)&led[0]); // led 0
|
||||
sethsv(HSV_RED, (LED_TYPE *)&led[1]); // led 1
|
||||
sethsv(HSV_GREEN, (LED_TYPE *)&led[2]); // led 2
|
||||
rgblight_set(); // Utility functions do not call rgblight_set() automatically, so they need to be called explicitly.
|
||||
```
|
||||
|
||||
### Effects and Animations Functions
|
||||
#### effect range setting
|
||||
|Function |Description |
|
||||
|--------------------------------------------|------------------|
|
||||
|`rgblight_set_effect_range(pos, num)` |Set Effects Range |
|
||||
|
||||
#### direct operation
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`rgblight_setrgb_at(r, g, b, index)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `index` is between 0 and `RGBLED_NUM` (not written to EEPROM) |
|
||||
|`rgblight_sethsv_at(h, s, v, index)` |Set a single LED to the given HSV value, where `h`/`s`/`v` are between 0 and 255, and `index` is between 0 and `RGBLED_NUM` (not written to EEPROM) |
|
||||
|`rgblight_setrgb_range(r, g, b, start, end)`|Set a continuous range of LEDs to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
||||
|`rgblight_setrgb_master(r, g, b)` |Set the LEDs on the master side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_setrgb_slave(r, g, b)` |Set the LEDs on the slave side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_sethsv(h, s, v)` |Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 |
|
||||
|`rgblight_sethsv_noeeprom(h, s, v)` |Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_sethsv_at(h, s, v, led)` |Set a single LED to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255, and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
||||
|`rgblight_sethsv_range(h, s, v, start, end)`|Set a continuous range of LEDs to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255, and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
||||
|`rgblight_sethsv_master(h, s, v)` |Set the LEDs on the master side to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_sethsv_slave(h, s, v)` |Set the LEDs on the slave side to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_toggle()` |Toggle all LEDs between on and off |
|
||||
|`rgblight_toggle_noeeprom()` |Toggle all LEDs between on and off (not written to EEPROM) |
|
||||
|`rgblight_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations |
|
||||
|`rgblight_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) |
|
||||
|`rgblight_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations |
|
||||
|`rgblight_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) |
|
||||
|`rgblight_increase_hue()` |Increase the hue for all LEDs. This wraps around at maximum hue |
|
||||
|`rgblight_increase_hue_noeeprom()` |Increase the hue for all LEDs. This wraps around at maximum hue (not written to EEPROM) |
|
||||
|`rgblight_decrease_hue()` |Decrease the hue for all LEDs. This wraps around at minimum hue |
|
||||
|`rgblight_decrease_hue_noeeprom()` |Decrease the hue for all LEDs. This wraps around at minimum hue (not written to EEPROM) |
|
||||
|`rgblight_increase_sat()` |Increase the saturation for all LEDs. This wraps around at maximum saturation |
|
||||
|`rgblight_increase_sat_noeeprom()` |Increase the saturation for all LEDs. This wraps around at maximum saturation (not written to EEPROM) |
|
||||
|`rgblight_decrease_sat()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation |
|
||||
|`rgblight_decrease_sat_noeeprom()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation (not written to EEPROM) |
|
||||
|`rgblight_increase_val()` |Increase the value for all LEDs. This wraps around at maximum value |
|
||||
|`rgblight_increase_val_noeeprom()` |Increase the value for all LEDs. This wraps around at maximum value (not written to EEPROM) |
|
||||
|`rgblight_decrease_val()` |Decrease the value for all LEDs. This wraps around at minimum value |
|
||||
|`rgblight_decrease_val_noeeprom()` |Decrease the value for all LEDs. This wraps around at minimum value (not written to EEPROM) |
|
||||
|`rgblight_set_clipping_range(pos, num)` |Set clipping Range |
|
||||
|`rgblight_sethsv_range(h, s, v, start, end)`|Set a continuous range of LEDs to the given HSV value, where `h`/`s`/`v` are between 0 and 255, and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
||||
|`rgblight_setrgb(r, g, b)` |Set effect range LEDs to the given RGB value where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_setrgb_master(r, g, b)` |Set the LEDs on the master side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_setrgb_slave(r, g, b)` |Set the LEDs on the slave side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_sethsv_master(h, s, v)` |Set the LEDs on the master side to the given HSV value, where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_sethsv_slave(h, s, v)` |Set the LEDs on the slave side to the given HSV value, where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||
|
||||
Example:
|
||||
```c
|
||||
rgblight_sethsv(HSV_WHITE, 0); // led 0
|
||||
rgblight_sethsv(HSV_RED, 1); // led 1
|
||||
rgblight_sethsv(HSV_GREEN, 2); // led 2
|
||||
// The above functions automatically calls rgblight_set(), so there is no need to call it explicitly.
|
||||
// Note that it is inefficient to call repeatedly.
|
||||
```
|
||||
|
||||
#### effect mode change
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`rgblight_mode(x)` |Set the mode, if RGB animations are enabled |
|
||||
|`rgblight_mode_noeeprom(x)` |Set the mode, if RGB animations are enabled (not written to EEPROM) |
|
||||
|`rgblight_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations |
|
||||
|`rgblight_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) |
|
||||
|`rgblight_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations |
|
||||
|`rgblight_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) |
|
||||
|
||||
#### effects mode disable/enable
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`rgblight_toggle()` |Toggle effect range LEDs between on and off |
|
||||
|`rgblight_toggle_noeeprom()` |Toggle effect range LEDs between on and off (not written to EEPROM) |
|
||||
|`rgblight_enable()` |Turn effect range LEDs on, based on their previous state |
|
||||
|`rgblight_enable_noeeprom()` |Turn effect range LEDs on, based on their previous state (not written to EEPROM) |
|
||||
|`rgblight_disable()` |Turn effect range LEDs off |
|
||||
|`rgblight_disable_noeeprom()` |Turn effect range LEDs off (not written to EEPROM) |
|
||||
|
||||
#### hue, sat, val change
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`rgblight_increase_hue()` |Increase the hue for effect range LEDs. This wraps around at maximum hue |
|
||||
|`rgblight_increase_hue_noeeprom()` |Increase the hue for effect range LEDs. This wraps around at maximum hue (not written to EEPROM) |
|
||||
|`rgblight_decrease_hue()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue |
|
||||
|`rgblight_decrease_hue_noeeprom()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue (not written to EEPROM) |
|
||||
|`rgblight_increase_sat()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation |
|
||||
|`rgblight_increase_sat_noeeprom()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation (not written to EEPROM) |
|
||||
|`rgblight_decrease_sat()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation |
|
||||
|`rgblight_decrease_sat_noeeprom()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation (not written to EEPROM) |
|
||||
|`rgblight_increase_val()` |Increase the value for effect range LEDs. This wraps around at maximum value |
|
||||
|`rgblight_increase_val_noeeprom()` |Increase the value for effect range LEDs. This wraps around at maximum value (not written to EEPROM) |
|
||||
|`rgblight_decrease_val()` |Decrease the value for effect range LEDs. This wraps around at minimum value |
|
||||
|`rgblight_decrease_val_noeeprom()` |Decrease the value for effect range LEDs. This wraps around at minimum value (not written to EEPROM) |
|
||||
|`rgblight_sethsv(h, s, v)` |Set effect range LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 |
|
||||
|`rgblight_sethsv_noeeprom(h, s, v)` |Set effect range LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||
|
||||
#### query
|
||||
|Function |Description |
|
||||
|-----------------------|-----------------|
|
||||
|`rgblight_get_mode()` |Get current mode |
|
||||
|`rgblight_get_hue()` |Get current hue |
|
||||
|`rgblight_get_sat()` |Get current sat |
|
||||
|`rgblight_get_val()` |Get current val |
|
||||
|
||||
## Colors
|
||||
|
||||
@@ -300,4 +380,6 @@ In addition to setting the Clipping Range, you can use `RGBLIGHT_LED_MAP` togeth
|
||||
```
|
||||
<img src="https://user-images.githubusercontent.com/2170248/55743747-119e4c00-5a6e-11e9-91e5-013203ffae8a.JPG" alt="clip mapped" width="70%"/>
|
||||
|
||||
## Hardware Modification
|
||||
|
||||
If your keyboard lacks onboard underglow LEDs, you may often be able to solder on an RGB LED strip yourself. You will need to find an unused pin to wire to the data pin of your LED strip. Some keyboards may break out unused pins from the MCU to make soldering easier. The other two pins, VCC and GND, must also be connected to the appropriate power pins.
|
||||
|
@@ -20,7 +20,7 @@ Firstly, in your keymap, do one of the following:
|
||||
|`KC_RCPC` |Right Control when held, `)` when tapped |
|
||||
|`KC_LAPO` |Left Alt when held, `(` when tapped |
|
||||
|`KC_RAPC` |Right Alt when held, `)` when tapped |
|
||||
|`KC_SFTENT`|Right Shift when held, `Enter` when tapped |
|
||||
|`KC_SFTENT`|Right Shift when held, Enter when tapped |
|
||||
|
||||
## Caveats
|
||||
|
||||
@@ -38,10 +38,10 @@ By default Space Cadet assumes a US ANSI layout, but if your layout uses differe
|
||||
|----------------|-------------------------------|---------------------------------------------------------------------------------|
|
||||
|`LSPO_KEYS` |`KC_LSFT, LSPO_MOD, LSPO_KEY` |Send `KC_LSFT` when held, the mod and key defined by `LSPO_MOD` and `LSPO_KEY`. |
|
||||
|`RSPC_KEYS` |`KC_RSFT, RSPC_MOD, RSPC_KEY` |Send `KC_RSFT` when held, the mod and key defined by `RSPC_MOD` and `RSPC_KEY`. |
|
||||
|`LCPO_KEYS` |`KC_LCTL, KC_LCTL, KC_9` |Send `KC_LCTL` when held, the mod `KC_LCTL` with the key `KC_9` when tapped. |
|
||||
|`RCPC_KEYS` |`KC_RCTL, KC_RCTL, KC_0` |Send `KC_RCTL` when held, the mod `KC_RCTL` with the key `KC_0` when tapped. |
|
||||
|`LAPO_KEYS` |`KC_LALT, KC_LALT, KC_9` |Send `KC_LALT` when held, the mod `KC_LALT` with the key `KC_9` when tapped. |
|
||||
|`RAPC_KEYS` |`KC_RALT, KC_RALT, KC_0` |Send `KC_RALT` when held, the mod `KC_RALT` with the key `KC_0` when tapped. |
|
||||
|`LCPO_KEYS` |`KC_LCTL, KC_LSFT, KC_9` |Send `KC_LCTL` when held, the mod `KC_LSFT` with the key `KC_9` when tapped. |
|
||||
|`RCPC_KEYS` |`KC_RCTL, KC_RSFT, KC_0` |Send `KC_RCTL` when held, the mod `KC_RSFT` with the key `KC_0` when tapped. |
|
||||
|`LAPO_KEYS` |`KC_LALT, KC_LSFT, KC_9` |Send `KC_LALT` when held, the mod `KC_LSFT` with the key `KC_9` when tapped. |
|
||||
|`RAPC_KEYS` |`KC_RALT, KC_RSFT, KC_0` |Send `KC_RALT` when held, the mod `KC_RSFT` with the key `KC_0` when tapped. |
|
||||
|`SFTENT_KEYS` |`KC_RSFT, KC_TRNS, SFTENT_KEY` |Send `KC_RSFT` when held, no mod with the key `SFTENT_KEY` when tapped. |
|
||||
|
||||
|
||||
|
@@ -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_shift.md) - Use your left/right shift keys to type parenthesis and brackets.
|
||||
* [Space Cadet](feature_space_cadet.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.
|
||||
|
@@ -216,6 +216,11 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|`KC_GESC` |`GRAVE_ESC`|Escape when tapped, <code>`</code> when pressed with Shift or GUI|
|
||||
|`KC_LSPO` | |Left Shift when held, `(` when tapped |
|
||||
|`KC_RSPC` | |Right Shift when held, `)` when tapped |
|
||||
|`KC_LCPO` | |Left Control when held, `(` when tapped |
|
||||
|`KC_RCPC` | |Right Control when held, `)` when tapped |
|
||||
|`KC_LAPO` | |Left Alt when held, `(` when tapped |
|
||||
|`KC_RAPC` | |Right Alt when held, `)` when tapped |
|
||||
|`KC_SFTENT` | |Right Shift when held, Enter when tapped |
|
||||
|`KC_LEAD` | |The [Leader key](feature_leader_key.md) |
|
||||
|`KC_LOCK` | |The [Lock key](feature_key_lock.md) |
|
||||
|`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) |
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Quantum Keycodes
|
||||
|
||||
Quantum keycodes allow for easier customisation of your keymap than the basic ones provide, without having to define custom actions.
|
||||
Quantum keycodes allow for easier customization of your keymap than the basic ones provide, without having to define custom actions.
|
||||
|
||||
All keycodes within quantum are numbers between `0x0000` and `0xFFFF`. Within your `keymap.c` it may look like you have functions and other special cases, but ultimately the C preprocessor will translate those into a single 4 byte integer. QMK has reserved `0x0000` through `0x00FF` for standard keycodes. These are keycodes such as `KC_A`, `KC_1`, and `KC_LCTL`, which are basic keys defined in the USB HID specification.
|
||||
|
||||
@@ -16,6 +16,11 @@ On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are
|
||||
|`KC_GESC` |`GRAVE_ESC`|Escape when tapped, <code>`</code> when pressed with Shift or GUI|
|
||||
|`KC_LSPO` | |Left Shift when held, `(` when tapped |
|
||||
|`KC_RSPC` | |Right Shift when held, `)` when tapped |
|
||||
|`KC_LCPO` | |Left Control when held, `(` when tapped |
|
||||
|`KC_RCPC` | |Right Control when held, `)` when tapped |
|
||||
|`KC_LAPO` | |Left Alt when held, `(` when tapped |
|
||||
|`KC_RAPC` | |Right Alt when held, `)` when tapped |
|
||||
|`KC_SFTENT` | |Right Shift when held, Enter when tapped |
|
||||
|`KC_LEAD` | |The [Leader key](feature_leader_key.md) |
|
||||
|`KC_LOCK` | |The [Lock key](feature_key_lock.md) |
|
||||
|`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) |
|
||||
|
205
docs/zh-cn/contributing.md
Normal file
205
docs/zh-cn/contributing.md
Normal file
@@ -0,0 +1,205 @@
|
||||
# 如何做贡献
|
||||
|
||||
👍🎉 首先感谢各位百忙之中抽空阅读本文档,并为我们无私奉献。给您点赞啦! 🎉👍
|
||||
|
||||
第三方的帮助让Q酱成长了许多呢,Q酱也从你们那学到了不少新东西。Q酱希望每一个想帮助我的人都能很方便的做出有用的贡献。在这里我给摩拳擦掌的你们写了一点引导,让你们的代码在不对我做重大改动的情况下都能成功的被采纳哦。
|
||||
|
||||
* [项目概况](#项目概况)
|
||||
* [代码规范](#代码规范)
|
||||
* [一般教程](#一般教程)
|
||||
* [行为守则对于我来说有何意义?](#行为守则对于我来说有何意义?)
|
||||
|
||||
## 这文章巨长无比不想读啊! 我就想问个问题而已!
|
||||
|
||||
您要是想问关于Q酱的问题的话可以在[OLKB Subreddit](https://reddit.com/r/olkb)或者是[Discord](https://discord.gg/Uq7gcHh)随意问。
|
||||
|
||||
请记住:
|
||||
|
||||
* 维护Q酱的小可爱有的时候可能会有点忙,不能及时回答您的问题,耐心等等,他们都是很nice的人呀。
|
||||
* 维护Q酱的人都是很无私的善良的人。无论是贡献代码还是回答问题,都是义务的。有时见到他们努力回答各种问题,解决各种BUG,Q酱也是很心疼的。
|
||||
* 您可以看看下面的教程,可以让您的问题浅显易懂,更容易回答:
|
||||
* https://opensource.com/life/16/10/how-ask-technical-questions
|
||||
* http://www.catb.org/esr/faqs/smart-questions.html
|
||||
|
||||
# 项目概况
|
||||
|
||||
Q酱很大一部分是用C语言组成的,不过有一小部分特性是C++的。怎么说呢,都是我的一部分,两个我都爱。Q酱一般是在键盘上的嵌入式处理器那里工作的,尤其与AVR([LUFA](http://www.fourwalledcubicle.com/LUFA.php))和ARM ([ChibiOS](http://www.chibios.com))两小哥哥搭配,干活不累,嘻嘻。如果您精通Arduino的话您会发现很多熟悉的概念,但也有点不爽,因为您以前的经验可能没法用来帮助Q酱。
|
||||
|
||||
<!-- 需要修正: 这里放些学习C语言的资源。另外感谢修正的小可爱。谢谢您了。-->
|
||||
|
||||
# Q酱,我在哪能帮助你嘞?
|
||||
|
||||
您要是有问题的话可以 [提出一个issue](https://github.com/qmk/qmk_firmware/issues) 或 [在Discord上交流一下](https://discord.gg/Uq7gcHh).
|
||||
|
||||
# Q酱,我如何帮助你?
|
||||
|
||||
您以前是否没为开源贡献过代码,而又想知道帮助Q酱是怎么一回事? 稍安勿躁,咱给您总结一下!
|
||||
|
||||
0. 先注册一个 [GitHub](https://github.com) 账户。
|
||||
1. 做好一个你要贡献的布局,那就要 [找一个你想解决的问题](https://github.com/qmk/qmk_firmware/issues),或者 [找一个你想添加的特性](https://github.com/qmk/qmk_firmware/issues?q=is%3Aopen+is%3Aissue+label%3Afeature)。
|
||||
2. 把关联着问题的仓库分叉(fork)到你的仓库。这样你在`你的GitHub用户名/qmk_firmware`就有一个仓库备份啦。
|
||||
3. 使用 `git clone https://github.com/此处添GitHub用户名/此处添仓库名.git`这个命令把仓库同步到你的电脑中。
|
||||
4. 您要是想开发一个新特性的话可以先创建一个issue和Q酱的维护者讨论一下您要做什么。
|
||||
5. 使用`git checkout -b 此处写分支名字(别用汉字)`命令来创建一个分支(branch)用于开发。
|
||||
6. 对要解决的问题或要添加的特性进行适当的更改。
|
||||
7. 使用 `git add 把改变的文件的目录写这里` 可以添加改变的文件内容到git用于管理工程状态的索引(快照)里。
|
||||
8. 使用 `git commit -m "这里写修改的相关信息"` 来描述你做出了什么修改。
|
||||
9. 使用 `git push origin 此处写分支名字`来把你的更改同步到GitHub库里(反正不是打篮球那个库里)。
|
||||
10. 提交一个[QMK 固件的pull request](https://github.com/qmk/qmk_firmware/pull/new/master)。
|
||||
11. 给你的pull request拟一个标题,包括简短的描述和问题或错误代码。比如, 你可以起一个这样的"Added more log outputting to resolve #4352"(最好用英语,毕竟Q酱的中文也不是那么的溜,有可能会看不懂中文)。
|
||||
12. 在描述(description)里面写你做了哪些更改,你的代码里还存在什么问题, 或者你想问维护的小可爱们的问题。你的your pull request有点小问题无伤大雅(本来也没有完美的代码嘛), 维护的小可爱们会竭尽全力帮您改进的!
|
||||
13. 维护人员审查代码可能需要一些时间。
|
||||
14. 维护人员会通知您要更改什么地方,然后您就按照建议改一改。
|
||||
15. 预祝您合并成功!
|
||||
|
||||
# 代码规范
|
||||
|
||||
其实也没有什么特别严格的规范啦,但是俗话说的好:没有规矩,不成方圆。您可以看一下您的要改动的代码周围的画风,然后保持队形。如果你感觉周围都不知道是什么牛鬼蛇神的话就看看下面的建议:
|
||||
|
||||
* 我们用肆(4)个空格来缩进(软件中也可以设置到Tab键)
|
||||
* 我们使用改良的1TBS(允许单行样式)
|
||||
* 左大括号: 在开放性语句块那行的末尾
|
||||
* 右大括号: 和开放性语句块第一个字母对齐
|
||||
* Else If: 将右大括号放在行的开头,下一个左大括号放在同一行的结尾
|
||||
* 可选大括号: 可选大括号是必选的
|
||||
* 应该这样: if (condition) { return false; }
|
||||
* 不应该这样: if (condition) return false;
|
||||
* 建议使用C语言风格的注释: `/* */`
|
||||
* 把注释想象成一个描述特征的故事
|
||||
* 充分使用注释来描述你为何这样修改
|
||||
* 有些公认的东西就不要写到注释里面了
|
||||
* 如果你不知道注释是否多余,看下面
|
||||
* 一般不要主动换行,主动换行的话每行不要超过76列
|
||||
* 要把 `#pragma once` 放到头文件的开始哦,抛弃老土的(`#ifndef THIS_FILE_H`, `#define THIS_FILE_H`, ..., `#endif`)吧
|
||||
* 下面两种预处理命令都可以用: `#ifdef DEFINED` 还有 `#if defined(DEFINED)`
|
||||
* 以上那句对处女座不是很友好哈,处女座的朋友们就别纠结了,直接 `#if defined(DEFINED)` 。
|
||||
* 还有就是选好一种风格就一直用,一直用一直爽,不要朝三暮四, 除非你要变化到多重条件的 `#if`。
|
||||
* `#` 和 `if`要挨在一起哦,再让本空格在中间冒充电灯泡本空格会生气的。
|
||||
* 以下是缩进规则:
|
||||
* 首先考虑可读性,强迫症的朋友们总想要保持代码的高一致性,这样可不好。
|
||||
* 保证文件已有风格不变。如果代码本来就是杂糅风格,那就见机行事,让你的修改更有意义些。
|
||||
* 其实你也可以在缩进的时候看看周围其他代码,然后范水模山,预处理命令可以有自己的缩进风格。
|
||||
|
||||
可以参照下面:
|
||||
|
||||
```c
|
||||
/* foo 的 Enums*/
|
||||
enum foo_state {
|
||||
FOO_BAR,
|
||||
FOO_BAZ,
|
||||
};
|
||||
|
||||
/* 有返回值的情况 */
|
||||
int foo(void) {
|
||||
if (some_condition) {
|
||||
return FOO_BAR;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
# Clang-format的自动格式化
|
||||
[Clang-format](https://clang.llvm.org/docs/ClangFormat.html) 是LLVM的一部分,可以帮你自动格式化代码。我们给你准备好了一个适用于以上规范的配置文件,会帮你调整缩进和换行,你只需要写好括号就好。有了它,你再也不用担心调整代码格式太耗时,没有时间陪伴自己(虚构)的另一半了。
|
||||
|
||||
使用[LLVM 完整安装](http://llvm.org/builds/)可以在Windows上安装clang-format, Ubuntu用户要用`sudo apt install clang-format`。
|
||||
|
||||
命令行的朋友们, 加上 `-style=file`选项就会自动在QMK的根目录寻找.clang-format配置文件了。
|
||||
|
||||
VSCode用户, 标准的 C/C++ 插件就支持clang-format, 或者可以用[独立扩展](https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.ClangFormat)也行。
|
||||
|
||||
有些东西(比如LAYOUT宏) 会被clang-format打乱,所以那些文件就别用clang-format了,这里就教您一个小窍门,在`// clang-format off` 和 `//clang-format on`之间装上会被搞乱的代码就好了。
|
||||
|
||||
# 一般教程
|
||||
|
||||
你可以给Q酱的不同部分添砖加瓦,但也要用不同的方法严谨检查。不论你修改哪里最好还是看看下边。
|
||||
|
||||
* 将PR(pull request)分成一个个的逻辑单元。 比如,不要一次将两个新特性PR出去。要添加的特性排好队,一个一个来。
|
||||
* 提交之前看一眼,`git diff --check`的空格一定要写对了
|
||||
* 确定你的代码能通过编译
|
||||
* 布局: 确定`make keyboard:your_new_keymap` 不返回错误
|
||||
* 键盘: 确定 `make keyboard:all` 不返回错误
|
||||
* 核心代码: 确定 `make all` 不返回错误
|
||||
* 提交的信息尽量明确。第一行写点简短介绍(每行不多于70个英文字母), 第二行空着,第三行和后面就要写些必要的细节了。最好用英文写,比如:
|
||||
|
||||
```
|
||||
Adjust the fronzlebop for the kerpleplork
|
||||
|
||||
The kerpleplork was intermittently failing with error code 23. The root cause was the fronzlebop setting, which causes the kerpleplork to activate every N iterations.
|
||||
|
||||
Limited experimentation on the devices I have available shows that 7 is high enough to avoid confusing the kerpleplork, but I'd like to get some feedback from people with ARM devices to be sure.
|
||||
```
|
||||
|
||||
## 文档
|
||||
|
||||
想帮助Q酱当然是先看文档最简单了。找到这个文档哪里错了然后改正它对于你来说超级简单! 我们也对有写文档能力的人求贤若渴,如果你是对的人[点这个](#Q酱,我在哪能帮助你嘞?)!
|
||||
|
||||
文档呢,都静静的放在`qmk_firmware/docs` 目录里, 也或者您想为网页做贡献的话也是可以的哦。
|
||||
|
||||
在文档中附代码案例时, 先观察文档其他地方的命名规范。比如, 把enums的名字都改成像`my_layers`或者`my_keycodes`来防止名字不一致的enums被当作特务枪毙:
|
||||
|
||||
```c
|
||||
enum my_layers {
|
||||
_FIRST_LAYER,
|
||||
_SECOND_LAYER
|
||||
};
|
||||
|
||||
enum my_keycodes {
|
||||
FIRST_LAYER = SAFE_RANGE,
|
||||
SECOND_LAYER
|
||||
};
|
||||
```
|
||||
|
||||
## 布局
|
||||
|
||||
大多数QMK新手都从创建一个自己的布局开始。我们尽力保证布局规范宽松 (毕竟布局是个性的体现) 不过建议遵守以下准则,这样可以让别人更好理解你的代码
|
||||
|
||||
* 用 [模板](documentation_templates.md)写个`readme.md`。
|
||||
* 所有的布局PR都会被squash, 如果你想知道你的提交是怎么被squash的那你就自己来吧
|
||||
* 不要把新特性和布局一起PR。可以分别PR他们
|
||||
* 布局文件夹就不要放`Makefile`了,这个操作都过时啦
|
||||
* 更新文件头部的copyrights(看`%YOUR_NAME%`那)
|
||||
|
||||
## 键盘
|
||||
|
||||
QMK的最终归宿是键盘。有些键盘是社区维护的,有一些是制作这些键盘的人维护的。`readme.md`会告诉你是谁维护了这个键盘,如果你对某个键盘有疑问,可以 [创建一个Issue](https://github.com/qmk/qmk_firmware/issues) 来问一问维护者。
|
||||
|
||||
我们建议你按下面的来操作:
|
||||
|
||||
* 用[模板](documentation_templates.md)写`readme.md`。
|
||||
* 提交数量尽量合理,不然我们可就要把你的PR给squash了。
|
||||
* 不要把新特性和新键盘一起PR。可以分别PR他们
|
||||
* 用父文件夹的名字命名 `.c`/`.h`文件, 比如`/keyboards/<kb1>/<kb2>/<kb2>.[ch]`
|
||||
* 键盘文件夹就不要放`Makefile`了,这个操作都过时啦
|
||||
* 更新文件头部的copyrights(看`%YOUR_NAME%`那)
|
||||
|
||||
## Quantum/TMK 核心
|
||||
|
||||
在您废寝忘食地开发Q酱新特性或者帮Q酱驱虫之前,一定要确保你的工作是有意义的。看看[了解QMK](understanding_qmk.md)你会对Q酱有更深的了解,这个文档将带你领略QMK的程序流程。现在你应该和维护团对谈谈来了解实现你想法的最佳方法了。一下渠道都可以:
|
||||
|
||||
* [在Discord交流](https://discord.gg/Uq7gcHh)
|
||||
* [建立一个Issue](https://github.com/qmk/qmk_firmware/issues/new)
|
||||
|
||||
新特性和BUG的修复影响所有键盘。开发组也在翻修QMK。所以,在实施重大返修之前一定要讨论一下。如果你在没有事先与维护团队沟通的情况下提交了一个PR,而且你的选择与维护团队的计划方向不符,那你可能要面临大改了。
|
||||
|
||||
修复BUG或者开发新特性之前看看这个:
|
||||
|
||||
* **默认不启用** - QMK运行的芯片多数内存有限,所以首要考虑的还应该是布局不要被破坏,于是特性默认是不启用的。你喜欢什么特性的话就打开它,如果你觉得有些特性应该默认开启或者你能帮助缩减代码,那就联系维护组吧。
|
||||
* **提交之前在本地编译** - 这个简直就是家喻户晓了,但是也确实需要编译啊! 我们的Travis系统会发现一切问题,但是自己编译一下可要比在线等快多了。
|
||||
* **注意版本和芯片平台** - 有那么几个键盘有支持不同配置甚至是不同芯片的版本。试着写一个能AVR和ARM两个平台运行的特性,或者在不支持的平台自动禁用。
|
||||
* **解释你的新特性** - 在`docs/`写个文档, 你可以创建新文档或者写到现有文档中。如果你不把它记录下来,其他人就无法从你的努力中获益。
|
||||
|
||||
也可以看看以下建议:
|
||||
|
||||
* 提交数量尽量合理,不然我们可就要把你的PR给squash了。
|
||||
* 不要把新特性、布局和键盘一起PR。可以分别PR他们。
|
||||
* 给你的特性写[单元测试](unit_testing.md)。
|
||||
* 你编辑的文件风格要一致,如果风格不明确或者是混搭风的,你就要先看看[代码规范](#代码规范)确认情况。
|
||||
|
||||
## 重构
|
||||
|
||||
为了保持QMK脉络清晰,Q酱打算深入规划重构一下自己,然后让合作者进行修改。如果你有重构的思路或建议[创建一个issue](https://github.com/qmk/qmk_firmware/issues), Q酱很乐意讨论一下怎么改进一下。
|
||||
|
||||
# 行为守则对于我来说有何意义?
|
||||
|
||||
我们的[行为守则](https://github.com/qmk/qmk_firmware/blob/master/CODE_OF_CONDUCT.md) 是说明您有责任尊重和礼貌地对待项目中的每个人,无论他们的身份如何。 如果你是我们行为准则所描述的不当行为的受害者,我们将站在你这边,并按照行为准则对施暴者进行适当谴责。
|
6
docs/zh-cn/faq.md
Normal file
6
docs/zh-cn/faq.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# 常见问题
|
||||
|
||||
* [一般问题](faq_general.md)
|
||||
* [构建和编译QMK](faq_build.md)
|
||||
* [QMK调试和故障排除](faq_debug.md)
|
||||
* [布局问题](faq_keymap.md)
|
15
docs/zh-cn/getting_started_getting_help.md
Normal file
15
docs/zh-cn/getting_started_getting_help.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# 获得帮助
|
||||
|
||||
有很多方法来获得关于QMK的帮助.
|
||||
|
||||
## 实时聊天
|
||||
|
||||
你可以在我们的主要[Discord服务器](https://discord.gg/Uq7gcHh)找到QMK的开发者和用户。有很多讨论固件的不同频道, 工具箱(Toolbox), 硬件,配置工具(configurator).
|
||||
|
||||
## OLKB Subreddit
|
||||
|
||||
QMK的官方论坛是[/r/olkb](https://reddit.com/r/olkb) 在[reddit.com](https://reddit.com)上.
|
||||
|
||||
## Github的Issue
|
||||
|
||||
你可以在GitHub上 [提出issue](https://github.com/qmk/qmk_firmware/issues).当您的问题需要长期讨论或调试时,这尤其方便。
|
59
docs/zh-cn/getting_started_github.md
Normal file
59
docs/zh-cn/getting_started_github.md
Normal file
@@ -0,0 +1,59 @@
|
||||
# 如何在QMK中使用Github
|
||||
|
||||
Github can be a little tricky to those that aren't familiar with it - this guide will walk through each step of forking, cloning, and submitting a pull request with QMK.
|
||||
|
||||
?> 本教程假设您已安装GitHub,并且您喜欢使用命令行工作。
|
||||
|
||||
首先 [Github上的QMK页面](https://github.com/qmk/qmk_firmware), 您能看到右上方有个按钮写着"Fork":
|
||||
|
||||

|
||||
|
||||
如果你是某组织成员,你将需要选择分叉到哪个账户。一般情况下, 你是想要分叉到你的私人账户下。当你完成分叉 (有时需要等一会), 点击"Clone or Download" 按钮:
|
||||
|
||||
!从Github下载](http://i.imgur.com/N1NYcSz.jpg)
|
||||
|
||||
你要选择 "HTTPS", 然后选择链接复制:
|
||||
|
||||

|
||||
|
||||
然后,在命令行输入`git clone `,然后粘贴你的链接:
|
||||
|
||||
```
|
||||
user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git
|
||||
Cloning into 'qmk_firmware'...
|
||||
remote: Counting objects: 46625, done.
|
||||
remote: Compressing objects: 100% (2/2), done.
|
||||
remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623
|
||||
Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done.
|
||||
Resolving deltas: 100% (29362/29362), done.
|
||||
Checking out files: 100% (2799/2799), done.
|
||||
```
|
||||
|
||||
现在你本地计算机有QMK的分叉了,你可以添加你的布局了, 为你的键盘编译并刷新固件吧。如果你觉得你的修改很不错, 你可以添加,提交,然后想你的分叉推出(pull)你的改变,像这样:
|
||||
|
||||
```
|
||||
user@computer:~$ git add .
|
||||
user@computer:~$ git commit -m "adding my keymap"
|
||||
[master cccb1608] adding my keymap
|
||||
1 file changed, 1 insertion(+)
|
||||
create mode 100644 keyboards/planck/keymaps/mine/keymap.c
|
||||
user@computer:~$ git push
|
||||
Counting objects: 1, done.
|
||||
Delta compression using up to 4 threads.
|
||||
Compressing objects: 100% (1/1), done.
|
||||
Writing objects: 100% (1/1), 1.64 KiB | 0 bytes/s, done.
|
||||
Total 1 (delta 1), reused 0 (delta 0)
|
||||
remote: Resolving deltas: 100% (1/1), completed with 1 local objects.
|
||||
To https://github.com/whoeveryouare/qmk_firmware.git
|
||||
+ 20043e64...7da94ac5 master -> master
|
||||
```
|
||||
|
||||
现在你的改动已经在你Github上的分支中了 - 如果你回到这 (`https://github.com/你的GitHub账户名/qmk_firmware`) ,你可以点击下方所示按钮创建 "New Pull Request":
|
||||
|
||||

|
||||
|
||||
现在你可以看到你所做的一切 - 如果看起来不错, 就可以点击 "Create Pull Request"定稿了:
|
||||
|
||||

|
||||
|
||||
提交后,我们会开跟你说你的改动,要求您进行更改, 并最终接受您的更改!感谢您为QMK做的贡献 :)
|
23
docs/zh-cn/newbs.md
Normal file
23
docs/zh-cn/newbs.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# QMK菜鸟教程
|
||||
|
||||
QMK是为你机械硬盘设计的的一个强大的开源固件。使用QMK可以很简单的让你的定制键盘变得强大。看完这篇文章,无论你是菜鸟还是大佬,都可以顺利的使用QMK来定制键盘。
|
||||
|
||||
你是否为不知道你的键盘能不能运行QMK而苦恼? 如果你的机械键盘是你自己做的,那么这把键盘一般可以运行QMK。我们提供了[一大堆自制键盘](http://qmk.fm/keyboards/), 所以即便你的键盘不能运行QMK你也很容易能找到满足你需求的键盘。
|
||||
|
||||
## 概览
|
||||
|
||||
这个教程有7个主要部分:
|
||||
|
||||
* [新手上路](newbs_getting_started.md)
|
||||
* [用命令行构建你的第一个固件](newbs_building_firmware.md)
|
||||
* [用在线界面构建你的第一个固件](newbs_building_firmware_configurator.md)
|
||||
* [刷新固件](newbs_flashing.md)
|
||||
* [测试和调试](newbs_testing_debugging.md)
|
||||
* [Git最佳实践](newbs_best_practices.md)
|
||||
* [其他学习资源](newbs_learn_more_resources.md)
|
||||
|
||||
这份教程旨在帮助没有固件构建经验的人,也是根据该目的做出选择和建议。这些程序有很多替代方法,大部分替代我们都支持。如果你对完成一个任务有疑问,可以[向我们寻求帮助](getting_started_getting_help.md).
|
||||
|
||||
## 其他资源
|
||||
|
||||
* [Thomas Baart的 QMK基础博客](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – 这是一个用户创建的博客,涵盖了为新手准备的使用QMK的基础知识。
|
@@ -75,10 +75,10 @@ uint8_t g_twi_transfer_buffer[20];
|
||||
// buffers and the transfers in IS31FL3733_write_pwm_buffer() but it's
|
||||
// probably not worth the extra complexity.
|
||||
uint8_t g_pwm_buffer[DRIVER_COUNT][192];
|
||||
bool g_pwm_buffer_update_required = false;
|
||||
bool g_pwm_buffer_update_required[DRIVER_COUNT] = { false };
|
||||
|
||||
uint8_t g_led_control_registers[DRIVER_COUNT][24] = { { 0 }, { 0 } };
|
||||
bool g_led_control_registers_update_required = false;
|
||||
bool g_led_control_registers_update_required[DRIVER_COUNT] = { false };
|
||||
|
||||
void IS31FL3733_write_register( uint8_t addr, uint8_t reg, uint8_t data )
|
||||
{
|
||||
@@ -123,12 +123,13 @@ void IS31FL3733_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
|
||||
}
|
||||
}
|
||||
|
||||
void IS31FL3733_init( uint8_t addr )
|
||||
void IS31FL3733_init( uint8_t addr, uint8_t sync)
|
||||
{
|
||||
// In order to avoid the LEDs being driven with garbage data
|
||||
// in the LED driver's PWM registers, shutdown is enabled last.
|
||||
// Set up the mode and other settings, clear the PWM registers,
|
||||
// then disable software shutdown.
|
||||
// Sync is passed so set it according to the datasheet.
|
||||
|
||||
// Unlock the command register.
|
||||
IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
|
||||
@@ -161,7 +162,7 @@ void IS31FL3733_init( uint8_t addr )
|
||||
// Set global current to maximum.
|
||||
IS31FL3733_write_register( addr, ISSI_REG_GLOBALCURRENT, 0xFF );
|
||||
// Disable software shutdown.
|
||||
IS31FL3733_write_register( addr, ISSI_REG_CONFIGURATION, 0x01 );
|
||||
IS31FL3733_write_register( addr, ISSI_REG_CONFIGURATION, (sync << 6) | 0x01 );
|
||||
|
||||
// Wait 10ms to ensure the device has woken up.
|
||||
#ifdef __AVR__
|
||||
@@ -179,7 +180,7 @@ void IS31FL3733_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
|
||||
g_pwm_buffer[led.driver][led.r] = red;
|
||||
g_pwm_buffer[led.driver][led.g] = green;
|
||||
g_pwm_buffer[led.driver][led.b] = blue;
|
||||
g_pwm_buffer_update_required = true;
|
||||
g_pwm_buffer_update_required[led.driver] = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,35 +219,34 @@ void IS31FL3733_set_led_control_register( uint8_t index, bool red, bool green, b
|
||||
g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b);
|
||||
}
|
||||
|
||||
g_led_control_registers_update_required = true;
|
||||
g_led_control_registers_update_required[led.driver] = true;
|
||||
|
||||
}
|
||||
|
||||
void IS31FL3733_update_pwm_buffers( uint8_t addr1, uint8_t addr2 )
|
||||
void IS31FL3733_update_pwm_buffers( uint8_t addr, uint8_t index )
|
||||
{
|
||||
if ( g_pwm_buffer_update_required )
|
||||
if ( g_pwm_buffer_update_required[index] )
|
||||
{
|
||||
// Firstly we need to unlock the command register and select PG1
|
||||
IS31FL3733_write_register( addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
|
||||
IS31FL3733_write_register( addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM );
|
||||
IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
|
||||
IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM );
|
||||
|
||||
IS31FL3733_write_pwm_buffer( addr1, g_pwm_buffer[0] );
|
||||
//IS31FL3733_write_pwm_buffer( addr2, g_pwm_buffer[1] );
|
||||
IS31FL3733_write_pwm_buffer( addr, g_pwm_buffer[index] );
|
||||
}
|
||||
g_pwm_buffer_update_required = false;
|
||||
g_pwm_buffer_update_required[index] = false;
|
||||
}
|
||||
|
||||
void IS31FL3733_update_led_control_registers( uint8_t addr1, uint8_t addr2 )
|
||||
void IS31FL3733_update_led_control_registers( uint8_t addr, uint8_t index )
|
||||
{
|
||||
if ( g_led_control_registers_update_required )
|
||||
if ( g_led_control_registers_update_required[index] )
|
||||
{
|
||||
// Firstly we need to unlock the command register and select PG0
|
||||
IS31FL3733_write_register( addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
|
||||
IS31FL3733_write_register( addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL );
|
||||
IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
|
||||
IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL );
|
||||
for ( int i=0; i<24; i++ )
|
||||
{
|
||||
IS31FL3733_write_register(addr1, i, g_led_control_registers[0][i] );
|
||||
//IS31FL3733_write_register(addr2, i, g_led_control_registers[1][i] );
|
||||
IS31FL3733_write_register(addr, i, g_led_control_registers[index][i] );
|
||||
}
|
||||
}
|
||||
g_led_control_registers_update_required[index] = false;
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ typedef struct is31_led {
|
||||
|
||||
extern const is31_led g_is31_leds[DRIVER_LED_TOTAL];
|
||||
|
||||
void IS31FL3733_init( uint8_t addr );
|
||||
void IS31FL3733_init( uint8_t addr, uint8_t sync );
|
||||
void IS31FL3733_write_register( uint8_t addr, uint8_t reg, uint8_t data );
|
||||
void IS31FL3733_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer );
|
||||
|
||||
@@ -45,8 +45,8 @@ void IS31FL3733_set_led_control_register( uint8_t index, bool red, bool green, b
|
||||
// (eg. from a timer interrupt).
|
||||
// Call this while idle (in between matrix scans).
|
||||
// If the buffer is dirty, it will update the driver with the buffer.
|
||||
void IS31FL3733_update_pwm_buffers( uint8_t addr1, uint8_t addr2 );
|
||||
void IS31FL3733_update_led_control_registers( uint8_t addr1, uint8_t addr2 );
|
||||
void IS31FL3733_update_pwm_buffers( uint8_t addr, uint8_t index );
|
||||
void IS31FL3733_update_led_control_registers( uint8_t addr, uint8_t index );
|
||||
|
||||
#define A_1 0x00
|
||||
#define A_2 0x01
|
||||
|
239
keyboards/40percentclub/nein/config.h
Normal file
239
keyboards/40percentclub/nein/config.h
Normal file
@@ -0,0 +1,239 @@
|
||||
/* Copyright 2019
|
||||
*
|
||||
* 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 0x0A0C
|
||||
#define DEVICE_VER 0x9999
|
||||
#define MANUFACTURER di0ib
|
||||
#define PRODUCT The nein Keyboard
|
||||
#define DESCRIPTION 9 key macropad
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 3
|
||||
#define MATRIX_COLS 3
|
||||
|
||||
/* Keyboard Matrix Assignments */
|
||||
#define DIRECT_PINS { \
|
||||
{ F4, F5, F6 }, \
|
||||
{ F7, B1, B3 }, \
|
||||
{ B2, B6, B5 } \
|
||||
}
|
||||
#define UNUSED_PINS
|
||||
|
||||
/*
|
||||
* 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
|
22
keyboards/40percentclub/nein/info.json
Normal file
22
keyboards/40percentclub/nein/info.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"keyboard_name": "nein",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 3,
|
||||
"height": 3,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"x":0, "y":0},
|
||||
{"x":1, "y":0},
|
||||
{"x":2, "y":0},
|
||||
{"x":0, "y":1},
|
||||
{"x":1, "y":1},
|
||||
{"x":2, "y":1},
|
||||
{"x":0, "y":2},
|
||||
{"x":1, "y":2},
|
||||
{"x":2, "y":2}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
29
keyboards/40percentclub/nein/keymaps/default/keymap.c
Normal file
29
keyboards/40percentclub/nein/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,29 @@
|
||||
/* Copyright 2019
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_ortho_3x3(
|
||||
KC_MUTE, KC_HOME, KC_MPLY, \
|
||||
MO(1), KC_UP, KC_END, \
|
||||
KC_LEFT, KC_DOWN, KC_RGHT \
|
||||
),
|
||||
[1] = LAYOUT_ortho_3x3(
|
||||
RESET, _______, KC_STOP, \
|
||||
_______, _______, RGB_MOD, \
|
||||
KC_MPRV, _______, KC_MNXT \
|
||||
),
|
||||
};
|
16
keyboards/40percentclub/nein/nein.c
Normal file
16
keyboards/40percentclub/nein/nein.c
Normal file
@@ -0,0 +1,16 @@
|
||||
/* Copyright 2019
|
||||
*
|
||||
* 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 "nein.h"
|
37
keyboards/40percentclub/nein/nein.h
Normal file
37
keyboards/40percentclub/nein/nein.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/* Copyright 2019
|
||||
*
|
||||
* 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_3x3( \
|
||||
k00, k01, k02, \
|
||||
k10, k11, k12, \
|
||||
k20, k21, k22 \
|
||||
) \
|
||||
{ \
|
||||
{ k00, k01, k02 }, \
|
||||
{ k10, k11, k12 }, \
|
||||
{ k20, k21, k22 } \
|
||||
}
|
18
keyboards/40percentclub/nein/readme.md
Normal file
18
keyboards/40percentclub/nein/readme.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# nein
|
||||
|
||||

|
||||
===
|
||||
|
||||
A 9 key macropad.
|
||||
|
||||
Powered by a Pro Micro and can fit any of the various different sized variations of Pro Micro.
|
||||
|
||||
Keyboard Maintainer: QMK Community
|
||||
Hardware Supported: nein PCB
|
||||
Hardware Availability: [nein project on 40% Keyboards](https://www.40percent.club/2019/04/nein.html)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make 40percentclub/nein: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).
|
80
keyboards/40percentclub/nein/rules.mk
Normal file
80
keyboards/40percentclub/nein/rules.mk
Normal file
@@ -0,0 +1,80 @@
|
||||
# MCU name
|
||||
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 = caterina
|
||||
|
||||
|
||||
# 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 = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # 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 = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # 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)
|
@@ -19,20 +19,18 @@
|
||||
#include "haptic.h"
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
#include "rgblight.h"
|
||||
#include "rgb_matrix.h"
|
||||
|
||||
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}
|
||||
};
|
||||
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
|
||||
} };
|
||||
#endif
|
||||
|
||||
uint8_t *o_fb;
|
||||
@@ -48,12 +46,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,13 +62,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);
|
||||
@@ -88,7 +86,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);
|
||||
@@ -195,7 +193,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
|
||||
|
@@ -51,78 +51,65 @@ 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
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
RGB_MATRIX_RIGHT_LEDS
|
||||
RGB_MATRIX_LEFT_LEDS
|
||||
};
|
||||
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
|
||||
} };
|
||||
#else
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
RGB_MATRIX_LEFT_LEDS
|
||||
RGB_MATRIX_RIGHT_LEDS
|
||||
};
|
||||
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
|
||||
} };
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -19,6 +19,7 @@ void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
setPinOutput(E6);
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
@@ -39,5 +40,11 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
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_CAPS_LOCK)) {
|
||||
writePinLow(E6);
|
||||
} else {
|
||||
writePinHigh(E6);
|
||||
}
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
@@ -14,6 +14,7 @@
|
||||
* 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.
|
||||
@@ -52,76 +53,32 @@ void led_set_kb(uint8_t usb_led) {
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
||||
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
|
||||
};
|
||||
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
|
||||
} };
|
||||
|
@@ -404,13 +404,13 @@
|
||||
k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
|
||||
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k1e, k2d, \
|
||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \
|
||||
k40, k41, k43, k44, k46, k48, k4a, k4b, k4c, k4d, k4e \
|
||||
k40, k41, k43, k44, k46, k48, k4a, k4b, k4d, k4e \
|
||||
) { \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \
|
||||
{ k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \
|
||||
{ k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \
|
||||
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO,k3d, k3e }, \
|
||||
{ k40, k41, KC_NO, k43, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, k4c, k4d, k4e } \
|
||||
{ k40, k41, KC_NO, k43, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, KC_NO,k4d, k4e } \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -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 | Cmd | Fn | L | D | R |
|
||||
* | Ctrl | Alt | Cmd | Space | Alt | 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_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RALT, 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 | Vol- | Vol+ |
|
||||
* | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| Mute | Vol-| Vol+| Prev | Next |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | | | Prev | Next | Play/Pause |
|
||||
* | | | | | | | Left| Down| Up |Right| | | 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_MUTE, KC__VOLDOWN, KC__VOLUP,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MRWD, KC_MFFD,
|
||||
_______, 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_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______,
|
||||
KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, _______, KC_PGUP, RESET,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END
|
||||
),
|
||||
|
@@ -10,9 +10,8 @@ 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 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
|
||||
|
||||
* Underglow toggle is available as `Fn` + `Q`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus!
|
||||
* vim-style arrow key bindings H J K L in layer 1
|
||||
|
||||
### Initial Installation
|
||||
|
||||
@@ -51,7 +50,7 @@ Hope this helps!
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| Shift | Z | X | C | V | B | N | M | , | . | Tap:/ RSh | U | ESC |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| Ctrl | Alt | Cmd | Space | Cmd | Fn | L | D | R |
|
||||
| Ctrl | Alt | Cmd | Space | Alt | Fn | L | D | R |
|
||||
`-----------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
@@ -61,9 +60,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 | Vol- | Vol+ |
|
||||
| |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| Mute | Vol-| Vol+| Prev | Next |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| | | | | | | | | | | Prev | Next | Play/Pause |
|
||||
| | | | | | | Left| Down| Up |Right| | | Play/Pause |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| | | | | | | | |Scr- |Scr+ | | PG_UP |RESET|
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
|
@@ -26,13 +26,13 @@ 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,
|
||||
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_BSLS, KC_ENT,
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_PSCR,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_NO, KC_APP, KC_RCTL),
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL),
|
||||
|
||||
LAYOUT_60_iso_split_space_bs_rshift(
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL,
|
||||
KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_PGDOWN,KC_UP, KC_PGUP, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_VOLD, KC_MUTE, KC_VOLU, KC_NO, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_RSFT, KC_CAPS,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_NO, KC_APP, KC_RCTL),
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL),
|
||||
|
||||
};
|
||||
|
@@ -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 false // turn off effects when suspended
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // 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,70 +71,25 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
|
||||
};
|
||||
|
||||
rgb_led g_rgb_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
|
||||
} };
|
||||
|
||||
{{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
|
||||
@@ -205,93 +160,44 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
|
||||
};
|
||||
|
||||
rgb_led g_rgb_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
|
||||
} };
|
||||
|
||||
{{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();
|
||||
}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
extern bool g_suspend_state;
|
||||
#define _LAYER0 0
|
||||
#define _LAYER1 1
|
||||
#define _LAYER2 2
|
||||
@@ -31,11 +30,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++) {
|
||||
led = g_rgb_leds[i];
|
||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||
rgb_matrix_set_color( i, red, green, blue );
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
extern bool g_suspend_state;
|
||||
#define _LAYER0 0
|
||||
#define _LAYER1 1
|
||||
#define _LAYER2 2
|
||||
@@ -53,12 +52,9 @@ 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++) {
|
||||
led = g_rgb_leds[i];
|
||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||
rgb_matrix_set_color( i, red, green, blue );
|
||||
}
|
||||
}
|
||||
|
@@ -1,50 +1,6 @@
|
||||
# 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
|
||||
MCU = STM32F303
|
||||
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
|
||||
|
@@ -1,7 +0,0 @@
|
||||
/* 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
|
@@ -1,520 +0,0 @@
|
||||
/*
|
||||
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,5 +32,11 @@
|
||||
#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,69 +65,26 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, K_16, J_16, L_16},
|
||||
};
|
||||
|
||||
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},
|
||||
};
|
||||
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
|
||||
} };
|
||||
|
||||
#elif defined (dzrgb60_hhkb)
|
||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, H_15, G_15, I_15},
|
||||
@@ -194,70 +151,26 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, K_16, J_16, L_16},
|
||||
};
|
||||
|
||||
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},
|
||||
};
|
||||
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
|
||||
} };
|
||||
|
||||
#elif defined (dzrgb60_hhkb_iso)
|
||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, H_15, G_15, I_15},
|
||||
@@ -324,70 +237,26 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, K_16, J_16, L_16},
|
||||
};
|
||||
|
||||
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},
|
||||
};
|
||||
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
|
||||
} };
|
||||
|
||||
#elif defined (dzrgb60_ansi)
|
||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, K_14, J_14, L_14},
|
||||
@@ -453,69 +322,26 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, K_16, J_16, L_16},
|
||||
};
|
||||
|
||||
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},
|
||||
};
|
||||
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
|
||||
} };
|
||||
|
||||
#else
|
||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, K_14, J_14, L_14},
|
||||
@@ -583,71 +409,26 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, K_16, J_16, L_16},
|
||||
};
|
||||
|
||||
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},
|
||||
};
|
||||
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
|
||||
} };
|
||||
|
||||
#endif
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
|
@@ -1,388 +0,0 @@
|
||||
/*
|
||||
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,6 +1,2 @@
|
||||
#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,5 +1,4 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
extern bool g_suspend_state;
|
||||
#define _LAYER0 0
|
||||
#define _LAYER1 1
|
||||
#define _LAYER2 2
|
||||
@@ -39,10 +38,8 @@ 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++) {
|
||||
led = g_rgb_leds[i];
|
||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||
rgb_matrix_set_color( i, red, green, blue );
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
extern bool g_suspend_state;
|
||||
#define _LAYER0 0
|
||||
#define _LAYER1 1
|
||||
#define _LAYER2 2
|
||||
|
@@ -1,6 +1,2 @@
|
||||
#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,5 +1,4 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
extern bool g_suspend_state;
|
||||
#define _LAYER0 0
|
||||
#define _LAYER1 1
|
||||
#define _LAYER2 2
|
||||
@@ -40,10 +39,8 @@ 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++) {
|
||||
led = g_rgb_leds[i];
|
||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||
rgb_matrix_set_color( i, red, green, blue );
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,2 @@
|
||||
#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,5 +1,4 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
extern bool g_suspend_state;
|
||||
#define _LAYER0 0
|
||||
#define _LAYER1 1
|
||||
#define _LAYER2 2
|
||||
@@ -40,10 +39,8 @@ 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++) {
|
||||
led = g_rgb_leds[i];
|
||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||
rgb_matrix_set_color( i, red, green, blue );
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,2 @@
|
||||
#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,5 +1,4 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
extern bool g_suspend_state;
|
||||
#define _LAYER0 0
|
||||
#define _LAYER1 1
|
||||
#define _LAYER2 2
|
||||
@@ -39,10 +38,8 @@ 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++) {
|
||||
led = g_rgb_leds[i];
|
||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||
rgb_matrix_set_color( i, red, green, blue );
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,5 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
extern bool g_suspend_state;
|
||||
|
||||
enum dz60rgb_layers {
|
||||
_QWERTY,
|
||||
@@ -26,7 +25,6 @@ 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,5 +1,4 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
extern bool g_suspend_state;
|
||||
#define _LAYER0 0
|
||||
#define _LAYER1 1
|
||||
#define _LAYER2 2
|
||||
@@ -50,40 +49,35 @@ 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++) {
|
||||
led = g_rgb_leds[i];
|
||||
|
||||
if (HAS_FLAGS(led.flags, 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) {
|
||||
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_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)) {
|
||||
@@ -91,7 +85,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);
|
||||
|
@@ -1,257 +0,0 @@
|
||||
/*
|
||||
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,43 +1,6 @@
|
||||
# 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
|
||||
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
|
||||
|
@@ -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,82 +73,42 @@ 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,5 +1,4 @@
|
||||
#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,4 +1,6 @@
|
||||
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,68 +269,39 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
};
|
||||
|
||||
|
||||
rgb_led g_rgb_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
|
||||
} };
|
||||
|
||||
/*{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,7 @@
|
||||
{
|
||||
"keyboard_name": "ErgoDox EZ",
|
||||
"url": "ergodox-ez.com",
|
||||
"maintainer": "erez",
|
||||
"maintainer": "ZSA",
|
||||
"width": 17,
|
||||
"height": 8,
|
||||
|
||||
|
330
keyboards/ergodox_ez/keymaps/pvinis/keymap.c
Normal file
330
keyboards/ergodox_ez/keymaps/pvinis/keymap.c
Normal file
@@ -0,0 +1,330 @@
|
||||
// pvinis ergodox ez
|
||||
// ,------------------------------------. ,------------------------------------.
|
||||
// | | | | | | | | | | | | | | | |
|
||||
// |------+----+----+----+----+---------| |----+----+----+----+----+----+------|
|
||||
// | | | | | | | | | | | | | | | |
|
||||
// |------+----+----+----x----x----| | | |----x----x----+----+----+------|
|
||||
// | | | | | | |----| |----| | | | | | |
|
||||
// |------+----+----+----x----x----| | | |----x----x----+----+----+------|
|
||||
// | | | | | | | | | | | | | | | |
|
||||
// `------+----+----+----+----+---------' `---------+----+----+----+----+------'
|
||||
// | | | | | | | | | | | |
|
||||
// `------------------------' `------------------------'
|
||||
// ,---------. ,---------.
|
||||
// | | | | | |
|
||||
// ,----+----+----| |----+----+----.
|
||||
// | | | | | | | |
|
||||
// | | |----| |----| | |
|
||||
// | | | | | | | |
|
||||
// `--------------' `--------------'
|
||||
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "pvinis.h"
|
||||
#include "mousekey.h"
|
||||
|
||||
|
||||
// layers
|
||||
enum {
|
||||
MOUSE = 8,
|
||||
};
|
||||
|
||||
// extra keys
|
||||
enum {
|
||||
NONE = 30,
|
||||
TD_LAYR, // SYSCTL and MOUSE layer switch
|
||||
};
|
||||
|
||||
// application selection
|
||||
// this is sending ctrl-alt-gui-<key>, and this is picked up by hammerspoon
|
||||
#define AP_SLCK ALLM(KC_S)
|
||||
#define AP_XCOD ALLM(KC_X)
|
||||
#define AP_MSGR ALLM(KC_M)
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// ,------------------------------------. ,------------------------------------.
|
||||
// |4xFLSH| | | | | |Opt | | | | | | | | |
|
||||
// |------+----+----+----+----+---------| |----+----+----+----+----+----+------|
|
||||
// | Tab | | | | | | | | | | | | | | |
|
||||
// |------+----+----+----x----x----| | | |----x----x----+----+----+------|
|
||||
// |EscCtl| | | | | |----| |----| | | | | | Ent |
|
||||
// |------+----+----+----x----x----| | | |----x----x----+----+----+------|
|
||||
// |LShift| | | | | | | | | | | | | |RShift|
|
||||
// `------+----+----+----+----+---------' `---------+----+----+----+----+------'
|
||||
// | | | | |Cmd | | | | | | |
|
||||
// `------------------------' `------------------------'
|
||||
// ,---------. ,---------.
|
||||
// |QWER| | | | |
|
||||
// ,----+----+----| |----+----+----.
|
||||
// | Ba | L | | | | | |
|
||||
// | ck |Shi |----| |----| |Spc |
|
||||
// | spc| ft | | | | | |
|
||||
// `--------------' `--------------'
|
||||
[LR_BASE] = LAYOUT_ergodox_pretty_wrapper(
|
||||
TD_3FLS, _______, _______, _______, _______, _______, KC_LALT, _______, _______, _______, _______, _______, _______, _______,
|
||||
KC_TAB , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
PV_ESCC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT ,
|
||||
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT,
|
||||
_______, _______, _______, KC_LGUI, SYMBOL , SYSCTL , KC_RALT, _______, _______, _______,
|
||||
QWERTY , CARPALX, _______, _______,
|
||||
_______, _______,
|
||||
KC_BSPC, _______, _______, _______, _______, KC_SPC
|
||||
),
|
||||
|
||||
// ,------------------------------------. ,------------------------------------.
|
||||
// | | NUMBERS_L | | | - | NUMBERS_R | = |
|
||||
// |------+----+----+----+----+---------| |----+----+----+----+----+----+------|
|
||||
// | | | [ | | ] | | |
|
||||
// |------+ | | | | +------|
|
||||
// | | QWERTY_L |----| |----| QWERTY_R | |
|
||||
// |------+ | ( | | ) | +------|
|
||||
// | | | | | | | |
|
||||
// `------+----+----+----+----+---------' `---------+----+----+----+----+------'
|
||||
// | | ` | | | | | | | | ' | |
|
||||
// `------------------------' `------------------------'
|
||||
// ,---------. ,---------.
|
||||
// | | | | | |
|
||||
// ,----+----+----| |----+----+----.
|
||||
// | | | | | | | |
|
||||
// | | |----| |----| | |
|
||||
// | | | | | | | |
|
||||
// `--------------' `--------------'
|
||||
// See `users/pvinis/pvinis.h`
|
||||
[LR_QWERTY] = LAYOUT_ergodox_pretty_wrapper(
|
||||
_______, ________________NUMBERS_L__________________, _______, KC_MINS, ________________NUMBERS_R__________________, KC_EQL ,
|
||||
_______, _________________QWERTY_L1_________________, KC_LBRC, KC_RBRC, _________________QWERTY_R1_________________, _______,
|
||||
_______, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, _______,
|
||||
_______, _________________QWERTY_L3_________________, KC_LPRN, KC_RPRN, _________________QWERTY_R3_________________, _______,
|
||||
_______, KC_GRV, _______, _______, _______, _______, _______, _______, KC_QUOT , _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
// ,------------------------------------. ,------------------------------------.
|
||||
// | | NUMBERS_L | | | | NUMBERS_R | |
|
||||
// |------+----+----+----+----+---------| |----+----+----+----+----+----+------|
|
||||
// | | | | | | | |
|
||||
// |------+ | | | | +------|
|
||||
// | | CARPALX_L |----| |----| CARPALX_R | |
|
||||
// |------+ | | | | +------|
|
||||
// | | | | | | | |
|
||||
// `------+----+----+----+----+---------' `---------+----+----+----+----+------'
|
||||
// | | | | | | | | | | | |
|
||||
// `------------------------' `------------------------'
|
||||
// ,---------. ,---------.
|
||||
// | | | | | |
|
||||
// ,----+----+----| |----+----+----.
|
||||
// | | | | | | | |
|
||||
// | | |----| |----| | |
|
||||
// | | | | | | | |
|
||||
// `--------------' `--------------'
|
||||
// See `users/pvinis/pvinis.h`
|
||||
[LR_CARPALX] = LAYOUT_ergodox_pretty_wrapper(
|
||||
_______, ________________NUMBERS_L__________________, _______, _______, ________________NUMBERS_R__________________, _______,
|
||||
_______, ________________CARPALX_L1_________________, _______, _______, ________________CARPALX_R1_________________, _______,
|
||||
_______, ________________CARPALX_L2_________________, ________________CARPALX_R2_________________, _______,
|
||||
_______, ________________CARPALX_L3_________________, _______, _______, ________________CARPALX_R3_________________, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
// See `users/pvinis/pvinis.h`
|
||||
[LR_SYMBOL] = LAYOUT_ergodox_pretty_wrapper(
|
||||
_______, ______________________F_L__________________, KC_F11 , KC_F12 , ______________________F_R__________________, _______,
|
||||
_______, _________________SYMBOL_L1_________________, _______, _______, _________________SYMBOL_R1_________________, _______,
|
||||
_______, _________________SYMBOL_L2_________________, _________________SYMBOL_R2_________________, _______,
|
||||
_______, _________________SYMBOL_L3_________________, _______, _______, _________________SYMBOL_R3_________________, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
// See `users/pvinis/pvinis.h`
|
||||
[LR_SYSCTL] = LAYOUT_ergodox_pretty_wrapper(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R1_________________, _______,
|
||||
_______, _______, _______, _______, _______, _______, _________________SYSCTL_R2_________________, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R3_________________, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
|
||||
_______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
// See `users/pvinis/pvinis.h`
|
||||
[LR_KBCTL] = LAYOUT_ergodox_pretty_wrapper(
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R1_________________, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R2_________________, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R3_________________, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
|
||||
/* MOUSE
|
||||
* a keymap to control my system.
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ^ | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | MsUp | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | |------| |------| |MsLeft| MsDn |MsRght| | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | |MidClk|
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | |Left |Right |
|
||||
* | | |------| |------| Click| Click|
|
||||
* | | | ^ | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[MOUSE] = LAYOUT_ergodox_pretty(
|
||||
KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
|
||||
,KC_NO ,KC_NO
|
||||
,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_TRNS
|
||||
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_MS_U ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
|
||||
|
||||
,KC_NO ,KC_NO
|
||||
,KC_NO
|
||||
,KC_NO ,KC_NO ,KC_NO
|
||||
),
|
||||
};
|
||||
|
||||
|
||||
// keyboard initialization
|
||||
void keyboard_post_init_user_local(void) {
|
||||
ergodox_led_all_on();
|
||||
for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) {
|
||||
ergodox_led_all_set(i);
|
||||
wait_ms(5);
|
||||
}
|
||||
wait_ms(1000);
|
||||
for (int i = LED_BRIGHTNESS_LO; i > 0; i--) {
|
||||
ergodox_led_all_set(i);
|
||||
wait_ms(10);
|
||||
}
|
||||
ergodox_led_all_off();
|
||||
|
||||
// restore default brightness for future use
|
||||
ergodox_led_all_set(LED_BRIGHTNESS_HI);
|
||||
}
|
||||
|
||||
// light up leds based on the layer
|
||||
uint32_t layer_state_set_user_local(uint32_t state) {
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
switch (biton32(state)) {
|
||||
case LR_SYSCTL:
|
||||
ergodox_right_led_3_on(); // blue
|
||||
break;
|
||||
case LR_KBCTL:
|
||||
ergodox_right_led_1_on(); // red
|
||||
break;
|
||||
case LR_SYMBOL:
|
||||
ergodox_right_led_2_on(); // green
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
// extra keys
|
||||
// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
// switch (id) {
|
||||
// }
|
||||
// return MACRO_NONE;
|
||||
// }
|
||||
|
||||
// tap dances
|
||||
|
||||
// flash keyboard on 4x tap, with leds
|
||||
// void flash_each_tap(qk_tap_dance_state_t *state, void *user_data) {
|
||||
// switch (state->count) {
|
||||
// case 1:
|
||||
// ergodox_right_led_3_on();
|
||||
// break;
|
||||
// case 2:
|
||||
// ergodox_right_led_2_on();
|
||||
// break;
|
||||
// case 3:
|
||||
// ergodox_right_led_1_on();
|
||||
// break;
|
||||
// case 4:
|
||||
// ergodox_right_led_3_off();
|
||||
// wait_ms(50);
|
||||
// ergodox_right_led_2_off();
|
||||
// wait_ms(50);
|
||||
// ergodox_right_led_1_off();
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
// void flash_dance_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
// if (state->count >= 4) {
|
||||
// reset_keyboard();
|
||||
// reset_tap_dance(state);
|
||||
// }
|
||||
// }
|
||||
|
||||
// void flash_dance_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
// ergodox_right_led_1_off();
|
||||
// wait_ms(50);
|
||||
// ergodox_right_led_2_off();
|
||||
// wait_ms(50);
|
||||
// ergodox_right_led_3_off();
|
||||
// }
|
||||
|
||||
// SYSCTL on first tap, MOUSE ON second tap
|
||||
// void layers_dance_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
// uint8_t layer = biton32(layer_state);
|
||||
|
||||
// switch(state->count) {
|
||||
// case 1:
|
||||
// switch(layer) {
|
||||
// case LR_SYSCTL:
|
||||
// layer_off(LR_SYSCTL);
|
||||
// break;
|
||||
// case MOUSE:
|
||||
// layer_off(MOUSE);
|
||||
// break;
|
||||
// default:
|
||||
// layer_on(LR_SYSCTL);
|
||||
// break;
|
||||
// }
|
||||
// break;
|
||||
// case 2:
|
||||
// layer_on(MOUSE);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
// qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
// [TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED( flash_each_tap, flash_dance_finished, flash_dance_reset ),
|
||||
// [TD_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, layers_dance_finished, NULL ),
|
||||
// };
|
1
keyboards/ergodox_ez/keymaps/pvinis/rules.mk
Normal file
1
keyboards/ergodox_ez/keymaps/pvinis/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
TAP_DANCE_ENABLE = yes
|
@@ -1,9 +1,5 @@
|
||||
/*
|
||||
|
||||
Note for ErgoDox EZ customizers: Here be dragons!
|
||||
This is not a file you want to be messing with.
|
||||
All of the interesting stuff for you is under keymaps/ :)
|
||||
Love, Erez
|
||||
|
||||
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
|
||||
|
||||
@@ -95,7 +91,7 @@ void matrix_init(void) {
|
||||
// initialize matrix state: all keys off
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = 0;
|
||||
raw_matrix[i] = 0;
|
||||
raw_matrix[i] = 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
@@ -168,7 +164,7 @@ uint8_t matrix_scan(void) {
|
||||
#ifdef LEFT_LEDS
|
||||
mcp23018_status = ergodox_left_leds_update();
|
||||
#endif // LEFT_LEDS
|
||||
bool changed = false;
|
||||
bool changed = false;
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) {
|
||||
// select rows from left and right hands
|
||||
uint8_t left_index = i;
|
||||
@@ -178,13 +174,13 @@ uint8_t matrix_scan(void) {
|
||||
|
||||
// we don't need a 30us delay anymore, because selecting a
|
||||
// left-hand row requires more than 30us for i2c.
|
||||
|
||||
|
||||
changed |= store_raw_matrix_row(left_index);
|
||||
changed |= store_raw_matrix_row(right_index);
|
||||
|
||||
unselect_rows();
|
||||
}
|
||||
|
||||
|
||||
debounce(raw_matrix, matrix, MATRIX_ROWS, changed);
|
||||
matrix_scan_quantum();
|
||||
|
||||
|
@@ -1,8 +1,4 @@
|
||||
/*
|
||||
Note for ErgoDox EZ customizers: Here be dragons!
|
||||
This is not a file you want to be messing with.
|
||||
All of the interesting stuff for you is under keymaps/ :)
|
||||
Love, Erez
|
||||
|
||||
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
|
||||
|
||||
@@ -226,8 +222,8 @@ uint8_t matrix_scan(void)
|
||||
matrix_scan_quantum();
|
||||
|
||||
#ifdef DEBUG_MATRIX
|
||||
for (uint8_t c = 0; c < MATRIX_COLS; c++)
|
||||
for (uint8_t r = 0; r < MATRIX_ROWS; r++)
|
||||
for (uint8_t c = 0; c < MATRIX_COLS; c++)
|
||||
for (uint8_t r = 0; r < MATRIX_ROWS; r++)
|
||||
if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c);
|
||||
#endif
|
||||
|
||||
@@ -324,10 +320,10 @@ static void unselect_rows(void)
|
||||
static void select_row(uint8_t row)
|
||||
{
|
||||
if (row < 6) {
|
||||
// select on mcp23018
|
||||
// select on mcp23018
|
||||
if (mcp23018_status) { // do nothing on error
|
||||
// Read using bitmask
|
||||
} else { // set active row low : 0 // set other rows hi-Z : 1
|
||||
} else { // set active row low : 0 // set other rows hi-Z : 1
|
||||
mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||
mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||
mcp23018_status = i2c_write(~(1<<row), ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||
|
@@ -114,91 +114,79 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, E_16, D_16, F_16},
|
||||
{0, B_16, A_16, C_16},
|
||||
};
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
/* {row | col << 4}
|
||||
* | {x=0..224, y=0..64}
|
||||
* | | flags
|
||||
* | | | */
|
||||
|
||||
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 }
|
||||
}, {
|
||||
//cs1
|
||||
{{0|(0<<4)}, { 0, 0}, 1},
|
||||
{{0|(1<<4)}, { 17, 0}, 4},
|
||||
{{1|(0<<4)}, { 0, 16}, 1},
|
||||
{{2|(0<<4)}, { 0, 32}, 1},
|
||||
|
||||
{ 0, 0 }, { 17, 0 }, { 0, 16 }, { 0, 32 },
|
||||
//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},
|
||||
{ 34, 0 }, { 51, 0 }, { 17, 16 }, { 34, 16 },
|
||||
//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},
|
||||
{ 17, 32 }, { 34, 32 }, { 17, 48 }, { 34, 48 },
|
||||
//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},
|
||||
{ 68, 0 }, { 85, 0 }, { 51, 16 }, { 68, 16 },
|
||||
//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},
|
||||
{ 187, 0 }, { 204, 0 }, { 187, 16 }, { 204, 16 },
|
||||
//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},
|
||||
{ 119, 0 }, { 136, 0 }, { 119, 16 }, { 136, 16 },
|
||||
//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},
|
||||
{ 153, 0 }, { 170, 0 }, { 153, 16 }, { 170, 16 },
|
||||
//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},
|
||||
{ 221, 0 }, { 221, 0 }, { 221, 32 }, { 221, 16 },
|
||||
//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},
|
||||
{ 51, 32 }, { 68, 32 }, { 51, 48 }, { 68, 48 },
|
||||
//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},
|
||||
{ 102, 0 }, { 85, 16 }, { 102, 16 }, { 85, 32 },
|
||||
//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},
|
||||
{ 102, 32 }, { 85, 48 }, { 102, 48 }, { 102, 64 },
|
||||
//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},
|
||||
{ 119, 32 }, { 136, 32 }, { 119, 48 }, { 136, 48 },
|
||||
//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},
|
||||
{ 153, 32 }, { 170, 32 }, { 153, 48 }, { 136, 48 },
|
||||
//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},
|
||||
{ 187, 32 }, { 170, 48 }, { 187, 48 }, { 153, 48 },
|
||||
//cs15
|
||||
{{3|(12<<4)}, {221, 48}, 1},
|
||||
|
||||
{{4|(9<<4)}, {221, 64}, 1},
|
||||
{{4|(8<<4)}, {204, 64}, 1},
|
||||
{ 221, 48 }, { 221, 64 }, { 204, 64 },
|
||||
//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},
|
||||
};
|
||||
{ 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
|
||||
} };
|
||||
|
||||
#endif
|
||||
|
@@ -1,8 +1,4 @@
|
||||
/*
|
||||
Note for ErgoDox EZ customizers: Here be dragons!
|
||||
This is not a file you want to be messing with.
|
||||
All of the interesting stuff for you is under keymaps/ :)
|
||||
Love, Erez
|
||||
|
||||
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
|
||||
|
||||
@@ -248,8 +244,8 @@ uint8_t matrix_scan(void)
|
||||
matrix_scan_quantum();
|
||||
|
||||
#ifdef DEBUG_MATRIX
|
||||
for (uint8_t c = 0; c < MATRIX_COLS; c++)
|
||||
for (uint8_t r = 0; r < MATRIX_ROWS; r++)
|
||||
for (uint8_t c = 0; c < MATRIX_COLS; c++)
|
||||
for (uint8_t r = 0; r < MATRIX_ROWS; r++)
|
||||
if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c);
|
||||
#endif
|
||||
|
||||
@@ -359,7 +355,7 @@ static void select_row(uint8_t row)
|
||||
if (row < 7) {
|
||||
// select on mcp23018
|
||||
if (mcp23018_status) { // do nothing on error
|
||||
} else { // set active row low : 0 // set other rows hi-Z : 1
|
||||
} else { // set active row low : 0 // set other rows hi-Z : 1
|
||||
mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||
mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||
mcp23018_status = i2c_write(0xFF & ~(1<<row), ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||
|
@@ -1,8 +1,4 @@
|
||||
/*
|
||||
Note for ErgoDox EZ customizers: Here be dragons!
|
||||
This is not a file you want to be messing with.
|
||||
All of the interesting stuff for you is under keymaps/ :)
|
||||
Love, Erez
|
||||
|
||||
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
|
||||
|
||||
|
@@ -19,24 +19,19 @@
|
||||
#include "haptic.h"
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
#include "rgblight.h"
|
||||
#include "rgb_matrix.h"
|
||||
|
||||
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}
|
||||
};
|
||||
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
|
||||
} };
|
||||
|
||||
#endif
|
||||
|
||||
@@ -53,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))
|
||||
@@ -69,7 +64,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);
|
||||
@@ -83,7 +78,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);
|
||||
@@ -162,7 +157,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)) {
|
||||
@@ -197,7 +192,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
|
||||
|
61
keyboards/handwired/daishi/config.h
Normal file
61
keyboards/handwired/daishi/config.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
Copyright 2019 Crokto
|
||||
|
||||
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 0x6D6D
|
||||
#define PRODUCT_ID 0x0001
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER MetaMechs
|
||||
#define PRODUCT Daishi
|
||||
#define DESCRIPTION Compact Battlecruiser
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 7
|
||||
#define MATRIX_COLS 18
|
||||
|
||||
/*
|
||||
* 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 { D6, D7, E0, E1, C0, C1, C2 }
|
||||
#define MATRIX_COL_PINS { E6, E7, E3, B0, B1, B2, A6, A5, A4, A3, A2, A1, A0, F7, F6, F5, F4, F3 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* Set up rotary encoder */
|
||||
#define NUMBER_OF_ENCODERS 1
|
||||
#define ENCODERS_PAD_A { F1 }
|
||||
#define ENCODERS_PAD_B { F0 }
|
||||
#define ENCODER_RESOLUTION 2
|
||||
|
||||
/* Set delay for tap_code on rotary encoder */
|
||||
#define TAP_CODE_DELAY 10
|
22
keyboards/handwired/daishi/daishi.c
Normal file
22
keyboards/handwired/daishi/daishi.c
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "daishi.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
25
keyboards/handwired/daishi/daishi.h
Normal file
25
keyboards/handwired/daishi/daishi.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define encoder_update(clockwise) encoder_update_user(uint8_t index, clockwise)
|
||||
|
||||
// The first section contains all of the arguments
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
#define LAYOUT( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, \
|
||||
K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4E, K4F, K4G, K4H, \
|
||||
K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5D, K5E, K5F, K5G, K5H, \
|
||||
K60, K61, K62, K65, K69, K6A, K6C, K6D, K6E, K6F, K6G \
|
||||
){ \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H }, \
|
||||
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, K4E, K4F, K4G, K4H }, \
|
||||
{ K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, KC_NO, K5D, K5E, K5F, K5G, K5H }, \
|
||||
{ K60, K61, K62, KC_NO, KC_NO, K65, KC_NO, KC_NO, KC_NO, K69, K6A, KC_NO, K6C, K6D, K6E, K6F, K6G, KC_NO } \
|
||||
}
|
124
keyboards/handwired/daishi/keymaps/default/keymap.c
Normal file
124
keyboards/handwired/daishi/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,124 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Layer shorthand
|
||||
#define _QW 0
|
||||
#define _FN 1
|
||||
|
||||
enum custom_keycodes {
|
||||
M_EXAMPLE1 = SAFE_RANGE,
|
||||
M_EXAMPLE2,
|
||||
DYNAMIC_MACRO_RANGE,
|
||||
};
|
||||
|
||||
#include "dynamic_macro.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* QWERTY
|
||||
* .-----------------------------------------------------------------------------------------------------------------------------------------------------------------.
|
||||
* | ESC | | | | | | | | | | DM1 | DM2 | DMSTOP | PRINT | SCROLL | PAUSE | FN | VOL |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | HOME | PGUP | END | INS | NUM |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACK | PGDN | / | * | - |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||
* | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | 7 | 8 | 9 | + |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||
* | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | | 4 | 5 | 6 | = |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||
* | LSHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | | UP | 1 | 2 | 3 | ENTER |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||
* | LCTRL | LGUI | LALT | | | SPACE | | | | RALT | RCTRL | | LEFT | DOWN | RIGHT | 0 | . | |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------'
|
||||
*/
|
||||
|
||||
[_QW] = LAYOUT( /* QWERTY */
|
||||
KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______,DYN_MACRO_PLAY1,DYN_MACRO_PLAY2,DYN_REC_STOP, KC_PSCR, KC_SLCK, KC_PAUS, MO(_FN), KC_MUTE,
|
||||
KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_DEL , KC_HOME, KC_PGUP, KC_END , KC_INS , KC_NLCK,
|
||||
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_PGDN, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
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_P7 , KC_P8 , KC_P9 , KC_PPLS,
|
||||
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 , KC_P4 , KC_P5 , KC_P6 , KC_EQL ,
|
||||
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 , KC_P1 , KC_P2 , KC_P3 , KC_PENT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_PDOT
|
||||
),
|
||||
|
||||
/* FN
|
||||
* .-----------------------------------------------------------------------------------------------------------------------------------------------------------------.
|
||||
* | RESET | F13 | F14 | F15 | f16 | f17 | f18 | F19 | F20 | F21 | DM1 R | DM2 R | DMSTOP | | | | FN | DEBUG |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------'
|
||||
*/
|
||||
|
||||
[_FN] = LAYOUT( /* Function */
|
||||
RESET , KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 ,DYN_REC_START1,DYN_REC_START2,DYN_REC_STOP, _______, _______, _______, MO(_FN), DEBUG,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (!process_record_dynamic_macro(keycode, record)) {
|
||||
return false;
|
||||
}
|
||||
if (record->event.pressed) {
|
||||
switch(keycode) {
|
||||
case M_EXAMPLE1:
|
||||
SEND_STRING("This is an example macro!"SS_TAP(X_ENTER)); //prints "This is an example macro!" and hits Enter
|
||||
return false;
|
||||
case M_EXAMPLE2:
|
||||
SEND_STRING("This is a another example!"SS_TAP(X_ENTER)); //prints "This is a another example!" and hits Enter
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
// Call the keymap level matrix init.
|
||||
|
||||
// Set our LED pins as output
|
||||
setPinOutput(C4);
|
||||
setPinOutput(C5);
|
||||
setPinOutput(C6);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
if (IS_LED_OFF(usb_led, USB_LED_NUM_LOCK)) {
|
||||
writePinLow(C4);
|
||||
} else {
|
||||
writePinHigh(C4);
|
||||
}
|
||||
if (IS_LED_OFF(usb_led, USB_LED_CAPS_LOCK)) {
|
||||
writePinLow(C5);
|
||||
} else {
|
||||
writePinHigh(C5);
|
||||
}
|
||||
if (IS_LED_OFF(usb_led, USB_LED_SCROLL_LOCK)) {
|
||||
writePinLow(C6);
|
||||
} else {
|
||||
writePinHigh(C6);
|
||||
}
|
||||
}
|
5
keyboards/handwired/daishi/keymaps/default/readme.md
Normal file
5
keyboards/handwired/daishi/keymaps/default/readme.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Default Daishi Layout
|
||||
|
||||

|
||||
|
||||
This is the default layout that comes on the Daishi. For more information on the design of this layout, check out [kb.metamechs.com](http://kb.metamechs.com/daishi/).
|
15
keyboards/handwired/daishi/readme.md
Normal file
15
keyboards/handwired/daishi/readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Daishi
|
||||
|
||||

|
||||
|
||||
A compact battlecruiser using the CBC1 PCB. [More info on kb.metamechs.com](http://kb.metamechs.com/daishi/)
|
||||
|
||||
Keyboard Maintainer: [Crokto](https://github.com/Croktopus/)
|
||||
Hardware Supported: CBC1 PCB
|
||||
Hardware Availability: [kb.metamechs.com](http://kb.metamechs.com/daishi/get-your-own-daishi/)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make handwired/daishi: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).
|
66
keyboards/handwired/daishi/rules.mk
Normal file
66
keyboards/handwired/daishi/rules.mk
Normal file
@@ -0,0 +1,66 @@
|
||||
# MCU name
|
||||
MCU = at90usb1286
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# QMK 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 = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # 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 support (+2400 to 4200, depending on config)
|
||||
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. Do not enable this with audio at the same time.
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
ENCODER_ENABLE = yes # Add rotary encoder support
|
@@ -5,11 +5,6 @@ The "column" and "row" in here actually refers to the opposite on the keyboard
|
||||
see definition of KEYMAP in v1.h, the grid is transposed so that a "row" in here is actually a "column" on the physical keyboard
|
||||
Nicolas
|
||||
|
||||
Note for ErgoDox EZ customizers: Here be dragons!
|
||||
This is not a file you want to be messing with.
|
||||
All of the interesting stuff for you is under keymaps/ :)
|
||||
Love, Erez
|
||||
|
||||
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
|
||||
Copyright 2013 Nicolas Poirey <nicolas.poirey@gmail.com>
|
||||
|
||||
|
@@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define MATRIX_ROW_PINS { C6,D7,E6,B4,B5 }
|
||||
#define MATRIX_COL_PINS { F4,F5,F6,F7,B1,B3,B2,B6 }
|
||||
#define UNUSED_PINS
|
||||
#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
|
||||
#define SOFT_SERIAL_PIN D1 // or D1, D2, D3, E6
|
||||
//#define USE_I2C
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
@@ -62,20 +62,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#define RGB_DI_PIN D4
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLED_NUM 8
|
||||
#define RGBLED_NUM 16
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
/*== 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
|
||||
// #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
|
||||
#endif
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
@@ -244,3 +244,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define MASTER_LEFT
|
||||
#define EEHANDS
|
||||
*/
|
||||
#define RGBLED_SPLIT {8,8}
|
||||
|
@@ -62,8 +62,8 @@ BOOTLOADER = caterina
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
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 = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
@@ -72,7 +72,7 @@ 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 = no # Enable keyboard backlight functionality on B7 by default
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
|
@@ -39,15 +39,15 @@ enum layers{
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[DF]=LAYOUT(\
|
||||
KC_ESC,KC_1,KC_2,KC_3,KC_4,KC_5,KC_6, KC_7,KC_8,KC_9,KC_0,KC_MINS,KC_EQL,KC_NUHS,KC_GRV,\
|
||||
KC_TAB ,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y, KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC,KC_DEL,\
|
||||
KC_TAB ,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y, KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC,KC_BSPC,\
|
||||
KC_LCTRL ,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_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_RSFT,KC_FN,\
|
||||
KC_LCTRL,KC_LGUI,KC_LALT,KC_MHEN,KC_BSPC,KC_SPC, KC_ENT,KC_ESC,KC_HENK,KC_RALT,KC_RGUI,KC_RCTRL\
|
||||
),
|
||||
[FN]=LAYOUT(\
|
||||
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_INS,KC_DEL,\
|
||||
KC_TAB ,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y, KC_Y,KC_U,KC_PSCR,KC_SLCK,KC_PAUSE,KC_UP,KC_RBRC,KC_BSPC,\
|
||||
KC_CAPS ,KC_A,KC_S,KC_D,KC_F,KC_G, KC_SFT(KC_8),KC_SLSH,KC_HOME,KC_PGUP,KC_LEFT,KC_RIGHT,KC_ENT,\
|
||||
KC_TAB ,KC_9,KC_7,KC_5,KC_3,KC_1,KC_Y, KC_Y,KC_U,KC_PSCR,KC_SLCK,KC_PAUSE,KC_UP,KC_RBRC,KC_BSPC,\
|
||||
KC_CAPS ,KC_8,KC_6,KC_4,KC_2,KC_0, KC_SFT(KC_8),KC_SLSH,KC_HOME,KC_PGUP,KC_LEFT,KC_RIGHT,KC_ENT,\
|
||||
KC_LSFT ,KC_Z,KC_X,KC_C,KC_V,KC_B, KC_B,KC_SFT(KC_EQL),KC_MINS,KC_END,KC_PGDN,KC_DOWN,KC_RSFT,KC_TRNS,\
|
||||
KC_LCTRL,KC_LGUI,KC_LALT,KC_MHEN,KC_BSPC,KC_SPC, KC_ENT,KC_ESC,KC_HENK,KC_RALT,KC_RGUI,KC_RCTRL\
|
||||
),
|
||||
@@ -75,6 +75,23 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state)
|
||||
{
|
||||
uint8_t layer=biton32(state);
|
||||
switch(layer)
|
||||
{
|
||||
case DF:
|
||||
rgblight_sethsv_noeeprom(180,255,255);
|
||||
break;
|
||||
case FN:
|
||||
rgblight_sethsv_noeeprom(0,255,255);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
@@ -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,83 +165,37 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{1, C9_16, C7_15, C6_15} //D16
|
||||
};
|
||||
|
||||
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}
|
||||
};
|
||||
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
|
||||
} };
|
||||
|
||||
#else
|
||||
|
||||
@@ -319,83 +273,37 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{1, C9_16, C7_15, C6_15} //D16
|
||||
};
|
||||
|
||||
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}
|
||||
};
|
||||
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
|
||||
} };
|
||||
|
||||
#endif
|
||||
|
||||
@@ -492,4 +400,4 @@ void suspend_power_down_kb(void)
|
||||
void suspend_wakeup_init_kb(void)
|
||||
{
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
}
|
||||
}
|
||||
|
@@ -17,33 +17,33 @@
|
||||
#include "stanrc85.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_60_ansi(
|
||||
TD_TESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
KC_CTLE, 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, KC_SLSH, KC_RSFT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), TD_TCTL),
|
||||
[0] = LAYOUT_60_ansi(
|
||||
TD_TESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
KC_CTLE, 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, KC_SLSH, KC_RSFT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), TD_TCTL),
|
||||
|
||||
[1] = LAYOUT_60_ansi(
|
||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
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,
|
||||
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_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(2), MO(3), KC_RCTL),
|
||||
[1] = LAYOUT_60_ansi(
|
||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
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,
|
||||
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_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(2), MO(3), KC_RCTL),
|
||||
|
||||
[2] = LAYOUT_60_ansi(
|
||||
KC_TILD, 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,
|
||||
_______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, KC_INS,
|
||||
KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______,
|
||||
_______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______),
|
||||
[2] = LAYOUT_60_ansi(
|
||||
KC_TILD, 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,
|
||||
_______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, KC_PSCR, _______, _______, KC_INS,
|
||||
KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______,
|
||||
_______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
[3] = LAYOUT_60_ansi(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST,
|
||||
_______, EF_INC, ES_INC, S1_INC, H1_INC, S2_INC, H2_INC, BR_INC, _______, _______, _______, _______, _______, RESET,
|
||||
TG(1), EF_DEC, ES_DEC, S1_DEC, H1_DEC, S2_DEC, H2_DEC, BR_DEC, _______, _______, _______, _______, KC_MAKE,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______)
|
||||
[3] = LAYOUT_60_ansi(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST,
|
||||
_______, EF_INC, ES_INC, S1_INC, H1_INC, S2_INC, H2_INC, BR_INC, _______, _______, _______, _______, _______, RESET,
|
||||
_______, EF_DEC, ES_DEC, S1_DEC, H1_DEC, S2_DEC, H2_DEC, BR_DEC, _______, _______, _______, _______, KC_MAKE,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, TG(1))
|
||||
};
|
||||
|
||||
// Backlight specific keys:
|
||||
|
@@ -1,9 +1,9 @@
|
||||
# project specific files
|
||||
SRC = keyboards/zeal60/zeal60.c \
|
||||
keyboards/zeal60/rgb_backlight.c \
|
||||
drivers/issi/is31fl3733.c \
|
||||
quantum/color.c \
|
||||
drivers/arm/i2c_master.c
|
||||
keyboards/zeal60/rgb_backlight.c \
|
||||
drivers/issi/is31fl3733.c \
|
||||
quantum/color.c \
|
||||
drivers/arm/i2c_master.c
|
||||
|
||||
## chip/board settings
|
||||
# the next two should match the directories in
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# hotswap
|
||||
# KBD67 hotswap
|
||||
|
||||
A 65% hot swap board with blocker and USB Type C port.
|
||||
|
||||
@@ -8,6 +8,6 @@ Hardware Availability: [KBDFans](https://kbdfans.cn/products/coming-soon-kbd67-m
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make kbd67/hotswap:default
|
||||
make kbdfans/kbd67/hotswap: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,17 +1,22 @@
|
||||
# KBD67
|
||||
|
||||
A 65% keyboard sold in two variants. Rev1 was a typical keyboard that had to be soldered together, supporting multiple layouts.
|
||||
Months later, a new version with hotswap was sold. **Firmware files from one, will not work on the other.** Please use the `.hex` appropriate for your board.
|
||||
A 65% keyboard sold in three variants.
|
||||
1. Rev1: Typical keyboard that had to be soldered together, supporting multiple layouts.
|
||||
2. HotSwap: Released in late 2018, Hotswap single layout keyboard.
|
||||
3. Rev2: Released in April/May 2019, the Rev2 also needs to be soldered together and supports multiple layouts.
|
||||
|
||||
The rev1 PCB for the KBD67 is sold under the name "KBD65."
|
||||
**Firmware files are SPECIFIC to each board. Firmware files from one, will not work on the other.** Please use the `.hex` appropriate for your board.
|
||||
|
||||
The rev1 PCB is sold under the name "KBD65".
|
||||
|
||||
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
|
||||
Hardware Supported: KBD67
|
||||
Hardware Availability: KBDFans
|
||||
Hardware Supported: KBD67 rev1, rev2, hotswap
|
||||
Hardware Availability: KBDFans
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
Make examples for this keyboard (after setting up your build environment):
|
||||
|
||||
make kbdfans/kbd67/rev1:default
|
||||
make kbdfans/kbd67/rev2:default
|
||||
make kbdfans/kbd67/hotswap: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,4 +1,4 @@
|
||||
# kbd67
|
||||
# KBD67 rev1
|
||||
|
||||
65% keyboard with blocker.
|
||||
|
||||
@@ -8,6 +8,6 @@ Hardware Availability: KBDFans [Keyboard Kit](https://kbdfans.cn/products/coming
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make kbd67/rev1:default
|
||||
make kbdfans/kbd67/rev1: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).
|
||||
|
64
keyboards/kbdfans/kbd67/rev2/config.h
Normal file
64
keyboards/kbdfans/kbd67/rev2/config.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
Copyright 2019 Vorror
|
||||
|
||||
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 KBDFans
|
||||
#define PRODUCT KBD67v2
|
||||
#define DESCRIPTION 65% Keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 16
|
||||
|
||||
#define MATRIX_ROW_PINS { B7, D0, F0, F1, F4 }
|
||||
#define MATRIX_COL_PINS { B0, B1, B2, B3, D1, D2, D3, D6, D7, B4, B6, C6, C7, F7, F6, F5 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_PIN B5
|
||||
#ifdef BACKLIGHT_PIN
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
#endif
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
#define RGB_DI_PIN E2
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 18
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#define RGBLIGHT_LIMIT_VAL 240
|
||||
#endif
|
16
keyboards/kbdfans/kbd67/rev2/info.json
Normal file
16
keyboards/kbdfans/kbd67/rev2/info.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"keyboard_name": "kbd67v2",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 16,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_all": {
|
||||
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
|
||||
},
|
||||
|
||||
"LAYOUT_65_ansi": {
|
||||
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
|
||||
}
|
||||
}
|
||||
}
|
19
keyboards/kbdfans/kbd67/rev2/keymaps/default/config.h
Normal file
19
keyboards/kbdfans/kbd67/rev2/keymaps/default/config.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/* Copyright 2018 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
|
99
keyboards/kbdfans/kbd67/rev2/keymaps/default/keymap.c
Normal file
99
keyboards/kbdfans/kbd67/rev2/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,99 @@
|
||||
/* Copyright 2018 '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 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] = {
|
||||
/* Keymap (Base Layer) Default Layer
|
||||
* ,----------------------------------------------------------------.
|
||||
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Home|
|
||||
* |----------------------------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |PgUp|
|
||||
* |----------------------------------------------------------------|
|
||||
* |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return |PgDn|
|
||||
* |----------------------------------------------------------------|
|
||||
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|End |
|
||||
* |----------------------------------------------------------------|
|
||||
* |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig |
|
||||
* `----------------------------------------------------------------'
|
||||
*/
|
||||
[0] = LAYOUT_65_ansi(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, \
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
/* Keymap Fn Layer
|
||||
* ,----------------------------------------------------------------.
|
||||
* |~ `|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins |
|
||||
* |----------------------------------------------------------------|
|
||||
* |Caps | |Up | | | | | |PSc|SLk|Pau|Up | | | |
|
||||
* |----------------------------------------------------------------|
|
||||
* | |Lef|Dow|Rig| | | | |Hom|PUp|Lef|Rig| | |
|
||||
* |----------------------------------------------------------------|
|
||||
* | | | | | | | | |End|PDn|Dow| |PUp| |
|
||||
* |----------------------------------------------------------------|
|
||||
* | | | | | | | |Hom|PDn|End |
|
||||
* `----------------------------------------------------------------'
|
||||
*/
|
||||
[1] = LAYOUT_65_ansi(
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,KC_INS, \
|
||||
KC_CAPS,_______, KC_UP,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS, KC_UP,_______, _______,_______, \
|
||||
_______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,_______,_______,KC_HOME,KC_PGUP,KC_LEFT,KC_RGHT, _______,_______, \
|
||||
_______,_______,_______,_______,_______,_______,_______,_______, KC_END,KC_PGDN,KC_DOWN, _______,KC_PGUP,_______, \
|
||||
_______, _______, _______, _______, _______,_______,_______,KC_HOME,KC_PGDN, KC_END),
|
||||
|
||||
};
|
||||
|
||||
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
keyboards/kbdfans/kbd67/rev2/keymaps/default/readme.md
Normal file
1
keyboards/kbdfans/kbd67/rev2/keymaps/default/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The default keymap for kbd67
|
17
keyboards/kbdfans/kbd67/rev2/keymaps/koba/config.h
Normal file
17
keyboards/kbdfans/kbd67/rev2/keymaps/koba/config.h
Normal file
@@ -0,0 +1,17 @@
|
||||
/* Copyright 2019 Daisuke Kobayashi
|
||||
*
|
||||
* 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
|
61
keyboards/kbdfans/kbd67/rev2/keymaps/koba/keymap.c
Normal file
61
keyboards/kbdfans/kbd67/rev2/keymaps/koba/keymap.c
Normal file
@@ -0,0 +1,61 @@
|
||||
/* Copyright 2019 Daisuke Kobayashi
|
||||
*
|
||||
* 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
|
||||
#include "keymap_jp.h"
|
||||
|
||||
#define RGB_RMO RGB_RMOD
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap (Base Layer) Default Layer
|
||||
* ,----------------------------------------------------------------.
|
||||
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| ^| \|BS |Del |
|
||||
* |----------------------------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| @| [| Ent |PgUp|
|
||||
* |------------------------------------------------------. |----|
|
||||
* |H/Z | A| S| D| F| G| H| J| K| L| ;| :| ]| |PgDn|
|
||||
* |----------------------------------------------------------------|
|
||||
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PScr|
|
||||
* |----------------------------------------------------------------|
|
||||
* |Ctrl|Win |Alt | Space |Fn | Space |Alt |Ctrl| |Lef|Dow|Rig |
|
||||
* `------------------------------------------------' `------------'
|
||||
*/
|
||||
[0] = LAYOUT_all(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, JP_CIRC, KC_JYEN, KC_BSPC, KC_DELT, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, JP_RBRC, KC_PGUP, \
|
||||
KC_ZKHK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, KC_ENT, KC_PGDN, \
|
||||
KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PSCR, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
/* Keymap Fn Layer
|
||||
* ,----------------------------------------------------------------.
|
||||
* |Rst| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | |Ins |
|
||||
* |----------------------------------------------------------------|
|
||||
* | |M- |M+ |RGB|H- |H+ | | |Prt|SLk|Pau| | | | |
|
||||
* |------------------------------------------------------. |----|
|
||||
* |Caps |Vo-|Vo+|Mut|S- |S+ | *| /|Hom|PUp| | | | | |
|
||||
* |----------------------------------------------------------------|
|
||||
* | |BL-|BL+|BL |V- |V+ | +| -|End|PDn| _| |PUp| |
|
||||
* |----------------------------------------------------------------|
|
||||
* | | | | Muhenkan | | Henkan |Kana|Menu| |Hom|PDn|End |
|
||||
* `------------------------------------------------' `------------'
|
||||
*/
|
||||
[1] = LAYOUT_all(
|
||||
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX,_______,KC_INS, \
|
||||
_______, RGB_RMO,RGB_MOD,RGB_TOG,RGB_HUD,RGB_HUI,XXXXXXX,XXXXXXX,KC_PSCR,KC_SLCK,KC_PAUS,XXXXXXX,XXXXXXX,XXXXXXX, _______, \
|
||||
KC_CAPS, KC_VOLD,KC_VOLU,KC_MUTE,RGB_SAD,RGB_SAI,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,XXXXXXX,XXXXXXX, KC_PENT, _______, \
|
||||
_______,_______,BL_DEC, BL_INC, BL_TOGG,RGB_VAD,RGB_VAI,KC_PPLS,KC_PMNS,KC_END, KC_PGDN,JP_UNDS,_______, KC_PGUP,_______, \
|
||||
_______,_______,_______, KC_MHEN, _______, KC_HENK, KC_KANA,KC_APP, _______,KC_HOME,KC_PGDN,KC_END),
|
||||
};
|
7
keyboards/kbdfans/kbd67/rev2/keymaps/koba/readme.md
Normal file
7
keyboards/kbdfans/kbd67/rev2/keymaps/koba/readme.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Koba's keymap for KBD67
|
||||
|
||||

|
||||
|
||||
- JIS layout.
|
||||
- Fn layer is arranged like HHKB.
|
||||
- 3 splitted space bar. (Space-Fn-Space)
|
13
keyboards/kbdfans/kbd67/rev2/readme.md
Normal file
13
keyboards/kbdfans/kbd67/rev2/readme.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# KBD67 rev2
|
||||
|
||||
65% pcb with blocker. Revision 2 (Manufactured after 05/01/19).
|
||||
|
||||
Keyboard Maintainer: [Vorror](https://github.com/vorror)
|
||||
Hardware Supported: KBD67v2 PCB (Sometimes sold under the name "KBD65")
|
||||
Hardware Availability: KBDFans [Keyboard Kit](https://kbdfans.cn/products/coming-soon-kbd67-mechanical-keyboard-diy-kit), [PCB](https://kbdfans.cn/collections/65/products/kbd65-65-custom-mechanical-keyboard-pcb)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make kbdfans/kbd67/rev2: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).
|
42
keyboards/kbdfans/kbd67/rev2/rev2.c
Normal file
42
keyboards/kbdfans/kbd67/rev2/rev2.c
Normal file
@@ -0,0 +1,42 @@
|
||||
/* Copyright 2019 Vorror
|
||||
*
|
||||
* 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 "rev2.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
led_set_user(usb_led);
|
||||
}
|
57
keyboards/kbdfans/kbd67/rev2/rev2.h
Normal file
57
keyboards/kbdfans/kbd67/rev2/rev2.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/* Copyright 2018 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_all( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
|
||||
K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \
|
||||
K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \
|
||||
K40, K41, K43, K44, K46, K48, K4A, K4B, K4C, K4D, K4E, K4F \
|
||||
) \
|
||||
{ \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \
|
||||
{ K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \
|
||||
{ K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \
|
||||
{ K40, K41, KC_NO, K43, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F }, \
|
||||
}
|
||||
|
||||
#define LAYOUT_65_ansi( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \
|
||||
K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \
|
||||
K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \
|
||||
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \
|
||||
K40, K41, K43, K46, K4A, K4B, K4C, K4D, K4E, K4F \
|
||||
) \
|
||||
{ \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \
|
||||
{ K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \
|
||||
{ K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \
|
||||
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \
|
||||
{ K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F }, \
|
||||
}
|
||||
|
82
keyboards/kbdfans/kbd67/rev2/rules.mk
Normal file
82
keyboards/kbdfans/kbd67/rev2/rules.mk
Normal file
@@ -0,0 +1,82 @@
|
||||
# MCU name
|
||||
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 = no # 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 = yes # Enable keyboard RGB underglow
|
||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
||||
|
||||
LAYOUTS = 65_ansi
|
@@ -16,15 +16,26 @@
|
||||
#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
|
||||
),
|
||||
};
|
||||
|
||||
|
3
keyboards/keebio/bdn9/keymaps/mousepad/config.h
Normal file
3
keyboards/keebio/bdn9/keymaps/mousepad/config.h
Normal file
@@ -0,0 +1,3 @@
|
||||
#define MK_3_SPEED
|
||||
#define TERMINAL_HELP
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user