mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-17 21:22:05 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
d03b83fdc9
@ -246,6 +246,11 @@ ifneq ($(strip $(BACKLIGHT_ENABLE)), no)
|
||||
CIE1931_CURVE = yes
|
||||
endif
|
||||
|
||||
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/backlight
|
||||
SRC += $(QUANTUM_DIR)/backlight/backlight.c
|
||||
OPT_DEFS += -DBACKLIGHT_ENABLE
|
||||
|
||||
ifeq ($(strip $(BACKLIGHT_ENABLE)), custom)
|
||||
OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER
|
||||
endif
|
||||
|
@ -31,17 +31,17 @@ Here is an example for easy reference:
|
||||
```c
|
||||
/* Enums for foo */
|
||||
enum foo_state {
|
||||
FOO_BAR,
|
||||
FOO_BAZ,
|
||||
FOO_BAR,
|
||||
FOO_BAZ,
|
||||
};
|
||||
|
||||
/* Returns a value */
|
||||
int foo(void) {
|
||||
if (some_condition) {
|
||||
return FOO_BAR;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
if (some_condition) {
|
||||
return FOO_BAR;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -267,6 +267,14 @@ There are a few different ways to set handedness for split keyboards (listed in
|
||||
* 4: about 26kbps
|
||||
* 5: about 20kbps
|
||||
|
||||
* `#define SPLIT_USB_DETECT`
|
||||
* Detect (with timeout) USB connection when delegating master/slave
|
||||
* Default behavior for ARM
|
||||
* Required for AVR Teensy
|
||||
|
||||
* `#define SPLIT_USB_TIMEOUT 2500`
|
||||
* Maximum timeout when detecting master/slave when using `SPLIT_USB_DETECT`
|
||||
|
||||
# The `rules.mk` File
|
||||
|
||||
This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features.
|
||||
@ -302,13 +310,13 @@ This is a [make](https://www.gnu.org/software/make/manual/make.html) file that i
|
||||
Use these to enable or disable building certain features. The more you have enabled the bigger your firmware will be, and you run the risk of building a firmware too large for your MCU.
|
||||
|
||||
* `BOOTMAGIC_ENABLE`
|
||||
* Virtual DIP switch configuration(+1000)
|
||||
* Virtual DIP switch configuration
|
||||
* `MOUSEKEY_ENABLE`
|
||||
* Mouse keys(+4700)
|
||||
* Mouse keys
|
||||
* `EXTRAKEY_ENABLE`
|
||||
* Audio control and System control(+450)
|
||||
* Audio control and System control
|
||||
* `CONSOLE_ENABLE`
|
||||
* Console for debug(+400)
|
||||
* Console for debug
|
||||
* `COMMAND_ENABLE`
|
||||
* Commands for debug and configuration
|
||||
* `COMBO_ENABLE`
|
||||
@ -340,7 +348,7 @@ Use these to enable or disable building certain features. The more you have enab
|
||||
* `NO_USB_STARTUP_CHECK`
|
||||
* Disables usb suspend check after keyboard startup. Usually the keyboard waits for the host to wake it up before any tasks are performed. This is useful for split keyboards as one half will not get a wakeup call but must send commands to the master.
|
||||
* `LINK_TIME_OPTIMIZATION_ENABLE`
|
||||
= Enables Link Time Optimization (`LTO`) when compiling the keyboard. This makes the process take longer, but can significantly reduce the compiled size (and since the firmware is small, the added time is not noticable). However, this will automatically disable the old Macros and Functions features automatically, as these break when `LTO` is enabled. It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION`
|
||||
= Enables Link Time Optimization (`LTO`) when compiling the keyboard. This makes the process take longer, but can significantly reduce the compiled size (and since the firmware is small, the added time is not noticable). However, this will automatically disable the old Macros and Functions features automatically, as these break when `LTO` is enabled. It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION`
|
||||
|
||||
## USB Endpoint Limitations
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
This is an integration of Peter Fleury's LCD library. This page will explain the basics. [For in depth documentation visit his page.](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html)
|
||||
|
||||
You can enable support for HD44780 Displays by setting the `HD44780_ENABLE` flag in your keyboards `rules.mk` to yes. This will use about 400 KB of extra space.
|
||||
You can enable support for HD44780 Displays by setting the `HD44780_ENABLE` flag in your keyboards `rules.mk` to yes.
|
||||
|
||||
## Configuration
|
||||
|
||||
@ -26,7 +26,7 @@ Uncomment the section labled HD44780 and change the parameters as needed.
|
||||
#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_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
|
||||
@ -39,14 +39,14 @@ Uncomment the section labled HD44780 and change the parameters as needed.
|
||||
|
||||
Should you need to configure other properties you can copy them from `quantum/hd44780.h` and set them in your `config.h`
|
||||
|
||||
## Usage
|
||||
## Usage
|
||||
|
||||
To initialize your display, call `lcd_init()` with one of these parameters:
|
||||
````
|
||||
LCD_DISP_OFF : display off
|
||||
LCD_DISP_ON : display on, cursor off
|
||||
LCD_DISP_ON_CURSOR : display on, cursor on
|
||||
LCD_DISP_ON_CURSOR_BLINK : display on, cursor on flashing
|
||||
LCD_DISP_ON_CURSOR_BLINK : display on, cursor on flashing
|
||||
````
|
||||
This is best done in your keyboards `matrix_init_kb` or your keymaps `matrix_init_user`.
|
||||
It is advised to clear the display before use.
|
||||
|
@ -16,7 +16,7 @@ First, enable Key Lock by setting `KEY_LOCK_ENABLE = yes` in your `rules.mk`. Th
|
||||
|
||||
## Caveats
|
||||
|
||||
Key Lock is only able to hold standard action keys and [One Shot modifier](quantum_keycodes.md#one-shot-keys) keys (for example, if you have your Shift defined as `OSM(KC_LSFT)`).
|
||||
Key Lock is only able to hold standard action keys and [One Shot modifier](feature_advanced_keycodes.md#one-shot-keys) keys (for example, if you have your Shift defined as `OSM(KC_LSFT)`).
|
||||
This does not include any of the QMK special functions (except One Shot modifiers), or shifted versions of keys such as `KC_LPRN`. If it's in the [Basic Keycodes](keycodes_basic.md) list, it can be held.
|
||||
|
||||
Switching layers will not cancel the Key Lock.
|
||||
|
@ -190,6 +190,18 @@ This sets how many LEDs are directly connected to each controller. The first nu
|
||||
?> This setting implies that `RGBLIGHT_SPLIT` is enabled, and will forcibly enable it, if it's not.
|
||||
|
||||
|
||||
```c
|
||||
#define SPLIT_USB_DETECT
|
||||
```
|
||||
This option changes the startup behavior to detect an active USB connection when delegating master/slave. If this operation times out, then the half is assume to be a slave. This is the default behavior for ARM, and required for AVR Teensy boards (due to hardware limitations).
|
||||
|
||||
?> This setting will stop the ability to demo using battery packs.
|
||||
|
||||
```c
|
||||
#define SPLIT_USB_TIMEOUT 2500
|
||||
```
|
||||
This sets the maximum timeout when detecting master/slave when using `SPLIT_USB_DETECT`.
|
||||
|
||||
## Additional Resources
|
||||
|
||||
Nicinabox has a [very nice and detailed guide](https://github.com/nicinabox/lets-split-guide) for the Let's Split keyboard, that covers most everything you need to know, including troubleshooting information.
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Terminal
|
||||
|
||||
> This feature is currently *huge* at 4400 bytes, and should probably only be put on boards with a lot of memory, or for fun.
|
||||
> This feature is currently *huge*, and should probably only be put on boards with a lot of memory, or for fun.
|
||||
|
||||
The terminal feature is a command-line-like interface designed to communicate through a text editor with keystrokes. It's beneficial to turn off auto-indent features in your editor.
|
||||
|
||||
@ -56,7 +56,7 @@ Outputs the last 5 commands entered
|
||||
1. help
|
||||
2. about
|
||||
3. keymap 0
|
||||
4. help
|
||||
4. help
|
||||
5. flush-buffer
|
||||
```
|
||||
|
||||
|
@ -8,7 +8,8 @@ Tester votre clavier est normalement assez simple. Appuyez chaque touche de votr
|
||||
|
||||
Note: ces programmes ne sont ni fournis ni approuvés par QMK.
|
||||
|
||||
* [Switch Hitter](https://elitekeyboards.com/switchhitter.php) (Windows seulement)
|
||||
* [QMK Configurator](https://config.qmk.fm/#/test/) (Web)
|
||||
* [Switch Hitter](https://web.archive.org/web/20190413233743/https://elitekeyboards.com/switchhitter.php) (Windows seulement)
|
||||
* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (Mac seulement)
|
||||
* [Keyboard Tester](http://www.keyboardtester.com) (Web)
|
||||
* [Keyboard Checker](http://keyboardchecker.com) (Web)
|
||||
|
@ -41,8 +41,6 @@ Set these variables to `no` to disable them, and `yes` to enable them.
|
||||
|
||||
This allows you to hold a key and the salt key (space by default) and have access to a various EEPROM settings that persist over power loss. It's advised you keep this disabled, as the settings are often changed by accident, and produce confusing results that makes it difficult to debug. It's one of the more common problems encountered in help sessions.
|
||||
|
||||
Consumes about 1000 bytes.
|
||||
|
||||
`MOUSEKEY_ENABLE`
|
||||
|
||||
This gives you control over cursor movements and clicks via keycodes/custom functions.
|
||||
@ -67,8 +65,6 @@ To see the text, open `hid_listen` and enjoy looking at your printed messages.
|
||||
|
||||
**NOTE:** Do not include *uprint* messages in anything other than your keymap code. It must not be used within the QMK system framework. Otherwise, you will bloat other people's .hex files.
|
||||
|
||||
Consumes about 400 bytes.
|
||||
|
||||
`COMMAND_ENABLE`
|
||||
|
||||
This enables magic commands, typically fired with the default magic key combo `LSHIFT+RSHIFT+KEY`. Magic commands include turning on debugging messages (`MAGIC+D`) or temporarily toggling NKRO (`MAGIC+N`).
|
||||
@ -125,11 +121,9 @@ Use this to debug changes to variable values, see the [tracing variables](unit_t
|
||||
|
||||
This enables using the Quantum SYSEX API to send strings (somewhere?)
|
||||
|
||||
This consumes about 5390 bytes.
|
||||
|
||||
`KEY_LOCK_ENABLE`
|
||||
|
||||
This enables [key lock](feature_key_lock.md). This consumes an additional 260 bytes.
|
||||
This enables [key lock](feature_key_lock.md).
|
||||
|
||||
`SPLIT_KEYBOARD`
|
||||
|
||||
|
@ -8,7 +8,8 @@ Testing your keyboard is usually pretty straightforward. Press every single key
|
||||
|
||||
Note: These programs are not provided by or endorsed by QMK.
|
||||
|
||||
* [Switch Hitter](https://elitekeyboards.com/switchhitter.php) (Windows Only)
|
||||
* [QMK Configurator](https://config.qmk.fm/#/test/) (Web Based)
|
||||
* [Switch Hitter](https://web.archive.org/web/20190413233743/https://elitekeyboards.com/switchhitter.php) (Windows Only)
|
||||
* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (Mac Only)
|
||||
* [Keyboard Tester](http://www.keyboardtester.com) (Web Based)
|
||||
* [Keyboard Checker](http://keyboardchecker.com) (Web Based)
|
||||
|
@ -8,7 +8,8 @@
|
||||
|
||||
注意:这些程序不是由QMK提供或认可的。
|
||||
|
||||
* [Switch Hitter](https://elitekeyboards.com/switchhitter.php) (仅Windows)
|
||||
* [QMK Configurator](https://config.qmk.fm/#/test/) (网页版)
|
||||
* [Switch Hitter](https://web.archive.org/web/20190413233743/https://elitekeyboards.com/switchhitter.php) (仅Windows)
|
||||
* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (仅Mac)
|
||||
* [Keyboard Tester](http://www.keyboardtester.com) (网页版)
|
||||
* [Keyboard Checker](http://keyboardchecker.com) (网页版)
|
||||
|
@ -32,27 +32,17 @@
|
||||
|
||||
static uint8_t i2c_address;
|
||||
|
||||
// ChibiOS uses two initialization structure for v1 and v2/v3 i2c APIs.
|
||||
// The F1 series uses the v1 api, which have to initialized this way.
|
||||
#ifdef STM32F103xB
|
||||
static const I2CConfig i2cconfig = {
|
||||
OPMODE_I2C,
|
||||
400000,
|
||||
FAST_DUTY_CYCLE_2,
|
||||
};
|
||||
#else
|
||||
// This configures the I2C clock to 400khz assuming a 72Mhz clock
|
||||
// For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html
|
||||
static const I2CConfig i2cconfig = {
|
||||
#ifdef USE_I2CV1
|
||||
I2C1_OPMODE,
|
||||
I2C1_CLOCK_SPEED,
|
||||
I2C1_DUTY_CYCLE,
|
||||
#else
|
||||
// This configures the I2C clock to 400khz assuming a 72Mhz clock
|
||||
// For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html
|
||||
STM32_TIMINGR_PRESC(I2C1_TIMINGR_PRESC) | STM32_TIMINGR_SCLDEL(I2C1_TIMINGR_SCLDEL) | STM32_TIMINGR_SDADEL(I2C1_TIMINGR_SDADEL) | STM32_TIMINGR_SCLH(I2C1_TIMINGR_SCLH) | STM32_TIMINGR_SCLL(I2C1_TIMINGR_SCLL), 0, 0
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
static i2c_status_t chibios_to_qmk(const msg_t* status) {
|
||||
switch (*status) {
|
||||
|
2
keyboards/2_milk/keymaps/emoji/config.h
Normal file
2
keyboards/2_milk/keymaps/emoji/config.h
Normal file
@ -0,0 +1,2 @@
|
||||
#define UNICODE_SELECTED_MODES UC_LNX, UC_OSX, UC_WIN, UC_WINC
|
||||
#define TAPPING_TERM 300
|
@ -1,31 +1,53 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum custom_keycodes {
|
||||
DISSA,
|
||||
SHRUG
|
||||
enum tapdance_keycodes {
|
||||
TD_KEY_1,
|
||||
TD_KEY_2,
|
||||
};
|
||||
|
||||
void dance_key_one (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 1) {
|
||||
send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); // ¯\_(ツ)_/¯
|
||||
SEND_STRING(SS_TAP(X_ENTER));
|
||||
reset_tap_dance (state);
|
||||
} else if (state->count == 2) {
|
||||
cycle_unicode_input_mode(+1);
|
||||
reset_tap_dance (state);
|
||||
}
|
||||
}
|
||||
|
||||
void dance_key_two (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 1) {
|
||||
send_unicode_hex_string("0CA0 005F 0CA0"); // ಠ_ಠ
|
||||
SEND_STRING(SS_TAP(X_ENTER));
|
||||
reset_tap_dance (state);
|
||||
} else if (state->count == 2) {
|
||||
send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); // (ノಠ痊ಠ)ノ彡┻━┻
|
||||
SEND_STRING(SS_TAP(X_ENTER));
|
||||
reset_tap_dance (state);
|
||||
} else if (state->count == 3) {
|
||||
send_unicode_hex_string("256D 2229 256E 0028 002D 005F 002D 0029 256D 2229 256E"); // ╭∩╮(-_-)╭∩╮
|
||||
SEND_STRING(SS_TAP(X_ENTER));
|
||||
reset_tap_dance (state);
|
||||
} else if (state->count == 4) {
|
||||
send_unicode_hex_string("0028 3065 FFE3 0020 00B3 FFE3 0029 3065"); // (づ ̄ ³ ̄)づ
|
||||
SEND_STRING(SS_TAP(X_ENTER));
|
||||
reset_tap_dance (state);
|
||||
} else if (state->count == 5) {
|
||||
send_unicode_hex_string("0028 FE3A FE39 FE3A 0029"); // (︺︹︺)
|
||||
SEND_STRING(SS_TAP(X_ENTER));
|
||||
reset_tap_dance (state);
|
||||
}
|
||||
}
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[TD_KEY_1] = ACTION_TAP_DANCE_FN(dance_key_one),
|
||||
[TD_KEY_2] = ACTION_TAP_DANCE_FN(dance_key_two),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(
|
||||
SHRUG,
|
||||
DISSA
|
||||
)
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case SHRUG:
|
||||
if (record->event.pressed) {
|
||||
send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF");
|
||||
} else {
|
||||
}
|
||||
break;
|
||||
case DISSA:
|
||||
if (record->event.pressed) {
|
||||
send_unicode_hex_string("0CA0 005F 0CA0");
|
||||
} else {
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
[0] = LAYOUT(
|
||||
TD(TD_KEY_1),
|
||||
TD(TD_KEY_2)
|
||||
),
|
||||
};
|
||||
|
@ -1,2 +1,39 @@
|
||||
# Emoji Keymap
|
||||

|
||||
|
||||
# Unicode Setup
|
||||
|
||||
Unicode input in QMK works by inputting a sequence of characters to the
|
||||
OS, sort of like a macro. Unfortunately, the way this is done differs
|
||||
for each platform. Specifically, each platform requires a different
|
||||
combination of keys to trigger Unicode input. Therefore, a
|
||||
corresponding input mode has to be set in QMK.
|
||||
|
||||
Documentation: [Feature Unicode](https://beta.docs.qmk.fm/features/feature_unicode#input-modes)
|
||||
|
||||
On this keymap the default unicode mode it's `UC_LNX`.
|
||||
You can change it permanently tapping 2 times the KeyOne to select the next mode.
|
||||
|
||||
## Unicode Mode List
|
||||
- UC_LNX
|
||||
- UC_OSX
|
||||
- UC_WIN
|
||||
- UC_WINC
|
||||
|
||||
# Keymap
|
||||
To add more functionality to this Minimal Keyboard,
|
||||
it's implemented the tap dance feature, so pressing the same key
|
||||
multiples times will produce different emojis.
|
||||
|
||||
## Key One
|
||||
|
||||
- 1 Tap: `¯\_(ツ)_/¯`
|
||||
- 2 Taps: Switch Unicode Input Type
|
||||
|
||||
## Key Two
|
||||
|
||||
- 1 Tap: `ಠ_ಠ`
|
||||
- 2 Taps: `(ノಠ痊ಠ)ノ彡┻━┻`
|
||||
- 3 Taps: `╭∩╮(-_-)╭∩╮`
|
||||
- 4 Taps: `(づ ̄ ³ ̄)づ`
|
||||
- 5 Taps: `(︺︹︺)`
|
2
keyboards/2_milk/keymaps/emoji/rules.mk
Normal file
2
keyboards/2_milk/keymaps/emoji/rules.mk
Normal file
@ -0,0 +1,2 @@
|
||||
UNICODE_ENABLE = yes # Unicode
|
||||
TAP_DANCE_ENABLE = yes # Tap Dance
|
111
keyboards/40percentclub/nano/keymaps/drashna/keymap.c
Normal file
111
keyboards/40percentclub/nano/keymaps/drashna/keymap.c
Normal file
@ -0,0 +1,111 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "drashna.h"
|
||||
#include "analog.c"
|
||||
#include "pointing_device.h"
|
||||
#include "pincontrol.h"
|
||||
|
||||
|
||||
#define KC_X0 LT(_FN, KC_ESC)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = LAYOUT(
|
||||
KC_VOLU, KC_MPLY, KC_MPRV, RESET,
|
||||
KC_VOLD, KC_MUTE, KC_MNXT, RESET
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
// Joystick
|
||||
// Set Pins
|
||||
uint8_t xPin = 8; // VRx / /B4
|
||||
uint8_t yPin = 7; // VRy // B5
|
||||
uint8_t swPin = E6; // SW
|
||||
|
||||
// Set Parameters
|
||||
uint16_t minAxisValue = 0;
|
||||
uint16_t maxAxisValue = 1023;
|
||||
|
||||
uint8_t maxCursorSpeed = 2;
|
||||
uint8_t precisionSpeed = 1;
|
||||
uint8_t speedRegulator = 20; // Lower Values Create Faster Movement
|
||||
|
||||
int8_t xPolarity = 1;
|
||||
int8_t yPolarity = 1;
|
||||
|
||||
uint8_t cursorTimeout = 10;
|
||||
|
||||
int16_t xOrigin, yOrigin;
|
||||
|
||||
uint16_t lastCursor = 0;
|
||||
|
||||
int16_t axisCoordinate(uint8_t pin, uint16_t origin) {
|
||||
int8_t direction;
|
||||
int16_t distanceFromOrigin;
|
||||
int16_t range;
|
||||
|
||||
int16_t position = analogRead(pin);
|
||||
|
||||
if (origin == position) {
|
||||
return 0;
|
||||
} else if (origin > position) {
|
||||
distanceFromOrigin = origin - position;
|
||||
range = origin - minAxisValue;
|
||||
direction = -1;
|
||||
} else {
|
||||
distanceFromOrigin = position - origin;
|
||||
range = maxAxisValue - origin;
|
||||
direction = 1;
|
||||
}
|
||||
|
||||
float percent = (float)distanceFromOrigin / range;
|
||||
int16_t coordinate = (int16_t)(percent * 100);
|
||||
if (coordinate < 0) {
|
||||
return 0;
|
||||
} else if (coordinate > 100) {
|
||||
return 100 * direction;
|
||||
} else {
|
||||
return coordinate * direction;
|
||||
}
|
||||
}
|
||||
|
||||
int8_t axisToMouseComponent(uint8_t pin, int16_t origin, uint8_t maxSpeed, int8_t polarity) {
|
||||
int coordinate = axisCoordinate(pin, origin);
|
||||
if (coordinate == 0) {
|
||||
return 0;
|
||||
} else {
|
||||
float percent = (float)coordinate / 100;
|
||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT)) {
|
||||
return percent * precisionSpeed * polarity * (abs(coordinate) / speedRegulator);
|
||||
} else {
|
||||
return percent * maxCursorSpeed * polarity * (abs(coordinate) / speedRegulator);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void pointing_device_task(void) {
|
||||
report_mouse_t report = pointing_device_get_report();
|
||||
|
||||
// todo read as one vector
|
||||
if (timer_elapsed(lastCursor) > cursorTimeout) {
|
||||
lastCursor = timer_read();
|
||||
report.x = axisToMouseComponent(xPin, xOrigin, maxCursorSpeed, xPolarity);
|
||||
report.y = axisToMouseComponent(yPin, yOrigin, maxCursorSpeed, yPolarity);
|
||||
}
|
||||
//
|
||||
if (!readPin(swPin)) {
|
||||
report.buttons |= MOUSE_BTN1;
|
||||
} else {
|
||||
report.buttons &= ~MOUSE_BTN1;
|
||||
}
|
||||
|
||||
pointing_device_set_report(report);
|
||||
pointing_device_send();
|
||||
}
|
||||
|
||||
void matrix_init_keymap(void) {
|
||||
// init pin? Is needed?
|
||||
setPinInputHigh(swPin);
|
||||
// Account for drift
|
||||
xOrigin = analogRead(xPin);
|
||||
yOrigin = analogRead(yPin);
|
||||
}
|
5
keyboards/40percentclub/nano/keymaps/drashna/rules.mk
Normal file
5
keyboards/40percentclub/nano/keymaps/drashna/rules.mk
Normal file
@ -0,0 +1,5 @@
|
||||
POINTING_DEVICE_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = no
|
||||
CONSOLE_ENABLE = no
|
||||
|
||||
BOOTLOADER = qmk-dfu
|
@ -47,8 +47,6 @@
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
//#define WT_MONO_BACKLIGHT
|
||||
|
||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
|
||||
|
||||
// EEPROM usage
|
||||
|
@ -47,8 +47,6 @@
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
//#define WT_MONO_BACKLIGHT
|
||||
|
||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
|
||||
|
||||
// EEPROM usage
|
||||
|
@ -1,27 +1,16 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# atmega32a bootloadHID
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
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
|
||||
#
|
||||
|
@ -1,27 +1,16 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# atmega32a bootloadHID
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
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
|
||||
#
|
||||
|
51
keyboards/bm43a/bm43a.c
Normal file
51
keyboards/bm43a/bm43a.c
Normal file
@ -0,0 +1,51 @@
|
||||
/* Copyright 2019 mechmerlin
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "bm43a.h"
|
||||
|
||||
// Optional override functions below.
|
||||
// You can leave any or all of these undefined.
|
||||
// These are only required if you want to perform custom actions.
|
||||
|
||||
/*
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
*/
|
30
keyboards/bm43a/bm43a.h
Normal file
30
keyboards/bm43a/bm43a.h
Normal file
@ -0,0 +1,30 @@
|
||||
/* Copyright 2019 mechmerlin
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1B, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2B, \
|
||||
K30, K31, K32, K33, K35, K37, K38, K39, K3B \
|
||||
) { \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, K1B }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, KC_NO, K2B }, \
|
||||
{ K30, K31, K32, K33, KC_NO, K35, KC_NO, K37, K38, K39, KC_NO, K3B }, \
|
||||
}
|
73
keyboards/bm43a/config.h
Normal file
73
keyboards/bm43a/config.h
Normal file
@ -0,0 +1,73 @@
|
||||
/*
|
||||
Copyright 2019 mechmerlin
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x0000
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER KPRepublic
|
||||
#define PRODUCT BM43A
|
||||
#define DESCRIPTION A QMK-powered custom keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 4
|
||||
#define MATRIX_COLS 12
|
||||
|
||||
/*
|
||||
* 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 { D1, F4, F1, F0 }
|
||||
#define MATRIX_COL_PINS { B0, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 }
|
||||
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define BACKLIGHT_PIN B7
|
||||
// #define BACKLIGHT_BREATHING
|
||||
#define BACKLIGHT_LEVELS 5
|
||||
|
||||
#define RGB_DI_PIN E2
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLED_NUM 10
|
||||
#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
|
||||
#endif
|
58
keyboards/bm43a/info.json
Normal file
58
keyboards/bm43a/info.json
Normal file
@ -0,0 +1,58 @@
|
||||
{
|
||||
"keyboard_name": "BM43A",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 12,
|
||||
"height": 4,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"key_count": 43,
|
||||
"layout": [
|
||||
{"label":"K00 (D1,B0)", "x":0, "y":0},
|
||||
{"label":"K01 (D1,F5)", "x":1, "y":0},
|
||||
{"label":"K02 (D1,F6)", "x":2, "y":0},
|
||||
{"label":"K03 (D1,F7)", "x":3, "y":0},
|
||||
{"label":"K04 (D1,C7)", "x":4, "y":0},
|
||||
{"label":"K05 (D1,C6)", "x":5, "y":0},
|
||||
{"label":"K06 (D1,B6)", "x":6, "y":0},
|
||||
{"label":"K07 (D1,B5)", "x":7, "y":0},
|
||||
{"label":"K08 (D1,B4)", "x":8, "y":0},
|
||||
{"label":"K09 (D1,D7)", "x":9, "y":0},
|
||||
{"label":"K0A (D1,D6)", "x":10, "y":0},
|
||||
{"label":"K0B (D1,D4)", "x":11, "y":0},
|
||||
{"label":"K10 (F4,B0)", "x":0, "y":1, "w":1.25},
|
||||
{"label":"K11 (F4,F5)", "x":1.25, "y":1},
|
||||
{"label":"K12 (F4,F6)", "x":2.25, "y":1},
|
||||
{"label":"K13 (F4,F7)", "x":3.25, "y":1},
|
||||
{"label":"K14 (F4,C7)", "x":4.25, "y":1},
|
||||
{"label":"K15 (F4,C6)", "x":5.25, "y":1},
|
||||
{"label":"K16 (F4,B6)", "x":6.25, "y":1},
|
||||
{"label":"K17 (F4,B5)", "x":7.25, "y":1},
|
||||
{"label":"K18 (F4,B4)", "x":8.25, "y":1},
|
||||
{"label":"K19 (F4,D7)", "x":9.25, "y":1},
|
||||
{"label":"K1B (F4,D4)", "x":10.25, "y":1, "w":1.75},
|
||||
{"label":"K20 (F1,B0)", "x":0, "y":2, "w":2},
|
||||
{"label":"K21 (F1,F5)", "x":2, "y":2},
|
||||
{"label":"K22 (F1,F6)", "x":3, "y":2},
|
||||
{"label":"K23 (F1,F7)", "x":4, "y":2},
|
||||
{"label":"K24 (F1,C7)", "x":5, "y":2},
|
||||
{"label":"K25 (F1,C6)", "x":6, "y":2},
|
||||
{"label":"K26 (F1,B6)", "x":7, "y":2},
|
||||
{"label":"K27 (F1,B5)", "x":8, "y":2},
|
||||
{"label":"K28 (F1,B4)", "x":9, "y":2},
|
||||
{"label":"K29 (F1,D7)", "x":10, "y":2},
|
||||
{"label":"K2B (F1,D4)", "x":11, "y":2},
|
||||
{"label":"K30 (F0,B0)", "x":0, "y":3},
|
||||
{"label":"K31 (F0,F5)", "x":1, "y":3},
|
||||
{"label":"K32 (F0,F6)", "x":2, "y":3},
|
||||
{"label":"K33 (F0,F7)", "x":3, "y":3, "w":2.75},
|
||||
{"label":"K35 (F0,C6)", "x":5.75, "y":3, "w":2.25},
|
||||
{"label":"K37 (F0,B5)", "x":8, "y":3},
|
||||
{"label":"K38 (F0,B4)", "x":9, "y":3},
|
||||
{"label":"K39 (F0,D7)", "x":10, "y":3},
|
||||
{"label":"K3B (F0,D4)", "x":11, "y":3}
|
||||
]
|
||||
}
|
||||
}
|
||||
,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/"
|
||||
}
|
19
keyboards/bm43a/keymaps/default/config.h
Normal file
19
keyboards/bm43a/keymaps/default/config.h
Normal file
@ -0,0 +1,19 @@
|
||||
/* Copyright 2019 mechmerlin
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// place overrides here
|
33
keyboards/bm43a/keymaps/default/keymap.c
Normal file
33
keyboards/bm43a/keymaps/default/keymap.c
Normal file
@ -0,0 +1,33 @@
|
||||
/* Copyright 2019 mechmerlin
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(
|
||||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_UP, KC_DOT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
[1] = LAYOUT(
|
||||
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, BL_TOGG, BL_DEC, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______,
|
||||
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
};
|
||||
|
1
keyboards/bm43a/keymaps/default/readme.md
Normal file
1
keyboards/bm43a/keymaps/default/readme.md
Normal file
@ -0,0 +1 @@
|
||||
# The default keymap for bm43a
|
16
keyboards/bm43a/readme.md
Normal file
16
keyboards/bm43a/readme.md
Normal file
@ -0,0 +1,16 @@
|
||||
# bm43a
|
||||
|
||||
A 40% mechanical keyboard.
|
||||
|
||||
This firmware was originally taken from a kbfirmware.json and converted through [kbf_qmk_converter](https://noroadsleft.github.io/kbf_qmk_converter/). You may find the original `.json` files [here](https://drive.google.com/drive/folders/11DowBYrFN_uCNa9Q9bXwuMn91vmZYBcG).
|
||||
|
||||
|
||||
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
|
||||
Hardware Supported: bm43a PCB
|
||||
Hardware Availability: [KPRepublic](https://kprepublic.com/products/bm43a-bm43-43-keys-40-custom-mechanical-keyboard-pcb-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom-underglow-alps-mx)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make bm43a: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).
|
33
keyboards/bm43a/rules.mk
Normal file
33
keyboards/bm43a/rules.mk
Normal file
@ -0,0 +1,33 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
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)
|
7
keyboards/c39/keymaps/drashna/config.h
Executable file
7
keyboards/c39/keymaps/drashna/config.h
Executable file
@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
// place overrides here
|
||||
#undef MATRIX_COL_PINS
|
||||
#define MATRIX_COL_PINS { A3, A2, A1, A0, B13, B14, B15, B9, B3, B2, B4, A10, A9 }
|
||||
#undef MATRIX_ROW_PINS
|
||||
#define MATRIX_ROW_PINS { B7, B1, B0 }
|
45
keyboards/c39/keymaps/drashna/keymap.c
Executable file
45
keyboards/c39/keymaps/drashna/keymap.c
Executable file
@ -0,0 +1,45 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _QWERTY 0
|
||||
#define _FN1 1
|
||||
|
||||
// Defines for task manager and such
|
||||
#define CALTDEL LCTL(LALT(KC_DEL))
|
||||
#define TSKMGR LCTL(LSFT(KC_ESC))
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,----------------------------------------------------------------------------. ,-------------.
|
||||
* | Q | W | E | R | T | Bksp | Y | U | I | O | P | | M1 | M2 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+ |------+------|
|
||||
* | A | S | D | F | G | Enter| H | J | K | L | ; | | M3 | M4 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+ |------+------|
|
||||
* | Z | X | C | V | B | FN1 | N | M | , | . | / | | M5 | M6 |
|
||||
* `----------------------------------------------------------------------------' `-------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT(
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_1, KC_2,
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, MT(MOD_LSFT, KC_ENT), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_3, KC_4,
|
||||
KC_Z, KC_X, KC_C, KC_V, KC_B, LT(_FN1, KC_SPC), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_5, KC_6
|
||||
),
|
||||
|
||||
/* FN1
|
||||
* ,----------------------------------------------------------------------------. ,-------------.
|
||||
* | 1 | 2 | 3 | 4 | 5 | Bksp | 6 | 7 | 8 | 9 | 0 | | M1 | M2 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+ |------+------|
|
||||
* | 4 | 5 | 6 | + | | Enter| | | | | | | M3 | M4 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+ |------+------|
|
||||
* | 7 | 8 | 9 | 0 | | FN1 | | | | | | | M5 | M6 |
|
||||
* `----------------------------------------------------------------------------' `-------------'
|
||||
*/
|
||||
[_FN1] = LAYOUT(
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_BSPC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_1, KC_2,
|
||||
KC_4, KC_5, KC_6, KC_PLUS, _______, KC_ENT, _______, _______, _______, _______, _______, KC_3, KC_4,
|
||||
KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, _______, _______, _______, KC_5, KC_6
|
||||
),
|
||||
};
|
3
keyboards/c39/keymaps/drashna/readme.md
Executable file
3
keyboards/c39/keymaps/drashna/readme.md
Executable file
@ -0,0 +1,3 @@
|
||||
# @drashna's keymap for the C39
|
||||
|
||||
HERE BE DRAGONS
|
18
keyboards/c39/keymaps/drashna/rules.mk
Normal file
18
keyboards/c39/keymaps/drashna/rules.mk
Normal file
@ -0,0 +1,18 @@
|
||||
MCU = STM32F303
|
||||
BOOTLOADER =
|
||||
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
UNICODE_ENABLE = yes # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = yes # Audio output on port C6
|
||||
RGBLIGHT_ENABLE = no # RGB Enable / Disable
|
@ -16,21 +16,21 @@
|
||||
*/
|
||||
|
||||
#include "hal.h"
|
||||
#include "backlight.h"
|
||||
#include "led.h"
|
||||
#include "printf.h"
|
||||
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
#include "backlight.h"
|
||||
|
||||
void backlight_init_ports(void) {
|
||||
printf("backlight_init_ports()\n");
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
|
||||
palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPad(GPIOB, 8);
|
||||
#endif
|
||||
}
|
||||
|
||||
void backlight_set(uint8_t level) {
|
||||
printf("backlight_set(%d)\n", level);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
if (level == 0) {
|
||||
// Turn backlight off
|
||||
palSetPad(GPIOB, 8);
|
||||
@ -38,8 +38,8 @@ void backlight_set(uint8_t level) {
|
||||
// Turn backlight on
|
||||
palClearPad(GPIOB, 8);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
printf("led_set_kb(%d)\n", usb_led);
|
||||
|
@ -11,7 +11,6 @@ MCU = atmega32u4
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
|
||||
# Build Options
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
|
@ -36,18 +36,18 @@ https://geekhack.org/index.php?topic=69169.0
|
||||
|
||||
### Build one yourself using Arduino Leonardo + Circuit@Home USB Host Shield 2.0
|
||||
Buying Arduino Leonardo and USB Host Shield 2.0(from Circuit@home) will be better, you won't need even soldering iron.
|
||||
http://arduino.cc/en/Main/ArduinoBoardLeonardo
|
||||
https://www.circuitsathome.com/arduino_usb_host_shield_projects/
|
||||
- http://arduino.cc/en/Main/ArduinoBoardLeonardo
|
||||
- https://www.circuitsathome.com/arduino_usb_host_shield_projects/
|
||||
|
||||
Other compatible boards like Arduino's Shield will also work well but I think Sparkfun's needs to be modified.
|
||||
http://arduino.cc/en/Main/ArduinoUSBHostShield
|
||||
https://www.sparkfun.com/products/9947
|
||||
- http://arduino.cc/en/Main/ArduinoUSBHostShield
|
||||
- https://www.sparkfun.com/products/9947
|
||||
|
||||
Also Pro Micro 3.3V(not Mini) or Teensy with mini host shield will work with some fixes on signal/power routing.
|
||||
[Build guide](https://geekhack.org/index.php?topic=80421.0)
|
||||
https://www.circuitsathome.com/arduino_usb_host_shield_projects/
|
||||
https://www.sparkfun.com/products/12587
|
||||
https://www.pjrc.com/teensy/td_libs_USBHostShield.html
|
||||
- [Build guide](https://geekhack.org/index.php?topic=80421.0)
|
||||
- https://www.circuitsathome.com/arduino_usb_host_shield_projects/
|
||||
- https://www.sparkfun.com/products/12587
|
||||
- https://www.pjrc.com/teensy/td_libs_USBHostShield.html
|
||||
|
||||
Limitations
|
||||
----------
|
||||
@ -56,24 +56,14 @@ Note that the converter can host only USB "boot protocol" keyboard(6KRO), not NK
|
||||
|
||||
Resources
|
||||
--------
|
||||
Hasu's main thread for the converter
|
||||
https://geekhack.org/index.php?topic=69169.0
|
||||
Build guide for the Pro Micro variant
|
||||
https://geekhack.org/index.php?topic=80421.0
|
||||
Original TMK version of the converter
|
||||
https://github.com/tmk/tmk_keyboard/tree/master/converter/usb_usb
|
||||
USB Host Shield 2.0
|
||||
https://www.circuitsathome.com/arduino_usb_host_shield_projects/
|
||||
USB Host Shield 2.0 source
|
||||
https://github.com/felis/USB_Host_Shield_2.0
|
||||
Arduino USB Host Shield (with bootst converter)
|
||||
http://arduino.cc/en/Main/ArduinoUSBHostShield
|
||||
Arduino source
|
||||
https://github.com/arduino/Arduino
|
||||
Initial release of TMK USB-USB converter
|
||||
https://geekhack.org/index.php?topic=33057.msg653549#msg653549
|
||||
http://deskthority.net/workshop-f7/is-remapping-a-usb-keyboard-using-teensy-possible-t2841-30.html#p74854
|
||||
Arduino-based hardware keyboard remapper - Colemak forum
|
||||
http://forum.colemak.com/viewtopic.php?id=1561
|
||||
Teensy + Host Shield
|
||||
http://www.pjrc.com/teensy/td_libs_USBHostShield.html
|
||||
- [Hasu's main thread for the converter](https://geekhack.org/index.php?topic=69169.0)
|
||||
- [Build guide for the Pro Micro variant](https://geekhack.org/index.php?topic=80421.0)
|
||||
- [Original TMK version of the converter](https://github.com/tmk/tmk_keyboard/tree/master/converter/usb_usb)
|
||||
- [USB Host Shield 2.0](https://www.circuitsathome.com/arduino_usb_host_shield_projects/)
|
||||
- [USB Host Shield 2.0 source](https://github.com/felis/USB_Host_Shield_2.0)
|
||||
- [Arduino USB Host Shield (with bootst converter)](http://arduino.cc/en/Main/ArduinoUSBHostShield)
|
||||
- [Arduino source](https://github.com/arduino/Arduino)
|
||||
- [Initial release of TMK USB-USB converter](https://geekhack.org/index.php?topic=33057.msg653549#msg653549)
|
||||
- [Teensy/Arduino + Host Shield](http://deskthority.net/workshop-f7/is-remapping-a-usb-keyboard-using-teensy-possible-t2841-30.html#p74854)
|
||||
- [Arduino-based hardware keyboard remapper - Colemak forum](http://forum.colemak.com/viewtopic.php?id=1561)
|
||||
- [Teensy + Host Shield](http://www.pjrc.com/teensy/td_libs_USBHostShield.html)
|
||||
|
10
keyboards/converter/usb_usb/keymaps/narze/README.md
Normal file
10
keyboards/converter/usb_usb/keymaps/narze/README.md
Normal file
@ -0,0 +1,10 @@
|
||||
# narze's layout for usb-usb converter
|
||||
|
||||
## Key features
|
||||
- Qwerty + [Colemak](https://colemak.com) layouts, and you can type Qwerty on software-level Colemak as well. Very useful for gaming or when your friend wanna type something but don't use Colemak.
|
||||
- [(S)uper (D)uper Mode](https://github.com/jasonrudolph/keyboard#super-duper-mode) inspired by [jasonrudolph](https://github.com/jasonrudolph), with [some extensions](https://gist.github.com/narze/861e2167784842d38771) such as backspace & forward delete.
|
||||
|
||||
## Build instructions
|
||||
- `cd /path/to/qmk_firmware`
|
||||
- Ensure latest libraries are loaded `make git-submodule`
|
||||
- Build & flash : `make converter/usb_usb:narze:flash`
|
48
keyboards/converter/usb_usb/keymaps/narze/config.h
Normal file
48
keyboards/converter/usb_usb/keymaps/narze/config.h
Normal file
@ -0,0 +1,48 @@
|
||||
#pragma once
|
||||
|
||||
/*
|
||||
* 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 2
|
||||
|
||||
#undef TAPPING_TERM
|
||||
#define TAPPING_TERM 100
|
||||
|
||||
#define COMBO_TERM 20
|
||||
#define COMBO_COUNT 1
|
||||
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
#define PERMISSIVE_HOLD
|
||||
|
||||
#define SUPER_DUPER_SOUND S__NOTE(_B1)
|
||||
|
||||
#define MOUSEKEY_DELAY 100
|
||||
|
||||
#define USB_POLLING_INTERVAL_MS 1
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
SONG(COLEMAK_SOUND), \
|
||||
SONG(DVORAK_SOUND) \
|
||||
}
|
||||
#endif
|
167
keyboards/converter/usb_usb/keymaps/narze/keymap.c
Normal file
167
keyboards/converter/usb_usb/keymaps/narze/keymap.c
Normal file
@ -0,0 +1,167 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "narze.h"
|
||||
#include "keymap_colemak.h"
|
||||
|
||||
enum usb_usb_layers {
|
||||
_QWERTY,
|
||||
_COLEMAK,
|
||||
_QWOC,
|
||||
_SUPERDUPER,
|
||||
};
|
||||
|
||||
enum usb_usb_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
QWOC,
|
||||
SUPERDUPER,
|
||||
SDTOGG, // Toggle SuperDuper
|
||||
GUI_UNDS,
|
||||
LSFT_LPRN,
|
||||
RSFT_RPRN,
|
||||
};
|
||||
|
||||
#define HPR_ESC ALL_T(KC_ESC)
|
||||
#define SFT_ENT SFT_T(KC_ENT)
|
||||
#define BRWS_L S(LGUI(KC_LBRC))
|
||||
#define BRWS_R S(LGUI(KC_RBRC))
|
||||
|
||||
enum process_combo_event {
|
||||
CB_SUPERDUPER,
|
||||
};
|
||||
|
||||
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
|
||||
/* 0: plain Qwerty without layer switching
|
||||
* ,---------------. ,---------------. ,---------------.
|
||||
* |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24|
|
||||
* ,---. |---------------| |---------------| |---------------| ,-----------. ,---------------. ,-------.
|
||||
* |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|Pwr| | Help |
|
||||
* `---' `---------------' `---------------' `---------------' `-----------' `---------------' `-------'
|
||||
* ,-----------------------------------------------------------. ,-----------. ,---------------. ,-------.
|
||||
* | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| |Stp|Agn|
|
||||
* |-----------------------------------------------------------| |-----------| |---------------| |-------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| |Mnu|Und|
|
||||
* |-----------------------------------------------------------| `-----------' |---------------| |-------|
|
||||
* |CapsL | A| S| D| F| G| H| J| K| L| ;| :| #|Retn| | 4| 5| 6|KP,| |Sel|Cpy|
|
||||
* |-----------------------------------------------------------| ,---. |---------------| |-------|
|
||||
* |Shft| <| Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|KP=| |Exe|Pst|
|
||||
* |-----------------------------------------------------------| ,-----------. |---------------| |-------|
|
||||
* |Ctl|Gui|Alt|MHEN|HNJ| Space |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|Ent| |Fnd|Cut|
|
||||
* `-----------------------------------------------------------' `-----------' `---------------' `-------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_all(
|
||||
KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24,
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, KC_HELP,
|
||||
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_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_STOP, KC_AGIN,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_MENU, KC_UNDO,
|
||||
HPR_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PCMM, KC_SLCT, KC_COPY,
|
||||
LSFT_LPRN,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, RSFT_RPRN, KC_UP, KC_P1, KC_P2, KC_P3, KC_PEQL, KC_EXEC, KC_PSTE,
|
||||
KC_LCTL, KC_LALT, GUI_UNDS,KC_MHEN, KC_HANJ, KC_SPC, KC_HAEN, KC_HENK, KC_KANA, KC_BSPC, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT, KC_FIND, KC_CUT
|
||||
),
|
||||
[_COLEMAK] = LAYOUT_all(
|
||||
KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24,
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, KC_HELP,
|
||||
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_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_STOP, KC_AGIN,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_MENU, KC_UNDO,
|
||||
HPR_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PCMM, KC_SLCT, KC_COPY,
|
||||
LSFT_LPRN,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, RSFT_RPRN, KC_UP, KC_P1, KC_P2, KC_P3, KC_PEQL, KC_EXEC, KC_PSTE,
|
||||
KC_LCTL, KC_LALT, GUI_UNDS,KC_MHEN, KC_HANJ, KC_SPC, KC_HAEN, KC_HENK, KC_KANA, KC_BSPC, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT, KC_FIND, KC_CUT
|
||||
),
|
||||
[_QWOC] = LAYOUT_all(
|
||||
KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24,
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, KC_HELP,
|
||||
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_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_STOP, KC_AGIN,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_MENU, KC_UNDO,
|
||||
HPR_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PCMM, KC_SLCT, KC_COPY,
|
||||
LSFT_LPRN,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, RSFT_RPRN, KC_UP, KC_P1, KC_P2, KC_P3, KC_PEQL, KC_EXEC, KC_PSTE,
|
||||
KC_LCTL, KC_LALT, GUI_UNDS,KC_MHEN, KC_HANJ, KC_SPC, KC_HAEN, KC_HENK, KC_KANA, KC_BSPC, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT, KC_FIND, KC_CUT
|
||||
),
|
||||
[_SUPERDUPER] = LAYOUT_all(
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
RESET, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______,______,______,______, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______,______,______,______, ______,______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, BRWS_L, BRWS_R, ______, ______, ______, ______, ______,______,______, ______,______,______,______, ______,______,
|
||||
KC_SPC, KC_LALT, _______, _______, KC_BSPC,KC_LGUI,KC_LEFT, KC_DOWN, KC_UP,KC_RGHT, KC_DEL, ______, ______, ______, ______,______,______,______, ______,______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______,______, ______,______,
|
||||
______, ______, ______, ______, ______, KC_LSFT, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______, ______,______, ______,______
|
||||
),
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
|
||||
set_superduper_key_combo_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
|
||||
set_superduper_key_combo_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
|
||||
case QWOC:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWOC);
|
||||
|
||||
set_superduper_key_combo_layer(_QWOC);
|
||||
}
|
||||
return false;
|
||||
|
||||
case SDTOGG:
|
||||
if (record->event.pressed) {
|
||||
toggle_superduper_mode();
|
||||
}
|
||||
return false;
|
||||
|
||||
// Macros
|
||||
|
||||
// 1. Hold for LGUI, tap for Underscore
|
||||
case GUI_UNDS:
|
||||
perform_space_cadet(record, KC_LGUI, KC_LSFT, KC_MINS);
|
||||
return false;
|
||||
|
||||
// 2. Hold for LSHIFT, tap for Parens open
|
||||
case LSFT_LPRN:
|
||||
perform_space_cadet(record, KC_LSFT, KC_LSFT, KC_9);
|
||||
return false;
|
||||
|
||||
// 3. Hold for RSHIFT, tap for Parens close
|
||||
case RSFT_RPRN:
|
||||
perform_space_cadet(record, KC_RSFT, KC_RSFT, KC_0);
|
||||
return false;
|
||||
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_setup(void) {
|
||||
set_superduper_key_combos();
|
||||
}
|
||||
|
||||
void process_combo_event(uint8_t combo_index, bool pressed) {
|
||||
if (pressed) {
|
||||
switch(combo_index) {
|
||||
case CB_SUPERDUPER:
|
||||
layer_on(_SUPERDUPER);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
layer_off(_SUPERDUPER);
|
||||
unregister_mods(MOD_BIT(KC_LGUI) | MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT)); // Sometimes mods are held, unregister them
|
||||
}
|
||||
}
|
3
keyboards/converter/usb_usb/keymaps/narze/rules.mk
Normal file
3
keyboards/converter/usb_usb/keymaps/narze/rules.mk
Normal file
@ -0,0 +1,3 @@
|
||||
EXTRAKEY_ENABLE = no
|
||||
NKRO_ENABLE = yes
|
||||
COMBO_ENABLE = yes
|
@ -41,7 +41,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# define RGBLIGHT_HUE_STEP 8
|
||||
# define RGBLIGHT_SAT_STEP 8
|
||||
# define RGBLIGHT_VAL_STEP 5
|
||||
# define RGBLIGHT_LIMIT_VAL 150
|
||||
# define RGBLIGHT_LIMIT_VAL 120
|
||||
#endif
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
@ -51,7 +51,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
|
||||
// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
|
||||
// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
|
||||
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
|
||||
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
|
||||
# define RGB_MATRIX_HUE_STEP 8
|
||||
# define RGB_MATRIX_SAT_STEP 8
|
||||
# define RGB_MATRIX_VAL_STEP 5
|
||||
@ -60,7 +60,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
# define B6_AUDIO
|
||||
// #define NO_MUSIC_MODE
|
||||
# define NO_MUSIC_MODE
|
||||
#endif
|
||||
|
||||
#ifdef HAPTIC_ENABLE
|
||||
# define SOLENOID_PIN B7
|
||||
#endif
|
||||
|
||||
#undef PRODUCT
|
||||
|
@ -12,7 +12,25 @@ extern rgblight_config_t rgblight_config;
|
||||
static uint32_t oled_timer = 0;
|
||||
static char keylog_str[6] = {};
|
||||
static uint16_t log_timer = 0;
|
||||
static const char code_to_name[60] = {' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
|
||||
static const char PROGMEM code_to_name[0xFF] = {
|
||||
// 0 1 2 3 4 5 6 7 8 9 A B c D E F
|
||||
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x
|
||||
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x
|
||||
'3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 27, 26, 22, '-', '=', '[', // 2x
|
||||
']','\\', '#', ';','\'', '`', ',', '.', '/', 128, ' ', ' ', ' ', ' ', ' ', ' ', // 3x
|
||||
' ', ' ', ' ', ' ', ' ', ' ', 'P', 'S', ' ', ' ', ' ', ' ', 16, ' ', ' ', ' ', // 4x
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 5x
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx
|
||||
'C', 'S', 'A', 'C', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ex
|
||||
' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx
|
||||
};
|
||||
|
||||
void add_keylog(uint16_t keycode);
|
||||
#endif
|
||||
@ -27,7 +45,7 @@ enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE };
|
||||
) \
|
||||
LAYOUT_wrapper( \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \
|
||||
KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
|
||||
ALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
|
||||
KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI \
|
||||
)
|
||||
@ -107,7 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET,
|
||||
VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST,
|
||||
MG_NKRO, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, RGB_IDL,
|
||||
_______, KC_NUKE, _______, _______, TG_MODS, _______
|
||||
HPT_TOG, KC_NUKE, _______, _______, TG_MODS, HPT_FBK
|
||||
)
|
||||
};
|
||||
// clang-format on
|
||||
@ -131,16 +149,18 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; }
|
||||
|
||||
void add_keylog(uint16_t keycode) {
|
||||
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) {
|
||||
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) {
|
||||
keycode = keycode & 0xFF;
|
||||
} else if (keycode > 0xFF) {
|
||||
keycode = 0;
|
||||
}
|
||||
|
||||
for (uint8_t i = 4; i > 0; --i) {
|
||||
keylog_str[i] = keylog_str[i - 1];
|
||||
}
|
||||
|
||||
if (keycode < 60) {
|
||||
keylog_str[0] = code_to_name[keycode];
|
||||
if (keycode < (sizeof(code_to_name) / sizeof(char))) {
|
||||
keylog_str[0] = pgm_read_byte(&code_to_name[keycode]);
|
||||
}
|
||||
|
||||
log_timer = timer_read();
|
||||
@ -148,7 +168,7 @@ void add_keylog(uint16_t keycode) {
|
||||
|
||||
void update_log(void) {
|
||||
if (timer_elapsed(log_timer) > 750) {
|
||||
add_keylog(0);
|
||||
//add_keylog(0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -197,19 +217,18 @@ void render_layer_state(void) {
|
||||
void render_keylock_status(uint8_t led_usb_state) {
|
||||
oled_write_P(PSTR("Lock:"), false);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR("NUM "), led_usb_state & (1 << USB_LED_NUM_LOCK));
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR("CAPS"), led_usb_state & (1 << USB_LED_CAPS_LOCK));
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR("SCRL"), led_usb_state & (1 << USB_LED_SCROLL_LOCK));
|
||||
oled_write_P(PSTR("N"), led_usb_state & (1 << USB_LED_NUM_LOCK));
|
||||
oled_write_P(PSTR("C"), led_usb_state & (1 << USB_LED_CAPS_LOCK));
|
||||
oled_write_ln_P(PSTR("S"), led_usb_state & (1 << USB_LED_SCROLL_LOCK));
|
||||
}
|
||||
|
||||
void render_mod_status(uint8_t modifiers) {
|
||||
oled_write_P(PSTR("Mods:"), false);
|
||||
oled_write_P(PSTR(" SHFT"), (modifiers & MOD_MASK_SHIFT));
|
||||
oled_write_P(PSTR(" CTRL"), (modifiers & MOD_MASK_CTRL));
|
||||
oled_write_P(PSTR(" ALT "), (modifiers & MOD_MASK_ALT));
|
||||
oled_write_P(PSTR(" GUI "), (modifiers & MOD_MASK_GUI));
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR("S"), (modifiers & MOD_MASK_SHIFT));
|
||||
oled_write_P(PSTR("C"), (modifiers & MOD_MASK_CTRL));
|
||||
oled_write_P(PSTR("A"), (modifiers & MOD_MASK_ALT));
|
||||
oled_write_P(PSTR("G"), (modifiers & MOD_MASK_GUI));
|
||||
}
|
||||
|
||||
void render_bootmagic_status(void) {
|
||||
|
@ -18,6 +18,7 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||
RGB_MATRIX_ENABLE = WS2812
|
||||
|
||||
HAPTIC_ENABLE = SOLENOID
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
|
50
keyboards/crkbd/keymaps/hvp/config.h
Normal file
50
keyboards/crkbd/keymaps/hvp/config.h
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
//#define USE_MATRIX_I2C
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
#define SSD1306OLED
|
||||
|
||||
#define USE_SERIAL_PD2
|
||||
|
||||
//#define TAPPING_FORCE_HOLD
|
||||
//#define TAPPING_TERM 100
|
||||
|
||||
#define TAPPING_TERM 150
|
||||
#define PERMISSIVE_HOLD
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
# undef RGBLED_NUM
|
||||
# define RGBLIGHT_ANIMATIONS
|
||||
# define RGBLED_NUM 27
|
||||
# define RGBLIGHT_LIMIT_VAL 120
|
||||
# define RGBLIGHT_HUE_STEP 10
|
||||
# define RGBLIGHT_SAT_STEP 17
|
||||
# define RGBLIGHT_VAL_STEP 17
|
||||
#endif
|
183
keyboards/crkbd/keymaps/hvp/keymap.c
Normal file
183
keyboards/crkbd/keymaps/hvp/keymap.c
Normal file
@ -0,0 +1,183 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "hvp.c"
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//Following line allows macro to read current RGB settings
|
||||
extern rgblight_config_t rgblight_config;
|
||||
#endif
|
||||
|
||||
extern uint8_t is_master;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _QWERTY 0
|
||||
#define _LOWER 1
|
||||
#define _RAISE 2
|
||||
#define _ADJUST 3
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE,
|
||||
ADJUST
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = LAYOUT( \
|
||||
//,-----------------------------------------. ,-----------------------------------------.
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_BSPC,\
|
||||
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
LT(_ADJUST, KC_ESC), KC_A, KC_S, KC_D, LT(_RAISE,KC_F), MT(MOD_LCTL,KC_G), KC_H, KC_J, KC_K, KC_L,TD(TD1),TD(TD2),\
|
||||
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM,KC_DOT,TD(TD3),KC_SFTENT,\
|
||||
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||
KC_LGUI, LOWER,MT(MOD_LSFT, KC_SPC), LT(_RAISE,KC_ENT), RAISE,KC_LALT \
|
||||
//`--------------------' `--------------------'
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT( \
|
||||
//,-----------------------------------------. ,-----------------------------------------.
|
||||
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_BSPC,\
|
||||
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT,KC_NO, KC_DEL,\
|
||||
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO, KC_NO,\
|
||||
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||
KC_LGUI, LOWER,MT(MOD_LSFT, KC_SPC), LT(_RAISE,KC_ENT), RAISE,KC_LALT \
|
||||
//`--------------------' `--------------------'
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT( \
|
||||
//,-----------------------------------------. ,-----------------------------------------.
|
||||
KC_TAB,KC_EXLM,KC_AT,KC_HASH,KC_DLR,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_BSPC,\
|
||||
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MINS,KC_EQL,KC_LCBR,KC_RCBR,KC_PIPE,KC_GRV,\
|
||||
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UNDS,KC_PLUS,KC_LBRC,KC_RBRC,KC_BSLS,KC_TILD,\
|
||||
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||
KC_LGUI, LOWER,MT(MOD_LSFT, KC_SPC), LT(_RAISE,KC_ENT), RAISE,KC_LALT \
|
||||
//`--------------------' `--------------------'
|
||||
),
|
||||
|
||||
[_ADJUST] = LAYOUT( \
|
||||
//,-----------------------------------------. ,-----------------------------------------.
|
||||
KC_F1,KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,\
|
||||
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,\
|
||||
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
RESET,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_MPLY, KC_MNXT, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,\
|
||||
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||
KC_LGUI, LOWER,MT(MOD_LSFT, KC_SPC), LT(_RAISE,KC_ENT), RAISE,KC_LALT \
|
||||
//`--------------------' `--------------------'
|
||||
)
|
||||
};
|
||||
|
||||
int RGB_current_mode;
|
||||
|
||||
// Setting ADJUST layer RGB back to default
|
||||
void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
|
||||
if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
|
||||
layer_on(layer3);
|
||||
} else {
|
||||
layer_off(layer3);
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
#endif
|
||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
#endif
|
||||
}
|
||||
|
||||
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
|
||||
// When add source files to SRC in rules.mk, you can use functions.
|
||||
const char *read_layer_state(void);
|
||||
const char *read_logo(void);
|
||||
void set_keylog(uint16_t keycode, keyrecord_t *record);
|
||||
const char *read_keylog(void);
|
||||
const char *read_keylogs(void);
|
||||
|
||||
// const char *read_mode_icon(bool swap);
|
||||
// const char *read_host_led_state(void);
|
||||
// void set_timelog(void);
|
||||
// const char *read_timelog(void);
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
iota_gfx_task();
|
||||
}
|
||||
|
||||
void matrix_render_user(struct CharacterMatrix *matrix) {
|
||||
if (is_master) {
|
||||
// If you want to change the display of OLED, you need to change here
|
||||
matrix_write_ln(matrix, read_layer_state());
|
||||
matrix_write_ln(matrix, read_keylog());
|
||||
//matrix_write_ln(matrix, read_keylogs());
|
||||
//matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui));
|
||||
//matrix_write_ln(matrix, read_host_led_state());
|
||||
//matrix_write_ln(matrix, read_timelog());
|
||||
} else {
|
||||
matrix_write(matrix, read_logo());
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) {
|
||||
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
||||
memcpy(dest->display, source->display, sizeof(dest->display));
|
||||
dest->dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
void iota_gfx_task_user(void) {
|
||||
struct CharacterMatrix matrix;
|
||||
matrix_clear(&matrix);
|
||||
matrix_render_user(&matrix);
|
||||
matrix_update(&display, &matrix);
|
||||
}
|
||||
#endif//SSD1306OLED
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
#ifdef SSD1306OLED
|
||||
set_keylog(keycode, record);
|
||||
#endif
|
||||
// set_timelog();
|
||||
}
|
||||
|
||||
switch (keycode) {
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
case ADJUST:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_ADJUST);
|
||||
} else {
|
||||
layer_off(_ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
5
keyboards/crkbd/keymaps/hvp/readme.md
Normal file
5
keyboards/crkbd/keymaps/hvp/readme.md
Normal file
@ -0,0 +1,5 @@
|
||||
Keymap to be used with Eurkey for easy access to swedish characters on first layer.
|
||||
|
||||
Links:
|
||||
|
||||
- https://eurkey.steffen.bruentjen.eu/
|
14
keyboards/crkbd/keymaps/hvp/rules.mk
Normal file
14
keyboards/crkbd/keymaps/hvp/rules.mk
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
# If you want to change the display of OLED, you need to change here
|
||||
SRC += ./lib/glcdfont.c \
|
||||
./lib/rgb_state_reader.c \
|
||||
./lib/layer_state_reader.c \
|
||||
./lib/logo_reader.c \
|
||||
./lib/keylogger.c \
|
||||
# ./lib/mode_icon_reader.c \
|
||||
# ./lib/host_led_state_reader.c \
|
||||
# ./lib/timelogger.c \
|
||||
|
||||
TAP_DANCE_ENABLE = yes
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
# LOCAL_GLCDFONT = yes
|
13
keyboards/crkbd/keymaps/soundmonster/README.md
Normal file
13
keyboards/crkbd/keymaps/soundmonster/README.md
Normal file
@ -0,0 +1,13 @@
|
||||
# Soundmonster's layout for Corne
|
||||
|
||||
Features:
|
||||
|
||||
* Modern OLED support (many thanks to @drashna):
|
||||
* Proper orientation
|
||||
* Graphic layer indicator ↑ ↓
|
||||
* Graphic modifier indicator ⌘ ⇧ ⌥ ⌃
|
||||
* Similar enough to the default keymap so you can easily port your custom keymap to it
|
||||
* Mac-friendly (Command and Option on the thumbs)
|
||||
* Vim-friendly (Esc, `:` and Ctrl on the thumbs)
|
||||
* Full per-key RGB Matrix support out of the box (you still have to go through the nightmare of soldering yourself though 😉)
|
||||
|
110
keyboards/crkbd/keymaps/soundmonster/config.h
Normal file
110
keyboards/crkbd/keymaps/soundmonster/config.h
Normal file
@ -0,0 +1,110 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
//#define USE_MATRIX_I2C
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
// #define SSD1306OLED
|
||||
#undef USE_I2C
|
||||
#undef SSD1306OLED
|
||||
|
||||
#define USE_SERIAL_PD2
|
||||
|
||||
// #define TAPPING_FORCE_HOLD
|
||||
#define TAPPING_TERM 150
|
||||
#define RETRO_TAPPING
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 27
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLIGHT_SLEEP
|
||||
#define RGBLIGHT_SPLIT
|
||||
#define RGBLIGHT_LIMIT_VAL 120
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
#endif
|
||||
|
||||
#define OLED_FONT_H "keyboards/crkbd/keymaps/soundmonster/glcdfont.c"
|
||||
// #define OLED_FONT_WIDTH 5
|
||||
// #define OLED_FONT_HEIGHT 7
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||
// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
|
||||
// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
||||
# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
|
||||
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
# define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
|
||||
# define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
|
||||
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
|
||||
# define RGB_MATRIX_HUE_STEP 8
|
||||
# define RGB_MATRIX_SAT_STEP 8
|
||||
# define RGB_MATRIX_VAL_STEP 8
|
||||
# define RGB_MATRIX_SPD_STEP 10
|
||||
|
||||
/* Disable the animations you don't want/need. You will need to disable a good number of these *
|
||||
* because they take up a lot of space. Disable until you can successfully compile your firmware. */
|
||||
// # define DISABLE_RGB_MATRIX_ALPHAS_MODS
|
||||
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||
# define DISABLE_RGB_MATRIX_BREATHING
|
||||
// # define DISABLE_RGB_MATRIX_BAND_SAT
|
||||
# define DISABLE_RGB_MATRIX_BAND_VAL
|
||||
# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
|
||||
# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
|
||||
# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
|
||||
# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL
|
||||
# define DISABLE_RGB_MATRIX_CYCLE_ALL
|
||||
# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||
# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||
# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
|
||||
# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
||||
// # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||
# define DISABLE_RGB_MATRIX_DUAL_BEACON
|
||||
# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL
|
||||
# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL
|
||||
# define DISABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||
# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||
// # define DISABLE_RGB_MATRIX_RAINDROPS
|
||||
# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||
// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP
|
||||
// # define DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||
// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||
# define DISABLE_RGB_MATRIX_SPLASH
|
||||
// # define DISABLE_RGB_MATRIX_MULTISPLASH
|
||||
# define DISABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||
#endif
|
241
keyboards/crkbd/keymaps/soundmonster/glcdfont.c
Normal file
241
keyboards/crkbd/keymaps/soundmonster/glcdfont.c
Normal file
@ -0,0 +1,241 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __AVR__
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#endif
|
||||
|
||||
// Corne 8x6 font with QMK Firmware Logo
|
||||
// Online editor: https://helixfonteditor.netlify.com/
|
||||
// See also: https://github.com/soundmonster/glcdfont_converter
|
||||
|
||||
const unsigned char font[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
|
||||
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
|
||||
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
|
||||
0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
|
||||
0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
|
||||
0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
|
||||
0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
|
||||
0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
|
||||
0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
|
||||
0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
|
||||
0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
|
||||
0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
|
||||
0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
|
||||
0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
|
||||
0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
|
||||
0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
|
||||
0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
|
||||
0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
|
||||
0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
|
||||
0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
|
||||
0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
|
||||
0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
|
||||
0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
|
||||
0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
|
||||
0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
|
||||
0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
|
||||
0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
|
||||
0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
|
||||
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
|
||||
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
|
||||
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
|
||||
0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
|
||||
0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
|
||||
0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
|
||||
0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
|
||||
0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
|
||||
0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
|
||||
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
|
||||
0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
|
||||
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
|
||||
0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
|
||||
0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
|
||||
0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
|
||||
0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
|
||||
0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
|
||||
0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
|
||||
0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
|
||||
0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
|
||||
0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
|
||||
0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
|
||||
0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
|
||||
0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
|
||||
0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||
0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
|
||||
0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
|
||||
0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||
0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
|
||||
0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
|
||||
0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
|
||||
0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
|
||||
0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||
0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
|
||||
0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
|
||||
0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
|
||||
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
|
||||
0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
|
||||
0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
|
||||
0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||
0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||
0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
|
||||
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
|
||||
0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
|
||||
0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
|
||||
0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
|
||||
0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
|
||||
0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
|
||||
0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
|
||||
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
|
||||
0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
|
||||
0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
|
||||
0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
|
||||
0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
|
||||
0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
|
||||
0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
|
||||
0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
|
||||
0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
|
||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||
0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
|
||||
0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
|
||||
0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
|
||||
0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
|
||||
0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
|
||||
0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
|
||||
0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
|
||||
0x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
|
||||
0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
|
||||
0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
|
||||
0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
|
||||
0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
|
||||
0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
|
||||
0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
|
||||
0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
|
||||
0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
|
||||
0x7C, 0x18, 0x24, 0x24, 0x18, 0x00,
|
||||
0x18, 0x24, 0x24, 0x18, 0x7C, 0x00,
|
||||
0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
|
||||
0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
|
||||
0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
|
||||
0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
|
||||
0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
|
||||
0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
|
||||
0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
|
||||
0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
|
||||
0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
|
||||
0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
|
||||
0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
|
||||
0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
|
||||
0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
|
||||
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8,
|
||||
0xF8, 0x18, 0x00, 0xC0, 0xF0, 0xFC,
|
||||
0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0x7E, 0x00, 0x00, 0x00,
|
||||
0x00, 0xF8, 0x04, 0x22, 0x52, 0xE2,
|
||||
0x42, 0x42, 0x42, 0xE2, 0x52, 0x22,
|
||||
0x22, 0x22, 0x42, 0x82, 0x02, 0x02,
|
||||
0x22, 0x22, 0x02, 0x04, 0xF8, 0x00,
|
||||
0x00, 0xF8, 0x04, 0x02, 0x02, 0x82,
|
||||
0x42, 0x22, 0x42, 0x82, 0x02, 0x02,
|
||||
0x02, 0x82, 0x42, 0x22, 0x12, 0x22,
|
||||
0x42, 0x82, 0x02, 0x04, 0xF8, 0x00,
|
||||
0x00, 0xF8, 0xFC, 0xDE, 0xAE, 0x1E,
|
||||
0xBE, 0xBE, 0xBE, 0x1E, 0xAE, 0xDE,
|
||||
0xDE, 0xDE, 0xBE, 0x7E, 0xFE, 0xFE,
|
||||
0xDE, 0xDE, 0xFE, 0xFC, 0xF8, 0x00,
|
||||
0x00, 0xF8, 0xFC, 0xFE, 0xFE, 0x7E,
|
||||
0xBE, 0xDE, 0xBE, 0x7E, 0xFE, 0xFE,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x80, 0x80, 0x40, 0x40, 0x20, 0x20,
|
||||
0x10, 0x10, 0x08, 0x08, 0x10, 0x10,
|
||||
0x20, 0x20, 0x40, 0x40, 0x80, 0x80,
|
||||
0x80, 0x80, 0xC0, 0xC0, 0xE0, 0xE0,
|
||||
0xF0, 0xF0, 0xF8, 0xF8, 0xF0, 0xF0,
|
||||
0xE0, 0xE0, 0xC0, 0xC0, 0x80, 0x80,
|
||||
0x80, 0x80, 0x40, 0x40, 0x20, 0x20,
|
||||
0x10, 0x10, 0x08, 0x08, 0x10, 0x10,
|
||||
0x20, 0x20, 0x40, 0x40, 0x80, 0x80,
|
||||
0x80, 0x80, 0x40, 0xC0, 0x60, 0xA0,
|
||||
0x50, 0xB0, 0x58, 0xA8, 0x50, 0xB0,
|
||||
0x60, 0xA0, 0x40, 0xC0, 0x80, 0x80,
|
||||
0x00, 0xF8, 0xFC, 0xFE, 0xFF, 0xE0,
|
||||
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F,
|
||||
0x07, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x1F, 0x20, 0x44, 0x4A, 0x47,
|
||||
0x42, 0x42, 0x42, 0x47, 0x4A, 0x44,
|
||||
0x40, 0x40, 0x40, 0x40, 0x41, 0x42,
|
||||
0x44, 0x44, 0x40, 0x20, 0x1F, 0x00,
|
||||
0x00, 0x1F, 0x20, 0x40, 0x41, 0x40,
|
||||
0x40, 0x40, 0x40, 0x40, 0x41, 0x40,
|
||||
0x41, 0x41, 0x4F, 0x48, 0x48, 0x48,
|
||||
0x4F, 0x41, 0x41, 0x20, 0x1F, 0x00,
|
||||
0x00, 0x1F, 0x3F, 0x7B, 0x75, 0x78,
|
||||
0x7D, 0x7D, 0x7D, 0x78, 0x75, 0x7B,
|
||||
0x7F, 0x7F, 0x7F, 0x7F, 0x7E, 0x7D,
|
||||
0x7B, 0x7B, 0x7F, 0x3F, 0x1F, 0x00,
|
||||
0x00, 0x1F, 0x3F, 0x7F, 0x7E, 0x7F,
|
||||
0x7F, 0x7F, 0x7F, 0x7F, 0x7E, 0x7F,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x88, 0x88, 0x5D, 0x5D, 0x3E, 0x3E,
|
||||
0x7C, 0x7C, 0xF8, 0xF8, 0x7C, 0x7C,
|
||||
0x3E, 0x3E, 0x5D, 0x5D, 0x88, 0x88,
|
||||
0x88, 0x88, 0x55, 0x55, 0x23, 0x23,
|
||||
0x47, 0x47, 0x8F, 0x8F, 0x47, 0x47,
|
||||
0x23, 0x23, 0x55, 0x55, 0x88, 0x88,
|
||||
0x88, 0x88, 0xD5, 0xD5, 0xE2, 0xE2,
|
||||
0xC4, 0xC4, 0x88, 0x88, 0xC4, 0xC4,
|
||||
0xE2, 0xE2, 0xD5, 0xD5, 0x88, 0x88,
|
||||
0x88, 0x88, 0x5D, 0xD5, 0x6B, 0xB6,
|
||||
0x6D, 0xD6, 0xAD, 0xDA, 0x6D, 0xD6,
|
||||
0x6B, 0xB6, 0x5D, 0xD5, 0x88, 0x88,
|
||||
0x00, 0x03, 0x0F, 0x1F, 0x3F, 0x3F,
|
||||
0x3F, 0x3F, 0x1F, 0x1F, 0x3F, 0x3F,
|
||||
0x7F, 0x7F, 0x7F, 0x3F, 0x3F, 0x1F,
|
||||
0x3F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7C,
|
||||
0x78, 0x78, 0x38, 0x1C, 0x0F, 0x00,
|
||||
0x04, 0xF8, 0x00, 0x00, 0xF8, 0x04,
|
||||
0x20, 0x1F, 0x00, 0x00, 0x1F, 0x20,
|
||||
0xFC, 0xF8, 0x00, 0x00, 0xF8, 0x04,
|
||||
0x3F, 0x1F, 0x00, 0x00, 0x1F, 0x20,
|
||||
0x04, 0xF8, 0x00, 0x00, 0xF8, 0xFC,
|
||||
0x20, 0x1F, 0x00, 0x00, 0x1F, 0x3F,
|
||||
0xFC, 0xF8, 0x00, 0x00, 0xF8, 0xFC,
|
||||
0x3F, 0x1F, 0x00, 0x00, 0x1F, 0x3F,
|
||||
0xFE, 0x7E, 0xBE, 0xDE, 0xEE, 0xDE,
|
||||
0xBE, 0x7E, 0xFE, 0xFC, 0xF8, 0x00,
|
||||
0x7E, 0x7E, 0x70, 0x77, 0x77, 0x77,
|
||||
0x70, 0x7E, 0x7E, 0x3F, 0x1F, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x01, 0x01, 0x02, 0x02,
|
||||
0x04, 0x04, 0x08, 0x08, 0x04, 0x04,
|
||||
0x02, 0x02, 0x01, 0x01, 0x00, 0x00,
|
||||
0x00, 0x00, 0x01, 0x01, 0x02, 0x02,
|
||||
0x04, 0x04, 0x08, 0x08, 0x04, 0x04,
|
||||
0x02, 0x02, 0x01, 0x01, 0x00, 0x00,
|
||||
0x00, 0x00, 0x01, 0x01, 0x03, 0x03,
|
||||
0x07, 0x07, 0x0F, 0x0F, 0x07, 0x07,
|
||||
0x03, 0x03, 0x01, 0x01, 0x00, 0x00,
|
||||
0x00, 0x00, 0x01, 0x01, 0x03, 0x02,
|
||||
0x05, 0x06, 0x0D, 0x0A, 0x05, 0x06,
|
||||
0x03, 0x02, 0x01, 0x01, 0x00, 0x00
|
||||
};
|
393
keyboards/crkbd/keymaps/soundmonster/keymap.c
Normal file
393
keyboards/crkbd/keymaps/soundmonster/keymap.c
Normal file
@ -0,0 +1,393 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//Following line allows macro to read current RGB settings
|
||||
extern rgblight_config_t rgblight_config;
|
||||
#endif
|
||||
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
static uint32_t oled_timer = 0;
|
||||
#endif
|
||||
|
||||
extern uint8_t is_master;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
enum layers {
|
||||
_QWERTY,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
// Custom keycodes for layer keys
|
||||
// Dual function escape with left command
|
||||
#define KC_LGESC LGUI_T(KC_ESC)
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE,
|
||||
ADJUST,
|
||||
RGBRST,
|
||||
KC_RACL // right alt / colon
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = LAYOUT(
|
||||
//,-----------------------------------------. ,---------------------------------------------.
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
//|------+------+------+------+------+------| |------+------+-------+------+-------+--------|
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,
|
||||
//|------+------+------+------+------+------| |------+------+-------+------+-------+--------|
|
||||
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_RSPC,
|
||||
//|------+------+------+------+------+------+------| |------+------+------+-------+------+-------+--------|
|
||||
KC_LGESC,LOWER, KC_SPC, RCTL_T(KC_ENT), RAISE, KC_RACL
|
||||
//`--------------------' `--------------------'
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT(
|
||||
//,---------------------------------------------. ,-----------------------------------------.
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||
//|------+------+-------+-------+-------+-------| |------+------+------+------+------+------|
|
||||
KC_LCTL, KC_NO,KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R, KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,KC_NO,KC_NO,
|
||||
//|------+------+-------+-------+-------+-------| |------+------+------+------+------+------|
|
||||
KC_LSFT, KC_NO,KC_BTN2,KC_WH_D,KC_WH_U,KC_BTN1, KC_HOME,KC_PGDN,KC_PGUP,KC_END,KC_NO,KC_NO,
|
||||
//|------+------+-------+-------+-------+-------+------| |------+------+------+------+------+------+------|
|
||||
KC_LGUI, LOWER,KC_SPC, KC_ENT, RAISE,KC_RALT
|
||||
//`--------------------' `--------------------'
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT(
|
||||
//,-----------------------------------------. ,-----------------------------------------.
|
||||
KC_ESC,KC_EXLM,KC_AT,KC_HASH,KC_DLR,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_BSPC,
|
||||
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
KC_LCTL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS,KC_EQL,KC_LCBR,KC_RCBR,KC_PIPE,KC_GRV,
|
||||
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
KC_LSFT, KC_F6, KC_F7, KC_F8, KC_F9,KC_F10, KC_UNDS,KC_PLUS,KC_LBRC,KC_RBRC,KC_BSLS,KC_TILD,
|
||||
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||
KC_LGUI, LOWER,KC_SPC, KC_ENT, RAISE,KC_RALT
|
||||
//`--------------------' `--------------------'
|
||||
),
|
||||
|
||||
[_ADJUST] = LAYOUT(
|
||||
//,-----------------------------------------. ,-----------------------------------------.
|
||||
RESET,RGBRST, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC__MUTE, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
RGB_TOG,RGB_HUI,RGB_SAI,RGB_VAI,RGB_SPI,KC_NO, KC_PAUSE,KC__VOLUP, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
RGB_MOD,RGB_HUD,RGB_SAD,RGB_VAD,RGB_SPD,KC_NO, KC_SCROLLLOCK,KC__VOLDOWN, KC_NO, KC_NO, KC_NO, RGB_RMOD,
|
||||
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||
KC_LGUI, LOWER,KC_SPC, KC_ENT, RAISE,KC_RALT
|
||||
//`--------------------' `--------------------'
|
||||
)
|
||||
};
|
||||
|
||||
int RGB_current_mode;
|
||||
|
||||
// Setting ADJUST layer RGB back to default
|
||||
void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
|
||||
if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
|
||||
layer_on(layer3);
|
||||
} else {
|
||||
layer_off(layer3);
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; }
|
||||
|
||||
void render_space(void) {
|
||||
oled_write_P(PSTR(" "), false);
|
||||
}
|
||||
|
||||
void render_mod_status_gui_alt(uint8_t modifiers) {
|
||||
static const char PROGMEM gui_off_1[] = {0x85, 0x86, 0};
|
||||
static const char PROGMEM gui_off_2[] = {0xa5, 0xa6, 0};
|
||||
static const char PROGMEM gui_on_1[] = {0x8d, 0x8e, 0};
|
||||
static const char PROGMEM gui_on_2[] = {0xad, 0xae, 0};
|
||||
|
||||
static const char PROGMEM alt_off_1[] = {0x87, 0x88, 0};
|
||||
static const char PROGMEM alt_off_2[] = {0xa7, 0xa8, 0};
|
||||
static const char PROGMEM alt_on_1[] = {0x8f, 0x90, 0};
|
||||
static const char PROGMEM alt_on_2[] = {0xaf, 0xb0, 0};
|
||||
|
||||
// fillers between the modifier icons bleed into the icon frames
|
||||
static const char PROGMEM off_off_1[] = {0xc5, 0};
|
||||
static const char PROGMEM off_off_2[] = {0xc6, 0};
|
||||
static const char PROGMEM on_off_1[] = {0xc7, 0};
|
||||
static const char PROGMEM on_off_2[] = {0xc8, 0};
|
||||
static const char PROGMEM off_on_1[] = {0xc9, 0};
|
||||
static const char PROGMEM off_on_2[] = {0xca, 0};
|
||||
static const char PROGMEM on_on_1[] = {0xcb, 0};
|
||||
static const char PROGMEM on_on_2[] = {0xcc, 0};
|
||||
|
||||
if(modifiers & MOD_MASK_GUI) {
|
||||
oled_write_P(gui_on_1, false);
|
||||
} else {
|
||||
oled_write_P(gui_off_1, false);
|
||||
}
|
||||
|
||||
if ((modifiers & MOD_MASK_GUI) && (modifiers & MOD_MASK_ALT)) {
|
||||
oled_write_P(on_on_1, false);
|
||||
} else if(modifiers & MOD_MASK_GUI) {
|
||||
oled_write_P(on_off_1, false);
|
||||
} else if(modifiers & MOD_MASK_ALT) {
|
||||
oled_write_P(off_on_1, false);
|
||||
} else {
|
||||
oled_write_P(off_off_1, false);
|
||||
}
|
||||
|
||||
if(modifiers & MOD_MASK_ALT) {
|
||||
oled_write_P(alt_on_1, false);
|
||||
} else {
|
||||
oled_write_P(alt_off_1, false);
|
||||
}
|
||||
|
||||
if(modifiers & MOD_MASK_GUI) {
|
||||
oled_write_P(gui_on_2, false);
|
||||
} else {
|
||||
oled_write_P(gui_off_2, false);
|
||||
}
|
||||
|
||||
if (modifiers & MOD_MASK_GUI & MOD_MASK_ALT) {
|
||||
oled_write_P(on_on_2, false);
|
||||
} else if(modifiers & MOD_MASK_GUI) {
|
||||
oled_write_P(on_off_2, false);
|
||||
} else if(modifiers & MOD_MASK_ALT) {
|
||||
oled_write_P(off_on_2, false);
|
||||
} else {
|
||||
oled_write_P(off_off_2, false);
|
||||
}
|
||||
|
||||
if(modifiers & MOD_MASK_ALT) {
|
||||
oled_write_P(alt_on_2, false);
|
||||
} else {
|
||||
oled_write_P(alt_off_2, false);
|
||||
}
|
||||
}
|
||||
|
||||
void render_mod_status_ctrl_shift(uint8_t modifiers) {
|
||||
static const char PROGMEM ctrl_off_1[] = {0x89, 0x8a, 0};
|
||||
static const char PROGMEM ctrl_off_2[] = {0xa9, 0xaa, 0};
|
||||
static const char PROGMEM ctrl_on_1[] = {0x91, 0x92, 0};
|
||||
static const char PROGMEM ctrl_on_2[] = {0xb1, 0xb2, 0};
|
||||
|
||||
static const char PROGMEM shift_off_1[] = {0x8b, 0x8c, 0};
|
||||
static const char PROGMEM shift_off_2[] = {0xab, 0xac, 0};
|
||||
static const char PROGMEM shift_on_1[] = {0xcd, 0xce, 0};
|
||||
static const char PROGMEM shift_on_2[] = {0xcf, 0xd0, 0};
|
||||
|
||||
// fillers between the modifier icons bleed into the icon frames
|
||||
static const char PROGMEM off_off_1[] = {0xc5, 0};
|
||||
static const char PROGMEM off_off_2[] = {0xc6, 0};
|
||||
static const char PROGMEM on_off_1[] = {0xc7, 0};
|
||||
static const char PROGMEM on_off_2[] = {0xc8, 0};
|
||||
static const char PROGMEM off_on_1[] = {0xc9, 0};
|
||||
static const char PROGMEM off_on_2[] = {0xca, 0};
|
||||
static const char PROGMEM on_on_1[] = {0xcb, 0};
|
||||
static const char PROGMEM on_on_2[] = {0xcc, 0};
|
||||
|
||||
if(modifiers & MOD_MASK_CTRL) {
|
||||
oled_write_P(ctrl_on_1, false);
|
||||
} else {
|
||||
oled_write_P(ctrl_off_1, false);
|
||||
}
|
||||
|
||||
if ((modifiers & MOD_MASK_CTRL) && (modifiers & MOD_MASK_SHIFT)) {
|
||||
oled_write_P(on_on_1, false);
|
||||
} else if(modifiers & MOD_MASK_CTRL) {
|
||||
oled_write_P(on_off_1, false);
|
||||
} else if(modifiers & MOD_MASK_SHIFT) {
|
||||
oled_write_P(off_on_1, false);
|
||||
} else {
|
||||
oled_write_P(off_off_1, false);
|
||||
}
|
||||
|
||||
if(modifiers & MOD_MASK_SHIFT) {
|
||||
oled_write_P(shift_on_1, false);
|
||||
} else {
|
||||
oled_write_P(shift_off_1, false);
|
||||
}
|
||||
|
||||
if(modifiers & MOD_MASK_CTRL) {
|
||||
oled_write_P(ctrl_on_2, false);
|
||||
} else {
|
||||
oled_write_P(ctrl_off_2, false);
|
||||
}
|
||||
|
||||
if (modifiers & MOD_MASK_CTRL & MOD_MASK_SHIFT) {
|
||||
oled_write_P(on_on_2, false);
|
||||
} else if(modifiers & MOD_MASK_CTRL) {
|
||||
oled_write_P(on_off_2, false);
|
||||
} else if(modifiers & MOD_MASK_SHIFT) {
|
||||
oled_write_P(off_on_2, false);
|
||||
} else {
|
||||
oled_write_P(off_off_2, false);
|
||||
}
|
||||
|
||||
if(modifiers & MOD_MASK_SHIFT) {
|
||||
oled_write_P(shift_on_2, false);
|
||||
} else {
|
||||
oled_write_P(shift_off_2, false);
|
||||
}
|
||||
}
|
||||
|
||||
void render_logo(void) {
|
||||
static const char PROGMEM corne_logo[] = {
|
||||
0x80, 0x81, 0x82, 0x83, 0x84,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0};
|
||||
oled_write_P(corne_logo, false);
|
||||
oled_write_P(PSTR("corne"), false);
|
||||
}
|
||||
|
||||
void render_layer_state(void) {
|
||||
static const char PROGMEM default_layer[] = {
|
||||
0x20, 0x94, 0x95, 0x96, 0x20,
|
||||
0x20, 0xb4, 0xb5, 0xb6, 0x20,
|
||||
0x20, 0xd4, 0xd5, 0xd6, 0x20, 0};
|
||||
static const char PROGMEM raise_layer[] = {
|
||||
0x20, 0x97, 0x98, 0x99, 0x20,
|
||||
0x20, 0xb7, 0xb8, 0xb9, 0x20,
|
||||
0x20, 0xd7, 0xd8, 0xd9, 0x20, 0};
|
||||
static const char PROGMEM lower_layer[] = {
|
||||
0x20, 0x9a, 0x9b, 0x9c, 0x20,
|
||||
0x20, 0xba, 0xbb, 0xbc, 0x20,
|
||||
0x20, 0xda, 0xdb, 0xdc, 0x20, 0};
|
||||
static const char PROGMEM adjust_layer[] = {
|
||||
0x20, 0x9d, 0x9e, 0x9f, 0x20,
|
||||
0x20, 0xbd, 0xbe, 0xbf, 0x20,
|
||||
0x20, 0xdd, 0xde, 0xdf, 0x20, 0};
|
||||
if(layer_state_is(_ADJUST)) {
|
||||
oled_write_P(adjust_layer, false);
|
||||
} else if(layer_state_is(_LOWER)) {
|
||||
oled_write_P(lower_layer, false);
|
||||
} else if(layer_state_is(_RAISE)) {
|
||||
oled_write_P(raise_layer, false);
|
||||
} else {
|
||||
oled_write_P(default_layer, false);
|
||||
}
|
||||
}
|
||||
|
||||
void render_status_main(void) {
|
||||
render_logo();
|
||||
render_space();
|
||||
render_layer_state();
|
||||
render_space();
|
||||
render_mod_status_gui_alt(get_mods()|get_oneshot_mods());
|
||||
render_mod_status_ctrl_shift(get_mods()|get_oneshot_mods());
|
||||
}
|
||||
|
||||
void render_status_secondary(void) {
|
||||
render_logo();
|
||||
render_space();
|
||||
render_layer_state();
|
||||
render_space();
|
||||
render_mod_status_gui_alt(get_mods()|get_oneshot_mods());
|
||||
render_mod_status_ctrl_shift(get_mods()|get_oneshot_mods());
|
||||
}
|
||||
|
||||
void oled_task_user(void) {
|
||||
if (timer_elapsed32(oled_timer) > 30000) {
|
||||
oled_off();
|
||||
return;
|
||||
}
|
||||
#ifndef SPLIT_KEYBOARD
|
||||
else { oled_on(); }
|
||||
#endif
|
||||
|
||||
if (is_master) {
|
||||
render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
||||
} else {
|
||||
render_status_secondary();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
oled_timer = timer_read32();
|
||||
#endif
|
||||
// set_timelog();
|
||||
}
|
||||
static uint16_t my_colon_timer;
|
||||
|
||||
switch (keycode) {
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
case ADJUST:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_ADJUST);
|
||||
} else {
|
||||
layer_off(_ADJUST);
|
||||
}
|
||||
return false;
|
||||
case KC_RACL:
|
||||
if (record->event.pressed) {
|
||||
my_colon_timer = timer_read();
|
||||
register_code(KC_RALT);
|
||||
} else {
|
||||
unregister_code(KC_RALT);
|
||||
if (timer_elapsed(my_colon_timer) < TAPPING_TERM) {
|
||||
SEND_STRING(":"); // Change the character(s) to be sent on tap here
|
||||
}
|
||||
}
|
||||
return false;
|
||||
case RGBRST:
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
eeconfig_update_rgblight_default();
|
||||
rgblight_enable();
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
}
|
||||
#endif
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
if (record->event.pressed) {
|
||||
eeconfig_update_rgb_matrix_default();
|
||||
rgb_matrix_enable();
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
|
||||
void suspend_power_down_keymap(void) {
|
||||
rgb_matrix_set_suspend_state(true);
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_keymap(void) {
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
}
|
||||
|
||||
#endif
|
6
keyboards/crkbd/keymaps/soundmonster/rules.mk
Normal file
6
keyboards/crkbd/keymaps/soundmonster/rules.mk
Normal file
@ -0,0 +1,6 @@
|
||||
RGBLIGHT_ENABLE = no
|
||||
RGB_MATRIX_ENABLE = WS2812
|
||||
MOUSEKEY_ENABLE = no
|
||||
NKRO_ENABLE = yes
|
||||
OLED_DRIVER_ENABLE = yes
|
||||
|
46
keyboards/crkbd/keymaps/tominabox1/keymap.c
Executable file
46
keyboards/crkbd/keymaps/tominabox1/keymap.c
Executable file
@ -0,0 +1,46 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "tominabox1.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BASE] = LAYOUT_wrapper(
|
||||
___________________CRKBD1__________________,
|
||||
___________________CRKBD2__________________,
|
||||
___________________CRKBD3__________________,
|
||||
___________________CRKBD4__________________
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT_wrapper(
|
||||
___________________RAISE1__________________,
|
||||
___________________RAISE2__________________,
|
||||
___________________CRKBD_RAISE3____________,
|
||||
___________________CRKBD_RAISE4____________
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT_wrapper(
|
||||
_________________LOWER_1___________________,
|
||||
_________________LOWER_2___________________,
|
||||
___________________CRKBD_LOW3______________,
|
||||
___________________CRKBD_LOW4______________
|
||||
),
|
||||
|
||||
[_ADJUST] = LAYOUT_wrapper(
|
||||
___________________ADJST1__________________,
|
||||
___________________CRKBD_ADJST2____________,
|
||||
___________________CRKBD_ADJST3____________,
|
||||
___________________CRKBD_ADJST4____________
|
||||
),
|
||||
|
||||
[_ARROW] = LAYOUT_wrapper(
|
||||
___________________ARROW1__________________,
|
||||
___________________ARROW2__________________,
|
||||
___________________ARROW3__________________,
|
||||
___________________ARROW4__________________
|
||||
),
|
||||
[_FKEY] = LAYOUT_wrapper(
|
||||
___________________FKEY1___________________,
|
||||
___________________FKEY2___________________,
|
||||
___________________CRKBD_FKEY3_____________,
|
||||
___________________CRKBD_FKEY4_____________
|
||||
)
|
||||
|
||||
};
|
@ -11,7 +11,6 @@ MCU = atmega32u4
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
@ -36,4 +35,4 @@ CUSTOM_MATRIX = yes
|
||||
SRC += indicator_leds.c \
|
||||
matrix.c duck_led/duck_led.c
|
||||
|
||||
LAYOUTS = tkl_ansi
|
||||
LAYOUTS = tkl_ansi
|
||||
|
25
keyboards/dz60/keymaps/pok3r/keymap.c
Normal file
25
keyboards/dz60/keymaps/pok3r/keymap.c
Normal file
@ -0,0 +1,25 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
LAYOUT(
|
||||
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_NO, 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,
|
||||
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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_NO, MO(2), KC_RCTL),
|
||||
|
||||
LAYOUT(
|
||||
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_MPRV, KC_MPLY, KC_MNXT, RESET, _______, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______,
|
||||
KC_CAPS, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_DEL, _______,
|
||||
_______, KC_APP, _______, _______, _______, _______, KC_END, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
LAYOUT(
|
||||
RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, _______, RGB_RMOD, RGB_MOD, _______, _______,
|
||||
_______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
};
|
@ -114,3 +114,12 @@ void suspend_wakeup_init_kb(void)
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void rgb_matrix_indicators_user(void)
|
||||
{
|
||||
if (IS_LED_ON(host_keyboard_leds(), USB_LED_CAPS_LOCK))
|
||||
{
|
||||
rgb_matrix_set_color(8, 0xFF, 0xFF, 0xFF);
|
||||
}
|
||||
}
|
||||
|
3
keyboards/dztech/dz65rgb/keymaps/catrielmuller/config.h
Normal file
3
keyboards/dztech/dz65rgb/keymaps/catrielmuller/config.h
Normal file
@ -0,0 +1,3 @@
|
||||
#define LEADER_TIMEOUT 300
|
||||
#define FORCE_NKRO
|
||||
#define UNICODE_SELECTED_MODES UC_LNX, UC_OSX, UC_WIN, UC_WINC
|
242
keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c
Normal file
242
keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c
Normal file
@ -0,0 +1,242 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Config
|
||||
const uint8_t MAIN_COLOR[3] = {0xFF, 0x00, 0x00};
|
||||
|
||||
// layers, ordering is important!
|
||||
enum layers {
|
||||
_MAIN,
|
||||
_INDEX,
|
||||
_FN,
|
||||
_MULTIMEDIA,
|
||||
_EMOJI,
|
||||
_EXT1,
|
||||
_EXT2,
|
||||
_EXT3,
|
||||
_EXT4,
|
||||
_EXT5,
|
||||
_EXT6,
|
||||
_RGB,
|
||||
_CONFIG,
|
||||
}
|
||||
|
||||
const layers_leds_map[] = {
|
||||
[_MAIN] = 17,
|
||||
[_INDEX] = 16,
|
||||
[_FN] = 15,
|
||||
[_MULTIMEDIA] = 14,
|
||||
[_EMOJI] = 13,
|
||||
[_EXT1] = 12,
|
||||
[_EXT2] = 11,
|
||||
[_EXT3] = 10,
|
||||
[_EXT4] = 9,
|
||||
[_EXT5] = 18,
|
||||
[_EXT6] = 19,
|
||||
[_RGB] = 20,
|
||||
[_CONFIG] = 21,
|
||||
};
|
||||
|
||||
enum unicode_names {
|
||||
UC_GRINNING_FACE, // 😃
|
||||
UC_BEAMING_FACE, // 😁
|
||||
UC_GRINNING_FACE_WITH_SWEAT, // 😅
|
||||
UC_ROLLING_LAUGHING, // 🤣
|
||||
UC_FACE_TEARS_JOY, // 😂
|
||||
UC_WINKING_FACE, // 😉
|
||||
UC_SMILING_FACE_HALO, // 😇
|
||||
UC_SMILING_FACE_HEARTS, // 🥰
|
||||
UC_SMILING_FACE_HEART_EYES, // 😍
|
||||
UC_FACE_BLOWING_KISS, // 😘
|
||||
UC_FACE_SAVORING_FOOD, // 😋
|
||||
UC_ZANY_FACE, // 🤪
|
||||
UC_HUGGING_FACE, // 🤗
|
||||
UC_SHUSHING_FACE, // 🤫
|
||||
UC_THINKING_FACE, // 🤔
|
||||
UC_FACE_RAISED_EYEBROW, // 🤨
|
||||
UC_NEUTRAL_FACE, // 😐
|
||||
UC_SMIRKING_FACE, // 😏
|
||||
UC_FACE_ROLLING_EYES, // 🙄
|
||||
UC_PENSIVE_FACE, // 😔
|
||||
UC_FACE_VOMITING, // 🤮
|
||||
UC_WOOZY_FACE, // 🥴
|
||||
UC_PLEADING_FACE, // 🥺
|
||||
UC_LOUDLY_CRYING_FACE, // 😭
|
||||
UC_DISAPPOINTED_FACE, // 😞
|
||||
UC_FACE_SYMBOLS_MOUTH, // 🤬
|
||||
UC_SMILING_FACE_HORNS, // 😈
|
||||
UC_SKULL, // 💀
|
||||
UC_PILE_POO, // 💩
|
||||
UC_GHOST, // 👻
|
||||
UC_ALIEN_MONSTER, // 👾
|
||||
UC_RED_HEART, // ❤
|
||||
UC_BOMB, // 💣
|
||||
UC_WAVING_HAND, // 👋
|
||||
UC_OK_HAND, // 👌
|
||||
UC_CLAPPING_HANDS, // 👏
|
||||
UC_EYES, // 👀
|
||||
UC_MAN_FACEPALMING, // 🤦
|
||||
UC_TURTLE, // 🐢
|
||||
UC_SNAKE, // 🐍
|
||||
UC_SPOUTING_WHALE, // 🐳
|
||||
UC_DRAGON, // 🐉
|
||||
UC_TREX, // 🦖
|
||||
UC_ARGENTINA_A, // 🇦
|
||||
UC_ARGENTINA_R, // 🇷
|
||||
UC_THUMBSDOWN, // 👍
|
||||
UC_THUMBSUP, // 👎
|
||||
};
|
||||
|
||||
const uint32_t PROGMEM unicode_map[] = {
|
||||
[UC_GRINNING_FACE] = 0x1F603,
|
||||
[UC_BEAMING_FACE] = 0x1F601,
|
||||
[UC_GRINNING_FACE_WITH_SWEAT] = 0x1F605,
|
||||
[UC_ROLLING_LAUGHING] = 0x1F923,
|
||||
[UC_FACE_TEARS_JOY] = 0x1F602,
|
||||
[UC_WINKING_FACE] = 0x1F609,
|
||||
[UC_SMILING_FACE_HALO] = 0x1F607,
|
||||
[UC_SMILING_FACE_HEARTS] = 0x1F970,
|
||||
[UC_SMILING_FACE_HEART_EYES] = 0x1F60D,
|
||||
[UC_FACE_BLOWING_KISS] = 0x1F618,
|
||||
[UC_FACE_SAVORING_FOOD] = 0x1F60B,
|
||||
[UC_ZANY_FACE] = 0x1F92A,
|
||||
[UC_HUGGING_FACE] = 0x1F917,
|
||||
[UC_SHUSHING_FACE] = 0x1F92B,
|
||||
[UC_THINKING_FACE] = 0x1F914,
|
||||
[UC_FACE_RAISED_EYEBROW] = 0x1F928,
|
||||
[UC_NEUTRAL_FACE] = 0x1F610,
|
||||
[UC_SMIRKING_FACE] = 0x1F60F,
|
||||
[UC_FACE_ROLLING_EYES] = 0x1F644,
|
||||
[UC_PENSIVE_FACE] = 0x1F614,
|
||||
[UC_FACE_VOMITING] = 0x1F92E,
|
||||
[UC_WOOZY_FACE] = 0x1F974,
|
||||
[UC_PLEADING_FACE] = 0x1F97A,
|
||||
[UC_LOUDLY_CRYING_FACE] = 0x1F62D,
|
||||
[UC_DISAPPOINTED_FACE] = 0x1F61E,
|
||||
[UC_FACE_SYMBOLS_MOUTH] = 0x1F92C,
|
||||
[UC_SMILING_FACE_HORNS] = 0x1F608,
|
||||
[UC_SKULL] = 0x1F480,
|
||||
[UC_PILE_POO] = 0x1F4A9,
|
||||
[UC_GHOST] = 0x1F47B,
|
||||
[UC_ALIEN_MONSTER] = 0x1F47E,
|
||||
[UC_RED_HEART] = 0x2764,
|
||||
[UC_BOMB] = 0x1F4A3,
|
||||
[UC_WAVING_HAND] = 0x1F44B,
|
||||
[UC_OK_HAND] = 0x1F44C,
|
||||
[UC_CLAPPING_HANDS] = 0x1F44F,
|
||||
[UC_EYES] = 0x1F440,
|
||||
[UC_MAN_FACEPALMING] = 0x1F926,
|
||||
[UC_TURTLE] = 0x1F422,
|
||||
[UC_SNAKE] = 0x1F40D,
|
||||
[UC_SPOUTING_WHALE] = 0x1F433,
|
||||
[UC_DRAGON] = 0x1F409,
|
||||
[UC_TREX] = 0x1F996,
|
||||
[UC_ARGENTINA_A] = 0x1F1E6,
|
||||
[UC_ARGENTINA_R] = 0x1F1F7,
|
||||
[UC_THUMBSDOWN] = 0x1F44E,
|
||||
[UC_THUMBSUP] = 0x1F44D,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_MAIN] = LAYOUT_65_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_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_END,
|
||||
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_PGUP,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_APP), KC_UP, KC_PGDN,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LEAD, TO(_INDEX), MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
[_INDEX] = LAYOUT_65_ansi(
|
||||
TO(_MAIN), TO(_INDEX), TO(_FN), TO(_MULTIMEDIA), TO(_EMOJI), TO(_EXT1), TO(_EXT2), TO(_EXT3), TO(_EXT4), TO(_EXT5), TO(_EXT6), TO(_RGB), TO(_CONFIG), TO(_MAIN), 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_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, TO(_INDEX), TO(_FN), KC_NO, KC_NO, KC_NO
|
||||
),
|
||||
[_FN] = 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_PSCR,
|
||||
KC_TAB, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_INS, KC_SLCK,
|
||||
KC_APP, 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_PAUS,
|
||||
KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, TO(_INDEX), KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R
|
||||
),
|
||||
[_MULTIMEDIA] = LAYOUT_65_ansi(
|
||||
TO(_MAIN), 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MPLY, 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_MSTP, KC_VOLU, KC_MUTE,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_INDEX), KC_NO, KC_MPRV, KC_VOLD, KC_MNXT
|
||||
),
|
||||
[_EMOJI] = LAYOUT_65_ansi(
|
||||
TO(_MAIN), X(UC_GRINNING_FACE), X(UC_BEAMING_FACE), X(UC_GRINNING_FACE_WITH_SWEAT), X(UC_ROLLING_LAUGHING), X(UC_FACE_TEARS_JOY), X(UC_WINKING_FACE), X(UC_SMILING_FACE_HALO), X(UC_SMILING_FACE_HEARTS), X(UC_SMILING_FACE_HEART_EYES), X(UC_FACE_BLOWING_KISS), X(UC_FACE_SAVORING_FOOD), X(UC_ZANY_FACE), KC_BSPC, KC_HOME,
|
||||
KC_TAB, X(UC_HUGGING_FACE), X(UC_SHUSHING_FACE), X(UC_THINKING_FACE), X(UC_FACE_RAISED_EYEBROW), X(UC_NEUTRAL_FACE), X(UC_SMIRKING_FACE), X(UC_FACE_ROLLING_EYES), X(UC_PENSIVE_FACE), X(UC_FACE_VOMITING), X(UC_WOOZY_FACE), X(UC_PLEADING_FACE), X(UC_LOUDLY_CRYING_FACE), X(UC_THUMBSUP), KC_END,
|
||||
KC_APP, X(UC_DISAPPOINTED_FACE), X(UC_FACE_SYMBOLS_MOUTH), X(UC_SMILING_FACE_HORNS), X(UC_SKULL), X(UC_PILE_POO), X(UC_GHOST), X(UC_ALIEN_MONSTER), X(UC_RED_HEART), X(UC_BOMB), X(UC_WAVING_HAND), X(UC_OK_HAND), KC_ENT, KC_PGUP,
|
||||
KC_LSFT, X(UC_CLAPPING_HANDS), X(UC_EYES), X(UC_MAN_FACEPALMING), X(UC_TURTLE), X(UC_SNAKE), X(UC_SPOUTING_WHALE), X(UC_DRAGON), X(UC_TREX), X(UC_ARGENTINA_A), X(UC_ARGENTINA_R), X(UC_THUMBSDOWN), KC_UP, KC_PGDN,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LEAD, TO(_INDEX), TO(_MAIN), KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
[_EXT1] = LAYOUT_65_ansi(
|
||||
TO(_MAIN), 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_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, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO
|
||||
),
|
||||
[_EXT2] = LAYOUT_65_ansi(
|
||||
TO(_MAIN), 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_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, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO
|
||||
),
|
||||
[_EXT3] = LAYOUT_65_ansi(
|
||||
TO(_MAIN), 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_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, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO
|
||||
),
|
||||
[_EXT4] = LAYOUT_65_ansi(
|
||||
TO(_MAIN), 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_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, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO
|
||||
),
|
||||
[_EXT5] = LAYOUT_65_ansi(
|
||||
TO(_MAIN), 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_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, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO
|
||||
),
|
||||
[_EXT6] = LAYOUT_65_ansi(
|
||||
TO(_MAIN), 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_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, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO
|
||||
),
|
||||
[_RGB] = LAYOUT_65_ansi(
|
||||
TO(_MAIN), 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, RGB_TOG, RGB_RMOD, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, RGB_SPD, RGB_SPI, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, 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, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO
|
||||
),
|
||||
[_CONFIG] = LAYOUT_65_ansi(
|
||||
TO(_MAIN), 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_ACL2,
|
||||
KC_NO, KC_PWR, KC_SLEP, KC_WAKE, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET, DEBUG, EEP_RST, KC_NO, KC_ACL1,
|
||||
KC_NO, UC_RMOD, UC_MOD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ACL0,
|
||||
KC_NO, MAGIC_TOGGLE_NKRO, MAGIC_UNHOST_NKRO, MAGIC_HOST_NKRO, 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, TO(_INDEX), KC_NO, KC_NO, KC_NO, KC_NO
|
||||
),
|
||||
};
|
||||
|
||||
void rgb_matrix_indicators_user(void) {
|
||||
|
||||
// CapsLock Light
|
||||
if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
|
||||
rgb_matrix_set_color(8, MAIN_COLOR[0], MAIN_COLOR[1], MAIN_COLOR[2]);
|
||||
}
|
||||
|
||||
// Show Selected Layer
|
||||
rgb_matrix_set_color(layers_leds_map[biton32(layer_state)], MAIN_COLOR[0], MAIN_COLOR[1], MAIN_COLOR[2]);
|
||||
}
|
2
keyboards/dztech/dz65rgb/keymaps/catrielmuller/rules.mk
Normal file
2
keyboards/dztech/dz65rgb/keymaps/catrielmuller/rules.mk
Normal file
@ -0,0 +1,2 @@
|
||||
LEADER_ENABLE = yes
|
||||
UNICODEMAP_ENABLE = yes
|
@ -16,14 +16,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT),
|
||||
};
|
||||
|
||||
void rgb_matrix_indicators_user(void)
|
||||
{
|
||||
if (IS_LED_ON(host_keyboard_leds(), USB_LED_CAPS_LOCK))
|
||||
{
|
||||
rgb_matrix_set_color(8, 0xFF, 0xFF, 0xFF);
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_init_user(void)
|
||||
{
|
||||
//user initialization
|
||||
|
@ -0,0 +1,67 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
/* Use I2C or Serial, not both */
|
||||
#define USE_SERIAL
|
||||
// #define USE_I2C
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
//#define MASTER_LEFT
|
||||
#define MASTER_RIGHT /* Cable connected to the right split keyboard */
|
||||
// #define EE_HANDS
|
||||
|
||||
#define AUTO_SHIFT_TIMEOUT 210
|
||||
|
||||
#define TAPPING_TERM_PER_KEY
|
||||
|
||||
// https://beta.docs.qmk.fm/features/feature_leader_key
|
||||
//#define LEADER_PER_KEY_TIMING
|
||||
//#define LEADER_TIMEOUT 280
|
||||
|
||||
// https://docs.qmk.fm/#/feature_mouse_keys
|
||||
#define MK_3_SPEED // Constant Speed Mode
|
||||
|
||||
#define MOUSEKEY_DELAY 300
|
||||
#define MOUSEKEY_INTERVAL 16
|
||||
#define MOUSEKEY_MAX_SPEED 3
|
||||
#define MOUSEKEY_TIME_TO_MAX 60
|
||||
#define MK_C_OFFSET_0 4
|
||||
#define MK_C_INTERVAL_0 28
|
||||
#define MK_C_OFFSET_1 8
|
||||
#define MK_C_INTERVAL_1 16
|
||||
#define MK_C_OFFSET_2 20
|
||||
#define MK_C_INTERVAL_2 16
|
||||
|
||||
#define MOUSEKEY_WHEEL_MAX_SPEED 4
|
||||
#define MOUSEKEY_WHEEL_TIME_TO_MAX 40
|
||||
|
||||
#define MK_W_OFFSET_0 1
|
||||
#define MK_W_INTERVAL_0 120
|
||||
#define MK_W_OFFSET_1 1
|
||||
#define MK_W_INTERVAL_1 100
|
||||
#define MK_W_OFFSET_2 1
|
||||
#define MK_W_INTERVAL_2 60
|
||||
|
||||
//#define STARTUP_RESET_EEPROM // EMERGENCY
|
||||
|
157
keyboards/ergodash/rev1/keymaps/yet-another-developer/keymap.c
Normal file
157
keyboards/ergodash/rev1/keymaps/yet-another-developer/keymap.c
Normal file
@ -0,0 +1,157 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "yet-another-developer.h"
|
||||
|
||||
#ifndef UNICODE_ENABLE
|
||||
# define UC(x) KC_NO
|
||||
#endif
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#define EISU LALT(KC_GRV)
|
||||
|
||||
#define LAYOUT_ergodash_pretty_wrapper(...) LAYOUT_ergodash_pretty(__VA_ARGS__)
|
||||
|
||||
/* Keymap: BASE layer
|
||||
*
|
||||
* ,----------------------------------------------------. ,----------------------------------------------------.
|
||||
* | ESC | 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 | Pscree |
|
||||
* |--------+--------+------+------+------+-------------| |------+------+------+------+------+--------+--------|
|
||||
* | ` | K01 | K02 | K03 | K04 | K05 | - | | = | K06 | K07 | K08 | K09 | K0A | \ |
|
||||
* |--------+--------+------+------+------+------|------| |------|------+------+------+------+--------+--------|
|
||||
* | Tab | K11 | K12 | K13 | K14 | K15 | { | | } | K16 | K17 | K18 | K19 | K1A | " |
|
||||
* |--------+--------+------+------+------+------|------' `------|------+------+------+------+--------+--------|
|
||||
* | LShift | K21 | K22 | K23 | K24 | K25 | | K26 | K27 | K28 | K29 | K2A | RShift |
|
||||
* |--------+--------+------+------+------+------' `------+------+------+------+--------+--------|
|
||||
* | LCtrl | GUI | Alt | Alt | | LEFT | DOWN | UP | RIGHT |
|
||||
* `-------------------------------' `-------------------------------'
|
||||
* ,--------------. ,--------------.
|
||||
* | Lower| | | | Raise |
|
||||
* ,-------| / | Del | | Bksp + / +-------.
|
||||
* |CMD/Spc| Space| | | | Enter |CMD/Spc|
|
||||
* `----------------------' `----------------------'
|
||||
*/
|
||||
#define LAYOUT_ergodash_pretty_base( \
|
||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||
) \
|
||||
LAYOUT_ergodash_pretty_wrapper( \
|
||||
KC_ESC, ________________NUMBER_LEFT________________, KC_LBRC, KC_RBRC, ________________NUMBER_RIGHT_______________, KC_PSCR, \
|
||||
KC_GRV, K01, K02, K03, K04, K05, KC_MINS, KC_EQL, K06, K07, K08, K09, K0A, KC_BSLS, \
|
||||
KC_TAB, K11, K12, K13, K14, K15, KC_LCBR, KC_RCBR, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||
OS_LSFT, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, OS_RSFT, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_LALT, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, \
|
||||
LT(_LOWER, KC_SPC), LT(_RAISE, KC_ENT), \
|
||||
OS_LGUI,LT(_LOWER, KC_SPC),KC_DEL, KC_BSPC, LT(_RAISE, KC_ENT), OS_RGUI \
|
||||
)
|
||||
|
||||
#define LAYOUT_ergodash_pretty_base_wrapper(...) LAYOUT_ergodash_pretty_base(__VA_ARGS__)
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = LAYOUT_ergodash_pretty_base_wrapper(
|
||||
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
|
||||
_________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
|
||||
_________________QWERTY_L3_________________, _________________QWERTY_R3_________________
|
||||
),
|
||||
|
||||
/* Keymap: COLEMAK layer
|
||||
*
|
||||
* ,----------------------------------------------------. ,----------------------------------------------------.
|
||||
* | ESC | 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+--------+------+------+------+-------------| |------+------+------+------+------+--------+--------|
|
||||
* | ` | Q | W | F | P | G | - | | = | J | L | U | Y | ; | \ |
|
||||
* |--------+--------+------+------+------+------|------| |------|------+------+------+------+--------+--------|
|
||||
* | Tab | A | R | S | T | D | Del | | Bksp | H | N | E | I | O | ' |
|
||||
* |--------+--------+------+------+------+------|------' `------|------+------+------+------+--------+--------|
|
||||
* | LShift | Z | X | C | V | B | | K | M | , < | . > | / | RShift |
|
||||
* |--------+--------+------+------+------+------' `------+------+------+------+--------+--------|
|
||||
* | Ctrl | GUI | Alt | EISU | | LEFT | DOWN | UP | RIGHT |
|
||||
* `-------------------------------' `-------------------------------'
|
||||
* ,--------------. ,--------------.
|
||||
* | Lower| | | | Raise |
|
||||
* ,-------| / | Del | | Bksp + / +-------.
|
||||
* |CMD/Spc| Space| | | | Enter |CMD/Spc|
|
||||
* `----------------------' `----------------------'
|
||||
*/
|
||||
|
||||
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[_COLEMAK] = LAYOUT_ergodash_pretty_base_wrapper(
|
||||
_________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
|
||||
_________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
|
||||
_________________COLEMAK_L3________________, _________________COLEMAK_R3________________
|
||||
),
|
||||
|
||||
[_DVORAK] = LAYOUT_ergodash_pretty_base_wrapper(
|
||||
_________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
|
||||
_________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
|
||||
_________________DVORAK_L3_________________, _________________DVORAK_R3_________________
|
||||
),
|
||||
|
||||
[_WORKMAN] = LAYOUT_ergodash_pretty_base_wrapper(
|
||||
_________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
|
||||
_________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
|
||||
_________________WORKMAN_L3________________, _________________WORKMAN_R3________________
|
||||
),
|
||||
|
||||
#ifdef UNICODEMAP_ENABLE
|
||||
[_UNICODE] = LAYOUT_ergodash_pretty_base_wrapper(
|
||||
_______________UNICODE_L1__________________, _______________UNICODE_R1__________________,
|
||||
_______________UNICODE_L2__________________, _______________UNICODE_R2__________________,
|
||||
_______________UNICODE_L3__________________, _______________UNICODE_R3__________________
|
||||
),
|
||||
#endif
|
||||
|
||||
[_LOWER] = LAYOUT_ergodash_pretty_wrapper(
|
||||
KC_F11, _________________FUNC_LEFT_________________, KC_RST , KC_RST , _________________FUNC_RIGHT________________, KC_F12,
|
||||
KC_TILD, _________________LOWER_L1__________________, _______, _______, _________________LOWER_R1__________________, KC_PIPE,
|
||||
_______, _________________LOWER_L2__________________, _______, _______, _________________LOWER_R2__________________, KC_DQUO,
|
||||
_______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, KC_PSCR,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_PAUS,
|
||||
_______, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT_ergodash_pretty_wrapper(
|
||||
KC_F12, _________________FUNC_LEFT_________________, KC_RST, KC_RST , _________________FUNC_RIGHT________________, KC_F11,
|
||||
KC_GRV, _________________RAISE_L1__________________, _______, _______, _________________RAISE_R1__________________, KC_BSLS,
|
||||
_______, _________________RAISE_L2__________________, _______, _______, _________________RAISE_R2__________________, KC_QUOT,
|
||||
_______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, KC_PSCR,
|
||||
_______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END,
|
||||
_______, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_ADJUST] = LAYOUT_ergodash_pretty_wrapper(
|
||||
KC_MAKE, _______, _______, _______, _______, _______, _______, KC_NUKE, _______, _______, _______, _______, _______, KC_RST,
|
||||
VRSN, _________________ADJUST_L1_________________, _______, _______, _________________ADJUST_R1_________________, EEP_RST,
|
||||
_______, _________________ADJUST_L2_________________, _______, _______, _________________ADJUST_R2_________________, _______,
|
||||
_______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______, _______, _______, _______, _______, _______
|
||||
),
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
#endif
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
void matrix_init_keymap(void) {
|
||||
#ifdef STARTUP_RESET_EEPROM
|
||||
eeconfig_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
@ -0,0 +1,23 @@
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
|
||||
# Device
|
||||
AUDIO_ENABLE = no
|
||||
|
||||
RGBLIGHT_ENABLE = no
|
||||
BACKLIGHT_ENABLE = no
|
||||
INDICATOR_LIGHTS = no
|
||||
|
||||
# QMK Features
|
||||
AUTO_SHIFT_ENABLE = no
|
||||
MOUSEKEY_ENABLE = no
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
LEADER_ENABLE = yes # default is yes
|
||||
TAP_DANCE_ENABLE = no #(+1254)
|
||||
UNICODE_ENABLE = no #(+1134)
|
||||
UNICODEMAP_ENABLE = no
|
||||
NKRO_ENABLE = no
|
||||
MACROS_ENABLED = no
|
||||
|
||||
# User Defined Features
|
||||
NO_SECRETS = no
|
@ -9,9 +9,6 @@
|
||||
#include "matrix.h"
|
||||
#include "ergodone.h"
|
||||
#include "expander.h"
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
#include "timer.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This constant define not debouncing time in msecs, but amount of matrix
|
||||
@ -41,12 +38,6 @@ static void init_cols(void);
|
||||
static void unselect_rows(void);
|
||||
static void select_row(uint8_t row);
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
uint32_t matrix_timer;
|
||||
uint32_t matrix_scan_count;
|
||||
#endif
|
||||
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {}
|
||||
|
||||
@ -88,13 +79,7 @@ void matrix_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
matrix_timer = timer_read32();
|
||||
matrix_scan_count = 0;
|
||||
#endif
|
||||
|
||||
matrix_init_quantum();
|
||||
|
||||
}
|
||||
|
||||
void matrix_power_up(void) {
|
||||
@ -105,11 +90,6 @@ void matrix_power_up(void) {
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
matrix_timer = timer_read32();
|
||||
matrix_scan_count = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Returns a matrix_row_t whose bits are set if the corresponding key should be
|
||||
@ -140,21 +120,6 @@ uint8_t matrix_scan(void)
|
||||
{
|
||||
expander_scan();
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
matrix_scan_count++;
|
||||
|
||||
uint32_t timer_now = timer_read32();
|
||||
if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) {
|
||||
print("matrix scan frequency: ");
|
||||
pdec(matrix_scan_count);
|
||||
print("\n");
|
||||
matrix_print();
|
||||
|
||||
matrix_timer = timer_now;
|
||||
matrix_scan_count = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
select_row(i);
|
||||
wait_us(30); // without this wait read unstable value.
|
||||
|
@ -32,15 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "debounce.h"
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Only enable this if console is enabled to print to
|
||||
#if defined(DEBUG_MATRIX_SCAN_RATE) && !defined(CONSOLE_ENABLE)
|
||||
# undef DEBUG_MATRIX_SCAN_RATE
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
# include "timer.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This constant define not debouncing time in msecs, assuming eager_pr.
|
||||
*
|
||||
@ -65,11 +56,6 @@ static void select_row(uint8_t row);
|
||||
static uint8_t mcp23018_reset_loop;
|
||||
// static uint16_t mcp23018_reset_loop;
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
uint32_t matrix_timer;
|
||||
uint32_t matrix_scan_count;
|
||||
#endif
|
||||
|
||||
__attribute__((weak)) void matrix_init_user(void) {}
|
||||
|
||||
__attribute__((weak)) void matrix_scan_user(void) {}
|
||||
@ -96,10 +82,6 @@ void matrix_init(void) {
|
||||
raw_matrix[i] = 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
matrix_timer = timer_read32();
|
||||
matrix_scan_count = 0;
|
||||
#endif
|
||||
debounce_init(MATRIX_ROWS);
|
||||
matrix_init_quantum();
|
||||
}
|
||||
@ -114,11 +96,6 @@ void matrix_power_up(void) {
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
matrix_timer = timer_read32();
|
||||
matrix_scan_count = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Reads and stores a row, returning
|
||||
@ -149,20 +126,6 @@ uint8_t matrix_scan(void) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
matrix_scan_count++;
|
||||
|
||||
uint32_t timer_now = timer_read32();
|
||||
if (TIMER_DIFF_32(timer_now, matrix_timer) > 1000) {
|
||||
print("matrix scan frequency: ");
|
||||
pdec(matrix_scan_count);
|
||||
print("\n");
|
||||
|
||||
matrix_timer = timer_now;
|
||||
matrix_scan_count = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef LEFT_LEDS
|
||||
mcp23018_status = ergodox_left_leds_update();
|
||||
#endif // LEFT_LEDS
|
||||
|
@ -33,3 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
|
||||
)
|
||||
|
||||
// i2c_master driver config
|
||||
#define I2C1_CLOCK_SPEED 400000
|
||||
#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2
|
||||
|
@ -13,13 +13,6 @@
|
||||
#define DEBOUNCE 10
|
||||
#endif
|
||||
|
||||
//#define DEBUG_MATRIX_SCAN_RATE
|
||||
|
||||
//#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
//uint32_t matrix_timer;
|
||||
//uint32_t matrix_scan_count;
|
||||
//#endif
|
||||
|
||||
static uint8_t mcp23017_reset_loop = 0;
|
||||
|
||||
volatile matrix_row_t matrix[MATRIX_ROWS];
|
||||
|
@ -26,9 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "debug.h"
|
||||
#include "util.h"
|
||||
#include QMK_KEYBOARD_H
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
#include "timer.h"
|
||||
#endif
|
||||
|
||||
#ifndef DEBOUNCE
|
||||
# define DEBOUNCE 5
|
||||
@ -70,12 +67,6 @@ static void select_row(uint8_t row);
|
||||
static uint8_t mcp23018_reset_loop;
|
||||
// static uint16_t mcp23018_reset_loop;
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
uint32_t matrix_timer;
|
||||
uint32_t matrix_scan_count;
|
||||
#endif
|
||||
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {}
|
||||
|
||||
@ -121,10 +112,6 @@ void matrix_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
matrix_timer = timer_read32();
|
||||
matrix_scan_count = 0;
|
||||
#endif
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
@ -138,12 +125,6 @@ void matrix_power_up(void) {
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
matrix_timer = timer_read32();
|
||||
matrix_scan_count = 0;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
// Returns a matrix_row_t whose bits are set if the corresponding key should be
|
||||
@ -192,18 +173,6 @@ uint8_t matrix_scan(void)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
matrix_scan_count++;
|
||||
uint32_t timer_now = timer_read32();
|
||||
if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) {
|
||||
print("matrix scan frequency: ");
|
||||
pdec(matrix_scan_count);
|
||||
print("\n");
|
||||
|
||||
matrix_timer = timer_now;
|
||||
matrix_scan_count = 0;
|
||||
}
|
||||
#endif
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) {
|
||||
select_row(i);
|
||||
// and select on left hand
|
||||
|
@ -11,7 +11,6 @@ MCU = atmega32u4
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
|
@ -1,52 +1,16 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# project specific files
|
||||
#SRC =
|
||||
|
||||
# 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
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = qmk-dfu
|
||||
|
||||
# Do not put the microcontroller into power saving mode
|
||||
# when we get USB suspend event. We want it to keep updating
|
||||
# backlight effects.
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
|
@ -27,10 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "util.h"
|
||||
#include "keymap_steno.h"
|
||||
#include QMK_KEYBOARD_H
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
#include "timer.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef DEBOUNCE
|
||||
# define DEBOUNCE 5
|
||||
@ -92,12 +88,6 @@ static void select_row(uint8_t row);
|
||||
static uint8_t mcp23018_reset_loop;
|
||||
// static uint16_t mcp23018_reset_loop;
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
uint32_t matrix_timer;
|
||||
uint32_t matrix_scan_count;
|
||||
#endif
|
||||
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {}
|
||||
|
||||
@ -143,10 +133,6 @@ void matrix_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
matrix_timer = timer_read32();
|
||||
matrix_scan_count = 0;
|
||||
#endif
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
@ -160,12 +146,6 @@ void matrix_power_up(void) {
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
matrix_timer = timer_read32();
|
||||
matrix_scan_count = 0;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
// Returns a matrix_row_t whose bits are set if the corresponding key should be
|
||||
@ -214,18 +194,6 @@ uint8_t matrix_scan(void)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
matrix_scan_count++;
|
||||
uint32_t timer_now = timer_read32();
|
||||
if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) {
|
||||
print("matrix scan frequency: ");
|
||||
pdec(matrix_scan_count);
|
||||
print("\n");
|
||||
|
||||
matrix_timer = timer_now;
|
||||
matrix_scan_count = 0;
|
||||
}
|
||||
#endif
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) {
|
||||
select_row(i);
|
||||
// and select on left hand
|
||||
|
@ -1,18 +1,15 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# make georgi:default:dfu
|
||||
# Make sure you have dfu-programmer installed!
|
||||
# Do not edit this file! Make a copy of keymaps/default and modify that!
|
||||
#----------------------------------------------------------------------------
|
||||
# Source includes
|
||||
SRC += matrix.c i2c_master.c sten.c
|
||||
|
||||
# Hardware info
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
F_CPU = 16000000
|
||||
ARCH = AVR8
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
F_USB = $(F_CPU)
|
||||
EXTRAFLAGS += -flto
|
||||
|
||||
CUSTOM_MATRIX = yes
|
||||
MOUSEKEY_ENABLE = no
|
||||
@ -21,3 +18,6 @@ EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = yes
|
||||
COMMAND_ENABLE = no
|
||||
NKRO_ENABLE = yes
|
||||
|
||||
EXTRAFLAGS += -flto
|
||||
SRC += matrix.c i2c_master.c sten.c
|
||||
|
@ -27,9 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "util.h"
|
||||
#include "debounce.h"
|
||||
#include QMK_KEYBOARD_H
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
# include "timer.h"
|
||||
#endif
|
||||
|
||||
#ifdef BALLER
|
||||
#include <avr/interrupt.h>
|
||||
@ -124,12 +121,6 @@ static void enableInterrupts(void);
|
||||
static uint8_t mcp23018_reset_loop;
|
||||
// static uint16_t mcp23018_reset_loop;
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
uint32_t matrix_timer;
|
||||
uint32_t matrix_scan_count;
|
||||
#endif
|
||||
|
||||
|
||||
__attribute__ ((weak)) void matrix_init_user(void) {}
|
||||
|
||||
__attribute__ ((weak)) void matrix_scan_user(void) {}
|
||||
@ -161,10 +152,6 @@ void matrix_init(void) {
|
||||
raw_matrix[i] = 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
matrix_timer = timer_read32();
|
||||
matrix_scan_count = 0;
|
||||
#endif
|
||||
debounce_init(MATRIX_ROWS);
|
||||
matrix_init_quantum();
|
||||
}
|
||||
@ -179,12 +166,6 @@ void matrix_power_up(void) {
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
matrix_timer = timer_read32();
|
||||
matrix_scan_count = 0;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
// Reads and stores a row, returning
|
||||
@ -261,20 +242,6 @@ uint8_t matrix_scan(void) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
matrix_scan_count++;
|
||||
|
||||
uint32_t timer_now = timer_read32();
|
||||
if (TIMER_DIFF_32(timer_now, matrix_timer) > 1000) {
|
||||
print("matrix scan frequency: ");
|
||||
pdec(matrix_scan_count);
|
||||
print("\n");
|
||||
|
||||
matrix_timer = timer_now;
|
||||
matrix_scan_count = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool changed = false;
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) {
|
||||
// select rows from left and right hands
|
||||
|
@ -1,18 +1,15 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# make gergo:germ:dfu
|
||||
# Make sure you have dfu-programmer installed!
|
||||
# Do not edit this file! Make a copy of keymaps/default and modify that!
|
||||
#----------------------------------------------------------------------------
|
||||
# Source includes
|
||||
SRC += matrix.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
|
||||
# Hardware info
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
F_CPU = 16000000
|
||||
ARCH = AVR8
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
CUSTOM_MATRIX = yes
|
||||
EXTRAKEY_ENABLE = yes
|
||||
@ -21,3 +18,5 @@ COMMAND_ENABLE = yes
|
||||
BOOTMAGIC_ENABLE = lite
|
||||
|
||||
DEBOUNCE_TYPE = eager_pr
|
||||
SRC += matrix.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
|
@ -1,51 +1,15 @@
|
||||
# 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
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
|
@ -1,48 +1,15 @@
|
||||
# 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
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
|
@ -1,45 +1,15 @@
|
||||
# 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
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
|
@ -1,51 +1,18 @@
|
||||
# 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.
|
||||
# Processor frequency
|
||||
F_CPU = 8000000
|
||||
|
||||
|
||||
#
|
||||
# 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
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
|
@ -1,51 +1,15 @@
|
||||
# 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
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = lufa-ms
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
|
@ -1,63 +1,16 @@
|
||||
# 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
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
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
|
||||
#
|
||||
@ -79,4 +32,4 @@ 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_blocker
|
||||
LAYOUTS = 65_ansi_blocker
|
||||
|
@ -1,63 +1,16 @@
|
||||
# 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
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
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
|
||||
#
|
||||
|
@ -1,41 +1,14 @@
|
||||
# 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
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
|
@ -1,48 +1,14 @@
|
||||
# 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
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = halfkay
|
||||
|
||||
# Build Options
|
||||
|
@ -1,63 +1,16 @@
|
||||
# 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
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
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
|
||||
#
|
||||
|
@ -1,4 +1,14 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = caterina
|
||||
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||
|
@ -1,53 +1,14 @@
|
||||
# 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
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
# Bootloader
|
||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||
# different sizes, comment this out, and the correct address will be loaded
|
||||
# automatically (+60). See bootloader.mk for all options.
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
|
@ -1,51 +1,15 @@
|
||||
# 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
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = halfkay
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
|
@ -1,49 +1,15 @@
|
||||
# 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
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = caterina
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
|
@ -1,52 +1,15 @@
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = halfkay
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
@ -65,5 +28,3 @@ MIDI_ENABLE = no # MIDI controls
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
|
||||
|
||||
|
@ -1,49 +1,14 @@
|
||||
# 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
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
|
@ -76,11 +76,6 @@ uint8_t expander_status;
|
||||
uint8_t expander_input_pin_mask;
|
||||
bool i2c_initialized = false;
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
uint32_t matrix_timer;
|
||||
uint32_t matrix_scan_count;
|
||||
#endif
|
||||
|
||||
#define ROW_SHIFTER ((matrix_row_t)1)
|
||||
|
||||
__attribute__ ((weak))
|
||||
@ -129,11 +124,6 @@ void matrix_init(void)
|
||||
matrix_debouncing[i] = 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
matrix_timer = timer_read32();
|
||||
matrix_scan_count = 0;
|
||||
#endif
|
||||
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
@ -236,20 +226,6 @@ uint8_t matrix_scan(void)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
matrix_scan_count++;
|
||||
|
||||
uint32_t timer_now = timer_read32();
|
||||
if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) {
|
||||
print("matrix scan frequency: ");
|
||||
pdec(matrix_scan_count);
|
||||
print("\n");
|
||||
|
||||
matrix_timer = timer_now;
|
||||
matrix_scan_count = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (DIODE_DIRECTION == COL2ROW)
|
||||
for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
|
||||
# if (DEBOUNCE > 0)
|
||||
|
@ -1,71 +1,15 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# On command line:
|
||||
#
|
||||
# make = Make software.
|
||||
#
|
||||
# make clean = Clean out built project files.
|
||||
#
|
||||
# That's pretty much all you need. To compile, always go make clean,
|
||||
# followed by make.
|
||||
#
|
||||
# For advanced users only:
|
||||
# make teensy = Download the hex file to the device, using teensy_loader_cli.
|
||||
# (must have teensy_loader_cli installed).
|
||||
#
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
# # project specific files
|
||||
SRC = twimaster.c \
|
||||
matrix.c
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = halfkay
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
@ -84,3 +28,7 @@ SWAP_HANDS_ENABLE = yes # Allow swapping hands of keyboard
|
||||
SLEEP_LED_ENABLE = no
|
||||
API_SYSEX_ENABLE = no
|
||||
RGBLIGHT_ENABLE = no
|
||||
|
||||
# project specific files
|
||||
SRC = twimaster.c \
|
||||
matrix.c
|
||||
|
@ -1,47 +1,16 @@
|
||||
# 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)
|
||||
|
||||
# Bootloader
|
||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||
# different sizes, comment this out, and the correct address will be loaded
|
||||
# automatically (+60). See bootloader.mk for all options.
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = caterina
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
# 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
|
||||
|
@ -1,47 +1,16 @@
|
||||
# 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)
|
||||
|
||||
# Bootloader
|
||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||
# different sizes, comment this out, and the correct address will be loaded
|
||||
# automatically (+60). See bootloader.mk for all options.
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = caterina
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
# 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
|
||||
|
@ -1,52 +1,15 @@
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = halfkay
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
|
@ -35,9 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "util.h"
|
||||
#include "matrix.h"
|
||||
#include "frenchdev.h"
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
#include "timer.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This constant define not debouncing time in msecs, but amount of matrix
|
||||
@ -66,12 +63,6 @@ static void select_row(uint8_t row);
|
||||
|
||||
static uint8_t mcp23018_reset_loop;
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
uint32_t matrix_timer;
|
||||
uint32_t matrix_scan_count;
|
||||
#endif
|
||||
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {}
|
||||
|
||||
@ -120,13 +111,7 @@ void matrix_init(void)
|
||||
matrix_debouncing[i] = 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
matrix_timer = timer_read32();
|
||||
matrix_scan_count = 0;
|
||||
#endif
|
||||
|
||||
matrix_init_quantum();
|
||||
|
||||
}
|
||||
|
||||
void matrix_power_up(void) {
|
||||
@ -140,12 +125,6 @@ void matrix_power_up(void) {
|
||||
matrix[i] = 0;
|
||||
matrix_debouncing[i] = 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
matrix_timer = timer_read32();
|
||||
matrix_scan_count = 0;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
uint8_t matrix_scan(void)
|
||||
@ -165,20 +144,6 @@ uint8_t matrix_scan(void)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MATRIX_SCAN_RATE
|
||||
matrix_scan_count++;
|
||||
|
||||
uint32_t timer_now = timer_read32();
|
||||
if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) {
|
||||
print("matrix scan frequency: ");
|
||||
pdec(matrix_scan_count);
|
||||
print("\n");
|
||||
|
||||
matrix_timer = timer_now;
|
||||
matrix_scan_count = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
select_row(i);
|
||||
wait_us(30); // without this wait read unstable value.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user