1
0
Fork 0

change do60 config (#2996)

* add do60 support

* DO60 on market config v0.2.8

* remove do60x

* Changes for matching new naming rule
This commit is contained in:
sennin32 2018-05-19 11:59:05 +08:00 committed by Drashna Jaelre
parent c55c646fa3
commit 1edb8bf190
5 changed files with 55 additions and 23 deletions

View file

@ -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_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 #define UNUSED_PINS
/* Backlight Setup */ /* Backlight Setup */
#define BACKLIGHT_PIN F4 #define BACKLIGHT_PIN B5
#define BACKLIGHT_LEVELS 6 #define BACKLIGHT_LEVELS 6
//#define BACKLIGHT_BREATHING //#define BACKLIGHT_BREATHING

View file

@ -1,19 +1,50 @@
#include "do60.h" #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);
extern inline void do60_caps_led_on(void); void matrix_init_kb(void) {
extern inline void do60_bl_led_on(void); // Keyboard start-up code goes here
// Runs once when the firmware starts up
matrix_init_user();
led_init_ports();
setdefaultrgb();
};
extern inline void do60_caps_led_off(void); void matrix_scan_kb(void) {
extern inline void do60_bl_led_off(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) { void led_set_kb(uint8_t usb_led) {
if (usb_led & (1<<USB_LED_CAPS_LOCK)) { //if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
do60_caps_led_on(); // do60_caps_led_on();
} else { //} else {
do60_caps_led_off(); // 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);
}
} }

View file

@ -7,21 +7,22 @@
/* DO60 LEDs /* DO60 LEDs
* GPIO pads * GPIO pads
* 0 F7 not connected * 0 F7 not connected
* 1 F6 RGB PWM Underglow * 1 F6 not connected
* 2 F5 Backlight LED * 2 F5 RGB PWM Underglow
* 3 F4 not connected * 3 F4 Backlight LED
* B2 Capslock LED * B2 Capslock LED
* B0 not connected * B0 not connected
*/ */
/*
inline void do60_caps_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); } 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_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_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 do60_bl_led_off(void) { DDRF &= ~(1<<4); PORTF &= ~(1<<4); }
*/
inline void setdefaultrgb(void){ rgblight_sethsv(100,100,100); }
/* Do60 Keymap Definition Macro */ /* Do60 Keymap Definition Macro */
#define LAYOUT_all( \ #define LAYOUT_all( \

View file

@ -8,14 +8,14 @@ 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_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_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_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), 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: Function Layer
[1] = LAYOUT_all( [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, \ 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_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, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ 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_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), KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END),

View file

@ -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_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_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_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), 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 // 1: Function Layer