From 15f2f9bec67711fb328cdfba3858e36e2eeb2da5 Mon Sep 17 00:00:00 2001 From: yulei Date: Wed, 3 May 2023 20:46:04 +0800 Subject: [PATCH 01/10] added nico keyboard --- keyboards/neson_design/nico/config.h | 47 ++++++++ keyboards/neson_design/nico/info.json | 100 ++++++++++++++++++ .../nico/keymaps/default/keymap.c | 34 ++++++ .../neson_design/nico/keymaps/via/keymap.c | 48 +++++++++ .../neson_design/nico/keymaps/via/rules.mk | 2 + keyboards/neson_design/nico/nico.c | 86 +++++++++++++++ keyboards/neson_design/nico/nico.h | 38 +++++++ keyboards/neson_design/nico/readme.md | 21 ++++ keyboards/neson_design/nico/rules.mk | 18 ++++ 9 files changed, 394 insertions(+) create mode 100644 keyboards/neson_design/nico/config.h create mode 100644 keyboards/neson_design/nico/info.json create mode 100644 keyboards/neson_design/nico/keymaps/default/keymap.c create mode 100644 keyboards/neson_design/nico/keymaps/via/keymap.c create mode 100644 keyboards/neson_design/nico/keymaps/via/rules.mk create mode 100644 keyboards/neson_design/nico/nico.c create mode 100644 keyboards/neson_design/nico/nico.h create mode 100644 keyboards/neson_design/nico/readme.md create mode 100644 keyboards/neson_design/nico/rules.mk diff --git a/keyboards/neson_design/nico/config.h b/keyboards/neson_design/nico/config.h new file mode 100644 index 000000000000..b48cea5ce8fa --- /dev/null +++ b/keyboards/neson_design/nico/config.h @@ -0,0 +1,47 @@ +/** + * config.h + * + Copyright 2023 astro + + 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 MATRIX_ROW_PINS { F0, E6, F5, F4, F1} +#define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, B7, B3, B2, B1, F6, F7 } +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + + +//rgb light setting +#define RGBLED_NUM 5 +#define RGB_DI_PIN B0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +//#define USB_SUSPEND_WAKEUP_DELAY 1000 diff --git a/keyboards/neson_design/nico/info.json b/keyboards/neson_design/nico/info.json new file mode 100644 index 000000000000..1abdcf1bf598 --- /dev/null +++ b/keyboards/neson_design/nico/info.json @@ -0,0 +1,100 @@ +{ + "keyboard_name": "Nico", + "manufacturer": "Neson Design", + "url": "", + "maintainer": "yulei", + "usb": { + "vid": "0x4E65", + "pid": "0x6E65", + "device_version": "0.0.1" + }, + "indicators": { + "caps_lock": "E2" + }, + "processor": "atmega32u4", + "bootloader": "atmel-dfu", + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2.5, "y":0}, + {"x":3.5, "y":0}, + {"x":4.5, "y":0}, + {"x":5.5, "y":0}, + {"x":6.5, "y":0}, + {"x":7.5, "y":0}, + {"x":8.5, "y":0}, + {"x":9.5, "y":0}, + {"x":10.5, "y":0}, + {"x":11.5, "y":0}, + {"x":12.5, "y":0}, + {"x":13.5, "y":0}, + {"x":14.5, "y":0}, + {"x":15.5, "y":0}, + {"x":16.5, "y":0}, + {"x":17.5, "y":0}, + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2.5, "y":1, "w":1.5}, + {"x":4, "y":1}, + {"x":5, "y":1}, + {"x":6, "y":1}, + {"x":7, "y":1}, + {"x":8, "y":1}, + {"x":9, "y":1}, + {"x":10, "y":1}, + {"x":11, "y":1}, + {"x":12, "y":1}, + {"x":13, "y":1}, + {"x":14, "y":1}, + {"x":15, "y":1}, + {"x":16, "y":1, "w":1.5}, + {"x":17.5, "y":1}, + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2.5, "y":2, "w":1.75}, + {"x":4.25, "y":2}, + {"x":5.25, "y":2}, + {"x":6.25, "y":2}, + {"x":7.25, "y":2}, + {"x":8.25, "y":2}, + {"x":9.25, "y":2}, + {"x":10.25, "y":2}, + {"x":11.25, "y":2}, + {"x":12.25, "y":2}, + {"x":13.25, "y":2}, + {"x":14.25, "y":2}, + {"x":15.25, "y":2, "w":2.25}, + {"x":17.5, "y":2}, + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2.5, "y":3, "w":2.25}, + {"x":4.75, "y":3}, + {"x":5.75, "y":3}, + {"x":6.75, "y":3}, + {"x":7.75, "y":3}, + {"x":8.75, "y":3}, + {"x":9.75, "y":3}, + {"x":10.75, "y":3}, + {"x":11.75, "y":3}, + {"x":12.75, "y":3}, + {"x":13.75, "y":3}, + {"x":14.75, "y":3, "w":1.75}, + {"x":16.5, "y":3}, + {"x":17.5, "y":3}, + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":1.25}, + {"x":5, "y":4, "w":1.25}, + {"x":6.25, "y":4, "w":6.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":13.75, "y":4, "w":1.25}, + {"x":15.5, "y":4}, + {"x":16.5, "y":4}, + {"x":17.5, "y":4} + ] + } + } +} diff --git a/keyboards/neson_design/nico/keymaps/default/keymap.c b/keyboards/neson_design/nico/keymaps/default/keymap.c new file mode 100644 index 000000000000..d481379e210c --- /dev/null +++ b/keyboards/neson_design/nico/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/** + Copyright 2023 astro + + 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_DEL, KC_BSPC, KC_PSCR, + KC_F3, KC_F4, 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,KC_BSLS, KC_HOME, + KC_F5, KC_F6, 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_ENT, KC_END, + KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, MO(1), + KC_F9,KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_LEFT,KC_DOWN, KC_RIGHT), + + [1] = LAYOUT( + _______, _______, _______, 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_PSCR,_______, + _______, _______, QK_BOOT, RGB_TOG,RGB_MOD,_______, KC_F16, KC_F17,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______,_______, + _______, _______, _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME, KC_END, _______,_______, + _______, _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, + _______, _______, _______,_______,_______, _______, _______,_______, _______,_______,_______), +}; diff --git a/keyboards/neson_design/nico/keymaps/via/keymap.c b/keyboards/neson_design/nico/keymaps/via/keymap.c new file mode 100644 index 000000000000..a5c4764b8f22 --- /dev/null +++ b/keyboards/neson_design/nico/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/** + Copyright 2023 astro + + 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_DEL, KC_BSPC, KC_PSCR, + KC_F3, KC_F4, 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,KC_BSLS, KC_HOME, + KC_F5, KC_F6, 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_ENT, KC_END, + KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, MO(1), + KC_F9,KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_LEFT,KC_DOWN, KC_RIGHT), + + [1] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______, QK_BOOT, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, + _______, _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, + _______, _______, _______,_______,_______, _______, _______,_______, _______,_______,_______), + + [2] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, + _______, _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, + _______, _______, _______,_______,_______, _______, _______,_______, _______,_______,_______), + + [3] = LAYOUT( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, + _______, _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, + _______, _______, _______,_______,_______, _______, _______,_______, _______,_______,_______), +}; diff --git a/keyboards/neson_design/nico/keymaps/via/rules.mk b/keyboards/neson_design/nico/keymaps/via/rules.mk new file mode 100644 index 000000000000..43061db1dd46 --- /dev/null +++ b/keyboards/neson_design/nico/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/neson_design/nico/nico.c b/keyboards/neson_design/nico/nico.c new file mode 100644 index 000000000000..95aa7813af33 --- /dev/null +++ b/keyboards/neson_design/nico/nico.c @@ -0,0 +1,86 @@ +/** + * @file nico.c + * + Copyright 2023 astro + + 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 "nico.h" +#ifdef RGBLIGHT_ENABLE +#include "rgblight.h" + +static bool alert = false; +static bool backup = false; +static LED_TYPE caps_led; +static uint16_t last_ticks = 0; + +#define ALERT_INTERVAL 500 +#define ALERM_LED_R 0xFF +#define ALERM_LED_G 0xA5 +#define ALERM_LED_B 0x00 +//golden 0xFF, 0xD9, 0x00 + +void housekeeping_task_kb(void) +{ + if (IS_LED_ON(host_keyboard_leds(), USB_LED_CAPS_LOCK)) { + if (!backup) { + caps_led.r = led[4].r; + caps_led.g = led[4].g; + caps_led.b = led[4].b; + backup = true; + } + if(alert) { + led[4].r = ALERM_LED_G; + led[4].g = ALERM_LED_R; + led[4].b = ALERM_LED_B; + } else { + led[4].r = 0; + led[4].g = 0; + led[4].b = 0; + } + if (timer_elapsed(last_ticks) > ALERT_INTERVAL) { + alert = !alert; + last_ticks = timer_read(); + } + ws2812_setleds(led, RGBLED_NUM); + } else { + if (backup) { + led[4].r = caps_led.r; + led[4].g = caps_led.g; + led[4].b = caps_led.b; + backup = false; + ws2812_setleds(led, RGBLED_NUM); + } + } + housekeeping_task_user(); +} + +void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) +{ + start_led[2].r = start_led[0].r; + start_led[2].g = start_led[0].g; + start_led[2].b = start_led[0].b; + + start_led[3].r = start_led[1].r; + start_led[3].g = start_led[1].g; + start_led[3].b = start_led[1].b; + + uint8_t tmp = start_led[4].g; + start_led[4].g = start_led[4].r; + start_led[4].r = tmp; + ws2812_setleds(start_led, RGBLED_NUM); +} + +#endif \ No newline at end of file diff --git a/keyboards/neson_design/nico/nico.h b/keyboards/neson_design/nico/nico.h new file mode 100644 index 000000000000..6f1e7d47bf6d --- /dev/null +++ b/keyboards/neson_design/nico/nico.h @@ -0,0 +1,38 @@ +/** + * @file nico.h + * + Copyright 2023 astro + + 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 "quantum.h" + +#define ___ KC_NO + +#define LAYOUT( \ + K017, K018, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K4E, \ + K116, K117, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K216, K217, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K316, K317, K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K416, K417, K40, K41, K42, K48, K49, K4A, K4B, K4C, K4D \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K017, K018 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K116, K117 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, ___, K2D, K2E, K216, K217 }, \ + { K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K316, K317 }, \ + { K40, K41, K42, ___, ___, ___, ___, ___, K48, K49, K4A, K4B, K4C, K4D, K4E, K416, K417 }, \ +} diff --git a/keyboards/neson_design/nico/readme.md b/keyboards/neson_design/nico/readme.md new file mode 100644 index 000000000000..2bc975d2ecbf --- /dev/null +++ b/keyboards/neson_design/nico/readme.md @@ -0,0 +1,21 @@ +# Neson Design (formerly iNETT Studio) Nico + +A 65% keyboard with F area from the Neson Design's N series. + +* Keyboard Maintainer: [astro](https://github.com/yulei) +* Hardware Supported: Nico keyboard +* Hardware Availability: Limited gb + +Make example for this keyboard (after setting up your build environment): + + make neson_design/nico:default + +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 *RST* button on the back of the PCB. +* **Keycode in layout**: Press the key mapped to `RESET` if it is available. \ No newline at end of file diff --git a/keyboards/neson_design/nico/rules.mk b/keyboards/neson_design/nico/rules.mk new file mode 100644 index 000000000000..a8efb89218c5 --- /dev/null +++ b/keyboards/neson_design/nico/rules.mk @@ -0,0 +1,18 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +NO_USB_STARTUP_CHECK = yes From 47f3284310a37d24976f4ba6128aeeaf970e74f9 Mon Sep 17 00:00:00 2001 From: yulei Date: Thu, 4 May 2023 16:57:25 +0800 Subject: [PATCH 02/10] move rules and matrix to info.json --- keyboards/neson_design/nico/config.h | 47 ------ keyboards/neson_design/nico/info.json | 229 ++++++++++++++++---------- keyboards/neson_design/nico/nico.c | 2 +- keyboards/neson_design/nico/nico.h | 38 ----- keyboards/neson_design/nico/readme.md | 2 +- keyboards/neson_design/nico/rules.mk | 18 -- 6 files changed, 144 insertions(+), 192 deletions(-) delete mode 100644 keyboards/neson_design/nico/config.h delete mode 100644 keyboards/neson_design/nico/nico.h diff --git a/keyboards/neson_design/nico/config.h b/keyboards/neson_design/nico/config.h deleted file mode 100644 index b48cea5ce8fa..000000000000 --- a/keyboards/neson_design/nico/config.h +++ /dev/null @@ -1,47 +0,0 @@ -/** - * config.h - * - Copyright 2023 astro - - 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 MATRIX_ROW_PINS { F0, E6, F5, F4, F1} -#define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, B7, B3, B2, B1, F6, F7 } -#define DIODE_DIRECTION COL2ROW - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - - -//rgb light setting -#define RGBLED_NUM 5 -#define RGB_DI_PIN B0 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 - -//#define USB_SUSPEND_WAKEUP_DELAY 1000 diff --git a/keyboards/neson_design/nico/info.json b/keyboards/neson_design/nico/info.json index 1abdcf1bf598..43101f26ba5f 100644 --- a/keyboards/neson_design/nico/info.json +++ b/keyboards/neson_design/nico/info.json @@ -1,99 +1,154 @@ { - "keyboard_name": "Nico", "manufacturer": "Neson Design", - "url": "", + "keyboard_name": "Nico", "maintainer": "yulei", - "usb": { - "vid": "0x4E65", - "pid": "0x6E65", - "device_version": "0.0.1" + "bootloader": "atmel-dfu", + "bootmagic": { + "enabled": true + }, + "config_h_features": { + "backlight": false, + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true + }, + "debounce": 5, + "diode_direction": "COL2ROW", + "features": { + "backlight": false, + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true }, "indicators": { "caps_lock": "E2" }, + "keyboard_folder": "neson_design/nico", + "keymaps": {}, + "matrix_pins": { + "cols": ["C7", "C6", "B6", "B5", "B4", "D7", "D6", "D4", "D5", "D3", "D2", "B7", "B3", "B2", "B1", "F6", "F7"], + "rows": ["F0", "E6", "F5", "F4", "F1"] + }, + "matrix_size": { + "cols": 17, + "rows": 5 + }, + "mouse_key": { + "enabled": true + }, + "parse_errors": [], + "parse_warnings": [], + "platform": "unknown", + "platform_key": "avr", "processor": "atmega32u4", - "bootloader": "atmel-dfu", + "processor_type": "avr", + "protocol": "LUFA", + "rgblight": { + "brightness_steps": 8, + "hue_steps": 8, + "led_count": 5, + "pin": "B0", + "saturation_steps": 8 + }, + "url": "", + "usb": { + "device_version": "0.0.1", + "no_startup_check": true, + "pid": "0x6E65", + "vid": "0x4E65" + }, "layouts": { - "LAYOUT": { - "layout": [ - {"x":0, "y":0}, - {"x":1, "y":0}, - {"x":2.5, "y":0}, - {"x":3.5, "y":0}, - {"x":4.5, "y":0}, - {"x":5.5, "y":0}, - {"x":6.5, "y":0}, - {"x":7.5, "y":0}, - {"x":8.5, "y":0}, - {"x":9.5, "y":0}, - {"x":10.5, "y":0}, - {"x":11.5, "y":0}, - {"x":12.5, "y":0}, - {"x":13.5, "y":0}, - {"x":14.5, "y":0}, - {"x":15.5, "y":0}, - {"x":16.5, "y":0}, - {"x":17.5, "y":0}, - {"x":0, "y":1}, - {"x":1, "y":1}, - {"x":2.5, "y":1, "w":1.5}, - {"x":4, "y":1}, - {"x":5, "y":1}, - {"x":6, "y":1}, - {"x":7, "y":1}, - {"x":8, "y":1}, - {"x":9, "y":1}, - {"x":10, "y":1}, - {"x":11, "y":1}, - {"x":12, "y":1}, - {"x":13, "y":1}, - {"x":14, "y":1}, - {"x":15, "y":1}, - {"x":16, "y":1, "w":1.5}, - {"x":17.5, "y":1}, - {"x":0, "y":2}, - {"x":1, "y":2}, - {"x":2.5, "y":2, "w":1.75}, - {"x":4.25, "y":2}, - {"x":5.25, "y":2}, - {"x":6.25, "y":2}, - {"x":7.25, "y":2}, - {"x":8.25, "y":2}, - {"x":9.25, "y":2}, - {"x":10.25, "y":2}, - {"x":11.25, "y":2}, - {"x":12.25, "y":2}, - {"x":13.25, "y":2}, - {"x":14.25, "y":2}, - {"x":15.25, "y":2, "w":2.25}, - {"x":17.5, "y":2}, - {"x":0, "y":3}, - {"x":1, "y":3}, - {"x":2.5, "y":3, "w":2.25}, - {"x":4.75, "y":3}, - {"x":5.75, "y":3}, - {"x":6.75, "y":3}, - {"x":7.75, "y":3}, - {"x":8.75, "y":3}, - {"x":9.75, "y":3}, - {"x":10.75, "y":3}, - {"x":11.75, "y":3}, - {"x":12.75, "y":3}, - {"x":13.75, "y":3}, - {"x":14.75, "y":3, "w":1.75}, - {"x":16.5, "y":3}, - {"x":17.5, "y":3}, - {"x":0, "y":4}, - {"x":1, "y":4}, - {"x":2.5, "y":4, "w":1.25}, - {"x":3.75, "y":4, "w":1.25}, - {"x":5, "y":4, "w":1.25}, - {"x":6.25, "y":4, "w":6.25}, - {"x":12.5, "y":4, "w":1.25}, - {"x":13.75, "y":4, "w":1.25}, - {"x":15.5, "y":4}, - {"x":16.5, "y":4}, - {"x":17.5, "y":4} + "LAYOUT": { + "c_macro": true, + "filename": "keyboards/neson_design/nico/nico.h", + "json_layout": true, + "layout": [ + { "label": "K017", "matrix": [0, 15], "w": 1, "x": 0, "y": 0 }, + { "label": "K018", "matrix": [0, 16], "w": 1, "x": 1, "y": 0 }, + { "label": "K00", "matrix": [0, 0], "w": 1, "x": 2.5, "y": 0 }, + { "label": "K01", "matrix": [0, 1], "w": 1, "x": 3.5, "y": 0 }, + { "label": "K02", "matrix": [0, 2], "w": 1, "x": 4.5, "y": 0 }, + { "label": "K03", "matrix": [0, 3], "w": 1, "x": 5.5, "y": 0 }, + { "label": "K04", "matrix": [0, 4], "w": 1, "x": 6.5, "y": 0 }, + { "label": "K05", "matrix": [0, 5], "w": 1, "x": 7.5, "y": 0 }, + { "label": "K06", "matrix": [0, 6], "w": 1, "x": 8.5, "y": 0 }, + { "label": "K07", "matrix": [0, 7], "w": 1, "x": 9.5, "y": 0 }, + { "label": "K08", "matrix": [0, 8], "w": 1, "x": 10.5, "y": 0 }, + { "label": "K09", "matrix": [0, 9], "w": 1, "x": 11.5, "y": 0 }, + { "label": "K0A", "matrix": [0, 10], "w": 1, "x": 12.5, "y": 0 }, + { "label": "K0B", "matrix": [0, 11], "w": 1, "x": 13.5, "y": 0 }, + { "label": "K0C", "matrix": [0, 12], "w": 1, "x": 14.5, "y": 0 }, + { "label": "K0D", "matrix": [0, 13], "w": 1, "x": 15.5, "y": 0 }, + { "label": "K0E", "matrix": [0, 14], "w": 1, "x": 16.5, "y": 0 }, + { "label": "K4E", "matrix": [4, 14], "w": 1, "x": 17.5, "y": 0 }, + { "label": "K116", "matrix": [1, 15], "w": 1, "x": 0, "y": 1 }, + { "label": "K117", "matrix": [1, 16], "w": 1, "x": 1, "y": 1 }, + { "label": "K10", "matrix": [1, 0], "w": 1.5, "x": 2.5, "y": 1 }, + { "label": "K11", "matrix": [1, 1], "w": 1, "x": 4, "y": 1 }, + { "label": "K12", "matrix": [1, 2], "w": 1, "x": 5, "y": 1 }, + { "label": "K13", "matrix": [1, 3], "w": 1, "x": 6, "y": 1 }, + { "label": "K14", "matrix": [1, 4], "w": 1, "x": 7, "y": 1 }, + { "label": "K15", "matrix": [1, 5], "w": 1, "x": 8, "y": 1 }, + { "label": "K16", "matrix": [1, 6], "w": 1, "x": 9, "y": 1 }, + { "label": "K17", "matrix": [1, 7], "w": 1, "x": 10, "y": 1 }, + { "label": "K18", "matrix": [1, 8], "w": 1, "x": 11, "y": 1 }, + { "label": "K19", "matrix": [1, 9], "w": 1, "x": 12, "y": 1 }, + { "label": "K1A", "matrix": [1, 10], "w": 1, "x": 13, "y": 1 }, + { "label": "K1B", "matrix": [1, 11], "w": 1, "x": 14, "y": 1 }, + { "label": "K1C", "matrix": [1, 12], "w": 1, "x": 15, "y": 1 }, + { "label": "K1D", "matrix": [1, 13], "w": 1.5, "x": 16, "y": 1 }, + { "label": "K1E", "matrix": [1, 14], "w": 1, "x": 17.5, "y": 1 }, + { "label": "K216", "matrix": [2, 15], "w": 1, "x": 0, "y": 2 }, + { "label": "K217", "matrix": [2, 16], "w": 1, "x": 1, "y": 2 }, + { "label": "K20", "matrix": [2, 0], "w": 1.75, "x": 2.5, "y": 2 }, + { "label": "K21", "matrix": [2, 1], "w": 1, "x": 4.25, "y": 2 }, + { "label": "K22", "matrix": [2, 2], "w": 1, "x": 5.25, "y": 2 }, + { "label": "K23", "matrix": [2, 3], "w": 1, "x": 6.25, "y": 2 }, + { "label": "K24", "matrix": [2, 4], "w": 1, "x": 7.25, "y": 2 }, + { "label": "K25", "matrix": [2, 5], "w": 1, "x": 8.25, "y": 2 }, + { "label": "K26", "matrix": [2, 6], "w": 1, "x": 9.25, "y": 2 }, + { "label": "K27", "matrix": [2, 7], "w": 1, "x": 10.25, "y": 2 }, + { "label": "K28", "matrix": [2, 8], "w": 1, "x": 11.25, "y": 2 }, + { "label": "K29", "matrix": [2, 9], "w": 1, "x": 12.25, "y": 2 }, + { "label": "K2A", "matrix": [2, 10], "w": 1, "x": 13.25, "y": 2 }, + { "label": "K2B", "matrix": [2, 11], "w": 1, "x": 14.25, "y": 2 }, + { "label": "K2D", "matrix": [2, 13], "w": 2.25, "x": 15.25, "y": 2 }, + { "label": "K2E", "matrix": [2, 14], "w": 1, "x": 17.5, "y": 2 }, + { "label": "K316", "matrix": [3, 15], "w": 1, "x": 0, "y": 3 }, + { "label": "K317", "matrix": [3, 16], "w": 1, "x": 1, "y": 3 }, + { "label": "K30", "matrix": [3, 0], "w": 2.25, "x": 2.5, "y": 3 }, + { "label": "K32", "matrix": [3, 2], "w": 1, "x": 4.75, "y": 3 }, + { "label": "K33", "matrix": [3, 3], "w": 1, "x": 5.75, "y": 3 }, + { "label": "K34", "matrix": [3, 4], "w": 1, "x": 6.75, "y": 3 }, + { "label": "K35", "matrix": [3, 5], "w": 1, "x": 7.75, "y": 3 }, + { "label": "K36", "matrix": [3, 6], "w": 1, "x": 8.75, "y": 3 }, + { "label": "K37", "matrix": [3, 7], "w": 1, "x": 9.75, "y": 3 }, + { "label": "K38", "matrix": [3, 8], "w": 1, "x": 10.75, "y": 3 }, + { "label": "K39", "matrix": [3, 9], "w": 1, "x": 11.75, "y": 3 }, + { "label": "K3A", "matrix": [3, 10], "w": 1, "x": 12.75, "y": 3 }, + { "label": "K3B", "matrix": [3, 11], "w": 1, "x": 13.75, "y": 3 }, + { "label": "K3C", "matrix": [3, 12], "w": 1.75, "x": 14.75, "y": 3 }, + { "label": "K3D", "matrix": [3, 13], "w": 1, "x": 16.5, "y": 3 }, + { "label": "K3E", "matrix": [3, 14], "w": 1, "x": 17.5, "y": 3 }, + { "label": "K416", "matrix": [4, 15], "w": 1, "x": 0, "y": 4 }, + { "label": "K417", "matrix": [4, 16], "w": 1, "x": 1, "y": 4 }, + { "label": "K40", "matrix": [4, 0], "w": 1.25, "x": 2.5, "y": 4 }, + { "label": "K41", "matrix": [4, 1], "w": 1.25, "x": 3.75, "y": 4 }, + { "label": "K42", "matrix": [4, 2], "w": 1.25, "x": 5, "y": 4 }, + { "label": "K48", "matrix": [4, 8], "w": 6.25, "x": 6.25, "y": 4 }, + { "label": "K49", "matrix": [4, 9], "w": 1.25, "x": 12.5, "y": 4 }, + { "label": "K4A", "matrix": [4, 10], "w": 1.25, "x": 13.75, "y": 4 }, + { "label": "K4B", "matrix": [4, 11], "w": 1, "x": 15.5, "y": 4 }, + { "label": "K4C", "matrix": [4, 12], "w": 1, "x": 16.5, "y": 4 }, + { "label": "K4D", "matrix": [4, 13], "w": 1, "x": 17.5, "y": 4 } ] } } diff --git a/keyboards/neson_design/nico/nico.c b/keyboards/neson_design/nico/nico.c index 95aa7813af33..ec4211334d9c 100644 --- a/keyboards/neson_design/nico/nico.c +++ b/keyboards/neson_design/nico/nico.c @@ -17,7 +17,7 @@ along with this program. If not, see . */ -#include "nico.h" +#include "quantum.h" #ifdef RGBLIGHT_ENABLE #include "rgblight.h" diff --git a/keyboards/neson_design/nico/nico.h b/keyboards/neson_design/nico/nico.h deleted file mode 100644 index 6f1e7d47bf6d..000000000000 --- a/keyboards/neson_design/nico/nico.h +++ /dev/null @@ -1,38 +0,0 @@ -/** - * @file nico.h - * - Copyright 2023 astro - - 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 "quantum.h" - -#define ___ KC_NO - -#define LAYOUT( \ - K017, K018, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K4E, \ - K116, K117, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K216, K217, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ - K316, K317, K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K416, K417, K40, K41, K42, K48, K49, K4A, K4B, K4C, K4D \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K017, K018 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K116, K117 }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, ___, K2D, K2E, K216, K217 }, \ - { K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K316, K317 }, \ - { K40, K41, K42, ___, ___, ___, ___, ___, K48, K49, K4A, K4B, K4C, K4D, K4E, K416, K417 }, \ -} diff --git a/keyboards/neson_design/nico/readme.md b/keyboards/neson_design/nico/readme.md index 2bc975d2ecbf..9b821c16d027 100644 --- a/keyboards/neson_design/nico/readme.md +++ b/keyboards/neson_design/nico/readme.md @@ -18,4 +18,4 @@ 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 *RST* button on the back of the PCB. -* **Keycode in layout**: Press the key mapped to `RESET` if it is available. \ No newline at end of file +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available. \ No newline at end of file diff --git a/keyboards/neson_design/nico/rules.mk b/keyboards/neson_design/nico/rules.mk index a8efb89218c5..e69de29bb2d1 100644 --- a/keyboards/neson_design/nico/rules.mk +++ b/keyboards/neson_design/nico/rules.mk @@ -1,18 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -NO_USB_STARTUP_CHECK = yes From 538f963beb12d5fe3a8d985691a52278b35a9e7c Mon Sep 17 00:00:00 2001 From: yulei Date: Thu, 4 May 2023 16:58:06 +0800 Subject: [PATCH 03/10] Update keyboards/neson_design/nico/keymaps/via/keymap.c Co-authored-by: jack <0x6a73@protonmail.com> --- keyboards/neson_design/nico/keymaps/via/keymap.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/keyboards/neson_design/nico/keymaps/via/keymap.c b/keyboards/neson_design/nico/keymaps/via/keymap.c index a5c4764b8f22..9de688505e45 100644 --- a/keyboards/neson_design/nico/keymaps/via/keymap.c +++ b/keyboards/neson_design/nico/keymaps/via/keymap.c @@ -30,19 +30,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, QK_BOOT, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, _______, _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, - _______, _______, _______,_______,_______, _______, _______,_______, _______,_______,_______), - - [2] = LAYOUT( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, - _______, _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, - _______, _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, - _______, _______, _______,_______,_______, _______, _______,_______, _______,_______,_______), - - [3] = LAYOUT( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, - _______, _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, - _______, _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, - _______, _______, _______,_______,_______, _______, _______,_______, _______,_______,_______), + _______, _______, _______,_______,_______, _______, _______,_______, _______,_______,_______) }; From 5e6d64854899d2a9994fbad801f9be28fb1375f9 Mon Sep 17 00:00:00 2001 From: yulei Date: Sun, 7 May 2023 23:34:18 +0800 Subject: [PATCH 04/10] Apply suggestions from code review Co-authored-by: jack <0x6a73@protonmail.com> --- keyboards/neson_design/nico/info.json | 29 --------------------------- 1 file changed, 29 deletions(-) diff --git a/keyboards/neson_design/nico/info.json b/keyboards/neson_design/nico/info.json index 43101f26ba5f..3001b8f92b5f 100644 --- a/keyboards/neson_design/nico/info.json +++ b/keyboards/neson_design/nico/info.json @@ -6,17 +6,6 @@ "bootmagic": { "enabled": true }, - "config_h_features": { - "backlight": false, - "bootmagic": true, - "command": false, - "console": false, - "extrakey": true, - "mousekey": true, - "nkro": true, - "rgblight": true - }, - "debounce": 5, "diode_direction": "COL2ROW", "features": { "backlight": false, @@ -31,26 +20,11 @@ "indicators": { "caps_lock": "E2" }, - "keyboard_folder": "neson_design/nico", - "keymaps": {}, "matrix_pins": { "cols": ["C7", "C6", "B6", "B5", "B4", "D7", "D6", "D4", "D5", "D3", "D2", "B7", "B3", "B2", "B1", "F6", "F7"], "rows": ["F0", "E6", "F5", "F4", "F1"] }, - "matrix_size": { - "cols": 17, - "rows": 5 - }, - "mouse_key": { - "enabled": true - }, - "parse_errors": [], - "parse_warnings": [], - "platform": "unknown", - "platform_key": "avr", "processor": "atmega32u4", - "processor_type": "avr", - "protocol": "LUFA", "rgblight": { "brightness_steps": 8, "hue_steps": 8, @@ -67,9 +41,6 @@ }, "layouts": { "LAYOUT": { - "c_macro": true, - "filename": "keyboards/neson_design/nico/nico.h", - "json_layout": true, "layout": [ { "label": "K017", "matrix": [0, 15], "w": 1, "x": 0, "y": 0 }, { "label": "K018", "matrix": [0, 16], "w": 1, "x": 1, "y": 0 }, From 110ac7c582277f8d1cfb3e80d4fe7195a1882885 Mon Sep 17 00:00:00 2001 From: yulei Date: Mon, 15 May 2023 20:05:09 +0800 Subject: [PATCH 05/10] Apply suggestions from code review Co-authored-by: Drashna Jaelre --- keyboards/neson_design/nico/info.json | 3 --- keyboards/neson_design/nico/nico.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/keyboards/neson_design/nico/info.json b/keyboards/neson_design/nico/info.json index 3001b8f92b5f..91ebefec6c96 100644 --- a/keyboards/neson_design/nico/info.json +++ b/keyboards/neson_design/nico/info.json @@ -3,9 +3,6 @@ "keyboard_name": "Nico", "maintainer": "yulei", "bootloader": "atmel-dfu", - "bootmagic": { - "enabled": true - }, "diode_direction": "COL2ROW", "features": { "backlight": false, diff --git a/keyboards/neson_design/nico/nico.c b/keyboards/neson_design/nico/nico.c index ec4211334d9c..5db536dfb1c9 100644 --- a/keyboards/neson_design/nico/nico.c +++ b/keyboards/neson_design/nico/nico.c @@ -34,7 +34,7 @@ static uint16_t last_ticks = 0; void housekeeping_task_kb(void) { - if (IS_LED_ON(host_keyboard_leds(), USB_LED_CAPS_LOCK)) { + if (host_keyboard_led_state().caps_lock) { if (!backup) { caps_led.r = led[4].r; caps_led.g = led[4].g; From 71966fc10dd295e96a0db9e3aa9a78034fc97df8 Mon Sep 17 00:00:00 2001 From: yulei Date: Sun, 28 May 2023 20:57:10 +0800 Subject: [PATCH 06/10] Update keyboards/neson_design/nico/info.json Co-authored-by: Ryan --- keyboards/neson_design/nico/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/neson_design/nico/info.json b/keyboards/neson_design/nico/info.json index 91ebefec6c96..ebc60deea1ec 100644 --- a/keyboards/neson_design/nico/info.json +++ b/keyboards/neson_design/nico/info.json @@ -39,7 +39,7 @@ "layouts": { "LAYOUT": { "layout": [ - { "label": "K017", "matrix": [0, 15], "w": 1, "x": 0, "y": 0 }, + { "label": "K017", "matrix": [0, 15], "x": 0, "y": 0 }, { "label": "K018", "matrix": [0, 16], "w": 1, "x": 1, "y": 0 }, { "label": "K00", "matrix": [0, 0], "w": 1, "x": 2.5, "y": 0 }, { "label": "K01", "matrix": [0, 1], "w": 1, "x": 3.5, "y": 0 }, From 47b8973c753502a4e26349f47721cfa9dd12432d Mon Sep 17 00:00:00 2001 From: astro Date: Tue, 30 May 2023 10:51:23 +0800 Subject: [PATCH 07/10] remove w if it's 1 --- keyboards/neson_design/nico/info.json | 130 +++++++++++++------------- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/keyboards/neson_design/nico/info.json b/keyboards/neson_design/nico/info.json index ebc60deea1ec..57f30f73c6dd 100644 --- a/keyboards/neson_design/nico/info.json +++ b/keyboards/neson_design/nico/info.json @@ -40,83 +40,83 @@ "LAYOUT": { "layout": [ { "label": "K017", "matrix": [0, 15], "x": 0, "y": 0 }, - { "label": "K018", "matrix": [0, 16], "w": 1, "x": 1, "y": 0 }, - { "label": "K00", "matrix": [0, 0], "w": 1, "x": 2.5, "y": 0 }, - { "label": "K01", "matrix": [0, 1], "w": 1, "x": 3.5, "y": 0 }, - { "label": "K02", "matrix": [0, 2], "w": 1, "x": 4.5, "y": 0 }, - { "label": "K03", "matrix": [0, 3], "w": 1, "x": 5.5, "y": 0 }, - { "label": "K04", "matrix": [0, 4], "w": 1, "x": 6.5, "y": 0 }, - { "label": "K05", "matrix": [0, 5], "w": 1, "x": 7.5, "y": 0 }, - { "label": "K06", "matrix": [0, 6], "w": 1, "x": 8.5, "y": 0 }, - { "label": "K07", "matrix": [0, 7], "w": 1, "x": 9.5, "y": 0 }, - { "label": "K08", "matrix": [0, 8], "w": 1, "x": 10.5, "y": 0 }, - { "label": "K09", "matrix": [0, 9], "w": 1, "x": 11.5, "y": 0 }, - { "label": "K0A", "matrix": [0, 10], "w": 1, "x": 12.5, "y": 0 }, - { "label": "K0B", "matrix": [0, 11], "w": 1, "x": 13.5, "y": 0 }, - { "label": "K0C", "matrix": [0, 12], "w": 1, "x": 14.5, "y": 0 }, - { "label": "K0D", "matrix": [0, 13], "w": 1, "x": 15.5, "y": 0 }, - { "label": "K0E", "matrix": [0, 14], "w": 1, "x": 16.5, "y": 0 }, - { "label": "K4E", "matrix": [4, 14], "w": 1, "x": 17.5, "y": 0 }, - { "label": "K116", "matrix": [1, 15], "w": 1, "x": 0, "y": 1 }, - { "label": "K117", "matrix": [1, 16], "w": 1, "x": 1, "y": 1 }, + { "label": "K018", "matrix": [0, 16], "x": 1, "y": 0 }, + { "label": "K00", "matrix": [0, 0], "x": 2.5, "y": 0 }, + { "label": "K01", "matrix": [0, 1], "x": 3.5, "y": 0 }, + { "label": "K02", "matrix": [0, 2], "x": 4.5, "y": 0 }, + { "label": "K03", "matrix": [0, 3], "x": 5.5, "y": 0 }, + { "label": "K04", "matrix": [0, 4], "x": 6.5, "y": 0 }, + { "label": "K05", "matrix": [0, 5], "x": 7.5, "y": 0 }, + { "label": "K06", "matrix": [0, 6], "x": 8.5, "y": 0 }, + { "label": "K07", "matrix": [0, 7], "x": 9.5, "y": 0 }, + { "label": "K08", "matrix": [0, 8], "x": 10.5, "y": 0 }, + { "label": "K09", "matrix": [0, 9], "x": 11.5, "y": 0 }, + { "label": "K0A", "matrix": [0, 10], "x": 12.5, "y": 0 }, + { "label": "K0B", "matrix": [0, 11], "x": 13.5, "y": 0 }, + { "label": "K0C", "matrix": [0, 12], "x": 14.5, "y": 0 }, + { "label": "K0D", "matrix": [0, 13], "x": 15.5, "y": 0 }, + { "label": "K0E", "matrix": [0, 14], "x": 16.5, "y": 0 }, + { "label": "K4E", "matrix": [4, 14], "x": 17.5, "y": 0 }, + { "label": "K116", "matrix": [1, 15], "x": 0, "y": 1 }, + { "label": "K117", "matrix": [1, 16], "x": 1, "y": 1 }, { "label": "K10", "matrix": [1, 0], "w": 1.5, "x": 2.5, "y": 1 }, - { "label": "K11", "matrix": [1, 1], "w": 1, "x": 4, "y": 1 }, - { "label": "K12", "matrix": [1, 2], "w": 1, "x": 5, "y": 1 }, - { "label": "K13", "matrix": [1, 3], "w": 1, "x": 6, "y": 1 }, - { "label": "K14", "matrix": [1, 4], "w": 1, "x": 7, "y": 1 }, - { "label": "K15", "matrix": [1, 5], "w": 1, "x": 8, "y": 1 }, - { "label": "K16", "matrix": [1, 6], "w": 1, "x": 9, "y": 1 }, - { "label": "K17", "matrix": [1, 7], "w": 1, "x": 10, "y": 1 }, - { "label": "K18", "matrix": [1, 8], "w": 1, "x": 11, "y": 1 }, - { "label": "K19", "matrix": [1, 9], "w": 1, "x": 12, "y": 1 }, - { "label": "K1A", "matrix": [1, 10], "w": 1, "x": 13, "y": 1 }, - { "label": "K1B", "matrix": [1, 11], "w": 1, "x": 14, "y": 1 }, - { "label": "K1C", "matrix": [1, 12], "w": 1, "x": 15, "y": 1 }, + { "label": "K11", "matrix": [1, 1], "x": 4, "y": 1 }, + { "label": "K12", "matrix": [1, 2], "x": 5, "y": 1 }, + { "label": "K13", "matrix": [1, 3], "x": 6, "y": 1 }, + { "label": "K14", "matrix": [1, 4], "x": 7, "y": 1 }, + { "label": "K15", "matrix": [1, 5], "x": 8, "y": 1 }, + { "label": "K16", "matrix": [1, 6], "x": 9, "y": 1 }, + { "label": "K17", "matrix": [1, 7], "x": 10, "y": 1 }, + { "label": "K18", "matrix": [1, 8], "x": 11, "y": 1 }, + { "label": "K19", "matrix": [1, 9], "x": 12, "y": 1 }, + { "label": "K1A", "matrix": [1, 10], "x": 13, "y": 1 }, + { "label": "K1B", "matrix": [1, 11], "x": 14, "y": 1 }, + { "label": "K1C", "matrix": [1, 12], "x": 15, "y": 1 }, { "label": "K1D", "matrix": [1, 13], "w": 1.5, "x": 16, "y": 1 }, - { "label": "K1E", "matrix": [1, 14], "w": 1, "x": 17.5, "y": 1 }, - { "label": "K216", "matrix": [2, 15], "w": 1, "x": 0, "y": 2 }, - { "label": "K217", "matrix": [2, 16], "w": 1, "x": 1, "y": 2 }, + { "label": "K1E", "matrix": [1, 14], "x": 17.5, "y": 1 }, + { "label": "K216", "matrix": [2, 15], "x": 0, "y": 2 }, + { "label": "K217", "matrix": [2, 16], "x": 1, "y": 2 }, { "label": "K20", "matrix": [2, 0], "w": 1.75, "x": 2.5, "y": 2 }, - { "label": "K21", "matrix": [2, 1], "w": 1, "x": 4.25, "y": 2 }, - { "label": "K22", "matrix": [2, 2], "w": 1, "x": 5.25, "y": 2 }, - { "label": "K23", "matrix": [2, 3], "w": 1, "x": 6.25, "y": 2 }, - { "label": "K24", "matrix": [2, 4], "w": 1, "x": 7.25, "y": 2 }, - { "label": "K25", "matrix": [2, 5], "w": 1, "x": 8.25, "y": 2 }, - { "label": "K26", "matrix": [2, 6], "w": 1, "x": 9.25, "y": 2 }, - { "label": "K27", "matrix": [2, 7], "w": 1, "x": 10.25, "y": 2 }, - { "label": "K28", "matrix": [2, 8], "w": 1, "x": 11.25, "y": 2 }, - { "label": "K29", "matrix": [2, 9], "w": 1, "x": 12.25, "y": 2 }, - { "label": "K2A", "matrix": [2, 10], "w": 1, "x": 13.25, "y": 2 }, - { "label": "K2B", "matrix": [2, 11], "w": 1, "x": 14.25, "y": 2 }, + { "label": "K21", "matrix": [2, 1], "x": 4.25, "y": 2 }, + { "label": "K22", "matrix": [2, 2], "x": 5.25, "y": 2 }, + { "label": "K23", "matrix": [2, 3], "x": 6.25, "y": 2 }, + { "label": "K24", "matrix": [2, 4], "x": 7.25, "y": 2 }, + { "label": "K25", "matrix": [2, 5], "x": 8.25, "y": 2 }, + { "label": "K26", "matrix": [2, 6], "x": 9.25, "y": 2 }, + { "label": "K27", "matrix": [2, 7], "x": 10.25, "y": 2 }, + { "label": "K28", "matrix": [2, 8], "x": 11.25, "y": 2 }, + { "label": "K29", "matrix": [2, 9], "x": 12.25, "y": 2 }, + { "label": "K2A", "matrix": [2, 10], "x": 13.25, "y": 2 }, + { "label": "K2B", "matrix": [2, 11], "x": 14.25, "y": 2 }, { "label": "K2D", "matrix": [2, 13], "w": 2.25, "x": 15.25, "y": 2 }, - { "label": "K2E", "matrix": [2, 14], "w": 1, "x": 17.5, "y": 2 }, - { "label": "K316", "matrix": [3, 15], "w": 1, "x": 0, "y": 3 }, - { "label": "K317", "matrix": [3, 16], "w": 1, "x": 1, "y": 3 }, + { "label": "K2E", "matrix": [2, 14], "x": 17.5, "y": 2 }, + { "label": "K316", "matrix": [3, 15], "x": 0, "y": 3 }, + { "label": "K317", "matrix": [3, 16], "x": 1, "y": 3 }, { "label": "K30", "matrix": [3, 0], "w": 2.25, "x": 2.5, "y": 3 }, - { "label": "K32", "matrix": [3, 2], "w": 1, "x": 4.75, "y": 3 }, - { "label": "K33", "matrix": [3, 3], "w": 1, "x": 5.75, "y": 3 }, - { "label": "K34", "matrix": [3, 4], "w": 1, "x": 6.75, "y": 3 }, - { "label": "K35", "matrix": [3, 5], "w": 1, "x": 7.75, "y": 3 }, - { "label": "K36", "matrix": [3, 6], "w": 1, "x": 8.75, "y": 3 }, - { "label": "K37", "matrix": [3, 7], "w": 1, "x": 9.75, "y": 3 }, - { "label": "K38", "matrix": [3, 8], "w": 1, "x": 10.75, "y": 3 }, - { "label": "K39", "matrix": [3, 9], "w": 1, "x": 11.75, "y": 3 }, - { "label": "K3A", "matrix": [3, 10], "w": 1, "x": 12.75, "y": 3 }, - { "label": "K3B", "matrix": [3, 11], "w": 1, "x": 13.75, "y": 3 }, + { "label": "K32", "matrix": [3, 2], "x": 4.75, "y": 3 }, + { "label": "K33", "matrix": [3, 3], "x": 5.75, "y": 3 }, + { "label": "K34", "matrix": [3, 4], "x": 6.75, "y": 3 }, + { "label": "K35", "matrix": [3, 5], "x": 7.75, "y": 3 }, + { "label": "K36", "matrix": [3, 6], "x": 8.75, "y": 3 }, + { "label": "K37", "matrix": [3, 7], "x": 9.75, "y": 3 }, + { "label": "K38", "matrix": [3, 8], "x": 10.75, "y": 3 }, + { "label": "K39", "matrix": [3, 9], "x": 11.75, "y": 3 }, + { "label": "K3A", "matrix": [3, 10], "x": 12.75, "y": 3 }, + { "label": "K3B", "matrix": [3, 11], "x": 13.75, "y": 3 }, { "label": "K3C", "matrix": [3, 12], "w": 1.75, "x": 14.75, "y": 3 }, - { "label": "K3D", "matrix": [3, 13], "w": 1, "x": 16.5, "y": 3 }, - { "label": "K3E", "matrix": [3, 14], "w": 1, "x": 17.5, "y": 3 }, - { "label": "K416", "matrix": [4, 15], "w": 1, "x": 0, "y": 4 }, - { "label": "K417", "matrix": [4, 16], "w": 1, "x": 1, "y": 4 }, + { "label": "K3D", "matrix": [3, 13], "x": 16.5, "y": 3 }, + { "label": "K3E", "matrix": [3, 14], "x": 17.5, "y": 3 }, + { "label": "K416", "matrix": [4, 15], "x": 0, "y": 4 }, + { "label": "K417", "matrix": [4, 16], "x": 1, "y": 4 }, { "label": "K40", "matrix": [4, 0], "w": 1.25, "x": 2.5, "y": 4 }, { "label": "K41", "matrix": [4, 1], "w": 1.25, "x": 3.75, "y": 4 }, { "label": "K42", "matrix": [4, 2], "w": 1.25, "x": 5, "y": 4 }, { "label": "K48", "matrix": [4, 8], "w": 6.25, "x": 6.25, "y": 4 }, { "label": "K49", "matrix": [4, 9], "w": 1.25, "x": 12.5, "y": 4 }, { "label": "K4A", "matrix": [4, 10], "w": 1.25, "x": 13.75, "y": 4 }, - { "label": "K4B", "matrix": [4, 11], "w": 1, "x": 15.5, "y": 4 }, - { "label": "K4C", "matrix": [4, 12], "w": 1, "x": 16.5, "y": 4 }, - { "label": "K4D", "matrix": [4, 13], "w": 1, "x": 17.5, "y": 4 } + { "label": "K4B", "matrix": [4, 11], "x": 15.5, "y": 4 }, + { "label": "K4C", "matrix": [4, 12], "x": 16.5, "y": 4 }, + { "label": "K4D", "matrix": [4, 13], "x": 17.5, "y": 4 } ] } } From aea1334ef04c12a0d4608be76469e8431a7a346f Mon Sep 17 00:00:00 2001 From: yulei Date: Tue, 30 May 2023 13:05:21 +0800 Subject: [PATCH 08/10] Apply suggestions from code review Co-authored-by: Joel Challis --- keyboards/neson_design/nico/info.json | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/keyboards/neson_design/nico/info.json b/keyboards/neson_design/nico/info.json index 57f30f73c6dd..f21b644f569b 100644 --- a/keyboards/neson_design/nico/info.json +++ b/keyboards/neson_design/nico/info.json @@ -5,7 +5,6 @@ "bootloader": "atmel-dfu", "diode_direction": "COL2ROW", "features": { - "backlight": false, "bootmagic": true, "command": false, "console": false, @@ -22,12 +21,11 @@ "rows": ["F0", "E6", "F5", "F4", "F1"] }, "processor": "atmega32u4", + "ws2812": { + "pin": "B0" + }, "rgblight": { - "brightness_steps": 8, - "hue_steps": 8, - "led_count": 5, - "pin": "B0", - "saturation_steps": 8 + "led_count": 5 }, "url": "", "usb": { From 1dfcf33469c7be5a349e978d800db55de6528bef Mon Sep 17 00:00:00 2001 From: astro Date: Tue, 30 May 2023 13:06:12 +0800 Subject: [PATCH 09/10] use the rules.mk from template --- keyboards/neson_design/nico/rules.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/neson_design/nico/rules.mk b/keyboards/neson_design/nico/rules.mk index e69de29bb2d1..6e7633bfe015 100644 --- a/keyboards/neson_design/nico/rules.mk +++ b/keyboards/neson_design/nico/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank From b30b9cc26f553321f589b48a49ab081d5cf55155 Mon Sep 17 00:00:00 2001 From: yulei Date: Fri, 21 Jul 2023 08:46:30 +0800 Subject: [PATCH 10/10] Update keyboards/neson_design/nico/nico.c Co-authored-by: Ryan --- keyboards/neson_design/nico/nico.c | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/neson_design/nico/nico.c b/keyboards/neson_design/nico/nico.c index 5db536dfb1c9..63f08b8639f6 100644 --- a/keyboards/neson_design/nico/nico.c +++ b/keyboards/neson_design/nico/nico.c @@ -19,7 +19,6 @@ #include "quantum.h" #ifdef RGBLIGHT_ENABLE -#include "rgblight.h" static bool alert = false; static bool backup = false;