forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for S7 Elephant (qmk#4511)
* Add support for S7 Elephant A high-end 70% custom keyboard designed and produced by jacky from Geekhack. * Polish S7 Elephant code Implement drashna's suggestions: - specify bootloader - remove unnecessary defines - use led_set_user() for LED logic * Correct info.json and s7_elephant.h Correct info.json and s7_elepant.h to follow QMK convention and fix a missing curly bracket.
- Loading branch information
Showing
9 changed files
with
1,201 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#pragma once | ||
|
||
#include "config_common.h" | ||
|
||
/* USB Device descriptor parameter */ | ||
#define VENDOR_ID 0xFEED | ||
#define PRODUCT_ID 0x0007 | ||
#define DEVICE_VER 0x0001 | ||
#define MANUFACTURER jacky | ||
#define PRODUCT S7 Elephant | ||
#define DESCRIPTION A high-end 70% custom keyboard | ||
|
||
/* key matrix size */ | ||
#define MATRIX_ROWS 5 | ||
#define MATRIX_COLS 16 | ||
|
||
/* key matrix pins */ | ||
#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } | ||
#define MATRIX_COL_PINS { B6, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7, F1 } | ||
#define UNUSED_PINS | ||
|
||
/* COL2ROW or ROW2COL */ | ||
#define DIODE_DIRECTION COL2ROW | ||
|
||
/* Set 0 if debouncing isn't needed */ | ||
#define DEBOUNCING_DELAY 5 | ||
|
||
/* 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 | ||
|
||
/* key combination for command */ | ||
#define IS_COMMAND() ( \ | ||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | ||
) | ||
|
||
#define RGB_DI_PIN E6 | ||
#ifdef RGB_DI_PIN | ||
#define RGBLIGHT_ANIMATIONS | ||
#define RGBLED_NUM 2 | ||
#define RGBLIGHT_HUE_STEP 8 | ||
#define RGBLIGHT_SAT_STEP 8 | ||
#define RGBLIGHT_VAL_STEP 8 | ||
#define RGBLIGHT_SLEEP | ||
#endif |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#define RGBLIGHT_LIMIT_VAL 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#include QMK_KEYBOARD_H | ||
|
||
enum custom_layers { | ||
_QWERTY, | ||
_FN | ||
}; | ||
|
||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
|
||
/* Qwerty | ||
* ,------. ,-------------------------------------------------------------------------------------------------. | ||
* | F1 | | Esc`~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc |Home | | ||
* |------| |-------------------------------------------------------------------------------------------------| | ||
* | F2 | | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | End | | ||
* |------| |-------------------------------------------------------------------------------------------------| | ||
* | F3 | | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | Ins | | ||
* |------| |-------------------------------------------------------------------------------------------------| | ||
* | F4 | | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | U | Del | | ||
* |------| |-------------------------------------------------------------------------------------------------| | ||
* | F5 | | Ctrl | Gui | Alt | Space | FN | RCtrl | L | D | R | | ||
* `------' `-------------------------------------------------------------------------------------------------' | ||
*/ | ||
|
||
[_QWERTY] = LAYOUT_ansi( | ||
KC_F1, KC_GESC, 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_BSPC, KC_INS, | ||
KC_F2, 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_DEL, | ||
KC_F3, 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_ENT, KC_HOME, | ||
KC_F4, KC_LSFT, 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_END, | ||
KC_F5, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
), | ||
|
||
/* FN | ||
* ,------. ,-------------------------------------------------------------------------------------------------. | ||
* |Reset | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr | ScrLck |Pause| | ||
* |------| |-------------------------------------------------------------------------------------------------| | ||
* | | | | | | | | | | | | | | | | | | | ||
* |------| |-------------------------------------------------------------------------------------------------| | ||
* | | | |Prev |Play |Next | | | | |VolD |Mute |VolU | | |PgUp | | ||
* |------| |-------------------------------------------------------------------------------------------------| | ||
* | | | | | | | | | | | | | | | |PgDn | | ||
* |------| |-------------------------------------------------------------------------------------------------| | ||
* |EEPRST| | | | | | | | | | | | ||
* `------' `-------------------------------------------------------------------------------------------------' | ||
*/ | ||
|
||
[_FN] = LAYOUT_ansi( | ||
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_PSCR, KC_SLCK, KC_PAUS, | ||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
_______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, KC_PGUP, | ||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, | ||
EEP_RST, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
), | ||
}; | ||
|
||
void led_set_user(uint8_t usb_led) { | ||
// Turn LEDs On/Off for Caps Lock | ||
if (host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) { | ||
rgblight_enable_noeeprom(); | ||
rgblight_sethsv_noeeprom(0, 0, 80); | ||
} else { | ||
rgblight_sethsv_noeeprom(0, 0, 80); | ||
rgblight_disable_noeeprom(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Default keymap for S7 Elephant | ||
|
||
**Features** | ||
|
||
* LEDs are functioning as Caps-Lock indicators | ||
|
||
## QWERTY (Normal) Layer | ||
``` | ||
,------. ,-------------------------------------------------------------------------------------------------. | ||
| F1 | | Esc`~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc |Home | | ||
|------| |-------------------------------------------------------------------------------------------------| | ||
| F2 | | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | End | | ||
|------| |-------------------------------------------------------------------------------------------------| | ||
| F3 | | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | Ins | | ||
|------| |-------------------------------------------------------------------------------------------------| | ||
| F4 | | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | U | Del | | ||
|------| |-------------------------------------------------------------------------------------------------| | ||
| F5 | | Ctrl | Gui | Alt | Space | FN | RAlt | RCtrl | L | D | R | | ||
`------' `-------------------------------------------------------------------------------------------------' | ||
``` | ||
|
||
## FN Layer | ||
``` | ||
,------. ,-------------------------------------------------------------------------------------------------. | ||
|Reset | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr | ScrLck |Pause| | ||
|------| |-------------------------------------------------------------------------------------------------| | ||
| | | | | | | | | | | | | | | | | | | ||
|------| |-------------------------------------------------------------------------------------------------| | ||
| | | |Prev |Play |Next | | | | |VolD |Mute |VolU | | |PgUp | | ||
|------| |-------------------------------------------------------------------------------------------------| | ||
| | | | | | | | | | | | | | | |PgDn | | ||
|------| |-------------------------------------------------------------------------------------------------| | ||
|EPRM | | | | | | | | | | | | | ||
`------' `-------------------------------------------------------------------------------------------------' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# S7 Elephant | ||
|
||
 | ||
|
||
A high-end 70% custom keyboard designed and produced by [jacky](https://geekhack.org/index.php?action=profile;u=63864) from Geekhack. | ||
|
||
Keyboard Maintainer: QMK Community | ||
Hardware Supported: S7 Elephant | ||
Hardware Availability: [The GB has ended with little chance to run again.](https://geekhack.org/index.php?topic=96434.0) | ||
|
||
Make example for this keyboard (after setting up your build environment): | ||
|
||
make s7_elephant:default:dfu | ||
|
||
To enter the bootloader, either short the pins on the PCB or the RESET button on the FN layer. | ||
|
||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# MCU name | ||
MCU = atmega32u4 | ||
|
||
# Processor frequency. | ||
# This will define a symbol, F_CPU, in all source code files equal to the | ||
# processor frequency in Hz. You can then use this symbol in your source code to | ||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
# automatically to create a 32-bit value in your source code. | ||
# | ||
# This will be an integer division of F_USB below, as it is sourced by | ||
# F_USB after it has run through any CPU prescalers. Note that this value | ||
# does not *change* the processor frequency - it should merely be updated to | ||
# reflect the processor speed set externally so that the code can use accurate | ||
# software delays. | ||
F_CPU = 16000000 | ||
|
||
# | ||
# LUFA specific | ||
# | ||
# Target architecture (see library "Board Types" documentation). | ||
ARCH = AVR8 | ||
|
||
# Input clock frequency. | ||
# This will define a symbol, F_USB, in all source code files equal to the | ||
# input clock frequency (before any prescaling is performed) in Hz. This value may | ||
# differ from F_CPU if prescaling is used on the latter, and is required as the | ||
# raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
# at the end, this will be done automatically to create a 32-bit value in your | ||
# source code. | ||
# | ||
# If no clock division is performed on the input clock inside the AVR (via the | ||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
F_USB = $(F_CPU) | ||
|
||
# Interrupt driven control endpoint task(+60) | ||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
|
||
BOOTLOADER = atmel-dfu | ||
|
||
# Build Options | ||
# comment out to disable the options. | ||
# | ||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | ||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
CONSOLE_ENABLE = no # Console for debug(+400) | ||
COMMAND_ENABLE = no # Commands for debug and configuration | ||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "s7_elephant.h" |
Oops, something went wrong.