diff options
| -rw-r--r-- | keyboards/0xcb/1337/1337.c | 34 | ||||
| -rw-r--r-- | keyboards/0xcb/1337/1337.h | 38 | ||||
| -rw-r--r-- | keyboards/0xcb/1337/config.h | 70 | ||||
| -rw-r--r-- | keyboards/0xcb/1337/info.json | 22 | ||||
| -rw-r--r-- | keyboards/0xcb/1337/keymaps/default/keymap.c | 189 | ||||
| -rw-r--r-- | keyboards/0xcb/1337/keymaps/via/keymap.c | 189 | ||||
| -rw-r--r-- | keyboards/0xcb/1337/keymaps/via/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/0xcb/1337/readme.md | 25 | ||||
| -rw-r--r-- | keyboards/0xcb/1337/rules.mk | 27 |
9 files changed, 595 insertions, 0 deletions
diff --git a/keyboards/0xcb/1337/1337.c b/keyboards/0xcb/1337/1337.c new file mode 100644 index 000000000..142c24639 --- /dev/null +++ b/keyboards/0xcb/1337/1337.c | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 0xCB - Conor Burns | ||
| 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 | #include "1337.h" | ||
| 18 | |||
| 19 | void eeconfig_init_kb(void) { | ||
| 20 | #ifdef BACKLIGHT_ENABLE | ||
| 21 | backlight_enable(); | ||
| 22 | backlight_level(5); | ||
| 23 | #endif | ||
| 24 | #ifdef RGBLIGHT_ENABLE | ||
| 25 | rgblight_enable(); | ||
| 26 | rgblight_sethsv(0, 255, 255); | ||
| 27 | #ifdef RGBLIGHT_ANIMATIONS | ||
| 28 | rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); | ||
| 29 | #endif | ||
| 30 | #endif | ||
| 31 | |||
| 32 | eeconfig_update_kb(0); | ||
| 33 | eeconfig_init_user(); | ||
| 34 | } | ||
diff --git a/keyboards/0xcb/1337/1337.h b/keyboards/0xcb/1337/1337.h new file mode 100644 index 000000000..7de5365d8 --- /dev/null +++ b/keyboards/0xcb/1337/1337.h | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 0xCB - Conor Burns | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #include "quantum.h" | ||
| 20 | |||
| 21 | /* This a shortcut to help you visually see your layout. | ||
| 22 | * | ||
| 23 | * The first section contains all of the arguments representing the physical | ||
| 24 | * layout of the board and position of the keys. | ||
| 25 | * | ||
| 26 | * The second converts the arguments into a two-dimensional array which | ||
| 27 | * represents the switch matrix. | ||
| 28 | */ | ||
| 29 | #define LAYOUT( \ | ||
| 30 | KA1, KA2, KA3, \ | ||
| 31 | KB1, KB2, KB3, \ | ||
| 32 | KC1, KC2, KC3 \ | ||
| 33 | ) \ | ||
| 34 | { \ | ||
| 35 | { KA1, KA2, KA3 }, \ | ||
| 36 | { KB1, KB2, KB3 }, \ | ||
| 37 | { KC1, KC2, KC3 } \ | ||
| 38 | } | ||
diff --git a/keyboards/0xcb/1337/config.h b/keyboards/0xcb/1337/config.h new file mode 100644 index 000000000..25b1eadd9 --- /dev/null +++ b/keyboards/0xcb/1337/config.h | |||
| @@ -0,0 +1,70 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 0xCB - Conor Burns | ||
| 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 | #pragma once | ||
| 18 | |||
| 19 | #include "config_common.h" | ||
| 20 | |||
| 21 | /* USB Device descriptor parameter */ | ||
| 22 | #define VENDOR_ID 0xCB00 | ||
| 23 | #define PRODUCT_ID 0x1337 | ||
| 24 | #define DEVICE_VER 0x0001 | ||
| 25 | #define MANUFACTURER 0xCB | ||
| 26 | #define PRODUCT 1337 | ||
| 27 | |||
| 28 | /* key matrix size */ | ||
| 29 | #define MATRIX_ROWS 3 | ||
| 30 | #define MATRIX_COLS 3 | ||
| 31 | |||
| 32 | /* Keyboard Matrix Assignments */ | ||
| 33 | #define DIRECT_PINS { \ | ||
| 34 | { D2, D4, F4 }, \ | ||
| 35 | { D7, B1, B3 }, \ | ||
| 36 | { E6, B4, B2 } \ | ||
| 37 | } | ||
| 38 | #define TAP_CODE_DELAY 10 | ||
| 39 | #define ENCODER_RESOLUTION 4 | ||
| 40 | #define ENCODERS_PAD_A { F5 } | ||
| 41 | #define ENCODERS_PAD_B { F6 } | ||
| 42 | |||
| 43 | #define BACKLIGHT_PIN B5 | ||
| 44 | // #define BACKLIGHT_BREATHING | ||
| 45 | #define BACKLIGHT_LEVELS 7 | ||
| 46 | |||
| 47 | #define RGB_DI_PIN D3 | ||
| 48 | #ifdef RGB_DI_PIN | ||
| 49 | #define RGBLED_NUM 5 | ||
| 50 | #define RGBLIGHT_HUE_STEP 8 | ||
| 51 | #define RGBLIGHT_SAT_STEP 8 | ||
| 52 | #define RGBLIGHT_VAL_STEP 8 | ||
| 53 | #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
| 54 | #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
| 55 | /*== all animations enable ==*/ | ||
| 56 | #define RGBLIGHT_ANIMATIONS | ||
| 57 | #endif | ||
| 58 | |||
| 59 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 60 | #define DEBOUNCE 5 | ||
| 61 | |||
| 62 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 63 | #define LOCKING_SUPPORT_ENABLE | ||
| 64 | /* Locking resynchronize hack */ | ||
| 65 | #define LOCKING_RESYNC_ENABLE | ||
| 66 | /* Oled Size */ | ||
| 67 | #define OLED_DISPLAY_128X64 | ||
| 68 | |||
| 69 | /* QMK DFU */ | ||
| 70 | #define QMK_LED B0 | ||
diff --git a/keyboards/0xcb/1337/info.json b/keyboards/0xcb/1337/info.json new file mode 100644 index 000000000..67cb9d0d6 --- /dev/null +++ b/keyboards/0xcb/1337/info.json | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "0xCB 1337", | ||
| 3 | "url": "https://0xCB.dev", | ||
| 4 | "maintainer": "Conor-Burns", | ||
| 5 | "width": 3, | ||
| 6 | "height": 3, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "layout": [ | ||
| 10 | {"x":0, "y":0}, | ||
| 11 | {"x":1, "y":0}, | ||
| 12 | {"x":2, "y":0}, | ||
| 13 | {"x":0, "y":1}, | ||
| 14 | {"x":1, "y":1}, | ||
| 15 | {"x":2, "y":1}, | ||
| 16 | {"x":0, "y":2}, | ||
| 17 | {"x":1, "y":2}, | ||
| 18 | {"x":2, "y":2} | ||
| 19 | ] | ||
| 20 | } | ||
| 21 | } | ||
| 22 | } | ||
diff --git a/keyboards/0xcb/1337/keymaps/default/keymap.c b/keyboards/0xcb/1337/keymaps/default/keymap.c new file mode 100644 index 000000000..c711bdae9 --- /dev/null +++ b/keyboards/0xcb/1337/keymaps/default/keymap.c | |||
| @@ -0,0 +1,189 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 0xCB - Conor Burns | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | enum layer_names { | ||
| 20 | _HOME, | ||
| 21 | _MISC, | ||
| 22 | _RGB, | ||
| 23 | _BLED | ||
| 24 | }; | ||
| 25 | |||
| 26 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 27 | [_HOME] = LAYOUT( | ||
| 28 | KC_MPRV, KC_MNXT, KC_MPLY, | ||
| 29 | KC_PGUP, KC_PGDN, TO(3), | ||
| 30 | KC_HOME, KC_END, TO(1) | ||
| 31 | ), | ||
| 32 | [_MISC] = LAYOUT( | ||
| 33 | _______, _______, _______, | ||
| 34 | _______, _______, TO(0), | ||
| 35 | _______, _______, TO(2) | ||
| 36 | ), | ||
| 37 | [_RGB] = LAYOUT( | ||
| 38 | RGB_HUI, RGB_HUD, RGB_MOD, | ||
| 39 | RGB_SAI, RGB_SAD, TO(1), | ||
| 40 | RGB_SPI, RGB_SPD, TO(3) | ||
| 41 | ), | ||
| 42 | [_BLED] = LAYOUT( | ||
| 43 | BL_STEP, BL_BRTG, BL_TOGG, | ||
| 44 | BL_ON, BL_OFF, TO(2), | ||
| 45 | BL_INC, BL_DEC, TO(0) | ||
| 46 | ) | ||
| 47 | }; | ||
| 48 | |||
| 49 | |||
| 50 | /* rotary encoder (SW3) - add more else if blocks for more granular layer control */ | ||
| 51 | #ifdef ENCODER_ENABLE | ||
| 52 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 53 | if (IS_LAYER_ON(_RGB)) { | ||
| 54 | if (clockwise) { | ||
| 55 | rgblight_increase_val(); | ||
| 56 | } else { | ||
| 57 | rgblight_decrease_val(); | ||
| 58 | } | ||
| 59 | } else if (IS_LAYER_ON(_BLED)) { | ||
| 60 | if (clockwise) { | ||
| 61 | backlight_increase(); | ||
| 62 | } else { | ||
| 63 | backlight_decrease(); | ||
| 64 | } | ||
| 65 | } else { | ||
| 66 | if (clockwise) { | ||
| 67 | tap_code(KC_VOLU); | ||
| 68 | } else { | ||
| 69 | tap_code(KC_VOLD); | ||
| 70 | } | ||
| 71 | } | ||
| 72 | } | ||
| 73 | #endif | ||
| 74 | |||
| 75 | /* oled stuff :) */ | ||
| 76 | #ifdef OLED_DRIVER_ENABLE | ||
| 77 | uint16_t startup_timer; | ||
| 78 | |||
| 79 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
| 80 | startup_timer = timer_read(); | ||
| 81 | return rotation; | ||
| 82 | } | ||
| 83 | |||
| 84 | static void render_logo(void) { | ||
| 85 | static const char PROGMEM logo[] = { | ||
| 86 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 87 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 88 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 89 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 90 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 91 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 92 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 93 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 94 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 95 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 96 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 97 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 98 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 99 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 100 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 101 | 0x00, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 102 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 103 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 104 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 105 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 106 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 107 | 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, | ||
| 108 | 0x01, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x01, 0x01, 0x01, | ||
| 109 | 0x01, 0x01, 0x02, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, | ||
| 110 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 111 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 112 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 113 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 114 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, | ||
| 115 | 0xf8, 0x05, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0x70, 0x78, | ||
| 116 | 0x38, 0x3f, 0x1c, 0x0e, 0x0e, 0x0e, 0xfe, 0x0e, 0x0e, 0x1e, 0x1c, 0x3f, 0x38, 0x78, 0x70, 0xe0, | ||
| 117 | 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0xf8, 0x05, 0x02, 0x00, | ||
| 118 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 119 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 120 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 121 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 122 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xa0, | ||
| 123 | 0x13, 0xa2, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfc, | ||
| 124 | 0xfe, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xff, 0x00, 0x00, 0x00, 0x3e, 0x3e, 0x3c, 0x3c, 0x00, 0x00, | ||
| 125 | 0x01, 0xff, 0xff, 0xff, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0xa2, 0x13, 0xa0, 0x40, 0x00, | ||
| 126 | 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 127 | 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x40, 0xc0, 0x80, 0x00, 0x00, 0xc0, 0x40, 0x40, 0xc0, 0x80, | ||
| 128 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0xc0, | ||
| 129 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x40, 0xc0, 0x80, 0x00, 0x00, 0x80, 0xc0, 0x40, | ||
| 130 | 0x40, 0xc0, 0x80, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 131 | 0xf9, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x7f, 0xff, 0xff, 0xc0, 0x80, 0x80, 0x0f, | ||
| 132 | 0x1f, 0x1f, 0x01, 0x01, 0x01, 0x01, 0xff, 0x00, 0x00, 0x00, 0x1e, 0x1e, 0x0e, 0x0e, 0x80, 0xc0, | ||
| 133 | 0xc0, 0xff, 0xff, 0x7f, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xf9, 0x00, 0x00, 0x00, | ||
| 134 | 0x00, 0x00, 0x1f, 0x31, 0x40, 0x4e, 0x40, 0x31, 0x1f, 0x00, 0x00, 0x61, 0x16, 0x08, 0x16, 0x61, | ||
| 135 | 0x00, 0x00, 0x1f, 0x31, 0x60, 0x40, 0x40, 0x60, 0x20, 0x00, 0x00, 0x7f, 0x44, 0x44, 0x64, 0x3b, | ||
| 136 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x7f, | ||
| 137 | 0x40, 0x40, 0x00, 0x00, 0x00, 0x20, 0x64, 0x44, 0x44, 0x6e, 0x3b, 0x00, 0x00, 0x20, 0x64, 0x44, | ||
| 138 | 0x44, 0x6e, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x03, 0x01, 0x00, 0x00, 0x00, 0x08, 0x14, | ||
| 139 | 0x23, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x07, 0x07, | ||
| 140 | 0x0f, 0xfe, 0x1e, 0x1c, 0x1c, 0x1c, 0xff, 0x1c, 0x1c, 0x1c, 0x1e, 0xfe, 0x0f, 0x07, 0x03, 0x03, | ||
| 141 | 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0a, 0x11, 0x0a, 0x04, 0x00, | ||
| 142 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 143 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 144 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 145 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 146 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 147 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x44, 0x28, 0x10, 0x10, 0x10, 0x10, 0x10, | ||
| 148 | 0x10, 0x1f, 0x00, 0x00, 0x10, 0x28, 0x47, 0x28, 0x10, 0x00, 0x00, 0x1f, 0x10, 0x10, 0x10, 0x10, | ||
| 149 | 0x10, 0x10, 0x28, 0x44, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 | ||
| 150 | }; | ||
| 151 | |||
| 152 | oled_write_raw_P(logo, sizeof(logo)); | ||
| 153 | } | ||
| 154 | /* Shows the name of the current layer and locks for the host (CAPS etc.) */ | ||
| 155 | static void render_info(void) { | ||
| 156 | oled_write_P(PSTR("Layer: "), false); | ||
| 157 | |||
| 158 | switch (get_highest_layer(layer_state)) { | ||
| 159 | case _HOME: | ||
| 160 | oled_write_ln_P(PSTR("HOME"), false); | ||
| 161 | break; | ||
| 162 | case _MISC: | ||
| 163 | oled_write_ln_P(PSTR("MISC"), false); | ||
| 164 | break; | ||
| 165 | case _RGB: | ||
| 166 | oled_write_ln_P(PSTR("RGB"), false); | ||
| 167 | break; | ||
| 168 | case _BLED: | ||
| 169 | oled_write_ln_P(PSTR("Backlight"), false); | ||
| 170 | break; | ||
| 171 | default: | ||
| 172 | oled_write_ln_P(PSTR("Undefined"), false); | ||
| 173 | } | ||
| 174 | led_t led_state = host_keyboard_led_state(); | ||
| 175 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | ||
| 176 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | ||
| 177 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | ||
| 178 | } | ||
| 179 | |||
| 180 | void oled_task_user(void) { | ||
| 181 | static bool finished_timer = false; | ||
| 182 | if ((timer_elapsed(startup_timer) < 3000) && !finished_timer) { | ||
| 183 | render_logo(); | ||
| 184 | } else { | ||
| 185 | finished_timer = true; | ||
| 186 | render_info(); | ||
| 187 | } | ||
| 188 | } | ||
| 189 | #endif | ||
diff --git a/keyboards/0xcb/1337/keymaps/via/keymap.c b/keyboards/0xcb/1337/keymaps/via/keymap.c new file mode 100644 index 000000000..c711bdae9 --- /dev/null +++ b/keyboards/0xcb/1337/keymaps/via/keymap.c | |||
| @@ -0,0 +1,189 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 0xCB - Conor Burns | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | enum layer_names { | ||
| 20 | _HOME, | ||
| 21 | _MISC, | ||
| 22 | _RGB, | ||
| 23 | _BLED | ||
| 24 | }; | ||
| 25 | |||
| 26 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 27 | [_HOME] = LAYOUT( | ||
| 28 | KC_MPRV, KC_MNXT, KC_MPLY, | ||
| 29 | KC_PGUP, KC_PGDN, TO(3), | ||
| 30 | KC_HOME, KC_END, TO(1) | ||
| 31 | ), | ||
| 32 | [_MISC] = LAYOUT( | ||
| 33 | _______, _______, _______, | ||
| 34 | _______, _______, TO(0), | ||
| 35 | _______, _______, TO(2) | ||
| 36 | ), | ||
| 37 | [_RGB] = LAYOUT( | ||
| 38 | RGB_HUI, RGB_HUD, RGB_MOD, | ||
| 39 | RGB_SAI, RGB_SAD, TO(1), | ||
| 40 | RGB_SPI, RGB_SPD, TO(3) | ||
| 41 | ), | ||
| 42 | [_BLED] = LAYOUT( | ||
| 43 | BL_STEP, BL_BRTG, BL_TOGG, | ||
| 44 | BL_ON, BL_OFF, TO(2), | ||
| 45 | BL_INC, BL_DEC, TO(0) | ||
| 46 | ) | ||
| 47 | }; | ||
| 48 | |||
| 49 | |||
| 50 | /* rotary encoder (SW3) - add more else if blocks for more granular layer control */ | ||
| 51 | #ifdef ENCODER_ENABLE | ||
| 52 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 53 | if (IS_LAYER_ON(_RGB)) { | ||
| 54 | if (clockwise) { | ||
| 55 | rgblight_increase_val(); | ||
| 56 | } else { | ||
| 57 | rgblight_decrease_val(); | ||
| 58 | } | ||
| 59 | } else if (IS_LAYER_ON(_BLED)) { | ||
| 60 | if (clockwise) { | ||
| 61 | backlight_increase(); | ||
| 62 | } else { | ||
| 63 | backlight_decrease(); | ||
| 64 | } | ||
| 65 | } else { | ||
| 66 | if (clockwise) { | ||
| 67 | tap_code(KC_VOLU); | ||
| 68 | } else { | ||
| 69 | tap_code(KC_VOLD); | ||
| 70 | } | ||
| 71 | } | ||
| 72 | } | ||
| 73 | #endif | ||
| 74 | |||
| 75 | /* oled stuff :) */ | ||
| 76 | #ifdef OLED_DRIVER_ENABLE | ||
| 77 | uint16_t startup_timer; | ||
| 78 | |||
| 79 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
| 80 | startup_timer = timer_read(); | ||
| 81 | return rotation; | ||
| 82 | } | ||
| 83 | |||
| 84 | static void render_logo(void) { | ||
| 85 | static const char PROGMEM logo[] = { | ||
| 86 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 87 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 88 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 89 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 90 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 91 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 92 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 93 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 94 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 95 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 96 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 97 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 98 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 99 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 100 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 101 | 0x00, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 102 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 103 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 104 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 105 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 106 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 107 | 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, | ||
| 108 | 0x01, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x01, 0x01, 0x01, | ||
| 109 | 0x01, 0x01, 0x02, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, | ||
| 110 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 111 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 112 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 113 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 114 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, | ||
| 115 | 0xf8, 0x05, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0x70, 0x78, | ||
| 116 | 0x38, 0x3f, 0x1c, 0x0e, 0x0e, 0x0e, 0xfe, 0x0e, 0x0e, 0x1e, 0x1c, 0x3f, 0x38, 0x78, 0x70, 0xe0, | ||
| 117 | 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0xf8, 0x05, 0x02, 0x00, | ||
| 118 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 119 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 120 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 121 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 122 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xa0, | ||
| 123 | 0x13, 0xa2, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfc, | ||
| 124 | 0xfe, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xff, 0x00, 0x00, 0x00, 0x3e, 0x3e, 0x3c, 0x3c, 0x00, 0x00, | ||
| 125 | 0x01, 0xff, 0xff, 0xff, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0xa2, 0x13, 0xa0, 0x40, 0x00, | ||
| 126 | 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 127 | 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x40, 0xc0, 0x80, 0x00, 0x00, 0xc0, 0x40, 0x40, 0xc0, 0x80, | ||
| 128 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0xc0, | ||
| 129 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x40, 0xc0, 0x80, 0x00, 0x00, 0x80, 0xc0, 0x40, | ||
| 130 | 0x40, 0xc0, 0x80, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 131 | 0xf9, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x7f, 0xff, 0xff, 0xc0, 0x80, 0x80, 0x0f, | ||
| 132 | 0x1f, 0x1f, 0x01, 0x01, 0x01, 0x01, 0xff, 0x00, 0x00, 0x00, 0x1e, 0x1e, 0x0e, 0x0e, 0x80, 0xc0, | ||
| 133 | 0xc0, 0xff, 0xff, 0x7f, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xf9, 0x00, 0x00, 0x00, | ||
| 134 | 0x00, 0x00, 0x1f, 0x31, 0x40, 0x4e, 0x40, 0x31, 0x1f, 0x00, 0x00, 0x61, 0x16, 0x08, 0x16, 0x61, | ||
| 135 | 0x00, 0x00, 0x1f, 0x31, 0x60, 0x40, 0x40, 0x60, 0x20, 0x00, 0x00, 0x7f, 0x44, 0x44, 0x64, 0x3b, | ||
| 136 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x7f, | ||
| 137 | 0x40, 0x40, 0x00, 0x00, 0x00, 0x20, 0x64, 0x44, 0x44, 0x6e, 0x3b, 0x00, 0x00, 0x20, 0x64, 0x44, | ||
| 138 | 0x44, 0x6e, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x03, 0x01, 0x00, 0x00, 0x00, 0x08, 0x14, | ||
| 139 | 0x23, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x07, 0x07, | ||
| 140 | 0x0f, 0xfe, 0x1e, 0x1c, 0x1c, 0x1c, 0xff, 0x1c, 0x1c, 0x1c, 0x1e, 0xfe, 0x0f, 0x07, 0x03, 0x03, | ||
| 141 | 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0a, 0x11, 0x0a, 0x04, 0x00, | ||
| 142 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 143 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 144 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 145 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 146 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 147 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x44, 0x28, 0x10, 0x10, 0x10, 0x10, 0x10, | ||
| 148 | 0x10, 0x1f, 0x00, 0x00, 0x10, 0x28, 0x47, 0x28, 0x10, 0x00, 0x00, 0x1f, 0x10, 0x10, 0x10, 0x10, | ||
| 149 | 0x10, 0x10, 0x28, 0x44, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 | ||
| 150 | }; | ||
| 151 | |||
| 152 | oled_write_raw_P(logo, sizeof(logo)); | ||
| 153 | } | ||
| 154 | /* Shows the name of the current layer and locks for the host (CAPS etc.) */ | ||
| 155 | static void render_info(void) { | ||
| 156 | oled_write_P(PSTR("Layer: "), false); | ||
| 157 | |||
| 158 | switch (get_highest_layer(layer_state)) { | ||
| 159 | case _HOME: | ||
| 160 | oled_write_ln_P(PSTR("HOME"), false); | ||
| 161 | break; | ||
| 162 | case _MISC: | ||
| 163 | oled_write_ln_P(PSTR("MISC"), false); | ||
| 164 | break; | ||
| 165 | case _RGB: | ||
| 166 | oled_write_ln_P(PSTR("RGB"), false); | ||
| 167 | break; | ||
| 168 | case _BLED: | ||
| 169 | oled_write_ln_P(PSTR("Backlight"), false); | ||
| 170 | break; | ||
| 171 | default: | ||
| 172 | oled_write_ln_P(PSTR("Undefined"), false); | ||
| 173 | } | ||
| 174 | led_t led_state = host_keyboard_led_state(); | ||
| 175 | oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); | ||
| 176 | oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); | ||
| 177 | oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); | ||
| 178 | } | ||
| 179 | |||
| 180 | void oled_task_user(void) { | ||
| 181 | static bool finished_timer = false; | ||
| 182 | if ((timer_elapsed(startup_timer) < 3000) && !finished_timer) { | ||
| 183 | render_logo(); | ||
| 184 | } else { | ||
| 185 | finished_timer = true; | ||
| 186 | render_info(); | ||
| 187 | } | ||
| 188 | } | ||
| 189 | #endif | ||
diff --git a/keyboards/0xcb/1337/keymaps/via/rules.mk b/keyboards/0xcb/1337/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/0xcb/1337/keymaps/via/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| VIA_ENABLE = yes | |||
diff --git a/keyboards/0xcb/1337/readme.md b/keyboards/0xcb/1337/readme.md new file mode 100644 index 000000000..da54eb78f --- /dev/null +++ b/keyboards/0xcb/1337/readme.md | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | # 0xCB 1337 | ||
| 2 | |||
| 3 | Macro keypad | ||
| 4 | |||
| 5 | * Keyboard Maintainer: [Conor Burns](https://github.com/conor-burns) | ||
| 6 | * Hardware Supported: https://github.com/conor-burns/0xcb-1337 | ||
| 7 | * Hardware Availability: Soon on tindie or order your own parts - the hardware in the repo is Open Source :D | ||
| 8 | * PCB renders :) | ||
| 9 | |||
| 10 |  | ||
| 11 | |||
| 12 |  | ||
| 13 | |||
| 14 | |||
| 15 | To go to bootloader press row 0 col 0 key (top left) while plugging in the board. | ||
| 16 | |||
| 17 | Make example for this keyboard (after setting up your build environment): | ||
| 18 | |||
| 19 | make 0xcb/1337:default | ||
| 20 | |||
| 21 | Flashing example for this keyboard: | ||
| 22 | |||
| 23 | make 0xcb/1337:default:flash | ||
| 24 | |||
| 25 | 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/0xcb/1337/rules.mk b/keyboards/0xcb/1337/rules.mk new file mode 100644 index 000000000..5469b415c --- /dev/null +++ b/keyboards/0xcb/1337/rules.mk | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = qmk-dfu | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default | ||
| 20 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 21 | UNICODE_ENABLE = no # Unicode | ||
| 22 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 23 | AUDIO_ENABLE = no # Audio output | ||
| 24 | |||
| 25 | ENCODER_ENABLE = yes | ||
| 26 | LTO_ENABLE = yes | ||
| 27 | OLED_DRIVER_ENABLE = yes | ||
