diff options
| author | Charles <charles.fourneau@gmail.com> | 2021-08-26 01:56:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-26 00:56:09 +0100 |
| commit | ee3a1133f1283fab132f4d601e19a61da2041631 (patch) | |
| tree | ce6bba6f2a5a137fd23c103f5f26dd62a05bab50 /keyboards/plut0nium | |
| parent | 4c5334cb9e0fef692ed3bd7a3e02579271f0f338 (diff) | |
| download | qmk_firmware-ee3a1133f1283fab132f4d601e19a61da2041631.tar.gz qmk_firmware-ee3a1133f1283fab132f4d601e19a61da2041631.zip | |
[keyboard] Add 0x3E (#14088)
* Add 0x3E - default config
* Apply suggestions from code review
Co-authored-by: Drashna Jaelre <drashna@live.com>
* Apply suggestions from code review 2
Firmware size optimization
Co-authored-by: Drashna Jaelre <drashna@live.com>
* Rename files as per project guidelines + remove empty
* Update link in readme.md
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'keyboards/plut0nium')
| -rw-r--r-- | keyboards/plut0nium/0x3e/0x3e.c | 18 | ||||
| -rw-r--r-- | keyboards/plut0nium/0x3e/0x3e.h | 36 | ||||
| -rw-r--r-- | keyboards/plut0nium/0x3e/config.h | 114 | ||||
| -rw-r--r-- | keyboards/plut0nium/0x3e/info.json | 75 | ||||
| -rw-r--r-- | keyboards/plut0nium/0x3e/keymaps/default/keymap.c | 157 | ||||
| -rw-r--r-- | keyboards/plut0nium/0x3e/keymaps/default/readme.md | 1 | ||||
| -rw-r--r-- | keyboards/plut0nium/0x3e/readme.md | 18 | ||||
| -rw-r--r-- | keyboards/plut0nium/0x3e/rules.mk | 19 | ||||
| -rw-r--r-- | keyboards/plut0nium/readme.md | 4 |
9 files changed, 442 insertions, 0 deletions
diff --git a/keyboards/plut0nium/0x3e/0x3e.c b/keyboards/plut0nium/0x3e/0x3e.c new file mode 100644 index 000000000..2f3683d8b --- /dev/null +++ b/keyboards/plut0nium/0x3e/0x3e.c | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | /* Copyright 2020 plut0nium | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include "0x3e.h" | ||
| 18 | |||
diff --git a/keyboards/plut0nium/0x3e/0x3e.h b/keyboards/plut0nium/0x3e/0x3e.h new file mode 100644 index 000000000..e44530b2f --- /dev/null +++ b/keyboards/plut0nium/0x3e/0x3e.h | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* Copyright 2020 plut0nium | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | #include "quantum.h" | ||
| 20 | |||
| 21 | #define LAYOUT( \ | ||
| 22 | k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b, k4c, \ | ||
| 23 | k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b, k3c, \ | ||
| 24 | k20, k21, k22, k23, k24, k25, k27, k28, k29, k2a, k2b, k2c, \ | ||
| 25 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ | ||
| 26 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c \ | ||
| 27 | ) \ | ||
| 28 | { \ | ||
| 29 | { k40, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4a, k4b, k4c }, \ | ||
| 30 | { k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b, k3c }, \ | ||
| 31 | { k20, k21, k22, k23, k24, k25, KC_NO, k27, k28, k29, k2a, k2b, k2c }, \ | ||
| 32 | { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \ | ||
| 33 | { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ | ||
| 34 | } | ||
| 35 | |||
| 36 | |||
diff --git a/keyboards/plut0nium/0x3e/config.h b/keyboards/plut0nium/0x3e/config.h new file mode 100644 index 000000000..f61d22228 --- /dev/null +++ b/keyboards/plut0nium/0x3e/config.h | |||
| @@ -0,0 +1,114 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2020 plut0nium | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #pragma once | ||
| 19 | |||
| 20 | #include "config_common.h" | ||
| 21 | |||
| 22 | /* USB Device descriptor parameter */ | ||
| 23 | #define VENDOR_ID 0xFEED | ||
| 24 | #define PRODUCT_ID 0x3E01 | ||
| 25 | #define DEVICE_VER 0x0001 | ||
| 26 | #define MANUFACTURER plut0nium | ||
| 27 | #define PRODUCT 0x3E | ||
| 28 | |||
| 29 | /* key matrix size */ | ||
| 30 | #define MATRIX_ROWS 5 | ||
| 31 | #define MATRIX_COLS 13 | ||
| 32 | |||
| 33 | /* | ||
| 34 | * Keyboard Matrix Assignments | ||
| 35 | */ | ||
| 36 | #define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 } | ||
| 37 | #define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0, D5, D4, D6, D7, B4, B5, B6 } | ||
| 38 | #define UNUSED_PINS | ||
| 39 | |||
| 40 | /* COL2ROW, ROW2COL*/ | ||
| 41 | #define DIODE_DIRECTION COL2ROW | ||
| 42 | |||
| 43 | /* | ||
| 44 | * Backlight | ||
| 45 | */ | ||
| 46 | #define BACKLIGHT_PIN C6 | ||
| 47 | #define BACKLIGHT_BREATHING | ||
| 48 | #define BACKLIGHT_LEVELS 6 | ||
| 49 | |||
| 50 | /* | ||
| 51 | * RGB Underglow | ||
| 52 | */ | ||
| 53 | #define RGB_DI_PIN C7 | ||
| 54 | #ifdef RGB_DI_PIN | ||
| 55 | #define RGBLED_NUM 6 | ||
| 56 | #define RGBLIGHT_HUE_STEP 12 | ||
| 57 | #define RGBLIGHT_SAT_STEP 8 | ||
| 58 | #define RGBLIGHT_VAL_STEP 8 | ||
| 59 | #define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level */ | ||
| 60 | #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
| 61 | #define RGBLIGHT_EFFECT_BREATHING | ||
| 62 | #define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
| 63 | // #define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
| 64 | // #define RGBLIGHT_EFFECT_SNAKE | ||
| 65 | // #define RGBLIGHT_EFFECT_KNIGHT | ||
| 66 | // #define RGBLIGHT_EFFECT_CHRISTMAS | ||
| 67 | #define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
| 68 | // #define RGBLIGHT_EFFECT_RGB_TEST | ||
| 69 | // #define RGBLIGHT_EFFECT_ALTERNATING | ||
| 70 | /*== customize breathing effect ==*/ | ||
| 71 | /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ | ||
| 72 | // #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 | ||
| 73 | /*==== use exp() and sin() ====*/ | ||
| 74 | // #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 | ||
| 75 | // #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 | ||
| 76 | #endif | ||
| 77 | |||
| 78 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 79 | #define DEBOUNCE 5 | ||
| 80 | |||
| 81 | |||
| 82 | /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | ||
| 83 | * This is userful for the Windows task manager shortcut (ctrl+shift+esc). | ||
| 84 | */ | ||
| 85 | // #define GRAVE_ESC_CTRL_OVERRIDE | ||
| 86 | |||
| 87 | /* | ||
| 88 | * Force NKRO | ||
| 89 | */ | ||
| 90 | //#define FORCE_NKRO | ||
| 91 | |||
| 92 | /* | ||
| 93 | * Feature disable options | ||
| 94 | * These options are also useful to firmware size reduction. | ||
| 95 | */ | ||
| 96 | |||
| 97 | /* disable debug print */ | ||
| 98 | //#define NO_DEBUG | ||
| 99 | |||
| 100 | /* disable print */ | ||
| 101 | //#define NO_PRINT | ||
| 102 | |||
| 103 | /* disable action features */ | ||
| 104 | //#define NO_ACTION_LAYER | ||
| 105 | //#define NO_ACTION_TAPPING | ||
| 106 | //#define NO_ACTION_ONESHOT | ||
| 107 | |||
| 108 | /* disable these deprecated features by default */ | ||
| 109 | #define NO_ACTION_MACRO | ||
| 110 | #define NO_ACTION_FUNCTION | ||
| 111 | |||
| 112 | /* Bootmagic Lite key configuration */ | ||
| 113 | // #define BOOTMAGIC_LITE_ROW 0 | ||
| 114 | // #define BOOTMAGIC_LITE_COLUMN 0 | ||
diff --git a/keyboards/plut0nium/0x3e/info.json b/keyboards/plut0nium/0x3e/info.json new file mode 100644 index 000000000..c3eeb2fd6 --- /dev/null +++ b/keyboards/plut0nium/0x3e/info.json | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "0x3E", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "plut0nium", | ||
| 5 | "width": 14, | ||
| 6 | "height": 5, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "layout": [ | ||
| 10 | {"label":"Esc", "x":0, "y":0, "w":1.5}, | ||
| 11 | {"label":"1", "x":1.5, "y":0}, | ||
| 12 | {"label":"2", "x":2.5, "y":0}, | ||
| 13 | {"label":"3", "x":3.5, "y":0}, | ||
| 14 | {"label":"4", "x":4.5, "y":0}, | ||
| 15 | {"label":"5", "x":5.5, "y":0}, | ||
| 16 | {"label":"6", "x":7.5, "y":0}, | ||
| 17 | {"label":"7", "x":8.5, "y":0}, | ||
| 18 | {"label":"8", "x":9.5, "y":0}, | ||
| 19 | {"label":"9", "x":10.5, "y":0}, | ||
| 20 | {"label":"0", "x":11.5, "y":0}, | ||
| 21 | {"label":"Back Space", "x":12.5, "y":0, "w":1.5}, | ||
| 22 | {"label":"Tab", "x":0, "y":1, "w":1.5}, | ||
| 23 | {"label":"Q", "x":1.5, "y":1}, | ||
| 24 | {"label":"W", "x":2.5, "y":1}, | ||
| 25 | {"label":"E", "x":3.5, "y":1}, | ||
| 26 | {"label":"R", "x":4.5, "y":1}, | ||
| 27 | {"label":"T", "x":5.5, "y":1}, | ||
| 28 | {"label":"Y", "x":7.5, "y":1}, | ||
| 29 | {"label":"U", "x":8.5, "y":1}, | ||
| 30 | {"label":"I", "x":9.5, "y":1}, | ||
| 31 | {"label":"O", "x":10.5, "y":1}, | ||
| 32 | {"label":"P", "x":11.5, "y":1}, | ||
| 33 | {"label":"\\", "x":12.5, "y":1, "w":1.5}, | ||
| 34 | {"label":"Fn", "x":0, "y":2, "w":1.5}, | ||
| 35 | {"label":"A", "x":1.5, "y":2}, | ||
| 36 | {"label":"S", "x":2.5, "y":2}, | ||
| 37 | {"label":"D", "x":3.5, "y":2}, | ||
| 38 | {"label":"F", "x":4.5, "y":2}, | ||
| 39 | {"label":"G", "x":5.5, "y":2}, | ||
| 40 | {"label":"H", "x":7.5, "y":2}, | ||
| 41 | {"label":"J", "x":8.5, "y":2}, | ||
| 42 | {"label":"K", "x":9.5, "y":2}, | ||
| 43 | {"label":"L", "x":10.5, "y":2}, | ||
| 44 | {"label":";", "x":11.5, "y":2}, | ||
| 45 | {"label":"Return", "x":12.5, "y":2, "w":1.5}, | ||
| 46 | {"label":"Shift", "x":0, "y":3, "w":1.5}, | ||
| 47 | {"label":"Z", "x":1.5, "y":3}, | ||
| 48 | {"label":"X", "x":2.5, "y":3}, | ||
| 49 | {"label":"C", "x":3.5, "y":3}, | ||
| 50 | {"label":"V", "x":4.5, "y":3}, | ||
| 51 | {"label":"B", "x":5.5, "y":3}, | ||
| 52 | {"label":"PgUp", "x":6.5, "y":3}, | ||
| 53 | {"label":"N", "x":7.5, "y":3}, | ||
| 54 | {"label":"M", "x":8.5, "y":3}, | ||
| 55 | {"label":",", "x":9.5, "y":3}, | ||
| 56 | {"label":".", "x":10.5, "y":3}, | ||
| 57 | {"label":"/", "x":11.5, "y":3}, | ||
| 58 | {"label":"Shift", "x":12.5, "y":3, "w":1.5}, | ||
| 59 | {"label":"Ctrl", "x":0, "y":4, "w":1.5}, | ||
| 60 | {"label":"Win", "x":1.5, "y":4}, | ||
| 61 | {"label":"Menu", "x":2.5, "y":4}, | ||
| 62 | {"label":"Alt", "x":3.5, "y":4}, | ||
| 63 | {"label":"Space", "x":4.5, "y":4}, | ||
| 64 | {"label":"Space", "x":5.5, "y":4}, | ||
| 65 | {"label":"PgDn", "x":6.5, "y":4}, | ||
| 66 | {"label":"Space", "x":7.5, "y":4}, | ||
| 67 | {"label":"Space", "x":8.5, "y":4}, | ||
| 68 | {"label":"AltGr", "x":9.5, "y":4}, | ||
| 69 | {"label":"[", "x":10.5, "y":4}, | ||
| 70 | {"label":"]", "x":11.5, "y":4}, | ||
| 71 | {"label":"Ctrl", "x":12.5, "y":4, "w":1.5} | ||
| 72 | ] | ||
| 73 | } | ||
| 74 | } | ||
| 75 | } | ||
diff --git a/keyboards/plut0nium/0x3e/keymaps/default/keymap.c b/keyboards/plut0nium/0x3e/keymaps/default/keymap.c new file mode 100644 index 000000000..ed2c464e4 --- /dev/null +++ b/keyboards/plut0nium/0x3e/keymaps/default/keymap.c | |||
| @@ -0,0 +1,157 @@ | |||
| 1 | /* Copyright 2020 plut0nium | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | // Defines names for use in layer keycodes and the keymap | ||
| 19 | enum layer_names { | ||
| 20 | _QWERTY, | ||
| 21 | _FN | ||
| 22 | }; | ||
| 23 | |||
| 24 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 25 | /* Base */ | ||
| 26 | [_QWERTY] = LAYOUT( | ||
| 27 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, | ||
| 28 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, | ||
| 29 | MO(_FN), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, | ||
| 30 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, | ||
| 31 | KC_LCTL, KC_LGUI, KC_MENU, KC_LALT, KC_SPC, KC_SPC, KC_PGDN, KC_SPC, KC_SPC, KC_RALT, KC_LBRC, KC_RBRC, KC_RCTL | ||
| 32 | ), | ||
| 33 | [_FN] = LAYOUT( | ||
| 34 | KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, | ||
| 35 | RESET, _______, KC_UP, _______, _______, _______, _______, _______, _______, KC_F11, KC_F12, _______, | ||
| 36 | _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 37 | _______, RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, _______, KC_END, _______, _______, BL_INC, KC_MPLY, KC_VOLU, KC_MUTE, | ||
| 38 | _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_TOG, RGB_TOG, KC_HOME, BL_TOGG, BL_TOGG, BL_DEC, KC_MPRV, KC_VOLD, KC_MNXT | ||
| 39 | ) | ||
| 40 | }; | ||
| 41 | |||
| 42 | #ifdef OLED_DRIVER_ENABLE | ||
| 43 | static void render_logo(void) { | ||
| 44 | static const char PROGMEM my_logo[] = { | ||
| 45 | // '0x3E_logo_32x16', 32x16px | ||
| 46 | 0xff, 0x0f, 0x07, 0xf3, 0x73, 0xb3, 0x07, 0x0f, 0xff, 0x3f, 0x3f, 0xff, 0xff, 0x3f, 0x3f, 0xff, | ||
| 47 | 0xe7, 0xe3, 0x33, 0x33, 0x03, 0x87, 0xff, 0xff, 0x03, 0x03, 0x33, 0x33, 0x33, 0xf3, 0xff, 0xff, | ||
| 48 | 0x7f, 0x78, 0x70, 0x66, 0x67, 0x67, 0x70, 0x78, 0x7f, 0x67, 0x62, 0x78, 0x78, 0x62, 0x67, 0x7f, | ||
| 49 | 0x73, 0x63, 0x67, 0x67, 0x60, 0x70, 0x7f, 0x7f, 0x60, 0x60, 0x67, 0x67, 0x67, 0x67, 0x7f, 0x7f | ||
| 50 | }; | ||
| 51 | oled_write_raw_P(my_logo, sizeof(my_logo)); | ||
| 52 | } | ||
| 53 | |||
| 54 | #ifdef RGBLIGHT_ENABLE | ||
| 55 | |||
| 56 | void render_rgb_status(void) { | ||
| 57 | oled_write_ln_P(PSTR("RGB"), false); | ||
| 58 | if (!rgblight_is_enabled()) { | ||
| 59 | oled_write_P(PSTR(" off\n\n\n"), false); | ||
| 60 | } | ||
| 61 | else { | ||
| 62 | static char string[4] = {0}; | ||
| 63 | oled_write_P(PSTR("M:"), false); | ||
| 64 | uint8_t n = rgblight_get_mode(); | ||
| 65 | string[3] = '\0'; | ||
| 66 | string[2] = '0' + n % 10; | ||
| 67 | string[1] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; | ||
| 68 | string[0] = n / 10 ? '0' + n / 10 : ' '; | ||
| 69 | oled_write(string, false); | ||
| 70 | |||
| 71 | oled_write_P(PSTR("H:"), false); | ||
| 72 | n = rgblight_get_hue(); | ||
| 73 | string[3] = '\0'; | ||
| 74 | string[2] = '0' + n % 10; | ||
| 75 | string[1] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; | ||
| 76 | string[0] = n / 10 ? '0' + n / 10 : ' '; | ||
| 77 | oled_write(string, false); | ||
| 78 | |||
| 79 | oled_write_P(PSTR("S:"), false); | ||
| 80 | n = rgblight_get_sat(); | ||
| 81 | string[3] = '\0'; | ||
| 82 | string[2] = '0' + n % 10; | ||
| 83 | string[1] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; | ||
| 84 | string[0] = n / 10 ? '0' + n / 10 : ' '; | ||
| 85 | oled_write(string, false); | ||
| 86 | |||
| 87 | oled_write_P(PSTR("V:"), false); | ||
| 88 | n = rgblight_get_val()/RGBLIGHT_VAL_STEP; | ||
| 89 | string[3] = '\0'; | ||
| 90 | string[2] = '0' + n % 10; | ||
| 91 | string[1] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; | ||
| 92 | string[0] = n / 10 ? '0' + n / 10 : ' '; | ||
| 93 | oled_write(string, false); | ||
| 94 | } | ||
| 95 | } | ||
| 96 | #endif | ||
| 97 | |||
| 98 | |||
| 99 | void render_backlight_status(void) { | ||
| 100 | oled_write_ln_P(PSTR("BKL"), false); | ||
| 101 | if (!is_backlight_enabled()) { | ||
| 102 | oled_write_P(PSTR(" off"), false); | ||
| 103 | } | ||
| 104 | else { | ||
| 105 | char string[4]; | ||
| 106 | oled_write_P(PSTR("L:"), false); | ||
| 107 | uint8_t n = get_backlight_level(); | ||
| 108 | string[3] = '\0'; | ||
| 109 | string[2] = '0' + n % 10; | ||
| 110 | string[1] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; | ||
| 111 | string[0] = n / 10 ? '0' + n / 10 : ' '; | ||
| 112 | oled_write(string, false); | ||
| 113 | } | ||
| 114 | } | ||
| 115 | |||
| 116 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
| 117 | return OLED_ROTATION_270; // flips the display 180 degrees if offhand | ||
| 118 | } | ||
| 119 | |||
| 120 | void oled_task_user(void) { | ||
| 121 | render_logo(); | ||
| 122 | oled_set_cursor(0,2); // default logo is 16px high (2 lines) | ||
| 123 | |||
| 124 | // Host Keyboard Layer Status | ||
| 125 | oled_write_P(PSTR("Layer"), false); | ||
| 126 | |||
| 127 | switch (get_highest_layer(layer_state)) { | ||
| 128 | case _QWERTY: | ||
| 129 | oled_write_P(PSTR("QWTY\n"), false); | ||
| 130 | break; | ||
| 131 | case _FN: | ||
| 132 | oled_write_P(PSTR("FN\n"), false); | ||
| 133 | break; | ||
| 134 | default: | ||
| 135 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
| 136 | oled_write_ln_P(PSTR("Undf"), false); | ||
| 137 | } | ||
| 138 | |||
| 139 | // Host Keyboard LED Status | ||
| 140 | // uint8_t led_usb_state = host_keyboard_leds(); | ||
| 141 | // oled_write_P(PSTR("-----"), false); | ||
| 142 | // oled_write_P(PSTR("Stats"), false); | ||
| 143 | // oled_write_P(led_usb_state & (1<<USB_LED_NUM_LOCK) ? PSTR("num:*") : PSTR("num:."), false); | ||
| 144 | // oled_write_P(led_usb_state & (1<<USB_LED_CAPS_LOCK) ? PSTR("cap:*") : PSTR("cap:."), false); | ||
| 145 | // oled_write_P(led_usb_state & (1<<USB_LED_SCROLL_LOCK) ? PSTR("scr:*") : PSTR("scr:."), false); | ||
| 146 | |||
| 147 | oled_write_P(PSTR("-----"), false); | ||
| 148 | render_backlight_status(); | ||
| 149 | |||
| 150 | // Host Keyboard RGB status | ||
| 151 | #ifdef RGBLIGHT_ENABLE | ||
| 152 | oled_write_P(PSTR("-----"), false); | ||
| 153 | render_rgb_status(); | ||
| 154 | #endif | ||
| 155 | |||
| 156 | } | ||
| 157 | #endif | ||
diff --git a/keyboards/plut0nium/0x3e/keymaps/default/readme.md b/keyboards/plut0nium/0x3e/keymaps/default/readme.md new file mode 100644 index 000000000..d75f467df --- /dev/null +++ b/keyboards/plut0nium/0x3e/keymaps/default/readme.md | |||
| @@ -0,0 +1 @@ | |||
| # The default keymap for 0x3E | |||
diff --git a/keyboards/plut0nium/0x3e/readme.md b/keyboards/plut0nium/0x3e/readme.md new file mode 100644 index 000000000..1dd3c2b17 --- /dev/null +++ b/keyboards/plut0nium/0x3e/readme.md | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | # 0x3E | ||
| 2 | |||
| 3 | An 60%-ish Ortholinear Low-profile (Kailh Choc) Keyboard, with Boardwalk-like layout (1.5u outer mod colums, split spacebar) and OLED display | ||
| 4 | |||
| 5 | * Keyboard Maintainer: [plut0nium](https://github.com/plut0nium) | ||
| 6 | * Hardware Supported: 0x3E PCB | ||
| 7 | * Hardware Availability: [MKUltra](https://mkultra.click) | ||
| 8 | |||
| 9 | Make example for this keyboard (after setting up your build environment): | ||
| 10 | |||
| 11 | make plut0nium/0x3e:default:flash | ||
| 12 | |||
| 13 | 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). | ||
| 14 | |||
| 15 | ## How to reset the board into bootloader mode | ||
| 16 | |||
| 17 | The PCB has a dedicated Reset pushbutton on the underside, press it once to reset the board into bootloader mode. | ||
| 18 | In addition, bootmagic lite is enabled in the default config, holding ESC (upper left key) while plugging the board will start in bootloader. | ||
diff --git a/keyboards/plut0nium/0x3e/rules.mk b/keyboards/plut0nium/0x3e/rules.mk new file mode 100644 index 000000000..7a0ec2db2 --- /dev/null +++ b/keyboards/plut0nium/0x3e/rules.mk | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = atmel-dfu | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 9 | MOUSEKEY_ENABLE = no # Mouse keys | ||
| 10 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 11 | CONSOLE_ENABLE = no # Console for debug | ||
| 12 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 13 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 14 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 15 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 16 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | ||
| 17 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 18 | OLED_DRIVER_ENABLE = yes | ||
| 19 | LTO_ENABLE = yes | ||
diff --git a/keyboards/plut0nium/readme.md b/keyboards/plut0nium/readme.md new file mode 100644 index 000000000..8b0e767da --- /dev/null +++ b/keyboards/plut0nium/readme.md | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | # plut0nium | ||
| 2 | |||
| 3 | * [0x3E](0x3e) - A 60%-ish Low-Profile (Choc) ortholinear keyboard PCB, with OLED support, 1.5U mods and 1/1.5/2U spacebars options. | ||
| 4 | |||
