From 1edb8bf1903b04e14160a56516e5c89a2e6cb9cd Mon Sep 17 00:00:00 2001 From: sennin32 Date: Sat, 19 May 2018 11:59:05 +0800 Subject: change do60 config (#2996) * add do60 support * DO60 on market config v0.2.8 * remove do60x * Changes for matching new naming rule --- keyboards/do60/config.h | 4 +-- keyboards/do60/do60.c | 51 ++++++++++++++++++++++++++------- keyboards/do60/do60.h | 11 +++---- keyboards/do60/keymaps/default/keymap.c | 10 +++---- keyboards/do60/keymaps/test/keymap.c | 2 +- 5 files changed, 55 insertions(+), 23 deletions(-) (limited to 'keyboards') 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 . * */ #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<