]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/converter/numeric_keypad_IIe/config.h
Replace DEBOUNCING_DELAY (deprecated) with DEBOUNCE (#5997)
[qmk_firmware.git] / keyboards / converter / numeric_keypad_IIe / config.h
1 /*
2 Copyright 2019 Adam Newbold <adam@neatnik.net>
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 */
17
18 #pragma once
19
20 #include "config_common.h"
21
22 /* USB Device descriptor parameter */
23 #define VENDOR_ID       0xFEED
24 #define PRODUCT_ID      0x0000
25 #define DEVICE_VER      0x0001
26 #define MANUFACTURER    Apple Inc.
27 #define PRODUCT         Numeric Keypad IIe
28 #define DESCRIPTION     "Numeric Keypad IIe, A2M2003"
29
30 /*
31
32 Pin Mappings
33 ============
34
35 Dsub-15 Connection
36 ------------------
37
38           Dsub-15 (female)
39     ,-------------------------.
40     \ 08 07 06 05 04 03 02 01 /
41      \ 15 14 13 12 11 10 09  /
42       `---------------------'
43
44 Header Pins
45 -----------
46  _____________________________________
47 |                                     |
48 |  11  10  9  8  7  6  5  4  3  2  1  |
49 |_____________________________________|
50
51
52 Header / Matrix
53 ---------------
54
55 Pin             Name        Description
56 --------------------------------------------------------------
57 1,2,5,3,4,6     Y0-Y5       Y-direction key-matrix connections
58 7               NC
59 9,11,10,8       X4-X7       X-direction key-matrix connections
60
61
62 Microcontroller Configuration
63 -----------------------------
64
65 (Pins are for an Arduino Micro)
66
67 +-----------------------------------+
68 | Dsub-15 | Header | Matrix | Micro |
69 |---------+--------+--------+-------|
70 |   12    |   11   |   X5   |   B0  |
71 |   11    |   10   |   X6   |   D3  |
72 |   10    |    9   |   X4   |   B2  |
73 |    9    |    8   |   X7   |   D2  |
74 |   NC    |    7   |   NC   |   --  |
75 |    7    |    6   |   Y5   |   E6  |
76 |    6    |    5   |   Y2   |   D4  |
77 |    5    |    4   |   Y4   |   D7  |
78 |    3    |    3   |   Y3   |   C6  |
79 |    2    |    2   |   Y1   |   D0  |
80 |    1    |    1   |   Y0   |   D1  |
81 +-----------------------------------+
82
83 Note: Dsub-15 pins 4, 8, 13, 14, and 15 are unused
84
85 Reference
86 ---------
87
88 https://deskthority.net/wiki/Apple_Numeric_Keypad_IIe
89 https://geekhack.org/index.php?topic=78048.0
90 http://wiki.apple2.org/index.php?title=Pinouts#Apple_.2F.2Fe_Numeric_Keypad_connector
91
92 */
93
94 #define MATRIX_ROWS 4
95 #define MATRIX_COLS 6
96 #define MATRIX_ROW_PINS { B0, B2, D2, D3 }
97 #define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6 }
98 #define UNUSED_PINS
99 #define DIODE_DIRECTION COL2ROW
100 #define SOFT_SERIAL_PIN D0
101 #define DEBOUNCE 5