Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Keyboard] Add ADM42 Keyboard #17366

Merged
merged 4 commits into from
Jun 16, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Keyboard] ADM42: configuration refactoring
lleonini committed Jun 12, 2022
commit ec8f8b1001126e41d81338c60f1ca972443a260a
51 changes: 0 additions & 51 deletions keyboards/adm42/config.h
Original file line number Diff line number Diff line change
@@ -31,12 +31,6 @@

#define DIODE_DIRECTION ROW2COL

#define HOLD_ON_OTHER_KEY_PRESS_PER_KEY
#define TAPPING_FORCE_HOLD_PER_KEY
#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY
#define TAPPING_TERM 200

#define USB_POLLING_INTERVAL_MS 1
#define TAP_CODE_DELAY 1
#define DEBOUNCE 10

@@ -46,48 +40,3 @@

// Memory saver
#define NO_ACTION_ONE_SHOT
#if !defined(CONSOLE_ENABLE)
#if !defined(NO_DEBUG)
#define NO_DEBUG
#endif
#if !defined(NO_PRINT)
#define NO_PRINT
#endif
#endif

#define MATRIX_COL_PINS { C6, B6, B5, B4, D7, D6, F0, F1, F4, F5, F6, F7 }
#define MATRIX_ROW_PINS { C7, D5, D3, D2 }

#define QMK_LED E6

#define RGB_DI_PIN B7

#define DRIVER_LED_TOTAL 42
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 170
#define RGB_MATRIX_CENTER { 112, 32 }
#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_LED_PROCESS_LIMIT 21
#define RGB_MATRIX_LED_FLUSH_LIMIT 16
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT
#define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 20
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_SAT_STEP 24
#define RGB_MATRIX_HUE_STEP 8
#define RGB_MATRIX_VAL_STEP 16
#define RGB_MATRIX_SPD_STEP 16

#define ENABLE_RGB_MATRIX_BREATHING
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
#define ENABLE_RGBLIGHT_MODE_STATIC_LIGHT
#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
#define ENABLE_RGB_MATRIX_PIXEL_RAIN
#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
#define ENABLE_RGB_MATRIX_BAND_VAL
#define ENABLE_RGB_MATRIX_SPLASH
2 changes: 1 addition & 1 deletion keyboards/adm42/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ADM42

