1
0
Fork 0

Move miscellaneous layouts to data driven (#20516)

This commit is contained in:
Ryan 2023-04-25 02:38:35 +10:00 committed by GitHub
parent 72d2be24f9
commit f111bea3cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
288 changed files with 19592 additions and 21083 deletions

View file

@ -14,90 +14,91 @@
"layouts": {
"LAYOUT_pterodactyl": {
"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},
{"matrix": [0, 11], "x": 0, "y": 0},
{"matrix": [0, 10], "x": 1, "y": 0},
{"matrix": [0, 9], "x": 2, "y": 0},
{"matrix": [0, 8], "x": 3, "y": 0},
{"matrix": [0, 7], "x": 4, "y": 0},
{"matrix": [0, 6], "x": 5, "y": 0},
{"x":11, "y":0},
{"x":12, "y":0},
{"x":13, "y":0},
{"x":14, "y":0},
{"x":15, "y":0},
{"x":16, "y":0},
{"matrix": [0, 5], "x": 11, "y": 0},
{"matrix": [0, 4], "x": 12, "y": 0},
{"matrix": [0, 3], "x": 13, "y": 0},
{"matrix": [0, 2], "x": 14, "y": 0},
{"matrix": [0, 1], "x": 15, "y": 0},
{"matrix": [0, 0], "x": 16, "y": 0},
{"x":0, "y":1},
{"x":1, "y":1},
{"x":2, "y":1},
{"x":3, "y":1},
{"x":4, "y":1},
{"x":5, "y":1},
{"matrix": [1, 11], "x": 0, "y": 1},
{"matrix": [1, 10], "x": 1, "y": 1},
{"matrix": [1, 9], "x": 2, "y": 1},
{"matrix": [1, 8], "x": 3, "y": 1},
{"matrix": [1, 7], "x": 4, "y": 1},
{"matrix": [1, 6], "x": 5, "y": 1},
{"x":11, "y":1},
{"x":12, "y":1},
{"x":13, "y":1},
{"x":14, "y":1},
{"x":15, "y":1},
{"x":16, "y":1},
{"matrix": [1, 5], "x": 11, "y": 1},
{"matrix": [1, 4], "x": 12, "y": 1},
{"matrix": [1, 3], "x": 13, "y": 1},
{"matrix": [1, 2], "x": 14, "y": 1},
{"matrix": [1, 1], "x": 15, "y": 1},
{"matrix": [1, 0], "x": 16, "y": 1},
{"x":0, "y":2},
{"x":1, "y":2},
{"x":2, "y":2},
{"x":3, "y":2},
{"x":4, "y":2},
{"x":5, "y":2},
{"matrix": [2, 11], "x": 0, "y": 2},
{"matrix": [2, 10], "x": 1, "y": 2},
{"matrix": [2, 9], "x": 2, "y": 2},
{"matrix": [2, 8], "x": 3, "y": 2},
{"matrix": [2, 7], "x": 4, "y": 2},
{"matrix": [2, 6], "x": 5, "y": 2},
{"x":11, "y":2},
{"x":12, "y":2},
{"x":13, "y":2},
{"x":14, "y":2},
{"x":15, "y":2},
{"x":16, "y":2},
{"matrix": [2, 5], "x": 11, "y": 2},
{"matrix": [2, 4], "x": 12, "y": 2},
{"matrix": [2, 3], "x": 13, "y": 2},
{"matrix": [2, 2], "x": 14, "y": 2},
{"matrix": [2, 1], "x": 15, "y": 2},
{"matrix": [2, 0], "x": 16, "y": 2},
{"x":0, "y":3},
{"x":1, "y":3},
{"x":2, "y":3},
{"x":3, "y":3},
{"x":4, "y":3},
{"x":5, "y":3},
{"matrix": [3, 11], "x": 0, "y": 3},
{"matrix": [3, 10], "x": 1, "y": 3},
{"matrix": [3, 9], "x": 2, "y": 3},
{"matrix": [3, 8], "x": 3, "y": 3},
{"matrix": [3, 7], "x": 4, "y": 3},
{"matrix": [3, 6], "x": 5, "y": 3},
{"x":11, "y":3},
{"x":12, "y":3},
{"x":13, "y":3},
{"x":14, "y":3},
{"x":15, "y":3},
{"x":16, "y":3},
{"matrix": [3, 5], "x": 11, "y": 3},
{"matrix": [3, 4], "x": 12, "y": 3},
{"matrix": [3, 3], "x": 13, "y": 3},
{"matrix": [3, 2], "x": 14, "y": 3},
{"matrix": [3, 1], "x": 15, "y": 3},
{"matrix": [3, 0], "x": 16, "y": 3},
{"x":0, "y":4},
{"x":1, "y":4},
{"x":2, "y":4},
{"x":3, "y":4},
{"x":4, "y":4},
{"matrix": [4, 11], "x": 0, "y": 4},
{"matrix": [4, 10], "x": 1, "y": 4},
{"matrix": [4, 9], "x": 2, "y": 4},
{"matrix": [4, 8], "x": 3, "y": 4},
{"matrix": [4, 7], "x": 4, "y": 4},
{"x":12, "y":4},
{"x":13, "y":4},
{"x":14, "y":4},
{"x":15, "y":4},
{"x":16, "y":4},
{"matrix": [4, 4], "x": 12, "y": 4},
{"matrix": [4, 3], "x": 13, "y": 4},
{"matrix": [4, 2], "x": 14, "y": 4},
{"matrix": [4, 1], "x": 15, "y": 4},
{"matrix": [4, 0], "x": 16, "y": 4},
{"x":6, "y":5},
{"x":7, "y":5},
{"matrix": [5, 11], "x": 6, "y": 5},
{"matrix": [5, 10], "x": 7, "y": 5},
{"x":9, "y":5},
{"x":10, "y":5},
{"matrix": [5, 1], "x": 9, "y": 5},
{"matrix": [5, 0], "x": 10, "y": 5},
{"x":7, "y":6},
{"x":9, "y":6},
{"matrix": [5, 9], "x": 7, "y": 6},
{"x":5, "y":6, "h":2},
{"x":6, "y":6, "h":2},
{"x":7, "y":7},
{"matrix": [5, 2], "x": 9, "y": 6},
{"x":9, "y":7},
{"x":10, "y":6, "h":2},
{"x":11, "y":6, "h":2}
{"matrix": [4, 6], "x": 5, "y": 6, "h": 2},
{"matrix": [5, 7], "x": 6, "y": 6, "h": 2},
{"matrix": [5, 8], "x": 7, "y": 7},
{"matrix": [5, 3], "x": 9, "y": 7},
{"matrix": [5, 4], "x": 10, "y": 6, "h": 2},
{"matrix": [4, 5], "x": 11, "y": 6, "h": 2}
]
}
}

