diff options
author | Sendy Aditya Suryana <sendzation@gmail.com> | 2020-12-23 02:20:09 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-22 11:20:09 -0800 |
commit | 3b06ab51e558695a040b59e1277709c67573e602 (patch) | |
tree | 2dbd80b8caa5f1e34072c3a81aacd830ac6199df | |
parent | 3dde3547366cc39ebccff59c30942450897580cd (diff) | |
download | qmk_firmware-3b06ab51e558695a040b59e1277709c67573e602.tar.gz qmk_firmware-3b06ab51e558695a040b59e1277709c67573e602.zip |
[Keyboard] Add Pix (#11154)
* Add nakal4x keyboard firmware
* Fix VIA config
* Setup OLED
* Rename to pix
* Rename via.json to info.json
* Update keyboards/sendyyeah/pix/config.h
remove obsolete value as suggested by drashna
Co-authored-by: Drashna Jaelre <drashna@live.com>
* Add GPL Like license header
* Remove unused bootloader list
* Change URL
* Update readme
* Delete via info.json
* Add GPL2+ license header on via keymap
* Update keyboards/sendyyeah/pix/rules.mk
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/sendyyeah/pix/keymaps/default/glcdfont.c
Co-authored-by: Ryan <fauxpark@gmail.com>
* Add GPL2+ license header on via keymap
* Add image
* Remove local drivers
* Remove unused method on keymap files
* Change project name on keymap readme files
* Update keyboards/sendyyeah/pix/rules.mk
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/sendyyeah/pix/readme.md
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/sendyyeah/pix/keymaps/default/glcdfont.c
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/sendyyeah/pix/keymaps/default/keymap.c
Co-authored-by: Ryan <fauxpark@gmail.com>
* Update keyboards/sendyyeah/pix/keymaps/via/keymap.c
Co-authored-by: Sendy Aditya Suryana <sendy.suryana@go-jek.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
-rw-r--r-- | keyboards/sendyyeah/pix/config.h | 63 | ||||
-rw-r--r-- | keyboards/sendyyeah/pix/info.json | 18 | ||||
-rw-r--r-- | keyboards/sendyyeah/pix/keymaps/default/glcdfont.c | 244 | ||||
-rw-r--r-- | keyboards/sendyyeah/pix/keymaps/default/keymap.c | 233 | ||||
-rw-r--r-- | keyboards/sendyyeah/pix/keymaps/default/readme.md | 7 | ||||
-rw-r--r-- | keyboards/sendyyeah/pix/keymaps/via/keymap.c | 233 | ||||
-rw-r--r-- | keyboards/sendyyeah/pix/keymaps/via/readme.md | 7 | ||||
-rw-r--r-- | keyboards/sendyyeah/pix/keymaps/via/rules.mk | 2 | ||||
-rw-r--r-- | keyboards/sendyyeah/pix/pix.c | 30 | ||||
-rw-r--r-- | keyboards/sendyyeah/pix/pix.h | 23 | ||||
-rw-r--r-- | keyboards/sendyyeah/pix/readme.md | 19 | ||||
-rw-r--r-- | keyboards/sendyyeah/pix/rules.mk | 24 |
12 files changed, 903 insertions, 0 deletions
diff --git a/keyboards/sendyyeah/pix/config.h b/keyboards/sendyyeah/pix/config.h new file mode 100644 index 000000000..a9c3080d8 --- /dev/null +++ b/keyboards/sendyyeah/pix/config.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /* Copyright 2020 sendyyeah | ||
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 "config_common.h" | ||
20 | |||
21 | /* USB Device descriptor parameter */ | ||
22 | #define VENDOR_ID 0x5359 | ||
23 | #define PRODUCT_ID 0x4e34 | ||
24 | #define DEVICE_VER 0x0001 | ||
25 | #define MANUFACTURER sendyyeah | ||
26 | #define PRODUCT Pix | ||
27 | |||
28 | /* key matrix size */ | ||
29 | #define MATRIX_ROWS 1 | ||
30 | #define MATRIX_COLS 5 | ||
31 | |||
32 | #define OLED_FONT_H "keymaps/default/glcdfont.c" | ||
33 | #define OLED_TIMEOUT 600000 // Turn of after 10 minutes | ||
34 | |||
35 | /* Keyboard Matrix Assignments */ | ||
36 | #define DIRECT_PINS { \ | ||
37 | { C6, D7, E6, B4, F6 }, \ | ||
38 | } | ||
39 | |||
40 | #define ENCODERS_PAD_A { B1 } | ||
41 | #define ENCODERS_PAD_B { B3 } | ||
42 | |||
43 | /* Set 0 if debouncing isn't needed */ | ||
44 | #define DEBOUNCE 5 | ||
45 | |||
46 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
47 | #define LOCKING_SUPPORT_ENABLE | ||
48 | |||
49 | /* Locking resynchronize hack */ | ||
50 | #define LOCKING_RESYNC_ENABLE | ||
51 | |||
52 | // #define RGB_DI_PIN B5 | ||
53 | // #ifdef RGB_DI_PIN | ||
54 | // #define RGBLED_NUM 5 | ||
55 | // #define RGBLIGHT_HUE_STEP 8 | ||
56 | // #define RGBLIGHT_SAT_STEP 8 | ||
57 | // #define RGBLIGHT_VAL_STEP 8 | ||
58 | // #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
59 | // #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
60 | // #define RGBLIGHT_ANIMATIONS | ||
61 | // #define RGBLIGHT_LAYERS | ||
62 | // #define RGBLIGHT_LAYER_BLINK | ||
63 | // #endif | ||
diff --git a/keyboards/sendyyeah/pix/info.json b/keyboards/sendyyeah/pix/info.json new file mode 100644 index 000000000..f93c3aae6 --- /dev/null +++ b/keyboards/sendyyeah/pix/info.json | |||
@@ -0,0 +1,18 @@ | |||
1 | { | ||
2 | "keyboard_name": "Pix", | ||
3 | "url": "https://github.com/sendz/pix", | ||
4 | "maintainer": "sendz", | ||
5 | "width": 5, | ||
6 | "height": 1, | ||
7 | "layouts": { | ||
8 | "LAYOUT": { | ||
9 | "layout": [ | ||
10 | {"x":0, "y":0}, | ||
11 | {"x":1, "y":0}, | ||
12 | {"x":2, "y":0}, | ||
13 | {"x":3, "y":0}, | ||
14 | {"x":4, "y":0} | ||
15 | ] | ||
16 | } | ||
17 | } | ||
18 | } | ||
diff --git a/keyboards/sendyyeah/pix/keymaps/default/glcdfont.c b/keyboards/sendyyeah/pix/keymaps/default/glcdfont.c new file mode 100644 index 000000000..7af69f796 --- /dev/null +++ b/keyboards/sendyyeah/pix/keymaps/default/glcdfont.c | |||
@@ -0,0 +1,244 @@ | |||
1 | /* Copyright 2020 sendyyeah | ||
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 "progmem.h" | ||
18 | |||
19 | const unsigned char font[] PROGMEM = { | ||
20 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
21 | 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, | ||
22 | 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, | ||
23 | 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, | ||
24 | 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, | ||
25 | 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, | ||
26 | 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, | ||
27 | 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, | ||
28 | 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, | ||
29 | 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, | ||
30 | 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, | ||
31 | 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, | ||
32 | 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, | ||
33 | 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, | ||
34 | 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, | ||
35 | 0x5A, 0x3C, 0x66, 0x3C, 0x5A, 0x00, | ||
36 | 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, | ||
37 | 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, | ||
38 | 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, | ||
39 | 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, | ||
40 | 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, | ||
41 | 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, | ||
42 | 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, | ||
43 | 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, | ||
44 | 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, | ||
45 | 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, | ||
46 | 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, | ||
47 | 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, | ||
48 | 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, | ||
49 | 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, | ||
50 | 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, | ||
51 | 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, | ||
52 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
53 | 0x00, 0x00, 0x5E, 0x00, 0x00, 0x00, | ||
54 | 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, | ||
55 | 0x14, 0x3E, 0x14, 0x3E, 0x14, 0x00, | ||
56 | 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, | ||
57 | 0x26, 0x16, 0x08, 0x34, 0x32, 0x00, | ||
58 | 0x36, 0x4A, 0x56, 0x20, 0x50, 0x00, | ||
59 | 0x00, 0x0A, 0x06, 0x00, 0x00, 0x00, | ||
60 | 0x00, 0x3C, 0x42, 0x00, 0x00, 0x00, | ||
61 | 0x00, 0x00, 0x42, 0x3C, 0x00, 0x00, | ||
62 | 0x2A, 0x1C, 0x3E, 0x1C, 0x2A, 0x00, | ||
63 | 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, | ||
64 | 0x00, 0xA0, 0x60, 0x00, 0x00, 0x00, | ||
65 | 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, | ||
66 | 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, | ||
67 | 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, | ||
68 | 0x3C, 0x42, 0x42, 0x42, 0x3C, 0x00, | ||
69 | 0x00, 0x44, 0x7E, 0x40, 0x00, 0x00, | ||
70 | 0x64, 0x52, 0x52, 0x52, 0x4C, 0x00, | ||
71 | 0x22, 0x42, 0x4A, 0x4A, 0x36, 0x00, | ||
72 | 0x38, 0x24, 0x22, 0x7E, 0x20, 0x00, | ||
73 | 0x2E, 0x4A, 0x4A, 0x4A, 0x32, 0x00, | ||
74 | 0x3C, 0x4A, 0x4A, 0x4A, 0x32, 0x00, | ||
75 | 0x02, 0x02, 0x62, 0x1A, 0x06, 0x00, | ||
76 | 0x34, 0x4A, 0x4A, 0x4A, 0x34, 0x00, | ||
77 | 0x4C, 0x52, 0x52, 0x52, 0x3C, 0x00, | ||
78 | 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, | ||
79 | 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, | ||
80 | 0x00, 0x08, 0x14, 0x22, 0x00, 0x00, | ||
81 | 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, | ||
82 | 0x00, 0x00, 0x22, 0x14, 0x08, 0x00, | ||
83 | 0x00, 0x04, 0x52, 0x0A, 0x04, 0x00, | ||
84 | 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, | ||
85 | 0x7C, 0x12, 0x12, 0x12, 0x7C, 0x00, | ||
86 | 0x7E, 0x4A, 0x4A, 0x4A, 0x34, 0x00, | ||
87 | 0x3C, 0x42, 0x42, 0x42, 0x42, 0x00, | ||
88 | 0x7E, 0x42, 0x42, 0x42, 0x3C, 0x00, | ||
89 | 0x7E, 0x4A, 0x4A, 0x4A, 0x4A, 0x00, | ||
90 | 0x7E, 0x0A, 0x0A, 0x0A, 0x0A, 0x00, | ||
91 | 0x3C, 0x42, 0x42, 0x52, 0x72, 0x00, | ||
92 | 0x7E, 0x08, 0x08, 0x08, 0x7E, 0x00, | ||
93 | 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, | ||
94 | 0x20, 0x40, 0x42, 0x3E, 0x00, 0x00, | ||
95 | 0x7E, 0x10, 0x08, 0x14, 0x62, 0x00, | ||
96 | 0x7E, 0x40, 0x40, 0x40, 0x40, 0x00, | ||
97 | 0x7E, 0x04, 0x08, 0x04, 0x7E, 0x00, | ||
98 | 0x7E, 0x04, 0x08, 0x10, 0x7E, 0x00, | ||
99 | 0x3C, 0x42, 0x42, 0x42, 0x3C, 0x00, | ||
100 | 0x7E, 0x12, 0x12, 0x12, 0x0C, 0x00, | ||
101 | 0x3C, 0x42, 0x52, 0x22, 0x5C, 0x00, | ||
102 | 0x7C, 0x12, 0x12, 0x32, 0x5E, 0x00, | ||
103 | 0x4C, 0x4A, 0x4A, 0x4A, 0x32, 0x00, | ||
104 | 0x02, 0x02, 0x7E, 0x02, 0x02, 0x00, | ||
105 | 0x3E, 0x40, 0x40, 0x40, 0x3E, 0x00, | ||
106 | 0x1E, 0x20, 0x40, 0x20, 0x1E, 0x00, | ||
107 | 0x3E, 0x40, 0x38, 0x40, 0x3E, 0x00, | ||
108 | 0x62, 0x14, 0x08, 0x14, 0x62, 0x00, | ||
109 | 0x06, 0x08, 0x70, 0x08, 0x06, 0x00, | ||
110 | 0x62, 0x52, 0x4A, 0x46, 0x42, 0x00, | ||
111 | 0x00, 0x7E, 0x42, 0x42, 0x00, 0x00, | ||
112 | 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, | ||
113 | 0x00, 0x00, 0x42, 0x42, 0x7E, 0x00, | ||
114 | 0x08, 0x04, 0x02, 0x04, 0x08, 0x00, | ||
115 | 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, | ||
116 | 0x00, 0x00, 0x06, 0x0A, 0x00, 0x00, | ||
117 | 0x60, 0x54, 0x54, 0x54, 0x7C, 0x00, | ||
118 | 0x7E, 0x48, 0x48, 0x48, 0x30, 0x00, | ||
119 | 0x30, 0x48, 0x48, 0x48, 0x48, 0x00, | ||
120 | 0x30, 0x48, 0x48, 0x48, 0x7E, 0x00, | ||
121 | 0x38, 0x54, 0x54, 0x54, 0x58, 0x00, | ||
122 | 0x00, 0x08, 0x7C, 0x0A, 0x00, 0x00, | ||
123 | 0x98, 0xA4, 0xA4, 0xA4, 0x78, 0x00, | ||
124 | 0x7E, 0x08, 0x08, 0x08, 0x70, 0x00, | ||
125 | 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00, | ||
126 | 0x20, 0x40, 0x40, 0x3A, 0x00, 0x00, | ||
127 | 0x7E, 0x10, 0x28, 0x44, 0x00, 0x00, | ||
128 | 0x00, 0x00, 0x7E, 0x40, 0x00, 0x00, | ||
129 | 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, | ||
130 | 0x7C, 0x04, 0x04, 0x04, 0x78, 0x00, | ||
131 | 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, | ||
132 | 0xFC, 0x24, 0x24, 0x24, 0x18, 0x00, | ||
133 | 0x18, 0x24, 0x24, 0x24, 0xFC, 0x00, | ||
134 | 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, | ||
135 | 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, | ||
136 | 0x00, 0x04, 0x7E, 0x44, 0x00, 0x00, | ||
137 | 0x3C, 0x40, 0x40, 0x40, 0x7C, 0x00, | ||
138 | 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, | ||
139 | 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, | ||
140 | 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, | ||
141 | 0x5C, 0xA0, 0xA0, 0xA0, 0x7C, 0x00, | ||
142 | 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, | ||
143 | 0xFE, 0xC1, 0xC1, 0xC9, 0xC5, 0xDD, | ||
144 | 0xC5, 0xC9, 0xC1, 0xC1, 0xFE, 0x00, | ||
145 | 0xFC, 0xFE, 0xFE, 0xEE, 0xF6, 0xC6, | ||
146 | 0xF6, 0xEE, 0xFE, 0xFE, 0xFC, 0x00, | ||
147 | 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, | ||
148 | 0x7E, 0xFF, 0x81, 0xBF, 0xBF, 0xBF, | ||
149 | 0xBF, 0xF9, 0xF7, 0x8F, 0xF7, 0xF9, | ||
150 | 0xFF, 0x83, 0xED, 0xED, 0xCD, 0xA3, | ||
151 | 0xFF, 0x7E, 0x00, 0x00, 0x00, 0x00, | ||
152 | 0x7E, 0xFF, 0x81, 0xB5, 0xB5, 0xB5, | ||
153 | 0xB5, 0xFF, 0x81, 0xFB, 0xF7, 0xEF, | ||
154 | 0x81, 0xFF, 0xC3, 0xBD, 0xBD, 0xBD, | ||
155 | 0xBD, 0xFF, 0x7E, 0x00, 0x00, 0x00, | ||
156 | 0xFE, 0x01, 0xF1, 0xF1, 0x09, 0x05, | ||
157 | 0xFD, 0x91, 0x61, 0x91, 0x01, 0xFE, | ||
158 | 0xFE, 0x01, 0xFD, 0xF9, 0xF1, 0x61, | ||
159 | 0x01, 0xFD, 0x01, 0xFD, 0x01, 0xFE, | ||
160 | 0xFE, 0x01, 0x61, 0xF1, 0xF9, 0xFD, | ||
161 | 0x61, 0xF1, 0xF9, 0xFD, 0x01, 0xFE, | ||
162 | 0xFE, 0x01, 0xFD, 0xF9, 0xF1, 0x61, | ||
163 | 0xFD, 0xF9, 0xF1, 0x61, 0x01, 0xFE, | ||
164 | 0xFE, 0x01, 0x01, 0xFD, 0x01, 0x61, | ||
165 | 0xF1, 0xF9, 0xFD, 0x01, 0x01, 0xFE, | ||
166 | 0xFE, 0x01, 0x01, 0xFD, 0xF9, 0xF1, | ||
167 | 0x61, 0x01, 0xFD, 0x01, 0x01, 0xFE, | ||
168 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
169 | 0xF0, 0x08, 0x04, 0xC4, 0x24, 0x24, | ||
170 | 0x24, 0xC4, 0x04, 0x08, 0xF0, 0x00, | ||
171 | 0xF0, 0xF8, 0xFC, 0x3C, 0xDC, 0xDC, | ||
172 | 0xDC, 0x3C, 0xFC, 0xF8, 0xF0, 0x00, | ||
173 | 0xFE, 0xC1, 0xC1, 0xC9, 0xC5, 0xDD, | ||
174 | 0xC5, 0xC9, 0xC1, 0xC1, 0xFE, 0x00, | ||
175 | 0xFC, 0xFE, 0xFE, 0xEE, 0xF6, 0xC6, | ||
176 | 0xF6, 0xEE, 0xFE, 0xFE, 0xFC, 0x00, | ||
177 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
178 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
179 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
180 | 0xFE, 0x01, 0x01, 0xF9, 0xF9, 0xF9, | ||
181 | 0xF9, 0xF9, 0xF9, 0x01, 0x01, 0xFE, | ||
182 | 0xFE, 0x01, 0xE1, 0xE1, 0x11, 0x09, | ||
183 | 0xF9, 0x01, 0x09, 0xF1, 0x01, 0xFE, | ||
184 | 0xFE, 0x01, 0x01, 0x21, 0x31, 0xF9, | ||
185 | 0xF9, 0x31, 0x21, 0x01, 0x01, 0xFE, | ||
186 | 0xFE, 0x01, 0x01, 0x41, 0xC1, 0xF9, | ||
187 | 0xF9, 0xC1, 0x41, 0x01, 0x01, 0xFE, | ||
188 | 0x07, 0x08, 0x08, 0x08, 0x09, 0x0A, | ||
189 | 0x0B, 0x08, 0x08, 0x08, 0x08, 0x07, | ||
190 | 0x07, 0x08, 0x0B, 0x09, 0x08, 0x08, | ||
191 | 0x08, 0x0B, 0x08, 0x0B, 0x08, 0x07, | ||
192 | 0x07, 0x08, 0x08, 0x08, 0x09, 0x0B, | ||
193 | 0x08, 0x08, 0x09, 0x0B, 0x08, 0x07, | ||
194 | 0x07, 0x08, 0x0B, 0x09, 0x08, 0x08, | ||
195 | 0x0B, 0x09, 0x08, 0x08, 0x08, 0x07, | ||
196 | 0x07, 0x08, 0x08, 0x0B, 0x08, 0x08, | ||
197 | 0x08, 0x09, 0x0B, 0x08, 0x08, 0x07, | ||
198 | 0x07, 0x08, 0x08, 0x0B, 0x09, 0x08, | ||
199 | 0x08, 0x08, 0x0B, 0x08, 0x08, 0x07, | ||
200 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
201 | 0x07, 0x08, 0x10, 0x13, 0x11, 0x11, | ||
202 | 0x11, 0x13, 0x10, 0x08, 0x07, 0x00, | ||
203 | 0x07, 0x0F, 0x1F, 0x1C, 0x1E, 0x1E, | ||
204 | 0x1E, 0x1C, 0x1F, 0x0F, 0x07, 0x00, | ||
205 | 0xFE, 0x01, 0xF1, 0xF9, 0xFD, 0xFD, | ||
206 | 0x05, 0x05, 0x09, 0xF1, 0x01, 0xFE, | ||
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 | 0x07, 0x08, 0x08, 0x09, 0x09, 0x09, | ||
213 | 0x09, 0x09, 0x09, 0x08, 0x08, 0x07, | ||
214 | 0x07, 0x08, 0x08, 0x08, 0x09, 0x0A, | ||
215 | 0x0B, 0x08, 0x09, 0x08, 0x08, 0x07, | ||
216 | 0x07, 0x08, 0x08, 0x08, 0x08, 0x09, | ||
217 | 0x09, 0x08, 0x08, 0x08, 0x08, 0x07, | ||
218 | 0x07, 0x08, 0x08, 0x08, 0x08, 0x09, | ||
219 | 0x09, 0x08, 0x08, 0x08, 0x08, 0x07, | ||
220 | 0x00, 0x00, 0x00, 0x04, 0x06, 0x3F, | ||
221 | 0x3F, 0x06, 0x04, 0x00, 0x00, 0x00, | ||
222 | 0x00, 0x00, 0x00, 0x08, 0x18, 0x3F, | ||
223 | 0x3F, 0x18, 0x08, 0x00, 0x00, 0x00, | ||
224 | 0x1C, 0x1C, 0x22, 0x41, 0x7F, 0x00, | ||
225 | 0x10, 0x18, 0x1C, 0x18, 0x10, 0x00, | ||
226 | 0x1C, 0x1C, 0x22, 0x41, 0x7F, 0x00, | ||
227 | 0x04, 0x0C, 0x1C, 0x0C, 0x04, 0x00, | ||
228 | 0x1C, 0x3E, 0x3E, 0x22, 0x1C, 0x00, | ||
229 | 0x10, 0x18, 0x1C, 0x18, 0x10, 0x00, | ||
230 | 0x1C, 0x3E, 0x3E, 0x22, 0x1C, 0x00, | ||
231 | 0x04, 0x0C, 0x1C, 0x0C, 0x04, 0x00, | ||
232 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
233 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
234 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
235 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
236 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
237 | 0x07, 0x08, 0x08, 0x09, 0x0B, 0x0B, | ||
238 | 0x0A, 0x0A, 0x09, 0x08, 0x08, 0x07, | ||
239 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
240 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
241 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
242 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
243 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
244 | }; | ||
diff --git a/keyboards/sendyyeah/pix/keymaps/default/keymap.c b/keyboards/sendyyeah/pix/keymaps/default/keymap.c new file mode 100644 index 000000000..ab227b9ac --- /dev/null +++ b/keyboards/sendyyeah/pix/keymaps/default/keymap.c | |||
@@ -0,0 +1,233 @@ | |||
1 | /* Copyright 2020 sendyyeah | ||
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 QMK_KEYBOARD_H | ||
18 | |||
19 | #define LAYERNUM 2 | ||
20 | |||
21 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
22 | [0] = LAYOUT(KC_MUTE, KC_MPLY, KC_MPRV, KC_MNXT, TO(1)), | ||
23 | [1] = LAYOUT(KC_TRNS, KC_MSTP, KC_MRWD, KC_MFFD, TO(0)) | ||
24 | }; | ||
25 | |||
26 | int get_icon_start_position(int key_position) { | ||
27 | if (key_position == 1) { | ||
28 | return 0; | ||
29 | } else { | ||
30 | return (key_position - 1) * 3; | ||
31 | } | ||
32 | } | ||
33 | |||
34 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
35 | static const char PROGMEM UP_ICON[] = {0x1E,0}; | ||
36 | static const char PROGMEM DOWN_ICON[] = {0x1F,0}; | ||
37 | if (index == 0) { | ||
38 | if (layer_state_is(0)) { | ||
39 | if (clockwise) { | ||
40 | tap_code(KC_VOLU); | ||
41 | oled_set_cursor(get_icon_start_position(7), 3); | ||
42 | oled_write_P(PSTR(" "), false); | ||
43 | oled_set_cursor(get_icon_start_position(7), 2); | ||
44 | oled_write_P(UP_ICON, false); | ||
45 | } else { | ||
46 | tap_code(KC_VOLD); | ||
47 | |||
48 | oled_set_cursor(get_icon_start_position(7), 2); | ||
49 | oled_write_P(PSTR(" "), false); | ||
50 | oled_set_cursor(get_icon_start_position(7), 3); | ||
51 | oled_write_P(DOWN_ICON, false); | ||
52 | } | ||
53 | } else { | ||
54 | if (clockwise) { | ||
55 | tap_code(KC_BRIU); | ||
56 | oled_set_cursor(get_icon_start_position(7), 3); | ||
57 | oled_write_P(PSTR(" "), false); | ||
58 | oled_set_cursor(get_icon_start_position(7), 2); | ||
59 | oled_write_P(UP_ICON, false); | ||
60 | } else { | ||
61 | tap_code(KC_BRID); | ||
62 | oled_set_cursor(get_icon_start_position(7), 2); | ||
63 | oled_write_P(PSTR(" "), false); | ||
64 | oled_set_cursor(get_icon_start_position(7), 3); | ||
65 | oled_write_P(DOWN_ICON, false); | ||
66 | } | ||
67 | } | ||
68 | } | ||
69 | } | ||
70 | |||
71 | #ifdef OLED_DRIVER_ENABLE | ||
72 | |||
73 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
74 | return OLED_ROTATION_180; | ||
75 | } | ||
76 | |||
77 | void draw_mute_icon(int key_position, int row) { | ||
78 | static const char PROGMEM ICON_MUTE_0[] = {0x88, 0x89, 0}; | ||
79 | static const char PROGMEM ICON_MUTE_1[] = {0xA8, 0xA9, 0}; | ||
80 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
81 | oled_write_P(ICON_MUTE_0, false); | ||
82 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
83 | oled_write_P(ICON_MUTE_1, false); | ||
84 | } | ||
85 | |||
86 | void draw_play_icon(int key_position, int row) { | ||
87 | static const char PROGMEM ICON_PLAY_0[] = {0x8A, 0x8B, 0}; | ||
88 | static const char PROGMEM ICON_PLAY_1[] = {0xAA, 0xAB, 0}; | ||
89 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
90 | oled_write_P(ICON_PLAY_0, false); | ||
91 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
92 | oled_write_P(ICON_PLAY_1, false); | ||
93 | } | ||
94 | |||
95 | void draw_rewind_icon(int key_position, int row) { | ||
96 | static const char PROGMEM ICON_REWIND_0[] = {0x8C, 0x8D, 0}; | ||
97 | static const char PROGMEM ICON_REWIND_1[] = {0xAC, 0xAD, 0}; | ||
98 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
99 | oled_write_P(ICON_REWIND_0, false); | ||
100 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
101 | oled_write_P(ICON_REWIND_1, false); | ||
102 | } | ||
103 | |||
104 | void draw_fast_forward_icon(int key_position, int row) { | ||
105 | static const char PROGMEM ICON_FAST_FORWARD_0[] = {0x8E, 0x8F, 0}; | ||
106 | static const char PROGMEM ICON_FAST_FORWARD_1[] = {0xAE, 0xAF, 0}; | ||
107 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
108 | oled_write_P(ICON_FAST_FORWARD_0, false); | ||
109 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
110 | oled_write_P(ICON_FAST_FORWARD_1, false); | ||
111 | } | ||
112 | |||
113 | void draw_prev_icon(int key_position, int row) { | ||
114 | static const char PROGMEM ICON_PREV_0[] = {0x90, 0x91, 0}; | ||
115 | static const char PROGMEM ICON_PREV_1[] = {0xB0, 0xB1, 0}; | ||
116 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
117 | oled_write_P(ICON_PREV_0, false); | ||
118 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
119 | oled_write_P(ICON_PREV_1, false); | ||
120 | } | ||
121 | |||
122 | void draw_next_icon(int key_position, int row) { | ||
123 | static const char PROGMEM ICON_NEXT_0[] = {0x92, 0x93, 0}; | ||
124 | static const char PROGMEM ICON_NEXT_1[] = {0xB2, 0xB3, 0}; | ||
125 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
126 | oled_write_P(ICON_NEXT_0, false); | ||
127 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
128 | oled_write_P(ICON_NEXT_1, false); | ||
129 | } | ||
130 | |||
131 | void draw_stop_icon(int key_position, int row) { | ||
132 | static const char PROGMEM ICON_STOP_0[] = {0xA0, 0xA1, 0}; | ||
133 | static const char PROGMEM ICON_STOP_1[] = {0xC0, 0xC1, 0}; | ||
134 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
135 | oled_write_P(ICON_STOP_0, false); | ||
136 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
137 | oled_write_P(ICON_STOP_1, false); | ||
138 | } | ||
139 | |||
140 | void draw_sound_icon(int key_position, int row) { | ||
141 | static const char PROGMEM ICON_SOUND_0[] = {0xA2, 0xA3, 0}; | ||
142 | static const char PROGMEM ICON_SOUND_1[] = {0xC2, 0xC3, 0}; | ||
143 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
144 | oled_write_P(ICON_SOUND_0, false); | ||
145 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
146 | oled_write_P(ICON_SOUND_1, false); | ||
147 | } | ||
148 | |||
149 | void draw_raise_icon(int key_position, int row) { | ||
150 | static const char PROGMEM ICON_RAISE_0[] = {0xA4, 0xA5, 0}; | ||
151 | static const char PROGMEM ICON_RAISE_1[] = {0xC4, 0xC5, 0}; | ||
152 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
153 | oled_write_P(ICON_RAISE_0, false); | ||
154 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
155 | oled_write_P(ICON_RAISE_1, false); | ||
156 | } | ||
157 | |||
158 | void draw_lower_icon(int key_position, int row) { | ||
159 | static const char PROGMEM ICON_LOWER_0[] = {0xA6, 0xA7, 0}; | ||
160 | static const char PROGMEM ICON_LOWER_1[] = {0xC6, 0xC7, 0}; | ||
161 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
162 | oled_write_P(ICON_LOWER_0, false); | ||
163 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
164 | oled_write_P(ICON_LOWER_1, false); | ||
165 | } | ||
166 | |||
167 | void draw_brightness_icon(int key_position, int row) { | ||
168 | static const char PROGMEM ICON_BRIGHTNESS_0[] = {0xB9, 0xBA, 0}; | ||
169 | static const char PROGMEM ICON_BRIGHTNESS_1[] = {0xD9, 0xDA, 0}; | ||
170 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
171 | oled_write_P(ICON_BRIGHTNESS_0, false); | ||
172 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
173 | oled_write_P(ICON_BRIGHTNESS_1, false); | ||
174 | } | ||
175 | |||
176 | void oled_task_user(void) { | ||
177 | // Host Keyboard Layer Status | ||
178 | static const char PROGMEM ICON_LAYER[] = {0x80, 0x81, 0x82, 0x83, 0}; | ||
179 | static const char PROGMEM ICON_ENCODER[] = {0x84, 0x85, 0x86, 0x87, 0}; | ||
180 | // static const char PROGMEM ICON_MUTE[] = {0x88, 0x89,0xA9, 0xAA}; | ||
181 | |||
182 | oled_write_P(ICON_LAYER, false); | ||
183 | |||
184 | switch (get_highest_layer(layer_state)) { | ||
185 | case 0: | ||
186 | oled_write_P(PSTR("1ST "), false); | ||
187 | break; | ||
188 | case 1: | ||
189 | oled_write_P(PSTR("2ND "), false); | ||
190 | break; | ||
191 | default: | ||
192 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
193 | oled_write_P(PSTR("UNDF"), false); | ||
194 | } | ||
195 | |||
196 | oled_write_P(PSTR(" "), false); | ||
197 | |||
198 | oled_write_P(ICON_ENCODER, false); | ||
199 | switch(get_highest_layer(layer_state)) { | ||
200 | case 0: | ||
201 | oled_write_P(PSTR("VOL "), false); | ||
202 | break; | ||
203 | case 1: | ||
204 | oled_write_P(PSTR("BRGT"), false); | ||
205 | break; | ||
206 | default: | ||
207 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
208 | oled_write_P(PSTR("UNDF"), false); | ||
209 | } | ||
210 | |||
211 | switch(get_highest_layer(layer_state)) { | ||
212 | default: | ||
213 | case 0: | ||
214 | draw_mute_icon(1, 2); | ||
215 | draw_play_icon(2, 2); | ||
216 | draw_prev_icon(3, 2); | ||
217 | draw_next_icon(4, 2); | ||
218 | draw_raise_icon(5, 2); | ||
219 | draw_sound_icon(6, 2); | ||
220 | break; | ||
221 | case 1: | ||
222 | draw_mute_icon(1, 2); | ||
223 | draw_stop_icon(2, 2); | ||
224 | draw_rewind_icon(3, 2); | ||
225 | draw_fast_forward_icon(4, 2); | ||
226 | draw_lower_icon(5, 2); | ||
227 | draw_brightness_icon(6, 2); | ||
228 | break; | ||
229 | } | ||
230 | |||
231 | } | ||
232 | |||
233 | #endif | ||
diff --git a/keyboards/sendyyeah/pix/keymaps/default/readme.md b/keyboards/sendyyeah/pix/keymaps/default/readme.md new file mode 100644 index 000000000..ed2163ac9 --- /dev/null +++ b/keyboards/sendyyeah/pix/keymaps/default/readme.md | |||
@@ -0,0 +1,7 @@ | |||
1 | # Default Pix Layout | ||
2 | |||
3 | The default layer of Pix | ||
4 | ``` | ||
5 | Layer 0: Mute, Play / Pause, Previous, Next, To Next Layer | ||
6 | Layer 1: ____, Print Screen, ________, ____, To Previous Layer | ||
7 | ``` | ||
diff --git a/keyboards/sendyyeah/pix/keymaps/via/keymap.c b/keyboards/sendyyeah/pix/keymaps/via/keymap.c new file mode 100644 index 000000000..ab227b9ac --- /dev/null +++ b/keyboards/sendyyeah/pix/keymaps/via/keymap.c | |||
@@ -0,0 +1,233 @@ | |||
1 | /* Copyright 2020 sendyyeah | ||
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 QMK_KEYBOARD_H | ||
18 | |||
19 | #define LAYERNUM 2 | ||
20 | |||
21 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
22 | [0] = LAYOUT(KC_MUTE, KC_MPLY, KC_MPRV, KC_MNXT, TO(1)), | ||
23 | [1] = LAYOUT(KC_TRNS, KC_MSTP, KC_MRWD, KC_MFFD, TO(0)) | ||
24 | }; | ||
25 | |||
26 | int get_icon_start_position(int key_position) { | ||
27 | if (key_position == 1) { | ||
28 | return 0; | ||
29 | } else { | ||
30 | return (key_position - 1) * 3; | ||
31 | } | ||
32 | } | ||
33 | |||
34 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
35 | static const char PROGMEM UP_ICON[] = {0x1E,0}; | ||
36 | static const char PROGMEM DOWN_ICON[] = {0x1F,0}; | ||
37 | if (index == 0) { | ||
38 | if (layer_state_is(0)) { | ||
39 | if (clockwise) { | ||
40 | tap_code(KC_VOLU); | ||
41 | oled_set_cursor(get_icon_start_position(7), 3); | ||
42 | oled_write_P(PSTR(" "), false); | ||
43 | oled_set_cursor(get_icon_start_position(7), 2); | ||
44 | oled_write_P(UP_ICON, false); | ||
45 | } else { | ||
46 | tap_code(KC_VOLD); | ||
47 | |||
48 | oled_set_cursor(get_icon_start_position(7), 2); | ||
49 | oled_write_P(PSTR(" "), false); | ||
50 | oled_set_cursor(get_icon_start_position(7), 3); | ||
51 | oled_write_P(DOWN_ICON, false); | ||
52 | } | ||
53 | } else { | ||
54 | if (clockwise) { | ||
55 | tap_code(KC_BRIU); | ||
56 | oled_set_cursor(get_icon_start_position(7), 3); | ||
57 | oled_write_P(PSTR(" "), false); | ||
58 | oled_set_cursor(get_icon_start_position(7), 2); | ||
59 | oled_write_P(UP_ICON, false); | ||
60 | } else { | ||
61 | tap_code(KC_BRID); | ||
62 | oled_set_cursor(get_icon_start_position(7), 2); | ||
63 | oled_write_P(PSTR(" "), false); | ||
64 | oled_set_cursor(get_icon_start_position(7), 3); | ||
65 | oled_write_P(DOWN_ICON, false); | ||
66 | } | ||
67 | } | ||
68 | } | ||
69 | } | ||
70 | |||
71 | #ifdef OLED_DRIVER_ENABLE | ||
72 | |||
73 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
74 | return OLED_ROTATION_180; | ||
75 | } | ||
76 | |||
77 | void draw_mute_icon(int key_position, int row) { | ||
78 | static const char PROGMEM ICON_MUTE_0[] = {0x88, 0x89, 0}; | ||
79 | static const char PROGMEM ICON_MUTE_1[] = {0xA8, 0xA9, 0}; | ||
80 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
81 | oled_write_P(ICON_MUTE_0, false); | ||
82 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
83 | oled_write_P(ICON_MUTE_1, false); | ||
84 | } | ||
85 | |||
86 | void draw_play_icon(int key_position, int row) { | ||
87 | static const char PROGMEM ICON_PLAY_0[] = {0x8A, 0x8B, 0}; | ||
88 | static const char PROGMEM ICON_PLAY_1[] = {0xAA, 0xAB, 0}; | ||
89 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
90 | oled_write_P(ICON_PLAY_0, false); | ||
91 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
92 | oled_write_P(ICON_PLAY_1, false); | ||
93 | } | ||
94 | |||
95 | void draw_rewind_icon(int key_position, int row) { | ||
96 | static const char PROGMEM ICON_REWIND_0[] = {0x8C, 0x8D, 0}; | ||
97 | static const char PROGMEM ICON_REWIND_1[] = {0xAC, 0xAD, 0}; | ||
98 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
99 | oled_write_P(ICON_REWIND_0, false); | ||
100 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
101 | oled_write_P(ICON_REWIND_1, false); | ||
102 | } | ||
103 | |||
104 | void draw_fast_forward_icon(int key_position, int row) { | ||
105 | static const char PROGMEM ICON_FAST_FORWARD_0[] = {0x8E, 0x8F, 0}; | ||
106 | static const char PROGMEM ICON_FAST_FORWARD_1[] = {0xAE, 0xAF, 0}; | ||
107 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
108 | oled_write_P(ICON_FAST_FORWARD_0, false); | ||
109 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
110 | oled_write_P(ICON_FAST_FORWARD_1, false); | ||
111 | } | ||
112 | |||
113 | void draw_prev_icon(int key_position, int row) { | ||
114 | static const char PROGMEM ICON_PREV_0[] = {0x90, 0x91, 0}; | ||
115 | static const char PROGMEM ICON_PREV_1[] = {0xB0, 0xB1, 0}; | ||
116 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
117 | oled_write_P(ICON_PREV_0, false); | ||
118 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
119 | oled_write_P(ICON_PREV_1, false); | ||
120 | } | ||
121 | |||
122 | void draw_next_icon(int key_position, int row) { | ||
123 | static const char PROGMEM ICON_NEXT_0[] = {0x92, 0x93, 0}; | ||
124 | static const char PROGMEM ICON_NEXT_1[] = {0xB2, 0xB3, 0}; | ||
125 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
126 | oled_write_P(ICON_NEXT_0, false); | ||
127 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
128 | oled_write_P(ICON_NEXT_1, false); | ||
129 | } | ||
130 | |||
131 | void draw_stop_icon(int key_position, int row) { | ||
132 | static const char PROGMEM ICON_STOP_0[] = {0xA0, 0xA1, 0}; | ||
133 | static const char PROGMEM ICON_STOP_1[] = {0xC0, 0xC1, 0}; | ||
134 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
135 | oled_write_P(ICON_STOP_0, false); | ||
136 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
137 | oled_write_P(ICON_STOP_1, false); | ||
138 | } | ||
139 | |||
140 | void draw_sound_icon(int key_position, int row) { | ||
141 | static const char PROGMEM ICON_SOUND_0[] = {0xA2, 0xA3, 0}; | ||
142 | static const char PROGMEM ICON_SOUND_1[] = {0xC2, 0xC3, 0}; | ||
143 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
144 | oled_write_P(ICON_SOUND_0, false); | ||
145 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
146 | oled_write_P(ICON_SOUND_1, false); | ||
147 | } | ||
148 | |||
149 | void draw_raise_icon(int key_position, int row) { | ||
150 | static const char PROGMEM ICON_RAISE_0[] = {0xA4, 0xA5, 0}; | ||
151 | static const char PROGMEM ICON_RAISE_1[] = {0xC4, 0xC5, 0}; | ||
152 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
153 | oled_write_P(ICON_RAISE_0, false); | ||
154 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
155 | oled_write_P(ICON_RAISE_1, false); | ||
156 | } | ||
157 | |||
158 | void draw_lower_icon(int key_position, int row) { | ||
159 | static const char PROGMEM ICON_LOWER_0[] = {0xA6, 0xA7, 0}; | ||
160 | static const char PROGMEM ICON_LOWER_1[] = {0xC6, 0xC7, 0}; | ||
161 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
162 | oled_write_P(ICON_LOWER_0, false); | ||
163 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
164 | oled_write_P(ICON_LOWER_1, false); | ||
165 | } | ||
166 | |||
167 | void draw_brightness_icon(int key_position, int row) { | ||
168 | static const char PROGMEM ICON_BRIGHTNESS_0[] = {0xB9, 0xBA, 0}; | ||
169 | static const char PROGMEM ICON_BRIGHTNESS_1[] = {0xD9, 0xDA, 0}; | ||
170 | oled_set_cursor(get_icon_start_position(key_position), row); | ||
171 | oled_write_P(ICON_BRIGHTNESS_0, false); | ||
172 | oled_set_cursor(get_icon_start_position(key_position), row + 1); | ||
173 | oled_write_P(ICON_BRIGHTNESS_1, false); | ||
174 | } | ||
175 | |||
176 | void oled_task_user(void) { | ||
177 | // Host Keyboard Layer Status | ||
178 | static const char PROGMEM ICON_LAYER[] = {0x80, 0x81, 0x82, 0x83, 0}; | ||
179 | static const char PROGMEM ICON_ENCODER[] = {0x84, 0x85, 0x86, 0x87, 0}; | ||
180 | // static const char PROGMEM ICON_MUTE[] = {0x88, 0x89,0xA9, 0xAA}; | ||
181 | |||
182 | oled_write_P(ICON_LAYER, false); | ||
183 | |||
184 | switch (get_highest_layer(layer_state)) { | ||
185 | case 0: | ||
186 | oled_write_P(PSTR("1ST "), false); | ||
187 | break; | ||
188 | case 1: | ||
189 | oled_write_P(PSTR("2ND "), false); | ||
190 | break; | ||
191 | default: | ||
192 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
193 | oled_write_P(PSTR("UNDF"), false); | ||
194 | } | ||
195 | |||
196 | oled_write_P(PSTR(" "), false); | ||
197 | |||
198 | oled_write_P(ICON_ENCODER, false); | ||
199 | switch(get_highest_layer(layer_state)) { | ||
200 | case 0: | ||
201 | oled_write_P(PSTR("VOL "), false); | ||
202 | break; | ||
203 | case 1: | ||
204 | oled_write_P(PSTR("BRGT"), false); | ||
205 | break; | ||
206 | default: | ||
207 | // Or use the write_ln shortcut over adding '\n' to the end of your string | ||
208 | oled_write_P(PSTR("UNDF"), false); | ||
209 | } | ||
210 | |||
211 | switch(get_highest_layer(layer_state)) { | ||
212 | default: | ||
213 | case 0: | ||
214 | draw_mute_icon(1, 2); | ||
215 | draw_play_icon(2, 2); | ||
216 | draw_prev_icon(3, 2); | ||
217 | draw_next_icon(4, 2); | ||
218 | draw_raise_icon(5, 2); | ||
219 | draw_sound_icon(6, 2); | ||
220 | break; | ||
221 | case 1: | ||
222 | draw_mute_icon(1, 2); | ||
223 | draw_stop_icon(2, 2); | ||
224 | draw_rewind_icon(3, 2); | ||
225 | draw_fast_forward_icon(4, 2); | ||
226 | draw_lower_icon(5, 2); | ||
227 | draw_brightness_icon(6, 2); | ||
228 | break; | ||
229 | } | ||
230 | |||
231 | } | ||
232 | |||
233 | #endif | ||
diff --git a/keyboards/sendyyeah/pix/keymaps/via/readme.md b/keyboards/sendyyeah/pix/keymaps/via/readme.md new file mode 100644 index 000000000..9343c1f1d --- /dev/null +++ b/keyboards/sendyyeah/pix/keymaps/via/readme.md | |||
@@ -0,0 +1,7 @@ | |||
1 | # Default Pix Layout with VIA Support | ||
2 | |||
3 | The default layer of Pix | ||
4 | ``` | ||
5 | Layer 0: Mute, Play / Pause, Previous, Next, To Next Layer | ||
6 | Layer 1: ____, Print Screen, ________, ____, To Previous Layer | ||
7 | ``` | ||
diff --git a/keyboards/sendyyeah/pix/keymaps/via/rules.mk b/keyboards/sendyyeah/pix/keymaps/via/rules.mk new file mode 100644 index 000000000..36b7ba9cb --- /dev/null +++ b/keyboards/sendyyeah/pix/keymaps/via/rules.mk | |||
@@ -0,0 +1,2 @@ | |||
1 | VIA_ENABLE = yes | ||
2 | LTO_ENABLE = yes | ||
diff --git a/keyboards/sendyyeah/pix/pix.c b/keyboards/sendyyeah/pix/pix.c new file mode 100644 index 000000000..f8d1b1c4d --- /dev/null +++ b/keyboards/sendyyeah/pix/pix.c | |||
@@ -0,0 +1,30 @@ | |||
1 | /* Copyright 2020 sendyyeah | ||
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 "pix.h" | ||
18 | |||
19 | void eeconfig_init_kb(void) { | ||
20 | #ifdef RGBLIGHT_ENABLE | ||
21 | rgblight_enable(); // Enable RGB underglow by default | ||
22 | rgblight_sethsv(0, 255, 255); | ||
23 | #ifdef RGBLIGHT_ANIMATIONS | ||
24 | rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 5); // Set to RGB_RAINBOW_SWIRL animation by default | ||
25 | #endif | ||
26 | #endif | ||
27 | |||
28 | eeconfig_update_kb(0); | ||
29 | eeconfig_init_user(); | ||
30 | } | ||
diff --git a/keyboards/sendyyeah/pix/pix.h b/keyboards/sendyyeah/pix/pix.h new file mode 100644 index 000000000..a46792855 --- /dev/null +++ b/keyboards/sendyyeah/pix/pix.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* Copyright 2020 sendyyeah | ||
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(K00, K01, K02, K03, K04) { \ | ||
22 | { K00, K01, K02, K03, K04 }, \ | ||
23 | } | ||
diff --git a/keyboards/sendyyeah/pix/readme.md b/keyboards/sendyyeah/pix/readme.md new file mode 100644 index 000000000..b2c903ed9 --- /dev/null +++ b/keyboards/sendyyeah/pix/readme.md | |||
@@ -0,0 +1,19 @@ | |||
1 | # Pix | ||
2 | |||
3 |  | ||
4 | |||
5 | A mini 1x4 macropad with rotary encoders and OLED screen. Currently the PCB and kits can only be purchased in Indonesia. The PCB source will be available soon on github. | ||
6 | |||
7 | * Keyboard Maintainer: [sendz](https://github.com/sendz) | ||
8 | * Hardware Supported: Pix PCB, Arduino Pro Micro, EC11 Rotary Encoder, OLED Screen, Acrylic Case, Encoder Knob | ||
9 | * Hardware Availability: [Tokopedia/Sell Stuffs](https://tokopedia.com/sell-stuffs) (Indonesia only) or any electronic part store. | ||
10 | |||
11 | Make example for this keyboard (after setting up your build environment): | ||
12 | |||
13 | make sendyyeah/pix:default | ||
14 | |||
15 | How to reset and enter bootloader: | ||
16 | - Press reset button on the right side of the PCB (twice if the ProMicro is fresh) | ||
17 | - Flash with QMK Toolbox or any command line you like | ||
18 | |||
19 | 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/sendyyeah/pix/rules.mk b/keyboards/sendyyeah/pix/rules.mk new file mode 100644 index 000000000..956a61880 --- /dev/null +++ b/keyboards/sendyyeah/pix/rules.mk | |||
@@ -0,0 +1,24 @@ | |||
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 = 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 = no # Enable keyboard backlight functionality | ||
20 | RGBLIGHT_ENABLE = no # 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 | ||