···11+/*
22+Copyright 2022 Gondolindrim
33+44+This program is free software: you can redistribute it and/or modify
55+it under the terms of the GNU General Public License as published by
66+the Free Software Foundation, either version 2 of the License, or
77+(at your option) any later version.
88+99+This program is distributed in the hope that it will be useful,
1010+but WITHOUT ANY WARRANTY; without even the implied warranty of
1111+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1212+GNU General Public License for more details.
1313+1414+You should have received a copy of the GNU General Public License
1515+along with this program. If not, see <http://www.gnu.org/licenses/>.
1616+*/
1717+1818+#pragma once
1919+2020+#define WS2812_PWM_COMPLEMENTARY_OUTPUT
2121+#define WS2812_PWM_DRIVER PWMD1
2222+#define WS2812_PWM_CHANNEL 3
2323+#define WS2812_PWM_PAL_MODE 1
2424+#define WS2812_DMA_STREAM STM32_DMA2_STREAM5
2525+#define WS2812_DMA_CHANNEL 6
2626+2727+/* LED MAP
2828+ 0 , 1 , 2 Three indicators
2929+ 3 , 4 , 5 Three RGBs on left side
3030+ 66, 67, 68 Three RGBs on right side
3131+ 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6 Left RGB wing (30 LEDs)
3232+ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65 Right RGB wing (30 LEDs)
3333+ */
+21
keyboards/typek/halconf.h
···11+/* Copyright 2020 QMK
22+ *
33+ * This program is free software: you can redistribute it and/or modify
44+ * it under the terms of the GNU General Public License as published by
55+ * the Free Software Foundation, either version 2 of the License, or
66+ * (at your option) any later version.
77+ *
88+ * This program is distributed in the hope that it will be useful,
99+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1010+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1111+ * GNU General Public License for more details.
1212+ *
1313+ * You should have received a copy of the GNU General Public License
1414+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515+ */
1616+1717+#pragma once
1818+1919+#define HAL_USE_PWM TRUE
2020+2121+#include_next <halconf.h>
···11+/* Copyright 2023 Gondolindrim
22+ *
33+ * This program is free software: you can redistribute it and/or modify
44+ * it under the terms of the GNU General Public License as published by
55+ * the Free Software Foundation, either version 2 of the License, or
66+ * (at your option) any later version.
77+ *
88+ * This program is distributed in the hope that it will be useful,
99+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1010+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1111+ * GNU General Public License for more details.
1212+ *
1313+ * You should have received a copy of the GNU General Public License
1414+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515+ */
1616+#include QMK_KEYBOARD_H
1717+1818+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
1919+2020+[0] = LAYOUT_all( /* Base */
2121+ KC_ESC , KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL, KC_BSLS,
2222+ KC_PGUP, KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC,
2323+ KC_PGDN, KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_DEL ,
2424+ MO(1) , KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT,
2525+ KC_LCTL, KC_LALT, KC_SPC , KC_LGUI, KC_6 , KC_SPC , KC_SPC , KC_RALT, KC_BSPC, KC_ENT , MO(1) , KC_RCTL
2626+),
2727+[1] = LAYOUT_all(
2828+ QK_BOOT, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_TRNS,
2929+ KC_HOME, KC_TRNS, KC_TRNS, KC_UP , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
3030+ KC_END , KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
3131+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
3232+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
3333+)
3434+};
+21
keyboards/typek/mcuconf.h
···11+/* Copyright 2020 QMK
22+ *
33+ * This program is free software: you can redistribute it and/or modify
44+ * it under the terms of the GNU General Public License as published by
55+ * the Free Software Foundation, either version 2 of the License, or
66+ * (at your option) any later version.
77+ *
88+ * This program is distributed in the hope that it will be useful,
99+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1010+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1111+ * GNU General Public License for more details.
1212+ *
1313+ * You should have received a copy of the GNU General Public License
1414+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515+ */
1616+1717+#pragma once
1818+#include_next <mcuconf.h>
1919+2020+#undef STM32_PWM_USE_TIM1
2121+#define STM32_PWM_USE_TIM1 TRUE
+30
keyboards/typek/readme.md
···11+# gok TypeK QMK Firmware Folder
22+33+
44+55+## Introduction
66+77+This is the QMK Firmware repository for the Type K, the tented ergo by Gok. The TypeK went through GB on August, 2023. It is supported by a proprietary PCB ecosystem.
88+99+## How to flash
1010+1111+### Enter bootloader
1212+1313+The DFU state in the bootloader can be accessed in 3 ways:
1414+1515+* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key, escape in the default keymap) and plug in the keyboard;
1616+* **Physical reset button**: press the button on the front of the PCB, next to caps lock, for at least five seconds;
1717+* **Keycode in layout**: Press the key mapped to `RESET`; in the default layout, that is top left key ('escape') in layer 1.
1818+1919+### How to compile and flash
2020+2121+2222+After setting up your build environment, you can compile the Iron 165R2 default keymap by using one of the options below.
2323+2424+ make typek:default
2525+2626+And use dfu-util in the command line or through a GUI like QMK toolbox to upload the firmware to the PCB. To directly flash the PCB after it is put into a DFU state, use:
2727+2828+ make typek:default:flash
2929+3030+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).
+44
keyboards/typek/typek.c
···11+/* Copyright 2023 Gondolindrim <gondolindrim@acheronproject.com>
22+ *
33+ * This program is free software: you can redistribute it and/or modify
44+ * it under the terms of the GNU General Public License as published by
55+ * the Free Software Foundation, either version 2 of the License, or
66+ * (at your option) any later version.
77+ *
88+ * This program is distributed in the hope that it will be useful,
99+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1010+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1111+ * GNU General Public License for more details.
1212+ *
1313+ * You should have received a copy of the GNU General Public License
1414+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515+ */
1616+1717+#include "quantum.h"
1818+1919+// This function gets called when caps, num, scroll change
2020+bool led_update_kb(led_t led_state) {
2121+ bool res = led_update_user(led_state);
2222+ if (res) {
2323+ led_state.caps_lock? rgblight_setrgb_at(RGB_RED, 0) : rgblight_setrgb_at(RGB_OFF, 0);
2424+ }
2525+ return res;
2626+}
2727+2828+// This function is called when layers change
2929+layer_state_t layer_state_set_kb(layer_state_t state) {
3030+ state = layer_state_set_user(state);
3131+ switch(get_highest_layer(state)) {
3232+ case 1:
3333+ rgblight_setrgb_at(RGB_GREEN, 1);
3434+ break;
3535+ case 2:
3636+ rgblight_setrgb_at(RGB_BLUE, 2);
3737+ break;
3838+ default:
3939+ rgblight_setrgb_at(RGB_OFF, 1);
4040+ rgblight_setrgb_at(RGB_OFF, 2);
4141+ break;
4242+ }
4343+ return state;
4444+}