[Keyboard] Refactor atom47 and add rev4 and rev5 (#13201)
Co-authored-by: Nick Brassel <nick@tzarc.org>
This commit is contained in:
committed by
GitHub
parent
374b388382
commit
81e19d61c0
164
keyboards/evyd13/atom47/rev5/config.h
Normal file
164
keyboards/evyd13/atom47/rev5/config.h
Normal file
@@ -0,0 +1,164 @@
|
||||
/*
|
||||
Copyright 2021 Evelien Dekkers
|
||||
|
||||
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 0x4705
|
||||
#define PRODUCT_ID 0x92EA
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Evyd13
|
||||
#define PRODUCT Atom47 rev5
|
||||
|
||||
/* 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,B2,B3,D4}
|
||||
#define MATRIX_COL_PINS {F0,F1,F4,F5,F6,F7,E6,D7,B4,B5,B6,C6,C7}
|
||||
#define UNUSED_PINS {B0,B7,D2,D3,D5,D6}
|
||||
|
||||
/* COL2ROW, ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
//#define LED_NUM_LOCK_PIN B0
|
||||
//#define LED_CAPS_LOCK_PIN B1
|
||||
//#define LED_SCROLL_LOCK_PIN B2
|
||||
//#define LED_COMPOSE_PIN B3
|
||||
//#define LED_KANA_PIN B4
|
||||
|
||||
//#define BACKLIGHT_PIN B7
|
||||
//#define BACKLIGHT_LEVELS 3
|
||||
//#define BACKLIGHT_BREATHING
|
||||
|
||||
//#define RGB_DI_PIN E2
|
||||
//#ifdef RGB_DI_PIN
|
||||
//# define RGBLED_NUM 16
|
||||
//# define RGBLIGHT_HUE_STEP 8
|
||||
//# define RGBLIGHT_SAT_STEP 8
|
||||
//# define RGBLIGHT_VAL_STEP 8
|
||||
//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
|
||||
//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||
/*== all animations enable ==*/
|
||||
//# define RGBLIGHT_ANIMATIONS
|
||||
/*== or choose animations ==*/
|
||||
//# define RGBLIGHT_EFFECT_BREATHING
|
||||
//# define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
//# define RGBLIGHT_EFFECT_SNAKE
|
||||
//# define RGBLIGHT_EFFECT_KNIGHT
|
||||
//# define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
//# define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
//# define RGBLIGHT_EFFECT_RGB_TEST
|
||||
//# define RGBLIGHT_EFFECT_ALTERNATING
|
||||
/*== customize breathing effect ==*/
|
||||
/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
|
||||
//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
|
||||
/*==== use exp() and sin() ====*/
|
||||
//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
|
||||
//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
||||
//#endif
|
||||
|
||||
/* 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
|
||||
|
||||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||
* This is useful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||
*/
|
||||
//#define GRAVE_ESC_CTRL_OVERRIDE
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/* Bootmagic Lite key configuration */
|
||||
//#define BOOTMAGIC_LITE_ROW 0
|
||||
//#define BOOTMAGIC_LITE_COLUMN 0
|
||||
|
||||
// This is a 7-bit address, that gets left-shifted and bit 0
|
||||
// set to 0 for write, 1 for read (as per I2C protocol)
|
||||
// The address will vary depending on your wiring:
|
||||
// 00 <-> GND
|
||||
// 01 <-> SCL
|
||||
// 10 <-> SDA
|
||||
// 11 <-> VCC
|
||||
// ADDR1 represents A1:A0 of the 7-bit address.
|
||||
// ADDR2 represents A3:A2 of the 7-bit address.
|
||||
// The result is: 0b101(ADDR2)(ADDR1)
|
||||
#define DRIVER_ADDR_1 0b1010000
|
||||
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
|
||||
|
||||
#define DRIVER_COUNT 2
|
||||
#define DRIVER_1_LED_TOTAL 64
|
||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
|
63
keyboards/evyd13/atom47/rev5/info.json
Normal file
63
keyboards/evyd13/atom47/rev5/info.json
Normal file
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"keyboard_name": "Atom47 rev5",
|
||||
"url": "",
|
||||
"maintainer": "evyd13",
|
||||
"width": 13,
|
||||
"height": 4,
|
||||
"layouts": {
|
||||
"LAYOUT_split_space": {
|
||||
"layout": [
|
||||
{"x":0, "y":0},
|
||||
{"x":1, "y":0},
|
||||
{"x":2, "y":0},
|
||||
{"x":3, "y":0},
|
||||
{"x":4, "y":0},
|
||||
{"x":5, "y":0},
|
||||
{"x":6, "y":0},
|
||||
{"x":7, "y":0},
|
||||
{"x":8, "y":0},
|
||||
{"x":9, "y":0},
|
||||
{"x":10, "y":0},
|
||||
{"x":11, "y":0},
|
||||
{"x":12, "y":0},
|
||||
|
||||
{"x":0, "y":1, "w":1.25},
|
||||
{"x":1.25, "y":1},
|
||||
{"x":2.25, "y":1},
|
||||
{"x":3.25, "y":1},
|
||||
{"x":4.25, "y":1},
|
||||
{"x":5.25, "y":1},
|
||||
{"x":6.25, "y":1},
|
||||
{"x":7.25, "y":1},
|
||||
{"x":8.25, "y":1},
|
||||
{"x":9.25, "y":1},
|
||||
{"x":10.25, "y":1},
|
||||
{"x":11.25, "y":1, "w":1.75},
|
||||
|
||||
{"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":6.75, "y":2},
|
||||
{"x":7.75, "y":2},
|
||||
{"x":8.75, "y":2},
|
||||
{"x":9.75, "y":2},
|
||||
{"x":10.75, "y":2, "w":1.25},
|
||||
{"x":12, "y":2},
|
||||
|
||||
{"x":0, "y":3, "w":1.25},
|
||||
{"x":1.25, "y":3},
|
||||
{"x":2.25, "y":3},
|
||||
{"x":3.25, "y":3},
|
||||
{"x":4.25, "y":3, "w":1.75},
|
||||
{"x":6, "y":3, "w":2.75},
|
||||
{"x":8.75, "y":3},
|
||||
{"x":9.75, "y":3},
|
||||
{"x":10.75, "y":3},
|
||||
{"x":11.75, "y":3, "w":1.25}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
153
keyboards/evyd13/atom47/rev5/rev5.c
Normal file
153
keyboards/evyd13/atom47/rev5/rev5.c
Normal file
@@ -0,0 +1,153 @@
|
||||
/*
|
||||
Copyright 2021 Evelien Dekkers
|
||||
|
||||
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 "rev5.h"
|
||||
|
||||
const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
/* Refer to IS31 manual for these locations
|
||||
* driver
|
||||
* | R location
|
||||
* | | G location
|
||||
* | | | B location
|
||||
* | | | | */
|
||||
{0, B_1, C_1, A_1},
|
||||
{0, B_2, C_2, A_2},
|
||||
{0, B_3, C_3, A_3},
|
||||
{0, B_4, C_4, A_4},
|
||||
{0, B_5, C_5, A_5},
|
||||
{0, B_6, C_6, A_6},
|
||||
{0, B_7, C_7, A_7},
|
||||
{0, B_8, C_8, A_8},
|
||||
{0, B_9, C_9, A_9},
|
||||
{0, B_10, C_10, A_10},
|
||||
{0, B_11, C_11, A_11},
|
||||
{0, B_12, C_12, A_12},
|
||||
{0, B_13, C_13, A_13},
|
||||
|
||||
{0, E_1, F_1, D_1},
|
||||
{0, E_2, F_2, D_2},
|
||||
{0, E_3, F_3, D_3},
|
||||
{0, E_4, F_4, D_4},
|
||||
{0, E_5, F_5, D_5},
|
||||
{0, E_6, F_6, D_6},
|
||||
{0, E_7, F_7, D_7},
|
||||
{0, E_8, F_8, D_8},
|
||||
{0, E_9, F_9, D_9},
|
||||
{0, E_10, F_10, D_10},
|
||||
{0, E_11, F_11, D_11},
|
||||
{0, E_13, F_13, D_13},
|
||||
|
||||
{0, H_1, I_1, G_1},
|
||||
{0, H_2, I_2, G_2},
|
||||
{0, H_3, I_3, G_3},
|
||||
{0, H_4, I_4, G_4},
|
||||
{0, H_5, I_5, G_5},
|
||||
{0, H_6, I_6, G_6},
|
||||
{0, H_7, I_7, G_7},
|
||||
{0, H_8, I_8, G_8},
|
||||
{0, H_9, I_9, G_9},
|
||||
{0, H_10, I_10, G_10},
|
||||
{0, H_11, I_11, G_11},
|
||||
{0, H_12, I_12, G_12},
|
||||
{0, H_13, I_13, G_13},
|
||||
|
||||
{0, K_1, L_1, J_1},
|
||||
{0, K_2, L_2, J_2},
|
||||
{0, K_3, L_3, J_3},
|
||||
{0, K_4, L_4, J_4},
|
||||
{0, K_6, L_6, J_6},
|
||||
{0, K_8, L_8, J_8},
|
||||
{0, K_10, L_10, J_10},
|
||||
{0, K_11, L_11, J_11},
|
||||
{0, K_12, L_12, J_12},
|
||||
{0, K_13, L_13, J_13}
|
||||
};
|
||||
|
||||
led_config_t g_led_config = { {
|
||||
// Key Matrix to LED Index
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 },
|
||||
{ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, NO_LED, 24 },
|
||||
{ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37 },
|
||||
{ 38, 39, 40, 41, NO_LED, 42, NO_LED, 43, NO_LED, 44, 45, 46, 47 }
|
||||
}, {
|
||||
// LED Index to Physical Position
|
||||
{ 9, 8 },
|
||||
{ 26, 8 },
|
||||
{ 43, 8 },
|
||||
{ 60, 8 },
|
||||
{ 78, 8 },
|
||||
{ 95, 8 },
|
||||
{ 112, 8 },
|
||||
{ 129, 8 },
|
||||
{ 146, 8 },
|
||||
{ 164, 8 },
|
||||
{ 181, 8 },
|
||||
{ 198, 8 },
|
||||
{ 215, 8 },
|
||||
|
||||
{ 11, 24 },
|
||||
{ 30, 24 },
|
||||
{ 47, 24 },
|
||||
{ 64, 24 },
|
||||
{ 82, 24 },
|
||||
{ 99, 24 },
|
||||
{ 116, 24 },
|
||||
{ 134, 24 },
|
||||
{ 151, 24 },
|
||||
{ 168, 24 },
|
||||
{ 185, 24 },
|
||||
{ 209, 24 },
|
||||
|
||||
{ 15, 40 },
|
||||
{ 20, 22 },
|
||||
{ 39, 40 },
|
||||
{ 56, 40 },
|
||||
{ 73, 40 },
|
||||
{ 90, 40 },
|
||||
{ 108, 40 },
|
||||
{ 125, 40 },
|
||||
{ 142, 40 },
|
||||
{ 159, 40 },
|
||||
{ 177, 40 },
|
||||
{ 196, 40 },
|
||||
{ 215, 40 },
|
||||
|
||||
{ 11, 56 },
|
||||
{ 30, 56 },
|
||||
{ 47, 56 },
|
||||
{ 64, 56 },
|
||||
{ 88, 56 },
|
||||
{ 127, 56 },
|
||||
{ 159, 56 },
|
||||
{ 177, 56 },
|
||||
{ 194, 56 },
|
||||
{ 213, 56 },
|
||||
}, {
|
||||
// LED Index to Flag
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
||||
} };
|
||||
|
||||
void rgb_matrix_indicators_kb(void) {
|
||||
if (host_keyboard_led_state().caps_lock) {
|
||||
rgb_matrix_set_color(26, 255, 255, 255);
|
||||
} else {
|
||||
rgb_matrix_set_color(26, 0, 0, 0);
|
||||
}
|
||||
}
|
38
keyboards/evyd13/atom47/rev5/rev5.h
Normal file
38
keyboards/evyd13/atom47/rev5/rev5.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
Copyright 2021 Evelien Dekkers
|
||||
|
||||
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"
|
||||
|
||||
// readability
|
||||
#define XXX KC_NO
|
||||
|
||||
#define LAYOUT_all LAYOUT_split_space
|
||||
|
||||
#define LAYOUT_split_space( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, \
|
||||
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \
|
||||
k30, k31, k32, k33, k35, k37, k39, k3a, k3b, 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, XXX, k1c}, \
|
||||
{k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c}, \
|
||||
{k30, k31, k32, k33, XXX, k35, XXX, k37, XXX, k39, k3a, k3b, k3c} \
|
||||
}
|
2
keyboards/evyd13/atom47/rev5/rules.mk
Normal file
2
keyboards/evyd13/atom47/rev5/rules.mk
Normal file
@@ -0,0 +1,2 @@
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
RGB_MATRIX_DRIVER = IS31FL3733
|
Reference in New Issue
Block a user