aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/alf_x2/alf_x2.c1
-rw-r--r--keyboards/alf_x2/alf_x2.h22
-rw-r--r--keyboards/alf_x2/config.h58
-rw-r--r--keyboards/alf_x2/keymaps/default/keymap.c40
-rw-r--r--keyboards/alf_x2/keymaps/hhkb_60/keymap.c40
-rw-r--r--keyboards/alf_x2/readme.md15
-rw-r--r--keyboards/alf_x2/rules.mk56
7 files changed, 232 insertions, 0 deletions
diff --git a/keyboards/alf_x2/alf_x2.c b/keyboards/alf_x2/alf_x2.c
new file mode 100644
index 000000000..cc22d872a
--- /dev/null
+++ b/keyboards/alf_x2/alf_x2.c
@@ -0,0 +1 @@
#include "alf_x2.h"
diff --git a/keyboards/alf_x2/alf_x2.h b/keyboards/alf_x2/alf_x2.h
new file mode 100644
index 000000000..dee10bf1b
--- /dev/null
+++ b/keyboards/alf_x2/alf_x2.h
@@ -0,0 +1,22 @@
1#ifndef ALF_X2_H
2#define ALF_X2_H
3
4#include "quantum.h"
5
6// K404 and K408 are the microswitches at the top of the PCB
7
8#define LAYOUT( \
9 K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \
10 K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
11 K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
12 K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \
13 K400, K401, K403, K404, K406, K408, K410, K411, K412, K413, K414 \
14) { \
15 { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
16 { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
17 { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \
18 { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \
19 { K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \
20}
21
22#endif \ No newline at end of file
diff --git a/keyboards/alf_x2/config.h b/keyboards/alf_x2/config.h
new file mode 100644
index 000000000..31212ce33
--- /dev/null
+++ b/keyboards/alf_x2/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 ALF
11#define PRODUCT X2
12#define DESCRIPTION ALF X2 60
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 3
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 4
53#define RGBLIGHT_HUE_STEP 8
54#define RGBLIGHT_SAT_STEP 8
55#define RGBLIGHT_VAL_STEP 8
56#endif
57
58#endif \ No newline at end of file
diff --git a/keyboards/alf_x2/keymaps/default/keymap.c b/keyboards/alf_x2/keymaps/default/keymap.c
new file mode 100644
index 000000000..9b32c94d7
--- /dev/null
+++ b/keyboards/alf_x2/keymaps/default/keymap.c
@@ -0,0 +1,40 @@
1#include QMK_KEYBOARD_H
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4
5 LAYOUT(
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_NO, 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,
9 KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, KC_NO,
10 KC_LCTL, KC_LGUI, KC_LALT, KC_VOLU, KC_SPC, KC_VOLD, KC_RALT, MO(1), KC_NO, KC_APP, KC_RCTL),
11
12 LAYOUT(
13 KC_GRV, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, RESET,
15 KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS,
16 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_DOWN, KC_TRNS, KC_TRNS,
17 KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_TRNS, KC_MPRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
18};
19
20const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
21 return MACRO_NONE;
22}
23
24void matrix_init_user(void) {
25}
26
27void matrix_scan_user(void) {
28}
29
30bool process_record_user(uint16_t keycode, keyrecord_t *record) {
31 return true;
32}
33
34void led_set_user(uint8_t usb_led) {
35 if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
36 DDRB |= (1 << 2); PORTB &= ~(1 << 2);
37 } else {
38 DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
39 }
40}
diff --git a/keyboards/alf_x2/keymaps/hhkb_60/keymap.c b/keyboards/alf_x2/keymaps/hhkb_60/keymap.c
new file mode 100644
index 000000000..17771a541
--- /dev/null
+++ b/keyboards/alf_x2/keymaps/hhkb_60/keymap.c
@@ -0,0 +1,40 @@
1#include QMK_KEYBOARD_H
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4
5 LAYOUT(
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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
9 KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, MO(1),
10 KC_LCTL, KC_LGUI, KC_LALT, KC_VOLU, KC_SPC, KC_VOLD, KC_RALT, KC_RGUI, KC_NO, KC_APP, KC_RCTL),
11
12 LAYOUT(
13 KC_NO, 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_INS, KC_DEL,
14 KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, RESET,
15 KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS,
16 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_DOWN, KC_TRNS, KC_TRNS,
17 KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_TRNS, KC_MPRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
18};
19
20const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
21 return MACRO_NONE;
22}
23
24void matrix_init_user(void) {
25}
26
27void matrix_scan_user(void) {
28}
29
30bool process_record_user(uint16_t keycode, keyrecord_t *record) {
31 return true;
32}
33
34void led_set_user(uint8_t usb_led) {
35 if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
36 DDRB |= (1 << 2); PORTB &= ~(1 << 2);
37 } else {
38 DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
39 }
40} \ No newline at end of file
diff --git a/keyboards/alf_x2/readme.md b/keyboards/alf_x2/readme.md
new file mode 100644
index 000000000..d51cd180a
--- /dev/null
+++ b/keyboards/alf_x2/readme.md
@@ -0,0 +1,15 @@
1# ALF X2
2
3![alf_x2](https://cdn.shopify.com/s/files/1/1674/0405/products/1_088c2862-1f68-4fdd-a346-965208c3a3de_1024x1024.png?v=1511296076)
4
5A customizable 60% keyboard.
6
7Keyboard Maintainer: QMK Community
8Hardware Supported: ALF X2 60%
9Hardware Availability: [zfrontier](https://en.zfrontier.com/products/group-buy-alf-x2-60)
10
11Make example for this keyboard (after setting up your build environment):
12
13 make alf_x2:default
14
15See [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/alf_x2/rules.mk b/keyboards/alf_x2/rules.mk
new file mode 100644
index 000000000..9c4082da2
--- /dev/null
+++ b/keyboards/alf_x2/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