Skip to content

Commit

Permalink
Initial support for the Dilemma 3x5+3 Assembled RGB
Browse files Browse the repository at this point in the history
  • Loading branch information
0xcharly committed Oct 29, 2022
1 parent 96c0a65 commit 19ed9d5
Show file tree
Hide file tree
Showing 46 changed files with 1,003 additions and 112 deletions.
1 change: 1 addition & 0 deletions keyboards/bastardkb/charybdis/3x5/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* 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

enum charybdis_keymap_layers {
Expand Down
65 changes: 65 additions & 0 deletions keyboards/bastardkb/charybdis/3x5/v2/splinky/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,68 @@
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U

/** RGB Matrix. */

#ifdef RGB_MATRIX_ENABLE
// Enable all animations on ARM boards since they have plenty of memory
// available for it.
# define ENABLE_RGB_MATRIX_ALPHAS_MODS
# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
# define ENABLE_RGB_MATRIX_BREATHING
# define ENABLE_RGB_MATRIX_BAND_SAT
# define ENABLE_RGB_MATRIX_BAND_VAL
# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
# define ENABLE_RGB_MATRIX_CYCLE_ALL
# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
# define ENABLE_RGB_MATRIX_DUAL_BEACON
# define ENABLE_RGB_MATRIX_RAINBOW_BEACON
# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
# define ENABLE_RGB_MATRIX_RAINDROPS
# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
# define ENABLE_RGB_MATRIX_HUE_BREATHING
# define ENABLE_RGB_MATRIX_HUE_PENDULUM
# define ENABLE_RGB_MATRIX_HUE_WAVE
# define ENABLE_RGB_MATRIX_TYPING_HEATMAP
# define ENABLE_RGB_MATRIX_DIGITAL_RAIN
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
# define ENABLE_RGB_MATRIX_SPLASH
# define ENABLE_RGB_MATRIX_MULTISPLASH
# define ENABLE_RGB_MATRIX_SOLID_SPLASH
# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH

// Limit maximum brightness to keep power consumption reasonable, and avoid
// disconnects.
# undef RGB_MATRIX_MAXIMUM_BRIGHTNESS
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 64

// Rainbow swirl as startup mode.
# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT

// Slow swirl at startup.
# define RGB_MATRIX_STARTUP_SPD 32

// Startup values.
# define RGB_MATRIX_STARTUP_HUE 0
# define RGB_MATRIX_STARTUP_SAT 255
# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
# define RGB_MATRIX_STARTUP_HSV RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT, RGB_MATRIX_STARTUP_VAL
#endif // RGB_MATRIX_ENABLE
37 changes: 37 additions & 0 deletions keyboards/bastardkb/dilemma/3x5_2/3x5_2.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
*
* 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

// clang-format off
#define LAYOUT_split_3x5_2( \
k00, k01, k02, k03, k04, k44, k43, k42, k41, k40, \
k10, k11, k12, k13, k14, k54, k53, k52, k51, k50, \
k20, k21, k22, k23, k24, k64, k63, k62, k61, k60, \
k30, k32, k72, k70 \
) \
{ \
{ k00, k01, k02, k03, k04 }, \
{ k10, k11, k12, k13, k14 }, \
{ k20, k21, k22, k23, k24 }, \
{ k30, KC_NO, k32, KC_NO, KC_NO }, \
{ k40, k41, k42, k43, k44 }, \
{ k50, k51, k52, k53, k54 }, \
{ k60, k61, k62, k63, k64 }, \
{ k70, KC_NO, k72, KC_NO, KC_NO }, \
}
// clang-format on
4 changes: 4 additions & 0 deletions keyboards/bastardkb/dilemma/3x5_2/assembled/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"keyboard_name": "Dilemma (3x5+2) Assembled",
}

34 changes: 34 additions & 0 deletions keyboards/bastardkb/dilemma/3x5_2/assembled/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# MCU name
MCU = RP2040

# Bootloader selection
BOOTLOADER = rp2040

# 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 = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output

AUDIO_SUPPORTED = no # Audio is not supported
RGB_MATRIX_SUPPORTED = no # RGB matrix is supported and enabled by default
RGBLIGHT_SUPPORTED = no # RGB underglow is supported, but not enabled by default
RGB_MATRIX_ENABLE = no # Enable keyboard RGB matrix functionality

