diff options
author | moyi4681 <moyi4681@users.noreply.github.com> | 2019-05-29 02:20:39 +0800 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-05-28 11:20:39 -0700 |
commit | 4d46489a2ac4ff7099e9b7498e34c6201f0b14cb (patch) | |
tree | a3e7e3e5345086b835acca0bb6cfb12c185cb57b /keyboards/geekboards/tester | |
parent | ff6a57c3c320a2c73c0040337c677d8b2455c3ff (diff) | |
download | qmk_firmware-4d46489a2ac4ff7099e9b7498e34c6201f0b14cb.tar.gz qmk_firmware-4d46489a2ac4ff7099e9b7498e34c6201f0b14cb.zip |
[Keyboard] add geekboards 8key macro-pad tester (#5940)
* add geekboards 8key macro-pad tester
* Update readme.md
* Update keyboards/geekboards/tester/rules.mk
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Update keyboards/geekboards/tester/keymaps/default/keymap.c
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Update keyboards/geekboards/tester/keymaps/default/keymap.c
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Update keyboards/geekboards/tester/keymaps/default/keymap.c
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Update keyboards/geekboards/tester/keymaps/default/keymap.c
Co-Authored-By: fauxpark <fauxpark@gmail.com>
* Update keymap.c
* Update keyboards/geekboards/tester/readme.md
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/geekboards/tester/readme.md
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/geekboards/tester/readme.md
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/geekboards/tester/readme.md
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Update keyboards/geekboards/tester/readme.md
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Update readme.md
* Update tester.c
* Update keyboards/geekboards/tester/config.h
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Update keyboards/geekboards/tester/rules.mk
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Update keyboards/geekboards/tester/keymaps/default/keymap.c
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* Update keyboards/geekboards/tester/keymaps/default/keymap.c
Co-Authored-By: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'keyboards/geekboards/tester')
-rw-r--r-- | keyboards/geekboards/tester/config.h | 39 | ||||
-rw-r--r-- | keyboards/geekboards/tester/keymaps/default/keymap.c | 23 | ||||
-rw-r--r-- | keyboards/geekboards/tester/readme.md | 12 | ||||
-rw-r--r-- | keyboards/geekboards/tester/rules.mk | 68 | ||||
-rw-r--r-- | keyboards/geekboards/tester/tester.c | 56 | ||||
-rw-r--r-- | keyboards/geekboards/tester/tester.h | 10 |
6 files changed, 208 insertions, 0 deletions
diff --git a/keyboards/geekboards/tester/config.h b/keyboards/geekboards/tester/config.h new file mode 100644 index 000000000..ac67877ff --- /dev/null +++ b/keyboards/geekboards/tester/config.h | |||
@@ -0,0 +1,39 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include "config_common.h" | ||
4 | |||
5 | |||
6 | #define VENDOR_ID 0xFEED | ||
7 | #define PRODUCT_ID 0x1319 | ||
8 | #define DEVICE_VER 0x0001 | ||
9 | #define MANUFACTURER Geekboards | ||
10 | #define PRODUCT Geekboards Tester | ||
11 | #define DESCRIPTION Geekboards 8-keys macropad | ||
12 | |||
13 | |||
14 | #define MATRIX_ROWS 2 | ||
15 | #define MATRIX_COLS 4 | ||
16 | |||
17 | #define MATRIX_ROW_PINS { B0, D4} | ||
18 | #define MATRIX_COL_PINS { F7, F6, D2, D3} | ||
19 | #define UNUSED_PINS | ||
20 | |||
21 | #define DIODE_DIRECTION COL2ROW | ||
22 | #define LOCKING_SUPPORT_ENABL | ||
23 | #define LOCKING_RESYNC_ENABLE | ||
24 | |||
25 | #define DEBOUNCE 3 | ||
26 | #define RGB_DISABLE_AFTER_TIMEOUT 0 | ||
27 | #define RGB_DISABLE_WHEN_USB_SUSPENDED true | ||
28 | #define RGB_MATRIX_KEYPRESSES | ||
29 | #define DISABLE_RGB_MATRIX_SPLASH | ||
30 | #define DISABLE_RGB_MATRIX_MULTISPLASH | ||
31 | #define DISABLE_RGB_MATRIX_SOLID_SPLASH | ||
32 | #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH | ||
33 | #define DRIVER_ADDR_1 0b1110100 | ||
34 | #define DRIVER_ADDR_2 0b1110101 | ||
35 | |||
36 | #define DRIVER_COUNT 2 | ||
37 | #define DRIVER_1_LED_TOTAL 8 | ||
38 | #define DRIVER_2_LED_TOTAL 0 | ||
39 | #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | ||
diff --git a/keyboards/geekboards/tester/keymaps/default/keymap.c b/keyboards/geekboards/tester/keymaps/default/keymap.c new file mode 100644 index 000000000..e68f15f63 --- /dev/null +++ b/keyboards/geekboards/tester/keymaps/default/keymap.c | |||
@@ -0,0 +1,23 @@ | |||
1 | #include QMK_KEYBOARD_H | ||
2 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
3 | [0] = LAYOUT( /* Base */ | ||
4 | RGB_MOD, KC_1, KC_2, KC_3, | ||
5 | KC_4, KC_5, KC_6, MO(1) | ||
6 | ), | ||
7 | [1] = LAYOUT( /* Base */ | ||
8 | KC_ESC, KC_F1, KC_F2, KC_F3, | ||
9 | KC_F4, KC_F5, KC_F6, KC_F7 | ||
10 | ), | ||
11 | }; | ||
12 | |||
13 | void matrix_init_user(void) { | ||
14 | //user initialization | ||
15 | } | ||
16 | |||
17 | void matrix_scan_user(void) { | ||
18 | //user matrix | ||
19 | } | ||
20 | |||
21 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
22 | return true; | ||
23 | } | ||
diff --git a/keyboards/geekboards/tester/readme.md b/keyboards/geekboards/tester/readme.md new file mode 100644 index 000000000..7da069308 --- /dev/null +++ b/keyboards/geekboards/tester/readme.md | |||
@@ -0,0 +1,12 @@ | |||
1 | Geekboards 8-keys macropad | ||
2 | ===== | ||
3 | |||
4 | Keyboard Maintainer: [dztech](https://github.com/moyi4681) | ||
5 | Hardware Supported: Geekboards 8-keys macropad | ||
6 | Hardware Availability: geekboards.ru(https://geekboards.ru/) | ||
7 | |||
8 | Make example for this keyboard (after setting up your build environment): | ||
9 | |||
10 | make geekboards/tester:default | ||
11 | |||
12 | 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). | ||
diff --git a/keyboards/geekboards/tester/rules.mk b/keyboards/geekboards/tester/rules.mk new file mode 100644 index 000000000..7e8d595fb --- /dev/null +++ b/keyboards/geekboards/tester/rules.mk | |||
@@ -0,0 +1,68 @@ | |||
1 | # MCU name | ||
2 | MCU = atmega32u4 | ||
3 | |||
4 | # project specific files | ||
5 | #SRC = | ||
6 | |||
7 | # Processor frequency. | ||
8 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
9 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
10 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
11 | # automatically to create a 32-bit value in your source code. | ||
12 | # | ||
13 | # This will be an integer division of F_USB below, as it is sourced by | ||
14 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
15 | # does not *change* the processor frequency - it should merely be updated to | ||
16 | # reflect the processor speed set externally so that the code can use accurate | ||
17 | # software delays. | ||
18 | F_CPU = 16000000 | ||
19 | |||
20 | |||
21 | # | ||
22 | # LUFA specific | ||
23 | # | ||
24 | # Target architecture (see library "Board Types" documentation). | ||
25 | ARCH = AVR8 | ||
26 | |||
27 | # Input clock frequency. | ||
28 | # This will define a symbol, F_USB, in all source code files equal to the | ||
29 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
30 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
31 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
32 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
33 | # at the end, this will be done automatically to create a 32-bit value in your | ||
34 | # source code. | ||
35 | # | ||
36 | # If no clock division is performed on the input clock inside the AVR (via the | ||
37 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
38 | F_USB = $(F_CPU) | ||
39 | |||
40 | # Interrupt driven control endpoint task(+60) | ||
41 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
42 | |||
43 | # Boot Section | ||
44 | BOOTLOADER = qmk-dfu | ||
45 | |||
46 | # Do not put the microcontroller into power saving mode | ||
47 | # when we get USB suspend event. We want it to keep updating | ||
48 | # backlight effects. | ||
49 | |||
50 | # Build Options | ||
51 | # change yes to no to disable | ||
52 | # | ||
53 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) | ||
54 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
55 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
56 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
57 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
58 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
59 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
60 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
61 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
62 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | ||
63 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
64 | UNICODE_ENABLE = no # Unicode | ||
65 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
66 | AUDIO_ENABLE = no # Audio output on port C6 | ||
67 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
68 | RGB_MATRIX_ENABLE = yes # Use RGB matrix | ||
diff --git a/keyboards/geekboards/tester/tester.c b/keyboards/geekboards/tester/tester.c new file mode 100644 index 000000000..4fab1a701 --- /dev/null +++ b/keyboards/geekboards/tester/tester.c | |||
@@ -0,0 +1,56 @@ | |||
1 | #include "tester.h" | ||
2 | const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | ||
3 | /* Refer to IS31 manual for these locations | ||
4 | * driver | ||
5 | * | R location | ||
6 | * | | G location | ||
7 | * | | | B location | ||
8 | * | | | | */ | ||
9 | {0, C1_1, C3_2, C4_2}, //A1 | ||
10 | {0, C1_2, C2_2, C4_3}, //A2 | ||
11 | {0, C1_3, C2_3, C3_3}, //A3 | ||
12 | {0, C1_4, C2_4, C3_4}, //A4 | ||
13 | {0, C1_5, C2_5, C3_5}, //A5 | ||
14 | {0, C1_6, C2_6, C3_6}, //A6 | ||
15 | {0, C1_7, C2_7, C3_7}, //A7 | ||
16 | {0, C1_8, C2_8, C3_8}, //A8 | ||
17 | }; | ||
18 | |||
19 | led_config_t g_led_config = { | ||
20 | { | ||
21 | { 0, 1, 2, 3}, | ||
22 | { 4, 5, 6, 7} | ||
23 | }, | ||
24 | { | ||
25 | { 0, 0 }, { 75, 0 }, { 151, 0 }, { 224, 0 }, { 0, 64 }, { 75, 64 }, { 151, 64 }, { 224, 64 } | ||
26 | }, | ||
27 | { | ||
28 | 4, 4, 4, 4, 4, 4, 4, 4 | ||
29 | } | ||
30 | }; | ||
31 | |||
32 | |||
33 | |||
34 | void matrix_init_kb(void) { | ||
35 | matrix_init_user(); | ||
36 | } | ||
37 | |||
38 | void matrix_scan_kb(void) { | ||
39 | matrix_scan_user(); | ||
40 | } | ||
41 | |||
42 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
43 | return process_record_user(keycode, record); | ||
44 | } | ||
45 | |||
46 | void suspend_power_down_kb(void) | ||
47 | { | ||
48 | rgb_matrix_set_suspend_state(true); | ||
49 | suspend_power_down_user(); | ||
50 | } | ||
51 | |||
52 | void suspend_wakeup_init_kb(void) | ||
53 | { | ||
54 | rgb_matrix_set_suspend_state(false); | ||
55 | suspend_wakeup_init_user(); | ||
56 | } | ||
diff --git a/keyboards/geekboards/tester/tester.h b/keyboards/geekboards/tester/tester.h new file mode 100644 index 000000000..28c555f0b --- /dev/null +++ b/keyboards/geekboards/tester/tester.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #pragma once | ||
2 | #include "quantum.h" | ||
3 | #define LAYOUT( \ | ||
4 | k00, k01, k02, k03,\ | ||
5 | k10, k11, k12, k13\ | ||
6 | ) \ | ||
7 | { \ | ||
8 | { k00, k01, k02, k03 }, \ | ||
9 | { k10, k11, k12, k13 } \ | ||
10 | } | ||