parent
1bde044132
commit
5cc901518c
@ -1,44 +1,139 @@
|
||||
/*
|
||||
* Copyright 2017 skully <skullydazed@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#define PRODUCT_ID 0x2390
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xC1ED
|
||||
#define PRODUCT_ID 0x2391
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Clueboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 10
|
||||
#define MATRIX_COLS 8
|
||||
|
||||
/* ROWS: Top to bottom, COLS: Left to right
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { B2, C7, C6, B6, B5, B0, B3, D5, D3, D2 }
|
||||
#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, E6, B1 }
|
||||
#define UNUSED_PINS
|
||||
#define MATRIX_ROW_PINS { B11, A6, A3, A2, A1, B5, B6, C15, C14, C13 }
|
||||
#define MATRIX_COL_PINS { B10, B2, B1, B0, A7, B4, B3, B7 }
|
||||
#define UNUSED_PINS { A0, A8, A15, B12, B13, B14, B15 }
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 6
|
||||
|
||||
/* Speaker configuration
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
//#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
//#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
#define B7_AUDIO
|
||||
#define NO_MUSIC_MODE
|
||||
#define AUDIO_CLICKY
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* Backlight configuration
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
#define BACKLIGHT_LEVELS 1
|
||||
|
||||
/* Underlight configuration
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
//#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||
|
||||
/* Backlight configuration
|
||||
*/
|
||||
#define RGB_DI_PIN D7
|
||||
#define RGBLED_NUM 26 // Number of LEDs
|
||||
#define RGBLIGHT_HUE_STEP 32
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||
#define RGBLIGHT_EFFECT_BREATHE_MAX 200
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 666*2
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 4 // How many LEDs wide to light up
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 16 // The led to start at
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 8 // How many LEDs to travel
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // How many LEDs wide to light up
|
||||
#define BACKLIGHT_LEVELS 1
|
||||
|
||||
// This is a 7-bit address, that gets left-shifted and bit 0
|
||||
// set to 0 for write, 1 for read (as per I2C protocol)
|
||||
// The address will vary depending on your wiring:
|
||||
// 0b1110100 AD <-> GND
|
||||
// 0b1110111 AD <-> VCC
|
||||
// 0b1110101 AD <-> SCL
|
||||
// 0b1110110 AD <-> SDA
|
||||
#define DRIVER_ADDR_1 0b1110100
|
||||
#define DRIVER_ADDR_2 0b1110110 // Not actually used...
|
||||
|
||||
#define DRIVER_COUNT 2
|
||||
#define DRIVER_1_LED_TOTAL 71
|
||||
#define DRIVER_2_LED_TOTAL 0
|
||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
|
||||
|
@ -1,63 +1,187 @@
|
||||
/* Copyright 2017 Clueboard <info@clueboard.co>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "gen1.h"
|
||||
#include <avr/io.h>
|
||||
#include "backlight.h"
|
||||
#include "print.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
matrix_init_user();
|
||||
led_init_ports();
|
||||
|
||||
// JTAG disable for PORT F. write JTD bit twice within four cycles.
|
||||
MCUCR |= (1<<JTD);
|
||||
MCUCR |= (1<<JTD);
|
||||
}
|
||||
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
void backlight_init_ports(void) {
|
||||
print("init_backlight_pin()\n");
|
||||
// Set our LED pins as output
|
||||
DDRD |= (1<<0); // Esc
|
||||
DDRD |= (1<<4); // Page Up
|
||||
DDRD |= (1<<1); // Arrows
|
||||
|
||||
// Set our LED pins low
|
||||
PORTD &= ~(1<<0); // Esc
|
||||
PORTD &= ~(1<<4); // Page Up
|
||||
PORTD &= ~(1<<1); // Arrows
|
||||
}
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
/* Refer to IS31 manual for these locations
|
||||
* driver
|
||||
* | R location
|
||||
* | | G location
|
||||
* | | | B location
|
||||
* | | | | */
|
||||
{0, C1_1, C1_1, C1_1}, // k00 KC_GESC
|
||||
{0, C1_2, C1_2, C1_2}, // k01 KC_1
|
||||
{0, C1_3, C1_3, C1_3}, // k02 KC_2
|
||||
{0, C1_4, C1_4, C1_4}, // k03 KC_3
|
||||
{0, C1_5, C1_5, C1_5}, // k04 KC_4
|
||||
{0, C1_6, C1_6, C1_6}, // k05 KC_5
|
||||
{0, C1_7, C1_7, C1_7}, // k06 KC_6
|
||||
{0, C1_8, C1_8, C1_8}, // k07 KC_7
|
||||
{0, C1_9, C1_9, C1_9}, // k50 KC_8
|
||||
{0, C1_10, C1_10, C1_10}, // k51 KC_9
|
||||
{0, C1_11, C1_11, C1_11}, // k52 KC_0
|
||||
{0, C1_12, C1_12, C1_12}, // k53 KC_MINS
|
||||
{0, C1_13, C1_13, C1_13}, // k54 KC_EQL
|
||||
{0, C1_14, C1_14, C1_14}, // k55 KC_BSPC
|
||||
{0, C1_15, C1_15, C1_15}, // k57 KC_PGUP
|
||||
{0, C2_1, C2_1, C2_1}, // k10 KC_TAB
|
||||
{0, C2_2, C2_2, C2_2}, // k11 KC_Q
|
||||
{0, C2_3, C2_3, C2_3}, // k12 KC_W
|
||||
{0, C2_4, C2_4, C2_4}, // k13 KC_E
|
||||
{0, C2_5, C2_5, C2_5}, // k14 KC_R
|
||||
{0, C2_6, C2_6, C2_6}, // k15 KC_T
|
||||
{0, C2_7, C2_7, C2_7}, // k16 KC_Y
|
||||
{0, C2_8, C2_8, C2_8}, // k17 KC_U
|
||||
{0, C2_9, C2_9, C2_9}, // k60 KC_I
|
||||
{0, C2_10, C2_10, C2_10}, // k61 KC_O
|
||||
{0, C2_11, C2_11, C2_11}, // k62 KC_P
|
||||
{0, C2_12, C2_12, C2_12}, // k63 KC_LBRC
|
||||
{0, C2_13, C2_13, C2_13}, // k64 KC_RBRC
|
||||
{0, C2_14, C2_14, C2_14}, // k65 KC_BSLS
|
||||
{0, C2_15, C2_15, C2_15}, // k67 KC_PGDN
|
||||
{0, C3_1, C3_1, C3_1}, // k20 KC_CAPS
|
||||
{0, C3_2, C3_2, C3_2}, // k21 KC_A
|
||||
{0, C3_3, C3_3, C3_3}, // k22 KC_S
|
||||
{0, C3_4, C3_4, C3_4}, // k23 KC_D
|
||||
{0, C3_5, C3_5, C3_5}, // k24 KC_F
|
||||
{0, C3_6, C3_6, C3_6}, // k25 KC_G
|
||||
{0, C3_7, C3_7, C3_7}, // k26 KC_H
|
||||
{0, C3_8, C3_8, C3_8}, // k27 KC_J
|
||||
{0, C3_9, C3_9, C3_9}, // k70 KC_K
|
||||
{0, C3_10, C3_10, C3_10}, // k71 KC_L
|
||||
{0, C3_11, C3_11, C3_11}, // k72 KC_SCLN
|
||||
{0, C3_12, C3_12, C3_12}, // k73 KC_QUOT
|
||||
{0, C3_14, C3_14, C3_14}, // k75 KC_ENT
|
||||
{0, C4_1, C4_1, C4_1}, // k30 KC_LSFT
|
||||
{0, C4_2, C4_2, C4_2}, // k32 KC_Z
|
||||
{0, C4_3, C4_3, C4_3}, // k33 KC_X
|
||||
{0, C4_4, C4_4, C4_4}, // k34 KC_C
|
||||
{0, C4_5, C4_5, C4_5}, // k35 KC_V
|
||||
{0, C4_6, C4_6, C4_6}, // k36 KC_B
|
||||
{0, C4_7, C4_7, C4_7}, // k37 KC_N
|
||||
{0, C4_9, C4_9, C4_9}, // k80 KC_M
|
||||
{0, C4_10, C4_10, C4_10}, // k81 KC_COMM
|
||||
{0, C4_11, C4_11, C4_11}, // k82 KC_DOT
|
||||
{0, C4_12, C4_12, C4_12}, // k83 KC_SLSH
|
||||
{0, C4_13, C4_13, C4_13}, // k85 KC_RSFT
|
||||
{0, C4_14, C4_14, C4_14}, // k86 KC_UP
|
||||
{0, C5_1, C5_1, C5_1}, // k40 KC_LCTL
|
||||
{0, C5_2, C5_2, C5_2}, // k41 KC_LGUI
|
||||
{0, C5_3, C5_3, C5_3}, // k42 KC_LALT
|
||||
{0, C5_4, C5_4, C5_4}, // Unassociated between LALT and SPACE_2.75
|
||||
{0, C5_5, C5_5, C5_5}, // k45 KC_SPC SPACE_2.75
|
||||
{0, C5_6, C5_6, C5_6}, // k45 KC_SPC SPACE_6.75
|
||||
{0, C5_7, C5_7, C5_7}, // k46 KC_SPC SPACE_2.25
|
||||
{0, C5_8, C5_8, C5_8}, // Unassociated between SPACE_2.25 and SPACE_1.25
|
||||
{0, C5_9, C5_9, C5_9}, // k90 KC_RGUI
|
||||
{0, C5_10, C5_10, C5_10}, // k92 KC_RALT
|
||||
{0, C5_11, C5_11, C5_11}, // k93 MO(_FL)
|
||||
{0, C5_12, C5_12, C5_12}, // k94 KC_RCTL
|
||||
{0, C5_13, C5_13, C5_13}, // k95 KC_LEFT
|
||||
{0, C5_14, C5_14, C5_14}, // k96 KC_DOWN
|
||||
{0, C5_15, C5_15, C5_15} // k97 KC_RGHT
|
||||
};
|
||||
|
||||
void backlight_set(uint8_t level) {
|
||||
if ( level == 0 ) {
|
||||
// Turn off light
|
||||
PORTD |= (1<<0); // Esc
|
||||
PORTD |= (1<<4); // Page Up
|
||||
PORTD |= (1<<1); // Arrows
|
||||
} else {
|
||||
// Turn on light
|
||||
PORTD &= ~(1<<0); // Esc
|
||||
PORTD &= ~(1<<4); // Page Up
|
||||
PORTD &= ~(1<<1); // Arrows
|
||||
}
|
||||
}
|
||||
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
|
||||
void led_init_ports() {
|
||||
// * Set our LED pins as output
|
||||
DDRB |= (1<<4);
|
||||
}
|
||||
/*{row | col << 4}
|
||||
| LED_ROW_COL(row, col)
|
||||
| | modifier
|
||||
| | | */
|
||||
{{0|(1<<4)}, {0, 0}, 1}, // k00 KC_GESC
|
||||
{{0|(2<<4)}, {14.45, 0}, 0}, // k01 KC_1
|
||||
{{0|(3<<4)}, {28.9, 0}, 0}, // k02 KC_2
|
||||
{{0|(4<<4)}, {43.35, 0}, 0}, // k03 KC_3
|
||||
{{0|(5<<4)}, {57.8, 0}, 0}, // k04 KC_4
|
||||
{{0|(6<<4)}, {72.25, 0}, 0}, // k05 KC_5
|
||||
{{0|(7<<4)}, {86.7, 0}, 0}, // k06 KC_6
|
||||
{{0|(8<<4)}, {101.2, 0}, 0}, // k07 KC_7
|
||||
{{0|(9<<4)}, {115.6, 0}, 0}, // k50 KC_8
|
||||
{{0|(10<<4)}, {130, 0}, 0}, // k51 KC_9
|
||||
{{0|(11<<4)}, {144.5, 0}, 0}, // k52 KC_0
|
||||
{{0|(12<<4)}, {159, 0}, 0}, // k53 KC_MINS
|
||||
{{0|(13<<4)}, {173.4, 0}, 0}, // k54 KC_EQL
|
||||
{{0|(14<<4)}, {195.1, 0}, 1}, // k55 KC_BSPC
|
||||
{{0|(15<<4)}, {224, 0}, 1}, // k57 KC_PGUP
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
DDRB |= (1<<4);
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
// Turn capslock on
|
||||
PORTB |= (1<<4);
|
||||
} else {
|
||||
// Turn capslock off
|
||||
PORTB &= ~(1<<4);
|
||||
}
|
||||
}
|
||||
{{1|(0<<4)}, {3.6125, 16}, 1}, // k10 KC_TAB
|
||||
{{1|(1<<4)}, {21.675, 16}, 0}, // k11 KC_Q
|
||||
{{1|(2<<4)}, {36.125, 16}, 0}, // k12 KC_W
|
||||
{{1|(3<<4)}, {50.575, 16}, 0}, // k13 KC_E
|
||||
{{1|(4<<4)}, {65.025, 16}, 0}, // k14 KC_R
|
||||
{{1|(5<<4)}, {79.475, 16}, 0}, // k15 KC_T
|
||||
{{1|(6<<4)}, {93.925, 16}, 0}, // k16 KC_Y
|
||||
{{1|(7<<4)}, {108.375, 16}, 0}, // k17 KC_U
|
||||
{{1|(8<<4)}, {122.825, 16}, 0}, // k60 KC_I
|
||||
{{1|(9<<4)}, {137.275, 16}, 0}, // k61 KC_O
|
||||
{{1|(10<<4)}, {151.725, 16}, 0}, // k62 KC_P
|
||||
{{1|(11<<4)}, {166.175, 16}, 0}, // k63 KC_LBRC
|
||||
{{1|(12<<4)}, {180.625, 16}, 0}, // k64 KC_RBRC
|
||||
{{1|(13<<4)}, {198.6875, 16}, 1}, // k65 KC_BSLS
|
||||
{{1|(14<<4)}, {224, 16}, 1}, // k67 KC_PGDN
|
||||
|
||||
{{2|(0<<4)}, {5.41875, 32}, 1}, // k20 KC_CAPS
|
||||
{{2|(1<<4)}, {25.2875, 32}, 0}, // k21 KC_A
|
||||
{{2|(2<<4)}, {39.7375, 32}, 0}, // k22 KC_S
|
||||
{{2|(3<<4)}, {54.1875, 32}, 0}, // k23 KC_D
|
||||
{{2|(4<<4)}, {68.6375, 32}, 0}, // k24 KC_F
|
||||
{{2|(5<<4)}, {83.0875, 32}, 0}, // k25 KC_G
|
||||
{{2|(6<<4)}, {97.5375, 32}, 0}, // k26 KC_H
|
||||
{{2|(7<<4)}, {111.9875, 32}, 0}, // k27 KC_J
|
||||
{{2|(8<<4)}, {126.4375, 32}, 0}, // k70 KC_K
|
||||
{{2|(9<<4)}, {140.8875, 32}, 0}, // k71 KC_L
|
||||
{{2|(10<<4)}, {155.3375, 32}, 0}, // k72 KC_SCLN
|
||||
{{2|(11<<4)}, {169.7875, 32}, 0}, // k73 KC_QUOT
|
||||
{{2|(12<<4)}, {184.2375, 32}, 1}, // k75 KC_ENT
|
||||
|
||||
{{3|(0<<4)}, {16.25625, 48}, 1}, // k30 KC_LSFT
|
||||
{{3|(1<<4)}, {32.5125, 48}, 0}, // k32 KC_Z
|
||||
{{3|(2<<4)}, {46.9625, 48}, 0}, // k33 KC_X
|
||||
{{3|(3<<4)}, {61.4125, 48}, 0}, // k34 KC_C
|
||||
{{3|(4<<4)}, {75.8625, 48}, 0}, // k35 KC_V
|
||||
{{3|(5<<4)}, {90.3125, 48}, 0}, // k36 KC_B
|
||||
{{3|(6<<4)}, {104.7625, 48}, 0}, // k37 KC_N
|
||||
{{3|(7<<4)}, {119.2125, 48}, 0}, // k80 KC_M
|
||||
{{3|(8<<4)}, {133.6625, 48}, 0}, // k81 KC_COMM
|
||||
{{3|(9<<4)}, {148.1125, 48}, 0}, // k82 KC_DOT
|
||||
{{3|(10<<4)}, {162.5625, 48}, 0}, // k83 KC_SLSH
|
||||
{{3|(11<<4)}, {187.85, 48}, 1}, // k85 KC_RSFT
|
||||
{{3|(12<<4)}, {209.525, 48}, 1}, // k86 KC_UP
|
||||
|
||||
{{4|(0<<4)}, {9.03125, 64}, 1}, // k40 KC_LCTL
|
||||
{{4|(1<<4)}, {27.09375, 64}, 1}, // k41 KC_LGUI
|
||||
{{4|(2<<4)}, {45.15625, 64}, 1}, // k42 KC_LALT
|
||||
{{4|(3<<4)}, {59.45, 64}, 1}, // Unassociated between LALT and SPACE_2.75
|
||||
{{4|(4<<4)}, {73.9, 64}, 1}, // k45 KC_SPC SPACE_2.75
|
||||
{{4|(5<<4)}, {88.35, 64}, 1}, // k45 KC_SPC SPACE_6.25
|
||||
{{4|(6<<4)}, {102.8, 64}, 1}, // k46 KC_SPC SPACE_2.25
|
||||
{{4|(7<<4)}, {117.40625, 64}, 1}, // Unassociated between SPACE_2.25 and SPACE_2.75
|
||||
{{4|(8<<4)}, {135.46875, 64}, 1}, // k90 KC_RGUI
|
||||
{{4|(9<<4)}, {153.53125, 64}, 1}, // k92 KC_RALT
|
||||
{{4|(10<<4)}, {167.98125, 64}, 1}, // k93 MO(_FL)
|
||||
{{4|(11<<4)}, {186.04375, 64}, 1}, // k94 KC_RCTL
|
||||
{{4|(12<<4)}, {195.075, 64}, 1}, // k95 KC_LEFT
|
||||
{{4|(13<<4)}, {209.525, 64}, 1}, // k96 KC_DOWN
|
||||
{{4|(14<<4)}, {224, 64}, 1} // k97 KC_RGHT
|
||||
};
|
||||
#endif
|
||||
|
@ -1,67 +1,89 @@
|
||||
/* Copyright 2017 Clueboard <info@clueboard.co>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
#include "quantum.h"
|
||||
|
||||
/*
|
||||
* These are shortcuts to help you work with the various layout options. If your
|
||||
* keymap works with one of the LAYOUT_...() macros you are encouraged to use that
|
||||
* and to contribute your keymap to the corresponding layout in
|
||||
* `qmk_firmware/layouts/community`.
|
||||
*/
|
||||
|
||||
/* Clueboard matrix layout
|
||||
* ,-----------------------------------------------------------. ,---.
|
||||
* | 00| 01| 02| 03| 04| 05| 06| 07| 50| 51| 52| 53| 54| 56| | 57|
|
||||
* | 00| 01| 02| 03| 04| 05| 06| 07| 50| 51| 52| 53| 54| 56 | | 57|
|
||||
* |-----------------------------------------------------------| |---|
|
||||
* | 10| 11| 12| 13| 14| 15| 16| 17| 60| 61| 62| 63| 64| 65| | 67|
|
||||
* |-----------------------------------------------------------| `---'
|
||||
* | 20| 21| 22| 23| 24| 25| 26| 27| 70| 71| 72| 73| 75|
|
||||
* |-------------------------------------------------------------.
|
||||
* | 30| 32| 33| 34| 35| 36| 37| 80| 81| 82| 83| 85| 86|
|
||||
* |-----------------------------------------------------------------.
|
||||
* | 40| 41| 42| 45| 46| 90| 92| 93| 94| 95| 96| 97|
|
||||
* `-----------------------------------------------------------------'
|
||||
* |--------------------------------------------------------------.
|
||||
* | 30 | 32| 33| 34| 35| 36| 37| 80| 81| 82| 83| 85 |86|
|
||||
* |------------------------------------------------------------------.
|
||||
* | 40| 41| 42| 45| 46| 90| 92| 93| 94| 95|96| 97|
|
||||
* `------------------------------------------------------------------'
|
||||
* ,-----------------------------------------------------------. ,---.
|
||||
* | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|
|
||||
* |-----------------------------------------------------------| |---|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|
|
||||
* |-----------------------------------------------------------| `---'
|
||||
* |Caps | A| S| D| F| G| H| J| k| L| ;| '|Enter |
|
||||
* |-------------------------------------------------------------.
|
||||
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |
|
||||
* |-----------------------------------------------------------------.
|
||||
* |Ctrl|Alt |Gui | Space| Space|Gui |Alt |Fn |Ctrl|Lft|Dwn|Rgt|
|
||||
* `-----------------------------------------------------------------'
|
||||
* |--------------------------------------------------------------.
|
||||
* |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift| Up|
|
||||
* |------------------------------------------------------------------.
|
||||
* |Ctrl|Alt|Gui | Space| Space|Gui |Alt |Fn |Ctrl|Left|Down|Rgt|
|
||||
* `------------------------------------------------------------------'
|
||||
*/
|
||||
// The first section contains all of the arguments
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
|
||||
#define LAYOUT( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k56, k57, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k75, \
|
||||
k30, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k85, k86, \
|
||||
k40, k41, k42, k45, k46, k90, k92, k93, k94, k95, k96, k97 \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k55, k57, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k75, \
|
||||
k30, k31, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k84, k85, k86, \
|
||||
k40, k41, k42, k45, k46, k90, k92, k93, k94, k95, k96, k97 \
|
||||
) { \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07 }, \
|
||||
{ k10, k11, k12, k13, k14, k15, k16, k17 }, \
|
||||
{ k20, k21, k22, k23, k24, k25, k26, k27 }, \
|
||||
{ k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \
|
||||
{ k40, k41, k42, KC_NO, KC_NO, k45, k46, KC_NO }, \
|
||||
{ k50, k51, k52, k53, k54, KC_NO, k56, k57 }, \
|
||||
{ k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \
|
||||
{ k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \
|
||||
{ k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \
|
||||
{ k90, KC_NO, k92, k93, k94, k95, k96, k97 } \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07 }, \
|
||||
{ k10, k11, k12, k13, k14, k15, k16, k17 }, \
|
||||
{ k20, k21, k22, k23, k24, k25, k26, k27 }, \
|
||||
{ k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \
|
||||
{ k40, k41, k42, KC_NO, KC_NO, k45, k46, KC_NO }, \
|
||||
{ k50, k51, k52, k53, k54, k55, KC_NO, k57 }, \
|
||||
{ k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \
|
||||
{ k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \
|
||||
{ k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \
|
||||
{ k90, KC_NO, k92, k93, k94, k95, k96, k97 } \
|
||||
}
|
||||
|
||||
#define LAYOUT_66_ansi( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k56, k57, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k75, \
|
||||
k30, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k85, k86, \
|
||||
k40, k41, k42, k46, k92, k93, k94, k95, k96, k97 \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k55, k57, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k75, \
|
||||
k30, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k85, k86, \
|
||||
k40, k41, k42, k46, k92, k93, k94, k95, k96, k97 \
|
||||
) { \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07 }, \
|
||||
{ k10, k11, k12, k13, k14, k15, k16, k17 }, \
|
||||
{ k20, k21, k22, k23, k24, k25, k26, k27 }, \
|
||||
{ k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \
|
||||
{ k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO }, \
|
||||
{ k50, k51, k52, k53, k54, KC_NO, k56, k57 }, \
|
||||
{ k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \
|
||||
{ k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \
|
||||
{ k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \
|
||||
{ KC_NO, KC_NO, k92, k93, k94, k95, k96, k97 } \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07 }, \
|
||||
{ k10, k11, k12, k13, k14, k15, k16, k17 }, \
|
||||
{ k20, k21, k22, k23, k24, k25, k26, k27 }, \
|
||||
{ k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \
|
||||
{ k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO }, \
|
||||
{ k50, k51, k52, k53, k54, k55, KC_NO, k57 }, \
|
||||
{ k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \
|
||||
{ k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \
|
||||
{ k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \
|
||||
{ KC_NO, KC_NO, k92, k93, k94, k95, k96, k97 } \
|
||||
}
|
||||
|
@ -1,24 +1,58 @@
|
||||
EXTRAFLAGS += -flto
|
||||
LAYOUTS = 66_ansi
|
||||
MCU = atmega32u4
|
||||
F_CPU = 16000000
|
||||
ARCH = AVR8
|
||||
F_USB = $(F_CPU)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
# project specific files
|
||||
SRC = led.c
|
||||
LAYOUTS += 66_ansi
|
||||
|
||||
## chip/board settings
|
||||
# - the next two should match the directories in
|
||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||
MCU_FAMILY = STM32
|
||||
MCU_SERIES = STM32F3xx
|
||||
|
||||
# Linker script to use
|
||||
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||
# or <this_dir>/ld/
|
||||
MCU_LDSCRIPT = STM32F303xC
|
||||
|
||||
# Startup code to use
|
||||
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
|
||||
MCU_STARTUP = stm32f3xx
|
||||
|
||||
# Board: it should exist either in <chibios>/os/hal/boards/
|
||||
# or <this_dir>/boards
|
||||
BOARD = GENERIC_STM32_F303XC
|
||||
|
||||
# Cortex version
|
||||
MCU = cortex-m4
|
||||
|
||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||
ARMV = 7
|
||||
|
||||
USE_FPU = yes
|
||||
|
||||
# Vector table for application
|
||||
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
|
||||
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
|
||||
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
|
||||
OPT_DEFS =
|
||||
|
||||
# Options to pass to dfu-util when flashing
|
||||
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
|
||||
|
||||
# LED Configuration
|
||||
#RGB_MATRIX_ENABLE = IS31FL3731
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BACKLIGHT_ENABLE = yes
|
||||
BOOTMAGIC_ENABLE = no
|
||||
MOUSEKEY_ENABLE = no
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = yes
|
||||
COMMAND_ENABLE = no
|
||||
NKRO_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = no
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
#CUSTOM_MATRIX = yes # Custom matrix file
|
||||
AUDIO_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = yes
|
||||
MIDI_ENABLE = no
|
||||
UNICODE_ENABLE = no
|
||||
BLUETOOTH_ENABLE = no
|
||||
# SERIAL_LINK_ENABLE = yes
|
||||
|
@ -1,129 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 skully <skullydazed@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xC1ED
|
||||
#define PRODUCT_ID 0x2391
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Clueboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 10
|
||||
#define MATRIX_COLS 8
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
/* Note: These are not used for arm boards. They're here purely as documentation.
|
||||
* #define MATRIX_ROW_PINS { PB11, PA6, PA3, PA2, PA1, PB5, PB6, PC15, PC14, PC13 }
|
||||
* #define MATRIX_COL_PINS { PB10, PB2, PB1, PB0, PA7, PB4, PB3, PB7 }
|
||||
* #define UNUSED_PINS { A0, A8, A15, B12, B13, B14, B15 }
|
||||
*/
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 6
|
||||
|
||||
/* Prevent modifiers from being stuck on after layer changes. */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
//#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
//#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
//#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||
|
||||
#endif
|
||||
|
||||
/* Backlight configuration
|
||||
*/
|
||||
#define BACKLIGHT_LEVELS 1
|
@ -1,22 +0,0 @@
|
||||
/* Copyright 2017 Clueboard <info@clueboard.co>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "gen2.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
# project specific files
|
||||
SRC = matrix.c \
|
||||
led.c
|
||||
LAYOUTS += 66_ansi
|
||||
|
||||
## chip/board settings
|
||||
# - the next two should match the directories in
|
||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||
MCU_FAMILY = STM32
|
||||
MCU_SERIES = STM32F3xx
|
||||
|
||||
# Linker script to use
|
||||
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||
# or <this_dir>/ld/
|
||||
MCU_LDSCRIPT = STM32F303xC
|
||||
|
||||
# Startup code to use
|
||||
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
|
||||
MCU_STARTUP = stm32f3xx
|
||||
|
||||
# Board: it should exist either in <chibios>/os/hal/boards/
|
||||
# or <this_dir>/boards
|
||||
BOARD = GENERIC_STM32_F303XC
|
||||
|
||||
# Cortex version
|
||||
MCU = cortex-m4
|
||||
|
||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||
ARMV = 7
|
||||
|
||||
USE_FPU = yes
|
||||
|
||||
# Vector table for application
|
||||
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
|
||||
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
|
||||
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
|
||||
OPT_DEFS =
|
||||
|
||||
# Options to pass to dfu-util when flashing
|
||||
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BACKLIGHT_ENABLE = no
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
CUSTOM_MATRIX = yes # Custom matrix file
|
||||
AUDIO_ENABLE = yes
|
||||
# SERIAL_LINK_ENABLE = yes
|
@ -0,0 +1,51 @@
|
||||
#pragma once
|
||||
#include "config_common.h"
|
||||
|
||||
#define PRODUCT_ID 0x2390
|
||||
#define DEVICE_VER 0x0001
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 10
|
||||
#define MATRIX_COLS 8
|
||||
|
||||
// ROWS: Top to bottom, COLS: Left to right
|
||||
/* Row pin configuration
|
||||
* row: 0 1 2 3 4 5 6 7 8 9
|
||||
* pin: B2 C7 C6 B6 B5 B0 B3 D5 D3 D2
|
||||
*/
|
||||
|
||||
#define MATRIX_ROW_PINS { B2, C7, C6, B6, B5, B0, B3, D5, D3, D2 }
|
||||
/* Column pin configuration
|
||||
* col: 0 1 2 3 4 5 6 7
|
||||
* pin: F0 F1 F4 F5 F6 F7 E6 B1
|
||||
*/
|
||||
#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, E6, B1 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* Speaker configuration
|
||||
*/
|
||||
#define B7_AUDIO
|
||||
#define NO_MUSIC_MODE
|
||||
#define AUDIO_CLICKY
|
||||
|
||||
/* Backlight configuration
|
||||
*/
|
||||
#define BACKLIGHT_LEVELS 1
|
||||
|
||||
/* Underlight configuration
|
||||
*/
|
||||
#define RGB_DI_PIN D7
|
||||
#define RGBLED_NUM 26 // Number of LEDs
|
||||
#define RGBLIGHT_HUE_STEP 32
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||
#define RGBLIGHT_EFFECT_BREATHE_MAX 200
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 666*2
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 4 // How many LEDs wide to light up
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 16 // The led to start at
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 8 // How many LEDs to travel
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // How many LEDs wide to light up
|
@ -0,0 +1,63 @@
|
||||
#include "prototype.h"
|
||||
#include <avr/io.h>
|
||||
#include "backlight.h"
|
||||
#include "print.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
matrix_init_user();
|
||||
led_init_ports();
|
||||
|
||||
// JTAG disable for PORT F. write JTD bit twice within four cycles.
|
||||
MCUCR |= (1<<JTD);
|
||||
MCUCR |= (1<<JTD);
|
||||
}
|
||||
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
void backlight_init_ports(void) {
|
||||
print("init_backlight_pin()\n");
|
||||
// Set our LED pins as output
|
||||
DDRD |= (1<<0); // Esc
|
||||
DDRD |= (1<<4); // Page Up
|
||||
DDRD |= (1<<1); // Arrows
|
||||
|
||||
// Set our LED pins low
|
||||
PORTD &= ~(1<<0); // Esc
|
||||
PORTD &= ~(1<<4); // Page Up
|
||||
PORTD &= ~(1<<1); // Arrows
|
||||
}
|
||||
|
||||
void backlight_set(uint8_t level) {
|
||||
if ( level == 0 ) {
|
||||
// Turn off light
|
||||
PORTD |= (1<<0); // Esc
|
||||
PORTD |= (1<<4); // Page Up
|
||||
PORTD |= (1<<1); // Arrows
|
||||
} else {
|
||||
// Turn on light
|
||||
PORTD &= ~(1<<0); // Esc
|
||||
PORTD &= ~(1<<4); // Page Up
|
||||
PORTD &= ~(1<<1); // Arrows
|
||||
}
|
||||
}
|
||||
|
||||
void led_init_ports() {
|
||||
// * Set our LED pins as output
|
||||
DDRB |= (1<<4);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
DDRB |= (1<<4);
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
// Turn capslock on
|
||||
PORTB |= (1<<4);
|
||||
} else {
|
||||
// Turn capslock off
|
||||
PORTB &= ~(1<<4);
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
EXTRAFLAGS += -flto
|
||||
LAYOUTS = 66_ansi
|
||||
MCU = atmega32u4
|
||||
F_CPU = 16000000
|
||||
ARCH = AVR8
|
||||
F_USB = $(F_CPU)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BACKLIGHT_ENABLE = yes
|
||||
BOOTMAGIC_ENABLE = no
|
||||
MOUSEKEY_ENABLE = no
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = yes
|
||||
COMMAND_ENABLE = no
|
||||
NKRO_ENABLE = yes
|
||||
AUDIO_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = yes
|
||||
MIDI_ENABLE = no
|
||||
UNICODE_ENABLE = no
|
||||
BLUETOOTH_ENABLE = no
|
Loading…
Reference in new issue