From 0e5c79d99e3c67a621618aed38aee740577a41ed Mon Sep 17 00:00:00 2001 From: Stanislav Date: Wed, 28 Feb 2024 21:23:29 +0200 Subject: [PATCH 01/24] Macropad 2x5 --- keyboards/handwired/set_st/rp2040/config.h | 30 +++ keyboards/handwired/set_st/rp2040/halconf.h | 22 +++ keyboards/handwired/set_st/rp2040/info.json | 124 ++++++++++++ .../set_st/rp2040/keymaps/default/keymap.c | 176 ++++++++++++++++++ .../set_st/rp2040/keymaps/default/rules.mk | 1 + .../set_st/rp2040/keymaps/via/keymap.c | 176 ++++++++++++++++++ .../set_st/rp2040/keymaps/via/rules.mk | 2 + keyboards/handwired/set_st/rp2040/mcuconf.h | 22 +++ keyboards/handwired/set_st/rp2040/readme.md | 28 +++ keyboards/handwired/set_st/rp2040/rules.mk | 1 + 10 files changed, 582 insertions(+) create mode 100644 keyboards/handwired/set_st/rp2040/config.h create mode 100644 keyboards/handwired/set_st/rp2040/halconf.h create mode 100644 keyboards/handwired/set_st/rp2040/info.json create mode 100644 keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c create mode 100644 keyboards/handwired/set_st/rp2040/keymaps/default/rules.mk create mode 100644 keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c create mode 100644 keyboards/handwired/set_st/rp2040/keymaps/via/rules.mk create mode 100644 keyboards/handwired/set_st/rp2040/mcuconf.h create mode 100644 keyboards/handwired/set_st/rp2040/readme.md create mode 100644 keyboards/handwired/set_st/rp2040/rules.mk diff --git a/keyboards/handwired/set_st/rp2040/config.h b/keyboards/handwired/set_st/rp2040/config.h new file mode 100644 index 00000000000..983424ba7a3 --- /dev/null +++ b/keyboards/handwired/set_st/rp2040/config.h @@ -0,0 +1,30 @@ +/* Copyright 2022 Jose Pablo Ramirez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define OLED_DISPLAY_128X64 +#define OLED_COLUMN_OFFSET 0 +#define USE_I2C +#define I2C_DRIVER I2CD1 +#define I2C1_SDA_PIN GP26 +#define I2C1_SCL_PIN GP27 +#define SSD1306_I2C_ADDRESS 0x3c + +/* Double tap the side button to enter bootloader */ +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP13 +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U \ No newline at end of file diff --git a/keyboards/handwired/set_st/rp2040/halconf.h b/keyboards/handwired/set_st/rp2040/halconf.h new file mode 100644 index 00000000000..d63462a7825 --- /dev/null +++ b/keyboards/handwired/set_st/rp2040/halconf.h @@ -0,0 +1,22 @@ +/* Copyright 2022 Jose Pablo Ramirez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include_next + +#undef STM32_I2C_USE_I2C2 +#define STM32_I2C_USE_I2C2 TRUE \ No newline at end of file diff --git a/keyboards/handwired/set_st/rp2040/info.json b/keyboards/handwired/set_st/rp2040/info.json new file mode 100644 index 00000000000..039e2c4441e --- /dev/null +++ b/keyboards/handwired/set_st/rp2040/info.json @@ -0,0 +1,124 @@ +{ + "keyboard_name": "Macropad 10", + "manufacturer": "PDAINUA", + "url": "https://pda.in.ua", + "maintainer": "set-st", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "encoder": true, + "rgb_matrix": true, + "oled": true, + "os_detection": true + }, + "usb": { + "vid": "0x20A0", + "pid": "0x42F9", + "device_version": "0.0.2" + }, + "encoder": { + "rotary": [ + {"pin_a": "GP11", "pin_b": "GP12"} + ] + }, + "rgb_matrix": { + "driver": "ws2812", + "animations": { + "alphas_mods": true, + "gradient_up_down": true, + "gradient_left_right": true, + "breathing": true, + "band_sat": true, + "band_val": true, + "band_pinwheel_sat": true, + "band_pinwheel_val": true, + "band_spiral_sat": true, + "band_spiral_val": true, + "cycle_all": true, + "cycle_left_right": true, + "cycle_up_down": true, + "rainbow_moving_chevron": true, + "cycle_out_in": true, + "cycle_out_in_dual": true, + "cycle_pinwheel": true, + "cycle_spiral": true, + "dual_beacon": true, + "rainbow_beacon": true, + "rainbow_pinwheels": true, + "flower_blooming": true, + "raindrops": true, + "jellybean_raindrops": true, + "hue_breathing": true, + "hue_pendulum": true, + "hue_wave": true, + "pixel_fractal": true, + "pixel_flow": true, + "pixel_rain": true, + "typing_heatmap": true, + "digital_rain": true, + "solid_reactive_simple": true, + "solid_reactive": true, + "solid_reactive_wide": true, + "solid_reactive_multiwide": true, + "solid_reactive_cross": true, + "solid_reactive_multicross": true, + "solid_reactive_nexus": true, + "solid_reactive_multinexus": true, + "splash": true, + "multisplash": true, + "solid_splash": true, + "solid_multisplash": true + }, + "react_on_keyup": true, + "timeout": 360000, + "layout": [ + {"matrix": [1, 0], "x": 1, "y": 0, "flags": 2}, + {"matrix": [1, 1], "x": 1, "y": 1, "flags": 2}, + {"matrix": [1, 2], "x": 1, "y": 2, "flags": 2}, + {"matrix": [1, 3], "x": 1, "y": 3, "flags": 2}, + {"matrix": [1, 4], "x": 1, "y": 4, "flags": 2}, + {"matrix": [2, 4], "x": 2, "y": 4, "flags": 2}, + {"matrix": [2, 3], "x": 2, "y": 3, "flags": 2}, + {"matrix": [2, 2], "x": 2, "y": 2, "flags": 2}, + {"matrix": [2, 1], "x": 2, "y": 1, "flags": 2}, + {"matrix": [2, 0], "x": 2, "y": 0, "flags": 2} + ] + }, + "bootmagic": { + "matrix": [1, 2] + }, + "ws2812": { + "pin": "GP13", + "driver": "vendor" + }, + "processor": "RP2040", + "bootloader": "rp2040", + "matrix_pins": { + "direct": [ + [null, null, null, "GP0", null], + ["GP1", "GP2", "GP3","GP4", "GP5"], + ["GP6","GP7", "GP8", "GP9", "GP10"] + ] + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 3, "y": 0, "matrix": [0, 3]}, + {"x": 0, "y": 1, "matrix": [1, 0]}, + {"x": 1, "y": 1, "matrix": [1, 1]}, + {"x": 2, "y": 1, "matrix": [1, 2]}, + {"x": 3, "y": 1, "matrix": [1, 3]}, + {"x": 4, "y": 1, "matrix": [1, 4]}, + {"x": 0, "y": 2, "matrix": [2, 0]}, + {"x": 1, "y": 2, "matrix": [2, 1]}, + {"x": 2, "y": 2, "matrix": [2, 2]}, + {"x": 3, "y": 2, "matrix": [2, 3]}, + {"x": 4, "y": 2, "matrix": [2, 4]} + ] + } + } +} diff --git a/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c b/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c new file mode 100644 index 00000000000..1034c065a74 --- /dev/null +++ b/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c @@ -0,0 +1,176 @@ +/* Copyright 2020 set_st + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +enum keycodes { + KC_CYCLE_LAYERS = QK_USER, +}; + +enum layers{ + BASE, + FN, + MEDIA, + LIGHT +}; + +#define KC_TASK LGUI(KC_TAB) +#define KC_FLXP LGUI(KC_E) + +// 1st layer on the cycle +#define LAYER_CYCLE_START 0 +// Last layer on the cycle +#define LAYER_CYCLE_END 4 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT( + KC_MEDIA_PLAY_PAUSE, + KC_CYCLE_LAYERS, LGUI(KC_C), LGUI(KC_V), LCTL(KC_SPC), KC_KP_5, + KC_KP_6, KC_KP_7, KC_KP_8, LCTL(KC_LEFT), LCTL(KC_RIGHT) + ), + [FN] = LAYOUT( + _______, + KC_CYCLE_LAYERS, _______, _______, _______, _______, + _______, _______, _______, _______, _______ + ), + [MEDIA] = LAYOUT( + KC_MEDIA_PLAY_PAUSE, + KC_CYCLE_LAYERS, _______, _______, _______, _______, + KC_MEDIA_PLAY_PAUSE, _______, _______, KC_VOLD, KC_VOLU + ), + [LIGHT] = LAYOUT( + _______, + KC_CYCLE_LAYERS, RGB_MOD, RGB_RMOD, _______, _______, + RGB_TOG, _______, _______, RGB_VAD, RGB_VAI + ), +}; + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [FN] = { ENCODER_CCW_CW(LCTL(KC_LEFT), LCTL(KC_RIGHT)) }, + [MEDIA] = { ENCODER_CCW_CW(_______, _______) }, + [LIGHT] = { ENCODER_CCW_CW(_______, _______) } +}; +#endif + + +#ifdef OLED_ENABLE + +bool oled_task_user(void) { + // Set cursor position + oled_set_cursor(0, 0); + // Switch on current active layer + switch (get_highest_layer(layer_state)) { + case BASE : + oled_write_ln_P("1:Base", false); + break; + case FN : + oled_write_ln_P("2:Functions", false); + break; + case MEDIA : + oled_write_ln_P("3:Media", false); + break; + case LIGHT : + oled_write_ln_P("4:Lights controll", false); + break; + } + + + oled_set_cursor(0, 1); + oled_write(PSTR("Keys: "), false); + + os_variant_t os = detected_host_os(); + switch (os){ + case OS_MACOS: + oled_write("MAC", false); + break; + case OS_LINUX: + oled_write("LIN", false); + break; + case OS_WINDOWS: + oled_write("WIN", false); + break; + default: + break; + } + oled_write_ln("", false); + + for (int i = 0; i < MATRIX_ROWS; i++) { + for (int j = 0; j < MATRIX_COLS; j++) { + uint16_t keycode = keymaps[get_highest_layer(layer_state)][i][j]; + if(keycode == KC_NO || keycode == KC_TRANSPARENT){ + oled_write(" ", false); + } + else{ + oled_write("(", false); + if (KEYCODE2CONSUMER(keycode)) { + oled_write("M", false); + } + else if (IS_ANY(keycode)) + { + oled_write("A", false); + } + else{ + oled_write("D", false); + } + oled_write(") ", false); + } + } + oled_write_ln("", false); // Переходим на новую строку + } + + return false; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_CYCLE_LAYERS: + // Our logic will happen on presses, nothing is done on releases + if (!record->event.pressed) { + // We've already handled the keycode (doing nothing), let QMK know so no further code is run unnecessarily + return false; + } + + uint8_t current_layer = get_highest_layer(layer_state); + + // Check if we are within the range, if not quit + if (current_layer > LAYER_CYCLE_END || current_layer < LAYER_CYCLE_START) { + return false; + } + + uint8_t next_layer = current_layer + 1; + if (next_layer >= LAYER_CYCLE_END) { + next_layer = LAYER_CYCLE_START; + } + layer_move(next_layer); + return false; + + // Process other keycodes normally + default: + // Код клавиши будет отображаться на OLED дисплее + oled_clear(); // Очищаем дисплей + oled_set_cursor(0, 6); + oled_write("Keycode: ", false); // Отображаем текст "Keycode:" + char keycode_str[6]; // Создаем массив для хранения строки с кодом клавиши (5 символов для числа + 1 символ для завершающего нуля) + itoa(keycode, keycode_str, 10); // Преобразуем код клавиши в строку + oled_write(keycode_str, false); // Отображаем код клавиши на OLED дисплее + oled_write_ln("", false); + return true; + } +} + +#endif diff --git a/keyboards/handwired/set_st/rp2040/keymaps/default/rules.mk b/keyboards/handwired/set_st/rp2040/keymaps/default/rules.mk new file mode 100644 index 00000000000..ee325681483 --- /dev/null +++ b/keyboards/handwired/set_st/rp2040/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c b/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c new file mode 100644 index 00000000000..1034c065a74 --- /dev/null +++ b/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c @@ -0,0 +1,176 @@ +/* Copyright 2020 set_st + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +enum keycodes { + KC_CYCLE_LAYERS = QK_USER, +}; + +enum layers{ + BASE, + FN, + MEDIA, + LIGHT +}; + +#define KC_TASK LGUI(KC_TAB) +#define KC_FLXP LGUI(KC_E) + +// 1st layer on the cycle +#define LAYER_CYCLE_START 0 +// Last layer on the cycle +#define LAYER_CYCLE_END 4 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT( + KC_MEDIA_PLAY_PAUSE, + KC_CYCLE_LAYERS, LGUI(KC_C), LGUI(KC_V), LCTL(KC_SPC), KC_KP_5, + KC_KP_6, KC_KP_7, KC_KP_8, LCTL(KC_LEFT), LCTL(KC_RIGHT) + ), + [FN] = LAYOUT( + _______, + KC_CYCLE_LAYERS, _______, _______, _______, _______, + _______, _______, _______, _______, _______ + ), + [MEDIA] = LAYOUT( + KC_MEDIA_PLAY_PAUSE, + KC_CYCLE_LAYERS, _______, _______, _______, _______, + KC_MEDIA_PLAY_PAUSE, _______, _______, KC_VOLD, KC_VOLU + ), + [LIGHT] = LAYOUT( + _______, + KC_CYCLE_LAYERS, RGB_MOD, RGB_RMOD, _______, _______, + RGB_TOG, _______, _______, RGB_VAD, RGB_VAI + ), +}; + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [FN] = { ENCODER_CCW_CW(LCTL(KC_LEFT), LCTL(KC_RIGHT)) }, + [MEDIA] = { ENCODER_CCW_CW(_______, _______) }, + [LIGHT] = { ENCODER_CCW_CW(_______, _______) } +}; +#endif + + +#ifdef OLED_ENABLE + +bool oled_task_user(void) { + // Set cursor position + oled_set_cursor(0, 0); + // Switch on current active layer + switch (get_highest_layer(layer_state)) { + case BASE : + oled_write_ln_P("1:Base", false); + break; + case FN : + oled_write_ln_P("2:Functions", false); + break; + case MEDIA : + oled_write_ln_P("3:Media", false); + break; + case LIGHT : + oled_write_ln_P("4:Lights controll", false); + break; + } + + + oled_set_cursor(0, 1); + oled_write(PSTR("Keys: "), false); + + os_variant_t os = detected_host_os(); + switch (os){ + case OS_MACOS: + oled_write("MAC", false); + break; + case OS_LINUX: + oled_write("LIN", false); + break; + case OS_WINDOWS: + oled_write("WIN", false); + break; + default: + break; + } + oled_write_ln("", false); + + for (int i = 0; i < MATRIX_ROWS; i++) { + for (int j = 0; j < MATRIX_COLS; j++) { + uint16_t keycode = keymaps[get_highest_layer(layer_state)][i][j]; + if(keycode == KC_NO || keycode == KC_TRANSPARENT){ + oled_write(" ", false); + } + else{ + oled_write("(", false); + if (KEYCODE2CONSUMER(keycode)) { + oled_write("M", false); + } + else if (IS_ANY(keycode)) + { + oled_write("A", false); + } + else{ + oled_write("D", false); + } + oled_write(") ", false); + } + } + oled_write_ln("", false); // Переходим на новую строку + } + + return false; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_CYCLE_LAYERS: + // Our logic will happen on presses, nothing is done on releases + if (!record->event.pressed) { + // We've already handled the keycode (doing nothing), let QMK know so no further code is run unnecessarily + return false; + } + + uint8_t current_layer = get_highest_layer(layer_state); + + // Check if we are within the range, if not quit + if (current_layer > LAYER_CYCLE_END || current_layer < LAYER_CYCLE_START) { + return false; + } + + uint8_t next_layer = current_layer + 1; + if (next_layer >= LAYER_CYCLE_END) { + next_layer = LAYER_CYCLE_START; + } + layer_move(next_layer); + return false; + + // Process other keycodes normally + default: + // Код клавиши будет отображаться на OLED дисплее + oled_clear(); // Очищаем дисплей + oled_set_cursor(0, 6); + oled_write("Keycode: ", false); // Отображаем текст "Keycode:" + char keycode_str[6]; // Создаем массив для хранения строки с кодом клавиши (5 символов для числа + 1 символ для завершающего нуля) + itoa(keycode, keycode_str, 10); // Преобразуем код клавиши в строку + oled_write(keycode_str, false); // Отображаем код клавиши на OLED дисплее + oled_write_ln("", false); + return true; + } +} + +#endif diff --git a/keyboards/handwired/set_st/rp2040/keymaps/via/rules.mk b/keyboards/handwired/set_st/rp2040/keymaps/via/rules.mk new file mode 100644 index 00000000000..715838ecc5d --- /dev/null +++ b/keyboards/handwired/set_st/rp2040/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +ENCODER_MAP_ENABLE = yes +VIA_ENABLE = yes diff --git a/keyboards/handwired/set_st/rp2040/mcuconf.h b/keyboards/handwired/set_st/rp2040/mcuconf.h new file mode 100644 index 00000000000..aae1fb04657 --- /dev/null +++ b/keyboards/handwired/set_st/rp2040/mcuconf.h @@ -0,0 +1,22 @@ +/* Copyright 2022 Jose Pablo Ramirez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include_next + +#undef RP_I2C_USE_I2C0 +#define RP_I2C_USE_I2C0 TRUE \ No newline at end of file diff --git a/keyboards/handwired/set_st/rp2040/readme.md b/keyboards/handwired/set_st/rp2040/readme.md new file mode 100644 index 00000000000..c85ef5c601f --- /dev/null +++ b/keyboards/handwired/set_st/rp2040/readme.md @@ -0,0 +1,28 @@ +# MacroPad 10 RP2040 + +A RP2040-powered Macropad with a 2x5 layout. + +Make example for this board (after setting up your build environment): + +```sh +qmk compile -kb handwired/set_st/rp2040 -km via +``` + +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). + +## Features + +- Raspberry Pi RP2040 Zero or Plus. +- 2x10 Mechanical key switch sockets - accepts any Cherry MX-compatible switches. Individually tied to GPIO pins (not matrix wired) +- One NeoPixel RGB LED per switch, on north side. +- Rotary encoder, 20 detents per rotation, with push-switch on GPIO pin. +- 128x64 SH1306 Monochrome OLED i2c display. + +## Bootloader + +Enter the bootloader in 4 ways: + +* **Bootmagic reset**: Hold down the key just below the rotary encoder push-button on power-up. +* **Physical reset button**: Press twice the button on the side while the board is connected. +* **BOOT button** Hold down the rotary encoder push-button on power-up or reset. +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available. diff --git a/keyboards/handwired/set_st/rp2040/rules.mk b/keyboards/handwired/set_st/rp2040/rules.mk new file mode 100644 index 00000000000..7ff128fa692 --- /dev/null +++ b/keyboards/handwired/set_st/rp2040/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank \ No newline at end of file From c0167e72a7ab519fbe5965b7dee62ea5efa1f8bb Mon Sep 17 00:00:00 2001 From: Set Date: Wed, 28 Feb 2024 21:56:14 +0200 Subject: [PATCH 02/24] Update keyboards/handwired/set_st/rp2040/halconf.h Co-authored-by: jack <0x6a73@protonmail.com> --- keyboards/handwired/set_st/rp2040/halconf.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/keyboards/handwired/set_st/rp2040/halconf.h b/keyboards/handwired/set_st/rp2040/halconf.h index d63462a7825..b0eaceeb8be 100644 --- a/keyboards/handwired/set_st/rp2040/halconf.h +++ b/keyboards/handwired/set_st/rp2040/halconf.h @@ -16,7 +16,6 @@ #pragma once -#include_next +#define HAL_USE_I2C TRUE -#undef STM32_I2C_USE_I2C2 -#define STM32_I2C_USE_I2C2 TRUE \ No newline at end of file +#include_next \ No newline at end of file From 6416ca27529c1737fabf40efccac3353c21bb851 Mon Sep 17 00:00:00 2001 From: Set Date: Wed, 28 Feb 2024 22:02:14 +0200 Subject: [PATCH 03/24] Update keyboards/handwired/set_st/rp2040/config.h Co-authored-by: Joel Challis --- keyboards/handwired/set_st/rp2040/config.h | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/handwired/set_st/rp2040/config.h b/keyboards/handwired/set_st/rp2040/config.h index 983424ba7a3..260b9e8b891 100644 --- a/keyboards/handwired/set_st/rp2040/config.h +++ b/keyboards/handwired/set_st/rp2040/config.h @@ -22,7 +22,6 @@ #define I2C_DRIVER I2CD1 #define I2C1_SDA_PIN GP26 #define I2C1_SCL_PIN GP27 -#define SSD1306_I2C_ADDRESS 0x3c /* Double tap the side button to enter bootloader */ #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET From 9558934a6842028962e14b4bf7a3f56fe67634ac Mon Sep 17 00:00:00 2001 From: Set Date: Wed, 28 Feb 2024 22:02:27 +0200 Subject: [PATCH 04/24] Update keyboards/handwired/set_st/rp2040/config.h Co-authored-by: Joel Challis --- keyboards/handwired/set_st/rp2040/config.h | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/handwired/set_st/rp2040/config.h b/keyboards/handwired/set_st/rp2040/config.h index 260b9e8b891..29f5739e411 100644 --- a/keyboards/handwired/set_st/rp2040/config.h +++ b/keyboards/handwired/set_st/rp2040/config.h @@ -18,7 +18,6 @@ #define OLED_DISPLAY_128X64 #define OLED_COLUMN_OFFSET 0 -#define USE_I2C #define I2C_DRIVER I2CD1 #define I2C1_SDA_PIN GP26 #define I2C1_SCL_PIN GP27 From 00fed3acaa19fe911a1dd2d2fd4288751abf7e01 Mon Sep 17 00:00:00 2001 From: Set Date: Wed, 28 Feb 2024 22:02:33 +0200 Subject: [PATCH 05/24] Update keyboards/handwired/set_st/rp2040/config.h Co-authored-by: Joel Challis --- keyboards/handwired/set_st/rp2040/config.h | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/handwired/set_st/rp2040/config.h b/keyboards/handwired/set_st/rp2040/config.h index 29f5739e411..b9beddeacb4 100644 --- a/keyboards/handwired/set_st/rp2040/config.h +++ b/keyboards/handwired/set_st/rp2040/config.h @@ -17,7 +17,6 @@ #pragma once #define OLED_DISPLAY_128X64 -#define OLED_COLUMN_OFFSET 0 #define I2C_DRIVER I2CD1 #define I2C1_SDA_PIN GP26 #define I2C1_SCL_PIN GP27 From 9cdbdca043bf7b1535f6f6cd2cd5910a50b0fcdf Mon Sep 17 00:00:00 2001 From: Stanislav Date: Tue, 5 Mar 2024 12:32:39 +0200 Subject: [PATCH 06/24] remove comments --- .../set_st/rp2040/keymaps/default/keymap.c | 21 +++++++------------ .../set_st/rp2040/keymaps/via/keymap.c | 21 +++++++------------ 2 files changed, 14 insertions(+), 28 deletions(-) diff --git a/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c b/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c index 1034c065a74..a744de16686 100644 --- a/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c +++ b/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2020 set_st +/* Copyright 2024 set_st * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -130,7 +130,7 @@ bool oled_task_user(void) { oled_write(") ", false); } } - oled_write_ln("", false); // Переходим на новую строку + oled_write_ln("", false); } return false; @@ -139,15 +139,11 @@ bool oled_task_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_CYCLE_LAYERS: - // Our logic will happen on presses, nothing is done on releases if (!record->event.pressed) { - // We've already handled the keycode (doing nothing), let QMK know so no further code is run unnecessarily return false; } uint8_t current_layer = get_highest_layer(layer_state); - - // Check if we are within the range, if not quit if (current_layer > LAYER_CYCLE_END || current_layer < LAYER_CYCLE_START) { return false; } @@ -158,16 +154,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } layer_move(next_layer); return false; - - // Process other keycodes normally default: - // Код клавиши будет отображаться на OLED дисплее - oled_clear(); // Очищаем дисплей + oled_clear(); oled_set_cursor(0, 6); - oled_write("Keycode: ", false); // Отображаем текст "Keycode:" - char keycode_str[6]; // Создаем массив для хранения строки с кодом клавиши (5 символов для числа + 1 символ для завершающего нуля) - itoa(keycode, keycode_str, 10); // Преобразуем код клавиши в строку - oled_write(keycode_str, false); // Отображаем код клавиши на OLED дисплее + oled_write("Keycode: ", false); + char keycode_str[6]; + itoa(keycode, keycode_str, 10); + oled_write(keycode_str, false); oled_write_ln("", false); return true; } diff --git a/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c b/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c index 1034c065a74..a744de16686 100644 --- a/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c +++ b/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2020 set_st +/* Copyright 2024 set_st * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -130,7 +130,7 @@ bool oled_task_user(void) { oled_write(") ", false); } } - oled_write_ln("", false); // Переходим на новую строку + oled_write_ln("", false); } return false; @@ -139,15 +139,11 @@ bool oled_task_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_CYCLE_LAYERS: - // Our logic will happen on presses, nothing is done on releases if (!record->event.pressed) { - // We've already handled the keycode (doing nothing), let QMK know so no further code is run unnecessarily return false; } uint8_t current_layer = get_highest_layer(layer_state); - - // Check if we are within the range, if not quit if (current_layer > LAYER_CYCLE_END || current_layer < LAYER_CYCLE_START) { return false; } @@ -158,16 +154,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } layer_move(next_layer); return false; - - // Process other keycodes normally default: - // Код клавиши будет отображаться на OLED дисплее - oled_clear(); // Очищаем дисплей + oled_clear(); oled_set_cursor(0, 6); - oled_write("Keycode: ", false); // Отображаем текст "Keycode:" - char keycode_str[6]; // Создаем массив для хранения строки с кодом клавиши (5 символов для числа + 1 символ для завершающего нуля) - itoa(keycode, keycode_str, 10); // Преобразуем код клавиши в строку - oled_write(keycode_str, false); // Отображаем код клавиши на OLED дисплее + oled_write("Keycode: ", false); + char keycode_str[6]; + itoa(keycode, keycode_str, 10); + oled_write(keycode_str, false); oled_write_ln("", false); return true; } From a056a1748c54ca9bfbb1161066126885a6a1a236 Mon Sep 17 00:00:00 2001 From: Stanislav Date: Fri, 12 Apr 2024 13:27:16 +0300 Subject: [PATCH 07/24] some updates, move code in rp2040.c --- keyboards/handwired/set_st/rp2040/config.h | 2 +- keyboards/handwired/set_st/rp2040/halconf.h | 2 +- .../set_st/rp2040/keymaps/default/keymap.c | 101 --------------- .../set_st/rp2040/keymaps/via/keymap.c | 103 +-------------- keyboards/handwired/set_st/rp2040/mcuconf.h | 2 +- keyboards/handwired/set_st/rp2040/rp2040.c | 117 ++++++++++++++++++ 6 files changed, 121 insertions(+), 206 deletions(-) create mode 100644 keyboards/handwired/set_st/rp2040/rp2040.c diff --git a/keyboards/handwired/set_st/rp2040/config.h b/keyboards/handwired/set_st/rp2040/config.h index b9beddeacb4..62639f649f8 100644 --- a/keyboards/handwired/set_st/rp2040/config.h +++ b/keyboards/handwired/set_st/rp2040/config.h @@ -1,4 +1,4 @@ -/* Copyright 2022 Jose Pablo Ramirez +/* Copyright 2024 set_st * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/keyboards/handwired/set_st/rp2040/halconf.h b/keyboards/handwired/set_st/rp2040/halconf.h index b0eaceeb8be..0e14afb52e2 100644 --- a/keyboards/handwired/set_st/rp2040/halconf.h +++ b/keyboards/handwired/set_st/rp2040/halconf.h @@ -1,4 +1,4 @@ -/* Copyright 2022 Jose Pablo Ramirez +/* Copyright 2024 set_st * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c b/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c index a744de16686..900a910393e 100644 --- a/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c +++ b/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c @@ -66,104 +66,3 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [LIGHT] = { ENCODER_CCW_CW(_______, _______) } }; #endif - - -#ifdef OLED_ENABLE - -bool oled_task_user(void) { - // Set cursor position - oled_set_cursor(0, 0); - // Switch on current active layer - switch (get_highest_layer(layer_state)) { - case BASE : - oled_write_ln_P("1:Base", false); - break; - case FN : - oled_write_ln_P("2:Functions", false); - break; - case MEDIA : - oled_write_ln_P("3:Media", false); - break; - case LIGHT : - oled_write_ln_P("4:Lights controll", false); - break; - } - - - oled_set_cursor(0, 1); - oled_write(PSTR("Keys: "), false); - - os_variant_t os = detected_host_os(); - switch (os){ - case OS_MACOS: - oled_write("MAC", false); - break; - case OS_LINUX: - oled_write("LIN", false); - break; - case OS_WINDOWS: - oled_write("WIN", false); - break; - default: - break; - } - oled_write_ln("", false); - - for (int i = 0; i < MATRIX_ROWS; i++) { - for (int j = 0; j < MATRIX_COLS; j++) { - uint16_t keycode = keymaps[get_highest_layer(layer_state)][i][j]; - if(keycode == KC_NO || keycode == KC_TRANSPARENT){ - oled_write(" ", false); - } - else{ - oled_write("(", false); - if (KEYCODE2CONSUMER(keycode)) { - oled_write("M", false); - } - else if (IS_ANY(keycode)) - { - oled_write("A", false); - } - else{ - oled_write("D", false); - } - oled_write(") ", false); - } - } - oled_write_ln("", false); - } - - return false; -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_CYCLE_LAYERS: - if (!record->event.pressed) { - return false; - } - - uint8_t current_layer = get_highest_layer(layer_state); - if (current_layer > LAYER_CYCLE_END || current_layer < LAYER_CYCLE_START) { - return false; - } - - uint8_t next_layer = current_layer + 1; - if (next_layer >= LAYER_CYCLE_END) { - next_layer = LAYER_CYCLE_START; - } - layer_move(next_layer); - return false; - default: - oled_clear(); - oled_set_cursor(0, 6); - oled_write("Keycode: ", false); - char keycode_str[6]; - itoa(keycode, keycode_str, 10); - oled_write(keycode_str, false); - oled_write_ln("", false); - return true; - } -} - -#endif diff --git a/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c b/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c index a744de16686..fcf3373fdcf 100644 --- a/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c +++ b/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c @@ -65,105 +65,4 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [MEDIA] = { ENCODER_CCW_CW(_______, _______) }, [LIGHT] = { ENCODER_CCW_CW(_______, _______) } }; -#endif - - -#ifdef OLED_ENABLE - -bool oled_task_user(void) { - // Set cursor position - oled_set_cursor(0, 0); - // Switch on current active layer - switch (get_highest_layer(layer_state)) { - case BASE : - oled_write_ln_P("1:Base", false); - break; - case FN : - oled_write_ln_P("2:Functions", false); - break; - case MEDIA : - oled_write_ln_P("3:Media", false); - break; - case LIGHT : - oled_write_ln_P("4:Lights controll", false); - break; - } - - - oled_set_cursor(0, 1); - oled_write(PSTR("Keys: "), false); - - os_variant_t os = detected_host_os(); - switch (os){ - case OS_MACOS: - oled_write("MAC", false); - break; - case OS_LINUX: - oled_write("LIN", false); - break; - case OS_WINDOWS: - oled_write("WIN", false); - break; - default: - break; - } - oled_write_ln("", false); - - for (int i = 0; i < MATRIX_ROWS; i++) { - for (int j = 0; j < MATRIX_COLS; j++) { - uint16_t keycode = keymaps[get_highest_layer(layer_state)][i][j]; - if(keycode == KC_NO || keycode == KC_TRANSPARENT){ - oled_write(" ", false); - } - else{ - oled_write("(", false); - if (KEYCODE2CONSUMER(keycode)) { - oled_write("M", false); - } - else if (IS_ANY(keycode)) - { - oled_write("A", false); - } - else{ - oled_write("D", false); - } - oled_write(") ", false); - } - } - oled_write_ln("", false); - } - - return false; -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_CYCLE_LAYERS: - if (!record->event.pressed) { - return false; - } - - uint8_t current_layer = get_highest_layer(layer_state); - if (current_layer > LAYER_CYCLE_END || current_layer < LAYER_CYCLE_START) { - return false; - } - - uint8_t next_layer = current_layer + 1; - if (next_layer >= LAYER_CYCLE_END) { - next_layer = LAYER_CYCLE_START; - } - layer_move(next_layer); - return false; - default: - oled_clear(); - oled_set_cursor(0, 6); - oled_write("Keycode: ", false); - char keycode_str[6]; - itoa(keycode, keycode_str, 10); - oled_write(keycode_str, false); - oled_write_ln("", false); - return true; - } -} - -#endif +#endif \ No newline at end of file diff --git a/keyboards/handwired/set_st/rp2040/mcuconf.h b/keyboards/handwired/set_st/rp2040/mcuconf.h index aae1fb04657..6469029f2e2 100644 --- a/keyboards/handwired/set_st/rp2040/mcuconf.h +++ b/keyboards/handwired/set_st/rp2040/mcuconf.h @@ -1,4 +1,4 @@ -/* Copyright 2022 Jose Pablo Ramirez +/* Copyright 2024 set_st * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/keyboards/handwired/set_st/rp2040/rp2040.c b/keyboards/handwired/set_st/rp2040/rp2040.c new file mode 100644 index 00000000000..915da28484e --- /dev/null +++ b/keyboards/handwired/set_st/rp2040/rp2040.c @@ -0,0 +1,117 @@ +/* Copyright 2024 set_st + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "quantum.h" + +#ifdef OLED_ENABLE + +bool oled_task_user(void) { + // Set cursor position + oled_set_cursor(0, 0); + // Switch on current active layer + switch (get_highest_layer(layer_state)) { + case BASE : + oled_write_ln_P("1:Base", false); + break; + case FN : + oled_write_ln_P("2:Functions", false); + break; + case MEDIA : + oled_write_ln_P("3:Media", false); + break; + case LIGHT : + oled_write_ln_P("4:Lights controll", false); + break; + } + + + oled_set_cursor(0, 1); + oled_write(PSTR("Keys: "), false); + + os_variant_t os = detected_host_os(); + switch (os){ + case OS_MACOS: + oled_write("MAC", false); + break; + case OS_LINUX: + oled_write("LIN", false); + break; + case OS_WINDOWS: + oled_write("WIN", false); + break; + default: + break; + } + oled_write_ln("", false); + + for (int i = 0; i < MATRIX_ROWS; i++) { + for (int j = 0; j < MATRIX_COLS; j++) { + uint16_t keycode = keymaps[get_highest_layer(layer_state)][i][j]; + if(keycode == KC_NO || keycode == KC_TRANSPARENT){ + oled_write(" ", false); + } + else{ + oled_write("(", false); + if (KEYCODE2CONSUMER(keycode)) { + oled_write("M", false); + } + else if (IS_ANY(keycode)) + { + oled_write("A", false); + } + else{ + oled_write("D", false); + } + oled_write(") ", false); + } + } + oled_write_ln("", false); + } + + return false; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_CYCLE_LAYERS: + if (!record->event.pressed) { + return false; + } + + uint8_t current_layer = get_highest_layer(layer_state); + if (current_layer > LAYER_CYCLE_END || current_layer < LAYER_CYCLE_START) { + return false; + } + + uint8_t next_layer = current_layer + 1; + if (next_layer >= LAYER_CYCLE_END) { + next_layer = LAYER_CYCLE_START; + } + layer_move(next_layer); + return false; + default: + oled_clear(); + oled_set_cursor(0, 6); + oled_write("Keycode: ", false); + char keycode_str[6]; + itoa(keycode, keycode_str, 10); + oled_write(keycode_str, false); + oled_write_ln("", false); + return true; + } +} + +#endif From 2d522719357c4eed1798c8b8bf8bb91b9b9bea3b Mon Sep 17 00:00:00 2001 From: Stanislav Date: Fri, 12 Apr 2024 13:31:48 +0300 Subject: [PATCH 08/24] some updates, move code in rp2040.c --- keyboards/handwired/set_st/rp2040/rp2040.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/keyboards/handwired/set_st/rp2040/rp2040.c b/keyboards/handwired/set_st/rp2040/rp2040.c index 915da28484e..c20bb1a4d44 100644 --- a/keyboards/handwired/set_st/rp2040/rp2040.c +++ b/keyboards/handwired/set_st/rp2040/rp2040.c @@ -18,6 +18,13 @@ #ifdef OLED_ENABLE +enum layers{ + BASE, + FN, + MEDIA, + LIGHT +}; + bool oled_task_user(void) { // Set cursor position oled_set_cursor(0, 0); From 8254e20e228aced5d9ab4fdcaf4860e602b14fd4 Mon Sep 17 00:00:00 2001 From: Stanislav Date: Fri, 12 Apr 2024 13:34:05 +0300 Subject: [PATCH 09/24] some updates, move code in rp2040.c --- keyboards/handwired/set_st/rp2040/rp2040.c | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/handwired/set_st/rp2040/rp2040.c b/keyboards/handwired/set_st/rp2040/rp2040.c index c20bb1a4d44..6a4dd09c0b2 100644 --- a/keyboards/handwired/set_st/rp2040/rp2040.c +++ b/keyboards/handwired/set_st/rp2040/rp2040.c @@ -15,6 +15,7 @@ */ #include "quantum.h" +#include QMK_KEYBOARD_H #ifdef OLED_ENABLE From ec67d265f253e0f480114a5a9f08864c5cfadab0 Mon Sep 17 00:00:00 2001 From: Stanislav Date: Fri, 12 Apr 2024 14:09:10 +0300 Subject: [PATCH 10/24] some updates, move code in rp2040.c --- keyboards/handwired/set_st/rp2040/rp2040.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/keyboards/handwired/set_st/rp2040/rp2040.c b/keyboards/handwired/set_st/rp2040/rp2040.c index 6a4dd09c0b2..ed8701ce24b 100644 --- a/keyboards/handwired/set_st/rp2040/rp2040.c +++ b/keyboards/handwired/set_st/rp2040/rp2040.c @@ -14,18 +14,11 @@ * along with this program. If not, see . */ -#include "quantum.h" #include QMK_KEYBOARD_H +#include "keymap.c" #ifdef OLED_ENABLE -enum layers{ - BASE, - FN, - MEDIA, - LIGHT -}; - bool oled_task_user(void) { // Set cursor position oled_set_cursor(0, 0); From 503049cdae41af9e3b71a27746a3fa3df4ecd654 Mon Sep 17 00:00:00 2001 From: Stanislav Date: Fri, 12 Apr 2024 16:21:26 +0300 Subject: [PATCH 11/24] change structure, because functions in rp2040.c did not works properly. i was need access to keymap array. --- keyboards/handwired/set_st/rp2040/{rp2040.c => extra.h} | 1 - keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c | 3 +++ keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c | 5 ++++- 3 files changed, 7 insertions(+), 2 deletions(-) rename keyboards/handwired/set_st/rp2040/{rp2040.c => extra.h} (99%) diff --git a/keyboards/handwired/set_st/rp2040/rp2040.c b/keyboards/handwired/set_st/rp2040/extra.h similarity index 99% rename from keyboards/handwired/set_st/rp2040/rp2040.c rename to keyboards/handwired/set_st/rp2040/extra.h index ed8701ce24b..b1471c1bfc0 100644 --- a/keyboards/handwired/set_st/rp2040/rp2040.c +++ b/keyboards/handwired/set_st/rp2040/extra.h @@ -15,7 +15,6 @@ */ #include QMK_KEYBOARD_H -#include "keymap.c" #ifdef OLED_ENABLE diff --git a/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c b/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c index 900a910393e..f6d7f15575e 100644 --- a/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c +++ b/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c @@ -14,6 +14,7 @@ * along with this program. If not, see . */ + #include QMK_KEYBOARD_H enum keycodes { @@ -66,3 +67,5 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [LIGHT] = { ENCODER_CCW_CW(_______, _______) } }; #endif + +#include "extra.h" \ No newline at end of file diff --git a/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c b/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c index fcf3373fdcf..f6d7f15575e 100644 --- a/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c +++ b/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c @@ -14,6 +14,7 @@ * along with this program. If not, see . */ + #include QMK_KEYBOARD_H enum keycodes { @@ -65,4 +66,6 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [MEDIA] = { ENCODER_CCW_CW(_______, _______) }, [LIGHT] = { ENCODER_CCW_CW(_______, _______) } }; -#endif \ No newline at end of file +#endif + +#include "extra.h" \ No newline at end of file From 60375da441bfe47ab8ba903334519f0a58519d74 Mon Sep 17 00:00:00 2001 From: Set Date: Tue, 22 Oct 2024 11:02:55 +0300 Subject: [PATCH 12/24] Update keyboards/handwired/set_st/rp2040/extra.h Co-authored-by: Drashna Jaelre --- keyboards/handwired/set_st/rp2040/extra.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/keyboards/handwired/set_st/rp2040/extra.h b/keyboards/handwired/set_st/rp2040/extra.h index b1471c1bfc0..0a255244880 100644 --- a/keyboards/handwired/set_st/rp2040/extra.h +++ b/keyboards/handwired/set_st/rp2040/extra.h @@ -19,8 +19,6 @@ #ifdef OLED_ENABLE bool oled_task_user(void) { - // Set cursor position - oled_set_cursor(0, 0); // Switch on current active layer switch (get_highest_layer(layer_state)) { case BASE : From cd9fbbc21e292cb18538e05adb476b8ac3349714 Mon Sep 17 00:00:00 2001 From: Set Date: Tue, 22 Oct 2024 11:03:11 +0300 Subject: [PATCH 13/24] Update keyboards/handwired/set_st/rp2040/extra.h Co-authored-by: Drashna Jaelre --- keyboards/handwired/set_st/rp2040/extra.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/keyboards/handwired/set_st/rp2040/extra.h b/keyboards/handwired/set_st/rp2040/extra.h index 0a255244880..27e6882eca9 100644 --- a/keyboards/handwired/set_st/rp2040/extra.h +++ b/keyboards/handwired/set_st/rp2040/extra.h @@ -18,7 +18,10 @@ #ifdef OLED_ENABLE -bool oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } // Switch on current active layer switch (get_highest_layer(layer_state)) { case BASE : From e4068abe6f7ed09793a9c7a87e4e982fb9efb16c Mon Sep 17 00:00:00 2001 From: Set Date: Tue, 22 Oct 2024 11:03:47 +0300 Subject: [PATCH 14/24] Update keyboards/handwired/set_st/rp2040/extra.h Co-authored-by: Drashna Jaelre --- keyboards/handwired/set_st/rp2040/extra.h | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/handwired/set_st/rp2040/extra.h b/keyboards/handwired/set_st/rp2040/extra.h index 27e6882eca9..cf6888318d9 100644 --- a/keyboards/handwired/set_st/rp2040/extra.h +++ b/keyboards/handwired/set_st/rp2040/extra.h @@ -39,7 +39,6 @@ bool oled_task_kb(void) { } - oled_set_cursor(0, 1); oled_write(PSTR("Keys: "), false); os_variant_t os = detected_host_os(); From de20db2fc3dcd8f0a5ea4d5a164e4fa9f47f4f54 Mon Sep 17 00:00:00 2001 From: Set Date: Tue, 22 Oct 2024 11:04:03 +0300 Subject: [PATCH 15/24] Update keyboards/handwired/set_st/rp2040/extra.h Co-authored-by: Drashna Jaelre --- keyboards/handwired/set_st/rp2040/extra.h | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/handwired/set_st/rp2040/extra.h b/keyboards/handwired/set_st/rp2040/extra.h index cf6888318d9..9749a297cc9 100644 --- a/keyboards/handwired/set_st/rp2040/extra.h +++ b/keyboards/handwired/set_st/rp2040/extra.h @@ -41,6 +41,7 @@ bool oled_task_kb(void) { oled_write(PSTR("Keys: "), false); +#ifdef OS_DETECTION_ENABLE os_variant_t os = detected_host_os(); switch (os){ case OS_MACOS: From e5b92f5dc706156ab9956d1bc7cefe771b19587b Mon Sep 17 00:00:00 2001 From: Set Date: Tue, 22 Oct 2024 11:04:33 +0300 Subject: [PATCH 16/24] Update keyboards/handwired/set_st/rp2040/extra.h Co-authored-by: Drashna Jaelre --- keyboards/handwired/set_st/rp2040/extra.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/handwired/set_st/rp2040/extra.h b/keyboards/handwired/set_st/rp2040/extra.h index 9749a297cc9..8449e681534 100644 --- a/keyboards/handwired/set_st/rp2040/extra.h +++ b/keyboards/handwired/set_st/rp2040/extra.h @@ -56,7 +56,8 @@ bool oled_task_kb(void) { default: break; } - oled_write_ln("", false); + oled_advance_page(true); +#endif // OS_DETECTION_ENABLE for (int i = 0; i < MATRIX_ROWS; i++) { for (int j = 0; j < MATRIX_COLS; j++) { From d5d4f67e0fa8acd6d4b89f9af85a7ac6f680e10f Mon Sep 17 00:00:00 2001 From: Set Date: Tue, 22 Oct 2024 11:04:49 +0300 Subject: [PATCH 17/24] Update keyboards/handwired/set_st/rp2040/extra.h Co-authored-by: Drashna Jaelre --- keyboards/handwired/set_st/rp2040/extra.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/set_st/rp2040/extra.h b/keyboards/handwired/set_st/rp2040/extra.h index 8449e681534..e1f7e06a872 100644 --- a/keyboards/handwired/set_st/rp2040/extra.h +++ b/keyboards/handwired/set_st/rp2040/extra.h @@ -80,7 +80,7 @@ bool oled_task_kb(void) { oled_write(") ", false); } } - oled_write_ln("", false); + oled_advance_page(true); } return false; From ed2b0d04f7d4f27031381bac999c81f18681050c Mon Sep 17 00:00:00 2001 From: Set Date: Tue, 22 Oct 2024 11:04:58 +0300 Subject: [PATCH 18/24] Update keyboards/handwired/set_st/rp2040/extra.h Co-authored-by: Drashna Jaelre --- keyboards/handwired/set_st/rp2040/extra.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/keyboards/handwired/set_st/rp2040/extra.h b/keyboards/handwired/set_st/rp2040/extra.h index e1f7e06a872..aa207a36c6f 100644 --- a/keyboards/handwired/set_st/rp2040/extra.h +++ b/keyboards/handwired/set_st/rp2040/extra.h @@ -86,7 +86,10 @@ bool oled_task_kb(void) { return false; } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } switch (keycode) { case KC_CYCLE_LAYERS: if (!record->event.pressed) { From 98d49afc1fd829ff796424afd6244592c0257a1f Mon Sep 17 00:00:00 2001 From: Set Date: Tue, 22 Oct 2024 11:05:16 +0300 Subject: [PATCH 19/24] Update keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c Co-authored-by: Drashna Jaelre --- keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c b/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c index f6d7f15575e..dc29134f957 100644 --- a/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c +++ b/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c @@ -67,5 +67,3 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [LIGHT] = { ENCODER_CCW_CW(_______, _______) } }; #endif - -#include "extra.h" \ No newline at end of file From 33c3090cb287683a0af51e8e30cef3771e70c027 Mon Sep 17 00:00:00 2001 From: Set Date: Tue, 22 Oct 2024 11:05:27 +0300 Subject: [PATCH 20/24] Update keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c Co-authored-by: Drashna Jaelre --- keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c b/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c index f6d7f15575e..dc29134f957 100644 --- a/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c +++ b/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c @@ -67,5 +67,3 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [LIGHT] = { ENCODER_CCW_CW(_______, _______) } }; #endif - -#include "extra.h" \ No newline at end of file From 790c55c5d7b8fd47e3383f2f32bb2c460237ecff Mon Sep 17 00:00:00 2001 From: Set Date: Tue, 22 Oct 2024 11:05:59 +0300 Subject: [PATCH 21/24] Update keyboards/handwired/set_st/rp2040/extra.h Co-authored-by: Drashna Jaelre --- keyboards/handwired/set_st/rp2040/extra.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/set_st/rp2040/extra.h b/keyboards/handwired/set_st/rp2040/extra.h index aa207a36c6f..0d2c5df6f3f 100644 --- a/keyboards/handwired/set_st/rp2040/extra.h +++ b/keyboards/handwired/set_st/rp2040/extra.h @@ -67,7 +67,7 @@ bool oled_task_kb(void) { } else{ oled_write("(", false); - if (KEYCODE2CONSUMER(keycode)) { + if (IS_CONSUMER_KEYCODE(keycode) || IS_SYSTEM_KEYCODE(keycode)) { oled_write("M", false); } else if (IS_ANY(keycode)) From 6d25dfa99ef85dd944e36f9c330910699661ea0f Mon Sep 17 00:00:00 2001 From: Set Date: Tue, 22 Oct 2024 11:06:21 +0300 Subject: [PATCH 22/24] Update keyboards/handwired/set_st/rp2040/extra.h Co-authored-by: Drashna Jaelre --- keyboards/handwired/set_st/rp2040/extra.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/handwired/set_st/rp2040/extra.h b/keyboards/handwired/set_st/rp2040/extra.h index 0d2c5df6f3f..55aac503c1f 100644 --- a/keyboards/handwired/set_st/rp2040/extra.h +++ b/keyboards/handwired/set_st/rp2040/extra.h @@ -70,7 +70,7 @@ bool oled_task_kb(void) { if (IS_CONSUMER_KEYCODE(keycode) || IS_SYSTEM_KEYCODE(keycode)) { oled_write("M", false); } - else if (IS_ANY(keycode)) + else if (IS_BASIC_KEYCODE(keycode)) { oled_write("A", false); } From 0b9ee475965ddf3700561d4006801e5d91cb94e4 Mon Sep 17 00:00:00 2001 From: Set Date: Tue, 22 Oct 2024 11:12:21 +0300 Subject: [PATCH 23/24] Rename info.json to keyboard.json --- keyboards/handwired/set_st/rp2040/{info.json => keyboard.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename keyboards/handwired/set_st/rp2040/{info.json => keyboard.json} (100%) diff --git a/keyboards/handwired/set_st/rp2040/info.json b/keyboards/handwired/set_st/rp2040/keyboard.json similarity index 100% rename from keyboards/handwired/set_st/rp2040/info.json rename to keyboards/handwired/set_st/rp2040/keyboard.json From ef00c5b0449b3ff317e4655ac449a63fa18f1698 Mon Sep 17 00:00:00 2001 From: Stanislav Date: Tue, 22 Oct 2024 11:42:20 +0300 Subject: [PATCH 24/24] Macropad 2x5 --- keyboards/handwired/set_st/rp2040/config.h | 27 ---- keyboards/handwired/set_st/rp2040/extra.h | 122 ----------------- keyboards/handwired/set_st/rp2040/halconf.h | 21 --- .../handwired/set_st/rp2040/keyboard.json | 124 ------------------ .../set_st/rp2040/keymaps/default/keymap.c | 69 ---------- .../set_st/rp2040/keymaps/default/rules.mk | 1 - .../set_st/rp2040/keymaps/via/keymap.c | 69 ---------- .../set_st/rp2040/keymaps/via/rules.mk | 2 - keyboards/handwired/set_st/rp2040/mcuconf.h | 22 ---- keyboards/handwired/set_st/rp2040/readme.md | 28 ---- keyboards/handwired/set_st/rp2040/rules.mk | 1 - 11 files changed, 486 deletions(-) delete mode 100644 keyboards/handwired/set_st/rp2040/config.h delete mode 100644 keyboards/handwired/set_st/rp2040/extra.h delete mode 100644 keyboards/handwired/set_st/rp2040/halconf.h delete mode 100644 keyboards/handwired/set_st/rp2040/keyboard.json delete mode 100644 keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c delete mode 100644 keyboards/handwired/set_st/rp2040/keymaps/default/rules.mk delete mode 100644 keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c delete mode 100644 keyboards/handwired/set_st/rp2040/keymaps/via/rules.mk delete mode 100644 keyboards/handwired/set_st/rp2040/mcuconf.h delete mode 100644 keyboards/handwired/set_st/rp2040/readme.md delete mode 100644 keyboards/handwired/set_st/rp2040/rules.mk diff --git a/keyboards/handwired/set_st/rp2040/config.h b/keyboards/handwired/set_st/rp2040/config.h deleted file mode 100644 index 62639f649f8..00000000000 --- a/keyboards/handwired/set_st/rp2040/config.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright 2024 set_st - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#define OLED_DISPLAY_128X64 -#define I2C_DRIVER I2CD1 -#define I2C1_SDA_PIN GP26 -#define I2C1_SCL_PIN GP27 - -/* Double tap the side button to enter bootloader */ -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP13 -#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U \ No newline at end of file diff --git a/keyboards/handwired/set_st/rp2040/extra.h b/keyboards/handwired/set_st/rp2040/extra.h deleted file mode 100644 index 55aac503c1f..00000000000 --- a/keyboards/handwired/set_st/rp2040/extra.h +++ /dev/null @@ -1,122 +0,0 @@ -/* Copyright 2024 set_st - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include QMK_KEYBOARD_H - -#ifdef OLED_ENABLE - -bool oled_task_kb(void) { - if (!oled_task_user()) { - return false; - } - // Switch on current active layer - switch (get_highest_layer(layer_state)) { - case BASE : - oled_write_ln_P("1:Base", false); - break; - case FN : - oled_write_ln_P("2:Functions", false); - break; - case MEDIA : - oled_write_ln_P("3:Media", false); - break; - case LIGHT : - oled_write_ln_P("4:Lights controll", false); - break; - } - - - oled_write(PSTR("Keys: "), false); - -#ifdef OS_DETECTION_ENABLE - os_variant_t os = detected_host_os(); - switch (os){ - case OS_MACOS: - oled_write("MAC", false); - break; - case OS_LINUX: - oled_write("LIN", false); - break; - case OS_WINDOWS: - oled_write("WIN", false); - break; - default: - break; - } - oled_advance_page(true); -#endif // OS_DETECTION_ENABLE - - for (int i = 0; i < MATRIX_ROWS; i++) { - for (int j = 0; j < MATRIX_COLS; j++) { - uint16_t keycode = keymaps[get_highest_layer(layer_state)][i][j]; - if(keycode == KC_NO || keycode == KC_TRANSPARENT){ - oled_write(" ", false); - } - else{ - oled_write("(", false); - if (IS_CONSUMER_KEYCODE(keycode) || IS_SYSTEM_KEYCODE(keycode)) { - oled_write("M", false); - } - else if (IS_BASIC_KEYCODE(keycode)) - { - oled_write("A", false); - } - else{ - oled_write("D", false); - } - oled_write(") ", false); - } - } - oled_advance_page(true); - } - - return false; -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - if (!process_record_user(keycode, record)) { - return false; - } - switch (keycode) { - case KC_CYCLE_LAYERS: - if (!record->event.pressed) { - return false; - } - - uint8_t current_layer = get_highest_layer(layer_state); - if (current_layer > LAYER_CYCLE_END || current_layer < LAYER_CYCLE_START) { - return false; - } - - uint8_t next_layer = current_layer + 1; - if (next_layer >= LAYER_CYCLE_END) { - next_layer = LAYER_CYCLE_START; - } - layer_move(next_layer); - return false; - default: - oled_clear(); - oled_set_cursor(0, 6); - oled_write("Keycode: ", false); - char keycode_str[6]; - itoa(keycode, keycode_str, 10); - oled_write(keycode_str, false); - oled_write_ln("", false); - return true; - } -} - -#endif diff --git a/keyboards/handwired/set_st/rp2040/halconf.h b/keyboards/handwired/set_st/rp2040/halconf.h deleted file mode 100644 index 0e14afb52e2..00000000000 --- a/keyboards/handwired/set_st/rp2040/halconf.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright 2024 set_st - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#define HAL_USE_I2C TRUE - -#include_next \ No newline at end of file diff --git a/keyboards/handwired/set_st/rp2040/keyboard.json b/keyboards/handwired/set_st/rp2040/keyboard.json deleted file mode 100644 index 039e2c4441e..00000000000 --- a/keyboards/handwired/set_st/rp2040/keyboard.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "keyboard_name": "Macropad 10", - "manufacturer": "PDAINUA", - "url": "https://pda.in.ua", - "maintainer": "set-st", - "features": { - "bootmagic": true, - "command": false, - "console": false, - "extrakey": true, - "mousekey": true, - "nkro": true, - "encoder": true, - "rgb_matrix": true, - "oled": true, - "os_detection": true - }, - "usb": { - "vid": "0x20A0", - "pid": "0x42F9", - "device_version": "0.0.2" - }, - "encoder": { - "rotary": [ - {"pin_a": "GP11", "pin_b": "GP12"} - ] - }, - "rgb_matrix": { - "driver": "ws2812", - "animations": { - "alphas_mods": true, - "gradient_up_down": true, - "gradient_left_right": true, - "breathing": true, - "band_sat": true, - "band_val": true, - "band_pinwheel_sat": true, - "band_pinwheel_val": true, - "band_spiral_sat": true, - "band_spiral_val": true, - "cycle_all": true, - "cycle_left_right": true, - "cycle_up_down": true, - "rainbow_moving_chevron": true, - "cycle_out_in": true, - "cycle_out_in_dual": true, - "cycle_pinwheel": true, - "cycle_spiral": true, - "dual_beacon": true, - "rainbow_beacon": true, - "rainbow_pinwheels": true, - "flower_blooming": true, - "raindrops": true, - "jellybean_raindrops": true, - "hue_breathing": true, - "hue_pendulum": true, - "hue_wave": true, - "pixel_fractal": true, - "pixel_flow": true, - "pixel_rain": true, - "typing_heatmap": true, - "digital_rain": true, - "solid_reactive_simple": true, - "solid_reactive": true, - "solid_reactive_wide": true, - "solid_reactive_multiwide": true, - "solid_reactive_cross": true, - "solid_reactive_multicross": true, - "solid_reactive_nexus": true, - "solid_reactive_multinexus": true, - "splash": true, - "multisplash": true, - "solid_splash": true, - "solid_multisplash": true - }, - "react_on_keyup": true, - "timeout": 360000, - "layout": [ - {"matrix": [1, 0], "x": 1, "y": 0, "flags": 2}, - {"matrix": [1, 1], "x": 1, "y": 1, "flags": 2}, - {"matrix": [1, 2], "x": 1, "y": 2, "flags": 2}, - {"matrix": [1, 3], "x": 1, "y": 3, "flags": 2}, - {"matrix": [1, 4], "x": 1, "y": 4, "flags": 2}, - {"matrix": [2, 4], "x": 2, "y": 4, "flags": 2}, - {"matrix": [2, 3], "x": 2, "y": 3, "flags": 2}, - {"matrix": [2, 2], "x": 2, "y": 2, "flags": 2}, - {"matrix": [2, 1], "x": 2, "y": 1, "flags": 2}, - {"matrix": [2, 0], "x": 2, "y": 0, "flags": 2} - ] - }, - "bootmagic": { - "matrix": [1, 2] - }, - "ws2812": { - "pin": "GP13", - "driver": "vendor" - }, - "processor": "RP2040", - "bootloader": "rp2040", - "matrix_pins": { - "direct": [ - [null, null, null, "GP0", null], - ["GP1", "GP2", "GP3","GP4", "GP5"], - ["GP6","GP7", "GP8", "GP9", "GP10"] - ] - }, - "layouts": { - "LAYOUT": { - "layout": [ - {"x": 3, "y": 0, "matrix": [0, 3]}, - {"x": 0, "y": 1, "matrix": [1, 0]}, - {"x": 1, "y": 1, "matrix": [1, 1]}, - {"x": 2, "y": 1, "matrix": [1, 2]}, - {"x": 3, "y": 1, "matrix": [1, 3]}, - {"x": 4, "y": 1, "matrix": [1, 4]}, - {"x": 0, "y": 2, "matrix": [2, 0]}, - {"x": 1, "y": 2, "matrix": [2, 1]}, - {"x": 2, "y": 2, "matrix": [2, 2]}, - {"x": 3, "y": 2, "matrix": [2, 3]}, - {"x": 4, "y": 2, "matrix": [2, 4]} - ] - } - } -} diff --git a/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c b/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c deleted file mode 100644 index dc29134f957..00000000000 --- a/keyboards/handwired/set_st/rp2040/keymaps/default/keymap.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright 2024 set_st - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - - -#include QMK_KEYBOARD_H - -enum keycodes { - KC_CYCLE_LAYERS = QK_USER, -}; - -enum layers{ - BASE, - FN, - MEDIA, - LIGHT -}; - -#define KC_TASK LGUI(KC_TAB) -#define KC_FLXP LGUI(KC_E) - -// 1st layer on the cycle -#define LAYER_CYCLE_START 0 -// Last layer on the cycle -#define LAYER_CYCLE_END 4 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [BASE] = LAYOUT( - KC_MEDIA_PLAY_PAUSE, - KC_CYCLE_LAYERS, LGUI(KC_C), LGUI(KC_V), LCTL(KC_SPC), KC_KP_5, - KC_KP_6, KC_KP_7, KC_KP_8, LCTL(KC_LEFT), LCTL(KC_RIGHT) - ), - [FN] = LAYOUT( - _______, - KC_CYCLE_LAYERS, _______, _______, _______, _______, - _______, _______, _______, _______, _______ - ), - [MEDIA] = LAYOUT( - KC_MEDIA_PLAY_PAUSE, - KC_CYCLE_LAYERS, _______, _______, _______, _______, - KC_MEDIA_PLAY_PAUSE, _______, _______, KC_VOLD, KC_VOLU - ), - [LIGHT] = LAYOUT( - _______, - KC_CYCLE_LAYERS, RGB_MOD, RGB_RMOD, _______, _______, - RGB_TOG, _______, _______, RGB_VAD, RGB_VAI - ), -}; - -#ifdef ENCODER_MAP_ENABLE -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { - [BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [FN] = { ENCODER_CCW_CW(LCTL(KC_LEFT), LCTL(KC_RIGHT)) }, - [MEDIA] = { ENCODER_CCW_CW(_______, _______) }, - [LIGHT] = { ENCODER_CCW_CW(_______, _______) } -}; -#endif diff --git a/keyboards/handwired/set_st/rp2040/keymaps/default/rules.mk b/keyboards/handwired/set_st/rp2040/keymaps/default/rules.mk deleted file mode 100644 index ee325681483..00000000000 --- a/keyboards/handwired/set_st/rp2040/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -ENCODER_MAP_ENABLE = yes diff --git a/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c b/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c deleted file mode 100644 index dc29134f957..00000000000 --- a/keyboards/handwired/set_st/rp2040/keymaps/via/keymap.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright 2024 set_st - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - - -#include QMK_KEYBOARD_H - -enum keycodes { - KC_CYCLE_LAYERS = QK_USER, -}; - -enum layers{ - BASE, - FN, - MEDIA, - LIGHT -}; - -#define KC_TASK LGUI(KC_TAB) -#define KC_FLXP LGUI(KC_E) - -// 1st layer on the cycle -#define LAYER_CYCLE_START 0 -// Last layer on the cycle -#define LAYER_CYCLE_END 4 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [BASE] = LAYOUT( - KC_MEDIA_PLAY_PAUSE, - KC_CYCLE_LAYERS, LGUI(KC_C), LGUI(KC_V), LCTL(KC_SPC), KC_KP_5, - KC_KP_6, KC_KP_7, KC_KP_8, LCTL(KC_LEFT), LCTL(KC_RIGHT) - ), - [FN] = LAYOUT( - _______, - KC_CYCLE_LAYERS, _______, _______, _______, _______, - _______, _______, _______, _______, _______ - ), - [MEDIA] = LAYOUT( - KC_MEDIA_PLAY_PAUSE, - KC_CYCLE_LAYERS, _______, _______, _______, _______, - KC_MEDIA_PLAY_PAUSE, _______, _______, KC_VOLD, KC_VOLU - ), - [LIGHT] = LAYOUT( - _______, - KC_CYCLE_LAYERS, RGB_MOD, RGB_RMOD, _______, _______, - RGB_TOG, _______, _______, RGB_VAD, RGB_VAI - ), -}; - -#ifdef ENCODER_MAP_ENABLE -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { - [BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [FN] = { ENCODER_CCW_CW(LCTL(KC_LEFT), LCTL(KC_RIGHT)) }, - [MEDIA] = { ENCODER_CCW_CW(_______, _______) }, - [LIGHT] = { ENCODER_CCW_CW(_______, _______) } -}; -#endif diff --git a/keyboards/handwired/set_st/rp2040/keymaps/via/rules.mk b/keyboards/handwired/set_st/rp2040/keymaps/via/rules.mk deleted file mode 100644 index 715838ecc5d..00000000000 --- a/keyboards/handwired/set_st/rp2040/keymaps/via/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -ENCODER_MAP_ENABLE = yes -VIA_ENABLE = yes diff --git a/keyboards/handwired/set_st/rp2040/mcuconf.h b/keyboards/handwired/set_st/rp2040/mcuconf.h deleted file mode 100644 index 6469029f2e2..00000000000 --- a/keyboards/handwired/set_st/rp2040/mcuconf.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright 2024 set_st - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include_next - -#undef RP_I2C_USE_I2C0 -#define RP_I2C_USE_I2C0 TRUE \ No newline at end of file diff --git a/keyboards/handwired/set_st/rp2040/readme.md b/keyboards/handwired/set_st/rp2040/readme.md deleted file mode 100644 index c85ef5c601f..00000000000 --- a/keyboards/handwired/set_st/rp2040/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# MacroPad 10 RP2040 - -A RP2040-powered Macropad with a 2x5 layout. - -Make example for this board (after setting up your build environment): - -```sh -qmk compile -kb handwired/set_st/rp2040 -km via -``` - -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). - -## Features - -- Raspberry Pi RP2040 Zero or Plus. -- 2x10 Mechanical key switch sockets - accepts any Cherry MX-compatible switches. Individually tied to GPIO pins (not matrix wired) -- One NeoPixel RGB LED per switch, on north side. -- Rotary encoder, 20 detents per rotation, with push-switch on GPIO pin. -- 128x64 SH1306 Monochrome OLED i2c display. - -## Bootloader - -Enter the bootloader in 4 ways: - -* **Bootmagic reset**: Hold down the key just below the rotary encoder push-button on power-up. -* **Physical reset button**: Press twice the button on the side while the board is connected. -* **BOOT button** Hold down the rotary encoder push-button on power-up or reset. -* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available. diff --git a/keyboards/handwired/set_st/rp2040/rules.mk b/keyboards/handwired/set_st/rp2040/rules.mk deleted file mode 100644 index 7ff128fa692..00000000000 --- a/keyboards/handwired/set_st/rp2040/rules.mk +++ /dev/null @@ -1 +0,0 @@ -# This file intentionally left blank \ No newline at end of file