Skip to content

Commit

Permalink
adm42 source code
Browse files Browse the repository at this point in the history
  • Loading branch information
lleonini committed Jun 4, 2024
1 parent 019a274 commit 0d9c2ce
Show file tree
Hide file tree
Showing 11 changed files with 1,476 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ The implementation of ADM42 in this repository includes many improvements to QMK

In case you want a pure QMK version of the ADM42, please use the [official QMK repository](https://github.com/qmk/qmk_firmware) which already supports the ADM42 and can serve as a starting point for your modifications.

## Build

Make (after setting up your build environment):

make adm42:default

Flashing:

make adm42:default:flash

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.

## Official Website

[adm42.dev](https://adm42.dev) is the official website of the ADM42 keyboard, where you can find links to this repository and all the documentation of the ADM42.
17 changes: 17 additions & 0 deletions keyboards/adm42/adm42.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* Copyright 2020-2024 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 "adm42.h"
31 changes: 31 additions & 0 deletions keyboards/adm42/adm42.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* Copyright 2020-2024 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/>.
*/

#pragma once

#include "quantum.h"

#define LAYOUT_3x12_6( \
K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, \
K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \
K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \
K404, K405, K406, K407, K408, K409 \
) { \
{ K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112 }, \
{ K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212 }, \
{ K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312 }, \
{ KC_NO, KC_NO, KC_NO, K404, K405, K407, K406, K408, K409, KC_NO, KC_NO, KC_NO } \
}
23 changes: 23 additions & 0 deletions keyboards/adm42/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* Copyright 2020-2024 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/>.
*/

#pragma once

#define USB_POLLING_INTERVAL_MS 1
#define TAP_CODE_DELAY 0
#define FORCE_NKRO
#define NO_ACTION_TAPPING
#define NO_ACTION_ONESHOT
82 changes: 82 additions & 0 deletions keyboards/adm42/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"keyboard_name": "ADM42",
"manufacturer": "ADM42 Keyboards",
"url": "https://adm42.dev/",
"maintainer": "lleonini",
"usb": {
"vid": "0x04D8",
"pid": "0xE873",
"device_version": "2.0.0"
},
"ws2812": {
"pin": "B7"
},
"rgb_matrix": {
"driver": "ws2812"
},
"matrix_pins": {
"cols": ["C6", "B6", "B5", "B4", "D7", "D6", "F0", "F1", "F4", "F5", "F6", "F7"],
"rows": ["C7", "D5", "D3", "D2"]
},
"diode_direction": "ROW2COL",
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"layout_aliases": {
"LAYOUT_adm42_3x12_6": "LAYOUT"
},
"layouts": {
"LAYOUT": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0.8},
{"matrix": [0, 1], "x": 1, "y": 0.8},
{"matrix": [0, 2], "x": 2, "y": 0},
{"matrix": [0, 3], "x": 3, "y": 0},
{"matrix": [0, 4], "x": 4, "y": 0.5},
{"matrix": [0, 5], "x": 5, "y": 0.5},

{"matrix": [0, 6], "x": 7.5, "y": 0.5},
{"matrix": [0, 7], "x": 8.5, "y": 0.5},
{"matrix": [0, 8], "x": 9.5, "y": 0},
{"matrix": [0, 9], "x": 10.5, "y": 0},
{"matrix": [0, 10], "x": 11.5, "y": 0.8},
{"matrix": [0, 11], "x": 12.5, "y": 0.8},

{"matrix": [1, 0], "x": 0, "y": 1.8},
{"matrix": [1, 1], "x": 1, "y": 1.8},
{"matrix": [1, 2], "x": 2, "y": 1},
{"matrix": [1, 3], "x": 3, "y": 1},
{"matrix": [1, 4], "x": 4, "y": 1.5},
{"matrix": [1, 5], "x": 5, "y": 1.5},

{"matrix": [1, 6], "x": 7.5, "y": 1.5},
{"matrix": [1, 7], "x": 8.5, "y": 1.5},
{"matrix": [1, 8], "x": 9.5, "y": 1},
{"matrix": [1, 9], "x": 10.5, "y": 1},
{"matrix": [1, 10], "x": 11.5, "y": 1.8},
{"matrix": [1, 11], "x": 12.5, "y": 1.8},

{"matrix": [2, 0], "x": 0, "y": 2.8},
{"matrix": [2, 1], "x": 1, "y": 2.8},
{"matrix": [2, 2], "x": 2, "y": 2},
{"matrix": [2, 3], "x": 3, "y": 2},
{"matrix": [2, 4], "x": 4, "y": 2.5},
{"matrix": [2, 5], "x": 5, "y": 2.5},

{"matrix": [2, 6], "x": 7.5, "y": 2.5},
{"matrix": [2, 7], "x": 8.5, "y": 2.5},
{"matrix": [2, 8], "x": 9.5, "y": 2},
{"matrix": [2, 9], "x": 10.5, "y": 2},
{"matrix": [2, 10], "x": 11.5, "y": 2.8},
{"matrix": [2, 11], "x": 12.5, "y": 2.8},

{"matrix": [3, 3], "x": 4.25, "y": 3.55},
{"matrix": [3, 4], "x": 5.25, "y": 3.65},
{"matrix": [3, 6], "x": 6.25, "y": 1.875},

{"matrix": [3, 5], "x": 6.25, "y": 4.05},
{"matrix": [3, 7], "x": 7.25, "y": 3.65},
{"matrix": [3, 8], "x": 8.25, "y": 3.55}
]
}
}
}
27 changes: 27 additions & 0 deletions keyboards/adm42/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
MCU = atmega32u4
BOOTLOADER = atmel-dfu

