From: Drashna Jaelre Date: Sun, 19 May 2019 17:01:16 +0000 (-0700) Subject: [Keymap] Drashna Corne Keyboard updates (#5903) X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6b8be985551efc5a5f95dfea6dc1554352bc46e0;hp=89e9785d7a87e8dbb941dd272c032f34658169fd;p=qmk_firmware.git [Keymap] Drashna Corne Keyboard updates (#5903) * Re-enable Audio And there was much rejoicingmake keebio/iris/rev2:drashna AUDIO_ENABLE=yes! * Re-add debounce to ergodox EZ * Fix rgb matrix helper function * Make sure that RGM Matrix is checked properly * Fix merge commit? * Disable more RGB matrix modes * Increase Debounce for Ergodox EZ The performance improvements have made it necessary, actually * Consolidate RGB Matrix layer indication function And changes to iris * Fix lighting issue for gamepad * Update Corne Keyboard configuration * Update Corne Keyboard layout * Update KC_MAKE macro to better handle crkbd split * Tweaks to Corne Keyboard Layout * Enable RGB Matrix Sleep * Update my code to use layer_state_t typedef --- diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 8347660df..8f0cd12b3 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -144,14 +144,16 @@ const led_config_t g_led_config = { { } }; ``` -The first part, `// Key Matrix to LED Index`, tells the system what key this LED represents by using the key's electrical matrix row & col. The second part, `// LED Index to Physical Position` represents the LED's physical position on the keyboard. The first value, `x`, is between 0-224 (inclusive), and the second value, `y`, is between 0-64 (inclusive). This range is due to effect that calculate the center or halves for their animations. The easiest way to calculate these positions is imagine your keyboard is a grid, and the top left of the keyboard represents x, y coordinate 0, 0 and the bottom right of your keyboard represents 224, 64. Using this as a basis, you can use the following formula to calculate the physical position: +The first part, `// Key Matrix to LED Index`, tells the system what key this LED represents by using the key's electrical matrix row & col. The second part, `// LED Index to Physical Position` represents the LED's physical `{ x, y }` position on the keyboard. The default expected range of values for `{ x, y }` is the inclusive range `{ 0..224, 0..64 }`. This default expected range is due to effects that calculate the center of the keyboard for their animations. The easiest way to calculate these positions is imagine your keyboard is a grid, and the top left of the keyboard represents `{ x, y }` coordinate `{ 0, 0 }` and the bottom right of your keyboard represents `{ 224, 64 }`. Using this as a basis, you can use the following formula to calculate the physical position: ```C x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION ``` -Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout. +Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout. + +As mentioned earlier, the center of the keyboard by default is expected to be `{ 112, 32 }`, but this can be changed if you want to more accurately calculate the LED's physical `{ x, y }` positions. Keyboard designers can implement `#define RGB_MATRIX_CENTER { 112, 32 }` in their config.h file with the new center point of the keyboard, or where they want it to be allowing more possibilities for the `{ x, y }` values. Do note that the maximum value for x or y is 255, and the recommended maximum is 224 as this gives animations runoff room before they reset. `// LED Index to Flag` is a bitmask, whether or not a certain LEDs is of a certain type. It is recommended that LEDs are set to only 1 type. @@ -194,12 +196,20 @@ enum rgb_matrix_effects { RGB_MATRIX_ALPHAS_MODS, // Static dual hue, speed is hue for secondary hue RGB_MATRIX_GRADIENT_UP_DOWN, // Static gradient top to bottom, speed controls how much gradient changes RGB_MATRIX_BREATHING, // Single hue brightness cycling animation + RGB_MATRIX_BAND_SAT, // Single hue band fading saturation scrolling left to right + RGB_MATRIX_BAND_VAL, // Single hue band fading brightness scrolling left to right + RGB_MATRIX_BAND_PINWHEEL_SAT, // Single hue 3 blade spinning pinwheel fades saturation + RGB_MATRIX_BAND_PINWHEEL_VAL, // Single hue 3 blade spinning pinwheel fades brightness + RGB_MATRIX_BAND_SPIRAL_SAT, // Single hue spinning spiral fades saturation + RGB_MATRIX_BAND_SPIRAL_VAL, // Single hue spinning spiral fades brightness RGB_MATRIX_CYCLE_ALL, // Full keyboard solid hue cycling through full gradient RGB_MATRIX_CYCLE_LEFT_RIGHT, // Full gradient scrolling left to right RGB_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom RGB_MATRIX_CYCLE_OUT_IN, // Full gradient scrolling out to in RGB_MATRIX_CYCLE_OUT_IN_DUAL, // Full dual gradients scrolling out to in RGB_MATRIX_RAINBOW_MOVING_CHEVRON, // Full gradent Chevron shapped scrolling left to right + RGB_MATRIX_CYCLE_PINWHEEL, // Full gradient spinning pinwheel around center of keyboard + RGB_MATRIX_CYCLE_SPIRAL, // Full gradient spinning spiral around center of keyboard RGB_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard RGB_MATRIX_RAINBOW_BEACON, // Full tighter gradient spinning around center of keyboard RGB_MATRIX_RAINBOW_PINWHEELS, // Full dual gradients spinning two halfs of keyboard @@ -235,6 +245,12 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con |`#define DISABLE_RGB_MATRIX_ALPHAS_MODS` |Disables `RGB_MATRIX_ALPHAS_MODS` | |`#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Disables `RGB_MATRIX_GRADIENT_UP_DOWN` | |`#define DISABLE_RGB_MATRIX_BREATHING` |Disables `RGB_MATRIX_BREATHING` | +|`#define DISABLE_RGB_MATRIX_BAND_SAT` |Disables `RGB_MATRIX_BAND_SAT` | +|`#define DISABLE_RGB_MATRIX_BAND_VAL` |Disables `RGB_MATRIX_BAND_VAL` | +|`#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT` |Disables `RGB_MATRIX_BAND_PINWHEEL_SAT` | +|`#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL` |Disables `RGB_MATRIX_BAND_PINWHEEL_VAL` | +|`#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT` |Disables `RGB_MATRIX_BAND_SPIRAL_SAT` | +|`#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL` |Disables `RGB_MATRIX_BAND_SPIRAL_VAL` | |`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` | |`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` | |`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` | @@ -242,6 +258,8 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con |`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL` |Disables `RGB_MATRIX_CYCLE_OUT_IN_DUAL` | |`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON` | |`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` | +|`#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL` |Disables `RGB_MATRIX_CYCLE_PINWHEEL` | +|`#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL` |Disables `RGB_MATRIX_CYCLE_SPIRAL` | |`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` | |`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` | |`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` | diff --git a/keyboards/coseyfannitutti/mullet/config.h b/keyboards/coseyfannitutti/mullet/config.h new file mode 100644 index 000000000..527294e51 --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/config.h @@ -0,0 +1,172 @@ +/* +Copyright 2019 COSEYFANNITUTTI + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6969 +#define DEVICE_VER 0x0001 +#define MANUFACTURER coseyfannitutti +#define PRODUCT mullet +#define DESCRIPTION 65% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, B0, F0, F1 } +#define MATRIX_COL_PINS { B2, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D2, D3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D5 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_SLEEP +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +//#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +//#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + diff --git a/keyboards/coseyfannitutti/mullet/info.json b/keyboards/coseyfannitutti/mullet/info.json new file mode 100644 index 000000000..a60888633 --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "mullet", + "url": "https://github.com/coseyfannitutti/mullet", + "maintainer": "coseyfannitutti", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Insert", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Page Up", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Page Down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Fn", "x":11.25, "y":4, "w":1.25}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/coseyfannitutti/mullet/keymaps/alternate/keymap.c b/keyboards/coseyfannitutti/mullet/keymaps/alternate/keymap.c new file mode 100644 index 000000000..21ca2ffb6 --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/keymaps/alternate/keymap.c @@ -0,0 +1,68 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 + + /* Qwerty + * .---------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | Del | + * |---------------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | PgUp| + * |---------------------------------------------------------------------------------------------+ + * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PgDn| + * |---------------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Up | Fn | + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Win | Alt | Space | RAlt | Fn |||||Left |Down |Right| + * '---------------------------------------------------------------------------------------------' + */ + + /* FnLayer + * .---------------------------------------------------------------------------------------------. + * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | | + * |---------------------------------------------------------------------------------------------+ + * | Tab |STATC|BRTHE|RNBOW|RESET| | | | | | |PrScr| | \ | Home| + * |---------------------------------------------------------------------------------------------+ + * | Caps |RGBH+|RGBS+|RGBB+| | | | | | | | | Enter | End | + * |---------------------------------------------------------------------------------------------+ + * | Shift |RGBH-|RGBS-|RGBB-| | | | |RGBM-|RGBM+|RGBTG| Shift |VolUp| | + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Win | Alt | | RAlt | Fn ||||| |VolDn| | + * '---------------------------------------------------------------------------------------------' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = 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_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_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_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(_FL), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_LEFT, KC_DOWN, KC_RIGHT), + + [_FL] = LAYOUT( + /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc delete */ + 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, + /* tab Q W E R T Y U I O P [ ] \ pg up */ + KC_TRNS, RGB_M_P, RGB_M_B, RGB_M_R, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_BSLS, KC_HOME, + /* caps A S D F G H J K L ; ' enter pg dn */ + KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_END, + /* shift Z X C V B N M , . / shift up fn */ + KC_LSFT, RGB_HUD, RGB_SAD, RGB_VAD,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE,RGB_RMOD, RGB_MOD, RGB_TOG, KC_RSFT, KC_VOLU, KC_TRNS, + /* ctrl win alt space alt fn left down right */ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS) +}; diff --git a/keyboards/coseyfannitutti/mullet/keymaps/default/keymap.c b/keyboards/coseyfannitutti/mullet/keymaps/default/keymap.c new file mode 100644 index 000000000..07d939dfd --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/keymaps/default/keymap.c @@ -0,0 +1,68 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 + + /* Qwerty + * .---------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | Ins | + * |---------------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Del | + * |---------------------------------------------------------------------------------------------+ + * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PgUp| + * |---------------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | U | Pgdn| + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Win | Alt | Space | RAlt | FN ||||| L | D | R | + * '---------------------------------------------------------------------------------------------' + */ + + /* FnLayer + * .---------------------------------------------------------------------------------------------. + * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE |PNTSC| + * |---------------------------------------------------------------------------------------------+ + * | Tab |STATC|BRTHE|RNBOW|RESET| | | | | | |PAUSE| | \ | | + * |---------------------------------------------------------------------------------------------+ + * | Caps |RGBH+|RGBS+|RGBB+| | | | | | | | INS | Enter | HOME| + * |---------------------------------------------------------------------------------------------+ + * | Shift |RGBH-|RGBS-|RGBB-| | | | |RGBM-|RGBM+|RGBTG| Shift |VOLUP| END | + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Win | Alt | | RAlt | FN ||||| L |VOLDN| R | + * '---------------------------------------------------------------------------------------------' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = 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_BSPC, KC_INS, + 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_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, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_LEFT, KC_DOWN, KC_RIGHT), + + [_FL] = LAYOUT( + /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc insert*/ + 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, + /* tab Q W E R T Y U I O P [ ] \ delete*/ + KC_TRNS, RGB_M_P, RGB_M_B, RGB_M_R, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_BSLS, KC_TRNS, + /* caps A S D F G H J K L ; ' enter pg up*/ + KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, + /* shift Z X C V B N M , . / shift up pg dn*/ + KC_LSFT, RGB_HUD, RGB_SAD, RGB_VAD,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE,RGB_RMOD, RGB_MOD, RGB_TOG, KC_RSFT, KC_VOLU, KC_END, + /* ctrl win alt space alt fn left down right*/ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS) +}; diff --git a/keyboards/coseyfannitutti/mullet/mullet.c b/keyboards/coseyfannitutti/mullet/mullet.c new file mode 100644 index 000000000..4f451f3db --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/mullet.c @@ -0,0 +1,23 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#include "mullet.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} diff --git a/keyboards/coseyfannitutti/mullet/mullet.h b/keyboards/coseyfannitutti/mullet/mullet.h new file mode 100644 index 000000000..848fd1922 --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/mullet.h @@ -0,0 +1,42 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define _x_ KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ +) { \ +{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ +{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, _x_, K2D, K2E }, \ +{ K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, _x_, K4A, K4B, K4C, K4D, K4E} \ +} diff --git a/keyboards/coseyfannitutti/mullet/readme.md b/keyboards/coseyfannitutti/mullet/readme.md new file mode 100644 index 000000000..45c17fb5b --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/readme.md @@ -0,0 +1,15 @@ +# mullet + +![mullet](https://i.imgur.com/EBOMbhH.jpg) + +A 68 key keyboard with USB Type-C and RGB underglow + +Keyboard Maintainer: [coseyfannitutti](https://github.com/coseyfannitutti) +Hardware Supported: Mullet, atmega32u4 +Hardware Availability: https://github.com/coseyfannitutti/mullet + +Make example for this keyboard (after setting up your build environment): + + make coseyfannitutti/mullet: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). diff --git a/keyboards/coseyfannitutti/mullet/rules.mk b/keyboards/coseyfannitutti/mullet/rules.mk new file mode 100644 index 000000000..fa02fe6fc --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# 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 on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/coseyfannitutti/mulletpad/config.h b/keyboards/coseyfannitutti/mulletpad/config.h new file mode 100644 index 000000000..ad5941055 --- /dev/null +++ b/keyboards/coseyfannitutti/mulletpad/config.h @@ -0,0 +1,172 @@ +/* +Copyright 2019 COSEYFANNITUTTI + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6666 +#define DEVICE_VER 0x0001 +#define MANUFACTURER coseyfannitutti +#define PRODUCT mulletpad +#define DESCRIPTION numpad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F4, F1, F5, F6, F7 } +#define MATRIX_COL_PINS { F0, C7, C6, B6, } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +//#define RGB_DI_PIN D5 +//#ifdef RGB_DI_PIN +//#define RGBLIGHT_ANIMATIONS +//#define RGBLED_NUM 8 +//#define RGBLIGHT_HUE_STEP 8 +//#define RGBLIGHT_SAT_STEP 8 +//#define RGBLIGHT_VAL_STEP 8 +//#define RGBLIGHT_SLEEP +//#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +//#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +//#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + diff --git a/keyboards/coseyfannitutti/mulletpad/info.json b/keyboards/coseyfannitutti/mulletpad/info.json new file mode 100644 index 000000000..1cfade20d --- /dev/null +++ b/keyboards/coseyfannitutti/mulletpad/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "mulletpad", + "url": "https://github.com/coseyfannitutti/mulletpad", + "maintainer": "coseyfannitutti", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"+", "x":3, "y":1, "h":2}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"Enter", "x":3, "y":3, "h":2}, {"label":"0", "x":0, "y":4, "w":2}, {"label":".", "x":2, "y":4}] + } + } +} diff --git a/keyboards/coseyfannitutti/mulletpad/keymaps/default/keymap.c b/keyboards/coseyfannitutti/mulletpad/keymaps/default/keymap.c new file mode 100644 index 000000000..ffdc1044d --- /dev/null +++ b/keyboards/coseyfannitutti/mulletpad/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _BL 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_numpad_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT ) +}; diff --git a/keyboards/coseyfannitutti/mulletpad/mulletpad.c b/keyboards/coseyfannitutti/mulletpad/mulletpad.c new file mode 100644 index 000000000..be335cc54 --- /dev/null +++ b/keyboards/coseyfannitutti/mulletpad/mulletpad.c @@ -0,0 +1,23 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#include "mulletpad.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} diff --git a/keyboards/coseyfannitutti/mulletpad/mulletpad.h b/keyboards/coseyfannitutti/mulletpad/mulletpad.h new file mode 100644 index 000000000..41c5c014a --- /dev/null +++ b/keyboards/coseyfannitutti/mulletpad/mulletpad.h @@ -0,0 +1,42 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define _x_ KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_numpad_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K23, \ + K30, K31, K32, \ + K40, K42, K43 \ +) { \ +{ K00, K01, K02, K03, }, \ +{ K10, K11, K12, _x_, }, \ +{ K20, K21, K22, K23, }, \ +{ K30, K31, K32, _x_, }, \ +{ K40, _x_, K42, K43, }, \ +} diff --git a/keyboards/coseyfannitutti/mulletpad/readme.md b/keyboards/coseyfannitutti/mulletpad/readme.md new file mode 100644 index 000000000..9ee49ca96 --- /dev/null +++ b/keyboards/coseyfannitutti/mulletpad/readme.md @@ -0,0 +1,15 @@ +# mulletpad + +![mulletpad](https://i.imgur.com/MHKo5f5.png) + +A 17-key numpad with USB Type-C. + +Keyboard Maintainer: [coseyfannitutti](https://github.com/coseyfannitutti) +Hardware Supported: Mulletpad, atmega32u4 +Hardware Availability: https://github.com/coseyfannitutti/mulletpad + +Make example for this keyboard (after setting up your build environment): + + make coseyfannitutti/mulletpad: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). diff --git a/keyboards/coseyfannitutti/mulletpad/rules.mk b/keyboards/coseyfannitutti/mulletpad/rules.mk new file mode 100644 index 000000000..b3a473ef4 --- /dev/null +++ b/keyboards/coseyfannitutti/mulletpad/rules.mk @@ -0,0 +1,82 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# 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 on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = numpad_5x4 diff --git a/keyboards/exclusive/e6v2/bmc/bmc.c b/keyboards/exclusive/e6v2/bmc/bmc.c deleted file mode 100644 index 257b68b8b..000000000 --- a/keyboards/exclusive/e6v2/bmc/bmc.c +++ /dev/null @@ -1,96 +0,0 @@ -/* Copyright 2019 MechMerlin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "bmc.h" -#include "rgblight.h" -#include "i2c_master.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - led_set_user(usb_led); -} - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - } - - i2c_init(); - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} -#endif - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -void backlight_init_ports(void) { - // initialize pins D0, D1, D4 and D6 as output - setPinOutput(D0); - setPinOutput(D1); - setPinOutput(D4); - setPinOutput(D6); - - // turn RGB LEDs on - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); -} - -void backlight_set(uint8_t level) { - if (level == 0) { - // turn RGB LEDs off - writePinLow(D0); - writePinLow(D1); - writePinLow(D4); - writePinLow(D6); - } else { - // turn RGB LEDs on - writePinHigh(D0); - writePinHigh(D1); - writePinHigh(D4); - writePinHigh(D6); - } -} diff --git a/keyboards/exclusive/e6v2/bmc/bmc.h b/keyboards/exclusive/e6v2/bmc/bmc.h deleted file mode 100644 index 44c02c860..000000000 --- a/keyboards/exclusive/e6v2/bmc/bmc.h +++ /dev/null @@ -1,101 +0,0 @@ -/* Copyright 2019 MechMerlin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#pragma once - -#include "quantum.h" - -/* This a shortcut to help you visually see your layout. - * - * The first section contains all of the arguments representing the physical - * layout of the board and position of the keys. - * - * The second converts the arguments into a two-dimensional array which - * represents the switch matrix. - */ - -// LAYOUT_all ignores the key often coded as ~# to the left of Enter on ISO layouts. -// This is done as it shares the same row AND col as the pipe key. -#define LAYOUT_all( \ - k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k52, k4A, \ - k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \ - k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \ - k10, k53, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, k54, \ - k00, k01, k02, k75, k04, k08, k09, k05 \ -) \ -{ \ - { k00, k01, k02, KC_NO, k04, k05, KC_NO, KC_NO, k08, k09, KC_NO }, \ - { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \ - { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \ - { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \ - { k50, KC_NO, k52, k53, k54, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, k61, k62, k63, k64, KC_NO, k66, k67, k68, KC_NO, k6A }, \ - { KC_NO, k71, k72, k73, k74, k75, k76, k77, k78, KC_NO, k7A }, \ -} - -#define LAYOUT_60_ansi( \ - k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k4A, \ - k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \ - k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \ - k10, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, \ - k00, k01, k02, k75, k04, k08, k09, k05 \ -) \ -{ \ - { k00, k01, k02, KC_NO, k04, k05, KC_NO, KC_NO, k08, k09, KC_NO }, \ - { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \ - { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \ - { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \ - { k50, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, k61, k62, k63, k64, KC_NO, k66, k67, k68, KC_NO, k6A }, \ - { KC_NO, k71, k72, k73, k74, k75, k76, k77, k78, KC_NO, k7A }, \ -} - -#define LAYOUT_60_hhkb( \ - k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k52, k4A, \ - k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \ - k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \ - k10, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, k54, \ - k01, k02, k75, k08, k09 \ -) \ -{ \ - { KC_NO, k01, k02, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k08, k09, KC_NO }, \ - { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \ - { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \ - { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \ - { k50, KC_NO, k52, KC_NO, k54, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, k61, k62, k63, k64, KC_NO, k66, k67, k68, KC_NO, k6A }, \ - { KC_NO, k71, k72, k73, k74, k75, k76, k77, k78, KC_NO, k7A }, \ -} - -#define LAYOUT_60_tsangan( \ - k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k52, k4A, \ - k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \ - k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \ - k10, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, k54, \ - k00, k01, k02, k75, k08, k09, k05 \ -) \ -{ \ - { k00, k01, k02, KC_NO, KC_NO, k05, KC_NO, KC_NO, k08, k09, KC_NO }, \ - { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \ - { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \ - { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \ - { k50, KC_NO, k52, KC_NO, k54, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, k61, k62, k63, k64, KC_NO, k66, k67, k68, KC_NO, k6A }, \ - { KC_NO, k71, k72, k73, k74, k75, k76, k77, k78, KC_NO, k7A }, \ -} diff --git a/keyboards/exclusive/e6v2/bmc/config.h b/keyboards/exclusive/e6v2/bmc/config.h deleted file mode 100644 index 7c6fcccdb..000000000 --- a/keyboards/exclusive/e6v2/bmc/config.h +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2019 MechMerlin - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 -#define DEVICE_VER 0x0001 -#define MANUFACTURER exclusive -#define PRODUCT e6v2 bmc -#define DESCRIPTION A custom 60% keyboard - -/* key matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 11 - -/* - * 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) - * -*/ - -// 0 1 2 3 4 5 6 7 8 9 A -#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } -#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, C2, C3, C4, C5, D7 } -#define DIODE_DIRECTION COL2ROW - -#define RGBLED_NUM 6 -#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/exclusive/e6v2/bmc/info.json b/keyboards/exclusive/e6v2/bmc/info.json deleted file mode 100644 index aa6d171ba..000000000 --- a/keyboards/exclusive/e6v2/bmc/info.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "keyboard_name": "", - "url": "", - "maintainer": "qmk", - "width": 15, - "height": 5, - "layouts": { - "LAYOUT_all": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.26}, {"x":10.0, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] - }, - - "LAYOUT_60_ansi": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] - }, - - "LAYOUT_60_hhkb": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Delete", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Os", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Os", "x":12.5, "y":4}] - }, - - "LAYOUT_60_tsangan": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.5}] - } - } -} \ No newline at end of file diff --git a/keyboards/exclusive/e6v2/bmc/keymaps/default/config.h b/keyboards/exclusive/e6v2/bmc/keymaps/default/config.h deleted file mode 100644 index 26c6d6ade..000000000 --- a/keyboards/exclusive/e6v2/bmc/keymaps/default/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2019 MechMerlin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -// place overrides here diff --git a/keyboards/exclusive/e6v2/bmc/keymaps/default/keymap.c b/keyboards/exclusive/e6v2/bmc/keymaps/default/keymap.c deleted file mode 100644 index 730041917..000000000 --- a/keyboards/exclusive/e6v2/bmc/keymaps/default/keymap.c +++ /dev/null @@ -1,74 +0,0 @@ -/* Copyright 2019 MechMerlin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H - -// Defines the keycodes used by our macros in process_record_user -enum custom_keycodes { - QMKBEST = SAFE_RANGE, - QMKURL -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = LAYOUT_60_ansi( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, MO(1) - ), - -[1] = LAYOUT_60_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, \ - BL_TOGG, BL_INC, BL_DEC, BL_STEP, RESET, EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QMKBEST: - if (record->event.pressed) { - // when keycode QMKBEST is pressed - SEND_STRING("QMK is the best thing ever!"); - } else { - // when keycode QMKBEST is released - } - break; - case QMKURL: - if (record->event.pressed) { - // when keycode QMKURL is pressed - SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); - } else { - // when keycode QMKURL is released - } - break; - } - return true; -} - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} - -void led_set_user(uint8_t usb_led) { - -} diff --git a/keyboards/exclusive/e6v2/bmc/keymaps/default/readme.md b/keyboards/exclusive/e6v2/bmc/keymaps/default/readme.md deleted file mode 100644 index 4a1b6efa6..000000000 --- a/keyboards/exclusive/e6v2/bmc/keymaps/default/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for bmc diff --git a/keyboards/exclusive/e6v2/bmc/readme.md b/keyboards/exclusive/e6v2/bmc/readme.md deleted file mode 100644 index b69ac792c..000000000 --- a/keyboards/exclusive/e6v2/bmc/readme.md +++ /dev/null @@ -1,44 +0,0 @@ -# E6-V2 Bootmapper Client (ps2avrgb) - -These docs are for the BMC version of the E6-V2 PCB which has an atmega32a microcontroller. Please do not flash this `.hex` file on your atmega32u4 equipped E6-V2. - -Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -Hardware Supported: ps2avrgb E6-V2 with atmega32a microcontroller -Hardware Availability: [geekhack.org/index.php?topic=90787.0](https://geekhack.org/index.php?topic=90787.0) - -Make example for this keyboard (after setting up your build environment): - - make exclusive/e6v2/bmc:default - -Flashing - -ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. - -**Reset Key:** Hold down the key located at `K00`, commonly programmed as left control while plugging in the keyboard. - -Windows: -1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). -2. Place your keyboard into reset. -3. Press the `Find Device` button and ensure that your keyboard is found. -4. Press the `Open .hex File` button and locate the `.hex` file you created. -5. Press the `Flash Device` button and wait for the process to complete. - -macOS: -1. Install homebrew by typing the following: - ``` - /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - ``` -2. Install `crosspack-avr`. - ``` - brew cask install crosspack-avr - ``` -3. Install the following packages: - ``` - brew install python3 - pip3 install pyusb - brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb - -4. Place your keyboard into reset. -5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. - -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). diff --git a/keyboards/exclusive/e6v2/bmc/rules.mk b/keyboards/exclusive/e6v2/bmc/rules.mk deleted file mode 100644 index 885bce245..000000000 --- a/keyboards/exclusive/e6v2/bmc/rules.mk +++ /dev/null @@ -1,90 +0,0 @@ -# MCU name -#MCU = at90usb1286 -MCU = atmega32a -PROTOCOL = VUSB - -NO_UART = yes -NO_SUSPEND_POWER_DOWN = yes - -# 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 = 12000000 - - -# -# 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 = -DDEBUG_LEVEL=0 - - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# atmega32a bootloadHID -BOOTLOADER = bootloadHID - - -# If you don't know the bootloader type, then you can specify the -# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # 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 on B7 by default -RGBLIGHT_CUSTOM_DRIVER = yes -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) - -SRC += i2c_master.c - -PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/exclusive/e6v2/bmc/usbconfig.h b/keyboards/exclusive/e6v2/bmc/usbconfig.h deleted file mode 100644 index f22f2b631..000000000 --- a/keyboards/exclusive/e6v2/bmc/usbconfig.h +++ /dev/null @@ -1,393 +0,0 @@ -/* Name: usbconfig.h - * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers - * Author: Christian Starkjohann - * Creation Date: 2005-04-01 - * Tabsize: 4 - * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH - * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) - * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ - */ - -#pragma once - -#include "config.h" - -/* -General Description: -This file is an example configuration (with inline documentation) for the USB -driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is -also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may -wire the lines to any other port, as long as D+ is also wired to INT0 (or any -other hardware interrupt, as long as it is the highest level interrupt, see -section at the end of this file). -*/ - -/* ---------------------------- Hardware Config ---------------------------- */ - -#define USB_CFG_IOPORTNAME D -/* This is the port where the USB bus is connected. When you configure it to - * "B", the registers PORTB, PINB and DDRB will be used. - */ -#define USB_CFG_DMINUS_BIT 3 -/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. - * This may be any bit in the port. - */ -#define USB_CFG_DPLUS_BIT 2 -/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. - * This may be any bit in the port. Please note that D+ must also be connected - * to interrupt pin INT0! [You can also use other interrupts, see section - * "Optional MCU Description" below, or you can connect D- to the interrupt, as - * it is required if you use the USB_COUNT_SOF feature. If you use D- for the - * interrupt, the USB interrupt will also be triggered at Start-Of-Frame - * markers every millisecond.] - */ -#define USB_CFG_CLOCK_KHZ (F_CPU/1000) -/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, - * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code - * require no crystal, they tolerate +/- 1% deviation from the nominal - * frequency. All other rates require a precision of 2000 ppm and thus a - * crystal! - * Since F_CPU should be defined to your actual clock rate anyway, you should - * not need to modify this setting. - */ -#define USB_CFG_CHECK_CRC 0 -/* Define this to 1 if you want that the driver checks integrity of incoming - * data packets (CRC checks). CRC checks cost quite a bit of code size and are - * currently only available for 18 MHz crystal clock. You must choose - * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. - */ - -/* ----------------------- Optional Hardware Config ------------------------ */ - -/* #define USB_CFG_PULLUP_IOPORTNAME D */ -/* If you connect the 1.5k pullup resistor from D- to a port pin instead of - * V+, you can connect and disconnect the device from firmware by calling - * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). - * This constant defines the port on which the pullup resistor is connected. - */ -/* #define USB_CFG_PULLUP_BIT 4 */ -/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined - * above) where the 1.5k pullup resistor is connected. See description - * above for details. - */ - -/* --------------------------- Functional Range ---------------------------- */ - -#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 -/* Define this to 1 if you want to compile a version with two endpoints: The - * default control endpoint 0 and an interrupt-in endpoint (any other endpoint - * number). - */ -#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 -/* Define this to 1 if you want to compile a version with three endpoints: The - * default control endpoint 0, an interrupt-in endpoint 3 (or the number - * configured below) and a catch-all default interrupt-in endpoint as above. - * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. - */ -#define USB_CFG_EP3_NUMBER 3 -/* If the so-called endpoint 3 is used, it can now be configured to any other - * endpoint number (except 0) with this macro. Default if undefined is 3. - */ -/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ -/* The above macro defines the startup condition for data toggling on the - * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. - * Since the token is toggled BEFORE sending any data, the first packet is - * sent with the oposite value of this configuration! - */ -#define USB_CFG_IMPLEMENT_HALT 0 -/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature - * for endpoint 1 (interrupt endpoint). Although you may not need this feature, - * it is required by the standard. We have made it a config option because it - * bloats the code considerably. - */ -#define USB_CFG_SUPPRESS_INTR_CODE 0 -/* Define this to 1 if you want to declare interrupt-in endpoints, but don't - * want to send any data over them. If this macro is defined to 1, functions - * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if - * you need the interrupt-in endpoints in order to comply to an interface - * (e.g. HID), but never want to send any data. This option saves a couple - * of bytes in flash memory and the transmit buffers in RAM. - */ -#define USB_CFG_INTR_POLL_INTERVAL 1 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ -#define USB_CFG_IS_SELF_POWERED 0 -/* Define this to 1 if the device has its own power supply. Set it to 0 if the - * device is powered from the USB bus. - */ -#define USB_CFG_MAX_BUS_POWER 500 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ -#define USB_CFG_IMPLEMENT_FN_WRITE 1 -/* Set this to 1 if you want usbFunctionWrite() to be called for control-out - * transfers. Set it to 0 if you don't need it and want to save a couple of - * bytes. - */ -#define USB_CFG_IMPLEMENT_FN_READ 0 -/* Set this to 1 if you need to send control replies which are generated - * "on the fly" when usbFunctionRead() is called. If you only want to send - * data from a static buffer, set it to 0 and return the data from - * usbFunctionSetup(). This saves a couple of bytes. - */ -#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 -/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. - * You must implement the function usbFunctionWriteOut() which receives all - * interrupt/bulk data sent to any endpoint other than 0. The endpoint number - * can be found in 'usbRxToken'. - */ -#define USB_CFG_HAVE_FLOWCONTROL 0 -/* Define this to 1 if you want flowcontrol over USB data. See the definition - * of the macros usbDisableAllRequests() and usbEnableAllRequests() in - * usbdrv.h. - */ -#define USB_CFG_DRIVER_FLASH_PAGE 0 -/* If the device has more than 64 kBytes of flash, define this to the 64 k page - * where the driver's constants (descriptors) are located. Or in other words: - * Define this to 1 for boot loaders on the ATMega128. - */ -#define USB_CFG_LONG_TRANSFERS 0 -/* Define this to 1 if you want to send/receive blocks of more than 254 bytes - * in a single control-in or control-out transfer. Note that the capability - * for long transfers increases the driver size. - */ -/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ -/* This macro is a hook if you want to do unconventional things. If it is - * defined, it's inserted at the beginning of received message processing. - * If you eat the received message and don't want default processing to - * proceed, do a return after doing your things. One possible application - * (besides debugging) is to flash a status LED on each packet. - */ -/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ -/* This macro is a hook if you need to know when an USB RESET occurs. It has - * one parameter which distinguishes between the start of RESET state and its - * end. - */ -/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ -/* This macro (if defined) is executed when a USB SET_ADDRESS request was - * received. - */ -#define USB_COUNT_SOF 1 -/* define this macro to 1 if you need the global variable "usbSofCount" which - * counts SOF packets. This feature requires that the hardware interrupt is - * connected to D- instead of D+. - */ -/* #ifdef __ASSEMBLER__ - * macro myAssemblerMacro - * in YL, TCNT0 - * sts timer0Snapshot, YL - * endm - * #endif - * #define USB_SOF_HOOK myAssemblerMacro - * This macro (if defined) is executed in the assembler module when a - * Start Of Frame condition is detected. It is recommended to define it to - * the name of an assembler macro which is defined here as well so that more - * than one assembler instruction can be used. The macro may use the register - * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages - * immediately after an SOF pulse may be lost and must be retried by the host. - * What can you do with this hook? Since the SOF signal occurs exactly every - * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in - * designs running on the internal RC oscillator. - * Please note that Start Of Frame detection works only if D- is wired to the - * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! - */ -#define USB_CFG_CHECK_DATA_TOGGLING 0 -/* define this macro to 1 if you want to filter out duplicate data packets - * sent by the host. Duplicates occur only as a consequence of communication - * errors, when the host does not receive an ACK. Please note that you need to - * implement the filtering yourself in usbFunctionWriteOut() and - * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable - * for each control- and out-endpoint to check for duplicate packets. - */ -#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 -/* define this macro to 1 if you want the function usbMeasureFrameLength() - * compiled in. This function can be used to calibrate the AVR's RC oscillator. - */ -#define USB_USE_FAST_CRC 0 -/* The assembler module has two implementations for the CRC algorithm. One is - * faster, the other is smaller. This CRC routine is only used for transmitted - * messages where timing is not critical. The faster routine needs 31 cycles - * per byte while the smaller one needs 61 to 69 cycles. The faster routine - * may be worth the 32 bytes bigger code size if you transmit lots of data and - * run the AVR close to its limit. - */ - -/* -------------------------- Device Description --------------------------- */ - -#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) -/* USB vendor ID for the device, low byte first. If you have registered your - * own Vendor ID, define it here. Otherwise you may use one of obdev's free - * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! - * *** IMPORTANT NOTE *** - * This template uses obdev's shared VID/PID pair for Vendor Class devices - * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand - * the implications! - */ -#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) -/* This is the ID of the product, low byte first. It is interpreted in the - * scope of the vendor ID. If you have registered your own VID with usb.org - * or if you have licensed a PID from somebody else, define it here. Otherwise - * you may use one of obdev's free shared VID/PID pairs. See the file - * USB-IDs-for-free.txt for details! - * *** IMPORTANT NOTE *** - * This template uses obdev's shared VID/PID pair for Vendor Class devices - * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand - * the implications! - */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x02 -/* Version number of the device: Minor number first, then major number. - */ -#define USB_CFG_VENDOR_NAME 'E', 'x', 'c', 'l', 'u', 's', 'i', 'v', 'e' -#define USB_CFG_VENDOR_NAME_LEN 9 -/* These two values define the vendor name returned by the USB device. The name - * must be given as a list of characters under single quotes. The characters - * are interpreted as Unicode (UTF-16) entities. - * If you don't want a vendor name string, undefine these macros. - * ALWAYS define a vendor name containing your Internet domain name if you use - * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for - * details. - */ -#define USB_CFG_DEVICE_NAME 'E', '6', 'V', '2' -#define USB_CFG_DEVICE_NAME_LEN 4 -/* Same as above for the device name. If you don't want a device name, undefine - * the macros. See the file USB-IDs-for-free.txt before you assign a name if - * you use a shared VID/PID. - */ -/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ -/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ -/* Same as above for the serial number. If you don't want a serial number, - * undefine the macros. - * It may be useful to provide the serial number through other means than at - * compile time. See the section about descriptor properties below for how - * to fine tune control over USB descriptors such as the string descriptor - * for the serial number. - */ -#define USB_CFG_DEVICE_CLASS 0 -#define USB_CFG_DEVICE_SUBCLASS 0 -/* See USB specification if you want to conform to an existing device class. - * Class 0xff is "vendor specific". - */ -#define USB_CFG_INTERFACE_CLASS 3 /* HID */ -#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ -#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ -/* See USB specification if you want to conform to an existing device class or - * protocol. The following classes must be set at interface level: - * HID class is 3, no subclass and protocol required (but may be useful!) - * CDC class is 2, use subclass 2 and protocol 1 for ACM - */ -#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 -/* Define this to the length of the HID report descriptor, if you implement - * an HID device. Otherwise don't define it or define it to 0. - * If you use this define, you must add a PROGMEM character array named - * "usbHidReportDescriptor" to your code which contains the report descriptor. - * Don't forget to keep the array and this define in sync! - */ - -/* #define USB_PUBLIC static */ -/* Use the define above if you #include usbdrv.c instead of linking against it. - * This technique saves a couple of bytes in flash memory. - */ - -/* ------------------- Fine Control over USB Descriptors ------------------- */ -/* If you don't want to use the driver's default USB descriptors, you can - * provide our own. These can be provided as (1) fixed length static data in - * flash memory, (2) fixed length static data in RAM or (3) dynamically at - * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more - * information about this function. - * Descriptor handling is configured through the descriptor's properties. If - * no properties are defined or if they are 0, the default descriptor is used. - * Possible properties are: - * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched - * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is - * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if - * you want RAM pointers. - * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found - * in static memory is in RAM, not in flash memory. - * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), - * the driver must know the descriptor's length. The descriptor itself is - * found at the address of a well known identifier (see below). - * List of static descriptor names (must be declared PROGMEM if in flash): - * char usbDescriptorDevice[]; - * char usbDescriptorConfiguration[]; - * char usbDescriptorHidReport[]; - * char usbDescriptorString0[]; - * int usbDescriptorStringVendor[]; - * int usbDescriptorStringDevice[]; - * int usbDescriptorStringSerialNumber[]; - * Other descriptors can't be provided statically, they must be provided - * dynamically at runtime. - * - * Descriptor properties are or-ed or added together, e.g.: - * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) - * - * The following descriptors are defined: - * USB_CFG_DESCR_PROPS_DEVICE - * USB_CFG_DESCR_PROPS_CONFIGURATION - * USB_CFG_DESCR_PROPS_STRINGS - * USB_CFG_DESCR_PROPS_STRING_0 - * USB_CFG_DESCR_PROPS_STRING_VENDOR - * USB_CFG_DESCR_PROPS_STRING_PRODUCT - * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER - * USB_CFG_DESCR_PROPS_HID - * USB_CFG_DESCR_PROPS_HID_REPORT - * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) - * - * Note about string descriptors: String descriptors are not just strings, they - * are Unicode strings prefixed with a 2 byte header. Example: - * int serialNumberDescriptor[] = { - * USB_STRING_DESCRIPTOR_HEADER(6), - * 'S', 'e', 'r', 'i', 'a', 'l' - * }; - */ - -#define USB_CFG_DESCR_PROPS_DEVICE 0 -#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC -//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 -#define USB_CFG_DESCR_PROPS_STRINGS 0 -#define USB_CFG_DESCR_PROPS_STRING_0 0 -#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 -#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 -#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 -#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC -//#define USB_CFG_DESCR_PROPS_HID 0 -#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC -//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 -#define USB_CFG_DESCR_PROPS_UNKNOWN 0 - -#define usbMsgPtr_t unsigned short -/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to - * a scalar type here because gcc generates slightly shorter code for scalar - * arithmetics than for pointer arithmetics. Remove this define for backward - * type compatibility or define it to an 8 bit type if you use data in RAM only - * and all RAM is below 256 bytes (tiny memory model in IAR CC). - */ - -/* ----------------------- Optional MCU Description ------------------------ */ - -/* The following configurations have working defaults in usbdrv.h. You - * usually don't need to set them explicitly. Only if you want to run - * the driver on a device which is not yet supported or with a compiler - * which is not fully supported (such as IAR C) or if you use a differnt - * interrupt than INT0, you may have to define some of these. - */ -/* #define USB_INTR_CFG MCUCR */ -/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ -/* #define USB_INTR_CFG_CLR 0 */ -/* #define USB_INTR_ENABLE GIMSK */ -/* #define USB_INTR_ENABLE_BIT INT0 */ -/* #define USB_INTR_PENDING GIFR */ -/* #define USB_INTR_PENDING_BIT INTF0 */ -/* #define USB_INTR_VECTOR INT0_vect */ - -/* Set INT1 for D- falling edge to count SOF */ -/* #define USB_INTR_CFG EICRA */ -#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) -/* #define USB_INTR_CFG_CLR 0 */ -/* #define USB_INTR_ENABLE EIMSK */ -#define USB_INTR_ENABLE_BIT INT1 -/* #define USB_INTR_PENDING EIFR */ -#define USB_INTR_PENDING_BIT INTF1 -#define USB_INTR_VECTOR INT1_vect diff --git a/keyboards/exclusive/e6v2/oe_bmc/config.h b/keyboards/exclusive/e6v2/oe_bmc/config.h new file mode 100644 index 000000000..fc7c91ca6 --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/config.h @@ -0,0 +1,49 @@ +/* +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER exclusive +#define PRODUCT e6v2 oe bmc +#define DESCRIPTION A custom 60% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 11 + +/* + * 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) + * +*/ + +// 0 1 2 3 4 5 6 7 8 9 A +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, C2, C3, C4, C5, D7 } +#define DIODE_DIRECTION COL2ROW + +#define RGBLED_NUM 6 +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/exclusive/e6v2/oe_bmc/info.json b/keyboards/exclusive/e6v2/oe_bmc/info.json new file mode 100644 index 000000000..aa6d171ba --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/info.json @@ -0,0 +1,24 @@ +{ + "keyboard_name": "", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.26}, {"x":10.0, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_ansi": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_hhkb": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Delete", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Os", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Os", "x":12.5, "y":4}] + }, + + "LAYOUT_60_tsangan": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/config.h b/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/config.h new file mode 100644 index 000000000..26c6d6ade --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/config.h @@ -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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/keymap.c b/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/keymap.c new file mode 100644 index 000000000..730041917 --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/keymap.c @@ -0,0 +1,74 @@ +/* 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_60_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, MO(1) + ), + +[1] = LAYOUT_60_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, \ + BL_TOGG, BL_INC, BL_DEC, BL_STEP, RESET, EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/readme.md b/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/readme.md new file mode 100644 index 000000000..4a1b6efa6 --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for bmc diff --git a/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c b/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c new file mode 100644 index 000000000..5357550ae --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c @@ -0,0 +1,96 @@ +/* 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 . + */ +#include "oe_bmc.h" +#include "rgblight.h" +#include "i2c_master.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + } + + i2c_init(); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); +} +#endif + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +void backlight_init_ports(void) { + // initialize pins D0, D1, D4 and D6 as output + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + // turn RGB LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); +} + +void backlight_set(uint8_t level) { + if (level == 0) { + // turn RGB LEDs off + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // turn RGB LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } +} diff --git a/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.h b/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.h new file mode 100644 index 000000000..44c02c860 --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.h @@ -0,0 +1,101 @@ +/* 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +// LAYOUT_all ignores the key often coded as ~# to the left of Enter on ISO layouts. +// This is done as it shares the same row AND col as the pipe key. +#define LAYOUT_all( \ + k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k52, k4A, \ + k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \ + k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \ + k10, k53, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, k54, \ + k00, k01, k02, k75, k04, k08, k09, k05 \ +) \ +{ \ + { k00, k01, k02, KC_NO, k04, k05, KC_NO, KC_NO, k08, k09, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \ + { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \ + { k50, KC_NO, k52, k53, k54, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, k61, k62, k63, k64, KC_NO, k66, k67, k68, KC_NO, k6A }, \ + { KC_NO, k71, k72, k73, k74, k75, k76, k77, k78, KC_NO, k7A }, \ +} + +#define LAYOUT_60_ansi( \ + k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k4A, \ + k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \ + k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \ + k10, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, \ + k00, k01, k02, k75, k04, k08, k09, k05 \ +) \ +{ \ + { k00, k01, k02, KC_NO, k04, k05, KC_NO, KC_NO, k08, k09, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \ + { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \ + { k50, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, k61, k62, k63, k64, KC_NO, k66, k67, k68, KC_NO, k6A }, \ + { KC_NO, k71, k72, k73, k74, k75, k76, k77, k78, KC_NO, k7A }, \ +} + +#define LAYOUT_60_hhkb( \ + k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k52, k4A, \ + k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \ + k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \ + k10, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, k54, \ + k01, k02, k75, k08, k09 \ +) \ +{ \ + { KC_NO, k01, k02, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k08, k09, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \ + { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \ + { k50, KC_NO, k52, KC_NO, k54, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, k61, k62, k63, k64, KC_NO, k66, k67, k68, KC_NO, k6A }, \ + { KC_NO, k71, k72, k73, k74, k75, k76, k77, k78, KC_NO, k7A }, \ +} + +#define LAYOUT_60_tsangan( \ + k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k52, k4A, \ + k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \ + k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \ + k10, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, k54, \ + k00, k01, k02, k75, k08, k09, k05 \ +) \ +{ \ + { k00, k01, k02, KC_NO, KC_NO, k05, KC_NO, KC_NO, k08, k09, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \ + { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \ + { k50, KC_NO, k52, KC_NO, k54, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, k61, k62, k63, k64, KC_NO, k66, k67, k68, KC_NO, k6A }, \ + { KC_NO, k71, k72, k73, k74, k75, k76, k77, k78, KC_NO, k7A }, \ +} diff --git a/keyboards/exclusive/e6v2/oe_bmc/readme.md b/keyboards/exclusive/e6v2/oe_bmc/readme.md new file mode 100644 index 000000000..a386abf6c --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/readme.md @@ -0,0 +1,44 @@ +# E6-V2 Bootmapper Client (ps2avrgb) OE + +These docs are for the BMC version of the E6-V2 PCB sold during Round 1 which has an atmega32a microcontroller. Please do not flash this `.hex` file on your atmega32u4 equipped E6-V2 or your E6V2 BMC from Round 2. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: ps2avrgb E6-V2 with atmega32a microcontroller +Hardware Availability: [geekhack.org/index.php?topic=90787.0](https://geekhack.org/index.php?topic=90787.0) + +Make example for this keyboard (after setting up your build environment): + + make exclusive/e6v2/oe_bmc:default + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +**Reset Key:** Hold down the key located at `K00`, commonly programmed as left control while plugging in the keyboard. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + +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). diff --git a/keyboards/exclusive/e6v2/oe_bmc/rules.mk b/keyboards/exclusive/e6v2/oe_bmc/rules.mk new file mode 100644 index 000000000..885bce245 --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/rules.mk @@ -0,0 +1,90 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32a +PROTOCOL = VUSB + +NO_UART = yes +NO_SUSPEND_POWER_DOWN = yes + +# 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 = 12000000 + + +# +# 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 = -DDEBUG_LEVEL=0 + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = bootloadHID + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # 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 on B7 by default +RGBLIGHT_CUSTOM_DRIVER = yes +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +SRC += i2c_master.c + +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/exclusive/e6v2/oe_bmc/usbconfig.h b/keyboards/exclusive/e6v2/oe_bmc/usbconfig.h new file mode 100644 index 000000000..f22f2b631 --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/usbconfig.h @@ -0,0 +1,393 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#pragma once + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'E', 'x', 'c', 'l', 'u', 's', 'i', 'v', 'e' +#define USB_CFG_VENDOR_NAME_LEN 9 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'E', '6', 'V', '2' +#define USB_CFG_DEVICE_NAME_LEN 4 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect diff --git a/keyboards/exclusive/e6v2/readme.md b/keyboards/exclusive/e6v2/readme.md index c09d1ccf1..515db082e 100644 --- a/keyboards/exclusive/e6v2/readme.md +++ b/keyboards/exclusive/e6v2/readme.md @@ -13,7 +13,7 @@ The E6-V2 is a 60% keyboard manufactured by Exclusive. These docs are for the QMK version of the E6-V2 PCB. [More info on qmk.fm](http://qmk.fm/) -The E6V2 has been available with either a bootmapper client or QMK powered PCB. During the second round, the QMK powered PCB was redesigned and used different ports and a different switch matrix. +The E6V2 has been available with either a Bootmapper Client or QMK-powered PCB. During the second round, the QMK-powered and BMC PCBs were redesigned, and used different ports and a different switch matrix. Please use the appropriate version when making your firmware. Flashing one in place of the other, can brick your PCB. Please be certain whether you have a OE or LE PCB. diff --git a/keyboards/nomu30/keymaps/like_jis/config.h b/keyboards/nomu30/keymaps/like_jis/config.h new file mode 100644 index 000000000..8861dc539 --- /dev/null +++ b/keyboards/nomu30/keymaps/like_jis/config.h @@ -0,0 +1,66 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +// place overrides here +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT + +#define TAPPING_LAYER_TERM 150 // Custom LT Tapping term +#define TAPPING_TERM_PER_KEY + +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 1 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 150 + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 3 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 4 + + #undef MOUSEKEY_DELAY + #define MOUSEKEY_DELAY 0 +#endif + +// Selection of RGBLIGHT MODE to use. +#if defined(LED_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 + +// LED Setting: if you have KUMO you can use RGBLIGHT_ENABLE = yes +#ifdef RGBLIGHT_ENABLE + #define RGB_DI_PIN B5 + #define RGBLIGHT_TIMER + + #define RGBLED_NUM 6 +#endif diff --git a/keyboards/nomu30/keymaps/like_jis/keymap.c b/keyboards/nomu30/keymaps/like_jis/keymap.c new file mode 100644 index 000000000..203d0a7a4 --- /dev/null +++ b/keyboards/nomu30/keymaps/like_jis/keymap.c @@ -0,0 +1,159 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.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 + +// 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 layer_number { + _BASE = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGBRST = SAFE_RANGE, + LOWER, + RAISE, + KANJI, +}; + +// enum tapdances{ +// TD_CODO = 0, +// TD_SLRO, +// }; + +// Layer Mode aliases +#define KC_MLAD MO(_ADJUST) + +// Base layer mod tap +#define KC_CMSF LSFT_T(KC_COMM) +#define KC_DTCT LCTL_T(KC_DOT) +#define KC_Z_AL LALT_T(KC_Z) +#define KC_X_GU LGUI_T(KC_X) +#define KC_ENSF LSFT_T(KC_ENT) + +// Lower layer mod tap +#define KC_BSSF LSFT_T(KC_BSLS) +#define KC_11AL LALT_T(KC_F11) + +// Layer tap +#define KC_BSLO LT(_LOWER, KC_BSPC) +#define KC_SPRA LT(_RAISE, KC_SPC) + +// Tap dance +// #define KC_CODO TD(TD_CODO) +// #define KC_SLRO TD(TD_SLRO) + +// qk_tap_dance_action_t tap_dance_actions[] = { +// [TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT), +// [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO), +// }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLO, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_CMSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_DTCT, KC_Z_AL, KC_X_GU, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SPRA + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_LOWER] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, _______, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_11AL, KC_F12, KC_ESC, KC_TAB, KANJI, KC_COMM, KC_DOT, KC_MLAD + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_RAISE] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LSFT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLSH, KC_RO, _______ + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_ADJUST] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ) +}; + +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case KC_BSLO: + return TAPPING_LAYER_TERM; + case KC_SPRA: + return TAPPING_LAYER_TERM; + default: + return TAPPING_TERM; + } +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case KANJI: + if (record->event.pressed) { + if (keymap_config.swap_lalt_lgui == false) { + register_code(KC_LANG2); + } else { + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + break; + #ifdef RGBLIGHT_ENABLE + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void keyboard_post_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} diff --git a/keyboards/nomu30/keymaps/like_jis/readme.md b/keyboards/nomu30/keymaps/like_jis/readme.md new file mode 100644 index 000000000..ad64f06b1 --- /dev/null +++ b/keyboards/nomu30/keymaps/like_jis/readme.md @@ -0,0 +1,64 @@ +# The LikeJIS is Japanese Keyboard like keymap + +A Nomu30 can use full color LED strip used by B5 pin. This keymap can use LED animation option. + +## Keymap Description + +- KC_CMSF ...... , key is one tap, Shift key is long push. +- KC_DTCT ...... . key is one tap, Ctrl key is long tap. +- KC_ENSF ...... Enter key is one tap, Ctrl key is long tap. +- KC_Z_AL ...... Z key is one tap, Alt key is long tap. +- KC_X_GU ...... X key is one tap, GUI key is long tap. +- KC_BSLO ...... Backspace key is one tap, Move to Lower layer with long push. +- KC_SPRA ...... Space key is one tap, Move to Raise layer with. +- AG_NORM ...... If you use Mac set to mode. +- AG_SWAP ...... If you use Win set to mode. +- KANJI ...... Japanese IME toggle key. + +## How to move to Ajdust Layer + +At first, Move to Lower layer with long push. After that Adjust key with long push. Now you have into Adjust layer state. + +```c + + [_BASE] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLO, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_CMSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_DTCT, KC_Z_AL, KC_X_GU, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SPRA + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_LOWER] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, _______, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_11AL, KC_F12, KC_ESC, KC_TAB, KANJI, KC_COMM, KC_DOT, KC_MLAD + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_RAISE] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LSFT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLSH, KC_RO, _______ + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_ADJUST] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ) + +``` diff --git a/keyboards/nomu30/keymaps/like_jis/rules.mk b/keyboards/nomu30/keymaps/like_jis/rules.mk new file mode 100644 index 000000000..b1a6026c2 --- /dev/null +++ b/keyboards/nomu30/keymaps/like_jis/rules.mk @@ -0,0 +1,26 @@ + +# 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 +# +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +TAP_DANCE_ENABLE = no + +# If your custom treadstone32 pcb, you can rewrite to yes. +RGBLIGHT_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +# Other selectable option +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/pearl/README.md b/keyboards/pearl/README.md deleted file mode 100644 index ec54ba80f..000000000 --- a/keyboards/pearl/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# Pearl 40% - -Pearl 40% is a keyboard designed by Koobaczech. It uses an Atmel -ATMEGA32A MCU. - -## Compiling and flashing - -These instructions are for building and flashing your Pearl 40% without -Bootmapper Client. - -### Requirements - -#### Windows - -(to be written, help needed) - -#### Mac - -Apart from regular QMK and AVR dependencies you need to install -`bootloadHID`. You can install it with `homebrew` as follows: - - $ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb - -If you don't use `homebrew` you can try following the compiling -instructions defined below in the Linux section. - -#### Linux - -For Linux you require all regular QMK dependencies, but make sure you're -using `gcc-avr` version 4.9 or higher. 4.8 and lower do not contain the -proper definitions for ATMEGA32A MCUs and QMK will fail while attempting -to compile a HEX for Pearl 40%. - -E.g. you cannot compile Pearl 40% HEX on a regular Ubuntu 14.04 as -`gcc-avr` version is maxed to 4.8 on it. - -Additionally you need an operational `bootloadHID` binary. - -You can install `bootloadHID` by taking the following steps: - - $ git clone https://github.com/robertgzr/bootloadHID ~/tmp/bootloadHIDsrc - $ cd ~/tmp/bootloadHIDsrc/commandline - $ make VENDORID=0x16c0 PRODUCTID=0x05DF # vid and pid for atmega32a - $ chmod +x bootloadHID && cp bootloadHID /usr/bin/bootloadHID - -Running `which bootloadHID` should return `/usr/bin/bootloadHID`. - -### Compiling - -Enter the QMK root directory and compile a keymap with the following -command: - - $ make pearl: - -where `` is a layout directory under the `pearl` directory. - -QMK should compile a HEX (called `pearl_.hex`) for you, which -you can flash using `bootloadHID`. - -### Flashing - -To enable Pearl 40% bootloading mode, unplug the keyboard, then plug it -in while holding `Esc` at the same time (the top-leftmost switch on the -PCB, next to the USB connector). Once the board is in bootload mode, -issue the following command (you might require `sudo` to perform the -command): - - # assuming we're still in the QMK root dir where you compiled a HEX into - $ bootloadHID -r ./pearl_.hex - -You should see something similar to - - > Page size = - > Device size = ; remaining - > Uploading bytes starting at 0 (0x0) - > ... - -where `` should be slowly increasing as the HEX is being -flashed to the board. If there is some warning about `resource busy` it -should still work OK. - -Once done the board underglow should turn red and the new firmware has -been flashed. If you can't type on the board try plugging it in again -(without holding any keys to prevent accidentally setting it into -bootload mode again). diff --git a/keyboards/pearl/config.h b/keyboards/pearl/config.h index 6edf170d9..00850b8f0 100644 --- a/keyboards/pearl/config.h +++ b/keyboards/pearl/config.h @@ -35,8 +35,8 @@ along with this program. If not, see . #define MATRIX_ROWS 4 #define MATRIX_COLS 13 -#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } -#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6} +#define MATRIX_ROW_PINS { B0, B1, B2, B3 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3} #define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pearl/i2c.c b/keyboards/pearl/i2c.c deleted file mode 100644 index a4f952135..000000000 --- a/keyboards/pearl/i2c.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/pearl/matrix.c b/keyboards/pearl/matrix.c deleted file mode 100644 index 57aa36b5f..000000000 --- a/keyboards/pearl/matrix.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 . -*/ - -#include -#include - -#include "matrix.h" - -#ifndef DEBOUNCE -#define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -uint8_t matrix_scan(void) { - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - matrix_set_row_status(row); - _delay_us(5); - - matrix_row_t cols = ( - // cols 0..7, PORTA 0 -> 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_user(); - - return 1; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/pearl/pearl.c b/keyboards/pearl/pearl.c index 3bbadb0a7..c8cd8a860 100644 --- a/keyboards/pearl/pearl.c +++ b/keyboards/pearl/pearl.c @@ -15,16 +15,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "pearl.h" #include "rgblight.h" -#include "backlight.h" - -#include - -#include "action_layer.h" -#include "i2c.h" +#include "i2c_master.h" #include "quantum.h" +#ifdef RGBLIGHT_ENABLE extern rgblight_config_t rgblight_config; void rgblight_set(void) { @@ -37,23 +32,59 @@ void rgblight_set(void) { } i2c_init(); - i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); } +#endif -void backlight_init_ports(void) { - DDRD |= (1<<4); - PORTD &= ~(1<<4); +void matrix_init_kb(void) { +#ifdef RGBLIGHT_ENABLE + if (rgblight_config.enable) { + i2c_init(); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); + } +#endif + // call user level keymaps, if any + matrix_init_user(); } -void backlight_set(uint8_t level) { - if (level > 0) { - PORTD |= (1<<4); - } else { - PORTD &= ~(1<<4); - } +void matrix_scan_kb(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_task(); +#endif + matrix_scan_user(); + /* Nothing else for now. */ } __attribute__ ((weak)) void matrix_scan_user(void) { - rgblight_task(); } + +void backlight_init_ports(void) { + // initialize pins D0, D1, D4 and D6 as output + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); +} + +void backlight_set(uint8_t level) { + if (level == 0) { + // turn backlight LEDs off + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } +} \ No newline at end of file diff --git a/keyboards/pearl/pearl.h b/keyboards/pearl/pearl.h index 6f5fbce5d..72df1595d 100644 --- a/keyboards/pearl/pearl.h +++ b/keyboards/pearl/pearl.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef PEARL_H -#define PEARL_H +#pragma once #include "quantum.h" #include "pearl.h" @@ -56,6 +55,3 @@ along with this program. If not, see . { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO}, \ { K30, K31, KC_NO, KC_NO, KC_NO, K35, KC_NO, KC_NO, KC_NO, K39, K3A, KC_NO, KC_NO}, \ } - - -#endif diff --git a/keyboards/pearl/readme.md b/keyboards/pearl/readme.md new file mode 100644 index 000000000..c39d86cf3 --- /dev/null +++ b/keyboards/pearl/readme.md @@ -0,0 +1,47 @@ +# Pearl 40% + +Pearl 40% is a keyboard designed by Koobaczech. It uses an Atmel +ATMEGA32A MCU. + +Keyboard Maintainer: [Ethan Madden](https://github.com/jetpacktuxedo) +Hardware Supported: Pearl +Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=92259.0) + +Make example for this keyboard (after setting up your build environment): + + make pearl:default + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +**Reset Key:** Hold down the key located at `K00`. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + ``` +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + +**Please Note:** You will need to use the `EEP_RST` keycode first, followed by unplugging/replugging the board to get RGB underglow effects to work. + +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). diff --git a/keyboards/pearl/rules.mk b/keyboards/pearl/rules.mk index fac85172e..4db92d121 100644 --- a/keyboards/pearl/rules.mk +++ b/keyboards/pearl/rules.mk @@ -31,7 +31,7 @@ F_CPU = 12000000 BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = no MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes @@ -43,8 +43,7 @@ RGBLIGHT_CUSTOM_DRIVER = yes OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c +SRC = i2c_master.c # programming options PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/pearl/usbconfig.h b/keyboards/pearl/usbconfig.h index d2d848fcd..54a7d20f1 100644 --- a/keyboards/pearl/usbconfig.h +++ b/keyboards/pearl/usbconfig.h @@ -8,8 +8,7 @@ * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ */ -#ifndef __usbconfig_h_included__ -#define __usbconfig_h_included__ +#pragma once #include "config.h" @@ -392,5 +391,3 @@ section at the end of this file). /* #define USB_INTR_PENDING EIFR */ #define USB_INTR_PENDING_BIT INTF1 #define USB_INTR_VECTOR INT1_vect - -#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/rgbkb/sol/rev1/config.h b/keyboards/rgbkb/sol/rev1/config.h index 056869daa..51c4bbb65 100644 --- a/keyboards/rgbkb/sol/rev1/config.h +++ b/keyboards/rgbkb/sol/rev1/config.h @@ -32,3 +32,5 @@ along with this program. If not, see . #define RGBLED_NUM 70 #endif #define DRIVER_LED_TOTAL RGBLED_NUM + +#define RGB_MATRIX_CENTER { 112, 35 } diff --git a/keyboards/rgbkb/sol/rev1/rev1.c b/keyboards/rgbkb/sol/rev1/rev1.c index 68e64af79..6ee4b610b 100644 --- a/keyboards/rgbkb/sol/rev1/rev1.c +++ b/keyboards/rgbkb/sol/rev1/rev1.c @@ -16,17 +16,17 @@ led_config_t g_led_config = { { { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 68, 68 } }, { // Left Hand Mapped Left to Right - { 0, 0 }, { 22, 0 }, { 37, 0 }, { 37, 0 }, { 67, 0 }, { 82, 0 }, { 104, 0 }, - { 0, 16 }, { 22, 16 }, { 37, 16 }, { 37, 16 }, { 67, 16 }, { 82, 16 }, { 104, 16 }, - { 0, 32 }, { 22, 32 }, { 37, 32 }, { 37, 32 }, { 67, 32 }, { 82, 32 }, { 104, 32 }, - { 0, 48 }, { 22, 48 }, { 37, 48 }, { 37, 48 }, { 67, 48 }, { 82, 48 }, { 104, 48 }, - { 0, 64 }, { 22, 64 }, { 37, 64 }, { 37, 64 }, { 67, 64 }, { 89, 45 }, { 97, 55 }, + { 0, 0 }, { 21, 0 }, { 38, 0 }, { 56, 0 }, { 73, 0 }, { 91, 0 }, { 112, 0 }, + { 0, 18 }, { 21, 18 }, { 38, 18 }, { 56, 18 }, { 73, 18 }, { 91, 18 }, { 108, 13 }, + { 0, 35 }, { 21, 35 }, { 38, 35 }, { 56, 35 }, { 73, 35 }, { 91, 35 }, { 108, 31 }, + { 0, 52 }, { 21, 52 }, { 38, 52 }, { 56, 52 }, { 73, 52 }, { 91, 52 }, { 108, 48 }, + { 0, 70 }, { 21, 70 }, { 38, 70 }, { 56, 70 }, { 73, 70 }, { 89, 91 }, { 101, 103 }, // Left Hand Mapped Right to Left - { 224, 0 }, { 202, 0 }, { 187, 0 }, { 172, 0 }, { 157, 0 }, { 142, 0 }, { 120, 0 }, - { 224, 16 }, { 202, 16 }, { 187, 16 }, { 172, 16 }, { 157, 16 }, { 142, 16 }, { 120, 16 }, - { 224, 32 }, { 202, 32 }, { 187, 32 }, { 172, 32 }, { 157, 32 }, { 142, 32 }, { 120, 32 }, - { 224, 48 }, { 202, 48 }, { 187, 48 }, { 172, 48 }, { 157, 48 }, { 142, 48 }, { 120, 48 }, - { 224, 64 }, { 202, 64 }, { 187, 64 }, { 172, 64 }, { 157, 64 }, { 135, 45 }, { 127, 55 } + { 224, 0 }, { 203, 0 }, { 186, 0 }, { 168, 0 }, { 151, 0 }, { 133, 0 }, { 112, 0 }, + { 224, 18 }, { 203, 18 }, { 186, 18 }, { 168, 18 }, { 151, 18 }, { 133, 18 }, { 116, 13 }, + { 224, 35 }, { 203, 35 }, { 186, 35 }, { 168, 35 }, { 151, 35 }, { 133, 35 }, { 116, 31 }, + { 224, 52 }, { 203, 52 }, { 186, 52 }, { 168, 52 }, { 151, 52 }, { 133, 52 }, { 116, 48 }, + { 224, 70 }, { 203, 70 }, { 186, 70 }, { 168, 70 }, { 151, 70 }, { 135, 91 }, { 123, 103 }, }, { // Left Hand Mapped Left to Right 1, 4, 4, 4, 4, 4, 1, diff --git a/keyboards/treadstone32/config.h b/keyboards/treadstone32/config.h new file mode 100644 index 000000000..6151d6e82 --- /dev/null +++ b/keyboards/treadstone32/config.h @@ -0,0 +1,103 @@ +/* +Copyright 2019 marksard + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xDFA5 +#define DEVICE_VER 0x0010 +#define MANUFACTURER marksard +#define PRODUCT treadstone32 +#define DESCRIPTION Minimal Symmetrical staggered 32-Key Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 5 + +/* + * 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 { F1, F0, E6, B2, B4, D7, D6, D4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, C7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + +#define RGBLED_NUM 6 + +#ifndef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 200 + #define RGBLIGHT_VAL_STEP 17 +#else + #define RGBLIGHT_LIMIT_VAL 50 + #define RGBLIGHT_VAL_STEP 4 +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) +// USB_MAX_POWER_CONSUMPTION value for treadstone32 keyboard +// 120 RGBoff +// 330 RGB 6 +// 300 RGB 32 + #define USB_MAX_POWER_CONSUMPTION 400 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/treadstone32/info.json b/keyboards/treadstone32/info.json new file mode 100644 index 000000000..2ac18be86 --- /dev/null +++ b/keyboards/treadstone32/info.json @@ -0,0 +1,175 @@ +{ + "keyboard_name": "Treadstone32", + "url": "https://github.com/marksard/Keyboards", + "maintainer": "marksard", + "width": 10.5, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + { + "label": "Q", + "x": 0, + "y": 0 + }, + { + "label": "W", + "x": 1, + "y": 0 + }, + { + "label": "E", + "x": 2, + "y": 0 + }, + { + "label": "R", + "x": 3, + "y": 0 + }, + { + "label": "T", + "x": 4, + "y": 0 + }, + { + "label": "Y", + "x": 5.5, + "y": 0 + }, + { + "label": "U", + "x": 6.5, + "y": 0 + }, + { + "label": "I", + "x": 7.5, + "y": 0 + }, + { + "label": "O", + "x": 8.5, + "y": 0 + }, + { + "label": "P", + "x": 9.5, + "y": 0 + }, + { + "label": "A", + "x": 0.25, + "y": 1 + }, + { + "label": "S", + "x": 1.25, + "y": 1 + }, + { + "label": "D", + "x": 2.25, + "y": 1 + }, + { + "label": "F", + "x": 3.25, + "y": 1 + }, + { + "label": "G", + "x": 4.25, + "y": 1 + }, + { + "label": "H", + "x": 5.25, + "y": 1 + }, + { + "label": "J", + "x": 6.25, + "y": 1 + }, + { + "label": "K", + "x": 7.25, + "y": 1 + }, + { + "label": "L", + "x": 8.25, + "y": 1 + }, + { + "label": "enter", + "x": 9.25, + "y": 1 + }, + { + "label": "Z", + "x": 0, + "y": 2 + }, + { + "label": "X", + "x": 1, + "y": 2 + }, + { + "label": "C", + "x": 2, + "y": 2 + }, + { + "label": "V", + "x": 3, + "y": 2 + }, + { + "label": "B", + "x": 4, + "y": 2 + }, + { + "label": "N", + "x": 5.5, + "y": 2 + }, + { + "label": "M", + "x": 6.5, + "y": 2 + }, + { + "label": ",", + "x": 7.5, + "y": 2 + }, + { + "label": ".", + "x": 8.5, + "y": 2 + }, + { + "label": "/", + "x": 9.5, + "y": 2 + }, + { + "label": "backspace", + "x": 3.25, + "y": 3, + "w": 2 + }, + { + "label": "space", + "x": 5.25, + "y": 3, + "w": 2 + } + ] + } + } +} diff --git a/keyboards/treadstone32/keymaps/default/config.h b/keyboards/treadstone32/keymaps/default/config.h new file mode 100644 index 000000000..a6363f9b9 --- /dev/null +++ b/keyboards/treadstone32/keymaps/default/config.h @@ -0,0 +1,58 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +// place overrides here +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT + +#define TAPPING_LAYER_TERM 150 // Custom LT Tapping term +#define TAPPING_TERM_PER_KEY + +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 1 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 150 + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 3 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 4 + + #undef MOUSEKEY_DELAY + #define MOUSEKEY_DELAY 0 +#endif + +// Selection of RGBLIGHT MODE to use. +#if defined(LED_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 diff --git a/keyboards/treadstone32/keymaps/default/keymap.c b/keyboards/treadstone32/keymaps/default/keymap.c new file mode 100644 index 000000000..a7b908c9d --- /dev/null +++ b/keyboards/treadstone32/keymaps/default/keymap.c @@ -0,0 +1,170 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.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 + +// 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 layer_number { + _BASE = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGBRST = SAFE_RANGE, + LOWER, + RAISE, + KANJI, +}; + +// enum tapdances{ +// TD_CODO = 0, +// TD_SLRO, +// }; + +// Layer Mode aliases +#define KC_MLAD MO(_ADJUST) + +// Base layer mod tap +#define KC_A_SF LSFT_T(KC_A) +#define KC_Z_CT LCTL_T(KC_Z) +#define KC_X_AL LALT_T(KC_X) +#define KC_C_GU LGUI_T(KC_C) +#define KC_SSCT LCTL_T(KC_SLSH) +#define KC_ENSF LSFT_T(KC_ENT) + +// Lower layer mod tap +#define KC_F6SF LSFT_T(KC_F6) +#define KC_BSSF LSFT_T(KC_BSLS) +#define KC_11CT LCTL_T(KC_F11) +#define KC_12AL LALT_T(KC_F12) + +// Layer tap +#define KC_BSLO LT(_LOWER, KC_BSPC) +#define KC_SPRA LT(_RAISE, KC_SPC) + +// Tap dance +// #define KC_CODO TD(TD_CODO) +// #define KC_SLRO TD(TD_SLRO) + +// qk_tap_dance_action_t tap_dance_actions[] = { +// [TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT), +// [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO), +// }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_A_SF, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_Z_CT, KC_X_AL, KC_C_GU, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SSCT, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + KC_BSLO, KC_SPRA + // `---------|---------' + ), + + [_LOWER] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_F6SF, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_11CT, KC_12AL, KC_ESC, KC_TAB, KANJI, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, KC_GRV, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, KC_MLAD + // `---------|---------' + ), + + [_RAISE] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LSFT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_SSCT, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, _______ + // `---------|---------' + ), + + [_ADJUST] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, _______ + // `---------|---------' + ) +}; + +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case KC_BSLO: + return TAPPING_LAYER_TERM; + case KC_SPRA: + return TAPPING_LAYER_TERM; + default: + return TAPPING_TERM; + } +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case KANJI: + if (record->event.pressed) { + if (keymap_config.swap_lalt_lgui == false) { + register_code(KC_LANG2); + } else { + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + break; + #ifdef RGBLIGHT_ENABLE + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void keyboard_post_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} diff --git a/keyboards/treadstone32/keymaps/default/readme.md b/keyboards/treadstone32/keymaps/default/readme.md new file mode 100644 index 000000000..387efc0d4 --- /dev/null +++ b/keyboards/treadstone32/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# Default keymap for treadstone32 + +## Description + +## How to use diff --git a/keyboards/treadstone32/keymaps/default/readme_jp.md b/keyboards/treadstone32/keymaps/default/readme_jp.md new file mode 100644 index 000000000..ff078dcc8 --- /dev/null +++ b/keyboards/treadstone32/keymaps/default/readme_jp.md @@ -0,0 +1,55 @@ +# US配列ライクデフォルトキーマップ + +## 概要 + + US配列ライクなデフォルトキーマップです。 + +## キーマップの見かた + +qmk_firmware\tmk_core\common\keycode.h +に基本的なキーコードがあります。また、Keymap.cの上部にカスタムしたKC_で始まるものを登録しています。 + +Leyer Tap、Mod TapというQMKの機能を使っています。 + +Layer Tapはタップで指定したキー、長押しで指定したレイヤーに移動します。 +例:LT(RAISE, KC_V) → タップでV、長押しでRAISEレイヤー移動 + +Mod Tapはタップで視程したキー、長押しで視程したレイヤーに移動します。 +例:LSFT_T(KC_Z) → タップでZ、長押しで左シフト + +もう少し詳しい内容についてはQMK Documentをお読みいただくかネットを検索すれば情報が載っていますので別途検索してみてください。 + +## 機能 + + QWERTYキーマップをベースにしていて、LowerレイヤーとRaiseレイヤーに他のキーを配置しています。 + Lowerを最初し続けながらRaiseを同時押しするとAdjustレイヤーを使うことが出来ます。 + +## OS切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- KNRM: QMKのノーマル状態です。macだと正常に使える(はず)です +- KSWP: ノーマル状態のままWindowsで使用するとALTキーとGUI(win)キーが逆ですので、それを入れ換えます。Windowsユーザーはこちらのモードにしてください + +## IME切り替え方法 + + Winの場合、LowerレイヤーにKANJIキー(半角/全角 漢字)がありますので、Lower+KANJIで切り替えてください。 + +## ソフトウェアリセットについて + + キーボードにはハードウェアのリセットボタンが付いていますが、ソフトウェアリセットをかけられます。 + LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来、AdjustレイヤーのRESETを押下するとリセットがかかります。 + +## LEDの点灯切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- RGBRST: LEDのリセット +- RGB_TOG: LEDのON/OFF切り替え +- RGB_MOD: LEDの光り方の変更 +- RGB_HUI: Hue+ 色合いを変更 +- RGB_HUD: Hue- 色合いを変更 +- RGB_SAI: Saturation+ 色の濃さを変更 +- RGB_SAD: Saturation- 色の濃さを変更 +- RGB_VAI: Value+ 明るさを変更 +- RGB_VAD: Value- 明るさを変更 diff --git a/keyboards/treadstone32/keymaps/default/rules.mk b/keyboards/treadstone32/keymaps/default/rules.mk new file mode 100644 index 000000000..8c4541fa1 --- /dev/null +++ b/keyboards/treadstone32/keymaps/default/rules.mk @@ -0,0 +1,25 @@ + +# 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 +# +TAP_DANCE_ENABLE = no + +# If your custom treadstone32 pcb, you can rewrite to yes. +RGBLIGHT_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +# Other selectable option +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/treadstone32/keymaps/like_jis/config.h b/keyboards/treadstone32/keymaps/like_jis/config.h new file mode 100644 index 000000000..a6363f9b9 --- /dev/null +++ b/keyboards/treadstone32/keymaps/like_jis/config.h @@ -0,0 +1,58 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +// place overrides here +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT + +#define TAPPING_LAYER_TERM 150 // Custom LT Tapping term +#define TAPPING_TERM_PER_KEY + +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 1 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 150 + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 3 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 4 + + #undef MOUSEKEY_DELAY + #define MOUSEKEY_DELAY 0 +#endif + +// Selection of RGBLIGHT MODE to use. +#if defined(LED_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 diff --git a/keyboards/treadstone32/keymaps/like_jis/keymap.c b/keyboards/treadstone32/keymaps/like_jis/keymap.c new file mode 100644 index 000000000..891f48446 --- /dev/null +++ b/keyboards/treadstone32/keymaps/like_jis/keymap.c @@ -0,0 +1,170 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.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 + +// 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 layer_number { + _BASE = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGBRST = SAFE_RANGE, + LOWER, + RAISE, + KANJI, +}; + +// enum tapdances{ +// TD_CODO = 0, +// TD_SLRO, +// }; + +// Layer Mode aliases +#define KC_MLAD MO(_ADJUST) + +// Base layer mod tap +#define KC_A_SF LSFT_T(KC_A) +#define KC_Z_CT LCTL_T(KC_Z) +#define KC_X_AL LALT_T(KC_X) +#define KC_C_GU LGUI_T(KC_C) +#define KC_SSCT LCTL_T(KC_SLSH) +#define KC_ENSF LSFT_T(KC_ENT) + +// Lower layer mod tap +#define KC_F6SF LSFT_T(KC_F6) +#define KC_BSSF LSFT_T(KC_BSLS) +#define KC_11CT LCTL_T(KC_F11) +#define KC_12AL LALT_T(KC_F12) + +// Layer tap +#define KC_BSLO LT(_LOWER, KC_BSPC) +#define KC_SPRA LT(_RAISE, KC_SPC) + +// Tap dance +// #define KC_CODO TD(TD_CODO) +// #define KC_SLRO TD(TD_SLRO) + +// qk_tap_dance_action_t tap_dance_actions[] = { +// [TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT), +// [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO), +// }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_A_SF, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_Z_CT, KC_X_AL, KC_C_GU, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SSCT, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + KC_BSLO, KC_SPRA + // `---------|---------' + ), + + [_LOWER] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_F6SF, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_11CT, KC_12AL, KC_ESC, KC_TAB, KANJI, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, KC_RO, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, KC_MLAD + // `---------|---------' + ), + + [_RAISE] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LSFT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_SSCT, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, _______ + // `---------|---------' + ), + + [_ADJUST] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, _______ + // `---------|---------' + ) +}; + +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case KC_BSLO: + return TAPPING_LAYER_TERM; + case KC_SPRA: + return TAPPING_LAYER_TERM; + default: + return TAPPING_TERM; + } +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case KANJI: + if (record->event.pressed) { + if (keymap_config.swap_lalt_lgui == false) { + register_code(KC_LANG2); + } else { + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + break; + #ifdef RGBLIGHT_ENABLE + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void keyboard_post_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} diff --git a/keyboards/treadstone32/keymaps/like_jis/readme.md b/keyboards/treadstone32/keymaps/like_jis/readme.md new file mode 100644 index 000000000..206133ee7 --- /dev/null +++ b/keyboards/treadstone32/keymaps/like_jis/readme.md @@ -0,0 +1,5 @@ +# The like jis type keyboard keymap for treadstone32 + +## Description + +## How to use diff --git a/keyboards/treadstone32/keymaps/like_jis/readme_jp.md b/keyboards/treadstone32/keymaps/like_jis/readme_jp.md new file mode 100644 index 000000000..3242f101e --- /dev/null +++ b/keyboards/treadstone32/keymaps/like_jis/readme_jp.md @@ -0,0 +1,55 @@ +# JISキーボードライクなキーマップ + +## 概要 + + デフォルトキーマップの記号類をJISライクな配置に揃えなおしたものです。 + +## キーマップの見かた + +qmk_firmware\tmk_core\common\keycode.h +に基本的なキーコードがあります。また、Keymap.cの上部にカスタムしたKC_で始まるものを登録しています。 + +Leyer Tap、Mod TapというQMKの機能を使っています。 + +Layer Tapはタップで指定したキー、長押しで指定したレイヤーに移動します。 +例:LT(RAISE, KC_V) → タップでV、長押しでRAISEレイヤー移動 + +Mod Tapはタップで視程したキー、長押しで視程したレイヤーに移動します。 +例:LSFT_T(KC_Z) → タップでZ、長押しで左シフト + +もう少し詳しい内容についてはQMK Documentをお読みいただくかネットを検索すれば情報が載っていますので別途検索してみてください。 + +## 機能 + + QWERTYキーマップをベースにしていて、LowerレイヤーとRaiseレイヤーに他のキーを配置しています。 + Lowerを最初し続けながらRaiseを同時押しするとAdjustレイヤーを使うことが出来ます。 + +## OS切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- KNRM: QMKのノーマル状態です。macだと正常に使える(はず)です +- KSWP: ノーマル状態のままWindowsで使用するとALTキーとGUI(win)キーが逆ですので、それを入れ換えます。Windowsユーザーはこちらのモードにしてください + +## IME切り替え方法 + + Winの場合、LowerレイヤーにKANJIキー(半角/全角 漢字)がありますので、Lower+KANJIで切り替えてください。 + +## ソフトウェアリセットについて + + キーボードにはハードウェアのリセットボタンが付いていますが、ソフトウェアリセットをかけられます。 + LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来、AdjustレイヤーのRESETを押下するとリセットがかかります。 + +## LEDの点灯切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- RGBRST: LEDのリセット +- RGB_TOG: LEDのON/OFF切り替え +- RGB_MOD: LEDの光り方の変更 +- RGB_HUI: Hue+ 色合いを変更 +- RGB_HUD: Hue- 色合いを変更 +- RGB_SAI: Saturation+ 色の濃さを変更 +- RGB_SAD: Saturation- 色の濃さを変更 +- RGB_VAI: Value+ 明るさを変更 +- RGB_VAD: Value- 明るさを変更 diff --git a/keyboards/treadstone32/keymaps/like_jis/rules.mk b/keyboards/treadstone32/keymaps/like_jis/rules.mk new file mode 100644 index 000000000..8c4541fa1 --- /dev/null +++ b/keyboards/treadstone32/keymaps/like_jis/rules.mk @@ -0,0 +1,25 @@ + +# 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 +# +TAP_DANCE_ENABLE = no + +# If your custom treadstone32 pcb, you can rewrite to yes. +RGBLIGHT_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +# Other selectable option +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/treadstone32/readme.md b/keyboards/treadstone32/readme.md new file mode 100644 index 000000000..989a29c20 --- /dev/null +++ b/keyboards/treadstone32/readme.md @@ -0,0 +1,18 @@ +# treadstone32 + +![treadstone32](https://github.com/marksard/Keyboards/raw/master/_image/20190421-P4210001.jpg) + +A 32-key Symmetric staggered keyboard. + +Keyboard Maintainer: [marksard](https://github.com/marksard) +Hardware Supported: The PCBs, controllers supported +Hardware Availability: links to where you can find this hardware + +Make example for this keyboard (after setting up your build environment): + + make treadstone32:default:dfu + +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). + +[Build guide](https://github.com/marksard/Keyboards/blob/master/treadstone32/documents/treadstone32_buildguide.md) +[Firmware](https://github.com/marksard/qmk_firmware/tree/my_customize/keyboards/treadstone32) diff --git a/keyboards/treadstone32/rules.mk b/keyboards/treadstone32/rules.mk new file mode 100644 index 000000000..1d37dfc69 --- /dev/null +++ b/keyboards/treadstone32/rules.mk @@ -0,0 +1,64 @@ +# 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 selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +LEADER_ENABLE = no + diff --git a/keyboards/treadstone32/treadstone32.c b/keyboards/treadstone32/treadstone32.c new file mode 100644 index 000000000..9d27f86ff --- /dev/null +++ b/keyboards/treadstone32/treadstone32.c @@ -0,0 +1,43 @@ +/* Copyright 2019 marksard + * + * 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 . + */ +#include "treadstone32.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/treadstone32/treadstone32.h b/keyboards/treadstone32/treadstone32.h new file mode 100644 index 000000000..90181124c --- /dev/null +++ b/keyboards/treadstone32/treadstone32.h @@ -0,0 +1,45 @@ +/* Copyright 2019 marksard. + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define K_N KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L09, L08, L07, L06, L05, L04, L03, L02, L01, L00, \ + L19, L18, L17, L16, L15, L14, L13, L12, L11, L10, \ + L29, L28, L27, L26, L25, L24, L23, L22, L21, L20, \ + L35, L34 \ + ) \ + { \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { K_N, K_N, K_N, K_N, L34 }, \ + { L05, L06, L07, L08, L09 }, \ + { L15, L16, L17, L18, L19 }, \ + { L25, L26, L27, L28, L29 }, \ + { L35, K_N, K_N, K_N, K_N } \ + } diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index cd5413da7..faaa0d0ee 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -7,12 +7,16 @@ extern keymap_config_t keymap_config; // 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 _FN 1 -#define _UNICODE 2 -#define _ADJUST 3 +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _UNICODE, + _ADJUST, +}; -#define FN MO(_FN) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) #define UNICODE MO(_UNICODE) enum unicode_names { @@ -112,8 +116,7 @@ const uint32_t PROGMEM unicode_map[] = { #define U_UNIC XP(UACUTE, UACUTE_M) #define Y_UNIC XP(UDIER, UDIER_M ) #define N_UNIC XP(NTILDE, NTILDE_M) - -#define TAB_UNI LT(_UNICODE, KC_TAB) +#define ORD_UN XP(ORDF, ORDM) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -121,36 +124,54 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * | esc | Q | W | E | R | T | Y | U | I | O | P | bksp | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * |tab/unic| A | S | D | F | G | H | J | K | L | ; | ' | + * | tab | A | S | D | F | G | H | J | K | L | ; | del | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | lshift | Z | X | C | V | B | N | M | , | . | / | enter | + * | lshift | Z | X | C | V | B | N | M | , | . | up | enter | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | lctrl | lalt | caps | del | lgui | space | space | fn | left | down | up | right | + * | lctrl | lalt | lower | unic | lgui | space | space | raise | / | left | down | right | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ */ [_QWERTY] = LAYOUT_ortho_4x12 ( KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - TAB_UNI, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - KC_LCTL, KC_LALT, KC_CAPS, KC_DEL, KC_LGUI, KC_SPC, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_DEL, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, + KC_LCTL, KC_LALT, LOWER, UNICODE, KC_LGUI, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT +), + +/* Lower + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F1 | F2 | F3 | F4 | | | 7 | 8 | 9 | - | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F5 | F6 | F7 | F8 | | | 4 | 5 | 6 | + | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F9 | F10 | F11 | F12 | | nlck | 1 | 2 | 3 | / | pent | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | | | | | | | | 0 | . | * | ; | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + */ +[_LOWER] = LAYOUT_ortho_4x12 ( + _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, + _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, + _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_NLCK, KC_P1, KC_P2, KC_P3, KC_PSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PAST, KC_SCLN ), -/* fn +/* Raise * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * | caps | | | | | | \ | - | = | [ | ] | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | F7 | F8 | F9 | F10 | F11 | F12 | ` | | | | | + * | | | | | | | ` | | | | pgup | | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ - * | | | | | | | | | home | pgdn | pgun | end | + * | | | | | | | | | | home | pgdn | end | * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ */ -[_FN] = LAYOUT_ortho_4x12 ( +[_RAISE] = LAYOUT_ortho_4x12 ( _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_GRV, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END + KC_CAPS, _______, _______, _______, _______, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, _______, _______, _______, _______, KC_GRV, KC_QUOT, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END ), /* @@ -158,9 +179,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_UNICODE] = LAYOUT_ortho_4x12 ( _______, X(EXCL), X(WORR), E_UNIC, X(EURO), X(TONG), Y_UNIC, U_UNIC, I_UNIC, O_UNIC, X(POUN), _______, - _______, A_UNIC, X(SMIL), X(DISS), X(SCRE), X(DEGR), X(SMIH), X(NOT), X(QUAR), X(HALF), X(ORDF), X(ORDM), - _______, X(DIZY), X(ANGR), X(COPY), X(QUAD), X(CUBE), N_UNIC, X(NEUT), X(LDQU), X(RDQU), X(QUES), _______, - _______, _______, _______, _______, _______, _______, _______, _______, X(ARRL), X(ARRD), X(ARRU), X(ARRR) + _______, A_UNIC, X(SMIL), X(DISS), X(SCRE), X(DEGR), X(SMIH), X(NOT), X(QUAR), X(HALF), ORD_UN, _______, + _______, X(DIZY), X(ANGR), X(COPY), X(QUAD), X(CUBE), N_UNIC, X(NEUT), X(LDQU), X(RDQU), X(ARRU), _______, + _______, _______, _______, _______, _______, _______, _______, _______, X(QUES), X(ARRL), X(ARRD), X(ARRR) ), /* @@ -175,7 +196,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; uint32_t layer_state_set_user(uint32_t state) { - return update_tri_layer_state(state, _FN, _UNICODE, _ADJUST); + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } void matrix_init_user(void) { diff --git a/lib/lib8tion/trig8.h b/lib/lib8tion/trig8.h index 6ef3ce625..cfba6373f 100644 --- a/lib/lib8tion/trig8.h +++ b/lib/lib8tion/trig8.h @@ -255,5 +255,30 @@ LIB8STATIC uint8_t cos8( uint8_t theta) return sin8( theta + 64); } +/// Fast 16-bit approximation of atan2(x). +/// @returns atan2, value between 0 and 255 +LIB8STATIC uint8_t atan2_8(int16_t dy, int16_t dx) +{ + if (dy == 0) + { + if (dx >= 0) + return 0; + else + return 128; + } + + int16_t abs_y = dy > 0 ? dy : -dy; + int8_t a; + + if (dx >= 0) + a = 32 - (32 * (dx - abs_y) / (dx + abs_y)); + else + a = 96 - (32 * (dx + abs_y) / (abs_y - dx)); + + if (dy < 0) + return -a; // negate if in quad III or IV + return a; +} + ///@} #endif diff --git a/quantum/color.c b/quantum/color.c index 466e6edac..a309da379 100644 --- a/quantum/color.c +++ b/quantum/color.c @@ -27,9 +27,13 @@ RGB hsv_to_rgb( HSV hsv ) if ( hsv.s == 0 ) { +#ifdef USE_CIE1931_CURVE + rgb.r = rgb.g = rgb.b = pgm_read_byte( &CIE1931_CURVE[hsv.v] ); +#else rgb.r = hsv.v; rgb.g = hsv.v; rgb.b = hsv.v; +#endif return rgb; } diff --git a/quantum/quantum.c b/quantum/quantum.c index 473ead65f..23263b700 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -312,8 +312,12 @@ bool process_record_quantum(keyrecord_t *record) { return false; case DEBUG: if (record->event.pressed) { - debug_enable = true; + debug_enable ^= 1; + if (debug_enable) { print("DEBUG: enabled.\n"); + } else { + print("DEBUG: disabled.\n"); + } } return false; case EEPROM_RESET: diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index 9b9932df5..a6a9549af 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -26,6 +26,12 @@ #include "lib/lib8tion/lib8tion.h" +#ifndef RGB_MATRIX_CENTER + const point_t k_rgb_matrix_center = { 112, 32 }; +#else + const point_t k_rgb_matrix_center = RGB_MATRIX_CENTER; +#endif + // ------------------------------------------ // -----Begin rgb effect includes macros----- #define RGB_MATRIX_EFFECT(name) diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h b/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h new file mode 100644 index 000000000..3e6df1fbe --- /dev/null +++ b/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h @@ -0,0 +1,22 @@ +#ifndef DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +RGB_MATRIX_EFFECT(BAND_PINWHEEL_SAT) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool BAND_PINWHEEL_SAT(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, 0, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t dx = g_led_config.point[i].x - 112; + int16_t dy = g_led_config.point[i].y - 32; + hsv.s = rgb_matrix_config.sat - time - atan2_8(dy, dx) * 3; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h b/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h new file mode 100644 index 000000000..88cc7d1f2 --- /dev/null +++ b/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h @@ -0,0 +1,22 @@ +#ifndef DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +RGB_MATRIX_EFFECT(BAND_PINWHEEL_VAL) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool BAND_PINWHEEL_VAL(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t dx = g_led_config.point[i].x - 112; + int16_t dy = g_led_config.point[i].y - 32; + hsv.v = rgb_matrix_config.val - time - atan2_8(dy, dx) * 3; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL diff --git a/quantum/rgb_matrix_animations/colorband_sat_anim.h b/quantum/rgb_matrix_animations/colorband_sat_anim.h new file mode 100644 index 000000000..89773b6ce --- /dev/null +++ b/quantum/rgb_matrix_animations/colorband_sat_anim.h @@ -0,0 +1,21 @@ +#ifndef DISABLE_RGB_MATRIX_BAND_SAT +RGB_MATRIX_EFFECT(BAND_SAT) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool BAND_SAT(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, 0, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t s = rgb_matrix_config.sat - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8; + hsv.s = s < 0 ? 0 : s; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_SAT diff --git a/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h b/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h new file mode 100644 index 000000000..44955900a --- /dev/null +++ b/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h @@ -0,0 +1,23 @@ +#ifndef DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +RGB_MATRIX_EFFECT(BAND_SPIRAL_SAT) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool BAND_SPIRAL_SAT(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, 0, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t dx = g_led_config.point[i].x - 112; + int16_t dy = g_led_config.point[i].y - 32; + uint8_t dist = sqrt16(dx * dx + dy * dy); + hsv.s = rgb_matrix_config.sat + dist - time - atan2_8(dy, dx); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT diff --git a/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h b/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h new file mode 100644 index 000000000..5aea0c8da --- /dev/null +++ b/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h @@ -0,0 +1,23 @@ +#ifndef DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL +RGB_MATRIX_EFFECT(BAND_SPIRAL_VAL) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool BAND_SPIRAL_VAL(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t dx = g_led_config.point[i].x - 112; + int16_t dy = g_led_config.point[i].y - 32; + uint8_t dist = sqrt16(dx * dx + dy * dy); + hsv.v = rgb_matrix_config.val + dist - time - atan2_8(dy, dx); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL diff --git a/quantum/rgb_matrix_animations/colorband_val_anim.h b/quantum/rgb_matrix_animations/colorband_val_anim.h new file mode 100644 index 000000000..bf41cec91 --- /dev/null +++ b/quantum/rgb_matrix_animations/colorband_val_anim.h @@ -0,0 +1,21 @@ +#ifndef DISABLE_RGB_MATRIX_BAND_VAL +RGB_MATRIX_EFFECT(BAND_VAL) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool BAND_VAL(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t v = rgb_matrix_config.val - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8; + hsv.v = v < 0 ? 0 : v; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_VAL diff --git a/quantum/rgb_matrix_animations/cycle_out_in_anim.h b/quantum/rgb_matrix_animations/cycle_out_in_anim.h index dc9d09fd3..29209e4d7 100644 --- a/quantum/rgb_matrix_animations/cycle_out_in_anim.h +++ b/quantum/rgb_matrix_animations/cycle_out_in_anim.h @@ -9,8 +9,8 @@ bool CYCLE_OUT_IN(effect_params_t* params) { uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); - int16_t dx = g_led_config.point[i].x - 112; - int16_t dy = g_led_config.point[i].y - 32; + int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x; + int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y; uint8_t dist = sqrt16(dx * dx + dy * dy); hsv.h = 3 * dist / 2 + time; RGB rgb = hsv_to_rgb(hsv); diff --git a/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h b/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h index 941e6b9a8..b2f79ceea 100644 --- a/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h +++ b/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h @@ -9,8 +9,8 @@ bool CYCLE_OUT_IN_DUAL(effect_params_t* params) { uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); - int16_t dx = 56 - abs8(g_led_config.point[i].x - 112); - int16_t dy = g_led_config.point[i].y - 32; + int16_t dx = (k_rgb_matrix_center.x / 2) - abs8(g_led_config.point[i].x - k_rgb_matrix_center.x); + int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y; uint8_t dist = sqrt16(dx * dx + dy * dy); hsv.h = 3 * dist + time; RGB rgb = hsv_to_rgb(hsv); diff --git a/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h b/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h new file mode 100644 index 000000000..59d60ac07 --- /dev/null +++ b/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h @@ -0,0 +1,22 @@ +#ifndef DISABLE_RGB_MATRIX_CYCLE_PINWHEEL +RGB_MATRIX_EFFECT(CYCLE_PINWHEEL) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool CYCLE_PINWHEEL(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t dx = g_led_config.point[i].x - 112; + int16_t dy = g_led_config.point[i].y - 32; + hsv.h = atan2_8(dy, dx) + time; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_CYCLE_PINWHEEL diff --git a/quantum/rgb_matrix_animations/cycle_spiral_anim.h b/quantum/rgb_matrix_animations/cycle_spiral_anim.h new file mode 100644 index 000000000..865309c25 --- /dev/null +++ b/quantum/rgb_matrix_animations/cycle_spiral_anim.h @@ -0,0 +1,23 @@ +#ifndef DISABLE_RGB_MATRIX_CYCLE_SPIRAL +RGB_MATRIX_EFFECT(CYCLE_SPIRAL) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool CYCLE_SPIRAL(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t dx = g_led_config.point[i].x - 112; + int16_t dy = g_led_config.point[i].y - 32; + uint8_t dist = sqrt16(dx * dx + dy * dy); + hsv.h = dist - time - atan2_8(dy, dx); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_CYCLE_SPIRAL diff --git a/quantum/rgb_matrix_animations/dual_beacon_anim.h b/quantum/rgb_matrix_animations/dual_beacon_anim.h index f853f71ec..59c91046d 100644 --- a/quantum/rgb_matrix_animations/dual_beacon_anim.h +++ b/quantum/rgb_matrix_animations/dual_beacon_anim.h @@ -11,7 +11,7 @@ bool DUAL_BEACON(effect_params_t* params) { int8_t sin_value = sin8(time) - 128; for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); - hsv.h = ((g_led_config.point[i].y - 32) * cos_value + (g_led_config.point[i].x - 112) * sin_value) / 128 + rgb_matrix_config.hue; + hsv.h = ((g_led_config.point[i].y - k_rgb_matrix_center.y) * cos_value + (g_led_config.point[i].x - k_rgb_matrix_center.x) * sin_value) / 128 + rgb_matrix_config.hue; RGB rgb = hsv_to_rgb(hsv); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } diff --git a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h index a0e0f814c..564e3c480 100644 --- a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h +++ b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h @@ -11,7 +11,7 @@ bool RAINBOW_BEACON(effect_params_t* params) { int16_t sin_value = 2 * (sin8(time) - 128); for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); - hsv.h = ((g_led_config.point[i].y - 32) * cos_value + (g_led_config.point[i].x - 112) * sin_value) / 128 + rgb_matrix_config.hue; + hsv.h = ((g_led_config.point[i].y - k_rgb_matrix_center.y) * cos_value + (g_led_config.point[i].x - k_rgb_matrix_center.x) * sin_value) / 128 + rgb_matrix_config.hue; RGB rgb = hsv_to_rgb(hsv); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } diff --git a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h index 275aaa48d..7d189b927 100644 --- a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h +++ b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h @@ -11,7 +11,7 @@ bool PINWHEELS(effect_params_t* params) { int16_t sin_value = 3 * (sin8(time) - 128); for (uint8_t i = led_min; i < led_max; i++) { RGB_MATRIX_TEST_LED_FLAGS(); - hsv.h = ((g_led_config.point[i].y - 32) * cos_value + (56 - abs8(g_led_config.point[i].x - 112)) * sin_value) / 128 + rgb_matrix_config.hue; + hsv.h = ((g_led_config.point[i].y - k_rgb_matrix_center.y) * cos_value + (56 - abs8(g_led_config.point[i].x - k_rgb_matrix_center.x)) * sin_value) / 128 + rgb_matrix_config.hue; RGB rgb = hsv_to_rgb(hsv); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } diff --git a/quantum/rgb_matrix_animations/rgb_matrix_effects.inc b/quantum/rgb_matrix_animations/rgb_matrix_effects.inc index f05a415a5..01332ed0d 100644 --- a/quantum/rgb_matrix_animations/rgb_matrix_effects.inc +++ b/quantum/rgb_matrix_animations/rgb_matrix_effects.inc @@ -3,12 +3,20 @@ #include "rgb_matrix_animations/alpha_mods_anim.h" #include "rgb_matrix_animations/gradient_up_down_anim.h" #include "rgb_matrix_animations/breathing_anim.h" +#include "rgb_matrix_animations/colorband_sat_anim.h" +#include "rgb_matrix_animations/colorband_val_anim.h" +#include "rgb_matrix_animations/colorband_pinwheel_sat_anim.h" +#include "rgb_matrix_animations/colorband_pinwheel_val_anim.h" +#include "rgb_matrix_animations/colorband_spiral_sat_anim.h" +#include "rgb_matrix_animations/colorband_spiral_val_anim.h" #include "rgb_matrix_animations/cycle_all_anim.h" #include "rgb_matrix_animations/cycle_left_right_anim.h" #include "rgb_matrix_animations/cycle_up_down_anim.h" #include "rgb_matrix_animations/rainbow_moving_chevron_anim.h" #include "rgb_matrix_animations/cycle_out_in_anim.h" #include "rgb_matrix_animations/cycle_out_in_dual_anim.h" +#include "rgb_matrix_animations/cycle_pinwheel_anim.h" +#include "rgb_matrix_animations/cycle_spiral_anim.h" #include "rgb_matrix_animations/dual_beacon_anim.h" #include "rgb_matrix_animations/rainbow_beacon_anim.h" #include "rgb_matrix_animations/rainbow_pinwheels_anim.h" diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index be28107b6..dfcbc110a 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -303,7 +303,7 @@ uint8_t layer_switch_get_layer(keypos_t key) { layer_state_t layers = layer_state | default_layer_state; /* check top layer first */ - for (int8_t i = sizeof(layer_state_t)-1; i >= 0; i--) { + for (int8_t i = sizeof(layer_state_t) * 8 - 1; i >= 0; i--) { if (layers & (1UL << i)) { action = action_for_key(i, key); if (action.code != ACTION_TRANSPARENT) { diff --git a/users/xulkal/config.h b/users/xulkal/config.h index ecd01f794..c794530d4 100644 --- a/users/xulkal/config.h +++ b/users/xulkal/config.h @@ -5,6 +5,7 @@ #undef TAPPING_TERM #define TAPPING_TERM 175 +#define SPACE_CADET_MODIFIER_CARRYOVER #define LSPO_KEYS KC_LSFT, KC_TRNS, KC_LBRC #define RSPC_KEYS KC_RSFT, KC_TRNS, KC_RBRC #define LCPO_KEYS KC_LCTL, KC_TRNS, KC_MINS @@ -27,12 +28,3 @@ #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS #define DISABLE_RGB_MATRIX_SPLASH #define DISABLE_RGB_MATRIX_SOLID_SPLASH - -// Don't like or feel to identical to other effects -#if defined(__AVR__) -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#endif diff --git a/users/xulkal/process_records.c b/users/xulkal/process_records.c index 7c2b5e133..5ba59965f 100644 --- a/users/xulkal/process_records.c +++ b/users/xulkal/process_records.c @@ -15,47 +15,15 @@ qk_tap_dance_action_t tap_dance_actions[] = { extern void eeconfig_update_rgb_matrix_default(void); #endif +#ifdef TRILAYER_ENABLED +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} +#endif + bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint16_t reset_timer; switch (keycode) { - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - case GAME: -#ifndef GAMELAYER_DISABLE - if (record->event.pressed) { - set_single_persistent_default_layer(_GAME); - } -#endif - return false; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); -#ifdef TRILAYER_ENABLED - update_tri_layer(_LOWER, _RAISE, _ADJUST); -#endif - } else { - layer_off(_LOWER); -#ifdef TRILAYER_ENABLED - update_tri_layer(_LOWER, _RAISE, _ADJUST); -#endif - } - return false; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); -#ifdef TRILAYER_ENABLED - update_tri_layer(_LOWER, _RAISE, _ADJUST); -#endif - } else { - layer_off(_RAISE); -#ifdef TRILAYER_ENABLED - update_tri_layer(_LOWER, _RAISE, _ADJUST); -#endif - } - return false; case RGBRST: #if defined(RGBLIGHT_ENABLE) if (record->event.pressed) { @@ -79,20 +47,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; } - return process_record_keymap(keycode, record) && -#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - process_record_rgb(keycode, record) && -#endif // RGBLIGHT_ENABLE; - true; + return process_record_keymap(keycode, record); } __attribute__ ((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } - - -__attribute__ ((weak)) -bool process_record_rgb(uint16_t keycode, keyrecord_t *record) { - return true; -} diff --git a/users/xulkal/process_records.h b/users/xulkal/process_records.h index d79ab7e32..8a195df5c 100644 --- a/users/xulkal/process_records.h +++ b/users/xulkal/process_records.h @@ -4,6 +4,17 @@ #define RIS_ESC LT(_RAISE, KC_ESC) #define RIS_CAPS LT(_RAISE, KC_CAPS) +#define QWERTY DF(_QWERTY) + +#ifndef GAMELAYER_DISABLE +#define GAME DF(_GAME) +#else +#define GAME KC_TRANSPARENT +#endif + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + #ifdef TAP_DANCE_ENABLE #include "process_tap_dance.h" @@ -42,12 +53,7 @@ enum layer_number { }; enum custom_keycodes { - QWERTY = SAFE_RANGE, - GAME, - LOWER, - RAISE, - RGBRST + RGBRST = SAFE_RANGE }; bool process_record_keymap(uint16_t keycode, keyrecord_t *record); -bool process_record_rgb(uint16_t keycode, keyrecord_t *record);