forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Keyboard] Added Adellein Keyboard/PCB (qmk#11547)
- Loading branch information
Showing
11 changed files
with
473 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* Copyright 2020 Neil Brian Ramirez | ||
* | ||
* 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/>. | ||
*/ | ||
|
||
#include "adellein.h" | ||
|
||
void matrix_scan_kb(void) { | ||
encoder_action_unregister(); | ||
matrix_scan_user(); | ||
} | ||
|
||
void encoder_update_kb(uint8_t index, bool clockwise) { | ||
encoder_action_register(index, clockwise); | ||
// encoder_update_user(index, clockwise); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* Copyright 2020 Neil Brian Ramirez | ||
* | ||
* 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 "quantum.h" | ||
#include "encoder_action.h" | ||
|
||
/* This is a shortcut to help you visually see your layout. | ||
* | ||
* The first section contains all of the arguments representing the physical | ||
* layout of the board and position of the keys. | ||
* | ||
* The second converts the arguments into a two-dimensional array which | ||
* represents the switch matrix. | ||
*/ | ||
|
||
#define LAYOUT_40ergo_split_ent( \ | ||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, \ | ||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ | ||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ | ||
K30, K32, K34, K35, K37, K39, K3C \ | ||
) { \ | ||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \ | ||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \ | ||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \ | ||
{ K30, KC_NO, K32, KC_NO, K34, K35, KC_NO, K37, KC_NO, K39, KC_NO, KC_NO, K3C }, \ | ||
} | ||
|
||
#define LAYOUT_40ergo_split_ent_encoder( \ | ||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, \ | ||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ | ||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ | ||
K30, K32, K34, K35, K37, K39, K3C, \ | ||
E00A, E00B \ | ||
) { \ | ||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \ | ||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \ | ||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \ | ||
{ K30, E00A, K32, E00B, K34, K35, KC_NO, K37, KC_NO, K39, KC_NO, KC_NO, K3C }, \ | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/* | ||
Copyright 2020 Neil Brian Ramirez | ||
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 "config_common.h" | ||
|
||
/* USB Device descriptor parameter */ | ||
#define VENDOR_ID 0xD812 | ||
#define PRODUCT_ID 0x0010 | ||
#define DEVICE_VER 0x0001 | ||
#define MANUFACTURER Neil Brian Ramirez | ||
#define PRODUCT Adellein | ||
|
||
/* key matrix size */ | ||
#define MATRIX_ROWS 4 | ||
#define MATRIX_COLS 13 | ||
|
||
/* | ||
* 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 { B1, B0, B5, B6 } | ||
#define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0, B7, B3, B2, D0, D1, D2, D3 } | ||
#define UNUSED_PINS | ||
|
||
/* COL2ROW, ROW2COL*/ | ||
#define DIODE_DIRECTION COL2ROW | ||
|
||
#define RGB_DI_PIN D5 | ||
#ifdef RGB_DI_PIN | ||
#define RGBLED_NUM 14 | ||
#define RGBLIGHT_ANIMATIONS | ||
|
||
#endif | ||
|
||
/* Encoders */ | ||
|
||
#define ENCODERS 1 | ||
|
||
#define ENCODERS_PAD_A { C7 } | ||
#define ENCODERS_PAD_B { C6 } | ||
|
||
#define ENCODERS_CW_KEY { { 3, 3 } } | ||
#define ENCODERS_CCW_KEY { { 1, 3 } } | ||
|
||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
#define DEBOUNCE 5 | ||
|
||
/* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
//#define MATRIX_HAS_GHOST | ||
|
||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
#define LOCKING_SUPPORT_ENABLE | ||
/* Locking resynchronize hack */ | ||
#define LOCKING_RESYNC_ENABLE | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* Copyright 2020 Neil Brian Ramirez | ||
* | ||
* 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 3 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 "encoder_action.h" | ||
|
||
#ifdef ENCODERS | ||
static uint8_t encoder_state[ENCODERS] = {0}; | ||
static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; | ||
static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; | ||
#endif | ||
|
||
void encoder_action_unregister(void) { | ||
#ifdef ENCODERS | ||
for (int index = 0; index < ENCODERS; ++index) { | ||
if (encoder_state[index]) { | ||
keyevent_t encoder_event = (keyevent_t) { | ||
.key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], | ||
.pressed = false, | ||
.time = (timer_read() | 1) | ||
}; | ||
encoder_state[index] = 0; | ||
action_exec(encoder_event); | ||
} | ||
} | ||
#endif | ||
} | ||
|
||
void encoder_action_register(uint8_t index, bool clockwise) { | ||
#ifdef ENCODERS | ||
keyevent_t encoder_event = (keyevent_t) { | ||
.key = clockwise ? encoder_cw[index] : encoder_ccw[index], | ||
.pressed = true, | ||
.time = (timer_read() | 1) | ||
}; | ||
encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); | ||
action_exec(encoder_event); | ||
#endif | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* Copyright 2020 Neil Brian Ramirez | ||
* | ||
* 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 3 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 "quantum.h" | ||
|
||
void encoder_action_unregister(void); | ||
|
||
void encoder_action_register(uint8_t index, bool clockwise); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
{ | ||
"keyboard_name": "Adellein", | ||
"url": "", | ||
"maintainer": "Neil Brian Ramirez", | ||
"width": 16.25, | ||
"height": 5, | ||
"layouts": { | ||
"LAYOUT_40ergo_split_ent": { | ||
"layout": [ | ||
{"x":0.5, "y":0}, | ||
{"x":1.5, "y":0}, | ||
{"x":2.5, "y":0}, | ||
{"x":3.5, "y":0}, | ||
{"x":4.5, "y":0}, | ||
{"x":5.5, "y":0}, | ||
{"x":8.25, "y":0}, | ||
{"x":9.25, "y":0}, | ||
{"x":10.25, "y":0}, | ||
{"x":11.25, "y":0}, | ||
{"x":12.25, "y":0}, | ||
{"x":13.25, "y":0}, | ||
{"x":14.25, "y":0, "w":1.5}, | ||
|
||
{"x":0.25, "y":1, "w":1.25}, | ||
{"x":1.5, "y":1}, | ||
{"x":2.5, "y":1}, | ||
{"x":3.5, "y":1}, | ||
{"x":4.5, "y":1}, | ||
{"x":5.5, "y":1}, | ||
{"x":8.75, "y":1}, | ||
{"x":9.75, "y":1}, | ||
{"x":10.75, "y":1}, | ||
{"x":11.75, "y":1}, | ||
{"x":12.75, "y":1}, | ||
{"x":13.75, "y":1}, | ||
{"x":14.75, "y":1, "w":1.25}, | ||
|
||
{"x":0, "y":2, "w":1.75}, | ||
{"x":1.75, "y":2}, | ||
{"x":2.75, "y":2}, | ||
{"x":3.75, "y":2}, | ||
{"x":4.75, "y":2}, | ||
{"x":5.75, "y":2}, | ||
{"x":8.5, "y":2}, | ||
{"x":9.5, "y":2}, | ||
{"x":10.5, "y":2}, | ||
{"x":11.5, "y":2}, | ||
{"x":12.5, "y":2}, | ||
{"x":13.5, "y":2}, | ||
{"x":14.5, "y":2, "w":1.75}, | ||
|
||
{"x":0.25, "y":3, "w":1.25}, | ||
{"x":2.75, "y":3, "w":1.25}, | ||
{"x":4, "y":3, "w":2.25}, | ||
{"x":6.25, "y":3}, | ||
{"x":8, "y":3, "w":2.75}, | ||
{"x":10.75, "y":3, "w":1.25}, | ||
{"x":14.75, "y":3, "w":1.25} | ||
] | ||
}, | ||
"LAYOUT_40ergo_split_ent_encoder": { | ||
"layout": [ | ||
{"x":0.5, "y":0}, | ||
{"x":1.5, "y":0}, | ||
{"x":2.5, "y":0}, | ||
{"x":3.5, "y":0}, | ||
{"x":4.5, "y":0}, | ||
{"x":5.5, "y":0}, | ||
{"x":8.25, "y":0}, | ||
{"x":9.25, "y":0}, | ||
{"x":10.25, "y":0}, | ||
{"x":11.25, "y":0}, | ||
{"x":12.25, "y":0}, | ||
{"x":13.25, "y":0}, | ||
{"x":14.25, "y":0, "w":1.5}, | ||
|
||
{"x":0.25, "y":1, "w":1.25}, | ||
{"x":1.5, "y":1}, | ||
{"x":2.5, "y":1}, | ||
{"x":3.5, "y":1}, | ||
{"x":4.5, "y":1}, | ||
{"x":5.5, "y":1}, | ||
{"x":8.75, "y":1}, | ||
{"x":9.75, "y":1}, | ||
{"x":10.75, "y":1}, | ||
{"x":11.75, "y":1}, | ||
{"x":12.75, "y":1}, | ||
{"x":13.75, "y":1}, | ||
{"x":14.75, "y":1, "w":1.25}, | ||
|
||
{"x":0, "y":2, "w":1.75}, | ||
{"x":1.75, "y":2}, | ||
{"x":2.75, "y":2}, | ||
{"x":3.75, "y":2}, | ||
{"x":4.75, "y":2}, | ||
{"x":5.75, "y":2}, | ||
{"x":8.5, "y":2}, | ||
{"x":9.5, "y":2}, | ||
{"x":10.5, "y":2}, | ||
{"x":11.5, "y":2}, | ||
{"x":12.5, "y":2}, | ||
{"x":13.5, "y":2}, | ||
{"x":14.5, "y":2, "w":1.75}, | ||
|
||
{"x":0.25, "y":3, "w":1.25}, | ||
{"x":2.75, "y":3, "w":1.25}, | ||
{"x":4, "y":3, "w":2.25}, | ||
{"x":6.25, "y":3}, | ||
{"x":8, "y":3, "w":2.75}, | ||
{"x":10.75, "y":3, "w":1.25}, | ||
{"x":14.75, "y":3, "w":1.25}, | ||
|
||
{"x":5.75, "y":4}, | ||
{"x":6.75, "y":4} | ||
] | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
keyboards/nightly_boards/adellein/keymaps/default/keymap.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* Copyright 2020 Neil Brian Ramirez | ||
* | ||
* 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/>. | ||
*/ | ||
#include QMK_KEYBOARD_H | ||
|
||
|
||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
[0] = LAYOUT_40ergo_split_ent( | ||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_BSPC, | ||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, | ||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, | ||
KC_LCTL, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL | ||
), | ||
}; |
Oops, something went wrong.