diff --git a/keyboards/handwired/illera16/config.h b/keyboards/handwired/illera16/config.h new file mode 100644 index 000000000000..4cae979d6a4a --- /dev/null +++ b/keyboards/handwired/illera16/config.h @@ -0,0 +1,39 @@ +// Copyright 2023 y (@villeramassana) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//Vial + +#define VIAL_KEYBOARD_UID {0xFD, 0XC4, 0xE0, 0x12, 0x93, 0x1C, 0x2B, 0x9A} +#define VIAL_UNLOCK_COMBO_ROWS { 0,0 } +#define VIAL_UNLOCK_COMBO_COLS { 0,1 } + +#define WS2812_DI_PIN D0 +#define RGBLED_NUM 6 +#define RGBLIGHT_LAYERS + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +#define ENCODERS_PAD_A { B5, B4} +#define ENCODERS_PAD_B { B6, B2} +#define ENCODER_RESOLUTION 2 + +#define MIDI_BASIC + diff --git a/keyboards/handwired/illera16/info.json b/keyboards/handwired/illera16/info.json new file mode 100644 index 000000000000..4d2f25ff6e3d --- /dev/null +++ b/keyboards/handwired/illera16/info.json @@ -0,0 +1,48 @@ +{ + "manufacturer": "victor_illera", + "keyboard_name": "illera16", + "maintainer": "villeramassana", + "bootloader": "caterina", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["D4", "C6", "D7", "E6"], + "rows": ["F4", "F5", "F6", "F7"] + }, + "processor": "atmega32u4", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "layouts": { + "LAYOUT_ortho_4x4": { + "layout": [ + { "matrix": [0, 0], "x": 0, "y": 0 }, + { "matrix": [0, 1], "x": 1, "y": 0 }, + { "matrix": [0, 2], "x": 2, "y": 0 }, + { "matrix": [0, 3], "x": 3, "y": 0 }, + { "matrix": [1, 0], "x": 0, "y": 1 }, + { "matrix": [1, 1], "x": 1, "y": 1 }, + { "matrix": [1, 2], "x": 2, "y": 1 }, + { "matrix": [1, 3], "x": 3, "y": 1 }, + { "matrix": [2, 0], "x": 0, "y": 2 }, + { "matrix": [2, 1], "x": 1, "y": 2 }, + { "matrix": [2, 2], "x": 2, "y": 2 }, + { "matrix": [2, 3], "x": 3, "y": 2 }, + { "matrix": [3, 0], "x": 0, "y": 3 }, + { "matrix": [3, 1], "x": 1, "y": 3 }, + { "matrix": [3, 2], "x": 2, "y": 3 }, + { "matrix": [3, 3], "x": 3, "y": 3 } + ] + } + } +} diff --git a/keyboards/handwired/illera16/keymaps/default/keymap.c b/keyboards/handwired/illera16/keymaps/default/keymap.c new file mode 100644 index 000000000000..73a1f74d2106 --- /dev/null +++ b/keyboards/handwired/illera16/keymaps/default/keymap.c @@ -0,0 +1,97 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +#define _BASE 0 +#define _CAPA1 1 +#define _CAPA2 2 +#define _CAPA3 3 + +layer_state_t layer_state_set_user(layer_state_t state); + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + layer_state_set_user(layer_state); +} + +layer_state_t layer_state_set_user(layer_state_t state) { + uint8_t layer = biton32(state); + switch (layer) { + case _CAPA1: + rgblight_sethsv_noeeprom(HSV_GREEN); + break; + + case _CAPA2: + rgblight_sethsv_noeeprom(HSV_RED); + break; + + case _CAPA3: + rgblight_sethsv_noeeprom(HSV_PINK); + break; + + default: + rgblight_sethsv_noeeprom(HSV_BLUE); // MI COLOR + break; + } + + return state; +} + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┐ + * │ 7 │c1 │ 9 │ / │ + * ├───┼───┼───┼───┤ + * │ 7 │ 8 │ 9 │ * │ + * ├───┼───┼───┼───┤ + * │ 4 │ 5 │ 6 │ - │ + * ├───┼───┼───┼───┤ + * │ 1 │ 2 │ 3 │ 0 │ + * └───┴───┴───┴───┘ + */ + + [0] = LAYOUT_ortho_4x4( /* CAPAS BASE */ + KC_DEL, TG(1), _______, KC_SLASH, + KC_7, KC_8, KC_9, KC_PAST, + KC_4, KC_5, KC_6, KC_PMNS, + KC_1, KC_2, KC_3, KC_0 + ), + [1] = LAYOUT_ortho_4x4( /* CAPA1 */ + KC_1, TG(2), TG(1), KC_1, + KC_1, KC_1, KC_1, KC_1, + KC_1, KC_1, KC_1, KC_1, + KC_1, KC_1, KC_1, KC_1 + ), + [2] = LAYOUT_ortho_4x4( /* CAPA2 */ + KC_2, TG(3), TG(2), KC_2, + KC_2, KC_2, KC_2, KC_2, + KC_2, KC_2, KC_2, KC_2, + KC_2, KC_2, KC_2, KC_2 + ), + [3] = LAYOUT_ortho_4x4( /* CAPA3 */ + KC_3, KC_NO, TG(3), KC_3, + KC_3, KC_3, KC_3, KC_3, + KC_3, KC_3, KC_3, KC_3, + KC_3, KC_3, KC_3, KC_3 + ), + + +}; +/* + * ROTARY ENCODER + */ + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) }, + [1] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) }, + [2] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) }, + [3] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) }, +}; + +#endif + + + diff --git a/keyboards/handwired/illera16/readme.md b/keyboards/handwired/illera16/readme.md new file mode 100644 index 000000000000..a4fadf261835 --- /dev/null +++ b/keyboards/handwired/illera16/readme.md @@ -0,0 +1,25 @@ +# handwired/illera16 + +*hand wired 4x4 macro pad* + +* Keyboard Maintainer: [victor_illera](https://github.com/villeramassana) +* Hardware Supported: *Pro Micro* +* Hardware Availability: *Aliexpress or Amazon* + +Make example for this keyboard (after setting up your build environment): + + make handwired/illera16:default + +Flashing example for this keyboard: + + make handwired/illera16:default:flash + +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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/handwired/illera16/rules.mk b/keyboards/handwired/illera16/rules.mk new file mode 100644 index 000000000000..93a1ab58de62 --- /dev/null +++ b/keyboards/handwired/illera16/rules.mk @@ -0,0 +1,5 @@ +# This file intentionally left blank + +RGBLIGHT_ENABLE = yes +ENCODER_ENABLE = yes +ENCODER_MAP_ENABLE = yes \ No newline at end of file