BOOTMAGIC_ENABLE = yes
EXTRAKEY_ENABLE = yes
NKRO_ENABLE = yes
MOUSEKEY_ENABLE = no
COMMAND_ENABLE = no
SLEEP_LED_ENABLE = no
BACKLIGHT_ENABLE = no
RGBLIGHT_ENABLE = no
BLUETOOTH_ENABLE = no
AUDIO_ENABLE = no
NKRO_ENABLE = yes
OS_DETECTION_ENABLE = no
WPM_ENABLE = no
SPACE_CADET_ENABLE = no
GRAVE_ESC_ENABLE = no
AVR_USE_MINIMAL_PRINTF = yes
MAGIC_ENABLE = no
CONSOLE_ENABLE = no

DEBOUNCE_TYPE = sym_eager_pk
LTO_ENABLE = yes
DEFAULT_FOLDER = adm42/v2


84 changes: 84 additions & 0 deletions keyboards/adm42/v2/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/* Copyright 2020-2024 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 QMK_LED E6

#ifdef RGB_MATRIX_ENABLE

#define DRIVER_LED_TOTAL 42
#define RGB_MATRIX_LED_COUNT DRIVER_LED_TOTAL
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255

#define RGB_MATRIX_CENTER { 112, 32 }
#define RGB_MATRIX_SLEEP
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT
#define RGB_MATRIX_DEFAULT_SPD 125
#define RGB_MATRIX_DEFAULT_HUE 85
#define RGB_MATRIX_DEFAULT_SAT 255
#define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 20
#define RGB_MATRIX_KEYPRESSES
#define RGB_TRIGGER_ON_KEYDOWN
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS

#define RGB_MATRIX_SAT_STEP 24
#define RGB_MATRIX_HUE_STEP 12
#define RGB_MATRIX_VAL_STEP 16
#define RGB_MATRIX_SPD_STEP 16

#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
#define ENABLE_RGB_MATRIX_BREATHING
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#define ENABLE_RGB_MATRIX_RIVERFLOW
#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
#define ENABLE_RGB_MATRIX_BAND_VAL
#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
#define ENABLE_RGB_MATRIX_FLOWER_BLOOMING
#define ENABLE_RGB_MATRIX_PIXEL_RAIN
#define ENABLE_RGB_MATRIX_PIXEL_FLOW
#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS

#define DISABLE_RGB_MATRIX_MULTISPLASH
#define DISABLE_RGB_MATRIX_DIGITAL_RAIN
#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL
#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
#define DISABLE_RGB_MATRIX_BAND_SAT
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL
#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
#define DISABLE_RGB_MATRIX_CYCLE_ALL
#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL
#define DISABLE_RGB_MATRIX_DUAL_BEACON
#define DISABLE_RGB_MATRIX_HUE_WAVE
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
#define DISABLE_RGB_MATRIX_SOLID_SPLASH
#define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_ALPHAS_MOD

#endif
Loading

0 comments on commit 0d9c2ce

Please sign in to comment.