aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Zoech <michi.zoech@gmail.com>2018-07-20 09:01:35 -0700
committerDrashna Jaelre <drashna@live.com>2018-07-20 09:01:35 -0700
commitc50e80e13be5e34505f38eab31374ed2cee31da4 (patch)
treeda7de46579af37602fa5adca3559def02327eacc
parent738a9fc16c833d79831c5a26eb33880661e33524 (diff)
downloadqmk_firmware-c50e80e13be5e34505f38eab31374ed2cee31da4.tar.gz
qmk_firmware-c50e80e13be5e34505f38eab31374ed2cee31da4.zip
Keyboard: adding Sentraq S65-Plus (#3406)
* New keyboard 'Sentraq S65-Plus' * Change ANSI_KEYMAP to LAYOUT_ansi * Use QMK_KEYBOARD_H as include
-rw-r--r--keyboards/s65_plus/config.h55
-rw-r--r--keyboards/s65_plus/keymaps/default/keymap.c53
-rw-r--r--keyboards/s65_plus/readme.md14
-rw-r--r--keyboards/s65_plus/rules.mk66
-rw-r--r--keyboards/s65_plus/s65_plus.c24
-rw-r--r--keyboards/s65_plus/s65_plus.h23
6 files changed, 235 insertions, 0 deletions
diff --git a/keyboards/s65_plus/config.h b/keyboards/s65_plus/config.h
new file mode 100644
index 000000000..df60e60a8
--- /dev/null
+++ b/keyboards/s65_plus/config.h
@@ -0,0 +1,55 @@
1#ifndef CONFIG_H
2#define CONFIG_H
3
4#include "config_common.h"
5
6/* USB Device descriptor parameter */
7#define PRODUCT S65-PLUS
8#define DESCRIPTION q.m.k. keyboard firmware for S65-PLUS
9#define VENDOR_ID 0xFEED
10#define PRODUCT_ID 0x6060
11#define DEVICE_VER 0x0001
12#define MANUFACTURER Sentraq
13
14/* key matrix size */
15#define MATRIX_ROWS 5
16#define MATRIX_COLS 18
17
18/* key matrix pins */
19#define MATRIX_ROW_PINS { C7, C6, B6, B5, B4 }
20#define MATRIX_COL_PINS { F6, F5, F4, F1, F0, E6, B0, B1, D5, B2, B3, D0, D1, D2, D4, D6, D7, F7 }
21#define UNUSED_PINS
22
23/* number of backlight levels */
24#define BACKLIGHT_PIN B7
25#define BACKLIGHT_LEVELS 3
26
27#define RGB_DI_PIN D3
28#define RGBLIGHT_ANIMATIONS
29#define RGBLED_NUM 20
30#define RGBLIGHT_HUE_STEP 8
31#define RGBLIGHT_SAT_STEP 8
32#define RGBLIGHT_VAL_STEP 8
33#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 20
34
35/* COL2ROW or ROW2COL */
36#define DIODE_DIRECTION COL2ROW
37
38/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
39#define DEBOUNCING_DELAY 5
40
41/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
42#define LOCKING_SUPPORT_ENABLE
43
44/* Locking resynchronize hack */
45#define LOCKING_RESYNC_ENABLE
46
47/* key combination for command */
48#define IS_COMMAND() ( \
49 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
50)
51
52/* prevent stuck modifiers */
53#define PREVENT_STUCK_MODIFIERS
54
55#endif
diff --git a/keyboards/s65_plus/keymaps/default/keymap.c b/keyboards/s65_plus/keymaps/default/keymap.c
new file mode 100644
index 000000000..04f6926de
--- /dev/null
+++ b/keyboards/s65_plus/keymaps/default/keymap.c
@@ -0,0 +1,53 @@
1#include QMK_KEYBOARD_H
2
3#define _BL 0
4#define _AL 1
5
6const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
7 /* 0: Main layer
8 * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
9 * │ F1 │ F2 │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│ DEL │
10 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
11 * │ F3 │ F4 │ TAB │▒▒▒▒▒│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │PG_UP│
12 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
13 * │ F5 │ F6 │CAPSL│▒▒▒▒▒│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│PG_DN│
14 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
15 * │ F7 │ F8 │▒▒▒▒▒│LSHFT│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│ UP │ END │
16 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
17 * │ F9 │ F10 │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │RCTL │LEFT │DOWN │RIGHT│
18 * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
19 */
20
21 /* 0: ANSI qwerty */
22 [_BL] = LAYOUT_ansi(
23 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, \
24 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, \
25 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, \
26 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, \
27 KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_AL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT),
28
29
30 /* 1: LED layer
31 * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
32 * │ │ │RESET│ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│BLTOG│BLSTP│
33 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
34 * │ │ │ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │ │ │ │ │
35 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
36 * │ │ │ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ │
37 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
38 * │ │ │▒▒▒▒▒│ │UGTOG│UGMOD│UGHUI│UGHUD│UGSAI│UGSAD│UGVAI│UGVAD│ │ │▒▒▒▒▒│ │VOLU │ │
39 * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
40 * │ │ │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │PREV │VOLD │NEXT │
41 * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
42 */
43
44 [_AL] = LAYOUT_ansi(
45 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, \
46 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, \
47 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, \
48 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, \
49 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT)
50};
51
52const uint16_t PROGMEM fn_actions[] = {
53};
diff --git a/keyboards/s65_plus/readme.md b/keyboards/s65_plus/readme.md
new file mode 100644
index 000000000..426a6612d
--- /dev/null
+++ b/keyboards/s65_plus/readme.md
@@ -0,0 +1,14 @@
1S65-PLUS
2=====
3
4DIY 65% keyboard from Sentraq.
5
6Keyboard Maintainer: QMK Community
7Hardware Supported: S65-PLUS PCB
8Hardware Availability: https://sentraq.com/collections/kits/products/s65-plus-diy-keyboard-kit
9
10Make example for this keyboard (after setting up your build environment):
11
12 make s65_plus:default
13
14See [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.
diff --git a/keyboards/s65_plus/rules.mk b/keyboards/s65_plus/rules.mk
new file mode 100644
index 000000000..08dd2d93c
--- /dev/null
+++ b/keyboards/s65_plus/rules.mk
@@ -0,0 +1,66 @@
1
2
3# MCU name
4MCU = atmega32u4
5
6# Processor frequency.
7# This will define a symbol, F_CPU, in all source code files equal to the
8# processor frequency in Hz. You can then use this symbol in your source code to
9# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
10# automatically to create a 32-bit value in your source code.
11#
12# This will be an integer division of F_USB below, as it is sourced by
13# F_USB after it has run through any CPU prescalers. Note that this value
14# does not *change* the processor frequency - it should merely be updated to
15# reflect the processor speed set externally so that the code can use accurate
16# software delays.
17F_CPU = 16000000
18
19
20#
21# LUFA specific
22#
23# Target architecture (see library "Board Types" documentation).
24ARCH = AVR8
25
26# Input clock frequency.
27# This will define a symbol, F_USB, in all source code files equal to the
28# input clock frequency (before any prescaling is performed) in Hz. This value may
29# differ from F_CPU if prescaling is used on the latter, and is required as the
30# raw input clock is fed directly to the PLL sections of the AVR for high speed
31# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
32# at the end, this will be done automatically to create a 32-bit value in your
33# source code.
34#
35# If no clock division is performed on the input clock inside the AVR (via the
36# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
37F_USB = $(F_CPU)
38
39# Interrupt driven control endpoint task(+60)
40OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
41
42
43# Boot Section Size in *bytes*
44# Teensy halfKay 512
45# Teensy++ halfKay 1024
46# Atmel DFU loader 4096
47# LUFA bootloader 4096
48# USBaspLoader 2048
49OPT_DEFS += -DBOOTLOADER_SIZE=4096
50
51
52# Build Options
53# change yes to no to disable
54#
55BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
56MOUSEKEY_ENABLE = no # Mouse keys(+4700)
57EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
58# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
59SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
60MIDI_ENABLE = no # MIDI controls
61UNICODE_ENABLE = no # Unicode
62BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
63AUDIO_ENABLE = no # Audio output on port C6
64NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
65BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
66RGBLIGHT_ENABLE = yes # Enable RGB light
diff --git a/keyboards/s65_plus/s65_plus.c b/keyboards/s65_plus/s65_plus.c
new file mode 100644
index 000000000..3eaaa3717
--- /dev/null
+++ b/keyboards/s65_plus/s65_plus.c
@@ -0,0 +1,24 @@
1#include "s65_plus.h"
2#include "led.h"
3
4void matrix_init_kb(void) {
5 // put your keyboard start-up code here
6 // runs once when the firmware starts up
7 matrix_init_user();
8};
9
10void matrix_scan_kb(void) {
11 // put your looping keyboard code here
12 // runs every cycle (a lot)
13 matrix_scan_user();
14};
15
16void led_set_kb(uint8_t usb_led) {
17 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
18 // Turn capslock on
19 PORTB &= ~(1<<7);
20 } else {
21 // Turn capslock off
22 PORTB |= (1<<7);
23 }
24}
diff --git a/keyboards/s65_plus/s65_plus.h b/keyboards/s65_plus/s65_plus.h
new file mode 100644
index 000000000..2ff445f6c
--- /dev/null
+++ b/keyboards/s65_plus/s65_plus.h
@@ -0,0 +1,23 @@
1#ifndef S60PLUS_H
2#define S60PLUS_H
3
4#include "quantum.h"
5
6#define LAYOUT_ansi( \
7 K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K016, K017, \
8 K100, K101, K102, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, \
9 K200, K201, K202, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, K217, \
10 K300, K301, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, K316, K317, \
11 K400, K401, K402, K403, K404, K408, K412, K413, K414, K415, K416, K417 \
12) { \
13 { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, KC_NO, K016, K017 }, \
14 { K100, K101, K102, KC_NO, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117 }, \
15 { K200, K201, K202, KC_NO, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, KC_NO, K216, K217 }, \
16 { K300, K301, KC_NO, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315, K316, K317 }, \
17 { K400, K401, K402, K403, K404, KC_NO, KC_NO, KC_NO, K408, KC_NO, KC_NO, KC_NO, K412, K413, K414, K415, K416, K417 } \
18}
19
20void matrix_init_user(void);
21void matrix_scan_user(void);
22
23#endif