SERIAL_DRIVER = vendor

POINTING_DEVICE_ENABLE = yes
POINTING_DEVICE_DRIVER = cirque_pinnacle_spi # Assembled version uses SPI.

SPLIT_KEYBOARD = yes
LAYOUTS = split_3x5_2

# RP2040-specific options
PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com>
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
*
* This program is free software: you can redistribute it and/or modify
Expand All @@ -15,19 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "quantum.h"
#pragma once

// Forward declare RP2040 SDK declaration.
void gpio_init(uint gpio);

void keyboard_pre_init_kb(void) {
// Ensures that GP26 through GP29 are initialized as digital inputs (as
// opposed to analog inputs). These GPIOs are shared with A0 through A3,
// respectively. On RP2040-B2 and later, the digital inputs are disabled by
// default (see RP2040-E6).
gpio_init(GP26);
gpio_init(GP27);
gpio_init(GP28);
gpio_init(GP29);
keyboard_pre_init_user();
}
#include "dilemma/config.h"
46 changes: 46 additions & 0 deletions keyboards/bastardkb/dilemma/3x5_2/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"usb": {
"device_version": "1.0.0",
"pid": "0x1835",
},
"layouts": {
"LAYOUT_split_3x5_2": {
"layout": [
{"label":"L00", "x":0, "y":0},
{"label":"L01", "x":1, "y":0},
{"label":"L02", "x":2, "y":0},
{"label":"L03", "x":3, "y":0},
{"label":"L04", "x":4, "y":0},
{"label":"R00", "x":11, "y":0},
{"label":"R01", "x":12, "y":0},
{"label":"R02", "x":13, "y":0},
{"label":"R03", "x":14, "y":0},
{"label":"R04", "x":15, "y":0},
{"label":"L10", "x":0, "y":1},
{"label":"L11", "x":1, "y":1},
{"label":"L12", "x":2, "y":1},
{"label":"L13", "x":3, "y":1},
{"label":"L14", "x":4, "y":1},
{"label":"R10", "x":11, "y":1},
{"label":"R11", "x":12, "y":1},
{"label":"R12", "x":13, "y":1},
{"label":"R13", "x":14, "y":1},
{"label":"R14", "x":15, "y":1},
{"label":"L20", "x":0, "y":2},
{"label":"L21", "x":1, "y":2},
{"label":"L22", "x":2, "y":2},
{"label":"L23", "x":3, "y":2},
{"label":"L24", "x":4, "y":2},
{"label":"R20", "x":11, "y":2},
{"label":"R21", "x":12, "y":2},
{"label":"R22", "x":13, "y":2},
{"label":"R23", "x":14, "y":2},
{"label":"R24", "x":15, "y":2},
{"label":"L30", "x":4, "y":3},
{"label":"L32", "x":5, "y":3},
{"label":"R32", "x":10, "y":3},
{"label":"R30", "x":11, "y":3}
]
}
}
}
3 changes: 3 additions & 0 deletions keyboards/bastardkb/dilemma/3x5_2/splinky/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"keyboard_name": "Dilemma (3x5+2) Splinky",
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ RGB_MATRIX_SUPPORTED = no # RGB matrix is supported and enabled by default
RGBLIGHT_SUPPORTED = no # RGB underglow is supported, but not enabled by default
RGB_MATRIX_ENABLE = no # Enable keyboard RGB matrix functionality

POINTING_DEVICE_ENABLE = yes
SERIAL_DRIVER = vendor

POINTING_DEVICE_ENABLE = yes
POINTING_DEVICE_DRIVER = cirque_pinnacle_i2c # DIY version uses I2C.

SPLIT_KEYBOARD = yes
LAYOUTS = split_3x5_2

DEFAULT_FOLDER = bastardkb/dilemma/splinky