![ADM42](https://adm42.dev/images/adm42.jpg)
![ADM42](https://i.imgur.com/pviCQSQ.jpeg)

A compact ergonomic 40% ortholinear keyboard. [More info on ADM42.dev](https://adm42.dev)

52 changes: 52 additions & 0 deletions keyboards/adm42/rev4/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/* Copyright 2020-2022 Lorenzo Leonini
* SPDX-License-Identifier: GPL-2.0-only
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* 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/>.
*/

#define MATRIX_COL_PINS { C6, B6, B5, B4, D7, D6, F0, F1, F4, F5, F6, F7 }
#define MATRIX_ROW_PINS { C7, D5, D3, D2 }

#define QMK_LED E6

#define RGB_DI_PIN B7

#define DRIVER_LED_TOTAL 42
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 170
#define RGB_MATRIX_CENTER { 112, 32 }
#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_LED_PROCESS_LIMIT 21
#define RGB_MATRIX_LED_FLUSH_LIMIT 16
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT
#define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 20
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_SAT_STEP 24
#define RGB_MATRIX_HUE_STEP 8
#define RGB_MATRIX_VAL_STEP 16
#define RGB_MATRIX_SPD_STEP 16

#define ENABLE_RGB_MATRIX_BREATHING
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
#define ENABLE_RGBLIGHT_MODE_STATIC_LIGHT
#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
#define ENABLE_RGB_MATRIX_PIXEL_RAIN
#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
#define ENABLE_RGB_MATRIX_BAND_VAL
#define ENABLE_RGB_MATRIX_SPLASH
43 changes: 10 additions & 33 deletions keyboards/adm42/rev4/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -16,34 +16,18 @@

#include QMK_KEYBOARD_H

led_config_t g_led_config = {
{
{12, 11, 8, 7, 4, 3, 36, 37, 38, 39, 40, 41},
{13, 10, 9, 6, 5, 2, 35, 34, 33, 32, 31, 30},
{14, 15, 16, 17, 18, 1, 24, 25, 26, 27, 28, 29},
{NO_LED, NO_LED, NO_LED, 19, 20, 21, 0, 22, 23, NO_LED, NO_LED, NO_LED}
}, {
{112, 32}, {92, 36}, {94, 25}, {97, 14}, {80, 13}, {77, 24},
{62, 18}, {64, 8}, {49, 6}, {46, 17}, {28, 23}, {30, 13},
{14, 11}, {11, 22}, {8, 32}, {26, 34}, {43, 28}, {61, 29},
{76, 34}, {78, 46}, {97, 49}, {112, 56}, {127, 49}, {146, 46},
{132, 36}, {148, 34}, {164, 29}, {180, 28}, {198, 34}, {215, 32},
{212, 22}, {196, 23}, {178, 17}, {161, 18}, {146, 24}, {130, 25},
{126, 14}, {143, 13}, {159, 8}, {175, 6}, {194, 13}, {210, 11}
}, {
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4
}
enum custom_layers {
_QWERTY,
_COLEMAKDH,
_SPECIAL,
_EXTRA,
_ADM,
_SETUP,
};

#define _QWERTY 0
#define _COLEMAKDH 1
#define _SPECIAL 2
#define _EXTRA 3
#define _ADM 4
#define _SETUP 5
#define HOLD_ON_OTHER_KEY_PRESS_PER_KEY
#define TAPPING_FORCE_HOLD_PER_KEY
#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY

#define LW_GRV LWIN_T(KC_GRV)
#define RW_EQU RWIN_T(KC_EQUAL)
@@ -68,15 +52,8 @@ enum custom_keycodes {
REFLASH = SAFE_RANGE,
LC_CIRC,
RC_DLR,

DF_QWER,
DF_COLE,
DF_TA1A,
DF_TA1B,
DF_TA2A,
DF_TA2B,
DF_TA3,
DF_TA4,
};

// Not a mistake to have KC_LALT (also) on the right, RALT is kept for compose (LLS_RALT)
39 changes: 39 additions & 0 deletions keyboards/adm42/rev4/rev4.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/* Copyright 2020-2022 Lorenzo Leonini
* SPDX-License-Identifier: GPL-2.0-only
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* 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

led_config_t g_led_config = {
{
{12, 11, 8, 7, 4, 3, 36, 37, 38, 39, 40, 41},
{13, 10, 9, 6, 5, 2, 35, 34, 33, 32, 31, 30},
{14, 15, 16, 17, 18, 1, 24, 25, 26, 27, 28, 29},
{NO_LED, NO_LED, NO_LED, 19, 20, 21, 0, 22, 23, NO_LED, NO_LED, NO_LED}
}, {
{112, 32}, {92, 36}, {94, 25}, {97, 14}, {80, 13}, {77, 24},
{62, 18}, {64, 8}, {49, 6}, {46, 17}, {28, 23}, {30, 13},
{14, 11}, {11, 22}, {8, 32}, {26, 34}, {43, 28}, {61, 29},
{76, 34}, {78, 46}, {97, 49}, {112, 56}, {127, 49}, {146, 46},
{132, 36}, {148, 34}, {164, 29}, {180, 28}, {198, 34}, {215, 32},
{212, 22}, {196, 23}, {178, 17}, {161, 18}, {146, 24}, {130, 25},
{126, 14}, {143, 13}, {159, 8}, {175, 6}, {194, 13}, {210, 11}
}, {
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4
}
};
1 change: 0 additions & 1 deletion keyboards/adm42/rules.mk
Original file line number Diff line number Diff line change
@@ -15,7 +15,6 @@ AUDIO_ENABLE = no # Audio output

DEBOUNCE_TYPE = sym_eager_pk

EXTRAFLAGS += -flto
LTO_ENABLE = yes

DEFAULT_FOLDER = adm42/rev4