Compare commits
12 Commits
0.8.132
...
make_cli_p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a380937f1f | ||
|
|
e916ce5f3e | ||
|
|
086a7cf800 | ||
|
|
99f7fe6bd4 | ||
|
|
d0c3a4c8d5 | ||
|
|
2dca087b04 | ||
|
|
7e4cf9ace2 | ||
|
|
0d658e0c95 | ||
|
|
1522d97c2b | ||
|
|
2d39a9dcdb | ||
|
|
33bf4863f5 | ||
|
|
ad547c1fdd |
79
Makefile
79
Makefile
@@ -557,55 +557,38 @@ endef
|
||||
# Let's match everything, we handle all the rule parsing ourselves
|
||||
.PHONY: %
|
||||
%:
|
||||
# Check if we have the CMP tool installed
|
||||
cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
|
||||
# Ensure that python3 is installed. This check can be removed after python is used in more places.
|
||||
if ! python3 --version 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; fi
|
||||
# Check if the submodules are dirty, and display a warning if they are
|
||||
ifndef SKIP_GIT
|
||||
if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 50 --init lib/chibios; fi
|
||||
if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 50 --init lib/chibios-contrib; fi
|
||||
if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 50 --init lib/ugfx; fi
|
||||
if [ ! -e lib/lufa ]; then git submodule sync lib/lufa && git submodule update --depth 50 --init lib/lufa; fi
|
||||
git submodule status --recursive 2>/dev/null | \
|
||||
while IFS= read -r x; do \
|
||||
case "$$x" in \
|
||||
\ *) ;; \
|
||||
*) printf "$(MSG_SUBMODULE_DIRTY)";break;; \
|
||||
esac \
|
||||
done
|
||||
endif
|
||||
rm -f $(ERROR_FILE) > /dev/null 2>&1
|
||||
$(eval $(call PARSE_RULE,$@))
|
||||
$(eval $(call SET_SILENT_MODE))
|
||||
# Run all the commands in the same shell, notice the + at the first line
|
||||
# it has to be there to allow parallel execution of the submake
|
||||
# This always tries to compile everything, even if error occurs in the middle
|
||||
# But we return the error code at the end, to trigger travis failures
|
||||
# The sort at this point is to remove duplicates
|
||||
$(foreach COMMAND,$(sort $(COMMANDS)),$(RUN_COMMAND))
|
||||
if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi;
|
||||
$(foreach TEST,$(sort $(TESTS)),$(RUN_TEST))
|
||||
if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi;
|
||||
# # Check if we have the CMP tool installed
|
||||
# cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
|
||||
# # Ensure that python3 is installed. This check can be removed after python is used in more places.
|
||||
# if ! python3 --version 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; fi
|
||||
# # Check if the submodules are dirty, and display a warning if they are
|
||||
#ifndef SKIP_GIT
|
||||
# if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 50 --init lib/chibios; fi
|
||||
# if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 50 --init lib/chibios-contrib; fi
|
||||
# if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 50 --init lib/ugfx; fi
|
||||
# if [ ! -e lib/lufa ]; then git submodule sync lib/lufa && git submodule update --depth 50 --init lib/lufa; fi
|
||||
# git submodule status --recursive 2>/dev/null | \
|
||||
# while IFS= read -r x; do \
|
||||
# case "$$x" in \
|
||||
# \ *) ;; \
|
||||
# *) printf "$(MSG_SUBMODULE_DIRTY)";break;; \
|
||||
# esac \
|
||||
# done
|
||||
#endif
|
||||
# rm -f $(ERROR_FILE) > /dev/null 2>&1
|
||||
# $(eval $(call PARSE_RULE,$@))
|
||||
# $(eval $(call SET_SILENT_MODE))
|
||||
# # Run all the commands in the same shell, notice the + at the first line
|
||||
# # it has to be there to allow parallel execution of the submake
|
||||
# # This always tries to compile everything, even if error occurs in the middle
|
||||
# # But we return the error code at the end, to trigger travis failures
|
||||
# # The sort at this point is to remove duplicates
|
||||
# $(foreach COMMAND,$(sort $(COMMANDS)),$(RUN_COMMAND))
|
||||
# if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi;
|
||||
# $(foreach TEST,$(sort $(TESTS)),$(RUN_TEST))
|
||||
# if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi;
|
||||
|
||||
# These no longer work because of the colon system
|
||||
|
||||
# All should compile everything
|
||||
# .PHONY: all
|
||||
# all: all-keyboards test-all
|
||||
|
||||
# Define some shortcuts, mostly for compatibility with the old syntax
|
||||
# .PHONY: all-keyboards
|
||||
# all-keyboards: all\:all\:all
|
||||
|
||||
# .PHONY: all-keyboards-defaults
|
||||
# all-keyboards-defaults: all\:default
|
||||
|
||||
# .PHONY: test
|
||||
# test: test-all
|
||||
|
||||
# .PHONY: test-clean
|
||||
# test-clean: test-all-clean
|
||||
bin/qmk makehandler $@
|
||||
|
||||
lib/%:
|
||||
git submodule sync $?
|
||||
|
||||
56
docs/ja/feature_command.md
Normal file
56
docs/ja/feature_command.md
Normal file
@@ -0,0 +1,56 @@
|
||||
# コマンド
|
||||
|
||||
<!---
|
||||
original document: 0.8.94:docs/feature_command.md
|
||||
git diff 0.8.94 HEAD -- docs/feature_command.md | cat
|
||||
-->
|
||||
|
||||
コマンド(旧称:マジック)は、ファームウェアを書き込んだり、[ブートマジック](ja/feature_bootmagic.md)を使うためにプラグを抜いたりすることなくキーボードの挙動を変更する方法です。この機能と[ブートマジックキーコード](feature_bootmagic.md#keycodes)には多くの重複があります。可能な限り、コマンドでは無くブートマジックキーコードの機能を使うことをお勧めします。
|
||||
|
||||
一部のキーボードではコマンドがデフォルトで無効になっています。その場合、`rules.mk` 内で明示的に有効にする必要があります:
|
||||
|
||||
```make
|
||||
COMMAND_ENABLE = yes
|
||||
```
|
||||
|
||||
## 使用法
|
||||
|
||||
コマンドを使うには、`IS_COMMAND()` マクロで定義されたキーの組み合わせを押し続けます。デフォルトでは、これは「左Shift + 右Shift」です。次に、目的のコマンドに対応するキーを押します。例えば、現在の QMK バージョンを QMK Toolbox コンソールに出力するには、「左Shift + 右Shift + `V`」を押します。
|
||||
|
||||
## 設定
|
||||
|
||||
コマンドのためのキーの割り当てを変更したい場合は、キーボードあるいはキーマップレベルのどちらかで、`config.h` にこれらを `#define` します。ここで割り当てる全てのキーコードは `KC_` 接頭辞を省略する必要があります。
|
||||
|
||||
| 定義 | デフォルト | 説明 |
|
||||
|------------------------------------|--------------------------------|------------------------------------------------|
|
||||
| `IS_COMMAND()` | `(get_mods() == MOD_MASK_SHIFT)` | コマンドをアクティブにするキーの組み合わせ |
|
||||
| `MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS` | `true` | ファンクション行を使ってデフォルトレイヤーを設定 |
|
||||
| `MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS` | `true` | 数字キーでデフォルトレイヤーを設定 |
|
||||
| `MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM` | `false` | `MAGIC_KEY_LAYER0..9` を使ってデフォルトレイヤーを設定 |
|
||||
| `MAGIC_KEY_DEBUG` | `D` | シリアルを介するデバッグの切り替え |
|
||||
| `MAGIC_KEY_DEBUG_MATRIX` | `X` | キーマトリックスのデバッグの切り替え |
|
||||
| `MAGIC_KEY_DEBUG_KBD` | `K` | キーボードのデバッグの切り替え |
|
||||
| `MAGIC_KEY_DEBUG_MOUSE` | `M` | マウスのデバッグの切り替え |
|
||||
| `MAGIC_KEY_CONSOLE` | `C` | コマンドコンソールを有効にする |
|
||||
| `MAGIC_KEY_VERSION` | `V` | コンソールに実行中の QMK バージョンを出力 |
|
||||
| `MAGIC_KEY_STATUS` | `S` | コンソールに現在のキーボードの状態を出力 |
|
||||
| `MAGIC_KEY_HELP` | `H` | コンソールにコマンドのヘルプを出力 |
|
||||
| `MAGIC_KEY_HELP_ALT` | `SLASH` | コンソールにコマンドのヘルプを出力 (代替) |
|
||||
| `MAGIC_KEY_LAYER0` | `0` | レイヤー 0 をデフォルトレイヤーにする |
|
||||
| `MAGIC_KEY_LAYER0_ALT` | `GRAVE` | レイヤー 0 をデフォルトレイヤーにする (代替) |
|
||||
| `MAGIC_KEY_LAYER1` | `1` | レイヤー 1 をデフォルトレイヤーにする |
|
||||
| `MAGIC_KEY_LAYER2` | `2` | レイヤー 2 をデフォルトレイヤーにする |
|
||||
| `MAGIC_KEY_LAYER3` | `3` | レイヤー 3 をデフォルトレイヤーにする |
|
||||
| `MAGIC_KEY_LAYER4` | `4` | レイヤー 4 をデフォルトレイヤーにする |
|
||||
| `MAGIC_KEY_LAYER5` | `5` | レイヤー 5 をデフォルトレイヤーにする |
|
||||
| `MAGIC_KEY_LAYER6` | `6` | レイヤー 6 をデフォルトレイヤーにする |
|
||||
| `MAGIC_KEY_LAYER7` | `7` | レイヤー 7 をデフォルトレイヤーにする |
|
||||
| `MAGIC_KEY_LAYER8` | `8` | レイヤー 8 をデフォルトレイヤーにする |
|
||||
| `MAGIC_KEY_LAYER9` | `9` | レイヤー 9 をデフォルトレイヤーにする |
|
||||
| `MAGIC_KEY_BOOTLOADER` | `B` | ブートローダにジャンプする |
|
||||
| `MAGIC_KEY_BOOTLOADER_ALT` | `ESC` | ブートローダにジャンプする (代替) |
|
||||
| `MAGIC_KEY_LOCK` | `CAPS` | 何も入力できないようにキーボードをロック |
|
||||
| `MAGIC_KEY_EEPROM` | `E` | 保存された EEPROM 設定をコンソールに出力 |
|
||||
| `MAGIC_KEY_EEPROM_CLEAR` | `BSPACE` | EEPROM をクリア |
|
||||
| `MAGIC_KEY_NKRO` | `N` | N キーロールオーバー (NKRO) の有効・無効を切り替え |
|
||||
| `MAGIC_KEY_SLEEP_LED` | `Z` | コンピュータがスリープの時に LED を切り替え |
|
||||
81
docs/ja/feature_encoders.md
Normal file
81
docs/ja/feature_encoders.md
Normal file
@@ -0,0 +1,81 @@
|
||||
# エンコーダ
|
||||
|
||||
<!---
|
||||
original document: 0.8.123:docs/feature_encoders.md
|
||||
git diff 0.8.123 HEAD -- docs/feature_encoders.md | cat
|
||||
-->
|
||||
|
||||
以下を `rules.mk` に追加することで基本的なエンコーダがサポートされます:
|
||||
|
||||
```make
|
||||
ENCODER_ENABLE = yes
|
||||
```
|
||||
|
||||
さらに、以下を `config.h` に追加します:
|
||||
|
||||
```c
|
||||
#define ENCODERS_PAD_A { B12 }
|
||||
#define ENCODERS_PAD_B { B13 }
|
||||
```
|
||||
|
||||
各 PAD_A/B 変数は配列を定義するため、複数のエンコーダを定義することができます。例えば:
|
||||
|
||||
```c
|
||||
#define ENCODERS_PAD_A { encoder1a, encoder2a }
|
||||
#define ENCODERS_PAD_B { encoder1b, encoder2b }
|
||||
```
|
||||
|
||||
エンコーダの時計回りの方向が間違っている場合は、A と B のパッド定義を交換することができます。define を使って逆にすることもできます:
|
||||
|
||||
```c
|
||||
#define ENCODER_DIRECTION_FLIP
|
||||
```
|
||||
|
||||
さらに、解像度を同じファイルで指定することができます (デフォルトかつお勧めは4):
|
||||
|
||||
```c
|
||||
#define ENCODER_RESOLUTION 4
|
||||
```
|
||||
|
||||
## 分割キーボード
|
||||
|
||||
分割キーボードのそれぞれの側のエンコーダに異なるピン配列を使っている場合、右側のピン配列を以下のように定義することができます:
|
||||
|
||||
```c
|
||||
#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a }
|
||||
#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b }
|
||||
```
|
||||
|
||||
## コールバック
|
||||
|
||||
コールバック関数を `<keyboard>.c` に記述することができます:
|
||||
|
||||
```c
|
||||
void encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
encoder_update_user(index, clockwise);
|
||||
}
|
||||
```
|
||||
|
||||
あるいは `keymap.c` に記述することもできます:
|
||||
|
||||
```c
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_PGDN);
|
||||
} else {
|
||||
tap_code(KC_PGUP);
|
||||
}
|
||||
} else if (index == 1) { /* Second encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_DOWN);
|
||||
} else {
|
||||
tap_code(KC_UP);
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## ハードウェア
|
||||
|
||||
エンコーダの A と B の線は MCU に直接配線し、C/common 線はグランドに配線する必要があります。
|
||||
@@ -105,10 +105,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
@@ -165,10 +165,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/* Bootmagic Lite key configuration */
|
||||
// #define BOOTMAGIC_LITE_ROW 0
|
||||
|
||||
@@ -192,10 +192,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
@@ -192,10 +192,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
@@ -192,10 +192,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
@@ -193,10 +193,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define VENDOR_ID 0x6B62
|
||||
#define PRODUCT_ID 0x1769
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER coseyfannitutti
|
||||
@@ -243,7 +243,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* Bootmagic Lite key configuration
|
||||
/* Bootmagic Lite key configuration */
|
||||
#define BOOTMAGIC_LITE_ROW 0
|
||||
#define BOOTMAGIC_LITE_COLUMN 0
|
||||
*/
|
||||
|
||||
|
||||
43
keyboards/coseyfannitutti/discipad/keymaps/via/keymap.c
Normal file
43
keyboards/coseyfannitutti/discipad/keymaps/via/keymap.c
Normal file
@@ -0,0 +1,43 @@
|
||||
/* Copyright 2019 COSEYFANNITUTTI
|
||||
*
|
||||
* 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 QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_numpad_5x4(
|
||||
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_P7, KC_P8, KC_P9,
|
||||
KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||
KC_P1, KC_P2, KC_P3,
|
||||
KC_P0, KC_PDOT, KC_PENT ),
|
||||
[1] = LAYOUT_numpad_5x4(
|
||||
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 ),
|
||||
[2] = LAYOUT_numpad_5x4(
|
||||
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 ),
|
||||
[3] = LAYOUT_numpad_5x4(
|
||||
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 ),
|
||||
};
|
||||
4
keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk
Normal file
4
keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk
Normal file
@@ -0,0 +1,4 @@
|
||||
VIA_ENABLE = yes
|
||||
LTO_ENABLE = yes
|
||||
EXTRAKEY_ENABLE = no
|
||||
MOUSEKEY_ENABLE = no
|
||||
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define VENDOR_ID 0x6B62
|
||||
#define PRODUCT_ID 0x8769
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER coseyfannitutti
|
||||
@@ -237,4 +237,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||
#define LCD_E_PIN 1 //< pin for Enable line
|
||||
#endif
|
||||
*/
|
||||
*/
|
||||
|
||||
/* Bootmagic Lite key configuration */
|
||||
#define BOOTMAGIC_LITE_ROW 0
|
||||
#define BOOTMAGIC_LITE_COLUMN 0
|
||||
|
||||
50
keyboards/coseyfannitutti/mysterium/keymaps/via/keymap.c
Normal file
50
keyboards/coseyfannitutti/mysterium/keymaps/via/keymap.c
Normal file
@@ -0,0 +1,50 @@
|
||||
/* Copyright 2019 COSEYFANNITUTTI
|
||||
*
|
||||
* 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 QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_tkl_ansi(
|
||||
KC_GESC, 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_PSCR, KC_SLCK, KC_PAUS,
|
||||
KC_GRV, 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_INS, KC_HOME, KC_PGUP,
|
||||
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_DEL, KC_END, KC_PGDN,
|
||||
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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||
|
||||
[1] = LAYOUT_tkl_ansi(
|
||||
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, 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, KC_TRNS, 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,
|
||||
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,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS),
|
||||
|
||||
[2] = LAYOUT_tkl_ansi(
|
||||
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, 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, 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, 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,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, KC_TRNS, KC_TRNS),
|
||||
|
||||
[3] = LAYOUT_tkl_ansi(
|
||||
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, 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, 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, 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,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, KC_TRNS, KC_TRNS)
|
||||
};
|
||||
4
keyboards/coseyfannitutti/mysterium/keymaps/via/rules.mk
Normal file
4
keyboards/coseyfannitutti/mysterium/keymaps/via/rules.mk
Normal file
@@ -0,0 +1,4 @@
|
||||
VIA_ENABLE = yes
|
||||
LTO_ENABLE = yes
|
||||
EXTRAKEY_ENABLE = no
|
||||
MOUSEKEY_ENABLE = no
|
||||
@@ -193,10 +193,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
@@ -24,11 +24,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define USE_I2C
|
||||
#define USE_SERIAL
|
||||
|
||||
#ifdef USE_Link_Time_Optimization
|
||||
// LTO has issues with macros (action_get_macro) and "functions" (fn_actions),
|
||||
// so just disable them
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
#define DISABLE_LEADER
|
||||
#endif // USE_Link_Time_Optimization
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
@@ -192,10 +192,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
@@ -33,10 +33,8 @@
|
||||
#define DEBOUNCE 3
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
# define NO_ACTION_MACRO
|
||||
# define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
||||
|
||||
@@ -33,10 +33,8 @@
|
||||
#define DEBOUNCE 3
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
# define NO_ACTION_MACRO
|
||||
# define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
||||
|
||||
@@ -33,10 +33,8 @@
|
||||
#define DEBOUNCE 3
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
# define NO_ACTION_MACRO
|
||||
# define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
||||
|
||||
@@ -33,10 +33,8 @@
|
||||
#define DEBOUNCE 3
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
# define NO_ACTION_MACRO
|
||||
# define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
||||
|
||||
@@ -33,10 +33,8 @@
|
||||
#define DEBOUNCE 3
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
# define NO_ACTION_MACRO
|
||||
# define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
||||
|
||||
@@ -33,10 +33,8 @@
|
||||
#define DEBOUNCE 3
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
# define NO_ACTION_MACRO
|
||||
# define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
||||
|
||||
@@ -29,10 +29,8 @@
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
# define NO_ACTION_MACRO
|
||||
# define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# define RGB_MATRIX_LED_PROCESS_LIMIT 4
|
||||
|
||||
@@ -29,10 +29,8 @@
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
# define NO_ACTION_MACRO
|
||||
# define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# define RGB_MATRIX_LED_PROCESS_LIMIT 4
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include QMK_KEYBOARD_CONFIG_H
|
||||
#include "333fred_config.h"
|
||||
|
||||
#define USE_SERIAL
|
||||
#define MASTER_LEFT
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
BACKLIGHT_ENABLE = no
|
||||
RGBLIGHT_ENABLE = yes
|
||||
AUDIO_ENABLE = no
|
||||
NKRO_ENABLE = yes
|
||||
KEY_LOCK_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
|
||||
@@ -25,9 +25,7 @@
|
||||
# define NO_PRINT
|
||||
#endif
|
||||
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
# define NO_ACTION_MACRO
|
||||
# define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
#undef RGBLIGHT_ANIMATIONS
|
||||
|
||||
@@ -192,10 +192,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "333fred_config.h"
|
||||
|
||||
#define USE_SERIAL
|
||||
#define EE_HANDS
|
||||
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "333fred.h"
|
||||
|
||||
enum custom_macros {
|
||||
DLEFT,
|
||||
DRIGHT,
|
||||
PSCREEN_APP
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[BASE] = LAYOUT_5x6(
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
|
||||
NKRO_ENABLE = yes
|
||||
KEY_LOCK_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
PERMISSIVE_HOLD = yes
|
||||
EXTRAFLAGS += -flto
|
||||
|
||||
@@ -31,7 +31,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define MATRIX_ROWS 8
|
||||
#define MATRIX_COLS 16
|
||||
|
||||
|
||||
#define MATRIX_ROW_PINS { B0, B1, B2, B3, E6, B7, D0, D1 }
|
||||
#define MATRIX_COL_PINS { D2, D3, C6, C7, D5, D4, D6, D7, B4, B5, B6, F7, F6, F5, F4, F1 }
|
||||
#define UNUSED_PINS
|
||||
@@ -39,7 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION ROW2COL
|
||||
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
@@ -130,7 +128,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
/* disable these deprecated features by default */
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
@@ -192,10 +192,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
@@ -195,10 +195,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
@@ -194,10 +194,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
# define NO_ACTION_MACRO
|
||||
# define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
@@ -130,10 +130,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/* Bootmagic Lite key configuration */
|
||||
// #define BOOTMAGIC_LITE_ROW 0
|
||||
|
||||
@@ -192,10 +192,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
51
keyboards/id80/keymaps/via/keymap.c
Normal file
51
keyboards/id80/keymaps/via/keymap.c
Normal file
@@ -0,0 +1,51 @@
|
||||
/* Copyright 2020 Sergey Vlasov <sigprof@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 QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MO(1), KC_INS,
|
||||
KC_GRV, 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_HOME,
|
||||
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_DEL,
|
||||
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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
[1] = LAYOUT(
|
||||
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, BL_DEC, BL_TOGG, BL_INC, NK_TOGG, _______, _______, _______, _______, _______, BL_INC,
|
||||
_______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_STEP
|
||||
),
|
||||
[2] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
[3] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
};
|
||||
2
keyboards/id80/keymaps/via/rules.mk
Normal file
2
keyboards/id80/keymaps/via/rules.mk
Normal file
@@ -0,0 +1,2 @@
|
||||
LINK_TIME_OPTIMIZATION_ENABLE = yes
|
||||
VIA_ENABLE = yes
|
||||
@@ -39,10 +39,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define BACKLIGHT_PIN D4
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/* key combination for magic key command */
|
||||
/* defined by default; to change, uncomment and set to the combination you want */
|
||||
|
||||
@@ -165,10 +165,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
@@ -48,7 +48,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
@@ -147,10 +147,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "333fred_config.h"
|
||||
|
||||
#define USE_SERIAL
|
||||
#define EE_HANDS
|
||||
#define NO_ACTION_MACRO
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
NKRO_ENABLE = yes
|
||||
KEY_LOCK_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
PERMISSIVE_HOLD = yes
|
||||
EXTRAFLAGS += -flto
|
||||
|
||||
|
||||
@@ -161,10 +161,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
# define NO_ACTION_MACRO
|
||||
# define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
@@ -99,7 +99,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
@@ -158,10 +158,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
@@ -175,10 +175,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \
|
||||
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, XXX}, \
|
||||
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX}, \
|
||||
{k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, XXX}, \
|
||||
{k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX}, \
|
||||
{k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, XXX} \
|
||||
}
|
||||
|
||||
|
||||
@@ -38,14 +38,14 @@
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, k2e, \
|
||||
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \
|
||||
k40, k41, k42, k46, k49, k4c, k4d, k4e \
|
||||
k40, k41, k42, k46, k4a, k4c, k4d, k4e \
|
||||
) \
|
||||
{ \
|
||||
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f}, \
|
||||
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, ___}, \
|
||||
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, ___, k2d, k2e, ___}, \
|
||||
{k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, ___}, \
|
||||
{k40, k41, k42, ___, ___, ___, k46, ___, ___, k49, ___, ___, k4c, k4d, k4e, ___} \
|
||||
{k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, k4a, ___, k4c, k4d, k4e, ___} \
|
||||
}
|
||||
|
||||
#define LAYOUT_iso_tsangan( \
|
||||
@@ -53,14 +53,14 @@
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \
|
||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \
|
||||
k40, k41, k42, k46, k49, k4c, k4d, k4e \
|
||||
k40, k41, k42, k46, k4a, k4c, k4d, k4e \
|
||||
) \
|
||||
{ \
|
||||
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f}, \
|
||||
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, ___, k1e, ___}, \
|
||||
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, ___}, \
|
||||
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, ___}, \
|
||||
{k40, k41, k42, ___, ___, ___, k46, ___, ___, k49, ___, ___, k4c, k4d, k4e, ___} \
|
||||
{k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, k4a, ___, k4c, k4d, k4e, ___} \
|
||||
}
|
||||
|
||||
#define LAYOUT_65_iso( \
|
||||
|
||||
@@ -98,7 +98,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
#define UNUSED_PINS
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
# define NO_ACTION_MACRO
|
||||
# define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 3
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
|
||||
@@ -147,12 +147,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
24
keyboards/naked60/keymaps/333fred/config.h
Normal file
24
keyboards/naked60/keymaps/333fred/config.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* Copyright 2018 Salicylic_acid3
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
#define TAPPING_FORCE_HOLD
|
||||
#define TAPPING_TERM 200
|
||||
53
keyboards/naked60/keymaps/333fred/keymap.c
Normal file
53
keyboards/naked60/keymaps/333fred/keymap.c
Normal file
@@ -0,0 +1,53 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "333fred.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[BASE] = LAYOUT(
|
||||
//,--------------------------------------------------------------------| |---------------------------------------------------------.
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
//|--------------+------------+------+--------+--------+---------------| |-------+--------+--------+-------+--------+--------------|
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
//|--------------+------------+------+--------+--------+---------------| |-------+--------+--------+-------+--------+--------------|
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
//|--------------+------------+------+--------+--------+---------------| |-------+--------+--------+-------+--------+--------------|
|
||||
OSM(MOD_LSFT), CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_RSFT),
|
||||
//|--------------+------------+------+--------+--------+---------------+-------+-------+-------+--------+--------+-------+--------+--------------|
|
||||
KC_F4, KC_F5, KC_LALT, KC_BSPC, TD(TD_SYM_VIM), KC_DEL, KC_ENT, KC_SPC, KC_DOWN, KC_UP, KC_EQL, KC_LGUI
|
||||
//`----------------------------------------------------------------------------------------------------------------'
|
||||
),
|
||||
|
||||
|
||||
[SYMB] = LAYOUT(
|
||||
//,-----------------------------------------------------| |-----------------------------------------------------.
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+-------+--------+--------|
|
||||
_______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, _______, KC_7, KC_8, KC_9, _______, KC_F12,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+-------+--------+--------|
|
||||
_______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, KC_VOLU, KC_4, KC_5, KC_6, _______, _______,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+-------+--------+--------|
|
||||
_______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_VOLD, KC_1, KC_2, KC_3, _______, _______,
|
||||
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-------+--------+--------|
|
||||
_______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_0, KC_ENT, _______
|
||||
//`------------------------------------------------------------------------------------------------------------'
|
||||
),
|
||||
|
||||
|
||||
[VIM] = LAYOUT( /* Base */
|
||||
//,-----------------------------------------------------| |-----------------------------------------------------.
|
||||
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
_______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
_______, DLEFT, DRIGHT, KC_LCTL, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
//|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
//`------------------------------------------------------------------------------------------------------------'
|
||||
)
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
tap_dance_process_keycode(keycode);
|
||||
return !try_handle_macro(keycode, record);
|
||||
}
|
||||
@@ -195,10 +195,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
#include "decadepad.h"
|
||||
void matrix_init_kb(void) {
|
||||
led_init_ports();
|
||||
matrix_init_user();
|
||||
};
|
||||
|
||||
void led_init_ports(void) {
|
||||
setPinOutput(D4);
|
||||
}
|
||||
|
||||
bool led_update_kb(led_t led_state) {
|
||||
if (led_update_user(led_state)){
|
||||
writePin(D4, led_state.num_lock);
|
||||
writePin(D4, !led_state.num_lock);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
RGBLIGHT_ENABLE = yes
|
||||
NKRO_ENABLE = yes
|
||||
KEY_LOCK_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
EXTRAFLAGS += -flto
|
||||
|
||||
@@ -233,10 +233,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
# define NO_ACTION_MACRO
|
||||
# define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
|
||||
@@ -133,10 +133,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/* Bootmagic Lite key configuration */
|
||||
// #define BOOTMAGIC_LITE_ROW 0
|
||||
|
||||
@@ -198,10 +198,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
@@ -192,10 +192,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
# YMD75 / MT84
|
||||
|
||||
75% keyboard from YMDK. YMDK sell the board and name it "YMD75", however the PCB has "MT84" printed on both sides.
|
||||
75% keyboard from YMDK. YMDK sell the board and name it "YMD75", however revision 1 of the PCB has "MT84" printed on both sides.
|
||||
|
||||
* Keyboard Maintainer: [Wayne K Jones](github.com/WarmCatUK)
|
||||
* Hardware Supported: YMD75/MT84 with the ATmega32a chip.
|
||||
* Hardware Supported: YMD75/MT84 (rev1 and rev2) with the ATmega32a chip.
|
||||
* Hardware Availability: <https://www.aliexpress.com/item/32812690592.html>
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make ymd75:default
|
||||
make ymd75/rev1:default
|
||||
|
||||
Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid))
|
||||
|
||||
make ymd75:default:flash
|
||||
make ymd75/rev1:default:flash
|
||||
|
||||
**Reset Key**: Hold down the key located at *Key below the top right key*, commonly programmed as *Backspace* while plugging in the keyboard.
|
||||
**Reset Key**: Hold down the key located at *Key below the top right key*, commonly programmed as *Backspace* while plugging in the keyboard. On PCB revision 2, enter the bootloader by holding `L_CTRL` while plugging in the keyboard.
|
||||
|
||||
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).
|
||||
|
||||
@@ -24,16 +24,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define VENDOR_ID 0x20A0
|
||||
#define PRODUCT_ID 0x422D
|
||||
#define DEVICE_VER 0x0200
|
||||
|
||||
#define MANUFACTURER YMDK
|
||||
#define PRODUCT YMD75 / MT84
|
||||
#define DESCRIPTION 75% Keyboard
|
||||
|
||||
/* matrix size */
|
||||
#define MATRIX_ROWS 8
|
||||
#define MATRIX_COLS 15
|
||||
#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 }
|
||||
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define BACKLIGHT_PIN D4
|
||||
#define BACKLIGHT_LEVELS 12
|
||||
|
||||
@@ -82,12 +82,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
switch(keycode) {
|
||||
case P_MACRO:
|
||||
SEND_STRING(SS_DOWN(X_LALT));
|
||||
SEND_STRING(SS_TAP(X_KP_1));
|
||||
SEND_STRING(SS_TAP(X_KP_5));
|
||||
SEND_STRING(SS_TAP(X_KP_6));
|
||||
SEND_STRING(SS_UP(X_LALT));
|
||||
return false; break;
|
||||
register_code(KC_LALT);
|
||||
tap_code(KC_KP_1);
|
||||
tap_code(KC_KP_5);
|
||||
tap_code(KC_KP_6);
|
||||
unregister_code(KC_LALT);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
27
keyboards/ymd75/rev1/config.h
Normal file
27
keyboards/ymd75/rev1/config.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
Base Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
|
||||
Modified 2017 Andrew Novak <ndrw.nvk@gmail.com>
|
||||
Modified 2018 Wayne Jones (WarmCatUK) <waynekjones@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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/* matrix size */
|
||||
#define MATRIX_ROWS 8
|
||||
#define MATRIX_COLS 15
|
||||
#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 }
|
||||
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
34
keyboards/ymd75/rev1/rev1.c
Normal file
34
keyboards/ymd75/rev1/rev1.c
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
Copyright 2017 Luiz Ribeiro <luizribeiro@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 "ymd75.h"
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
led_init_ports();
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
void led_init_ports(void) {
|
||||
setPinOutput(D1);
|
||||
}
|
||||
|
||||
bool led_update_kb(led_t led_state) {
|
||||
if (led_update_user(led_state)) {
|
||||
writePin(D1, led_state.caps_lock);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
39
keyboards/ymd75/rev1/rev1.h
Normal file
39
keyboards/ymd75/rev1/rev1.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
Base Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
|
||||
Modified 2017 Andrew Novak <ndrw.nvk@gmail.com>
|
||||
Modified 2018 Wayne Jones (WarmCatUK) <waynekjones@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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \
|
||||
K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \
|
||||
K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \
|
||||
K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \
|
||||
K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \
|
||||
K00, K10, K20, K56, K57, KB0, KC0, K96, K76, K66 \
|
||||
){ \
|
||||
{ K00, K10, K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB0, KC0, KD0, KC_NO }, \
|
||||
{ K01, K11, K21, K31, K41, K51, KC_NO, KC_NO, KC_NO, KC_NO, KA1, KB1, KC_NO, KD1, KE1 }, \
|
||||
{ K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, KC_NO, KC_NO, KA2, KB2, KC_NO, KD2, KE2 }, \
|
||||
{ K03, K13, K23, K33, K43, K53, KC_NO, KC_NO, KC_NO, KC_NO, KA3, KB3, KC3, KD3, KC_NO }, \
|
||||
{ K04, K14, K24, K34, K44, K54, KC_NO, KC_NO, KC_NO, KC_NO, KA4, KB4, KC4, KC_NO, KE4 }, \
|
||||
{ K05, KC_NO, K25, K35, K45, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KC5, KD5, KE5 }, \
|
||||
{ K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \
|
||||
{ K07, K17, K27, K37, K47, K57, K67, K77, KE0, KC_NO, KA7, KB7, KC7, KD7, KE7 } \
|
||||
}
|
||||
15
keyboards/ymd75/rev1/rules.mk
Normal file
15
keyboards/ymd75/rev1/rules.mk
Normal file
@@ -0,0 +1,15 @@
|
||||
# build options
|
||||
BOOTMAGIC_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = no
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
COMMAND_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = yes
|
||||
WS2812_DRIVER = i2c
|
||||
NKRO_ENABLE = no
|
||||
# Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
|
||||
KEY_LOCK_ENABLE = yes
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
8
keyboards/ymd75/rev2/config.h
Normal file
8
keyboards/ymd75/rev2/config.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
/* matrix size */
|
||||
#define MATRIX_ROWS 6
|
||||
#define MATRIX_COLS 15
|
||||
#define MATRIX_ROW_PINS { B7, B6, B5, B4, B3, B0 }
|
||||
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
34
keyboards/ymd75/rev2/rev2.c
Normal file
34
keyboards/ymd75/rev2/rev2.c
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
Copyright 2017 Luiz Ribeiro <luizribeiro@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 "ymd75.h"
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
led_init_ports();
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
void led_init_ports(void) {
|
||||
setPinOutput(D1);
|
||||
}
|
||||
|
||||
bool led_update_kb(led_t led_state) {
|
||||
if (led_update_user(led_state)) {
|
||||
writePin(D1, led_state.caps_lock);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
18
keyboards/ymd75/rev2/rev2.h
Normal file
18
keyboards/ymd75/rev2/rev2.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K514, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K513, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \
|
||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
|
||||
K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, \
|
||||
K500, K501, K502, K505, K506, K507, K508, K509, K510, K511 \
|
||||
) { \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114 }, \
|
||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \
|
||||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \
|
||||
{ K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414 }, \
|
||||
{ K500, K501, K502, KC_NO, KC_NO, K505, K506, K507, K508, K509, K510, K511, KC_NO, K513, K514 } \
|
||||
}
|
||||
15
keyboards/ymd75/rev2/rules.mk
Normal file
15
keyboards/ymd75/rev2/rules.mk
Normal file
@@ -0,0 +1,15 @@
|
||||
# build options
|
||||
BOOTMAGIC_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = no
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
COMMAND_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = yes
|
||||
WS2812_DRIVER = i2c
|
||||
NKRO_ENABLE = no
|
||||
# Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
|
||||
KEY_LOCK_ENABLE = yes
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
@@ -11,20 +11,4 @@ MCU = atmega32a
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = bootloadHID
|
||||
|
||||
# build options
|
||||
BOOTMAGIC_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = no
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
COMMAND_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = yes
|
||||
WS2812_DRIVER = i2c
|
||||
NKRO_ENABLE = no
|
||||
# Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
|
||||
DISABLE_WS2812 = no
|
||||
|
||||
KEY_LOCK_ENABLE = yes
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
DEFAULT_FOLDER = ymd75/rev1
|
||||
|
||||
@@ -1,34 +1 @@
|
||||
/*
|
||||
Copyright 2017 Luiz Ribeiro <luizribeiro@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 "ymd75.h"
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
led_init_ports();
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
void led_init_ports(void) {
|
||||
setPinOutput(D1);
|
||||
}
|
||||
|
||||
bool led_update_kb(led_t led_state) {
|
||||
if (led_update_user(led_state)) {
|
||||
writePin(D1, led_state.caps_lock);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,55 +1,9 @@
|
||||
/*
|
||||
Base Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
|
||||
Modified 2017 Andrew Novak <ndrw.nvk@gmail.com>
|
||||
Modified 2018 Wayne Jones (WarmCatUK) <waynekjones@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/>.
|
||||
*/
|
||||
|
||||
#ifndef KEYMAP_COMMON_H
|
||||
#define KEYMAP_COMMON_H
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
#include "quantum_keycodes.h"
|
||||
#include "keycode.h"
|
||||
#include "action.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \
|
||||
K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \
|
||||
K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \
|
||||
K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \
|
||||
K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \
|
||||
K00, K10, K20, K56, K57, KB0, KC0, K96, K76, K66 \
|
||||
){ \
|
||||
{ K00, K10, K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB0, KC0, KD0, KC_NO }, \
|
||||
{ K01, K11, K21, K31, K41, K51, KC_NO, KC_NO, KC_NO, KC_NO, KA1, KB1, KC_NO, KD1, KE1 }, \
|
||||
{ K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, KC_NO, KC_NO, KA2, KB2, KC_NO, KD2, KE2 }, \
|
||||
{ K03, K13, K23, K33, K43, K53, KC_NO, KC_NO, KC_NO, KC_NO, KA3, KB3, KC3, KD3, KC_NO }, \
|
||||
{ K04, K14, K24, K34, K44, K54, KC_NO, KC_NO, KC_NO, KC_NO, KA4, KB4, KC4, KC_NO, KE4 }, \
|
||||
{ K05, KC_NO, K25, K35, K45, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KC5, KD5, KE5 }, \
|
||||
{ K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \
|
||||
{ K07, K17, K27, K37, K47, K57, K67, K77, KE0, KC_NO, KA7, KB7, KC7, KD7, KE7 } \
|
||||
}
|
||||
|
||||
#if defined(KEYBOARD_ymd75_rev1)
|
||||
#include "rev1.h"
|
||||
#elif defined(KEYBOARD_ymd75_rev2)
|
||||
#include "rev2.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -60,7 +60,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
@@ -24,11 +24,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define USE_I2C
|
||||
#define USE_SERIAL
|
||||
|
||||
#ifdef USE_Link_Time_Optimization
|
||||
// LTO has issues with macros (action_get_macro) and "functions" (fn_actions),
|
||||
// so just disable them
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
#define DISABLE_LEADER
|
||||
#endif // USE_Link_Time_Optimization
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
@@ -192,10 +192,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
@@ -40,11 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ./tmk_core
|
||||
// ......
|
||||
|
||||
#ifdef USE_Link_Time_Optimization
|
||||
// LTO has issues with macros (action_get_macro) and "functions" (fn_actions),
|
||||
// so just disable them
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif // USE_Link_Time_Optimization
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
//#endif /* CONFIG_H */
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include QMK_KEYBOARD_CONFIG_H
|
||||
#include "333fred_config.h"
|
||||
|
||||
#undef TAPPING_TERM
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
LCD_BACKLIGHT_ENABLE = yes
|
||||
LCD_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
||||
NKRO_ENABLE = yes
|
||||
KEY_LOCK_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "333fred_config.h"
|
||||
|
||||
#define USE_SERIAL
|
||||
#define MASTER_LEFT
|
||||
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
KEY_LOCK_ENABLE = yes
|
||||
NKRO_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
TAP_DANCE_ENABLE = yes
|
||||
|
||||
@@ -17,6 +17,7 @@ from . import json
|
||||
from . import json2c
|
||||
from . import list
|
||||
from . import kle2json
|
||||
from . import makehandler
|
||||
from . import new
|
||||
from . import pyformat
|
||||
from . import pytest
|
||||
|
||||
92
lib/python/qmk/cli/makehandler.py
Executable file
92
lib/python/qmk/cli/makehandler.py
Executable file
@@ -0,0 +1,92 @@
|
||||
"""Generate a make command from a `keyboard:keymap` pair.
|
||||
"""
|
||||
import os
|
||||
|
||||
from milc import cli
|
||||
|
||||
from qmk.path import is_keyboard
|
||||
|
||||
def parse_rule(rule):
|
||||
"""Parses a QMK make rule into its compononent parts.
|
||||
|
||||
Expects rule to be in the form `<keyboard>:<keyboard>[:<COMMAND>]`
|
||||
"""
|
||||
rule = rule.split(':')
|
||||
if len(rule) == 1:
|
||||
return rule + ['all', '']
|
||||
|
||||
if len(rule) == 2:
|
||||
return rule + ['']
|
||||
|
||||
if len(rule) == 3:
|
||||
return rule
|
||||
|
||||
raise IndexError('rule %s has too many parts!' % rule)
|
||||
|
||||
|
||||
@cli.argument('arguments', arg_only=True, nargs='+', help='Make arguments.')
|
||||
@cli.subcommand('QMK Hello World.', hidden=True)
|
||||
def makehandler(cli):
|
||||
"""Turn a `make keyboard:keymap` command into a full make command.
|
||||
"""
|
||||
environment = os.environ.copy() # FIXME: We should sanitize this
|
||||
print('***', 'environment')
|
||||
for key, value in environment.items():
|
||||
cli.log.info('%s=%s', key, value)
|
||||
environment['COLOR'] = '1' if cli.config.general.color else '0'
|
||||
environment['SILENT_MODE'] = '0'
|
||||
environment['VERBOSE'] = '1' if cli.config.general.verbose else '0'
|
||||
compile_targets = []
|
||||
|
||||
# Check submodules and warn if dirty
|
||||
pass
|
||||
|
||||
# Parse the command line (PARSE_RULE)
|
||||
for argument in cli.args.arguments:
|
||||
if "=" in argument:
|
||||
key, value = argument.split('=', 1)
|
||||
environment[key] = value
|
||||
|
||||
else:
|
||||
keyboard, keymap, command = parse_rule(argument)
|
||||
keyboard_env = environment.copy()
|
||||
|
||||
# Check the keyboard
|
||||
if not (keyboard in ['all', 'test'] or is_keyboard(keyboard)):
|
||||
cli.log.error('Invalid keyboard: %s', keyboard)
|
||||
continue
|
||||
|
||||
# Check the keymap
|
||||
if not (keymap in ['all'] or True): # FIXME: Replace True with is_keymap(keyboard, keymap)
|
||||
cli.log.error('Invalid keymap: %s', keymap)
|
||||
continue
|
||||
|
||||
# Add this compile target
|
||||
keyboard_env['CURRENT_KB'] = keyboard_env['DEFAULT_FOLDER'] = keyboard_env['KEYBOARD_RULE'] = keyboard
|
||||
compile_targets.append([keyboard, keymap, command, keyboard_env])
|
||||
|
||||
# Determine if we should turn on SILENT_MODE.
|
||||
if 'SILENT' in environment:
|
||||
for target in compile_targets:
|
||||
target[3]['SILENT_MODE'] = environment['SILENT']
|
||||
elif len(compile_targets) > 1:
|
||||
for target in compile_targets:
|
||||
target[3]['SILENT_MODE'] = environment['SILENT']
|
||||
|
||||
# Iterate through our compile targets and generate make commands.
|
||||
compiles_ok = True
|
||||
for keyboard, keymap, command, environment in compile_targets:
|
||||
print('***', repr(keyboard), repr(keymap), repr(command))
|
||||
for key, value in environment.items():
|
||||
cli.log.info('%s=%s', key, value)
|
||||
|
||||
if not compiles_ok:
|
||||
cli.log.error('{fg_red}Make finished with errors')
|
||||
exit(1)
|
||||
|
||||
# $(foreach TEST,$(sort $(TESTS)),$(RUN_TEST))
|
||||
tests_ok = False # FIXME: Set to true when all tests are true
|
||||
|
||||
if not tests_ok:
|
||||
# printf "$(MSG_ERRORS)" & exit 1
|
||||
pass
|
||||
@@ -116,34 +116,32 @@
|
||||
* @{
|
||||
*/
|
||||
//! Interface callback definition
|
||||
#ifdef KBD
|
||||
# define UDI_HID_KBD_ENABLE_EXT() main_kbd_enable()
|
||||
# define UDI_HID_KBD_DISABLE_EXT() main_kbd_disable()
|
||||
//#define UDI_HID_KBD_CHANGE_LED(value) ui_kbd_led(value)
|
||||
#endif
|
||||
#define UDI_HID_KBD_ENABLE_EXT() main_kbd_enable()
|
||||
#define UDI_HID_KBD_DISABLE_EXT() main_kbd_disable()
|
||||
//#define UDI_HID_KBD_CHANGE_LED(value) ui_kbd_led(value)
|
||||
|
||||
#ifdef NKRO
|
||||
#ifdef NKRO_ENABLE
|
||||
# define UDI_HID_NKRO_ENABLE_EXT() main_nkro_enable()
|
||||
# define UDI_HID_NKRO_DISABLE_EXT() main_nkro_disable()
|
||||
//#define UDI_HID_NKRO_CHANGE_LED(value) ui_kbd_led(value)
|
||||
//#define UDI_HID_NKRO_CHANGE_LED(value) ui_kbd_led(value)
|
||||
#endif
|
||||
|
||||
#ifdef EXK
|
||||
#ifdef EXTRAKEY_ENABLE
|
||||
# define UDI_HID_EXK_ENABLE_EXT() main_exk_enable()
|
||||
# define UDI_HID_EXK_DISABLE_EXT() main_exk_disable()
|
||||
#endif
|
||||
|
||||
#ifdef CON
|
||||
#ifdef CONSOLE_ENABLE
|
||||
# define UDI_HID_CON_ENABLE_EXT() main_con_enable()
|
||||
# define UDI_HID_CON_DISABLE_EXT() main_con_disable()
|
||||
#endif
|
||||
|
||||
#ifdef MOU
|
||||
#ifdef MOUSE_ENABLE
|
||||
# define UDI_HID_MOU_ENABLE_EXT() main_mou_enable()
|
||||
# define UDI_HID_MOU_DISABLE_EXT() main_mou_disable()
|
||||
#endif
|
||||
|
||||
#ifdef RAW
|
||||
#ifdef RAW_ENABLE
|
||||
# define UDI_HID_RAW_ENABLE_EXT() main_raw_enable()
|
||||
# define UDI_HID_RAW_DISABLE_EXT() main_raw_disable()
|
||||
# define UDI_HID_RAW_RECEIVE(buffer, len) main_raw_receive(buffer, len)
|
||||
|
||||
@@ -18,7 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "samd51j18a.h"
|
||||
#include "conf_usb.h"
|
||||
#include "udd.h"
|
||||
#ifdef RAW
|
||||
|
||||
#ifdef RAW_ENABLE
|
||||
# include "raw_hid.h"
|
||||
#endif
|
||||
|
||||
@@ -34,7 +35,6 @@ void main_remotewakeup_enable(void) { ui_wakeup_enable(); }
|
||||
|
||||
void main_remotewakeup_disable(void) { ui_wakeup_disable(); }
|
||||
|
||||
#ifdef KBD
|
||||
volatile bool main_b_kbd_enable = false;
|
||||
bool main_kbd_enable(void) {
|
||||
main_b_kbd_enable = true;
|
||||
@@ -42,9 +42,8 @@ bool main_kbd_enable(void) {
|
||||
}
|
||||
|
||||
void main_kbd_disable(void) { main_b_kbd_enable = false; }
|
||||
#endif
|
||||
|
||||
#ifdef NKRO
|
||||
#ifdef NKRO_ENABLE
|
||||
volatile bool main_b_nkro_enable = false;
|
||||
bool main_nkro_enable(void) {
|
||||
main_b_nkro_enable = true;
|
||||
@@ -54,7 +53,7 @@ bool main_nkro_enable(void) {
|
||||
void main_nkro_disable(void) { main_b_nkro_enable = false; }
|
||||
#endif
|
||||
|
||||
#ifdef EXK
|
||||
#ifdef EXTRAKEY_ENABLE
|
||||
volatile bool main_b_exk_enable = false;
|
||||
bool main_exk_enable(void) {
|
||||
main_b_exk_enable = true;
|
||||
@@ -64,7 +63,7 @@ bool main_exk_enable(void) {
|
||||
void main_exk_disable(void) { main_b_exk_enable = false; }
|
||||
#endif
|
||||
|
||||
#ifdef CON
|
||||
#ifdef CONSOLE_ENABLE
|
||||
volatile bool main_b_con_enable = false;
|
||||
bool main_con_enable(void) {
|
||||
main_b_con_enable = true;
|
||||
@@ -74,7 +73,7 @@ bool main_con_enable(void) {
|
||||
void main_con_disable(void) { main_b_con_enable = false; }
|
||||
#endif
|
||||
|
||||
#ifdef MOU
|
||||
#ifdef MOUSE_ENABLE
|
||||
volatile bool main_b_mou_enable = false;
|
||||
bool main_mou_enable(void) {
|
||||
main_b_mou_enable = true;
|
||||
@@ -84,7 +83,7 @@ bool main_mou_enable(void) {
|
||||
void main_mou_disable(void) { main_b_mou_enable = false; }
|
||||
#endif
|
||||
|
||||
#ifdef RAW
|
||||
#ifdef RAW_ENABLE
|
||||
volatile bool main_b_raw_enable = false;
|
||||
bool main_raw_enable(void) {
|
||||
main_b_raw_enable = true;
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
#include "stdarg.h"
|
||||
#include "tmk_core/protocol/arm_atsam/clks.h"
|
||||
|
||||
#ifdef CDC
|
||||
#ifdef VIRTSER_ENABLE
|
||||
|
||||
# ifdef UDI_CDC_LOW_RATE
|
||||
# ifdef USB_DEVICE_HS_SUPPORT
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#ifndef _UDI_CDC_H_
|
||||
#define _UDI_CDC_H_
|
||||
|
||||
#ifdef CDC
|
||||
#ifdef VIRTSER_ENABLE
|
||||
|
||||
# include "conf_usb.h"
|
||||
# include "usb_protocol.h"
|
||||
@@ -346,7 +346,7 @@ typedef struct {
|
||||
char buf[CDC_INBUF_SIZE];
|
||||
} inbuf_t;
|
||||
|
||||
#else // CDC
|
||||
#else // VIRTSER_ENABLE
|
||||
|
||||
// keep these to accommodate calls if remaining
|
||||
# define CDC_PRINTBUF_SIZE 1
|
||||
@@ -362,7 +362,7 @@ typedef struct {
|
||||
|
||||
extern inbuf_t inbuf;
|
||||
|
||||
#endif // CDC
|
||||
#endif // VIRTSER_ENABLE
|
||||
|
||||
uint32_t CDC_print(char* printbuf);
|
||||
int CDC_printf(const char* _Format, ...);
|
||||
|
||||
@@ -23,77 +23,36 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "compiler.h"
|
||||
#include "usb_protocol_hid.h"
|
||||
|
||||
#define DEVICE_CLASS 0
|
||||
#define DEVICE_SUBCLASS 0
|
||||
#define DEVICE_PROTOCOL 0
|
||||
|
||||
#define KBD
|
||||
|
||||
//#define MOUSE_ENABLE //rules.mk
|
||||
#ifdef MOUSE_ENABLE
|
||||
# define MOU
|
||||
#endif
|
||||
|
||||
//#define EXTRAKEY_ENABLE //rules.mk
|
||||
#ifdef EXTRAKEY_ENABLE
|
||||
# define EXK
|
||||
#endif
|
||||
|
||||
//#define RAW_ENABLE //rules.mk
|
||||
#ifdef RAW_ENABLE
|
||||
# define RAW
|
||||
#endif
|
||||
|
||||
//#define CONSOLE_ENABLE //rules.mk
|
||||
#ifdef CONSOLE_ENABLE
|
||||
# define CON
|
||||
#endif
|
||||
|
||||
//#define NKRO_ENABLE //rules.mk
|
||||
#ifdef NKRO_ENABLE
|
||||
# define NKRO
|
||||
#endif
|
||||
|
||||
//#define MIDI_ENABLE //deferred implementation
|
||||
//#ifdef MIDI_ENABLE
|
||||
//#define MIDI
|
||||
//#endif
|
||||
|
||||
//#define VIRTSER_ENABLE //rules.mk
|
||||
#ifdef VIRTSER_ENABLE
|
||||
# define CDC
|
||||
// because CDC uses IAD (interface association descriptor
|
||||
// per USB Interface Association Descriptor Device Class Code and Use Model 7/23/2003 Rev 1.0)
|
||||
# undef DEVICE_CLASS
|
||||
# define DEVICE_CLASS 0xEF
|
||||
# undef DEVICE_SUBCLASS
|
||||
# define DEVICE_SUBCLASS 0x02
|
||||
# undef DEVICE_PROTOCOL
|
||||
# define DEVICE_PROTOCOL 0x01
|
||||
#else
|
||||
# define DEVICE_CLASS 0x00
|
||||
# define DEVICE_SUBCLASS 0x00
|
||||
# define DEVICE_PROTOCOL 0x00
|
||||
#endif
|
||||
|
||||
/* number of interfaces */
|
||||
#define NEXT_INTERFACE_0 0
|
||||
|
||||
#ifdef KBD
|
||||
# define KEYBOARD_INTERFACE NEXT_INTERFACE_0
|
||||
# define NEXT_INTERFACE_1 (KEYBOARD_INTERFACE + 1)
|
||||
# define UDI_HID_KBD_IFACE_NUMBER KEYBOARD_INTERFACE
|
||||
#else
|
||||
# define NEXT_INTERFACE_1 NEXT_INTERFACE_0
|
||||
#endif
|
||||
#define KEYBOARD_INTERFACE NEXT_INTERFACE_0
|
||||
#define NEXT_INTERFACE_1 (KEYBOARD_INTERFACE + 1)
|
||||
#define UDI_HID_KBD_IFACE_NUMBER KEYBOARD_INTERFACE
|
||||
|
||||
// It is important that the Raw HID interface is at a constant
|
||||
// interface number, to support Linux/OSX platforms and chrome.hid
|
||||
// If Raw HID is enabled, let it be always 1.
|
||||
#ifdef RAW
|
||||
#ifdef RAW_ENABLE
|
||||
# define RAW_INTERFACE NEXT_INTERFACE_1
|
||||
# define NEXT_INTERFACE_2 (RAW_INTERFACE + 1)
|
||||
#else
|
||||
# define NEXT_INTERFACE_2 NEXT_INTERFACE_1
|
||||
#endif
|
||||
|
||||
#ifdef MOU
|
||||
#ifdef MOUSE_ENABLE
|
||||
# define MOUSE_INTERFACE NEXT_INTERFACE_2
|
||||
# define UDI_HID_MOU_IFACE_NUMBER MOUSE_INTERFACE
|
||||
# define NEXT_INTERFACE_3 (MOUSE_INTERFACE + 1)
|
||||
@@ -101,7 +60,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# define NEXT_INTERFACE_3 NEXT_INTERFACE_2
|
||||
#endif
|
||||
|
||||
#ifdef EXK
|
||||
#ifdef EXTRAKEY_ENABLE
|
||||
# define EXTRAKEY_INTERFACE NEXT_INTERFACE_3
|
||||
# define NEXT_INTERFACE_4 (EXTRAKEY_INTERFACE + 1)
|
||||
# define UDI_HID_EXK_IFACE_NUMBER EXTRAKEY_INTERFACE
|
||||
@@ -109,7 +68,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# define NEXT_INTERFACE_4 NEXT_INTERFACE_3
|
||||
#endif
|
||||
|
||||
#ifdef CON
|
||||
#ifdef CONSOLE_ENABLE
|
||||
# define CON_INTERFACE NEXT_INTERFACE_4
|
||||
# define NEXT_INTERFACE_5 (CON_INTERFACE + 1)
|
||||
# define UDI_HID_CON_IFACE_NUMBER CON_INTERFACE
|
||||
@@ -117,7 +76,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# define NEXT_INTERFACE_5 NEXT_INTERFACE_4
|
||||
#endif
|
||||
|
||||
#ifdef NKRO
|
||||
#ifdef NKRO_ENABLE
|
||||
# define NKRO_INTERFACE NEXT_INTERFACE_5
|
||||
# define NEXT_INTERFACE_6 (NKRO_INTERFACE + 1)
|
||||
# define UDI_HID_NKRO_IFACE_NUMBER NKRO_INTERFACE
|
||||
@@ -125,7 +84,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# define NEXT_INTERFACE_6 NEXT_INTERFACE_5
|
||||
#endif
|
||||
|
||||
#ifdef MIDI
|
||||
#ifdef MIDI_ENABLE
|
||||
# define AC_INTERFACE NEXT_INTERFACE_6
|
||||
# define AS_INTERFACE (AC_INTERFACE + 1)
|
||||
# define NEXT_INTERFACE_7 (AS_INTERFACE + 1)
|
||||
@@ -133,7 +92,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# define NEXT_INTERFACE_7 NEXT_INTERFACE_6
|
||||
#endif
|
||||
|
||||
#ifdef CDC
|
||||
#ifdef VIRTSER_ENABLE
|
||||
# define CCI_INTERFACE NEXT_INTERFACE_7
|
||||
# define CDI_INTERFACE (CCI_INTERFACE + 1)
|
||||
# define NEXT_INTERFACE_8 (CDI_INTERFACE + 1)
|
||||
@@ -155,20 +114,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define NEXT_IN_EPNUM_0 1
|
||||
#define NEXT_OUT_EPNUM_0 1
|
||||
|
||||
#ifdef KBD
|
||||
# define KEYBOARD_IN_EPNUM NEXT_IN_EPNUM_0
|
||||
# define UDI_HID_KBD_EP_IN KEYBOARD_IN_EPNUM
|
||||
# define NEXT_IN_EPNUM_1 (KEYBOARD_IN_EPNUM + 1)
|
||||
# define UDI_HID_KBD_EP_SIZE KEYBOARD_EPSIZE
|
||||
# define KBD_POLLING_INTERVAL 10
|
||||
# ifndef UDI_HID_KBD_STRING_ID
|
||||
# define UDI_HID_KBD_STRING_ID 0
|
||||
# endif
|
||||
#else
|
||||
# define NEXT_IN_EPNUM_1 NEXT_IN_EPNUM_0
|
||||
#define KEYBOARD_IN_EPNUM NEXT_IN_EPNUM_0
|
||||
#define UDI_HID_KBD_EP_IN KEYBOARD_IN_EPNUM
|
||||
#define NEXT_IN_EPNUM_1 (KEYBOARD_IN_EPNUM + 1)
|
||||
#define UDI_HID_KBD_EP_SIZE KEYBOARD_EPSIZE
|
||||
#define KBD_POLLING_INTERVAL 10
|
||||
#ifndef UDI_HID_KBD_STRING_ID
|
||||
# define UDI_HID_KBD_STRING_ID 0
|
||||
#endif
|
||||
|
||||
#ifdef MOU
|
||||
#ifdef MOUSE_ENABLE
|
||||
# define MOUSE_IN_EPNUM NEXT_IN_EPNUM_1
|
||||
# define NEXT_IN_EPNUM_2 (MOUSE_IN_EPNUM + 1)
|
||||
# define UDI_HID_MOU_EP_IN MOUSE_IN_EPNUM
|
||||
@@ -181,7 +136,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# define NEXT_IN_EPNUM_2 NEXT_IN_EPNUM_1
|
||||
#endif
|
||||
|
||||
#ifdef EXK
|
||||
#ifdef EXTRAKEY_ENABLE
|
||||
# define EXTRAKEY_IN_EPNUM NEXT_IN_EPNUM_2
|
||||
# define UDI_HID_EXK_EP_IN EXTRAKEY_IN_EPNUM
|
||||
# define NEXT_IN_EPNUM_3 (EXTRAKEY_IN_EPNUM + 1)
|
||||
@@ -194,7 +149,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# define NEXT_IN_EPNUM_3 NEXT_IN_EPNUM_2
|
||||
#endif
|
||||
|
||||
#ifdef RAW
|
||||
#ifdef RAW_ENABLE
|
||||
# define RAW_IN_EPNUM NEXT_IN_EPNUM_3
|
||||
# define UDI_HID_RAW_EP_IN RAW_IN_EPNUM
|
||||
# define NEXT_IN_EPNUM_4 (RAW_IN_EPNUM + 1)
|
||||
@@ -210,7 +165,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# define NEXT_OUT_EPNUM_1 NEXT_OUT_EPNUM_0
|
||||
#endif
|
||||
|
||||
#ifdef CON
|
||||
#ifdef CONSOLE_ENABLE
|
||||
# define CON_IN_EPNUM NEXT_IN_EPNUM_4
|
||||
# define UDI_HID_CON_EP_IN CON_IN_EPNUM
|
||||
# define NEXT_IN_EPNUM_5 (CON_IN_EPNUM + 1)
|
||||
@@ -226,7 +181,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# define NEXT_OUT_EPNUM_2 NEXT_OUT_EPNUM_1
|
||||
#endif
|
||||
|
||||
#ifdef NKRO
|
||||
#ifdef NKRO_ENABLE
|
||||
# define NKRO_IN_EPNUM NEXT_IN_EPNUM_5
|
||||
# define UDI_HID_NKRO_EP_IN NKRO_IN_EPNUM
|
||||
# define NEXT_IN_EPNUM_6 (NKRO_IN_EPNUM + 1)
|
||||
@@ -239,7 +194,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# define NEXT_IN_EPNUM_6 NEXT_IN_EPNUM_5
|
||||
#endif
|
||||
|
||||
#ifdef MIDI
|
||||
#ifdef MIDI_ENABLE
|
||||
# define MIDI_STREAM_IN_EPNUM NEXT_IN_EPNUM_6
|
||||
# define NEXT_IN_EPNUM_7 (MIDI_STREAM_IN_EPNUM + 1)
|
||||
# define MIDI_STREAM_OUT_EPNUM NEXT_OUT_EPNUM_2
|
||||
@@ -250,7 +205,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# define NEXT_OUT_EPNUM_3 NEXT_OUT_EPNUM_2
|
||||
#endif
|
||||
|
||||
#ifdef CDC
|
||||
#ifdef VIRTSER_ENABLE
|
||||
# define CDC_NOTIFICATION_EPNUM NEXT_IN_EPNUM_7
|
||||
# define CDC_ACM_ENDPOINT CDC_NOTIFICATION_EPNUM
|
||||
# define CDC_TX_ENDPOINT (CDC_NOTIFICATION_EPNUM + 1)
|
||||
@@ -285,8 +240,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// **********************************************************************
|
||||
// KBD Descriptor structure and content
|
||||
// **********************************************************************
|
||||
#ifdef KBD
|
||||
|
||||
COMPILER_PACK_SET(1)
|
||||
|
||||
typedef struct {
|
||||
@@ -299,8 +252,40 @@ typedef struct {
|
||||
uint8_t array[59];
|
||||
} udi_hid_kbd_report_desc_t;
|
||||
|
||||
# define UDI_HID_KBD_DESC \
|
||||
{ .iface.bLength = sizeof(usb_iface_desc_t), .iface.bDescriptorType = USB_DT_INTERFACE, .iface.bInterfaceNumber = UDI_HID_KBD_IFACE_NUMBER, .iface.bAlternateSetting = 0, .iface.bNumEndpoints = 1, .iface.bInterfaceClass = HID_CLASS, .iface.bInterfaceSubClass = HID_SUB_CLASS_BOOT, .iface.bInterfaceProtocol = HID_PROTOCOL_KEYBOARD, .iface.iInterface = UDI_HID_KBD_STRING_ID, .hid.bLength = sizeof(usb_hid_descriptor_t), .hid.bDescriptorType = USB_DT_HID, .hid.bcdHID = LE16(USB_HID_BDC_V1_11), .hid.bCountryCode = USB_HID_NO_COUNTRY_CODE, .hid.bNumDescriptors = USB_HID_NUM_DESC, .hid.bRDescriptorType = USB_DT_HID_REPORT, .hid.wDescriptorLength = LE16(sizeof(udi_hid_kbd_report_desc_t)), .ep.bLength = sizeof(usb_ep_desc_t), .ep.bDescriptorType = USB_DT_ENDPOINT, .ep.bEndpointAddress = UDI_HID_KBD_EP_IN | USB_EP_DIR_IN, .ep.bmAttributes = USB_EP_TYPE_INTERRUPT, .ep.wMaxPacketSize = LE16(UDI_HID_KBD_EP_SIZE), .ep.bInterval = KBD_POLLING_INTERVAL, }
|
||||
// clang-format off
|
||||
|
||||
# define UDI_HID_KBD_DESC { \
|
||||
.iface = { \
|
||||
.bLength = sizeof(usb_iface_desc_t), \
|
||||
.bDescriptorType = USB_DT_INTERFACE, \
|
||||
.bInterfaceNumber = UDI_HID_KBD_IFACE_NUMBER, \
|
||||
.bAlternateSetting = 0, \
|
||||
.bNumEndpoints = 1, \
|
||||
.bInterfaceClass = HID_CLASS, \
|
||||
.bInterfaceSubClass = HID_SUB_CLASS_BOOT, \
|
||||
.bInterfaceProtocol = HID_PROTOCOL_KEYBOARD, \
|
||||
.iInterface = UDI_HID_KBD_STRING_ID, \
|
||||
}, \
|
||||
.hid = { \
|
||||
.bLength = sizeof(usb_hid_descriptor_t), \
|
||||
.bDescriptorType = USB_DT_HID, \
|
||||
.bcdHID = LE16(USB_HID_BDC_V1_11), \
|
||||
.bCountryCode = USB_HID_NO_COUNTRY_CODE, \
|
||||
.bNumDescriptors = USB_HID_NUM_DESC, \
|
||||
.bRDescriptorType = USB_DT_HID_REPORT, \
|
||||
.wDescriptorLength = LE16(sizeof(udi_hid_kbd_report_desc_t)), \
|
||||
}, \
|
||||
.ep = { \
|
||||
.bLength = sizeof(usb_ep_desc_t), \
|
||||
.bDescriptorType = USB_DT_ENDPOINT, \
|
||||
.bEndpointAddress = UDI_HID_KBD_EP_IN | USB_EP_DIR_IN, \
|
||||
.bmAttributes = USB_EP_TYPE_INTERRUPT, \
|
||||
.wMaxPacketSize = LE16(UDI_HID_KBD_EP_SIZE), \
|
||||
.bInterval = KBD_POLLING_INTERVAL \
|
||||
} \
|
||||
}
|
||||
|
||||
// clang-format on
|
||||
|
||||
// set report buffer (from host)
|
||||
extern uint8_t udi_hid_kbd_report_set;
|
||||
@@ -311,12 +296,10 @@ extern uint8_t udi_hid_kbd_report[UDI_HID_KBD_REPORT_SIZE];
|
||||
|
||||
COMPILER_PACK_RESET()
|
||||
|
||||
#endif // KBD
|
||||
|
||||
// **********************************************************************
|
||||
// EXK Descriptor structure and content
|
||||
// **********************************************************************
|
||||
#ifdef EXK
|
||||
#ifdef EXTRAKEY_ENABLE
|
||||
|
||||
COMPILER_PACK_SET(1)
|
||||
|
||||
@@ -330,8 +313,40 @@ typedef struct {
|
||||
uint8_t array[50];
|
||||
} udi_hid_exk_report_desc_t;
|
||||
|
||||
# define UDI_HID_EXK_DESC \
|
||||
{ .iface.bLength = sizeof(usb_iface_desc_t), .iface.bDescriptorType = USB_DT_INTERFACE, .iface.bInterfaceNumber = UDI_HID_EXK_IFACE_NUMBER, .iface.bAlternateSetting = 0, .iface.bNumEndpoints = 1, .iface.bInterfaceClass = HID_CLASS, .iface.bInterfaceSubClass = HID_SUB_CLASS_BOOT, .iface.bInterfaceProtocol = HID_PROTOCOL_GENERIC, .iface.iInterface = UDI_HID_EXK_STRING_ID, .hid.bLength = sizeof(usb_hid_descriptor_t), .hid.bDescriptorType = USB_DT_HID, .hid.bcdHID = LE16(USB_HID_BDC_V1_11), .hid.bCountryCode = USB_HID_NO_COUNTRY_CODE, .hid.bNumDescriptors = USB_HID_NUM_DESC, .hid.bRDescriptorType = USB_DT_HID_REPORT, .hid.wDescriptorLength = LE16(sizeof(udi_hid_exk_report_desc_t)), .ep.bLength = sizeof(usb_ep_desc_t), .ep.bDescriptorType = USB_DT_ENDPOINT, .ep.bEndpointAddress = UDI_HID_EXK_EP_IN | USB_EP_DIR_IN, .ep.bmAttributes = USB_EP_TYPE_INTERRUPT, .ep.wMaxPacketSize = LE16(UDI_HID_EXK_EP_SIZE), .ep.bInterval = EXTRAKEY_POLLING_INTERVAL, }
|
||||
// clang-format off
|
||||
|
||||
# define UDI_HID_EXK_DESC { \
|
||||
.iface = { \
|
||||
.bLength = sizeof(usb_iface_desc_t), \
|
||||
.bDescriptorType = USB_DT_INTERFACE, \
|
||||
.bInterfaceNumber = UDI_HID_EXK_IFACE_NUMBER, \
|
||||
.bAlternateSetting = 0, \
|
||||
.bNumEndpoints = 1, \
|
||||
.bInterfaceClass = HID_CLASS, \
|
||||
.bInterfaceSubClass = HID_SUB_CLASS_BOOT, \
|
||||
.bInterfaceProtocol = HID_PROTOCOL_GENERIC, \
|
||||
.iInterface = UDI_HID_EXK_STRING_ID \
|
||||
}, \
|
||||
.hid = { \
|
||||
.bLength = sizeof(usb_hid_descriptor_t), \
|
||||
.bDescriptorType = USB_DT_HID, \
|
||||
.bcdHID = LE16(USB_HID_BDC_V1_11), \
|
||||
.bCountryCode = USB_HID_NO_COUNTRY_CODE, \
|
||||
.bNumDescriptors = USB_HID_NUM_DESC, \
|
||||
.bRDescriptorType = USB_DT_HID_REPORT, \
|
||||
.wDescriptorLength = LE16(sizeof(udi_hid_exk_report_desc_t)) \
|
||||
}, \
|
||||
.ep = { \
|
||||
.bLength = sizeof(usb_ep_desc_t), \
|
||||
.bDescriptorType = USB_DT_ENDPOINT, \
|
||||
.bEndpointAddress = UDI_HID_EXK_EP_IN | USB_EP_DIR_IN, \
|
||||
.bmAttributes = USB_EP_TYPE_INTERRUPT, \
|
||||
.wMaxPacketSize = LE16(UDI_HID_EXK_EP_SIZE), \
|
||||
.bInterval = EXTRAKEY_POLLING_INTERVAL \
|
||||
} \
|
||||
}
|
||||
|
||||
// clang-format on
|
||||
|
||||
// set report buffer (from host)
|
||||
extern uint8_t udi_hid_exk_report_set;
|
||||
@@ -351,12 +366,12 @@ extern udi_hid_exk_report_t udi_hid_exk_report;
|
||||
|
||||
COMPILER_PACK_RESET()
|
||||
|
||||
#endif // EXK
|
||||
#endif // EXTRAKEY_ENABLE
|
||||
|
||||
// **********************************************************************
|
||||
// NKRO Descriptor structure and content
|
||||
// **********************************************************************
|
||||
#ifdef NKRO
|
||||
#ifdef NKRO_ENABLE
|
||||
|
||||
COMPILER_PACK_SET(1)
|
||||
|
||||
@@ -370,8 +385,40 @@ typedef struct {
|
||||
uint8_t array[57];
|
||||
} udi_hid_nkro_report_desc_t;
|
||||
|
||||
# define UDI_HID_NKRO_DESC \
|
||||
{ .iface.bLength = sizeof(usb_iface_desc_t), .iface.bDescriptorType = USB_DT_INTERFACE, .iface.bInterfaceNumber = UDI_HID_NKRO_IFACE_NUMBER, .iface.bAlternateSetting = 0, .iface.bNumEndpoints = 1, .iface.bInterfaceClass = HID_CLASS, .iface.bInterfaceSubClass = HID_SUB_CLASS_NOBOOT, .iface.bInterfaceProtocol = HID_PROTOCOL_KEYBOARD, .iface.iInterface = UDI_HID_NKRO_STRING_ID, .hid.bLength = sizeof(usb_hid_descriptor_t), .hid.bDescriptorType = USB_DT_HID, .hid.bcdHID = LE16(USB_HID_BDC_V1_11), .hid.bCountryCode = USB_HID_NO_COUNTRY_CODE, .hid.bNumDescriptors = USB_HID_NUM_DESC, .hid.bRDescriptorType = USB_DT_HID_REPORT, .hid.wDescriptorLength = LE16(sizeof(udi_hid_nkro_report_desc_t)), .ep.bLength = sizeof(usb_ep_desc_t), .ep.bDescriptorType = USB_DT_ENDPOINT, .ep.bEndpointAddress = UDI_HID_NKRO_EP_IN | USB_EP_DIR_IN, .ep.bmAttributes = USB_EP_TYPE_INTERRUPT, .ep.wMaxPacketSize = LE16(UDI_HID_NKRO_EP_SIZE), .ep.bInterval = NKRO_POLLING_INTERVAL, }
|
||||
// clang-format off
|
||||
|
||||
# define UDI_HID_NKRO_DESC { \
|
||||
.iface = { \
|
||||
.bLength = sizeof(usb_iface_desc_t), \
|
||||
.bDescriptorType = USB_DT_INTERFACE, \
|
||||
.bInterfaceNumber = UDI_HID_NKRO_IFACE_NUMBER, \
|
||||
.bAlternateSetting = 0, \
|
||||
.bNumEndpoints = 1, \
|
||||
.bInterfaceClass = HID_CLASS, \
|
||||
.bInterfaceSubClass = HID_SUB_CLASS_NOBOOT, \
|
||||
.bInterfaceProtocol = HID_PROTOCOL_KEYBOARD, \
|
||||
.iInterface = UDI_HID_NKRO_STRING_ID \
|
||||
}, \
|
||||
.hid = { \
|
||||
.bLength = sizeof(usb_hid_descriptor_t), \
|
||||
.bDescriptorType = USB_DT_HID, \
|
||||
.bcdHID = LE16(USB_HID_BDC_V1_11), \
|
||||
.bCountryCode = USB_HID_NO_COUNTRY_CODE, \
|
||||
.bNumDescriptors = USB_HID_NUM_DESC, \
|
||||
.bRDescriptorType = USB_DT_HID_REPORT, \
|
||||
.wDescriptorLength = LE16(sizeof(udi_hid_nkro_report_desc_t)) \
|
||||
}, \
|
||||
.ep = { \
|
||||
.bLength = sizeof(usb_ep_desc_t), \
|
||||
.bDescriptorType = USB_DT_ENDPOINT, \
|
||||
.bEndpointAddress = UDI_HID_NKRO_EP_IN | USB_EP_DIR_IN, \
|
||||
.bmAttributes = USB_EP_TYPE_INTERRUPT, \
|
||||
.wMaxPacketSize = LE16(UDI_HID_NKRO_EP_SIZE), \
|
||||
.bInterval = NKRO_POLLING_INTERVAL \
|
||||
} \
|
||||
}
|
||||
|
||||
// clang-format on
|
||||
|
||||
// set report buffer
|
||||
extern uint8_t udi_hid_nkro_report_set;
|
||||
@@ -382,12 +429,12 @@ extern uint8_t udi_hid_nkro_report[UDI_HID_NKRO_REPORT_SIZE];
|
||||
|
||||
COMPILER_PACK_RESET()
|
||||
|
||||
#endif // NKRO
|
||||
#endif // NKRO_ENABLE
|
||||
|
||||
// **********************************************************************
|
||||
// MOU Descriptor structure and content
|
||||
// **********************************************************************
|
||||
#ifdef MOU
|
||||
#ifdef MOUSE_ENABLE
|
||||
|
||||
COMPILER_PACK_SET(1)
|
||||
|
||||
@@ -401,10 +448,40 @@ typedef struct {
|
||||
uint8_t array[77]; // MOU PDS
|
||||
} udi_hid_mou_report_desc_t;
|
||||
|
||||
# define UDI_HID_MOU_DESC \
|
||||
{ .iface.bLength = sizeof(usb_iface_desc_t), .iface.bDescriptorType = USB_DT_INTERFACE, .iface.bInterfaceNumber = MOUSE_INTERFACE, .iface.bAlternateSetting = 0, .iface.bNumEndpoints = 1, .iface.bInterfaceClass = HID_CLASS, .iface.bInterfaceSubClass = HID_SUB_CLASS_BOOT, .iface.bInterfaceProtocol = HID_PROTOCOL_MOUSE, .iface.iInterface = UDI_HID_MOU_STRING_ID, .hid.bLength = sizeof(usb_hid_descriptor_t), .hid.bDescriptorType = USB_DT_HID, .hid.bcdHID = LE16(USB_HID_BDC_V1_11), .hid.bCountryCode = USB_HID_NO_COUNTRY_CODE, .hid.bNumDescriptors = USB_HID_NUM_DESC, .hid.bRDescriptorType = USB_DT_HID_REPORT, .hid.wDescriptorLength = LE16(sizeof(udi_hid_mou_report_desc_t)), .ep.bLength = sizeof(usb_ep_desc_t), .ep.bDescriptorType = USB_DT_ENDPOINT, .ep.bEndpointAddress = UDI_HID_MOU_EP_IN | USB_EP_DIR_IN, .ep.bmAttributes = USB_EP_TYPE_INTERRUPT, .ep.wMaxPacketSize = LE16(UDI_HID_MOU_EP_SIZE), .ep.bInterval = MOU_POLLING_INTERVAL, }
|
||||
// clang-format off
|
||||
|
||||
// no set report buffer
|
||||
# define UDI_HID_MOU_DESC { \
|
||||
.iface = { \
|
||||
.bLength = sizeof(usb_iface_desc_t), \
|
||||
.bDescriptorType = USB_DT_INTERFACE, \
|
||||
.bInterfaceNumber = MOUSE_INTERFACE, \
|
||||
.bAlternateSetting = 0, \
|
||||
.bNumEndpoints = 1, \
|
||||
.bInterfaceClass = HID_CLASS, \
|
||||
.bInterfaceSubClass = HID_SUB_CLASS_BOOT, \
|
||||
.bInterfaceProtocol = HID_PROTOCOL_MOUSE, \
|
||||
.iInterface = UDI_HID_MOU_STRING_ID \
|
||||
}, \
|
||||
.hid = { \
|
||||
.bLength = sizeof(usb_hid_descriptor_t), \
|
||||
.bDescriptorType = USB_DT_HID, \
|
||||
.bcdHID = LE16(USB_HID_BDC_V1_11), \
|
||||
.bCountryCode = USB_HID_NO_COUNTRY_CODE, \
|
||||
.bNumDescriptors = USB_HID_NUM_DESC, \
|
||||
.bRDescriptorType = USB_DT_HID_REPORT, \
|
||||
.wDescriptorLength = LE16(sizeof(udi_hid_mou_report_desc_t)) \
|
||||
}, \
|
||||
.ep = { \
|
||||
.bLength = sizeof(usb_ep_desc_t), \
|
||||
.bDescriptorType = USB_DT_ENDPOINT, \
|
||||
.bEndpointAddress = UDI_HID_MOU_EP_IN | USB_EP_DIR_IN, \
|
||||
.bmAttributes = USB_EP_TYPE_INTERRUPT, \
|
||||
.wMaxPacketSize = LE16(UDI_HID_MOU_EP_SIZE), \
|
||||
.bInterval = MOU_POLLING_INTERVAL \
|
||||
} \
|
||||
}
|
||||
|
||||
// clang-format on
|
||||
|
||||
// report buffer
|
||||
# define UDI_HID_MOU_REPORT_SIZE 5 // MOU PDS
|
||||
@@ -412,12 +489,12 @@ extern uint8_t udi_hid_mou_report[UDI_HID_MOU_REPORT_SIZE];
|
||||
|
||||
COMPILER_PACK_RESET()
|
||||
|
||||
#endif // MOU
|
||||
#endif // MOUSE_ENABLE
|
||||
|
||||
// **********************************************************************
|
||||
// RAW Descriptor structure and content
|
||||
// **********************************************************************
|
||||
#ifdef RAW
|
||||
#ifdef RAW_ENABLE
|
||||
|
||||
COMPILER_PACK_SET(1)
|
||||
|
||||
@@ -432,11 +509,48 @@ typedef struct {
|
||||
uint8_t array[26];
|
||||
} udi_hid_raw_report_desc_t;
|
||||
|
||||
# define UDI_HID_RAW_DESC \
|
||||
{ \
|
||||
.iface.bLength = sizeof(usb_iface_desc_t), .iface.bDescriptorType = USB_DT_INTERFACE, .iface.bInterfaceNumber = RAW_INTERFACE, .iface.bAlternateSetting = 0, .iface.bNumEndpoints = 2, .iface.bInterfaceClass = HID_CLASS, .iface.bInterfaceSubClass = HID_SUB_CLASS_NOBOOT, .iface.bInterfaceProtocol = HID_SUB_CLASS_NOBOOT, .iface.iInterface = UDI_HID_RAW_STRING_ID, .hid.bLength = sizeof(usb_hid_descriptor_t), .hid.bDescriptorType = USB_DT_HID, .hid.bcdHID = LE16(USB_HID_BDC_V1_11), .hid.bCountryCode = USB_HID_NO_COUNTRY_CODE, .hid.bNumDescriptors = USB_HID_NUM_DESC, .hid.bRDescriptorType = USB_DT_HID_REPORT, .hid.wDescriptorLength = LE16(sizeof(udi_hid_raw_report_desc_t)), .ep_out.bLength = sizeof(usb_ep_desc_t), .ep_out.bDescriptorType = USB_DT_ENDPOINT, .ep_out.bEndpointAddress = UDI_HID_RAW_EP_OUT | USB_EP_DIR_OUT, .ep_out.bmAttributes = USB_EP_TYPE_INTERRUPT, .ep_out.wMaxPacketSize = LE16(RAW_EPSIZE), .ep_out.bInterval = RAW_POLLING_INTERVAL, \
|
||||
.ep_in.bLength = sizeof(usb_ep_desc_t), .ep_in.bDescriptorType = USB_DT_ENDPOINT, .ep_in.bEndpointAddress = UDI_HID_RAW_EP_IN | USB_EP_DIR_IN, .ep_in.bmAttributes = USB_EP_TYPE_INTERRUPT, .ep_in.wMaxPacketSize = LE16(RAW_EPSIZE), .ep_in.bInterval = RAW_POLLING_INTERVAL, \
|
||||
}
|
||||
// clang-format off
|
||||
|
||||
# define UDI_HID_RAW_DESC { \
|
||||
.iface = { \
|
||||
.bLength = sizeof(usb_iface_desc_t), \
|
||||
.bDescriptorType = USB_DT_INTERFACE, \
|
||||
.bInterfaceNumber = RAW_INTERFACE, \
|
||||
.bAlternateSetting = 0, \
|
||||
.bNumEndpoints = 2, \
|
||||
.bInterfaceClass = HID_CLASS, \
|
||||
.bInterfaceSubClass = HID_SUB_CLASS_NOBOOT, \
|
||||
.bInterfaceProtocol = HID_SUB_CLASS_NOBOOT, \
|
||||
.iInterface = UDI_HID_RAW_STRING_ID \
|
||||
}, \
|
||||
.hid = { \
|
||||
.bLength = sizeof(usb_hid_descriptor_t), \
|
||||
.bDescriptorType = USB_DT_HID, \
|
||||
.bcdHID = LE16(USB_HID_BDC_V1_11), \
|
||||
.bCountryCode = USB_HID_NO_COUNTRY_CODE, \
|
||||
.bNumDescriptors = USB_HID_NUM_DESC, \
|
||||
.bRDescriptorType = USB_DT_HID_REPORT, \
|
||||
.wDescriptorLength = LE16(sizeof(udi_hid_raw_report_desc_t)) \
|
||||
}, \
|
||||
.ep_out = { \
|
||||
.bLength = sizeof(usb_ep_desc_t), \
|
||||
.bDescriptorType = USB_DT_ENDPOINT, \
|
||||
.bEndpointAddress = UDI_HID_RAW_EP_OUT | USB_EP_DIR_OUT, \
|
||||
.bmAttributes = USB_EP_TYPE_INTERRUPT, \
|
||||
.wMaxPacketSize = LE16(RAW_EPSIZE), \
|
||||
.bInterval = RAW_POLLING_INTERVAL \
|
||||
}, \
|
||||
.ep_in = { \
|
||||
.bLength = sizeof(usb_ep_desc_t), \
|
||||
.bDescriptorType = USB_DT_ENDPOINT, \
|
||||
.bEndpointAddress = UDI_HID_RAW_EP_IN | USB_EP_DIR_IN, \
|
||||
.bmAttributes = USB_EP_TYPE_INTERRUPT, \
|
||||
.wMaxPacketSize = LE16(RAW_EPSIZE), \
|
||||
.bInterval = RAW_POLLING_INTERVAL \
|
||||
} \
|
||||
}
|
||||
|
||||
// clang-format on
|
||||
|
||||
# define UDI_HID_RAW_REPORT_SIZE RAW_EPSIZE
|
||||
|
||||
@@ -447,12 +561,12 @@ extern uint8_t udi_hid_raw_report[UDI_HID_RAW_REPORT_SIZE];
|
||||
|
||||
COMPILER_PACK_RESET()
|
||||
|
||||
#endif // RAW
|
||||
#endif // RAW_ENABLE
|
||||
|
||||
// **********************************************************************
|
||||
// CON Descriptor structure and content
|
||||
// **********************************************************************
|
||||
#ifdef CON
|
||||
#ifdef CONSOLE_ENABLE
|
||||
|
||||
COMPILER_PACK_SET(1)
|
||||
|
||||
@@ -467,11 +581,48 @@ typedef struct {
|
||||
uint8_t array[34];
|
||||
} udi_hid_con_report_desc_t;
|
||||
|
||||
# define UDI_HID_CON_DESC \
|
||||
{ \
|
||||
.iface.bLength = sizeof(usb_iface_desc_t), .iface.bDescriptorType = USB_DT_INTERFACE, .iface.bInterfaceNumber = UDI_HID_CON_IFACE_NUMBER, .iface.bAlternateSetting = 0, .iface.bNumEndpoints = 2, .iface.bInterfaceClass = HID_CLASS, .iface.bInterfaceSubClass = HID_SUB_CLASS_NOBOOT, .iface.bInterfaceProtocol = HID_SUB_CLASS_NOBOOT, .iface.iInterface = UDI_HID_CON_STRING_ID, .hid.bLength = sizeof(usb_hid_descriptor_t), .hid.bDescriptorType = USB_DT_HID, .hid.bcdHID = LE16(USB_HID_BDC_V1_11), .hid.bCountryCode = USB_HID_NO_COUNTRY_CODE, .hid.bNumDescriptors = USB_HID_NUM_DESC, .hid.bRDescriptorType = USB_DT_HID_REPORT, .hid.wDescriptorLength = LE16(sizeof(udi_hid_con_report_desc_t)), .ep_out.bLength = sizeof(usb_ep_desc_t), .ep_out.bDescriptorType = USB_DT_ENDPOINT, .ep_out.bEndpointAddress = UDI_HID_CON_EP_OUT | USB_EP_DIR_OUT, .ep_out.bmAttributes = USB_EP_TYPE_INTERRUPT, .ep_out.wMaxPacketSize = LE16(CONSOLE_EPSIZE), .ep_out.bInterval = CON_POLLING_INTERVAL, \
|
||||
.ep_in.bLength = sizeof(usb_ep_desc_t), .ep_in.bDescriptorType = USB_DT_ENDPOINT, .ep_in.bEndpointAddress = UDI_HID_CON_EP_IN | USB_EP_DIR_IN, .ep_in.bmAttributes = USB_EP_TYPE_INTERRUPT, .ep_in.wMaxPacketSize = LE16(CONSOLE_EPSIZE), .ep_in.bInterval = CON_POLLING_INTERVAL, \
|
||||
}
|
||||
// clang-format off
|
||||
|
||||
# define UDI_HID_CON_DESC { \
|
||||
.iface = { \
|
||||
.bLength = sizeof(usb_iface_desc_t), \
|
||||
.bDescriptorType = USB_DT_INTERFACE, \
|
||||
.bInterfaceNumber = UDI_HID_CON_IFACE_NUMBER, \
|
||||
.bAlternateSetting = 0, \
|
||||
.bNumEndpoints = 2, \
|
||||
.bInterfaceClass = HID_CLASS, \
|
||||
.bInterfaceSubClass = HID_SUB_CLASS_NOBOOT, \
|
||||
.bInterfaceProtocol = HID_SUB_CLASS_NOBOOT, \
|
||||
.iInterface = UDI_HID_CON_STRING_ID \
|
||||
}, \
|
||||
.hid = { \
|
||||
.bLength = sizeof(usb_hid_descriptor_t), \
|
||||
.bDescriptorType = USB_DT_HID, \
|
||||
.bcdHID = LE16(USB_HID_BDC_V1_11), \
|
||||
.bCountryCode = USB_HID_NO_COUNTRY_CODE, \
|
||||
.bNumDescriptors = USB_HID_NUM_DESC, \
|
||||
.bRDescriptorType = USB_DT_HID_REPORT, \
|
||||
.wDescriptorLength = LE16(sizeof(udi_hid_con_report_desc_t)) \
|
||||
}, \
|
||||
.ep_out = { \
|
||||
.bLength = sizeof(usb_ep_desc_t), \
|
||||
.bDescriptorType = USB_DT_ENDPOINT, \
|
||||
.bEndpointAddress = UDI_HID_CON_EP_OUT | USB_EP_DIR_OUT, \
|
||||
.bmAttributes = USB_EP_TYPE_INTERRUPT, \
|
||||
.wMaxPacketSize = LE16(CONSOLE_EPSIZE), \
|
||||
.bInterval = CON_POLLING_INTERVAL \
|
||||
}, \
|
||||
.ep_in = { \
|
||||
.bLength = sizeof(usb_ep_desc_t), \
|
||||
.bDescriptorType = USB_DT_ENDPOINT, \
|
||||
.bEndpointAddress = UDI_HID_CON_EP_IN | USB_EP_DIR_IN, \
|
||||
.bmAttributes = USB_EP_TYPE_INTERRUPT, \
|
||||
.wMaxPacketSize = LE16(CONSOLE_EPSIZE), \
|
||||
.bInterval = CON_POLLING_INTERVAL \
|
||||
} \
|
||||
}
|
||||
|
||||
// clang-format on
|
||||
|
||||
# define UDI_HID_CON_REPORT_SIZE CONSOLE_EPSIZE
|
||||
|
||||
@@ -482,12 +633,12 @@ extern uint8_t udi_hid_con_report[UDI_HID_CON_REPORT_SIZE];
|
||||
|
||||
COMPILER_PACK_RESET()
|
||||
|
||||
#endif // CON
|
||||
#endif // CONSOLE_ENABLE
|
||||
|
||||
// **********************************************************************
|
||||
// CDC Descriptor structure and content
|
||||
// **********************************************************************
|
||||
#ifdef CDC
|
||||
#ifdef VIRTSER_ENABLE
|
||||
|
||||
COMPILER_PACK_SET(1)
|
||||
|
||||
@@ -534,16 +685,98 @@ typedef struct {
|
||||
usb_ep_desc_t ep_rx;
|
||||
} udi_cdc_desc_t;
|
||||
|
||||
# define CDC_DESCRIPTOR \
|
||||
{ \
|
||||
.iaface.bLength = sizeof(usb_association_desc_t), .iaface.bDescriptorType = USB_DT_IAD, .iaface.bFirstInterface = CDC_STATUS_INTERFACE, .iaface.bInterfaceCount = 2, .iaface.bFunctionClass = CDC_CLASS_DEVICE, .iaface.bFunctionSubClass = CDC_SUBCLASS_ACM, .iaface.bFunctionProtocol = CDC_PROTOCOL_V25TER, .iaface.iFunction = 0, .iface_c.bLength = sizeof(usb_iface_desc_t), .iface_c.bDescriptorType = USB_DT_INTERFACE, .iface_c.bInterfaceNumber = CDC_STATUS_INTERFACE, .iface_c.bAlternateSetting = 0, .iface_c.bNumEndpoints = 1, .iface_c.bInterfaceClass = 0x02, .iface_c.bInterfaceSubClass = 0x02, .iface_c.bInterfaceProtocol = CDC_PROTOCOL_V25TER, .iface_c.iInterface = 0, .fd.bFunctionLength = sizeof(usb_cdc_hdr_desc_t), .fd.bDescriptorType = CDC_CS_INTERFACE, .fd.bDescriptorSubtype = CDC_SCS_HEADER, .fd.bcdCDC = 0x0110, .mfd.bFunctionLength = sizeof(usb_cdc_call_mgmt_desc_t), .mfd.bDescriptorType = CDC_CS_INTERFACE, .mfd.bDescriptorSubtype = CDC_SCS_CALL_MGMT, \
|
||||
.mfd.bmCapabilities = CDC_CALL_MGMT_SUPPORTED, .mfd.bDataInterface = CDC_DATA_INTERFACE, .acmd.bFunctionLength = sizeof(usb_cdc_acm_desc_t), .acmd.bDescriptorType = CDC_CS_INTERFACE, .acmd.bDescriptorSubtype = CDC_SCS_ACM, .acmd.bmCapabilities = CDC_ACM_SUPPORT_LINE_REQUESTS, .ufd.bFunctionLength = sizeof(usb_cdc_union_desc_t), .ufd.bDescriptorType = CDC_CS_INTERFACE, .ufd.bDescriptorSubtype = CDC_SCS_UNION, .ufd.bMasterInterface = CDC_STATUS_INTERFACE, .ufd.bSlaveInterface0 = CDC_DATA_INTERFACE, .ep_c.bLength = sizeof(usb_ep_desc_t), .ep_c.bDescriptorType = USB_DT_ENDPOINT, .ep_c.bEndpointAddress = CDC_ACM_ENDPOINT | USB_EP_DIR_IN, .ep_c.bmAttributes = USB_EP_TYPE_INTERRUPT, .ep_c.wMaxPacketSize = LE16(CDC_ACM_SIZE), .ep_c.bInterval = CDC_EP_INTERVAL_STATUS, .iface_d.bLength = sizeof(usb_iface_desc_t), .iface_d.bDescriptorType = USB_DT_INTERFACE, .iface_d.bInterfaceNumber = CDC_DATA_INTERFACE, .iface_d.bAlternateSetting = 0, .iface_d.bNumEndpoints = 2, \
|
||||
.iface_d.bInterfaceClass = CDC_CLASS_DATA, .iface_d.bInterfaceSubClass = 0, .iface_d.bInterfaceProtocol = 0, .iface_d.iInterface = 0, .ep_rx.bLength = sizeof(usb_ep_desc_t), .ep_rx.bDescriptorType = USB_DT_ENDPOINT, .ep_rx.bEndpointAddress = CDC_RX_ENDPOINT | USB_EP_DIR_OUT, .ep_rx.bmAttributes = USB_EP_TYPE_BULK, .ep_rx.wMaxPacketSize = LE16(CDC_RX_SIZE), .ep_rx.bInterval = CDC_EP_INTERVAL_DATA, .ep_tx.bLength = sizeof(usb_ep_desc_t), .ep_tx.bDescriptorType = USB_DT_ENDPOINT, .ep_tx.bEndpointAddress = CDC_TX_ENDPOINT | USB_EP_DIR_IN, .ep_tx.bmAttributes = USB_EP_TYPE_BULK, .ep_tx.wMaxPacketSize = LE16(CDC_TX_SIZE), .ep_tx.bInterval = CDC_EP_INTERVAL_DATA, \
|
||||
}
|
||||
// clang-format off
|
||||
|
||||
# define CDC_DESCRIPTOR { \
|
||||
.iaface = { \
|
||||
.bLength = sizeof(usb_association_desc_t), \
|
||||
.bDescriptorType = USB_DT_IAD, \
|
||||
.bFirstInterface = CDC_STATUS_INTERFACE, \
|
||||
.bInterfaceCount = 2, \
|
||||
.bFunctionClass = CDC_CLASS_DEVICE, \
|
||||
.bFunctionSubClass = CDC_SUBCLASS_ACM, \
|
||||
.bFunctionProtocol = CDC_PROTOCOL_V25TER, \
|
||||
.iFunction = 0 \
|
||||
}, \
|
||||
.iface_c = { \
|
||||
.bLength = sizeof(usb_iface_desc_t), \
|
||||
.bDescriptorType = USB_DT_INTERFACE, \
|
||||
.bInterfaceNumber = CDC_STATUS_INTERFACE, \
|
||||
.bAlternateSetting = 0, \
|
||||
.bNumEndpoints = 1, \
|
||||
.bInterfaceClass = 0x02, \
|
||||
.bInterfaceSubClass = 0x02, \
|
||||
.bInterfaceProtocol = CDC_PROTOCOL_V25TER, \
|
||||
.iInterface = 0 \
|
||||
}, \
|
||||
.fd = { \
|
||||
.bFunctionLength = sizeof(usb_cdc_hdr_desc_t), \
|
||||
.bDescriptorType = CDC_CS_INTERFACE, \
|
||||
.bDescriptorSubtype = CDC_SCS_HEADER, \
|
||||
.bcdCDC = 0x0110 \
|
||||
}, \
|
||||
.mfd = { \
|
||||
.bFunctionLength = sizeof(usb_cdc_call_mgmt_desc_t), \
|
||||
.bDescriptorType = CDC_CS_INTERFACE, \
|
||||
.bDescriptorSubtype = CDC_SCS_CALL_MGMT, \
|
||||
.bmCapabilities = CDC_CALL_MGMT_SUPPORTED, \
|
||||
.bDataInterface = CDC_DATA_INTERFACE \
|
||||
}, \
|
||||
.acmd = { \
|
||||
.bFunctionLength = sizeof(usb_cdc_acm_desc_t), \
|
||||
.bDescriptorType = CDC_CS_INTERFACE, \
|
||||
.bDescriptorSubtype = CDC_SCS_ACM, \
|
||||
.bmCapabilities = CDC_ACM_SUPPORT_LINE_REQUESTS \
|
||||
}, \
|
||||
.ufd = { \
|
||||
.bFunctionLength = sizeof(usb_cdc_union_desc_t), \
|
||||
.bDescriptorType = CDC_CS_INTERFACE, \
|
||||
.bDescriptorSubtype = CDC_SCS_UNION, \
|
||||
.bMasterInterface = CDC_STATUS_INTERFACE, \
|
||||
.bSlaveInterface0 = CDC_DATA_INTERFACE \
|
||||
}, \
|
||||
.ep_c = { \
|
||||
.bLength = sizeof(usb_ep_desc_t), \
|
||||
.bDescriptorType = USB_DT_ENDPOINT, \
|
||||
.bEndpointAddress = CDC_ACM_ENDPOINT | USB_EP_DIR_IN, \
|
||||
.bmAttributes = USB_EP_TYPE_INTERRUPT, \
|
||||
.wMaxPacketSize = LE16(CDC_ACM_SIZE), \
|
||||
.bInterval = CDC_EP_INTERVAL_STATUS \
|
||||
}, \
|
||||
.iface_d = { \
|
||||
.bLength = sizeof(usb_iface_desc_t), \
|
||||
.bDescriptorType = USB_DT_INTERFACE, \
|
||||
.bInterfaceNumber = CDC_DATA_INTERFACE, \
|
||||
.bAlternateSetting = 0, \
|
||||
.bNumEndpoints = 2, \
|
||||
.bInterfaceClass = CDC_CLASS_DATA, \
|
||||
.bInterfaceSubClass = 0, \
|
||||
.bInterfaceProtocol = 0, \
|
||||
.iInterface = 0 \
|
||||
}, \
|
||||
.ep_rx = { \
|
||||
.bLength = sizeof(usb_ep_desc_t), \
|
||||
.bDescriptorType = USB_DT_ENDPOINT, \
|
||||
.bEndpointAddress = CDC_RX_ENDPOINT | USB_EP_DIR_OUT, \
|
||||
.bmAttributes = USB_EP_TYPE_BULK, \
|
||||
.wMaxPacketSize = LE16(CDC_RX_SIZE), \
|
||||
.bInterval = CDC_EP_INTERVAL_DATA \
|
||||
}, \
|
||||
.ep_tx = { \
|
||||
.bLength = sizeof(usb_ep_desc_t), \
|
||||
.bDescriptorType = USB_DT_ENDPOINT, \
|
||||
.bEndpointAddress = CDC_TX_ENDPOINT | USB_EP_DIR_IN, \
|
||||
.bmAttributes = USB_EP_TYPE_BULK, \
|
||||
.wMaxPacketSize = LE16(CDC_TX_SIZE), \
|
||||
.bInterval = CDC_EP_INTERVAL_DATA \
|
||||
} \
|
||||
}
|
||||
|
||||
// clang-format on
|
||||
|
||||
COMPILER_PACK_RESET()
|
||||
|
||||
#endif // CDC
|
||||
#endif // VIRTSER_ENABLE
|
||||
|
||||
// **********************************************************************
|
||||
// CONFIGURATION Descriptor structure and content
|
||||
@@ -552,28 +785,26 @@ COMPILER_PACK_SET(1)
|
||||
|
||||
typedef struct {
|
||||
usb_conf_desc_t conf;
|
||||
#ifdef KBD
|
||||
udi_hid_kbd_desc_t hid_kbd;
|
||||
#endif
|
||||
#ifdef MOU
|
||||
#ifdef MOUSE_ENABLE
|
||||
udi_hid_mou_desc_t hid_mou;
|
||||
#endif
|
||||
#ifdef EXK
|
||||
#ifdef EXTRAKEY_ENABLE
|
||||
udi_hid_exk_desc_t hid_exk;
|
||||
#endif
|
||||
#ifdef RAW
|
||||
#ifdef RAW_ENABLE
|
||||
udi_hid_raw_desc_t hid_raw;
|
||||
#endif
|
||||
#ifdef CON
|
||||
#ifdef CONSOLE_ENABLE
|
||||
udi_hid_con_desc_t hid_con;
|
||||
#endif
|
||||
#ifdef NKRO
|
||||
#ifdef NKRO_ENABLE
|
||||
udi_hid_nkro_desc_t hid_nkro;
|
||||
#endif
|
||||
#ifdef MIDI
|
||||
#ifdef MIDI_ENABLE
|
||||
udi_hid_midi_desc_t hid_midi;
|
||||
#endif
|
||||
#ifdef CDC
|
||||
#ifdef VIRTSER_ENABLE
|
||||
udi_cdc_desc_t cdc_serial;
|
||||
#endif
|
||||
} udc_desc_t;
|
||||
|
||||
@@ -59,8 +59,6 @@
|
||||
//***************************************************************************
|
||||
// KBD
|
||||
//***************************************************************************
|
||||
#ifdef KBD
|
||||
|
||||
bool udi_hid_kbd_enable(void);
|
||||
void udi_hid_kbd_disable(void);
|
||||
bool udi_hid_kbd_setup(void);
|
||||
@@ -196,12 +194,10 @@ static void udi_hid_kbd_setreport_valid(void) {
|
||||
// UDI_HID_KBD_CHANGE_LED(udi_hid_kbd_report_set);
|
||||
}
|
||||
|
||||
#endif // KBD
|
||||
|
||||
//********************************************************************************************
|
||||
// NKRO Keyboard
|
||||
//********************************************************************************************
|
||||
#ifdef NKRO
|
||||
#ifdef NKRO_ENABLE
|
||||
|
||||
bool udi_hid_nkro_enable(void);
|
||||
void udi_hid_nkro_disable(void);
|
||||
@@ -336,12 +332,12 @@ static void udi_hid_nkro_setreport_valid(void) {
|
||||
// UDI_HID_NKRO_CHANGE_LED(udi_hid_nkro_report_set);
|
||||
}
|
||||
|
||||
#endif // NKRO
|
||||
#endif // NKRO_ENABLE
|
||||
|
||||
//********************************************************************************************
|
||||
// EXK (extra-keys) SYS-CTRL Keyboard
|
||||
//********************************************************************************************
|
||||
#ifdef EXK
|
||||
#ifdef EXTRAKEY_ENABLE
|
||||
|
||||
bool udi_hid_exk_enable(void);
|
||||
void udi_hid_exk_disable(void);
|
||||
@@ -467,12 +463,12 @@ static void udi_hid_exk_report_sent(udd_ep_status_t status, iram_size_t nb_sent,
|
||||
|
||||
static void udi_hid_exk_setreport_valid(void) {}
|
||||
|
||||
#endif // EXK
|
||||
#endif // EXTRAKEY_ENABLE
|
||||
|
||||
//********************************************************************************************
|
||||
// MOU Mouse
|
||||
//********************************************************************************************
|
||||
#ifdef MOU
|
||||
#ifdef MOUSE_ENABLE
|
||||
|
||||
bool udi_hid_mou_enable(void);
|
||||
void udi_hid_mou_disable(void);
|
||||
@@ -601,12 +597,12 @@ static void udi_hid_mou_report_sent(udd_ep_status_t status, iram_size_t nb_sent,
|
||||
}
|
||||
}
|
||||
|
||||
#endif // MOU
|
||||
#endif // MOUSE_ENABLE
|
||||
|
||||
//********************************************************************************************
|
||||
// RAW
|
||||
//********************************************************************************************
|
||||
#ifdef RAW
|
||||
#ifdef RAW_ENABLE
|
||||
|
||||
bool udi_hid_raw_enable(void);
|
||||
void udi_hid_raw_disable(void);
|
||||
@@ -746,12 +742,12 @@ static void udi_hid_raw_report_rcvd(udd_ep_status_t status, iram_size_t nb_rcvd,
|
||||
}
|
||||
}
|
||||
|
||||
#endif //RAW
|
||||
#endif // RAW_ENABLE
|
||||
|
||||
//********************************************************************************************
|
||||
// CON
|
||||
//********************************************************************************************
|
||||
#ifdef CON
|
||||
#ifdef CONSOLE_ENABLE
|
||||
|
||||
bool udi_hid_con_enable(void);
|
||||
void udi_hid_con_disable(void);
|
||||
@@ -866,4 +862,4 @@ static void udi_hid_con_report_sent(udd_ep_status_t status, iram_size_t nb_sent,
|
||||
|
||||
static void udi_hid_con_setreport_valid(void) {}
|
||||
|
||||
#endif // CON
|
||||
#endif // CONSOLE_ENABLE
|
||||
|
||||
@@ -57,62 +57,60 @@ extern "C" {
|
||||
//******************************************************************************
|
||||
// Keyboard interface definitions
|
||||
//******************************************************************************
|
||||
#ifdef KBD
|
||||
extern UDC_DESC_STORAGE udi_api_t udi_api_hid_kbd;
|
||||
extern bool udi_hid_kbd_b_report_valid;
|
||||
extern volatile bool udi_hid_kbd_b_report_trans_ongoing;
|
||||
extern uint8_t udi_hid_kbd_report_set;
|
||||
bool udi_hid_kbd_send_report(void);
|
||||
#endif // KBD
|
||||
|
||||
//********************************************************************************************
|
||||
// NKRO Keyboard
|
||||
//********************************************************************************************
|
||||
#ifdef NKRO
|
||||
#ifdef NKRO_ENABLE
|
||||
extern UDC_DESC_STORAGE udi_api_t udi_api_hid_nkro;
|
||||
extern bool udi_hid_nkro_b_report_valid;
|
||||
extern volatile bool udi_hid_nkro_b_report_trans_ongoing;
|
||||
bool udi_hid_nkro_send_report(void);
|
||||
#endif // NKRO
|
||||
#endif // NKRO_ENABLE
|
||||
|
||||
//********************************************************************************************
|
||||
// SYS-CTRL interface
|
||||
//********************************************************************************************
|
||||
#ifdef EXK
|
||||
#ifdef EXTRAKEY_ENABLE
|
||||
extern UDC_DESC_STORAGE udi_api_t udi_api_hid_exk;
|
||||
extern bool udi_hid_exk_b_report_valid;
|
||||
extern uint8_t udi_hid_exk_report_set;
|
||||
bool udi_hid_exk_send_report(void);
|
||||
#endif // EXK
|
||||
#endif // EXTRAKEY_ENABLE
|
||||
|
||||
//********************************************************************************************
|
||||
// CON Console
|
||||
//********************************************************************************************
|
||||
#ifdef CON
|
||||
#ifdef CONSOLE_ENABLE
|
||||
extern UDC_DESC_STORAGE udi_api_t udi_api_hid_con;
|
||||
extern bool udi_hid_con_b_report_valid;
|
||||
extern uint8_t udi_hid_con_report_set[UDI_HID_CON_REPORT_SIZE];
|
||||
extern volatile bool udi_hid_con_b_report_trans_ongoing;
|
||||
bool udi_hid_con_send_report(void);
|
||||
#endif // CON
|
||||
#endif // CONSOLE_ENABLE
|
||||
|
||||
//********************************************************************************************
|
||||
// MOU Mouse
|
||||
//********************************************************************************************
|
||||
#ifdef MOU
|
||||
#ifdef MOUSE_ENABLE
|
||||
extern UDC_DESC_STORAGE udi_api_t udi_api_hid_mou;
|
||||
extern bool udi_hid_mou_b_report_valid;
|
||||
bool udi_hid_mou_send_report(void);
|
||||
#endif // MOU
|
||||
#endif // MOUSE_ENABLE
|
||||
|
||||
//********************************************************************************************
|
||||
// RAW Raw
|
||||
//********************************************************************************************
|
||||
#ifdef RAW
|
||||
#ifdef RAW_ENABLE
|
||||
extern UDC_DESC_STORAGE udi_api_t udi_api_hid_raw;
|
||||
bool udi_hid_raw_send_report(void);
|
||||
bool udi_hid_raw_receive_report(void);
|
||||
#endif // RAW
|
||||
#endif // RAW_ENABLE
|
||||
|
||||
//@}
|
||||
|
||||
|
||||
@@ -120,49 +120,45 @@ UDC_DESC_STORAGE udc_desc_t udc_desc = {
|
||||
.conf.iConfiguration = 0,
|
||||
.conf.bmAttributes = /* USB_CONFIG_ATTR_MUST_SET | */ USB_DEVICE_ATTR,
|
||||
.conf.bMaxPower = USB_CONFIG_MAX_POWER(USB_DEVICE_POWER),
|
||||
#ifdef KBD
|
||||
.hid_kbd = UDI_HID_KBD_DESC,
|
||||
#endif
|
||||
#ifdef RAW
|
||||
#ifdef RAW_ENABLE
|
||||
.hid_raw = UDI_HID_RAW_DESC,
|
||||
#endif
|
||||
#ifdef MOU
|
||||
#ifdef MOUSE_ENABLE
|
||||
.hid_mou = UDI_HID_MOU_DESC,
|
||||
#endif
|
||||
#ifdef EXK
|
||||
#ifdef EXTRAKEY_ENABLE
|
||||
.hid_exk = UDI_HID_EXK_DESC,
|
||||
#endif
|
||||
#ifdef CON
|
||||
#ifdef CONSOLE_ENABLE
|
||||
.hid_con = UDI_HID_CON_DESC,
|
||||
#endif
|
||||
#ifdef NKRO
|
||||
#ifdef NKRO_ENABLE
|
||||
.hid_nkro = UDI_HID_NKRO_DESC,
|
||||
#endif
|
||||
#ifdef CDC
|
||||
#ifdef VIRTSER_ENABLE
|
||||
.cdc_serial = CDC_DESCRIPTOR,
|
||||
#endif
|
||||
};
|
||||
|
||||
UDC_DESC_STORAGE udi_api_t *udi_apis[USB_DEVICE_NB_INTERFACE] = {
|
||||
#ifdef KBD
|
||||
&udi_api_hid_kbd,
|
||||
#endif
|
||||
#ifdef RAW
|
||||
#ifdef RAW_ENABLE
|
||||
&udi_api_hid_raw,
|
||||
#endif
|
||||
#ifdef MOU
|
||||
#ifdef MOUSE_ENABLE
|
||||
&udi_api_hid_mou,
|
||||
#endif
|
||||
#ifdef EXK
|
||||
#ifdef EXTRAKEY_ENABLE
|
||||
&udi_api_hid_exk,
|
||||
#endif
|
||||
#ifdef CON
|
||||
#ifdef CONSOLE_ENABLE
|
||||
&udi_api_hid_con,
|
||||
#endif
|
||||
#ifdef NKRO
|
||||
#ifdef NKRO_ENABLE
|
||||
&udi_api_hid_nkro,
|
||||
#endif
|
||||
#ifdef CDC
|
||||
#ifdef VIRTSER_ENABLE
|
||||
&udi_api_cdc_comm, &udi_api_cdc_data,
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -63,41 +63,39 @@ void main_remotewakeup_enable(void);
|
||||
// Called by UDC when USB Host request to disable remote wakeup
|
||||
void main_remotewakeup_disable(void);
|
||||
|
||||
#ifdef KBD
|
||||
extern volatile bool main_b_kbd_enable;
|
||||
bool main_kbd_enable(void);
|
||||
void main_kbd_disable(void);
|
||||
#endif // KBD
|
||||
|
||||
#ifdef NKRO
|
||||
#ifdef NKRO_ENABLE
|
||||
extern volatile bool main_b_nkro_enable;
|
||||
bool main_nkro_enable(void);
|
||||
void main_nkro_disable(void);
|
||||
#endif // NKRO
|
||||
#endif // NKRO_ENABLE
|
||||
|
||||
#ifdef EXK
|
||||
#ifdef EXTRAKEY_ENABLE
|
||||
extern volatile bool main_b_exk_enable;
|
||||
bool main_exk_enable(void);
|
||||
void main_exk_disable(void);
|
||||
#endif // EXK
|
||||
#endif // EXTRAKEY_ENABLE
|
||||
|
||||
#ifdef CON
|
||||
#ifdef CONSOLE_ENABLE
|
||||
extern volatile bool main_b_con_enable;
|
||||
bool main_con_enable(void);
|
||||
void main_con_disable(void);
|
||||
#endif // CON
|
||||
#endif // CONSOLE_ENABLE
|
||||
|
||||
#ifdef MOU
|
||||
#ifdef MOUSE_ENABLE
|
||||
extern volatile bool main_b_mou_enable;
|
||||
bool main_mou_enable(void);
|
||||
void main_mou_disable(void);
|
||||
#endif // MOU
|
||||
#endif // MOUSE_ENABLE
|
||||
|
||||
#ifdef RAW
|
||||
#ifdef RAW_ENABLE
|
||||
extern volatile bool main_b_raw_enable;
|
||||
bool main_raw_enable(void);
|
||||
void main_raw_disable(void);
|
||||
void main_raw_receive(uint8_t *buffer, uint8_t len);
|
||||
#endif // RAW
|
||||
#endif // RAW_ENABLE
|
||||
|
||||
#endif // _MAIN_H_
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
#include "compiler.h"
|
||||
|
||||
#ifdef CDC
|
||||
#ifdef VIRTSER_ENABLE
|
||||
|
||||
# define CDC_CLASS_DEVICE 0x02 //!< USB Communication Device Class
|
||||
# define CDC_CLASS_COMM 0x02 //!< CDC Communication Class Interface
|
||||
|
||||
@@ -2,3 +2,4 @@
|
||||
|
||||
#define PERMISSIVE_HOLD
|
||||
#define NO_ACTION_MACRO
|
||||
#undef ONESHOT_TAP_TOGGLE
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user