diff options
| author | Monksoffunk <monksoffunk@users.noreply.github.com> | 2021-03-15 04:55:59 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-15 06:55:59 +1100 |
| commit | 45e6bb7add65d4fd733feb2ae1a059782d7f2cfc (patch) | |
| tree | 3bc8d438205cad99ffbae78e0628e8fc53084958 | |
| parent | 7b7689d30796c977b95197091c16e8bb97000101 (diff) | |
| download | qmk_firmware-45e6bb7add65d4fd733feb2ae1a059782d7f2cfc.tar.gz qmk_firmware-45e6bb7add65d4fd733feb2ae1a059782d7f2cfc.zip | |
Add Cassette42 (#10562)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
| -rw-r--r-- | keyboards/cassette42/cassette42.c | 16 | ||||
| -rw-r--r-- | keyboards/cassette42/cassette42.h | 34 | ||||
| -rw-r--r-- | keyboards/cassette42/common/glcdfont.c | 233 | ||||
| -rw-r--r-- | keyboards/cassette42/common/oled_helper.c | 25 | ||||
| -rw-r--r-- | keyboards/cassette42/common/oled_helper.h | 22 | ||||
| -rw-r--r-- | keyboards/cassette42/config.h | 52 | ||||
| -rw-r--r-- | keyboards/cassette42/info.json | 12 | ||||
| -rw-r--r-- | keyboards/cassette42/keymaps/default/keymap.c | 174 | ||||
| -rw-r--r-- | keyboards/cassette42/keymaps/default/readme.md | 1 | ||||
| -rw-r--r-- | keyboards/cassette42/readme.md | 15 | ||||
| -rw-r--r-- | keyboards/cassette42/rules.mk | 26 |
11 files changed, 610 insertions, 0 deletions
diff --git a/keyboards/cassette42/cassette42.c b/keyboards/cassette42/cassette42.c new file mode 100644 index 000000000..f5ca2b8a9 --- /dev/null +++ b/keyboards/cassette42/cassette42.c | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | /* Copyright 2019 monksoffunk | ||
| 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 "cassette42.h" | ||
diff --git a/keyboards/cassette42/cassette42.h b/keyboards/cassette42/cassette42.h new file mode 100644 index 000000000..32a686f3d --- /dev/null +++ b/keyboards/cassette42/cassette42.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | /* Copyright 2019 monksoffunk | ||
| 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 | #pragma once | ||
| 17 | |||
| 18 | #include "quantum.h" | ||
| 19 | |||
| 20 | /* This a shortcut to help you visually see your layout. | ||
| 21 | * | ||
| 22 | * The first section contains all of the arguments representing the physical | ||
| 23 | * layout of the board and position of the keys. | ||
| 24 | * | ||
| 25 | * The second converts the arguments into a two-dimensional array which | ||
| 26 | * represents the switch matrix. | ||
| 27 | */ | ||
| 28 | #define LAYOUT( \ | ||
| 29 | k10, k11, \ | ||
| 30 | k00, k01, k02, k03\ | ||
| 31 | ) \ | ||
| 32 | { \ | ||
| 33 | { k00, k01, k02, k03, k10, k11 }, \ | ||
| 34 | } | ||
diff --git a/keyboards/cassette42/common/glcdfont.c b/keyboards/cassette42/common/glcdfont.c new file mode 100644 index 000000000..dcffc7195 --- /dev/null +++ b/keyboards/cassette42/common/glcdfont.c | |||
| @@ -0,0 +1,233 @@ | |||
| 1 | // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. | ||
| 2 | // See gfxfont.h for newer custom bitmap font info. | ||
| 3 | |||
| 4 | #include "progmem.h" | ||
| 5 | |||
| 6 | // Standard ASCII 5x7 font | ||
| 7 | |||
| 8 | static const unsigned char font[] PROGMEM = { | ||
| 9 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 10 | 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, | ||
| 11 | 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, | ||
| 12 | 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, | ||
| 13 | 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, | ||
| 14 | 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, | ||
| 15 | 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, | ||
| 16 | 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, | ||
| 17 | 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, | ||
| 18 | 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, | ||
| 19 | 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, | ||
| 20 | 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, | ||
| 21 | 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, | ||
| 22 | 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, | ||
| 23 | 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, | ||
| 24 | 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, | ||
| 25 | 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, | ||
| 26 | 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, | ||
| 27 | 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, | ||
| 28 | 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, | ||
| 29 | 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, | ||
| 30 | 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, | ||
| 31 | 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, | ||
| 32 | 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, | ||
| 33 | 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, | ||
| 34 | 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, | ||
| 35 | 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, | ||
| 36 | 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, | ||
| 37 | 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, | ||
| 38 | 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, | ||
| 39 | 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, | ||
| 40 | 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, | ||
| 41 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 42 | 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, | ||
| 43 | 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, | ||
| 44 | 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, | ||
| 45 | 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, | ||
| 46 | 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, | ||
| 47 | 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, | ||
| 48 | 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, | ||
| 49 | 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, | ||
| 50 | 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, | ||
| 51 | 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, | ||
| 52 | 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, | ||
| 53 | 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, | ||
| 54 | 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, | ||
| 55 | 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, | ||
| 56 | 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, | ||
| 57 | 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, | ||
| 58 | 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, | ||
| 59 | 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, | ||
| 60 | 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, | ||
| 61 | 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, | ||
| 62 | 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, | ||
| 63 | 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, | ||
| 64 | 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, | ||
| 65 | 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, | ||
| 66 | 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, | ||
| 67 | 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, | ||
| 68 | 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, | ||
| 69 | 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, | ||
| 70 | 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, | ||
| 71 | 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, | ||
| 72 | 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, | ||
| 73 | 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, | ||
| 74 | 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, | ||
| 75 | 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, | ||
| 76 | 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, | ||
| 77 | 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, | ||
| 78 | 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, | ||
| 79 | 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, | ||
| 80 | 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, | ||
| 81 | 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, | ||
| 82 | 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, | ||
| 83 | 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, | ||
| 84 | 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, | ||
| 85 | 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, | ||
| 86 | 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, | ||
| 87 | 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, | ||
| 88 | 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, | ||
| 89 | 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, | ||
| 90 | 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, | ||
| 91 | 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, | ||
| 92 | 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, | ||
| 93 | 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, | ||
| 94 | 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, | ||
| 95 | 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, | ||
| 96 | 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, | ||
| 97 | 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, | ||
| 98 | 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, | ||
| 99 | 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, | ||
| 100 | 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, | ||
| 101 | 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, | ||
| 102 | 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, | ||
| 103 | 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, | ||
| 104 | 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, | ||
| 105 | 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, | ||
| 106 | 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, | ||
| 107 | 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, | ||
| 108 | 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, | ||
| 109 | 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, | ||
| 110 | 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, | ||
| 111 | 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, | ||
| 112 | 0x18, 0x24, 0x24, 0x1C, 0x38, 0x00, | ||
| 113 | 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, | ||
| 114 | 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, | ||
| 115 | 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, | ||
| 116 | 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, | ||
| 117 | 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, | ||
| 118 | 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, | ||
| 119 | 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, | ||
| 120 | 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, | ||
| 121 | 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, | ||
| 122 | 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, | ||
| 123 | 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, | ||
| 124 | 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, | ||
| 125 | 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, | ||
| 126 | 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, | ||
| 127 | 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, | ||
| 128 | 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, | ||
| 129 | 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, | ||
| 130 | 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, | ||
| 131 | 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, | ||
| 132 | 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, | ||
| 133 | 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, | ||
| 134 | 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, | ||
| 135 | 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, | ||
| 136 | 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, | ||
| 137 | 0x00, 0x00, 0x00, 0xFE, 0x01, 0x19, | ||
| 138 | 0x05, 0xC1, 0x21, 0x31, 0xD1, 0x11, | ||
| 139 | 0x11, 0x11, 0x11, 0x11, 0x11, 0xD1, | ||
| 140 | 0x31, 0x21, 0xC1, 0x01, 0x01, 0x01, | ||
| 141 | 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 142 | 0x00, 0x00, 0x3E, 0x3E, 0xFF, 0xFF, | ||
| 143 | 0xFF, 0xFF, 0xFF, 0x3E, 0x3E, 0x3E, | ||
| 144 | 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, | ||
| 145 | 0x00, 0x00, 0x3E, 0xFF, 0xFF, 0xFF, | ||
| 146 | 0xFF, 0xFF, 0xFF, 0x3E, 0xBE, 0xBE, | ||
| 147 | 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x7E, | ||
| 148 | 0x00, 0x00, 0xF8, 0xF8, 0xF8, 0x00, | ||
| 149 | 0xF8, 0xF8, 0xF8, 0x00, 0xF8, 0xF8, | ||
| 150 | 0xF8, 0xF8, 0x00, 0x00, 0x00, 0xFF, | ||
| 151 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, | ||
| 152 | 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, | ||
| 153 | 0xE0, 0xE0, 0xE0, 0x00, 0x00, 0x00, | ||
| 154 | 0xC0, 0xF0, 0xFE, 0x7E, 0x1E, 0xFE, | ||
| 155 | 0xFE, 0xFE, 0xFE, 0x00, 0x00, 0xF0, | ||
| 156 | 0xFC, 0xFC, 0xFE, 0x1E, 0x9E, 0xFE, | ||
| 157 | 0xFC, 0xFC, 0xF0, 0x00, 0x00, 0x00, | ||
| 158 | 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, | ||
| 159 | 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, | ||
| 160 | 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, | ||
| 161 | 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, | ||
| 162 | 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, | ||
| 163 | 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, | ||
| 164 | 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, | ||
| 165 | 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, | ||
| 166 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 167 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 168 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 169 | 0x00, 0x00, 0x00, 0x3F, 0x40, 0x60, | ||
| 170 | 0x50, 0x48, 0x69, 0x4B, 0x4A, 0x4A, | ||
| 171 | 0x4A, 0x4A, 0x4A, 0x4A, 0x4A, 0x4A, | ||
| 172 | 0x4B, 0x69, 0x48, 0x50, 0x60, 0x40, | ||
| 173 | 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 174 | 0x00, 0x00, 0x7C, 0x7C, 0x7F, 0x7F, | ||
| 175 | 0x7F, 0x3F, 0x1F, 0x00, 0x7C, 0x7C, | ||
| 176 | 0x7F, 0x7F, 0x7F, 0x3F, 0x1F, 0x07, | ||
| 177 | 0x00, 0x00, 0x00, 0x0F, 0x3F, 0x7F, | ||
| 178 | 0x7F, 0x7F, 0x7F, 0x7C, 0x7D, 0x7D, | ||
| 179 | 0x7D, 0x7D, 0x7D, 0x7D, 0x7D, 0x7C, | ||
| 180 | 0x00, 0x00, 0x7B, 0x7B, 0x7B, 0x78, | ||
| 181 | 0x7B, 0x7B, 0x7B, 0x78, 0x7F, 0x7F, | ||
| 182 | 0x7F, 0x3F, 0x00, 0x00, 0x00, 0x7F, | ||
| 183 | 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x03, | ||
| 184 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, | ||
| 185 | 0x03, 0x03, 0x03, 0x00, 0x00, 0x06, | ||
| 186 | 0x07, 0x07, 0x07, 0x07, 0x00, 0x7F, | ||
| 187 | 0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x00, | ||
| 188 | 0x41, 0x73, 0x78, 0x7E, 0x7F, 0x7F, | ||
| 189 | 0x7F, 0x7B, 0x78, 0x00, 0x00, 0x00, | ||
| 190 | 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, | ||
| 191 | 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, | ||
| 192 | 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, | ||
| 193 | 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, | ||
| 194 | 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, | ||
| 195 | 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, | ||
| 196 | 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, | ||
| 197 | 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, | ||
| 198 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 199 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 200 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 201 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 202 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 203 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 204 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 205 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 206 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 207 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 208 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 209 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 210 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 211 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 212 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 213 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 214 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 215 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 216 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 217 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 218 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 219 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 220 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 221 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 222 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 223 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 224 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 225 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 226 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 227 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 228 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 229 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 230 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 231 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 232 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 | ||
| 233 | }; | ||
diff --git a/keyboards/cassette42/common/oled_helper.c b/keyboards/cassette42/common/oled_helper.c new file mode 100644 index 000000000..de908f128 --- /dev/null +++ b/keyboards/cassette42/common/oled_helper.c | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | #ifdef OLED_DRIVER_ENABLE | ||
| 2 | # include QMK_KEYBOARD_H | ||
| 3 | # include <stdio.h> | ||
| 4 | # include <string.h> | ||
| 5 | |||
| 6 | void render_logo(void) { | ||
| 7 | static const char PROGMEM logo[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0}; | ||
| 8 | oled_write_P(logo, false); | ||
| 9 | } | ||
| 10 | |||
| 11 | # ifdef RGBLIGHT_ENABLE | ||
| 12 | extern rgblight_config_t rgblight_config; | ||
| 13 | static char led_buf[24] = "LED state ready.\n"; | ||
| 14 | rgblight_config_t rgblight_config_bak; | ||
| 15 | |||
| 16 | void update_led_status(void) { | ||
| 17 | if (rgblight_config_bak.enable != rgblight_config.enable || rgblight_config_bak.mode != rgblight_config.mode || rgblight_config_bak.hue != rgblight_config.hue || rgblight_config_bak.sat != rgblight_config.sat || rgblight_config_bak.val != rgblight_config.val) { | ||
| 18 | snprintf(led_buf, sizeof(led_buf) - 1, "%c H%2d S%2d V%2d MODE%2d", rgblight_config.enable ? '*' : '.', (uint8_t)(rgblight_config.hue / RGBLIGHT_HUE_STEP), (uint8_t)(rgblight_config.sat / RGBLIGHT_SAT_STEP), (uint8_t)(rgblight_config.val / RGBLIGHT_VAL_STEP), (uint8_t)rgblight_config.mode); | ||
| 19 | rgblight_config_bak = rgblight_config; | ||
| 20 | } | ||
| 21 | } | ||
| 22 | |||
| 23 | void render_led_status(void) { oled_write(led_buf, false); } | ||
| 24 | # endif | ||
| 25 | #endif | ||
diff --git a/keyboards/cassette42/common/oled_helper.h b/keyboards/cassette42/common/oled_helper.h new file mode 100644 index 000000000..6c2680664 --- /dev/null +++ b/keyboards/cassette42/common/oled_helper.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | #ifdef OLED_DRIVER_ENABLE | ||
| 2 | |||
| 3 | void render_logo(void); | ||
| 4 | |||
| 5 | # define RENDER_LOGO(a) render_logo(a) | ||
| 6 | |||
| 7 | # ifdef RGBLIGHT_ENABLE | ||
| 8 | void update_led_status(void); | ||
| 9 | void render_led_status(void); | ||
| 10 | # define UPDATE_LED_STATUS() update_led_status() | ||
| 11 | # define RENDER_LED_STATUS(a) render_led_status(a) | ||
| 12 | # else | ||
| 13 | # define UPDATE_LED_STATUS() | ||
| 14 | # define RENDER_LED_STATUS(a) | ||
| 15 | # endif | ||
| 16 | |||
| 17 | #else | ||
| 18 | # define RENDER_LOGO(a) | ||
| 19 | # define UPDATE_LED_STATUS() | ||
| 20 | # define RENDER_LED_STATUS(a) | ||
| 21 | |||
| 22 | #endif \ No newline at end of file | ||
diff --git a/keyboards/cassette42/config.h b/keyboards/cassette42/config.h new file mode 100644 index 000000000..1729c31fb --- /dev/null +++ b/keyboards/cassette42/config.h | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2019 monksoffunk | ||
| 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 | |||
| 23 | /* USB Device descriptor parameter */ | ||
| 24 | #define VENDOR_ID 0xFEED | ||
| 25 | #define PRODUCT_ID 0xCA42 | ||
| 26 | #define DEVICE_VER 0x0001 | ||
| 27 | #define MANUFACTURER monksoffunk | ||
| 28 | #define PRODUCT cassette42 | ||
| 29 | |||
| 30 | /* key matrix size */ | ||
| 31 | #define MATRIX_ROWS 1 | ||
| 32 | #define MATRIX_COLS 6 | ||
| 33 | |||
| 34 | #define DIRECT_PINS {{ B4, F6, F5, F4, B5, F7 }} | ||
| 35 | #define UNUSED_PINS | ||
| 36 | |||
| 37 | #define ENCODERS_PAD_A { B6, B3 } | ||
| 38 | #define ENCODERS_PAD_B { B2, B1 } | ||
| 39 | #define ENCODER_RESOLUTION 4 | ||
| 40 | |||
| 41 | #define RGB_DI_PIN D3 | ||
| 42 | #ifdef RGB_DI_PIN | ||
| 43 | # define RGBLED_NUM 5 | ||
| 44 | # define RGBLIGHT_HUE_STEP 8 | ||
| 45 | # define RGBLIGHT_SAT_STEP 8 | ||
| 46 | # define RGBLIGHT_VAL_STEP 8 | ||
| 47 | # define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
| 48 | # define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
| 49 | # define RGBLIGHT_ANIMATIONS | ||
| 50 | #endif | ||
| 51 | |||
| 52 | #define OLED_FONT_H "keyboards/cassette42/common/glcdfont.c" | ||
diff --git a/keyboards/cassette42/info.json b/keyboards/cassette42/info.json new file mode 100644 index 000000000..f792797ec --- /dev/null +++ b/keyboards/cassette42/info.json | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "cassette42", | ||
| 3 | "url": "http://www.sho-k.co.uk/tech/1246.html", | ||
| 4 | "maintainer": "monksoffunk", | ||
| 5 | "width": 4, | ||
| 6 | "height": 2.75, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "layout": [{"x":0.5, "y":0.75}, {"x":2.5, "y":0.75}, {"x":0, "y":1.75}, {"x":1, "y":1.75}, {"x":2, "y":1.75}, {"x":3, "y":1.75}] | ||
| 10 | } | ||
| 11 | } | ||
| 12 | } \ No newline at end of file | ||
diff --git a/keyboards/cassette42/keymaps/default/keymap.c b/keyboards/cassette42/keymaps/default/keymap.c new file mode 100644 index 000000000..2f53c1d6c --- /dev/null +++ b/keyboards/cassette42/keymaps/default/keymap.c | |||
| @@ -0,0 +1,174 @@ | |||
| 1 | /* Copyright 2019 monksoffunk | ||
| 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 | #include "common/oled_helper.h" | ||
| 19 | |||
| 20 | // Defines the keycodes used by our macros in process_record_user | ||
| 21 | enum custom_keycodes { | ||
| 22 | RGBRST = SAFE_RANGE, | ||
| 23 | WRTROM, | ||
| 24 | }; | ||
| 25 | |||
| 26 | enum layer_number { | ||
| 27 | _AUDIO = 0, | ||
| 28 | _HUE, | ||
| 29 | _SAT, | ||
| 30 | _VAL, | ||
| 31 | _MODE, | ||
| 32 | }; | ||
| 33 | |||
| 34 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 35 | // LAYOUT(LeftEncoder, RightEncoder, LeftSwitch, CenterLeftSwitch, CenterRightSwitch, RightSwitch) | ||
| 36 | [_AUDIO] = LAYOUT(KC_MUTE, KC_ENT, LT(_HUE, KC_MPRV), LT(_SAT, KC_MPLY), LT(_VAL, KC_MNXT), LT(_MODE, KC_SPC)), | ||
| 37 | [_HUE] = LAYOUT(RGB_TOG, RGBRST, _______, _______, RGB_HUD, RGB_HUI), | ||
| 38 | [_SAT] = LAYOUT(_______, _______, _______, _______, RGB_SAD, RGB_SAI), | ||
| 39 | [_VAL] = LAYOUT(_______, _______, RGB_VAD, RGB_VAI, _______, RGB_VAI), | ||
| 40 | [_MODE] = LAYOUT(_______, WRTROM, RGB_RMOD, RGB_MOD, RGB_MOD, _______), | ||
| 41 | }; | ||
| 42 | |||
| 43 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 44 | switch (keycode) { | ||
| 45 | case WRTROM: | ||
| 46 | #ifdef RGBLIGHT_ENABLE | ||
| 47 | if (record->event.pressed) { | ||
| 48 | eeconfig_update_rgblight_current(); | ||
| 49 | } | ||
| 50 | #endif | ||
| 51 | return false; | ||
| 52 | break; | ||
| 53 | |||
| 54 | case RGBRST: | ||
| 55 | #ifdef RGBLIGHT_ENABLE | ||
| 56 | if (record->event.pressed) { | ||
| 57 | eeconfig_update_rgblight_default(); | ||
| 58 | rgblight_enable(); | ||
| 59 | } | ||
| 60 | #endif | ||
| 61 | return false; | ||
| 62 | break; | ||
| 63 | } | ||
| 64 | return true; | ||
| 65 | } | ||
| 66 | |||
| 67 | #ifdef OLED_DRIVER_ENABLE | ||
| 68 | # include <stdio.h> | ||
| 69 | # include <string.h> | ||
| 70 | |||
| 71 | // assign the right code to your layers for OLED display | ||
| 72 | # define L_AUDIO 0 | ||
| 73 | # define L_HUE (1 << _HUE) | ||
| 74 | # define L_SAT (1 << _SAT) | ||
| 75 | # define L_VAL (1 << _VAL) | ||
| 76 | # define L_MODE (1 << _MODE) | ||
| 77 | |||
| 78 | void render_status(void) { | ||
| 79 | render_logo(); | ||
| 80 | // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below | ||
| 81 | switch (layer_state) { | ||
| 82 | case L_AUDIO: | ||
| 83 | oled_write_P(PSTR("audio control\n"), false); | ||
| 84 | break; | ||
| 85 | case L_HUE: | ||
| 86 | oled_write_P(PSTR("rgb HUE control\n"), false); | ||
| 87 | break; | ||
| 88 | case L_SAT: | ||
| 89 | oled_write_P(PSTR("rgb SAT control\n"), false); | ||
| 90 | break; | ||
| 91 | case L_VAL: | ||
| 92 | oled_write_P(PSTR("rgb VAL control\n"), false); | ||
| 93 | break; | ||
| 94 | case L_MODE: | ||
| 95 | oled_write_P(PSTR("rgb MODE control\n"), false); | ||
| 96 | break; | ||
| 97 | default: | ||
| 98 | break; | ||
| 99 | } | ||
| 100 | UPDATE_LED_STATUS(); | ||
| 101 | RENDER_LED_STATUS(); | ||
| 102 | } | ||
| 103 | |||
| 104 | void oled_task_user(void) { | ||
| 105 | if (is_keyboard_master()) { | ||
| 106 | render_status(); | ||
| 107 | } else { | ||
| 108 | render_logo(); | ||
| 109 | } | ||
| 110 | } | ||
| 111 | #endif | ||
| 112 | |||
| 113 | void led_set_user(uint8_t usb_led) {} | ||
| 114 | |||
| 115 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 116 | oled_on(); | ||
| 117 | if (index == 0) { /* left encoder */ | ||
| 118 | switch (layer_state) { | ||
| 119 | case L_AUDIO: | ||
| 120 | if (clockwise) { | ||
| 121 | tap_code(KC_VOLU); | ||
| 122 | } else { | ||
| 123 | tap_code(KC_VOLD); | ||
| 124 | } | ||
| 125 | break; | ||
| 126 | |||
| 127 | case L_HUE: | ||
| 128 | #ifdef RGBLIGHT_ENABLE | ||
| 129 | if (clockwise) { | ||
| 130 | rgblight_increase_hue_noeeprom(); | ||
| 131 | } else { | ||
| 132 | rgblight_decrease_hue_noeeprom(); | ||
| 133 | } | ||
| 134 | #endif | ||
| 135 | break; | ||
| 136 | |||
| 137 | case L_SAT: | ||
| 138 | #ifdef RGBLIGHT_ENABLE | ||
| 139 | if (clockwise) { | ||
| 140 | rgblight_increase_sat_noeeprom(); | ||
| 141 | } else { | ||
| 142 | rgblight_decrease_sat_noeeprom(); | ||
| 143 | } | ||
| 144 | #endif | ||
| 145 | break; | ||
| 146 | |||
| 147 | case L_VAL: | ||
| 148 | #ifdef RGBLIGHT_ENABLE | ||
| 149 | if (clockwise) { | ||
| 150 | rgblight_increase_val_noeeprom(); | ||
| 151 | } else { | ||
| 152 | rgblight_decrease_val_noeeprom(); | ||
| 153 | } | ||
| 154 | #endif | ||
| 155 | break; | ||
| 156 | |||
| 157 | case L_MODE: | ||
| 158 | #ifdef RGBLIGHT_ENABLE | ||
| 159 | if (clockwise) { | ||
| 160 | rgblight_step_noeeprom(); | ||
| 161 | } else { | ||
| 162 | rgblight_step_reverse_noeeprom(); | ||
| 163 | } | ||
| 164 | #endif | ||
| 165 | break; | ||
| 166 | } | ||
| 167 | } else if (index == 1) { /* right encoder */ | ||
| 168 | if (clockwise) { | ||
| 169 | tap_code(KC_DOWN); | ||
| 170 | } else { | ||
| 171 | tap_code(KC_UP); | ||
| 172 | } | ||
| 173 | } | ||
| 174 | } | ||
diff --git a/keyboards/cassette42/keymaps/default/readme.md b/keyboards/cassette42/keymaps/default/readme.md new file mode 100644 index 000000000..cf1a7bc43 --- /dev/null +++ b/keyboards/cassette42/keymaps/default/readme.md | |||
| @@ -0,0 +1 @@ | |||
| # The default keymap for cassette42 \ No newline at end of file | |||
diff --git a/keyboards/cassette42/readme.md b/keyboards/cassette42/readme.md new file mode 100644 index 000000000..2ba9a661b --- /dev/null +++ b/keyboards/cassette42/readme.md | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | # Cassette42 | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | An audio control pad with 4 switches and 2 rotary encoders. | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [monksoffunk](https://github.com/monksoffunk) [@monksoffunkJP](https://twitter.com/monksoffunkJP) | ||
| 8 | * Hardware Supported: Cassette 42 PCB | ||
| 9 | * Hardware Availability: [Yushakobo Shop](https://yushakobo.jp/shop/cassette42/) | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make cassette42:default | ||
| 14 | |||
| 15 | 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/cassette42/rules.mk b/keyboards/cassette42/rules.mk new file mode 100644 index 000000000..4fd8e384b --- /dev/null +++ b/keyboards/cassette42/rules.mk | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = caterina | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | ||
| 11 | MOUSEKEY_ENABLE = no # 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 = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 22 | AUDIO_ENABLE = no # Audio output | ||
| 23 | ENCODER_ENABLE = yes | ||
| 24 | OLED_DRIVER_ENABLE = yes | ||
| 25 | |||
| 26 | SRC += ./common/oled_helper.c | ||
