summaryrefslogtreecommitdiff
path: root/keyboards/converter/xt_usb
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/converter/xt_usb')
-rw-r--r--keyboards/converter/xt_usb/config.h2
-rw-r--r--keyboards/converter/xt_usb/info.json4
-rw-r--r--keyboards/converter/xt_usb/keymaps/default/keymap.c4
-rw-r--r--keyboards/converter/xt_usb/led.c22
-rw-r--r--keyboards/converter/xt_usb/matrix.c42
-rw-r--r--keyboards/converter/xt_usb/rules.mk50
-rw-r--r--keyboards/converter/xt_usb/xt_usb.h10
7 files changed, 42 insertions, 92 deletions
diff --git a/keyboards/converter/xt_usb/config.h b/keyboards/converter/xt_usb/config.h
index ecebc123fa..fe79953873 100644
--- a/keyboards/converter/xt_usb/config.h
+++ b/keyboards/converter/xt_usb/config.h
@@ -17,6 +17,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
+#include "config_common.h"
+
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6512
#define DEVICE_VER 0x0001
diff --git a/keyboards/converter/xt_usb/info.json b/keyboards/converter/xt_usb/info.json
index 1fde77d1f9..2de390ae07 100644
--- a/keyboards/converter/xt_usb/info.json
+++ b/keyboards/converter/xt_usb/info.json
@@ -40,7 +40,7 @@
{"label":"O", "x":11.75, "y":1},
{"label":"P", "x":12.75, "y":1},
{"label":"[", "x":13.75, "y":1},
- {"label":"]", "x":14.75, "y":1},
+ {"label":"]", "x":14.75, "y":1, "w": 1.25},
{"label":"7", "x":17, "y":1},
{"label":"8", "x":18, "y":1},
{"label":"9", "x":19, "y":1},
@@ -79,7 +79,7 @@
{"label":".", "x":12.5, "y":3},
{"label":"/", "x":13.5, "y":3},
{"label":"Shift", "x":14.5, "y":3, "w":1.5},
- {"label":"Print Screen", "x":16, "y":3},
+ {"label":"*", "x":16, "y":3},
{"label":"1", "x":17, "y":3},
{"label":"2", "x":18, "y":3},
{"label":"3", "x":19, "y":3},
diff --git a/keyboards/converter/xt_usb/keymaps/default/keymap.c b/keyboards/converter/xt_usb/keymaps/default/keymap.c
index 3ef6060700..b44b946e8f 100644
--- a/keyboards/converter/xt_usb/keymaps/default/keymap.c
+++ b/keyboards/converter/xt_usb/keymaps/default/keymap.c
@@ -10,7 +10,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |-------| |------------------------------------------------------|Ent|---------------|
* | F5| F6| | Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | 4| 5| 6| |
* |-------| |----------------------------------------------------------------------| |
- * | F7| F8| |Shif| \| Z| X| C| V| B| N| M| ,| .| /|Shift|PrS| 1| 2| 3| +|
+ * | F7| F8| |Shif| \| Z| X| C| V| B| N| M| ,| .| /|Shift| *| 1| 2| 3| +|
* |-------| |----------------------------------------------------------------------| |
* | F9|F10| | Alt | Space |CapsLck| 0 | . | |
* `-------' `--------------------------------------------------------------------------'
@@ -19,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
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_NLCK, KC_SLCK,
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_P7, KC_P8, KC_P9, KC_PMNS,
KC_F5, KC_F6, 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_GRV, KC_ENT, KC_P4, KC_P5, KC_P6,
- KC_F7, KC_F8, KC_LSFT,KC_BSLS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,KC_PSCR,KC_P1, KC_P2, KC_P3, KC_PPLS,
+ KC_F7, KC_F8, KC_LSFT,KC_BSLS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,KC_PAST,KC_P1, KC_P2, KC_P3, KC_PPLS,
KC_F9, KC_F10, KC_LALT, KC_SPC, KC_CAPS, KC_P0, KC_PDOT
),
diff --git a/keyboards/converter/xt_usb/led.c b/keyboards/converter/xt_usb/led.c
deleted file mode 100644
index 6fa077032b..0000000000
--- a/keyboards/converter/xt_usb/led.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-Copyright 2016 Ethan Apodaca <papodaca@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "led.h"
-
-void led_set(uint8_t usb_led) {
- //XT Keyboards do not have LEDs, nothing to do.
-}
diff --git a/keyboards/converter/xt_usb/matrix.c b/keyboards/converter/xt_usb/matrix.c
index e2d7117b13..d48f1a887f 100644
--- a/keyboards/converter/xt_usb/matrix.c
+++ b/keyboards/converter/xt_usb/matrix.c
@@ -99,25 +99,25 @@ static uint8_t move_e0code(uint8_t code) {
uint8_t matrix_scan(void)
{
static enum {
- INIT,
- E0,
+ XT_STATE_INIT,
+ XT_STATE_E0,
// Pause: E1 1D 45, E1 9D C5
- E1,
- E1_1D,
- E1_9D,
- } state = INIT;
+ XT_STATE_E1,
+ XT_STATE_E1_1D,
+ XT_STATE_E1_9D,
+ } state = XT_STATE_INIT;
uint8_t code = xt_host_recv();
if (!code) return 0;
xprintf("%02X ", code);
switch (state) {
- case INIT:
+ case XT_STATE_INIT:
switch (code) {
case 0xE0:
- state = E0;
+ state = XT_STATE_E0;
break;
case 0xE1:
- state = E1;
+ state = XT_STATE_E1;
break;
default:
if (code < 0x80)
@@ -127,59 +127,59 @@ uint8_t matrix_scan(void)
break;
}
break;
- case E0:
+ case XT_STATE_E0:
switch (code) {
case 0x2A:
case 0xAA:
case 0x36:
case 0xB6:
//ignore fake shift
- state = INIT;
+ state = XT_STATE_INIT;
break;
default:
if (code < 0x80)
matrix_make(move_e0code(code));
else
matrix_break(move_e0code(code & 0x7F));
- state = INIT;
+ state = XT_STATE_INIT;
break;
}
break;
- case E1:
+ case XT_STATE_E1:
switch (code) {
case 0x1D:
- state = E1_1D;
+ state = XT_STATE_E1_1D;
break;
case 0x9D:
- state = E1_9D;
+ state = XT_STATE_E1_9D;
break;
default:
- state = INIT;
+ state = XT_STATE_INIT;
break;
}
break;
- case E1_1D:
+ case XT_STATE_E1_1D:
switch (code) {
case 0x45:
matrix_make(0x55);
break;
default:
- state = INIT;
+ state = XT_STATE_INIT;
break;
}
break;
- case E1_9D:
+ case XT_STATE_E1_9D:
switch (code) {
case 0x45:
matrix_break(0x55);
break;
default:
- state = INIT;
+ state = XT_STATE_INIT;
break;
}
break;
default:
- state = INIT;
+ state = XT_STATE_INIT;
}
matrix_scan_quantum();
return 1;
diff --git a/keyboards/converter/xt_usb/rules.mk b/keyboards/converter/xt_usb/rules.mk
index 1f96251830..444e5f02df 100644
--- a/keyboards/converter/xt_usb/rules.mk
+++ b/keyboards/converter/xt_usb/rules.mk
@@ -1,45 +1,15 @@
# 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
-
-# Bootloader
-# This indicates which bootloader is present on the board.
-# BOOTLOADER = caterina # Pro Micro
-BOOTLOADER = halfkay # Teensy
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# ATmega32A bootloadHID
+# ATmega328P USBasp
+BOOTLOADER = halfkay
# Build Options
# comment out to disable the options.
@@ -53,7 +23,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover
XT_ENABLE = yes
CUSTOM_MATRIX = yes
-SRC = matrix.c led.c
+SRC += matrix.c
# Optimize size but this may cause error "relocation truncated to fit"
#EXTRALDFLAGS = -Wl,--relax
diff --git a/keyboards/converter/xt_usb/xt_usb.h b/keyboards/converter/xt_usb/xt_usb.h
index 9785158b4c..88d9f576c8 100644
--- a/keyboards/converter/xt_usb/xt_usb.h
+++ b/keyboards/converter/xt_usb/xt_usb.h
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* |-------| |------------------------------------------------------|Ent|---------------|
* | F5| F6| | Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | 4| 5| 6| |
* |-------| |----------------------------------------------------------------------| |
- * | F7| F8| |Shif| \| Z| X| C| V| B| N| M| ,| .| /|Shift|PrS| 1| 2| 3| +|
+ * | F7| F8| |Shif| \| Z| X| C| V| B| N| M| ,| .| /|Shift| *| 1| 2| 3| +|
* |-------| |----------------------------------------------------------------------| |
* | F9|F10| | Alt | Space |CapsLck| 0 | . | |
* `-------' `--------------------------------------------------------------------------'
@@ -38,7 +38,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* |-------| |------------------------------------------------------| 1C|---------------|
* | 3F| 40| | 1D | 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| | 4B| 4C| 4D| |
* |-------| |----------------------------------------------------------------------| |
- * | 41| 42| | 2A | 2B| 2C| 2D| 2E| 2F| 30| 31| 32| 33| 34| 35| 36 |*37| 4F| 50| 51| 4E|
+ * | 41| 42| | 2A | 2B| 2C| 2D| 2E| 2F| 30| 31| 32| 33| 34| 35| 36 | 37| 4F| 50| 51| 4E|
* |-------| |----------------------------------------------------------------------| |
* | 43| 44| | 38 | 39 | 3A | 52 | 53 | |
* `-------' `--------------------------------------------------------------------------'
@@ -47,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
K3B,K3C, K01,K02,K03,K04,K05,K06,K07,K08,K09,K0A,K0B,K0C,K0D,K0E, K45, K46, \
K3D,K3E, K0F,K10,K11,K12,K13,K14,K15,K16,K17,K18,K19,K1A,K1B, K47,K48,K49,K4A, \
K3F,K40, K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K1C,K4B,K4C,K4D, \
- K41,K42, K2A,K2B,K2C,K2D,K2E,K2F,K30,K31,K32,K33,K34,K35,K36,K54,K4F,K50,K51,K4E, \
+ K41,K42, K2A,K2B,K2C,K2D,K2E,K2F,K30,K31,K32,K33,K34,K35,K36,K37,K4F,K50,K51,K4E, \
K43,K44, K38, K39, K3A, K52, K53 \
) { \
{ KC_NO, K01, K02, K03, K04, K05, K06, K07 }, \
@@ -56,11 +56,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{ K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \
{ K20, K21, K22, K23, K24, K25, K26, K27 }, \
{ K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \
- { K30, K31, K32, K33, K34, K35, K36, KC_NO }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37 }, \
{ K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \
{ K40, K41, K42, K43, K44, K45, K46, K47 }, \
{ K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, \
- { K50, K51, K52, K53, K54, KC_NO, KC_NO, KC_NO }, \
+ { K50, K51, K52, K53, KC_NO, KC_NO, KC_NO, KC_NO }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \