Skip to content

Commit

Permalink
v0.2 release
Browse files Browse the repository at this point in the history
- Slight changes to schematic ESD
- better USB routing
- finished firmware
- unnecessary NRST button removed
  • Loading branch information
sporkus committed Jul 13, 2023
2 parents 901eee1 + 41ad20f commit 6da9e42
Show file tree
Hide file tree
Showing 31 changed files with 77,163 additions and 49,950 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
**auto_save**
**autosave**
**cache**
kicad/production
67 changes: 67 additions & 0 deletions firmware/le_chiffre_32/config.h
Original file line number Diff line number Diff line change
@@ -1 +1,68 @@
#pragma once

#define ENCODER_MAP_ENABLE

#define WS2812_DI_PIN A15
#define RGB_MATRIX_LED_COUNT 11
#define DRIVER_LED_TOTAL RGB_MATRIX_LED_COUNT

#define RGB_MATRIX_MODS_INDICATOR
#define RGB_MATRIX_LAYER_INDICATOR

#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
#define RGB_TRIGGER_ON_KEYDOWN
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
#define RGB_MATRIX_HUE_STEP 4
#define RGB_MATRIX_SAT_STEP 4
#define RGB_MATRIX_VAL_STEP 4
#define RGB_MATRIX_SPD_STEP 16
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL
#define RGB_MATRIX_DEFAULT_HUE 0
#define RGB_MATRIX_DEFAULT_SAT 255
#define RGB_MATRIX_DEFAULT_VAL 32
#define RGB_MATRIX_DEFAULT_SPD 32

#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_CYCLE_OUT_IN
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
#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_PIXEL_FRACTAL
#define ENABLE_RGB_MATRIX_PIXEL_FLOW
#define ENABLE_RGB_MATRIX_PIXEL_RAIN
#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
13 changes: 2 additions & 11 deletions firmware/le_chiffre_32/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
]
},
"features": {
"encoders": true,
"console": true,
"encoder": true,
"extrakey": true,
"mousekey": true,
"nkro": true
Expand Down Expand Up @@ -117,14 +118,4 @@
]
}
},
"rgblight": {
"led_count": 11,
"pin": "A15",
"hue_steps": 10,
"saturation_steps": 17,
"brightness_steps": 17,
"animations": {
"rainbow_mood": true
}
}
}
14 changes: 12 additions & 2 deletions firmware/le_chiffre_32/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

#include "../../rgb.c"

// Just something for quick testing, not meant to be used
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MUTE, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_Q, KC_W, KC_E, KC_R, KC_T, RGB_TOG, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT,
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
LT(1, KC_ESC), KC_ENT, KC_SPC, LT(2, KC_BSPC)
Expand All @@ -27,3 +27,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______
)
};

#ifdef ENCODER_MAP_ENABLE
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[0] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
[1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI) },
[2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) },
[3] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }
};
#endif

10 changes: 10 additions & 0 deletions firmware/le_chiffre_32/keymaps/vial/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,14 @@
#pragma once

#define VIAL_KEYBOARD_UID {0xC9, 0xD4, 0x38, 0x79, 0x25, 0x61, 0x35, 0x00}
#define VIAL_COMBO_ENTRIES 64
#define DYNAMIC_KEYMAP_LAYER_COUNT 8
#define TAPPING_TERM 250

#define RGB_DI_PIN WS2812_DI_PIN

#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define RGB_MATRIX_STARTUP_HUE RGB_MATRIX_DEFAULT_HUE
#define RGB_MATRIX_STARTUP_SAT RGB_MATRIX_DEFAULT_SAT
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_DEFAULT_VAL
#define RGB_MATRIX_STARTUP_SPD RGB_MATRIX_DEFAULT_SPD
41 changes: 32 additions & 9 deletions firmware/le_chiffre_32/keymaps/vial/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,49 @@
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H
#include "../../rgb.c"

#define HM_A LSFT_T(KC_A)
#define HM_S LALT_T(KC_S)
#define HM_D LGUI_T(KC_D)
#define HM_F LCTL_T(KC_F)
#define HM_J RCTL_T(KC_J)
#define HM_K RGUI_T(KC_K)
#define HM_L RALT_T(KC_L)
#define HM_Z LSFT_T(KC_Z)
#define HM_SLSH LSFT_T(KC_SLSH)
#define HM_QUOT RSFT_T(KC_QUOT)


const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MUTE, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT,
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
LT(1, KC_ESC), KC_ENT, KC_SPC, LT(2, KC_BSPC)
HM_A, HM_S, HM_D, HM_F, KC_G, KC_H, HM_J, HM_K, HM_L, HM_QUOT,
HM_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, HM_SLSH,
LT(1, KC_ESC), LT(1,KC_SPC), LT(2,KC_SPC), LT(2, KC_BSPC)
),

[1] = LAYOUT(
_______, _______, _______, _______, _______, QK_BOOT, _______, KC_7, KC_8, KC_9, KC_0,
_______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______,
_______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______,
_______, _______, _______, _______
_______, _______, _______, KC_SCLN, _______, _______, KC_EQL, KC_7, KC_8, KC_9, KC_0,
_______, _______, _______, KC_COLN, _______, KC_MINS, KC_4, KC_5, KC_6, _______,
_______, _______, _______, _______, _______, KC_BSLS, KC_1, KC_2, KC_3, _______,
_______, KC_ENT, KC_TAB, _______
),

[2] = LAYOUT(
_______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______,
_______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_LEFT, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______
_______, KC_ENT, KC_TAB, _______
)
};

#ifdef ENCODER_MAP_ENABLE
#undef BLANK_LAYER
#define BLANK_LAYER { ENCODER_CCW_CW(_______, _______) }
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[0] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD) },
[1] = BLANK_LAYER,
[2] = BLANK_LAYER
};
#endif
3 changes: 1 addition & 2 deletions firmware/le_chiffre_32/keymaps/vial/rules.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
VIA_ENABLE = yes
VIAL_ENABLE = yes
VIAL_INSECURE = yes
ENCODER_MAP_ENABLE = yes

VIALRGB_ENABLE = yes
35 changes: 7 additions & 28 deletions firmware/le_chiffre_32/keymaps/vial/vial.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,14 @@
{
"lighting": "none",
"lighting": "vialrgb",
"matrix": {
"rows": 4,
"cols": 13
"cols": 10
},
"layouts": {
"keymap":
[
[ { "rx": 7, "ry": 1, "y": 0.75, "x": -1.25 }, "0,0\n\n\n\n\n\n\n\n\ne" ],
[ { "x": -1.25 }, "0,1\n\n\n\n\n\n\n\n\ne" ],
[ { "rx": 7.5, "y": -0.25, "x": -1.75 }, "3,5" ],
[ { "r": 7, "rx": 5.5, "y": -0.75, "x": -3 }, "0,2" ],
[ { "y": -0.75, "x": -4 }, "0,1", { "x": 1 }, "0,3", "0,4" ],
[ { "y": -0.75, "x": -5 }, "0,0" ],
[ { "y": -0.5, "x": -3 }, "1,2" ],
[ { "y": -0.75, "x": -4 }, "1,1", { "x": 1 }, "1,3", "1,4" ],
[ { "y": -0.75, "x": -5 }, "1,0" ],
[ { "y": -0.5, "x": -3 }, "2,2" ],
[ { "y": -0.75, "x": -4 }, "2,1", { "x": 1 }, "2,3", "2,4" ],
[ { "y": -0.75, "x": -5 }, "2,0" ],
[ { "y": -0.25, "x": -3.25, "w": 1.25 }, "3,2", { "w": 2 }, "3,4" ],
[ { "r": -7, "rx": 7, "y": -0.75, "x": 2 }, "0,7" ],
[ { "y": -0.75 }, "0,5", "0,6", { "x": 1 }, "0,8" ],
[ { "y": -0.75, "x": 4 }, "0,9" ],
[ { "y": -0.5, "x": 2 }, "1,7" ],
[ { "y": -0.75 }, "1,5", "1,6", { "x": 1 }, "1,8" ],
[ { "y": -0.75, "x": 4 }, "1,9" ],
[ { "y": -0.5, "x": 2 }, "2,7" ],
[ { "y": -0.75 }, "2,5", "2,6", { "x": 1 }, "2,8" ],
[ { "y": -0.75, "x": 4 }, "2,9" ],
[ { "y": -0.25, "w": 2 }, "3,6", { "w": 1.25 }, "3,7" ]
]
}
[ [ { "rx": 7, "ry": 1, "y": 0.75, "x": -1.25 }, "0,0\n\n\n\n\n\n\n\n\ne" ], [ { "x": -1.25 }, "0,1\n\n\n\n\n\n\n\n\ne" ], [ { "rx": 7.5, "y": -0.25, "x": -1.75 }, "3,5" ], [ { "r": 7, "rx": 5.5, "y": -0.75, "x": -3 }, "0,2" ], [ { "y": -0.75, "x": -4 }, "0,1", { "x": 1 }, "0,3", "0,4" ], [ { "y": -0.75, "x": -5 }, "0,0" ], [ { "y": -0.5, "x": -3 }, "1,2" ], [ { "y": -0.75, "x": -4 }, "1,1", { "x": 1 }, "1,3", "1,4" ], [ { "y": -0.75, "x": -5 }, "1,0" ], [ { "y": -0.5, "x": -3 }, "2,2" ], [ { "y": -0.75, "x": -4 }, "2,1", { "x": 1 }, "2,3", "2,4" ], [ { "y": -0.75, "x": -5 }, "2,0" ], [ { "y": -0.25, "x": -3.25, "w": 1.25 }, "3,2", { "w": 2 }, "3,4" ], [ { "r": -7, "rx": 7, "y": -0.75, "x": 2 }, "0,7" ], [ { "y": -0.75 }, "0,5", "0,6", { "x": 1 }, "0,8" ], [ { "y": -0.75, "x": 4 }, "0,9" ], [ { "y": -0.5, "x": 2 }, "1,7" ], [ { "y": -0.75 }, "1,5", "1,6", { "x": 1 }, "1,8" ], [ { "y": -0.75, "x": 4 }, "1,9" ], [ { "y": -0.5, "x": 2 }, "2,7" ], [ { "y": -0.75 }, "2,5", "2,6", { "x": 1 }, "2,8" ], [ { "y": -0.75, "x": 4 }, "2,9" ], [ { "y": -0.25, "w": 2 }, "3,6", { "w": 1.25 }, "3,7" ] ]
},
"labels":[
"Split Backspace"
]
}
87 changes: 87 additions & 0 deletions firmware/le_chiffre_32/rgb.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#ifdef RGB_MATRIX_ENABLE
// LED index
// 9 10 2 3
// 1
// 0
// 8 7 6 5 4

led_config_t g_led_config = {
// Key Matrix to LED Index
{
{9, 9, 9, 9, 9, 3, 3, 3, 3, 3 },
{10, 10, 10, 10, 10, 2, 2, 2, 2, 2 },
{8, 8, 8, 8, 8, 4, 4, 4, 4, 4 },
{NO_LED, NO_LED, 7, NO_LED, 6, 6, 6, 5, NO_LED, NO_LED, }
},
// LED Index to Physical Positon
{
{ 128, 40 },
{ 128, 30 },
{ 166, 0 },
{ 255, 0 },
{ 255, 48 },
{ 178, 64 },
{ 128, 64 },
{ 77, 64 },
{ 0, 48 },
{ 0, 0 },
{ 115, 0 }
},
// LED Index to Flag
// https://docs.qmk.fm/#/feature_rgb_matrix?id=flags
{ 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2 }
};

// Layer and Mods indicator
#define LED_CENTER_TOP 1
#define LED_CENTER_BOTTOM 0

#define LAYER_R layer_colors[layer][0] * RGB_MATRIX_DEFAULT_VAL / RGB_MATRIX_MAXIMUM_BRIGHTNESS
#define LAYER_G layer_colors[layer][1] * RGB_MATRIX_DEFAULT_VAL / RGB_MATRIX_MAXIMUM_BRIGHTNESS
#define LAYER_B layer_colors[layer][2] * RGB_MATRIX_DEFAULT_VAL / RGB_MATRIX_MAXIMUM_BRIGHTNESS

#define MODS_ACTIVE(mods) \
((get_mods()|get_oneshot_mods()) & MOD_MASK_##mods ? RGB_MATRIX_DEFAULT_VAL:0)
#define SHIFT_ACTIVE (get_mods() & MOD_MASK_SHIFT ? RGB_MATRIX_DEFAULT_VAL/4:0)
#define MODS_R MODS_ACTIVE(CTRL) + SHIFT_ACTIVE
#define MODS_G MODS_ACTIVE(GUI) + SHIFT_ACTIVE
#define MODS_B MODS_ACTIVE(ALT) + SHIFT_ACTIVE

const uint8_t PROGMEM layer_colors[][3] = {
{RGB_OFF},
{RGB_RED},
{RGB_GREEN},
{RGB_BLUE},
{RGB_YELLOW},
{RGB_PURPLE},
{RGB_PINK},
{RGB_TEAL}
};

void set_rgb_matrix_indicators(uint8_t led_min, uint8_t led_max) {
#ifdef RGB_MATRIX_LAYER_INDICATOR
int layer = get_highest_layer(layer_state|default_layer_state);
RGB_MATRIX_INDICATOR_SET_COLOR(LED_CENTER_TOP, layer_colors[layer][0], layer_colors[layer][1], layer_colors[layer][2]);
/* uprintf("layer RGB: (%u, %u, %u)\n", LAYER_R, LAYER_G, LAYER_B); */
#endif

#ifdef RGB_MATRIX_MODS_INDICATOR
RGB_MATRIX_INDICATOR_SET_COLOR(LED_CENTER_BOTTOM, MODS_R, MODS_G, MODS_B);
/* uprintf("mod RGB: (%u, %u, %u)\n", MODS_R, MODS_G, MODS_B); */
#endif
}

#ifndef VIAL_ENABLE
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
set_rgb_matrix_indicators(led_min, led_max);
return false;
}
#endif

#ifdef VIAL_ENABLE
void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
set_rgb_matrix_indicators(led_min, led_max);
}
#endif

#endif
4 changes: 2 additions & 2 deletions firmware/le_chiffre_32/rules.mk
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
DFU_SUFFIX_ARGS = -p FFFF -v FFFF # allow for APM32 MCU
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = WS2812
Binary file modified firmware/le_chiffre_32_vial.bin
100644 → 100755
Binary file not shown.
Binary file modified img/pcb_back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/pcb_front.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion kicad/fp-info-cache
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
21749705132627611
21749705471109751
Audio_Module
Reverb_BTDR-1H
Digital Reverberation Unit, http://www.belton.co.kr/inc/downfile.php?seq=17&file=pdf (footprint from http://www.uk-electronic.de/PDF/BTDR-1.pdf)
Expand Down
Loading

0 comments on commit 6da9e42

Please sign in to comment.