summaryrefslogtreecommitdiff
path: root/keyboards/do60
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/do60')
-rw-r--r--keyboards/do60/config.h2
-rw-r--r--keyboards/do60/do60.c37
-rw-r--r--keyboards/do60/do60.h5
-rw-r--r--keyboards/do60/keymaps/default/keymap.c5
-rw-r--r--keyboards/do60/keymaps/via/keymap.c35
-rw-r--r--keyboards/do60/keymaps/via/readme.md5
-rw-r--r--keyboards/do60/keymaps/via/rules.mk2
7 files changed, 51 insertions, 40 deletions
diff --git a/keyboards/do60/config.h b/keyboards/do60/config.h
index 82e818328c..acaa64646f 100644
--- a/keyboards/do60/config.h
+++ b/keyboards/do60/config.h
@@ -21,7 +21,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 0x4453 // DS for Doyu Studios
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER Shopkey by Doyu Studio
diff --git a/keyboards/do60/do60.c b/keyboards/do60/do60.c
index c1e509c5db..3dba9b5359 100644
--- a/keyboards/do60/do60.c
+++ b/keyboards/do60/do60.c
@@ -1,11 +1,4 @@
#include "do60.h"
-#include "led.h"
-
-//extern inline void do60_caps_led_on(void);
-//extern inline void do60_bl_led_on(void);
-
-//extern inline void do60_caps_led_off(void);
-//extern inline void do60_bl_led_off(void);
extern inline void setdefaultrgb(void);
@@ -18,33 +11,17 @@ void matrix_init_kb(void) {
setdefaultrgb();
};
-void matrix_scan_kb(void) {
- // Looping keyboard code goes here
- // This runs every cycle (a lot)
- matrix_scan_user();
-};
-
void led_init_ports(void) {
// Set caps lock LED pin as output
- DDRB |= (1 << 2);
+ setPinOutput(B2);
// Default to off
- PORTB |= (1 << 2);
+ writePinHigh(B2);
}
-void led_set_kb(uint8_t usb_led) {
- //if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
- // do60_caps_led_on();
- //} else {
- // do60_caps_led_off();
- //}
-
- //led_set_user(usb_led);
+bool led_update_kb(led_t led_state) {
+ if(led_update_user(led_state)) {
+ writePin(B2, !led_state.caps_lock);
+ }
- if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
- // Turn capslock on
- PORTB &= ~(1<<2);
- } else {
- // Turn capslock off
- PORTB |= (1<<2);
- }
+ return true;
}
diff --git a/keyboards/do60/do60.h b/keyboards/do60/do60.h
index 8ee9022041..8a4b6037d4 100644
--- a/keyboards/do60/do60.h
+++ b/keyboards/do60/do60.h
@@ -1,8 +1,6 @@
-#ifndef DO60_H
-#define DO60_H
+#pragma once
#include "quantum.h"
-#include "led.h"
/* DO60 LEDs
* GPIO pads
@@ -94,4 +92,3 @@ inline void setdefaultrgb(void){ rgblight_sethsv(100,100,100); }
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E }, \
{ K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, K47, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E } \
}
-#endif
diff --git a/keyboards/do60/keymaps/default/keymap.c b/keyboards/do60/keymaps/default/keymap.c
index 8ade985b32..8b76b04620 100644
--- a/keyboards/do60/keymaps/default/keymap.c
+++ b/keyboards/do60/keymaps/default/keymap.c
@@ -19,8 +19,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END),
};
-
-// Loop
-void matrix_scan_user(void) {
- // Empty
-};
diff --git a/keyboards/do60/keymaps/via/keymap.c b/keyboards/do60/keymaps/via/keymap.c
new file mode 100644
index 0000000000..57f8e3b93c
--- /dev/null
+++ b/keyboards/do60/keymaps/via/keymap.c
@@ -0,0 +1,35 @@
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ // 0: Base Layer
+ [0] = LAYOUT_all(
+ 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_GRV, KC_BSPC, \
+ 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
+ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_SLSH, KC_UP, KC_SLSH, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_BSPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT),
+
+ // 1: Function Layer
+ [1] = LAYOUT_all(
+ RESET, 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_NO, KC_NO, \
+ KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, BL_TOGG,BL_ON, BL_INC, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \
+ KC_NO, RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD, BL_STEP,BL_OFF, BL_DEC, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \
+ KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP, KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_RSFT, KC_NO , KC_PGUP, KC_INS, \
+ KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END),
+
+ [2] = LAYOUT_all(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, 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(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS),
+
+};
diff --git a/keyboards/do60/keymaps/via/readme.md b/keyboards/do60/keymaps/via/readme.md
new file mode 100644
index 0000000000..89f9acaa97
--- /dev/null
+++ b/keyboards/do60/keymaps/via/readme.md
@@ -0,0 +1,5 @@
+![Uses this layout](https://i.redd.it/v64eqwsrk8jx.jpg)
+
+All of the keys which CAN have a function should be assigned one.
+
+The keys with KC_NO cannot be assigned a value
diff --git a/keyboards/do60/keymaps/via/rules.mk b/keyboards/do60/keymaps/via/rules.mk
new file mode 100644
index 0000000000..36b7ba9cbc
--- /dev/null
+++ b/keyboards/do60/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
+VIA_ENABLE = yes
+LTO_ENABLE = yes