Browse Source

Dc01 fixes (#11843)

* dc01-fixes

* dc01-fixes

* Cleanup and add VIA

* Updated JSONs

* fix
pull/11931/head
yiancar 3 years ago
committed by GitHub
parent
commit
3fed8bced7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
47 changed files with 383 additions and 717 deletions
  1. +0
    -27
      keyboards/dc01/arrow/arrow.c
  2. +7
    -14
      keyboards/dc01/arrow/arrow.h
  3. +1
    -55
      keyboards/dc01/arrow/config.h
  4. +1
    -1
      keyboards/dc01/arrow/info.json
  5. +5
    -22
      keyboards/dc01/arrow/keymaps/default/keymap.c
  6. +23
    -15
      keyboards/dc01/arrow/keymaps/via/keymap.c
  7. +3
    -0
      keyboards/dc01/arrow/keymaps/via/readme.md
  8. +1
    -0
      keyboards/dc01/arrow/keymaps/via/rules.mk
  9. +7
    -12
      keyboards/dc01/arrow/matrix.c
  10. +1
    -1
      keyboards/dc01/arrow/rules.mk
  11. +3
    -3
      keyboards/dc01/left/config.h
  12. +5
    -2
      keyboards/dc01/left/info.json
  13. +5
    -18
      keyboards/dc01/left/keymaps/default/keymap.c
  14. +46
    -0
      keyboards/dc01/left/keymaps/via/keymap.c
  15. +11
    -0
      keyboards/dc01/left/keymaps/via/readme.md
  16. +1
    -0
      keyboards/dc01/left/keymaps/via/rules.mk
  17. +0
    -27
      keyboards/dc01/left/left.c
  18. +23
    -16
      keyboards/dc01/left/left.h
  19. +41
    -51
      keyboards/dc01/left/matrix.c
  20. +1
    -1
      keyboards/dc01/left/rules.mk
  21. +1
    -55
      keyboards/dc01/numpad/config.h
  22. +12
    -12
      keyboards/dc01/numpad/info.json
  23. +13
    -31
      keyboards/dc01/numpad/keymaps/default/keymap.c
  24. +13
    -27
      keyboards/dc01/numpad/keymaps/ortho_5x4/keymap.c
  25. +46
    -0
      keyboards/dc01/numpad/keymaps/via/keymap.c
  26. +3
    -0
      keyboards/dc01/numpad/keymaps/via/readme.md
  27. +1
    -0
      keyboards/dc01/numpad/keymaps/via/rules.mk
  28. +7
    -12
      keyboards/dc01/numpad/matrix.c
  29. +0
    -27
      keyboards/dc01/numpad/numpad.c
  30. +3
    -11
      keyboards/dc01/numpad/numpad.h
  31. +1
    -1
      keyboards/dc01/numpad/rules.mk
  32. +1
    -55
      keyboards/dc01/right/config.h
  33. +6
    -12
      keyboards/dc01/right/info.json
  34. +12
    -18
      keyboards/dc01/right/keymaps/default/keymap.c
  35. +1
    -1
      keyboards/dc01/right/keymaps/default/readme.md
  36. +0
    -46
      keyboards/dc01/right/keymaps/hhkb_ansi/keymap.c
  37. +0
    -3
      keyboards/dc01/right/keymaps/hhkb_ansi/readme.md
  38. +0
    -46
      keyboards/dc01/right/keymaps/hhkb_iso/keymap.c
  39. +0
    -3
      keyboards/dc01/right/keymaps/hhkb_iso/readme.md
  40. +0
    -3
      keyboards/dc01/right/keymaps/iso/readme.md
  41. +46
    -0
      keyboards/dc01/right/keymaps/via/keymap.c
  42. +11
    -0
      keyboards/dc01/right/keymaps/via/readme.md
  43. +1
    -0
      keyboards/dc01/right/keymaps/via/rules.mk
  44. +8
    -12
      keyboards/dc01/right/matrix.c
  45. +0
    -27
      keyboards/dc01/right/right.c
  46. +11
    -49
      keyboards/dc01/right/right.h
  47. +1
    -1
      keyboards/dc01/right/rules.mk

+ 0
- 27
keyboards/dc01/arrow/arrow.c View File

@ -14,30 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "arrow.h"
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
led_set_user(usb_led);
}

+ 7
- 14
keyboards/dc01/arrow/arrow.h View File

@ -13,29 +13,22 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ARROW_H
#define ARROW_H
#pragma once
#include "quantum.h"
#define XXX KC_NO
// This a shortcut to help you visually see your layout.
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
#define LAYOUT_all( \
K00, K01, K02, \
K10, K11, K12, \
\
K31, \
K40, K41, K42 \
) \
{ \
K00, K01, K02, \
K10, K11, K12, \
\
K31, \
K40, K41, K42 \
) { \
{ K00, K01, K02 }, \
{ K10, K11, K12 }, \
{ XXX, XXX, XXX }, \
{ XXX, K31, XXX }, \
{ K40, K41, K42 } \
}
#endif

+ 1
- 55
keyboards/dc01/arrow/config.h View File

@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define VENDOR_ID 0x8968
#define PRODUCT_ID 0x1012
#define DEVICE_VER 0x0001
#define MANUFACTURER Mechboards
@ -47,10 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
@ -89,53 +85,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
//#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.
*
*/
/*
* 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
*/
/* 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

+ 1
- 1
keyboards/dc01/arrow/info.json View File

@ -1,7 +1,7 @@
{
"keyboard_name": "DC01 Arrow Cluster",
"url": "",
"maintainer": "qmk",
"maintainer": "Yiancar-Designs",
"width": 3,
"height": 5,
"layouts": {


+ 5
- 22
keyboards/dc01/arrow/keymaps/default/keymap.c View File

@ -17,26 +17,9 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all( /* Base */
KC_INS, KC_HOME, KC_PGUP, \
KC_DEL, KC_END, KC_PGDN, \
\
KC_UP, \
KC_LEFT, KC_DOWN, KC_RIGHT \
),
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
KC_INS, KC_HOME, KC_PGUP,
KC_DEL, KC_END, KC_PGDN,
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void led_set_user(uint8_t usb_led) {
}
KC_UP,
KC_LEFT, KC_DOWN, KC_RIGHT)
};

keyboards/dc01/right/keymaps/iso/keymap.c → keyboards/dc01/arrow/keymaps/via/keymap.c View File

@ -16,23 +16,31 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_iso( /* Base */
KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, \
KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NUHS,KC_ENT, \
KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \
KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL \
),
};
[0] = LAYOUT_all( /* Base */
KC_INS, KC_HOME, KC_PGUP,
KC_DEL, KC_END, KC_PGDN,
KC_UP,
KC_LEFT, KC_DOWN, KC_RIGHT),
void matrix_init_user(void) {
[1] = LAYOUT_all( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
}
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS),
void matrix_scan_user(void) {
[2] = LAYOUT_all( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
}
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS),
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
[3] = LAYOUT_all( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS)
};

+ 3
- 0
keyboards/dc01/arrow/keymaps/via/readme.md View File

@ -0,0 +1,3 @@
# The default VIA keymap for DC01 Arrow cluster
When using the arrow module individually, this keymap will take effect. When using the keyboard as a whole please edit the keymap of the left module.

+ 1
- 0
keyboards/dc01/arrow/keymaps/via/rules.mk View File

@ -0,0 +1 @@
VIA_ENABLE = yes

+ 7
- 12
keyboards/dc01/arrow/matrix.c View File

@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "i2c_slave.h"
#include "lufa.h"
#define SLAVE_I2C_ADDRESS 0x23
#define SLAVE_I2C_ADDRESS 0x40
/* Set 0 if debouncing isn't needed */
@ -196,12 +196,10 @@ uint8_t matrix_scan(void)
}
# endif
if (USB_DeviceState != DEVICE_STATE_Configured){
i2c_slave_reg[1] = 0x55;
for (uint8_t i = 0; i < MATRIX_ROWS; i++){
i2c_slave_reg[i+2] = matrix[i]; //send matrix over i2c
}
}
i2c_slave_reg[1] = 0x55;
for (uint8_t i = 0; i < MATRIX_ROWS; i++){
i2c_slave_reg[i+2] = matrix[i]; //send matrix over i2c
}
matrix_scan_quantum();
return 1;
@ -396,9 +394,6 @@ static void unselect_cols(void)
//this replases tmk code
void matrix_setup(void){
if (USB_DeviceState != DEVICE_STATE_Configured){
i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c
sei(); //enable interupts
}
i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c
sei(); //enable interupts
}

+ 1
- 1
keyboards/dc01/arrow/rules.mk View File

@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug


+ 3
- 3
keyboards/dc01/left/config.h View File

@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define VENDOR_ID 0x8968
#define PRODUCT_ID 0x1010
#define DEVICE_VER 0x0001
#define MANUFACTURER Mechboards
@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { F4, F1, F0, F7, F6, F5 }
#define UNUSED_PINS
#define F_SCL 300000UL
#define F_SCL 350000UL
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
@ -141,4 +141,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define MIDI_ADVANCED
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 1
//#define MIDI_TONE_KEYCODE_OCTAVES 1

+ 5
- 2
keyboards/dc01/left/info.json View File

@ -1,12 +1,15 @@
{
"keyboard_name": "DC01 Left Half",
"url": "",
"maintainer": "qmk",
"maintainer": "Yiancar-Designs",
"width": 22.5,
"height": 5,
"layouts": {
"LAYOUT_ansi": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Insert", "x":15.25, "y":0}, {"label":"Home", "x":16.25, "y":0}, {"label":"PgUp", "x":17.25, "y":0}, {"label":"Num Lock", "x":18.5, "y":0}, {"label":"/", "x":19.5, "y":0}, {"label":"*", "x":20.5, "y":0}, {"label":"-", "x":21.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.25, "y":1}, {"label":"End", "x":16.25, "y":1}, {"label":"PgDn", "x":17.25, "y":1}, {"label":"7", "x":18.5, "y":1}, {"label":"8", "x":19.5, "y":1}, {"label":"9", "x":20.5, "y":1}, {"label":"+", "x":21.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"4", "x":18.5, "y":2}, {"label":"5", "x":19.5, "y":2}, {"label":"6", "x":20.5, "y":2}, {"label":"KC_NO", "x":21.5, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"\u2191", "x":16.25, "y":3}, {"label":"1", "x":18.5, "y":3}, {"label":"2", "x":19.5, "y":3}, {"label":"3", "x":20.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"GUI", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"GUI", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}, {"label":"\u2190", "x":15.25, "y":4}, {"label":"\u2193", "x":16.25, "y":4}, {"label":"\u2192", "x":17.25, "y":4}, {"label":"0", "x":18.5, "y":4}, {"label":"KC_NO", "x":19.5, "y":4}, {"label":".", "x":20.5, "y":4}, {"label":"Enter", "x":21.5, "y":3, "h":2}]
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "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":"Back", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Insert", "x":15.25, "y":0}, {"label":"Home", "x":16.25, "y":0}, {"label":"PgUp", "x":17.25, "y":0}, {"label":"Num Lock", "x":18.5, "y":0}, {"label":"/", "x":19.5, "y":0}, {"label":"*", "x":20.5, "y":0}, {"label":"-", "x":21.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.25, "y":1}, {"label":"End", "x":16.25, "y":1}, {"label":"PgDn", "x":17.25, "y":1}, {"label":"7", "x":18.5, "y":1}, {"label":"8", "x":19.5, "y":1}, {"label":"9", "x":20.5, "y":1}, {"label":"+", "x":21.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"4", "x":18.5, "y":2}, {"label":"5", "x":19.5, "y":2}, {"label":"6", "x":20.5, "y":2}, {"label":"+", "x":21.5, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Shift", "x":14, "y":3}, {"label":"\u2191", "x":16.25, "y":3}, {"label":"1", "x":18.5, "y":3}, {"label":"2", "x":19.5, "y":3}, {"label":"3", "x":20.5, "y":3}, {"label":"Enter", "x":21.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"label":"Fn", "x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}, {"label":"\u2190", "x":15.25, "y":4}, {"label":"\u2193", "x":16.25, "y":4}, {"label":"\u2192", "x":17.25, "y":4}, {"label":"0", "x":18.5, "y":4}, {"label":"00", "x":19.5, "y":4}, {"label":".", "x":20.5, "y":4}, {"label":"Enter", "x":21.5, "y":4}]
},
"LAYOUT_all": {
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "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":"Back", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Insert", "x":15.25, "y":0}, {"label":"Home", "x":16.25, "y":0}, {"label":"PgUp", "x":17.25, "y":0}, {"label":"Num Lock", "x":18.5, "y":0}, {"label":"/", "x":19.5, "y":0}, {"label":"*", "x":20.5, "y":0}, {"label":"-", "x":21.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.25, "y":1}, {"label":"End", "x":16.25, "y":1}, {"label":"PgDn", "x":17.25, "y":1}, {"label":"7", "x":18.5, "y":1}, {"label":"8", "x":19.5, "y":1}, {"label":"9", "x":20.5, "y":1}, {"label":"+", "x":21.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"4", "x":18.5, "y":2}, {"label":"5", "x":19.5, "y":2}, {"label":"6", "x":20.5, "y":2}, {"label":"+", "x":21.5, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Shift", "x":14, "y":3}, {"label":"\u2191", "x":16.25, "y":3}, {"label":"1", "x":18.5, "y":3}, {"label":"2", "x":19.5, "y":3}, {"label":"3", "x":20.5, "y":3}, {"label":"Enter", "x":21.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"label":"Fn", "x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}, {"label":"\u2190", "x":15.25, "y":4}, {"label":"\u2193", "x":16.25, "y":4}, {"label":"\u2192", "x":17.25, "y":4}, {"label":"0", "x":18.5, "y":4}, {"label":"00", "x":19.5, "y":4}, {"label":".", "x":20.5, "y":4}, {"label":"Enter", "x":21.5, "y":4}]
}
}
}

+ 5
- 18
keyboards/dc01/left/keymaps/default/keymap.c View File

@ -17,22 +17,9 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ansi( /* Base */
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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
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, \
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, KC_NO, \
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_P1, KC_P2, KC_P3, \
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_NO, KC_PDOT, KC_PENT \
),
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_DEL, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
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,
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, KC_NO,
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_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_NO,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_NO, KC_PDOT, KC_PENT)
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}

+ 46
- 0
keyboards/dc01/left/keymaps/via/keymap.c View File

@ -0,0 +1,46 @@
/* Copyright 2018 Yiancar
*
* 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 QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all( /* Base */
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_DEL, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
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,
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_P4, KC_P5, KC_P6, KC_PPLS,
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_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_P0, KC_PDOT, KC_PENT),
[1] = LAYOUT_all( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[2] = LAYOUT_all( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[3] = LAYOUT_all( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};

+ 11
- 0
keyboards/dc01/left/keymaps/via/readme.md View File

@ -0,0 +1,11 @@
# The default VIA keymap for DC01 Left
Please use this for ISO as well.
The keymap looks like a full layout keymap.
This is because the left part of the keyboard acts as the masterm coordinating all four part.
When using the keyboard to connect the other three parts, this keymap overwrites the individual keymaps of the single modules.
When using a module individually, the keymap of that module will take effect.

+ 1
- 0
keyboards/dc01/left/keymaps/via/rules.mk View File

@ -0,0 +1 @@
VIA_ENABLE = yes

+ 0
- 27
keyboards/dc01/left/left.c View File

@ -14,30 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "left.h"
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
led_set_user(usb_led);
}

+ 23
- 16
keyboards/dc01/left/left.h View File

@ -13,29 +13,36 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LEFT_H
#define LEFT_H
#pragma once
#include "quantum.h"
#define XXX KC_NO
// This a shortcut to help you visually see your layout.
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
#define LAYOUT_all( \
K00, K01, K02, K03, K04, K05, K45, K07, K08, K09, K0A, K0B, K0C, K0D, K06, K0E, K0F, K0G, K0H, K0J, K0K, K0L, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1J, K1K, K1L, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2H, K2J, K2K, K2L, \
K30, K44, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, K3F, K3H, K3J, K3K, K3L, \
K40, K41, K42, K43, K46, K47, K48, K49, K4A, K4B, K4E, K4F, K4G, K4H, K4J, K4K, K4L \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0J, K0K, K0L }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1J, K1K, K1L }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, XXX, XXX, XXX, K2H, K2J, K2K, K2L }, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, XXX, K3C, K3D, XXX, K3F, XXX, K3H, K3J, K3K, K3L }, \
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, XXX, XXX, K4E, K4F, K4G, K4H, K4J, K4K, K4L } \
}
#define LAYOUT_ansi( \
K00, K01, K02, K03, K04, K05, K45, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0J, K0K, K0L, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1J, K1K, K1L, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2H, K2J, K2K, K2L, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3D, K3F, K3H, K3J, K3K, \
K40, K41, K42, K43, K46, K47, K48, K49, K4A, K4B, K4E, K4F, K4G, K4H, K4J, K4K, K4L \
) \
{ \
{ K00, K01, K02, K03, K04, K05, XXX, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0J, K0K, K0L }, \
K00, K01, K02, K03, K04, K05, K45, K07, K08, K09, K0A, K0B, K0C, K0D, K06, K0E, K0F, K0G, K0H, K0J, K0K, K0L, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1J, K1K, K1L, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2H, K2J, K2K, K2L, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, K3F, K3H, K3J, K3K, K3L, \
K40, K41, K42, K43, K46, K47, K48, K49, K4A, K4B, K4E, K4F, K4G, K4H, K4J, K4K, K4L \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0J, K0K, K0L }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1J, K1K, K1L }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D, XXX, XXX, XXX, K2H, K2J, K2K, K2L }, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, XXX, XXX, K3D, XXX, K3F, XXX, K3H, K3J, K3K, XXX }, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, XXX, K3C, K3D, XXX, K3F, XXX, K3H, K3J, K3K, K3L }, \
{ K40, K41, K42, K43, XXX, K45, K46, K47, K48, K49, K4A, K4B, XXX, XXX, K4E, K4F, K4G, K4H, K4J, K4K, K4L } \
}
#endif

+ 41
- 51
keyboards/dc01/left/matrix.c View File

@ -31,14 +31,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "timer.h"
#include "i2c_master.h"
#define SLAVE_I2C_ADDRESS_RIGHT 0x19
#define SLAVE_I2C_ADDRESS_NUMPAD 0x21
#define SLAVE_I2C_ADDRESS_ARROW 0x23
#define SLAVE_I2C_ADDRESS_RIGHT 0x32
#define SLAVE_I2C_ADDRESS_NUMPAD 0x36
#define SLAVE_I2C_ADDRESS_ARROW 0x40
#define ERROR_DISCONNECT_COUNT 5
static uint8_t error_count_right = 0;
static uint8_t error_count_numpad = 0;
static uint8_t error_count_arrow = 0;
/* Set 0 if debouncing isn't needed */
@ -210,38 +207,23 @@ uint8_t matrix_scan(void)
}
# endif
if (i2c_transaction(SLAVE_I2C_ADDRESS_RIGHT, 0x3F, 0)){ //error has occured for main right half
error_count_right++;
if (error_count_right > ERROR_DISCONNECT_COUNT){ //disconnect half
for (uint8_t i = 0; i < MATRIX_ROWS ; i++) {
matrix[i] &= 0x3F; //mask bits to keep
}
}
}else{ //no error
error_count_right = 0;
if (i2c_transaction(SLAVE_I2C_ADDRESS_RIGHT, 0x3F, 0)) {
for (uint8_t i = 0; i < MATRIX_ROWS ; i++) {
matrix[i] &= 0x3F; //mask bits to keep
}
}
if (i2c_transaction(SLAVE_I2C_ADDRESS_ARROW, 0X3FFF, 8)){ //error has occured for arrow cluster
error_count_arrow++;
if (error_count_arrow > ERROR_DISCONNECT_COUNT){ //disconnect arrow cluster
for (uint8_t i = 0; i < MATRIX_ROWS ; i++) {
matrix[i] &= 0x3FFF; //mask bits to keep
}
}
}else{ //no error
error_count_arrow = 0;
if (i2c_transaction(SLAVE_I2C_ADDRESS_ARROW, 0X3FFF, 8)) {
for (uint8_t i = 0; i < MATRIX_ROWS ; i++) {
matrix[i] &= 0x3FFF; //mask bits to keep
}
}
if (i2c_transaction(SLAVE_I2C_ADDRESS_NUMPAD, 0x1FFFF, 11)){ //error has occured for numpad
error_count_numpad++;
if (error_count_numpad > ERROR_DISCONNECT_COUNT){ //disconnect numpad
for (uint8_t i = 0; i < MATRIX_ROWS ; i++) {
matrix[i] &= 0x1FFFF; //mask bits to keep
}
}
}else{ //no error
error_count_numpad = 0;
if (i2c_transaction(SLAVE_I2C_ADDRESS_NUMPAD, 0x1FFFF, 11)) {
for (uint8_t i = 0; i < MATRIX_ROWS ; i++) {
matrix[i] &= 0x1FFFF; //mask bits to keep
}
}
matrix_scan_quantum();
return 1;
@ -436,29 +418,37 @@ static void unselect_cols(void)
// Complete rows from other modules over i2c
i2c_status_t i2c_transaction(uint8_t address, uint32_t mask, uint8_t col_offset) {
i2c_status_t err = i2c_start((address << 1) | I2C_WRITE, 10);
i2c_write(0x01, 10); //request data in address 1
i2c_status_t status = i2c_start(address, 50);
if (status < 0) {
goto error;
}
i2c_start((address << 1) | I2C_READ, 5);
status = i2c_write(0x01, 50);
if (status < 0) {
goto error;
}
err = i2c_read_ack(10);
if (err == 0x55) { //synchronization byte
status = i2c_start(address | I2C_READ, 50);
for (uint8_t i = 0; i < MATRIX_ROWS-1 ; i++) { //assemble slave matrix in main matrix
matrix[i] &= mask; //mask bits to keep
err = i2c_read_ack(10);
matrix[i] |= ((uint32_t)err << (MATRIX_COLS_SCANNED + col_offset)); //add new bits at the end
}
//last read request must be followed by a NACK
matrix[MATRIX_ROWS - 1] &= mask; //mask bits to keep
err = i2c_read_nack(10);
matrix[MATRIX_ROWS - 1] |= ((uint32_t)err << (MATRIX_COLS_SCANNED + col_offset)); //add new bits at the end
status = i2c_read_ack(50);
if (status != 0x55) { //synchronization byte
goto error;
}
} else {
i2c_stop();
return 1;
for (uint8_t i = 0; i < MATRIX_ROWS-1 && status >= 0; i++) { //assemble slave matrix in main matrix
matrix[i] &= mask; //mask bits to keep
status = i2c_read_ack(50);
matrix[i] |= ((uint32_t)status << (MATRIX_COLS_SCANNED + col_offset)); //add new bits at the end
}
//last read request must be followed by a NACK
if (status >= 0) {
matrix[MATRIX_ROWS - 1] &= mask; //mask bits to keep
status = i2c_read_nack(50);
matrix[MATRIX_ROWS - 1] |= ((uint32_t)status << (MATRIX_COLS_SCANNED + col_offset)); //add new bits at the end
}
error:
i2c_stop();
return 0;
return (status < 0) ? status : I2C_STATUS_SUCCESS;
}

+ 1
- 1
keyboards/dc01/left/rules.mk View File

@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug


+ 1
- 55
keyboards/dc01/numpad/config.h View File

@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define VENDOR_ID 0x8968
#define PRODUCT_ID 0x1013
#define DEVICE_VER 0x0001
#define MANUFACTURER Mechboards
@ -47,10 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
@ -89,53 +85,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
//#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.
*
*/
/*
* 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
*/
/* 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

+ 12
- 12
keyboards/dc01/numpad/info.json View File

@ -1,15 +1,15 @@
{
"keyboard_name": "DC01 Numpad",
"url": "",
"maintainer": "qmk",
"width": 4,
"height": 5,
"layouts": {
"LAYOUT_numpad_5x4": {
"layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"+", "x":3, "y":1, "h":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"0", "x":0, "y":4, "w":2}, {"label":".", "x":2, "y":4}, {"label":"Enter", "x":3, "y":3, "h":2}]
},
"LAYOUT_ortho_5x4": {
"layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "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":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"+", "x":3, "y":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"Enter", "x":3, "y":3}, {"label":"0", "x":0, "y":4}, {"label":"00", "x":1, "y":4}, {"label":".", "x":2, "y":4}, {"label":"Enter", "x":3, "y":4}]
"keyboard_name": "DC01 Numpad",
"url": "",
"maintainer": "Yiancar-Designs",
"width": 4,
"height": 5,
"layouts": {
"LAYOUT_numpad_5x4": {
"layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"+", "x":3, "y":1, "h":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"0", "x":0, "y":4, "w":2}, {"label":".", "x":2, "y":4}, {"label":"Enter", "x":3, "y":3, "h":2}]
},
"LAYOUT_ortho_5x4": {
"layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "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":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"+", "x":3, "y":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"Enter", "x":3, "y":3}, {"label":"0", "x":0, "y":4}, {"label":"00", "x":1, "y":4}, {"label":".", "x":2, "y":4}, {"label":"Enter", "x":3, "y":4}]
}
}
}
}

+ 13
- 31
keyboards/dc01/numpad/keymaps/default/keymap.c View File

@ -16,35 +16,17 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_numpad_5x4(
TG(1), KC_PSLS, KC_PAST, KC_PMNS, \
KC_P7, KC_P8, KC_P9, \
KC_P4, KC_P5, KC_P6, KC_PPLS, \
KC_P1, KC_P2, KC_P3, \
KC_P0, KC_PDOT, KC_PENT \
),
[1] = LAYOUT_numpad_5x4(
_______, _______, _______, _______, \
KC_HOME, KC_UP, KC_PGUP, \
KC_LEFT, XXXXXXX, KC_RGHT, _______, \
KC_END, KC_DOWN, KC_PGDN, \
KC_INS, KC_DEL, _______ \
),
[0] = LAYOUT_numpad_5x4(
TG(1), KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9,
KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_P1, KC_P2, KC_P3,
KC_P0, KC_PDOT, KC_PENT ),
[1] = LAYOUT_numpad_5x4(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_HOME, KC_UP, KC_PGUP,
KC_LEFT, KC_NO, KC_RGHT, KC_TRNS,
KC_END, KC_DOWN, KC_PGDN,
KC_INS, KC_DEL, KC_TRNS),
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void led_set_user(uint8_t usb_led) {
}

+ 13
- 27
keyboards/dc01/numpad/keymaps/ortho_5x4/keymap.c View File

@ -20,31 +20,21 @@ enum custom_keycodes {
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_5x4(
TG(1), KC_PSLS, KC_PAST, KC_PMNS, \
KC_P7, KC_P8, KC_P9, KC_PPLS, \
KC_P4, KC_P5, KC_P6, KC_PPLS, \
KC_P1, KC_P2, KC_P3, KC_PENT, \
KC_P0, KC_P00, KC_PDOT, KC_PENT \
),
[1] = LAYOUT_ortho_5x4(
_______, _______, _______, _______, \
KC_HOME, KC_UP, KC_PGUP, _______, \
KC_LEFT, XXXXXXX, KC_RGHT, _______, \
KC_END, KC_DOWN, KC_PGDN, _______, \
KC_INS, XXXXXXX, KC_DEL, _______ \
),
[0] = LAYOUT_ortho_5x4(
TG(1), KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_P1, KC_P2, KC_P3, KC_PENT,
KC_P0, KC_P00, KC_PDOT, KC_PENT),
[1] = LAYOUT_ortho_5x4(
_______, _______, _______, _______,
KC_HOME, KC_UP, KC_PGUP, _______,
KC_LEFT, XXXXXXX, KC_RGHT, _______,
KC_END, KC_DOWN, KC_PGDN, _______,
KC_INS, XXXXXXX, KC_DEL, _______)
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
switch(keycode) {
@ -56,7 +46,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return true;
};
void led_set_user(uint8_t usb_led) {
}

+ 46
- 0
keyboards/dc01/numpad/keymaps/via/keymap.c View File

@ -0,0 +1,46 @@
/* Copyright 2018 Yiancar
*
* 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 QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_5x4( /* Base */
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_P1, KC_P2, KC_P3, KC_PENT,
KC_P0, KC_P0, KC_PDOT, KC_PENT),
[1] = LAYOUT_ortho_5x4( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[2] = LAYOUT_ortho_5x4( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[3] = LAYOUT_ortho_5x4( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};

+ 3
- 0
keyboards/dc01/numpad/keymaps/via/readme.md View File

@ -0,0 +1,3 @@
# The default VIA keymap for DC01 Arrow cluster
When using the arrow module individually, this keymap will take effect. When using the keyboard as a whole please edit the keymap of the left module.

+ 1
- 0
keyboards/dc01/numpad/keymaps/via/rules.mk View File

@ -0,0 +1 @@
VIA_ENABLE = yes

+ 7
- 12
keyboards/dc01/numpad/matrix.c View File

@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "i2c_slave.h"
#include "lufa.h"
#define SLAVE_I2C_ADDRESS 0x21
#define SLAVE_I2C_ADDRESS 0x36
/* Set 0 if debouncing isn't needed */
@ -196,12 +196,10 @@ uint8_t matrix_scan(void)
}
# endif
if (USB_DeviceState != DEVICE_STATE_Configured){
i2c_slave_reg[1] = 0x55;
for (uint8_t i = 0; i < MATRIX_ROWS; i++){
i2c_slave_reg[i+2] = matrix[i]; //send matrix over i2c
}
}
i2c_slave_reg[1] = 0x55;
for (uint8_t i = 0; i < MATRIX_ROWS; i++){
i2c_slave_reg[i+2] = matrix[i]; //send matrix over i2c
}
matrix_scan_quantum();
return 1;
@ -396,9 +394,6 @@ static void unselect_cols(void)
//this replases tmk code
void matrix_setup(void){
if (USB_DeviceState != DEVICE_STATE_Configured){
i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c
sei(); //enable interupts
}
i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c
sei(); //enable interupts
}

+ 0
- 27
keyboards/dc01/numpad/numpad.c View File

@ -14,30 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "numpad.h"
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
led_set_user(usb_led);
}

+ 3
- 11
keyboards/dc01/numpad/numpad.h View File

@ -13,24 +13,19 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NUMPAD_H
#define NUMPAD_H
#pragma once
#include "quantum.h"
#define XXX KC_NO
// This a shortcut to help you visually see your layout.
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
#define LAYOUT_numpad_5x4( \
K00, K01, K02, K03, \
K10, K11, K12, \
K20, K21, K22, K13, \
K30, K31, K32, \
K40, K42, K43 \
) \
{ \
) { \
{ K00, K01, K02, K03 }, \
{ K10, K11, K12, K13 }, \
{ K20, K21, K22, XXX }, \
@ -44,13 +39,10 @@
K20, K21, K22, K23, \
K30, K31, K32, K33, \
K40, K41, K42, K43 \
) \
{ \
) { \
{ K00, K01, K02, K03 }, \
{ K10, K11, K12, K13 }, \
{ K20, K21, K22, K23 }, \
{ K30, K31, K32, K33 }, \
{ K40, K41, K42, K43 } \
}
#endif

+ 1
- 1
keyboards/dc01/numpad/rules.mk View File

@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug


+ 1
- 55
keyboards/dc01/right/config.h View File

@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define VENDOR_ID 0x8968
#define PRODUCT_ID 0x1011
#define DEVICE_VER 0x0001
#define MANUFACTURER Mechboards
@ -47,10 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
@ -89,53 +85,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
//#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.
*
*/
/*
* 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
*/
/* 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

+ 6
- 12
keyboards/dc01/right/info.json View File

@ -1,21 +1,15 @@
{
"keyboard_name": "DC01 Right Half",
"url": "",
"maintainer": "qmk",
"maintainer": "Yiancar-Designs",
"width": 8.5,
"height": 5,
"layouts": {
"LAYOUT_ansi": {
"layout": [{"label":"&", "x":0.5, "y":0}, {"label":"*", "x":1.5, "y":0}, {"label":"(", "x":2.5, "y":0}, {"label":")", "x":3.5, "y":0}, {"label":"_", "x":4.5, "y":0}, {"label":"+", "x":5.5, "y":0}, {"label":"Backspace", "x":6.5, "y":0, "w":2}, {"label":"Y", "x":0, "y":1}, {"label":"U", "x":1, "y":1}, {"label":"I", "x":2, "y":1}, {"label":"O", "x":3, "y":1}, {"label":"P", "x":4, "y":1}, {"label":"{", "x":5, "y":1}, {"label":"}", "x":6, "y":1}, {"label":"|", "x":7, "y":1, "w":1.5}, {"label":"H", "x":0.25, "y":2}, {"label":"J", "x":1.25, "y":2}, {"label":"K", "x":2.25, "y":2}, {"label":"L", "x":3.25, "y":2}, {"label":":", "x":4.25, "y":2}, {"label":"\"", "x":5.25, "y":2}, {"label":"Enter", "x":6.25, "y":2, "w":2.25}, {"label":"N", "x":0.75, "y":3}, {"label":"M", "x":1.75, "y":3}, {"label":"<", "x":2.75, "y":3}, {"label":">", "x":3.75, "y":3}, {"label":"?", "x":4.75, "y":3}, {"label":"Shift", "x":5.75, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":2.25}, {"label":"Alt", "x":3.5, "y":4, "w":1.25}, {"label":"GUI", "x":4.75, "y":4, "w":1.25}, {"label":"Menu", "x":6, "y":4, "w":1.25}, {"label":"Ctrl", "x":7.25, "y":4, "w":1.25}]
},
"LAYOUT_iso": {
"layout": [{"label":"&", "x":0.5, "y":0}, {"label":"*", "x":1.5, "y":0}, {"label":"(", "x":2.5, "y":0}, {"label":")", "x":3.5, "y":0}, {"label":"_", "x":4.5, "y":0}, {"label":"+", "x":5.5, "y":0}, {"label":"Backspace", "x":6.5, "y":0, "w":2}, {"label":"Y", "x":0, "y":1}, {"label":"U", "x":1, "y":1}, {"label":"I", "x":2, "y":1}, {"label":"O", "x":3, "y":1}, {"label":"P", "x":4, "y":1}, {"label":"{", "x":5, "y":1}, {"label":"}", "x":6, "y":1}, {"label":"H", "x":0.25, "y":2}, {"label":"J", "x":1.25, "y":2}, {"label":"K", "x":2.25, "y":2}, {"label":"L", "x":3.25, "y":2}, {"label":":", "x":4.25, "y":2}, {"label":"@", "x":5.25, "y":2}, {"label":"~", "x":6.25, "y":2}, {"label":"Enter", "x":7.25, "y":1, "w":1.25, "h":2}, {"label":"N", "x":0.75, "y":3}, {"label":"M", "x":1.75, "y":3}, {"label":"<", "x":2.75, "y":3}, {"label":">", "x":3.75, "y":3}, {"label":"?", "x":4.75, "y":3}, {"label":"Shift", "x":5.75, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":2.25}, {"label":"AltGr", "x":3.5, "y":4, "w":1.25}, {"label":"GUI", "x":4.75, "y":4, "w":1.25}, {"label":"Menu", "x":6, "y":4, "w":1.25}, {"label":"Ctrl", "x":7.25, "y":4, "w":1.25}]
"LAYOUT_all": {
"layout": [{"label":"&", "x":0.5, "y":0}, {"label":"*", "x":1.5, "y":0}, {"label":"(", "x":2.5, "y":0}, {"label":")", "x":3.5, "y":0}, {"label":"_", "x":4.5, "y":0}, {"label":"+", "x":5.5, "y":0}, {"label":"Back", "x":6.5, "y":0}, {"label":"Del", "x":7.5, "y":0}, {"label":"Y", "x":0, "y":1}, {"label":"U", "x":1, "y":1}, {"label":"I", "x":2, "y":1}, {"label":"O", "x":3, "y":1}, {"label":"P", "x":4, "y":1}, {"label":"{", "x":5, "y":1}, {"label":"}", "x":6, "y":1}, {"label":"|", "x":7, "y":1, "w":1.5}, {"label":"H", "x":0.25, "y":2}, {"label":"J", "x":1.25, "y":2}, {"label":"K", "x":2.25, "y":2}, {"label":"L", "x":3.25, "y":2}, {"label":":", "x":4.25, "y":2}, {"label":"@", "x":5.25, "y":2}, {"label":"~", "x":6.25, "y":2}, {"label":"Enter", "x":7.25, "y":2, "w":1.25}, {"label":"N", "x":0.75, "y":3}, {"label":"M", "x":1.75, "y":3}, {"label":"<", "x":2.75, "y":3}, {"label":">", "x":3.75, "y":3}, {"label":"?", "x":4.75, "y":3}, {"label":"Shift", "x":5.75, "y":3, "w":1.75}, {"label":"Shift", "x":7.5, "y":3}, {"label":"Fn", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":2.25}, {"label":"AltGr", "x":3.5, "y":4, "w":1.25}, {"label":"Win", "x":4.75, "y":4, "w":1.25}, {"label":"Menu", "x":6, "y":4, "w":1.25}, {"label":"Ctrl", "x":7.25, "y":4, "w":1.25}]
},
"LAYOUT_hhkb_ansi": {
"layout": [{"label":"&", "x":0.5, "y":0}, {"label":"*", "x":1.5, "y":0}, {"label":"(", "x":2.5, "y":0}, {"label":")", "x":3.5, "y":0}, {"label":"_", "x":4.5, "y":0}, {"label":"+", "x":5.5, "y":0}, {"label":"Backspace", "x":6.5, "y":0}, {"label":"~", "x":7.5, "y":0}, {"label":"Y", "x":0, "y":1}, {"label":"U", "x":1, "y":1}, {"label":"I", "x":2, "y":1}, {"label":"O", "x":3, "y":1}, {"label":"P", "x":4, "y":1}, {"label":"{", "x":5, "y":1}, {"label":"}", "x":6, "y":1}, {"label":"|", "x":7, "y":1, "w":1.5}, {"label":"H", "x":0.25, "y":2}, {"label":"J", "x":1.25, "y":2}, {"label":"K", "x":2.25, "y":2}, {"label":"L", "x":3.25, "y":2}, {"label":":", "x":4.25, "y":2}, {"label":"\"", "x":5.25, "y":2}, {"label":"Enter", "x":6.25, "y":2, "w":2.25}, {"label":"N", "x":0.75, "y":3}, {"label":"M", "x":1.75, "y":3}, {"label":"<", "x":2.75, "y":3}, {"label":">", "x":3.75, "y":3}, {"label":"?", "x":4.75, "y":3}, {"label":"Shift", "x":5.75, "y":3, "w":1.75}, {"label":"Fn", "x":7.5, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":2.25}, {"label":"Alt", "x":3.5, "y":4, "w":1.25}, {"label":"GUI", "x":4.75, "y":4, "w":1.25}, {"label":"Menu", "x":6, "y":4, "w":1.25}, {"label":"Ctrl", "x":7.25, "y":4, "w":1.25}]
},
"LAYOUT_hhkb_iso": {
"layout": [{"label":"&", "x":0.5, "y":0}, {"label":"*", "x":1.5, "y":0}, {"label":"(", "x":2.5, "y":0}, {"label":")", "x":3.5, "y":0}, {"label":"_", "x":4.5, "y":0}, {"label":"+", "x":5.5, "y":0}, {"label":"|", "x":6.5, "y":0}, {"label":"Backspace", "x":7.5, "y":0}, {"label":"Y", "x":0, "y":1}, {"label":"U", "x":1, "y":1}, {"label":"I", "x":2, "y":1}, {"label":"O", "x":3, "y":1}, {"label":"P", "x":4, "y":1}, {"label":"{", "x":5, "y":1}, {"label":"}", "x":6, "y":1}, {"label":"H", "x":0.25, "y":2}, {"label":"J", "x":1.25, "y":2}, {"label":"K", "x":2.25, "y":2}, {"label":"L", "x":3.25, "y":2}, {"label":":", "x":4.25, "y":2}, {"label":"@", "x":5.25, "y":2}, {"label":"~", "x":6.25, "y":2}, {"label":"Enter", "x":7.25, "y":1, "w":1.25, "h":2}, {"label":"N", "x":0.75, "y":3}, {"label":"M", "x":1.75, "y":3}, {"label":"<", "x":2.75, "y":3}, {"label":">", "x":3.75, "y":3}, {"label":"?", "x":4.75, "y":3}, {"label":"Shift", "x":5.75, "y":3, "w":1.75}, {"label":"Fn", "x":7.5, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":2.25}, {"label":"AltGr", "x":3.5, "y":4, "w":1.25}, {"label":"GUI", "x":4.75, "y":4, "w":1.25}, {"label":"Menu", "x":6, "y":4, "w":1.25}, {"label":"Ctrl", "x":7.25, "y":4, "w":1.25}]
}
"LAYOUT_ansi": {
"layout": [{"label":"&", "x":0.5, "y":0}, {"label":"*", "x":1.5, "y":0}, {"label":"(", "x":2.5, "y":0}, {"label":")", "x":3.5, "y":0}, {"label":"_", "x":4.5, "y":0}, {"label":"+", "x":5.5, "y":0}, {"label":"Back", "x":6.5, "y":0}, {"label":"Del", "x":7.5, "y":0}, {"label":"Y", "x":0, "y":1}, {"label":"U", "x":1, "y":1}, {"label":"I", "x":2, "y":1}, {"label":"O", "x":3, "y":1}, {"label":"P", "x":4, "y":1}, {"label":"{", "x":5, "y":1}, {"label":"}", "x":6, "y":1}, {"label":"|", "x":7, "y":1, "w":1.5}, {"label":"H", "x":0.25, "y":2}, {"label":"J", "x":1.25, "y":2}, {"label":"K", "x":2.25, "y":2}, {"label":"L", "x":3.25, "y":2}, {"label":":", "x":4.25, "y":2}, {"label":"@", "x":5.25, "y":2}, {"label":"Enter", "x":6.25, "y":2, "w":2.25}, {"label":"N", "x":0.75, "y":3}, {"label":"M", "x":1.75, "y":3}, {"label":"<", "x":2.75, "y":3}, {"label":">", "x":3.75, "y":3}, {"label":"?", "x":4.75, "y":3}, {"label":"Shift", "x":5.75, "y":3, "w":1.75}, {"label":"Shift", "x":7.5, "y":3}, {"label":"Fn", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":2.25}, {"label":"AltGr", "x":3.5, "y":4, "w":1.25}, {"label":"Win", "x":4.75, "y":4, "w":1.25}, {"label":"Menu", "x":6, "y":4, "w":1.25}, {"label":"Ctrl", "x":7.25, "y":4, "w":1.25}]
}
}
}

+ 12
- 18
keyboards/dc01/right/keymaps/default/keymap.c View File

@ -17,22 +17,16 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ansi( /* Base */
KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSLS, \
KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \
KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \
KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL \
),
};
void matrix_init_user(void) {
}
KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSPC,
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,MO(1),
KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL),
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
[1] = LAYOUT_ansi( /* Empty for Dynamic keymap */
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL,
KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC,
KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT,
KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};

+ 1
- 1
keyboards/dc01/right/keymaps/default/readme.md View File

@ -1,3 +1,3 @@
# The default ANSI keymap for DC01 Right
When using the right module individually, this keymap will take effect. When using the keyboard as a whole please edit the keymap of the left module.
When using the right module individually, this keymap will take effect. When using the keyboard as a whole please edit the keymap of the left module.

+ 0
- 46
keyboards/dc01/right/keymaps/hhkb_ansi/keymap.c View File

@ -1,46 +0,0 @@
/* Copyright 2018 Yiancar
*
* 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 QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_hhkb_ansi( /* Base */
KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSPC, \
KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \
KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,MO(1), \
KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL \
),
[1] = LAYOUT_hhkb_ansi(
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \
KC_TRNS,KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, \
KC_PAST,KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \
KC_PPLS,KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
),
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}

+ 0
- 3
keyboards/dc01/right/keymaps/hhkb_ansi/readme.md View File

@ -1,3 +0,0 @@
# The default HHKB ANSI keymap for DC01 Right
When using the right module individually, this keymap will take effect. When using the keyboard as a whole please edit the keymap of the left module.

+ 0
- 46
keyboards/dc01/right/keymaps/hhkb_iso/keymap.c View File

@ -1,46 +0,0 @@
/* Copyright 2018 Yiancar
*
* 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 QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_hhkb_iso( /* Base */
KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, \
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, \
KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NUHS,KC_ENT, \
KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,MO(1), \
KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL \
),
[1] = LAYOUT_hhkb_iso(
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \
KC_TRNS,KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, \
KC_PAST,KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_PENT, \
KC_PPLS,KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
),
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}

+ 0
- 3
keyboards/dc01/right/keymaps/hhkb_iso/readme.md View File

@ -1,3 +0,0 @@
# The default HHKB ISO keymap for DC01 Right
When using the right module individually, this keymap will take effect. When using the keyboard as a whole please edit the keymap of the left module.

+ 0
- 3
keyboards/dc01/right/keymaps/iso/readme.md View File

@ -1,3 +0,0 @@
# The default ISO keymap for DC01 Right
When using the right module individually, this keymap will take effect. When using the keyboard as a whole please edit the keymap of the left module.

+ 46
- 0
keyboards/dc01/right/keymaps/via/keymap.c View File

@ -0,0 +1,46 @@
/* Copyright 2018 Yiancar
*
* 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 QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all( /* Base */
KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL),
[1] = LAYOUT_all( /* FN */
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL,
KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC,
KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_PENT,
KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[2] = LAYOUT_all( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[3] = LAYOUT_all( /* Empty for Dynamic keymap */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};

+ 11
- 0
keyboards/dc01/right/keymaps/via/readme.md View File

@ -0,0 +1,11 @@
# The default VIA keymap for DC01 Left
Please use this for ISO as well.
The keymap looks like a full layout keymap.
This is because the left part of the keyboard acts as the masterm coordinating all four part.
When using the keyboard to connect the other three parts, this keymap overwrites the individual keymaps of the single modules.
When using a module individually, the keymap of that module will take effect.

+ 1
- 0
keyboards/dc01/right/keymaps/via/rules.mk View File

@ -0,0 +1 @@
VIA_ENABLE = yes

+ 8
- 12
keyboards/dc01/right/matrix.c View File

@ -31,8 +31,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "timer.h"
#include "i2c_slave.h"
#include "lufa.h"
#include "quantum.h"
#define SLAVE_I2C_ADDRESS 0x19
#define SLAVE_I2C_ADDRESS 0x32
/* Set 0 if debouncing isn't needed */
@ -196,12 +197,10 @@ uint8_t matrix_scan(void)
}
# endif
if (USB_DeviceState != DEVICE_STATE_Configured){
i2c_slave_reg[1] = 0x55;
for (uint8_t i = 0; i < MATRIX_ROWS; i++){
i2c_slave_reg[i+2] = matrix[i]; //send matrix over i2c
}
}
i2c_slave_reg[1] = 0x55;
for (uint8_t i = 0; i < MATRIX_ROWS; i++){
i2c_slave_reg[i+2] = matrix[i]; //send matrix over i2c
}
matrix_scan_quantum();
return 1;
@ -396,9 +395,6 @@ static void unselect_cols(void)
//this replases tmk code
void matrix_setup(void){
if (USB_DeviceState != DEVICE_STATE_Configured){
i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c
sei(); //enable interupts
}
i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c
sei(); //enable interupts
}

+ 0
- 27
keyboards/dc01/right/right.c View File

@ -14,30 +14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "right.h"
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
}
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
led_set_user(usb_led);
}

+ 11
- 49
keyboards/dc01/right/right.h View File

@ -13,74 +13,36 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef RIGHT_H
#define RIGHT_H
#pragma once
#include "quantum.h"
#define XXX KC_NO
// This a shortcut to help you visually see your layout.
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
#define LAYOUT_ansi( \
K01, K02, K03, K04, K05, K06, K07, \
K10, K11, K12, K13, K14, K15, K16, K17, \
K20, K21, K22, K23, K24, K25, K27, \
K30, K31, K32, K33, K34, K37, \
K40, K41, K42, K43, K44, K45 \
) \
{ \
{ XXX, K01, K02, K03, K04, K05, K06, K07 }, \
{ K10, K11, K12, K13, K14, K15, K16, K17 }, \
{ K20, K21, K22, K23, K24, K25, XXX, K27 }, \
{ K30, K31, K32, K33, K34, XXX, XXX, K37 }, \
{ K40, K41, K42, K43, K44, K45, XXX, XXX } \
}
#define LAYOUT_iso( \
K01, K02, K03, K04, K05, K06, K07, \
K10, K11, K12, K13, K14, K15, K16, \
K20, K21, K22, K23, K24, K25, K26, K27, \
K30, K31, K32, K33, K34, K37, \
K40, K41, K42, K43, K44, K45 \
) \
{ \
{ XXX, K01, K02, K03, K04, K05, K06, K07 }, \
{ K10, K11, K12, K13, K14, K15, K16, XXX }, \
{ K20, K21, K22, K23, K24, K25, K26, K27 }, \
{ K30, K31, K32, K33, K34, XXX, XXX, K37 }, \
{ K40, K41, K42, K43, K44, K45, XXX, XXX } \
}
#define LAYOUT_hhkb_ansi( \
#define LAYOUT_all( \
K01, K02, K03, K04, K05, K06, K07, K00, \
K10, K11, K12, K13, K14, K15, K16, K17, \
K20, K21, K22, K23, K24, K25, K27, \
K20, K21, K22, K23, K24, K25, K26, K27, \
K30, K31, K32, K33, K34, K36, K37, \
K40, K41, K42, K43, K44, K45 \
) \
{ \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07 }, \
{ K10, K11, K12, K13, K14, K15, K16, K17 }, \
{ K20, K21, K22, K23, K24, K25, XXX, K27 }, \
{ K20, K21, K22, K23, K24, K25, K26, K27 }, \
{ K30, K31, K32, K33, K34, XXX, K36, K37 }, \
{ K40, K41, K42, K43, K44, K45, XXX, XXX } \
}
#define LAYOUT_hhkb_iso( \
#define LAYOUT_ansi( \
K01, K02, K03, K04, K05, K06, K07, K00, \
K10, K11, K12, K13, K14, K15, K16, \
K20, K21, K22, K23, K24, K25, K26, K27, \
K10, K11, K12, K13, K14, K15, K16, K17, \
K20, K21, K22, K23, K24, K25, K27, \
K30, K31, K32, K33, K34, K36, K37, \
K40, K41, K42, K43, K44, K45 \
) \
{ \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07 }, \
{ K10, K11, K12, K13, K14, K15, K16, XXX }, \
{ K20, K21, K22, K23, K24, K25, K26, K27 }, \
{ K10, K11, K12, K13, K14, K15, K16, K17 }, \
{ K20, K21, K22, K23, K24, K25, XXX, K27 }, \
{ K30, K31, K32, K33, K34, XXX, K36, K37 }, \
{ K40, K41, K42, K43, K44, K45, XXX, XXX } \
}
#endif

+ 1
- 1
keyboards/dc01/right/rules.mk View File

@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug


Loading…
Cancel
Save