[Keyboard] Add support for Southpaw Extended 65% (#8465)

* Add support for Southpaw Extended 65%

* Update keyboards/switchplate/southpaw_65/readme.md

* Update keyboards/switchplate/southpaw_65/readme.md

* Update keyboards/switchplate/southpaw_65/readme.md

* Update keyboards/switchplate/southpaw_65/southpaw_65.c

* Update keyboards/switchplate/southpaw_65/rules.mk

* Cleaned up keymaps
-Removed default2 keymap
-Removed default_iso2 keymap
-Rename default keymap directory to default_ansi to reflect correct keymap name

* Update readme.md for default_ansi keymap directory change

* Add layout_all for configurator and correct maximum number of keys supported in readme.md

* Update keyboards/switchplate/southpaw_65/info.json

Forgot to change name to LAYOUT_all

* Update keyboards/switchplate/southpaw_65/info.json

* Update keyboards/switchplate/southpaw_65/readme.md

* Update keyboards/switchplate/southpaw_65/rules.mk

* Add LAYOUT_all keymap

* Update keyboards/switchplate/southpaw_65/keymaps/default/keymap.c

* Update keyboards/switchplate/southpaw_65/info.json
This commit is contained in:
horza21 2020-03-24 06:26:22 +08:00 committed by GitHub
parent b936048b0b
commit b779078c60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 753 additions and 0 deletions

View File

@ -0,0 +1,239 @@
/* Copyright 2019
*
* 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 0xFEED
#define PRODUCT_ID 0x4084
#define DEVICE_VER 0x0001
#define MANUFACTURER Switchplate Peripherals
#define PRODUCT Southpaw Extended 65%
#define DESCRIPTION A Left Hand Number Pad 65% Keyboard
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 19
/*
* 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 { D0, D5 }
//#define MATRIX_COL_PINS { F1, F0, B0 }
//#define UNUSED_PINS
/* COL2ROW, ROW2COL */
//#define DIODE_DIRECTION COL2ROW
#define BACKLIGHT_PIN B5
#define BACKLIGHT_LEVELS 10
// #define BACKLIGHT_BREATHING
#define RGB_DI_PIN C7
#define RGBLED_NUM 9
#define RGBLIGHT_ANIMATIONS
// #ifdef RGB_DI_PIN
// #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
// #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
/* number of backlight levels */
/* 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 userful 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
/*
* Magic Key Options
*
* Magic keys are hotkey commands that allow control over firmware functions of
* the keyboard. They are best used in combination with the HID Listen program,
* found here: https://www.pjrc.com/teensy/hid_listen.html
*
* The options below allow the magic key functionality to be changed. This is
* useful if your keyboard/keypad is missing keys and you want magic key support.
*
*/
/* key combination for magic key command */
/* defined by default; to change, uncomment and set to the combination you want */
// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
/* control how magic key switches layers */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
/* override magic key keymap */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
//#define MAGIC_KEY_HELP1 H
//#define MAGIC_KEY_HELP2 SLASH
//#define MAGIC_KEY_DEBUG D
//#define MAGIC_KEY_DEBUG_MATRIX X
//#define MAGIC_KEY_DEBUG_KBD K
//#define MAGIC_KEY_DEBUG_MOUSE M
//#define MAGIC_KEY_VERSION V
//#define MAGIC_KEY_STATUS S
//#define MAGIC_KEY_CONSOLE C
//#define MAGIC_KEY_LAYER0_ALT1 ESC
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
//#define MAGIC_KEY_LAYER0 0
//#define MAGIC_KEY_LAYER1 1
//#define MAGIC_KEY_LAYER2 2
//#define MAGIC_KEY_LAYER3 3
//#define MAGIC_KEY_LAYER4 4
//#define MAGIC_KEY_LAYER5 5
//#define MAGIC_KEY_LAYER6 6
//#define MAGIC_KEY_LAYER7 7
//#define MAGIC_KEY_LAYER8 8
//#define MAGIC_KEY_LAYER9 9
//#define MAGIC_KEY_BOOTLOADER PAUSE
//#define MAGIC_KEY_LOCK CAPS
//#define MAGIC_KEY_EEPROM E
//#define MAGIC_KEY_NKRO N
//#define MAGIC_KEY_SLEEP_LED Z
/*
* 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
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
/*
* MIDI options
*/
/* Prevent use of disabled MIDI features in the keymap */
//#define MIDI_ENABLE_STRICT 1
/* enable basic MIDI features:
- MIDI notes can be sent when in Music mode is on
*/
//#define MIDI_BASIC
/* enable advanced MIDI features:
- MIDI notes can be added to the keymap
- Octave shift and transpose
- Virtual sustain, portamento, and modulation wheel
- etc.
*/
//#define MIDI_ADVANCED
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 1
/*
* HD44780 LCD Display Configuration
*/
/*
#define LCD_LINES 2 //< number of visible lines of the display
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
#if LCD_IO_MODE
#define LCD_PORT PORTB //< port for the LCD lines
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
#define LCD_RS_PORT LCD_PORT //< port for RS line
#define LCD_RS_PIN 3 //< pin for RS line
#define LCD_RW_PORT LCD_PORT //< port for RW line
#define LCD_RW_PIN 2 //< pin for RW line
#define LCD_E_PORT LCD_PORT //< port for Enable line
#define LCD_E_PIN 1 //< pin for Enable line
#endif
*/
/* Bootmagic Lite key configuration */
// #define BOOTMAGIC_LITE_ROW 0
// #define BOOTMAGIC_LITE_COLUMN 0

View File

@ -0,0 +1,141 @@
# Southpaw Extended 65%
Development docs covering the following:
- Kimera core
- RGB
- Backlight
## Kimera core
![Kimera core](https://gd2.alicdn.com/imgextra/i4/159916802/TB2qsIgdrJkpuFjy1zcXXa5FFXa_!!159916802.jpg)
What little available info that was available for the qmk port
- atmega32u4 16Mhz
- board seems to have a 6Mhz crystal
- 2x PCA9555 I2C IO expander
Links:
- [Schematic, BOM, Gerbers](/kairyu/kimera/blob/master/kimera_core)
- [Original firmware](https://github.com/kairyu/tmk_keyboard_custom/tree/master/keyboard/kimera)
```c
/*
Kimera_core_v1.0 Components
U1 (atmega32u4)
,----------------.
TX --| TX0(PD3) RAW |--
RX --| RX1(PD2) GND |--
--| GND RESET |-- RST
--| GND VCC |--
SDA --| 2(PD1) (PF4)A3 |--
SCL --| 3(PD0) (PF5)A2 |--
(INT) --| 4(PD4) (PF6)A1 |--
--| 5(PC6) (PF7)A0 |--
--| 6(PD7) (PB1)15 |-- SCK
LED2 --| 7(PE6) (PB3)14 |-- MISO
LED1 --| 8(PB4) (PB2)16 |-- MOSI
LED3 --| 9(PB5) (PB6)10 |-- LED4
`----------------'
IC1 (PCA9555) IC2 (PCA9555)
,----------. ,----------.
SDA --| SDA P00 |-- P1 SDA --| SDA P00 |-- P17
SCL --| SCL P01 |-- P2 SCL --| SCL P01 |-- P18
INT --| INT P02 |-- P3 INT --| INT P02 |-- P19
| P03 |-- P4 | P03 |-- P20
GND --| A0 P04 |-- P5 VCC --| A0 P04 |-- P21
SJ1 --| A1 P05 |-- P6 SJ1 --| A1 P05 |-- P22
SJ2 --| A2 P06 |-- P7 SJ2 --| A2 P06 |-- P23
| P07 |-- P8 | P07 |-- P24
| | | |
| P10 |-- P9 | P10 |-- P25
| P11 |-- P10 | P11 |-- P26
| P12 |-- P11 | P12 |-- P27
| P13 |-- P12 | P13 |-- P28
| P14 |-- P13 | P14 |-- P29
| P15 |-- P14 | P15 |-- P30
| P16 |-- P15 | P16 |-- P31
| P17 |-- P16 | P17 |-- P32
`----------' `----------'
*/
```
### Bootloader
Default bootloader is `atmel-dfu`.
Reboot to bootloader via magnetic switch next to icsp header.
Flash using regular dfu methods.
### Southpaw Extended 65 pin mappings
Taken from [kimera-config.json](https://github.com/kairyu/tkg/blob/master/keyboard/config/kimera-config.json)
"row_mapping": [ 2, 3, 4, 5, 6 ],
"col_mapping": [ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ],
# RGB
- PIN C7
- Number of RGB LED 7
# Backlight
- PIN B5
# Capslock
- PIN B6
# Numlock
- PIN C6
## Assumptions
### Pin/Port mappings
- All cols are on the same IC
- All rows are on the same IC and port
- Pins mapped sequentially
- Each port only does row or column not a mixture of both
- No need to have complex port config
-
| ROW index | Kimera Pin | PCA9555 |
| ----------|------------|-------------------|
| 0 | 2 | IC1 Port 0 pin 1 |
| 1 | 3 | IC1 Port 0 pin 2 |
| 2 | 4 | IC1 Port 0 pin 3 |
| 3 | 5 | IC1 Port 0 pin 4 |
| 4 | 6 | IC1 Port 0 pin 5 |
- Safe enough to assume `row_index == pin`
| COL index | Kimera Pin | PCA9555 |
| ----------|------------|-------------------|
| 0 | 13 | IC1 Port 1 pin 4 |
| 1 | 14 | IC1 Port 1 pin 5 |
| 2 | 15 | IC1 Port 1 pin 6 |
| 3 | 16 | IC1 Port 1 pin 7 |
| 4 | 17 | IC2 Port 0 pin 0 |
| 5 | 18 | IC2 Port 0 pin 1 |
| 6 | 19 | IC2 Port 0 pin 2 |
| 7 | 20 | IC2 Port 0 pin 3 |
| 8 | 21 | IC2 Port 0 pin 4 |
| 9 | 22 | IC2 Port 0 pin 5 |
| 10 | 23 | IC2 Port 0 pin 6 |
| 11 | 24 | IC2 Port 0 pin 7 |
| 12 | 25 | IC2 Port 1 pin 0 |
| 13 | 26 | IC2 Port 1 pin 1 |
| 14 | 27 | IC2 Port 1 pin 2 |
| 15 | 28 | IC2 Port 1 pin 3 |
| 16 | 29 | IC2 Port 1 pin 4 |
| 17 | 30 | IC2 Port 1 pin 5 |
| 18 | 31 | IC2 Port 1 pin 6 |
- Need to read both ICs and corresponding port to compile the correct column data
- All pins are mapped sequentially
- maps to the usual practice of reading matrix columns
- Needs uint32_t to read 19 columns of data
## Notes
[pca9555 datasheet](https://www.ti.com/lit/ds/symlink/pca9555.pdf)
- Other Kimera based boards with non sequential pin mappings, pins mapped across ICs, or mixed row/col configs will need more complicated `pin -> i2c_addr,port,pin` logic as well as rather more complex pin functions.
## Return to stock firmware
To return back to stock TMK firmware, use [programming guide provided by Reconsiderit](https://geekhack.org/index.php?topic=92344.msg2625784#msg2625784)

View File

@ -0,0 +1,21 @@
{
"keyboard_name": "Southpaw Extended 65%",
"url": "https://geekhack.org/index.php?topic=92344.0",
"maintainer": "qmk",
"width": 20,
"height": 5,
"layouts": {
"LAYOUT_all": {
"key_count": 91,
"layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"Esc", "x":4, "y":0}, {"label":"!", "x":5, "y":0}, {"label":"@", "x":6, "y":0}, {"label":"#", "x":7, "y":0}, {"label":"$", "x":8, "y":0}, {"label":"%", "x":9, "y":0}, {"label":"^", "x":10, "y":0}, {"label":"&", "x":11, "y":0}, {"label":"*", "x":12, "y":0}, {"label":"(", "x":13, "y":0}, {"label":")", "x":14, "y":0}, {"label":"_", "x":15, "y":0}, {"label":"+", "x":16, "y":0}, {"label":"Backspace", "x":17, "y":0}, {"label":"Backspace", "x":18, "y":0}, {"label":"Home", "x":19, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"+", "x":3, "y":1}, {"label":"Tab", "x":4, "y":1, "w":1.5}, {"label":"Q", "x":5.5, "y":1}, {"label":"W", "x":6.5, "y":1}, {"label":"E", "x":7.5, "y":1}, {"label":"R", "x":8.5, "y":1}, {"label":"T", "x":9.5, "y":1}, {"label":"Y", "x":10.5, "y":1}, {"label":"U", "x":11.5, "y":1}, {"label":"I", "x":12.5, "y":1}, {"label":"O", "x":13.5, "y":1}, {"label":"P", "x":14.5, "y":1}, {"label":"{", "x":15.5, "y":1}, {"label":"}", "x":16.5, "y":1}, {"label":"|", "x":17.5, "y":1, "w":1.5}, {"label":"End", "x":19, "y":1}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"+", "x":3, "y":2}, {"label":"Caps Lock", "x":4, "y":2, "w":1.75}, {"label":"A", "x":5.75, "y":2}, {"label":"S", "x":6.75, "y":2}, {"label":"D", "x":7.75, "y":2}, {"label":"F", "x":8.75, "y":2}, {"label":"G", "x":9.75, "y":2}, {"label":"H", "x":10.75, "y":2}, {"label":"J", "x":11.75, "y":2}, {"label":"K", "x":12.75, "y":2}, {"label":"L", "x":13.75, "y":2}, {"label":":", "x":14.75, "y":2}, {"label":"\"", "x":15.75, "y":2}, {"label":"~", "x":16.75, "y":2}, {"label":"Enter", "x":17.75, "y":2, "w":1.25}, {"label":"Page Up", "x":19, "y":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"Num Enter", "x":3, "y":3}, {"label":"LShift", "x":4, "y":3, "w":1.25}, {"label":"|", "x":5.25, "y":3}, {"label":"Z", "x":6.25, "y":3}, {"label":"X", "x":7.25, "y":3}, {"label":"C", "x":8.25, "y":3}, {"label":"V", "x":9.25, "y":3}, {"label":"B", "x":10.25, "y":3}, {"label":"N", "x":11.25, "y":3}, {"label":"M", "x":12.25, "y":3}, {"label":"<", "x":13.25, "y":3}, {"label":">", "x":14.25, "y":3}, {"label":"?", "x":15.25, "y":3}, {"label":"RShift", "x":16.25, "y":3, "w":1.75}, {"label":"Up", "x":18, "y":3}, {"label":"Page Down", "x":19, "y":3}, {"label":"0", "x":0, "y":4}, {"label":"0", "x":1, "y":4}, {"label":".", "x":2, "y":4}, {"label":"Num Enter", "x":3, "y":4}, {"label":"LCtrl", "x":4, "y":4, "w":1.25}, {"label":"Win", "x":5.25, "y":4, "w":1.25}, {"label":"LAlt", "x":6.5, "y":4, "w":1.25}, {"label":"Space", "x":7.75, "y":4, "w":6.25}, {"label":"RAlt", "x":14, "y":4}, {"label":"RCtrl", "x":15, "y":4}, {"label":"Fn0", "x":16, "y":4}, {"label":"Left", "x":17, "y":4}, {"label":"Down", "x":18, "y":4}, {"label":"Right", "x":19, "y":4}]
},
"LAYOUT_ansi": {
"key_count": 85,
"layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"Esc", "x":4, "y":0}, {"label":"!", "x":5, "y":0}, {"label":"@", "x":6, "y":0}, {"label":"#", "x":7, "y":0}, {"label":"$", "x":8, "y":0}, {"label":"%", "x":9, "y":0}, {"label":"^", "x":10, "y":0}, {"label":"&", "x":11, "y":0}, {"label":"*", "x":12, "y":0}, {"label":"(", "x":13, "y":0}, {"label":")", "x":14, "y":0}, {"label":"_", "x":15, "y":0}, {"label":"+", "x":16, "y":0}, {"label":"Backspace", "x":17, "y":0, "w":2}, {"label":"Home", "x":19, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"+", "x":3, "y":1, "h":2}, {"label":"Tab", "x":4, "y":1, "w":1.5}, {"label":"Q", "x":5.5, "y":1}, {"label":"W", "x":6.5, "y":1}, {"label":"E", "x":7.5, "y":1}, {"label":"R", "x":8.5, "y":1}, {"label":"T", "x":9.5, "y":1}, {"label":"Y", "x":10.5, "y":1}, {"label":"U", "x":11.5, "y":1}, {"label":"I", "x":12.5, "y":1}, {"label":"O", "x":13.5, "y":1}, {"label":"P", "x":14.5, "y":1}, {"label":"{", "x":15.5, "y":1}, {"label":"}", "x":16.5, "y":1}, {"label":"|", "x":17.5, "y":1, "w":1.5}, {"label":"End", "x":19, "y":1}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"Caps Lock", "x":4, "y":2, "w":1.75}, {"label":"A", "x":5.75, "y":2}, {"label":"S", "x":6.75, "y":2}, {"label":"D", "x":7.75, "y":2}, {"label":"F", "x":8.75, "y":2}, {"label":"G", "x":9.75, "y":2}, {"label":"H", "x":10.75, "y":2}, {"label":"J", "x":11.75, "y":2}, {"label":"K", "x":12.75, "y":2}, {"label":"L", "x":13.75, "y":2}, {"label":":", "x":14.75, "y":2}, {"label":"\"", "x":15.75, "y":2}, {"label":"Enter", "x":16.75, "y":2, "w":2.25}, {"label":"Page Up", "x":19, "y":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"Num Enter", "x":3, "y":3, "h":2}, {"label":"LShift", "x":4, "y":3, "w":2.25}, {"label":"Z", "x":6.25, "y":3}, {"label":"X", "x":7.25, "y":3}, {"label":"C", "x":8.25, "y":3}, {"label":"V", "x":9.25, "y":3}, {"label":"B", "x":10.25, "y":3}, {"label":"N", "x":11.25, "y":3}, {"label":"M", "x":12.25, "y":3}, {"label":"<", "x":13.25, "y":3}, {"label":">", "x":14.25, "y":3}, {"label":"?", "x":15.25, "y":3}, {"label":"RShift", "x":16.25, "y":3, "w":1.75}, {"label":"Up", "x":18, "y":3}, {"label":"Page Down", "x":19, "y":3}, {"label":"0", "x":0, "y":4, "w":2}, {"label":".", "x":2, "y":4}, {"label":"LCtrl", "x":4, "y":4, "w":1.25}, {"label":"Win", "x":5.25, "y":4, "w":1.25}, {"label":"LAlt", "x":6.5, "y":4, "w":1.25}, {"label":"Space", "x":7.75, "y":4, "w":6.25}, {"label":"RAlt", "x":14, "y":4}, {"label":"RCtrl", "x":15, "y":4}, {"label":"Fn0", "x":16, "y":4}, {"label":"Left", "x":17, "y":4}, {"label":"Down", "x":18, "y":4}, {"label":"Right", "x":19, "y":4}]
},
"LAYOUT_iso": {
"key_count": 86,
"layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"Esc", "x":4, "y":0}, {"label":"!", "x":5, "y":0}, {"label":"@", "x":6, "y":0}, {"label":"#", "x":7, "y":0}, {"label":"$", "x":8, "y":0}, {"label":"%", "x":9, "y":0}, {"label":"^", "x":10, "y":0}, {"label":"&", "x":11, "y":0}, {"label":"*", "x":12, "y":0}, {"label":"(", "x":13, "y":0}, {"label":")", "x":14, "y":0}, {"label":"_", "x":15, "y":0}, {"label":"+", "x":16, "y":0}, {"label":"Backspace", "x":17, "y":0, "w":2}, {"label":"Home", "x":19, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"+", "x":3, "y":1, "h":2}, {"label":"Tab", "x":4, "y":1, "w":1.5}, {"label":"Q", "x":5.5, "y":1}, {"label":"W", "x":6.5, "y":1}, {"label":"E", "x":7.5, "y":1}, {"label":"R", "x":8.5, "y":1}, {"label":"T", "x":9.5, "y":1}, {"label":"Y", "x":10.5, "y":1}, {"label":"U", "x":11.5, "y":1}, {"label":"I", "x":12.5, "y":1}, {"label":"O", "x":13.5, "y":1}, {"label":"P", "x":14.5, "y":1}, {"label":"{", "x":15.5, "y":1}, {"label":"}", "x":16.5, "y":1}, {"label":"End", "x":19, "y":1}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"Caps Lock", "x":4, "y":2, "w":1.75}, {"label":"A", "x":5.75, "y":2}, {"label":"S", "x":6.75, "y":2}, {"label":"D", "x":7.75, "y":2}, {"label":"F", "x":8.75, "y":2}, {"label":"G", "x":9.75, "y":2}, {"label":"H", "x":10.75, "y":2}, {"label":"J", "x":11.75, "y":2}, {"label":"K", "x":12.75, "y":2}, {"label":"L", "x":13.75, "y":2}, {"label":":", "x":14.75, "y":2}, {"label":"\"", "x":15.75, "y":2}, {"label":"~", "x":16.75, "y":2}, {"label":"Enter", "x":17.75, "y":1, "w":1.25, "h":2}, {"label":"Page Up", "x":19, "y":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"Num Enter", "x":3, "y":3, "h":2}, {"label":"LShift", "x":4, "y":3, "w":1.25}, {"label":"|", "x":5.25, "y":3}, {"label":"Z", "x":6.25, "y":3}, {"label":"X", "x":7.25, "y":3}, {"label":"C", "x":8.25, "y":3}, {"label":"V", "x":9.25, "y":3}, {"label":"B", "x":10.25, "y":3}, {"label":"N", "x":11.25, "y":3}, {"label":"M", "x":12.25, "y":3}, {"label":"<", "x":13.25, "y":3}, {"label":">", "x":14.25, "y":3}, {"label":"?", "x":15.25, "y":3}, {"label":"RShift", "x":16.25, "y":3, "w":1.75}, {"label":"Up", "x":18, "y":3}, {"label":"Page Down", "x":19, "y":3}, {"label":"0", "x":0, "y":4, "w":2}, {"label":".", "x":2, "y":4}, {"label":"LCtrl", "x":4, "y":4, "w":1.25}, {"label":"Win", "x":5.25, "y":4, "w":1.25}, {"label":"LAlt", "x":6.5, "y":4, "w":1.25}, {"label":"Space", "x":7.75, "y":4, "w":6.25}, {"label":"RAlt", "x":14, "y":4}, {"label":"RCtrl", "x":15, "y":4}, {"label":"Fn0", "x":16, "y":4}, {"label":"Left", "x":17, "y":4}, {"label":"Down", "x":18, "y":4}, {"label":"Right", "x":19, "y":4}]
}
}
}

View File

@ -0,0 +1,31 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all(
/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_ESC, 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_BSPC, KC_HOME,
/* ├─────────┼─────────┼─────────┼─────────┼─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴─────────┼─────────┤ */
KC_P7, KC_P8, KC_P9, KC_PPLS, 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_END,
/* ├─────────┼─────────┼─────────┼─────────┼──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬───────────┼─────────┤ */
KC_P4, KC_P5, KC_P6, KC_PPLS, 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_NUHS, KC_ENT, KC_PGUP,
/* ├─────────┼─────────┼─────────┼─────────┼───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┤ */
KC_P1, KC_P2, KC_P3, KC_PENT, 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_PGDN,
/* ├─────────┼─────────┼─────────┼─────────┼───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */
KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
/* └─────────┴─────────┴─────────┴─────────┴───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */
),
[1] = LAYOUT_all(
/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */
_______, _______, _______, _______, KC_GRV, 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_DEL, KC_DEL, KC_INS,
/* ├─────────┼─────────┼─────────┼─────────┼─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴─────────┼─────────┤ */
_______, _______, _______, _______, RESET, BL_TOGG, BL_INC, BL_DEC, BL_BRTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
/* ├─────────┼─────────┼─────────┼─────────┼──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬───────────┼─────────┤ */
_______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, EEP_RST, _______,
/* ├─────────┼─────────┼─────────┼─────────┼───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┤ */
_______, _______, _______, _______, KC_LSFT, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, _______, _______, KC_RSFT, _______, _______,
/* ├─────────┼─────────┼─────────┼─────────┼───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */
_______, _______, _______, _______, KC_LCTL, _______, KC_LALT, _______, KC_RALT, KC_RCTL, KC_TRNS, _______, _______, _______
/* └─────────┴─────────┴─────────┴─────────┴───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */
),
};

View File

@ -0,0 +1,31 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ansi(
/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_ESC, 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_HOME,
/* ├─────────┼─────────┼─────────┼─────────┼─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */
KC_P7, KC_P8, KC_P9, KC_PPLS, 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_END,
/* ├─────────┼─────────┼─────────┤ ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──────────────├─────────┤ */
KC_P4, KC_P5, KC_P6, 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_PGUP,
/* ├─────────┼─────────┼─────────┼─────────┼─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┤ */
KC_P1, KC_P2, KC_P3, KC_PENT, KC_LSFT, 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_PGDN,
/* ├─────────┴─────────┬─────────┤ ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */
KC_P0, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
/* └───────────────────┴─────────┴─────────┴───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */
),
[1] = LAYOUT_ansi(
/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */
_______, _______, _______, _______, KC_GRV, 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_DEL, KC_INS,
/* ├─────────┼─────────┼─────────┼─────────┼─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */
_______, _______, _______, _______, RESET, BL_TOGG, BL_INC, BL_DEC, BL_BRTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
/* ├─────────┼─────────┼─────────┤ ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──────────────├─────────┤ */
_______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, _______, EEP_RST, _______,
/* ├─────────┼─────────┼─────────┼─────────┼─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┤ */
_______, _______, _______, _______, KC_LSFT, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, _______, _______, KC_RSFT, _______, _______,
/* ├─────────┴─────────┬─────────┤ ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */
_______, _______, KC_LCTL, _______, KC_LALT, _______, KC_RALT, KC_RCTL, KC_TRNS, _______, _______, _______
/* └───────────────────┴─────────┴─────────┴───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */
),
};

View File

@ -0,0 +1,32 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_iso(
/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬───────────────────┬─────────┐ */
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_ESC, 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_HOME,
/* ├─────────┼─────────┼─────────┼─────────┼─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */
KC_P7, KC_P8, KC_P9, KC_PPLS, 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_PGUP,
/* ├─────────┼─────────┼─────────┤ ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ├─────────┤ */
KC_P4, KC_P5, KC_P6, 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_NUHS, KC_ENT, KC_PGDN,
/* ├─────────┼─────────┼─────────┼─────────┼───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┤ */
KC_P1, KC_P2, KC_P3, KC_PENT, 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_END,
/* ├─────────┴─────────┼─────────┤ ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */
KC_P0, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
/* └───────────────────┴─────────┴─────────┴───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */
),
[1] = LAYOUT_iso(
/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬───────────────────┬─────────┐ */
_______, _______, _______, _______, KC_GRV, 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_DEL, KC_INS,
/* ├─────────┼─────────┼─────────┼─────────┼─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */
_______, _______, _______, _______, RESET, BL_TOGG, BL_INC, BL_DEC, BL_BRTG, _______, _______, _______, _______, _______, _______, _______, _______, _______,
/* ├─────────┼─────────┼─────────┤ ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ├─────────┤ */
_______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, EEP_RST, _______,
/* ├─────────┼─────────┼─────────┼─────────┼───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┤ */
_______, _______, _______, _______, KC_LSFT, _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, _______, _______, _______, _______, _______, KC_RSFT, _______, _______,
/* ├─────────┴─────────┼─────────┤ ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */
_______, _______, KC_LCTL, _______, KC_LALT, _______, KC_RALT, KC_RCTL, KC_TRNS, _______, _______, _______
/* └───────────────────┴─────────┴─────────┴───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */
)
};

View File

@ -0,0 +1,95 @@
/* Copyright 2019
*
* 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 <stdint.h>
#include <stdbool.h>
#include <avr/io.h>
#include <string.h>
#include "matrix.h"
#include "pca9555.h"
#include "quantum.h"
#include "debug.h"
// PCA9555 slave addresses
#define IC1 0x20
#define IC2 0x21
//_____Utility funcs___________________________________________________________
static void init_pins(void) {
// init all rows - IC1 port0 input
pca9555_set_config(IC1, PCA9555_PORT0, ALL_INPUT); // same as initial state
// init all cols high - IC2 all input
pca9555_set_config(IC1, PCA9555_PORT1, ALL_INPUT); // same as initial state
pca9555_set_config(IC2, PCA9555_PORT0, ALL_INPUT); // same as initial state
pca9555_set_config(IC2, PCA9555_PORT1, ALL_INPUT); // same as initial state
pca9555_set_output(IC1, PCA9555_PORT0, ALL_LOW);
}
static void select_row(uint8_t row) {
// For the Southpaw Ext 65% pins 1-6 are used for the rows
uint8_t pin = row;
uint8_t mask = 2 << pin;
pca9555_set_config(IC1, PCA9555_PORT0, ALL_INPUT & (~mask));
}
static uint32_t read_cols(void) {
//Read column inputs. Pins 13-31 are used. Split across both ICs but they are sequential
uint32_t state_1 = pca9555_readPins(IC1, PCA9555_PORT1);
uint32_t state_2 = pca9555_readPins(IC2, PCA9555_PORT0);
uint32_t state_3 = pca9555_readPins(IC2, PCA9555_PORT1);
uint32_t state = (((state_3 & 0b01111111) << 12) | (state_2 << 4) | ((state_1 & 0b11110000) >> 4));
return ~state;
}
static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
// Store last value of row prior to reading
matrix_row_t last_row_value = current_matrix[current_row];
// Clear data in matrix row
current_matrix[current_row] = 0;
// Select row and wait for row selection to stabilize
select_row(current_row);
// Skip the wait_us(30); as i2c is slow enough to debounce the io changes
current_matrix[current_row] = read_cols();
// No need to Unselect row as the next `select_row` will blank everything
return (last_row_value != current_matrix[current_row]);
}
//_____CUSTOM MATRIX IMPLEMENTATION____________________________________________________
void matrix_init_custom(void) {
pca9555_init(IC1);
pca9555_init(IC2);
init_pins();
}
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
bool changed = false;
for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
changed |= read_cols_on_row(current_matrix, current_row);
}
return changed;
}

View File

@ -0,0 +1,23 @@
# Southpaw Extended 65%
![Southpaw Extended 65%](https://i.imgur.com/9HSWmmll.jpg)
Left Hand Number Pad Keyboard with 85 Keys & RGB LED Underglow
- Designed by Reconsiderit
- Up to 91 keys
- iso and ansi support
- Uses Kimera core
* Keyboard Maintainer: QMK Community
* Hardware Supported: Southpaw Extended 65%
* Hardware Availability: [Geekhack GB Thread](https://geekhack.org/index.php?topic=92344.0)
Make example for this keyboard (after setting up your build environment):
make switchplate/southpaw_65:default_ansi
Install examples:
make switchplate/southpaw_65:default_ansi:flash
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).

View File

@ -0,0 +1,41 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
LTO_ENABLE = yes
# custom matrix setup
CUSTOM_MATRIX = lite
VPATH += drivers/gpio
SRC += pca9555.c matrix.c
QUANTUM_LIB_SRC += i2c_master.c

View File

@ -0,0 +1,30 @@
/* Copyright 2019
*
* 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 "southpaw_65.h"
void keyboard_pre_init_kb(void) {
setPinOutput(B6);
keyboard_pre_init_user();
}
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
writePin(B6, !led_state.caps_lock);
}
return res;
}

View File

@ -0,0 +1,69 @@
/* Copyright 2019
*
* 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"
#define ____ KC_NO
/* This a shortcut to help you visually see your layout.
*
* The first section contains all of the arguments representing the physical
* layout of the board and position of the keys.
*
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
#define LAYOUT_all( \
K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K514, K119, \
K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, \
K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, K319, \
K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, K418, K419, \
K501, K502, K503, K504, K505, K506, K507, K510, K515, K516, K513, K517, K518, K519 \
) { \
{ K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119 }, \
{ K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219 }, \
{ K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, K319 }, \
{ K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, K418, K419 }, \
{ K501, K502, K503, K504, K505, K506, K507, ____, ____, K510, ____, ____, K513, K514, K515, K516, K517, K518, K519 } \
}
#define LAYOUT_ansi( \
K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, \
K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, \
K301, K302, K303, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K318, K319, \
K401, K402, K403, K404, K405, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, K418, K419, \
K501, K503, K505, K506, K507, K510, K515, K516, K513, K517, K518, K519 \
) { \
{ K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119 }, \
{ K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219 }, \
{ K301, K302, K303, ____, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, ____, K318, K319 }, \
{ K401, K402, K403, K404, K405, ____, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, K418, K419 }, \
{ K501, ____, K503, ____, K505, K506, K507, ____, ____, K510, ____, ____, K513, ____, K515, K516, K517, K518, K519 } \
}
#define LAYOUT_iso( \
K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, \
K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K219, \
K301, K302, K303, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, K319, \
K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, K418, K419, \
K501, K503, K505, K506, K507, K510, K515, K516, K513, K517, K518, K519 \
) { \
{ K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119 }, \
{ K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, ____, K219 }, \
{ K301, K302, K303, ____, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, K319 }, \
{ K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, K418, K419 }, \
{ K501, ____, K503, ____, K505, K506, K507, ____, ____, K510, ____, ____, K513, ____, K515, K516, K517, K518, K519 } \
}