Compare commits
74 Commits
Author | SHA1 | Date | |
---|---|---|---|
c785148445 | |||
b43bdc1c69 | |||
5a5ecd7dd9 | |||
60be8d9f24 | |||
3f85e90126 | |||
3eefe31a54 | |||
7be65f2cd0 | |||
016b4be751 | |||
db80209e69 | |||
716924de3e | |||
d88dca3ca7 | |||
9c1097e768 | |||
f7eb030e91 | |||
aae1814319 | |||
78fdd40622 | |||
43b6f031b1 | |||
3e27ceee42 | |||
67f374029d | |||
30fd69886d | |||
ed528403fd | |||
faae375ccd | |||
b0fd064491 | |||
abf466e57d | |||
157319fbd0 | |||
39ff121d73 | |||
8018f4db2d | |||
1a159a38ed | |||
a0bf235644 | |||
f420741f9b | |||
0b7b74f56a | |||
80b2b710da | |||
3814dacf27 | |||
7576f6162e | |||
e8a02afc8c | |||
357a888d80 | |||
7f5656996c | |||
b008a9afe6 | |||
d8e3294aea | |||
a8d073368f | |||
44d93285d1 | |||
8e0af2f5ba | |||
da76734fe0 | |||
c029c5b187 | |||
294cfd8d33 | |||
622e94c6cd | |||
ba7f52aaeb | |||
307013a2f8 | |||
f68abbf6c8 | |||
897c4cd175 | |||
1f2807c2de | |||
b160913309 | |||
867fded980 | |||
d1730ec760 | |||
4057d44989 | |||
2bfcb6bfc5 | |||
1f42071238 | |||
400423d10b | |||
54ef02dead | |||
044b4aaf01 | |||
ccb4b81b3f | |||
e269977387 | |||
0cb4da2c74 | |||
9b0c734733 | |||
fffee6ade1 | |||
97ddc7ea18 | |||
3afd2d81b8 | |||
2543bad250 | |||
a056d94561 | |||
573d1fbb92 | |||
437446ba8f | |||
8640b43214 | |||
09fc6cab34 | |||
7e8dc2e570 | |||
263536586d |
@ -145,6 +145,7 @@
|
||||
|
||||
* Hardware Platform Development
|
||||
* Arm/ChibiOS
|
||||
* [Selecting an MCU](platformdev_selecting_arm_mcu.md)
|
||||
* [Early initialization](platformdev_chibios_earlyinit.md)
|
||||
|
||||
* QMK Reference
|
||||
|
@ -5,7 +5,7 @@ If you've ever used Vim, you know what a Leader key is. If not, you're about to
|
||||
That's what `KC_LEAD` does. Here's an example:
|
||||
|
||||
1. Pick a key on your keyboard you want to use as the Leader key. Assign it the keycode `KC_LEAD`. This key would be dedicated just for this -- it's a single action key, can't be used for anything else.
|
||||
2. Include the line `#define LEADER_TIMEOUT 300` in your `config.h`. This sets the timeout for the `KC_LEAD` key. Specifically, when you press the `KC_LEAD` key, you only have a certain amount of time to complete the Leader Key sequence. The `300` here sets that to 300ms, and you can increase this value to give you more time to hit the sequence. But any keys pressed during this timeout are intercepted and not sent, so you may want to keep this value low. .
|
||||
2. Include the line `#define LEADER_TIMEOUT 300` in your `config.h`. This sets the timeout for the `KC_LEAD` key. Specifically, when you press the `KC_LEAD` key, you only have a certain amount of time to complete the Leader Key sequence. The `300` here sets that to 300ms, and you can increase this value to give you more time to hit the sequence. But any keys pressed during this timeout are intercepted and not sent, so you may want to keep this value low.
|
||||
* By default, this timeout is how long after pressing `KC_LEAD` to complete your entire sequence. This may be very low for some people. So you may want to increase this timeout. Optionally, you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped. This allows you to maintain a low value here, but still be able to use the longer sequences. To enable this option, add `#define LEADER_PER_KEY_TIMING` to your `config.h`.
|
||||
3. Within your `matrix_scan_user` function, add something like this:
|
||||
|
||||
|
@ -21,7 +21,11 @@ Keep in mind that a report_mouse_t (here "mouseReport") has the following proper
|
||||
* `mouseReport.h` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing horizontal scrolling (+ right, - left).
|
||||
* `mouseReport.buttons` - this is a uint8_t in which the last 5 bits are used. These bits represent the mouse button state - bit 3 is mouse button 5, and bit 7 is mouse button 1.
|
||||
|
||||
When the mouse report is sent, the x, y, v, and h values are set to 0 (this is done in "pointing_device_send()", which can be overridden to avoid this behavior). This way, button states persist, but movement will only occur once. For further customization, both `pointing_device_init` and `pointing_device_task` can be overridden.
|
||||
Once you have made the necessary changes to the mouse report, you need to send it:
|
||||
|
||||
* `pointing_device_send()` - Sends the mouse report to the host and zeroes out the report.
|
||||
|
||||
When the mouse report is sent, the x, y, v, and h values are set to 0 (this is done in `pointing_device_send()`, which can be overridden to avoid this behavior). This way, button states persist, but movement will only occur once. For further customization, both `pointing_device_init` and `pointing_device_task` can be overridden.
|
||||
|
||||
In the following example, a custom key is used to click the mouse and scroll 127 units vertically and horizontally, then undo all of that when released - because that's a totally useful function. Listen, this is an example:
|
||||
|
||||
@ -38,6 +42,7 @@ case MS_SPECIAL:
|
||||
currentReport.buttons &= ~MOUSE_BTN1;
|
||||
}
|
||||
pointing_device_set_report(currentReport);
|
||||
pointing_device_send();
|
||||
break;
|
||||
```
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -66,13 +66,16 @@ Then define a table like this in your keymap file:
|
||||
|
||||
```c
|
||||
const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE(
|
||||
UCIS_SYM("poop", 0x1F4A9), // 💩
|
||||
UCIS_SYM("rofl", 0x1F923), // 🤣
|
||||
UCIS_SYM("kiss", 0x1F619) // 😙
|
||||
UCIS_SYM("poop", 0x1F4A9), // 💩
|
||||
UCIS_SYM("rofl", 0x1F923), // 🤣
|
||||
UCIS_SYM("cuba", 0x1F1E8, 0x1F1FA), // 🇨🇺
|
||||
UCIS_SYM("look", 0x0CA0, 0x005F, 0x0CA0), // ಠ_ಠ
|
||||
);
|
||||
```
|
||||
|
||||
To use it, call `qk_ucis_start()`. Then, type the mnemonic for the character (such as "rofl"), and hit Space or Enter. QMK should erase the "rofl" text and insert the laughing emoji.
|
||||
By default, each table entry may be up to 3 code points long. This number can be changed by adding `#define UCIS_MAX_CODE_POINTS n` to your `config.h` file.
|
||||
|
||||
To use UCIS input, call `qk_ucis_start()`. Then, type the mnemonic for the character (such as "rofl") and hit Space, Enter or Esc. QMK should erase the "rofl" text and insert the laughing emoji.
|
||||
|
||||
### Customization
|
||||
|
||||
@ -90,7 +93,7 @@ Unicode input in QMK works by inputting a sequence of characters to the OS, sort
|
||||
|
||||
The following input modes are available:
|
||||
|
||||
* **`UC_MAC`**: macOS built-in Unicode hex input. Supports code points up to `0xFFFF` (`0x10FFFF` with Unicode Map).
|
||||
* **`UC_MAC`**: macOS built-in Unicode hex input. Supports code points up to `0x10FFFF` (all possible code points).
|
||||
|
||||
To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar.
|
||||
By default, this mode uses the left Option key (`KC_LALT`) for Unicode input, but this can be changed by defining [`UNICODE_KEY_MAC`](#input-key-configuration) with another keycode.
|
||||
|
@ -111,7 +111,7 @@ This is ideal for when you want ensure everything compiles successfully when pre
|
||||
|
||||
## Examples
|
||||
|
||||
For a brief example, checkout [`/users/_example/`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna).
|
||||
For a brief example, checkout [`/users/_example/`](https://github.com/qmk/qmk_firmware/tree/master/users/_example).
|
||||
For a more complicated example, checkout [`/users/drashna/`](https://github.com/qmk/qmk_firmware/tree/master/users/drashna)'s userspace.
|
||||
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
# バックライト
|
||||
|
||||
<!---
|
||||
original document: 5d5ff80:docs/feature_backlight.md
|
||||
git diff 5d5ff80 HEAD -- docs/feature_backlight.md | cat
|
||||
original document: 0.9.10:docs/feature_backlight.md
|
||||
git diff 0.9.10 HEAD -- docs/feature_backlight.md | cat
|
||||
-->
|
||||
|
||||
多くのキーボードは、キースイッチを貫通して配置されたり、キースイッチの下に配置された個々の LED によって、バックライトキーをサポートします。この機能は通常スイッチごとに単一の色しか使用できないため、[RGB アンダーグロー](ja/feature_rgblight.md)および [RGB マトリックス](ja/feature_rgb_matrix.md)機能のどちらとも異なりますが、キーボードに複数の異なる単一色の LED を取り付けることは当然可能です。
|
||||
@ -94,29 +94,29 @@ BACKLIGHT_DRIVER = pwm
|
||||
|
||||
ハードウェア PWM は以下の表に従ってサポートされます:
|
||||
|
||||
| バックライトピン | AT90USB64/128 | ATmega16/32U4 | ATmega16/32U2 | ATmega32A | ATmega328P |
|
||||
| バックライトピン | AT90USB64/128 | ATmega16/32U4 | ATmega16/32U2 | ATmega32A | ATmega328/P |
|
||||
|-------------|-------------|-------------|-------------|---------|----------|
|
||||
| `B1` | | | | | Timer 1 |
|
||||
| `B2` | | | | | Timer 1 |
|
||||
| `B5` | Timer 1 | Timer 1 | | | |
|
||||
| `B6` | Timer 1 | Timer 1 | | | |
|
||||
| `B7` | Timer 1 | Timer 1 | Timer 1 | | |
|
||||
| `C4` | Timer 3 | | | | |
|
||||
| `C5` | Timer 3 | | Timer 1 | | |
|
||||
| `C6` | Timer 3 | Timer 3 | Timer 1 | | |
|
||||
| `D4` | | | | Timer 1 | |
|
||||
| `D5` | | | | Timer 1 | |
|
||||
| `B1` | | | | | Timer 1 |
|
||||
| `B2` | | | | | Timer 1 |
|
||||
| `B5` | Timer 1 | Timer 1 | | | |
|
||||
| `B6` | Timer 1 | Timer 1 | | | |
|
||||
| `B7` | Timer 1 | Timer 1 | Timer 1 | | |
|
||||
| `C4` | Timer 3 | | | | |
|
||||
| `C5` | Timer 3 | | Timer 1 | | |
|
||||
| `C6` | Timer 3 | Timer 3 | Timer 1 | | |
|
||||
| `D4` | | | | Timer 1 | |
|
||||
| `D5` | | | | Timer 1 | |
|
||||
|
||||
他の全てのピンはソフトウェア PWM を使います。[オーディオ](ja/feature_audio.md)機能が無効あるいは1つのタイマだけを使っている場合は、ハードウェアタイマによってバックライト PWM を引き起こすことができます:
|
||||
|
||||
| オーディオピン | オーディオタイマ | ソフトウェア PWM タイマ |
|
||||
|---------|-----------|------------------|
|
||||
| `C4` | Timer 3 | Timer 1 |
|
||||
| `C5` | Timer 3 | Timer 1 |
|
||||
| `C6` | Timer 3 | Timer 1 |
|
||||
| `B5` | Timer 1 | Timer 3 |
|
||||
| `B6` | Timer 1 | Timer 3 |
|
||||
| `B7` | Timer 1 | Timer 3 |
|
||||
| `C4` | Timer 3 | Timer 1 |
|
||||
| `C5` | Timer 3 | Timer 1 |
|
||||
| `C6` | Timer 3 | Timer 1 |
|
||||
| `B5` | Timer 1 | Timer 3 |
|
||||
| `B6` | Timer 1 | Timer 3 |
|
||||
| `B7` | Timer 1 | Timer 3 |
|
||||
|
||||
両方のタイマーがオーディオのために使われている場合、バックライト PWM はハードウェアタイマを使いませんが、代わりにマトリックススキャンの間に引き起こされます。この場合、PWM の計算は十分なタイミングの精度で呼ばれないかもしれないため、バックライトの明滅はサポートされず、バックライトもちらつくかもしれません。
|
||||
|
||||
@ -126,13 +126,13 @@ BACKLIGHT_DRIVER = pwm
|
||||
|
||||
| 定義 | デフォルト | 説明 |
|
||||
|---------------------|-------------|--------------------------------------------------------------------------------------------------------------|
|
||||
| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||
| `BACKLIGHT_PINS` | *定義なし* | 実験的: 詳細は以下を見てください |
|
||||
| `BACKLIGHT_LEVELS` | `3` | 輝度のレベルの数 (オフを除いて最大 31) |
|
||||
| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||
| `BACKLIGHT_PINS` | *定義なし* | 実験的: 詳細は以下を見てください |
|
||||
| `BACKLIGHT_LEVELS` | `3` | 輝度のレベルの数 (オフを除いて最大 31) |
|
||||
| `BACKLIGHT_CAPS_LOCK` | *定義なし* | バックライトを使って Caps Lock のインジケータを有効にする (専用 LED の無いキーボードのため) |
|
||||
| `BACKLIGHT_BREATHING` | *定義なし* | サポートされる場合は、バックライトの明滅動作を有効にする |
|
||||
| `BREATHING_PERIOD` | `6` | 各バックライトの "明滅" の長さ(秒) |
|
||||
| `BACKLIGHT_ON_STATE` | `1` | バックライトが "オン" の時のバックライトピンの状態 - high の場合は `1`、low の場合は `0` |
|
||||
| `BREATHING_PERIOD` | `6` | 各バックライトの "明滅" の長さ(秒) |
|
||||
| `BACKLIGHT_ON_STATE` | `1` | バックライトが "オン" の時のバックライトピンの状態 - high の場合は `1`、low の場合は `0` |
|
||||
|
||||
### バックライトオン状態
|
||||
|
||||
@ -192,10 +192,10 @@ BACKLIGHT_DRIVER = pwm
|
||||
|
||||
| 定義 | デフォルト | 説明 |
|
||||
|------------------------|-------------|-------------------------------------------------------------------------------------------------------------|
|
||||
| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||
| `BACKLIGHT_PWM_DRIVER` | `PWMD4` | 使用する PWM ドライバ。ピンから PWM タイマへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||
| `BACKLIGHT_PWM_CHANNEL` | `3` | 使用する PWM チャンネル。ピンから PWM チャンネルへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||
| `BACKLIGHT_PAL_MODE` | `2` | 使用するピンの代替機能。ピンの AF マッピングについては ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||
| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||
| `BACKLIGHT_PWM_DRIVER` | `PWMD4` | 使用する PWM ドライバ。ピンから PWM タイマへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||
| `BACKLIGHT_PWM_CHANNEL` | `3` | 使用する PWM チャンネル。ピンから PWM チャンネルへのマッピングについては、ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||
| `BACKLIGHT_PAL_MODE` | `2` | 使用するピンの代替機能。ピンの AF マッピングについては ST データシートを見てください。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||
|
||||
## Software PWM Driver :id=software-pwm-driver
|
||||
|
||||
@ -210,7 +210,7 @@ BACKLIGHT_DRIVER = software
|
||||
|
||||
| 定義 | デフォルト | 説明 |
|
||||
|-----------------|-------------|-------------------------------------------------------------------------------------------------------------|
|
||||
| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||
| `BACKLIGHT_PIN` | `B7` | LED を制御するピン。自身のキーボードを設計している場合を除き、これを変更する必要はないはずです |
|
||||
| `BACKLIGHT_PINS` | *定義なし* | 実験的: 詳細は以下を見てください |
|
||||
|
||||
### 複数のバックライトピン
|
||||
|
232
docs/ja/feature_split_keyboard.md
Normal file
232
docs/ja/feature_split_keyboard.md
Normal file
@ -0,0 +1,232 @@
|
||||
# 分割キーボード
|
||||
|
||||
<!---
|
||||
original document:0.9.5:docs/feature_split_keyboard.md
|
||||
git diff 0.9.5 HEAD -- docs/feature_split_keyboard.md | cat
|
||||
-->
|
||||
|
||||
QMK ファームウェアリポジトリの多くのキーボードは、"分割"キーボードです。それらは2つのコントローラを使います — 1つは USB に接続し、もう1つは TRRS または同様のケーブルを介してシリアルまたは I<sup>2</sup>C 接続で接続します。
|
||||
|
||||
分割キーボードには多くの利点がありますが、有効にするには追加の作業が必要です。
|
||||
|
||||
QMK ファームウェアには、任意のキーボードで使用可能な一般的な実装と、多くのキーボード固有の実装があります。
|
||||
|
||||
このため、主に Let's Split とその他のキーボードで使われる一般的な実装について説明します。
|
||||
|
||||
!> ARM はまだ完全には分割キーボードをサポートしておらず、様々な制限があります。進捗はしていますが、機能の100%にはまだ達していません。
|
||||
|
||||
|
||||
## 互換性の概要
|
||||
|
||||
| Transport | AVR | ARM |
|
||||
|------------------------------|--------------------|--------------------|
|
||||
| ['serial'](serial_driver.md) | :heavy_check_mark: | :white_check_mark: <sup>1</sup> |
|
||||
| I2C | :heavy_check_mark: | |
|
||||
|
||||
注意:
|
||||
|
||||
1. ハードウェアとソフトウェアの両方の制限は、[ドライバーのドキュメント](serial_driver.md)の中で説明されます。
|
||||
|
||||
## ハードウェア設定
|
||||
|
||||
2つの Pro Micro 互換のコントローラを使っており、キーボードの左右を接続するために TRRS ジャックを使っていることを前提とします。
|
||||
|
||||
### ハードウェア要件
|
||||
|
||||
左右それぞれのキーボードマトリックスのためのダイオードとスイッチとは別に、2個の TRRS ソケットと 1本の TRRS ケーブルが必要です。
|
||||
|
||||
あるいは、少なくとも3本のワイヤがあるケーブルとソケットを使うことができます。
|
||||
|
||||
キーボードの左右間で通信するために I<sup>2</sup>C を使いたい場合は、少なくとも4本のワイヤを備えたケーブルと 2個の 4.7kΩ プルアップ抵抗が必要です。
|
||||
|
||||
#### 考慮事項
|
||||
|
||||
最も一般的に使われる接続は、TRRS ケーブルとジャックです。これらは4本のワイヤを提供し、分割キーボードに非常に有用で、簡単に見つけることができます。
|
||||
|
||||
ただし、ワイヤのうちの1本が Vcc を供給するため、キーボードはホットプラグ不可能です。TRRS ケーブルを抜き差しする前に、必ずキーボードのUSB接続をはずす必要があります。そうしなければ、コントローラを短絡させたり、もっと悪いことが起こるかもしれません。
|
||||
|
||||
別のオプションは電話ケーブルを使うことです (例えば、旧式の RJ-11/RJ-14 ケーブル)。実際に4本のワイヤ/レーンをサポートするものを使うようにしてください。
|
||||
|
||||
ただし、USB ケーブル、SATA ケーブル、そして単に4本の電線でもコントローラ間の通信に使用できることがわかっています。
|
||||
|
||||
!> コントローラ間の通信に USB ケーブルを使っても問題ありませんが、コネクタは通常の USB 接続と間違えられるかもしれず、配線方法によってはキーボードが短絡する可能性があります。このため、分割キーボードの接続のためにはお勧めできません。
|
||||
|
||||
### シリアル配線
|
||||
|
||||
2つの Pro Micro 間で GND、Vcc、D0 (別名 PDO あるいは pin 3) を TRS/TRRS ケーブルの3本のワイヤで接続します。
|
||||
|
||||
?> ここで使われるピンは実際には以下の `SOFT_SERIAL_PIN` によって設定されることに注意してください。
|
||||
|
||||

|
||||
|
||||
### I<sup>2</sup>C 配線
|
||||
|
||||
2つの Pro Micro 間で GND、Vcc、さらに SCL と SDA (それぞれ 別名 PD0/ピン3 および PD1/ピン2) を TRRS ケーブルの4本のワイヤで接続します。
|
||||
|
||||
プルアップ抵抗はキーボードの左右どちら側にも配置することができます。もし各側を単独で使いたい場合は、4つの抵抗を使い、両側にプルアップ抵抗を配置することもできます。
|
||||
|
||||

|
||||
|
||||
## ファームウェア設定
|
||||
|
||||
分割キーボード機能を有効にするには、以下を `rules.mk` に追加してください:
|
||||
|
||||
```make
|
||||
SPLIT_KEYBOARD = yes
|
||||
```
|
||||
|
||||
カスタムトランスポート (通信メソッド)を使っている場合は、以下を追加する必要もあります:
|
||||
|
||||
```make
|
||||
SPLIT_TRANSPORT = custom
|
||||
```
|
||||
|
||||
### 左右の設定
|
||||
|
||||
デフォルトでは、ファームウェアはどちら側がどちらであるかを認識しません; 決定するには幾つかの助けが必要です。これを行うには幾つかの方法があり、以下に優先順に列挙します。
|
||||
|
||||
#### ピンによる左右の設定
|
||||
|
||||
左右を決定するためにコントローラ上のピンを読むようにファームウェアを設定することができます。これを行うには、以下を `config.h` ファイルに追加します:
|
||||
|
||||
```c
|
||||
#define SPLIT_HAND_PIN B7
|
||||
```
|
||||
|
||||
これは指定されたピンを読み込みます。high の場合、コントローラはそれを左側だと仮定し、low の場合、それは右側であると仮定します。
|
||||
|
||||
#### EEPROM による左右の設定
|
||||
|
||||
このメソッドは永続ストレージ(`EEPROM`)のフラグを設定することで、キーボードの左右を設定します。これはコントローラが最初に起動する時にチェックされ、キーボードのどちら側であるかとキーボードのレイアウトの向きを決定します。
|
||||
|
||||
|
||||
このメソッドを有効にするには、以下を `config.h` ファイルに追加します:
|
||||
|
||||
```c
|
||||
#define EE_HANDS
|
||||
```
|
||||
|
||||
ただし、各コントローラに正しい側の EEPROM ファイルを書き込む必要があります。これを手動で行うこともできますが、ファームウェアを書き込む時にこれを行う avrdude および dfu のターゲットが存在します。
|
||||
|
||||
* `:avrdude-split-left`
|
||||
* `:avrdude-split-right`
|
||||
* `:dfu-split-left`
|
||||
* `:dfu-split-right`
|
||||
* `:dfu-util-split-left`
|
||||
* `:dfu-util-split-right`
|
||||
|
||||
この設定は、`EEP_RST` キーや `eeconfig_init()` 関数を使って EEPROM を再初期化する時には変更されません。ただし、ファームウェアの組み込みオプション以外で EEPROM をリセット([QMK Toolbox]() の "Reset EEPROM" ボタンの動作のように、`EEPROM` を上書きするファイルを書きこむなど)した場合、`EEPROM` ファイルを再書き込みする必要があります。
|
||||
|
||||
`EEPROM` ファイルは、QMK ファームウェアのリポジトリ内の[ここ](https://github.com/qmk/qmk_firmware/tree/master/quantum/split_common)にあります。
|
||||
|
||||
#### `#define` による左右の設定
|
||||
|
||||
コンパイル時に左右を設定することができます。これは以下を `config.h` ファイルに追加することで行うことができます:
|
||||
|
||||
```c
|
||||
#define MASTER_RIGHT
|
||||
```
|
||||
|
||||
あるいは
|
||||
|
||||
```c
|
||||
#define MASTER_LEFT
|
||||
```
|
||||
|
||||
どちらも定義されていない場合、左右のデフォルトは `MASTER_LEFT` になります。
|
||||
|
||||
|
||||
### 通信オプション
|
||||
|
||||
全ての分割キーボードが同一であるとは限らないため、`config.h` ファイル内で設定することができる多くの追加のオプションがあります。
|
||||
|
||||
```c
|
||||
#define USE_I2C
|
||||
```
|
||||
|
||||
これは分割キーボードの I<sup>2</sup>C サポートを有効にします。これは厳密には通信用ではありませんが、OLED あるいは I<sup>2</sup>C ベースのデバイスに使うことができます。
|
||||
|
||||
```c
|
||||
#define SOFT_SERIAL_PIN D0
|
||||
```
|
||||
|
||||
これはシリアル通信用に使われるピンを設定します。シリアルを使っていない場合は、これを定義する必要はありません。
|
||||
|
||||
ただし、キーボード上でシリアルおよび I<sup>2</sup>C を使っている場合は、これを設定し、D0 および D1 以外の値に設定する必要があります (これらは I<sup>2</sup>C 通信のために使われます)。
|
||||
|
||||
```c
|
||||
#define SELECT_SOFT_SERIAL_SPEED {#}`
|
||||
```
|
||||
|
||||
シリアル通信に問題がある場合は、この値を変更して、シリアル用の通信速度を制御することができます。デフォルトは1で、可能な値は以下の通りです:
|
||||
|
||||
* **`0`**: 約189kbps (実験用途専用)
|
||||
* **`1`**: 約137kbps (デフォルト)
|
||||
* **`2`**: 約75kbps
|
||||
* **`3`**: 約39kbps
|
||||
* **`4`**: 約26kbps
|
||||
* **`5`**: 約20kbps
|
||||
|
||||
### ハードウェア設定オプション
|
||||
|
||||
ハードウェアのセットアップ方法に基づいて、設定する必要のある設定が幾つかあります。
|
||||
|
||||
```c
|
||||
#define MATRIX_ROW_PINS_RIGHT { <row pins> }
|
||||
#define MATRIX_COL_PINS_RIGHT { <col pins> }
|
||||
```
|
||||
|
||||
これにより、右側のマトリックスに異なるピンのセットを指定することができます。これは、左右の形が違うキーボード (Keebio の Quefrency など)で、左右で別の構成が必要な場合に便利です。
|
||||
|
||||
```c
|
||||
#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }
|
||||
```
|
||||
|
||||
これにより右側のための異なる直接ピンのセットを指定することができます。
|
||||
|
||||
```c
|
||||
#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a }
|
||||
#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b }
|
||||
```
|
||||
|
||||
これにより右側のための異なるエンコーダピンのセットを指定することができます。
|
||||
|
||||
```c
|
||||
#define RGBLIGHT_SPLIT
|
||||
```
|
||||
|
||||
このオプションは、分割キーボードのコントローラ間で RGB ライトモードの同期を有効にします。これはコントローラに直接配線されている RGB LED を持つキーボード用です (つまり、それらは TRRS ケーブルで "追加データ"オプションを使っていません)。
|
||||
|
||||
```c
|
||||
#define RGBLED_SPLIT { 6, 6 }
|
||||
```
|
||||
|
||||
これは各コントローラに直接接続されている LED の数を設定します。最初の数は左側、2番目の数は右側です。
|
||||
|
||||
?> この設定は `RGBLIGHT_SPLIT` が有効になっていることを意味し、有効になっていない場合は強制的に有効にします。
|
||||
|
||||
|
||||
```c
|
||||
#define SPLIT_USB_DETECT
|
||||
```
|
||||
このオプションは、スタートアップの挙動を変更して、マスタ/スレーブの決定時にアクティブな USB 接続を検出します。このオプションがタイムアウトになった場合、その片側はスレーブと見なされます。これは ARM のデフォルトの挙動で、AVR Teensy ボードに必要です (ハードウェアの制限のため)。
|
||||
|
||||
?> この設定はバッテリパックを使ったデモの機能を停止します。
|
||||
|
||||
```c
|
||||
#define SPLIT_USB_TIMEOUT 2000
|
||||
```
|
||||
これは、`SPLIT_USB_DETECT` を使う時のマスタ/スレーブを検出する場合の最大タイムアウトを設定します。
|
||||
|
||||
```c
|
||||
#define SPLIT_USB_TIMEOUT_POLL 10
|
||||
```
|
||||
これは `SPLIT_USB_DETECT` を使う時のマスタ/スレーブを検出する場合のポーリング頻度を設定します
|
||||
|
||||
## 追加のリソース(英語)
|
||||
|
||||
Nicinabox には Let's Split キーボードのための[非常に優れた詳細なガイド](https://github.com/nicinabox/lets-split-guide)があり、トラブルシューティング情報を含む知っておくべきほとんど全てをカバーします。
|
||||
|
||||
ただし、RGB ライトセクションは、RGB Split コードが QMK ファームウェアに追加されるずっと前に書かれたため、古くなっています。ガイドに従う代わりに、各 LED テーブ(訳注: LED strip とも呼びます)を直接コントローラに配線します。
|
||||
|
||||
<!-- I may port this information later, but for now ... it's very nice, and covers everything -->
|
@ -97,7 +97,7 @@ In most situations you will want to answer Yes to all of the prompts.
|
||||
It's possible, that you will get an error saying something like: `bash: qmk: command not found`.
|
||||
This is due to a [bug](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839155) Debian introduced with their Bash 4.4 release, which removed `$HOME/.local/bin` from the PATH. This bug was later fixed on Debian and Ubuntu.
|
||||
Sadly, Ubuntu reitroduced this bug and is [yet to fix it](https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1588562).
|
||||
Luckily, the fix is easy. Run this as your user: `echo "PATH=$HOME/.local/bin:$PATH" >> $HOME/.bashrc && source $HOME/.bashrc`
|
||||
Luckily, the fix is easy. Run this as your user: `echo 'PATH="$HOME/.local/bin:$PATH"' >> $HOME/.bashrc && source $HOME/.bashrc`
|
||||
|
||||
?>**Note on FreeBSD**:
|
||||
It is suggested to run `qmk setup` as a non-`root` user to start with, but this will likely identify packages that need to be installed to your
|
||||
|
@ -15,7 +15,7 @@ You can control the behavior of one shot keys by defining these in `config.h`:
|
||||
#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */
|
||||
```
|
||||
|
||||
* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](#mod-tap), not the `KC_*` codes.
|
||||
* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](mod_tap.md), not the `KC_*` codes.
|
||||
* `OSL(layer)` - momentary switch to *layer*.
|
||||
|
||||
Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine.
|
||||
|
58
docs/platformdev_selecting_arm_mcu.md
Normal file
58
docs/platformdev_selecting_arm_mcu.md
Normal file
@ -0,0 +1,58 @@
|
||||
# Choosing an Arm MCU :id=choose-arm-mcu
|
||||
|
||||
This page outlines the selection criteria to ensure compatibility with Arm/ChibiOS.
|
||||
|
||||
QMK uses the Hardware Abstraction Layer of ChibiOS in order to run on Arm devices. ChibiOS in general is best supported on STM32 devices, both in the perspective of base MCU support, as well as on-MCU peripheral support. As an extension to the core ChibiOS MCU support, QMK also utilises ChibiOS-Contrib (which includes the Kinetis MCU support layer, as an example), but it does not provide as great a level of peripheral support or general testing for supported devices.
|
||||
|
||||
Adding support for new MCU families must go through ChibiOS or ChibiOS-Contrib -- QMK does not have the bandwidth, resources, nor the inclination to maintain long-term MCU support for your board of choice.
|
||||
|
||||
To be clear: this also includes commercial boards -- unless agreed upon by all parties, QMK will not take over maintenance of a bespoke MCU support package. Even if MCU support is upstreamed into ChibiOS/ChibiOS-Contrib, QMK reserves the right to deprecate and/or remove keyboards utilising support packages that aren't kept up to date with upstream ChibiOS itself.
|
||||
|
||||
## Selecting an already-supported MCU :id=selecting-already-supported-mcu
|
||||
|
||||
### STM32 families
|
||||
|
||||
As outlined earlier, STM32 is the preferred option to ensure greatest compatibility with the subsystems already implemented in QMK. Not all subsystems are compatible yet, but for the most widely-used support is already present.
|
||||
|
||||
The simplest solution to determine if an STM32 MCU is compatible is to navigate to the list of supported STM32 ports in QMK's [ChibiOS fork](https://github.com/qmk/ChibiOS/tree/master/os/hal/ports/STM32). Inside this directory, each of the supported STM32 families will be listed, and inside each family a file called `stm32_registry.h` will be present. Scanning through these files will show `#define`s such as the following, which can be used to determine if ChibiOS supports a particular MCU:
|
||||
|
||||
```c
|
||||
#if defined(STM32F303xC) || defined(__DOXYGEN__)
|
||||
```
|
||||
|
||||
The example shows that STM32F303xC devices are supported by ChibiOS.
|
||||
|
||||
The next step is to ensure that USB is supported on those devices by ChibiOS -- you can confirm this by checking inside the same section guarded by the `#define` above, specifically for the following to be `TRUE`:
|
||||
|
||||
```c
|
||||
#define STM32_HAS_USB TRUE
|
||||
```
|
||||
|
||||
or one of the following being `TRUE`:
|
||||
|
||||
```c
|
||||
#define STM32_HAS_OTG1 TRUE
|
||||
#define STM32_HAS_OTG2 TRUE
|
||||
```
|
||||
|
||||
For the most part, this is the bare minimum to be able to have a high confidence that QMK will be able to run on your MCU. After that, it's all up to configuration.
|
||||
|
||||
### Non-STM32 families
|
||||
|
||||
ChibiOS does have support for a handful of non-STM32 devices, and the list can be found in QMK's [ChibiOS fork](https://github.com/qmk/ChibiOS/tree/master/os/hal/ports) and [ChibiOS-Contrib fork](https://github.com/qmk/ChibiOS-Contrib/tree/master/os/hal/ports). Non-STM32 support is likely out of date, and only supports ancient MCUs -- whilst it might be possible to use these, it's not recommended.
|
||||
|
||||
Do note that there are sometimes licensing restrictions with respect to redistribution. As an example, binaries built for nRF5 are not able to be redistributed via QMK Configurator, due to the licensing of their board support package.
|
||||
|
||||
## Adding support for a new STM32 MCU (for an existing family) :id=add-new-stm32-mcu
|
||||
|
||||
Usually, one can "masquerade" as an existing MCU of the same family, especially if the only difference is RAM or Flash size. As an example, some MCUs within the same family are virtually identical, with the exception of adding a cryptographic peripheral -- STM32L072 vs. STM32L082 for instance. Given the unlikely use of the cryptographic peripheral, L082 chips can actually run as if they're an L072, and can be targeted accordingly.
|
||||
|
||||
Adding proper support for new MCUs within an existing STM32 family should ideally be upstreamed to ChibiOS. In general, this will require modifications of the `stm32_registry.h` file, providing correct responses for the same `#define`s provided for the other MCUs in that family.
|
||||
|
||||
## Adding support for a new STM32 Family :id=add-new-stm32-family
|
||||
|
||||
If this is a requirement, this needs to go through upstream ChibiOS before QMK would consider accepting boards targeting the new family. More information for porting should be sought by approaching ChibiOS directly, rather than through QMK.
|
||||
|
||||
## Adding support for a new MCU Family :id=add-new-mcu-family
|
||||
|
||||
As stated earlier, in order for a new MCU family to be supported by QMK, it needs to be upstreamed into ChibiOS-Contrib before QMK will consider accepting boards using it. The same principle applies for development -- you're best approaching the ChibiOS-Contrib maintainers to get a bit more of an idea on what's involved with upstreaming your contribution.
|
@ -99,3 +99,14 @@ While not an exhaustive list, the following table provides the scenarios that ha
|
||||
| f401/f411 | :heavy_check_mark: |
|
||||
|
||||
*Other supported ChibiOS boards and/or pins may function, it will be highly chip and configuration dependent.*
|
||||
|
||||
### Push Pull and Open Drain Configuration
|
||||
The default configuration is a push pull on the defined pin.
|
||||
This can be configured for bitbang, PWM and SPI.
|
||||
|
||||
Note: This only applies to STM32 boards.
|
||||
|
||||
To configure the `RGB_DI_PIN` to open drain configuration add this to your config.h file:
|
||||
```c
|
||||
#define WS2812_EXTERNAL_PULLUP
|
||||
```
|
||||
|
@ -14,6 +14,14 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Push Pull or Open Drain Configuration
|
||||
// Default Push Pull
|
||||
#ifndef WS2812_EXTERNAL_PULLUP
|
||||
# define WS2812_OUTPUT_MODE PAL_MODE_OUTPUT_PUSHPULL
|
||||
#else
|
||||
# define WS2812_OUTPUT_MODE PAL_MODE_OUTPUT_OPENDRAIN
|
||||
#endif
|
||||
|
||||
#define NUMBER_NOPS 6
|
||||
#define CYCLES_PER_SEC (STM32_SYSCLK / NUMBER_NOPS * NOP_FUDGE)
|
||||
#define NS_PER_SEC (1000000000L) // Note that this has to be SIGNED since we want to be able to check for negative values of derivatives
|
||||
@ -66,7 +74,7 @@ void sendByte(uint8_t byte) {
|
||||
}
|
||||
}
|
||||
|
||||
void ws2812_init(void) { setPinOutput(RGB_DI_PIN); }
|
||||
void ws2812_init(void) { palSetLineMode(RGB_DI_PIN, WS2812_OUTPUT_MODE); }
|
||||
|
||||
// Setleds for standard RGB
|
||||
void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) {
|
||||
|
@ -24,6 +24,22 @@
|
||||
# define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP
|
||||
#endif
|
||||
|
||||
// Push Pull or Open Drain Configuration
|
||||
// Default Push Pull
|
||||
#ifndef WS2812_EXTERNAL_PULLUP
|
||||
# if defined(USE_GPIOV1)
|
||||
# define WS2812_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL
|
||||
# else
|
||||
# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_PWM_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING
|
||||
# endif
|
||||
#else
|
||||
# if defined(USE_GPIOV1)
|
||||
# define WS2812_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN
|
||||
# else
|
||||
# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_PWM_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef WS2812_PWM_TARGET_PERIOD
|
||||
//# define WS2812_PWM_TARGET_PERIOD 800000 // Original code is 800k...?
|
||||
# define WS2812_PWM_TARGET_PERIOD 80000 // TODO: work out why 10x less on f303/f4x1
|
||||
@ -142,11 +158,7 @@ void ws2812_init(void) {
|
||||
for (i = 0; i < WS2812_COLOR_BIT_N; i++) ws2812_frame_buffer[i] = WS2812_DUTYCYCLE_0; // All color bits are zero duty cycle
|
||||
for (i = 0; i < WS2812_RESET_BIT_N; i++) ws2812_frame_buffer[i + WS2812_COLOR_BIT_N] = 0; // All reset bits are zero
|
||||
|
||||
#if defined(USE_GPIOV1)
|
||||
palSetLineMode(RGB_DI_PIN, PAL_MODE_STM32_ALTERNATE_PUSHPULL);
|
||||
#else
|
||||
palSetLineMode(RGB_DI_PIN, PAL_MODE_ALTERNATE(WS2812_PWM_PAL_MODE) | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING);
|
||||
#endif
|
||||
palSetLineMode(RGB_DI_PIN, WS2812_OUTPUT_MODE);
|
||||
|
||||
// PWM Configuration
|
||||
//#pragma GCC diagnostic ignored "-Woverride-init" // Turn off override-init warning for this struct. We use the overriding ability to set a "default" channel config
|
||||
|
@ -16,6 +16,22 @@
|
||||
# define WS2812_SPI_MOSI_PAL_MODE 5
|
||||
#endif
|
||||
|
||||
// Push Pull or Open Drain Configuration
|
||||
// Default Push Pull
|
||||
#ifndef WS2812_EXTERNAL_PULLUP
|
||||
# if defined(USE_GPIOV1)
|
||||
# define WS2812_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL
|
||||
# else
|
||||
# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL
|
||||
# endif
|
||||
#else
|
||||
# if defined(USE_GPIOV1)
|
||||
# define WS2812_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN
|
||||
# else
|
||||
# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define BYTES_FOR_LED_BYTE 4
|
||||
#define NB_COLORS 3
|
||||
#define BYTES_FOR_LED (BYTES_FOR_LED_BYTE * NB_COLORS)
|
||||
@ -52,11 +68,7 @@ static void set_led_color_rgb(LED_TYPE color, int pos) {
|
||||
}
|
||||
|
||||
void ws2812_init(void) {
|
||||
#if defined(USE_GPIOV1)
|
||||
palSetLineMode(RGB_DI_PIN, PAL_MODE_STM32_ALTERNATE_PUSHPULL);
|
||||
#else
|
||||
palSetLineMode(RGB_DI_PIN, PAL_MODE_ALTERNATE(WS2812_SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL);
|
||||
#endif
|
||||
palSetLineMode(RGB_DI_PIN, WS2812_OUTPUT_MODE);
|
||||
|
||||
// TODO: more dynamic baudrate
|
||||
static const SPIConfig spicfg = {
|
||||
|
@ -5,7 +5,7 @@
|
||||
"width": 15.5,
|
||||
"height": 4.25,
|
||||
"layouts": {
|
||||
"LAYOUT_all": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"label":"Tab", "x":0, "y":0},
|
||||
{"label":"Q", "x":1, "y":0},
|
||||
@ -33,7 +33,7 @@
|
||||
{"label":"J", "x":7.25, "y":1},
|
||||
{"label":"K", "x":8.25, "y":1},
|
||||
{"label":"L", "x":9.25, "y":1},
|
||||
{"label":"Enter", "x":10.25, "y":1.75},
|
||||
{"label":"Enter", "x":10.25, "y":1, "w":1.75},
|
||||
{"label":"4", "x":12.5, "y":1},
|
||||
{"label":"5", "x":13.5, "y":1},
|
||||
{"label":"6", "x":14.5, "y":1},
|
||||
@ -47,7 +47,7 @@
|
||||
{"label":"N", "x":6.75, "y":2},
|
||||
{"label":"M", "x":7.75, "y":2},
|
||||
{"label":"<", "x":8.75, "y":2},
|
||||
{"label":"Fn1", "x":9.75, "y":2},
|
||||
{"label":"Fn1", "x":9.75, "y":2, "w":1.25},
|
||||
{"label":"Up", "x":11.25, "y":2.25},
|
||||
{"label":"1", "x":12.5, "y":2},
|
||||
{"label":"2", "x":13.5, "y":2},
|
||||
|
@ -14,13 +14,13 @@ BOOTLOADER = atmel-dfu
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE ?= no # Mouse keys
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control
|
||||
CONSOLE_ENABLE ?= no # Console for debug
|
||||
COMMAND_ENABLE ?= no # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
|
||||
AUDIO_ENABLE ?= no
|
||||
RGBLIGHT_ENABLE ?= yes
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
AUDIO_ENABLE = no
|
||||
RGBLIGHT_ENABLE = yes
|
||||
|
@ -14,15 +14,15 @@ BOOTLOADER = atmel-dfu
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE ?= no # Mouse keys
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control
|
||||
CONSOLE_ENABLE ?= yes # Console for debug
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality
|
||||
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE ?= no # MIDI controls
|
||||
AUDIO_ENABLE ?= no
|
||||
UNICODE_ENABLE ?= no # Unicode
|
||||
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
|
@ -1,46 +1,10 @@
|
||||
/* Copyright 2020 yfuku
|
||||
*
|
||||
* 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
|
||||
|
||||
#ifdef KEYBOARD_bat43_rev1
|
||||
#include "rev1.h"
|
||||
#endif
|
||||
#ifdef KEYBOARD_bat43_rev2
|
||||
#include "rev2.h"
|
||||
#endif
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
/* This is a shortcut to help you visually see your layout.
|
||||
*
|
||||
* The first section contains all of the arguments representing the physical
|
||||
* layout of the board and position of the keys.
|
||||
*
|
||||
* The second converts the arguments into a two-dimensional array which
|
||||
* represents the switch matrix.
|
||||
*/
|
||||
|
||||
|
||||
#define LAYOUT( \
|
||||
k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \
|
||||
k10, k11, k12, k13, k14, k15, k30, k50, k51, k52, k53, k54, k55, \
|
||||
k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \
|
||||
k33, k34, k35, k70, k71, k72, \
|
||||
k74, k75, k73, k31, k32 \
|
||||
) { \
|
||||
{ k00, k01, k02, k03, k04, k05 }, \
|
||||
{ k10, k11, k12, k13, k14, k15 }, \
|
||||
{ k20, k21, k22, k23, k24, k25 }, \
|
||||
{ k30, k31, k32, k33, k34, k35 }, \
|
||||
{ k40, k41, k42, k43, k44, k45 }, \
|
||||
{ k50, k51, k52, k53, k54, k55 }, \
|
||||
{ k60, k61, k62, k63, k64, k65 }, \
|
||||
{ k70, k71, k72, k73, k74, k75 }, \
|
||||
}
|
||||
|
17
keyboards/bat43/rev1/rev1.c
Normal file
17
keyboards/bat43/rev1/rev1.c
Normal file
@ -0,0 +1,17 @@
|
||||
/* Copyright 2020 yfuku
|
||||
*
|
||||
* 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 "rev1.h"
|
46
keyboards/bat43/rev1/rev1.h
Normal file
46
keyboards/bat43/rev1/rev1.h
Normal file
@ -0,0 +1,46 @@
|
||||
/* Copyright 2020 yfuku
|
||||
*
|
||||
* 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"
|
||||
|
||||
/* This is a shortcut to help you visually see your layout.
|
||||
*
|
||||
* The first section contains all of the arguments representing the physical
|
||||
* layout of the board and position of the keys.
|
||||
*
|
||||
* The second converts the arguments into a two-dimensional array which
|
||||
* represents the switch matrix.
|
||||
*/
|
||||
|
||||
|
||||
#define LAYOUT( \
|
||||
k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \
|
||||
k10, k11, k12, k13, k14, k15, k30, k50, k51, k52, k53, k54, k55, \
|
||||
k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \
|
||||
k33, k34, k35, k70, k71, k72, \
|
||||
k74, k75, k73, k31, k32 \
|
||||
) { \
|
||||
{ k00, k01, k02, k03, k04, k05 }, \
|
||||
{ k10, k11, k12, k13, k14, k15 }, \
|
||||
{ k20, k21, k22, k23, k24, k25 }, \
|
||||
{ k30, k31, k32, k33, k34, k35 }, \
|
||||
{ k40, k41, k42, k43, k44, k45 }, \
|
||||
{ k50, k51, k52, k53, k54, k55 }, \
|
||||
{ k60, k61, k62, k63, k64, k65 }, \
|
||||
{ k70, k71, k72, k73, k74, k75 }, \
|
||||
}
|
1
keyboards/bat43/rev1/rules.mk
Normal file
1
keyboards/bat43/rev1/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
|
71
keyboards/bat43/rev2/info.json
Normal file
71
keyboards/bat43/rev2/info.json
Normal file
@ -0,0 +1,71 @@
|
||||
{
|
||||
"keyboard_name": "bat43",
|
||||
"url": "",
|
||||
"maintainer": "yfuku",
|
||||
"width": 15,
|
||||
"height": 5.1,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"label":"k00", "x":0, "y":1.43},
|
||||
{"label":"k01", "x":1, "y":1.11},
|
||||
{"label":"k02", "x":2, "y":0.38},
|
||||
{"label":"k03", "x":3, "y":0},
|
||||
{"label":"k04", "x":4, "y":0.05},
|
||||
{"label":"k05", "x":5, "y":0.16},
|
||||
|
||||
{"label":"k40", "x":9, "y":0.16},
|
||||
{"label":"k41", "x":10, "y":0.05},
|
||||
{"label":"k42", "x":11, "y":0},
|
||||
{"label":"k43", "x":12, "y":0.38},
|
||||
{"label":"k44", "x":13, "y":1.11},
|
||||
{"label":"k45", "x":14, "y":1.43},
|
||||
|
||||
{"label":"k10", "x":0, "y":2.43},
|
||||
{"label":"k11", "x":1, "y":2.11},
|
||||
{"label":"k12", "x":2, "y":1.38},
|
||||
{"label":"k13", "x":3, "y":1},
|
||||
{"label":"k14", "x":4, "y":1.05},
|
||||
{"label":"k15", "x":5, "y":1.16},
|
||||
|
||||
{"label":"k30", "x":7, "y":1.16},
|
||||
|
||||
{"label":"k50", "x":9, "y":1.16},
|
||||
{"label":"k51", "x":10, "y":1.05},
|
||||
{"label":"k52", "x":11, "y":1},
|
||||
{"label":"k53", "x":12, "y":1.38},
|
||||
{"label":"k54", "x":13, "y":2.11},
|
||||
{"label":"k55", "x":14, "y":2.43},
|
||||
|
||||
{"label":"k20", "x":0, "y":3.43},
|
||||
{"label":"k21", "x":1, "y":3.11},
|
||||
{"label":"k22", "x":2, "y":2.38},
|
||||
{"label":"k23", "x":3, "y":2},
|
||||
{"label":"k24", "x":4, "y":2.05},
|
||||
{"label":"k25", "x":5, "y":2.16},
|
||||
|
||||
{"label":"k60", "x":9, "y":2.16},
|
||||
{"label":"k61", "x":10, "y":2.05},
|
||||
{"label":"k62", "x":11, "y":2},
|
||||
{"label":"k63", "x":12, "y":2.38},
|
||||
{"label":"k64", "x":13, "y":3.11},
|
||||
{"label":"k65", "x":14, "y":3.43},
|
||||
|
||||
{"label":"k33", "x":4, "y":3.3},
|
||||
{"label":"k34", "x":5, "y":3.3},
|
||||
{"label":"k35", "x":6, "y":3.3},
|
||||
|
||||
{"label":"k70", "x":8, "y":3.3},
|
||||
{"label":"k71", "x":9, "y":3.3},
|
||||
{"label":"k72", "x":10, "y":3.3},
|
||||
|
||||
{"label":"k75", "x":5.1, "y":4.3, "w":0.8, "h":0.8},
|
||||
{"label":"k74", "x":6.1, "y":4.3, "w":0.8, "h":0.8},
|
||||
|
||||
{"label":"k73", "x":8.1, "y":4.3, "w":0.8, "h":0.8},
|
||||
{"label":"k31", "x":9.1, "y":4.3, "w":0.8, "h":0.8},
|
||||
{"label":"k32", "x":10.1, "y":4.3, "w":0.8, "h":0.8}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
17
keyboards/bat43/rev2/rev2.c
Normal file
17
keyboards/bat43/rev2/rev2.c
Normal file
@ -0,0 +1,17 @@
|
||||
/* Copyright 2020 yfuku
|
||||
*
|
||||
* 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 "rev2.h"
|
46
keyboards/bat43/rev2/rev2.h
Normal file
46
keyboards/bat43/rev2/rev2.h
Normal file
@ -0,0 +1,46 @@
|
||||
/* Copyright 2020 yfuku
|
||||
*
|
||||
* 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"
|
||||
|
||||
/* This is a shortcut to help you visually see your layout.
|
||||
*
|
||||
* The first section contains all of the arguments representing the physical
|
||||
* layout of the board and position of the keys.
|
||||
*
|
||||
* The second converts the arguments into a two-dimensional array which
|
||||
* represents the switch matrix.
|
||||
*/
|
||||
|
||||
|
||||
#define LAYOUT( \
|
||||
k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \
|
||||
k10, k11, k12, k13, k14, k15, k30, k50, k51, k52, k53, k54, k55, \
|
||||
k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \
|
||||
k33, k34, k35, k70, k71, k72, \
|
||||
k75, k74, k73, k31, k32 \
|
||||
) { \
|
||||
{ k00, k01, k02, k03, k04, k05 }, \
|
||||
{ k10, k11, k12, k13, k14, k15 }, \
|
||||
{ k20, k21, k22, k23, k24, k25 }, \
|
||||
{ k30, k31, k32, k33, k34, k35 }, \
|
||||
{ k40, k41, k42, k43, k44, k45 }, \
|
||||
{ k50, k51, k52, k53, k54, k55 }, \
|
||||
{ k60, k61, k62, k63, k64, k65 }, \
|
||||
{ k70, k71, k72, k73, k74, k75 }, \
|
||||
}
|
1
keyboards/bat43/rev2/rules.mk
Normal file
1
keyboards/bat43/rev2/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
|
@ -30,3 +30,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||
|
||||
DEFAULT_FOLDER = bat43/rev2
|
||||
|
@ -5,23 +5,24 @@
|
||||
"width": 4,
|
||||
"height": 3,
|
||||
"layouts": {
|
||||
|
||||
"LAYOUT": {
|
||||
|
||||
"layout": [
|
||||
{ "label": "K01", "x": 0, "y": 0 },
|
||||
{ "label": "K02", "x": 1, "y": 0 },
|
||||
{ "label": "K03", "x": 2, "y": 0 },
|
||||
{ "label": "K04", "x": 3, "y": 0 },
|
||||
|
||||
{ "label": "K04", "x": 0, "y": 1 },
|
||||
{ "label": "K05", "x": 1, "y": 1 },
|
||||
{ "label": "K06", "x": 2, "y": 1 },
|
||||
{ "label": "K05", "x": 0, "y": 1 },
|
||||
{ "label": "K06", "x": 1, "y": 1 },
|
||||
{ "label": "K07", "x": 2, "y": 1 },
|
||||
{ "label": "K08", "x": 3, "y": 1 },
|
||||
|
||||
{ "label": "K07", "x": 0, "y": 2 },
|
||||
{ "label": "K08", "x": 1, "y": 2 },
|
||||
{ "label": "K09", "x": 2, "y": 2 },
|
||||
|
||||
{ "label": "K10", "x": 0, "y": 3 },
|
||||
{ "label": "K11", "x": 1, "y": 3 },
|
||||
{ "label": "K12", "x": 2, "y": 3 }
|
||||
{ "label": "K09", "x": 0, "y": 2 },
|
||||
{ "label": "K10", "x": 1, "y": 2 },
|
||||
{ "label": "K11", "x": 2, "y": 2 },
|
||||
{ "label": "K12", "x": 3, "y": 2 }
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,10 @@
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#define _MAIN 0
|
||||
#define _RAISE 1
|
||||
#define _LOWER 2
|
||||
enum layers {
|
||||
_MAIN,
|
||||
_RAISE,
|
||||
_LOWER,
|
||||
};
|
||||
|
||||
// Readability keycodes
|
||||
#define LOWER MO(_LOWER)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user