1
0
Fork 0

Keyboard: adding Sentraq S65-Plus (#3406)

* New keyboard 'Sentraq S65-Plus'

* Change ANSI_KEYMAP to LAYOUT_ansi

* Use QMK_KEYBOARD_H as include
This commit is contained in:
Michael Zoech 2018-07-20 09:01:35 -07:00 committed by Drashna Jaelre
parent 738a9fc16c
commit c50e80e13b
6 changed files with 235 additions and 0 deletions

View file

@ -0,0 +1,55 @@
#ifndef CONFIG_H
#define CONFIG_H
#include "config_common.h"
/* USB Device descriptor parameter */
#define PRODUCT S65-PLUS
#define DESCRIPTION q.m.k. keyboard firmware for S65-PLUS
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER Sentraq
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 18
/* key matrix pins */
#define MATRIX_ROW_PINS { C7, C6, B6, B5, B4 }
#define MATRIX_COL_PINS { F6, F5, F4, F1, F0, E6, B0, B1, D5, B2, B3, D0, D1, D2, D4, D6, D7, F7 }
#define UNUSED_PINS
/* number of backlight levels */
#define BACKLIGHT_PIN B7
#define BACKLIGHT_LEVELS 3
#define RGB_DI_PIN D3
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 20
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 20
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not 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)) \
)
/* prevent stuck modifiers */
#define PREVENT_STUCK_MODIFIERS
#endif

View file

@ -0,0 +1,53 @@
#include QMK_KEYBOARD_H
#define _BL 0
#define _AL 1
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: Main layer
*
* F1 F2 ESC 1 2 3 4 5 6 7 8 9 0 - = BKSPC DEL
*
* F3 F4 TAB Q W E R T Y U I O P [ ] \ PG_UP
*
* F5 F6 CAPSL A S D F G H J K L ; ' ENTERPG_DN
*
* F7 F8 LSHFT Z X C V B N M , . / RSHFT UP END
*
* F9 F10 LCTRLL_GUIL_ALT SPC R_ALT FN0 RCTL LEFT DOWN RIGHT
*
*/
/* 0: ANSI qwerty */
[_BL] = LAYOUT_ansi(
KC_F1, KC_F2, 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_BSPC, KC_DEL, \
KC_F3, KC_F4, 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_PGUP, \
KC_F5, KC_F6, 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_PGDN, \
KC_F7, KC_F8, 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_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_AL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT),
/* 1: LED layer
*
* RESET BLTOGBLSTP
*
*
*
*
*
* UGTOGUGMODUGHUIUGHUDUGSAIUGSADUGVAIUGVAD VOLU
*
* PREV VOLD NEXT
*
*/
[_AL] = LAYOUT_ansi(
KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, BL_STEP, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT)
};
const uint16_t PROGMEM fn_actions[] = {
};

View file

@ -0,0 +1,14 @@
S65-PLUS
=====
DIY 65% keyboard from Sentraq.
Keyboard Maintainer: QMK Community
Hardware Supported: S65-PLUS PCB
Hardware Availability: https://sentraq.com/collections/kits/products/s65-plus-diy-keyboard-kit
Make example for this keyboard (after setting up your build environment):
make s65_plus:default
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.

View file

@ -0,0 +1,66 @@
# 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
# Boot Section Size in *bytes*
# Teensy halfKay 512
# Teensy++ halfKay 1024
# Atmel DFU loader 4096
# LUFA bootloader 4096
# USBaspLoader 2048
OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
MIDI_ENABLE = no # MIDI controls
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
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 = yes # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable RGB light

View file

@ -0,0 +1,24 @@
#include "s65_plus.h"
#include "led.h"
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();
};
void led_set_kb(uint8_t usb_led) {
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
// Turn capslock on
PORTB &= ~(1<<7);
} else {
// Turn capslock off
PORTB |= (1<<7);
}
}

View file

@ -0,0 +1,23 @@
#ifndef S60PLUS_H
#define S60PLUS_H
#include "quantum.h"
#define LAYOUT_ansi( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K016, K017, \
K100, K101, K102, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, \
K200, K201, K202, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, K217, \
K300, K301, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, K316, K317, \
K400, K401, K402, K403, K404, K408, K412, K413, K414, K415, K416, K417 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, KC_NO, K016, K017 }, \
{ K100, K101, K102, KC_NO, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117 }, \
{ K200, K201, K202, KC_NO, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, KC_NO, K216, K217 }, \
{ K300, K301, KC_NO, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315, K316, K317 }, \
{ K400, K401, K402, K403, K404, KC_NO, KC_NO, KC_NO, K408, KC_NO, KC_NO, KC_NO, K412, K413, K414, K415, K416, K417 } \
}
void matrix_init_user(void);
void matrix_scan_user(void);
#endif