Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Drakon #10071

Merged
merged 39 commits into from
Aug 23, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
049a3b0
Drakon60
JagdPietr Aug 10, 2020
0e7b415
Merge branch 'master' of https://github.com/qmk/qmk_firmware
JagdPietr Aug 10, 2020
b4f97d3
Updates
JagdPietr Aug 17, 2020
6da8482
Update: Deletion of XXX in WKL keymap
JagdPietr Aug 17, 2020
1ef2893
Update keymap.c
JagdPietr Aug 19, 2020
d47f02a
Revert "Updates"
JagdPietr Aug 19, 2020
29e327b
Update keyboards/drakon/info.json
JagdPietr Aug 19, 2020
cb94396
Update keyboards/drakon/info.json
JagdPietr Aug 19, 2020
5780b64
Update keyboards/drakon/info.json
JagdPietr Aug 19, 2020
91e7040
Update keyboards/drakon/config.h
JagdPietr Aug 19, 2020
de8a6c7
Update keyboards/drakon/config.h
JagdPietr Aug 19, 2020
96c35a7
Update keyboards/drakon/rules.mk
JagdPietr Aug 19, 2020
7682a9d
Update keyboards/drakon/rules.mk
JagdPietr Aug 19, 2020
3dd98d1
Update keyboards/drakon/rules.mk
JagdPietr Aug 19, 2020
0ebcb13
Update keyboards/drakon/rules.mk
JagdPietr Aug 19, 2020
eca07bd
Update keyboards/drakon/keymaps/wkl/readme.md
JagdPietr Aug 19, 2020
562252d
Update keyboards/drakon/keymaps/logo/keymap.c
JagdPietr Aug 19, 2020
2ee47e2
Update keyboards/drakon/keymaps/default/keymap.c
JagdPietr Aug 19, 2020
ce30287
Update keyboards/drakon/keymaps/wkl/keymap.c
JagdPietr Aug 19, 2020
c6a350a
Update keyboards/drakon/config.h
JagdPietr Aug 19, 2020
72a75cf
Update keyboards/drakon/config.h
JagdPietr Aug 19, 2020
4d3c71d
Update keyboards/drakon/keymaps/logo/readme.md
JagdPietr Aug 19, 2020
ef94240
Update keyboards/drakon/config.h
JagdPietr Aug 20, 2020
0688f05
Update keyboards/drakon/readme.md
JagdPietr Aug 20, 2020
ec868c5
Update keyboards/drakon/rules.mk
JagdPietr Aug 20, 2020
ada7da6
Update keyboards/drakon/drakon.c
JagdPietr Aug 20, 2020
c2f77ec
Update config.h
JagdPietr Aug 20, 2020
e893590
Update config.h
JagdPietr Aug 20, 2020
d0fc960
Update config.h
JagdPietr Aug 20, 2020
615aa04
Update config.h
JagdPietr Aug 20, 2020
57232d1
Update keymap.c
JagdPietr Aug 20, 2020
d4b5537
Deletion of File
JagdPietr Aug 20, 2020
8db9833
Delete config.h
JagdPietr Aug 20, 2020
73c567c
Delete config.h
JagdPietr Aug 20, 2020
f3073a7
Delete config.h
JagdPietr Aug 20, 2020
9ae0ec3
Update keyboards/drakon/config.h
JagdPietr Aug 22, 2020
87d71db
Update keyboards/drakon/keymaps/wkl/keymap.c
JagdPietr Aug 22, 2020
aafcd70
Update keyboards/drakon/keymaps/default/keymap.c
JagdPietr Aug 22, 2020
78a035b
Update keyboards/drakon/keymaps/wkl/keymap.c
JagdPietr Aug 22, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
254 changes: 254 additions & 0 deletions keyboards/drakon/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
/*
JagdPietr marked this conversation as resolved.
Show resolved Hide resolved
Copyright 2020 jagdpietr

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"

/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0000
JagdPietr marked this conversation as resolved.
Show resolved Hide resolved
#define DEVICE_VER 0x0001
#define MANUFACTURER jagdpietr
#define PRODUCT drakon
#define DESCRIPTION Custom 60% with OLED and ALPS Encoder
JagdPietr marked this conversation as resolved.
Show resolved Hide resolved

/* key matrix size */
#define MATRIX_ROWS 6
#define MATRIX_COLS 14

/*
* 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 { C7, B5, B6, B0, B1, F1 }
#define MATRIX_COL_PINS { F4, F5, F6, F7, C6, B2, B3, B7, D3, D5, D4, D6, D7, B4 }
#define UNUSED_PINS

/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW

#define ENCODERS_PAD_A { D2 }
#define ENCODERS_PAD_B { F0 }

/*
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
*/
#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6

// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3

// #define RGB_DI_PIN E2
// #ifdef RGB_DI_PIN
// #define RGBLED_NUM 16
// #define RGBLIGHT_HUE_STEP 8
// #define RGBLIGHT_SAT_STEP 8
// #define RGBLIGHT_VAL_STEP 8
// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
// /*== all animations enable ==*/
// #define RGBLIGHT_ANIMATIONS
// /*== or choose animations ==*/
// #define RGBLIGHT_EFFECT_BREATHING
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
// #define RGBLIGHT_EFFECT_SNAKE
// #define RGBLIGHT_EFFECT_KNIGHT
// #define RGBLIGHT_EFFECT_CHRISTMAS
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
// #define RGBLIGHT_EFFECT_RGB_TEST
// #define RGBLIGHT_EFFECT_ALTERNATING
// /*== customize breathing effect ==*/
// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
// /*==== use exp() and sin() ====*/
// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
// #endif

JagdPietr marked this conversation as resolved.
Show resolved Hide resolved
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5

/* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST

/* 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

/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
*/
// #define GRAVE_ESC_CTRL_OVERRIDE

/*
* 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

/*
* Magic Key Options
*
* Magic keys are hotkey commands that allow control over firmware functions of
* the keyboard. They are best used in combination with the HID Listen program,
* found here: https://www.pjrc.com/teensy/hid_listen.html
*
* The options below allow the magic key functionality to be changed. This is
* useful if your keyboard/keypad is missing keys and you want magic key support.
*
*/

/* key combination for magic key command */
/* defined by default; to change, uncomment and set to the combination you want */
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)

/* control how magic key switches layers */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false

/* override magic key keymap */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
//#define MAGIC_KEY_HELP H
//#define MAGIC_KEY_HELP_ALT SLASH
//#define MAGIC_KEY_DEBUG D
//#define MAGIC_KEY_DEBUG_MATRIX X
//#define MAGIC_KEY_DEBUG_KBD K
//#define MAGIC_KEY_DEBUG_MOUSE M
//#define MAGIC_KEY_VERSION V
//#define MAGIC_KEY_STATUS S
//#define MAGIC_KEY_CONSOLE C
//#define MAGIC_KEY_LAYER0 0
//#define MAGIC_KEY_LAYER0_ALT GRAVE
//#define MAGIC_KEY_LAYER1 1
//#define MAGIC_KEY_LAYER2 2
//#define MAGIC_KEY_LAYER3 3
//#define MAGIC_KEY_LAYER4 4
//#define MAGIC_KEY_LAYER5 5
//#define MAGIC_KEY_LAYER6 6
//#define MAGIC_KEY_LAYER7 7
//#define MAGIC_KEY_LAYER8 8
//#define MAGIC_KEY_LAYER9 9
//#define MAGIC_KEY_BOOTLOADER B
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
//#define MAGIC_KEY_LOCK CAPS
//#define MAGIC_KEY_EEPROM E
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
//#define MAGIC_KEY_NKRO N
//#define MAGIC_KEY_SLEEP_LED Z
JagdPietr marked this conversation as resolved.
Show resolved Hide resolved

/*
* 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

/* disable these deprecated features by default */
#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