View file

@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "pterodactyl.h"
#include "i2c_master.h"
#include "timer.h"

View file

@ -1,4 +1,4 @@
#include "pterodactyl.h"
#include "quantum.h"
#ifdef SWAP_HANDS_ENABLE
__attribute__ ((weak))

View file

@ -1,38 +0,0 @@
#pragma once
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "i2c_master.h"
/*
* LEFT HAND: LINES 38-45
* RIGHT HAND: LINES 47-54
*/
#define LAYOUT_pterodactyl( \
\
k00,k01,k02,k03,k04,k05, k06,k07,k08,k09,k0A,k0B, \
k10,k11,k12,k13,k14,k15, k16,k17,k18,k19,k1A,k1B, \
k20,k21,k22,k23,k24,k25, k26,k27,k28,k29,k2A,k2B, \
k30,k31,k32,k33,k34,k35, k36,k37,k38,k39,k3A,k3B, \
k40,k41,k42,k43,k44, k47,k48,k49,k4A,k4B, \
k55,k50, k5B,k56, \
k54, k57, \
k53, k52,k51, k5A,k59,k58 ) \
\
/* matrix positions */ \
{ \
{ k0B, k0A, k09, k08, k07, k06, k05, k04, k03, k02, k01, k00 }, \
{ k1B, k1A, k19, k18, k17, k16, k15, k14, k13, k12, k11, k10 }, \
{ k2B, k2A, k29, k28, k27, k26, k25, k24, k23, k22, k21, k20 }, \
{ k3B, k3A, k39, k38, k37, k36, k35, k34, k33, k32, k31, k30 }, \
{ k4B, k4A, k49, k48, k47, k58, k53, k44, k43, k42, k41, k40 }, \
{ k56, k5B, k57, k5A, k59, KC_NO, KC_NO, k52, k51, k54, k50, k55 }, \
}
/* for future comers:
* the weird ass ordering here is because the dactyl/ergo/etc are wired for the
* chip to be in the right side, mine is not built that way.
* that last line is not obvious but its due to the way my columns are wired
* and are different than the dactyl guide.
* this is to compensate for my build.
*/