summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--keyboards/do60/config.h4
-rw-r--r--keyboards/do60/do60.c51
-rw-r--r--keyboards/do60/do60.h11
-rw-r--r--keyboards/do60/keymaps/default/keymap.c10
-rw-r--r--keyboards/do60/keymaps/test/keymap.c2
5 files changed, 55 insertions, 23 deletions
diff --git a/keyboards/do60/config.h b/keyboards/do60/config.h
index 88948b6a64..4a7dcddfdb 100644
--- a/keyboards/do60/config.h
+++ b/keyboards/do60/config.h
@@ -43,11 +43,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
-#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3, B0 }
+#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, F4, B4, D7, D6, B3, B0 }
#define UNUSED_PINS
/* Backlight Setup */
-#define BACKLIGHT_PIN F4
+#define BACKLIGHT_PIN B5
#define BACKLIGHT_LEVELS 6
//#define BACKLIGHT_BREATHING
diff --git a/keyboards/do60/do60.c b/keyboards/do60/do60.c
index 502d02a40d..c1e509c5db 100644
--- a/keyboards/do60/do60.c
+++ b/keyboards/do60/do60.c
@@ -1,19 +1,50 @@
#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_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 do60_caps_led_off(void);
-extern inline void do60_bl_led_off(void);
+extern inline void setdefaultrgb(void);
+void matrix_init_kb(void) {
+ // Keyboard start-up code goes here
+ // Runs once when the firmware starts up
+ matrix_init_user();
+ led_init_ports();
+ 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);
+ // Default to off
+ PORTB |= (1 << 2);
+}
+
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();
- }
+ //if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
+ // do60_caps_led_on();
+ //} else {
+ // do60_caps_led_off();
+ //}
+
+ //led_set_user(usb_led);
- led_set_user(usb_led);
+ if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
+ // Turn capslock on
+ PORTB &= ~(1<<2);
+ } else {
+ // Turn capslock off
+ PORTB |= (1<<2);
+ }
}
diff --git a/keyboards/do60/do60.h b/keyboards/do60/do60.h
index 745041710a..d6847edc33 100644
--- a/keyboards/do60/do60.h
+++ b/keyboards/do60/do60.h
@@ -7,21 +7,22 @@
/* DO60 LEDs
* GPIO pads
* 0 F7 not connected
- * 1 F6 RGB PWM Underglow
- * 2 F5 Backlight LED
- * 3 F4 not connected
+ * 1 F6 not connected
+ * 2 F5 RGB PWM Underglow
+ * 3 F4 Backlight LED
* B2 Capslock LED
* B0 not connected
*/
-
+/*
inline void do60_caps_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); }
inline void do60_bl_led_on(void) { DDRF |= (1<<4); PORTF &= ~(1<<4); }
inline void do60_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); }
inline void do60_bl_led_off(void) { DDRF &= ~(1<<4); PORTF &= ~(1<<4); }
+*/
-
+inline void setdefaultrgb(void){ rgblight_sethsv(100,100,100); }
/* Do60 Keymap Definition Macro */
#define LAYOUT_all( \
diff --git a/keyboards/do60/keymaps/default/keymap.c b/keyboards/do60/keymaps/default/keymap.c
index 82110b7035..f30a770d63 100644
--- a/keyboards/do60/keymaps/default/keymap.c
+++ b/keyboards/do60/keymaps/default/keymap.c
@@ -8,21 +8,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
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_NO, KC_UP, KC_SLSH, \
+ 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, F(0), 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, KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \
- KC_NO, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SMOD, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \
+ 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_SMOD, 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, F(0), KC_HOME, KC_PGDOWN,KC_END),
};
// Custom Actions
- const uint16_t PROGMEM fn_actions[] = {
+const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay
};
@@ -44,4 +44,4 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
// Loop
void matrix_scan_user(void) {
// Empty
-};
+}; \ No newline at end of file
diff --git a/keyboards/do60/keymaps/test/keymap.c b/keyboards/do60/keymaps/test/keymap.c
index 30e919e178..cb8ffecae8 100644
--- a/keyboards/do60/keymaps/test/keymap.c
+++ b/keyboards/do60/keymaps/test/keymap.c
@@ -8,7 +8,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
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_NO, 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_SLSH, KC_RSFT, KC_UP, KC_UP, \
+ KC_LSFT, KC_NO, 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_SLSH, \
KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT),
// 1: Function Layer