From 9437f8dd7b806c4af6e79027cca13ea6c475d93b Mon Sep 17 00:00:00 2001 From: eerraa Date: Wed, 16 Aug 2023 21:51:03 +0900 Subject: [PATCH 1/5] Add backlight for indicator operation Add backlight for indicator operation --- keyboards/era/divine/config.h | 4 ++++ keyboards/era/divine/divine.c | 8 ++++++++ keyboards/era/divine/halconf.h | 6 ++++++ keyboards/era/divine/info.json | 9 +++++++-- keyboards/era/divine/mcuconf.h | 6 ++++++ keyboards/era/divine/readme.md | 4 ++-- keyboards/era/divine/rules.mk | 1 - 7 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 keyboards/era/divine/config.h create mode 100644 keyboards/era/divine/divine.c create mode 100644 keyboards/era/divine/halconf.h create mode 100644 keyboards/era/divine/mcuconf.h diff --git a/keyboards/era/divine/config.h b/keyboards/era/divine/config.h new file mode 100644 index 000000000000..a2b06bc2a252 --- /dev/null +++ b/keyboards/era/divine/config.h @@ -0,0 +1,4 @@ +#pragma once + +#define BACKLIGHT_PWM_DRIVER PWMD0 +#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_A \ No newline at end of file diff --git a/keyboards/era/divine/divine.c b/keyboards/era/divine/divine.c new file mode 100644 index 000000000000..d9e6589797da --- /dev/null +++ b/keyboards/era/divine/divine.c @@ -0,0 +1,8 @@ +#include "quantum.h" + +void keyboard_post_init_kb(void) { +#ifdef BACKLIGHT_ENABLE + backlight_enable(); + backlight_level(5); +#endif +} \ No newline at end of file diff --git a/keyboards/era/divine/halconf.h b/keyboards/era/divine/halconf.h new file mode 100644 index 000000000000..011b3e1f4fb0 --- /dev/null +++ b/keyboards/era/divine/halconf.h @@ -0,0 +1,6 @@ +#pragma once + +#define HAL_USE_PWM TRUE +#define HAL_USE_PAL TRUE + +#include_next \ No newline at end of file diff --git a/keyboards/era/divine/info.json b/keyboards/era/divine/info.json index de87fd83e22b..3fec7cbb8440 100644 --- a/keyboards/era/divine/info.json +++ b/keyboards/era/divine/info.json @@ -2,12 +2,17 @@ "manufacturer": "ERA", "keyboard_name": "DIVINE 1.0.0", "maintainer": "eerraa", + "backlight": { + "pin": "GP0", + "levels": 5 + }, "bootloader": "rp2040", "build": { "debounce_type": "sym_defer_pk" }, "diode_direction": "COL2ROW", "features": { + "backlight": true, "bootmagic": true, "command": false, "console": false, @@ -18,8 +23,8 @@ "indicators": { "caps_lock": "GP1", "num_lock": "GP2", - "scroll_lock": "GP3", - "on_state": 0 + "on_state": 0, + "scroll_lock": "GP3" }, "matrix_pins": { "cols": ["GP13", "GP12", "GP19", "GP20", "GP21", "GP22", "GP23", "GP24", "GP25", "GP26", "GP27", "GP28", "GP29", "GP18", "GP5", "GP6", "GP7"], diff --git a/keyboards/era/divine/mcuconf.h b/keyboards/era/divine/mcuconf.h new file mode 100644 index 000000000000..4dbb67032607 --- /dev/null +++ b/keyboards/era/divine/mcuconf.h @@ -0,0 +1,6 @@ +#pragma once + +#include_next + +#undef RP_PWM_USE_PWM0 +#define RP_PWM_USE_PWM0 TRUE \ No newline at end of file diff --git a/keyboards/era/divine/readme.md b/keyboards/era/divine/readme.md index decc7e3d31c6..3049e3b8400d 100644 --- a/keyboards/era/divine/readme.md +++ b/keyboards/era/divine/readme.md @@ -3,7 +3,7 @@ DIVINE Keyboard * Keyboard Maintainer: [ERA](https://github.com/eerraa) -* Hardware Supported: RP2040 +* Hardware Supported: DIVINE 1.0.0 PCB * Hardware Availability: [ERA](https://github.com/eerraa) Make example for this keyboard (after setting up your build environment): @@ -21,5 +21,5 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to Enter the bootloader in 3 ways: * **Bootmagic reset**: Hold down the key at ESC(0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard -* **Physical reset button**: Short the reset hole of the PCB twice within 1 second. +* **Physical reset button**: Briefly short the `RESET` and `GND` pads on the SWD header twice, or short the `BOOT` header and plug in keyboard * **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available \ No newline at end of file diff --git a/keyboards/era/divine/rules.mk b/keyboards/era/divine/rules.mk index 3922c569c4ec..e69de29bb2d1 100644 --- a/keyboards/era/divine/rules.mk +++ b/keyboards/era/divine/rules.mk @@ -1 +0,0 @@ -# File intentionally blank \ No newline at end of file From c87cedc6f4ce5c5761af28fd216ffa9c562c0b63 Mon Sep 17 00:00:00 2001 From: eerraa Date: Wed, 16 Aug 2023 22:08:32 +0900 Subject: [PATCH 2/5] Add license header Add license header --- keyboards/era/divine/config.h | 18 +++++++++++++++++- keyboards/era/divine/divine.c | 16 ++++++++++++++++ keyboards/era/divine/halconf.h | 18 +++++++++++++++++- keyboards/era/divine/mcuconf.h | 16 ++++++++++++++++ 4 files changed, 66 insertions(+), 2 deletions(-) diff --git a/keyboards/era/divine/config.h b/keyboards/era/divine/config.h index a2b06bc2a252..58e97d9e0faa 100644 --- a/keyboards/era/divine/config.h +++ b/keyboards/era/divine/config.h @@ -1,4 +1,20 @@ -#pragma once +/* Copyright 2023 eerraa + * + * 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 BACKLIGHT_PWM_DRIVER PWMD0 #define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_A \ No newline at end of file diff --git a/keyboards/era/divine/divine.c b/keyboards/era/divine/divine.c index d9e6589797da..a71176fcec21 100644 --- a/keyboards/era/divine/divine.c +++ b/keyboards/era/divine/divine.c @@ -1,3 +1,19 @@ +/* Copyright 2023 eerraa + * + * 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" void keyboard_post_init_kb(void) { diff --git a/keyboards/era/divine/halconf.h b/keyboards/era/divine/halconf.h index 011b3e1f4fb0..ebecfada3cec 100644 --- a/keyboards/era/divine/halconf.h +++ b/keyboards/era/divine/halconf.h @@ -1,4 +1,20 @@ -#pragma once +/* Copyright 2023 eerraa + * + * 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_PWM TRUE #define HAL_USE_PAL TRUE diff --git a/keyboards/era/divine/mcuconf.h b/keyboards/era/divine/mcuconf.h index 4dbb67032607..7698b5d1392d 100644 --- a/keyboards/era/divine/mcuconf.h +++ b/keyboards/era/divine/mcuconf.h @@ -1,3 +1,19 @@ +/* Copyright 2023 eerraa + * + * 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 From 1bd324d7a6d36edc699c52b0a07066364d73e5db Mon Sep 17 00:00:00 2001 From: eerraa Date: Thu, 17 Aug 2023 00:32:06 +0900 Subject: [PATCH 3/5] Apply Change Request Apply Change Request --- keyboards/era/divine/config.h | 2 +- keyboards/era/divine/halconf.h | 3 +-- keyboards/era/divine/rules.mk | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/era/divine/config.h b/keyboards/era/divine/config.h index 58e97d9e0faa..e1083fe5e299 100644 --- a/keyboards/era/divine/config.h +++ b/keyboards/era/divine/config.h @@ -14,7 +14,7 @@ * along with this program. If not, see . */ - #pragma once +#pragma once #define BACKLIGHT_PWM_DRIVER PWMD0 #define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_A \ No newline at end of file diff --git a/keyboards/era/divine/halconf.h b/keyboards/era/divine/halconf.h index ebecfada3cec..5a527da781fd 100644 --- a/keyboards/era/divine/halconf.h +++ b/keyboards/era/divine/halconf.h @@ -14,9 +14,8 @@ * along with this program. If not, see . */ - #pragma once +#pragma once #define HAL_USE_PWM TRUE -#define HAL_USE_PAL TRUE #include_next \ No newline at end of file diff --git a/keyboards/era/divine/rules.mk b/keyboards/era/divine/rules.mk index e69de29bb2d1..3922c569c4ec 100644 --- a/keyboards/era/divine/rules.mk +++ b/keyboards/era/divine/rules.mk @@ -0,0 +1 @@ +# File intentionally blank \ No newline at end of file From 9330cfe2c7123ce7c022b8db174dd71fe3e7fc2e Mon Sep 17 00:00:00 2001 From: eerraa Date: Thu, 17 Aug 2023 09:40:47 +0900 Subject: [PATCH 4/5] delete keyboard.c delete unnecessary code --- keyboards/era/divine/divine.c | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 keyboards/era/divine/divine.c diff --git a/keyboards/era/divine/divine.c b/keyboards/era/divine/divine.c deleted file mode 100644 index a71176fcec21..000000000000 --- a/keyboards/era/divine/divine.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright 2023 eerraa - * - * 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" - -void keyboard_post_init_kb(void) { -#ifdef BACKLIGHT_ENABLE - backlight_enable(); - backlight_level(5); -#endif -} \ No newline at end of file From 15dd9505a27a3b2a391aa67a9bd36d9651022f2c Mon Sep 17 00:00:00 2001 From: era <73109780+eerraa@users.noreply.github.com> Date: Tue, 22 Aug 2023 14:15:46 +0900 Subject: [PATCH 5/5] Update keyboards/era/divine/info.json Co-authored-by: Ryan --- keyboards/era/divine/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/era/divine/info.json b/keyboards/era/divine/info.json index 3fec7cbb8440..d02241da7822 100644 --- a/keyboards/era/divine/info.json +++ b/keyboards/era/divine/info.json @@ -4,7 +4,7 @@ "maintainer": "eerraa", "backlight": { "pin": "GP0", - "levels": 5 + "levels": 5 }, "bootloader": "rp2040", "build": {