summaryrefslogtreecommitdiff
path: root/keyboards/pteron36
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2022-06-27 16:38:28 +0200
committerInigoGutierrez <inigogf.95@gmail.com>2022-06-27 16:38:28 +0200
commit98b9909429aea0869f7a6f2f44ab386a4a3ff094 (patch)
treee1080a61bb89a75edc70818489f8044adf597c48 /keyboards/pteron36
parentb610965fd6d851484025166fb255078b1c809261 (diff)
parentfa3dd373b4925734d9843ae6014349069ffec353 (diff)
downloadqmk_firmware-98b9909429aea0869f7a6f2f44ab386a4a3ff094.tar.gz
qmk_firmware-98b9909429aea0869f7a6f2f44ab386a4a3ff094.zip
Merge branch 'master' into taamas
Diffstat (limited to 'keyboards/pteron36')
-rw-r--r--keyboards/pteron36/config.h6
-rw-r--r--keyboards/pteron36/keymaps/via/keymap.c33
-rw-r--r--keyboards/pteron36/pteron36.c10
-rw-r--r--keyboards/pteron36/rules.mk7
4 files changed, 27 insertions, 29 deletions
diff --git a/keyboards/pteron36/config.h b/keyboards/pteron36/config.h
index d6f31514e6..793dc8e5ed 100644
--- a/keyboards/pteron36/config.h
+++ b/keyboards/pteron36/config.h
@@ -144,10 +144,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
-/* disable these deprecated features by default */
-#define NO_ACTION_MACRO
-#define NO_ACTION_FUNCTION
-
/* Bootmagic Lite key configuration */
//#define BOOTMAGIC_LITE_ROW 0
//#define BOOTMAGIC_LITE_COLUMN 0
@@ -164,4 +160,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//RGB Underglow
#define RGB_DI_PIN B6
-#define RGBLED_NUM 10 \ No newline at end of file
+#define RGBLED_NUM 10
diff --git a/keyboards/pteron36/keymaps/via/keymap.c b/keyboards/pteron36/keymaps/via/keymap.c
index ce96ea6c59..47533efc93 100644
--- a/keyboards/pteron36/keymaps/via/keymap.c
+++ b/keyboards/pteron36/keymaps/via/keymap.c
@@ -1,19 +1,19 @@
/* Copyright HarshitGoel96 2020
* With permission from mattdibi, the original maintainer of the Redox hardware.
- *
- * 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/>.
- */
+ *
+ * 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 QMK_KEYBOARD_H
// Each layer gets a name for readability, which is then used in the keymap matrix below.
@@ -84,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-#ifdef OLED_DRIVER_ENABLE
+#ifdef OLED_ENABLE
static void render_logo(void) {
static const char PROGMEM qmk_logo[] = {
@@ -131,12 +131,13 @@ static void render_status(void){
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
}
-void oled_task_user(void) {
+bool oled_task_user(void) {
if (is_keyboard_master()) {
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} else {
render_logo(); // Renders a static logo
oled_scroll_left(); // Turns on scrolling
}
+ return false;
}
#endif
diff --git a/keyboards/pteron36/pteron36.c b/keyboards/pteron36/pteron36.c
index 3288626f00..1281b5306e 100644
--- a/keyboards/pteron36/pteron36.c
+++ b/keyboards/pteron36/pteron36.c
@@ -36,12 +36,15 @@ bool encoder_update_kb(uint8_t index, bool clockwise) {
return true;
}
//common oled support.
-#ifdef OLED_DRIVER_ENABLE
-__attribute__((weak)) void oled_task_user(void) {
+#ifdef OLED_ENABLE
+bool oled_task_kb(void) {
+ if (!oled_task_user()) {
+ return false;
+ }
if (is_keyboard_master()) {
oled_write_P(PSTR("Layer: "), false);
switch (get_highest_layer(layer_state)) {
- case _QWERTY:
+ case 0:
oled_write_ln_P(PSTR("Default"), false);
break;
default:
@@ -62,5 +65,6 @@ __attribute__((weak)) void oled_task_user(void) {
oled_write_P(qmk_logo, false);
oled_scroll_left(); // Turns on scrolling
}
+ return false;
}
#endif
diff --git a/keyboards/pteron36/rules.mk b/keyboards/pteron36/rules.mk
index a12be26351..803fa4dcca 100644
--- a/keyboards/pteron36/rules.mk
+++ b/keyboards/pteron36/rules.mk
@@ -12,14 +12,11 @@ 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
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE = no # USB Nkey Rollover
+NKRO_ENABLE = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
-OLED_DRIVER_ENABLE = yes # OLED display
+OLED_ENABLE = yes # OLED display
ENCODER_ENABLE = yes # Encoder support
SPLIT_KEYBOARD = yes # Split enable