Changed CK3 matrix scan to Config_Pullup, inverted rows and columns
Added STROBE_DELAY define in matrix.h All keys scan codes now in defaultMap.kll
This commit is contained in:
parent
57a75851e2
commit
88670ac72f
3 changed files with 177 additions and 96 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2014-2015 by Jacob Alexander
|
||||
/* Copyright (C) 2014-2016 by Jacob Alexander, Crystal Hammer
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -27,28 +27,42 @@
|
|||
#include <matrix_setup.h>
|
||||
|
||||
|
||||
|
||||
// ----- Matrix Definition -----
|
||||
// CK3
|
||||
// Columns (Strobe) 18
|
||||
// Rows (Sense) 8
|
||||
|
||||
// Freescale ARM MK20's support GPIO PTA, PTB, PTC, PTD and PTE 0..31
|
||||
// Not all chips have access to all of these pins (most don't have 160 pins :P)
|
||||
//
|
||||
// NOTE:
|
||||
// Before using a pin, make sure it supports being a GPIO *and* doesn't have a default pull-up/pull-down
|
||||
// Checking this is completely on the ownness of the user
|
||||
// This is the default map of just A4Tech KX-100 matrix
|
||||
// scan codes for keys are defined in defaultMap.kll
|
||||
/*
|
||||
1| 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
||||
-
|
||||
1 Mcmp Bstp Esc \ F4 Up Del Ins Spc G H F6 == Vol- AltL xx F11 '
|
||||
2 Calc ExA4 ExC2 ExE2 ExE1 <- Sub -> Dn B N ExC1 Apps Mnxt AltR xx F12 /
|
||||
3 Mstp Bbck Z X C Mpau Mul Div NumL V M , . Vol+ xx CtrR Ent \
|
||||
4 GuiR Bfwd A S D Ent PgDn Dn End F J K L ShiR xx == \ ;
|
||||
5 xx Mail Q W E Add PgUp Up Home R U I O xx ScrL Paus ExE3 P
|
||||
6 ExB1 GuiL Tab Caps F3 RB~ -> Del <- T Y ] F7 ShiL == Pwr Back [
|
||||
7 xx Bsch 1 2 3 End PgDn xx Pwr 4 7 8 9 Msel Ptr F5 F10 0
|
||||
8 Bhom Vmut `~ F1 F2 Home PgUp Ins Del 5 6 = F8 Mprv == CtrL F9 -
|
||||
|
||||
//
|
||||
// Columns (Strobe) // PTB0..3,16,17 PTC4,5 PTD0
|
||||
// Rows (Sense) // PTD1..7
|
||||
|
||||
// Define Rows (Sense) and Columns (Strobes)
|
||||
GPIO_Pin Matrix_cols[] = { gpio(B,0), gpio(B,1), gpio(B,2), gpio(B,3), gpio(B,16), gpio(B,17), gpio(C,4), gpio(C,6), gpio(D,0) };
|
||||
GPIO_Pin Matrix_rows[] = { gpio(D,1), gpio(D,2), gpio(D,3), gpio(D,4), gpio(D,5), gpio(D,6), gpio(D,7) };
|
||||
rows - columns |
|
||||
1 3 5 7 1 3 5 7 9 11 13 15 17
|
||||
2 4 6 8 2 4 6 8 10 12 14 16 18 connectors, PCB view
|
||||
*/
|
||||
GPIO_Pin Matrix_cols[] = {
|
||||
gpio(B,16), gpio(B,17), gpio(D,0), gpio(A,12), gpio(A,13), gpio(D,7), gpio(D,4), gpio(D,2), gpio(D,3),
|
||||
gpio(C,2), gpio(C,1), gpio(D,6), gpio(D,5), gpio(B,2), gpio(B,3), gpio(B,1), gpio(B,0), gpio(C,0) };
|
||||
GPIO_Pin Matrix_rows[] = {
|
||||
gpio(C,10), gpio(C,11), gpio(B,18), gpio(A,4), gpio(A,5), gpio(B,19), gpio(C,9), gpio(C,8) };
|
||||
|
||||
// Define type of scan matrix
|
||||
Config Matrix_type = Config_Pulldown;
|
||||
Config Matrix_type = Config_Pullup;
|
||||
|
||||
|
||||
// Define this if your matrix has ghosting (i.e. regular keyboard without diodes)
|
||||
// this will enable the anti-ghosting code
|
||||
#define GHOSTING_MATRIX
|
||||
|
||||
// delay in microseconds before and after each strobe change during matrix scan
|
||||
#define STROBE_DELAY 10
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue