Compare commits
1 Commits
0.8.139
...
make_cli_p
Author | SHA1 | Date | |
---|---|---|---|
a380937f1f |
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 $?
|
||||
|
@ -16,7 +16,6 @@ The following functions can provide basic control of GPIOs and are found in `qua
|
||||
| `writePinLow(pin)` | Set pin level as low, assuming it is an output | `PORTB &= ~(1<<2)` | `palClearLine(pin)` |
|
||||
| `writePin(pin, level)` | Set pin level, assuming it is an output | `(level) ? PORTB \|= (1<<2) : PORTB &= ~(1<<2)` | `(level) ? palSetLine(pin) : palClearLine(pin)` |
|
||||
| `readPin(pin)` | Returns the level of the pin | `_SFR_IO8(pin >> 4) & _BV(pin & 0xF)` | `palReadLine(pin)` |
|
||||
| `togglePin(pin)` | Invert pin level, assuming it is an output | `PORTB ^= (1<<2)` | `palToggleLine(pin)` |
|
||||
|
||||
## Advanced Settings :id=advanced-settings
|
||||
|
||||
|
@ -1,71 +0,0 @@
|
||||
# 動的マクロ: ランタイムでのマクロの記録および再生
|
||||
|
||||
<!---
|
||||
original document: 0.8.123:docs/feature_dynamic_macros.md
|
||||
git diff 0.8.123 HEAD -- docs/feature_dynamic_macros.md | cat
|
||||
-->
|
||||
|
||||
QMK はその場で作られた一時的なマクロをサポートします。これらを動的マクロと呼びます。それらはユーザがキーボードから定義し、キーボードのプラグを抜くか再起動すると失われます。
|
||||
|
||||
1つまたは2つのマクロに合計128のキー押下を保存できます。RAM をより多く使用してサイズを増やすことができます。
|
||||
|
||||
有効にするには、最初に `rules.mk` に `DYNAMIC_MACRO_ENABLE = yes` を記述します。そして、以下のキーをキーマップに追加します:
|
||||
|
||||
| キー | Alias | 説明 |
|
||||
|------------------|----------|---------------------------------------------------|
|
||||
| `DYN_REC_START1` | `DM_REC1` | マクロ 1 の記録を開始します |
|
||||
| `DYN_REC_START2` | `DM_REC2` | マクロ 2 の記録を開始します |
|
||||
| `DYN_MACRO_PLAY1` | `DM_PLY1` | マクロ 1 を再生します |
|
||||
| `DYN_MACRO_PLAY2` | `DM_PLY2` | マクロ 2 を再生します |
|
||||
| `DYN_REC_STOP` | `DM_RSTP` | 現在記録中のマクロの記録を終了します。 |
|
||||
|
||||
これが必要な全てです。
|
||||
|
||||
マクロの記録を開始するには、`DYN_REC_START1` または `DYN_REC_START2` のどちらかを押します。
|
||||
|
||||
記録を終了するには、`DYN_REC_STOP` レイヤーボタンを押します。
|
||||
|
||||
マクロを再生するには、`DYN_MACRO_PLAY1` あるいは `DYN_MACRO_PLAY2` のどちらかを押します。
|
||||
|
||||
マクロの一部としてマクロを再生することができます。マクロ 1 を記録中にマクロ 2 を再生、またはその逆も問題ありません。ただし、再帰的なマクロ、つまりマクロ 1 を再生するマクロ 1 は作成しないでください。もしそうしてキーボードが反応しなくなった場合は、キーボードを取り外し再び接続します。これを完全に無効にするには、`config.h` ファイルで `DYNAMIC_MACRO_NO_NESTING` を定義します。
|
||||
|
||||
?> 動的マクロの内部の詳細については、`process_dynamic_macro.h` および `process_dynamic_macro.c` ファイルのコメントを読んでください。
|
||||
|
||||
## カスタマイズ
|
||||
|
||||
ある程度のカスタマイズを可能にするオプションがいくつか追加されています。
|
||||
|
||||
| 定義 | デフォルト | 説明 |
|
||||
|----------------------------|----------------|-----------------------------------------------------------------------------------------------------------------|
|
||||
| `DYNAMIC_MACRO_SIZE` | 128 | 動的マクロが使用できるメモリ量を設定します。これは限られたリソースであり、コントローラに依存します。 |
|
||||
| `DYNAMIC_MACRO_USER_CALL` | *定義なし* | これを定義すると、ユーザの `keymap.c` ファイルを使ってマクロが起動されます。 |
|
||||
| `DYNAMIC_MACRO_NO_NESTING` | *定義なし* | これを定義すると、別のマクロからマクロを呼び出す(入れ子になったマクロ)機能を無効にします。 |
|
||||
|
||||
|
||||
記録中にキーを押すたびに LED が点滅し始めた場合は、マクロバッファにマクロを入れるスペースがもう無いことを意味します。マクロを入れるには、他のマクロ(それらは同じバッファを共有します)を短くするか、`config.h` に `DYNAMIC_MACRO_SIZE` 定義を追加することでバッファを増やします(デフォルト値: 128; ヘッダ内のコメントを読んでください)。
|
||||
|
||||
|
||||
### DYNAMIC_MACRO_USER_CALL
|
||||
|
||||
以前のバージョンの動的マクロをお使いの方へ: 専用の `DYN_REC_STOP` キーを使わずに動的マクロキーへのアクセスに使われるレイヤーモディファイアのみを使って、マクロの記録を終了することもまだ可能です。この動作に戻したい場合は、`#define DYNAMIC_MACRO_USER_CALL` を `config.h` に追加し、以下のスニペットを `process_record_user()` 関数の先頭に記述します:
|
||||
|
||||
```c
|
||||
uint16_t macro_kc = (keycode == MO(_DYN) ? DYN_REC_STOP : keycode);
|
||||
|
||||
if (!process_record_dynamic_macro(macro_kc, record)) {
|
||||
return false;
|
||||
}
|
||||
```
|
||||
|
||||
### ユーザフック
|
||||
|
||||
カスタム機能とフィードバックオプションを動的マクロ機能に追加するために使うことができるフックが幾つかあります。これによりある程度のカスタマイズが可能になります。
|
||||
|
||||
direction がどのマクロであるかを示すことに注意してください。`1` がマクロ 1、`-1` がマクロ 2、0 がマクロ無しです。
|
||||
|
||||
* `dynamic_macro_record_start_user(void)` - マクロの記録を開始する時に起動されます。
|
||||
* `dynamic_macro_play_user(int8_t direction)` - マクロを再生する時に起動されます。
|
||||
* `dynamic_macro_record_key_user(int8_t direction, keyrecord_t *record)` - マクロの記録中に各キー押下で起動されます。
|
||||
* `dynamic_macro_record_end_user(int8_t direction)` - マクロの記録を停止した時に起動されます。
|
||||
|
||||
さらに、動的マクロ機能が有効な場合にバックライトを点滅させるために `dynamic_macro_led_blink()` を呼び出すことができます。
|
@ -1,37 +0,0 @@
|
||||
# グレイブエスケープ
|
||||
|
||||
<!---
|
||||
original document: 0.8.123:docs/feature_grave_esc.md
|
||||
git diff 0.8.123 HEAD -- docs/feature_grave_esc.md | cat
|
||||
-->
|
||||
|
||||
60% キーボード、またはファンクションキー行の無い他のレイアウトを使っている場合、専用の Escape キーが無いことに気付くでしょう。グレイブエスケープは grave キー (<code>`</code> および `~`) を Escape と共有することができる機能です。
|
||||
|
||||
## 使用法
|
||||
|
||||
キーマップ内の `KC_GRAVE` キー (通常は`1` キーの左)を `KC_GESC` に置き換えます。ほとんどの場合、このキーは押された時に `KC_ESC` を出力します。ただし、Shift あるいは GUI を押したままにすると、代わりに `KC_GRV` を出力します。
|
||||
|
||||
## OS に見えるもの
|
||||
|
||||
メアリーがキーボードで GESC を押すと、OS には KC_ESC 文字が見えます。メアリーが Shift を押しながら GESC を押すと、`~` または Shift された時はバッククォートを出力します。彼女が GUI/CMD/WIN を押したままにすると、1つの <code>`</code> 文字を出力します。
|
||||
|
||||
## キーコード
|
||||
|
||||
| キー | エイリアス | 説明 |
|
||||
|---------|-----------|------------------------------------------------------------------|
|
||||
| `KC_GESC` | `GRAVE_ESC` | 押された場合に Escape。Shift あるいは GUI が押されたままの場合は <code>`</code> |
|
||||
|
||||
### 注意事項
|
||||
|
||||
macOS では、Command+<code>`</code> はデフォルトで "次のウィンドウを操作対象にする" にマップされます。つまりバッククォートを出力しません。さらに、ショートカットがキーボード環境設定で変更された場合でも、ターミナルは常にこのショートカットを認識してウィンドウを切り替えます。
|
||||
|
||||
## 設定
|
||||
|
||||
グレイブエスケープが壊す可能性のあるキーの組み合わせが幾つかあります。その中には、Windows では Control+Shift+Escape、macOSでは Command+Option+Escape があります。これを回避するには、`config.h` で以下のオプションを `#define` することができます:
|
||||
|
||||
| 定義 | 説明 |
|
||||
|--------------------------|-----------------------------------------|
|
||||
| `GRAVE_ESC_ALT_OVERRIDE` | Alt が押された場合、常に Escape を送信する |
|
||||
| `GRAVE_ESC_CTRL_OVERRIDE` | Control が押された場合、常に Escape を送信する |
|
||||
| `GRAVE_ESC_GUI_OVERRIDE` | GUI が押された場合、常に Escape を送信する |
|
||||
| `GRAVE_ESC_SHIFT_OVERRIDE` | Shift が押された場合、常に Escape を送信する |
|
@ -1,62 +0,0 @@
|
||||
# HD44780 LCD ディスプレイ
|
||||
|
||||
<!---
|
||||
original document: 0.8.123:docs/feature_hd44780.md
|
||||
git diff 0.8.123 HEAD -- docs/feature_hd44780.md | cat
|
||||
-->
|
||||
|
||||
これは Peter Fleury の LCD ライブラリの統合です。このページは基本について説明します。[詳細なドキュメントについてはこのページをご覧ください](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html) (訳注)原文のリンク先のページは、サービスの終了に伴って削除されています。移行先は (http://www.peterfleury.epizy.com/doxygen/avr-gcc-libraries/group__pfleury__lcd.html) と思われます。
|
||||
|
||||
HD44780 ディスプレイのサポートを有効にするには、キーボードの `rules.mk` の `HD44780_ENABLE` フラグを yes に設定します。
|
||||
|
||||
## 設定
|
||||
|
||||
ディスプレイで使用されるピンとディスプレイの行と列の数を、キーボードの `config.h` に設定する必要があります。
|
||||
|
||||
|
||||
HD44780 のラベルが付いたセクションのコメントを外し、必要に応じてパラメータを変更します。
|
||||
````
|
||||
/*
|
||||
* HD44780 LCD ディスプレイ設定
|
||||
*/
|
||||
|
||||
#define LCD_LINES 2 //< ディスプレイの表示行数
|
||||
#define LCD_DISP_LENGTH 16 //< ディスプレイの行ごとの表示文字数
|
||||
#define LCD_IO_MODE 1 //< 0: メモリマップモード 1: IO ポートモード
|
||||
#if LCD_IO_MODE
|
||||
#define LCD_PORT PORTB //< LCD 行のためのポート
|
||||
#define LCD_DATA0_PORT LCD_PORT //< 4ビットデータビット 0 のポート
|
||||
#define LCD_DATA1_PORT LCD_PORT //< 4ビットデータビット 1 のポート
|
||||
#define LCD_DATA2_PORT LCD_PORT //< 4ビットデータビット 2 のポート
|
||||
#define LCD_DATA3_PORT LCD_PORT //< 4ビットデータビット 3 のポート
|
||||
#define LCD_DATA0_PIN 4 //< 4ビットデータビット 0 のピン
|
||||
#define LCD_DATA1_PIN 5 //< 4ビットデータビット 1 のピン
|
||||
#define LCD_DATA2_PIN 6 //< 4ビットデータビット 2 のピン
|
||||
#define LCD_DATA3_PIN 7 //< 4ビットデータビット 3 のピン
|
||||
#define LCD_RS_PORT LCD_PORT //< RS 線のためのポート
|
||||
#define LCD_RS_PIN 3 //< RS 線のためのピン
|
||||
#define LCD_RW_PORT LCD_PORT //< RW 線のためのポート
|
||||
#define LCD_RW_PIN 2 //< RW 線のためのピン
|
||||
#define LCD_E_PORT LCD_PORT //< Enable 線のためのポート
|
||||
#define LCD_E_PIN 1 //< Enable 線のためのピン
|
||||
#endif
|
||||
````
|
||||
|
||||
他のプロパティを設定する必要がある場合は、それらを `quantum/hd44780.h` からコピーし、`config.h` に設定することができます。(訳注)`quantum/hd44780.h` は `drivers/avr/hd44780.h` の間違いではないかと思われます。
|
||||
|
||||
## 使用法
|
||||
|
||||
ディスプレイを初期化するには、以下のパラメータのうちの1つを使って `lcd_init()` を呼び出します:
|
||||
````
|
||||
LCD_DISP_OFF : ディスプレイオフ
|
||||
LCD_DISP_ON : ディスプレイオン、カーソルオフ
|
||||
LCD_DISP_ON_CURSOR : ディスプレイオン、カーソルオン
|
||||
LCD_DISP_ON_CURSOR_BLINK : ディスプレイオン、点滅カーソル
|
||||
````
|
||||
これはキーボードの `matrix_init_kb` またはキーマップの `matrix_init_user` で行うのが最適です。
|
||||
使用前にディスプレイをクリアすることをお勧めします。
|
||||
そのためには、`lcd_clrsrc()` を呼びます。
|
||||
|
||||
ディスプレイに何かを表示するには、最初に `lcd_gotoxy(column, line)` を呼びます。最初の行の先頭に移動するには、`lcd_gotoxy(0, 0)` を呼び出し、その後 `lcd_puts("example string")` を使って文字列を出力します。
|
||||
|
||||
ディスプレイを制御することができる、より多くのメソッドがあります。[詳細なドキュメントについてはリンクされたページをご覧ください](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html) (訳注)原文のリンク先のページは、サービスの終了に伴って削除されています。移行先は (http://www.peterfleury.epizy.com/doxygen/avr-gcc-libraries/group__pfleury__lcd.html) と思われます。
|
@ -66,14 +66,9 @@ After Homebrew is installed run these commands:
|
||||
|
||||
You will need to install Git and Python. It's very likely that you already have both, but if not, one of the following commands should install them:
|
||||
|
||||
* Debian / Ubuntu / Devuan: `sudo apt install git python3 python3-pip`
|
||||
* Fedora / Red Hat / CentOS: `sudo yum install git python3 python3-pip`
|
||||
* Arch / Manjaro: `sudo pacman -S git python python-pip python-setuptools libffi`
|
||||
|
||||
|
||||
Install the global CLI to bootstrap your system:
|
||||
|
||||
`python3 -m pip install --user qmk` (on Arch-based distros you can also try the `qmk` package from AUR (**note**: it's maintained by a community member): `yay -S qmk`)
|
||||
* Debian / Ubuntu / Devuan: `apt-get install git python3 && python3 -m pip install qmk`
|
||||
* Fedora / Red Hat / CentOS: `yum install git python3 && python3 -m pip install qmk`
|
||||
* Arch: `yay -S qmk` (or use any other AUR Helper)
|
||||
|
||||
## 3. Run QMK Setup :id=set-up-qmk
|
||||
|
||||
@ -83,12 +78,6 @@ After installing QMK you can set it up with this command:
|
||||
|
||||
In most situations you will want to answer Yes to all of the prompts.
|
||||
|
||||
?>**Note on Debian, Ubuntu and their derivatives**:
|
||||
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`
|
||||
|
||||
?> If you already know [how to use GitHub](getting_started_github.md), we recommend that you create your own fork and use `qmk setup <github_username>/qmk_firmware` to clone your personal fork. If you don't know what that means you can safely ignore this message.
|
||||
|
||||
## 4. Test Your Build Environment
|
||||
|
@ -18,24 +18,7 @@ You may use more than one slave select pin, not just the `SS` pin. This is usefu
|
||||
|
||||
## ChibiOS/ARM Configuration
|
||||
|
||||
You'll need to determine which pins can be used for SPI -- as an example, STM32 parts generally have multiple SPI peripherals, labeled SPI1, SPI2, SPI3 etc.
|
||||
|
||||
To enable SPI, modify your board's `halconf.h` to enable SPI - both `HAL_USE_SPI` and `SPI_USE_WAIT` should be `TRUE`, and `SPI_SELECT_MODE` should be `SPI_SELECT_MODE_PAD`.
|
||||
Then, modify your board's `mcuconf.h` to enable the SPI peripheral you've chosen -- in the case of using SPI2, modify `STM32_SPI_USE_SPI2` to be `TRUE`.
|
||||
|
||||
As per the AVR configuration, you may select any other standard GPIO as a slave select pin, and can be supplied to `spi_start()`.
|
||||
|
||||
Configuration-wise, you'll need to set up the peripheral as per your MCU's datasheet -- the defaults match the pins for a Proton-C, i.e. STM32F303.
|
||||
|
||||
`config.h` override | Description | Default Value
|
||||
----------------------------|---------------------------------------------------------------|--------------
|
||||
`#define SPI_DRIVER` | SPI peripheral to use - SPI1 => `SPID1`, SPI2 => `SPID2` etc. | `SPID2`
|
||||
`#define SPI_SCK_PIN` | The pin to use for the SCK | `B13`
|
||||
`#define SPI_SCK_PAL_MODE` | The alternate function mode for the SCK pin | `5`
|
||||
`#define SPI_MOSI_PIN` | The pin to use for the MOSI | `B15`
|
||||
`#define SPI_MOSI_PAL_MODE` | The alternate function mode for the MOSI pin | `5`
|
||||
`#define SPI_MISO_PIN` | The pin to use for the MISO | `B14`
|
||||
`#define SPI_MISO_PAL_MODE` | The alternate function mode for the MISO pin | `5`
|
||||
ARM support for this driver is not ready yet. Check back later!
|
||||
|
||||
## Functions
|
||||
|
||||
|
@ -50,7 +50,7 @@ In that model you would emulate the input, and expect a certain output from the
|
||||
|
||||
# Tracing Variables :id=tracing-variables
|
||||
|
||||
Sometimes you might wonder why a variable gets changed and where, and this can be quite tricky to track down without having a debugger. It's of course possible to manually add print statements to track it, but you can also enable the variable trace feature. This works for both variables that are changed by the code, and when the variable is changed by some memory corruption.
|
||||
Sometimes you might wonder why a variable gets changed and where, and this can be quite tricky to track down without having a debugger. It's of course possible to manually add print statements to track it, but you can also enable the variable trace feature. This works for both for variables that are changed by the code, and when the variable is changed by some memory corruption.
|
||||
|
||||
To take the feature into use add `VARIABLE_TRACE=x` to the end of you make command. `x` represents the number of variables you want to trace, which is usually 1.
|
||||
|
||||
|
@ -1,137 +0,0 @@
|
||||
/* Copyright 2020 Nick Brassel (tzarc)
|
||||
*
|
||||
* 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 3 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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "spi_master.h"
|
||||
#include "quantum.h"
|
||||
#include "timer.h"
|
||||
|
||||
static pin_t currentSlavePin = NO_PIN;
|
||||
static SPIConfig spiConfig = {false, NULL, 0, 0, 0, 0};
|
||||
|
||||
__attribute__((weak)) void spi_init(void) {
|
||||
// Try releasing special pins for a short time
|
||||
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_INPUT);
|
||||
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_INPUT);
|
||||
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_INPUT);
|
||||
|
||||
chThdSleepMilliseconds(10);
|
||||
#if defined(USE_GPIOV1)
|
||||
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
|
||||
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
|
||||
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
|
||||
#else
|
||||
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_ALTERNATE(SPI_SCK_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
|
||||
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_ALTERNATE(SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
|
||||
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_ALTERNATE(SPI_MISO_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) {
|
||||
if (currentSlavePin != NO_PIN || slavePin == NO_PIN) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint16_t roundedDivisor = 2;
|
||||
while (roundedDivisor < divisor) {
|
||||
roundedDivisor <<= 1;
|
||||
}
|
||||
|
||||
if (roundedDivisor < 2 || roundedDivisor > 256) {
|
||||
return false;
|
||||
}
|
||||
|
||||
spiConfig.cr1 = 0;
|
||||
|
||||
if (lsbFirst) {
|
||||
spiConfig.cr1 |= SPI_CR1_LSBFIRST;
|
||||
}
|
||||
|
||||
switch (mode) {
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
spiConfig.cr1 |= SPI_CR1_CPHA;
|
||||
break;
|
||||
case 2:
|
||||
spiConfig.cr1 |= SPI_CR1_CPOL;
|
||||
break;
|
||||
case 3:
|
||||
spiConfig.cr1 |= SPI_CR1_CPHA | SPI_CR1_CPOL;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (roundedDivisor) {
|
||||
case 2:
|
||||
break;
|
||||
case 4:
|
||||
spiConfig.cr1 |= SPI_CR1_BR_0;
|
||||
break;
|
||||
case 8:
|
||||
spiConfig.cr1 |= SPI_CR1_BR_1;
|
||||
break;
|
||||
case 16:
|
||||
spiConfig.cr1 |= SPI_CR1_BR_1 | SPI_CR1_BR_0;
|
||||
break;
|
||||
case 32:
|
||||
spiConfig.cr1 |= SPI_CR1_BR_2;
|
||||
break;
|
||||
case 64:
|
||||
spiConfig.cr1 |= SPI_CR1_BR_2 | SPI_CR1_BR_0;
|
||||
break;
|
||||
case 128:
|
||||
spiConfig.cr1 |= SPI_CR1_BR_2 | SPI_CR1_BR_1;
|
||||
break;
|
||||
case 256:
|
||||
spiConfig.cr1 |= SPI_CR1_BR_2 | SPI_CR1_BR_1 | SPI_CR1_BR_0;
|
||||
break;
|
||||
}
|
||||
|
||||
currentSlavePin = slavePin;
|
||||
spiConfig.ssport = PAL_PORT(slavePin);
|
||||
spiConfig.sspad = PAL_PAD(slavePin);
|
||||
|
||||
setPinOutput(slavePin);
|
||||
spiStart(&SPI_DRIVER, &spiConfig);
|
||||
spiSelect(&SPI_DRIVER);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
spi_status_t spi_write(uint8_t data) { return spi_transmit(&data, 1); }
|
||||
|
||||
spi_status_t spi_read(void) {
|
||||
uint8_t data = 0;
|
||||
spi_receive(&data, 1);
|
||||
return data;
|
||||
}
|
||||
|
||||
spi_status_t spi_transmit(const uint8_t *data, uint16_t length) {
|
||||
spiSend(&SPI_DRIVER, length, data);
|
||||
return SPI_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
spi_status_t spi_receive(uint8_t *data, uint16_t length) {
|
||||
spiReceive(&SPI_DRIVER, length, data);
|
||||
return SPI_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
void spi_stop(void) {
|
||||
if (currentSlavePin != NO_PIN) {
|
||||
spiUnselect(&SPI_DRIVER);
|
||||
spiStop(&SPI_DRIVER);
|
||||
currentSlavePin = NO_PIN;
|
||||
}
|
||||
}
|
@ -1,78 +0,0 @@
|
||||
/* Copyright 2020 Nick Brassel (tzarc)
|
||||
*
|
||||
* 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 3 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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ch.h>
|
||||
#include <hal.h>
|
||||
#include <quantum.h>
|
||||
|
||||
#ifndef SPI_DRIVER
|
||||
# define SPI_DRIVER SPID2
|
||||
#endif
|
||||
|
||||
#ifndef SPI_SCK_PIN
|
||||
# define SPI_SCK_PIN B13
|
||||
#endif
|
||||
|
||||
#ifndef SPI_SCK_PAL_MODE
|
||||
# define SPI_SCK_PAL_MODE 5
|
||||
#endif
|
||||
|
||||
#ifndef SPI_MOSI_PIN
|
||||
# define SPI_MOSI_PIN B15
|
||||
#endif
|
||||
|
||||
#ifndef SPI_MOSI_PAL_MODE
|
||||
# define SPI_MOSI_PAL_MODE 5
|
||||
#endif
|
||||
|
||||
#ifndef SPI_MISO_PIN
|
||||
# define SPI_MISO_PIN B14
|
||||
#endif
|
||||
|
||||
#ifndef SPI_MISO_PAL_MODE
|
||||
# define SPI_MISO_PAL_MODE 5
|
||||
#endif
|
||||
|
||||
typedef int16_t spi_status_t;
|
||||
|
||||
#define SPI_STATUS_SUCCESS (0)
|
||||
#define SPI_STATUS_ERROR (-1)
|
||||
#define SPI_STATUS_TIMEOUT (-2)
|
||||
|
||||
#define SPI_TIMEOUT_IMMEDIATE (0)
|
||||
#define SPI_TIMEOUT_INFINITE (0xFFFF)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void spi_init(void);
|
||||
|
||||
bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor);
|
||||
|
||||
spi_status_t spi_write(uint8_t data);
|
||||
|
||||
spi_status_t spi_read(void);
|
||||
|
||||
spi_status_t spi_transmit(const uint8_t *data, uint16_t length);
|
||||
|
||||
spi_status_t spi_receive(uint8_t *data, uint16_t length);
|
||||
|
||||
void spi_stop(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -1,52 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// bootloader (first top leftmost key)
|
||||
#define BOOTMAGIC_LITE_ROW 0
|
||||
#define BOOTMAGIC_LITE_COLUMN 1
|
||||
|
||||
|
||||
// Behaviors That Can Be Configured
|
||||
|
||||
|
||||
#define TAPPING_TERM 250
|
||||
// how long before a tap becomes a hold, if set above 500, a key tapped during the tapping term will turn it into a hold too
|
||||
|
||||
#define PERMISSIVE_HOLD
|
||||
// makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the TAPPING_TERM
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
// makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the TAPPING_TERM for both keys.
|
||||
|
||||
#define TAPPING_FORCE_HOLD
|
||||
// makes it possible to use a dual role key as modifier shortly after having been tapped (see Hold after tap)
|
||||
// Breaks any Tap Toggle functionality (TT or the One Shot Tap Toggle)
|
||||
|
||||
|
||||
/*
|
||||
#define TAPPING_TERM_PER_KEY
|
||||
// enables handling for per key TAPPING_TERM settings
|
||||
#define RETRO_TAPPING
|
||||
// tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release
|
||||
#define TAPPING_TOGGLE 2
|
||||
// how many taps before triggering the toggle
|
||||
#define LEADER_TIMEOUT 300
|
||||
// how long before the leader key times out
|
||||
// If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the LEADER_PER_KEY_TIMING option, which resets the timeout after each key is tapped.
|
||||
#define LEADER_PER_KEY_TIMING
|
||||
// sets the timer for leader key chords to run on each key press rather than overall
|
||||
#define LEADER_KEY_STRICT_KEY_PROCESSING
|
||||
// Disables keycode filtering for Mod-Tap and Layer-Tap keycodes. Eg, if you enable this, you would need to specify MT(MOD_CTL, KC_A) if you want to use KC_A.
|
||||
#define ONESHOT_TIMEOUT 300
|
||||
// how long before oneshot times out
|
||||
#define ONESHOT_TAP_TOGGLE 2
|
||||
// how many taps before oneshot toggle is triggered
|
||||
#define QMK_KEYS_PER_SCAN 4
|
||||
// Allows sending more than one key per scan. By default, only one key event gets sent via process_record() per scan. This has little impact on most typing, but if you're doing a lot of chords, or your scan rate is slow to begin with, you can have some delay in processing key events. Each press and release is a separate event. For a keyboard with 1ms or so scan times, even a very fast typist isn't going to produce the 500 keystrokes a second needed to actually get more than a few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this.
|
||||
#define COMBO_COUNT 2
|
||||
// Set this to the number of combos that you're using in the Combo feature.
|
||||
#define COMBO_TERM 200
|
||||
// how long for the Combo keys to be detected. Defaults to TAPPING_TERM if not defined.
|
||||
#define TAP_CODE_DELAY 100
|
||||
// Sets the delay between register_code and unregister_code, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds.
|
||||
#define TAP_HOLD_CAPS_DELAY 80
|
||||
// Sets the delay for Tap Hold keys (LT, MT) when using KC_CAPSLOCK keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher.
|
||||
*/
|
@ -1,246 +0,0 @@
|
||||
/* Copyright 2019 Stefano Marago'
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* see jj40/stevexyz for more information
|
||||
*/
|
||||
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum layers {
|
||||
LAYER_HOME, // home base layer
|
||||
LAYER_FUNC, // function keys and cursors
|
||||
LAYER_NUMSYM, // numbers and other characters
|
||||
LAYER_SYST, // media, mouse and other system keys
|
||||
LAYER_ARROWPAD,
|
||||
LAYER_NUMPAD,
|
||||
LAYER_MEDIAPAD,
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
CK_TRIPLEZERO = SAFE_RANGE,
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/*
|
||||
* LEGEND:
|
||||
*
|
||||
* ,--------------------------------.
|
||||
* | Top row: shifted character |
|
||||
* | Central row: standard char |
|
||||
* | Bottom row: hold modifier |
|
||||
* `--------------------------------'
|
||||
*
|
||||
* "____" means free to be assigned
|
||||
*
|
||||
*/
|
||||
|
||||
/* Qwerty Home Layer
|
||||
* ,---------------------------------------------------------------------.
|
||||
* | | | | | | | | | | |
|
||||
* | Q | W | E | R | T | Y | U | I | O | P |
|
||||
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |
|
||||
* |------+------+------+------+-------------+------+------+------+------|
|
||||
* | | | | | | | | | | |
|
||||
* | A | S | D | F | G | H | J | K | L | Enter|
|
||||
* | Shift| FnNav|NumSym| AltGr| OSkey| OSkey| AltGr| FnNav|NumSym| Shift|
|
||||
* '------+------+------+------+------+------|------+------+------+------'
|
||||
* | | | | | | | | |
|
||||
* | Z | X | C | V | B | N | M | Space|
|
||||
* | Ctrl | Alt | FnNav|NumSym| Shift| Alt | Ctrl | Shift|
|
||||
* '-------------------------------------------------------'
|
||||
*/
|
||||
[LAYER_HOME] = LAYOUT_ortho_3x10(
|
||||
LT(LAYER_ARROWPAD, KC_Q), LT(LAYER_NUMPAD, KC_W), LT(LAYER_MEDIAPAD, KC_E), KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||
MT(MOD_LSFT, KC_A), LT(LAYER_FUNC, KC_S), LT(LAYER_NUMSYM, KC_D), MT(MOD_RALT, KC_F), MT(MOD_LGUI, KC_G), MT(MOD_RGUI, KC_H), MT(MOD_RALT, KC_J), LT(LAYER_FUNC, KC_K), LT(LAYER_NUMSYM, KC_L), MT(MOD_RSFT, KC_ENT),
|
||||
XXXXXXX, MT(MOD_LCTL, KC_Z), MT(MOD_LALT, KC_X), LT(LAYER_FUNC, KC_C), LT(LAYER_NUMSYM, KC_V), MT(MOD_LSFT, KC_B), MT(MOD_LALT, KC_N), MT(MOD_RCTL, KC_M), MT(MOD_RSFT, KC_SPC), XXXXXXX ),
|
||||
|
||||
/* Function and Navigation Layer
|
||||
* ,---------------------------------------------------------------------.
|
||||
* | | | | | | | | | | |
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 |
|
||||
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |
|
||||
* |------+------+------+------+-------------+------+------+------+------|
|
||||
* | | | | | | | | | | |
|
||||
* | ESC | Home | PgDn | PgUp | End | Left | Down | Up | Right| Baksp|
|
||||
* | Shift| ____ |SysLay| AltGr| OSkey| OSkey| AltGr| ____ |SysLay| Shift|
|
||||
* '------+------+------+------+------+------|------+------+------+------'
|
||||
* | | | | | | | | |
|
||||
* | ____ | ____ | | ____ | ____ | ____ | ____ | ____ |
|
||||
* | Ctrl | Alt | ____ |SysLay| Shift| Alt | Ctrl | Shift|
|
||||
* '-------------------------------------------------------'
|
||||
*/
|
||||
[LAYER_FUNC] = LAYOUT_ortho_3x10(
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
|
||||
MT(MOD_LSFT, KC_ESC), KC_HOME, LT(LAYER_SYST, KC_PGDN), MT(MOD_RALT, KC_PGUP), MT(MOD_LGUI, KC_END), MT(MOD_RGUI, KC_LEFT), MT(MOD_RALT, KC_DOWN), KC_UP, LT(LAYER_SYST, KC_RGHT), MT(MOD_RSFT, KC_BSPC),
|
||||
XXXXXXX, KC_LCTL, KC_LALT, KC_NO, MO(LAYER_SYST), KC_LSFT, KC_LALT, KC_RCTL, MT(MOD_RSFT, KC_SPC), XXXXXXX ),
|
||||
|
||||
/* Number and Symbols Layer
|
||||
* ,---------------------------------------------------------------------.
|
||||
* | ! | @ | # | $ | % | ^ | & | * | ( | ) |
|
||||
* | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |
|
||||
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |
|
||||
* |------+------+------+------+-------------+------+------+------+------|
|
||||
* | | ~ | _ | + | { | } | | | : | " | |
|
||||
* | TAB | ` | - | = | [ | ] | \ | ; | ' | Del |
|
||||
* | Shift|SysLay| ____ | AltGr| OSkey| OSkey| AltGr|SysLay| ____ | Shift|
|
||||
* ' -----+------+------+------+------+------|------+------+------+------'
|
||||
* | | | | | < | > | ? | |
|
||||
* | ____ | ____ | ____ | | , | . | / | ____ |
|
||||
* | Ctrl | Alt |SysLay| ____ | Shift| Alt | Ctrl | Shift|
|
||||
* '-------------------------------------------------------'
|
||||
*/
|
||||
[LAYER_NUMSYM] = LAYOUT_ortho_3x10(
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
|
||||
MT(MOD_LSFT, KC_TAB), LT(LAYER_SYST, KC_GRV), KC_MINS, MT(MOD_RALT, KC_EQL), MT(MOD_LGUI, KC_LBRC), MT(MOD_RGUI, KC_RBRC), MT(MOD_RALT, KC_BSLS), LT(LAYER_SYST, KC_SCLN), KC_QUOT, MT(MOD_RSFT, KC_DEL),
|
||||
XXXXXXX, KC_LCTL, KC_LALT, MO(LAYER_SYST), KC_NO, MT(MOD_LSFT, KC_COMM), MT(MOD_LALT, KC_DOT), MT(MOD_RCTL, KC_SLSH), MT(MOD_RSFT, KC_SPC), XXXXXXX ),
|
||||
|
||||
/* System Layer
|
||||
* ,---------------------------------------------------------------------.
|
||||
* | | | | | | | | | | |
|
||||
* | F11 | F12 | Play | Next |MsWhlU|MsBtn1|OSMenu|SysReq|MsBtn2|Backsp|
|
||||
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |
|
||||
* |------+------+------+------+-------------+------+------+------+------|
|
||||
* | | | | | | | | | | |
|
||||
* | Caps | Mute | Vol- | Vol+ |MsWhlD|MsLeft|MSDown| MsUp |MsRigh| Ins |
|
||||
* | Shift| ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | Shift|
|
||||
* '------+------+------+------+------+------|------+------+------+------'
|
||||
* | | | | | | | | |
|
||||
* | ____ | ____ | | |PrnScr|ScrLck|Pause | ____ |
|
||||
* | Ctrl | Alt | ____ | ____ | ____ | ____ | ____ | Shift|
|
||||
* '-------------------------------------------------------'
|
||||
* simplified view (for media and mouse there are dedicated layers)
|
||||
* ,---------------------------------------------------------------------.
|
||||
* | | | | | | | | | | |
|
||||
* | F11 | F12 | | | | |OSMenu|SysReq| |Backsp|
|
||||
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |
|
||||
* |------+------+------+------+-------------+------+------+------+------|
|
||||
* | | | | | | | | | | |
|
||||
* | Caps | | | | | | | | | Ins |
|
||||
* | Shift| ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | Shift|
|
||||
* '------+------+------+------+------+------|------+------+------+------+
|
||||
* | | | | | | | | |
|
||||
* | | | | |PrnScr|ScrLck|Pause | |
|
||||
* | Ctrl | Alt | ____ | ____ | ____ | ____ | ____ | Shift|
|
||||
* '-------------------------------------------------------'
|
||||
*/
|
||||
[LAYER_SYST] = LAYOUT_ortho_3x10(
|
||||
KC_F11, KC_F12, KC_MPLY, KC_MNXT, KC_MS_WH_UP, KC_MS_BTN1, KC_APP, KC_SYSREQ, KC_MS_BTN2, KC_BSPC,
|
||||
MT(MOD_LSFT, KC_CAPS), KC_MUTE, KC_VOLD, KC_VOLU, KC_MS_WH_DOWN, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, MT(MOD_RSFT, KC_INS),
|
||||
XXXXXXX, KC_LCTL, KC_LALT, KC_NO, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, MT(MOD_RSFT, KC_SPC), XXXXXXX ),
|
||||
|
||||
/* ArrowPad (mod su Q) /------mouse-------\ /-----cursor-------\
|
||||
* ,---------------------------------------------------------------------.
|
||||
* | | | | | | | | | | |
|
||||
* | | | |MsBtn1| MsUp |MsBtn2| Home | Up | PgUp |Backsp|
|
||||
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |
|
||||
* |------+------+------+------+-------------+------+------+------+------|
|
||||
* | | | | | | | | | | |
|
||||
* | | | |MsLeft|MsDown|MsRigh| Left | Down | Right| Enter|
|
||||
* | Shift| ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |
|
||||
* '------+------+------+------+------+------|------+------+------+------'
|
||||
* | | | | | | | | |
|
||||
* | | |MsWhlU|MsDown|MsWhlD| End | Down | PdDn |
|
||||
* | Ctrl | Alt | ____ | ____ | ____ | ____ | ____ | ____ |
|
||||
* '-------------------------------------------------------'
|
||||
*/
|
||||
[LAYER_ARROWPAD] = LAYOUT_ortho_3x10(
|
||||
KC_NO, KC_NO, KC_NO, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_HOME, KC_UP, KC_PGUP, KC_BSPC,
|
||||
KC_LSFT, KC_NO, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_ENT,
|
||||
XXXXXXX, KC_LCTL, KC_LALT, KC_MS_WH_UP, KC_MS_DOWN, KC_MS_WH_DOWN, KC_END, KC_DOWN, KC_PGDN, XXXXXXX ),
|
||||
|
||||
/* NumPad (mod su W)
|
||||
* ,---------------------------------------------------------------------.
|
||||
* | | | | | | | | | | |
|
||||
* | | | / | * | - |Backsp| 7 | 8 | 9 | 0 |
|
||||
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |
|
||||
* |------+------+------+------+-------------+------+------+------+------|
|
||||
* | | | | | | | | | | |
|
||||
* | | | | = | + | . | 4 | 5 | 6 | Enter|
|
||||
* | Shift| ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |
|
||||
* '------+------+------+------+------+------|------+------+------+------'
|
||||
* | | | | | | | | |
|
||||
* | | | | Tab | , | 1 | 2 | 3 |
|
||||
* | Ctrl | Alt | ____ | ____ | ____ | ____ | ____ | ____ |
|
||||
* '-------------------------------------------------------'
|
||||
*/
|
||||
[LAYER_NUMPAD] = LAYOUT_ortho_3x10(
|
||||
KC_NO, KC_NO, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_BSPC, KC_7, KC_8, KC_9, KC_0,
|
||||
KC_LSFT, KC_NO, KC_NO, KC_KP_EQUAL, KC_KP_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ENT,
|
||||
XXXXXXX, KC_LCTL, KC_LALT, KC_NO, KC_TAB, KC_COMM, KC_1, KC_2, KC_3, XXXXXXX ),
|
||||
|
||||
/* MediaPad (mod su E)
|
||||
* ,---------------------------------------------------------------------.
|
||||
* | | | | | | | | | | |
|
||||
* | | | | | | | | Vol+ | | |
|
||||
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |
|
||||
* |------+------+------+------+-------------+------+------+------+------|
|
||||
* | | | | | | | | | | |
|
||||
* | | | | | | | Prev | Play | Next | |
|
||||
* | Shift| ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ |
|
||||
* '------+------+------+------+------+------|------+------+------+------'
|
||||
* | | | | | | | | |
|
||||
* | | | | | | Mute | Vol- | |
|
||||
* | Ctrl | Alt | ____ | ____ | ____ | ____ | ____ | ____ |
|
||||
* '-------------------------------------------------------'
|
||||
*/
|
||||
[LAYER_MEDIAPAD] = LAYOUT_ortho_3x10(
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLU, KC_NO, KC_NO,
|
||||
KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO,
|
||||
XXXXXXX, KC_LCTL, KC_LALT, KC_NO, KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_NO, XXXXXXX ),
|
||||
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
// eeconfig_init(); // reset keyboard to a standard default state; useful when new releases messup with eeprom values
|
||||
// set num lock on at start (for numonly layer to work)
|
||||
if (!host_keyboard_led_state().num_lock) {
|
||||
tap_code(KC_NUMLOCK);
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case CK_TRIPLEZERO:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("000");
|
||||
} // else { when released... }
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
void keyboard_pre_init_user(void) {
|
||||
// Call the keyboard pre init code.
|
||||
|
||||
// Set our LED pins as output
|
||||
setPinOutput(D5);
|
||||
setPinOutput(B0);
|
||||
}
|
||||
|
||||
bool led_update_user(led_t led_state) {
|
||||
writePin(D5, !led_state.num_lock);
|
||||
writePin(B0, !led_state.caps_lock);
|
||||
return false; // prevent keyboard from processing state
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
# gherkin super micro edition
|
||||
|
||||
With this configuration the "28" layout first experimented on the plank-like jj40 is being ported to a more proper board, leaving just two keys not used.
|
||||
|
||||
For more information please have a look at https://github.com/stevexyz/qmk_firmware/blob/master/keyboards/jj40/keymaps/stevexyz/readme.md
|
||||
|
||||
The image below explain the main layers. In addition to them with q, w and e there are three specific dedicated layers for cursors/mouse, numpad and media.
|
||||

|
||||
|
||||

|
||||
|
||||
Happy hacking!
|
||||
_Stefano
|
@ -1,19 +0,0 @@
|
||||
# Build Options (yes/no)
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Just bootloader enabled with keys
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI support
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
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
|
||||
TAP_DANCE_ENABLE = no
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend (it uses the same timer as BACKLIGHT_ENABLE)
|
||||
|
||||
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 = no
|
@ -147,7 +147,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
rgblight_sethsv_at( 0, 0, 0, 0);
|
||||
break;
|
||||
}
|
||||
rgblight_set_effect_range( 1, 5);
|
||||
rgblight_set_effect_range( 1, 4);
|
||||
#endif
|
||||
return state;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x36E1
|
||||
#define PRODUCT_ID 0x3060
|
||||
#define DEVICE_VER 0x0007
|
||||
#define MANUFACTURER Salicylic_Acid
|
||||
#define PRODUCT 7skb
|
||||
@ -52,9 +52,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define RGB_DI_PIN D3
|
||||
|
||||
#ifndef RGBLED_NUM
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLED_NUM 10
|
||||
#define RGBLIGHT_SPLIT
|
||||
#define RGBLED_SPLIT { 6, 6 }
|
||||
#define RGBLED_SPLIT { 5, 5 }
|
||||
#endif
|
||||
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,78 +0,0 @@
|
||||
/*
|
||||
Copyright 2015 Jun Wako <wakojun@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
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xCA04
|
||||
#define PRODUCT_ID 0x0B75
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER CannonKeys
|
||||
#define PRODUCT Obliterated75
|
||||
#define DESCRIPTION Obliterated75 Keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 6
|
||||
#define MATRIX_COLS 16
|
||||
|
||||
#define MATRIX_COL_PINS { A5, B10, A3, A2, B0, A9, C13, B9, B8, B7, B6, B5, B4, B3, A15, A14 }
|
||||
#define MATRIX_ROW_PINS { A13, B12, B11, B14, A8, A1 }
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define BACKLIGHT_PIN A6
|
||||
#define BACKLIGHT_PWM_DRIVER PWMD3
|
||||
#define BACKLIGHT_PWM_CHANNEL 1
|
||||
#define BACKLIGHT_PAL_MODE 1
|
||||
#define BACKLIGHT_LEVELS 6
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BREATHING_PERIOD 6
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGB_DI_PIN B15
|
||||
#define RGBLED_NUM 20
|
||||
#define WS2812_SPI SPID2
|
||||
#define WS2812_SPI_MOSI_PAL_MODE 0
|
||||
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
File diff suppressed because it is too large
Load Diff
@ -1,12 +0,0 @@
|
||||
{
|
||||
"keyboard_name": "Obliterated75",
|
||||
"url": "https://cannonkeys.com",
|
||||
"maintainer": "awkannan",
|
||||
"width": 16,
|
||||
"height": 6.25,
|
||||
"layouts": {
|
||||
"LAYOUT_all": {
|
||||
"layout": [{"x":0, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":15, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"x":13, "y":1.25}, {"x":14, "y":1.25}, {"x":15, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"x":15, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"x":12.75, "y":3.25}, {"label":"Enter", "x":13.75, "y":3.25, "w":1.25}, {"x":15, "y":3.25}, {"x":0, "y":4.25, "w":1.25}, {"x":1.25, "y":4.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"x":14, "y":4.25}, {"x":15, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Ctrl", "x":11.25, "y":5.25, "w":1.25}, {"x":13, "y":5.25}, {"x":14, "y":5.25}, {"x":15, "y":5.25}]
|
||||
}
|
||||
}
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
/*
|
||||
Copyright 2012,2013 Jun Wako <wakojun@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
|
||||
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
enum layer_names {
|
||||
_BASE,
|
||||
_FN1,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_BASE] = LAYOUT_all(
|
||||
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, KC_DEL,
|
||||
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_DEL, KC_INS,
|
||||
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_NUBS, KC_ENT, KC_PGUP,
|
||||
KC_LSFT, KC_NUHS, 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_PGDN,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
[_FN1] = LAYOUT_all(
|
||||
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, KC_DEL,
|
||||
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_DEL, KC_TRNS, RGB_TOG,
|
||||
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD,
|
||||
BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
BL_INC, BL_DEC, BL_TOGG, 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_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS
|
||||
)
|
||||
};
|
@ -1,71 +0,0 @@
|
||||
/*
|
||||
Copyright 2012,2013 Jun Wako <wakojun@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
|
||||
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
enum layer_names {
|
||||
_BASE,
|
||||
_FN1,
|
||||
_FN2,
|
||||
_FN3
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_BASE] = LAYOUT_all(
|
||||
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, KC_DEL,
|
||||
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_DEL, KC_INS,
|
||||
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_NUBS, KC_ENT, KC_PGUP,
|
||||
KC_LSFT, KC_NUHS, 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_PGDN,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
[_FN1] = LAYOUT_all(
|
||||
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, KC_DEL,
|
||||
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_DEL, KC_TRNS, RGB_TOG,
|
||||
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD,
|
||||
BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
BL_INC, BL_DEC, BL_TOGG, 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_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
|
||||
[_FN2] = LAYOUT_all(
|
||||
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
|
||||
),
|
||||
|
||||
[_FN3] = LAYOUT_all(
|
||||
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
|
||||
)
|
||||
|
||||
};
|
@ -1,176 +0,0 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef _MCUCONF_H_
|
||||
#define _MCUCONF_H_
|
||||
|
||||
/*
|
||||
* STM32F0xx drivers configuration.
|
||||
* The following settings override the default settings present in
|
||||
* the various device driver implementation headers.
|
||||
* Note that the settings for each driver only have effect if the whole
|
||||
* driver is enabled in halconf.h.
|
||||
*
|
||||
* IRQ priorities:
|
||||
* 3...0 Lowest...Highest.
|
||||
*
|
||||
* DMA priorities:
|
||||
* 0...3 Lowest...Highest.
|
||||
*/
|
||||
|
||||
#define STM32F0xx_MCUCONF
|
||||
// #define STM32F070xB
|
||||
|
||||
/*
|
||||
* HAL driver system settings.
|
||||
*/
|
||||
#define STM32_NO_INIT FALSE
|
||||
#define STM32_PVD_ENABLE FALSE
|
||||
#define STM32_PLS STM32_PLS_LEV0
|
||||
#define STM32_HSI_ENABLED TRUE
|
||||
#define STM32_HSI14_ENABLED TRUE
|
||||
#define STM32_HSI48_ENABLED FALSE
|
||||
#define STM32_LSI_ENABLED TRUE
|
||||
#define STM32_HSE_ENABLED FALSE
|
||||
#define STM32_LSE_ENABLED FALSE
|
||||
#define STM32_SW STM32_SW_PLL
|
||||
#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2
|
||||
#define STM32_PREDIV_VALUE 1
|
||||
#define STM32_PLLMUL_VALUE 12
|
||||
#define STM32_HPRE STM32_HPRE_DIV1
|
||||
#define STM32_PPRE STM32_PPRE_DIV1
|
||||
#define STM32_ADCSW STM32_ADCSW_HSI14
|
||||
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
||||
#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
|
||||
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
||||
#define STM32_ADCSW STM32_ADCSW_HSI14
|
||||
#define STM32_USBSW STM32_USBSW_HSI48
|
||||
#define STM32_CECSW STM32_CECSW_HSI
|
||||
#define STM32_I2C1SW STM32_I2C1SW_HSI
|
||||
#define STM32_USART1SW STM32_USART1SW_PCLK
|
||||
#define STM32_RTCSEL STM32_RTCSEL_LSI
|
||||
|
||||
/*
|
||||
* ADC driver system settings.
|
||||
*/
|
||||
#define STM32_ADC_USE_ADC1 FALSE
|
||||
#define STM32_ADC_ADC1_DMA_PRIORITY 2
|
||||
#define STM32_ADC_IRQ_PRIORITY 2
|
||||
#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2
|
||||
|
||||
/*
|
||||
* EXT driver system settings.
|
||||
*/
|
||||
#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3
|
||||
#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3
|
||||
#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3
|
||||
#define STM32_EXT_EXTI16_IRQ_PRIORITY 3
|
||||
#define STM32_EXT_EXTI17_IRQ_PRIORITY 3
|
||||
|
||||
/*
|
||||
* GPT driver system settings.
|
||||
*/
|
||||
#define STM32_GPT_USE_TIM1 FALSE
|
||||
#define STM32_GPT_USE_TIM2 FALSE
|
||||
#define STM32_GPT_USE_TIM3 FALSE
|
||||
#define STM32_GPT_USE_TIM14 FALSE
|
||||
#define STM32_GPT_TIM1_IRQ_PRIORITY 2
|
||||
#define STM32_GPT_TIM2_IRQ_PRIORITY 2
|
||||
#define STM32_GPT_TIM3_IRQ_PRIORITY 2
|
||||
#define STM32_GPT_TIM14_IRQ_PRIORITY 2
|
||||
|
||||
/*
|
||||
* I2C driver system settings.
|
||||
*/
|
||||
#define STM32_I2C_USE_I2C1 FALSE
|
||||
#define STM32_I2C_USE_I2C2 FALSE
|
||||
#define STM32_I2C_BUSY_TIMEOUT 50
|
||||
#define STM32_I2C_I2C1_IRQ_PRIORITY 3
|
||||
#define STM32_I2C_I2C2_IRQ_PRIORITY 3
|
||||
#define STM32_I2C_USE_DMA TRUE
|
||||
#define STM32_I2C_I2C1_DMA_PRIORITY 1
|
||||
#define STM32_I2C_I2C2_DMA_PRIORITY 1
|
||||
#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
|
||||
#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
|
||||
#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
|
||||
|
||||
/*
|
||||
* ICU driver system settings.
|
||||
*/
|
||||
#define STM32_ICU_USE_TIM1 FALSE
|
||||
#define STM32_ICU_USE_TIM2 FALSE
|
||||
#define STM32_ICU_USE_TIM3 FALSE
|
||||
#define STM32_ICU_TIM1_IRQ_PRIORITY 3
|
||||
#define STM32_ICU_TIM2_IRQ_PRIORITY 3
|
||||
#define STM32_ICU_TIM3_IRQ_PRIORITY 3
|
||||
|
||||
/*
|
||||
* PWM driver system settings.
|
||||
*/
|
||||
#define STM32_PWM_USE_ADVANCED FALSE
|
||||
#define STM32_PWM_USE_TIM1 FALSE
|
||||
#define STM32_PWM_USE_TIM2 FALSE
|
||||
#define STM32_PWM_USE_TIM3 TRUE
|
||||
#define STM32_PWM_TIM1_IRQ_PRIORITY 3
|
||||
#define STM32_PWM_TIM2_IRQ_PRIORITY 3
|
||||
#define STM32_PWM_TIM3_IRQ_PRIORITY 3
|
||||
|
||||
/*
|
||||
* SERIAL driver system settings.
|
||||
*/
|
||||
#define STM32_SERIAL_USE_USART1 FALSE
|
||||
#define STM32_SERIAL_USE_USART2 FALSE
|
||||
#define STM32_SERIAL_USART1_PRIORITY 3
|
||||
#define STM32_SERIAL_USART2_PRIORITY 3
|
||||
|
||||
/*
|
||||
* SPI driver system settings.
|
||||
*/
|
||||
#define STM32_SPI_USE_SPI1 FALSE
|
||||
#define STM32_SPI_USE_SPI2 TRUE
|
||||
#define STM32_SPI_SPI1_DMA_PRIORITY 1
|
||||
#define STM32_SPI_SPI2_DMA_PRIORITY 1
|
||||
#define STM32_SPI_SPI1_IRQ_PRIORITY 2
|
||||
#define STM32_SPI_SPI2_IRQ_PRIORITY 2
|
||||
#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
|
||||
#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
|
||||
#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
|
||||
|
||||
/*
|
||||
* ST driver system settings.
|
||||
*/
|
||||
#define STM32_ST_IRQ_PRIORITY 2
|
||||
#define STM32_ST_USE_TIMER 2
|
||||
|
||||
/*
|
||||
* UART driver system settings.
|
||||
*/
|
||||
#define STM32_UART_USE_USART1 FALSE
|
||||
#define STM32_UART_USE_USART2 FALSE
|
||||
#define STM32_UART_USART1_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART2_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART1_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART2_DMA_PRIORITY 0
|
||||
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
|
||||
|
||||
/*
|
||||
* USB driver system settings.
|
||||
*/
|
||||
#define STM32_USB_USE_USB1 TRUE
|
||||
#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
|
||||
#define STM32_USB_USB1_LP_IRQ_PRIORITY 3
|
||||
|
||||
#endif /* _MCUCONF_H_ */
|
@ -1 +0,0 @@
|
||||
#include "obliterated75.h"
|
@ -1,19 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT_all( \
|
||||
K000, K001, K002, K003, K004, K006, K007, K008, K009, K010, K011, K012, K013, K015, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \
|
||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \
|
||||
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \
|
||||
K500, K501, K502, K506, K510, K511, K512, K513, K515 \
|
||||
) { \
|
||||
{ K000, K001, K002, K003, K004, KC_NO, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, K015 }, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \
|
||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \
|
||||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \
|
||||
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \
|
||||
{ K500, K501, K502, KC_NO, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, KC_NO, K515 } \
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
# CannonKeys Obliterated75
|
||||
|
||||
* Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan)
|
||||
* Hardware Supported: STM32F072CBT6
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make cannonkeys/obliterated75:default
|
||||
|
||||
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).
|
@ -1,24 +0,0 @@
|
||||
# MCU name
|
||||
MCU = STM32F072
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||
MIDI_ENABLE = no # MIDI support
|
||||
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
|
||||
WS2812_DRIVER = spi
|
||||
|
||||
# Enter lower-power sleep mode when on the ChibiOS idle thread
|
||||
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
|
@ -1,54 +0,0 @@
|
||||
/* Copyright 2020 Christopher Ko <chriskopher@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 "shared_enum.h"
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
enum combo_event {
|
||||
SD_LAYER_COMBO,
|
||||
KL_MEH_COMBO,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM sd_combo[] = {KC_S, KC_D, COMBO_END}; // Combo: S + D for SuperDuper mode
|
||||
const uint16_t PROGMEM kl_combo[] = {KC_K, KC_L, COMBO_END}; // Combo: K + L for Meh modifier
|
||||
|
||||
// Register the combo action
|
||||
combo_t key_combos[COMBO_COUNT] = {
|
||||
[SD_LAYER_COMBO] = COMBO_ACTION(sd_combo),
|
||||
[KL_MEH_COMBO] = COMBO_ACTION(kl_combo),
|
||||
};
|
||||
|
||||
// Called after a combo event is triggered
|
||||
void process_combo_event(uint8_t combo_index, bool pressed) {
|
||||
switch (combo_index) {
|
||||
case SD_LAYER_COMBO:
|
||||
if (pressed) {
|
||||
layer_on(_SUPERDUPER);
|
||||
} else {
|
||||
layer_off(_SUPERDUPER);
|
||||
}
|
||||
break;
|
||||
|
||||
case KL_MEH_COMBO:
|
||||
if (pressed) {
|
||||
register_mods(MOD_MEH);
|
||||
} else {
|
||||
unregister_mods(MOD_MEH);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
/* Copyright 2020 Christopher Ko <chriskopher@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
|
||||
|
||||
#define TAPPING_TERM 200 // Delay for tap modifiers until it is considered a hold
|
||||
|
||||
#define IGNORE_MOD_TAP_INTERRUPT // Enable ignore mod tap interrupt: https://docs.qmk.fm/#/tap_hold?id=ignore-mod-tap-interrupt
|
||||
#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY // Allows configuration of ignore mod tap interrupt per key in keymap.c
|
||||
|
||||
#define COMBO_COUNT 2 // Number of defined combos
|
||||
#define COMBO_TERM 20 // Delay for combo keys to be chained together
|
@ -1,186 +0,0 @@
|
||||
/* Copyright 2020 Christopher Ko <chriskopher@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 "shared_enum.h"
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Modified Qwerty for chriskopher: base default layer
|
||||
* ,---. ,---------------. ,---------------. ,---------------. ,-----------.
|
||||
* |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
|
||||
* `---' `---------------' `---------------' `---------------' `-----------'
|
||||
* ,-----------------------------------------------------------. ,-----------. ,---------------.
|
||||
* | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ | |Ins|Hom|PgU| |NmL| /| *| -|
|
||||
* |-----------------------------------------------------------| |-----------| |---------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| Bsp| |Del|End|PgD| | 7| 8| 9| |
|
||||
* |-----------------------------------------------------------| `-----------' |-----------| |
|
||||
* |Ctl/Esc| A| S| D| F| G| H| J| K| L|;/:| ' | Return| | 4| 5| 6| +|
|
||||
* |-----------------------------------------------------------| ,---. |---------------|
|
||||
* |Shift/( |Dev/Z| X| C| V| B| N| M| ,| .| /| Shift/)| | ↑ | | 1| 2| 3| |
|
||||
* |-----------------------------------------------------------| ,-----------. |-----------| |
|
||||
* |Meh/CapsL|Gui|Alt| Space |Alt|Adjust/Gui|App| Ctl| | ← | ↓ | → | | 0| .|Ent|
|
||||
* `-----------------------------------------------------------' `-----------' `---------------'
|
||||
*/
|
||||
[_CKO] = LAYOUT_ansi(
|
||||
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, 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_BSLS, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9,
|
||||
LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, TD(SCLN_CLN), KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||
TD(ESPC_L), LT(_DEV,KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TD(ESPC_R), KC_UP, KC_P1, KC_P2, KC_P3,
|
||||
MEH_T(KC_CAPS), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LT(_ADJUST,KC_RGUI), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT
|
||||
),
|
||||
|
||||
/* Regular Qwerty: default layer
|
||||
* ,---. ,---------------. ,---------------. ,---------------. ,-----------.
|
||||
* |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
|
||||
* `---' `---------------' `---------------' `---------------' `-----------'
|
||||
* ,-----------------------------------------------------------. ,-----------. ,---------------.
|
||||
* | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Bsp| |Ins|Hom|PgU| |NmL| /| *| -|
|
||||
* |-----------------------------------------------------------| |-----------| |---------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| |
|
||||
* |-----------------------------------------------------------| `-----------' |-----------| |
|
||||
* |CapsL | A| S| D| F| G| H| J| K| L| ;| '| Return| | 4| 5| 6| +|
|
||||
* |-----------------------------------------------------------| ,---. |---------------|
|
||||
* |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | | ↑ | | 1| 2| 3| |
|
||||
* |-----------------------------------------------------------| ,-----------. |-----------| |
|
||||
* |Ctl|Gui|Alt| Space |Alt|Adjust/Gui|App|Ctl| | ← | ↓ | → | | 0| .|Ent|
|
||||
* `-----------------------------------------------------------' `-----------' `---------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_ansi(
|
||||
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, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
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_P7, KC_P8, KC_P9,
|
||||
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_P4, KC_P5, KC_P6, KC_PPLS,
|
||||
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_P1, KC_P2, KC_P3,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LT(_ADJUST,KC_RGUI), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT
|
||||
),
|
||||
|
||||
/* SuperDuper
|
||||
* ,---. ,---------------. ,---------------. ,---------------. ,-----------.
|
||||
* | | | | | | | | | | | | | | | | | | | | |
|
||||
* `---' `---------------' `---------------' `---------------' `-----------'
|
||||
* ,-----------------------------------------------------------. ,-----------. ,---------------.
|
||||
* | | | | | | | | | | | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------| |-----------| |---------------|
|
||||
* | | | | | | | |1T |T← |T→ |9T | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------| `-----------' |-----------| |
|
||||
* | |Alt|[SuperDuper]|Bksp|Ctl| ← | ↓ | ↑ | → |Del| | | | | | | |
|
||||
* |-----------------------------------------------------------| ,---. |---------------|
|
||||
* | | | | | | | | | | |ToggleSD| | | | | | | | |
|
||||
* |-----------------------------------------------------------| ,-----------. |-----------| |
|
||||
* | | | | Shift | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------' `-----------' `---------------'
|
||||
*/
|
||||
[_SUPERDUPER] = LAYOUT_ansi(
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, C(KC_1), C(S(KC_TAB)), C(KC_TAB), C(KC_9), ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
______, KC_LALT, ______, ______, KC_BSPC, KC_LCTL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_DEL, ______, ______, ______, ______, ______, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, TG(_SUPERDUPER), ______, ______, ______, ______, ______,
|
||||
______, ______, ______, KC_LSFT, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______
|
||||
),
|
||||
|
||||
/* Dev
|
||||
* ,---. ,---------------. ,---------------. ,---------------. ,-----------.
|
||||
* | | | | | | | | | | | | | | | | | | | | |
|
||||
* `---' `---------------' `---------------' `---------------' `-----------'
|
||||
* ,-----------------------------------------------------------. ,-----------. ,---------------.
|
||||
* | | | | | | | | | | | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------| |-----------| |---------------|
|
||||
* | | | | | | | | - | + | ( | ) | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------| `-----------' |-----------| |
|
||||
* | | | | | | | _ | [ | ] | { | } | | | | | | | |
|
||||
* |-----------------------------------------------------------| ,---. |---------------|
|
||||
* | | | | | | | = | | | < | > | ? | | | | | | | | |
|
||||
* |-----------------------------------------------------------| ,-----------. |-----------| |
|
||||
* | | | | | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------' `-----------' `---------------'
|
||||
*/
|
||||
[_DEV] = LAYOUT_ansi(
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, KC_MINS, S(KC_EQL), S(KC_9), S(KC_0), ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
______, ______, ______, ______, ______, ______, S(KC_MINS), KC_LBRC, KC_RBRC, S(KC_LBRC), S(KC_RBRC), ______, ______, ______, ______, ______, ______,
|
||||
______, ______, ______, ______, ______, ______, KC_EQL, S(KC_BSLASH), S(KC_COMM), S(KC_DOT), S(KC_SLSH), ______, ______, ______, ______, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______
|
||||
),
|
||||
|
||||
/* Adjust
|
||||
* ,---. ,---------------. ,---------------. ,---------------. ,-----------.
|
||||
* | | | | | | | | | | | | | | | | | | | | |
|
||||
* `---' `---------------' `---------------' `---------------' `-----------'
|
||||
* ,-----------------------------------------------------------. ,--------------. ,---------------.
|
||||
* | | | | | | | | | | | | | | | |Play|Next|VolU| | | | | |
|
||||
* |-----------------------------------------------------------| |--------------| |---------------|
|
||||
* | |QWERTY| | | | | | | | | | | | | |Stop|Prev|VolD| | | | | |
|
||||
* |-----------------------------------------------------------| `--------------' |-----------| |
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------| ,---. |---------------|
|
||||
* | | | |CKO| | | |Play|Mute|VolD|VolU| SD| | | | | | | | |
|
||||
* |-----------------------------------------------------------| ,-----------. |-----------| |
|
||||
* | | | | | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------' `-----------' `---------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_ansi(
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MPLY, KC_MNXT, KC_VOLU, ______, ______, ______, ______,
|
||||
______, DF(_QWERTY), ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MSTP, KC_MPRV, KC_VOLD, ______, ______, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
______, ______, ______, DF(_CKO), ______, ______, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, TG(_SUPERDUPER), ______, ______, ______, ______, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______
|
||||
)
|
||||
|
||||
/* Empty layout for future reference
|
||||
* ,---. ,---------------. ,---------------. ,---------------. ,-----------.
|
||||
* | | | | | | | | | | | | | | | | | | | | |
|
||||
* `---' `---------------' `---------------' `---------------' `-----------'
|
||||
* ,-----------------------------------------------------------. ,-----------. ,---------------.
|
||||
* | | | | | | | | | | | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------| |-----------| |---------------|
|
||||
* | | | | | | | | | | | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------| `-----------' |-----------| |
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------| ,---. |---------------|
|
||||
* | | | | | | | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------| ,-----------. |-----------| |
|
||||
* | | | | | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------' `-----------' `---------------'
|
||||
*/
|
||||
/*
|
||||
* [_EMPTY] = LAYOUT_ansi(
|
||||
* ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
* ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
* ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
* ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
* ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
* ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______
|
||||
* ),
|
||||
*/
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
// Configure ignore mod tap interrupt per key
|
||||
bool get_ignore_mod_tap_interrupt(uint16_t keycode) {
|
||||
switch (keycode) {
|
||||
// I don't like how mod tap interrupt feels with these keys specifically when I'm typing
|
||||
case LCTL_T(KC_ESC):
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user