Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Keyboard] Update era/divine #21767

Merged
merged 5 commits into from
Sep 3, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions keyboards/era/divine/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* 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 <http://www.gnu.org/licenses/>.
*/

#pragma once
eerraa marked this conversation as resolved.
Show resolved Hide resolved

#define BACKLIGHT_PWM_DRIVER PWMD0
#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_A
24 changes: 24 additions & 0 deletions keyboards/era/divine/divine.c
eerraa marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* 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 <http://www.gnu.org/licenses/>.
*/

#include "quantum.h"

void keyboard_post_init_kb(void) {
#ifdef BACKLIGHT_ENABLE
backlight_enable();
backlight_level(5);
#endif
}
22 changes: 22 additions & 0 deletions keyboards/era/divine/halconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* 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 <http://www.gnu.org/licenses/>.
*/

#pragma once
eerraa marked this conversation as resolved.
Show resolved Hide resolved

#define HAL_USE_PWM TRUE
#define HAL_USE_PAL TRUE
eerraa marked this conversation as resolved.
Show resolved Hide resolved

#include_next <halconf.h>
9 changes: 7 additions & 2 deletions keyboards/era/divine/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@
"manufacturer": "ERA",
"keyboard_name": "DIVINE 1.0.0",
"maintainer": "eerraa",
"backlight": {
"pin": "GP0",
"levels": 5
eerraa marked this conversation as resolved.
Show resolved Hide resolved
},
"bootloader": "rp2040",
"build": {
"debounce_type": "sym_defer_pk"
},
"diode_direction": "COL2ROW",
"features": {
"backlight": true,
"bootmagic": true,
"command": false,
"console": false,
Expand All @@ -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"],
Expand Down
22 changes: 22 additions & 0 deletions keyboards/era/divine/mcuconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* 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 <http://www.gnu.org/licenses/>.
*/

#pragma once

#include_next <mcuconf.h>

#undef RP_PWM_USE_PWM0
#define RP_PWM_USE_PWM0 TRUE
4 changes: 2 additions & 2 deletions keyboards/era/divine/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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
1 change: 0 additions & 1 deletion keyboards/era/divine/rules.mk
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
# File intentionally blank
eerraa marked this conversation as resolved.
Show resolved Hide resolved