aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrempired <36162174+rempired@users.noreply.github.com>2018-02-17 23:09:40 -0800
committerJack Humbert <jack.humb@gmail.com>2018-02-18 02:09:40 -0500
commit78f5a2a3dc73b8cf38c45c364c31fb42b6be51fc (patch)
tree9c7a3e7002b17c95c3196607cd839fab3b8b92d1
parentf67c59aa7bb35fc370023a1b0b0633d3aff26eb7 (diff)
downloadqmk_firmware-78f5a2a3dc73b8cf38c45c364c31fb42b6be51fc.tar.gz
qmk_firmware-78f5a2a3dc73b8cf38c45c364c31fb42b6be51fc.zip
1up60rgb Keyboard Support (#2404)
* Add files via upload * Update keymap.c * Update keymap.c * Update 1up60rgb.c * Tidy up the code a bit for submission into QMK Master - Create readme file - Fix compile issue with standard keymap - Create default keymap - Remove unused Makefile * Keymap Adjustments * Reworked alternate layouts * Reworked keymaps * Update keymap.c * Update readme.md Add carriage return to make README cleaner
-rw-r--r--keyboards/1up60rgb/1up60rgb.c1
-rw-r--r--keyboards/1up60rgb/1up60rgb.h20
-rw-r--r--keyboards/1up60rgb/config.h58
-rw-r--r--keyboards/1up60rgb/keymaps/default/keymap.c72
-rw-r--r--keyboards/1up60rgb/keymaps/iso/keymap.c72
-rw-r--r--keyboards/1up60rgb/keymaps/tsangan/keymap.c72
-rw-r--r--keyboards/1up60rgb/readme.md13
-rw-r--r--keyboards/1up60rgb/rules.mk56
8 files changed, 364 insertions, 0 deletions
diff --git a/keyboards/1up60rgb/1up60rgb.c b/keyboards/1up60rgb/1up60rgb.c
new file mode 100644
index 000000000..4ba631c79
--- /dev/null
+++ b/keyboards/1up60rgb/1up60rgb.c
@@ -0,0 +1 @@
#include "1up60rgb.h"
diff --git a/keyboards/1up60rgb/1up60rgb.h b/keyboards/1up60rgb/1up60rgb.h
new file mode 100644
index 000000000..a3d820f80
--- /dev/null
+++ b/keyboards/1up60rgb/1up60rgb.h
@@ -0,0 +1,20 @@
1#ifndef KB_H
2#define KB_H
3
4#include "quantum.h"
5
6#define KEYMAP( \
7 K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
8 K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
9 K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \
10 K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
11 K400, K401, K403, K406, K410, K411, K413, K414 \
12) { \
13 { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
14 { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
15 { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \
16 { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \
17 { K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414 } \
18}
19
20#endif \ No newline at end of file
diff --git a/keyboards/1up60rgb/config.h b/keyboards/1up60rgb/config.h
new file mode 100644
index 000000000..2668ab21b
--- /dev/null
+++ b/keyboards/1up60rgb/config.h
@@ -0,0 +1,58 @@
1#ifndef CONFIG_H
2#define CONFIG_H
3
4#include "config_common.h"
5
6/* USB Device descriptor parameter */
7#define VENDOR_ID 0xFEED
8#define PRODUCT_ID 0x6060
9#define DEVICE_VER 0x0001
10#define MANUFACTURER 1upkeyboards
11#define PRODUCT 1UP RGB Underglow PCB
12#define DESCRIPTION 60% keyboard with RGB underglow
13
14/* key matrix size */
15#define MATRIX_ROWS 5
16#define MATRIX_COLS 15
17
18/* key matrix pins */
19#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
20#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4 }
21#define UNUSED_PINS
22
23/* COL2ROW or ROW2COL */
24#define DIODE_DIRECTION COL2ROW
25
26/* number of backlight levels */
27#define BACKLIGHT_PIN B6
28#ifdef BACKLIGHT_PIN
29#define BACKLIGHT_LEVELS 5
30#endif
31
32/* Set 0 if debouncing isn't needed */
33#define DEBOUNCING_DELAY 5
34
35/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
36#define LOCKING_SUPPORT_ENABLE
37
38/* Locking resynchronize hack */
39#define LOCKING_RESYNC_ENABLE
40
41/* key combination for command */
42#define IS_COMMAND() ( \
43 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
44)
45
46/* prevent stuck modifiers */
47#define PREVENT_STUCK_MODIFIERS
48
49#define RGB_DI_PIN E2
50#ifdef RGB_DI_PIN
51#define RGBLIGHT_ANIMATIONS
52#define RGBLED_NUM 20
53#define RGBLIGHT_HUE_STEP 8
54#define RGBLIGHT_SAT_STEP 8
55#define RGBLIGHT_VAL_STEP 8
56#endif
57
58#endif
diff --git a/keyboards/1up60rgb/keymaps/default/keymap.c b/keyboards/1up60rgb/keymaps/default/keymap.c
new file mode 100644
index 000000000..3f0f49b72
--- /dev/null
+++ b/keyboards/1up60rgb/keymaps/default/keymap.c
@@ -0,0 +1,72 @@
1#include "1up60rgb.h"
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4
5 KEYMAP(
6 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_BSPC,
7 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,
8 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_ENT,
9 KC_LSFT, 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_RSFT,
10 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL),
11
12 KEYMAP(
13 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,
14 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,
15 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,
16 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,
17 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
18
19};
20
21const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
22 ;
23
24 switch (id) {
25
26 }
27 return MACRO_NONE;
28}
29
30void matrix_init_user(void) {
31}
32
33void matrix_scan_user(void) {
34}
35
36bool process_record_user(uint16_t keycode, keyrecord_t *record) {
37 return true;
38}
39
40void led_set_user(uint8_t usb_led) {
41
42 if (usb_led & (1 << USB_LED_NUM_LOCK)) {
43
44 } else {
45
46 }
47
48 if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
49 DDRB |= (1 << 2); PORTB &= ~(1 << 2);
50 } else {
51 DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
52 }
53
54 if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
55
56 } else {
57
58 }
59
60 if (usb_led & (1 << USB_LED_COMPOSE)) {
61
62 } else {
63
64 }
65
66 if (usb_led & (1 << USB_LED_KANA)) {
67
68 } else {
69
70 }
71
72}
diff --git a/keyboards/1up60rgb/keymaps/iso/keymap.c b/keyboards/1up60rgb/keymaps/iso/keymap.c
new file mode 100644
index 000000000..140ff6329
--- /dev/null
+++ b/keyboards/1up60rgb/keymaps/iso/keymap.c
@@ -0,0 +1,72 @@
1#include "1up60rgb.h"
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4
5 KEYMAP(
6 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_BSPC,
7 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_ENT,
8 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_NUHS, KC_ENT,
9 KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT,
10 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL),
11
12 KEYMAP(
13 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,
14 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,
15 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,
16 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,
17 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
18
19};
20
21const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
22 ;
23
24 switch (id) {
25
26 }
27 return MACRO_NONE;
28}
29
30void matrix_init_user(void) {
31}
32
33void matrix_scan_user(void) {
34}
35
36bool process_record_user(uint16_t keycode, keyrecord_t *record) {
37 return true;
38}
39
40void led_set_user(uint8_t usb_led) {
41
42 if (usb_led & (1 << USB_LED_NUM_LOCK)) {
43
44 } else {
45
46 }
47
48 if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
49 DDRB |= (1 << 2); PORTB &= ~(1 << 2);
50 } else {
51 DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
52 }
53
54 if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
55
56 } else {
57
58 }
59
60 if (usb_led & (1 << USB_LED_COMPOSE)) {
61
62 } else {
63
64 }
65
66 if (usb_led & (1 << USB_LED_KANA)) {
67
68 } else {
69
70 }
71
72}
diff --git a/keyboards/1up60rgb/keymaps/tsangan/keymap.c b/keyboards/1up60rgb/keymaps/tsangan/keymap.c
new file mode 100644
index 000000000..6b47a1a35
--- /dev/null
+++ b/keyboards/1up60rgb/keymaps/tsangan/keymap.c
@@ -0,0 +1,72 @@
1#include "1up60rgb.h"
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4
5 KEYMAP(
6 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_BSLS, KC_GRV,
7 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_BSPC,
8 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_ENT,
9 KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
10 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_RALT, KC_RGUI, KC_RCTL),
11
12 KEYMAP(
13 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_TRNS, KC_DEL,
14 KC_TRNS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_UP, KC_TRNS, KC_TRNS,
15 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS,
16 KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_DOWN, KC_TRNS, KC_TRNS,
17 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
18
19};
20
21const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
22 ;
23
24 switch (id) {
25
26 }
27 return MACRO_NONE;
28}
29
30void matrix_init_user(void) {
31}
32
33void matrix_scan_user(void) {
34}
35
36bool process_record_user(uint16_t keycode, keyrecord_t *record) {
37 return true;
38}
39
40void led_set_user(uint8_t usb_led) {
41
42 if (usb_led & (1 << USB_LED_NUM_LOCK)) {
43
44 } else {
45
46 }
47
48 if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
49 DDRB |= (1 << 2); PORTB &= ~(1 << 2);
50 } else {
51 DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
52 }
53
54 if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
55
56 } else {
57
58 }
59
60 if (usb_led & (1 << USB_LED_COMPOSE)) {
61
62 } else {
63
64 }
65
66 if (usb_led & (1 << USB_LED_KANA)) {
67
68 } else {
69
70 }
71
72}
diff --git a/keyboards/1up60rgb/readme.md b/keyboards/1up60rgb/readme.md
new file mode 100644
index 000000000..0e132e44d
--- /dev/null
+++ b/keyboards/1up60rgb/readme.md
@@ -0,0 +1,13 @@
1# 1upkeyboards 60% RGB
2
3Firmware for custom keyboard PCB with 60% key layout.
4
5Keyboard Maintainer: [rempired](https://github.com/rempired)
6Hardware Supported: 1upkeyboards 60% RGB
7Hardware Availability: [1upkeyboards](https://1upkeyboards.com/rgb-underglow-1up-pcb.html)
8
9Make example for this keyboard (after setting up your build environment):
10
11 make 1up60rgb:default
12
13See [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/1up60rgb/rules.mk b/keyboards/1up60rgb/rules.mk
new file mode 100644
index 000000000..c303af4bc
--- /dev/null
+++ b/keyboards/1up60rgb/rules.mk
@@ -0,0 +1,56 @@
1# MCU name
2MCU = atmega32u4
3
4# Processor frequency.
5# This will define a symbol, F_CPU, in all source code files equal to the
6# processor frequency in Hz. You can then use this symbol in your source code to
7# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
8# automatically to create a 32-bit value in your source code.
9#
10# This will be an integer division of F_USB below, as it is sourced by
11# F_USB after it has run through any CPU prescalers. Note that this value
12# does not *change* the processor frequency - it should merely be updated to
13# reflect the processor speed set externally so that the code can use accurate
14# software delays.
15F_CPU = 16000000
16
17#
18# LUFA specific
19#
20# Target architecture (see library "Board Types" documentation).
21ARCH = AVR8
22
23# Input clock frequency.
24# This will define a symbol, F_USB, in all source code files equal to the
25# input clock frequency (before any prescaling is performed) in Hz. This value may
26# differ from F_CPU if prescaling is used on the latter, and is required as the
27# raw input clock is fed directly to the PLL sections of the AVR for high speed
28# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
29# at the end, this will be done automatically to create a 32-bit value in your
30# source code.
31#
32# If no clock division is performed on the input clock inside the AVR (via the
33# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
34F_USB = $(F_CPU)
35
36# Interrupt driven control endpoint task(+60)
37OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
38
39
40# Boot Section Size in *bytes*
41OPT_DEFS += -DBOOTLOADER_SIZE=4096
42
43
44# Build Options
45# comment out to disable the options.
46#
47BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
48MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
49EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
50CONSOLE_ENABLE ?= no # Console for debug(+400)
51COMMAND_ENABLE ?= no # Commands for debug and configuration
52SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
53NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
54BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
55AUDIO_ENABLE ?= no
56RGBLIGHT_ENABLE ?= yes \ No newline at end of file