commit
575d8c19fc
@ -1 +0,0 @@ |
|||||||
theme: jekyll-theme-cayman |
|
@ -0,0 +1,20 @@ |
|||||||
|
// Copyright %YEAR% %REAL_NAME% (@%USER_NAME%)
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#pragma once |
||||||
|
|
||||||
|
/*
|
||||||
|
* 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
|
@ -0,0 +1,489 @@ |
|||||||
|
# QMK Breaking Changes - 2022 February 26 Changelog |
||||||
|
|
||||||
|
## Notable Features :id=notable-features |
||||||
|
|
||||||
|
### Default USB Polling rate now 1kHz ([#15352](https://github.com/qmk/qmk_firmware/pull/15352)) |
||||||
|
|
||||||
|
The default USB Polling rate has been aligned across supported platforms to now be 1ms/1kHz. |
||||||
|
|
||||||
|
Something something *Lets go gamers!* |
||||||
|
|
||||||
|
### Split support for pointing devices ([#15304](https://github.com/qmk/qmk_firmware/pull/15304)) |
||||||
|
|
||||||
|
Pointing devices can now be shared across a split keyboard with support for a single pointing device or a pointing device on each side. |
||||||
|
|
||||||
|
See the [Pointing Device](feature_pointing_device.md) documentation for further configuration options. |
||||||
|
|
||||||
|
## Changes Requiring User Action :id=changes-requiring-user-action |
||||||
|
|
||||||
|
### Legacy macro and action_function system removed ([#16025](https://github.com/qmk/qmk_firmware/pull/16025)) |
||||||
|
|
||||||
|
The long time deprecated `MACRO()` and `action_get_macro` methods have been removed. Where possible, existing usages have been migrated over to core [Macros](feature_macros.md). |
||||||
|
|
||||||
|
### Create a build error if no bootloader is specified ([#16181](https://github.com/qmk/qmk_firmware/pull/16181)) |
||||||
|
|
||||||
|
Bootloader configuration is no longer assumed. Keyboards must now set either: |
||||||
|
|
||||||
|
* `BOOTLOADER` within `rules.mk` |
||||||
|
* `bootloader` within `info.json` |
||||||
|
|
||||||
|
### Rename `AdafruitBLE` to `BluefruitLE` ([#16127](https://github.com/qmk/qmk_firmware/pull/16127)) |
||||||
|
|
||||||
|
In preparation of future bluetooth work, the `AdafruitBLE` integration has been renamed to allow potential for any other Adafruit BLE products. |
||||||
|
|
||||||
|
### Updated Keyboard Codebases :id=updated-keyboard-codebases |
||||||
|
|
||||||
|
The following keyboards have had their source moved within QMK: |
||||||
|
|
||||||
|
| Old Keyboard Name | New Keyboard Name | |
||||||
|
|----------------------------|------------------------------------| |
||||||
|
| 6ball | maple_computing/6ball | |
||||||
|
| 7skb | salicylic_acid3/7skb | |
||||||
|
| 7splus | salicylic_acid3/7splus | |
||||||
|
| acr60 | mechkeys/acr60 | |
||||||
|
| adalyn | tominabox1/adalyn | |
||||||
|
| ajisai74 | salicylic_acid3/ajisai74 | |
||||||
|
| aleth42 | 25keys/aleth42 | |
||||||
|
| alicia_cook | ibnuda/alicia_cook | |
||||||
|
| allison_numpad | prototypist/allison_numpad | |
||||||
|
| allison | prototypist/allison | |
||||||
|
| alu84 | mechkeys/alu84 | |
||||||
|
| angel17 | kakunpc/angel17 | |
||||||
|
| angel64/alpha | kakunpc/angel64/alpha | |
||||||
|
| angel64/rev1 | kakunpc/angel64/rev1 | |
||||||
|
| arch_36 | obosob/arch_36 | |
||||||
|
| bakeneko60 | kkatano/bakeneko60 | |
||||||
|
| bakeneko65/rev2 | kkatano/bakeneko65/rev2 | |
||||||
|
| bakeneko65/rev3 | kkatano/bakeneko65/rev3 | |
||||||
|
| bakeneko80 | kkatano/bakeneko80 | |
||||||
|
| barleycorn | yiancardesigns/barleycorn | |
||||||
|
| bat43/rev1 | dailycraft/bat43/rev1 | |
||||||
|
| bat43/rev2 | dailycraft/bat43/rev2 | |
||||||
|
| bigseries/1key | woodkeys/bigseries/1key | |
||||||
|
| bigseries/2key | woodkeys/bigseries/2key | |
||||||
|
| bigseries/3key | woodkeys/bigseries/3key | |
||||||
|
| bigseries/4key | woodkeys/bigseries/4key | |
||||||
|
| bkf | drhigsby/bkf | |
||||||
|
| business_card/alpha | kakunpc/business_card/alpha | |
||||||
|
| business_card/beta | kakunpc/business_card/beta | |
||||||
|
| butterstick | gboards/butterstick | |
||||||
|
| c39 | maple_computing/c39 | |
||||||
|
| cassette42 | 25keys/cassette42 | |
||||||
|
| chidori | kagizaraya/chidori | |
||||||
|
| chili | ydkb/chili | |
||||||
|
| chimera_ergo | glenpickle/chimera_ergo | |
||||||
|
| chimera_ls | glenpickle/chimera_ls | |
||||||
|
| chimera_ortho | glenpickle/chimera_ortho | |
||||||
|
| chimera_ortho_plus | glenpickle/chimera_ortho_plus | |
||||||
|
| choco60 | recompile_keys/choco60 | |
||||||
|
| choc_taro | kakunpc/choc_taro | |
||||||
|
| christmas_tree | maple_computing/christmas_tree | |
||||||
|
| claw44/rev1 | dailycraft/claw44/rev1 | |
||||||
|
| cocoa40 | recompile_keys/cocoa40 | |
||||||
|
| comet46 | satt/comet46 | |
||||||
|
| cu24 | capsunlocked/cu24 | |
||||||
|
| cu75 | capsunlocked/cu75 | |
||||||
|
| cu80 | capsunlocked/cu80/v1 | |
||||||
|
| delilah | rainkeebs/delilah | |
||||||
|
| diverge3 | unikeyboard/diverge3 | |
||||||
|
| divergetm2 | unikeyboard/divergetm2 | |
||||||
|
| dozen0 | yynmt/dozen0 | |
||||||
|
| dubba175 | drhigsby/dubba175 | |
||||||
|
| eggman | qpockets/eggman | |
||||||
|
| ergo42 | biacco42/ergo42 | |
||||||
|
| ergoarrows | salicylic_acid3/ergoarrows | |
||||||
|
| ergodash/mini | omkbd/ergodash/mini | |
||||||
|
| ergodash/rev1 | omkbd/ergodash/rev1 | |
||||||
|
| ergodox_infinity | input_club/ergodox_infinity | |
||||||
|
| ergotaco | gboards/ergotaco | |
||||||
|
| espectro | mechkeys/espectro | |
||||||
|
| felix | unikeyboard/felix | |
||||||
|
| four_banger | bpiphany/four_banger | |
||||||
|
| freyr | hnahkb/freyr | |
||||||
|
| geminate60 | weirdo/geminate60 | |
||||||
|
| georgi | gboards/georgi | |
||||||
|
| gergo | gboards/gergo | |
||||||
|
| getta25 | salicylic_acid3/getta25 | |
||||||
|
| gingham | yiancardesigns/gingham | |
||||||
|
| gurindam | ibnuda/gurindam | |
||||||
|
| halberd | kagizaraya/halberd | |
||||||
|
| hecomi/alpha | takashiski/hecomi/alpha | |
||||||
|
| hid_liber | bpiphany/hid_liber | |
||||||
|
| id67/default_rgb | idobao/id67/default_rgb | |
||||||
|
| id67/rgb | idobao/id67/rgb | |
||||||
|
| id80 | idobao/id80/v1 | |
||||||
|
| id87 | idobao/id87/v1 | |
||||||
|
| idobo | idobao/id75/v1 | |
||||||
|
| infinity60 | input_club/infinity60 | |
||||||
|
| ivy/rev1 | maple_computing/ivy/rev1 | |
||||||
|
| jisplit89 | salicylic_acid3/jisplit89 | |
||||||
|
| jnao | maple_computing/jnao | |
||||||
|
| just60 | ydkb/just60 | |
||||||
|
| kagamidget | yynmt/kagamidget | |
||||||
|
| kelowna/rgb64 | weirdo/kelowna/rgb64 | |
||||||
|
| kprepublic/bm65hsrgb_iso | kprepublic/bm65hsrgb_iso/rev1 | |
||||||
|
| kprepublic/bm68hsrgb | kprepublic/bm68hsrgb/rev1 | |
||||||
|
| k_type | input_club/k_type | |
||||||
|
| latin17rgb | latincompass/latin17rgb | |
||||||
|
| latin47ble | latincompass/latin47ble | |
||||||
|
| latin60rgb | latincompass/latin60rgb | |
||||||
|
| latin64ble | latincompass/latin64ble | |
||||||
|
| latin6rgb | latincompass/latin6rgb | |
||||||
|
| latinpadble | latincompass/latinpadble | |
||||||
|
| latinpad | latincompass/latinpad | |
||||||
|
| launchpad/rev1 | maple_computing/launchpad/rev1 | |
||||||
|
| lck75 | lyso1/lck75 | |
||||||
|
| le_chiffre | tominabox1/le_chiffre | |
||||||
|
| lefishe | lyso1/lefishe | |
||||||
|
| lets_split_eh/eh | maple_computing/lets_split_eh/eh | |
||||||
|
| ls_60 | weirdo/ls_60 | |
||||||
|
| m3n3van | matthewdias/m3n3van | |
||||||
|
| mechmini/v1 | mechkeys/mechmini/v1 | |
||||||
|
| mechmini/v2 | mechkeys/mechmini/v2 | |
||||||
|
| meira | woodkeys/meira | |
||||||
|
| meishi2 | biacco42/meishi2 | |
||||||
|
| meishi | biacco42/meishi | |
||||||
|
| minidox/rev1 | maple_computing/minidox/rev1 | |
||||||
|
| minim | matthewdias/minim | |
||||||
|
| mio | recompile_keys/mio | |
||||||
|
| model_v | matthewdias/model_v | |
||||||
|
| montex | idobao/montex/v1 | |
||||||
|
| nafuda | salicylic_acid3/nafuda | |
||||||
|
| naiping/np64 | weirdo/naiping/np64 | |
||||||
|
| naiping/nphhkb | weirdo/naiping/nphhkb | |
||||||
|
| naiping/npminila | weirdo/naiping/npminila | |
||||||
|
| naked48 | salicylic_acid3/naked48 | |
||||||
|
| naked60 | salicylic_acid3/naked60 | |
||||||
|
| naked64 | salicylic_acid3/naked64 | |
||||||
|
| namecard2x4 | takashiski/namecard2x4 | |
||||||
|
| nebula12 | spaceholdings/nebula12 | |
||||||
|
| nebula68b | spaceholdings/nebula68b | |
||||||
|
| nebula68 | spaceholdings/nebula68 | |
||||||
|
| niu_mini | kbdfans/niu_mini | |
||||||
|
| nk1 | novelkeys/nk1 | |
||||||
|
| nk65 | novelkeys/nk65 | |
||||||
|
| nk87 | novelkeys/nk87 | |
||||||
|
| nknl7en | salicylic_acid3/nknl7en | |
||||||
|
| nknl7jp | salicylic_acid3/nknl7jp | |
||||||
|
| nomu30 | recompile_keys/nomu30 | |
||||||
|
| novelpad | novelkeys/novelpad | |
||||||
|
| ogurec | drhigsby/ogurec | |
||||||
|
| otaku_split/rev0 | takashiski/otaku_split/rev0 | |
||||||
|
| otaku_split/rev1 | takashiski/otaku_split/rev1 | |
||||||
|
| owl8 | dailycraft/owl8 | |
||||||
|
| packrat | drhigsby/packrat | |
||||||
|
| pistachio_mp | rate/pistachio_mp | |
||||||
|
| pistachio_pro | rate/pistachio_pro | |
||||||
|
| pistachio | rate/pistachio | |
||||||
|
| plexus75 | checkerboards/plexus75 | |
||||||
|
| pursuit40 | checkerboards/pursuit40 | |
||||||
|
| qaz | tominabox1/qaz | |
||||||
|
| quark | checkerboards/quark | |
||||||
|
| rabbit_capture_plan | kakunpc/rabbit_capture_plan | |
||||||
|
| rainkeeb | rainkeebs/rainkeeb | |
||||||
|
| reviung33 | reviung/reviung33 | |
||||||
|
| reviung34 | reviung/reviung34 | |
||||||
|
| reviung39 | reviung/reviung39 | |
||||||
|
| reviung41 | reviung/reviung41 | |
||||||
|
| reviung53 | reviung/reviung53 | |
||||||
|
| reviung5 | reviung/reviung5 | |
||||||
|
| reviung61 | reviung/reviung61 | |
||||||
|
| runner3680/3x6 | omkbd/runner3680/3x6 | |
||||||
|
| runner3680/3x7 | omkbd/runner3680/3x7 | |
||||||
|
| runner3680/3x8 | omkbd/runner3680/3x8 | |
||||||
|
| runner3680/4x6 | omkbd/runner3680/4x6 | |
||||||
|
| runner3680/4x7 | omkbd/runner3680/4x7 | |
||||||
|
| runner3680/4x8 | omkbd/runner3680/4x8 | |
||||||
|
| runner3680/5x6_5x8 | omkbd/runner3680/5x6_5x8 | |
||||||
|
| runner3680/5x6 | omkbd/runner3680/5x6 | |
||||||
|
| runner3680/5x7 | omkbd/runner3680/5x7 | |
||||||
|
| runner3680/5x8 | omkbd/runner3680/5x8 | |
||||||
|
| scarletbandana | woodkeys/scarletbandana | |
||||||
|
| scythe | kagizaraya/scythe | |
||||||
|
| seigaiha | yiancardesigns/seigaiha | |
||||||
|
| setta21 | salicylic_acid3/setta21 | |
||||||
|
| space_space/rev1 | qpockets/space_space/rev1 | |
||||||
|
| space_space/rev2 | qpockets/space_space/rev2 | |
||||||
|
| spiderisland/winry25tc | winry/winry25tc | |
||||||
|
| splitreus62 | nacly/splitreus62 | |
||||||
|
| squiggle/rev1 | ibnuda/squiggle/rev1 | |
||||||
|
| standaside | edi/standaside | |
||||||
|
| steal_this_keyboard | obosob/steal_this_keyboard | |
||||||
|
| stella | hnahkb/stella | |
||||||
|
| suihankey/alpha | kakunpc/suihankey/alpha | |
||||||
|
| suihankey/rev1 | kakunpc/suihankey/rev1 | |
||||||
|
| suihankey/split | kakunpc/suihankey/split | |
||||||
|
| thedogkeyboard | kakunpc/thedogkeyboard | |
||||||
|
| the_ruler | maple_computing/the_ruler | |
||||||
|
| tiger910 | weirdo/tiger910 | |
||||||
|
| treadstone32 | marksard/treadstone32 | |
||||||
|
| treadstone48/rev1 | marksard/treadstone48/rev1 | |
||||||
|
| treadstone48/rev2 | marksard/treadstone48/rev2 | |
||||||
|
| txuu | matthewdias/txuu | |
||||||
|
| ua62 | nacly/ua62 | |
||||||
|
| underscore33/rev1 | tominabox1/underscore33/rev1 | |
||||||
|
| underscore33/rev2 | tominabox1/underscore33/rev2 | |
||||||
|
| vn66 | hnahkb/vn66 | |
||||||
|
| wallaby | kkatano/wallaby | |
||||||
|
| wanten | qpockets/wanten | |
||||||
|
| whitefox | input_club/whitefox | |
||||||
|
| wings42/rev1 | dailycraft/wings42/rev1 | |
||||||
|
| wings42/rev1_extkeys | dailycraft/wings42/rev1_extkeys | |
||||||
|
| wings42/rev2 | dailycraft/wings42/rev2 | |
||||||
|
| yasui | rainkeebs/yasui | |
||||||
|
| yd60mq | ymdk/yd60mq | |
||||||
|
| yd68 | ydkb/yd68 | |
||||||
|
| ymd75 | ymdk/ymd75 | |
||||||
|
| ymd96 | ymdk/ymd96 | |
||||||
|
| ymdk_np21 | ymdk/np21 | |
||||||
|
| yurei | kkatano/yurei | |
||||||
|
| zinc | 25keys/zinc | |
||||||
|
| zinc/rev1 | 25keys/zinc/rev1 | |
||||||
|
| zinc/reva | 25keys/zinc/reva | |
||||||
|
|
||||||
|
## Notable core changes :id=notable-core |
||||||
|
|
||||||
|
### New MCU Support :id=new-mcu-support |
||||||
|
|
||||||
|
Building on previous cycles, QMK firmware picked up support for a couple extra MCU variants: |
||||||
|
|
||||||
|
* STM32L432 |
||||||
|
* STM32L442 |
||||||
|
|
||||||
|
### New Drivers |
||||||
|
|
||||||
|
QMK now has core-supplied support for the following device peripherals: |
||||||
|
|
||||||
|
#### LED |
||||||
|
|
||||||
|
* IS31FL3742A |
||||||
|
* IS31FL3743A |
||||||
|
* IS31FL3745 |
||||||
|
* IS31FL3746A |
||||||
|
|
||||||
|
#### GPIO |
||||||
|
|
||||||
|
* SN74x138 |
||||||
|
* mcp23018 |
||||||
|
|
||||||
|
--- |
||||||
|
|
||||||
|
## Full changelist |
||||||
|
|
||||||
|
Core: |
||||||
|
* Initial pass at data driven new-keyboard subcommand ([#12795](https://github.com/qmk/qmk_firmware/pull/12795)) |
||||||
|
* Don't send keyboard reports that propagate no changes to the host ([#14065](https://github.com/qmk/qmk_firmware/pull/14065)) |
||||||
|
* Custom matrix lite support for split keyboards ([#14674](https://github.com/qmk/qmk_firmware/pull/14674)) |
||||||
|
* Add sym_defer_pr debouncer type ([#14948](https://github.com/qmk/qmk_firmware/pull/14948)) |
||||||
|
* Add RGB matrix & LED Matrix support for IS31FL3742A, IS31FL3743A, IS31FL3745, IS31FL3746A ([#14989](https://github.com/qmk/qmk_firmware/pull/14989)) |
||||||
|
* New combo configuration options ([#15083](https://github.com/qmk/qmk_firmware/pull/15083)) |
||||||
|
* IS31FL3733 driver for LED Matrix ([#15088](https://github.com/qmk/qmk_firmware/pull/15088)) |
||||||
|
* Add open-drain GPIO support. ([#15282](https://github.com/qmk/qmk_firmware/pull/15282)) |
||||||
|
* Make (un)register code functions weak ([#15285](https://github.com/qmk/qmk_firmware/pull/15285)) |
||||||
|
* Split support for pointing devices. ([#15304](https://github.com/qmk/qmk_firmware/pull/15304)) |
||||||
|
* Added cancel_key_lock function ([#15321](https://github.com/qmk/qmk_firmware/pull/15321)) |
||||||
|
* Remove matrix_is_modified() and debounce_is_active() ([#15349](https://github.com/qmk/qmk_firmware/pull/15349)) |
||||||
|
* Change default USB Polling rate to 1kHz ([#15352](https://github.com/qmk/qmk_firmware/pull/15352)) |
||||||
|
* Implement MAGIC_TOGGLE_CONTROL_CAPSLOCK ([#15368](https://github.com/qmk/qmk_firmware/pull/15368)) |
||||||
|
* Tidy up existing i2c_master implementations ([#15376](https://github.com/qmk/qmk_firmware/pull/15376)) |
||||||
|
* Generalize Unicode defines ([#15409](https://github.com/qmk/qmk_firmware/pull/15409)) |
||||||
|
* Added external spi flash driver. ([#15419](https://github.com/qmk/qmk_firmware/pull/15419)) |
||||||
|
* Remove Deprecated USB Polling comment from vusb.c ([#15420](https://github.com/qmk/qmk_firmware/pull/15420)) |
||||||
|
* Expand rotational range for PMW3360 Optical Sensor ([#15431](https://github.com/qmk/qmk_firmware/pull/15431)) |
||||||
|
* ChibiOS SVN mirror script update ([#15435](https://github.com/qmk/qmk_firmware/pull/15435)) |
||||||
|
* Refactor `bootloader_jump()` implementations ([#15450](https://github.com/qmk/qmk_firmware/pull/15450)) |
||||||
|
* added missing audio_off_user() callback ([#15457](https://github.com/qmk/qmk_firmware/pull/15457)) |
||||||
|
* Migrate serial_uart usages to UART driver ([#15479](https://github.com/qmk/qmk_firmware/pull/15479)) |
||||||
|
* Migrate RN42 to UART driver and refactor ([#15492](https://github.com/qmk/qmk_firmware/pull/15492)) |
||||||
|
* pwm3360 driver cleanup and diff reduction to adns9800 ([#15559](https://github.com/qmk/qmk_firmware/pull/15559)) |
||||||
|
* Advanced deferred_exec for core-side code. ([#15579](https://github.com/qmk/qmk_firmware/pull/15579)) |
||||||
|
* Adjust tap_code16 to account for TAP_HOLD_CAPS_DELAY ([#15635](https://github.com/qmk/qmk_firmware/pull/15635)) |
||||||
|
* Slight tidy up of keyboard task loop ([#15725](https://github.com/qmk/qmk_firmware/pull/15725)) |
||||||
|
* Unify the key up/down behaviour of RGB keycodes ([#15730](https://github.com/qmk/qmk_firmware/pull/15730)) |
||||||
|
* Add PMW3389 optical sensor Support (Updated) ([#15740](https://github.com/qmk/qmk_firmware/pull/15740)) |
||||||
|
* ChibiOS: add support for HID Programmable Buttons ([#15787](https://github.com/qmk/qmk_firmware/pull/15787)) |
||||||
|
* ChibiOS: shorten USB disconnect state on boot to 50ms ([#15805](https://github.com/qmk/qmk_firmware/pull/15805)) |
||||||
|
* Add init function to clear previous matrix effect ([#15815](https://github.com/qmk/qmk_firmware/pull/15815)) |
||||||
|
* Optimize initialization of PMW3360 Sensor ([#15821](https://github.com/qmk/qmk_firmware/pull/15821)) |
||||||
|
* Add Pixel Flow RGB matrix effect ([#15829](https://github.com/qmk/qmk_firmware/pull/15829)) |
||||||
|
* PMW3389 Revert Firmware load during Initilization ([#15859](https://github.com/qmk/qmk_firmware/pull/15859)) |
||||||
|
* Combo `TAP_CODE_DELAY` and `clear_weak_mods` ([#15866](https://github.com/qmk/qmk_firmware/pull/15866)) |
||||||
|
* Relocate matrix_scan_quantum tasks ([#15882](https://github.com/qmk/qmk_firmware/pull/15882)) |
||||||
|
* Adjust mouse key defaults ([#15883](https://github.com/qmk/qmk_firmware/pull/15883)) |
||||||
|
* RGB Matrix: Reload from EEPROM ([#15923](https://github.com/qmk/qmk_firmware/pull/15923)) |
||||||
|
* Enable a default task throttle for split pointing. ([#15925](https://github.com/qmk/qmk_firmware/pull/15925)) |
||||||
|
* Move mcp23018 driver to core ([#15944](https://github.com/qmk/qmk_firmware/pull/15944)) |
||||||
|
* Relocate matrix_init_quantum content ([#15953](https://github.com/qmk/qmk_firmware/pull/15953)) |
||||||
|
* Align location of some host led logic ([#15954](https://github.com/qmk/qmk_firmware/pull/15954)) |
||||||
|
* Rename some Quantum keycodes ([#15968](https://github.com/qmk/qmk_firmware/pull/15968)) |
||||||
|
* Migrate more makefile utilities to builddefs sub-directory ([#16002](https://github.com/qmk/qmk_firmware/pull/16002)) |
||||||
|
* Various Makefile optimisations ([#16015](https://github.com/qmk/qmk_firmware/pull/16015)) |
||||||
|
* Add support for STM32L432, STM32L442. ([#16016](https://github.com/qmk/qmk_firmware/pull/16016)) |
||||||
|
* EEPROM refactor: remove `eeprom_teensy.c` by default, use transient instead ([#16020](https://github.com/qmk/qmk_firmware/pull/16020)) |
||||||
|
* Deprecate Split Transaction status field ([#16023](https://github.com/qmk/qmk_firmware/pull/16023)) |
||||||
|
* Rip out old macro and action_function system ([#16025](https://github.com/qmk/qmk_firmware/pull/16025)) |
||||||
|
* Add a script that simplifies running commands under docker. ([#16028](https://github.com/qmk/qmk_firmware/pull/16028)) |
||||||
|
* Add support for Q-series on the ckled2001 LED driver ([#16051](https://github.com/qmk/qmk_firmware/pull/16051)) |
||||||
|
* Remove unused suspend_idle ([#16063](https://github.com/qmk/qmk_firmware/pull/16063)) |
||||||
|
* Initial migration of suspend callbacks ([#16067](https://github.com/qmk/qmk_firmware/pull/16067)) |
||||||
|
* Add layout change callbacks to VIA ([#16087](https://github.com/qmk/qmk_firmware/pull/16087)) |
||||||
|
* Rename `AdafruitBLE` to `BluefruitLE` ([#16127](https://github.com/qmk/qmk_firmware/pull/16127)) |
||||||
|
* Update outputselect to use platform connected state API ([#16185](https://github.com/qmk/qmk_firmware/pull/16185)) |
||||||
|
* Remove default pointing device driver. ([#16190](https://github.com/qmk/qmk_firmware/pull/16190)) |
||||||
|
* Add SN74x138 demultiplexer driver ([#16217](https://github.com/qmk/qmk_firmware/pull/16217)) |
||||||
|
* Standardise error output. ([#16220](https://github.com/qmk/qmk_firmware/pull/16220)) |
||||||
|
* Followup to #16220, more test error output. ([#16221](https://github.com/qmk/qmk_firmware/pull/16221)) |
||||||
|
* Misc size regression script improvements. ([#16268](https://github.com/qmk/qmk_firmware/pull/16268)) |
||||||
|
* Align existing pca9555 driver to better match mcp23018 API ([#16277](https://github.com/qmk/qmk_firmware/pull/16277)) |
||||||
|
* Size checks print out target firmware file instead ([#16290](https://github.com/qmk/qmk_firmware/pull/16290)) |
||||||
|
|
||||||
|
CLI: |
||||||
|
* `develop` changelog generator: use the PR title instead ([#15537](https://github.com/qmk/qmk_firmware/pull/15537)) |
||||||
|
* `develop` changelog generator: skip code formatting in listing ([#16215](https://github.com/qmk/qmk_firmware/pull/16215)) |
||||||
|
|
||||||
|
Keyboards: |
||||||
|
* Durgod: Increase scan rate by using wait_us timer ([#14091](https://github.com/qmk/qmk_firmware/pull/14091)) |
||||||
|
* Add another GMMK Pro ANSI Keymap with custom RGB. ([#14243](https://github.com/qmk/qmk_firmware/pull/14243)) |
||||||
|
* Parse USB device version BCD ([#14580](https://github.com/qmk/qmk_firmware/pull/14580)) |
||||||
|
* Add vitoni keymap for GMMK Pro (ISO) ([#15006](https://github.com/qmk/qmk_firmware/pull/15006)) |
||||||
|
* Move bm65hsrgb_iso and bm68hsrgb to rev1/ to prepare for updates to the boards ([#15132](https://github.com/qmk/qmk_firmware/pull/15132)) |
||||||
|
* Convert ergoinu to SPLIT_KEYBOARD ([#15305](https://github.com/qmk/qmk_firmware/pull/15305)) |
||||||
|
* Convert not_so_minidox to SPLIT_KEYBOARD ([#15306](https://github.com/qmk/qmk_firmware/pull/15306)) |
||||||
|
* Added new handwired keyboard Wakizashi 40 ([#15336](https://github.com/qmk/qmk_firmware/pull/15336)) |
||||||
|
* Convert ai03/orbit to SPLIT_KEYBOARD ([#15340](https://github.com/qmk/qmk_firmware/pull/15340)) |
||||||
|
* Remove manual enable of LTO within user keymaps ([#15378](https://github.com/qmk/qmk_firmware/pull/15378)) |
||||||
|
* Move to organization folder ([#15481](https://github.com/qmk/qmk_firmware/pull/15481)) |
||||||
|
* Convert some more boards to Matrix Lite ([#15489](https://github.com/qmk/qmk_firmware/pull/15489)) |
||||||
|
* Organize Reviung boards into a directory ([#15636](https://github.com/qmk/qmk_firmware/pull/15636)) |
||||||
|
* move winry25tc to winry/ ([#15637](https://github.com/qmk/qmk_firmware/pull/15637)) |
||||||
|
* Rename ymdk_np21 to np21 + move to ymdk vendor folder ([#15641](https://github.com/qmk/qmk_firmware/pull/15641)) |
||||||
|
* move ymd96 to ymdk vendor folder ([#15643](https://github.com/qmk/qmk_firmware/pull/15643)) |
||||||
|
* move ymd75 to ymdk vendor folder ([#15645](https://github.com/qmk/qmk_firmware/pull/15645)) |
||||||
|
* move yd60mq to ymdk vendor folder ([#15647](https://github.com/qmk/qmk_firmware/pull/15647)) |
||||||
|
* rename idobo to idobao/id75, move to vendor folder ([#15661](https://github.com/qmk/qmk_firmware/pull/15661)) |
||||||
|
* move ID67 to IDOBAO vendor folder ([#15662](https://github.com/qmk/qmk_firmware/pull/15662)) |
||||||
|
* move ID80 to IDOBAO vendor folder ([#15665](https://github.com/qmk/qmk_firmware/pull/15665)) |
||||||
|
* move ID87 to IDOBAO vendor folder ([#15667](https://github.com/qmk/qmk_firmware/pull/15667)) |
||||||
|
* move montex to IDOBAO vendor folder ([#15668](https://github.com/qmk/qmk_firmware/pull/15668)) |
||||||
|
* move @yangdigi 's keyboards to a YDKB folder ([#15681](https://github.com/qmk/qmk_firmware/pull/15681)) |
||||||
|
* move @kkatano 's keyboards to kkatano user folder ([#15684](https://github.com/qmk/qmk_firmware/pull/15684)) |
||||||
|
* Sol 3 Keyboard from RGBKB ([#15687](https://github.com/qmk/qmk_firmware/pull/15687)) |
||||||
|
* move cu24, cu75, cu80/v1 into capsunlocked folder ([#15758](https://github.com/qmk/qmk_firmware/pull/15758)) |
||||||
|
* move mechkeys keyboards into the mechkeys/ vendor folder ([#15760](https://github.com/qmk/qmk_firmware/pull/15760)) |
||||||
|
* move @lyso1 's boards into lyso1/ ([#15767](https://github.com/qmk/qmk_firmware/pull/15767)) |
||||||
|
* move prototypist boards into vendor folder ([#15780](https://github.com/qmk/qmk_firmware/pull/15780)) |
||||||
|
* move @yiancar 's boards into yiancardesigns/ ([#15781](https://github.com/qmk/qmk_firmware/pull/15781)) |
||||||
|
* move novelkeys keyboards to vendor folder ([#15783](https://github.com/qmk/qmk_firmware/pull/15783)) |
||||||
|
* move @weirdo-f 's keyboards into weirdo/ ([#15785](https://github.com/qmk/qmk_firmware/pull/15785)) |
||||||
|
* move @marksard 's boards to marksard/ ([#15786](https://github.com/qmk/qmk_firmware/pull/15786)) |
||||||
|
* move input club keyboards into vendor folder ([#15788](https://github.com/qmk/qmk_firmware/pull/15788)) |
||||||
|
* move @monksoffunk 's boards into 25keys/ ([#15789](https://github.com/qmk/qmk_firmware/pull/15789)) |
||||||
|
* move @Salicylic-acid3 's keyboards to salicylic-acid3/ ([#15791](https://github.com/qmk/qmk_firmware/pull/15791)) |
||||||
|
* move @rainkeebs 's keyboards to rainkeebs/ ([#15797](https://github.com/qmk/qmk_firmware/pull/15797)) |
||||||
|
* move standaside into edi/ ([#15798](https://github.com/qmk/qmk_firmware/pull/15798)) |
||||||
|
* move @obosob 's boards into obosob/ ([#15799](https://github.com/qmk/qmk_firmware/pull/15799)) |
||||||
|
* move @nacly 's boards to nacly/ ([#15801](https://github.com/qmk/qmk_firmware/pull/15801)) |
||||||
|
* move @kakunpc 's keebs into kakunpc/ ([#15814](https://github.com/qmk/qmk_firmware/pull/15814)) |
||||||
|
* move @qpocket 's keyboards to qpocket/ ([#15827](https://github.com/qmk/qmk_firmware/pull/15827)) |
||||||
|
* BDN9 keymap ([#15924](https://github.com/qmk/qmk_firmware/pull/15924)) |
||||||
|
* move @matthewdias 's keebs into matthewdias/ ([#15991](https://github.com/qmk/qmk_firmware/pull/15991)) |
||||||
|
* move id80 and id75 to v1 to accommodate for id75 v2 and id80 v3 ([#15992](https://github.com/qmk/qmk_firmware/pull/15992)) |
||||||
|
* Remove `action_function()` from LFKeyboards boards ([#15993](https://github.com/qmk/qmk_firmware/pull/15993)) |
||||||
|
* move @latincompass (aka @18438880 , @haierwangwei2005)'s boards to /latincompass ([#16039](https://github.com/qmk/qmk_firmware/pull/16039)) |
||||||
|
* move g heavy industry boards into /gboards ([#16040](https://github.com/qmk/qmk_firmware/pull/16040)) |
||||||
|
* move @drhigsby 's boards into /drhigsby ([#16041](https://github.com/qmk/qmk_firmware/pull/16041)) |
||||||
|
* More keyboard rules.mk cleanups ([#16044](https://github.com/qmk/qmk_firmware/pull/16044)) |
||||||
|
* move @That-Canadian 's boards into /maple_computing ([#16050](https://github.com/qmk/qmk_firmware/pull/16050)) |
||||||
|
* move @takai 's keyboards into /recompile_keys ([#16053](https://github.com/qmk/qmk_firmware/pull/16053)) |
||||||
|
* move @satt99 's comet46 to satt/ ([#16059](https://github.com/qmk/qmk_firmware/pull/16059)) |
||||||
|
* move @ka2hiro 's boards into /kagizaraya ([#16070](https://github.com/qmk/qmk_firmware/pull/16070)) |
||||||
|
* move @GlenPickle 's chimera* boards into a folder ([#16072](https://github.com/qmk/qmk_firmware/pull/16072)) |
||||||
|
* move @yynmt 's boards into /yynmt ([#16075](https://github.com/qmk/qmk_firmware/pull/16075)) |
||||||
|
* move @Biacco42 's keebs into /biacco42 ([#16080](https://github.com/qmk/qmk_firmware/pull/16080)) |
||||||
|
* move unikeyboard boards to /unikeyboard ([#16081](https://github.com/qmk/qmk_firmware/pull/16081)) |
||||||
|
* move four_banger to bpiphany ([#16082](https://github.com/qmk/qmk_firmware/pull/16082)) |
||||||
|
* move @takashiski 's keebs into /takashiski ([#16089](https://github.com/qmk/qmk_firmware/pull/16089)) |
||||||
|
* move hid_liber to /bpiphany ([#16091](https://github.com/qmk/qmk_firmware/pull/16091)) |
||||||
|
* move spaceholdings boards into /spaceholdings ([#16096](https://github.com/qmk/qmk_firmware/pull/16096)) |
||||||
|
* move @7-rate 's keebs to /rate ([#16099](https://github.com/qmk/qmk_firmware/pull/16099)) |
||||||
|
* move @npspears 's boards into /checkerboards ([#16100](https://github.com/qmk/qmk_firmware/pull/16100)) |
||||||
|
* move @vuhopkep 's keebs into /hnahkb ([#16102](https://github.com/qmk/qmk_firmware/pull/16102)) |
||||||
|
* move @ibnuda 's keebs into /ibnuda ([#16108](https://github.com/qmk/qmk_firmware/pull/16108)) |
||||||
|
* move @tominabox1 's keebs into /tominabox1 ([#16109](https://github.com/qmk/qmk_firmware/pull/16109)) |
||||||
|
* move niu_mini to /kbdfans ([#16112](https://github.com/qmk/qmk_firmware/pull/16112)) |
||||||
|
* move woodkeys.click keyboards to /woodkeys ([#16113](https://github.com/qmk/qmk_firmware/pull/16113)) |
||||||
|
* move @omkbd 's boards to /omkbd ([#16116](https://github.com/qmk/qmk_firmware/pull/16116)) |
||||||
|
* Overhaul Tractyl Manuform ([#16134](https://github.com/qmk/qmk_firmware/pull/16134)) |
||||||
|
* Reduce firmware size for dztech/dz60rgb_wkl/v2_1:via ([#16254](https://github.com/qmk/qmk_firmware/pull/16254)) |
||||||
|
|
||||||
|
Keyboard fixes: |
||||||
|
* Fix build failure for UT47 ([#15483](https://github.com/qmk/qmk_firmware/pull/15483)) |
||||||
|
* Update grs_70ec to use newer custom matrix ([#15609](https://github.com/qmk/qmk_firmware/pull/15609)) |
||||||
|
* fix compiler issue with Tractyl Manuform 4x6 ([#15646](https://github.com/qmk/qmk_firmware/pull/15646)) |
||||||
|
* Fix CI. ([#15828](https://github.com/qmk/qmk_firmware/pull/15828)) |
||||||
|
* Yet another bad `DEFAULT_FOLDER` fix. ([#15904](https://github.com/qmk/qmk_firmware/pull/15904)) |
||||||
|
* Fix build failures for `mschwingen/modelm` ([#15987](https://github.com/qmk/qmk_firmware/pull/15987)) |
||||||
|
* `rocketboard_16`: Fix mismatched LUT sizes ([#15997](https://github.com/qmk/qmk_firmware/pull/15997)) |
||||||
|
* Fix erroneous SRC for Clueboard 66 hotswap ([#16007](https://github.com/qmk/qmk_firmware/pull/16007)) |
||||||
|
* Fix handwired/ms_sculpt_mobile default keymap ([#16032](https://github.com/qmk/qmk_firmware/pull/16032)) |
||||||
|
* Re-org Hillside folders as new model prep. Fix default keymap. ([#16128](https://github.com/qmk/qmk_firmware/pull/16128)) |
||||||
|
* Fix up default folder locations. Again. ([#16135](https://github.com/qmk/qmk_firmware/pull/16135)) |
||||||
|
* Sol3 rgb fix ([#16157](https://github.com/qmk/qmk_firmware/pull/16157)) |
||||||
|
* Add missing `BOOTLOADER` for a handful of boards ([#16225](https://github.com/qmk/qmk_firmware/pull/16225)) |
||||||
|
* Remove half implemented micronucleus bootloader support ([#16252](https://github.com/qmk/qmk_firmware/pull/16252)) |
||||||
|
* Fixup bootloaders. ([#16256](https://github.com/qmk/qmk_firmware/pull/16256)) |
||||||
|
* Fix idobao/id80/v3 compilation errors ([#16280](https://github.com/qmk/qmk_firmware/pull/16280)) |
||||||
|
* Remove parent-relative paths from keyboards. ([#16282](https://github.com/qmk/qmk_firmware/pull/16282)) |
||||||
|
* Bodge for helix build failures ([#16376](https://github.com/qmk/qmk_firmware/pull/16376)) |
||||||
|
|
||||||
|
Others: |
||||||
|
* Add a clarification to an error message ([#15207](https://github.com/qmk/qmk_firmware/pull/15207)) |
||||||
|
* Clang-format tweaks ([#15906](https://github.com/qmk/qmk_firmware/pull/15906)) |
||||||
|
* Add example implementations for compatible MCUs list ([#15935](https://github.com/qmk/qmk_firmware/pull/15935)) |
||||||
|
* Add version.h to gitignore ([#16222](https://github.com/qmk/qmk_firmware/pull/16222)) |
||||||
|
* Update keyboard mapping for all moved boards this cycle ([#16312](https://github.com/qmk/qmk_firmware/pull/16312)) |
||||||
|
* Align docs to new-keyboard behaviour ([#16357](https://github.com/qmk/qmk_firmware/pull/16357)) |
||||||
|
* Align new-keyboard with recent schema updates ([#16378](https://github.com/qmk/qmk_firmware/pull/16378)) |
||||||
|
|
||||||
|
Bugs: |
||||||
|
* Fixes potential wpm sampling overflow, along with code comment fixes ([#15277](https://github.com/qmk/qmk_firmware/pull/15277)) |
||||||
|
* Add missing define for unicode common ([#15416](https://github.com/qmk/qmk_firmware/pull/15416)) |
||||||
|
* Fix for SPI write timing in PMW3360 driver ([#15519](https://github.com/qmk/qmk_firmware/pull/15519)) |
||||||
|
* Documentation Typo fix ([#15538](https://github.com/qmk/qmk_firmware/pull/15538)) |
||||||
|
* fix a typo ([#15557](https://github.com/qmk/qmk_firmware/pull/15557)) |
||||||
|
* Fix avr serial compile ([#15589](https://github.com/qmk/qmk_firmware/pull/15589)) |
||||||
|
* More AVR GPIO compilation fixes. ([#15592](https://github.com/qmk/qmk_firmware/pull/15592)) |
||||||
|
* Fix bug and code regression for Split Common ([#15603](https://github.com/qmk/qmk_firmware/pull/15603)) |
||||||
|
* Include missing string.h include in split ([#15606](https://github.com/qmk/qmk_firmware/pull/15606)) |
||||||
|
* Fixes for bootloader refactor build failures ([#15638](https://github.com/qmk/qmk_firmware/pull/15638)) |
||||||
|
* Update pmw3360 driver after reading the datasheet top to bottom. Fix some outdated refs. ([#15682](https://github.com/qmk/qmk_firmware/pull/15682)) |
||||||
|
* Fix split pointing for analog joystick ([#15691](https://github.com/qmk/qmk_firmware/pull/15691)) |
||||||
|
* Fix broken bootloader builds in develop. ([#15880](https://github.com/qmk/qmk_firmware/pull/15880)) |
||||||
|
* Fix optical sensor firmware upload ([#15919](https://github.com/qmk/qmk_firmware/pull/15919)) |
||||||
|
* Pass in the keyrecord_t of the dual-role/tapping key when calling per-key tap hold functions ([#15938](https://github.com/qmk/qmk_firmware/pull/15938)) |
||||||
|
* fixed typo in orange HSV colors decalartion ([#15976](https://github.com/qmk/qmk_firmware/pull/15976)) |
||||||
|
* Fix hack for chibiOS reset name ([#15984](https://github.com/qmk/qmk_firmware/pull/15984)) |
||||||
|
* Fix right side ws2812 leds having two indices ([#15985](https://github.com/qmk/qmk_firmware/pull/15985)) |
||||||
|
* Workaround in Makefile for recursive rule matching ([#15988](https://github.com/qmk/qmk_firmware/pull/15988)) |
||||||
|
* Fix BACKLIGHT_CAPS_LOCK warning ([#15999](https://github.com/qmk/qmk_firmware/pull/15999)) |
||||||
|
* Fix compilation issues for led indicators ([#16001](https://github.com/qmk/qmk_firmware/pull/16001)) |
||||||
|
* ChibiOS timer fixes ([#16017](https://github.com/qmk/qmk_firmware/pull/16017)) |
||||||
|
* Fix bootloader_jump for certain CTRL boards ([#16026](https://github.com/qmk/qmk_firmware/pull/16026)) |
||||||
|
* Fix up issue with PROGMEM and hand_swap_config ([#16027](https://github.com/qmk/qmk_firmware/pull/16027)) |
||||||
|
* Don't make EEPROM size assumptions with dynamic keymaps. ([#16054](https://github.com/qmk/qmk_firmware/pull/16054)) |
||||||
|
* fix missed .noci in reviung move ([#16107](https://github.com/qmk/qmk_firmware/pull/16107)) |
||||||
|
* Fix issues with Python Tests ([#16162](https://github.com/qmk/qmk_firmware/pull/16162)) |
||||||
|
* Fixup multibuild filegen ([#16166](https://github.com/qmk/qmk_firmware/pull/16166)) |
||||||
|
* Remove old .gitignore entry. Add more macOS junk exclusions. ([#16167](https://github.com/qmk/qmk_firmware/pull/16167)) |
||||||
|
* Fixup builds so that teensy EEPROM knows which MCU it's targeting. ([#16168](https://github.com/qmk/qmk_firmware/pull/16168)) |
||||||
|
* Create a build error if no bootloader is specified. ([#16181](https://github.com/qmk/qmk_firmware/pull/16181)) |
||||||
|
* Ensure `version.h` is recreated each build. ([#16188](https://github.com/qmk/qmk_firmware/pull/16188)) |
||||||
|
* Add `custom` to list of valid bootloader types in info.json ([#16228](https://github.com/qmk/qmk_firmware/pull/16228)) |
||||||
|
* Fix `layer_state` restoration at end of dynamic macro feature #16208 ([#16230](https://github.com/qmk/qmk_firmware/pull/16230)) |
||||||
|
* Minor additions #12795 ([#16276](https://github.com/qmk/qmk_firmware/pull/16276)) |
||||||
|
* Various fixes for matrix _RIGHT handling ([#16292](https://github.com/qmk/qmk_firmware/pull/16292)) |
||||||
|
* Fix slashes in build_full_test.mk ([#16300](https://github.com/qmk/qmk_firmware/pull/16300)) |
||||||
|
* ps2/avr: use the correct file name ([#16316](https://github.com/qmk/qmk_firmware/pull/16316)) |
||||||
|
* Fix compilation of ChibiOS UART driver ([#16348](https://github.com/qmk/qmk_firmware/pull/16348)) |
||||||
|
* Various fixes for new-keyboard ([#16358](https://github.com/qmk/qmk_firmware/pull/16358)) |
||||||
|
* Allow NO_PIN within data driven configuration ([#16359](https://github.com/qmk/qmk_firmware/pull/16359)) |
@ -1,13 +0,0 @@ |
|||||||
### Split Common core now supports Pointing Devices ([#15304](https://github.com/qmk/qmk_firmware/pull/15304)) |
|
||||||
|
|
||||||
Pointing devices can now be shared across a split keyboard with support for a single pointing device or a pointing device on each side. |
|
||||||
|
|
||||||
This feature can be enabled with `#define SPLIT_POINTING_ENABLE` and one of the following options: |
|
||||||
|
|
||||||
| Setting | Description | |
|
||||||
|---------------------------|------------------------------------| |
|
||||||
|`POINTING_DEVICE_LEFT` | Pointing device on the left side | |
|
||||||
|`POINTING_DEVICE_RIGHT` | Pointing device on the right side | |
|
||||||
|`POINTING_DEVICE_COMBINED` | Pointing device on both sides | |
|
||||||
|
|
||||||
See the [Pointing Device](../feature_pointing_device.md) documentation for further configuration options. |
|
@ -1,182 +0,0 @@ |
|||||||
# Keyboards with AVR Processors |
|
||||||
|
|
||||||
This page describes the support for AVR processors in QMK. AVR processors include the atmega32u4, atmega32u2, at90usb1286, and other processors from Atmel Corporation. AVR processors are 8-bit MCUs that are designed to be easy to work with. The most common AVR processors in keyboards have on-board USB and plenty of GPIO for supporting large keyboard matrices. They are the most popular MCU for use in keyboards today. |
|
||||||
|
|
||||||
If you have not yet you should read the [Keyboard Guidelines](hardware_keyboard_guidelines.md) to get a sense of how keyboards fit into QMK. |
|
||||||
|
|
||||||
## Adding Your AVR Keyboard to QMK |
|
||||||
|
|
||||||
QMK has a number of features to simplify working with AVR keyboards. For most keyboards you don't have to write a single line of code. To get started, run `qmk new-keyboard`: |
|
||||||
|
|
||||||
``` |
|
||||||
$ qmk new-keyboard |
|
||||||
Ψ Generating a new QMK keyboard directory |
|
||||||
|
|
||||||
Keyboard Name: mycoolkeeb |
|
||||||
Keyboard Type: |
|
||||||
1. avr |
|
||||||
2. ps2avrgb |
|
||||||
Please enter your choice: [1] |
|
||||||
Your Name: [John Smith] |
|
||||||
Ψ Copying base template files... |
|
||||||
Ψ Copying avr template files... |
|
||||||
Ψ Renaming keyboard.[ch] to mycoolkeeb.[ch]... |
|
||||||
Ψ Replacing %YEAR% with 2021... |
|
||||||
Ψ Replacing %KEYBOARD% with mycoolkeeb... |
|
||||||
Ψ Replacing %YOUR_NAME% with John Smith... |
|
||||||
|
|
||||||
Ψ Created a new keyboard called mycoolkeeb. |
|
||||||
Ψ To start working on things, `cd` into keyboards/mycoolkeeb, |
|
||||||
Ψ or open the directory in your preferred text editor. |
|
||||||
``` |
|
||||||
|
|
||||||
This will create all the files needed to support your new keyboard, and populate the settings with default values. Now you just need to customize it for your keyboard. |
|
||||||
|
|
||||||
## `readme.md` |
|
||||||
|
|
||||||
This is where you'll describe your keyboard. Please follow the [Keyboard Readme Template](documentation_templates.md#keyboard-readmemd-template) when writing your `readme.md`. You're encouraged to place an image at the top of your `readme.md`, please use an external service such as [Imgur](https://imgur.com) to host the images. |
|
||||||
|
|
||||||
## `<keyboard>.c` |
|
||||||
|
|
||||||
This is where all the custom logic for your keyboard goes. Many keyboards do not need to put anything at all in here. You can learn more about writing custom logic in [Custom Quantum Functions](custom_quantum_functions.md). |
|
||||||
|
|
||||||
## `<keyboard>.h` |
|
||||||
|
|
||||||
This is the file you define your [Layout Macro(s)](feature_layouts.md) in. At minimum you should have a `#define LAYOUT` for your keyboard that looks something like this: |
|
||||||
|
|
||||||
```c |
|
||||||
#define LAYOUT( \ |
|
||||||
k00, k01, k02, \ |
|
||||||
k10, k11 \ |
|
||||||
) { \ |
|
||||||
{ k00, k01, k02 }, \ |
|
||||||
{ k10, KC_NO, k11 }, \ |
|
||||||
} |
|
||||||
``` |
|
||||||
|
|
||||||
The first half of the `LAYOUT` pre-processor macro defines the physical arrangement of keys. The second half of the macro defines the matrix the switches are connected to. This allows you to have a physical arrangement of keys that differs from the wiring matrix. |
|
||||||
|
|
||||||
Each of the `k__` variables needs to be unique, and typically they follow the format `k<row><col>`. |
|
||||||
|
|
||||||
The physical matrix (the second half) must have a number of rows equaling `MATRIX_ROWS`, and each row must have exactly `MATRIX_COLS` elements in it. If you do not have this many physical keys you can use `KC_NO` to fill in the blank spots. |
|
||||||
|
|
||||||
## `config.h` |
|
||||||
|
|
||||||
The `config.h` file is where you configure the hardware and feature set for your keyboard. There are a lot of options that can be placed in that file, too many to list there. For a complete overview of available options see the [Config Options](config_options.md) page. |
|
||||||
|
|
||||||
### Hardware Configuration |
|
||||||
|
|
||||||
|
|
||||||
At the top of the `config.h` you'll find USB related settings. These control how your keyboard appears to the Operating System. If you don't have a good reason to change you should leave the `VENDOR_ID` as `0xFEED`. For the `PRODUCT_ID` you should pick a number that is not yet in use. |
|
||||||
|
|
||||||
Do change the `MANUFACTURER` and `PRODUCT` lines to accurately reflect your keyboard. |
|
||||||
|
|
||||||
```c |
|
||||||
#define VENDOR_ID 0xFEED |
|
||||||
#define PRODUCT_ID 0x6060 |
|
||||||
#define DEVICE_VER 0x0001 |
|
||||||
#define MANUFACTURER You |
|
||||||
#define PRODUCT my_awesome_keyboard |
|
||||||
``` |
|
||||||
|
|
||||||
?> Windows and macOS will display the `MANUFACTURER` and `PRODUCT` in the list of USB devices. `lsusb` on Linux instead prefers the values in the list maintained by the [USB ID Repository](http://www.linux-usb.org/usb-ids.html). By default, it will only use `MANUFACTURER` and `PRODUCT` if the list does not contain that `VENDOR_ID` / `PRODUCT_ID`. `sudo lsusb -v` will show the values reported by the device, and they are also present in kernel logs after plugging it in. |
|
||||||
|
|
||||||
### Keyboard Matrix Configuration |
|
||||||
|
|
||||||
The next section of the `config.h` file deals with your keyboard's matrix. The first thing you should set is the matrix's size. This is usually, but not always, the same number of rows and columns as the physical key arrangement. |
|
||||||
|
|
||||||
```c |
|
||||||
#define MATRIX_ROWS 2 |
|
||||||
#define MATRIX_COLS 3 |
|
||||||
``` |
|
||||||
|
|
||||||
Once you've defined the size of your matrix you need to define which pins on your MCU are connected to rows and columns. To do so simply specify the names of those pins: |
|
||||||
|
|
||||||
```c |
|
||||||
#define MATRIX_ROW_PINS { D0, D5 } |
|
||||||
#define MATRIX_COL_PINS { F1, F0, B0 } |
|
||||||
#define UNUSED_PINS |
|
||||||
``` |
|
||||||
|
|
||||||
The number of `MATRIX_ROW_PINS` entries must be the same as the number you assigned to `MATRIX_ROWS`, and likewise for `MATRIX_COL_PINS` and `MATRIX_COLS`. You do not have to specify `UNUSED_PINS`, but you can if you want to document what pins are open. |
|
||||||
|
|
||||||
Finally, you can specify the direction your diodes point. This can be `COL2ROW` or `ROW2COL`. |
|
||||||
|
|
||||||
```c |
|
||||||
#define DIODE_DIRECTION COL2ROW |
|
||||||
``` |
|
||||||
|
|
||||||
#### Direct Pin Matrix |
|
||||||
To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `DIRECT_PINS`. The mapping defines the pins of each switch in rows and columns, from left to right. Must conform to the sizes within `MATRIX_ROWS` and `MATRIX_COLS`, use `NO_PIN` to fill in blank spaces. Overrides the behaviour of `DIODE_DIRECTION`, `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`. |
|
||||||
|
|
||||||
```c |
|
||||||
// #define MATRIX_ROW_PINS { D0, D5 } |
|
||||||
// #define MATRIX_COL_PINS { F1, F0, B0 } |
|
||||||
#define DIRECT_PINS { \ |
|
||||||
{ F1, E6, B0, B2, B3 }, \ |
|
||||||
{ F5, F0, B1, B7, D2 }, \ |
|
||||||
{ F6, F7, C7, D5, D3 }, \ |
|
||||||
{ B5, C6, B6, NO_PIN, NO_PIN } \ |
|
||||||
} |
|
||||||
#define UNUSED_PINS |
|
||||||
|
|
||||||
/* COL2ROW, ROW2COL */ |
|
||||||
//#define DIODE_DIRECTION |
|
||||||
``` |
|
||||||
|
|
||||||
### Backlight Configuration |
|
||||||
|
|
||||||
QMK supports backlighting on most GPIO pins. A select few of these can be driven by the MCU in hardware. For more details see the [Backlight Documentation](feature_backlight.md). |
|
||||||
|
|
||||||
```c |
|
||||||
#define BACKLIGHT_PIN B7 |
|
||||||
#define BACKLIGHT_LEVELS 3 |
|
||||||
#define BACKLIGHT_BREATHING |
|
||||||
#define BREATHING_PERIOD 6 |
|
||||||
``` |
|
||||||
|
|
||||||
### Other Configuration Options |
|
||||||
|
|
||||||
There are a lot of features that can be configured or tuned in `config.h`. You should see the [Config Options](config_options.md) page for more details. |
|
||||||
|
|
||||||
## `rules.mk` |
|
||||||
|
|
||||||
You use the `rules.mk` file to tell QMK what files to build and what features to enable. If you are building around an atmega32u4 you can largely leave these defaults alone. If you are using another MCU you may have to tweak some parameters. |
|
||||||
|
|
||||||
### MCU Options |
|
||||||
|
|
||||||
These options tell the build system what CPU to build for. Be very careful if you change any of these settings, you can render your keyboard inoperable. |
|
||||||
|
|
||||||
```make |
|
||||||
MCU = atmega32u4 |
|
||||||
F_CPU = 16000000 |
|
||||||
ARCH = AVR8 |
|
||||||
F_USB = $(F_CPU) |
|
||||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT |
|
||||||
``` |
|
||||||
|
|
||||||
### Bootloaders |
|
||||||
|
|
||||||
The bootloader is a special section of your MCU that allows you to upgrade the code stored on the MCU. Think of it like a Rescue Partition for your keyboard. |
|
||||||
|
|
||||||
#### Teensy Bootloader Example |
|
||||||
|
|
||||||
```make |
|
||||||
BOOTLOADER = halfkay |
|
||||||
``` |
|
||||||
|
|
||||||
#### Atmel DFU Loader Example |
|
||||||
|
|
||||||
```make |
|
||||||
BOOTLOADER = atmel-dfu |
|
||||||
``` |
|
||||||
|
|
||||||
#### Pro Micro Bootloader Example |
|
||||||
|
|
||||||
```make |
|
||||||
BOOTLOADER = caterina |
|
||||||
``` |
|
||||||
|
|
||||||
### Build Options |
|
||||||
|
|
||||||
There are a number of features that can be turned on or off in `rules.mk`. See the [Config Options](config_options.md#feature-options) page for a detailed list and description. |
|
@ -1,8 +1,8 @@ |
|||||||
# GPIO 制御 :id=gpio-control |
# GPIO 制御 :id=gpio-control |
||||||
|
|
||||||
<!--- |
<!--- |
||||||
original document: 0.13.15:docs/internals_gpio_control.md |
original document: 0.13.15:docs/gpio_control.md |
||||||
git diff 0.13.15 HEAD -- docs/internals_gpio_control.md | cat |
git diff 0.13.15 HEAD -- docs/gpio_control.md | cat |
||||||
--> |
--> |
||||||
|
|
||||||
QMK には、マイクロコントローラに依存しない GPIO 制御抽象レイヤーがあります。これは異なるプラットフォーム間でピン制御に簡単にアクセスできるようにするためのものです。 |
QMK には、マイクロコントローラに依存しない GPIO 制御抽象レイヤーがあります。これは異なるプラットフォーム間でピン制御に簡単にアクセスできるようにするためのものです。 |
@ -1,78 +0,0 @@ |
|||||||
# `defines` グループ {#group__defines} |
|
||||||
|
|
||||||
## 概要 |
|
||||||
|
|
||||||
メンバー | 説明 |
|
||||||
--------------------------------|--------------------------------------------- |
|
||||||
`define `[`SYSEX_BEGIN`](#group__defines_1ga1a3c39bb790dda8a368c4247caabcf79) | |
|
||||||
`define `[`SYSEX_END`](#group__defines_1ga753706d1d28e6f96d7caf1973e80feed) | |
|
||||||
`define `[`MIDI_STATUSMASK`](#group__defines_1gab78a1c818a5f5dab7a8946543f126c69) | |
|
||||||
`define `[`MIDI_CHANMASK`](#group__defines_1ga239edc0a6f8405d3a8f2804f1590b909) | |
|
||||||
`define `[`MIDI_CC`](#group__defines_1ga45f116a1daab76b3c930c2cecfaef215) | |
|
||||||
`define `[`MIDI_NOTEON`](#group__defines_1gafd416f27bf3590868c0c1f55c30be4c7) | |
|
||||||
`define `[`MIDI_NOTEOFF`](#group__defines_1gabed24bea2d989fd655e2ef2ad0765adc) | |
|
||||||
`define `[`MIDI_AFTERTOUCH`](#group__defines_1ga3a322d8cfd53576a2e167c1840551b0f) | |
|
||||||
`define `[`MIDI_PITCHBEND`](#group__defines_1gabcc799504e8064679bca03f232223af4) | |
|
||||||
`define `[`MIDI_PROGCHANGE`](#group__defines_1gaefb3f1595ffbb9db66b46c2c919a3d42) | |
|
||||||
`define `[`MIDI_CHANPRESSURE`](#group__defines_1gaeb3281cc7fcd0daade8ed3d2dfc33dbe) | |
|
||||||
`define `[`MIDI_CLOCK`](#group__defines_1gafa5e4e295aafd15ab7893344599b3b89) | |
|
||||||
`define `[`MIDI_TICK`](#group__defines_1ga3b99408ff864613765d4c3c2ceb52aa7) | |
|
||||||
`define `[`MIDI_START`](#group__defines_1ga8233631c85823aa546f932ad8975caa4) | |
|
||||||
`define `[`MIDI_CONTINUE`](#group__defines_1gab24430f0081e27215b0da84dd0ee745c) | |
|
||||||
`define `[`MIDI_STOP`](#group__defines_1ga3af9271d4b1f0d22904a0b055f48cf62) | |
|
||||||
`define `[`MIDI_ACTIVESENSE`](#group__defines_1gacd88ed42dba52bb4b2052c5656362677) | |
|
||||||
`define `[`MIDI_RESET`](#group__defines_1ga02947f30ca62dc332fdeb10c5868323b) | |
|
||||||
`define `[`MIDI_TC_QUARTERFRAME`](#group__defines_1gaaa072f33590e236d1bfd8f28e833ae31) | |
|
||||||
`define `[`MIDI_SONGPOSITION`](#group__defines_1ga412f6ed33a2150051374bee334ee1705) | |
|
||||||
`define `[`MIDI_SONGSELECT`](#group__defines_1gafcab254838b028365ae0259729e72c4e) | |
|
||||||
`define `[`MIDI_TUNEREQUEST`](#group__defines_1ga8100b907b8c0a84e58b1c53dcd9bd795) | |
|
||||||
`define `[`SYSEX_EDUMANUFID`](#group__defines_1ga5ef855ed955b00a2239ca16afbeb164f) | |
|
||||||
|
|
||||||
## メンバー |
|
||||||
|
|
||||||
#### `define `[`SYSEX_BEGIN`](#group__defines_1ga1a3c39bb790dda8a368c4247caabcf79) {#group__defines_1ga1a3c39bb790dda8a368c4247caabcf79} |
|
||||||
|
|
||||||
#### `define `[`SYSEX_END`](#group__defines_1ga753706d1d28e6f96d7caf1973e80feed) {#group__defines_1ga753706d1d28e6f96d7caf1973e80feed} |
|
||||||
|
|
||||||
#### `define `[`MIDI_STATUSMASK`](#group__defines_1gab78a1c818a5f5dab7a8946543f126c69) {#group__defines_1gab78a1c818a5f5dab7a8946543f126c69} |
|
||||||
|
|
||||||
#### `define `[`MIDI_CHANMASK`](#group__defines_1ga239edc0a6f8405d3a8f2804f1590b909) {#group__defines_1ga239edc0a6f8405d3a8f2804f1590b909} |
|
||||||
|
|
||||||
#### `define `[`MIDI_CC`](#group__defines_1ga45f116a1daab76b3c930c2cecfaef215) {#group__defines_1ga45f116a1daab76b3c930c2cecfaef215} |
|
||||||
|
|
||||||
#### `define `[`MIDI_NOTEON`](#group__defines_1gafd416f27bf3590868c0c1f55c30be4c7) {#group__defines_1gafd416f27bf3590868c0c1f55c30be4c7} |
|
||||||
|
|
||||||
#### `define `[`MIDI_NOTEOFF`](#group__defines_1gabed24bea2d989fd655e2ef2ad0765adc) {#group__defines_1gabed24bea2d989fd655e2ef2ad0765adc} |
|
||||||
|
|
||||||
#### `define `[`MIDI_AFTERTOUCH`](#group__defines_1ga3a322d8cfd53576a2e167c1840551b0f) {#group__defines_1ga3a322d8cfd53576a2e167c1840551b0f} |
|
||||||
|
|
||||||
#### `define `[`MIDI_PITCHBEND`](#group__defines_1gabcc799504e8064679bca03f232223af4) {#group__defines_1gabcc799504e8064679bca03f232223af4} |
|
||||||
|
|
||||||
#### `define `[`MIDI_PROGCHANGE`](#group__defines_1gaefb3f1595ffbb9db66b46c2c919a3d42) {#group__defines_1gaefb3f1595ffbb9db66b46c2c919a3d42} |
|
||||||
|
|
||||||
#### `define `[`MIDI_CHANPRESSURE`](#group__defines_1gaeb3281cc7fcd0daade8ed3d2dfc33dbe) {#group__defines_1gaeb3281cc7fcd0daade8ed3d2dfc33dbe} |
|
||||||
|
|
||||||
#### `define `[`MIDI_CLOCK`](#group__defines_1gafa5e4e295aafd15ab7893344599b3b89) {#group__defines_1gafa5e4e295aafd15ab7893344599b3b89} |
|
||||||
|
|
||||||
#### `define `[`MIDI_TICK`](#group__defines_1ga3b99408ff864613765d4c3c2ceb52aa7) {#group__defines_1ga3b99408ff864613765d4c3c2ceb52aa7} |
|
||||||
|
|
||||||
#### `define `[`MIDI_START`](#group__defines_1ga8233631c85823aa546f932ad8975caa4) {#group__defines_1ga8233631c85823aa546f932ad8975caa4} |
|
||||||
|
|
||||||
#### `define `[`MIDI_CONTINUE`](#group__defines_1gab24430f0081e27215b0da84dd0ee745c) {#group__defines_1gab24430f0081e27215b0da84dd0ee745c} |
|
||||||
|
|
||||||
#### `define `[`MIDI_STOP`](#group__defines_1ga3af9271d4b1f0d22904a0b055f48cf62) {#group__defines_1ga3af9271d4b1f0d22904a0b055f48cf62} |
|
||||||
|
|
||||||
#### `define `[`MIDI_ACTIVESENSE`](#group__defines_1gacd88ed42dba52bb4b2052c5656362677) {#group__defines_1gacd88ed42dba52bb4b2052c5656362677} |
|
||||||
|
|
||||||
#### `define `[`MIDI_RESET`](#group__defines_1ga02947f30ca62dc332fdeb10c5868323b) {#group__defines_1ga02947f30ca62dc332fdeb10c5868323b} |
|
||||||
|
|
||||||
#### `define `[`MIDI_TC_QUARTERFRAME`](#group__defines_1gaaa072f33590e236d1bfd8f28e833ae31) {#group__defines_1gaaa072f33590e236d1bfd8f28e833ae31} |
|
||||||
|
|
||||||
#### `define `[`MIDI_SONGPOSITION`](#group__defines_1ga412f6ed33a2150051374bee334ee1705) {#group__defines_1ga412f6ed33a2150051374bee334ee1705} |
|
||||||
|
|
||||||
#### `define `[`MIDI_SONGSELECT`](#group__defines_1gafcab254838b028365ae0259729e72c4e) {#group__defines_1gafcab254838b028365ae0259729e72c4e} |
|
||||||
|
|
||||||
#### `define `[`MIDI_TUNEREQUEST`](#group__defines_1ga8100b907b8c0a84e58b1c53dcd9bd795) {#group__defines_1ga8100b907b8c0a84e58b1c53dcd9bd795} |
|
||||||
|
|
||||||
#### `define `[`SYSEX_EDUMANUFID`](#group__defines_1ga5ef855ed955b00a2239ca16afbeb164f) {#group__defines_1ga5ef855ed955b00a2239ca16afbeb164f} |
|
||||||
|
|
@ -1,173 +0,0 @@ |
|||||||
# group `input_callback_reg` {#group__input__callback__reg} |
|
||||||
|
|
||||||
<!--- |
|
||||||
original document: 0.9.34:docs/internals_input_callback_reg.md |
|
||||||
git diff 0.9.34 HEAD -- docs/internals_input_callback_reg.md | cat |
|
||||||
--> |
|
||||||
|
|
||||||
これらは受信コールバックを登録するために使用する関数です。 |
|
||||||
|
|
||||||
関数は、適切な midi メッセージが関連するデバイスの入力と一致した場合に呼び出されます。 |
|
||||||
|
|
||||||
## 概要 |
|
||||||
|
|
||||||
| メンバー | 説明 | |
|
||||||
--------------------------------|--------------------------------------------- |
|
||||||
| `public void `[`midi_register_cc_callback`](#group__input__callback__reg_1ga64ab672abbbe393c9c4a83110c8df718)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | コントロールチェンジメッセージ受信コールバックを登録する。 | |
|
||||||
| `public void `[`midi_register_noteon_callback`](#group__input__callback__reg_1ga3962f276c17618923f1152779552103e)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | ノートオン受信コールバックを登録する。 | |
|
||||||
| `public void `[`midi_register_noteoff_callback`](#group__input__callback__reg_1gac847b66051bd6d53b762958be0ec4c6d)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | ノートオフ受信コールバックを登録する。 | |
|
||||||
| `public void `[`midi_register_aftertouch_callback`](#group__input__callback__reg_1gaa95bc901bd9edff956a667c9a69dd01f)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | アフタータッチ受信コールバックを登録する。 | |
|
||||||
| `public void `[`midi_register_pitchbend_callback`](#group__input__callback__reg_1ga071a28f02ba14f53de219be70ebd9a48)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | ピッチベンド受信コールバックを登録する。 | |
|
||||||
| `public void `[`midi_register_songposition_callback`](#group__input__callback__reg_1gaf2adfd79637f3553d8f26deb1ca22ed6)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` | ソングポジション受信コールバックを登録する。 | |
|
||||||
| `public void `[`midi_register_progchange_callback`](#group__input__callback__reg_1gae6ba1a35a4cde9bd15dd42f87401d127)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` | プログラムチェンジ受信コールバックを登録する。 | |
|
||||||
| `public void `[`midi_register_chanpressure_callback`](#group__input__callback__reg_1ga39b31f1f4fb93917ce039b958f21b4f5)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` | チャンネルプレッシャー受信コールバックを登録する。 | |
|
||||||
| `public void `[`midi_register_songselect_callback`](#group__input__callback__reg_1gaf9aafc76a2dc4b9fdbb4106cbda6ce72)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` | ソングセレクト受信コールバックを登録する。 | |
|
||||||
| `public void `[`midi_register_tc_quarterframe_callback`](#group__input__callback__reg_1ga0a119fada2becc628cb15d753b257e6e)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` | タイムコードクォータフレーム受信コールバックを登録する。 | |
|
||||||
| `public void `[`midi_register_realtime_callback`](#group__input__callback__reg_1ga764f440e857b89084b1a07f9da2ff93a)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_one_byte_func_t func)` | リアルタイム受信コールバックを登録する。 | |
|
||||||
| `public void `[`midi_register_tunerequest_callback`](#group__input__callback__reg_1gae40ff3ce20bda79fef87da24b8321cb1)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_one_byte_func_t func)` | チューンリクエスト受信コールバックを登録する。 | |
|
||||||
| `public void `[`midi_register_sysex_callback`](#group__input__callback__reg_1ga63ce9631b025785c1848d0122d4c4c48)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_sysex_func_t func)` | システムエクスクルーシブ受信コールバックを登録する。 | |
|
||||||
| `public void `[`midi_register_fallthrough_callback`](#group__input__callback__reg_1ga7ed189164aa9682862b3181153afbd94)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t func)` | フォールスルー受信コールバックを登録する。 | |
|
||||||
| `public void `[`midi_register_catchall_callback`](#group__input__callback__reg_1ga9dbfed568d047a6cd05708f11fe39e99)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t func)` | キャッチオール受信コールバックを登録する。 | |
|
||||||
|
|
||||||
## メンバー |
|
||||||
|
|
||||||
#### `public void `[`midi_register_cc_callback`](#group__input__callback__reg_1ga64ab672abbbe393c9c4a83110c8df718)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1ga64ab672abbbe393c9c4a83110c8df718} |
|
||||||
|
|
||||||
コントロールチェンジメッセージ受信コールバックを登録する。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 関連するデバイス |
|
||||||
|
|
||||||
* `func` 登録するコールバック関数 |
|
||||||
|
|
||||||
#### `public void `[`midi_register_noteon_callback`](#group__input__callback__reg_1ga3962f276c17618923f1152779552103e)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1ga3962f276c17618923f1152779552103e} |
|
||||||
|
|
||||||
ノートオン受信コールバックを登録する。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 関連するデバイス |
|
||||||
|
|
||||||
* `func` 登録するコールバック関数 |
|
||||||
|
|
||||||
#### `public void `[`midi_register_noteoff_callback`](#group__input__callback__reg_1gac847b66051bd6d53b762958be0ec4c6d)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1gac847b66051bd6d53b762958be0ec4c6d} |
|
||||||
|
|
||||||
ノートオフ受信コールバックを登録する。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 関連するデバイス |
|
||||||
|
|
||||||
* `func` 登録するコールバック関数 |
|
||||||
|
|
||||||
#### `public void `[`midi_register_aftertouch_callback`](#group__input__callback__reg_1gaa95bc901bd9edff956a667c9a69dd01f)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1gaa95bc901bd9edff956a667c9a69dd01f} |
|
||||||
|
|
||||||
アフタータッチ受信コールバックを登録する。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 関連するデバイス |
|
||||||
|
|
||||||
* `func` 登録するコールバック関数 |
|
||||||
|
|
||||||
#### `public void `[`midi_register_pitchbend_callback`](#group__input__callback__reg_1ga071a28f02ba14f53de219be70ebd9a48)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1ga071a28f02ba14f53de219be70ebd9a48} |
|
||||||
|
|
||||||
ピッチベンド受信コールバックを登録する。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 関連するデバイス |
|
||||||
|
|
||||||
* `func` 登録するコールバック関数 |
|
||||||
|
|
||||||
#### `public void `[`midi_register_songposition_callback`](#group__input__callback__reg_1gaf2adfd79637f3553d8f26deb1ca22ed6)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_three_byte_func_t func)` {#group__input__callback__reg_1gaf2adfd79637f3553d8f26deb1ca22ed6} |
|
||||||
|
|
||||||
ソングポジション受信コールバックを登録する。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 関連するデバイス |
|
||||||
|
|
||||||
* `func` 登録するコールバック関数 |
|
||||||
|
|
||||||
#### `public void `[`midi_register_progchange_callback`](#group__input__callback__reg_1gae6ba1a35a4cde9bd15dd42f87401d127)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` {#group__input__callback__reg_1gae6ba1a35a4cde9bd15dd42f87401d127} |
|
||||||
|
|
||||||
プログラムチェンジ受信コールバックを登録する。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 関連するデバイス |
|
||||||
|
|
||||||
* `func` 登録するコールバック関数 |
|
||||||
|
|
||||||
#### `public void `[`midi_register_chanpressure_callback`](#group__input__callback__reg_1ga39b31f1f4fb93917ce039b958f21b4f5)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` {#group__input__callback__reg_1ga39b31f1f4fb93917ce039b958f21b4f5} |
|
||||||
|
|
||||||
チャンネルプレッシャー受信コールバックを登録する。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 関連するデバイス |
|
||||||
|
|
||||||
* `func` 登録するコールバック関数 |
|
||||||
|
|
||||||
#### `public void `[`midi_register_songselect_callback`](#group__input__callback__reg_1gaf9aafc76a2dc4b9fdbb4106cbda6ce72)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` {#group__input__callback__reg_1gaf9aafc76a2dc4b9fdbb4106cbda6ce72} |
|
||||||
|
|
||||||
ソングセレクト受信コールバックを登録する。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 関連するデバイス |
|
||||||
|
|
||||||
* `func` 登録するコールバック関数 |
|
||||||
|
|
||||||
#### `public void `[`midi_register_tc_quarterframe_callback`](#group__input__callback__reg_1ga0a119fada2becc628cb15d753b257e6e)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_two_byte_func_t func)` {#group__input__callback__reg_1ga0a119fada2becc628cb15d753b257e6e} |
|
||||||
|
|
||||||
タイムコードクォータフレーム受信コールバックを登録する。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 関連するデバイス |
|
||||||
|
|
||||||
* `func` 登録するコールバック関数 |
|
||||||
|
|
||||||
#### `public void `[`midi_register_realtime_callback`](#group__input__callback__reg_1ga764f440e857b89084b1a07f9da2ff93a)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_one_byte_func_t func)` {#group__input__callback__reg_1ga764f440e857b89084b1a07f9da2ff93a} |
|
||||||
|
|
||||||
リアルタイム受信コールバックを登録する。 |
|
||||||
|
|
||||||
全てのリアルタイムメッセージ型に対してコールバックが呼ばれます。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 関連するデバイス |
|
||||||
|
|
||||||
* `func` 登録するコールバック関数 |
|
||||||
|
|
||||||
#### `public void `[`midi_register_tunerequest_callback`](#group__input__callback__reg_1gae40ff3ce20bda79fef87da24b8321cb1)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_one_byte_func_t func)` {#group__input__callback__reg_1gae40ff3ce20bda79fef87da24b8321cb1} |
|
||||||
|
|
||||||
チューンリクエスト受信コールバックを登録する。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 関連するデバイス |
|
||||||
|
|
||||||
* `func` 登録するコールバック関数 |
|
||||||
|
|
||||||
#### `public void `[`midi_register_sysex_callback`](#group__input__callback__reg_1ga63ce9631b025785c1848d0122d4c4c48)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_sysex_func_t func)` {#group__input__callback__reg_1ga63ce9631b025785c1848d0122d4c4c48} |
|
||||||
|
|
||||||
システムエクスクルーシブ受信コールバックを登録する。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 関連するデバイス |
|
||||||
|
|
||||||
* `func` 登録するコールバック関数 |
|
||||||
|
|
||||||
#### `public void `[`midi_register_fallthrough_callback`](#group__input__callback__reg_1ga7ed189164aa9682862b3181153afbd94)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t func)` {#group__input__callback__reg_1ga7ed189164aa9682862b3181153afbd94} |
|
||||||
|
|
||||||
フォールスルー受信コールバックを登録する。 |
|
||||||
|
|
||||||
より具体的なコールバックが見つからない場合にのみ呼ばれます。例えば、ノートオン受信コールバックを登録していないがノートオンメッセージを受け取った場合、フォールスルー受信コールバックが登録されている場合はそれが呼ばれます。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 関連するデバイス |
|
||||||
|
|
||||||
* `func` 登録するコールバック関数 |
|
||||||
|
|
||||||
#### `public void `[`midi_register_catchall_callback`](#group__input__callback__reg_1ga9dbfed568d047a6cd05708f11fe39e99)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t func)` {#group__input__callback__reg_1ga9dbfed568d047a6cd05708f11fe39e99} |
|
||||||
|
|
||||||
キャッチオール受信コールバックを登録する。 |
|
||||||
|
|
||||||
登録されている場合は、より具体的なコールバックあるいはフォールスルー受信コールバックが登録されている場合でも、一致する全てのメッセージに対してキャッチオール受信コールバックが呼ばれます。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 関連するデバイス |
|
||||||
|
|
||||||
* `func` 登録するコールバック関数 |
|
@ -1,148 +0,0 @@ |
|||||||
# `midi_device` グループ {#group__midi__device} |
|
||||||
|
|
||||||
<!--- |
|
||||||
original document: 0.10.9:docs/internals_midi_device.md |
|
||||||
git diff 0.10.9 HEAD -- docs/internals_midi_device.md | cat |
|
||||||
--> |
|
||||||
|
|
||||||
独自の MIDI デバイスを実装する時に、関数を使います。 |
|
||||||
|
|
||||||
実際にデバイスを介してバイトを送信するために、送信関数を設定します。このメソッドは、このデバイスで例えば midi_send_cc のような送信関数を呼ぶ時に呼ばれます。 |
|
||||||
|
|
||||||
midi_device_input を使ってデバイスからの入力データを処理し、それをデバイスに関連付けられたコールバックで渡します。 |
|
||||||
|
|
||||||
デバイスのプロセス関数の最初に呼び出される関数が必要な場合、midi_device_set_pre_input_process_func を使います。通常、入力をポーリングして midi_device_input に渡します。 |
|
||||||
|
|
||||||
## 概要 |
|
||||||
|
|
||||||
メンバー | 説明 |
|
||||||
--------------------------------|--------------------------------------------- |
|
||||||
`define `[`MIDI_INPUT_QUEUE_LENGTH`](#group__midi__device_1ga4aaa419caebdca2bbdfc1331e79781a8) | |
|
||||||
`enum `[`input_state_t`](#group__midi__device_1gac203e877d3df4275ceb8e7180a61f621) | |
|
||||||
`public void `[`midi_device_input`](#group__midi__device_1gad8d3db8eb35d9cfa51ef036a0a9d70db)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t cnt,uint8_t * input)` | 入力バイトを処理します。この関数はバイトを解析し、指定されたデバイスに関連する適切なコールバックを呼びます。この関数は、カスタムデバイスを作成していて、MIDI 入力が必要な場合に使います。 |
|
||||||
`public void `[`midi_device_set_send_func`](#group__midi__device_1ga59f5a46bdd4452f186cc73d9e96d4673)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t send_func)` | 出力データバイトの送信に使われるコールバック関数を設定します。これは、カスタムデバイスを作成している場合のみ使われます。ロックを気にすることなく様々な MIDI 送信関数を呼び出すことができるように、コールバック関数で割り込みを無効にすることができます。 |
|
||||||
`public void `[`midi_device_set_pre_input_process_func`](#group__midi__device_1ga4de0841b87c04fc23cb56b6451f33b69)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_no_byte_func_t pre_process_func)` | midi_device_process 呼び出しの最初に呼ばれるコールバックを設定します。これは入力データをポーリングし、midi_device_input 関数を介してデータを送信できます。カスタムデバイスを作成している場合のみ、これを使う可能性があります。 |
|
||||||
`struct `[`_midi_device`](docs/api_midi_device.md#struct__midi__device) | この構造体は、MIDI デバイスの入出力関数と処理データを表します。 |
|
||||||
|
|
||||||
## メンバー |
|
||||||
|
|
||||||
#### `define `[`MIDI_INPUT_QUEUE_LENGTH`](#group__midi__device_1ga4aaa419caebdca2bbdfc1331e79781a8) {#group__midi__device_1ga4aaa419caebdca2bbdfc1331e79781a8} |
|
||||||
|
|
||||||
#### `enum `[`input_state_t`](#group__midi__device_1gac203e877d3df4275ceb8e7180a61f621) {#group__midi__device_1gac203e877d3df4275ceb8e7180a61f621} |
|
||||||
|
|
||||||
値 | 説明 |
|
||||||
--------------------------------|--------------------------------------------- |
|
||||||
IDLE | |
|
||||||
ONE_BYTE_MESSAGE | |
|
||||||
TWO_BYTE_MESSAGE | |
|
||||||
THREE_BYTE_MESSAGE | |
|
||||||
SYSEX_MESSAGE | |
|
||||||
|
|
||||||
#### `public void `[`midi_device_input`](#group__midi__device_1gad8d3db8eb35d9cfa51ef036a0a9d70db)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t cnt,uint8_t * input)` {#group__midi__device_1gad8d3db8eb35d9cfa51ef036a0a9d70db} |
|
||||||
|
|
||||||
入力バイトを処理します。この関数はバイトを解析し、指定されたデバイスに関連する適切なコールバックを呼びます。この関数は、カスタムデバイスを作成していて、MIDI 入力が必要な場合に使います。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 入力を関連付ける MIDI デバイス |
|
||||||
|
|
||||||
* `cnt` 処理中のバイト数 |
|
||||||
|
|
||||||
* `input` 処理するバイトデータ |
|
||||||
|
|
||||||
#### `public void `[`midi_device_set_send_func`](#group__midi__device_1ga59f5a46bdd4452f186cc73d9e96d4673)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_var_byte_func_t send_func)` {#group__midi__device_1ga59f5a46bdd4452f186cc73d9e96d4673} |
|
||||||
|
|
||||||
出力データバイトの送信に使われるコールバック関数を設定します。これは、カスタムデバイスを作成している場合のみ使われます。ロックを気にすることなく様々な MIDI 送信関数を呼び出すことができるように、コールバック関数で割り込みを無効にすることができます。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` このコールバックを関連付ける MIDI デバイス |
|
||||||
|
|
||||||
* `send_func` 送信を行うコールバック関数 |
|
||||||
|
|
||||||
#### `public void `[`midi_device_set_pre_input_process_func`](#group__midi__device_1ga4de0841b87c04fc23cb56b6451f33b69)`(`[`MidiDevice`](#struct__midi__device)` * device,midi_no_byte_func_t pre_process_func)` {#group__midi__device_1ga4de0841b87c04fc23cb56b6451f33b69} |
|
||||||
|
|
||||||
midi_device_process 呼び出しの最初に呼ばれるコールバックを設定します。これは入力データをポーリングし、midi_device_input 関数を介してデータを送信できます。カスタムデバイスを作成している場合のみ、これを使う可能性があります。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` このコールバックを関連付ける MIDI デバイス |
|
||||||
|
|
||||||
* `midi_no_byte_func_t` 実際のコールバック関数 |
|
||||||
|
|
||||||
# `_midi_device` 構造体 {#struct__midi__device} |
|
||||||
|
|
||||||
この構造体は、MIDI デバイスの入出力関数と処理データを表します。 |
|
||||||
|
|
||||||
デバイスは、実際の物理デバイス [シリアルポート、USB ポート]、または仮想デバイスを表すことができます。この構造体を直接変更する必要はありません。 |
|
||||||
|
|
||||||
## 概要 |
|
||||||
|
|
||||||
| メンバー | 説明 |
|
||||||
--------------------------------|--------------------------------------------- |
|
||||||
`public midi_var_byte_func_t `[`send_func`](docs/api_midi_device.md#struct__midi__device_1a25d4c94b4bbccd5b98f1032b469f3ff9) | |
|
||||||
`public midi_three_byte_func_t `[`input_cc_callback`](docs/api_midi_device.md#struct__midi__device_1a6da5236c1bc73877728df92d213a78d1) | |
|
||||||
`public midi_three_byte_func_t `[`input_noteon_callback`](docs/api_midi_device.md#struct__midi__device_1aa10b15cf1a7fb825a5df0d2abbe34a1c) | |
|
||||||
`public midi_three_byte_func_t `[`input_noteoff_callback`](docs/api_midi_device.md#struct__midi__device_1aaf290043078534d3a5a0ea4c840eba84) | |
|
||||||
`public midi_three_byte_func_t `[`input_aftertouch_callback`](docs/api_midi_device.md#struct__midi__device_1acb0b4901c545cec4b28b126f2d8c315f) | |
|
||||||
`public midi_three_byte_func_t `[`input_pitchbend_callback`](docs/api_midi_device.md#struct__midi__device_1a305fea672caeb996f2233bf8cd2bef18) | |
|
||||||
`public midi_three_byte_func_t `[`input_songposition_callback`](docs/api_midi_device.md#struct__midi__device_1a5f3f13638b3fef3fc561ed1bf301d586) | |
|
||||||
`public midi_two_byte_func_t `[`input_progchange_callback`](docs/api_midi_device.md#struct__midi__device_1adaf1da617c9a10a9dcad00ab1959d3da) | |
|
||||||
`public midi_two_byte_func_t `[`input_chanpressure_callback`](docs/api_midi_device.md#struct__midi__device_1ab7ca2925c539915d43974eff604d85f7) | |
|
||||||
`public midi_two_byte_func_t `[`input_songselect_callback`](docs/api_midi_device.md#struct__midi__device_1a89bed8a5a55376120cfc0a62b42f057f) | |
|
||||||
`public midi_two_byte_func_t `[`input_tc_quarterframe_callback`](docs/api_midi_device.md#struct__midi__device_1ad9813e75d22e284f9f65a907d20600f0) | |
|
||||||
`public midi_one_byte_func_t `[`input_realtime_callback`](docs/api_midi_device.md#struct__midi__device_1a9448eba4afb7e43650434748db3777be) | |
|
||||||
`public midi_one_byte_func_t `[`input_tunerequest_callback`](docs/api_midi_device.md#struct__midi__device_1a0cb8fd53e00cf1d4202d4fa04d038e8d) | |
|
||||||
`public midi_sysex_func_t `[`input_sysex_callback`](docs/api_midi_device.md#struct__midi__device_1afff9a0ce641762aaef24c1e6953ec9a2) | |
|
||||||
`public midi_var_byte_func_t `[`input_fallthrough_callback`](docs/api_midi_device.md#struct__midi__device_1abb974ec6d734001b4a0e370f292be503) | |
|
||||||
`public midi_var_byte_func_t `[`input_catchall_callback`](docs/api_midi_device.md#struct__midi__device_1aae0d535129d4fd650edc98eb3f7584f8) | |
|
||||||
`public midi_no_byte_func_t `[`pre_input_process_callback`](docs/api_midi_device.md#struct__midi__device_1aeb0bb8923d66c23d874e177dc4265754) | |
|
||||||
`public uint8_t `[`input_buffer`](docs/api_midi_device.md#struct__midi__device_1a7c5684857d6af4ebc4dc12da27bd6b2a) | |
|
||||||
`public input_state_t `[`input_state`](docs/api_midi_device.md#struct__midi__device_1a69a687d2d1c449ec15a11c07a5722e39) | |
|
||||||
`public uint16_t `[`input_count`](docs/api_midi_device.md#struct__midi__device_1a68dea8e7b6151e89c85c95caa612ee5d) | |
|
||||||
`public uint8_t `[`input_queue_data`](docs/api_midi_device.md#struct__midi__device_1ada41de021135dc423abedcbb30f366ff) | |
|
||||||
`public `[`byteQueue_t`](#structbyte_queue__t)` `[`input_queue`](#struct__midi__device_1a49c8538a8a02193c58e28a56eb695d8f) | |
|
||||||
|
|
||||||
## メンバー |
|
||||||
|
|
||||||
#### `public midi_var_byte_func_t `[`send_func`](docs/api_midi_device.md#struct__midi__device_1a25d4c94b4bbccd5b98f1032b469f3ff9) {#struct__midi__device_1a25d4c94b4bbccd5b98f1032b469f3ff9} |
|
||||||
|
|
||||||
#### `public midi_three_byte_func_t `[`input_cc_callback`](docs/api_midi_device.md#struct__midi__device_1a6da5236c1bc73877728df92d213a78d1) {#struct__midi__device_1a6da5236c1bc73877728df92d213a78d1} |
|
||||||
|
|
||||||
#### `public midi_three_byte_func_t `[`input_noteon_callback`](docs/api_midi_device.md#struct__midi__device_1aa10b15cf1a7fb825a5df0d2abbe34a1c) {#struct__midi__device_1aa10b15cf1a7fb825a5df0d2abbe34a1c} |
|
||||||
|
|
||||||
#### `public midi_three_byte_func_t `[`input_noteoff_callback`](docs/api_midi_device.md#struct__midi__device_1aaf290043078534d3a5a0ea4c840eba84) {#struct__midi__device_1aaf290043078534d3a5a0ea4c840eba84} |
|
||||||
|
|
||||||
#### `public midi_three_byte_func_t `[`input_aftertouch_callback`](docs/api_midi_device.md#struct__midi__device_1acb0b4901c545cec4b28b126f2d8c315f) {#struct__midi__device_1acb0b4901c545cec4b28b126f2d8c315f} |
|
||||||
|
|
||||||
#### `public midi_three_byte_func_t `[`input_pitchbend_callback`](docs/api_midi_device.md#struct__midi__device_1a305fea672caeb996f2233bf8cd2bef18) {#struct__midi__device_1a305fea672caeb996f2233bf8cd2bef18} |
|
||||||
|
|
||||||
#### `public midi_three_byte_func_t `[`input_songposition_callback`](docs/api_midi_device.md#struct__midi__device_1a5f3f13638b3fef3fc561ed1bf301d586) {#struct__midi__device_1a5f3f13638b3fef3fc561ed1bf301d586} |
|
||||||
|
|
||||||
#### `public midi_two_byte_func_t `[`input_progchange_callback`](docs/api_midi_device.md#struct__midi__device_1adaf1da617c9a10a9dcad00ab1959d3da) {#struct__midi__device_1adaf1da617c9a10a9dcad00ab1959d3da} |
|
||||||
|
|
||||||
#### `public midi_two_byte_func_t `[`input_chanpressure_callback`](docs/api_midi_device.md#struct__midi__device_1ab7ca2925c539915d43974eff604d85f7) {#struct__midi__device_1ab7ca2925c539915d43974eff604d85f7} |
|
||||||
|
|
||||||
#### `public midi_two_byte_func_t `[`input_songselect_callback`](docs/api_midi_device.md#struct__midi__device_1a89bed8a5a55376120cfc0a62b42f057f) {#struct__midi__device_1a89bed8a5a55376120cfc0a62b42f057f} |
|
||||||
|
|
||||||
#### `public midi_two_byte_func_t `[`input_tc_quarterframe_callback`](docs/api_midi_device.md#struct__midi__device_1ad9813e75d22e284f9f65a907d20600f0) {#struct__midi__device_1ad9813e75d22e284f9f65a907d20600f0} |
|
||||||
|
|
||||||
#### `public midi_one_byte_func_t `[`input_realtime_callback`](docs/api_midi_device.md#struct__midi__device_1a9448eba4afb7e43650434748db3777be) {#struct__midi__device_1a9448eba4afb7e43650434748db3777be} |
|
||||||
|
|
||||||
#### `public midi_one_byte_func_t `[`input_tunerequest_callback`](docs/api_midi_device.md#struct__midi__device_1a0cb8fd53e00cf1d4202d4fa04d038e8d) {#struct__midi__device_1a0cb8fd53e00cf1d4202d4fa04d038e8d} |
|
||||||
|
|
||||||
#### `public midi_sysex_func_t `[`input_sysex_callback`](docs/api_midi_device.md#struct__midi__device_1afff9a0ce641762aaef24c1e6953ec9a2) {#struct__midi__device_1afff9a0ce641762aaef24c1e6953ec9a2} |
|
||||||
|
|
||||||
#### `public midi_var_byte_func_t `[`input_fallthrough_callback`](docs/api_midi_device.md#struct__midi__device_1abb974ec6d734001b4a0e370f292be503) {#struct__midi__device_1abb974ec6d734001b4a0e370f292be503} |
|
||||||
|
|
||||||
#### `public midi_var_byte_func_t `[`input_catchall_callback`](docs/api_midi_device.md#struct__midi__device_1aae0d535129d4fd650edc98eb3f7584f8) {#struct__midi__device_1aae0d535129d4fd650edc98eb3f7584f8} |
|
||||||
|
|
||||||
#### `public midi_no_byte_func_t `[`pre_input_process_callback`](docs/api_midi_device.md#struct__midi__device_1aeb0bb8923d66c23d874e177dc4265754) {#struct__midi__device_1aeb0bb8923d66c23d874e177dc4265754} |
|
||||||
|
|
||||||
#### `public uint8_t `[`input_buffer`](docs/api_midi_device.md#struct__midi__device_1a7c5684857d6af4ebc4dc12da27bd6b2a) {#struct__midi__device_1a7c5684857d6af4ebc4dc12da27bd6b2a} |
|
||||||
|
|
||||||
#### `public input_state_t `[`input_state`](docs/api_midi_device.md#struct__midi__device_1a69a687d2d1c449ec15a11c07a5722e39) {#struct__midi__device_1a69a687d2d1c449ec15a11c07a5722e39} |
|
||||||
|
|
||||||
#### `public uint16_t `[`input_count`](docs/api_midi_device.md#struct__midi__device_1a68dea8e7b6151e89c85c95caa612ee5d) {#struct__midi__device_1a68dea8e7b6151e89c85c95caa612ee5d} |
|
||||||
|
|
||||||
#### `public uint8_t `[`input_queue_data`](docs/api_midi_device.md#struct__midi__device_1ada41de021135dc423abedcbb30f366ff) {#struct__midi__device_1ada41de021135dc423abedcbb30f366ff} |
|
||||||
|
|
||||||
#### `public `[`byteQueue_t`](#structbyte_queue__t)` `[`input_queue`](#struct__midi__device_1a49c8538a8a02193c58e28a56eb695d8f) {#struct__midi__device_1a49c8538a8a02193c58e28a56eb695d8f} |
|
||||||
|
|
@ -1,36 +0,0 @@ |
|||||||
# `midi_device_setup_process` グループ {#group__midi__device__setup__process} |
|
||||||
|
|
||||||
<!--- |
|
||||||
original document: 0.10.9:docs/internals_midi_device_setup_process.md |
|
||||||
git diff 0.10.9 HEAD -- docs/internals_midi_device_setup_process.md | cat |
|
||||||
--> |
|
||||||
|
|
||||||
これらは、デバイスを初期化して実行するために使う必要があるメソッドです。 |
|
||||||
|
|
||||||
## 概要 |
|
||||||
|
|
||||||
メンバー | 説明 |
|
||||||
--------------------------------|--------------------------------------------- |
|
||||||
`public void `[`midi_device_init`](#group__midi__device__setup__process_1gaf29deddc94ea98a59daa0bde1aefd9d9)`(`[`MidiDevice`](#struct__midi__device)` * device)` | デバイスを初期化します。 |
|
||||||
`public void `[`midi_device_process`](#group__midi__device__setup__process_1gaa3d5993d0e998a1b59bbf5ab9c7b492b)`(`[`MidiDevice`](#struct__midi__device)` * device)` | 入力データを処理します。 |
|
||||||
|
|
||||||
## メンバー |
|
||||||
|
|
||||||
#### `public void `[`midi_device_init`](#group__midi__device__setup__process_1gaf29deddc94ea98a59daa0bde1aefd9d9)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__midi__device__setup__process_1gaf29deddc94ea98a59daa0bde1aefd9d9} |
|
||||||
|
|
||||||
デバイスを初期化します。 |
|
||||||
|
|
||||||
問題のデバイスを使う前にこれを呼び出す必要があります。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 初期化するデバイス |
|
||||||
|
|
||||||
#### `public void `[`midi_device_process`](#group__midi__device__setup__process_1gaa3d5993d0e998a1b59bbf5ab9c7b492b)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__midi__device__setup__process_1gaa3d5993d0e998a1b59bbf5ab9c7b492b} |
|
||||||
|
|
||||||
入力データを処理します。 |
|
||||||
|
|
||||||
このメソッドは入力処理を駆動します。入力コールバックが呼び出されることが予想される場合は、このメソッドを頻繁に呼び出す必要があります。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 処理するデバイス |
|
||||||
|
|
@ -1,59 +0,0 @@ |
|||||||
# `midi_util` グループ {#group__midi__util} |
|
||||||
|
|
||||||
<!--- |
|
||||||
original document: 0.10.9:docs/internals_midi_util.md |
|
||||||
git diff 0.10.9 HEAD -- docs/internals_midi_util.md | cat |
|
||||||
--> |
|
||||||
|
|
||||||
## 概要 |
|
||||||
|
|
||||||
| メンバー | 説明 |
|
||||||
--------------------------------|--------------------------------------------- |
|
||||||
| `enum `[`midi_packet_length_t`](#group__midi__util_1gae29ff56aee2b430ffe53933b97e5e79e) | 可能なパケット長の値の列挙型。 |
|
||||||
| `public bool `[`midi_is_statusbyte`](#group__midi__util_1ga12e3b42ff9cbb4b4f2bc455fc8743ee5)`(uint8_t theByte)` | 指定されたバイトがステータスバイトであるかどうかを検査します。 |
|
||||||
| `public bool `[`midi_is_realtime`](#group__midi__util_1gad2f52c363e34a8000d80c983c324e2d7)`(uint8_t theByte)` | 指定されたバイトがリアルタイムメッセージであるかどうかを検査します。 |
|
||||||
| `public `[`midi_packet_length_t`](#group__midi__util_1gae29ff56aee2b430ffe53933b97e5e79e)` `[`midi_packet_length`](#group__midi__util_1gaa168b43af6ae9de0debce1625e4b8175)`(uint8_t status)` | 指定されたステータスバイトに関連付けられたパケットの長さを調べます。 |
|
||||||
|
|
||||||
## メンバー |
|
||||||
|
|
||||||
#### `enum `[`midi_packet_length_t`](#group__midi__util_1gae29ff56aee2b430ffe53933b97e5e79e) {#group__midi__util_1gae29ff56aee2b430ffe53933b97e5e79e} |
|
||||||
|
|
||||||
| 値 | 説明 |
|
||||||
--------------------------------|--------------------------------------------- |
|
||||||
UNDEFINED | |
|
||||||
ONE | |
|
||||||
TWO | |
|
||||||
THREE | |
|
||||||
|
|
||||||
可能なパケット長の値の列挙型。 |
|
||||||
|
|
||||||
#### `public bool `[`midi_is_statusbyte`](#group__midi__util_1ga12e3b42ff9cbb4b4f2bc455fc8743ee5)`(uint8_t theByte)` {#group__midi__util_1ga12e3b42ff9cbb4b4f2bc455fc8743ee5} |
|
||||||
|
|
||||||
指定されたバイトがステータスバイトであるかどうかを検査します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `theByte` 検査するバイト |
|
||||||
|
|
||||||
#### 返り値 |
|
||||||
指定されたバイトが MIDI ステータスバイトの場合は true |
|
||||||
|
|
||||||
#### `public bool `[`midi_is_realtime`](#group__midi__util_1gad2f52c363e34a8000d80c983c324e2d7)`(uint8_t theByte)` {#group__midi__util_1gad2f52c363e34a8000d80c983c324e2d7} |
|
||||||
|
|
||||||
指定されたバイトがリアルタイムメッセージであるかどうかを検査します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `theByte` 検査するバイト |
|
||||||
|
|
||||||
#### 返り値 |
|
||||||
リアルタイムメッセージの場合は true、それ以外の場合は false |
|
||||||
|
|
||||||
#### `public `[`midi_packet_length_t`](#group__midi__util_1gae29ff56aee2b430ffe53933b97e5e79e)` `[`midi_packet_length`](#group__midi__util_1gaa168b43af6ae9de0debce1625e4b8175)`(uint8_t status)` {#group__midi__util_1gaa168b43af6ae9de0debce1625e4b8175} |
|
||||||
|
|
||||||
指定されたステータスバイトに関連付けられたパケットの長さを調べます。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `status` ステータスバイト |
|
||||||
|
|
||||||
#### 返り値 |
|
||||||
パケットの長さ。バイトがステータスバイトではない場合、あるいは sysex ステータスバイトの場合は、UNDEFINED を返します。 |
|
||||||
|
|
@ -1,246 +0,0 @@ |
|||||||
# `send_functions` グループ {#group__send__functions} |
|
||||||
|
|
||||||
<!--- |
|
||||||
original document: 0.10.9:docs/internals_send_functions.md |
|
||||||
git diff 0.10.9 HEAD -- docs/internals_send_functions.md | cat |
|
||||||
--> |
|
||||||
|
|
||||||
これらは、デバイスを介して MIDI データを送信するために使う関数です。 |
|
||||||
|
|
||||||
## 概要 |
|
||||||
|
|
||||||
メンバー | 説明 |
|
||||||
--------------------------------|--------------------------------------------- |
|
||||||
`public void `[`midi_send_cc`](#group__send__functions_1gaaf884811c92df405ca8fe1a00082f960)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t val)` | 指定されたデバイスを介して、コントロールチェンジメッセージを送信します。 |
|
||||||
`public void `[`midi_send_noteon`](#group__send__functions_1ga467bcf46dbf03ec269ce565b46bc2775)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t vel)` | 指定されたデバイスを介してノートオンメッセージを送信します。 |
|
||||||
`public void `[`midi_send_noteoff`](#group__send__functions_1gaedb7d8805425eef5d47d57ddcb4c7a49)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t vel)` | 指定されたデバイスを介してノートオフメッセージを送信します。 |
|
||||||
`public void `[`midi_send_aftertouch`](#group__send__functions_1ga0014847571317a0e34b2ef46a6bc584f)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t note_num,uint8_t amt)` | 指定されたデバイスを介してアフタータッチメッセージを送信します。 |
|
||||||
`public void `[`midi_send_pitchbend`](#group__send__functions_1gae5a4a1e71611e7534be80af9ce3d3491)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,int16_t amt)` | 指定されたデバイスを介してピッチベンドメッセージを送信します。 |
|
||||||
`public void `[`midi_send_programchange`](#group__send__functions_1ga7b15588ef25e5e1ff09c2afc3151ce86)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num)` | 指定されたデバイスを介してプログラムチェンジメッセージを送信します。 |
|
||||||
`public void `[`midi_send_channelpressure`](#group__send__functions_1gaf23e69fdf812e89c0036f51f88ab2e1b)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t amt)` | 指定されたデバイスを介してチャンネルプレッシャーメッセージを送信します。 |
|
||||||
`public void `[`midi_send_clock`](#group__send__functions_1ga4e1b11a7cdb0875f6e03ce7c79c581aa)`(`[`MidiDevice`](#struct__midi__device)` * device)` | 指定されたデバイスを介してクロックメッセージを送信します。 |
|
||||||
`public void `[`midi_send_tick`](#group__send__functions_1ga2b43c7d433d940c5b907595aac947972)`(`[`MidiDevice`](#struct__midi__device)` * device)` | 指定されたデバイスを介してティックメッセージを送信します。 |
|
||||||
`public void `[`midi_send_start`](#group__send__functions_1ga1569749a8d58ccc56789289d7c7245cc)`(`[`MidiDevice`](#struct__midi__device)` * device)` | 指定されたデバイスを介してスタートメッセージを送信します。 |
|
||||||
`public void `[`midi_send_continue`](#group__send__functions_1gaed5dc29d754a27372e89ab8bc20ee120)`(`[`MidiDevice`](#struct__midi__device)` * device)` | 指定されたデバイスを介してコンティニューメッセージを送信します。 |
|
||||||
`public void `[`midi_send_stop`](#group__send__functions_1ga026e1a620276cb653ac501aa0d12a988)`(`[`MidiDevice`](#struct__midi__device)` * device)` | 指定されたデバイスを介してストップメッセージを送信します。 |
|
||||||
`public void `[`midi_send_activesense`](#group__send__functions_1ga9b6e4c6ce4719d2604187b325620db37)`(`[`MidiDevice`](#struct__midi__device)` * device)` | 指定されたデバイスを介してアクティブセンスメッセージを送信します。 |
|
||||||
`public void `[`midi_send_reset`](#group__send__functions_1ga3671e39a6d93ca9568fc493001af1b1b)`(`[`MidiDevice`](#struct__midi__device)` * device)` | 指定されたデバイスを介してリセットメッセージを送信します。 |
|
||||||
`public void `[`midi_send_tcquarterframe`](#group__send__functions_1ga5b85639910eec280bb744c934d0fd45a)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t time)` | 指定されたデバイスを介してタイムコードクォータフレームメッセージを送信します。 |
|
||||||
`public void `[`midi_send_songposition`](#group__send__functions_1gab1c9eeef3b57a8cd2e6128d18e85eb7f)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t pos)` | 指定されたデバイスを介してソングポジションメッセージを送信します。 |
|
||||||
`public void `[`midi_send_songselect`](#group__send__functions_1ga42de7838ba70d949af9a50f9facc3c50)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t song)` | 指定されたデバイスを介してソングセレクトメッセージを送信します。 |
|
||||||
`public void `[`midi_send_tunerequest`](#group__send__functions_1ga8db6c7e04d48e4d2266dd59118ca0656)`(`[`MidiDevice`](#struct__midi__device)` * device)` | 指定されたデバイスを介してチューンリクエストメッセージを送信します。 |
|
||||||
`public void `[`midi_send_byte`](#group__send__functions_1ga857e85eb90b288385642d4d991e09881)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t b)` | 指定されたデバイスを介してバイトを送信します。 |
|
||||||
`public void `[`midi_send_data`](#group__send__functions_1ga36e2f2e45369d911b76969361679054b)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t count,uint8_t byte0,uint8_t byte1,uint8_t byte2)` | 最大3バイトのデータを送信します。 |
|
||||||
`public void `[`midi_send_array`](#group__send__functions_1ga245243cb1da18d2cea18d4b18d846ead)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t count,uint8_t * array)` | フォーマットされた MIDI データの配列を送信します。 |
|
||||||
|
|
||||||
## メンバー |
|
||||||
|
|
||||||
#### `public void `[`midi_send_cc`](#group__send__functions_1gaaf884811c92df405ca8fe1a00082f960)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t val)` {#group__send__functions_1gaaf884811c92df405ca8fe1a00082f960} |
|
||||||
|
|
||||||
指定されたデバイスを介して、コントロールチェンジメッセージ(cc)を送信します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 送信に使うデバイス |
|
||||||
|
|
||||||
* `chan` 送信するチャンネル、0-15 |
|
||||||
|
|
||||||
* `num` コントロールチェンジナンバー |
|
||||||
|
|
||||||
* `val` コントロールチェンジナンバーの値 |
|
||||||
|
|
||||||
#### `public void `[`midi_send_noteon`](#group__send__functions_1ga467bcf46dbf03ec269ce565b46bc2775)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t vel)` {#group__send__functions_1ga467bcf46dbf03ec269ce565b46bc2775} |
|
||||||
|
|
||||||
指定されたデバイスを介してノートオンメッセージを送信します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 送信に使うデバイス |
|
||||||
|
|
||||||
* `chan` 送信するチャンネル、0-15 |
|
||||||
|
|
||||||
* `num` ノート番号 |
|
||||||
|
|
||||||
* `vel` ノートベロシティ |
|
||||||
|
|
||||||
#### `public void `[`midi_send_noteoff`](#group__send__functions_1gaedb7d8805425eef5d47d57ddcb4c7a49)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num,uint8_t vel)` {#group__send__functions_1gaedb7d8805425eef5d47d57ddcb4c7a49} |
|
||||||
|
|
||||||
指定されたデバイスを介してノートオフメッセージを送信します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 送信に使うデバイス |
|
||||||
|
|
||||||
* `chan` 送信するチャンネル、0-15 |
|
||||||
|
|
||||||
* `num` ノート番号 |
|
||||||
|
|
||||||
* `vel` ノートベロシティ |
|
||||||
|
|
||||||
#### `public void `[`midi_send_aftertouch`](#group__send__functions_1ga0014847571317a0e34b2ef46a6bc584f)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t note_num,uint8_t amt)` {#group__send__functions_1ga0014847571317a0e34b2ef46a6bc584f} |
|
||||||
|
|
||||||
指定されたデバイスを介してアフタータッチメッセージを送信します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 送信に使うデバイス |
|
||||||
|
|
||||||
* `chan` 送信するチャンネル、0-15 |
|
||||||
|
|
||||||
* `note_num` ノート番号 |
|
||||||
|
|
||||||
* `amt` アフタータッチ量 |
|
||||||
|
|
||||||
#### `public void `[`midi_send_pitchbend`](#group__send__functions_1gae5a4a1e71611e7534be80af9ce3d3491)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,int16_t amt)` {#group__send__functions_1gae5a4a1e71611e7534be80af9ce3d3491} |
|
||||||
|
|
||||||
指定されたデバイスを介してピッチベンドメッセージを送信します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 送信に使うデバイス |
|
||||||
|
|
||||||
* `chan` 送信するチャンネル、0-15 |
|
||||||
|
|
||||||
* `amt` ベンド量の範囲: -8192..8191、0 はベンドしないことを意味します |
|
||||||
|
|
||||||
#### `public void `[`midi_send_programchange`](#group__send__functions_1ga7b15588ef25e5e1ff09c2afc3151ce86)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t num)` {#group__send__functions_1ga7b15588ef25e5e1ff09c2afc3151ce86} |
|
||||||
|
|
||||||
指定されたデバイスを介してプログラムチェンジメッセージを送信します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 送信に使うデバイス |
|
||||||
|
|
||||||
* `chan` 送信するチャンネル、0-15 |
|
||||||
|
|
||||||
* `num` 変更先のプログラム |
|
||||||
|
|
||||||
#### `public void `[`midi_send_channelpressure`](#group__send__functions_1gaf23e69fdf812e89c0036f51f88ab2e1b)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t chan,uint8_t amt)` {#group__send__functions_1gaf23e69fdf812e89c0036f51f88ab2e1b} |
|
||||||
|
|
||||||
指定されたデバイスを介してチャンネルプレッシャーメッセージを送信します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 送信に使うデバイス |
|
||||||
|
|
||||||
* `chan` 送信するチャンネル、0-15 |
|
||||||
|
|
||||||
* `amt` チャンネルプレッシャーの量 |
|
||||||
|
|
||||||
#### `public void `[`midi_send_clock`](#group__send__functions_1ga4e1b11a7cdb0875f6e03ce7c79c581aa)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga4e1b11a7cdb0875f6e03ce7c79c581aa} |
|
||||||
|
|
||||||
指定されたデバイスを介してクロックメッセージを送信します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 送信に使うデバイス |
|
||||||
|
|
||||||
#### `public void `[`midi_send_tick`](#group__send__functions_1ga2b43c7d433d940c5b907595aac947972)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga2b43c7d433d940c5b907595aac947972} |
|
||||||
|
|
||||||
指定されたデバイスを介してティックメッセージを送信します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 送信に使うデバイス |
|
||||||
|
|
||||||
#### `public void `[`midi_send_start`](#group__send__functions_1ga1569749a8d58ccc56789289d7c7245cc)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga1569749a8d58ccc56789289d7c7245cc} |
|
||||||
|
|
||||||
指定されたデバイスを介してスタートメッセージを送信します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 送信に使うデバイス |
|
||||||
|
|
||||||
#### `public void `[`midi_send_continue`](#group__send__functions_1gaed5dc29d754a27372e89ab8bc20ee120)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1gaed5dc29d754a27372e89ab8bc20ee120} |
|
||||||
|
|
||||||
指定されたデバイスを介してコンティニューメッセージを送信します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 送信に使うデバイス |
|
||||||
|
|
||||||
#### `public void `[`midi_send_stop`](#group__send__functions_1ga026e1a620276cb653ac501aa0d12a988)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga026e1a620276cb653ac501aa0d12a988} |
|
||||||
|
|
||||||
指定されたデバイスを介してストップメッセージを送信します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 送信に使うデバイス |
|
||||||
|
|
||||||
#### `public void `[`midi_send_activesense`](#group__send__functions_1ga9b6e4c6ce4719d2604187b325620db37)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga9b6e4c6ce4719d2604187b325620db37} |
|
||||||
|
|
||||||
指定されたデバイスを介してアクティブセンスメッセージを送信します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 送信に使うデバイス |
|
||||||
|
|
||||||
#### `public void `[`midi_send_reset`](#group__send__functions_1ga3671e39a6d93ca9568fc493001af1b1b)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga3671e39a6d93ca9568fc493001af1b1b} |
|
||||||
|
|
||||||
指定されたデバイスを介してリセットメッセージを送信します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 送信に使うデバイス |
|
||||||
|
|
||||||
#### `public void `[`midi_send_tcquarterframe`](#group__send__functions_1ga5b85639910eec280bb744c934d0fd45a)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t time)` {#group__send__functions_1ga5b85639910eec280bb744c934d0fd45a} |
|
||||||
|
|
||||||
指定されたデバイスを介してタイムコードクォータフレームメッセージを送信します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 送信に使うデバイス |
|
||||||
|
|
||||||
* `time` このクォータフレームの時間。範囲は、0..16383 |
|
||||||
|
|
||||||
#### `public void `[`midi_send_songposition`](#group__send__functions_1gab1c9eeef3b57a8cd2e6128d18e85eb7f)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t pos)` {#group__send__functions_1gab1c9eeef3b57a8cd2e6128d18e85eb7f} |
|
||||||
|
|
||||||
指定されたデバイスを介してソングポジションメッセージを送信します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 送信に使うデバイス |
|
||||||
|
|
||||||
* `pos` ソングポジション |
|
||||||
|
|
||||||
#### `public void `[`midi_send_songselect`](#group__send__functions_1ga42de7838ba70d949af9a50f9facc3c50)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t song)` {#group__send__functions_1ga42de7838ba70d949af9a50f9facc3c50} |
|
||||||
|
|
||||||
指定されたデバイスを介してソングセレクトメッセージを送信します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 送信に使うデバイス |
|
||||||
|
|
||||||
* `song` 選択するソング |
|
||||||
|
|
||||||
#### `public void `[`midi_send_tunerequest`](#group__send__functions_1ga8db6c7e04d48e4d2266dd59118ca0656)`(`[`MidiDevice`](#struct__midi__device)` * device)` {#group__send__functions_1ga8db6c7e04d48e4d2266dd59118ca0656} |
|
||||||
|
|
||||||
指定されたデバイスを介してチューンリクエストメッセージを送信します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 送信に使うデバイス |
|
||||||
|
|
||||||
#### `public void `[`midi_send_byte`](#group__send__functions_1ga857e85eb90b288385642d4d991e09881)`(`[`MidiDevice`](#struct__midi__device)` * device,uint8_t b)` {#group__send__functions_1ga857e85eb90b288385642d4d991e09881} |
|
||||||
|
|
||||||
指定されたデバイスを介してバイトを送信します。 |
|
||||||
|
|
||||||
これは、指定された MIDI デバイスを介してデータを送信する一般的なメソッドです。これは、この API に実装されていない sysex データまたはメッセージがある場合、それらを送信するのに役立ちます。そのようなものを見つけた場合は、私たちがそれらを追加できるように、作者に連絡してください。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 送信に使うデバイス |
|
||||||
|
|
||||||
* `b` 送信するバイト |
|
||||||
|
|
||||||
#### `public void `[`midi_send_data`](#group__send__functions_1ga36e2f2e45369d911b76969361679054b)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t count,uint8_t byte0,uint8_t byte1,uint8_t byte2)` {#group__send__functions_1ga36e2f2e45369d911b76969361679054b} |
|
||||||
|
|
||||||
最大3バイトのデータを送信します。 |
|
||||||
|
|
||||||
これを使って sysex を通過できるように count に4の剰余が適用されます。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 送信に使うデバイス |
|
||||||
|
|
||||||
* `count` 送信するバイト数、4の剰余が適用されます |
|
||||||
|
|
||||||
* `byte0` 最初のバイト |
|
||||||
|
|
||||||
* `byte1` 2番目のバイト。cnt % 4 != 2 の場合は無視されます |
|
||||||
|
|
||||||
* `byte2` 3番目のバイト。cnt % 4 != 3 の場合は無視されます |
|
||||||
|
|
||||||
#### `public void `[`midi_send_array`](#group__send__functions_1ga245243cb1da18d2cea18d4b18d846ead)`(`[`MidiDevice`](#struct__midi__device)` * device,uint16_t count,uint8_t * array)` {#group__send__functions_1ga245243cb1da18d2cea18d4b18d846ead} |
|
||||||
|
|
||||||
フォーマットされた MIDI データの配列を送信します。 |
|
||||||
|
|
||||||
sysex に使うことができます。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `device` 送信に使うデバイス |
|
||||||
|
|
||||||
* `count` 送信するバイト数 |
|
||||||
|
|
||||||
* `array` バイトの配列 |
|
||||||
|
|
@ -1,66 +0,0 @@ |
|||||||
# `sysex_tools` グループ {#group__sysex__tools} |
|
||||||
|
|
||||||
<!--- |
|
||||||
original document: 0.10.9:docs/internals_sysex_tools.md |
|
||||||
git diff 0.10.9 HEAD -- docs/internals_sysex_tools.md | cat |
|
||||||
--> |
|
||||||
|
|
||||||
## 概要 |
|
||||||
|
|
||||||
| メンバー | 説明 |
|
||||||
--------------------------------|--------------------------------------------- |
|
||||||
| `public uint16_t `[`sysex_encoded_length`](#group__sysex__tools_1ga061e5607030412d6e62e2390d8013f0a)`(uint16_t decoded_length)` | エンコード後のメッセージの長さを計算します。 |
|
||||||
| `public uint16_t `[`sysex_decoded_length`](#group__sysex__tools_1ga121fc227d3acc1c0ea08c9a5c26fa3b0)`(uint16_t encoded_length)` | デコード後のメッセージの長さを計算します。 |
|
||||||
| `public uint16_t `[`sysex_encode`](#group__sysex__tools_1ga54d77f8d32f92a6f329daefa2b314742)`(uint8_t * encoded,const uint8_t * source,uint16_t length)` | sysex メッセージで安全に送信できるようにデータをエンコードします。 |
|
||||||
| `public uint16_t `[`sysex_decode`](#group__sysex__tools_1gaaad1d9ba2d5eca709a0ab4ba40662229)`(uint8_t * decoded,const uint8_t * source,uint16_t length)` | エンコードされたデータをデコードします。 |
|
||||||
|
|
||||||
## メンバー |
|
||||||
|
|
||||||
#### `public uint16_t `[`sysex_encoded_length`](#group__sysex__tools_1ga061e5607030412d6e62e2390d8013f0a)`(uint16_t decoded_length)` {#group__sysex__tools_1ga061e5607030412d6e62e2390d8013f0a} |
|
||||||
|
|
||||||
エンコード後のメッセージの長さを計算します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `decoded_length` エンコードするメッセージの長さのバイト数。 |
|
||||||
|
|
||||||
#### 返り値 |
|
||||||
エンコード後のメッセージの長さのバイト数。 |
|
||||||
|
|
||||||
#### `public uint16_t `[`sysex_decoded_length`](#group__sysex__tools_1ga121fc227d3acc1c0ea08c9a5c26fa3b0)`(uint16_t encoded_length)` {#group__sysex__tools_1ga121fc227d3acc1c0ea08c9a5c26fa3b0} |
|
||||||
|
|
||||||
デコード後のメッセージの長さを計算します。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `encoded_length` エンコードされたメッセージの長さのバイト数。 |
|
||||||
|
|
||||||
#### 返り値 |
|
||||||
デコードされた後のメッセージの長さのバイト数。 |
|
||||||
|
|
||||||
#### `public uint16_t `[`sysex_encode`](#group__sysex__tools_1ga54d77f8d32f92a6f329daefa2b314742)`(uint8_t * encoded,const uint8_t * source,uint16_t length)` {#group__sysex__tools_1ga54d77f8d32f92a6f329daefa2b314742} |
|
||||||
|
|
||||||
sysex メッセージで安全に送信できるようにデータをエンコードします。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `encoded` 出力データバッファは、少なくとも sysex_encoded_length(length) バイトの長さが必要です。 |
|
||||||
|
|
||||||
* `source` エンコードされるデータの入力バッファ。 |
|
||||||
|
|
||||||
* `length` 入力バッファからエンコードするバイト数。 |
|
||||||
|
|
||||||
#### 返り値 |
|
||||||
エンコードされたバイト数。 |
|
||||||
|
|
||||||
#### `public uint16_t `[`sysex_decode`](#group__sysex__tools_1gaaad1d9ba2d5eca709a0ab4ba40662229)`(uint8_t * decoded,const uint8_t * source,uint16_t length)` {#group__sysex__tools_1gaaad1d9ba2d5eca709a0ab4ba40662229} |
|
||||||
|
|
||||||
エンコードされたデータをデコードします。 |
|
||||||
|
|
||||||
#### パラメータ |
|
||||||
* `decoded` 出力データバッファは、少なくとも sysex_decoded_length(length) バイトの長さが必要です。 |
|
||||||
|
|
||||||
* `source` デコードされるデータの入力バッファ。 |
|
||||||
|
|
||||||
* `length` 入力バッファからデコードするバイト数。 |
|
||||||
|
|
||||||
#### 返り値 |
|
||||||
デコードされたバイト数。 |
|
||||||
|
|
@ -0,0 +1,163 @@ |
|||||||
|
# Adding Your Keyboard to QMK |
||||||
|
|
||||||
|
This page describes the support for [Compatible Microcontrollers](compatible_microcontrollers.md) in QMK. |
||||||
|
|
||||||
|
If you have not yet you should read the [Keyboard Guidelines](hardware_keyboard_guidelines.md) to get a sense of how keyboards fit into QMK. |
||||||
|
|
||||||
|
|
||||||
|
QMK has a number of features to simplify working with keyboards. For most, you don't have to write a single line of code. To get started, run `qmk new-keyboard`: |
||||||
|
|
||||||
|
``` |
||||||
|
$ qmk new-keyboard |
||||||
|
Ψ Generating a new QMK keyboard directory |
||||||
|
|
||||||
|
Name Your Keyboard Project |
||||||
|
For more infomation, see: |
||||||
|
https://docs.qmk.fm/#/hardware_keyboard_guidelines?id=naming-your-keyboardproject |
||||||
|
|
||||||
|
keyboard Name? mycoolkeeb |
||||||
|
|
||||||
|
Attribution |
||||||
|
Used for maintainer, copyright, etc |
||||||
|
|
||||||
|
Your GitHub Username? [jsmith] |
||||||
|
|
||||||
|
More Attribution |
||||||
|
Used for maintainer, copyright, etc |
||||||
|
|
||||||
|
Your Real Name? [John Smith] |
||||||
|
|
||||||
|
Pick Base Layout |
||||||
|
As a starting point, one of the common layouts can be used to bootstrap the process |
||||||
|
|
||||||
|
Default Layout? |
||||||
|
1. 60_ansi |
||||||
|
... |
||||||
|
50. tkl_iso |
||||||
|
51. none of the above |
||||||
|
Please enter your choice: [51] |
||||||
|
|
||||||
|
What Powers Your Project |
||||||
|
For more infomation, see: |
||||||
|
https://docs.qmk.fm/#/compatible_microcontrollers |
||||||
|
|
||||||
|
MCU? |
||||||
|
1. atmega32u4 |
||||||
|
... |
||||||
|
22. STM32F303 |
||||||
|
Please enter your choice: [12] |
||||||
|
Ψ Created a new keyboard called mycoolkeeb. |
||||||
|
Ψ To start working on things, `cd` into keyboards/mycoolkeeb, |
||||||
|
Ψ or open the directory in your preferred text editor. |
||||||
|
Ψ And build with qmk compile -kb mycoolkeeb -km default. |
||||||
|
``` |
||||||
|
|
||||||
|
This will create all the files needed to support your new keyboard, and populate the settings with default values. Now you just need to customize it for your keyboard. |
||||||
|
|
||||||
|
## `readme.md` |
||||||
|
|
||||||
|
This is where you'll describe your keyboard. Please follow the [Keyboard Readme Template](documentation_templates.md#keyboard-readmemd-template) when writing your `readme.md`. You're encouraged to place an image at the top of your `readme.md`, please use an external service such as [Imgur](https://imgur.com) to host the images. |
||||||
|
|
||||||
|
## `info.json` |
||||||
|
|
||||||
|
The `info.json` file is where you configure the hardware and feature set for your keyboard. There are a lot of options that can be placed in that file, too many to list here. For a complete overview of available options see the [Data Driven Configuration Options](reference_info_json.md) page. |
||||||
|
|
||||||
|
### Hardware Configuration |
||||||
|
|
||||||
|
At the top of the `info.json` you'll find USB related settings. These control how your keyboard appears to the Operating System. If you don't have a good reason to change you should leave the `usb.vid` as `0xFEED`. For the `usb.pid` you should pick a number that is not yet in use. |
||||||
|
|
||||||
|
Do change the `manufacturer` and `keyboard_name` lines to accurately reflect your keyboard. |
||||||
|
|
||||||
|
```json |
||||||
|
"keyboard_name": "my_awesome_keyboard", |
||||||
|
"maintainer": "You", |
||||||
|
"usb": { |
||||||
|
"vid": "0xFEED", |
||||||
|
"pid": "0x0000", |
||||||
|
"device_version": "1.0.0" |
||||||
|
}, |
||||||
|
``` |
||||||
|
|
||||||
|
?> Windows and macOS will display the `manufacturer` and `keyboard_name` in the list of USB devices. `lsusb` on Linux instead prefers the values in the list maintained by the [USB ID Repository](http://www.linux-usb.org/usb-ids.html). By default, it will only use `manufacturer` and `keyboard_name` if the list does not contain that `usb.vid` / `usb.pid`. `sudo lsusb -v` will show the values reported by the device, and they are also present in kernel logs after plugging it in. |
||||||
|
|
||||||
|
|
||||||
|
### Matrix Configuration |
||||||
|
|
||||||
|
The next section of the `info` file deals with your keyboard's matrix. The first thing you should define is which pins on your MCU are connected to rows and columns. To do so simply specify the names of those pins: |
||||||
|
|
||||||
|
```json |
||||||
|
"matrix_pins": { |
||||||
|
"cols": ["C1", "C2", "C3", "C4"], |
||||||
|
"rows": ["D1", "D2", "D3", "D4"] |
||||||
|
}, |
||||||
|
``` |
||||||
|
|
||||||
|
The size of the `matrix_pins.cols` and `matrix_pins.rows` arrays infer the size of the matrix (previously `MATRIX_ROWS` and `MATRIX_COLS`). |
||||||
|
|
||||||
|
Finally, you can specify the direction your diodes point. This can be `COL2ROW` or `ROW2COL`. |
||||||
|
|
||||||
|
```json |
||||||
|
"diode_direction": "ROW2COL", |
||||||
|
``` |
||||||
|
|
||||||
|
#### Direct Pin Matrix |
||||||
|
To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `matrix_pins.direct`. The mapping defines the pins of each switch in rows and columns, from left to right. The size of the `matrix_pins.direct` array infers the size of the matrix. Use `NO_PIN` to fill in blank spaces. Overrides the behaviour of `diode_direction`, `matrix_pins.cols` and `matrix_pins.rows`. |
||||||
|
|
||||||
|
```json |
||||||
|
"matrix_pins": { |
||||||
|
"direct": [ |
||||||
|
["F1", "E6", "B0", "B2", "B3" ], |
||||||
|
["F5", "F0", "B1", "B7", "D2" ], |
||||||
|
["F6", "F7", "C7", "D5", "D3" ], |
||||||
|
["B5", "C6", "B6", "NO_PIN", "NO_PIN"] |
||||||
|
] |
||||||
|
}, |
||||||
|
``` |
||||||
|
|
||||||
|
### Layout macros |
||||||
|
|
||||||
|
Next is configuring Layout Macro(s). These define the physical arrangement of keys, and its position within the matrix that a switch are connected to. This allows you to have a physical arrangement of keys that differs from the wiring matrix. |
||||||
|
|
||||||
|
```json |
||||||
|
"layouts": { |
||||||
|
"LAYOUT_ortho_4x4": { |
||||||
|
"layout": [ |
||||||
|
{ "matrix": [0, 0], "x": 0, "y": 0 }, |
||||||
|
{ "matrix": [0, 1], "x": 1, "y": 0 }, |
||||||
|
{ "matrix": [0, 2], "x": 2, "y": 0 }, |
||||||
|
{ "matrix": [0, 3], "x": 3, "y": 0 }, |
||||||
|
{ "matrix": [1, 0], "x": 0, "y": 1 }, |
||||||
|
{ "matrix": [1, 1], "x": 1, "y": 1 }, |
||||||
|
{ "matrix": [1, 2], "x": 2, "y": 1 }, |
||||||
|
{ "matrix": [1, 3], "x": 3, "y": 1 }, |
||||||
|
{ "matrix": [2, 0], "x": 0, "y": 2 }, |
||||||
|
{ "matrix": [2, 1], "x": 1, "y": 2 }, |
||||||
|
{ "matrix": [2, 2], "x": 2, "y": 2 }, |
||||||
|
{ "matrix": [2, 3], "x": 3, "y": 2 }, |
||||||
|
{ "matrix": [3, 0], "x": 0, "y": 3 }, |
||||||
|
{ "matrix": [3, 1], "x": 1, "y": 3 }, |
||||||
|
{ "matrix": [3, 2], "x": 2, "y": 3 }, |
||||||
|
{ "matrix": [3, 3], "x": 3, "y": 3 } |
||||||
|
] |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
``` |
||||||
|
|
||||||
|
In the above example, |
||||||
|
|
||||||
|
* `LAYOUT_ortho_4x4` defines the name of the layout macro |
||||||
|
* It must conform to [hardware_keyboard_guidelines.md#ltkeyboard_namehgt] |
||||||
|
* `"matrix": [0, 0]` defines the electrical position |
||||||
|
|
||||||
|
## Additional Configuration |
||||||
|
|
||||||
|
There are a lot of features that can be turned on or off, configured or tuned. Some of these have yet to be migrated over to [Data Driven Configuration](data_driven_config.md). The following sections cover the process for when an `info.json` option is unavailable. |
||||||
|
|
||||||
|
### Configuration Options |
||||||
|
|
||||||
|
For available options for `config.h`, you should see the [Config Options](config_options.md) page for more details. |
||||||
|
|
||||||
|
### Build Options |
||||||
|
|
||||||
|
For available options for `rules.mk`, see the [Config Options](config_options.md#feature-options) page for a detailed list and description. |
@ -0,0 +1,4 @@ |
|||||||
|
// Copyright 2022 peepeetee (@peepeetee)
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include "ada1800mini.h" |
@ -0,0 +1,38 @@ |
|||||||
|
/* Copyright 2022 peepeetee
|
||||||
|
* |
||||||
|
* This program is free software: you can redistribute it and/or modify |
||||||
|
* it under the terms of the GNU General Public License as published by |
||||||
|
* the Free Software Foundation, either version 2 of the License, or |
||||||
|
* (at your option) any later version. |
||||||
|
* |
||||||
|
* This program is distributed in the hope that it will be useful, |
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
|
* GNU General Public License for more details. |
||||||
|
* |
||||||
|
* You should have received a copy of the GNU General Public License |
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/ |
||||||
|
|
||||||
|
#pragma once |
||||||
|
|
||||||
|
#include "quantum.h" |
||||||
|
|
||||||
|
#define XXX KC_NO |
||||||
|
|
||||||
|
#define LAYOUT( \ |
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2C, K2D, K2E, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3C, K3D, K3E, K3B, \
|
||||||
|
K40, K41, K42, K43, K46, K47, K48, K4D, K4E, K4A, K4B, K4C \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, XXX, K2C, K2D, K2E }, \
|
||||||
|
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, XXX, K3B, K3C, K3D, K3E }, \
|
||||||
|
{ K40, K41, K42, K43, XXX, XXX, K46, K47, K48, XXX, K4A, K4B, K4C, K4D, K4E }, \
|
||||||
|
} |
||||||
|
|
||||||
|
// generated by KBFirmware JSON to QMK Parser
|
||||||
|
// https://noroadsleft.github.io/kbf_qmk_converter/
|
@ -0,0 +1,70 @@ |
|||||||
|
/* Copyright 2022 peepeetee
|
||||||
|
* |
||||||
|
* 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 "config_common.h" |
||||||
|
|
||||||
|
/* USB Device descriptor parameter */ |
||||||
|
#define VENDOR_ID 0xADA0 |
||||||
|
#define PRODUCT_ID 0x1800 |
||||||
|
#define DEVICE_VER 0x0001 |
||||||
|
#define MANUFACTURER Ada |
||||||
|
#define PRODUCT ada1800mini |
||||||
|
|
||||||
|
/* key matrix size */ |
||||||
|
#define MATRIX_ROWS 5 |
||||||
|
#define MATRIX_COLS 15 |
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments |
||||||
|
* |
||||||
|
* Change this to how you wired your keyboard |
||||||
|
* COLS: AVR pins used for columns, left to right |
||||||
|
* ROWS: AVR pins used for rows, top to bottom |
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) |
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) |
||||||
|
* |
||||||
|
*/ |
||||||
|
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } |
||||||
|
#define MATRIX_COL_PINS { F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, B3, B2, B1 } |
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW |
||||||
|
|
||||||
|
|
||||||
|
//TODO: implement RGB matrix when I get the hardware
|
||||||
|
#define RGB_DI_PIN F0 |
||||||
|
#ifdef RGB_DI_PIN |
||||||
|
#define RGBLED_NUM 100 |
||||||
|
#define RGBLIGHT_HUE_STEP 8 |
||||||
|
#define RGBLIGHT_SAT_STEP 8 |
||||||
|
#define RGBLIGHT_VAL_STEP 8 |
||||||
|
#define RGBLIGHT_LIMIT_VAL 200 /* The maximum brightness level */ |
||||||
|
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ |
||||||
|
#define RGBLIGHT_EFFECT_BREATHING |
||||||
|
#define RGBLIGHT_EFFECT_RAINBOW_MOOD |
||||||
|
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL |
||||||
|
#define RGBLIGHT_EFFECT_SNAKE |
||||||
|
#define RGBLIGHT_EFFECT_KNIGHT |
||||||
|
#define RGBLIGHT_EFFECT_CHRISTMAS |
||||||
|
#define RGBLIGHT_EFFECT_STATIC_GRADIENT |
||||||
|
#define RGBLIGHT_EFFECT_RGB_TEST |
||||||
|
#define RGBLIGHT_EFFECT_ALTERNATING |
||||||
|
#define RGBLIGHT_EFFECT_TWINKLE |
||||||
|
#endif |
||||||
|
|
||||||
|
// generated by KBFirmware JSON to QMK Parser
|
||||||
|
// https://noroadsleft.github.io/kbf_qmk_converter/
|
@ -0,0 +1,82 @@ |
|||||||
|
{ |
||||||
|
"keyboard_name": "ada1800mini", |
||||||
|
"url": "", |
||||||
|
"maintainer": "qmk", |
||||||
|
"layouts": { |
||||||
|
"LAYOUT": { |
||||||
|
"layout": [ |
||||||
|
{ "label": "K00 (D0,F1)", "x": 0, "y": 0 }, |
||||||
|
{ "label": "K01 (D0,F4)", "x": 1.25, "y": 0 }, |
||||||
|
{ "label": "K02 (D0,F5)", "x": 2.25, "y": 0 }, |
||||||
|
{ "label": "K03 (D0,F6)", "x": 3.25, "y": 0 }, |
||||||
|
{ "label": "K04 (D0,F7)", "x": 4.5, "y": 0 }, |
||||||
|
{ "label": "K05 (D0,C7)", "x": 5.5, "y": 0 }, |
||||||
|
{ "label": "K06 (D0,C6)", "x": 6.5, "y": 0 }, |
||||||
|
{ "label": "K07 (D0,B6)", "x": 7.5, "y": 0 }, |
||||||
|
{ "label": "K08 (D0,B5)", "x": 8.75, "y": 0 }, |
||||||
|
{ "label": "K09 (D0,B4)", "x": 9.75, "y": 0 }, |
||||||
|
{ "label": "K0A (D0,D7)", "x": 10.75, "y": 0 }, |
||||||
|
{ "label": "K0B (D0,D6)", "x": 12, "y": 0 }, |
||||||
|
{ "label": "K0C (D0,B3)", "x": 13.5, "y": 0 }, |
||||||
|
{ "label": "K0D (D0,B2)", "x": 14.5, "y": 0 }, |
||||||
|
{ "label": "K0E (D0,B1)", "x": 15.5, "y": 0 }, |
||||||
|
{ "label": "K10 (D1,F1)", "x": 0, "y": 1.25, "w": 1.5 }, |
||||||
|
{ "label": "K11 (D1,F4)", "x": 1.5, "y": 1.25 }, |
||||||
|
{ "label": "K12 (D1,F5)", "x": 2.5, "y": 1.25 }, |
||||||
|
{ "label": "K13 (D1,F6)", "x": 3.5, "y": 1.25 }, |
||||||
|
{ "label": "K14 (D1,F7)", "x": 4.5, "y": 1.25 }, |
||||||
|
{ "label": "K15 (D1,C7)", "x": 5.5, "y": 1.25 }, |
||||||
|
{ "label": "K16 (D1,C6)", "x": 6.5, "y": 1.25 }, |
||||||
|
{ "label": "K17 (D1,B6)", "x": 7.5, "y": 1.25 }, |
||||||
|
{ "label": "K18 (D1,B5)", "x": 8.5, "y": 1.25 }, |
||||||
|
{ "label": "K19 (D1,B4)", "x": 9.5, "y": 1.25 }, |
||||||
|
{ "label": "K1A (D1,D7)", "x": 10.5, "y": 1.25 }, |
||||||
|
{ "label": "K1B (D1,D6)", "x": 11.5, "y": 1.25, "w": 1.5 }, |
||||||
|
{ "label": "K1C (D1,B3)", "x": 13.5, "y": 1.25 }, |
||||||
|
{ "label": "K1D (D1,B2)", "x": 14.5, "y": 1.25 }, |
||||||
|
{ "label": "K1E (D1,B1)", "x": 15.5, "y": 1.25 }, |
||||||
|
{ "label": "K20 (D2,F1)", "x": 0, "y": 2.25, "w": 1.75 }, |
||||||
|
{ "label": "K21 (D2,F4)", "x": 1.75, "y": 2.25 }, |
||||||
|
{ "label": "K22 (D2,F5)", "x": 2.75, "y": 2.25 }, |
||||||
|
{ "label": "K23 (D2,F6)", "x": 3.75, "y": 2.25 }, |
||||||
|
{ "label": "K24 (D2,F7)", "x": 4.75, "y": 2.25 }, |
||||||
|
{ "label": "K25 (D2,C7)", "x": 5.75, "y": 2.25 }, |
||||||
|
{ "label": "K26 (D2,C6)", "x": 6.75, "y": 2.25 }, |
||||||
|
{ "label": "K27 (D2,B6)", "x": 7.75, "y": 2.25 }, |
||||||
|
{ "label": "K28 (D2,B5)", "x": 8.75, "y": 2.25 }, |
||||||
|
{ "label": "K29 (D2,B4)", "x": 9.75, "y": 2.25 }, |
||||||
|
{ "label": "K2A (D2,D7)", "x": 10.75, "y": 2.25, "w": 2.25 }, |
||||||
|
{ "label": "K2C (D2,B3)", "x": 13.5, "y": 2.25 }, |
||||||
|
{ "label": "K2D (D2,B2)", "x": 14.5, "y": 2.25 }, |
||||||
|
{ "label": "K2E (D2,B1)", "x": 15.5, "y": 2.25 }, |
||||||
|
{ "label": "K30 (D3,F1)", "x": 0, "y": 3.25, "w": 2.25 }, |
||||||
|
{ "label": "K31 (D3,F4)", "x": 2.25, "y": 3.25 }, |
||||||
|
{ "label": "K32 (D3,F5)", "x": 3.25, "y": 3.25 }, |
||||||
|
{ "label": "K33 (D3,F6)", "x": 4.25, "y": 3.25 }, |
||||||
|
{ "label": "K34 (D3,F7)", "x": 5.25, "y": 3.25 }, |
||||||
|
{ "label": "K35 (D3,C7)", "x": 6.25, "y": 3.25 }, |
||||||
|
{ "label": "K36 (D3,C6)", "x": 7.25, "y": 3.25 }, |
||||||
|
{ "label": "K37 (D3,B6)", "x": 8.25, "y": 3.25 }, |
||||||
|
{ "label": "K38 (D3,B5)", "x": 9.25, "y": 3.25 }, |
||||||
|
{ "label": "K39 (D3,B4)", "x": 10.25, "y": 3.25, "w": 1.75 }, |
||||||
|
{ "label": "K3C (D3,B3)", "x": 13.5, "y": 3.25 }, |
||||||
|
{ "label": "K3D (D3,B2)", "x": 14.5, "y": 3.25 }, |
||||||
|
{ "label": "K3E (D3,B1)", "x": 15.5, "y": 3.25 }, |
||||||
|
{ "label": "K3B (D3,D6)", "x": 12.25, "y": 3.5 }, |
||||||
|
{ "label": "K40 (D5,F1)", "x": 0, "y": 4.25, "w": 1.25 }, |
||||||
|
{ "label": "K41 (D5,F4)", "x": 1.25, "y": 4.25, "w": 1.25 }, |
||||||
|
{ "label": "K42 (D5,F5)", "x": 2.5, "y": 4.25, "w": 1.25 }, |
||||||
|
{ "label": "K43 (D5,F6)", "x": 3.75, "y": 4.25, "w": 2.75 }, |
||||||
|
{ "label": "K46 (D5,C6)", "x": 6.5, "y": 4.25, "w": 2.25 }, |
||||||
|
{ "label": "K47 (D5,B6)", "x": 8.75, "y": 4.25 }, |
||||||
|
{ "label": "K48 (D5,B5)", "x": 9.75, "y": 4.25, "w": 1.25 }, |
||||||
|
{ "label": "K4D (D5,B2)", "x": 14.5, "y": 4.25 }, |
||||||
|
{ "label": "K4E (D5,B1)", "x": 15.5, "y": 4.25 }, |
||||||
|
{ "label": "K4A (D5,D7)", "x": 11.25, "y": 4.5 }, |
||||||
|
{ "label": "K4B (D5,D6)", "x": 12.25, "y": 4.5 }, |
||||||
|
{ "label": "K4C (D5,B3)", "x": 13.25, "y": 4.5 } |
||||||
|
] |
||||||
|
} |
||||||
|
} |
||||||
|
,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" |
||||||
|
} |
@ -0,0 +1,37 @@ |
|||||||
|
/* Copyright 2022 peepeetee
|
||||||
|
* |
||||||
|
* This program is free software: you can redistribute it and/or modify |
||||||
|
* it under the terms of the GNU General Public License as published by |
||||||
|
* the Free Software Foundation, either version 2 of the License, or |
||||||
|
* (at your option) any later version. |
||||||
|
* |
||||||
|
* This program is distributed in the hope that it will be useful, |
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
|
* GNU General Public License for more details. |
||||||
|
* |
||||||
|
* You should have received a copy of the GNU General Public License |
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/ |
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H |
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
||||||
|
|
||||||
|
[0] = LAYOUT( |
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_MINS, KC_EQL, KC_NLCK, |
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_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_ENT, KC_P4, KC_P5, KC_P6, |
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_LSFT, KC_P1, KC_P2, KC_P3, KC_UP, |
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LALT, KC_LCTL, KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT |
||||||
|
), |
||||||
|
|
||||||
|
[1] = LAYOUT( |
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, |
||||||
|
RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_DEL, _______, _______, _______, |
||||||
|
_______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_SCLN, KC_QUOT, _______, _______, _______, _______, |
||||||
|
_______, RGB_TOG, RGB_MOD, _______, _______, _______, KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, KC_VOLU, |
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______ |
||||||
|
), |
||||||
|
|
||||||
|
}; |
@ -0,0 +1 @@ |
|||||||
|
# The default keymap for ada1800mini |
@ -0,0 +1,27 @@ |
|||||||
|
# ada1800mini |
||||||
|
|
||||||
|
 |
||||||
|
|
||||||
|
A per key RGB mini 1800 keyboard |
||||||
|
|
||||||
|
* Keyboard Maintainer: [peepeetee](https://github.com/peepeetee) |
||||||
|
* Hardware Supported: ada1800mini |
||||||
|
* Hardware Availability: no longer avaliable - future groupbuy possible |
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment): |
||||||
|
|
||||||
|
make ada/ada1800mini:default |
||||||
|
|
||||||
|
Flashing example for this keyboard: |
||||||
|
|
||||||
|
make ada/ada1800mini:default:flash |
||||||
|
|
||||||
|
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). |
||||||
|
|
||||||
|
## Bootloader |
||||||
|
|
||||||
|
Enter the bootloader in 3 ways: |
||||||
|
|
||||||
|
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard |
||||||
|
* **Physical reset button**: Briefly press the button on the back of the PCB |
||||||
|
* **Keycode in layout**: Press the key mapped to `RESET` if it is available |
@ -0,0 +1,22 @@ |
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = no # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = no # Enable N-Key Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
|
||||||
|
|
||||||
|
# generated by KBFirmware JSON to QMK Parser
|
||||||
|
# https://noroadsleft.github.io/kbf_qmk_converter/
|
@ -0,0 +1,126 @@ |
|||||||
|
// Copyright 2022 peepeetee (@peepeetee)
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#pragma once |
||||||
|
|
||||||
|
#include "config_common.h" |
||||||
|
|
||||||
|
/* USB Device descriptor parameter */ |
||||||
|
#define VENDOR_ID 0xADA0 |
||||||
|
#define PRODUCT_ID 0x0081 |
||||||
|
#define DEVICE_VER 0x0001 |
||||||
|
#define MANUFACTURER Ada |
||||||
|
#define PRODUCT infinity81 |
||||||
|
|
||||||
|
/* key matrix size */ |
||||||
|
#define MATRIX_ROWS 6 |
||||||
|
#define MATRIX_COLS 15 |
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments |
||||||
|
* |
||||||
|
* Change this to how you wired your keyboard |
||||||
|
* COLS: AVR pins used for columns, left to right |
||||||
|
* ROWS: AVR pins used for rows, top to bottom |
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) |
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) |
||||||
|
* |
||||||
|
*/ |
||||||
|
#define MATRIX_ROW_PINS { B3, B2, B1, B0, F6, B7 } |
||||||
|
#define MATRIX_COL_PINS { D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F5, F1, F4 } |
||||||
|
#define UNUSED_PINS |
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL */ |
||||||
|
#define DIODE_DIRECTION COL2ROW |
||||||
|
|
||||||
|
|
||||||
|
//#define LED_NUM_LOCK_PIN B0
|
||||||
|
//#define LED_CAPS_LOCK_PIN B1
|
||||||
|
//#define LED_SCROLL_LOCK_PIN B2
|
||||||
|
//#define LED_COMPOSE_PIN B3
|
||||||
|
//#define LED_KANA_PIN B4
|
||||||
|
|
||||||
|
//#define BACKLIGHT_PIN B7
|
||||||
|
//#define BACKLIGHT_LEVELS 3
|
||||||
|
//#define BACKLIGHT_BREATHING
|
||||||
|
|
||||||
|
#define RGB_DI_PIN D0 |
||||||
|
#ifdef RGB_DI_PIN |
||||||
|
# define RGBLED_NUM 107 |
||||||
|
# define RGBLIGHT_HUE_STEP 8 |
||||||
|
# define RGBLIGHT_SAT_STEP 8 |
||||||
|
# define RGBLIGHT_VAL_STEP 8 |
||||||
|
# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ |
||||||
|
# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ |
||||||
|
#define RGBLIGHT_EFFECT_BREATHING |
||||||
|
#define RGBLIGHT_EFFECT_RAINBOW_MOOD |
||||||
|
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL |
||||||
|
#define RGBLIGHT_EFFECT_SNAKE |
||||||
|
#define RGBLIGHT_EFFECT_KNIGHT |
||||||
|
#define RGBLIGHT_EFFECT_CHRISTMAS |
||||||
|
#define RGBLIGHT_EFFECT_STATIC_GRADIENT |
||||||
|
#define RGBLIGHT_EFFECT_RGB_TEST |
||||||
|
#define RGBLIGHT_EFFECT_ALTERNATING |
||||||
|
#define RGBLIGHT_EFFECT_TWINKLE |
||||||
|
#endif |
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ |
||||||
|
#define DEBOUNCE 5 |
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */ |
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* 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 |
||||||
|
|
||||||
|
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||||
|
* This is useful for the Windows task manager shortcut (ctrl+shift+esc). |
||||||
|
*/ |
||||||
|
//#define GRAVE_ESC_CTRL_OVERRIDE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Force NKRO |
||||||
|
* |
||||||
|
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved |
||||||
|
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the |
||||||
|
* makefile for this to work.) |
||||||
|
* |
||||||
|
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) |
||||||
|
* until the next keyboard reset. |
||||||
|
* |
||||||
|
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is |
||||||
|
* fully operational during normal computer usage. |
||||||
|
* |
||||||
|
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) |
||||||
|
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by |
||||||
|
* bootmagic, NKRO mode will always be enabled until it is toggled again during a |
||||||
|
* power-up. |
||||||
|
* |
||||||
|
*/ |
||||||
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
/* disable these deprecated features by default */ |
||||||
|
#define NO_ACTION_MACRO |
||||||
|
#define NO_ACTION_FUNCTION |
||||||
|
|
||||||
|
/* Bootmagic Lite key configuration */ |
||||||
|
//#define BOOTMAGIC_LITE_ROW 0
|
||||||
|
//#define BOOTMAGIC_LITE_COLUMN 0
|
@ -0,0 +1,4 @@ |
|||||||
|
// Copyright 2022 peepeetee (@peepeetee)
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include "infinity81.h" |
@ -0,0 +1,30 @@ |
|||||||
|
// Copyright 2022 peepeetee (@peepeetee)
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#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( \ |
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \
|
||||||
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
|
||||||
|
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \
|
||||||
|
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
|
||||||
|
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \
|
||||||
|
K500, K501, K502, K505, K510, K511, K512, K513, K514 \
|
||||||
|
) { \
|
||||||
|
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, KC_NO }, \
|
||||||
|
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
|
||||||
|
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \
|
||||||
|
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \
|
||||||
|
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414 }, \
|
||||||
|
{ K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, K514 } \
|
||||||
|
} |
@ -0,0 +1,92 @@ |
|||||||
|
{ |
||||||
|
"keyboard_name": "infinity81", |
||||||
|
"url": "", |
||||||
|
"maintainer": "qmk", |
||||||
|
"layouts": { |
||||||
|
"LAYOUT": { |
||||||
|
"layout": [ |
||||||
|
{ "label": "K00 (B3,D1)", "x": 0, "y": 0 }, |
||||||
|
{ "label": "K01 (B3,D2)", "x": 1.25, "y": 0 }, |
||||||
|
{ "label": "K02 (B3,D3)", "x": 2.25, "y": 0 }, |
||||||
|
{ "label": "K03 (B3,D5)", "x": 3.25, "y": 0 }, |
||||||
|
{ "label": "K04 (B3,D4)", "x": 4.25, "y": 0 }, |
||||||
|
{ "label": "K05 (B3,D6)", "x": 5.5, "y": 0 }, |
||||||
|
{ "label": "K06 (B3,D7)", "x": 6.5, "y": 0 }, |
||||||
|
{ "label": "K07 (B3,B4)", "x": 7.5, "y": 0 }, |
||||||
|
{ "label": "K08 (B3,B5)", "x": 8.5, "y": 0 }, |
||||||
|
{ "label": "K09 (B3,B6)", "x": 9.75, "y": 0 }, |
||||||
|
{ "label": "K0A (B3,C6)", "x": 10.75, "y": 0 }, |
||||||
|
{ "label": "K0B (B3,C7)", "x": 11.75, "y": 0 }, |
||||||
|
{ "label": "K0C (B3,F5)", "x": 12.75, "y": 0 }, |
||||||
|
{ "label": "K10 (B2,D1)", "x": 0, "y": 1.25 }, |
||||||
|
{ "label": "K11 (B2,D2)", "x": 1, "y": 1.25 }, |
||||||
|
{ "label": "K12 (B2,D3)", "x": 2, "y": 1.25 }, |
||||||
|
{ "label": "K13 (B2,D5)", "x": 3, "y": 1.25 }, |
||||||
|
{ "label": "K14 (B2,D4)", "x": 4, "y": 1.25 }, |
||||||
|
{ "label": "K15 (B2,D6)", "x": 5, "y": 1.25 }, |
||||||
|
{ "label": "K16 (B2,D7)", "x": 6, "y": 1.25 }, |
||||||
|
{ "label": "K17 (B2,B4)", "x": 7, "y": 1.25 }, |
||||||
|
{ "label": "K18 (B2,B5)", "x": 8, "y": 1.25 }, |
||||||
|
{ "label": "K19 (B2,B6)", "x": 9, "y": 1.25 }, |
||||||
|
{ "label": "K1A (B2,C6)", "x": 10, "y": 1.25 }, |
||||||
|
{ "label": "K1B (B2,C7)", "x": 11, "y": 1.25 }, |
||||||
|
{ "label": "K1C (B2,F5)", "x": 12, "y": 1.25 }, |
||||||
|
{ "label": "K1D (B2,F1)", "x": 13, "y": 1.25, "w": 2 }, |
||||||
|
{ "label": "K1E (B2,F4)", "x": 15, "y": 1.25 }, |
||||||
|
{ "label": "K20 (B1,D1)", "x": 0, "y": 2.25, "w": 1.5 }, |
||||||
|
{ "label": "K21 (B1,D2)", "x": 1.5, "y": 2.25 }, |
||||||
|
{ "label": "K22 (B1,D3)", "x": 2.5, "y": 2.25 }, |
||||||
|
{ "label": "K23 (B1,D5)", "x": 3.5, "y": 2.25 }, |
||||||
|
{ "label": "K24 (B1,D4)", "x": 4.5, "y": 2.25 }, |
||||||
|
{ "label": "K25 (B1,D6)", "x": 5.5, "y": 2.25 }, |
||||||
|
{ "label": "K26 (B1,D7)", "x": 6.5, "y": 2.25 }, |
||||||
|
{ "label": "K27 (B1,B4)", "x": 7.5, "y": 2.25 }, |
||||||
|
{ "label": "K28 (B1,B5)", "x": 8.5, "y": 2.25 }, |
||||||
|
{ "label": "K29 (B1,B6)", "x": 9.5, "y": 2.25 }, |
||||||
|
{ "label": "K2A (B1,C6)", "x": 10.5, "y": 2.25 }, |
||||||
|
{ "label": "K2B (B1,C7)", "x": 11.5, "y": 2.25 }, |
||||||
|
{ "label": "K2C (B1,F5)", "x": 12.5, "y": 2.25 }, |
||||||
|
{ "label": "K2D (B1,F1)", "x": 13.5, "y": 2.25, "w": 1.5 }, |
||||||
|
{ "label": "K2E (B1,F4)", "x": 15, "y": 2.25 }, |
||||||
|
{ "label": "K30 (B0,D1)", "x": 0, "y": 3.25, "w": 1.75 }, |
||||||
|
{ "label": "K31 (B0,D2)", "x": 1.75, "y": 3.25 }, |
||||||
|
{ "label": "K32 (B0,D3)", "x": 2.75, "y": 3.25 }, |
||||||
|
{ "label": "K33 (B0,D5)", "x": 3.75, "y": 3.25 }, |
||||||
|
{ "label": "K34 (B0,D4)", "x": 4.75, "y": 3.25 }, |
||||||
|
{ "label": "K35 (B0,D6)", "x": 5.75, "y": 3.25 }, |
||||||
|
{ "label": "K36 (B0,D7)", "x": 6.75, "y": 3.25 }, |
||||||
|
{ "label": "K37 (B0,B4)", "x": 7.75, "y": 3.25 }, |
||||||
|
{ "label": "K38 (B0,B5)", "x": 8.75, "y": 3.25 }, |
||||||
|
{ "label": "K39 (B0,B6)", "x": 9.75, "y": 3.25 }, |
||||||
|
{ "label": "K3A (B0,C6)", "x": 10.75, "y": 3.25 }, |
||||||
|
{ "label": "K3B (B0,C7)", "x": 11.75, "y": 3.25 }, |
||||||
|
{ "label": "K3D (B0,F1)", "x": 12.75, "y": 3.25, "w": 2.25 }, |
||||||
|
{ "label": "K3E (B0,F4)", "x": 15, "y": 3.25 }, |
||||||
|
{ "label": "K40 (F6,D1)", "x": 0, "y": 4.25, "w": 2.25 }, |
||||||
|
{ "label": "K41 (F6,D2)", "x": 2.25, "y": 4.25 }, |
||||||
|
{ "label": "K42 (F6,D3)", "x": 3.25, "y": 4.25 }, |
||||||
|
{ "label": "K43 (F6,D5)", "x": 4.25, "y": 4.25 }, |
||||||
|
{ "label": "K44 (F6,D4)", "x": 5.25, "y": 4.25 }, |
||||||
|
{ "label": "K45 (F6,D6)", "x": 6.25, "y": 4.25 }, |
||||||
|
{ "label": "K46 (F6,D7)", "x": 7.25, "y": 4.25 }, |
||||||
|
{ "label": "K47 (F6,B4)", "x": 8.25, "y": 4.25 }, |
||||||
|
{ "label": "K48 (F6,B5)", "x": 9.25, "y": 4.25 }, |
||||||
|
{ "label": "K49 (F6,B6)", "x": 10.25, "y": 4.25 }, |
||||||
|
{ "label": "K4A (F6,C6)", "x": 11.25, "y": 4.25 }, |
||||||
|
{ "label": "K4B (F6,C7)", "x": 12.25, "y": 4.25, "w": 1.75 }, |
||||||
|
{ "label": "K4D (F6,F1)", "x": 14, "y": 4.25 }, |
||||||
|
{ "label": "K4E (F6,F4)", "x": 15, "y": 4.25 }, |
||||||
|
{ "label": "K50 (B7,D1)", "x": 0, "y": 5.25, "w": 1.25 }, |
||||||
|
{ "label": "K51 (B7,D2)", "x": 1.25, "y": 5.25, "w": 1.25 }, |
||||||
|
{ "label": "K52 (B7,D3)", "x": 2.5, "y": 5.25, "w": 1.25 }, |
||||||
|
{ "label": "K55 (B7,D6)", "x": 3.75, "y": 5.25, "w": 6.25 }, |
||||||
|
{ "label": "K5A (B7,C6)", "x": 10, "y": 5.25, "w": 1.25 }, |
||||||
|
{ "label": "K5B (B7,C7)", "x": 11.25, "y": 5.25, "w": 1.25 }, |
||||||
|
{ "label": "K5C (B7,F5)", "x": 13, "y": 5.25 }, |
||||||
|
{ "label": "K5D (B7,F1)", "x": 14, "y": 5.25 }, |
||||||
|
{ "label": "K5E (B7,F4)", "x": 15, "y": 5.25 } |
||||||
|
] |
||||||
|
} |
||||||
|
} |
||||||
|
,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" |
||||||
|
} |
@ -0,0 +1,23 @@ |
|||||||
|
// Copyright 2022 peepeetee (@peepeetee)
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
||||||
|
[0] = LAYOUT( |
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, |
||||||
|
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_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_PGUP, |
||||||
|
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_PGDN, |
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, MO(1), |
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT), |
||||||
|
[1] = LAYOUT( |
||||||
|
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
||||||
|
KC_TRNS, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
||||||
|
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) |
||||||
|
}; |
@ -0,0 +1 @@ |
|||||||
|
# The default keymap for infinity81 |
@ -0,0 +1,27 @@ |
|||||||
|
# infinity81 |
||||||
|
|
||||||
|
 |
||||||
|
|
||||||
|
A per key RGB 75% with blocker keyboard |
||||||
|
|
||||||
|
* Keyboard Maintainer: [peepeetee](https://github.com/peepeetee) |
||||||
|
* Hardware Supported: infinity81 |
||||||
|
* Hardware Availability: no longer avaliable - future groupbuy possible |
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment): |
||||||
|
|
||||||
|
make ada/infinity81:default |
||||||
|
|
||||||
|
Flashing example for this keyboard: |
||||||
|
|
||||||
|
make ada/infinity81:default:flash |
||||||
|
|
||||||
|
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). |
||||||
|
|
||||||
|
## Bootloader |
||||||
|
|
||||||
|
Enter the bootloader in 3 ways: |
||||||
|
|
||||||
|
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard |
||||||
|
* **Physical reset button**: Briefly press the button on the back of the PCB |
||||||
|
* **Keycode in layout**: Press the key mapped to `RESET` if it is available |
@ -0,0 +1,18 @@ |
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
|
||||||
|
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
|
||||||
|
NKRO_ENABLE = no # Enable N-Key Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
@ -0,0 +1,226 @@ |
|||||||
|
/* Copyright 2021 OpenAnnePro community
|
||||||
|
* |
||||||
|
* 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 "hal.h" |
||||||
|
#include "annepro2.h" |
||||||
|
#include "annepro2_ble.h" |
||||||
|
#include "spi_master.h" |
||||||
|
#include "ap2_led.h" |
||||||
|
#include "protocol.h" |
||||||
|
|
||||||
|
#define RAM_MAGIC_LOCATION 0x20001ffc |
||||||
|
#define IAP_MAGIC_VALUE 0x0000fab2 |
||||||
|
|
||||||
|
static const SerialConfig led_uart_init_config = { |
||||||
|
.speed = 115200, |
||||||
|
}; |
||||||
|
|
||||||
|
#ifndef LED_UART_BAUD_RATE |
||||||
|
# define LED_UART_BAUD_RATE 115200 |
||||||
|
#endif // LED_UART_BAUD_RATE
|
||||||
|
|
||||||
|
static const SerialConfig led_uart_runtine_config = { |
||||||
|
.speed = LED_UART_BAUD_RATE, |
||||||
|
}; |
||||||
|
|
||||||
|
static const SerialConfig ble_uart_config = { |
||||||
|
.speed = 115200, |
||||||
|
}; |
||||||
|
|
||||||
|
static uint8_t led_mcu_wakeup[11] = {0x7b, 0x10, 0x43, 0x10, 0x03, 0x00, 0x00, 0x7d, 0x02, 0x01, 0x02}; |
||||||
|
|
||||||
|
ble_capslock_t ble_capslock = {._dummy = {0}, .caps_lock = false}; |
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_ENABLE |
||||||
|
static uint8_t current_rgb_row = 0; |
||||||
|
#endif |
||||||
|
|
||||||
|
void bootloader_jump(void) { |
||||||
|
// Send msg to shine to boot into IAP
|
||||||
|
ap2_set_IAP(); |
||||||
|
|
||||||
|
// wait for shine to boot into IAP
|
||||||
|
wait_ms(15); |
||||||
|
|
||||||
|
// Load ble into IAP
|
||||||
|
annepro2_ble_bootload(); |
||||||
|
wait_ms(15); |
||||||
|
|
||||||
|
// Magic key to set keyboard to IAP
|
||||||
|
// It’s from reversing original boot loader
|
||||||
|
// If value is that it stays in boot loader aka IAP
|
||||||
|
*((uint32_t *)RAM_MAGIC_LOCATION) = IAP_MAGIC_VALUE; |
||||||
|
|
||||||
|
// Load the main MCU into IAP
|
||||||
|
__disable_irq(); |
||||||
|
NVIC_SystemReset(); |
||||||
|
} |
||||||
|
|
||||||
|
void keyboard_pre_init_kb(void) { |
||||||
|
// Start LED UART
|
||||||
|
sdStart(&SD0, &led_uart_init_config); |
||||||
|
/* Let the LED chip settle a bit before switching the mode.
|
||||||
|
* That helped at least one person. */ |
||||||
|
wait_ms(15); |
||||||
|
sdWrite(&SD0, led_mcu_wakeup, sizeof(led_mcu_wakeup)); |
||||||
|
|
||||||
|
// wait to receive response from wakeup
|
||||||
|
wait_ms(15); |
||||||
|
|
||||||
|
proto_init(&proto, led_command_callback); |
||||||
|
|
||||||
|
// loop to clear out receive buffer from shine wakeup
|
||||||
|
while (!sdGetWouldBlock(&SD0)) sdGet(&SD0); |
||||||
|
|
||||||
|
sdStart(&SD0, &led_uart_runtine_config); |
||||||
|
keyboard_pre_init_user(); |
||||||
|
} |
||||||
|
|
||||||
|
void keyboard_post_init_kb(void) { |
||||||
|
// Start BLE UART
|
||||||
|
sdStart(&SD1, &ble_uart_config); |
||||||
|
annepro2_ble_startup(); |
||||||
|
|
||||||
|
// Give the send uart thread some time to
|
||||||
|
// send out the queue before we read back
|
||||||
|
wait_ms(100); |
||||||
|
|
||||||
|
// loop to clear out receive buffer from ble wakeup
|
||||||
|
while (!sdGetWouldBlock(&SD1)) sdGet(&SD1); |
||||||
|
|
||||||
|
ap2_led_get_status(); |
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_ENABLE |
||||||
|
ap2_led_enable(); |
||||||
|
#endif |
||||||
|
|
||||||
|
keyboard_post_init_user(); |
||||||
|
} |
||||||
|
|
||||||
|
void matrix_scan_kb() { |
||||||
|
// if there's stuff on the ble serial buffer
|
||||||
|
// read it into the capslock struct
|
||||||
|
while (!sdGetWouldBlock(&SD1)) { |
||||||
|
sdReadTimeout(&SD1, (uint8_t *)&ble_capslock, sizeof(ble_capslock_t), 10); |
||||||
|
} |
||||||
|
|
||||||
|
/* While there's data from LED keyboard sent - read it. */ |
||||||
|
while (!sdGetWouldBlock(&SD0)) { |
||||||
|
uint8_t byte = sdGet(&SD0); |
||||||
|
proto_consume(&proto, byte); |
||||||
|
} |
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_ENABLE |
||||||
|
/* If there's data ready to be sent to LED MCU - send it. */ |
||||||
|
if(rgb_row_changed[current_rgb_row]) |
||||||
|
{ |
||||||
|
rgb_row_changed[current_rgb_row] = 0; |
||||||
|
ap2_led_mask_set_row(current_rgb_row); |
||||||
|
} |
||||||
|
current_rgb_row = (current_rgb_row + 1) % NUM_ROW; |
||||||
|
#endif |
||||||
|
|
||||||
|
matrix_scan_user(); |
||||||
|
} |
||||||
|
|
||||||
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record) { |
||||||
|
if (record->event.pressed) { |
||||||
|
if (ap2_led_status.matrix_enabled && ap2_led_status.is_reactive) { |
||||||
|
ap2_led_forward_keypress(record->event.key.row, record->event.key.col); |
||||||
|
} |
||||||
|
|
||||||
|
const ap2_led_t blue = { |
||||||
|
.p.blue = 0xff, |
||||||
|
.p.red = 0x00, |
||||||
|
.p.green = 0x00, |
||||||
|
.p.alpha = 0xff, |
||||||
|
}; |
||||||
|
|
||||||
|
switch (keycode) { |
||||||
|
case KC_AP2_BT1: |
||||||
|
annepro2_ble_broadcast(0); |
||||||
|
/* FIXME: This hardcodes col/row position */ |
||||||
|
ap2_led_blink(0, 1, blue, 8, 50); |
||||||
|
return false; |
||||||
|
|
||||||
|
case KC_AP2_BT2: |
||||||
|
annepro2_ble_broadcast(1); |
||||||
|
ap2_led_blink(0, 2, blue, 8, 50); |
||||||
|
return false; |
||||||
|
|
||||||
|
case KC_AP2_BT3: |
||||||
|
annepro2_ble_broadcast(2); |
||||||
|
ap2_led_blink(0, 3, blue, 8, 50); |
||||||
|
return false; |
||||||
|
|
||||||
|
case KC_AP2_BT4: |
||||||
|
annepro2_ble_broadcast(3); |
||||||
|
ap2_led_blink(0, 4, blue, 8, 50); |
||||||
|
return false; |
||||||
|
|
||||||
|
case KC_AP2_USB: |
||||||
|
annepro2_ble_disconnect(); |
||||||
|
return false; |
||||||
|
|
||||||
|
case KC_AP2_BT_UNPAIR: |
||||||
|
annepro2_ble_unpair(); |
||||||
|
return false; |
||||||
|
|
||||||
|
case KC_AP_LED_OFF: |
||||||
|
ap2_led_disable(); |
||||||
|
break; |
||||||
|
|
||||||
|
case KC_AP_LED_ON: |
||||||
|
if (ap2_led_status.matrix_enabled) { |
||||||
|
ap2_led_next_profile(); |
||||||
|
} else { |
||||||
|
ap2_led_enable(); |
||||||
|
} |
||||||
|
ap2_led_reset_foreground_color(); |
||||||
|
break; |
||||||
|
|
||||||
|
case KC_AP_LED_NEXT_PROFILE: |
||||||
|
ap2_led_next_profile(); |
||||||
|
ap2_led_reset_foreground_color(); |
||||||
|
break; |
||||||
|
|
||||||
|
case KC_AP_LED_PREV_PROFILE: |
||||||
|
ap2_led_prev_profile(); |
||||||
|
ap2_led_reset_foreground_color(); |
||||||
|
break; |
||||||
|
|
||||||
|
case KC_AP_LED_NEXT_INTENSITY: |
||||||
|
ap2_led_next_intensity(); |
||||||
|
ap2_led_reset_foreground_color(); |
||||||
|
return false; |
||||||
|
|
||||||
|
case KC_AP_LED_SPEED: |
||||||
|
ap2_led_next_animation_speed(); |
||||||
|
ap2_led_reset_foreground_color(); |
||||||
|
return false; |
||||||
|
#ifdef RGB_MATRIX_ENABLE |
||||||
|
case RGB_TOG: |
||||||
|
if(rgb_matrix_is_enabled()) ap2_led_disable(); |
||||||
|
else ap2_led_enable(); |
||||||
|
return true; |
||||||
|
#endif |
||||||
|
|
||||||
|
default: |
||||||
|
break; |
||||||
|
} |
||||||
|
} |
||||||
|
return process_record_user(keycode, record); |
||||||
|
} |
@ -0,0 +1,65 @@ |
|||||||
|
/*
|
||||||
|
* Copyright (c) 2018 Yaotian Feng |
||||||
|
* |
||||||
|
* 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" |
||||||
|
#include <stdint.h> |
||||||
|
#include "ap2_led.h" |
||||||
|
|
||||||
|
typedef struct __attribute__((__packed__)) { |
||||||
|
uint8_t _dummy[10]; |
||||||
|
bool caps_lock; |
||||||
|
} ble_capslock_t; |
||||||
|
extern ble_capslock_t ble_capslock; |
||||||
|
|
||||||
|
// Matrix keymap
|
||||||
|
// clang-format off
|
||||||
|
#define LAYOUT_60_ansi( \ |
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
|
||||||
|
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \
|
||||||
|
K40, K42, K43, K46, K49, K4A, K4B, K4C \
|
||||||
|
) { \
|
||||||
|
/* COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9 COL10 COL11 COL12 COL13 COL14*/ \
|
||||||
|
/* ROW1 */ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
|
||||||
|
/* ROW2 */ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
|
||||||
|
/* ROW3 */ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO}, \
|
||||||
|
/* ROW4 */ { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO}, \
|
||||||
|
/* ROW5 */ { K40, KC_NO, K42, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, K49, K4A, K4B, K4C, KC_NO}, \
|
||||||
|
} |
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
enum AP2KeyCodes { |
||||||
|
KC_AP2_BT1 = SAFE_RANGE, |
||||||
|
KC_AP2_BT2, |
||||||
|
KC_AP2_BT3, |
||||||
|
KC_AP2_BT4, |
||||||
|
KC_AP2_BT_UNPAIR, |
||||||
|
KC_AP2_USB, |
||||||
|
KC_AP_LED_ON, |
||||||
|
KC_AP_LED_OFF, |
||||||
|
KC_AP_LED_NEXT_PROFILE, |
||||||
|
KC_AP_LED_PREV_PROFILE, |
||||||
|
KC_AP_LED_NEXT_INTENSITY, |
||||||
|
KC_AP_LED_SPEED, |
||||||
|
AP2_SAFE_RANGE, |
||||||
|
}; |
||||||
|
|
||||||
|
#undef SAFE_RANGE |
||||||
|
#define SAFE_RANGE AP2_SAFE_RANGE |
||||||
|
|
@ -0,0 +1,170 @@ |
|||||||
|
/*
|
||||||
|
Copyright (C) 2020 Yaotian Feng, Codetector<codetector@codetector.cn> |
||||||
|
|
||||||
|
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. |
||||||
|
*/ |
||||||
|
|
||||||
|
#include "annepro2_ble.h" |
||||||
|
#include "ch.h" |
||||||
|
#include "hal.h" |
||||||
|
#include "host.h" |
||||||
|
#include "host_driver.h" |
||||||
|
#include "report.h" |
||||||
|
|
||||||
|
/* -------------------- Static Function Prototypes -------------------------- */ |
||||||
|
static uint8_t ap2_ble_leds(void); |
||||||
|
static void ap2_ble_mouse(report_mouse_t *report); |
||||||
|
static void ap2_ble_system(uint16_t data); |
||||||
|
static void ap2_ble_consumer(uint16_t data); |
||||||
|
static void ap2_ble_keyboard(report_keyboard_t *report); |
||||||
|
|
||||||
|
static void ap2_ble_swtich_ble_driver(void); |
||||||
|
|
||||||
|
/* -------------------- Static Local Variables ------------------------------ */ |
||||||
|
static host_driver_t ap2_ble_driver = { |
||||||
|
ap2_ble_leds, ap2_ble_keyboard, ap2_ble_mouse, ap2_ble_system, ap2_ble_consumer, |
||||||
|
}; |
||||||
|
|
||||||
|
static uint8_t ble_mcu_wakeup[11] = {0x7b, 0x12, 0x53, 0x00, 0x03, 0x00, 0x01, 0x7d, 0x02, 0x01, 0x02}; |
||||||
|
|
||||||
|
static uint8_t ble_mcu_start_broadcast[11] = { |
||||||
|
0x7b, 0x12, 0x53, 0x00, 0x03, 0x00, 0x00, 0x7d, 0x40, 0x01, 0x00 // Broadcast ID[0-3]
|
||||||
|
}; |
||||||
|
|
||||||
|
static uint8_t ble_mcu_connect[11] = { |
||||||
|
0x7b, 0x12, 0x53, 0x00, 0x03, 0x00, 0x00, 0x7d, 0x40, 0x04, 0x00 // Connect ID [0-3]
|
||||||
|
}; |
||||||
|
|
||||||
|
static uint8_t ble_mcu_send_report[10] = { |
||||||
|
0x7b, 0x12, 0x53, 0x00, 0x0A, 0x00, 0x00, 0x7d, 0x10, 0x04, |
||||||
|
}; |
||||||
|
|
||||||
|
static uint8_t ble_mcu_send_consumer_report[10] = { |
||||||
|
0x7b, 0x12, 0x53, 0x00, 0x06, 0x00, 0x00, 0x7d, 0x10, 0x08, |
||||||
|
}; |
||||||
|
|
||||||
|
static uint8_t ble_mcu_unpair[10] = { |
||||||
|
0x7b, 0x12, 0x53, 0x00, 0x02, 0x00, 0x00, 0x7d, 0x40, 0x05, |
||||||
|
}; |
||||||
|
|
||||||
|
static uint8_t ble_mcu_bootload[11] = {0x7b, 0x10, 0x51, 0x10, 0x03, 0x00, 0x00, 0x7d, 0x02, 0x01, 0x01}; |
||||||
|
|
||||||
|
static host_driver_t *last_host_driver = NULL; |
||||||
|
#ifdef NKRO_ENABLE |
||||||
|
static bool lastNkroStatus = false; |
||||||
|
#endif // NKRO_ENABLE
|
||||||
|
|
||||||
|
/* -------------------- Public Function Implementation ---------------------- */ |
||||||
|
|
||||||
|
void annepro2_ble_bootload(void) { sdWrite(&SD1, ble_mcu_bootload, sizeof(ble_mcu_bootload)); } |
||||||
|
|
||||||
|
void annepro2_ble_startup(void) { sdWrite(&SD1, ble_mcu_wakeup, sizeof(ble_mcu_wakeup)); } |
||||||
|
|
||||||
|
void annepro2_ble_broadcast(uint8_t port) { |
||||||
|
if (port > 3) { |
||||||
|
port = 3; |
||||||
|
} |
||||||
|
// sdPut(&SD1, 0x00);
|
||||||
|
sdWrite(&SD1, ble_mcu_start_broadcast, sizeof(ble_mcu_start_broadcast)); |
||||||
|
sdPut(&SD1, port); |
||||||
|
static int lastBroadcast = -1; |
||||||
|
if (lastBroadcast == port) { |
||||||
|
annepro2_ble_connect(port); |
||||||
|
} |
||||||
|
lastBroadcast = port; |
||||||
|
} |
||||||
|
|
||||||
|
void annepro2_ble_connect(uint8_t port) { |
||||||
|
if (port > 3) { |
||||||
|
port = 3; |
||||||
|
} |
||||||
|
sdWrite(&SD1, ble_mcu_connect, sizeof(ble_mcu_connect)); |
||||||
|
sdPut(&SD1, port); |
||||||
|
ap2_ble_swtich_ble_driver(); |
||||||
|
} |
||||||
|
|
||||||
|
void annepro2_ble_disconnect(void) { |
||||||
|
/* Skip if the driver is already enabled */ |
||||||
|
if (host_get_driver() != &ap2_ble_driver) { |
||||||
|
return; |
||||||
|
} |
||||||
|
|
||||||
|
clear_keyboard(); |
||||||
|
#ifdef NKRO_ENABLE |
||||||
|
keymap_config.nkro = lastNkroStatus; |
||||||
|
#endif |
||||||
|
host_set_driver(last_host_driver); |
||||||
|
} |
||||||
|
|
||||||
|
void annepro2_ble_unpair(void) { |
||||||
|
// sdPut(&SD1, 0x0);
|
||||||
|
sdWrite(&SD1, ble_mcu_unpair, sizeof(ble_mcu_unpair)); |
||||||
|
} |
||||||
|
|
||||||
|
/* ------------------- Static Function Implementation ----------------------- */ |
||||||
|
static void ap2_ble_swtich_ble_driver(void) { |
||||||
|
if (host_get_driver() == &ap2_ble_driver) { |
||||||
|
return; |
||||||
|
} |
||||||
|
clear_keyboard(); |
||||||
|
last_host_driver = host_get_driver(); |
||||||
|
#ifdef NKRO_ENABLE |
||||||
|
lastNkroStatus = keymap_config.nkro; |
||||||
|
#endif |
||||||
|
keymap_config.nkro = false; |
||||||
|
host_set_driver(&ap2_ble_driver); |
||||||
|
} |
||||||
|
|
||||||
|
static uint8_t ap2_ble_leds(void) { |
||||||
|
return 0; // TODO: Figure out how to obtain LED status
|
||||||
|
} |
||||||
|
|
||||||
|
static void ap2_ble_mouse(report_mouse_t *report) {} |
||||||
|
|
||||||
|
static void ap2_ble_system(uint16_t data) {} |
||||||
|
|
||||||
|
static inline uint16_t CONSUMER2AP2(uint16_t usage) { |
||||||
|
switch (usage) { |
||||||
|
case AUDIO_VOL_DOWN: |
||||||
|
return 0x04; |
||||||
|
case AUDIO_VOL_UP: |
||||||
|
return 0x02; |
||||||
|
case AUDIO_MUTE: |
||||||
|
return 0x01; |
||||||
|
case TRANSPORT_PLAY_PAUSE: |
||||||
|
return 0x08; |
||||||
|
case TRANSPORT_NEXT_TRACK: |
||||||
|
return 0x10; |
||||||
|
case TRANSPORT_PREV_TRACK: |
||||||
|
return 0x20; |
||||||
|
default: |
||||||
|
return 0x00; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
static void ap2_ble_consumer(uint16_t data) { |
||||||
|
sdPut(&SD1, 0x0); |
||||||
|
sdWrite(&SD1, ble_mcu_send_consumer_report, sizeof(ble_mcu_send_consumer_report)); |
||||||
|
sdPut(&SD1, CONSUMER2AP2(data)); |
||||||
|
static const uint8_t dummy[3] = {0}; |
||||||
|
sdWrite(&SD1, dummy, sizeof(dummy)); |
||||||
|
} |
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief Send keyboard HID report for Bluetooth driver |
||||||
|
*/ |
||||||
|
static void ap2_ble_keyboard(report_keyboard_t *report) { |
||||||
|
sdPut(&SD1, 0x0); |
||||||
|
sdWrite(&SD1, ble_mcu_send_report, sizeof(ble_mcu_send_report)); |
||||||
|
sdWrite(&SD1, &report->raw[0], KEYBOARD_REPORT_SIZE); |
||||||
|
} |
@ -0,0 +1,27 @@ |
|||||||
|
/*
|
||||||
|
Copyright (C) 2020 Yaotian Feng, Codetector<codetector@codetector.cn> |
||||||
|
|
||||||
|
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. |
||||||
|
*/ |
||||||
|
|
||||||
|
#pragma once |
||||||
|
|
||||||
|
#include "annepro2.h" |
||||||
|
#include "quantum.h" |
||||||
|
|
||||||
|
void annepro2_ble_bootload(void); |
||||||
|
void annepro2_ble_startup(void); |
||||||
|
void annepro2_ble_broadcast(uint8_t port); |
||||||
|
void annepro2_ble_connect(uint8_t port); |
||||||
|
void annepro2_ble_disconnect(void); |
||||||
|
void annepro2_ble_unpair(void); |
@ -0,0 +1,135 @@ |
|||||||
|
/* Copyright 2021 OpenAnnePro community
|
||||||
|
* |
||||||
|
* 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 <string.h> |
||||||
|
#include <stdio.h> |
||||||
|
#include "hal.h" |
||||||
|
#include "annepro2.h" |
||||||
|
#include "ap2_led.h" |
||||||
|
#include "protocol.h" |
||||||
|
|
||||||
|
ap2_led_t led_mask[KEY_COUNT]; |
||||||
|
ap2_led_status_t ap2_led_status; |
||||||
|
uint8_t rgb_row_changed[NUM_ROW]; |
||||||
|
|
||||||
|
void led_command_callback(const message_t *msg) { |
||||||
|
switch (msg->command) { |
||||||
|
case CMD_LED_STATUS: |
||||||
|
ap2_led_status.amount_of_profiles = msg->payload[0]; |
||||||
|
ap2_led_status.current_profile = msg->payload[1]; |
||||||
|
ap2_led_status.matrix_enabled = msg->payload[2]; |
||||||
|
ap2_led_status.is_reactive = msg->payload[3]; |
||||||
|
ap2_led_status.led_intensity = msg->payload[4]; |
||||||
|
ap2_led_status.errors = msg->payload[5]; |
||||||
|
break; |
||||||
|
|
||||||
|
#ifdef CONSOLE_ENABLE |
||||||
|
case CMD_LED_DEBUG: |
||||||
|
/* TODO: Don't use printf. */ |
||||||
|
printf("LED:"); |
||||||
|
for (int i = 0; i < msg->payload_size; i++) { |
||||||
|
printf("%02x ", msg->payload[i]); |
||||||
|
} |
||||||
|
for (int i = 0; i < msg->payload_size; i++) { |
||||||
|
printf("%c", msg->payload[i]); |
||||||
|
} |
||||||
|
printf("\n"); |
||||||
|
break; |
||||||
|
#endif |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
void ap2_set_IAP(void) { proto_tx(CMD_LED_IAP, NULL, 0, 3); } |
||||||
|
|
||||||
|
void ap2_led_disable(void) { proto_tx(CMD_LED_OFF, NULL, 0, 3); } |
||||||
|
|
||||||
|
void ap2_led_enable(void) { proto_tx(CMD_LED_ON, NULL, 0, 3); } |
||||||
|
|
||||||
|
void ap2_led_set_profile(uint8_t prof) { proto_tx(CMD_LED_SET_PROFILE, &prof, sizeof(prof), 3); } |
||||||
|
|
||||||
|
void ap2_led_get_status() { proto_tx(CMD_LED_GET_STATUS, NULL, 0, 3); } |
||||||
|
|
||||||
|
void ap2_led_next_profile() { proto_tx(CMD_LED_NEXT_PROFILE, NULL, 0, 3); } |
||||||
|
|
||||||
|
void ap2_led_next_intensity() { proto_tx(CMD_LED_NEXT_INTENSITY, NULL, 0, 3); } |
||||||
|
|
||||||
|
void ap2_led_next_animation_speed() { proto_tx(CMD_LED_NEXT_ANIMATION_SPEED, NULL, 0, 3); } |
||||||
|
|
||||||
|
void ap2_led_prev_profile() { proto_tx(CMD_LED_PREV_PROFILE, NULL, 0, 3); } |
||||||
|
|
||||||
|
void ap2_led_mask_set_key(uint8_t row, uint8_t col, ap2_led_t color) { |
||||||
|
uint8_t payload[] = {row, col, color.p.blue, color.p.green, color.p.red, color.p.alpha}; |
||||||
|
proto_tx(CMD_LED_MASK_SET_KEY, payload, sizeof(payload), 1); |
||||||
|
} |
||||||
|
|
||||||
|
/* Push a whole local row to the shine */ |
||||||
|
void ap2_led_mask_set_row(uint8_t row) { |
||||||
|
uint8_t payload[NUM_COLUMN * sizeof(ap2_led_t) + 1]; |
||||||
|
payload[0] = row; |
||||||
|
memcpy(payload + 1, &led_mask[ROWCOL2IDX(row, 0)], sizeof(*led_mask) * NUM_COLUMN); |
||||||
|
proto_tx(CMD_LED_MASK_SET_ROW, payload, sizeof(payload), 1); |
||||||
|
} |
||||||
|
|
||||||
|
/* Synchronize all rows */ |
||||||
|
void ap2_led_mask_set_all(void) { |
||||||
|
for (int row = 0; row < 5; row++) ap2_led_mask_set_row(row); |
||||||
|
} |
||||||
|
|
||||||
|
/* Set all keys to a given color */ |
||||||
|
void ap2_led_mask_set_mono(const ap2_led_t color) { proto_tx(CMD_LED_MASK_SET_MONO, (uint8_t *)&color, sizeof(color), 1); } |
||||||
|
|
||||||
|
void ap2_led_blink(uint8_t row, uint8_t col, ap2_led_t color, uint8_t count, uint8_t hundredths) { |
||||||
|
uint8_t payload[] = {row, col, color.p.blue, color.p.green, color.p.red, color.p.alpha, count, hundredths}; |
||||||
|
proto_tx(CMD_LED_KEY_BLINK, payload, sizeof(payload), 1); |
||||||
|
} |
||||||
|
|
||||||
|
void ap2_led_set_foreground_color(uint8_t red, uint8_t green, uint8_t blue) { |
||||||
|
ap2_led_t color = {.p.red = red, .p.green = green, .p.blue = blue, .p.alpha = 0xff}; |
||||||
|
ap2_led_mask_set_mono(color); |
||||||
|
} |
||||||
|
|
||||||
|
void ap2_led_reset_foreground_color() { |
||||||
|
ap2_led_t color = { |
||||||
|
.p.red = 0, |
||||||
|
.p.green = 0, |
||||||
|
.p.blue = 0, |
||||||
|
.p.alpha = 0, |
||||||
|
}; |
||||||
|
ap2_led_mask_set_mono(color); |
||||||
|
} |
||||||
|
|
||||||
|
/*
|
||||||
|
* Currently keypresses are unified with other messages, still with single 1 |
||||||
|
* byte payload. Transfer is normally fast enough for that to not be a problem - |
||||||
|
* especially with asynchronous message reading. |
||||||
|
* |
||||||
|
* |
||||||
|
* Previous description: |
||||||
|
* If enabled, this data is sent to LED MCU on every keypress. |
||||||
|
* In order to improve performance, both row and column values |
||||||
|
* are packed into a single byte. |
||||||
|
* Row range is [0, 4] and requires only 3 bits. |
||||||
|
* Column range is [0, 13] and requires 4 bits. |
||||||
|
* |
||||||
|
* In order to differentiate this command from regular commands, |
||||||
|
* the leftmost bit is set to 1 (0b10000000). |
||||||
|
* Following it are 3 bits of row and 4 bits of col. |
||||||
|
* 1 + 3 + 4 = 8 bits - only a single byte is sent for every keypress. |
||||||
|
*/ |
||||||
|
void ap2_led_forward_keypress(uint8_t row, uint8_t col) { |
||||||
|
const uint8_t payload = row << 4 | col; |
||||||
|
proto_tx(CMD_LED_KEY_DOWN, &payload, 1, 1); |
||||||
|
} |
@ -0,0 +1,93 @@ |
|||||||
|
/* Copyright 2021 OpenAnnePro community
|
||||||
|
* |
||||||
|
* 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 "protocol.h" |
||||||
|
|
||||||
|
// Struct defining an LED and its RGB color components
|
||||||
|
// Compatible with Shine firmware.
|
||||||
|
typedef union { |
||||||
|
struct { |
||||||
|
/* Little endian ordering to match uint32_t */ |
||||||
|
uint8_t blue, green, red; |
||||||
|
/* Used in mask; nonzero means - use color from mask. */ |
||||||
|
uint8_t alpha; |
||||||
|
} p; /* parts */ |
||||||
|
/* Parts vector access: 0 - blue, 1 - green, 2 - red */ |
||||||
|
uint8_t pv[4]; |
||||||
|
/* 0xrgb in mem is b g r a */ |
||||||
|
uint32_t rgb; |
||||||
|
} ap2_led_t; |
||||||
|
|
||||||
|
#define ROWCOL2IDX(row, col) (NUM_COLUMN * (row) + (col)) |
||||||
|
#define NUM_COLUMN 14 |
||||||
|
#define NUM_ROW 5 |
||||||
|
#define KEY_COUNT 70 |
||||||
|
|
||||||
|
/* Local copy of led_mask, used to override colors on the board */ |
||||||
|
extern ap2_led_t led_mask[KEY_COUNT]; |
||||||
|
extern uint8_t rgb_row_changed[NUM_ROW]; |
||||||
|
|
||||||
|
/* Handle incoming messages */ |
||||||
|
extern void led_command_callback(const message_t *msg); |
||||||
|
|
||||||
|
void ap2_set_IAP(void); |
||||||
|
void ap2_led_disable(void); |
||||||
|
void ap2_led_enable(void); |
||||||
|
void ap2_led_set_profile(uint8_t prof); |
||||||
|
void ap2_led_get_status(void); |
||||||
|
void ap2_led_next_profile(void); |
||||||
|
void ap2_led_prev_profile(void); |
||||||
|
void ap2_led_next_intensity(void); |
||||||
|
void ap2_led_next_animation_speed(void); |
||||||
|
void ap2_led_forward_keypress(uint8_t row, uint8_t col); |
||||||
|
|
||||||
|
/* Set single key to a given color; alpha controls which is displayed */ |
||||||
|
void ap2_led_mask_set_key(uint8_t row, uint8_t col, ap2_led_t color); |
||||||
|
/* Push a whole local row to the shine */ |
||||||
|
void ap2_led_mask_set_row(uint8_t row); |
||||||
|
/* Synchronize all rows */ |
||||||
|
void ap2_led_mask_set_all(void); |
||||||
|
|
||||||
|
/* Set all keys to a given color */ |
||||||
|
void ap2_led_mask_set_mono(ap2_led_t color); |
||||||
|
|
||||||
|
/* Blink given key `count` times by masking it with a `color`. Blink takes `hundredths` of a second */ |
||||||
|
void ap2_led_blink(uint8_t row, uint8_t col, ap2_led_t color, uint8_t count, uint8_t hundredths); |
||||||
|
|
||||||
|
/* Kept for compatibility, but implemented using masks */ |
||||||
|
void ap2_led_set_foreground_color(uint8_t red, uint8_t green, uint8_t blue); |
||||||
|
void ap2_led_reset_foreground_color(void); |
||||||
|
|
||||||
|
typedef struct { |
||||||
|
uint8_t amount_of_profiles; |
||||||
|
uint8_t current_profile; |
||||||
|
uint8_t matrix_enabled; |
||||||
|
uint8_t is_reactive; |
||||||
|
uint8_t led_intensity; |
||||||
|
uint8_t errors; |
||||||
|
} ap2_led_status_t; |
||||||
|
|
||||||
|
extern ap2_led_status_t ap2_led_status; |
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_ENABLE |
||||||
|
/* RGB driver functions */ |
||||||
|
void init(void); |
||||||
|
void flush(void); |
||||||
|
void set_color(int index, uint8_t r, uint8_t g, uint8_t b); |
||||||
|
void set_color_all(uint8_t r, uint8_t g, uint8_t b); |
||||||
|
#endif |
@ -0,0 +1,103 @@ |
|||||||
|
/*
|
||||||
|
Copyright (C) 2020 Yaotian Feng, Codetector<codetector@codetector.cn> |
||||||
|
|
||||||
|
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. |
||||||
|
*/ |
||||||
|
|
||||||
|
#include "hal.h" |
||||||
|
|
||||||
|
/* ============ Private Defines ===================== */ |
||||||
|
|
||||||
|
/* ============ Function Prototypes ================== */ |
||||||
|
|
||||||
|
#define PBIT(PORT, LINE) ((PAL_PORT(LINE) == PORT) ? (1 << PAL_PAD(LINE)) : 0) |
||||||
|
#define PAFIO_L(PORT, LINE, AF) (((PAL_PORT(LINE) == PORT) && (PAL_PAD(LINE) < 8)) ? (AF << (PAL_PAD(LINE) << 2)) : 0) |
||||||
|
#define PAFIO_H(PORT, LINE, AF) (((PAL_PORT(LINE) == PORT) && (PAL_PAD(LINE) >= 8)) ? (AF << ((PAL_PAD(LINE) - 8) << 2)) : 0) |
||||||
|
#define PAFIO(PORT, N, LINE, AF) ((N) ? PAFIO_H(PORT, LINE, AF) : PAFIO_L(PORT, LINE, AF)) |
||||||
|
|
||||||
|
#define OUT_BITS(PORT) (PBIT(PORT, C2) | PBIT(PORT, C1) | PBIT(PORT, B5) | PBIT(PORT, B4) | PBIT(PORT, C3) | 0) |
||||||
|
|
||||||
|
#define IN_BITS(PORT) (PBIT(PORT, C4) | PBIT(PORT, C5) | PBIT(PORT, B10) | PBIT(PORT, B11) | PBIT(PORT, C0) | PBIT(PORT, A15) | PBIT(PORT, A8) | PBIT(PORT, A10) | PBIT(PORT, A11) | PBIT(PORT, A12) | PBIT(PORT, A13) | PBIT(PORT, A14) | PBIT(PORT, B2) | PBIT(PORT, B3) | 0) |
||||||
|
|
||||||
|
// Alternate Functions
|
||||||
|
#define AF_BITS(PORT, N) (PAFIO(PORT, N, LINE_UART_RX, AFIO_USART) | PAFIO(PORT, N, LINE_UART_TX, AFIO_USART) | PAFIO(PORT, N, LINE_BT_UART_TX, AFIO_USART) | PAFIO(PORT, N, LINE_BT_UART_RX, AFIO_USART) | PAFIO(PORT, N, C2, AFIO_GPIO) | PAFIO(PORT, N, C1, AFIO_GPIO) | PAFIO(PORT, N, B5, AFIO_GPIO) | PAFIO(PORT, N, B4, AFIO_GPIO) | PAFIO(PORT, N, C3, AFIO_GPIO) | PAFIO(PORT, N, C4, AFIO_GPIO) | PAFIO(PORT, N, C5, AFIO_GPIO) | PAFIO(PORT, N, B10, AFIO_GPIO) | PAFIO(PORT, N, B11, AFIO_GPIO) | PAFIO(PORT, N, C0, AFIO_GPIO) | PAFIO(PORT, N, A15, AFIO_GPIO) | PAFIO(PORT, N, A8, AFIO_GPIO) | PAFIO(PORT, N, A10, AFIO_GPIO) | PAFIO(PORT, N, A11, AFIO_GPIO) | PAFIO(PORT, N, A12, AFIO_GPIO) | PAFIO(PORT, N, A13, AFIO_GPIO) | PAFIO(PORT, N, A14, AFIO_GPIO) | PAFIO(PORT, N, B2, AFIO_GPIO) | PAFIO(PORT, N, B3, AFIO_GPIO) | 0) |
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief PAL setup. |
||||||
|
* @details Digital I/O ports static configuration as defined in @p board.h. |
||||||
|
* This variable is used by the HAL when initializing the PAL driver. |
||||||
|
*/ |
||||||
|
const PALConfig pal_default_config = { |
||||||
|
// GPIO A
|
||||||
|
.setup[0] = |
||||||
|
{ |
||||||
|
.DIR = OUT_BITS(IOPORTA), |
||||||
|
.INE = IN_BITS(IOPORTA), |
||||||
|
.PU = IN_BITS(IOPORTA), |
||||||
|
.PD = 0x0000, |
||||||
|
.OD = 0x0000, |
||||||
|
.DRV = 0x0000, |
||||||
|
.LOCK = 0x0000, |
||||||
|
.OUT = 0x0000, |
||||||
|
.CFG[0] = AF_BITS(IOPORTA, 0), |
||||||
|
.CFG[1] = AF_BITS(IOPORTA, 1), |
||||||
|
}, |
||||||
|
// GPIO B
|
||||||
|
.setup[1] = |
||||||
|
{ |
||||||
|
.DIR = OUT_BITS(IOPORTB), |
||||||
|
.INE = IN_BITS(IOPORTB), |
||||||
|
.PU = IN_BITS(IOPORTB), |
||||||
|
.PD = 0x0000, |
||||||
|
.OD = 0x0000, |
||||||
|
.DRV = 0x0000, |
||||||
|
.LOCK = 0x0000, |
||||||
|
.OUT = 0x0000, |
||||||
|
.CFG[0] = AF_BITS(IOPORTB, 0), |
||||||
|
.CFG[1] = AF_BITS(IOPORTB, 1), |
||||||
|
}, |
||||||
|
// GPIO C
|
||||||
|
.setup[2] = |
||||||
|
{ |
||||||
|
.DIR = OUT_BITS(IOPORTC), |
||||||
|
.INE = IN_BITS(IOPORTC), |
||||||
|
.PU = IN_BITS(IOPORTC), |
||||||
|
.PD = 0x0000, |
||||||
|
.OD = 0x0000, |
||||||
|
.DRV = 0x0000, |
||||||
|
.LOCK = 0x0000, |
||||||
|
.OUT = 0x0000, |
||||||
|
.CFG[0] = AF_BITS(IOPORTC, 0), |
||||||
|
.CFG[1] = AF_BITS(IOPORTC, 1), |
||||||
|
}, |
||||||
|
// GPIO D
|
||||||
|
.setup[3] = |
||||||
|
{ |
||||||
|
.DIR = OUT_BITS(IOPORTD), |
||||||
|
.INE = IN_BITS(IOPORTD), |
||||||
|
.PU = IN_BITS(IOPORTD), |
||||||
|
.PD = 0x0000, |
||||||
|
.OD = 0x0000, |
||||||
|
.DRV = 0x0000, |
||||||
|
.LOCK = 0x0000, |
||||||
|
.OUT = 0x0000, |
||||||
|
.CFG[0] = AF_BITS(IOPORTD, 0), |
||||||
|
.CFG[1] = AF_BITS(IOPORTD, 1), |
||||||
|
}, |
||||||
|
.ESSR[0] = 0x00000000, |
||||||
|
.ESSR[1] = 0x00000000, |
||||||
|
}; |
||||||
|
|
||||||
|
void __early_init(void) { ht32_clock_init(); } |
||||||
|
|
||||||
|
void boardInit(void) {} |
@ -0,0 +1,39 @@ |
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2020 Codetector <codetector@codetector.cn> |
||||||
|
|
||||||
|
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. |
||||||
|
*/ |
||||||
|
|
||||||
|
#pragma once |
||||||
|
/*
|
||||||
|
* Setup for Anne Pro 2 board. |
||||||
|
*/ |
||||||
|
|
||||||
|
/*
|
||||||
|
* Board identifier. |
||||||
|
*/ |
||||||
|
#define BOARD_NAME "Anne Pro 2" |
||||||
|
|
||||||
|
#define HT32F52342 |
||||||
|
|
||||||
|
#define FLASH_SIZE (0x10000 - 0x4000) // 64kB - 16kB
|
||||||
|
|
||||||
|
#if !defined(_FROM_ASM_) |
||||||
|
#ifdef __cplusplus |
||||||
|
extern "C" { |
||||||
|
#endif |
||||||
|
void boardInit(void); |
||||||
|
#ifdef __cplusplus |
||||||
|
} |
||||||
|
#endif |
||||||
|
#endif /* _FROM_ASM_ */ |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue