From c3df1775bc9a14b5a43c03d000f6765c119b44ee Mon Sep 17 00:00:00 2001 From: TJ Date: Sat, 23 Jul 2022 19:03:41 -0500 Subject: [Keyboard] Le Chiffre rev 2 and HE additions (#17377) * chiffre refactor for new revisions * updated led matrix config * updated per suggestions * add tapdance enable * revert tapdance (none defined in the default keymaps) * clean up rules * add readme for HE * remove notes in readme * fix perm * fix perms * Fix spacing on readme * fix perm * fix perms again? --- keyboards/tominabox1/le_chiffre/config.h | 70 +--------------------- keyboards/tominabox1/le_chiffre/he/config.h | 39 ++++++++++++ keyboards/tominabox1/le_chiffre/he/he.c | 33 ++++++++++ keyboards/tominabox1/le_chiffre/he/he.h | 33 ++++++++++ keyboards/tominabox1/le_chiffre/he/readme.md | 1 + keyboards/tominabox1/le_chiffre/he/rules.mk | 22 +++++++ .../tominabox1/le_chiffre/keymaps/via/keymap.c | 3 +- keyboards/tominabox1/le_chiffre/le_chiffre.c | 33 ---------- keyboards/tominabox1/le_chiffre/le_chiffre.h | 33 ---------- keyboards/tominabox1/le_chiffre/readme.md | 10 +++- keyboards/tominabox1/le_chiffre/rev1/config.h | 44 ++++++++++++++ keyboards/tominabox1/le_chiffre/rev1/rev1.c | 33 ++++++++++ keyboards/tominabox1/le_chiffre/rev1/rev1.h | 33 ++++++++++ keyboards/tominabox1/le_chiffre/rev1/rules.mk | 23 +++++++ keyboards/tominabox1/le_chiffre/rev2/config.h | 43 +++++++++++++ keyboards/tominabox1/le_chiffre/rev2/readme.md | 2 + keyboards/tominabox1/le_chiffre/rev2/rev2.c | 33 ++++++++++ keyboards/tominabox1/le_chiffre/rev2/rev2.h | 33 ++++++++++ keyboards/tominabox1/le_chiffre/rev2/rules.mk | 23 +++++++ keyboards/tominabox1/le_chiffre/rules.mk | 20 +------ 20 files changed, 408 insertions(+), 156 deletions(-) create mode 100644 keyboards/tominabox1/le_chiffre/he/config.h create mode 100644 keyboards/tominabox1/le_chiffre/he/he.c create mode 100644 keyboards/tominabox1/le_chiffre/he/he.h create mode 100644 keyboards/tominabox1/le_chiffre/he/readme.md create mode 100644 keyboards/tominabox1/le_chiffre/he/rules.mk delete mode 100644 keyboards/tominabox1/le_chiffre/le_chiffre.c delete mode 100644 keyboards/tominabox1/le_chiffre/le_chiffre.h create mode 100644 keyboards/tominabox1/le_chiffre/rev1/config.h create mode 100644 keyboards/tominabox1/le_chiffre/rev1/rev1.c create mode 100644 keyboards/tominabox1/le_chiffre/rev1/rev1.h create mode 100644 keyboards/tominabox1/le_chiffre/rev1/rules.mk create mode 100644 keyboards/tominabox1/le_chiffre/rev2/config.h create mode 100644 keyboards/tominabox1/le_chiffre/rev2/readme.md create mode 100644 keyboards/tominabox1/le_chiffre/rev2/rev2.c create mode 100644 keyboards/tominabox1/le_chiffre/rev2/rev2.h create mode 100644 keyboards/tominabox1/le_chiffre/rev2/rules.mk (limited to 'keyboards') diff --git a/keyboards/tominabox1/le_chiffre/config.h b/keyboards/tominabox1/le_chiffre/config.h index b2e4c673a4..7abeaa1810 100644 --- a/keyboards/tominabox1/le_chiffre/config.h +++ b/keyboards/tominabox1/le_chiffre/config.h @@ -20,7 +20,7 @@ /* USB Device descriptor parameter */ #define VENDOR_ID 0x7431 #define PRODUCT_ID 0xD645 -#define DEVICE_VER 0x0001 + #define MANUFACTURER tominabox1 #define PRODUCT Le Chiffre @@ -28,19 +28,6 @@ #define MATRIX_ROWS 4 #define MATRIX_COLS 10 -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ -#define MATRIX_ROW_PINS { B3, D4, F1, C6 } -#define MATRIX_COL_PINS { F4, F5, B0, B2, B1, B4, D7, C7, D2, F7 } -#define UNUSED_PINS /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL @@ -53,14 +40,10 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* Define encoder pads */ -#define ENCODERS_PAD_A { D5 } -#define ENCODERS_PAD_B { D3 } - /* * WS2812 Underglow Matrix options */ -#define RGB_DI_PIN F0 + #define RGBLED_NUM 11 #define DRIVER_LED_TOTAL RGBLED_NUM @@ -76,53 +59,4 @@ #define RGB_MATRIX_SAT_STEP 8 #define RGB_MATRIX_VAL_STEP 8 #define RGB_MATRIX_SPD_STEP 10 - -// RGB Matrix Animation modes. Explicitly enabled -// For full list of effects, see: -// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects -# 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_PIXEL_RAIN -# define ENABLE_RGB_MATRIX_PIXEL_FLOW -# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL -// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined -# define ENABLE_RGB_MATRIX_TYPING_HEATMAP -# define ENABLE_RGB_MATRIX_DIGITAL_RAIN -// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined -# 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 #endif diff --git a/keyboards/tominabox1/le_chiffre/he/config.h b/keyboards/tominabox1/le_chiffre/he/config.h new file mode 100644 index 0000000000..bfba9b96be --- /dev/null +++ b/keyboards/tominabox1/le_chiffre/he/config.h @@ -0,0 +1,39 @@ +/* Copyright 2022 tominabox1 + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define DEVICE_VER 0x0003 + + +/* COL2ROW, ROW2COL*/ +#undef DIODE_DIRECTION +#define DIODE_DIRECTION COL2ROW + +#define MATRIX_ROW_PINS { B3, D4, F1, C6 } +#define MATRIX_COL_PINS { F4, F5, B0, B2, B1, B4, D7, C7, D2, F7 } +#define UNUSED_PINS + +/* Define encoder pads */ +#define ENCODERS_PAD_A { D5 } +#define ENCODERS_PAD_B { D3 } + +/* + * WS2812 Underglow Matrix options + */ +#define RGB_DI_PIN F0 diff --git a/keyboards/tominabox1/le_chiffre/he/he.c b/keyboards/tominabox1/le_chiffre/he/he.c new file mode 100644 index 0000000000..0e07cc7111 --- /dev/null +++ b/keyboards/tominabox1/le_chiffre/he/he.c @@ -0,0 +1,33 @@ +/* Copyright 2022 tominabox1 + * + * 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 . + */ +#include "he.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 3, 4, NO_LED, 5, 6 }, + { NO_LED, NO_LED, 10, NO_LED, NO_LED }, + { NO_LED, NO_LED, 9, NO_LED, NO_LED }, + { 2, 1, 0, 8, 7 } +}, { + + // LED Index to Physical Position + { 128, 64 }, { 77, 64 }, { 0, 48 }, { 0, 0 }, { 115, 0 }, { 166, 0 }, { 255, 0 }, { 255, 48 }, { 178, 64 }, { 128, 40 }, { 128, 30 } +}, { + + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 +} }; +#endif diff --git a/keyboards/tominabox1/le_chiffre/he/he.h b/keyboards/tominabox1/le_chiffre/he/he.h new file mode 100644 index 0000000000..fc14242dd9 --- /dev/null +++ b/keyboards/tominabox1/le_chiffre/he/he.h @@ -0,0 +1,33 @@ +/* Copyright 2022 tominabox1 + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K38, K05, K06, K07, K08, K09, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ + K32, K34, K35, K37 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29 }, \ + { XXX, XXX, K32, XXX, K34, K35, XXX, K37, K38, XXX } \ +} diff --git a/keyboards/tominabox1/le_chiffre/he/readme.md b/keyboards/tominabox1/le_chiffre/he/readme.md new file mode 100644 index 0000000000..eb0904a2ff --- /dev/null +++ b/keyboards/tominabox1/le_chiffre/he/readme.md @@ -0,0 +1 @@ +The HE firmware is for the Hotswap Edition (HE) PCB by @nasp, available at checkerboards.xyz. diff --git a/keyboards/tominabox1/le_chiffre/he/rules.mk b/keyboards/tominabox1/le_chiffre/he/rules.mk new file mode 100644 index 0000000000..7054ebf63b --- /dev/null +++ b/keyboards/tominabox1/le_chiffre/he/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# 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 = yes # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +LTO_ENABLE = yes diff --git a/keyboards/tominabox1/le_chiffre/keymaps/via/keymap.c b/keyboards/tominabox1/le_chiffre/keymaps/via/keymap.c index 10a2fb0d4a..c626cba1cc 100644 --- a/keyboards/tominabox1/le_chiffre/keymaps/via/keymap.c +++ b/keyboards/tominabox1/le_chiffre/keymaps/via/keymap.c @@ -144,13 +144,14 @@ void render_mod_status(uint8_t modifiers) { oled_write_ln_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI)); } -bool oled_task_user(void) { +void oled_task_keymap(void) { render_lechiffre_logo(); oled_set_cursor(0,3); // render_layer_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) render_mod_status(get_mods()|get_oneshot_mods()); render_keylock_status(host_keyboard_led_state()); render_keylogger_status(); + return false; } diff --git a/keyboards/tominabox1/le_chiffre/le_chiffre.c b/keyboards/tominabox1/le_chiffre/le_chiffre.c deleted file mode 100644 index 8eca292cce..0000000000 --- a/keyboards/tominabox1/le_chiffre/le_chiffre.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright 2020 tominabox1 - * - * 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 . - */ -#include "le_chiffre.h" - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 3, 4, NO_LED, 5, 6 }, - { NO_LED, NO_LED, 10, NO_LED, NO_LED }, - { NO_LED, NO_LED, 9, NO_LED, NO_LED }, - { 2, 1, 0, 8, 7 } -}, { - - // LED Index to Physical Position - { 128, 64 }, { 77, 64 }, { 0, 48 }, { 0, 0 }, { 115, 0 }, { 166, 0 }, { 255, 0 }, { 255, 48 }, { 178, 64 }, { 128, 40 }, { 128, 30 } -}, { - - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 -} }; -#endif diff --git a/keyboards/tominabox1/le_chiffre/le_chiffre.h b/keyboards/tominabox1/le_chiffre/le_chiffre.h deleted file mode 100644 index 0277e1b42d..0000000000 --- a/keyboards/tominabox1/le_chiffre/le_chiffre.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright 2020 tominabox1 - * - * 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 . - */ -#pragma once - -#include "quantum.h" - -#define XXX KC_NO - -#define LAYOUT( \ - K00, K01, K02, K03, K04, K38, K05, K06, K07, K08, K09, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ - K32, K34, K35, K37 \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19 }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29 }, \ - { XXX, XXX, K32, XXX, K34, K35, XXX, K37, K38, XXX } \ -} diff --git a/keyboards/tominabox1/le_chiffre/readme.md b/keyboards/tominabox1/le_chiffre/readme.md index ea18546c61..d2d688289e 100644 --- a/keyboards/tominabox1/le_chiffre/readme.md +++ b/keyboards/tominabox1/le_chiffre/readme.md @@ -4,12 +4,18 @@ Le Chiffre (ironically, "the number" in French is a 30% keyboard designed by tominabox1. The purpose of the board is to provide a platform for MX and Choc ergo in one package for when ones wrists need a break. The board supports an RGB LED strip with DI on port F0. The board is also fitted with support for run-of-the-mill .91" OLED and EC11 rotary encoder. +There are 3 PCB revisions: Rev 1 (Original), Rev 2 (P3D version sold with the Le Chiffre Plus), and HE (Hotswap Edition from Checkerboards.xyz). + +By default the OLED is **disabled**. This is to prevent issues with operation when one is not installed. Be sure to enable the OLED in the rules.mk file if you have one installed! + * Keyboard Maintainer: [TJ Campie](https://github.com/tominabox1) -* Hardware Supported: Le Chiffre (source not available at this time) +* Hardware Supported: [Le Chiffre](https://github.com/tominabox1/Le-Chiffre-Keyboard) * Hardware Availability: Bring your own case. Make example for this keyboard (after setting up your build environment): - make tominabox1/le_chiffre:default + make tominabox1/le_chiffre/rev1:default + make tominabox1/le_chiffre/rev2:default + make tominabox1/le_chiffre/he:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/tominabox1/le_chiffre/rev1/config.h b/keyboards/tominabox1/le_chiffre/rev1/config.h new file mode 100644 index 0000000000..0e5b6887cd --- /dev/null +++ b/keyboards/tominabox1/le_chiffre/rev1/config.h @@ -0,0 +1,44 @@ +/* Copyright 2020 tominabox1 + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define DEVICE_VER 0x0001 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B3, D4, F1, C6 } +#define MATRIX_COL_PINS { F4, F5, B0, B2, B1, B4, D7, C7, D2, F7 } +#define UNUSED_PINS + +/* Define encoder pads */ +#define ENCODERS_PAD_A { D5 } +#define ENCODERS_PAD_B { D3 } + +/* + * WS2812 Underglow Matrix options + */ +#define RGB_DI_PIN F0 diff --git a/keyboards/tominabox1/le_chiffre/rev1/rev1.c b/keyboards/tominabox1/le_chiffre/rev1/rev1.c new file mode 100644 index 0000000000..e3b2b014f4 --- /dev/null +++ b/keyboards/tominabox1/le_chiffre/rev1/rev1.c @@ -0,0 +1,33 @@ +/* Copyright 2020 tominabox1 + * + * 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 . + */ +#include "rev1.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 3, 4, NO_LED, 5, 6 }, + { NO_LED, NO_LED, 10, NO_LED, NO_LED }, + { NO_LED, NO_LED, 9, NO_LED, NO_LED }, + { 2, 1, 0, 8, 7 } +}, { + + // LED Index to Physical Position + { 128, 64 }, { 77, 64 }, { 0, 48 }, { 0, 0 }, { 115, 0 }, { 166, 0 }, { 255, 0 }, { 255, 48 }, { 178, 64 }, { 128, 40 }, { 128, 30 } +}, { + + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 +} }; +#endif diff --git a/keyboards/tominabox1/le_chiffre/rev1/rev1.h b/keyboards/tominabox1/le_chiffre/rev1/rev1.h new file mode 100644 index 0000000000..0277e1b42d --- /dev/null +++ b/keyboards/tominabox1/le_chiffre/rev1/rev1.h @@ -0,0 +1,33 @@ +/* Copyright 2020 tominabox1 + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K38, K05, K06, K07, K08, K09, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ + K32, K34, K35, K37 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29 }, \ + { XXX, XXX, K32, XXX, K34, K35, XXX, K37, K38, XXX } \ +} diff --git a/keyboards/tominabox1/le_chiffre/rev1/rules.mk b/keyboards/tominabox1/le_chiffre/rev1/rules.mk new file mode 100644 index 0000000000..2cd4ebf52f --- /dev/null +++ b/keyboards/tominabox1/le_chiffre/rev1/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# 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 = yes # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +LTO_ENABLE = yes + diff --git a/keyboards/tominabox1/le_chiffre/rev2/config.h b/keyboards/tominabox1/le_chiffre/rev2/config.h new file mode 100644 index 0000000000..c37f4775aa --- /dev/null +++ b/keyboards/tominabox1/le_chiffre/rev2/config.h @@ -0,0 +1,43 @@ +/* Copyright 2020 tominabox1 + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +#define DEVICE_VER 0x0002 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B3, F6, F7, C7 } +#define MATRIX_COL_PINS { B2, F0, F1, F4, F5, B5, B4, D7, D6, D4 } +#define UNUSED_PINS + +/* Define encoder pads */ +#define ENCODERS_PAD_A { B6 } +#define ENCODERS_PAD_B { C6 } + +/* + * WS2812 Underglow Matrix options + */ +#define RGB_DI_PIN B1 diff --git a/keyboards/tominabox1/le_chiffre/rev2/readme.md b/keyboards/tominabox1/le_chiffre/rev2/readme.md new file mode 100644 index 0000000000..b8c65bc0e0 --- /dev/null +++ b/keyboards/tominabox1/le_chiffre/rev2/readme.md @@ -0,0 +1,2 @@ +Updated v2 PCB with better plate screw clearances, ESD protection, as well as sweet sweet curvy traces. +Rev. 2.0 requires new firmware due to the pinout changing to facilitate prettier trace runs. \ No newline at end of file diff --git a/keyboards/tominabox1/le_chiffre/rev2/rev2.c b/keyboards/tominabox1/le_chiffre/rev2/rev2.c new file mode 100644 index 0000000000..e15aa35243 --- /dev/null +++ b/keyboards/tominabox1/le_chiffre/rev2/rev2.c @@ -0,0 +1,33 @@ +/* Copyright 2020 tominabox1 + * + * 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 . + */ +#include "rev2.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 3, 4, NO_LED, 5, 6 }, + { NO_LED, NO_LED, 10, NO_LED, NO_LED }, + { NO_LED, NO_LED, 9, NO_LED, NO_LED }, + { 2, 1, 0, 8, 7 } +}, { + + // LED Index to Physical Position + { 128, 64 }, { 77, 64 }, { 0, 48 }, { 0, 0 }, { 115, 0 }, { 166, 0 }, { 255, 0 }, { 255, 48 }, { 178, 64 }, { 128, 40 }, { 128, 30 } +}, { + + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 +} }; +#endif diff --git a/keyboards/tominabox1/le_chiffre/rev2/rev2.h b/keyboards/tominabox1/le_chiffre/rev2/rev2.h new file mode 100644 index 0000000000..0277e1b42d --- /dev/null +++ b/keyboards/tominabox1/le_chiffre/rev2/rev2.h @@ -0,0 +1,33 @@ +/* Copyright 2020 tominabox1 + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K38, K05, K06, K07, K08, K09, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ + K32, K34, K35, K37 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29 }, \ + { XXX, XXX, K32, XXX, K34, K35, XXX, K37, K38, XXX } \ +} diff --git a/keyboards/tominabox1/le_chiffre/rev2/rules.mk b/keyboards/tominabox1/le_chiffre/rev2/rules.mk new file mode 100644 index 0000000000..2cd4ebf52f --- /dev/null +++ b/keyboards/tominabox1/le_chiffre/rev2/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# 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 = yes # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +LTO_ENABLE = yes + diff --git a/keyboards/tominabox1/le_chiffre/rules.mk b/keyboards/tominabox1/le_chiffre/rules.mk index bc5775a151..57b3d94eab 100644 --- a/keyboards/tominabox1/le_chiffre/rules.mk +++ b/keyboards/tominabox1/le_chiffre/rules.mk @@ -1,19 +1 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - -# 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 -NKRO_ENABLE = yes # Enable N-Key Rollover -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -ENCODER_ENABLE = yes -OLED_ENABLE = no -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = WS2812 -LTO_ENABLE = yes +DEFAULT_FOLDER = tominabox1/le_chiffre/rev1 -- cgit v1.2.1