summaryrefslogtreecommitdiff
path: root/keyboards/rgbkb
diff options
context:
space:
mode:
authorfauxpark <fauxpark@gmail.com>2021-09-20 16:58:29 +1000
committerfauxpark <fauxpark@gmail.com>2021-09-20 16:58:29 +1000
commitc38a7308054f2072d234ee0d44d3bea9f809a63d (patch)
treef84f46444812526c63c3892ca1783834e91599d9 /keyboards/rgbkb
parent28b8b578b055bf76b28f47f9fd02db351cacfa09 (diff)
parent574b6734afb6ec7073f6fb816dd454f03b7eb26f (diff)
Merge remote-tracking branch 'upstream/master' into develop
Diffstat (limited to 'keyboards/rgbkb')
-rw-r--r--keyboards/rgbkb/mun/keymaps/peott-fr/config.h23
-rw-r--r--keyboards/rgbkb/mun/keymaps/peott-fr/keymap.c81
-rw-r--r--keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c24
-rw-r--r--keyboards/rgbkb/mun/keymaps/xulkal2/rules.mk3
-rw-r--r--keyboards/rgbkb/mun/matrix.c32
-rw-r--r--keyboards/rgbkb/zygomorph/rules.mk2
6 files changed, 142 insertions, 23 deletions
diff --git a/keyboards/rgbkb/mun/keymaps/peott-fr/config.h b/keyboards/rgbkb/mun/keymaps/peott-fr/config.h
new file mode 100644
index 0000000000..9719d17437
--- /dev/null
+++ b/keyboards/rgbkb/mun/keymaps/peott-fr/config.h
@@ -0,0 +1,23 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <https://github.com/Legonut> wrote this file. As long as you retain this
+ * notice you can do whatever you want with this stuff. If we meet some day, and
+ * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
+ * ----------------------------------------------------------------------------
+ */
+
+#pragma once
+
+// No need for the single versions when multi performance isn't a problem =D
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
+#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
+#define DISABLE_RGB_MATRIX_SPLASH
+#define DISABLE_RGB_MATRIX_SOLID_SPLASH
+
+// 20m timeout (20m * 60s * 1000mil)
+// #define RGB_DISABLE_TIMEOUT 1200000
+#define RGB_DISABLE_WHEN_USB_SUSPENDED
+
+#define STM32_ONBOARD_EEPROM_SIZE 2048
diff --git a/keyboards/rgbkb/mun/keymaps/peott-fr/keymap.c b/keyboards/rgbkb/mun/keymaps/peott-fr/keymap.c
new file mode 100644
index 0000000000..66eaa144ec
--- /dev/null
+++ b/keyboards/rgbkb/mun/keymaps/peott-fr/keymap.c
@@ -0,0 +1,81 @@
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <https://github.com/Legonut> wrote this file. As long as you retain this
+ * notice you can do whatever you want with this stuff. If we meet some day, and
+ * you think this stuff is worth it, you can buy me a beer in return. David Rauseo
+ * ----------------------------------------------------------------------------
+ */
+
+#include QMK_KEYBOARD_H
+#include "common_oled.h"
+
+enum keymap_layers {
+ _BASE,
+ _LHAND,
+ _FUNC
+};
+
+//Layers and special keys.
+#define SPC_LHND LT(_LHAND, KC_SPC)
+#define BSP_FUNC LT(_FUNC, KC_BSPC)
+#define DEL_FUNC LT(_FUNC, KC_DEL)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* QWERTY
+ * .--------------------------------------------------------------. .--------------------------------------------------------------.
+ * | Esc | 1 | 2 | 3 | 4 | 5 | ` | | = | 6 | 7 | 8 | 9 | 0 | - |
+ * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ |
+ * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ * | LCtrl | A | S | D | F | G | Home | | End | H | J | K | L | : | ' |
+ * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ * | Shift/(| Z | X | C | V | B | Play | | Mute | N | M | , | . | / | Shift/)|
+ * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
+ * | LCtrl | Win | Alt | MO(3) | L2/Del | Space | Space | | Bcksp | Bcksp | Left | Down | Up | Right | Ctrl |
+ * '--------+--------+--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------+--------+--------'
+ * Encoder 1 Encoder 2 Encoder 3 Encoder 4
+ * .-----------------------------------. .-----------------------------------.
+ * | VolUp | VolDn | VolUp | VolDn | | PgUp | PgDn | PgUp | PgDn |
+ * |--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------|
+ * | VolDn | VolUp | Next | Play | Prev | Touch Encoder Touch Encoder | RgbHuI | RgbHuD | RgbMdD | RgbTog | RgbMdI |
+ * '--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------'
+ */
+ [_BASE] = LAYOUT(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_END, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MPLY, KC_MUTE, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
+ KC_LCTL, KC_LGUI, KC_LALT, MO(3), DEL_FUNC, SPC_LHND, SPC_LHND, BSP_FUNC, BSP_FUNC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RCTL,
+ // Here we have the encoder setup. Encoder 0 clockwise, Encoder 0 counter-clockwise, Encoder 1 clockwise, Encoder 1 counter-clockwise , then right side
+ KC_VOLU, KC_VOLD, KC_VOLU, KC_VOLD, KC_PGDN, KC_PGUP, KC_PGDN, KC_PGUP, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_MPRV, RGB_HUI, RGB_HUD, RGB_RMOD, RGB_TOG, RGB_MOD
+ ),
+ [_LHAND] = LAYOUT(
+ RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_PGUP, KC_PGDN, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS,
+ KC_LSFT, KC_CALC, KC_MYCM, KC_TRNS, KC_ENT, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_END, KC_PGDN, KC_RSFT,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS,
+ // Encoders.
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+ [_FUNC] = LAYOUT(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, RESET,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ // Encoders.
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ ),
+ // Placeholder layer!
+ [3] = LAYOUT(
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
+ // Encoders.
+ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
+ )
+}; \ No newline at end of file
diff --git a/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c b/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c
index 2de5888f17..cd1eec7515 100644
--- a/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c
+++ b/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c
@@ -159,6 +159,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
+//#define MATRIX_SCAN_DEBUG
+#if !defined(MATRIX_SCAN_DEBUG)
static void render_layer(void) {
// Host Keyboard Layer Status
oled_write_P(PSTR("Layer"), false);
@@ -190,8 +192,8 @@ static void render_touch(void)
oled_write_P(!touch_encoder_toggled() ? PSTR("TOUCH") : PSTR(" "), false);
oled_write_P(touch_encoder_calibrating() ? PSTR("CLBRT") : PSTR(" "), false);
}
-
-/*static uint32_t scan_counter = 0;
+#else
+static uint32_t scan_counter = 0;
static uint32_t scan_value = 0;
static uint16_t scan_timer = 1000;
@@ -218,27 +220,27 @@ void render_debug_scan(void) {
static char buffer[6] = {0};
snprintf(buffer, sizeof(buffer), "%5d", scan_value);
oled_write_ln_P(buffer, false);
-}*/
+}
+#endif
void oled_task_user(void) {
+#if !defined(MATRIX_SCAN_DEBUG)
if (is_keyboard_left()) {
render_layer();
oled_write_P(PSTR(" "), false);
render_leds();
oled_write_P(PSTR(" "), false);
render_touch();
- //oled_write_P(PSTR(" "), false);
- //render_debug_scan();
- oled_set_cursor(0, 12);
- render_icon();
}
else {
render_rgb_menu();
- //oled_write_P(PSTR(" "), false);
- //render_debug_scan();
- oled_set_cursor(0, 12);
- render_icon();
}
+#else
+ oled_write_P(PSTR(" "), false);
+ render_debug_scan();
+#endif
+ oled_set_cursor(0, 12);
+ render_icon();
}
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
diff --git a/keyboards/rgbkb/mun/keymaps/xulkal2/rules.mk b/keyboards/rgbkb/mun/keymaps/xulkal2/rules.mk
index b626305163..a087f669da 100644
--- a/keyboards/rgbkb/mun/keymaps/xulkal2/rules.mk
+++ b/keyboards/rgbkb/mun/keymaps/xulkal2/rules.mk
@@ -1,4 +1,3 @@
MOUSEKEY_ENABLE = yes # using for mouse wheel up and down, more granular than page up/down
-OPT_DEFS += -DRGB_UNLIMITED_POWER
-DEBOUNCE_TYPE = sym_eager_pk \ No newline at end of file
+OPT_DEFS += -DRGB_UNLIMITED_POWER \ No newline at end of file
diff --git a/keyboards/rgbkb/mun/matrix.c b/keyboards/rgbkb/mun/matrix.c
index b859847f10..2472d217c7 100644
--- a/keyboards/rgbkb/mun/matrix.c
+++ b/keyboards/rgbkb/mun/matrix.c
@@ -11,7 +11,19 @@
#include "atomic_util.h"
#include "gpio.h"
-static pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
+#define ROWS_PER_HAND (MATRIX_ROWS / 2)
+static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
+static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+
+void matrix_init_pins(void) {
+ for (size_t i = 0; i < MATRIX_COLS; i++) {
+ setPinInputHigh(col_pins[i]);
+ }
+ for (size_t i = 0; i < ROWS_PER_HAND; i++) {
+ setPinOutput(row_pins[i]);
+ writePinHigh(row_pins[i]);
+ }
+}
void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
/* Drive row pin low. */
@@ -22,15 +34,17 @@ void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
uint16_t porta = palReadPort(GPIOA);
uint16_t portb = palReadPort(GPIOB);
+// clang-format off
/* Order of pins on the mun is: A0, B11, B0, B10, B12, B2, A8
Pin is active low, therefore we have to invert the result. */
- matrix_row_t cols = ~(((porta & (0x1 << 0)) >> 0) // A0 (0)
- | ((portb & (0x1 << 11)) >> 10) // B11 (1)
- | ((portb & (0x1 << 0)) << 2) // B0 (2)
- | ((portb & (0x1 << 10)) >> 7) // B10 (3)
- | ((portb & (0x1 << 12)) >> 8) // B12 (4)
- | ((portb & (0x1 << 2)) << 3) // B2 (5)
- | ((porta & (0x1 << 8)) >> 2)); // A8 (6)
+ matrix_row_t cols = ~(((porta & (0x1 << 0)) >> 0) // A0 (0)
+ | ((portb & (0x1 << 11)) >> 10) // B11 (1)
+ | ((portb & (0x1 << 0)) << 2) // B0 (2)
+ | ((portb & (0x1 << 10)) >> 7) // B10 (3)
+ | ((portb & (0x1 << 12)) >> 8) // B12 (4)
+ | ((portb & (0x1 << 2)) << 3) // B2 (5)
+ | ((porta & (0x1 << 8)) >> 2)); // A8 (6)
+// clang-format on
/* Reverse the order of columns for left hand as the board is flipped. */
// if (isLeftHand) {
@@ -50,7 +64,7 @@ void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
/* Drive row pin high again. */
ATOMIC_BLOCK_FORCEON { writePinHigh(row_pins[current_row]); }
- matrix_output_unselect_delay(current_row, row_pins[current_row] != 0);
+ matrix_output_unselect_delay(current_row, cols != 0);
}
#if defined(BUSY_WAIT)
diff --git a/keyboards/rgbkb/zygomorph/rules.mk b/keyboards/rgbkb/zygomorph/rules.mk
index f1a1e52709..d8f4c1309f 100644
--- a/keyboards/rgbkb/zygomorph/rules.mk
+++ b/keyboards/rgbkb/zygomorph/rules.mk
@@ -16,7 +16,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration
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
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
UNICODE_ENABLE = no # Unicode
AUDIO_ENABLE = no # Audio output on port C6