# RP2040-specific options
PICO_INTRINSICS_ENABLED = no # ATM Unsupported by ChibiOS.
83 changes: 83 additions & 0 deletions keyboards/bastardkb/dilemma/3x5_3/3x5_3.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/**
* Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
* Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com>
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Publicw 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 "3x5_3.h"

/**
* LEDs index.
*
* ╭────────────────────╮ ╭────────────────────╮
* 2 3 8 9 12 30 27 26 21 20
* ├────────────────────┤ ├────────────────────┤
* 1 4 7 10 13 31 28 25 22 19
* ├────────────────────┤ ├────────────────────┤
* 0 5 6 11 14 32 29 24 23 18
* ╰────────────────────╯ ╰────────────────────╯
* 15 16 17 35 34 33
* ╰────────────╯ ╰────────────╯
*/
// clang-format off
#ifdef RGB_MATRIX_ENABLE
led_config_t g_led_config = { {
/* Key Matrix to LED index. */
// Left split.
{ 2, 3, 8, 9, 12 }, // Top row
{ 1, 4, 7, 10, 13 }, // Middle row
{ 0, 5, 6, 11, 14 }, // Bottom row
{ 17, NO_LED, 15, 16, NO_LED }, // Thumb cluster
// Right split.
{ 20, 21, 26, 27, 30 }, // Top row
{ 19, 22, 25, 28, 31 }, // Middle row
{ 18, 23, 24, 29, 32 }, // Bottom row
{ 35, NO_LED, 33, 34, NO_LED }, // Thumb cluster
}, {
/* LED index to physical position. */
// Left split.
/* index=0 */ { 0, 42 }, { 0, 21 }, { 0, 0 }, // col 1 (left most)
/* index=3 */ { 18, 0 }, { 18, 21 }, { 18, 42 }, // col 2
/* index=6 */ { 36, 42 }, { 36, 21 }, { 36, 0 },
/* index=9 */ { 54, 0 }, { 54, 21 }, { 54, 42 },
/* index=12 */ { 72, 0 }, { 72, 21 }, { 72, 42 },
/* index=15 */ { 72, 64 }, { 90, 64 }, { 108, 64 }, // Thumb cluster
// Right split.
/* index=18 */ { 224, 42 }, { 224, 21 }, { 224, 0 }, // col 10 (right most)
/* index=21 */ { 206, 0 }, { 206, 21 }, { 206, 42 }, // col 9
/* index=24 */ { 188, 42 }, { 188, 21 }, { 188, 0 },
/* index=27 */ { 170, 0 }, { 170, 21 }, { 170, 42 },
/* index=30 */ { 152, 0 }, { 152, 21 }, { 152, 42 },
/* index=33 */ { 152, 64 }, { 134, 64 }, { 116, 64 }, // Thumb cluster
}, {
/* LED index to flag. */
// Left split.
/* index=0 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // col 1
/* index=3 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // col 2
/* index=6 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
/* index=9 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
/* index=12 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
/* index=15 */ LED_FLAG_MODIFIER, LED_FLAG_MODIFIER, LED_FLAG_MODIFIER, // Thumb cluster
// Right split.
/* index=18 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // col 10
/* index=21 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // col 9
/* index=24 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
/* index=27 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
/* index=30 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
/* index=33 */ LED_FLAG_MODIFIER, LED_FLAG_MODIFIER, LED_FLAG_MODIFIER, // Thumb cluster
} };
#endif
// clang-format on
39 changes: 39 additions & 0 deletions keyboards/bastardkb/dilemma/3x5_3/3x5_3.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
*
* 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 "dilemma.h"

// clang-format off
#define LAYOUT_split_3x5_3( \
k00, k01, k02, k03, k04, k44, k43, k42, k41, k40, \
k10, k11, k12, k13, k14, k54, k53, k52, k51, k50, \
k20, k21, k22, k23, k24, k64, k63, k62, k61, k60, \
k30, k31, k32, k72, k71, k70 \
) \
{ \
{ k00, k01, k02, k03, k04 }, \
{ k10, k11, k12, k13, k14 }, \
{ k20, k21, k22, k23, k24 }, \
{ k30, k31, k32, KC_NO, KC_NO }, \
{ k40, k41, k42, k43, k44 }, \
{ k50, k51, k52, k53, k54 }, \
{ k60, k61, k62, k63, k64 }, \
{ k70, k71, k72, KC_NO, KC_NO }, \
}
// clang-format on
Loading

0 comments on commit 19ed9d5

Please sign in to comment.