aboutsummaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/kitten_paw/Makefile77
-rw-r--r--keyboards/kitten_paw/config.h162
-rw-r--r--keyboards/kitten_paw/keymaps/default/keymap.c51
-rw-r--r--keyboards/kitten_paw/kitten_paw.c30
-rw-r--r--keyboards/kitten_paw/kitten_paw.h47
-rw-r--r--keyboards/kitten_paw/led.c47
-rw-r--r--keyboards/kitten_paw/matrix.c164
-rw-r--r--keyboards/kitten_paw/readme.md32
-rw-r--r--keyboards/readme.md1
-rw-r--r--keyboards/tv44/keymaps/default/keymap.c2
-rw-r--r--keyboards/tv44/tv44.h2
11 files changed, 613 insertions, 2 deletions
diff --git a/keyboards/kitten_paw/Makefile b/keyboards/kitten_paw/Makefile
new file mode 100644
index 000000000..912292173
--- /dev/null
+++ b/keyboards/kitten_paw/Makefile
@@ -0,0 +1,77 @@
1
2
3# MCU name
4#MCU = at90usb1287
5MCU = atmega32u2
6
7# Processor frequency.
8# This will define a symbol, F_CPU, in all source code files equal to the
9# processor frequency in Hz. You can then use this symbol in your source code to
10# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
11# automatically to create a 32-bit value in your source code.
12#
13# This will be an integer division of F_USB below, as it is sourced by
14# F_USB after it has run through any CPU prescalers. Note that this value
15# does not *change* the processor frequency - it should merely be updated to
16# reflect the processor speed set externally so that the code can use accurate
17# software delays.
18F_CPU = 16000000
19
20
21#
22# LUFA specific
23#
24# Target architecture (see library "Board Types" documentation).
25ARCH = AVR8
26
27# Input clock frequency.
28# This will define a symbol, F_USB, in all source code files equal to the
29# input clock frequency (before any prescaling is performed) in Hz. This value may
30# differ from F_CPU if prescaling is used on the latter, and is required as the
31# raw input clock is fed directly to the PLL sections of the AVR for high speed
32# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
33# at the end, this will be done automatically to create a 32-bit value in your
34# source code.
35#
36# If no clock division is performed on the input clock inside the AVR (via the
37# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
38F_USB = $(F_CPU)
39
40# Interrupt driven control endpoint task(+60)
41OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
42
43
44# Boot Section Size in *bytes*
45# Teensy halfKay 512
46# Teensy++ halfKay 1024
47# Atmel DFU loader 4096
48# LUFA bootloader 4096
49# USBaspLoader 2048
50 OPT_DEFS += -DBOOTLOADER_SIZE=4096
51
52
53# Build Options
54# change yes to no to disable
55#
56BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
57MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
58EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
59CONSOLE_ENABLE ?= yes # Console for debug(+400)
60COMMAND_ENABLE ?= yes # Commands for debug and configuration
61# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
62SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
63# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
64NKRO_ENABLE ?= no # USB Nkey Rollover
65BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
66MIDI_ENABLE ?= no # MIDI controls
67UNICODE_ENABLE ?= no # Unicode
68BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
69AUDIO_ENABLE ?= no # Audio output on port C6
70
71CUSTOM_MATRIX = yes
72SRC += matrix.c led.c
73
74ifndef QUANTUM_DIR
75 include ../../Makefile
76endif
77
diff --git a/keyboards/kitten_paw/config.h b/keyboards/kitten_paw/config.h
new file mode 100644
index 000000000..d7089734a
--- /dev/null
+++ b/keyboards/kitten_paw/config.h
@@ -0,0 +1,162 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23
24/* USB Device descriptor parameter */
25#define VENDOR_ID 0xFEED
26#define PRODUCT_ID 0x6050
27#define DEVICE_VER 0x0104
28#define MANUFACTURER Costar
29#define PRODUCT Majestouch
30
31/* key matrix size */
32#define MATRIX_ROWS 8
33#define MATRIX_COLS 18
34
35/*
36 * Keyboard Matrix Assignments
37 *
38 * Change this to how you wired your keyboard
39 * COLS: AVR pins used for columns, left to right
40 * ROWS: AVR pins used for rows, top to bottom
41 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
42 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
43 *
44*/
45//#define MATRIX_ROW_PINS { D0, D5 }
46//#define MATRIX_COL_PINS { F1, F0, B0 }
47//#define UNUSED_PINS
48
49/* COL2ROW or ROW2COL */
50#define DIODE_DIRECTION COL2ROW
51
52// #define BACKLIGHT_PIN B7
53// #define BACKLIGHT_BREATHING
54// #define BACKLIGHT_LEVELS 3
55
56
57/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
58#define DEBOUNCING_DELAY 5
59
60/* define if matrix has ghost (lacks anti-ghosting diodes) */
61//#define MATRIX_HAS_GHOST
62
63/* number of backlight levels */
64
65/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
66#define LOCKING_SUPPORT_ENABLE
67/* Locking resynchronize hack */
68#define LOCKING_RESYNC_ENABLE
69
70/*
71 * Force NKRO
72 *
73 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
74 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
75 * makefile for this to work.)
76 *
77 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
78 * until the next keyboard reset.
79 *
80 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
81 * fully operational during normal computer usage.
82 *
83 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
84 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
85 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
86 * power-up.
87 *
88 */
89//#define FORCE_NKRO
90
91/*
92 * Magic Key Options
93 *
94 * Magic keys are hotkey commands that allow control over firmware functions of
95 * the keyboard. They are best used in combination with the HID Listen program,
96 * found here: https://www.pjrc.com/teensy/hid_listen.html
97 *
98 * The options below allow the magic key functionality to be changed. This is
99 * useful if your keyboard/keypad is missing keys and you want magic key support.
100 *
101 */
102
103/* key combination for magic key command */
104#define IS_COMMAND() ( \
105 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
106)
107
108/* control how magic key switches layers */
109//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
110//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
111//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
112
113/* override magic key keymap */
114//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
115//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
116//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
117//#define MAGIC_KEY_HELP1 H
118//#define MAGIC_KEY_HELP2 SLASH
119//#define MAGIC_KEY_DEBUG D
120//#define MAGIC_KEY_DEBUG_MATRIX X
121//#define MAGIC_KEY_DEBUG_KBD K
122//#define MAGIC_KEY_DEBUG_MOUSE M
123//#define MAGIC_KEY_VERSION V
124//#define MAGIC_KEY_STATUS S
125//#define MAGIC_KEY_CONSOLE C
126//#define MAGIC_KEY_LAYER0_ALT1 ESC
127//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
128//#define MAGIC_KEY_LAYER0 0
129//#define MAGIC_KEY_LAYER1 1
130//#define MAGIC_KEY_LAYER2 2
131//#define MAGIC_KEY_LAYER3 3
132//#define MAGIC_KEY_LAYER4 4
133//#define MAGIC_KEY_LAYER5 5
134//#define MAGIC_KEY_LAYER6 6
135//#define MAGIC_KEY_LAYER7 7
136//#define MAGIC_KEY_LAYER8 8
137//#define MAGIC_KEY_LAYER9 9
138//#define MAGIC_KEY_BOOTLOADER PAUSE
139//#define MAGIC_KEY_LOCK CAPS
140//#define MAGIC_KEY_EEPROM E
141//#define MAGIC_KEY_NKRO N
142//#define MAGIC_KEY_SLEEP_LED Z
143
144/*
145 * Feature disable options
146 * These options are also useful to firmware size reduction.
147 */
148
149/* disable debug print */
150//#define NO_DEBUG
151
152/* disable print */
153//#define NO_PRINT
154
155/* disable action features */
156//#define NO_ACTION_LAYER
157//#define NO_ACTION_TAPPING
158//#define NO_ACTION_ONESHOT
159//#define NO_ACTION_MACRO
160//#define NO_ACTION_FUNCTION
161
162#endif
diff --git a/keyboards/kitten_paw/keymaps/default/keymap.c b/keyboards/kitten_paw/keymaps/default/keymap.c
new file mode 100644
index 000000000..f67235745
--- /dev/null
+++ b/keyboards/kitten_paw/keymaps/default/keymap.c
@@ -0,0 +1,51 @@
1#include "kitten_paw.h"
2
3enum layers {
4 DEFAULT,
5};
6
7const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
8 [DEFAULT] = KEYMAP(\
9 KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
10 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS,KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
11 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END,KC_PGDN, KC_P7, KC_P8, KC_P9,KC_PPLS, \
12 KC_CAPS, 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_P4, KC_P5, KC_P6, \
13 KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3,KC_PENT, \
14 KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT)
15};
16
17const uint16_t PROGMEM fn_actions[] = {
18
19};
20
21const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
22{
23 // MACRODOWN only works in this function
24 switch(id) {
25 case 0:
26 if (record->event.pressed) {
27 register_code(KC_RSFT);
28 } else {
29 unregister_code(KC_RSFT);
30 }
31 break;
32 }
33 return MACRO_NONE;
34};
35
36
37void matrix_init_user(void) {
38
39}
40
41void matrix_scan_user(void) {
42
43}
44
45bool process_record_user(uint16_t keycode, keyrecord_t *record) {
46 return true;
47}
48
49void led_set_user(uint8_t usb_led) {
50
51} \ No newline at end of file
diff --git a/keyboards/kitten_paw/kitten_paw.c b/keyboards/kitten_paw/kitten_paw.c
new file mode 100644
index 000000000..8713baf43
--- /dev/null
+++ b/keyboards/kitten_paw/kitten_paw.c
@@ -0,0 +1,30 @@
1#include "kitten_paw.h"
2
3void matrix_init_kb(void) {
4 // put your keyboard start-up code here
5 // runs once when the firmware starts up
6
7 matrix_init_quantum();
8 matrix_init_user();
9}
10
11void matrix_scan_kb(void) {
12 // put your looping keyboard code here
13 // runs every cycle (a lot)
14
15 matrix_scan_quantum();
16 matrix_scan_user();
17}
18
19bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
20 // put your per-action keyboard code here
21 // runs for every action, just before processing by the firmware
22
23 return process_record_user(keycode, record);
24}
25
26void led_set_kb(uint8_t usb_led) {
27 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
28
29 led_set_user(usb_led);
30}
diff --git a/keyboards/kitten_paw/kitten_paw.h b/keyboards/kitten_paw/kitten_paw.h
new file mode 100644
index 000000000..a6c1d27de
--- /dev/null
+++ b/keyboards/kitten_paw/kitten_paw.h
@@ -0,0 +1,47 @@
1#ifndef KITTEN_PAW_H
2#define KITTEN_PAW_H
3
4#include "quantum.h"
5
6// This a shortcut to help you visually see your layout.
7// The first section contains all of the arguements
8// The second converts the arguments into a two-dimensional array
9/*
10 Matrix col/row mapping
11
12 ,----. ,-------------------. ,-------------------. ,-------------------. ,--------------.
13 | J6 | | I4 | H4 | H2 | H6 | | A7 | E6 | D2 | D4 | | B4 | B7 | B6 | B0 | | C7 | C5 | A5 |
14 `----' `-------------------' `-------------------' `-------------------' `--------------'
15 ,-------------------------------------------------------------------------. ,--------------. ,-------------------.
16 | J4 | J7 | I7 | H7 | G7 | G4 | F4 | F7 | E7 | D7 | R7 | R4 | E4 | B2 | | L4 | O4 | Q4 | | K1 | L1 | Q1 | Q0 |
17 |-------------------------------------------------------------------------| |--------------| |-------------------|
18 | J2 | J5 | I5 | H5 | G5 | G2 | F2 | F5 | E5 | D5 | R5 | R2 | E2 | B3 | | K4 | O7 | Q7 | | K5 | L5 | Q5 | O5 |
19 |-------------------------------------------------------------------------| '--------------' |-------------- |
20 | O5 | J3 | I3 | H3 | G3 | G6 | F6 | F3 | E3 | D3 | R3 | R6 | B1 | | K2 | L2 | Q2 | |
21 |-------------------------------------------------------------------------| ,----. |-------------------|
22 | N2 | J1 | I1 | H1 | G1 | G0 | F0 | F1 | E1 | D1 | R0 | N3 | | O6 | | K3 | L3 | Q3 | O3 |
23 |-------------------------------------------------------------------------| ,--------------. |-------------- |
24 | A4 | P2 | C6 | K6 | C0 | M3 | D0 | A1 | | O0 | K0 | L0 | | L6 | Q6 | |
25 `-------------------------------------------------------------------------' `--------------' `-------------------'
26*/
27
28#define KEYMAP( \
29 KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \
30 KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, KK1, KL1, KQ1, KQ0, \
31 KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \
32 KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \
33 KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \
34 KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \
35) \
36{ \
37 {KC_NO, KB0, KC0, KD0,KC_NO, KF0, KG0,KC_NO,KC_NO,KC_NO, KK0, KL0,KC_NO,KC_NO, KO0,KC_NO, KQ0, KR0}, \
38 { KA1, KB1,KC_NO, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1,KC_NO,KC_NO,KC_NO,KC_NO, KQ1,KC_NO}, \
39 {KC_NO, KB2,KC_NO, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2,KC_NO, KN2,KC_NO, KP2, KQ2, KR2}, \
40 {KC_NO, KB3,KC_NO, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3,KC_NO, KQ3, KR3}, \
41 { KA4, KB4,KC_NO, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4,KC_NO,KC_NO, KO4,KC_NO, KQ4, KR4}, \
42 { KA5,KC_NO, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5,KC_NO,KC_NO, KO5,KC_NO, KQ5, KR5}, \
43 {KC_NO, KB6, KC6,KC_NO, KE6, KF6, KG6, KH6, KI6, KJ6, KK6, KL6,KC_NO,KC_NO, KO6,KC_NO, KQ6, KR6}, \
44 { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7,KC_NO,KC_NO,KC_NO,KC_NO, KO7,KC_NO, KQ7, KR7} \
45}
46
47#endif
diff --git a/keyboards/kitten_paw/led.c b/keyboards/kitten_paw/led.c
new file mode 100644
index 000000000..a1bf057c4
--- /dev/null
+++ b/keyboards/kitten_paw/led.c
@@ -0,0 +1,47 @@
1/*
2 Copyright 2014 Ralf Schmitt <ralf@bunkertor.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#include <avr/io.h>
19#include "stdint.h"
20#include "led.h"
21
22/* LED pin configuration
23 *
24 * Scroll Lock PC5
25 * Caps Lock PC6
26 * Num Lock PB7
27 *
28 */
29void led_set(uint8_t usb_led) {
30 DDRB |= (1<<7);
31 DDRC |= (1<<5) | (1<<6);
32
33 if (usb_led & (1<<USB_LED_CAPS_LOCK))
34 PORTC &= ~(1<<6);
35 else
36 PORTC |= (1<<6);
37
38 if (usb_led & (1<<USB_LED_NUM_LOCK))
39 PORTB &= ~(1<<7);
40 else
41 PORTB |= (1<<7);
42
43 if (usb_led & (1<<USB_LED_SCROLL_LOCK))
44 PORTC &= ~(1<<5);
45 else
46 PORTC |= (1<<5);
47}
diff --git a/keyboards/kitten_paw/matrix.c b/keyboards/kitten_paw/matrix.c
new file mode 100644
index 000000000..46875293f
--- /dev/null
+++ b/keyboards/kitten_paw/matrix.c
@@ -0,0 +1,164 @@
1/*
2 Copyright 2014 Ralf Schmitt <ralf@bunkertor.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#include <stdint.h>
19#include <stdbool.h>
20#include <avr/io.h>
21#include <util/delay.h>
22#include "print.h"
23#include "debug.h"
24#include "util.h"
25#include "matrix.h"
26
27#ifndef DEBOUNCING_DELAY
28# define DEBOUNCING_DELAY 5
29#endif
30static uint8_t debouncing = DEBOUNCING_DELAY;
31
32static matrix_row_t matrix[MATRIX_ROWS];
33static matrix_row_t matrix_debouncing[MATRIX_ROWS];
34
35static uint8_t read_rows(void);
36static void select_col(uint8_t col);
37
38inline uint8_t matrix_rows(void) {
39 return MATRIX_ROWS;
40}
41
42inline uint8_t matrix_cols(void) {
43 return MATRIX_COLS;
44}
45
46/* Column pin configuration
47 *
48 * col: 0 1 2 3 4 5 6 7
49 * pin: PC7 PD5 PD3 PD1 PC2 PD6 PD4 PD2
50 *
51 * Rrr pin configuration
52 *
53 * These rrrs uses one 74HC154 4 to 16 bit demultiplexer (low
54 * active), together with 2 rrrs driven directly from the micro
55 * controller, to control the 18 rrrs. The rrrs are driven from
56 * pins B6,5,4,3,2,1,0.
57 */
58void matrix_init(void) {
59 DDRC &= ~0b10000100; // Row input pins
60 DDRD &= ~0b01111110;
61 PORTC |= 0b10000100;
62 PORTD |= 0b01111110;
63
64 DDRB |= 0b01111111; // Column output pins
65
66 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
67 matrix[i] = 0;
68 matrix_debouncing[i] = 0;
69 }
70}
71
72uint8_t matrix_scan(void) {
73 for (uint8_t col = 0; col < MATRIX_COLS; col++) {
74 select_col(col);
75 _delay_us(3);
76 uint8_t rows = read_rows();
77 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
78 bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col);
79 bool curr_bit = rows & (1<<row);
80 if (prev_bit != curr_bit) {
81 matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
82 debouncing = DEBOUNCING_DELAY;
83 }
84 }
85 }
86
87 if (debouncing) {
88 if (--debouncing) {
89 _delay_ms(1);
90 }
91 else {
92 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
93 matrix[i] = matrix_debouncing[i];
94 }
95 }
96 }
97
98 return 1;
99}
100
101bool matrix_is_modified(void) {
102 if (debouncing)
103 return false;
104 else
105 return true;
106}
107
108inline bool matrix_is_on(uint8_t row, uint8_t col) {
109 return (matrix[row] & ((matrix_row_t)1<<col));
110}
111
112inline matrix_row_t matrix_get_row(uint8_t row) {
113 return matrix[row];
114}
115
116void matrix_print(void) {
117 print("\nr/c 0123456789ABCDEF\n");
118 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
119 xprintf("%02X: %032lb\n", row, bitrev32(matrix_get_row(row)));
120 }
121}
122
123uint8_t matrix_key_count(void) {
124 uint8_t count = 0;
125 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
126 count += bitpop32(matrix[i]);
127 }
128 return count;
129}
130
131static uint8_t read_rows(void) {
132 return
133 (PINC&(1<<7) ? 0 : (1<<0)) |
134 (PIND&(1<<5) ? 0 : (1<<1)) |
135 (PIND&(1<<3) ? 0 : (1<<2)) |
136 (PIND&(1<<1) ? 0 : (1<<3)) |
137 (PINC&(1<<2) ? 0 : (1<<4)) |
138 (PIND&(1<<2) ? 0 : (1<<5)) |
139 (PIND&(1<<4) ? 0 : (1<<6)) |
140 (PIND&(1<<6) ? 0 : (1<<7));
141}
142
143static void select_col(uint8_t col) {
144 switch (col) {
145 case 0: PORTB = (PORTB & ~0b01111111) | 0b01100100; break;
146 case 1: PORTB = (PORTB & ~0b01111111) | 0b01101100; break;
147 case 2: PORTB = (PORTB & ~0b01111111) | 0b01100010; break;
148 case 3: PORTB = (PORTB & ~0b01111111) | 0b01111010; break;
149 case 4: PORTB = (PORTB & ~0b01111111) | 0b01100110; break;
150 case 5: PORTB = (PORTB & ~0b01111111) | 0b01110110; break;
151 case 6: PORTB = (PORTB & ~0b01111111) | 0b01101110; break;
152 case 7: PORTB = (PORTB & ~0b01111111) | 0b01111110; break;
153 case 8: PORTB = (PORTB & ~0b01111111) | 0b01000001; break;
154 case 9: PORTB = (PORTB & ~0b01111111) | 0b00100001; break;
155 case 10: PORTB = (PORTB & ~0b01111111) | 0b01101010; break;
156 case 11: PORTB = (PORTB & ~0b01111111) | 0b01110010; break;
157 case 12: PORTB = (PORTB & ~0b01111111) | 0b01111100; break;
158 case 13: PORTB = (PORTB & ~0b01111111) | 0b01110100; break;
159 case 14: PORTB = (PORTB & ~0b01111111) | 0b01111000; break;
160 case 15: PORTB = (PORTB & ~0b01111111) | 0b01110000; break;
161 case 16: PORTB = (PORTB & ~0b01111111) | 0b01100000; break;
162 case 17: PORTB = (PORTB & ~0b01111111) | 0b01101000; break;
163 }
164}
diff --git a/keyboards/kitten_paw/readme.md b/keyboards/kitten_paw/readme.md
new file mode 100644
index 000000000..a6ef2a067
--- /dev/null
+++ b/keyboards/kitten_paw/readme.md
@@ -0,0 +1,32 @@
1kitten_paw keyboard firmware
2======================
3This is the firmware for the 2016 revision of the Kitten Paw controller by Bathroom Epiphanies.
4Most of the boilerplate code is the work of [BathroomEpiphanies](https://github.com/BathroomEpiphanies).
5
6NKRO doesn't work at the moment, I don't know if I will take the time to find out how to fix this, so far 6KRO is enough for me.
7
8## Quantum MK Firmware
9
10For the full Quantum feature list, see [the parent readme.md](/doc/readme.md).
11
12## Building
13
14Download or clone the whole firmware and navigate to the keyboards/kitten_paw folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.
15
16Depending on which keymap you would like to use, you will have to compile slightly differently.
17
18### Default
19
20To build with the default keymap, simply run `make`.
21
22### Other Keymaps
23
24Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files.
25
26To build the firmware binary hex file with a keymap just do `make` with `keymap` option like:
27
28```
29$ make keymap=[default|jack|<name>]
30```
31
32Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/`
diff --git a/keyboards/readme.md b/keyboards/readme.md
index f6c90b1f6..4f1796219 100644
--- a/keyboards/readme.md
+++ b/keyboards/readme.md
@@ -39,6 +39,7 @@ These keyboards are part of the QMK repository, but their manufacturers are not
39* [hhkb](/keyboards/hhkb) &mdash; The Happy Hacking keyboard can be hacked with a custom controller to run QMK. 39* [hhkb](/keyboards/hhkb) &mdash; The Happy Hacking keyboard can be hacked with a custom controller to run QMK.
40* [jd45](/keyboards/jd45) &mdash; Another Geekhack community project, designed by jdcarpe. 40* [jd45](/keyboards/jd45) &mdash; Another Geekhack community project, designed by jdcarpe.
41* [kc60](/keyboards/kc60) &mdash; A programmable Chinese-made keyboard, lost in the mists of time. 41* [kc60](/keyboards/kc60) &mdash; A programmable Chinese-made keyboard, lost in the mists of time.
42* [kitten_paw](/keyboards/kitten_paw) &mdash; A replacement controller (2016 revision) for the Filco Majestouch by [Bathroom Epiphanies](https://github.com/BathroomEpiphanies)
42* [phantom](/keyboards/phantom) &mdash; A tenkeyless kit by Teel, also from Geekhack. 43* [phantom](/keyboards/phantom) &mdash; A tenkeyless kit by Teel, also from Geekhack.
43* [retro_refit](/keyboards/retro_refit) &mdash; Another creation by IBNobody. 44* [retro_refit](/keyboards/retro_refit) &mdash; Another creation by IBNobody.
44* [satan](/keyboards/satan) &mdash; A GH60 variant. 45* [satan](/keyboards/satan) &mdash; A GH60 variant.
diff --git a/keyboards/tv44/keymaps/default/keymap.c b/keyboards/tv44/keymaps/default/keymap.c
index 6a4fef3da..f3f989f2d 100644
--- a/keyboards/tv44/keymaps/default/keymap.c
+++ b/keyboards/tv44/keymaps/default/keymap.c
@@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
34 {KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) } 34 {KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) }
35 }, 35 },
36 [_DV] = { /* Dvorak */ 36 [_DV] = { /* Dvorak */
37 {KC_TAB, KC_COMM, KC_DOT, KC_SLSH, KC_Q, KC_Q, KC_Q, KC_Q, KC_Q, KC_Q, KC_Q, KC_BSPC }, 37 {KC_TAB, KC_SLSH, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC },
38 {MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, MO(_L1) }, 38 {MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, MO(_L1) },
39 {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_L2) }, 39 {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_L2) },
40 {KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) } 40 {KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) }
diff --git a/keyboards/tv44/tv44.h b/keyboards/tv44/tv44.h
index 4c30174ac..65c0b4593 100644
--- a/keyboards/tv44/tv44.h
+++ b/keyboards/tv44/tv44.h
@@ -11,7 +11,7 @@
11 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ 11 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
12 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ 12 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
13 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ 13 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
14 K30, K31, K32, K33, K37, K38, K39, K3B \ 14 K30, K31, K32, K33, K37, K38, K39, K3A, K3B \
15) \ 15) \
16{ \ 16{ \
17 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ 17 { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \