aboutsummaryrefslogtreecommitdiff
path: root/keyboards/dc01/arrow
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/dc01/arrow')
-rw-r--r--keyboards/dc01/arrow/arrow.c27
-rw-r--r--keyboards/dc01/arrow/arrow.h21
-rw-r--r--keyboards/dc01/arrow/config.h56
-rw-r--r--keyboards/dc01/arrow/info.json2
-rw-r--r--keyboards/dc01/arrow/keymaps/default/keymap.c27
-rw-r--r--keyboards/dc01/arrow/keymaps/via/keymap.c46
-rw-r--r--keyboards/dc01/arrow/keymaps/via/readme.md3
-rwxr-xr-xkeyboards/dc01/arrow/keymaps/via/rules.mk1
-rw-r--r--keyboards/dc01/arrow/matrix.c19
-rw-r--r--keyboards/dc01/arrow/rules.mk2
10 files changed, 72 insertions, 132 deletions
diff --git a/keyboards/dc01/arrow/arrow.c b/keyboards/dc01/arrow/arrow.c
index 07988b809..b3ed4ede7 100644
--- a/keyboards/dc01/arrow/arrow.c
+++ b/keyboards/dc01/arrow/arrow.c
@@ -14,30 +14,3 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16#include "arrow.h" 16#include "arrow.h"
17
18void matrix_init_kb(void) {
19 // put your keyboard start-up code here
20 // runs once when the firmware starts up
21
22 matrix_init_user();
23}
24
25void matrix_scan_kb(void) {
26 // put your looping keyboard code here
27 // runs every cycle (a lot)
28
29 matrix_scan_user();
30}
31
32bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
33 // put your per-action keyboard code here
34 // runs for every action, just before processing by the firmware
35
36 return process_record_user(keycode, record);
37}
38
39void led_set_kb(uint8_t usb_led) {
40 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
41
42 led_set_user(usb_led);
43}
diff --git a/keyboards/dc01/arrow/arrow.h b/keyboards/dc01/arrow/arrow.h
index a3a9987d5..b293f60b4 100644
--- a/keyboards/dc01/arrow/arrow.h
+++ b/keyboards/dc01/arrow/arrow.h
@@ -13,29 +13,22 @@
13 * You should have received a copy of the GNU General Public License 13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16#ifndef ARROW_H 16#pragma once
17#define ARROW_H
18 17
19#include "quantum.h" 18#include "quantum.h"
20 19
21#define XXX KC_NO 20#define XXX KC_NO
22 21
23// This a shortcut to help you visually see your layout.
24// The first section contains all of the arguments
25// The second converts the arguments into a two-dimensional array
26#define LAYOUT_all( \ 22#define LAYOUT_all( \
27 K00, K01, K02, \ 23 K00, K01, K02, \
28 K10, K11, K12, \ 24 K10, K11, K12, \
29 \ 25 \
30 K31, \ 26 K31, \
31 K40, K41, K42 \ 27 K40, K41, K42 \
32) \ 28) { \
33{ \
34 { K00, K01, K02 }, \ 29 { K00, K01, K02 }, \
35 { K10, K11, K12 }, \ 30 { K10, K11, K12 }, \
36 { XXX, XXX, XXX }, \ 31 { XXX, XXX, XXX }, \
37 { XXX, K31, XXX }, \ 32 { XXX, K31, XXX }, \
38 { K40, K41, K42 } \ 33 { K40, K41, K42 } \
39} 34}
40
41#endif
diff --git a/keyboards/dc01/arrow/config.h b/keyboards/dc01/arrow/config.h
index 45e48d189..e240d71e8 100644
--- a/keyboards/dc01/arrow/config.h
+++ b/keyboards/dc01/arrow/config.h
@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
20#include "config_common.h" 20#include "config_common.h"
21 21
22/* USB Device descriptor parameter */ 22/* USB Device descriptor parameter */
23#define VENDOR_ID 0xFEED 23#define VENDOR_ID 0x8968
24#define PRODUCT_ID 0x1012 24#define PRODUCT_ID 0x1012
25#define DEVICE_VER 0x0001 25#define DEVICE_VER 0x0001
26#define MANUFACTURER Mechboards 26#define MANUFACTURER Mechboards
@@ -47,10 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
47/* COL2ROW, ROW2COL*/ 47/* COL2ROW, ROW2COL*/
48#define DIODE_DIRECTION COL2ROW 48#define DIODE_DIRECTION COL2ROW
49 49
50// #define BACKLIGHT_PIN B7
51// #define BACKLIGHT_BREATHING
52// #define BACKLIGHT_LEVELS 3
53
54/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ 50/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
55#define DEBOUNCE 5 51#define DEBOUNCE 5
56 52
@@ -89,53 +85,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
89 * 85 *
90 */ 86 */
91//#define FORCE_NKRO 87//#define FORCE_NKRO
92
93/*
94 * Magic Key Options
95 *
96 * Magic keys are hotkey commands that allow control over firmware functions of
97 * the keyboard. They are best used in combination with the HID Listen program,
98 * found here: https://www.pjrc.com/teensy/hid_listen.html
99 *
100 * The options below allow the magic key functionality to be changed. This is
101 * useful if your keyboard/keypad is missing keys and you want magic key support.
102 *
103 */
104
105/*
106 * Feature disable options
107 * These options are also useful to firmware size reduction.
108 */
109
110/* disable debug print */
111//#define NO_DEBUG
112
113/* disable print */
114//#define NO_PRINT
115
116/* disable action features */
117//#define NO_ACTION_LAYER
118//#define NO_ACTION_TAPPING
119//#define NO_ACTION_ONESHOT
120//#define NO_ACTION_MACRO
121//#define NO_ACTION_FUNCTION
122
123/*
124 * MIDI options
125 */
126
127/* enable basic MIDI features:
128 - MIDI notes can be sent when in Music mode is on
129*/
130//#define MIDI_BASIC
131
132/* enable advanced MIDI features:
133 - MIDI notes can be added to the keymap
134 - Octave shift and transpose
135 - Virtual sustain, portamento, and modulation wheel
136 - etc.
137*/
138//#define MIDI_ADVANCED
139
140/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
141//#define MIDI_TONE_KEYCODE_OCTAVES 1 \ No newline at end of file
diff --git a/keyboards/dc01/arrow/info.json b/keyboards/dc01/arrow/info.json
index b3b584fbd..c1fc10592 100644
--- a/keyboards/dc01/arrow/info.json
+++ b/keyboards/dc01/arrow/info.json
@@ -1,7 +1,7 @@
1{ 1{
2 "keyboard_name": "DC01 Arrow Cluster", 2 "keyboard_name": "DC01 Arrow Cluster",
3 "url": "", 3 "url": "",
4 "maintainer": "qmk", 4 "maintainer": "Yiancar-Designs",
5 "width": 3, 5 "width": 3,
6 "height": 5, 6 "height": 5,
7 "layouts": { 7 "layouts": {
diff --git a/keyboards/dc01/arrow/keymaps/default/keymap.c b/keyboards/dc01/arrow/keymaps/default/keymap.c
index 54eae570e..b7f539e85 100644
--- a/keyboards/dc01/arrow/keymaps/default/keymap.c
+++ b/keyboards/dc01/arrow/keymaps/default/keymap.c
@@ -17,26 +17,9 @@
17 17
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19[0] = LAYOUT_all( /* Base */ 19[0] = LAYOUT_all( /* Base */
20 KC_INS, KC_HOME, KC_PGUP, \ 20 KC_INS, KC_HOME, KC_PGUP,
21 KC_DEL, KC_END, KC_PGDN, \ 21 KC_DEL, KC_END, KC_PGDN,
22 \
23 KC_UP, \
24 KC_LEFT, KC_DOWN, KC_RIGHT \
25),
26};
27
28void matrix_init_user(void) {
29
30}
31
32void matrix_scan_user(void) {
33 22
34} 23 KC_UP,
35 24 KC_LEFT, KC_DOWN, KC_RIGHT)
36bool process_record_user(uint16_t keycode, keyrecord_t *record) { 25};
37 return true;
38}
39
40void led_set_user(uint8_t usb_led) {
41
42}
diff --git a/keyboards/dc01/arrow/keymaps/via/keymap.c b/keyboards/dc01/arrow/keymaps/via/keymap.c
new file mode 100644
index 000000000..a086ffc07
--- /dev/null
+++ b/keyboards/dc01/arrow/keymaps/via/keymap.c
@@ -0,0 +1,46 @@
1/* Copyright 2018 Yiancar
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include QMK_KEYBOARD_H
17
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19[0] = LAYOUT_all( /* Base */
20 KC_INS, KC_HOME, KC_PGUP,
21 KC_DEL, KC_END, KC_PGDN,
22
23 KC_UP,
24 KC_LEFT, KC_DOWN, KC_RIGHT),
25
26[1] = LAYOUT_all( /* Empty for Dynamic keymap */
27 KC_TRNS, KC_TRNS, KC_TRNS,
28 KC_TRNS, KC_TRNS, KC_TRNS,
29
30 KC_TRNS,
31 KC_TRNS, KC_TRNS, KC_TRNS),
32
33[2] = LAYOUT_all( /* Empty for Dynamic keymap */
34 KC_TRNS, KC_TRNS, KC_TRNS,
35 KC_TRNS, KC_TRNS, KC_TRNS,
36
37 KC_TRNS,
38 KC_TRNS, KC_TRNS, KC_TRNS),
39
40[3] = LAYOUT_all( /* Empty for Dynamic keymap */
41 KC_TRNS, KC_TRNS, KC_TRNS,
42 KC_TRNS, KC_TRNS, KC_TRNS,
43
44 KC_TRNS,
45 KC_TRNS, KC_TRNS, KC_TRNS)
46};
diff --git a/keyboards/dc01/arrow/keymaps/via/readme.md b/keyboards/dc01/arrow/keymaps/via/readme.md
new file mode 100644
index 000000000..b2d32d9d2
--- /dev/null
+++ b/keyboards/dc01/arrow/keymaps/via/readme.md
@@ -0,0 +1,3 @@
1# The default VIA keymap for DC01 Arrow cluster
2
3When 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.
diff --git a/keyboards/dc01/arrow/keymaps/via/rules.mk b/keyboards/dc01/arrow/keymaps/via/rules.mk
new file mode 100755
index 000000000..1e5b99807
--- /dev/null
+++ b/keyboards/dc01/arrow/keymaps/via/rules.mk
@@ -0,0 +1 @@
VIA_ENABLE = yes
diff --git a/keyboards/dc01/arrow/matrix.c b/keyboards/dc01/arrow/matrix.c
index 80fbbb1b0..0102ad0fa 100644
--- a/keyboards/dc01/arrow/matrix.c
+++ b/keyboards/dc01/arrow/matrix.c
@@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
32#include "i2c_slave.h" 32#include "i2c_slave.h"
33#include "lufa.h" 33#include "lufa.h"
34 34
35#define SLAVE_I2C_ADDRESS 0x23 35#define SLAVE_I2C_ADDRESS 0x40
36 36
37/* Set 0 if debouncing isn't needed */ 37/* Set 0 if debouncing isn't needed */
38 38
@@ -196,12 +196,10 @@ uint8_t matrix_scan(void)
196 } 196 }
197# endif 197# endif
198 198
199 if (USB_DeviceState != DEVICE_STATE_Configured){ 199 i2c_slave_reg[1] = 0x55;
200 i2c_slave_reg[1] = 0x55; 200 for (uint8_t i = 0; i < MATRIX_ROWS; i++){
201 for (uint8_t i = 0; i < MATRIX_ROWS; i++){ 201 i2c_slave_reg[i+2] = matrix[i]; //send matrix over i2c
202 i2c_slave_reg[i+2] = matrix[i]; //send matrix over i2c 202 }
203 }
204 }
205 203
206 matrix_scan_quantum(); 204 matrix_scan_quantum();
207 return 1; 205 return 1;
@@ -396,9 +394,6 @@ static void unselect_cols(void)
396 394
397//this replases tmk code 395//this replases tmk code
398void matrix_setup(void){ 396void matrix_setup(void){
399 397 i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c
400 if (USB_DeviceState != DEVICE_STATE_Configured){ 398 sei(); //enable interupts
401 i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c
402 sei(); //enable interupts
403 }
404} \ No newline at end of file 399} \ No newline at end of file
diff --git a/keyboards/dc01/arrow/rules.mk b/keyboards/dc01/arrow/rules.mk
index 5eacd0ae2..17de05bc7 100644
--- a/keyboards/dc01/arrow/rules.mk
+++ b/keyboards/dc01/arrow/rules.mk
@@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu
14# Build Options 14# Build Options
15# change yes to no to disable 15# change yes to no to disable
16# 16#
17BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration 17BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
18MOUSEKEY_ENABLE = yes # Mouse keys 18MOUSEKEY_ENABLE = yes # Mouse keys
19EXTRAKEY_ENABLE = yes # Audio control and System control 19EXTRAKEY_ENABLE = yes # Audio control and System control
20CONSOLE_ENABLE = no # Console for debug 20CONSOLE_ENABLE = no # Console for debug