/*
* HD44780 LCD Display Configuration
*/
/*
#define LCD_LINES 2 //< number of visible lines of the display
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display

#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode

#if LCD_IO_MODE
#define LCD_PORT PORTB //< port for the LCD lines
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
#define LCD_RS_PORT LCD_PORT //< port for RS line
#define LCD_RS_PIN 3 //< pin for RS line
#define LCD_RW_PORT LCD_PORT //< port for RW line
#define LCD_RW_PIN 2 //< pin for RW line
#define LCD_E_PORT LCD_PORT //< port for Enable line
#define LCD_E_PIN 1 //< pin for Enable line
#endif
*/

/* Bootmagic Lite key configuration */
// #define BOOTMAGIC_LITE_ROW 0
// #define BOOTMAGIC_LITE_COLUMN 0
JagdPietr marked this conversation as resolved.
Show resolved Hide resolved
113 changes: 113 additions & 0 deletions keyboards/drakon/drakon.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
/* Copyright 2020 jagdpietr
*
* 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 "drakon.h"

// Optional override functions below.
// You can leave any or all of these undefined.
// These are only required if you want to perform custom actions.

/*
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up

matrix_init_user();
}

void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)

matrix_scan_user();
}

bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware

return process_record_user(keycode, record);
}

bool led_update_kb(led_t led_state) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
#ifdef OLED_DRIVER_ENABLE
static uint8_t caps_state = 0;
if (caps_state != led_state.caps_lock) {
led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false;
caps_state = led_state.caps_lock;
}
#endif

return led_update_user(led_state);
}

void render_logo(void) {
static const char PROGMEM drakon_logo[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x1c, 0x30, 0xe0, 0x00,
0x0f, 0xd0, 0xa0, 0x00, 0x07, 0x88, 0xc0, 0x00, 0x02, 0xcc, 0xa0, 0x00, 0x0c, 0x34, 0x10, 0x00,
0xff, 0x1a, 0x18, 0x00, 0x07, 0xef, 0x18, 0x00, 0x00, 0x3f, 0x28, 0x00, 0x00, 0x07, 0x85, 0x00,
0x04, 0x0b, 0x86, 0x00, 0x04, 0x0d, 0xc6, 0x00, 0x06, 0x0c, 0xc5, 0x00, 0x06, 0x0c, 0x61, 0x00,
0x0e, 0x08, 0x62, 0x40, 0x0a, 0x0a, 0x32, 0x40, 0x0a, 0x0a, 0x32, 0x40, 0x0a, 0x0c, 0x11, 0x00,
0x0f, 0x0c, 0x18, 0xa0, 0x0b, 0x0c, 0x08, 0xc0, 0x0d, 0x8c, 0x0c, 0xe0, 0x03, 0xe0, 0x04, 0xa0,
0x00, 0x3f, 0xf4, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

oled_write_P(drakon_logo, false);
}

#ifdef OLED_DRIVER_ENABLE

oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_90; // flips the display 90 degrees if offhand
}


void oled_task_user(void) {
// Host Keyboard Layer Status
oled_write_P(PSTR("Lyr: "), false);

switch (get_highest_layer(layer_state)) {
case _Base:
oled_write_P(PSTR("Base\n"), false);
break;
case _FN:
oled_write_P(PSTR("FN\n"), false);
break;
default:
// Or use the write_ln shortcut over adding '\n' to the end of your string
oled_write_ln_P(PSTR("Undefined"), false);


}
// Host Keyboard LED Status
led_t led_state = host_keyboard_led_state();
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);

void render_logo(void) {
static const char PROGMEM drakon_logo[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x98, 0xf8, 0x30, 0x30, 0x50, 0xd8, 0x8c, 0x30, 0x60, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
0x01, 0x01, 0x01, 0xf3, 0x03, 0x02, 0x02, 0x02, 0x06, 0xc5, 0x7e, 0xcf, 0x1f, 0x3c, 0xf0, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x7b, 0x77,
0xfc, 0xe0, 0xc0, 0x80, 0x80, 0x0f, 0x70, 0x7f, 0x00, 0x00, 0x00, 0x01, 0x0f, 0x3c, 0xf0, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00
};

oled_write_P(drakon_logo, false);
}
*/
JagdPietr marked this conversation as resolved.
Show resolved Hide resolved
Loading