Compare commits

..
23 Commits
Author SHA1 Message Date
fauxpark fb02593bd4 Use os.chdir for qmk docs instead of a custom HTTP request handler (#7493) 2019-11-29 15:45:22 -08:00
Callum Oakley c0dbd81b2b [keymap] personal keymap tweaks (#7510)
* replace home and end with cmd-left and cmd-right for iOS compatability

* tab left and right with cmd-shift-bracket instead of ctrl-tab for Blink compatability

* cmd-up and cmd-down instead of pg-up pg-down for blink shell compatability

* Revert "cmd-up and cmd-down instead of pg-up pg-down for blink shell compatability"

This reverts commit e976af9f11f77933f272edc22faf971445a65717.

* reorganised symbol layer

* update link in readme
2019-11-30 09:10:01 +11:00
Nick Brassel 385454e602 Fix output file permissions when using docker build. (#7378) 2019-11-29 13:01:21 +00:00
fauxpark 7164e8eeb5 Add yet another dictionary for the QMK Firmware docs sidebar heading (#7504) 2019-11-28 22:14:04 +00:00
Manna Harbour f9521ffa21 Add shift-to-invert to remaining directional RGB_* keycode pairs (#7484)
* Add shift-to-invert to remaining directional RGB_* keycode pairs

RGB_MODE_FORWARD / RGB_MODE_REVERSE invert their functions when shift is held.
This change adds the same capabilities to the remaining directional RGB_*
keycode pairs.  This improves consistency and provides full RGB control in a
keymap containing only one keycode from each pair.

* remove redundant variable

* fix typo

* Fix more typos

Flyspell is on now I swear!
2019-11-28 22:00:29 +00:00
Joel Challis 2048df8832 Compile out some keycode processing when features are disabled (#7506) 2019-11-28 21:59:59 +00:00
Joel Challis 99f3321e26 Fix processing of RGB keycodes on slave half (#7404) 2019-11-28 21:59:14 +00:00
Joel Challis 235da6973d Install bootloadHid as part of qmk_install (#7463)
* Install bootloadHid on macos

* Install bootloadHid on windows

* Highlight bootloadHID is now installed in docs

* Update udev rules for bootloadHID

* Install bootloadHid on some distros

* fix caterina udev filename
2019-11-28 15:29:11 +00:00
stanrc85 5c41fa6062 [Keymap] Userspace updates (#7500)
* Convert macro to use new QMK CLI and other cleanup

* use \n instead of ss enter
2019-11-27 22:55:29 -08:00
MechMerlin 99a58aa2b8 [Keyboard] New Keyboard: J-01 (#7494)
* initial commit

* create the appropriate LAYOUT macro

* ANSI FOREVER

* Update keyboards/jae/j01/config.h

Changing it to use the Esc key for bootmagic lite

* Update keyboards/jae/j01/readme.md

* Update keyboards/jae/j01/readme.md

* Update keyboards/jae/j01/info.json

* Update keyboards/jae/j01/readme.md

* Update keyboards/jae/j01/info.json

* remove file as per fauxpark comments
2019-11-27 18:50:35 -08:00
James Young 4ae87ab40a Community Layout support (and minor tidying) for KBD8X MK2 (#7449)
* Community Layout support for KBD8X MK2

- add LAYOUT_tkl_ansi and LAYOUT_tkl_iso layout macros
- add default_tkl_iso keymap, using new layout macro
- rename ansi_625 keymap to default_tkl_ansi, using new layout macro
- change keymaps to four-space indent
- update info.json
- remove firmware size impacts from rules.mk

* remove empty functions

* rename the ANSI and ISO keymaps per fauxpark
2019-11-27 22:16:18 +00:00
XScorpion2 7e62705877 Revert split encoder fixes until able to repro a better fix (#7498)
Temporarily removing to avoid disabling split keyboards with Rotary Encoders, irisv3/4 and Sol, while @XScorpion2 works on a more permanent fix.
2019-11-27 14:04:30 -08:00
Yan-Fa Liandfauxpark 1604f79623 clean up quantum.c (#7485)
* idea

* progress

* more stuff

* wip

* wip

* last couple of keycodes you can move safely

* Update quantum/quantum.c

Co-Authored-By: fauxpark <[email protected]>

* Put back RGB_MODE_BREATHE
2019-11-27 14:00:23 -08:00
yuleiandDrashna Jaelre 265c415f5e adding noah keyboard (#7432)
* adding noah keyboard

* Update keyboards/matrix/noah/config.h

Co-Authored-By: Drashna Jaelre <[email protected]>

* Update keyboards/matrix/noah/noah.c

Co-Authored-By: Drashna Jaelre <[email protected]>
2019-11-27 07:54:02 -08:00
heliarmk 2b318ba01b [Keyboard] add keyboard wm1 (#7466)
* add new keyborad wm1

* 删除print信息

* add info.json and modified the default keymap.c

* add keyboard name and maintainer in info.json

* add readme.md file for new keyboard

* add default/keymap/readme.md

* modified the main readme file

* change keyboard name from wm1 to wm1_hotswap

* update readme

* update imgur link in readme

* update readme to add more pic and subtopic

* change wm1 keyboard pic to direct show up

* add copyright to config.h

* modified the info.json to change the label

* set the debug config to no in rule.mk

* rename wn1.c wm1.h to wm1_hotswap.c, wm1_hotswap.h

* fix  spelling mistake

* update the rule.mk to new version

* fix the LED operation in wm1_hotswap.c

* delete the definition of kc_trns

* change layout to conform to electrical position

* delete backslashes in keymap.c

* update info.json according to the layout

* change the return of led_update_kb

* delete unused comments in rule.mk

* delete unused definition in wm1_hotswap.h

* add a if statement to support user override func

* fix comment in rules.mk
2019-11-26 16:51:32 -08:00
Stephen Tudor 2f3adc3e24 Adjust Fn key and right arrow cluster of GH60/Satan keymap (#7490) 2019-11-26 23:23:29 +00:00
James Young 57581ad733 Fix typos in stale.yml (#7489) 2019-11-26 21:45:18 +00:00
Kemmel-Dev b663a5b248 [Keymap] added a KBD67v2 layout that allows swapping of num/sym keys and f-rows (#7469) 2019-11-26 10:28:44 -08:00
moyi4681 f6ffa28b27 [Keyboard] change xbows/knight pins of capslock Indicator (#7486) 2019-11-26 10:02:42 -08:00
fauxpark 170261328e Add language prefixes to docs sidebar entries and readmes (#7406)
* Add language prefixes to docs sidebar entries and readmes

* Remove prefix where it doesn't belong
2019-11-26 18:22:13 +11:00
fauxpark 5a6737a778 Send string keycode tweaks (#7471) 2019-11-25 23:16:58 -08:00
Thomas BaartandDrashna Jaelre a2cedf4555 [Keymap] Added keymap for Tessachka (#7457)
* Added keymap for Tessachka

* Update keyboards/kyria/keymaps/tessachka/keymap.c

Co-Authored-By: Drashna Jaelre <[email protected]>

* Update keyboards/kyria/keymaps/tessachka/rules.mk

Co-Authored-By: Drashna Jaelre <[email protected]>
2019-11-25 22:51:58 -08:00
Salicylic-acid3 397897180b [Keyboard] Add keyboard 7skb (#7468)
* Add keyboard 7skb

Add 7skb keyboard.

A 63 keys HHKB Layout keyboard.
Salicylic-acid3

* Update keyboards/7skb/keymaps/default/keymap.c

* Update keyboards/7skb/keymaps/default/keymap.c

* Update keyboards/7skb/keymaps/default/keymap.c

* Update keyboards/7skb/keymaps/salicylic/keymap.c

* Update keyboards/7skb/readme.md

* Update keyboards/7skb/readme.md

* Update keyboards/7skb/readme.md

* keymap update

Remove extra parts

* Delete rules.mk

* Update keyboards/7skb/rev1/rev1.c
2019-11-25 20:46:03 -08:00
111 changed files with 8171 additions and 811 deletions

No files matched your search

+2 -2
View File
@@ -18,7 +18,7 @@ pulls:
activity in the last 45 days. It will be closed in 30 days if no further activity occurs. activity in the last 45 days. It will be closed in 30 days if no further activity occurs.
Please feel free to give a status update now, or re-open when it's ready. Please feel free to give a status update now, or re-open when it's ready.
For maintainers: Please label with `awaiting review`, `breaking_change`, `in progress, or `on hold` to prevent For maintainers: Please label with `awaiting review`, `breaking_change`, `in progress`, or `on hold` to prevent
the issue from being re-flagged. the issue from being re-flagged.
# Comment to post when closing a stale Issue or Pull Request. # Comment to post when closing a stale Issue or Pull Request.
closeComment: > closeComment: >
@@ -45,7 +45,7 @@ issues:
last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity
occurs. occurs.
For maintainers: Please label with `bug`, `in progress`, `on hold`, discussion` or `to do` to prevent For maintainers: Please label with `bug`, `in progress`, `on hold`, `discussion` or `to do` to prevent
the issue from being re-flagged. the issue from being re-flagged.
closeComment: > closeComment: >
This issue has been automatically closed because it has not had activity in the last 30 days. This issue has been automatically closed because it has not had activity in the last 30 days.
+1 -1
View File
@@ -111,7 +111,7 @@
* [Support](de/support.md) * [Support](de/support.md)
* [Übersetzungen](de/translating.md) * [Übersetzungen](de/translating.md)
* QMK Internals (de/In Progress) * QMK Internals (In Progress)
* [Defines](de/internals_defines.md) * [Defines](de/internals_defines.md)
* [Input Callback Reg](de/internals_input_callback_reg.md) * [Input Callback Reg](de/internals_input_callback_reg.md)
* [Midi Device](de/internals_midi_device.md) * [Midi Device](de/internals_midi_device.md)
+2 -2
View File
@@ -19,7 +19,7 @@ De cualquier manera, también puedes descargarlo directamente en formatos ([zip]
## Cómo compilar ## Cómo compilar
Antes de poder compilar, necesitarás [instalar un entorno](getting_started_build_tools.md) para el desarrollo de AVR y/o ARM. Una vez hayas completado este paso, usarás el comando `make` para compilar un teclado y keymap con la siguiente notación: Antes de poder compilar, necesitarás [instalar un entorno](es/getting_started_build_tools.md) para el desarrollo de AVR y/o ARM. Una vez hayas completado este paso, usarás el comando `make` para compilar un teclado y keymap con la siguiente notación:
make planck/rev4:default make planck/rev4:default
@@ -29,4 +29,4 @@ Este ejemplo compilaría la revisión `rev4` del teclado `planck` con el keymap
## Cómo personalizar ## Cómo personalizar
QMK tiene montones de [características](features.md) para explorar, y una buena cantidad de [documentación de referencia](http://docs.qmk.fm) en la que sumergirse. Se pueden sacar provecho de la mayoría de las características modificando tu [keymap](keymap.md), y cambiando los [keycodes](keycodes.md). QMK tiene montones de [características](es/features.md) para explorar, y una buena cantidad de [documentación de referencia](http://docs.qmk.fm) en la que sumergirse. Se pueden sacar provecho de la mayoría de las características modificando tu [keymap](es/keymap.md), y cambiando los [keycodes](es/keycodes.md).
+104 -104
View File
@@ -1,121 +1,121 @@
* [Guía completa para novatos](newbs.md) * [Guía completa para novatos](es/newbs.md)
* [Empezando](newbs_getting_started.md) * [Empezando](es/newbs_getting_started.md)
* [Construyendo tu primer firmare](newbs_building_firmware.md) * [Construyendo tu primer firmare](es/newbs_building_firmware.md)
* [Flasheando el firmware](newbs_flashing.md) * [Flasheando el firmware](es/newbs_flashing.md)
* [Testeando y depurando ](newbs_testing_debugging.md) * [Testeando y depurando ](es/newbs_testing_debugging.md)
* [Mejores práticas](newbs_best_practices.md) * [Mejores práticas](es/newbs_best_practices.md)
* [Recursos de aprendizaje](newbs_learn_more_resources.md) * [Recursos de aprendizaje](es/newbs_learn_more_resources.md)
* [QMK Basics](README.md) * [QMK Basics](es/README.md)
* [Introducción a QMK](getting_started_introduction.md) * [Introducción a QMK](es/getting_started_introduction.md)
* [QMK CLI](cli.md) * [QMK CLI](es/cli.md)
* [Configuración de QMK CLI](cli_configuration.md) * [Configuración de QMK CLI](es/cli_configuration.md)
* [Contribuyendo a QMK](contributing.md) * [Contribuyendo a QMK](es/contributing.md)
* [Cómo usar Github](getting_started_github.md) * [Cómo usar Github](es/getting_started_github.md)
* [Obtener ayuda](getting_started_getting_help.md) * [Obtener ayuda](es/getting_started_getting_help.md)
* [Cambios incompatibles](breaking_changes.md) * [Cambios incompatibles](es/breaking_changes.md)
* [30 Ago 2019](ChangeLog/20190830.md) * [30 Ago 2019](es/ChangeLog/20190830.md)
* [Preguntas frecuentes](faq.md) * [Preguntas frecuentes](es/faq.md)
* [General](faq_general.md) * [General](es/faq_general.md)
* [Construir/Compilar QMK](faq_build.md) * [Construir/Compilar QMK](es/faq_build.md)
* [Depurando/Encontrando problemas en QMK](faq_debug.md) * [Depurando/Encontrando problemas en QMK](es/faq_debug.md)
* [Keymap](faq_keymap.md) * [Keymap](es/faq_keymap.md)
* [Instalación de drivers con Zadig](driver_installation_zadig.md) * [Instalación de drivers con Zadig](es/driver_installation_zadig.md)
* Guías detalladas * Guías detalladas
* [Instalar herramientas construcción](getting_started_build_tools.md) * [Instalar herramientas construcción](es/getting_started_build_tools.md)
* [Guía Vagrant](getting_started_vagrant.md) * [Guía Vagrant](es/getting_started_vagrant.md)
* [Instrucciones de Construcción/Compilado](getting_started_make_guide.md) * [Instrucciones de Construcción/Compilado](es/getting_started_make_guide.md)
* [Flasheando Firmware](flashing.md) * [Flasheando Firmware](es/flashing.md)
* [Personalizando funcionalidad](custom_quantum_functions.md) * [Personalizando funcionalidad](es/custom_quantum_functions.md)
* [Visión general del Keymap](keymap.md) * [Visión general del Keymap](es/keymap.md)
* [Hardware](hardware.md) * [Hardware](es/hardware.md)
* [Procesadores AVR](hardware_avr.md) * [Procesadores AVR](es/hardware_avr.md)
* [Drivers](hardware_drivers.md) * [Drivers](es/hardware_drivers.md)
* Referencia * Referencia
* [Pautas de teclados](hardware_keyboard_guidelines.md) * [Pautas de teclados](es/hardware_keyboard_guidelines.md)
* [Opciones de configuración](config_options.md) * [Opciones de configuración](es/config_options.md)
* [Keycodes](keycodes.md) * [Keycodes](es/keycodes.md)
* [Convenciones de código - C](coding_conventions_c.md) * [Convenciones de código - C](es/coding_conventions_c.md)
* [Convenciones de código - Python](coding_conventions_python.md) * [Convenciones de código - Python](es/coding_conventions_python.md)
* [Mejores prácticas de documentación](documentation_best_practices.md) * [Mejores prácticas de documentación](es/documentation_best_practices.md)
* [Plantillas de documentación](documentation_templates.md) * [Plantillas de documentación](es/documentation_templates.md)
* [Glosario](reference_glossary.md) * [Glosario](es/reference_glossary.md)
* [Tests unitarios](unit_testing.md) * [Tests unitarios](es/unit_testing.md)
* [Funciones útiles](ref_functions.md) * [Funciones útiles](es/ref_functions.md)
* [Sporte configurador](reference_configurator_support.md) * [Sporte configurador](es/reference_configurator_support.md)
* [Formato info.json](reference_info_json.md) * [Formato info.json](es/reference_info_json.md)
* [Desarrollo Python CLI](cli_development.md) * [Desarrollo Python CLI](es/cli_development.md)
* [Características](features.md) * [Características](es/features.md)
* [Keycodes Básicos](keycodes_basic.md) * [Keycodes Básicos](es/keycodes_basic.md)
* [Teclas US ANSI Shifted](keycodes_us_ansi_shifted.md) * [Teclas US ANSI Shifted](es/keycodes_us_ansi_shifted.md)
* [Keycodes Quantum](quantum_keycodes.md) * [Keycodes Quantum](es/quantum_keycodes.md)
* [Keycodes Avanzados](feature_advanced_keycodes.md) * [Keycodes Avanzados](es/feature_advanced_keycodes.md)
* [Audio](feature_audio.md) * [Audio](es/feature_audio.md)
* [Auto Shift](feature_auto_shift.md) * [Auto Shift](es/feature_auto_shift.md)
* [Retroiluminación](feature_backlight.md) * [Retroiluminación](es/feature_backlight.md)
* [Bluetooth](feature_bluetooth.md) * [Bluetooth](es/feature_bluetooth.md)
* [Bootmagic](feature_bootmagic.md) * [Bootmagic](es/feature_bootmagic.md)
* [Combos](feature_combo.md) * [Combos](es/feature_combo.md)
* [Comando](feature_command.md) * [Comando](es/feature_command.md)
* [API Debounce](feature_debounce_type.md) * [API Debounce](es/feature_debounce_type.md)
* [Switch DIP](feature_dip_switch.md) * [Switch DIP](es/feature_dip_switch.md)
* [Macros Dinámicas](feature_dynamic_macros.md) * [Macros Dinámicas](es/feature_dynamic_macros.md)
* [Encoders](feature_encoders.md) * [Encoders](es/feature_encoders.md)
* [Grave Escape](feature_grave_esc.md) * [Grave Escape](es/feature_grave_esc.md)
* [Feedback Háptico](feature_haptic_feedback.md) * [Feedback Háptico](es/feature_haptic_feedback.md)
* [Controlador LCD HD44780](feature_hd44780.md) * [Controlador LCD HD44780](es/feature_hd44780.md)
* [Key Lock](feature_key_lock.md) * [Key Lock](es/feature_key_lock.md)
* [Layouts](feature_layouts.md) * [Layouts](es/feature_layouts.md)
* [Tecla Leader](feature_leader_key.md) * [Tecla Leader](es/feature_leader_key.md)
* [Matriz LED](feature_led_matrix.md) * [Matriz LED](es/feature_led_matrix.md)
* [Macros](feature_macros.md) * [Macros](es/feature_macros.md)
* [Teclas del ratón](feature_mouse_keys.md) * [Teclas del ratón](es/feature_mouse_keys.md)
* [Driver OLED](feature_oled_driver.md) * [Driver OLED](es/feature_oled_driver.md)
* [Teclas One Shot](feature_advanced_keycodes.md#one-shot-keys) * [Teclas One Shot](es/feature_advanced_keycodes.md#one-shot-keys)
* [Dispositivo de apuntado](feature_pointing_device.md) * [Dispositivo de apuntado](es/feature_pointing_device.md)
* [Ratón PS/2](feature_ps2_mouse.md) * [Ratón PS/2](es/feature_ps2_mouse.md)
* [Iluminación RGB](feature_rgblight.md) * [Iluminación RGB](es/feature_rgblight.md)
* [Matriz RGB](feature_rgb_matrix.md) * [Matriz RGB](es/feature_rgb_matrix.md)
* [Cadete espacial](feature_space_cadet.md) * [Cadete espacial](es/feature_space_cadet.md)
* [Teclado dividido](feature_split_keyboard.md) * [Teclado dividido](es/feature_split_keyboard.md)
* [Stenografía](feature_stenography.md) * [Stenografía](es/feature_stenography.md)
* [Swap Hands](feature_swap_hands.md) * [Swap Hands](es/feature_swap_hands.md)
* [Tap Dance](feature_tap_dance.md) * [Tap Dance](es/feature_tap_dance.md)
* [Terminal](feature_terminal.md) * [Terminal](es/feature_terminal.md)
* [Impresora Térmica](feature_thermal_printer.md) * [Impresora Térmica](es/feature_thermal_printer.md)
* [Unicode](feature_unicode.md) * [Unicode](es/feature_unicode.md)
* [Userspace](feature_userspace.md) * [Userspace](es/feature_userspace.md)
* [Velocikey](feature_velocikey.md) * [Velocikey](es/feature_velocikey.md)
* Para Makers y Modders * Para Makers y Modders
* [Guía de cableado a mano](hand_wire.md) * [Guía de cableado a mano](es/hand_wire.md)
* [Guía de flasheado de ISP](isp_flashing_guide.md) * [Guía de flasheado de ISP](es/isp_flashing_guide.md)
* [Guía de depuración de ARM](arm_debugging.md) * [Guía de depuración de ARM](es/arm_debugging.md)
* [Driver I2C](i2c_driver.md) * [Driver I2C](es/i2c_driver.md)
* [Controles GPIO](internals_gpio_control.md) * [Controles GPIO](es/internals_gpio_control.md)
* [Conversión Proton C](proton_c_conversion.md) * [Conversión Proton C](es/proton_c_conversion.md)
* Para entender en profundidad * Para entender en profundidad
* [Cómo funcionan los teclados](how_keyboards_work.md) * [Cómo funcionan los teclados](es/how_keyboards_work.md)
* [Entendiendo QMK](understanding_qmk.md) * [Entendiendo QMK](es/understanding_qmk.md)
* Otros temas * Otros temas
* [Usando Eclipse con QMK](other_eclipse.md) * [Usando Eclipse con QMK](es/other_eclipse.md)
* [Usando VSCode con QMK](other_vscode.md) * [Usando VSCode con QMK](es/other_vscode.md)
* [Soporte](support.md) * [Soporte](es/support.md)
* [Cómo añadir traducciones](translating.md) * [Cómo añadir traducciones](es/translating.md)
* QMK Internals (En progreso) * QMK Internals (En progreso)
* [Defines](internals_defines.md) * [Defines](es/internals_defines.md)
* [Input Callback Reg](internals_input_callback_reg.md) * [Input Callback Reg](es/internals_input_callback_reg.md)
* [Dispositivo Midi](internals_midi_device.md) * [Dispositivo Midi](es/internals_midi_device.md)
* [Proceso de configuración de un dispositivo Midi](internals_midi_device_setup_process.md) * [Proceso de configuración de un dispositivo Midi](es/internals_midi_device_setup_process.md)
* [Utilidad Midi](internals_midi_util.md) * [Utilidad Midi](es/internals_midi_util.md)
* [Funciones Send](internals_send_functions.md) * [Funciones Send](es/internals_send_functions.md)
* [Herramientas Sysex](internals_sysex_tools.md) * [Herramientas Sysex](es/internals_sysex_tools.md)
+7 -1
View File
@@ -47,7 +47,7 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666" SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666"
``` ```
**/etc/udev/rules.d/55-catalina.rules:** **/etc/udev/rules.d/55-caterina.rules:**
``` ```
# ModemManager should ignore the following devices # ModemManager should ignore the following devices
ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1" ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"
@@ -69,6 +69,12 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", MODE:="066
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666" SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE:="0666"
``` ```
**/etc/udev/rules.d/57-bootloadhid.rules:**
```
# bootloadHID
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", MODE:="0666"
```
### Serial device is not detected in bootloader mode on Linux ### Serial device is not detected in bootloader mode on Linux
Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as
Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices may require `USB_SERIAL` and any of its sub options. Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices may require `USB_SERIAL` and any of its sub options.
+4 -4
View File
@@ -22,10 +22,10 @@ void matrix_scan_user(void) {
SEND_STRING("QMK is awesome."); SEND_STRING("QMK is awesome.");
} }
SEQ_TWO_KEYS(KC_D, KC_D) { SEQ_TWO_KEYS(KC_D, KC_D) {
SEND_STRING(SS_LCTRL("a")SS_LCTRL("c")); SEND_STRING(SS_LCTL("a") SS_LCTL("c"));
} }
SEQ_THREE_KEYS(KC_D, KC_D, KC_S) { SEQ_THREE_KEYS(KC_D, KC_D, KC_S) {
SEND_STRING("https://start.duckduckgo.com"SS_TAP(X_ENTER)); SEND_STRING("https://start.duckduckgo.com\n");
} }
SEQ_TWO_KEYS(KC_A, KC_S) { SEQ_TWO_KEYS(KC_A, KC_S) {
register_code(KC_LGUI); register_code(KC_LGUI);
@@ -115,11 +115,11 @@ void matrix_scan_user(void) {
SEQ_ONE_KEY(KC_E) { SEQ_ONE_KEY(KC_E) {
// Anything you can do in a macro. // Anything you can do in a macro.
SEND_STRING(SS_LCTRL(SS_LSFT("t"))); SEND_STRING(SS_LCTL(SS_LSFT("t")));
did_leader_succeed = true; did_leader_succeed = true;
} else } else
SEQ_TWO_KEYS(KC_E, KC_D) { SEQ_TWO_KEYS(KC_E, KC_D) {
SEND_STRING(SS_LGUI("r")"cmd"SS_TAP(KC_ENTER)SS_LCTRL("c")); SEND_STRING(SS_LGUI("r") "cmd\n" SS_LCTL("c"));
did_leader_succeed = true; did_leader_succeed = true;
} }
leader_end(); leader_end();
+11 -8
View File
@@ -67,14 +67,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case QMKURL: case QMKURL:
if (record->event.pressed) { if (record->event.pressed) {
// when keycode QMKURL is pressed // when keycode QMKURL is pressed
SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); SEND_STRING("https://qmk.fm/\n");
} else { } else {
// when keycode QMKURL is released // when keycode QMKURL is released
} }
break; break;
case MY_OTHER_MACRO: case MY_OTHER_MACRO:
if (record->event.pressed) { if (record->event.pressed) {
SEND_STRING(SS_LCTRL("ac")); // selects all and copies SEND_STRING(SS_LCTL("ac")); // selects all and copies
} }
break; break;
} }
@@ -109,18 +109,21 @@ Which would send "VE" followed by a `KC_HOME` tap, and "LO" (spelling "LOVE" if
There's also a couple of mod shortcuts you can use: There's also a couple of mod shortcuts you can use:
* `SS_LCTRL(string)` * `SS_LCTL(string)`
* `SS_LGUI(string)`
* `SS_LALT(string)`
* `SS_LSFT(string)` * `SS_LSFT(string)`
* `SS_RALT(string)` * `SS_LALT(string)`
* `SS_LGUI(string)`, `SS_LCMD(string)` or `SS_LWIN(string)`
* `SS_RCTL(string)`
* `SS_RSFT(string)`
* `SS_RALT(string)` or `SS_ALGR(string)`
* `SS_RGUI(string)`, `SS_RCMD(string)` or `SS_RWIN(string)`
These press the respective modifier, send the supplied string and then release the modifier. These press the respective modifier, send the supplied string and then release the modifier.
They can be used like this: They can be used like this:
SEND_STRING(SS_LCTRL("a")); SEND_STRING(SS_LCTL("a"));
Which would send LCTRL+a (LCTRL down, a, LCTRL up) - notice that they take strings (eg `"k"`), and not the `X_K` keycodes. Which would send Left Control+`a` (Left Control down, `a`, Left Control up) - notice that they take strings (eg `"k"`), and not the `X_K` keycodes.
### Alternative Keymaps ### Alternative Keymaps
+14 -10
View File
@@ -173,16 +173,20 @@ As mentioned earlier, the center of the keyboard by default is expected to be `{
All RGB keycodes are currently shared with the RGBLIGHT system: All RGB keycodes are currently shared with the RGBLIGHT system:
* `RGB_TOG` - toggle |Key |Aliases |Description |
* `RGB_MOD` - cycle through modes |-------------------|----------|--------------------------------------------------------------------------------------|
* `RGB_HUI` - increase hue |`RGB_TOG` | |Toggle RGB lighting on or off |
* `RGB_HUD` - decrease hue |`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held |
* `RGB_SAI` - increase saturation |`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held |
* `RGB_SAD` - decrease saturation |`RGB_HUI` | |Increase hue, decrease hue when Shift is held |
* `RGB_VAI` - increase value |`RGB_HUD` | |Decrease hue, increase hue when Shift is held |
* `RGB_VAD` - decrease value |`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held |
* `RGB_SPI` - increase speed effect (no EEPROM support) |`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held |
* `RGB_SPD` - decrease speed effect (no EEPROM support) |`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held |
|`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held |
|`RGB_SPI` | |Increase effect speed (does not support eeprom yet), decrease speed when Shift is held|
|`RGB_SPD` | |Decrease effect speed (does not support eeprom yet), increase speed when Shift is held|
* `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system * `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system
## RGB Matrix Effects ## RGB Matrix Effects
+6 -6
View File
@@ -48,12 +48,12 @@ Changing the **Value** sets the overall brightness.<br>
|`RGB_TOG` | |Toggle RGB lighting on or off | |`RGB_TOG` | |Toggle RGB lighting on or off |
|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held | |`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held |
|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held| |`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held|
|`RGB_HUI` | |Increase hue | |`RGB_HUI` | |Increase hue, decrease hue when Shift is held |
|`RGB_HUD` | |Decrease hue | |`RGB_HUD` | |Decrease hue, increase hue when Shift is held |
|`RGB_SAI` | |Increase saturation | |`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held |
|`RGB_SAD` | |Decrease saturation | |`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held |
|`RGB_VAI` | |Increase value (brightness) | |`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held |
|`RGB_VAD` | |Decrease value (brightness) | |`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held |
|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode | |`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode |
|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode | |`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode |
|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode | |`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode |
+5 -5
View File
@@ -208,15 +208,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
clear_mods(); clear_oneshot_mods(); clear_mods(); clear_oneshot_mods();
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP); SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP);
#ifndef FLASH_BOOTLOADER #ifndef FLASH_BOOTLOADER
if ( (temp_mod | temp_osm) & MOD_MASK_SHIFT ) if ((temp_mod | temp_osm) & MOD_MASK_SHIFT)
#endif #endif
{ // {
SEND_STRING(":flash"); SEND_STRING(":flash");
} }
if ( (temp_mod | temp_osm) & MOD_MASK_CTRL) { if ((temp_mod | temp_osm) & MOD_MASK_CTRL) {
SEND_STRING(" -j8 --output-sync"); SEND_STRING(" -j8 --output-sync");
} }
SEND_STRING(SS_TAP(X_ENTER)); tap_code(KC_ENT);
set_mods(temp_mod); set_mods(temp_mod);
} }
break; break;
+1 -1
View File
@@ -13,7 +13,7 @@ General flashing sequence:
## bootloadHID Flashing Target ## bootloadHID Flashing Target
Using the QMK installation script, detailed [here](newbs_getting_started.md), the required bootloadHID tools should be automatically installed. ?> Using the QMK installation script, detailed [here](newbs_getting_started.md), the required bootloadHID tools should be automatically installed.
To flash via the command line, use the target `:bootloadHID` by executing the following command: To flash via the command line, use the target `:bootloadHID` by executing the following command:
+2 -2
View File
@@ -19,7 +19,7 @@ Sinon, vous pouvez aussi le télécharger directement en ([zip](https://github.c
## Comment le compiler ## Comment le compiler
Avant d'être prêt à compiler vous allez devoir [installer un environnement](getting_started_build_tools.md) pour les développements AVR et/ou ARM. Une fois ceci fait, vous pourrez utiliser la commande `make` pour compiler le clavier et la disposition avec une commande de ce type : Avant d'être prêt à compiler vous allez devoir [installer un environnement](fr-fr/getting_started_build_tools.md) pour les développements AVR et/ou ARM. Une fois ceci fait, vous pourrez utiliser la commande `make` pour compiler le clavier et la disposition avec une commande de ce type :
make planck/rev4:default make planck/rev4:default
@@ -29,4 +29,4 @@ Cette commande compilera la révision `rev4` du clavier `planck` avec la disposi
## Comment le personnaliser ## Comment le personnaliser
QMK a beaucoup de [fonctionnalités](features.md) à explorer, et [une documentation](http://docs.qmk.fm) très abondante que vous pourrez parcourir. La plupart des fonctionnalités vous permettrons de modifier vos [dispositions](keymap.md) (keymaps) et de changer [les codes de caractères](keycodes.md) (keycodes). QMK a beaucoup de [fonctionnalités](fr-fr/features.md) à explorer, et [une documentation](http://docs.qmk.fm) très abondante que vous pourrez parcourir. La plupart des fonctionnalités vous permettrons de modifier vos [dispositions](fr-fr/keymap.md) (keymaps) et de changer [les codes de caractères](fr-fr/keycodes.md) (keycodes).
+81 -81
View File
@@ -29,97 +29,97 @@
**En Anglais** **En Anglais**
* Guides détaillés * Guides détaillés
* [Installation des outils de compilation](getting_started_build_tools.md) * [Installation des outils de compilation](fr-fr/getting_started_build_tools.md)
* [Guide Vagrant](getting_started_vagrant.md) * [Guide Vagrant](fr-fr/getting_started_vagrant.md)
* [Commandes de compilations](getting_started_make_guide.md) * [Commandes de compilations](fr-fr/getting_started_make_guide.md)
* [Flasher les firmwares](fr-fr/flashing.md) * [Flasher les firmwares](fr-fr/flashing.md)
* [Personnaliser les fonctionnalités](custom_quantum_functions.md) * [Personnaliser les fonctionnalités](fr-fr/custom_quantum_functions.md)
* [Aperçu des fonctionnalités des dispositions](keymap.md) * [Aperçu des fonctionnalités des dispositions](fr-fr/keymap.md)
* [Hardware](hardware.md) * [Hardware](fr-fr/hardware.md)
* [Processeurs AVR](hardware_avr.md) * [Processeurs AVR](fr-fr/hardware_avr.md)
* [Pilotes / Drivers](hardware_drivers.md) * [Pilotes / Drivers](fr-fr/hardware_drivers.md)
* Réferences * Réferences
* [Lignes de conduite des claviers](hardware_keyboard_guidelines.md) * [Lignes de conduite des claviers](fr-fr/hardware_keyboard_guidelines.md)
* [Options de configurations](config_options.md) * [Options de configurations](fr-fr/config_options.md)
* [Keycodes / Codes des caractères](keycodes.md) * [Keycodes / Codes des caractères](fr-fr/keycodes.md)
* [Conventions de codage - C](coding_conventions_c.md) * [Conventions de codage - C](fr-fr/coding_conventions_c.md)
* [Conventions de codage - Python](coding_conventions_python.md) * [Conventions de codage - Python](fr-fr/coding_conventions_python.md)
* [Meilleurs pratiques sur la documentation](documentation_best_practices.md) * [Meilleurs pratiques sur la documentation](fr-fr/documentation_best_practices.md)
* [Modèles de documentation](documentation_templates.md) * [Modèles de documentation](fr-fr/documentation_templates.md)
* [Glossaire](reference_glossary.md) * [Glossaire](fr-fr/reference_glossary.md)
* [Tests unitaires](unit_testing.md) * [Tests unitaires](fr-fr/unit_testing.md)
* [Fonctions utiles](ref_functions.md) * [Fonctions utiles](fr-fr/ref_functions.md)
* [Support de configuration](reference_configurator_support.md) * [Support de configuration](fr-fr/reference_configurator_support.md)
* [Format du fichier info.json](reference_info_json.md) * [Format du fichier info.json](fr-fr/reference_info_json.md)
* [Développer la CLI en Python](cli_development.md) * [Développer la CLI en Python](fr-fr/cli_development.md)
* [Fonctionnalités](features.md) * [Fonctionnalités](fr-fr/features.md)
* [Keycodes basiques](keycodes_basic.md) * [Keycodes basiques](fr-fr/keycodes_basic.md)
* [Touches utilisées avec Shift (US ANSI)](keycodes_us_ansi_shifted.md) * [Touches utilisées avec Shift (US ANSI)](fr-fr/keycodes_us_ansi_shifted.md)
* [Keycodes quantiques](quantum_keycodes.md) * [Keycodes quantiques](fr-fr/quantum_keycodes.md)
* [Keycodes avancés](feature_advanced_keycodes.md) * [Keycodes avancés](fr-fr/feature_advanced_keycodes.md)
* [Fonctionnalités audio](feature_audio.md) * [Fonctionnalités audio](fr-fr/feature_audio.md)
* [Majuscule automatique](feature_auto_shift.md) * [Majuscule automatique](fr-fr/feature_auto_shift.md)
* [Rétroéclairage](feature_backlight.md) * [Rétroéclairage](fr-fr/feature_backlight.md)
* [Bluetooth](feature_bluetooth.md) * [Bluetooth](fr-fr/feature_bluetooth.md)
* [Bootmagic](feature_bootmagic.md) * [Bootmagic](fr-fr/feature_bootmagic.md)
* [Combos](feature_combo.md) * [Combos](fr-fr/feature_combo.md)
* [Commande](feature_command.md) * [Commande](fr-fr/feature_command.md)
* [API anti-rebond](feature_debounce_type.md) * [API anti-rebond](fr-fr/feature_debounce_type.md)
* [DIP Switch](feature_dip_switch.md) * [DIP Switch](fr-fr/feature_dip_switch.md)
* [Macros dynamiques](feature_dynamic_macros.md) * [Macros dynamiques](fr-fr/feature_dynamic_macros.md)
* [Interrupteurs rotatifs](feature_encoders.md) * [Interrupteurs rotatifs](fr-fr/feature_encoders.md)
* [Grave Escape](feature_grave_esc.md) * [Grave Escape](fr-fr/feature_grave_esc.md)
* [Retour haptique](feature_haptic_feedback.md) * [Retour haptique](fr-fr/feature_haptic_feedback.md)
* [Contrôleur LCD HD44780](feature_hd44780.md) * [Contrôleur LCD HD44780](fr-fr/feature_hd44780.md)
* [Touche à verrou / Lock-key](feature_key_lock.md) * [Touche à verrou / Lock-key](fr-fr/feature_key_lock.md)
* [Dispositions / layouts](feature_layouts.md) * [Dispositions / layouts](fr-fr/feature_layouts.md)
* [Touche leader](feature_leader_key.md) * [Touche leader](fr-fr/feature_leader_key.md)
* [Matrice LED](feature_led_matrix.md) * [Matrice LED](fr-fr/feature_led_matrix.md)
* [Macros](feature_macros.md) * [Macros](fr-fr/feature_macros.md)
* [Boutons de souris](feature_mouse_keys.md) * [Boutons de souris](fr-fr/feature_mouse_keys.md)
* [Pilotes / Drivers OLED](feature_oled_driver.md) * [Pilotes / Drivers OLED](fr-fr/feature_oled_driver.md)
* [Touche one-shot](feature_advanced_keycodes.md#one-shot-keys) * [Touche one-shot](fr-fr/feature_advanced_keycodes.md#one-shot-keys)
* [Périphériques de pointage](feature_pointing_device.md) * [Périphériques de pointage](fr-fr/feature_pointing_device.md)
* [Souris PS/2](feature_ps2_mouse.md) * [Souris PS/2](fr-fr/feature_ps2_mouse.md)
* [Éclairage RGB](feature_rgblight.md) * [Éclairage RGB](fr-fr/feature_rgblight.md)
* [Matrice RGB](feature_rgb_matrix.md) * [Matrice RGB](fr-fr/feature_rgb_matrix.md)
* [Space Cadet](feature_space_cadet.md) * [Space Cadet](fr-fr/feature_space_cadet.md)
* [Claviers scindés / splittés](feature_split_keyboard.md) * [Claviers scindés / splittés](fr-fr/feature_split_keyboard.md)
* [Stenographie](feature_stenography.md) * [Stenographie](fr-fr/feature_stenography.md)
* [Inversion des mains](feature_swap_hands.md) * [Inversion des mains](fr-fr/feature_swap_hands.md)
* [Tap Dance](feature_tap_dance.md) * [Tap Dance](fr-fr/feature_tap_dance.md)
* [Terminale](feature_terminal.md) * [Terminale](fr-fr/feature_terminal.md)
* [Imprimante thermique](feature_thermal_printer.md) * [Imprimante thermique](fr-fr/feature_thermal_printer.md)
* [Caractères unicodes](feature_unicode.md) * [Caractères unicodes](fr-fr/feature_unicode.md)
* [Dossier utilisateur](feature_userspace.md) * [Dossier utilisateur](fr-fr/feature_userspace.md)
* [Velocikey](feature_velocikey.md) * [Velocikey](fr-fr/feature_velocikey.md)
* Pour les makers et les bricoleurs * Pour les makers et les bricoleurs
* [Guide des claviers soudés à la main](hand_wire.md) * [Guide des claviers soudés à la main](fr-fr/hand_wire.md)
* [Guide de flash de l’ISP](isp_flashing_guide.md) * [Guide de flash de l’ISP](fr-fr/isp_flashing_guide.md)
* [Guide du débogage ARM](arm_debugging.md) * [Guide du débogage ARM](fr-fr/arm_debugging.md)
* [Drivers i2c](i2c_driver.md) * [Drivers i2c](fr-fr/i2c_driver.md)
* [Contrôles des GPIO](internals_gpio_control.md) * [Contrôles des GPIO](fr-fr/internals_gpio_control.md)
* [Conversion en Proton C](proton_c_conversion.md) * [Conversion en Proton C](fr-fr/proton_c_conversion.md)
* Pour aller plus loin * Pour aller plus loin
* [Comment fonctionnent les claviers](how_keyboards_work.md) * [Comment fonctionnent les claviers](fr-fr/how_keyboards_work.md)
* [Comprendre QMK](understanding_qmk.md) * [Comprendre QMK](fr-fr/understanding_qmk.md)
* Autres sujets * Autres sujets
* [Utiliser Eclipse avec QMK](other_eclipse.md) * [Utiliser Eclipse avec QMK](fr-fr/other_eclipse.md)
* [Utiliser VSCode avec QMK](other_vscode.md) * [Utiliser VSCode avec QMK](fr-fr/other_vscode.md)
* [Support](support.md) * [Support](fr-fr/support.md)
* [Comment ajouter des traductions](translating.md) * [Comment ajouter des traductions](fr-fr/translating.md)
* À l’intérieur de QMK (En cours de documentation) * À l’intérieur de QMK (En cours de documentation)
* [Définitions](internals_defines.md) * [Définitions](fr-fr/internals_defines.md)
* [Input Callback Reg](internals_input_callback_reg.md) * [Input Callback Reg](fr-fr/internals_input_callback_reg.md)
* [Appareils Midi](internals_midi_device.md) * [Appareils Midi](fr-fr/internals_midi_device.md)
* [Installation d’un appareil Midi](internals_midi_device_setup_process.md) * [Installation d’un appareil Midi](fr-fr/internals_midi_device_setup_process.md)
* [Utilitaires Midi](internals_midi_util.md) * [Utilitaires Midi](fr-fr/internals_midi_util.md)
* [Fonctions Midi](internals_send_functions.md) * [Fonctions Midi](fr-fr/internals_send_functions.md)
* [Outils Sysex](internals_sysex_tools.md) * [Outils Sysex](fr-fr/internals_sysex_tools.md)
+2 -2
View File
@@ -20,7 +20,7 @@ QMK (*Quantum Mechanical Keyboard*) היא קהילת קוד פתוח (open sour
## איך לקמפל ## איך לקמפל
לפני שתצליחו לקמפל, תדרשו [להתקין סביבה](getting_started_build_tools.md) עבור פיתוח AVR ו/או ARM. ברגע שהדבר בוצע, תוכלו להריץ פקודת `make` כדי לבנות מקלדת ומיפוי עם התחביר הבא: לפני שתצליחו לקמפל, תדרשו [להתקין סביבה](he-il/getting_started_build_tools.md) עבור פיתוח AVR ו/או ARM. ברגע שהדבר בוצע, תוכלו להריץ פקודת `make` כדי לבנות מקלדת ומיפוי עם התחביר הבא:
make planck/rev4:default make planck/rev4:default
@@ -30,5 +30,5 @@ QMK (*Quantum Mechanical Keyboard*) היא קהילת קוד פתוח (open sour
## איך להתאים ## איך להתאים
לQMK יש המון [יכולות](features.md) שאפשר לנווט בהן, וכמות נכבדת של [תיעוד ודוקומנטציה](http://docs.qmk.fm) בה אפשר לנבור. רוב הפיצ׳רים באים לידי ביטוי על ידי שינוי [מיפוי המקלדת](keymap.md) ושינוי [קודי המקשים](keycodes.md). לQMK יש המון [יכולות](he-il/features.md) שאפשר לנווט בהן, וכמות נכבדת של [תיעוד ודוקומנטציה](http://docs.qmk.fm) בה אפשר לנבור. רוב הפיצ׳רים באים לידי ביטוי על ידי שינוי [מיפוי המקלדת](he-il/keymap.md) ושינוי [קודי המקשים](he-il/keycodes.md).
</div> </div>
+106 -105
View File
@@ -1,6 +1,7 @@
<div dir="rtl" markdown="1"> <div dir="rtl" markdown="1">
**בשפה העברית** **בשפה העברית**
* [המדריך המלא למתחילים](newbs.md) * [המדריך המלא למתחילים](he-il/newbs.md)
* [מקורות ללמידה](he-il/newbs_learn_more_resources.md) * [מקורות ללמידה](he-il/newbs_learn_more_resources.md)
* [בסיס QMK](he-il/README.md) * [בסיס QMK](he-il/README.md)
* [מבוא לQMK](he-il/getting_started_introduction.md) * [מבוא לQMK](he-il/getting_started_introduction.md)
@@ -13,126 +14,126 @@
* [איך לתעד נכון](he-il/documentation_best_practices.md) * [איך לתעד נכון](he-il/documentation_best_practices.md)
**בשפה האנגלית** **בשפה האנגלית**
* [המדריך המלא למתחילים](newbs.md) * [המדריך המלא למתחילים](he-il/newbs.md)
* [התחלה](newbs_getting_started.md) * [התחלה](he-il/newbs_getting_started.md)
* [בנייה של הקושחה הראשונה שלך](newbs_building_firmware.md) * [בנייה של הקושחה הראשונה שלך](he-il/newbs_building_firmware.md)
* [צריבה של הקושחה](newbs_flashing.md) * [צריבה של הקושחה](he-il/newbs_flashing.md)
* [בדיקות ודיבאגינג](newbs_testing_debugging.md) * [בדיקות ודיבאגינג](he-il/newbs_testing_debugging.md)
* [עבודה נכונה ב GIT](newbs_best_practices.md) * [עבודה נכונה ב GIT](he-il/newbs_best_practices.md)
* [מקורות ללמידה](newbs_learn_more_resources.md) * [מקורות ללמידה](he-il/newbs_learn_more_resources.md)
* [בסיס QMK](README.md) * [בסיס QMK](he-il/README.md)
* [מבוא לQMK](getting_started_introduction.md) * [מבוא לQMK](he-il/getting_started_introduction.md)
* [QMK CLI](cli.md) * [QMK CLI](he-il/cli.md)
* [QMK CLI Config](cli_configuration.md) * [QMK CLI Config](he-il/cli_configuration.md)
* [תרומה ל QMK](contributing.md) * [תרומה ל QMK](he-il/contributing.md)
* [איך להשתמש בGithub](getting_started_github.md) * [איך להשתמש בGithub](he-il/getting_started_github.md)
* [קבלת עזרה](getting_started_getting_help.md) * [קבלת עזרה](he-il/getting_started_getting_help.md)
* [שינויים משמעותיים](breaking_changes.md) * [שינויים משמעותיים](he-il/breaking_changes.md)
* [2019 Aug 30](ChangeLog/20190830.md) * [2019 Aug 30](he-il/ChangeLog/20190830.md)
* [שאלות נפוצות](faq.md) * [שאלות נפוצות](he-il/faq.md)
* [שאלות נפוצות כלליות](faq_general.md) * [שאלות נפוצות כלליות](he-il/faq_general.md)
* [בנייה/קומפילציה של QMK](faq_build.md) * [בנייה/קומפילציה של QMK](he-il/faq_build.md)
* [דיבאגינג ופתרון תקלות של QMK](faq_debug.md) * [דיבאגינג ופתרון תקלות של QMK](he-il/faq_debug.md)
* [מיפוי מקשים](faq_keymap.md) * [מיפוי מקשים](he-il/faq_keymap.md)
* [התקנת דרייברים עם Zadig](driver_installation_zadig.md) * [התקנת דרייברים עם Zadig](he-il/driver_installation_zadig.md)
* מדריכים מפורטים * מדריכים מפורטים
* [התקנת כלי Build](getting_started_build_tools.md) * [התקנת כלי Build](he-il/getting_started_build_tools.md)
* [מדריך Vagrant](getting_started_vagrant.md) * [מדריך Vagrant](he-il/getting_started_vagrant.md)
* [הוראות בנייה/קומפילציה](getting_started_make_guide.md) * [הוראות בנייה/קומפילציה](he-il/getting_started_make_guide.md)
* [צריבת קושחה](flashing.md) * [צריבת קושחה](he-il/flashing.md)
* [התאמה אישית של הפונקציונאליות](custom_quantum_functions.md) * [התאמה אישית של הפונקציונאליות](he-il/custom_quantum_functions.md)
* [מיפוי מקשים](keymap.md) * [מיפוי מקשים](he-il/keymap.md)
* [חומרה](hardware.md) * [חומרה](he-il/hardware.md)
* [מעבדי AVR](hardware_avr.md) * [מעבדי AVR](he-il/hardware_avr.md)
* [דרייברים](hardware_drivers.md) * [דרייברים](he-il/hardware_drivers.md)
* התייחסויות * התייחסויות
* [מדריך למקלדות](hardware_keyboard_guidelines.md) * [מדריך למקלדות](he-il/hardware_keyboard_guidelines.md)
* [אפשרויות הגדרות](config_options.md) * [אפשרויות הגדרות](he-il/config_options.md)
* [קודי מקשים](keycodes.md) * [קודי מקשים](he-il/keycodes.md)
* [קונבנציות קוד - C](coding_conventions_c.md) * [קונבנציות קוד - C](he-il/coding_conventions_c.md)
* [קונבנציות קוד - Python](coding_conventions_python.md) * [קונבנציות קוד - Python](he-il/coding_conventions_python.md)
* [איך לתעד נכון](documentation_best_practices.md) * [איך לתעד נכון](he-il/documentation_best_practices.md)
* [טמפלטים לדוקומנטציה](documentation_templates.md) * [טמפלטים לדוקומנטציה](he-il/documentation_templates.md)
* [מילון](reference_glossary.md) * [מילון](he-il/reference_glossary.md)
* [בדיקות יחידה](unit_testing.md) * [בדיקות יחידה](he-il/unit_testing.md)
* [פונקציות שימושיות](ref_functions.md) * [פונקציות שימושיות](he-il/ref_functions.md)
* [תמיכה בConfigurator](reference_configurator_support.md) * [תמיכה בConfigurator](he-il/reference_configurator_support.md)
* [פורמט info.json](reference_info_json.md) * [פורמט info.json](he-il/reference_info_json.md)
* [פיתוח בPython CLI](cli_development.md) * [פיתוח בPython CLI](he-il/cli_development.md)
* [תכונות](features.md) * [תכונות](he-il/features.md)
* [Basic Keycodes](keycodes_basic.md) * [Basic Keycodes](he-il/keycodes_basic.md)
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) * [US ANSI Shifted Keys](he-il/keycodes_us_ansi_shifted.md)
* [Quantum Keycodes](quantum_keycodes.md) * [Quantum Keycodes](he-il/quantum_keycodes.md)
* [Advanced Keycodes](feature_advanced_keycodes.md) * [Advanced Keycodes](he-il/feature_advanced_keycodes.md)
* [Audio](feature_audio.md) * [Audio](he-il/feature_audio.md)
* [Auto Shift](feature_auto_shift.md) * [Auto Shift](he-il/feature_auto_shift.md)
* [Backlight](feature_backlight.md) * [Backlight](he-il/feature_backlight.md)
* [Bluetooth](feature_bluetooth.md) * [Bluetooth](he-il/feature_bluetooth.md)
* [Bootmagic](feature_bootmagic.md) * [Bootmagic](he-il/feature_bootmagic.md)
* [Combos](feature_combo.md) * [Combos](he-il/feature_combo.md)
* [Command](feature_command.md) * [Command](he-il/feature_command.md)
* [Debounce API](feature_debounce_type.md) * [Debounce API](he-il/feature_debounce_type.md)
* [DIP Switch](feature_dip_switch.md) * [DIP Switch](he-il/feature_dip_switch.md)
* [Dynamic Macros](feature_dynamic_macros.md) * [Dynamic Macros](he-il/feature_dynamic_macros.md)
* [Encoders](feature_encoders.md) * [Encoders](he-il/feature_encoders.md)
* [Grave Escape](feature_grave_esc.md) * [Grave Escape](he-il/feature_grave_esc.md)
* [Haptic Feedback](feature_haptic_feedback.md) * [Haptic Feedback](he-il/feature_haptic_feedback.md)
* [HD44780 LCD Controller](feature_hd44780.md) * [HD44780 LCD Controller](he-il/feature_hd44780.md)
* [Key Lock](feature_key_lock.md) * [Key Lock](he-il/feature_key_lock.md)
* [Layouts](feature_layouts.md) * [Layouts](he-il/feature_layouts.md)
* [Leader Key](feature_leader_key.md) * [Leader Key](he-il/feature_leader_key.md)
* [LED Matrix](feature_led_matrix.md) * [LED Matrix](he-il/feature_led_matrix.md)
* [Macros](feature_macros.md) * [Macros](he-il/feature_macros.md)
* [Mouse Keys](feature_mouse_keys.md) * [Mouse Keys](he-il/feature_mouse_keys.md)
* [OLED Driver](feature_oled_driver.md) * [OLED Driver](he-il/feature_oled_driver.md)
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) * [One Shot Keys](he-il/feature_advanced_keycodes.md#one-shot-keys)
* [Pointing Device](feature_pointing_device.md) * [Pointing Device](he-il/feature_pointing_device.md)
* [PS/2 Mouse](feature_ps2_mouse.md) * [PS/2 Mouse](he-il/feature_ps2_mouse.md)
* [RGB Lighting](feature_rgblight.md) * [RGB Lighting](he-il/feature_rgblight.md)
* [RGB Matrix](feature_rgb_matrix.md) * [RGB Matrix](he-il/feature_rgb_matrix.md)
* [Space Cadet](feature_space_cadet.md) * [Space Cadet](he-il/feature_space_cadet.md)
* [Split Keyboard](feature_split_keyboard.md) * [Split Keyboard](he-il/feature_split_keyboard.md)
* [Stenography](feature_stenography.md) * [Stenography](he-il/feature_stenography.md)
* [Swap Hands](feature_swap_hands.md) * [Swap Hands](he-il/feature_swap_hands.md)
* [Tap Dance](feature_tap_dance.md) * [Tap Dance](he-il/feature_tap_dance.md)
* [Terminal](feature_terminal.md) * [Terminal](he-il/feature_terminal.md)
* [Thermal Printer](feature_thermal_printer.md) * [Thermal Printer](he-il/feature_thermal_printer.md)
* [Unicode](feature_unicode.md) * [Unicode](he-il/feature_unicode.md)
* [Userspace](feature_userspace.md) * [Userspace](he-il/feature_userspace.md)
* [Velocikey](feature_velocikey.md) * [Velocikey](he-il/feature_velocikey.md)
* למייקרים ומודרים * למייקרים ומודרים
* [מדריך לכתיבה ידנית](hand_wire.md) * [מדריך לכתיבה ידנית](he-il/hand_wire.md)
* [מדריך לצריבת ISP](isp_flashing_guide.md) * [מדריך לצריבת ISP](he-il/isp_flashing_guide.md)
* [מדריך לדיבאגינג ARM](arm_debugging.md) * [מדריך לדיבאגינג ARM](he-il/arm_debugging.md)
* [מנהל התקן I2C](i2c_driver.md) * [מנהל התקן I2C](he-il/i2c_driver.md)
* [בקרת GPIO](internals_gpio_control.md) * [בקרת GPIO](he-il/internals_gpio_control.md)
* [המרת Proton C](proton_c_conversion.md) * [המרת Proton C](he-il/proton_c_conversion.md)
* להבנה עמוקה יותר * להבנה עמוקה יותר
* [איך עובדות מקלדות](how_keyboards_work.md) * [איך עובדות מקלדות](he-il/how_keyboards_work.md)
* [להבין את QMK](understanding_qmk.md) * [להבין את QMK](he-il/understanding_qmk.md)
* נושאים נוספים * נושאים נוספים
* [שימוש ב - Eclipse עם QMK](other_eclipse.md) * [שימוש ב - Eclipse עם QMK](he-il/other_eclipse.md)
* [שימוש ב - VSCode עם QMK](other_vscode.md) * [שימוש ב - VSCode עם QMK](he-il/other_vscode.md)
* [תמיכה](support.md) * [תמיכה](he-il/support.md)
* [כיצד להוסיף תרגום](translating.md) * [כיצד להוסיף תרגום](he-il/translating.md)
* QMK מבפנים (בתהליך) * QMK מבפנים (בתהליך)
* [Defines](internals_defines.md) * [Defines](he-il/internals_defines.md)
* [Input Callback Reg](internals_input_callback_reg.md) * [Input Callback Reg](he-il/internals_input_callback_reg.md)
* [Midi Device](internals_midi_device.md) * [Midi Device](he-il/internals_midi_device.md)
* [Midi Device Setup Process](internals_midi_device_setup_process.md) * [Midi Device Setup Process](he-il/internals_midi_device_setup_process.md)
* [Midi Util](internals_midi_util.md) * [Midi Util](he-il/internals_midi_util.md)
* [Send Functions](internals_send_functions.md) * [Send Functions](he-il/internals_send_functions.md)
* [Sysex Tools](internals_sysex_tools.md) * [Sysex Tools](he-il/internals_sysex_tools.md)
</div> </div>
+11 -2
View File
@@ -21,7 +21,7 @@
<div id="app"></div> <div id="app"></div>
<script> <script>
window.$docsify = { window.$docsify = {
alias : { alias: {
'/en/(.*)': '/$1', '/en/(.*)': '/$1',
'/en-us/(.*)': '/$1', '/en-us/(.*)': '/$1',
'/en-gb/(.*)': '/$1', '/en-gb/(.*)': '/$1',
@@ -29,7 +29,16 @@
}, },
basePath: '/', basePath: '/',
name: 'QMK Firmware', name: 'QMK Firmware',
nameLink: '/', nameLink: {
'/de/': '/#/de/',
'/es/': '/#/es/',
'/fr-fr/': '/#/fr-fr/',
'/he-il/': '/#/he-il/',
'/ja/': '/#/ja/',
'/ru-ru/': '/#/ru-ru/',
'/zh-cn/': '/#/zh-cn/',
'/': '/#/'
},
repo: 'qmk/qmk_firmware', repo: 'qmk/qmk_firmware',
loadSidebar: '_summary.md', loadSidebar: '_summary.md',
loadNavbar: '_langs.md', loadNavbar: '_langs.md',
+19 -19
View File
@@ -389,12 +389,12 @@ This is a reference only. Each group of keys links to the page documenting their
|`RGB_TOG` | |Toggle RGB lighting on or off | |`RGB_TOG` | |Toggle RGB lighting on or off |
|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held | |`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held |
|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held| |`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held|
|`RGB_HUI` | |Increase hue | |`RGB_HUI` | |Increase hue, decrease hue when Shift is held |
|`RGB_HUD` | |Decrease hue | |`RGB_HUD` | |Decrease hue, increase hue when Shift is held |
|`RGB_SAI` | |Increase saturation | |`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held |
|`RGB_SAD` | |Decrease saturation | |`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held |
|`RGB_VAI` | |Increase value (brightness) | |`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held |
|`RGB_VAD` | |Decrease value (brightness) | |`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held |
|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode | |`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode |
|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode | |`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode |
|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode | |`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode |
@@ -407,19 +407,19 @@ This is a reference only. Each group of keys links to the page documenting their
## [RGB Matrix Lighting](feature_rgb_matrix.md) ## [RGB Matrix Lighting](feature_rgb_matrix.md)
|Key |Aliases |Description | |Key |Aliases |Description |
|-------------------|----------|--------------------------------------------------------------------| |-------------------|----------|--------------------------------------------------------------------------------------|
|`RGB_TOG` | |Toggle RGB lighting on or off | |`RGB_TOG` | |Toggle RGB lighting on or off |
|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held | |`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held |
|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held| |`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held |
|`RGB_HUI` | |Increase hue | |`RGB_HUI` | |Increase hue, decrease hue when Shift is held |
|`RGB_HUD` | |Decrease hue | |`RGB_HUD` | |Decrease hue, increase hue when Shift is held |
|`RGB_SAI` | |Increase saturation | |`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held |
|`RGB_SAD` | |Decrease saturation | |`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held |
|`RGB_VAI` | |Increase value (brightness) | |`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held |
|`RGB_VAD` | |Decrease value (brightness) | |`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held |
|`RGB_SPI` | |Increase effect speed (does no support eeprom yet) | |`RGB_SPI` | |Increase effect speed (does not support eeprom yet), decrease speed when Shift is held|
|`RGB_SPD` | |Decrease effect speed (does no support eeprom yet) | |`RGB_SPD` | |Decrease effect speed (does not support eeprom yet), increase speed when Shift is held|
## [Thermal Printer](feature_thermal_printer.md) ## [Thermal Printer](feature_thermal_printer.md)
+6
View File
@@ -32,6 +32,12 @@ Once you've finished translating a new language, you'll also need to modify the
'/zh-cn/': '没有结果!', '/zh-cn/': '没有结果!',
``` ```
The `nameLink` object, for setting the "QMK Firmware" heading link in the sidebar, must also be added to:
```js
'/zh-cn/': '/#/zh-cn/',
```
And make sure to add the language folder in the `fallbackLanguages` list, so it will properly fall back to English instead of 404ing: And make sure to add the language folder in the `fallbackLanguages` list, so it will properly fall back to English instead of 404ing:
```js ```js
+2 -2
View File
@@ -19,7 +19,7 @@ QMK (*Quantum Mechanical Keyboard*) 是一个社区维护的开源软件,包
## 如何编译 ## 如何编译
在你能编译之前, 你需要[部署环境](getting_started_build_tools.md) 用于 AVR or/and ARM 开发。完成后, 你可以使用 `make` 命令来编译一个键盘和布局使用以下命令: 在你能编译之前, 你需要[部署环境](zh-cn/getting_started_build_tools.md) 用于 AVR or/and ARM 开发。完成后, 你可以使用 `make` 命令来编译一个键盘和布局使用以下命令:
make planck/rev4:default make planck/rev4:default
@@ -29,4 +29,4 @@ QMK (*Quantum Mechanical Keyboard*) 是一个社区维护的开源软件,包
## 如何定制 ## 如何定制
QMK 有许多 [特性](features.md)来探索,也有很多 [参考文档](http://docs.qmk.fm) 供您发掘。你可以通过修改 [布局](keymap.md)和[键码](keycodes.md)来利用许多特性。 QMK 有许多 [特性](zh-cn/features.md)来探索,也有很多 [参考文档](http://docs.qmk.fm) 供您发掘。你可以通过修改 [布局](zh-cn/keymap.md)和[键码](zh-cn/keycodes.md)来利用许多特性。
+1
View File
@@ -0,0 +1 @@
#include "7skb.h"
+7
View File
@@ -0,0 +1,7 @@
#pragma once
#include "quantum.h"
#ifdef KEYBOARD_7skb_rev1
#include "rev1.h"
#endif
+21
View File
@@ -0,0 +1,21 @@
/*
Copyright 2012 Jun Wako <[email protected]>
Copyright 2015 Jack Humbert
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"
+76
View File
@@ -0,0 +1,76 @@
{
"keyboard_name": "7skb",
"url": "https://salicylic-acid3.hatenablog.com/",
"maintainer": "Salicylic_acid3",
"width": 16,
"height": 5,
"layouts": {
"LAYOUT": {
"layout": [
{"label":"Esc", "x":0, "y":0},
{"label":"1", "x":1, "y":0},
{"label":"2", "x":2, "y":0},
{"label":"3", "x":3, "y":0},
{"label":"4", "x":4, "y":0},
{"label":"5", "x":5, "y":0},
{"label":"6", "x":7, "y":0},
{"label":"7", "x":8, "y":0},
{"label":"8", "x":9, "y":0},
{"label":"9", "x":10, "y":0},
{"label":"0", "x":11, "y":0},
{"label":"-", "x":12, "y":0},
{"label":"=", "x":13, "y":0},
{"label":"\\", "x":14, "y":0},
{"label":"`", "x":15, "y":0},
{"label":"Tab", "x":0, "y":1, "w":1.5},
{"label":"Q", "x":1.5, "y":1},
{"label":"W", "x":2.5, "y":1},
{"label":"E", "x":3.5, "y":1},
{"label":"R", "x":4.5, "y":1},
{"label":"T", "x":5.5, "y":1},
{"label":"Y", "x":7.5, "y":1},
{"label":"U", "x":8.5, "y":1},
{"label":"I", "x":9.5, "y":1},
{"label":"O", "x":10.5, "y":1},
{"label":"P", "x":11.5, "y":1},
{"label":"[", "x":12.5, "y":1},
{"label":"]", "x":13.5, "y":1},
{"label":"Delete", "x":14.5, "y":1, "w":1.5},
{"label":"Control", "x":0, "y":2, "w":1.75},
{"label":"A", "x":1.75, "y":2},
{"label":"S", "x":2.75, "y":2},
{"label":"D", "x":3.75, "y":2},
{"label":"F", "x":4.75, "y":2},
{"label":"G", "x":5.75, "y":2},
{"label":"H", "x":7.75, "y":2},
{"label":"J", "x":8.75, "y":2},
{"label":"K", "x":9.75, "y":2},
{"label":"L", "x":10.75, "y":2},
{"label":";", "x":11.75, "y":2},
{"label":"'", "x":12.75, "y":2},
{"label":"Enter", "x":13.75, "y":2, "w":2.25},
{"label":"Shift", "x":0, "y":3, "w":2.25},
{"label":"Z", "x":2.25, "y":3},
{"label":"X", "x":3.25, "y":3},
{"label":"C", "x":4.25, "y":3},
{"label":"V", "x":5.25, "y":3},
{"label":"B", "x":6.25, "y":3},
{"label":"N", "x":8.25, "y":3},
{"label":"M", "x":9.25, "y":3},
{"label":",", "x":10.25, "y":3},
{"label":".", "x":11.25, "y":3},
{"label":"/", "x":12.25, "y":3},
{"label":"Shift", "x":13.25, "y":3, "w":1.75},
{"label":"Fn", "x":15, "y":3},
{"label":"Alt", "x":1.5, "y":4},
{"label":"GUI", "x":2.5, "y":4, "w":1.5},
{"x":4, "y":4, "w":1.5},
{"x":5.5, "y":4, "w":1.25},
{"x":7.75, "y":4, "w":1.25},
{"x":9, "y":4, "w":2},
{"label":"GUI", "x":11, "y":4, "w":1.5},
{"label":"Alt", "x":12.5, "y":4}
]
}
}
}
+22
View File
@@ -0,0 +1,22 @@
/* Copyright 2018 Salicylic_acid3
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/* Select hand configuration */
#define TAPPING_FORCE_HOLD
#define TAPPING_TERM 180
+115
View File
@@ -0,0 +1,115 @@
#include QMK_KEYBOARD_H
#ifdef RGBLIGHT_ENABLE
//Following line allows macro to read current RGB settings
extern rgblight_config_t rgblight_config;
#endif
extern uint8_t is_master;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
enum layer_number {
_QWERTY = 0,
_FN,
_ADJUST,
};
enum custom_keycodes {
RGB_RST = SAFE_RANGE
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT(
//,-----------------------------------------------------| |--------------------------------------------------------------------------------.
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS,KC_GRAVE,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LCBR, KC_RCBR,KC_BSPC,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------|
KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN),
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, KC_RALT
//`---------------------------------------------| |--------------------------------------------'
),
[_FN] = LAYOUT(
//,-----------------------------------------------------| |--------------------------------------------------------------------------------.
TG(_ADJUST), 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_INS, KC_DEL,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK,KC_PAUSE, KC_UP, _______, KC_BSPC,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT,KC_RIGHT, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______, KC_STOP, _______
//`---------------------------------------------| |--------------------------------------------'
),
[_ADJUST] = LAYOUT( /* Base */
//,-----------------------------------------------------| |--------------------------------------------------------------------------------.
TG(_ADJUST), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_STOP, XXXXXXX
//`---------------------------------------------| |--------------------------------------------'
)
};
//A description for expressing the layer position in LED mode.
layer_state_t layer_state_set_user(layer_state_t state) {
#ifdef RGBLIGHT_ENABLE
switch (get_highest_layer(state)) {
case _FN:
rgblight_sethsv_at(HSV_BLUE, 0);
break;
case _ADJUST:
rgblight_sethsv_at(HSV_PURPLE, 0);
break;
default: // for any other layers, or the default layer
rgblight_sethsv_at( 0, 0, 0, 0);
break;
}
rgblight_set_effect_range( 1, 4);
#endif
return state;
}
int RGB_current_mode;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
bool result = false;
switch (keycode) {
#ifdef RGBLIGHT_ENABLE
case RGB_MOD:
if (record->event.pressed) {
rgblight_mode(RGB_current_mode);
rgblight_step();
RGB_current_mode = rgblight_config.mode;
}
break;
case RGB_RST:
if (record->event.pressed) {
eeconfig_update_rgblight_default();
rgblight_enable();
RGB_current_mode = rgblight_config.mode;
}
break;
#endif
default:
result = true;
break;
}
return result;
}
+23
View File
@@ -0,0 +1,23 @@
/* Copyright 2018 Salicylic_acid3
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/* Select hand configuration */
#define TAPPING_FORCE_HOLD
#define TAPPING_TERM 180
//#define MASTER_RIGHT
+181
View File
@@ -0,0 +1,181 @@
#include QMK_KEYBOARD_H
#include "keymap_jp.h"
#ifdef RGBLIGHT_ENABLE
//Following line allows macro to read current RGB settings
extern rgblight_config_t rgblight_config;
#endif
extern uint8_t is_master;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
enum layer_number {
_QWERTY = 0,
_FLOCK,
_FN,
_LOWER,
_RAISE,
_ADJUST,
};
enum custom_keycodes {
RGB_RST = SAFE_RANGE
};
enum tapdances{
TD_ESFL = 0,
TD_ESQW,
};
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_ESFL] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _FLOCK),
[TD_ESQW] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY),
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT(
//,-----------------------------------------------------| |--------------------------------------------------------------------------------.
TD(TD_ESFL), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_EQL, JP_BSLS, KC_ZKHK,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, JP_RBRC,KC_BSPC,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------|
KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_BSLS, KC_ENT,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, JP_SLSH, KC_RSFT, MO(_FN),
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_ZKHK,LGUI_T(KC_MHEN),LT(_LOWER,KC_ENT), KC_BSPC, KC_DEL, LT(_RAISE,KC_SPC),ALT_T(KC_HENK), KC_APP
//`---------------------------------------------| |--------------------------------------------'
),
[_FLOCK] = LAYOUT(
//,-----------------------------------------------------| |--------------------------------------------------------------------------------.
TD(TD_ESQW), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______, _______, _______
//`---------------------------------------------| |--------------------------------------------'
),
[_FN] = 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, _______, KC_DEL,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK,KC_PAUSE, KC_UP, _______, KC_BSPC,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT,KC_RIGHT, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______, KC_STOP, _______
//`---------------------------------------------| |--------------------------------------------'
),
[_LOWER] = 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, KC_INS, KC_DEL,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
JP_QUOT, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, _______, KC_BSPC,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------|
JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, _______, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
_______, _______,MO(_LOWER), _______, _______, MO(_RAISE), JP_DOT, _______
//`---------------------------------------------| |--------------------------------------------'
),
[_RAISE] = 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, KC_INS, KC_DEL,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, XXXXXXX, _______, KC_BSPC,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------|
LCTL_T(KC_F11),XXXXXXX, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, XXXXXXX, XXXXXXX, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, _______, _______,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______, _______, _______
//`---------------------------------------------| |--------------------------------------------'
),
[_ADJUST] = LAYOUT( /* Base */
//,-----------------------------------------------------| |--------------------------------------------------------------------------------.
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX, LCA(KC_DEL), LALT(KC_PSCR),KC_PSCR, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
XXXXXXX, XXXXXXX, _______, RESET, RESET, _______, KC_STOP, XXXXXXX
//`---------------------------------------------| |--------------------------------------------'
)
};
//A description for expressing the layer position in LED mode.
layer_state_t layer_state_set_user(layer_state_t state) {
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
#ifdef RGBLIGHT_ENABLE
switch (get_highest_layer(state)) {
case _FLOCK:
rgblight_sethsv_at(HSV_YELLOW, 0);
break;
case _FN:
rgblight_sethsv_at(HSV_GREEN, 0);
break;
case _LOWER:
rgblight_sethsv_at(HSV_BLUE, 0);
break;
case _RAISE:
rgblight_sethsv_at(HSV_RED, 0);
break;
case _ADJUST:
rgblight_sethsv_at(HSV_PURPLE, 0);
break;
default: // for any other layers, or the default layer
rgblight_sethsv_at( 0, 0, 0, 0);
break;
}
rgblight_set_effect_range( 1, 4);
#endif
return state;
}
int RGB_current_mode;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
bool result = false;
switch (keycode) {
#ifdef RGBLIGHT_ENABLE
case RGB_MOD:
if (record->event.pressed) {
rgblight_mode(RGB_current_mode);
rgblight_step();
RGB_current_mode = rgblight_config.mode;
}
break;
case RGB_RST:
if (record->event.pressed) {
eeconfig_update_rgblight_default();
rgblight_enable();
RGB_current_mode = rgblight_config.mode;
}
break;
#endif
default:
result = true;
break;
}
return result;
}
@@ -0,0 +1 @@
TAP_DANCE_ENABLE = yes
+17
View File
@@ -0,0 +1,17 @@
# 7skb
![7skb](https://cdn-ak.f.st-hatena.com/images/fotolife/S/Salicylic_acid3/20191124/20191124025208.png)
This is 63 keys Custom keyboard.
* Keyboard Maintainer: [Salicylic_acid3](https://github.com/Salicylic-acid3)
* Hardware Supported: 7skb PCB, Pro Micro
* Hardware Availability: [PCB & Case Data](https://github.com/Salicylic-acid3/PCB_Data), [Booth Shop](https://salicylic-acid3.booth.pm/items/1673395)
Make example for this keyboard (after setting up your build environment):
make 7skb:default
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
[Build guide](https://salicylic-acid3.hatenablog.com/entry/7skb-mx-build-guide)
+84
View File
@@ -0,0 +1,84 @@
/*
Copyright 2012 Jun Wako <[email protected]>
Copyright 2015 Jack Humbert
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 QMK_KEYBOARD_CONFIG_H
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x3060
#define DEVICE_VER 0x0007
#define MANUFACTURER Salicylic_Acid
#define PRODUCT 7skb
#define DESCRIPTION A custom keyboard
/* key matrix size */
#define MATRIX_ROWS 10
#define MATRIX_COLS 8
// wiring of each half
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B5 }
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
/* serial.c configuration for split keyboard */
#define SOFT_SERIAL_PIN D2
#define SPLIT_HAND_PIN B6
/* 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
/* ws2812 RGB LED */
#define RGB_DI_PIN D3
#ifndef RGBLED_NUM
#define RGBLED_NUM 10
#define RGBLIGHT_SPLIT
#define RGBLED_SPLIT { 5, 5 }
#endif
#define RGBLIGHT_ANIMATIONS
#ifndef IOS_DEVICE_ENABLE
#define RGBLIGHT_LIMIT_VAL 180
#define RGBLIGHT_VAL_STEP 17
#else
#define RGBLIGHT_LIMIT_VAL 50
#define RGBLIGHT_VAL_STEP 4
#endif
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
// USB_MAX_POWER_CONSUMPTION value for naked48 keyboard
// 120 RGBoff, OLEDoff
// 120 OLED
// 330 RGB 6
// 300 RGB 32
// 310 OLED & RGB 32
#define USB_MAX_POWER_CONSUMPTION 400
#else
// fix iPhone and iPad power adapter issue
// iOS device need lessthan 100
#define USB_MAX_POWER_CONSUMPTION 100
#endif
+1
View File
@@ -0,0 +1 @@
#include "rev1.h"
+42
View File
@@ -0,0 +1,42 @@
#pragma once
#include "7skb.h"
#include "quantum.h"
//////////////////////////////////////////////////////////////////////////////
// When only use 7skb.
//////////////////////////////////////////////////////////////////////////////
/*
* ,------------------------------------ ------------------------------------------------------.
* | L00 | L01 | L02 | L03 | L04 | L05 | | R00 | R01 | R02 | R03 | R04 | R05 | R06 | R07 | R17 |
* |---------------------------------------------------------------------------------------------+
* | L10 | L11 | L12 | L13 | L14 | L15 | | R10 | R11 | R12 | R13 | R14 | R15 | R16 | R27 |
* |---------------------------------------- ---------------------------------------------------+
* | L20 | L21 | L22 | L23 | L24 | L25 | | R20 | R21 | R22 | R23 | R24 | R25 | R26 |
* |---------------------------------------------------------------------------------------------+
* | L30 | L31 | L32 | L33 | L34 | L35 | | R30 | R31 | R32 | R33 | R34 | R35 | R36 |
* |------------------------------------------- -----------------------------------------------'
* | L41 | L42 | L43 | L44 | | R40 | R41 | R43 | R44 |
* |------------------------------ ---------------------------------'
*/
#define LAYOUT( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, R06, R07, R17, \
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, R16, R27, \
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, R26, \
L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, R36, \
L41, L42, L43, L44, R40, R41, R43, R44 \
) \
{ \
{ L00, L01, L02, L03, L04, L05, KC_NO, KC_NO }, \
{ L10, L11, L12, L13, L14, L15, KC_NO, KC_NO }, \
{ L20, L21, L22, L23, L24, L25, KC_NO, KC_NO }, \
{ L30, L31, L32, L33, L34, L35, KC_NO, KC_NO }, \
{KC_NO, L41, L42, L43, L44, KC_NO, KC_NO, KC_NO }, \
{ R00, R01, R02, R03, R04, R05, R06, R07 }, \
{ R10, R11, R12, R13, R14, R15, R16, R17 }, \
{ R20, R21, R22, R23, R24, R25, R26, R27 }, \
{ R30, R31, R32, R33, R34, R35, R36, KC_NO }, \
{ R40, R41, KC_NO, R43, R44, KC_NO, KC_NO, KC_NO } \
}
View File
Whitespace-only changes.
+35
View File
@@ -0,0 +1,35 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = caterina
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
SPLIT_KEYBOARD = yes
DEFAULT_FOLDER = 7skb/rev1
+3 -8
View File
@@ -48,13 +48,13 @@ __attribute__((weak)) bool is_keyboard_left(void) {
#elif defined(EE_HANDS) #elif defined(EE_HANDS)
return eeconfig_read_handedness(); return eeconfig_read_handedness();
#elif defined(MASTER_RIGHT) #elif defined(MASTER_RIGHT)
return !is_keyboard_master(); return !has_usb();
#endif #endif
return is_keyboard_master(); return has_usb();
} }
__attribute__((weak)) bool is_keyboard_master(void) { __attribute__((weak)) bool has_usb(void) {
static enum { UNKNOWN, MASTER, SLAVE } usbstate = UNKNOWN; static enum { UNKNOWN, MASTER, SLAVE } usbstate = UNKNOWN;
// only check once, as this is called often // only check once, as this is called often
@@ -103,8 +103,3 @@ void split_keyboard_setup(void) {
} }
sei(); sei();
} }
// backwards compat
bool has_usb(void) {
return is_keyboard_master();
}
+20 -20
View File
@@ -37,15 +37,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |-----------------------------------------------------------| * |-----------------------------------------------------------|
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |
* |-----------------------------------------------------------| * |-----------------------------------------------------------|
* |Ctrl|Gui |Alt | Space |Alt |Gui |Fn |Ctrl | * |Ctrl|Gui |Alt | Space |Alt |Fn |Gui |Ctrl |
* `-----------------------------------------------------------' * `-----------------------------------------------------------'
*/ */
[_QWERTY] = LAYOUT_60_ansi( [_QWERTY] = LAYOUT_60_ansi(
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_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, \
HPR_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, \ HPR_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, \
CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FUNC), KC_RCTL KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FUNC), KC_RGUI, KC_RCTL
), ),
/* Keymap _COLEMAK: (Base Layer) Default Layer /* Keymap _COLEMAK: (Base Layer) Default Layer
@@ -58,15 +58,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |-----------------------------------------------------------| * |-----------------------------------------------------------|
* |Shift | Z| X| C| V| B| K| M| ,| .| /|Shift | * |Shift | Z| X| C| V| B| K| M| ,| .| /|Shift |
* |-----------------------------------------------------------| * |-----------------------------------------------------------|
* |Ctrl|Gui |Alt | Space |Alt |Gui |Fn |Ctrl | * |Ctrl|Gui |Alt | Space |Alt |Fn |Gui |Ctrl |
* `-----------------------------------------------------------' * `-----------------------------------------------------------'
*/ */
[_COLEMAK] = LAYOUT_60_ansi( [_COLEMAK] = LAYOUT_60_ansi(
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_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, \
HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, \ HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, \
CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, \ CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FUNC), KC_RCTL KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FUNC), KC_RGUI, KC_RCTL
), ),
/* Keymap _DVORAK: (Base Layer) Default Layer /* Keymap _DVORAK: (Base Layer) Default Layer
@@ -79,35 +79,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |-----------------------------------------------------------| * |-----------------------------------------------------------|
* |Shift | ;| Q| J| K| X| B| M| W| V| Z|ShiftEnter| * |Shift | ;| Q| J| K| X| B| M| W| V| Z|ShiftEnter|
* |-----------------------------------------------------------| * |-----------------------------------------------------------|
* |Ctrl|Gui |Alt | Space |Alt |Gui |Fn |Ctrl | * |Ctrl|Gui |Alt | Space |Alt |Fn |Gui |Ctrl |
* `-----------------------------------------------------------' * `-----------------------------------------------------------'
*/ */
[_DVORAK] = LAYOUT_60_ansi( [_DVORAK] = LAYOUT_60_ansi(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, \
HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, \ HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, \
CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, \ CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, \
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FUNC), KC_RCTL KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FUNC), KC_RGUI, KC_RCTL
), ),
/* Keymap _FUNC: Function Layer /* Keymap _FUNC: Function Layer
* ,-----------------------------------------------------------. * ,-----------------------------------------------------------.
* | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete | * | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| BL |
* |-----------------------------------------------------------| * |-----------------------------------------------------------|
* | |Hom| UP|End| | | |Qwt|Cmk|Dvk| |BL-|BL+|BL | * | |Hom| UP|End| | | |Qwt|Cmk|Dvk| |UP |BL-| BL+ |
* |-----------------------------------------------------------| * |-----------------------------------------------------------|
* | |LFT| DN| RT| | |LFT| DN| UP| RT|Vo+|Pg+| | * | |LFT| DN| RT| | | | | |Pg+|LFT|RGT| |
* |-----------------------------------------------------------| * |-----------------------------------------------------------|
* | | | |Prv|Ply|Nxt| | | |Vo-|Pg-| | * | | | |Prv|Ply|Nxt| | | |Pg-|DN | |
* |-----------------------------------------------------------| * |-----------------------------------------------------------|
* |RESET| | | | | | | | * |RESET| | | | | | | |
* `-----------------------------------------------------------' * `-----------------------------------------------------------'
*/ */
[_FUNC] = LAYOUT_60_ansi( [_FUNC] = LAYOUT_60_ansi(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, BL_TOGG, \
_______, KC_HOME, KC_UP, KC_END, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, BL_DEC, BL_INC, BL_TOGG, \ _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, KC_UP, BL_DEC, BL_INC, \
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLU, KC_PGUP, _______, \ _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_PGUP, KC_LEFT, KC_RGHT, _______, \
_______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_VOLD, KC_PGDN, _______, \ _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PGDN, KC_DOWN, _______, \
RESET, _______, _______, _______, _______, _______, _______, _______ RESET, _______, _______, _______, _______, _______, _______, _______
) )
}; };
+49
View File
@@ -0,0 +1,49 @@
/* Copyright 2019 HELIAR MK
*
* 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 0xFEED
#define PRODUCT_ID 0xD070
#define DEVICE_VER 0x0001
#define MANUFACTURER Heliar
#define PRODUCT wm1 hotswap
#define DESCRIPTION 69% custom keyboard
/* 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 { D5, D3, B3, F0, E6 }
#define MATRIX_COL_PINS { D2, B0, B1, B2, D1, D0, C7, C6, B6, B5, B4, F4, F5, F6, F1 }
#define DIODE_DIRECTION COL2ROW
#define BACKLIGHT_PIN B7
#define BACKLIGHT_LEVELS 3
+81
View File
@@ -0,0 +1,81 @@
{
"keyboard_name": "wm1",
"url": "",
"maintainer": "heliar",
"width": 18.25,
"height": 5.25,
"layouts": {
"LAYOUT": {
"layout": [
{"label": "k00", "x": 0, "y": 0},
{"label": "k01", "x": 1, "y": 0},
{"label": "k02", "x": 2, "y": 0},
{"label": "k03", "x": 3, "y": 0},
{"label": "k04", "x": 4, "y": 0},
{"label": "k05", "x": 5, "y": 0},
{"label": "k06", "x": 6, "y": 0},
{"label": "k07", "x": 9, "y": 0},
{"label": "k08", "x": 10, "y": 0},
{"label": "k09", "x": 11, "y": 0},
{"label": "k0a", "x": 12, "y": 0},
{"label": "k0b", "x": 13, "y": 0},
{"label": "k0c", "x": 14, "y": 0},
{"label": "k0d", "x": 15, "y": 0, "w": 2},
{"label": "k0e", "x": 17.25, "y": 0},
{"label": "k10", "x": 0, "y": 1, "w": 1.5},
{"label": "k11", "x": 1.5, "y": 1},
{"label": "k12", "x": 2.5, "y": 1},
{"label": "k13", "x": 3.5, "y": 1},
{"label": "k14", "x": 4.5, "y": 1},
{"label": "k15", "x": 5.5, "y": 1},
{"label": "k16", "x": 8.5, "y": 1},
{"label": "k17", "x": 9.5, "y": 1},
{"label": "k18", "x": 10.5, "y": 1},
{"label": "k19", "x": 11.5, "y": 1},
{"label": "k1a", "x": 12.5, "y": 1},
{"label": "k1b", "x": 13.5, "y": 1},
{"label": "k1c", "x": 14.5, "y": 1},
{"label": "k1d", "x": 15.5, "y": 1, "w": 1.5},
{"label": "k1e", "x": 17.25, "y": 1},
{"label": "k20", "x": 0, "y": 2, "w": 1.75},
{"label": "k21", "x": 1.75, "y": 2},
{"label": "k22", "x": 2.75, "y": 2},
{"label": "k23", "x": 3.75, "y": 2},
{"label": "k24", "x": 4.75, "y": 2},
{"label": "k25", "x": 5.75, "y": 2},
{"label": "k26", "x": 8.75, "y": 2},
{"label": "k27", "x": 9.75, "y": 2},
{"label": "k28", "x": 10.75, "y": 2},
{"label": "k29", "x": 11.75, "y": 2},
{"label": "k2a", "x": 12.75, "y": 2},
{"label": "k2b", "x": 13.75, "y": 2},
{"label": "k2d", "x": 14.75, "y": 2, "w": 2.25},
{"label": "k2e", "x": 17.25, "y": 2},
{"label": "k30", "x": 0, "y": 3, "w": 2.25},
{"label": "k31", "x": 2.25, "y": 3},
{"label": "k32", "x": 3.25, "y": 3},
{"label": "k33", "x": 4.25, "y": 3},
{"label": "k34", "x": 5.25, "y": 3},
{"label": "k35", "x": 6.25, "y": 3},
{"label": "k36", "x": 8.25, "y": 3},
{"label": "k37", "x": 9.25, "y": 3},
{"label": "k38", "x": 10.25, "y": 3},
{"label": "k39", "x": 11.25, "y": 3},
{"label": "k3a", "x": 12.25, "y": 3},
{"label": "k3b", "x": 13.25, "y": 3},
{"label": "k3c", "x": 14.25, "y": 3, "w": 1.75},
{"label": "k3d", "x": 16.25, "y": 3.25},
{"label": "k40", "x": 0, "y": 4, "w": 1.5},
{"label": "k42", "x": 3, "y": 4, "w": 1.5},
{"label": "k43", "x": 4.5, "y": 4},
{"label": "k44", "x": 5.5, "y": 4, "w": 2},
{"label": "k46", "x": 8.25, "y": 4, "w": 2.75},
{"label": "k49", "x": 11, "y": 4, "w": 1.5},
{"label": "k4b", "x": 13.5, "y": 4, "w": 1.5},
{"label": "k4c", "x": 15.25, "y": 4.25},
{"label": "k4d", "x": 16.25, "y": 4.25},
{"label": "k4e", "x": 17.25, "y": 4.25}
]
}
}
}
@@ -0,0 +1,23 @@
#include QMK_KEYBOARD_H
// Defines names for use in layer keycodes and the keymap
enum layer_names {
_BASE,
_FN
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT(
KC_GESC, 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_ESC,
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_INS,
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_DEL,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
KC_LCTL, KC_LALT,KC_LGUI,KC_SPC, LT(_FN,KC_SPC), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT),
[_FN] = LAYOUT(
KC_GRV, 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
};
@@ -0,0 +1,7 @@
# The default layout
## layer 0 keymap
![Wm1 Layout Image Layer0](https://i.imgur.com/UWQzasE.png)
## layer 1 keymap
![Wm1 Layout Image Layer1](https://i.imgur.com/cHOefMH.png)
## The keycap size of layout
![Wm1 Layout Image Layout size](https://i.imgur.com/jL1EDod.png)
+19
View File
@@ -0,0 +1,19 @@
# Wm1 ergonomic Keyboard alternative hotswap PCB
### Original Wm1 Keyboard
![Wm1 keyboard with SA Pulse](https://i.imgur.com/f0zRPTB.png)
### Pcb front side
![Wm1 front side of Pcb](https://i.imgur.com/2W2G3V6.jpg)
### Pcb back side
![Wm1 back side of Pcb](https://i.imgur.com/nGxVJGI.jpg)
A ergonomic 68 key keyboard's hotswap-type PCB which is made by heliar and this PCB is compatible with the wm1 keyboard is designed by Hoq.
* Keyboard Maintainer: [Heliar](https://github.com/heliarmk)
* Hardware Supported: Hotswap type
* Hardware Availability: [Heliar](https://github.com/heliarmk)
Make example for this keyboard (after setting up your build environment):
make heliar/wm1_hotswap:default
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
+31
View File
@@ -0,0 +1,31 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = atmel-dfu
## Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
@@ -0,0 +1,39 @@
/* Copyright 2019 HELIAR MK
*
* 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 "wm1_hotswap.h"
void keyboard_pre_init_kb(void)
{
setPinOutput(D7);
writePinHigh(D7);
setPinOutput(D6);
writePinHigh(D6);
setPinOutput(D4);
writePinHigh(D4);
}
bool led_update_kb(led_t led_state) {
if (led_update_user(led_state)){
writePin(D7, !led_state.num_lock);
writePin(D6, !led_state.caps_lock);
writePin(D4, !led_state.scroll_lock);
}
return true;
}
@@ -0,0 +1,42 @@
/* Copyright 2019 HELIAR MK
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "quantum.h"
/* This a shortcut to help you visually see your layout.
*
* The first section contains all of the arguments representing the physical
* layout of the board and position of the keys.
*
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
#define LAYOUT( \
K00, K01, K02, K03, K04, K05, 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, K2B, K2D, K2E, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
K40, K42, K43, K44, K46, K49, K4B, K4C, K4D, K4E \
)\
{\
{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, K2B, KC_NO, K2D, K2E}, \
{K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO},\
{K40, KC_NO, K42, K43, K44, KC_NO,K46, KC_NO, KC_NO, K49, KC_NO, K4B, K4C, K4D, K4E} \
}
+225
View File
@@ -0,0 +1,225 @@
/*
Copyright 2019 Maarten Dekkers <[email protected]>
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 0x4705
#define PRODUCT_ID 0x0143
#define DEVICE_VER 0x0001
#define MANUFACTURER Maartenwut
#define PRODUCT J-01
#define DESCRIPTION A custom 65%ish keyboard
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 17
/*
* 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 {B2, B1, B3, B0, D0}
#define MATRIX_COL_PINS {D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1}
#define UNUSED_PINS
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
/*
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
*/
#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
#define BACKLIGHT_PIN B7
#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 4
/* 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 userful 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
/*
* Magic Key Options
*
* Magic keys are hotkey commands that allow control over firmware functions of
* the keyboard. They are best used in combination with the HID Listen program,
* found here: https://www.pjrc.com/teensy/hid_listen.html
*
* The options below allow the magic key functionality to be changed. This is
* useful if your keyboard/keypad is missing keys and you want magic key support.
*
*/
/* key combination for magic key command */
/* defined by default; to change, uncomment and set to the combination you want */
// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT)
/* control how magic key switches layers */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
/* override magic key keymap */
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
//#define MAGIC_KEY_HELP H
//#define MAGIC_KEY_HELP_ALT SLASH
//#define MAGIC_KEY_DEBUG D
//#define MAGIC_KEY_DEBUG_MATRIX X
//#define MAGIC_KEY_DEBUG_KBD K
//#define MAGIC_KEY_DEBUG_MOUSE M
//#define MAGIC_KEY_VERSION V
//#define MAGIC_KEY_STATUS S
//#define MAGIC_KEY_CONSOLE C
//#define MAGIC_KEY_LAYER0 0
//#define MAGIC_KEY_LAYER0_ALT GRAVE
//#define MAGIC_KEY_LAYER1 1
//#define MAGIC_KEY_LAYER2 2
//#define MAGIC_KEY_LAYER3 3
//#define MAGIC_KEY_LAYER4 4
//#define MAGIC_KEY_LAYER5 5
//#define MAGIC_KEY_LAYER6 6
//#define MAGIC_KEY_LAYER7 7
//#define MAGIC_KEY_LAYER8 8
//#define MAGIC_KEY_LAYER9 9
//#define MAGIC_KEY_BOOTLOADER B
//#define MAGIC_KEY_BOOTLOADER_ALT ESC
//#define MAGIC_KEY_LOCK CAPS
//#define MAGIC_KEY_EEPROM E
//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
//#define MAGIC_KEY_NKRO N
//#define MAGIC_KEY_SLEEP_LED Z
/*
* 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 */
#ifndef LINK_TIME_OPTIMIZATION_ENABLE
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
#endif
/*
* MIDI options
*/
/* Prevent use of disabled MIDI features in the keymap */
//#define MIDI_ENABLE_STRICT 1
/* enable basic MIDI features:
- MIDI notes can be sent when in Music mode is on
*/
//#define MIDI_BASIC
/* enable advanced MIDI features:
- MIDI notes can be added to the keymap
- Octave shift and transpose
- Virtual sustain, portamento, and modulation wheel
- etc.
*/
//#define MIDI_ADVANCED
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 1
/*
* HD44780 LCD Display Configuration
*/
/*
#define LCD_LINES 2 //< number of visible lines of the display
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
#if LCD_IO_MODE
#define LCD_PORT PORTB //< port for the LCD lines
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
#define LCD_RS_PORT LCD_PORT //< port for RS line
#define LCD_RS_PIN 3 //< pin for RS line
#define LCD_RW_PORT LCD_PORT //< port for RW line
#define LCD_RW_PIN 2 //< pin for RW line
#define LCD_E_PORT LCD_PORT //< port for Enable line
#define LCD_E_PIN 1 //< pin for Enable line
#endif
*/
/* Bootmagic Lite key configuration */
#define BOOTMAGIC_LITE_ROW 0
#define BOOTMAGIC_LITE_COLUMN 2
+12
View File
@@ -0,0 +1,12 @@
{
"keyboard_name": "J01",
"url": "",
"maintainer": "MechMerlin",
"width": 19,
"height": 5.25,
"layouts": {
"LAYOUT_ansi": {
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":14.5, "y":0}, {"x":15.5, "y":0}, {"x":16.5, "y":0}, {"x":18, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2.5, "y":1, "w":1.5}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1, "w":1.5}, {"x":18, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2.5, "y":2, "w":1.75}, {"x":4.25, "y":2}, {"x":5.25, "y":2}, {"x":6.25, "y":2}, {"x":7.25, "y":2}, {"x":8.25, "y":2}, {"x":9.25, "y":2}, {"x":10.25, "y":2}, {"x":11.25, "y":2}, {"x":12.25, "y":2}, {"x":13.25, "y":2}, {"x":14.25, "y":2}, {"x":15.25, "y":2, "w":2.25}, {"x":18, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2.5, "y":3, "w":2.25}, {"x":4.75, "y":3}, {"x":5.75, "y":3}, {"x":6.75, "y":3}, {"x":7.75, "y":3}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3}, {"x":12.75, "y":3}, {"x":13.75, "y":3}, {"x":14.75, "y":3, "w":1.75}, {"x":16.75, "y":3.25}, {"x":18, "y":3}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":1.25}, {"x":6.25, "y":4, "w":6.25}, {"x":12.5, "y":4, "w":1.5}, {"x":14, "y":4, "w":1.5}, {"x":15.75, "y":4.25}, {"x":16.75, "y":4.25}, {"x":17.75, "y":4.25}]
}
}
}
+52
View File
@@ -0,0 +1,52 @@
/* Copyright Maarten Dekkers <[email protected]>
*
* 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 "j01.h"
// Optional override functions below.
// You can leave any or all of these undefined.
// These are only required if you want to perform custom actions.
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
setPinOutput(E6);
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// put your per-action keyboard code here
// runs for every action, just before processing by the firmware
return process_record_user(keycode, record);
}
bool led_update_kb(led_t led_state) {
if(led_update_user(led_state)) {
writePin(E6, !led_state.caps_lock);
}
return true;
}
+46
View File
@@ -0,0 +1,46 @@
/* Copyright 2019 Maarten Dekkers <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "quantum.h"
/* This is a shortcut to help you visually see your layout.
*
* The first section contains all of the arguments representing the physical
* layout of the board and position of the keys.
*
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
#define XXX KC_NO
#define LAYOUT_ansi( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k1f, k0g, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k2e, k1g, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2f, k2g, \
k30, k31, k32, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3g, \
k42, k43, k44, k48, k4c, k4d, k4e, k4f, k4g \
) \
{ \
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g}, \
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g}, \
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g}, \
{k30, k31, k32, XXX, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3g}, \
{XXX, XXX, k42, k43, k44, XXX, XXX, XXX, k48, XXX, XXX, XXX, k4c, k4d, k4e, k4f, k4g} \
}
@@ -0,0 +1,35 @@
/* Copyright 2019 Maarten Dekkers <[email protected]>
*
* 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_ansi(
KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, KC_DEL, \
KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, \
KC_F5, KC_F6, 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_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), \
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
[1] = LAYOUT_ansi(
KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
KC_TRNS, KC_TRNS, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, \
KC_TRNS, KC_TRNS, BL_BRTG, BL_DEC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, 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 j01
+13
View File
@@ -0,0 +1,13 @@
# J-01
A 65% with the arrow keys and right most column exploded away, with macro keys on the left hand side. Only 15 manufactured.
* Keyboard Maintainer: [Maartenwut](https://github.com/maartenwut)
* Hardware Supported: J-01 PCB
* Hardware Availability: Private Group Buy and [Charity Raffle](https://novelkeys.xyz/collections/frontpage/products/j-01-raffle-ticket)
Make example for this keyboard (after setting up your build environment):
make jae/j01:default
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
+32
View File
@@ -0,0 +1,32 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = yes # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
@@ -0,0 +1 @@
{"keyboard":"kbdfans/kbd67/mkiirgb","keymap":"default_37b6a2a","layout":"LAYOUT_65_ansi_blocker","layers":[["KC_GESC","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_CALC","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","MO(1)","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_RSFT","KC_UP","KC_END","KC_LCTL","KC_LGUI","KC_LALT","KC_SPC","KC_RALT","KC_RCTL","KC_LEFT","KC_DOWN","KC_RGHT"],["KC_GRV","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_F6","KC_F7","KC_F8","KC_F9","KC_F10","KC_F11","KC_F12","KC_DEL","KC_CALC","KC_CAPS","KC_BTN1","KC_MS_U","KC_BTN2","KC_WH_U","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_UP","KC_PSCR","KC_SLCK","KC_PAUS","RESET","KC_MYCM","KC_TRNS","KC_MS_L","KC_MS_D","KC_MS_R","KC_WH_D","KC_TRNS","RGB_SAI","RGB_SAD","KC_LEFT","KC_DOWN","KC_RGHT","KC_TRNS","EEP_RST","KC_HOME","KC_LSFT","RGB_TOG","RGB_MOD","RGB_VAI","RGB_VAD","RGB_SPI","RGB_SPD","RGB_HUI","RGB_HUD","KC_TRNS","KC_TRNS","KC_TRNS","KC_VOLU","KC_MUTE","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","TO(2)","KC_MPRV","KC_VOLD","KC_MNXT"],["KC_GESC","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_F6","KC_F7","KC_F8","KC_F9","KC_F10","KC_F11","KC_F12","KC_BSPC","KC_CALC","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","MO(3)","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_RSFT","KC_UP","KC_END","KC_LCTL","KC_LGUI","KC_LALT","KC_SPC","KC_RALT","KC_TRNS","KC_LEFT","KC_DOWN","KC_RGHT"],["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_DEL","KC_CALC","KC_CAPS","KC_BTN1","KC_MS_U","KC_BTN2","KC_WH_U","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_UP","KC_PSCR","KC_SLCK","KC_PAUS","RESET","KC_MYCM","KC_TRNS","KC_MS_L","KC_MS_D","KC_MS_R","KC_WH_D","KC_TRNS","RGB_SAI","RGB_SAD","KC_LEFT","KC_DOWN","KC_RGHT","KC_TRNS","EEP_RST","KC_HOME","KC_LSFT","RGB_TOG","RGB_MOD","RGB_VAI","RGB_VAD","RGB_SPI","RGB_SPD","RGB_HUI","RGB_HUD","KC_TRNS","KC_TRNS","KC_TRNS","KC_VOLU","KC_MUTE","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","TO(0)","KC_MPRV","KC_VOLD","KC_MNXT"]],"author":"","notes":""}
@@ -0,0 +1,8 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_65_ansi_blocker(KC_GESC, 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_CALC, 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, MO(1), 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_RSFT, KC_UP, KC_END, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
[1] = LAYOUT_65_ansi_blocker(KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_CALC, KC_CAPS, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_MYCM, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, KC_TRNS, RGB_SAI, RGB_SAD, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, EEP_RST, KC_HOME, KC_LSFT, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(2), KC_MPRV, KC_VOLD, KC_MNXT),
[2] = LAYOUT_65_ansi_blocker(KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, KC_CALC, 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, MO(3), 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_RSFT, KC_UP, KC_END, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT),
[3] = LAYOUT_65_ansi_blocker(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_DEL, KC_CALC, KC_CAPS, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_MYCM, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, KC_TRNS, RGB_SAI, RGB_SAD, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, EEP_RST, KC_HOME, KC_LSFT, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_MPRV, KC_VOLD, KC_MNXT)
};
@@ -0,0 +1 @@
[["KC_GESC", "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_CALC", "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", "MO(1)", "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_RSFT", "KC_UP", "KC_END", "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT"], ["KC_GRV", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_DEL", "KC_CALC", "KC_CAPS", "KC_BTN1", "KC_MS_U", "KC_BTN2", "KC_WH_U", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_UP", "KC_PSCR", "KC_SLCK", "KC_PAUS", "RESET", "KC_MYCM", "KC_TRNS", "KC_MS_L", "KC_MS_D", "KC_MS_R", "KC_WH_D", "KC_TRNS", "RGB_SAI", "RGB_SAD", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_TRNS", "EEP_RST", "KC_HOME", "KC_LSFT", "RGB_TOG", "RGB_MOD", "RGB_VAI", "RGB_VAD", "RGB_SPI", "RGB_SPD", "RGB_HUI", "RGB_HUD", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_VOLU", "KC_MUTE", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "TO(2)", "KC_MPRV", "KC_VOLD", "KC_MNXT"], ["KC_GESC", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_BSPC", "KC_CALC", "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", "MO(3)", "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_RSFT", "KC_UP", "KC_END", "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "KC_TRNS", "KC_LEFT", "KC_DOWN", "KC_RGHT"], ["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_DEL", "KC_CALC", "KC_CAPS", "KC_BTN1", "KC_MS_U", "KC_BTN2", "KC_WH_U", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_UP", "KC_PSCR", "KC_SLCK", "KC_PAUS", "RESET", "KC_MYCM", "KC_TRNS", "KC_MS_L", "KC_MS_D", "KC_MS_R", "KC_WH_D", "KC_TRNS", "RGB_SAI", "RGB_SAD", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_TRNS", "EEP_RST", "KC_HOME", "KC_LSFT", "RGB_TOG", "RGB_MOD", "RGB_VAI", "RGB_VAD", "RGB_SPI", "RGB_SPD", "RGB_HUI", "RGB_HUD", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_VOLU", "KC_MUTE", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "TO(0)", "KC_MPRV", "KC_VOLD", "KC_MNXT"]]
@@ -0,0 +1,54 @@
# Layout description
* This layout features 4 layers. The caps lock key has been replaced by the FN key.
* The first layer features ESC/~ and numbers and symbols on the top row of the keyboard.
* The top right key launches calculator.
* Pressing the FN key activates a temporary second layer. This layer contains:
* ESC/~ is now `/~
* WASD to move your mouse up, left, down, right respectively.
* Q and E click left and right mouse respectively.
* R and F scroll mousewheel up and down respectively.
* IJKL act as up, left, down, right arrows respectively.
* UP/DOWN keys act as volume UP/DOWN
* LEFT/RIGHT keys act as previous/next track.
* The key below the calculator key launches 'This PC'
* RGB Controls
* Z toggles ON/OFF
* X toggles RGB_MODE
* C and V increase/decrease brightness
* B and N increase/decrease effect
* M and , increase/decrease hue
* H and J increase/decrease saturation
* Pressing RIGHT CTRL whilst holding the FN key allows you to swap to the third layer.
* This layer can switch to the fourth layer by holding the FN key.
* The third and fourth layer are essentially copies of the first and second layer and offer the same functionalities, however the third and fourth layer have the F-keys and Num/Symbol keys swapped.
## Layer 0
![](https://i.imgur.com/9U9PaTw.png)
## Layer 1
![](https://i.imgur.com/rqqjiyn.png)
## Layer 2
![](https://i.imgur.com/A7YkrTF.png)
## Layer 3
![](https://i.imgur.com/sxJ1ocF.png)
# Generated Keymap Layout
This layout was generated by the QMK API. You can find the JSON data used to
generate this keymap in the file layers.json.
To make use of this file you will need follow the following steps:
* Download or Clone QMK Firmware: <https://github.com/qmk/qmk_firmware/>
* Extract QMK Firmware to a location on your hard drive
* Copy this folder into %s
* You are now ready to compile or use your keymap with the source
More information can be found in the QMK docs: <https://docs.qmk.fm>
+275 -92
View File
@@ -7,97 +7,280 @@
"layouts": { "layouts": {
"LAYOUT": { "LAYOUT": {
"layout": [ "layout": [
{"label":"Esc", "x":0, "y":0}, {"label":"Esc", "x":0, "y":0},
{"label":"F1", "x":2, "y":0}, {"label":"F1", "x":2, "y":0},
{"label":"F2", "x":3, "y":0}, {"label":"F2", "x":3, "y":0},
{"label":"F3", "x":4, "y":0}, {"label":"F3", "x":4, "y":0},
{"label":"F4", "x":5, "y":0}, {"label":"F4", "x":5, "y":0},
{"label":"F5", "x":6.5, "y":0}, {"label":"F5", "x":6.5, "y":0},
{"label":"F6", "x":7.5, "y":0}, {"label":"F6", "x":7.5, "y":0},
{"label":"F7", "x":8.5, "y":0}, {"label":"F7", "x":8.5, "y":0},
{"label":"F8", "x":9.5, "y":0}, {"label":"F8", "x":9.5, "y":0},
{"label":"F9", "x":11, "y":0}, {"label":"F9", "x":11, "y":0},
{"label":"F10", "x":12, "y":0}, {"label":"F10", "x":12, "y":0},
{"label":"F11", "x":13, "y":0}, {"label":"F11", "x":13, "y":0},
{"label":"F12", "x":14, "y":0}, {"label":"F12", "x":14, "y":0},
{"label":"PrtSc", "x":15.25, "y":0}, {"label":"PrtSc", "x":15.25, "y":0},
{"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0},
{"label":"Pause", "x":17.25, "y":0}, {"label":"Pause", "x":17.25, "y":0},
{"label":"~", "x":0, "y":1.25}, {"label":"~", "x":0, "y":1.25},
{"label":"!", "x":1, "y":1.25}, {"label":"!", "x":1, "y":1.25},
{"label":"@", "x":2, "y":1.25}, {"label":"@", "x":2, "y":1.25},
{"label":"#", "x":3, "y":1.25}, {"label":"#", "x":3, "y":1.25},
{"label":"$", "x":4, "y":1.25}, {"label":"$", "x":4, "y":1.25},
{"label":"%", "x":5, "y":1.25}, {"label":"%", "x":5, "y":1.25},
{"label":"^", "x":6, "y":1.25}, {"label":"^", "x":6, "y":1.25},
{"label":"&", "x":7, "y":1.25}, {"label":"&", "x":7, "y":1.25},
{"label":"*", "x":8, "y":1.25}, {"label":"*", "x":8, "y":1.25},
{"label":"(", "x":9, "y":1.25}, {"label":"(", "x":9, "y":1.25},
{"label":")", "x":10, "y":1.25}, {"label":")", "x":10, "y":1.25},
{"label":"_", "x":11, "y":1.25}, {"label":"_", "x":11, "y":1.25},
{"label":"+", "x":12, "y":1.25}, {"label":"+", "x":12, "y":1.25},
{"label":"Back Space", "x":13, "y":1.25}, {"label":"Back Space", "x":13, "y":1.25},
{"label":"Delete", "x":14, "y":1.25}, {"label":"Delete", "x":14, "y":1.25},
{"label":"Insert", "x":15.25, "y":1.25}, {"label":"Insert", "x":15.25, "y":1.25},
{"label":"Home", "x":16.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25},
{"label":"PgUp", "x":17.25, "y":1.25}, {"label":"PgUp", "x":17.25, "y":1.25},
{"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Tab", "x":0, "y":2.25, "w":1.5},
{"label":"Q", "x":1.5, "y":2.25}, {"label":"Q", "x":1.5, "y":2.25},
{"label":"W", "x":2.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25},
{"label":"E", "x":3.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25},
{"label":"R", "x":4.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25},
{"label":"T", "x":5.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25},
{"label":"Y", "x":6.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25},
{"label":"U", "x":7.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25},
{"label":"I", "x":8.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25},
{"label":"O", "x":9.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25},
{"label":"P", "x":10.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25},
{"label":"{", "x":11.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25},
{"label":"}", "x":12.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25},
{"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"|", "x":13.5, "y":2.25, "w":1.5},
{"label":"Delete", "x":15.25, "y":2.25}, {"label":"Delete", "x":15.25, "y":2.25},
{"label":"End", "x":16.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25},
{"label":"PgDn", "x":17.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25},
{"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75},
{"label":"A", "x":1.75, "y":3.25}, {"label":"A", "x":1.75, "y":3.25},
{"label":"S", "x":2.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25},
{"label":"D", "x":3.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25},
{"label":"F", "x":4.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25},
{"label":"G", "x":5.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25},
{"label":"H", "x":6.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25},
{"label":"J", "x":7.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25},
{"label":"K", "x":8.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25},
{"label":"L", "x":9.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25},
{"label":":", "x":10.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25},
{"label":"\"", "x":11.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25},
{"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25},
{"label":"Shift", "x":0, "y":4.25, "w":1.25}, {"label":"Shift", "x":0, "y":4.25, "w":1.25},
{"label":"|", "x":1.25, "y":4.25}, {"label":"|", "x":1.25, "y":4.25},
{"label":"Z", "x":2.25, "y":4.25}, {"label":"Z", "x":2.25, "y":4.25},
{"label":"X", "x":3.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25},
{"label":"C", "x":4.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25},
{"label":"V", "x":5.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25},
{"label":"B", "x":6.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25},
{"label":"N", "x":7.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25},
{"label":"M", "x":8.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25},
{"label":"<", "x":9.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25},
{"label":">", "x":10.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25},
{"label":"?", "x":11.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25},
{"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75},
{"label":"Fn", "x":14, "y":4.25}, {"label":"Fn", "x":14, "y":4.25},
{"label":"\u2191", "x":16.25, "y":4.25}, {"label":"\u2191", "x":16.25, "y":4.25},
{"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25},
{"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25},
{"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25},
{"x":3.75, "y":5.25, "w":6.25}, {"x":3.75, "y":5.25, "w":6.25},
{"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25},
{"label":"Win", "x":11.25, "y":5.25, "w":1.25}, {"label":"Win", "x":11.25, "y":5.25, "w":1.25},
{"label":"Menu", "x":12.5, "y":5.25, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.25, "w":1.25},
{"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25},
{"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2190", "x":15.25, "y":5.25},
{"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25},
{"label":"\u2192", "x":17.25, "y":5.25} {"label":"\u2192", "x":17.25, "y":5.25}
] ]
},
"LAYOUT_tkl_ansi": {
"layout": [
{"label":"Esc", "x":0, "y":0},
{"label":"F1", "x":2, "y":0},
{"label":"F2", "x":3, "y":0},
{"label":"F3", "x":4, "y":0},
{"label":"F4", "x":5, "y":0},
{"label":"F5", "x":6.5, "y":0},
{"label":"F6", "x":7.5, "y":0},
{"label":"F7", "x":8.5, "y":0},
{"label":"F8", "x":9.5, "y":0},
{"label":"F9", "x":11, "y":0},
{"label":"F10", "x":12, "y":0},
{"label":"F11", "x":13, "y":0},
{"label":"F12", "x":14, "y":0},
{"label":"PrtSc", "x":15.25, "y":0},
{"label":"Scroll Lock", "x":16.25, "y":0},
{"label":"Pause", "x":17.25, "y":0},
{"label":"~", "x":0, "y":1.25},
{"label":"!", "x":1, "y":1.25},
{"label":"@", "x":2, "y":1.25},
{"label":"#", "x":3, "y":1.25},
{"label":"$", "x":4, "y":1.25},
{"label":"%", "x":5, "y":1.25},
{"label":"^", "x":6, "y":1.25},
{"label":"&", "x":7, "y":1.25},
{"label":"*", "x":8, "y":1.25},
{"label":"(", "x":9, "y":1.25},
{"label":")", "x":10, "y":1.25},
{"label":"_", "x":11, "y":1.25},
{"label":"+", "x":12, "y":1.25},
{"label":"Backspace", "x":13, "y":1.25, "w":2},
{"label":"Insert", "x":15.25, "y":1.25},
{"label":"Home", "x":16.25, "y":1.25},
{"label":"PgUp", "x":17.25, "y":1.25},
{"label":"Tab", "x":0, "y":2.25, "w":1.5},
{"label":"Q", "x":1.5, "y":2.25},
{"label":"W", "x":2.5, "y":2.25},
{"label":"E", "x":3.5, "y":2.25},
{"label":"R", "x":4.5, "y":2.25},
{"label":"T", "x":5.5, "y":2.25},
{"label":"Y", "x":6.5, "y":2.25},
{"label":"U", "x":7.5, "y":2.25},
{"label":"I", "x":8.5, "y":2.25},
{"label":"O", "x":9.5, "y":2.25},
{"label":"P", "x":10.5, "y":2.25},
{"label":"{", "x":11.5, "y":2.25},
{"label":"}", "x":12.5, "y":2.25},
{"label":"|", "x":13.5, "y":2.25, "w":1.5},
{"label":"Delete", "x":15.25, "y":2.25},
{"label":"End", "x":16.25, "y":2.25},
{"label":"PgDn", "x":17.25, "y":2.25},
{"label":"Caps Lock", "x":0, "y":3.25, "w":1.75},
{"label":"A", "x":1.75, "y":3.25},
{"label":"S", "x":2.75, "y":3.25},
{"label":"D", "x":3.75, "y":3.25},
{"label":"F", "x":4.75, "y":3.25},
{"label":"G", "x":5.75, "y":3.25},
{"label":"H", "x":6.75, "y":3.25},
{"label":"J", "x":7.75, "y":3.25},
{"label":"K", "x":8.75, "y":3.25},
{"label":"L", "x":9.75, "y":3.25},
{"label":":", "x":10.75, "y":3.25},
{"label":"\"", "x":11.75, "y":3.25},
{"label":"Enter", "x":12.75, "y":3.25, "w":2.25},
{"label":"Shift", "x":0, "y":4.25, "w":2.25},
{"label":"Z", "x":2.25, "y":4.25},
{"label":"X", "x":3.25, "y":4.25},
{"label":"C", "x":4.25, "y":4.25},
{"label":"V", "x":5.25, "y":4.25},
{"label":"B", "x":6.25, "y":4.25},
{"label":"N", "x":7.25, "y":4.25},
{"label":"M", "x":8.25, "y":4.25},
{"label":"<", "x":9.25, "y":4.25},
{"label":">", "x":10.25, "y":4.25},
{"label":"?", "x":11.25, "y":4.25},
{"label":"Shift", "x":12.25, "y":4.25, "w":2.75},
{"label":"Up", "x":16.25, "y":4.25},
{"label":"Ctrl", "x":0, "y":5.25, "w":1.25},
{"label":"GUI", "x":1.25, "y":5.25, "w":1.25},
{"label":"Alt", "x":2.5, "y":5.25, "w":1.25},
{"label":"Space", "x":3.75, "y":5.25, "w":6.25},
{"label":"Alt", "x":10, "y":5.25, "w":1.25},
{"label":"GUI", "x":11.25, "y":5.25, "w":1.25},
{"label":"Menu", "x":12.5, "y":5.25, "w":1.25},
{"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25},
{"label":"Left", "x":15.25, "y":5.25},
{"label":"Down", "x":16.25, "y":5.25},
{"label":"Right", "x":17.25, "y":5.25}
]
},
"LAYOUT_tkl_iso": {
"layout": [
{"label":"Esc", "x":0, "y":0},
{"label":"F1", "x":2, "y":0},
{"label":"F2", "x":3, "y":0},
{"label":"F3", "x":4, "y":0},
{"label":"F4", "x":5, "y":0},
{"label":"F5", "x":6.5, "y":0},
{"label":"F6", "x":7.5, "y":0},
{"label":"F7", "x":8.5, "y":0},
{"label":"F8", "x":9.5, "y":0},
{"label":"F9", "x":11, "y":0},
{"label":"F10", "x":12, "y":0},
{"label":"F11", "x":13, "y":0},
{"label":"F12", "x":14, "y":0},
{"label":"PrtSc", "x":15.25, "y":0},
{"label":"Scroll Lock", "x":16.25, "y":0},
{"label":"Pause", "x":17.25, "y":0},
{"label":"\u00ac", "x":0, "y":1.25},
{"label":"!", "x":1, "y":1.25},
{"label":"\"", "x":2, "y":1.25},
{"label":"\u00a3", "x":3, "y":1.25},
{"label":"$", "x":4, "y":1.25},
{"label":"%", "x":5, "y":1.25},
{"label":"^", "x":6, "y":1.25},
{"label":"&", "x":7, "y":1.25},
{"label":"*", "x":8, "y":1.25},
{"label":"(", "x":9, "y":1.25},
{"label":")", "x":10, "y":1.25},
{"label":"_", "x":11, "y":1.25},
{"label":"+", "x":12, "y":1.25},
{"label":"Backspace", "x":13, "y":1.25, "w":2},
{"label":"Insert", "x":15.25, "y":1.25},
{"label":"Home", "x":16.25, "y":1.25},
{"label":"PgUp", "x":17.25, "y":1.25},
{"label":"Tab", "x":0, "y":2.25, "w":1.5},
{"label":"Q", "x":1.5, "y":2.25},
{"label":"W", "x":2.5, "y":2.25},
{"label":"E", "x":3.5, "y":2.25},
{"label":"R", "x":4.5, "y":2.25},
{"label":"T", "x":5.5, "y":2.25},
{"label":"Y", "x":6.5, "y":2.25},
{"label":"U", "x":7.5, "y":2.25},
{"label":"I", "x":8.5, "y":2.25},
{"label":"O", "x":9.5, "y":2.25},
{"label":"P", "x":10.5, "y":2.25},
{"label":"{", "x":11.5, "y":2.25},
{"label":"}", "x":12.5, "y":2.25},
{"label":"Delete", "x":15.25, "y":2.25},
{"label":"End", "x":16.25, "y":2.25},
{"label":"PgDn", "x":17.25, "y":2.25},
{"label":"Caps Lock", "x":0, "y":3.25, "w":1.75},
{"label":"A", "x":1.75, "y":3.25},
{"label":"S", "x":2.75, "y":3.25},
{"label":"D", "x":3.75, "y":3.25},
{"label":"F", "x":4.75, "y":3.25},
{"label":"G", "x":5.75, "y":3.25},
{"label":"H", "x":6.75, "y":3.25},
{"label":"J", "x":7.75, "y":3.25},
{"label":"K", "x":8.75, "y":3.25},
{"label":"L", "x":9.75, "y":3.25},
{"label":":", "x":10.75, "y":3.25},
{"label":"@", "x":11.75, "y":3.25},
{"label":"~", "x":12.75, "y":3.25},
{"label":"Enter", "x":13.75, "y":2.25, "w":1.25, "h":2},
{"label":"Shift", "x":0, "y":4.25, "w":1.25},
{"label":"|", "x":1.25, "y":4.25},
{"label":"Z", "x":2.25, "y":4.25},
{"label":"X", "x":3.25, "y":4.25},
{"label":"C", "x":4.25, "y":4.25},
{"label":"V", "x":5.25, "y":4.25},
{"label":"B", "x":6.25, "y":4.25},
{"label":"N", "x":7.25, "y":4.25},
{"label":"M", "x":8.25, "y":4.25},
{"label":"<", "x":9.25, "y":4.25},
{"label":">", "x":10.25, "y":4.25},
{"label":"?", "x":11.25, "y":4.25},
{"label":"Shift", "x":12.25, "y":4.25, "w":2.75},
{"label":"Up", "x":16.25, "y":4.25},
{"label":"Ctrl", "x":0, "y":5.25, "w":1.25},
{"label":"GUI", "x":1.25, "y":5.25, "w":1.25},
{"label":"Alt", "x":2.5, "y":5.25, "w":1.25},
{"label":"Space", "x":3.75, "y":5.25, "w":6.25},
{"label":"AltGr", "x":10, "y":5.25, "w":1.25},
{"label":"GUI", "x":11.25, "y":5.25, "w":1.25},
{"label":"Menu", "x":12.5, "y":5.25, "w":1.25},
{"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25},
{"label":"Left", "x":15.25, "y":5.25},
{"label":"Down", "x":16.25, "y":5.25},
{"label":"Right", "x":17.25, "y":5.25}
]
} }
} }
} }
+44
View File
@@ -48,4 +48,48 @@
{ K110, KC_NO, KC_NO, KC_NO, KC_NO, K115, K116, K117, KC_NO } \ { K110, KC_NO, KC_NO, KC_NO, KC_NO, K115, K116, K117, KC_NO } \
} }
#define LAYOUT_tkl_ansi( \
K000, K001, K011, K002, K012, K003, K013, K004, K014, K005, K015, K006, K016, K007, K017, K008, \
K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K036, K027, K037, K028, \
K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K047, K057, K048, \
K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K076, \
K080, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K097, \
K100, K110, K101, K103, K105, K115, K106, K116, K107, K117, K108 \
) \
{ \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008 }, \
{ KC_NO, K011, K012, K013, K014, K015, K016, K017, KC_NO }, \
{ K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \
{ K030, K031, K032, K033, K034, K035, K036, K037, KC_NO }, \
{ K040, K041, K042, K043, K044, K045, K046, K047, K048 }, \
{ K050, K051, K052, K053, K054, K055, K056, K057, KC_NO }, \
{ K060, K061, K062, K063, K064, K065, KC_NO, KC_NO, KC_NO }, \
{ K070, K071, K072, K073, K074, K075, K076, KC_NO, KC_NO }, \
{ K080, K081, K082, K083, K084, K085, K086, KC_NO, KC_NO }, \
{ KC_NO, K091, K092, K093, K094, K095, KC_NO, K097, KC_NO }, \
{ K100, K101, KC_NO, K103, KC_NO, K105, K106, K107, K108 }, \
{ K110, KC_NO, KC_NO, KC_NO, KC_NO, K115, K116, K117, KC_NO } \
}
#define LAYOUT_tkl_iso( \
K000, K001, K011, K002, K012, K003, K013, K004, K014, K005, K015, K006, K016, K007, K017, K008, \
K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K036, K027, K037, K028, \
K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K047, K057, K048, \
K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K056, K076, \
K080, K090, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K097, \
K100, K110, K101, K103, K105, K115, K106, K116, K107, K117, K108 \
) \
{ \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008 }, \
{ KC_NO, K011, K012, K013, K014, K015, K016, K017, KC_NO }, \
{ K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \
{ K030, K031, K032, K033, K034, K035, K036, K037, KC_NO }, \
{ K040, K041, K042, K043, K044, K045, K046, K047, K048 }, \
{ K050, K051, K052, K053, K054, K055, K056, K057, KC_NO }, \
{ K060, K061, K062, K063, K064, K065, KC_NO, KC_NO, KC_NO }, \
{ K070, K071, K072, K073, K074, K075, K076, KC_NO, KC_NO }, \
{ K080, K081, K082, K083, K084, K085, K086, KC_NO, KC_NO }, \
{ K090, K091, K092, K093, K094, K095, KC_NO, K097, KC_NO }, \
{ K100, K101, KC_NO, K103, KC_NO, K105, K106, K107, K108 }, \
{ K110, KC_NO, KC_NO, KC_NO, KC_NO, K115, K116, K117, KC_NO } \
}
@@ -1,44 +0,0 @@
/* Copyright 2019 Ryota Goto
*
* 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( /* Base */
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_INS, KC_HOME, KC_PGUP, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, KC_UP, \
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
void led_set_user(uint8_t usb_led) {
}
@@ -1,3 +0,0 @@
# The ANSI 6.25U keymap for KBD8X MKII
A typical setup for the 1.25/6.25U bottom row.
@@ -0,0 +1,27 @@
/* Copyright 2019 Ryota Goto
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_tkl_ansi( /* Base */
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
),
};
@@ -0,0 +1,3 @@
# The ANSI 6.25U keymap for KBD8X MKII
A typical ANSI setup for the 1.25/6.25U bottom row.
@@ -0,0 +1,27 @@
/* Copyright 2019 Ryota Goto
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_tkl_iso( /* Base */
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \
KC_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_DEL, KC_END, KC_PGDN, \
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
),
};
@@ -0,0 +1,3 @@
# The ISO 6.25U keymap for KBD8X MKII
A typical ISO setup for the 1.25/6.25U bottom row.
+8 -6
View File
@@ -14,10 +14,10 @@ BOOTLOADER = atmel-dfu
# Build Options # Build Options
# change yes to no to disable # change yes to no to disable
# #
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys(+4700) MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug(+400) CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration COMMAND_ENABLE = yes # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
@@ -25,9 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) MIDI_ENABLE = no # MIDI support
UNICODE_ENABLE = no # Unicode UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6 AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) HD44780_ENABLE = no # Enable support for HD44780 based LCDs
LAYOUTS = tkl_ansi tkl_iso
+1 -1
View File
@@ -73,7 +73,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
break; break;
case MCR_04: case MCR_04:
if (record->event.pressed) { if (record->event.pressed) {
SEND_STRING(SS_LCTRL("c") SS_TAP(X_RIGHT) SS_LCTRL("v")); SEND_STRING(SS_LCTL("c") SS_TAP(X_RIGHT) SS_LCTL("v"));
} }
break; break;
} }
@@ -73,7 +73,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
break; break;
case MCR_04: case MCR_04:
if (record->event.pressed) { if (record->event.pressed) {
SEND_STRING(SS_LCTRL("c") SS_TAP(X_RIGHT) SS_LCTRL("v")); SEND_STRING(SS_LCTL("c") SS_TAP(X_RIGHT) SS_LCTL("v"));
} }
break; break;
} }
@@ -73,7 +73,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
break; break;
case MCR_04: case MCR_04:
if (record->event.pressed) { if (record->event.pressed) {
SEND_STRING(SS_LCTRL("c") SS_TAP(X_RIGHT) SS_LCTRL("v")); SEND_STRING(SS_LCTL("c") SS_TAP(X_RIGHT) SS_LCTL("v"));
} }
break; break;
} }
@@ -0,0 +1,29 @@
/* Copyright 2019 Thomas Baart <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#ifdef OLED_DRIVER_ENABLE
#define OLED_DISPLAY_128X64
#endif
#ifdef RGBLIGHT_ENABLE
#define RGBLIGHT_ANIMATIONS
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#define RGBLIGHT_SLEEP
#endif
+241
View File
@@ -0,0 +1,241 @@
/* Copyright 2019 Thomas Baart <[email protected]>
*
* 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
enum layers {
QWERTY = 0,
LOWER,
RAISE,
ADJUST
};
enum custom_keycodes {
RGBRST = SAFE_RANGE,
KC_RACL
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* Base Layer: QWERTY
*
* ,-------------------------------------------. ,-------------------------------------------.
* | ESC | Q | W | E | R | T | | Y | U | I | O | P | BSPC |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | TAB/ADJ| A | S | D | F | G | | H | J | K | L | ; : | ENTER |
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
* | LSHIFT | Z | X | C | V | B | | | | | | N | M | , < | . > | / ? | F16 |
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
* | | | | | Space| | MYCM | Calc | F15 | | |
* | | | Ctrl | LAlt | Lower| | Raise| | | | |
* `----------------------------------' `----------------------------------'
*/
[QWERTY] = LAYOUT(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
LT(ADJUST,KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_F16,
XXXXXXX, XXXXXXX, KC_LCTL, KC_LALT, LT(LOWER,KC_SPC), LT(RAISE,KC_MYCM), KC_CALC, KC_F15, XXXXXXX, XXXXXXX
),
/*
* Lower Layer: Numbers and symbols
*
* ,-------------------------------------------. ,-------------------------------------------.
* | ` | 1 ! | 2 @ | 3 # | 4 $ | 5 % | | 6 ^ | 7 & | 8 * | 9 ( | 0 ) | DEL |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | CAPS | - _ | = + | [ { | ] } | | | | | | | ' " | |
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
* | LSHIFT | TAB | | | | | | | | | | Home | PgDn | PgUp | End | \ | | |
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
* | | | | | Space| | Space| | | | |
* | | | Ctrl | LAlt | Lower| | | | | | |
* `----------------------------------' `----------------------------------'
*/
[LOWER] = LAYOUT(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
KC_CAPS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_QUOT, KC_NO,
KC_LSFT, KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BSLS, KC_NO,
_______, _______, _______, _______, _______, KC_SPC, KC_NO, KC_NO, _______, _______
),
/*
* Raise Layer: Function Keys
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | |EEPRST| | | | | | | | | | F12 |
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
* | LSHIFT | TAB | RESET| | | | | | | | | Play | | | | | |
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
* | | | | | Space| | MYCM | Prev | Next | | |
* | | | Ctrl | LAlt | | | Raise| | | | |
* `----------------------------------' `----------------------------------'
*/
[RAISE] = LAYOUT(
KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_NO, KC_NO, EEP_RST, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F12,
KC_LSFT, KC_TAB, RESET, KC_NO, KC_NO, KC_NO, _______, _______, _______, _______, KC_MPLY, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
_______, _______, _______, _______, KC_SPC , KC_MPRV, KC_MNXT, _______, _______, _______
),
/*
* Adjust Layer: Arrow keys, RGB
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | BTN2 | Up | BTN1 |RGBMOD|RGBTOG| | | | | | | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | Left | Down | Right|RGBSAI|RGBHUI| | | | | | | |
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
* | RGBRST | |RGBVAI|RGBVAD|RGBSAD|RGBHUD| | | | | | | | | | | |
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
* | | | WBAK | BTN3 | WFWD | | MYCM | Calc | F15 | | |
* | | | | | | | Raise| | | | |
* `----------------------------------' `----------------------------------'
*/
[ADJUST] = LAYOUT(
KC_NO, KC_BTN2, KC_UP, KC_BTN1, RGB_MOD, RGB_TOG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, RGB_SAI, RGB_HUI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
RGBRST, KC_NO, RGB_VAI, RGB_VAD, RGB_SAD, RGB_HUD, _______, _______, _______, _______, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
_______, _______, KC_WBAK, KC_BTN3, KC_WFWD, _______, _______, _______, _______, _______
),
// /*
// * Layer template
// *
// * ,-------------------------------------------. ,-------------------------------------------.
// * | | | | | | | | | | | | | |
// * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
// * | | | | | | | | | | | | | |
// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
// * | | | | | | | | | | | | | | | | | |
// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
// * | | | | | | | | | | | |
// * | | | | | | | | | | | |
// * `----------------------------------' `----------------------------------'
// */
// [LAYERINDEX] = LAYOUT(
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
// ),
};
layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, LOWER, RAISE, ADJUST);
}
// bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// switch (keycode) {
// case MyCustomKeycode:
// if (record->event.pressed) {
// // What to do if the button was pressed
// } else {
// // What to do if the button was released
// }
// break;
// }
// return true;
// }
#ifdef OLED_DRIVER_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_180;
}
static void render_kyria_logo(void) {
static const char PROGMEM kyria_logo[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0,
0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0,
0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
oled_write_raw_P(kyria_logo, sizeof(kyria_logo));
}
static void render_tessachka_logo(void) {
static const char PROGMEM Tessachka_OLED_Logo_Inverted[] =
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 192, 192, 192, 192, 192, 192,
192, 192, 192, 64, 0, 0, 128, 128, 192, 192, 192, 192, 192, 192, 64, 0, 0,
128, 192, 192, 192, 192, 192, 192, 192, 192, 192, 64, 0, 0, 128, 192, 192, 192,
192, 192, 192, 192, 192, 192, 64, 0, 0, 0, 0, 0, 0, 192, 192, 0, 0,
0, 0, 0, 0, 0, 128, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 0,
192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 0, 192, 128, 0, 0,
0, 0, 128, 192, 192, 128, 0, 0, 0, 0, 0, 0, 0, 192, 192, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 255, 255, 255, 127, 1, 1, 1, 0, 24, 126, 255, 255, 219,
219, 153, 153, 153, 137, 128, 128, 0, 135, 143, 159, 153, 153, 153, 153, 153, 153,
249, 240, 224, 0, 135, 143, 159, 153, 153, 153, 153, 153, 153, 249, 240, 224, 0,
0, 192, 240, 252, 159, 135, 135, 159, 124, 240, 192, 0, 60, 255, 255, 231, 195,
129, 0, 0, 0, 129, 195, 195, 195, 0, 255, 255, 255, 24, 24, 24, 24, 24,
24, 255, 255, 255, 0, 255, 255, 255, 28, 62, 127, 247, 227, 193, 128, 0, 0,
0, 192, 240, 252, 159, 135, 135, 159, 124, 240, 192, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 3, 3, 3, 3, 1, 0, 0,
0, 1, 3, 3, 3, 3, 3, 3, 3, 3, 1, 0, 0, 0, 1, 3, 3,
3, 3, 3, 3, 3, 3, 1, 0, 0, 3, 3, 3, 3, 3, 3, 1, 0,
0, 1, 3, 3, 0, 0, 1, 3, 3, 3, 3, 3, 3, 3, 3, 1, 0,
0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, 0, 1, 3,
0, 0, 0, 0, 1, 3, 3, 1, 0, 3, 3, 3, 3, 3, 3, 1, 0,
0, 1, 3, 3, 0, 0, 0, 0, 0, 0
};
oled_write_raw_P(Tessachka_OLED_Logo_Inverted, sizeof(Tessachka_OLED_Logo_Inverted));
oled_advance_page(false);
oled_advance_page(false);
oled_advance_page(false);
}
static void render_status(void) {
// Logo and version information
render_tessachka_logo();
oled_write_P(PSTR("Kyria rev1.0\n\n"), false);
// Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false);
switch (get_highest_layer(layer_state)) {
case QWERTY:
oled_write_P(PSTR("Default\n"), false);
break;
case LOWER:
oled_write_P(PSTR("Lower\n"), false);
break;
case RAISE:
oled_write_P(PSTR("Raise\n"), false);
break;
case ADJUST:
oled_write_P(PSTR("Adjust\n"), false);
break;
default:
oled_write_P(PSTR("Undefined\n"), false);
}
// Host Keyboard LED Status
uint8_t led_usb_state = host_keyboard_leds();
oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false);
oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false);
oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false);
}
void oled_task_user(void) {
if (is_keyboard_master()) {
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} else {
render_kyria_logo();
}
}
#endif
@@ -0,0 +1,3 @@
OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
MOUSEKEY_ENABLE = yes
@@ -0,0 +1,131 @@
/*
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/*
* This file has been automatically generated using ChibiStudio board
* generator plugin. Do not edit manually.
*/
#include "hal.h"
#if HAL_USE_PAL || defined(__DOXYGEN__)
/**
* @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 = {
#if STM32_HAS_GPIOA
{VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR,
VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
#endif
#if STM32_HAS_GPIOB
{VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR,
VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
#endif
#if STM32_HAS_GPIOC
{VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR,
VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
#endif
#if STM32_HAS_GPIOD
{VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR,
VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
#endif
#if STM32_HAS_GPIOE
{VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR,
VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH},
#endif
#if STM32_HAS_GPIOF
{VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR,
VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH},
#endif
#if STM32_HAS_GPIOG
{VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR,
VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH},
#endif
#if STM32_HAS_GPIOH
{VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR,
VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH},
#endif
#if STM32_HAS_GPIOI
{VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR,
VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}
#endif
};
#endif
void enter_bootloader_mode_if_requested(void);
/**
* @brief Early initialization code.
* @details This initialization must be performed just after stack setup
* and before any other initialization.
*/
void __early_init(void) {
enter_bootloader_mode_if_requested();
stm32_clock_init();
}
#if HAL_USE_SDC || defined(__DOXYGEN__)
/**
* @brief SDC card detection.
*/
bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
(void)sdcp;
/* TODO: Fill the implementation.*/
return true;
}
/**
* @brief SDC card write protection detection.
*/
bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
(void)sdcp;
/* TODO: Fill the implementation.*/
return false;
}
#endif /* HAL_USE_SDC */
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
/**
* @brief MMC_SPI card detection.
*/
bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
(void)mmcp;
/* TODO: Fill the implementation.*/
return true;
}
/**
* @brief MMC_SPI card write protection detection.
*/
bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
(void)mmcp;
/* TODO: Fill the implementation.*/
return false;
}
#endif
/**
* @brief Board-specific initialization code.
* @todo Add your board-specific code, if any.
*/
void boardInit(void) {
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,5 @@
# List of all the board related files.
BOARDSRC = $(BOARD_PATH)/boards/noah_bd/board.c
# Required include directories
BOARDINC = $(BOARD_PATH)/boards/noah_bd
+7
View File
@@ -0,0 +1,7 @@
/* Address for jumping to bootloader on STM32 chips. */
/* It is chip dependent, the correct number can be looked up here:
* http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
* This also requires a patch to chibios:
* <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
*/
#define STM32_BOOTLOADER_ADDRESS 0x1FFF0000
+527
View File
@@ -0,0 +1,527 @@
/*
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/**
* @file templates/chconf.h
* @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup config
* @details Kernel related settings and hooks.
* @{
*/
#ifndef CHCONF_H
#define CHCONF_H
#define _CHIBIOS_RT_CONF_
/*===========================================================================*/
/**
* @name System timers settings
* @{
*/
/*===========================================================================*/
/**
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
#define CH_CFG_ST_RESOLUTION 32
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
#define CH_CFG_ST_FREQUENCY 10000
/**
* @brief Time delta constant for the tick-less mode.
* @note If this value is zero then the system uses the classic
* periodic tick. This value represents the minimum number
* of ticks that is safe to specify in a timeout directive.
* The value one is not valid, timeouts are rounded up to
* this value.
*/
#define CH_CFG_ST_TIMEDELTA 2
/** @} */
/*===========================================================================*/
/**
* @name Kernel parameters and options
* @{
*/
/*===========================================================================*/
/**
* @brief Round robin interval.
* @details This constant is the number of system ticks allowed for the
* threads before preemption occurs. Setting this value to zero
* disables the preemption for threads with equal priority and the
* round robin becomes cooperative. Note that higher priority
* threads can still preempt, the kernel is always preemptive.
* @note Disabling the round robin preemption makes the kernel more compact
* and generally faster.
* @note The round robin preemption is not supported in tickless mode and
* must be set to zero in that case.
*/
#define CH_CFG_TIME_QUANTUM 0
/**
* @brief Managed RAM size.
* @details Size of the RAM area to be managed by the OS. If set to zero
* then the whole available RAM is used. The core memory is made
* available to the heap allocator and/or can be used directly through
* the simplified core memory allocator.
*
* @note In order to let the OS manage the whole RAM the linker script must
* provide the @p __heap_base__ and @p __heap_end__ symbols.
* @note Requires @p CH_CFG_USE_MEMCORE.
*/
#define CH_CFG_MEMCORE_SIZE 0
/**
* @brief Idle thread automatic spawn suppression.
* @details When this option is activated the function @p chSysInit()
* does not spawn the idle thread. The application @p main()
* function becomes the idle thread and must implement an
* infinite loop.
*/
#define CH_CFG_NO_IDLE_THREAD FALSE
/* Use __WFI in the idle thread for waiting. Does lower the power
* consumption. */
#define CORTEX_ENABLE_WFI_IDLE TRUE
/** @} */
/*===========================================================================*/
/**
* @name Performance options
* @{
*/
/*===========================================================================*/
/**
* @brief OS optimization.
* @details If enabled then time efficient rather than space efficient code
* is used when two possible implementations exist.
*
* @note This is not related to the compiler optimization options.
* @note The default is @p TRUE.
*/
#define CH_CFG_OPTIMIZE_SPEED TRUE
/** @} */
/*===========================================================================*/
/**
* @name Subsystem options
* @{
*/
/*===========================================================================*/
/**
* @brief Time Measurement APIs.
* @details If enabled then the time measurement APIs are included in
* the kernel.
*
* @note The default is @p TRUE.
*/
#define CH_CFG_USE_TM TRUE
/**
* @brief Threads registry APIs.
* @details If enabled then the registry APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#define CH_CFG_USE_REGISTRY TRUE
/**
* @brief Threads synchronization APIs.
* @details If enabled then the @p chThdWait() function is included in
* the kernel.
*
* @note The default is @p TRUE.
*/
#define CH_CFG_USE_WAITEXIT TRUE
/**
* @brief Semaphores APIs.
* @details If enabled then the Semaphores APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#define CH_CFG_USE_SEMAPHORES TRUE
/**
* @brief Semaphores queuing mode.
* @details If enabled then the threads are enqueued on semaphores by
* priority rather than in FIFO order.
*
* @note The default is @p FALSE. Enable this if you have special
* requirements.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
/**
* @brief Mutexes APIs.
* @details If enabled then the mutexes APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#define CH_CFG_USE_MUTEXES TRUE
/**
* @brief Enables recursive behavior on mutexes.
* @note Recursive mutexes are heavier and have an increased
* memory footprint.
*
* @note The default is @p FALSE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
/**
* @brief Conditional Variables APIs.
* @details If enabled then the conditional variables APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
#define CH_CFG_USE_CONDVARS TRUE
/**
* @brief Conditional Variables APIs with timeout.
* @details If enabled then the conditional variables APIs with timeout
* specification are included in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_CONDVARS.
*/
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
/**
* @brief Events Flags APIs.
* @details If enabled then the event flags APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#define CH_CFG_USE_EVENTS TRUE
/**
* @brief Events Flags APIs with timeout.
* @details If enabled then the events APIs with timeout specification
* are included in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_EVENTS.
*/
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
/**
* @brief Synchronous Messages APIs.
* @details If enabled then the synchronous messages APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#define CH_CFG_USE_MESSAGES TRUE
/**
* @brief Synchronous Messages queuing mode.
* @details If enabled then messages are served by priority rather than in
* FIFO order.
*
* @note The default is @p FALSE. Enable this if you have special
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
/**
* @brief Mailboxes APIs.
* @details If enabled then the asynchronous messages (mailboxes) APIs are
* included in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES.
*/
#define CH_CFG_USE_MAILBOXES TRUE
/**
* @brief Core Memory Manager APIs.
* @details If enabled then the core memory manager APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#define CH_CFG_USE_MEMCORE TRUE
/**
* @brief Heap Allocator APIs.
* @details If enabled then the memory heap allocator APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
* @p CH_CFG_USE_SEMAPHORES.
* @note Mutexes are recommended.
*/
#define CH_CFG_USE_HEAP TRUE
/**
* @brief Memory Pools Allocator APIs.
* @details If enabled then the memory pools allocator APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#define CH_CFG_USE_MEMPOOLS TRUE
/**
* @brief Dynamic Threads APIs.
* @details If enabled then the dynamic threads creation APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_WAITEXIT.
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
#define CH_CFG_USE_DYNAMIC TRUE
/** @} */
/*===========================================================================*/
/**
* @name Debug options
* @{
*/
/*===========================================================================*/
/**
* @brief Debug option, kernel statistics.
*
* @note The default is @p FALSE.
*/
#define CH_DBG_STATISTICS FALSE
/**
* @brief Debug option, system state check.
* @details If enabled the correct call protocol for system APIs is checked
* at runtime.
*
* @note The default is @p FALSE.
*/
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
/**
* @brief Debug option, parameters checks.
* @details If enabled then the checks on the API functions input
* parameters are activated.
*
* @note The default is @p FALSE.
*/
#define CH_DBG_ENABLE_CHECKS FALSE
/**
* @brief Debug option, consistency checks.
* @details If enabled then all the assertions in the kernel code are
* activated. This includes consistency checks inside the kernel,
* runtime anomalies and port-defined checks.
*
* @note The default is @p FALSE.
*/
#define CH_DBG_ENABLE_ASSERTS FALSE
/**
* @brief Debug option, trace buffer.
* @details If enabled then the trace buffer is activated.
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
/**
* @brief Trace buffer entries.
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
* different from @p CH_DBG_TRACE_MASK_DISABLED.
*/
#define CH_DBG_TRACE_BUFFER_SIZE 128
/**
* @brief Debug option, stack checks.
* @details If enabled then a runtime stack check is performed.
*
* @note The default is @p FALSE.
* @note The stack check is performed in a architecture/port dependent way.
* It may not be implemented or some ports.
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
#define CH_DBG_ENABLE_STACK_CHECK FALSE
/**
* @brief Debug option, stacks initialization.
* @details If enabled then the threads working area is filled with a byte
* value when a thread is created. This can be useful for the
* runtime measurement of the used stack.
*
* @note The default is @p FALSE.
*/
#define CH_DBG_FILL_THREADS FALSE
/**
* @brief Debug option, threads profiling.
* @details If enabled then a field is added to the @p thread_t structure that
* counts the system ticks occurred while executing the thread.
*
* @note The default is @p FALSE.
* @note This debug option is not currently compatible with the
* tickless mode.
*/
#define CH_DBG_THREADS_PROFILING FALSE
/** @} */
/*===========================================================================*/
/**
* @name Kernel hooks
* @{
*/
/*===========================================================================*/
/**
* @brief Threads descriptor structure extension.
* @details User fields added to the end of the @p thread_t structure.
*/
#define CH_CFG_THREAD_EXTRA_FIELDS \
/* Add threads custom fields here.*/
/**
* @brief Threads initialization hook.
* @details User initialization code added to the @p chThdInit() API.
*
* @note It is invoked from within @p chThdInit() and implicitly from all
* the threads creation APIs.
*/
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
/* Add threads initialization code here.*/ \
}
/**
* @brief Threads finalization hook.
* @details User finalization code added to the @p chThdExit() API.
*/
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
/* Add threads finalization code here.*/ \
}
/**
* @brief Context switch hook.
* @details This hook is invoked just before switching between threads.
*/
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
/* Context switch code here.*/ \
}
/**
* @brief ISR enter hook.
*/
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
/* IRQ prologue code here.*/ \
}
/**
* @brief ISR exit hook.
*/
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
/* IRQ epilogue code here.*/ \
}
#define ARM_WFI_IMPL __WFI
/**
* @brief Idle thread enter hook.
* @note This hook is invoked within a critical zone, no OS functions
* should be invoked from here.
* @note This macro can be used to activate a power saving mode.
*/
#define CH_CFG_IDLE_ENTER_HOOK() { \
/* Idle-enter code here.*/ \
}
/**
* @brief Idle thread leave hook.
* @note This hook is invoked within a critical zone, no OS functions
* should be invoked from here.
* @note This macro can be used to deactivate a power saving mode.
*/
#define CH_CFG_IDLE_LEAVE_HOOK() { \
/* Idle-leave code here.*/ \
}
/**
* @brief Idle Loop hook.
* @details This hook is continuously invoked by the idle thread loop.
*/
#define CH_CFG_IDLE_LOOP_HOOK() { \
/* Idle loop code here.*/ \
}
/**
* @brief System tick event hook.
* @details This hook is invoked in the system tick handler immediately
* after processing the virtual timers queue.
*/
#define CH_CFG_SYSTEM_TICK_HOOK() { \
/* System tick event code here.*/ \
}
/**
* @brief System halt hook.
* @details This hook is invoked in case to a system halting error before
* the system is halted.
*/
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
/* System halt code here.*/ \
}
/**
* @brief Trace hook.
* @details This hook is invoked each time a new record is written in the
* trace buffer.
*/
#define CH_CFG_TRACE_HOOK(tep) { \
/* Trace code here.*/ \
}
/** @} */
/*===========================================================================*/
/* Port-specific settings (override port settings defaulted in chcore.h). */
/*===========================================================================*/
#endif /* CHCONF_H */
/** @} */
+54
View File
@@ -0,0 +1,54 @@
/**
* config.h
*
*/
#pragma once
/* USB Device descriptor parameter */
#define VENDOR_ID 0x4D58 // MX
#define PRODUCT_ID 0x0065 // noah 65
#define DEVICE_VER 0x0001
#define MANUFACTURER matrix
#define PRODUCT NOAH
#define DESCRIPTION 65% keybaord of the Matrix abel family
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 15
#define DIODE_DIRECTION COL2ROW
#define DEBOUNCING_DELAY 5
// i2c setting
#define USE_I2CV1
#define I2C1_SCL 8
#define I2C1_SDA 9
#define I2C1_CLOCK_SPEED 400000
#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2
#define PAL_MODE_STM32_ALTERNATE_OPENDRAIN (PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN)
// rgb matrix setting
#define DRIVER_ADDR_1 0b1110100
#define DRIVER_ADDR_2 0b1110110
#define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 36
#define DRIVER_2_LED_TOTAL 36
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
/* indicator rgb */
#define WS2812_LED_N 7
#define RGBLED_NUM WS2812_LED_N
#define WS2812_TIM_N 3
#define WS2812_TIM_CH 3
#define PORT_WS2812 GPIOB
#define PIN_WS2812 1
#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection)
#define WS2812_DMA_CHANNEL 5 // DMA channel for TIMx_UP
#define RGBLIGHT_ANIMATIONS
//#define WS2812_EXTERNAL_PULLUP
// tapping setting
#define TAPPING_TERM 200
#define RETRO_TAPPING
#define PERMISSIVE_HOLD
+822
View File
@@ -0,0 +1,822 @@
/**
******************************************************************************
* @file EEPROM/EEPROM_Emulation/src/eeprom.c
* @author MCD Application Team
* @brief This file provides all the EEPROM emulation firmware functions.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright � 2017 STMicroelectronics International N.V.
* All rights reserved.</center></h2>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted, provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific written permission.
* 4. This software, including modifications and/or derivative works of this
* software, must execute solely and exclusively on microcontroller or
* microprocessor devices manufactured by or for STMicroelectronics.
* 5. Redistribution and use of this software other than as permitted under
* this license is void and will automatically terminate your rights under
* this license.
*
* THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY
* RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT
* SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/** @addtogroup EEPROM_Emulation
* @{
*/
/* Includes ------------------------------------------------------------------*/
#include "eeprom_f4.h"
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Global variable used to store variable value in read sequence */
uint16_t DataVar = 0;
/* Virtual address defined by the user: 0xFFFF value is prohibited */
extern uint16_t VirtAddVarTab[NB_OF_VAR];
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
static HAL_StatusTypeDef EE_Format(void);
static uint16_t EE_FindValidPage(uint8_t Operation);
static uint16_t EE_VerifyPageFullWriteVariable(uint16_t VirtAddress, uint16_t Data);
static uint16_t EE_PageTransfer(uint16_t VirtAddress, uint16_t Data);
static uint16_t EE_VerifyPageFullyErased(uint32_t Address);
/**
* @brief Restore the pages to a known good state in case of page's status
* corruption after a power loss.
* @param None.
* @retval - Flash error code: on write Flash error
* - FLASH_COMPLETE: on success
*/
uint16_t EE_Init(void)
{
uint16_t PageStatus0 = 6, PageStatus1 = 6;
uint16_t VarIdx = 0;
uint16_t EepromStatus = 0, ReadStatus = 0;
int16_t x = -1;
HAL_StatusTypeDef FlashStatus;
FLASH_UnlockF4();
/* Get Page0 status */
PageStatus0 = (*(__IO uint16_t*)PAGE0_BASE_ADDRESS);
/* Get Page1 status */
PageStatus1 = (*(__IO uint16_t*)PAGE1_BASE_ADDRESS);
/* Check for invalid header states and repair if necessary */
switch (PageStatus0)
{
case ERASED:
if (PageStatus1 == VALID_PAGE) /* Page0 erased, Page1 valid */
{
/* Erase Page0 */
if(!EE_VerifyPageFullyErased(PAGE0_BASE_ADDRESS))
{
FlashStatus = FLASH_EraseSectorF4(PAGE0_ID);
/* If erase operation was failed, a Flash error code is returned */
if (FlashStatus != HAL_OK)
{
return FlashStatus;
}
}
}
else if (PageStatus1 == RECEIVE_DATA) /* Page0 erased, Page1 receive */
{
/* Erase Page0 */
if(!EE_VerifyPageFullyErased(PAGE0_BASE_ADDRESS))
{
FlashStatus = FLASH_EraseSectorF4(PAGE1_ID);
/* If erase operation was failed, a Flash error code is returned */
if (FlashStatus != HAL_OK)
{
return FlashStatus;
}
}
/* Mark Page1 as valid */
FlashStatus = FLASH_ProgramHalfWordF4(PAGE1_BASE_ADDRESS, VALID_PAGE);
/* If program operation was failed, a Flash error code is returned */
if (FlashStatus != HAL_OK)
{
return FlashStatus;
}
}
else /* First EEPROM access (Page0&1 are erased) or invalid state -> format EEPROM */
{
/* Erase both Page0 and Page1 and set Page0 as valid page */
FlashStatus = EE_Format();
/* If erase/program operation was failed, a Flash error code is returned */
if (FlashStatus != HAL_OK)
{
return FlashStatus;
}
}
break;
case RECEIVE_DATA:
if (PageStatus1 == VALID_PAGE) /* Page0 receive, Page1 valid */
{
/* Transfer data from Page1 to Page0 */
for (VarIdx = 0; VarIdx < NB_OF_VAR; VarIdx++)
{
if (( *(__IO uint16_t*)(PAGE0_BASE_ADDRESS + 6)) == VirtAddVarTab[VarIdx])
{
x = VarIdx;
}
if (VarIdx != x)
{
/* Read the last variables' updates */
ReadStatus = EE_ReadVariable(VirtAddVarTab[VarIdx], &DataVar);
/* In case variable corresponding to the virtual address was found */
if (ReadStatus != 0x1)
{
/* Transfer the variable to the Page0 */
EepromStatus = EE_VerifyPageFullWriteVariable(VirtAddVarTab[VarIdx], DataVar);
/* If program operation was failed, a Flash error code is returned */
if (EepromStatus != HAL_OK)
{
return EepromStatus;
}
}
}
}
/* Mark Page0 as valid */
FlashStatus = FLASH_ProgramHalfWordF4(PAGE0_BASE_ADDRESS, VALID_PAGE);
/* If program operation was failed, a Flash error code is returned */
if (FlashStatus != HAL_OK)
{
return FlashStatus;
}
/* Erase Page1 */
if(!EE_VerifyPageFullyErased(PAGE1_BASE_ADDRESS))
{
FlashStatus = FLASH_EraseSectorF4(PAGE1_ID);
/* If erase operation was failed, a Flash error code is returned */
if (FlashStatus != HAL_OK)
{
return FlashStatus;
}
}
}
else if (PageStatus1 == ERASED) /* Page0 receive, Page1 erased */
{
/* Erase Page1 */
if(!EE_VerifyPageFullyErased(PAGE1_BASE_ADDRESS))
{
FlashStatus = FLASH_EraseSectorF4(PAGE1_ID);
/* If erase operation was failed, a Flash error code is returned */
if (FlashStatus != HAL_OK)
{
return FlashStatus;
}
}
/* Mark Page0 as valid */
FlashStatus = FLASH_ProgramHalfWordF4(PAGE0_BASE_ADDRESS, VALID_PAGE);
/* If program operation was failed, a Flash error code is returned */
if (FlashStatus != HAL_OK)
{
return FlashStatus;
}
}
else /* Invalid state -> format eeprom */
{
/* Erase both Page0 and Page1 and set Page0 as valid page */
FlashStatus = EE_Format();
/* If erase/program operation was failed, a Flash error code is returned */
if (FlashStatus != HAL_OK)
{
return FlashStatus;
}
}
break;
case VALID_PAGE:
if (PageStatus1 == VALID_PAGE) /* Invalid state -> format eeprom */
{
/* Erase both Page0 and Page1 and set Page0 as valid page */
FlashStatus = EE_Format();
/* If erase/program operation was failed, a Flash error code is returned */
if (FlashStatus != HAL_OK)
{
return FlashStatus;
}
}
else if (PageStatus1 == ERASED) /* Page0 valid, Page1 erased */
{
/* Erase Page1 */
if(!EE_VerifyPageFullyErased(PAGE1_BASE_ADDRESS))
{
FlashStatus = FLASH_EraseSectorF4(PAGE1_ID);
/* If erase operation was failed, a Flash error code is returned */
if (FlashStatus != HAL_OK)
{
return FlashStatus;
}
}
}
else /* Page0 valid, Page1 receive */
{
/* Transfer data from Page0 to Page1 */
for (VarIdx = 0; VarIdx < NB_OF_VAR; VarIdx++)
{
if ((*(__IO uint16_t*)(PAGE1_BASE_ADDRESS + 6)) == VirtAddVarTab[VarIdx])
{
x = VarIdx;
}
if (VarIdx != x)
{
/* Read the last variables' updates */
ReadStatus = EE_ReadVariable(VirtAddVarTab[VarIdx], &DataVar);
/* In case variable corresponding to the virtual address was found */
if (ReadStatus != 0x1)
{
/* Transfer the variable to the Page1 */
EepromStatus = EE_VerifyPageFullWriteVariable(VirtAddVarTab[VarIdx], DataVar);
/* If program operation was failed, a Flash error code is returned */
if (EepromStatus != HAL_OK)
{
return EepromStatus;
}
}
}
}
/* Mark Page1 as valid */
FlashStatus = FLASH_ProgramHalfWordF4(PAGE1_BASE_ADDRESS, VALID_PAGE);
/* If program operation was failed, a Flash error code is returned */
if (FlashStatus != HAL_OK)
{
return FlashStatus;
}
/* Erase Page0 */
if(!EE_VerifyPageFullyErased(PAGE0_BASE_ADDRESS))
{
FlashStatus = FLASH_EraseSectorF4(PAGE0_ID);
/* If erase operation was failed, a Flash error code is returned */
if (FlashStatus != HAL_OK)
{
return FlashStatus;
}
}
}
break;
default: /* Any other state -> format eeprom */
/* Erase both Page0 and Page1 and set Page0 as valid page */
FlashStatus = EE_Format();
/* If erase/program operation was failed, a Flash error code is returned */
if (FlashStatus != HAL_OK)
{
return FlashStatus;
}
break;
}
return HAL_OK;
}
/**
* @brief Verify if specified page is fully erased.
* @param Address: page address
* This parameter can be one of the following values:
* @arg PAGE0_BASE_ADDRESS: Page0 base address
* @arg PAGE1_BASE_ADDRESS: Page1 base address
* @retval page fully erased status:
* - 0: if Page not erased
* - 1: if Page erased
*/
uint16_t EE_VerifyPageFullyErased(uint32_t Address)
{
uint32_t ReadStatus = 1;
uint16_t AddressValue = 0x5555;
/* Check each active page address starting from end */
while (Address <= PAGE0_END_ADDRESS)
{
/* Get the current location content to be compared with virtual address */
AddressValue = (*(__IO uint16_t*)Address);
/* Compare the read address with the virtual address */
if (AddressValue != ERASED)
{
/* In case variable value is read, reset ReadStatus flag */
ReadStatus = 0;
break;
}
/* Next address location */
Address = Address + 4;
}
/* Return ReadStatus value: (0: Page not erased, 1: Sector erased) */
return ReadStatus;
}
/**
* @brief Returns the last stored variable data, if found, which correspond to
* the passed virtual address
* @param VirtAddress: Variable virtual address
* @param Data: Global variable contains the read variable value
* @retval Success or error status:
* - 0: if variable was found
* - 1: if the variable was not found
* - NO_VALID_PAGE: if no valid page was found.
*/
uint16_t EE_ReadVariable(uint16_t VirtAddress, uint16_t* Data)
{
uint16_t ValidPage = PAGE0;
uint16_t AddressValue = 0x5555, ReadStatus = 1;
uint32_t Address = EEPROM_START_ADDRESS, PageStartAddress = EEPROM_START_ADDRESS;
/* Get active Page for read operation */
ValidPage = EE_FindValidPage(READ_FROM_VALID_PAGE);
/* Check if there is no valid page */
if (ValidPage == NO_VALID_PAGE)
{
return NO_VALID_PAGE;
}
/* Get the valid Page start Address */
PageStartAddress = (uint32_t)(EEPROM_START_ADDRESS + (uint32_t)(ValidPage * PAGE_SIZE));
/* Get the valid Page end Address */
Address = (uint32_t)((EEPROM_START_ADDRESS - 2) + (uint32_t)((1 + ValidPage) * PAGE_SIZE));
/* Check each active page address starting from end */
while (Address > (PageStartAddress + 2))
{
/* Get the current location content to be compared with virtual address */
AddressValue = (*(__IO uint16_t*)Address);
/* Compare the read address with the virtual address */
if (AddressValue == VirtAddress)
{
/* Get content of Address-2 which is variable value */
*Data = (*(__IO uint16_t*)(Address - 2));
/* In case variable value is read, reset ReadStatus flag */
ReadStatus = 0;
break;
}
else
{
/* Next address location */
Address = Address - 4;
}
}
/* Return ReadStatus value: (0: variable exist, 1: variable doesn't exist) */
return ReadStatus;
}
/**
* @brief Writes/upadtes variable data in EEPROM.
* @param VirtAddress: Variable virtual address
* @param Data: 16 bit data to be written
* @retval Success or error status:
* - FLASH_COMPLETE: on success
* - PAGE_FULL: if valid page is full
* - NO_VALID_PAGE: if no valid page was found
* - Flash error code: on write Flash error
*/
uint16_t EE_WriteVariable(uint16_t VirtAddress, uint16_t Data)
{
uint16_t Status = 0;
/* Write the variable virtual address and value in the EEPROM */
Status = EE_VerifyPageFullWriteVariable(VirtAddress, Data);
/* In case the EEPROM active page is full */
if (Status == PAGE_FULL)
{
/* Perform Page transfer */
Status = EE_PageTransfer(VirtAddress, Data);
}
/* Return last operation status */
return Status;
}
/**
* @brief Erases PAGE and PAGE1 and writes VALID_PAGE header to PAGE
* @param None
* @retval Status of the last operation (Flash write or erase) done during
* EEPROM formating
*/
static HAL_StatusTypeDef EE_Format(void)
{
HAL_StatusTypeDef FlashStatus = HAL_OK;
/* Erase Page0 */
if(!EE_VerifyPageFullyErased(PAGE0_BASE_ADDRESS))
{
FlashStatus = FLASH_EraseSectorF4(PAGE0_ID);
/* If erase operation was failed, a Flash error code is returned */
if (FlashStatus != HAL_OK)
{
return FlashStatus;
}
}
/* Set Page0 as valid page: Write VALID_PAGE at Page0 base address */
FlashStatus = FLASH_ProgramHalfWordF4(PAGE0_BASE_ADDRESS, VALID_PAGE);
/* If program operation was failed, a Flash error code is returned */
if (FlashStatus != HAL_OK)
{
return FlashStatus;
}
/* Erase Page1 */
if(!EE_VerifyPageFullyErased(PAGE1_BASE_ADDRESS))
{
FlashStatus = FLASH_EraseSectorF4(PAGE1_ID);
/* If erase operation was failed, a Flash error code is returned */
if (FlashStatus != HAL_OK)
{
return FlashStatus;
}
}
return HAL_OK;
}
/**
* @brief Find valid Page for write or read operation
* @param Operation: operation to achieve on the valid page.
* This parameter can be one of the following values:
* @arg READ_FROM_VALID_PAGE: read operation from valid page
* @arg WRITE_IN_VALID_PAGE: write operation from valid page
* @retval Valid page number (PAGE or PAGE1) or NO_VALID_PAGE in case
* of no valid page was found
*/
static uint16_t EE_FindValidPage(uint8_t Operation)
{
uint16_t PageStatus0 = 6, PageStatus1 = 6;
/* Get Page0 actual status */
PageStatus0 = (*(__IO uint16_t*)PAGE0_BASE_ADDRESS);
/* Get Page1 actual status */
PageStatus1 = (*(__IO uint16_t*)PAGE1_BASE_ADDRESS);
/* Write or read operation */
switch (Operation)
{
case WRITE_IN_VALID_PAGE: /* ---- Write operation ---- */
if (PageStatus1 == VALID_PAGE)
{
/* Page0 receiving data */
if (PageStatus0 == RECEIVE_DATA)
{
return PAGE0; /* Page0 valid */
}
else
{
return PAGE1; /* Page1 valid */
}
}
else if (PageStatus0 == VALID_PAGE)
{
/* Page1 receiving data */
if (PageStatus1 == RECEIVE_DATA)
{
return PAGE1; /* Page1 valid */
}
else
{
return PAGE0; /* Page0 valid */
}
}
else
{
return NO_VALID_PAGE; /* No valid Page */
}
case READ_FROM_VALID_PAGE: /* ---- Read operation ---- */
if (PageStatus0 == VALID_PAGE)
{
return PAGE0; /* Page0 valid */
}
else if (PageStatus1 == VALID_PAGE)
{
return PAGE1; /* Page1 valid */
}
else
{
return NO_VALID_PAGE ; /* No valid Page */
}
default:
return PAGE0; /* Page0 valid */
}
}
/**
* @brief Verify if active page is full and Writes variable in EEPROM.
* @param VirtAddress: 16 bit virtual address of the variable
* @param Data: 16 bit data to be written as variable value
* @retval Success or error status:
* - FLASH_COMPLETE: on success
* - PAGE_FULL: if valid page is full
* - NO_VALID_PAGE: if no valid page was found
* - Flash error code: on write Flash error
*/
static uint16_t EE_VerifyPageFullWriteVariable(uint16_t VirtAddress, uint16_t Data)
{
HAL_StatusTypeDef FlashStatus = HAL_OK;
uint16_t ValidPage = PAGE0;
uint32_t Address = EEPROM_START_ADDRESS, PageEndAddress = EEPROM_START_ADDRESS+PAGE_SIZE;
/* Get valid Page for write operation */
ValidPage = EE_FindValidPage(WRITE_IN_VALID_PAGE);
/* Check if there is no valid page */
if (ValidPage == NO_VALID_PAGE)
{
return NO_VALID_PAGE;
}
/* Get the valid Page start Address */
Address = (uint32_t)(EEPROM_START_ADDRESS + (uint32_t)(ValidPage * PAGE_SIZE));
/* Get the valid Page end Address */
PageEndAddress = (uint32_t)((EEPROM_START_ADDRESS - 1) + (uint32_t)((ValidPage + 1) * PAGE_SIZE));
/* Check each active page address starting from begining */
while (Address < PageEndAddress)
{
/* Verify if Address and Address+2 contents are 0xFFFFFFFF */
if ((*(__IO uint32_t*)Address) == 0xFFFFFFFF)
{
/* Set variable data */
FlashStatus = FLASH_ProgramHalfWordF4(Address, Data);
/* If program operation was failed, a Flash error code is returned */
if (FlashStatus != HAL_OK)
{
return FlashStatus;
}
/* Set variable virtual address */
FlashStatus = FLASH_ProgramHalfWordF4(Address + 2, VirtAddress);
/* Return program operation status */
return FlashStatus;
}
else
{
/* Next address location */
Address = Address + 4;
}
}
/* Return PAGE_FULL in case the valid page is full */
return PAGE_FULL;
}
/**
* @brief Transfers last updated variables data from the full Page to
* an empty one.
* @param VirtAddress: 16 bit virtual address of the variable
* @param Data: 16 bit data to be written as variable value
* @retval Success or error status:
* - FLASH_COMPLETE: on success
* - PAGE_FULL: if valid page is full
* - NO_VALID_PAGE: if no valid page was found
* - Flash error code: on write Flash error
*/
static uint16_t EE_PageTransfer(uint16_t VirtAddress, uint16_t Data)
{
HAL_StatusTypeDef FlashStatus = HAL_OK;
uint32_t NewPageAddress = EEPROM_START_ADDRESS;
uint16_t OldPageId=0;
uint16_t ValidPage = PAGE0, VarIdx = 0;
uint16_t EepromStatus = 0, ReadStatus = 0;
/* Get active Page for read operation */
ValidPage = EE_FindValidPage(READ_FROM_VALID_PAGE);
if (ValidPage == PAGE1) /* Page1 valid */
{
/* New page address where variable will be moved to */
NewPageAddress = PAGE0_BASE_ADDRESS;
/* Old page ID where variable will be taken from */
OldPageId = PAGE1_ID;
}
else if (ValidPage == PAGE0) /* Page0 valid */
{
/* New page address where variable will be moved to */
NewPageAddress = PAGE1_BASE_ADDRESS;
/* Old page ID where variable will be taken from */
OldPageId = PAGE0_ID;
}
else
{
return NO_VALID_PAGE; /* No valid Page */
}
/* Set the new Page status to RECEIVE_DATA status */
FlashStatus = FLASH_ProgramHalfWordF4(NewPageAddress, RECEIVE_DATA);
/* If program operation was failed, a Flash error code is returned */
if (FlashStatus != HAL_OK)
{
return FlashStatus;
}
/* Write the variable passed as parameter in the new active page */
EepromStatus = EE_VerifyPageFullWriteVariable(VirtAddress, Data);
/* If program operation was failed, a Flash error code is returned */
if (EepromStatus != HAL_OK)
{
return EepromStatus;
}
/* Transfer process: transfer variables from old to the new active page */
for (VarIdx = 0; VarIdx < NB_OF_VAR; VarIdx++)
{
if (VirtAddVarTab[VarIdx] != VirtAddress) /* Check each variable except the one passed as parameter */
{
/* Read the other last variable updates */
ReadStatus = EE_ReadVariable(VirtAddVarTab[VarIdx], &DataVar);
/* In case variable corresponding to the virtual address was found */
if (ReadStatus != 0x1)
{
/* Transfer the variable to the new active page */
EepromStatus = EE_VerifyPageFullWriteVariable(VirtAddVarTab[VarIdx], DataVar);
/* If program operation was failed, a Flash error code is returned */
if (EepromStatus != HAL_OK)
{
return EepromStatus;
}
}
}
}
/* Erase the old Page: Set old Page status to ERASED status */
FlashStatus = FLASH_EraseSectorF4(OldPageId);
/* If erase operation was failed, a Flash error code is returned */
if (FlashStatus != HAL_OK)
{
return FlashStatus;
}
/* Set new Page status to VALID_PAGE status */
FlashStatus = FLASH_ProgramHalfWordF4(NewPageAddress, VALID_PAGE);
/* If program operation was failed, a Flash error code is returned */
if (FlashStatus != HAL_OK)
{
return FlashStatus;
}
/* Return last operation flash status */
return FlashStatus;
}
/* flash operation */
#define EraseTimeout ((uint32_t)0x00000FFF)
#define ProgramTimeout ((uint32_t)0x0000001F)
#define FLASH_PSIZE_BYTE 0
#define FLASH_PSIZE_HFWORD FLASH_CR_PSIZE_0
#define FLASH_PSIZE_WORD FLASH_CR_PSIZE_1
#define FLASH_CR_SNB_Pos 3
#define FLASH_KEY1_F4 0x45670123
#define FLASH_KEY2_F4 0xCDEF89AB
#define ASSERT(exp) (void)((0))
static void Flash_Delay(void)
{
__IO uint32_t i = 0;
for(i = 0xFF; i != 0; i--) { }
}
static HAL_StatusTypeDef FLASH_GetStatus(void)
{
if ((FLASH->SR & FLASH_SR_BSY) == FLASH_SR_BSY)
return HAL_BUSY;
if ((FLASH->SR & (FLASH_SR_PGSERR|FLASH_SR_PGPERR|FLASH_SR_PGAERR)) != 0)
return HAL_ERROR;
if ((FLASH->SR & FLASH_SR_WRPERR) != 0 )
return HAL_ERROR;
if ((FLASH->SR & FLASH_SR_SOP) != 0 )
return HAL_ERROR;
return HAL_OK;
}
static HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t timeout)
{
/* Check for the Flash Status */
HAL_StatusTypeDef status = FLASH_GetStatus();
/* Wait for a Flash operation to complete or a TIMEOUT to occur */
while ((status == HAL_BUSY) && (timeout != 0x00))
{
Flash_Delay();
status = FLASH_GetStatus();
timeout--;
}
if (timeout == 0)
status = HAL_TIMEOUT;
return status;
}
HAL_StatusTypeDef FLASH_UnlockF4(void)
{
FLASH->KEYR = FLASH_KEY1_F4;
FLASH->KEYR = FLASH_KEY2_F4;
return HAL_OK;
}
HAL_StatusTypeDef FLASH_EraseSectorF4(uint32_t sector)
{
HAL_StatusTypeDef status = HAL_OK;
/* Wait for last operation to be completed */
status = FLASH_WaitForLastOperation(EraseTimeout);
if(status == HAL_OK) {
/* if the previous operation is completed, proceed to erase the page */
CLEAR_BIT(FLASH->CR, FLASH_CR_PSIZE);
FLASH->CR |= FLASH_PSIZE_WORD;
CLEAR_BIT(FLASH->CR, FLASH_CR_SNB);
FLASH->CR |= FLASH_CR_SER | (sector << FLASH_CR_SNB_Pos);
FLASH->CR |= FLASH_CR_STRT;
/* Wait for last operation to be completed */
status = FLASH_WaitForLastOperation(EraseTimeout);
if(status != HAL_TIMEOUT)
{
/* if the erase operation is completed, disable the PER Bit */
FLASH->CR &= ~FLASH_CR_SNB;
FLASH->CR &= ~FLASH_CR_SER;
}
FLASH->SR = (FLASH_SR_EOP | FLASH_SR_SOP | FLASH_SR_WRPERR);
}
/* Return the Erase Status */
return status;
}
HAL_StatusTypeDef FLASH_ProgramHalfWordF4(uint32_t address, uint16_t data)
{
HAL_StatusTypeDef status = HAL_ERROR;
if (IS_FLASH_ADDRESS(address))
{
/* Wait for last operation to be completed */
status = FLASH_WaitForLastOperation(ProgramTimeout);
if(status == HAL_OK) {
// set size to byte
FLASH->CR &= ~FLASH_CR_PSIZE;
FLASH->CR |= FLASH_PSIZE_HFWORD;
FLASH->CR |= FLASH_CR_PG;
*(__IO uint16_t*)address = data;
/* Wait for last operation to be completed */
status = FLASH_WaitForLastOperation(ProgramTimeout);
if(status != HAL_TIMEOUT)
{
/* if the program operation is completed, disable the PG Bit */
FLASH->CR &= ~FLASH_CR_PG;
}
FLASH->SR = (FLASH_SR_EOP | FLASH_SR_SOP | FLASH_SR_PGSERR | FLASH_SR_PGPERR | FLASH_SR_PGAERR | FLASH_SR_WRPERR);
}
}
return status;
}
/**
* @}
*/
/******************* (C) COPYRIGHT 2017 STMicroelectronics *****END OF FILE****/
+130
View File
@@ -0,0 +1,130 @@
/**
******************************************************************************
* @file EEPROM/EEPROM_Emulation/inc/eeprom.h
* @author MCD Application Team
* @brief This file contains all the functions prototypes for the EEPROM
* emulation firmware library.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright � 2017 STMicroelectronics International N.V.
* All rights reserved.</center></h2>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted, provided that the following conditions are met:
*
* 1. Redistribution of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of other
* contributors to this software may be used to endorse or promote products
* derived from this software without specific written permission.
* 4. This software, including modifications and/or derivative works of this
* software, must execute solely and exclusively on microcontroller or
* microprocessor devices manufactured by or for STMicroelectronics.
* 5. Redistribution and use of this software other than as permitted under
* this license is void and will automatically terminate your rights under
* this license.
*
* THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY
* RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT
* SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __EEPROM_H
#define __EEPROM_H
/* Includes ------------------------------------------------------------------*/
#include "hal.h"
typedef enum
{
HAL_OK = 0x00U,
HAL_ERROR = 0x01U,
HAL_BUSY = 0x02U,
HAL_TIMEOUT = 0x03U
} HAL_StatusTypeDef;
/* Exported constants --------------------------------------------------------*/
/* EEPROM emulation firmware error codes */
#define EE_OK (uint32_t)HAL_OK
#define EE_ERROR (uint32_t)HAL_ERROR
#define EE_BUSY (uint32_t)HAL_BUSY
#define EE_TIMEOUT (uint32_t)HAL_TIMEOUT
/* Define the size of the sectors to be used */
#define PAGE_SIZE (uint32_t)0x4000 /* Page size = 16KByte */
/* Device voltage range supposed to be [2.7V to 3.6V], the operation will
be done by word */
#define VOLTAGE_RANGE (uint8_t)VOLTAGE_RANGE_3
/* EEPROM start address in Flash */
#define EEPROM_START_ADDRESS ((uint32_t)0x08008000) /* EEPROM emulation start address:
from sector2 : after 16KByte of used
Flash memory */
/* Pages 0 and 1 base and end addresses */
#define PAGE0_BASE_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + 0x0000))
#define PAGE0_END_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + (PAGE_SIZE - 1)))
#define PAGE0_ID 2//FLASH_SECTOR_2
#define PAGE1_BASE_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + 0x4000))
#define PAGE1_END_ADDRESS ((uint32_t)(EEPROM_START_ADDRESS + (2 * PAGE_SIZE - 1)))
#define PAGE1_ID 3//FLASH_SECTOR_3
/* Used Flash pages for EEPROM emulation */
#define PAGE0 ((uint16_t)0x0000)
#define PAGE1 ((uint16_t)0x0001) /* Page nb between PAGE0_BASE_ADDRESS & PAGE1_BASE_ADDRESS*/
/* No valid page define */
#define NO_VALID_PAGE ((uint16_t)0x00AB)
/* Page status definitions */
#define ERASED ((uint16_t)0xFFFF) /* Page is empty */
#define RECEIVE_DATA ((uint16_t)0xEEEE) /* Page is marked to receive data */
#define VALID_PAGE ((uint16_t)0x0000) /* Page containing valid data */
/* Valid pages in read and write defines */
#define READ_FROM_VALID_PAGE ((uint8_t)0x00)
#define WRITE_IN_VALID_PAGE ((uint8_t)0x01)
/* Page full define */
#define PAGE_FULL ((uint8_t)0x80)
/* Variables' number */
#define NB_OF_VAR ((uint8_t)0x16)
/* Exported types ------------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
HAL_StatusTypeDef FLASH_UnlockF4(void);
HAL_StatusTypeDef FLASH_EraseSectorF4(uint32_t sector);
HAL_StatusTypeDef FLASH_ProgramHalfWordF4(uint32_t address, uint16_t data);
uint16_t EE_Init(void);
uint16_t EE_ReadVariable(uint16_t VirtAddress, uint16_t* Data);
uint16_t EE_WriteVariable(uint16_t VirtAddress, uint16_t Data);
#define IS_FLASH_ADDRESS(ADDRESS) (((ADDRESS) >= EEPROM_START_ADDRESS) && ((ADDRESS) < PAGE1_END_ADDRESS))
#define IS_FLASH_SECTOR(SECTOR) (((SECTOR) >= PAGE0_ID) && ((SECTOR) <= PAGE1_ID))
#endif /* __EEPROM_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
+388
View File
@@ -0,0 +1,388 @@
/*
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/**
* @file templates/halconf.h
* @brief HAL configuration header.
* @details HAL configuration file, this file allows to enable or disable the
* various device drivers from your application. You may also use
* this file in order to override the device drivers default settings.
*
* @addtogroup HAL_CONF
* @{
*/
#ifndef HALCONF_H
#define HALCONF_H
#include "mcuconf.h"
/**
* @brief Enables the PAL subsystem.
*/
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
#define HAL_USE_PAL TRUE
#endif
/**
* @brief Enables the ADC subsystem.
*/
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
#define HAL_USE_ADC FALSE
#endif
/**
* @brief Enables the CAN subsystem.
*/
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
#define HAL_USE_CAN FALSE
#endif
/**
* @brief Enables the DAC subsystem.
*/
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
#define HAL_USE_DAC FALSE
#endif
/**
* @brief Enables the EXT subsystem.
*/
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
#define HAL_USE_EXT FALSE
#endif
/**
* @brief Enables the GPT subsystem.
*/
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
#define HAL_USE_GPT TRUE
#endif
/**
* @brief Enables the I2C subsystem.
*/
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
#define HAL_USE_I2C TRUE
#endif
/**
* @brief Enables the I2S subsystem.
*/
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
#define HAL_USE_I2S FALSE
#endif
/**
* @brief Enables the ICU subsystem.
*/
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
#define HAL_USE_ICU FALSE
#endif
/**
* @brief Enables the MAC subsystem.
*/
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
#define HAL_USE_MAC FALSE
#endif
/**
* @brief Enables the MMC_SPI subsystem.
*/
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
#define HAL_USE_MMC_SPI FALSE
#endif
/**
* @brief Enables the PWM subsystem.
*/
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
#define HAL_USE_PWM TRUE
#endif
/**
* @brief Enables the QSPI subsystem.
*/
#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
#define HAL_USE_QSPI FALSE
#endif
/**
* @brief Enables the RTC subsystem.
*/
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
#define HAL_USE_RTC FALSE
#endif
/**
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
#define HAL_USE_SDC FALSE
#endif
/**
* @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
#define HAL_USE_SERIAL FALSE
#endif
/**
* @brief Enables the SERIAL over USB subsystem.
*/
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
#define HAL_USE_SERIAL_USB FALSE
#endif
/**
* @brief Enables the SPI subsystem.
*/
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
#define HAL_USE_SPI TRUE
#endif
/**
* @brief Enables the UART subsystem.
*/
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
#define HAL_USE_UART FALSE
#endif
/**
* @brief Enables the USB subsystem.
*/
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
#define HAL_USE_USB TRUE
#endif
/**
* @brief Enables the WDG subsystem.
*/
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
#define HAL_USE_WDG FALSE
#endif
/*===========================================================================*/
/* ADC driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
#define ADC_USE_WAIT TRUE
#endif
/**
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define ADC_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
/* CAN driver related settings. */
/*===========================================================================*/
/**
* @brief Sleep mode related APIs inclusion switch.
*/
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
#define CAN_USE_SLEEP_MODE TRUE
#endif
/*===========================================================================*/
/* I2C driver related settings. */
/*===========================================================================*/
/**
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define I2C_USE_MUTUAL_EXCLUSION TRUE
#endif
/*===========================================================================*/
/* MAC driver related settings. */
/*===========================================================================*/
/**
* @brief Enables an event sources for incoming packets.
*/
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
#define MAC_USE_ZERO_COPY FALSE
#endif
/**
* @brief Enables an event sources for incoming packets.
*/
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
#define MAC_USE_EVENTS TRUE
#endif
/*===========================================================================*/
/* MMC_SPI driver related settings. */
/*===========================================================================*/
/**
* @brief Delays insertions.
* @details If enabled this options inserts delays into the MMC waiting
* routines releasing some extra CPU time for the threads with
* lower priority, this may slow down the driver a bit however.
* This option is recommended also if the SPI driver does not
* use a DMA channel and heavily loads the CPU.
*/
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
#define MMC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
/* SDC driver related settings. */
/*===========================================================================*/
/**
* @brief Number of initialization attempts before rejecting the card.
* @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
#define SDC_INIT_RETRY 100
#endif
/**
* @brief Include support for MMC cards.
* @note MMC support is not yet implemented so this option must be kept
* at @p FALSE.
*/
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
#define SDC_MMC_SUPPORT FALSE
#endif
/**
* @brief Delays insertions.
* @details If enabled this options inserts delays into the MMC waiting
* routines releasing some extra CPU time for the threads with
* lower priority, this may slow down the driver a bit however.
*/
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
#define SDC_NICE_WAITING TRUE
#endif
/*===========================================================================*/
/* SERIAL driver related settings. */
/*===========================================================================*/
/**
* @brief Default bit rate.
* @details Configuration parameter, this is the baud rate selected for the
* default configuration.
*/
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
#define SERIAL_DEFAULT_BITRATE 38400
#endif
/**
* @brief Serial buffers size.
* @details Configuration parameter, you can change the depth of the queue
* buffers depending on the requirements of your application.
* @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_BUFFERS_SIZE 16
#endif
/*===========================================================================*/
/* SERIAL_USB driver related setting. */
/*===========================================================================*/
/**
* @brief Serial over USB buffers size.
* @details Configuration parameter, the buffer size must be a multiple of
* the USB data endpoint maximum packet size.
* @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_USB_BUFFERS_SIZE 256
#endif
/**
* @brief Serial over USB number of buffers.
* @note The default is 2 buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
#define SERIAL_USB_BUFFERS_NUMBER 2
#endif
/*===========================================================================*/
/* SPI driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
#define SPI_USE_WAIT TRUE
#endif
/**
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define SPI_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
/* UART driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
#define UART_USE_WAIT FALSE
#endif
/**
* @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
#define UART_USE_MUTUAL_EXCLUSION FALSE
#endif
/*===========================================================================*/
/* USB driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
#define USB_USE_WAIT TRUE
#endif
#endif /* HALCONF_H */
/** @} */
+721
View File
@@ -0,0 +1,721 @@
{
"keyboard_name": "NOAH",
"url": "",
"maintainer": "astro",
"width": 16,
"height": 5,
"layouts": {
"LAYOUT_default": {
"key_count": 68,
"layout": [
{
"label": "~",
"x": 0,
"y": 0
},
{
"label": "!",
"x": 1,
"y": 0
},
{
"label": "@",
"x": 2,
"y": 0
},
{
"label": "#",
"x": 3,
"y": 0
},
{
"label": "$",
"x": 4,
"y": 0
},
{
"label": "%",
"x": 5,
"y": 0
},
{
"label": "^",
"x": 6,
"y": 0
},
{
"label": "&",
"x": 7,
"y": 0
},
{
"label": "*",
"x": 8,
"y": 0
},
{
"label": "(",
"x": 9,
"y": 0
},
{
"label": ")",
"x": 10,
"y": 0
},
{
"label": "_",
"x": 11,
"y": 0
},
{
"label": "+",
"x": 12,
"y": 0
},
{
"label": "|",
"x": 13,
"y": 0
},
{
"label":"Backspace",
"x": 14,
"y": 0
},
{
"label":"Print Screen",
"x": 15,
"y": 0
},
{
"label": "Tab",
"x": 0,
"y": 1,
"w": 1.5
},
{
"label": "Q",
"x": 1.5,
"y": 1
},
{
"label": "W",
"x": 2.5,
"y": 1
},
{
"label": "E",
"x": 3.5,
"y": 1
},
{
"label": "R",
"x": 4.5,
"y": 1
},
{
"label": "T",
"x": 5.5,
"y": 1
},
{
"label": "Y",
"x": 6.5,
"y": 1
},
{
"label": "U",
"x": 7.5,
"y": 1
},
{
"label": "I",
"x": 8.5,
"y": 1
},
{
"label": "O",
"x": 9.5,
"y": 1
},
{
"label": "P",
"x": 10.5,
"y": 1
},
{
"label": "{",
"x": 11.5,
"y": 1
},
{
"label": "}",
"x": 12.5,
"y": 1
},
{
"label": "|",
"x": 13.5,
"y": 1,
"w": 1.5
},
{ "label": "Page Up",
"x": 15,
"y": 1
},
{
"label": "Caps Lock",
"x": 0,
"y": 2,
"w": 1.75
},
{
"label": "A",
"x": 1.75,
"y": 2
},
{
"label": "S",
"x": 2.75,
"y": 2
},
{
"label": "D",
"x": 3.75,
"y": 2
},
{
"label": "F",
"x": 4.75,
"y": 2
},
{
"label": "G",
"x": 5.75,
"y": 2
},
{
"label": "H",
"x": 6.75,
"y": 2
},
{
"label": "J",
"x": 7.75,
"y": 2
},
{
"label": "K",
"x": 8.75,
"y": 2
},
{
"label": "L",
"x": 9.75,
"y": 2
},
{
"label": ":",
"x": 10.75,
"y": 2
},
{
"label": "\"",
"x": 11.75,
"y": 2
},
{
"label": "Enter",
"x": 12.75,
"y": 2,
"w": 2.25
},
{
"label": "Page Down",
"x": 15,
"y": 2
},
{
"label": "Shift",
"x": 0,
"y": 3,
"w": 2.25
},
{
"label": "Z",
"x": 2.25,
"y": 3
},
{
"label": "X",
"x": 3.25,
"y": 3
},
{
"label": "C",
"x": 4.25,
"y": 3
},
{
"label": "V",
"x": 5.25,
"y": 3
},
{
"label": "B",
"x": 6.25,
"y": 3
},
{
"label": "N",
"x": 7.25,
"y": 3
},
{
"label": "M",
"x": 8.25,
"y": 3
},
{
"label": "<",
"x": 9.25,
"y": 3
},
{
"label": ">",
"x": 10.25,
"y": 3
},
{
"label": "?",
"x": 11.25,
"y": 3
},
{
"label": "Shift",
"x": 12.25,
"y": 3,
"w": 1.75
},
{
"label": "Up",
"x": 14,
"y": 3
},
{
"label": "End"
"x": 15,
"y": 3
},
{
"label": "Ctrl",
"x": 0,
"y": 4,
"w": 1.25
},
{
"label": "Win",
"x": 1.25,
"y": 4,
"w": 1.25
},
{
"label": "Alt",
"x": 2.5,
"y": 4,
"w": 1.25
},
{
"x": 3.75,
"y": 4,
"w": 6.25
},
{
"label": "Alt",
"x": 10,
"y": 4,
"w": 1.25
},
{
"label": "Win",
"x": 11.25,
"y": 4,
"w": 1.25
},
{
"label": "Left",
"x": 13,
"y": 4
},
{
"label": "Down",
"x": 14,
"y": 4
},
{
"label": "Right",
"x": 15,
"y": 4
}
]
},
"LAYOUT_iso": {
"key_count": 68,
"layout": [
{
"label": "~",
"x": 0,
"y": 0
},
{
"label": "!",
"x": 1,
"y": 0
},
{
"label": "@",
"x": 2,
"y": 0
},
{
"label": "#",
"x": 3,
"y": 0
},
{
"label": "$",
"x": 4,
"y": 0
},
{
"label": "%",
"x": 5,
"y": 0
},
{
"label": "^",
"x": 6,
"y": 0
},
{
"label": "&",
"x": 7,
"y": 0
},
{
"label": "*",
"x": 8,
"y": 0
},
{
"label": "(",
"x": 9,
"y": 0
},
{
"label": ")",
"x": 10,
"y": 0
},
{
"label": "_",
"x": 11,
"y": 0
},
{
"label": "+",
"x": 12,
"y": 0
},
{
"label": "Backspace",
"x": 13,
"y": 0,
"w": 2
},
{
"label": "Print Screen",
"x": 15,
"y": 0
},
{
"label": "Tab",
"x": 0,
"y": 1,
"w": 1.5
},
{
"label": "Q",
"x": 1.5,
"y": 1
},
{
"label": "W",
"x": 2.5,
"y": 1
},
{
"label": "E",
"x": 3.5,
"y": 1
},
{
"label": "R",
"x": 4.5,
"y": 1
},
{
"label": "T",
"x": 5.5,
"y": 1
},
{
"label": "Y",
"x": 6.5,
"y": 1
},
{
"label": "U",
"x": 7.5,
"y": 1
},
{
"label": "I",
"x": 8.5,
"y": 1
},
{
"label": "O",
"x": 9.5,
"y": 1
},
{
"label": "P",
"x": 10.5,
"y": 1
},
{
"label": "{",
"x": 11.5,
"y": 1
},
{
"label": "}",
"x": 12.5,
"y": 1
},
{
"label": "Enter",
"x": 13.75,
"y": 1,
"w": 1.25,
"h": 2
},
{
"label": "Page Up",
"x": 15,
"y": 1
},
{
"label": "Caps Lock",
"x": 0,
"y": 2,
"w": 1.75
},
{
"label": "A",
"x": 1.75,
"y": 2
},
{
"label": "S",
"x": 2.75,
"y": 2
},
{
"label": "D",
"x": 3.75,
"y": 2
},
{
"label": "F",
"x": 4.75,
"y": 2
},
{
"label": "G",
"x": 5.75,
"y": 2
},
{
"label": "H",
"x": 6.75,
"y": 2
},
{
"label": "J",
"x": 7.75,
"y": 2
},
{
"label": "K",
"x": 8.75,
"y": 2
},
{
"label": "L",
"x": 9.75,
"y": 2
},
{
"label": ":",
"x": 10.75,
"y": 2
},
{
"label": "\"",
"x": 11.75,
"y": 2
},
{
"label": "|",
"x": 12.75,
"y": 2
},
{
"label": "Page Down",
"x": 15,
"y": 2
},
{
"label": "Shift",
"x": 0,
"y": 3,
"w": 1.25
},
{
"label":"Win",
"x": 1.25,
"y": 3
},
{
"label": "Z",
"x": 2.25,
"y": 3
},
{
"label": "X",
"x": 3.25,
"y": 3
},
{
"label": "C",
"x": 4.25,
"y": 3
},
{
"label": "V",
"x": 5.25,
"y": 3
},
{
"label": "B",
"x": 6.25,
"y": 3
},
{
"label": "N",
"x": 7.25,
"y": 3
},
{
"label": "M",
"x": 8.25,
"y": 3
},
{
"label": "<",
"x": 9.25,
"y": 3
},
{
"label": ">",
"x": 10.25,
"y": 3
},
{
"label": "?",
"x": 11.25,
"y": 3
},
{
"label": "Shift",
"x": 12.25,
"y": 3,
"w": 1.75
},
{
"label": "Up",
"x": 14,
"y": 3
},
{
"label": "End",
"x": 15,
"y": 3
},
{
"label": "Ctrl",
"x": 0,
"y": 4,
"w": 1.25
},
{
"label": "Win",
"x": 1.25,
"y": 4,
"w": 1.25
},
{
"label": "Alt",
"x": 2.5,
"y": 4,
"w": 1.25
},
{
"x": 3.75,
"y": 4,
"w": 6.25
},
{
"label": "Alt",
"x": 10,
"y": 4,
"w": 1.25
},
{
"label": "Win",
"x": 11.25,
"y": 4,
"w": 1.25
},
{
"label": "Left",
"x": 13,
"y": 4
},
{
"label": "Down",
"x": 14,
"y": 4
},
{
"label": "Right",
"x": 15,
"y": 4
}
]
}
}
}
@@ -0,0 +1,20 @@
/**
* keymap.c
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_default(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PSCR,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP,
KC_LCTRL, 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_RSFT, KC_UP, KC_END,
KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT),
[1] = LAYOUT_default(
KC_BSLS, 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, RGB_TOG, RGB_MOD, _______, KC_F13, KC_F14, KC_F24, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______,_______, _______, _______, _______),
};
@@ -0,0 +1,20 @@
/**
* keymap.c
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_default_splitspace(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PSCR,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP,
KC_LCTRL, 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_RSFT, KC_UP, KC_END,
KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT),
[1] = LAYOUT_default_splitspace(
KC_BSLS, 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, RGB_TOG, RGB_MOD, _______, KC_F13, KC_F14, KC_F24, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
};
+85
View File
@@ -0,0 +1,85 @@
/*
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/*
* STM32F411xE memory setup.
*/
MEMORY
{
flash0 : org = 0x08020000, len = 512k-128k
flash1 : org = 0x00000000, len = 0
flash2 : org = 0x00000000, len = 0
flash3 : org = 0x00000000, len = 0
flash4 : org = 0x00000000, len = 0
flash5 : org = 0x00000000, len = 0
flash6 : org = 0x00000000, len = 0
flash7 : org = 0x00000000, len = 0
ram0 : org = 0x20000000, len = 128k
ram1 : org = 0x00000000, len = 0
ram2 : org = 0x00000000, len = 0
ram3 : org = 0x00000000, len = 0
ram4 : org = 0x00000000, len = 0
ram5 : org = 0x00000000, len = 0
ram6 : org = 0x00000000, len = 0
ram7 : org = 0x00000000, len = 0
}
/* For each data/text section two region are defined, a virtual region
and a load region (_LMA suffix).*/
/* Flash region to be used for exception vectors.*/
REGION_ALIAS("VECTORS_FLASH", flash0);
REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
/* Flash region to be used for constructors and destructors.*/
REGION_ALIAS("XTORS_FLASH", flash0);
REGION_ALIAS("XTORS_FLASH_LMA", flash0);
/* Flash region to be used for code text.*/
REGION_ALIAS("TEXT_FLASH", flash0);
REGION_ALIAS("TEXT_FLASH_LMA", flash0);
/* Flash region to be used for read only data.*/
REGION_ALIAS("RODATA_FLASH", flash0);
REGION_ALIAS("RODATA_FLASH_LMA", flash0);
/* Flash region to be used for various.*/
REGION_ALIAS("VARIOUS_FLASH", flash0);
REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
/* Flash region to be used for RAM(n) initialization data.*/
REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
/* RAM region to be used for Main stack. This stack accommodates the processing
of all exceptions and interrupts.*/
REGION_ALIAS("MAIN_STACK_RAM", ram0);
/* RAM region to be used for the process stack. This is the stack used by
the main() function.*/
REGION_ALIAS("PROCESS_STACK_RAM", ram0);
/* RAM region to be used for data segment.*/
REGION_ALIAS("DATA_RAM", ram0);
REGION_ALIAS("DATA_RAM_LMA", flash0);
/* RAM region to be used for BSS segment.*/
REGION_ALIAS("BSS_RAM", ram0);
/* RAM region to be used for the default heap.*/
REGION_ALIAS("HEAP_RAM", ram0);
/* Generic rules inclusion.*/
INCLUDE rules.ld
+166
View File
@@ -0,0 +1,166 @@
/**
* matrix.c
*/
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "hal.h"
#include "quantum.h"
#include "timer.h"
#include "wait.h"
#include "printf.h"
#include "matrix.h"
/**
*
* Row pins are input with internal pull-down.
* Column pins are output and strobe with high.
* Key is high or 1 when it turns on.
*
*/
/* matrix state(1:on, 0:off) */
static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_COLS];
static bool debouncing = false;
static uint16_t debouncing_time = 0;
void matrix_init(void)
{
//debug_enable = true;
palSetLineMode(LINE_COL_1, PAL_MODE_OUTPUT_PUSHPULL);
palSetLineMode(LINE_COL_2, PAL_MODE_OUTPUT_PUSHPULL);
palSetLineMode(LINE_COL_3, PAL_MODE_OUTPUT_PUSHPULL);
palSetLineMode(LINE_COL_4, PAL_MODE_OUTPUT_PUSHPULL);
palSetLineMode(LINE_COL_5, PAL_MODE_OUTPUT_PUSHPULL);
palSetLineMode(LINE_COL_6, PAL_MODE_OUTPUT_PUSHPULL);
palSetLineMode(LINE_COL_7, PAL_MODE_OUTPUT_PUSHPULL);
palSetLineMode(LINE_COL_8, PAL_MODE_OUTPUT_PUSHPULL);
palSetLineMode(LINE_COL_9, PAL_MODE_OUTPUT_PUSHPULL);
palSetLineMode(LINE_COL_10, PAL_MODE_OUTPUT_PUSHPULL);
palSetLineMode(LINE_COL_11, PAL_MODE_OUTPUT_PUSHPULL);
palSetLineMode(LINE_COL_12, PAL_MODE_OUTPUT_PUSHPULL);
palSetLineMode(LINE_COL_13, PAL_MODE_OUTPUT_PUSHPULL);
palSetLineMode(LINE_COL_14, PAL_MODE_OUTPUT_PUSHPULL);
palSetLineMode(LINE_COL_15, PAL_MODE_OUTPUT_PUSHPULL);
palSetLineMode(LINE_ROW_1, PAL_MODE_INPUT_PULLDOWN);
palSetLineMode(LINE_ROW_2, PAL_MODE_INPUT_PULLDOWN);
palSetLineMode(LINE_ROW_3, PAL_MODE_INPUT_PULLDOWN);
palSetLineMode(LINE_ROW_4, PAL_MODE_INPUT_PULLDOWN);
palSetLineMode(LINE_ROW_5, PAL_MODE_INPUT_PULLDOWN);
palClearLine(LINE_COL_1);
palClearLine(LINE_COL_2);
palClearLine(LINE_COL_3);
palClearLine(LINE_COL_4);
palClearLine(LINE_COL_5);
palClearLine(LINE_COL_6);
palClearLine(LINE_COL_7);
palClearLine(LINE_COL_8);
palClearLine(LINE_COL_9);
palClearLine(LINE_COL_10);
palClearLine(LINE_COL_11);
palClearLine(LINE_COL_12);
palClearLine(LINE_COL_13);
palClearLine(LINE_COL_14);
palClearLine(LINE_COL_15);
memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_row_t));
matrix_init_quantum();
}
uint8_t matrix_scan(void)
{
for (int col = 0; col < MATRIX_COLS; col++) {
matrix_row_t data = 0;
switch (col) {
case 0: palSetLine(LINE_COL_1); break;
case 1: palSetLine(LINE_COL_2); break;
case 2: palSetLine(LINE_COL_3); break;
case 3: palSetLine(LINE_COL_4); break;
case 4: palSetLine(LINE_COL_5); break;
case 5: palSetLine(LINE_COL_6); break;
case 6: palSetLine(LINE_COL_7); break;
case 7: palSetLine(LINE_COL_8); break;
case 8: palSetLine(LINE_COL_9); break;
case 9: palSetLine(LINE_COL_10); break;
case 10: palSetLine(LINE_COL_11); break;
case 11: palSetLine(LINE_COL_12); break;
case 12: palSetLine(LINE_COL_13); break;
case 13: palSetLine(LINE_COL_14); break;
case 14: palSetLine(LINE_COL_15); break;
}
// need wait to settle pin state
wait_us(20);
data = (
(palReadLine(LINE_ROW_1) << 0 ) |
(palReadLine(LINE_ROW_2) << 1 ) |
(palReadLine(LINE_ROW_3) << 2 ) |
(palReadLine(LINE_ROW_4) << 3 ) |
(palReadLine(LINE_ROW_5) << 4 )
);
switch (col) {
case 0: palClearLine(LINE_COL_1); break;
case 1: palClearLine(LINE_COL_2); break;
case 2: palClearLine(LINE_COL_3); break;
case 3: palClearLine(LINE_COL_4); break;
case 4: palClearLine(LINE_COL_5); break;
case 5: palClearLine(LINE_COL_6); break;
case 6: palClearLine(LINE_COL_7); break;
case 7: palClearLine(LINE_COL_8); break;
case 8: palClearLine(LINE_COL_9); break;
case 9: palClearLine(LINE_COL_10); break;
case 10: palClearLine(LINE_COL_11); break;
case 11: palClearLine(LINE_COL_12); break;
case 12: palClearLine(LINE_COL_13); break;
case 13: palClearLine(LINE_COL_14); break;
case 14: palClearLine(LINE_COL_15); break;
}
if (matrix_debouncing[col] != data) {
matrix_debouncing[col] = data;
debouncing = true;
debouncing_time = timer_read();
}
}
if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCING_DELAY) {
for (int row = 0; row < MATRIX_ROWS; row++) {
matrix[row] = 0;
for (int col = 0; col < MATRIX_COLS; col++) {
matrix[row] |= ((matrix_debouncing[col] & (1 << row) ? 1 : 0) << col);
}
}
debouncing = false;
}
matrix_scan_quantum();
return 1;
}
bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & (1<<col)); }
matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }
void matrix_print(void)
{
printf("\nr/c 01234567\n");
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
printf("%X0: ", row);
matrix_row_t data = matrix_get_row(row);
for (int col = 0; col < MATRIX_COLS; col++) {
if (data & (1<<col))
printf("1");
else
printf("0");
}
printf("\n");
}
}
+268
View File
@@ -0,0 +1,268 @@
/*
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#ifndef MCUCONF_H
#define MCUCONF_H
/*
* STM32F4xx drivers configuration.
* The following settings override the default settings present in
* the various device driver implementation headers.
* Note that the settings for each driver only have effect if the whole
* driver is enabled in halconf.h.
*
* IRQ priorities:
* 15...0 Lowest...Highest.
*
* DMA priorities:
* 0...3 Lowest...Highest.
*/
#define STM32F4xx_MCUCONF
/*
* HAL driver system settings.
*/
#define STM32_NO_INIT FALSE
#define STM32_HSI_ENABLED TRUE
#define STM32_LSI_ENABLED TRUE
#define STM32_HSE_ENABLED TRUE
#define STM32_LSE_ENABLED FALSE
#define STM32_CLOCK48_REQUIRED TRUE
#define STM32_SW STM32_SW_PLL
#define STM32_PLLSRC STM32_PLLSRC_HSE
#define STM32_PLLM_VALUE 8
#define STM32_PLLN_VALUE 192
#define STM32_PLLP_VALUE 2
#define STM32_PLLQ_VALUE 4
#define STM32_HPRE STM32_HPRE_DIV1
#define STM32_PPRE1 STM32_PPRE1_DIV2
#define STM32_PPRE2 STM32_PPRE2_DIV2
#define STM32_RTCSEL STM32_RTCSEL_LSI
#define STM32_RTCPRE_VALUE 8
#define STM32_MCO1SEL STM32_MCO1SEL_HSI
#define STM32_MCO1PRE STM32_MCO1PRE_DIV1
#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK
#define STM32_MCO2PRE STM32_MCO2PRE_DIV5
#define STM32_I2SSRC STM32_I2SSRC_PLLI2S
#define STM32_PLLI2SN_VALUE 192
#define STM32_PLLI2SR_VALUE 2
#define STM32_PVD_ENABLE FALSE
#define STM32_PLS STM32_PLS_LEV0
#define STM32_BKPRAM_ENABLE FALSE
/*
* ADC driver system settings.
*/
#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4
#define STM32_ADC_USE_ADC1 FALSE
#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4)
#define STM32_ADC_ADC1_DMA_PRIORITY 2
#define STM32_ADC_IRQ_PRIORITY 6
#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6
/*
* EXT driver system settings.
*/
#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
#define STM32_EXT_EXTI17_IRQ_PRIORITY 15
#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
#define STM32_EXT_EXTI22_IRQ_PRIORITY 15
/*
* GPT driver system settings.
*/
#define STM32_GPT_USE_TIM1 FALSE
#define STM32_GPT_USE_TIM2 FALSE
#define STM32_GPT_USE_TIM3 FALSE
#define STM32_GPT_USE_TIM4 TRUE
#define STM32_GPT_USE_TIM5 FALSE
#define STM32_GPT_USE_TIM9 FALSE
#define STM32_GPT_USE_TIM11 FALSE
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
#define STM32_GPT_TIM4_IRQ_PRIORITY 7
#define STM32_GPT_TIM5_IRQ_PRIORITY 7
#define STM32_GPT_TIM9_IRQ_PRIORITY 7
#define STM32_GPT_TIM11_IRQ_PRIORITY 7
/*
* I2C driver system settings.
*/
#define STM32_I2C_USE_I2C1 TRUE
#define STM32_I2C_USE_I2C2 FALSE
#define STM32_I2C_USE_I2C3 FALSE
#define STM32_I2C_BUSY_TIMEOUT 50
#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0)
#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
#define STM32_I2C_I2C1_IRQ_PRIORITY 5
#define STM32_I2C_I2C2_IRQ_PRIORITY 5
#define STM32_I2C_I2C3_IRQ_PRIORITY 5
#define STM32_I2C_I2C1_DMA_PRIORITY 3
#define STM32_I2C_I2C2_DMA_PRIORITY 3
#define STM32_I2C_I2C3_DMA_PRIORITY 3
#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
/*
* I2S driver system settings.
*/
#define STM32_I2S_USE_SPI2 FALSE
#define STM32_I2S_USE_SPI3 FALSE
#define STM32_I2S_SPI2_IRQ_PRIORITY 10
#define STM32_I2S_SPI3_IRQ_PRIORITY 10
#define STM32_I2S_SPI2_DMA_PRIORITY 1
#define STM32_I2S_SPI3_DMA_PRIORITY 1
#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0)
#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
#define STM32_I2S_DMA_ERROR_HOOK(i2sp) osalSysHalt("DMA failure")
/*
* ICU driver system settings.
*/
#define STM32_ICU_USE_TIM1 FALSE
#define STM32_ICU_USE_TIM2 FALSE
#define STM32_ICU_USE_TIM3 FALSE
#define STM32_ICU_USE_TIM4 FALSE
#define STM32_ICU_USE_TIM5 FALSE
#define STM32_ICU_USE_TIM9 FALSE
#define STM32_ICU_TIM1_IRQ_PRIORITY 7
#define STM32_ICU_TIM2_IRQ_PRIORITY 7
#define STM32_ICU_TIM3_IRQ_PRIORITY 7
#define STM32_ICU_TIM4_IRQ_PRIORITY 7
#define STM32_ICU_TIM5_IRQ_PRIORITY 7
#define STM32_ICU_TIM9_IRQ_PRIORITY 7
/*
* PWM driver system settings.
*/
#define STM32_PWM_USE_ADVANCED FALSE
#define STM32_PWM_USE_TIM1 TRUE
#define STM32_PWM_USE_TIM2 FALSE
#define STM32_PWM_USE_TIM3 TRUE
#define STM32_PWM_USE_TIM4 FALSE
#define STM32_PWM_USE_TIM5 FALSE
#define STM32_PWM_USE_TIM9 FALSE
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
#define STM32_PWM_TIM2_IRQ_PRIORITY 7
#define STM32_PWM_TIM3_IRQ_PRIORITY 7
#define STM32_PWM_TIM4_IRQ_PRIORITY 7
#define STM32_PWM_TIM5_IRQ_PRIORITY 7
#define STM32_PWM_TIM9_IRQ_PRIORITY 7
/*
* SERIAL driver system settings.
*/
#define STM32_SERIAL_USE_USART1 FALSE
#define STM32_SERIAL_USE_USART2 FALSE
#define STM32_SERIAL_USE_USART3 FALSE
#define STM32_SERIAL_USE_USART6 FALSE
#define STM32_SERIAL_USART1_PRIORITY 12
#define STM32_SERIAL_USART2_PRIORITY 12
#define STM32_SERIAL_USART3_PRIORITY 12
#define STM32_SERIAL_USART6_PRIORITY 12
/*
* SPI driver system settings.
*/
#define STM32_SPI_USE_SPI1 TRUE
#define STM32_SPI_USE_SPI2 FALSE
#define STM32_SPI_USE_SPI3 FALSE
#define STM32_SPI_USE_SPI4 FALSE
#define STM32_SPI_USE_SPI5 FALSE
#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0)
#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3)
#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0)
#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
#define STM32_SPI_SPI4_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 4)
#define STM32_SPI_SPI4_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
#define STM32_SPI_SPI5_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)
#define STM32_SPI_SPI5_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 6)
#define STM32_SPI_SPI1_DMA_PRIORITY 1
#define STM32_SPI_SPI2_DMA_PRIORITY 1
#define STM32_SPI_SPI3_DMA_PRIORITY 1
#define STM32_SPI_SPI4_DMA_PRIORITY 1
#define STM32_SPI_SPI5_DMA_PRIORITY 1
#define STM32_SPI_SPI1_IRQ_PRIORITY 10
#define STM32_SPI_SPI2_IRQ_PRIORITY 10
#define STM32_SPI_SPI3_IRQ_PRIORITY 10
#define STM32_SPI_SPI4_IRQ_PRIORITY 10
#define STM32_SPI_SPI5_IRQ_PRIORITY 10
#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
/*
* ST driver system settings.
*/
#define STM32_ST_IRQ_PRIORITY 8
#define STM32_ST_USE_TIMER 2
/*
* UART driver system settings.
*/
#define STM32_UART_USE_USART1 FALSE
#define STM32_UART_USE_USART2 FALSE
#define STM32_UART_USE_USART3 FALSE
#define STM32_UART_USE_USART6 FALSE
#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)
#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7)
#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
#define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 1)
#define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7)
#define STM32_UART_USART1_IRQ_PRIORITY 12
#define STM32_UART_USART2_IRQ_PRIORITY 12
#define STM32_UART_USART3_IRQ_PRIORITY 12
#define STM32_UART_USART6_IRQ_PRIORITY 12
#define STM32_UART_USART1_DMA_PRIORITY 0
#define STM32_UART_USART2_DMA_PRIORITY 0
#define STM32_UART_USART3_DMA_PRIORITY 0
#define STM32_UART_USART6_DMA_PRIORITY 0
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
/*
* USB driver system settings.
*/
#define STM32_USB_USE_OTG1 TRUE
#define STM32_USB_OTG1_IRQ_PRIORITY 14
#define STM32_USB_OTG1_RX_FIFO_SIZE 512
#define STM32_USB_OTG_THREAD_PRIO LOWPRIO
#define STM32_USB_OTG_THREAD_STACK_SIZE 128
#define STM32_USB_OTGFIFO_FILL_BASEPRI 0
/*
* WDG driver system settings.
*/
#define STM32_WDG_USE_IWDG FALSE
#endif /* MCUCONF_H */
+243
View File
@@ -0,0 +1,243 @@
/**
* noah.c
*/
#include "noah.h"
#ifdef RGBLIGHT_ENABLE
#include <string.h>
#include "rgblight.h"
#include "ws2812_f4.h"
extern rgblight_config_t rgblight_config;
// led 0 for caps lock, led 1 for scroll lock, led 3 for num lock
// led 4 for layer 1, led 5 for layer 2, led 6 for layer 3, led 7 for layer 4
#if RGBLED_NUM < 7
#error "MUST set the RGBLED_NUM bigger than 7"
#endif
LED_TYPE noah_leds[RGBLED_NUM];
static bool noah_led_mode = false;
void rgblight_set(void) {
memset(&noah_leds[0], 0, sizeof(noah_leds));
if (!rgblight_config.enable) {
for (uint8_t i = 0; i < RGBLED_NUM; i++) {
led[i].r = 0;
led[i].g = 0;
led[i].b = 0;
}
}
if (noah_led_mode) {
uint8_t ind_led = host_keyboard_leds();
if (IS_LED_ON(ind_led, USB_LED_CAPS_LOCK)) {
noah_leds[0] = led[0];
}
if (IS_LED_ON(ind_led, USB_LED_SCROLL_LOCK)) {
noah_leds[1] = led[1];
}
if (IS_LED_ON(ind_led, USB_LED_NUM_LOCK)) {
noah_leds[2] = led[2];
}
for (int32_t i = 0; i < 4; i++) {
if(layer_state_is(i+1)) {
noah_leds[i + 3] = led[i + 3];
}
}
} else {
memcpy(&noah_leds[0], &led[0], sizeof(noah_leds));
}
ws2812_setleds(noah_leds, RGBLED_NUM);
}
#endif
void matrix_scan_kb(void) { matrix_scan_user(); }
void matrix_init_kb(void) {
matrix_init_user();
}
__attribute__((weak))
void matrix_init_user(void) {
#ifdef RGBLIGHT_ENABLE
ws2812_init();
rgblight_enable();
#endif
#ifdef RGB_MATRIX_ENABLE
rgb_matrix_disable();
#endif
}
__attribute__((weak))
void matrix_scan_user(void) {
#ifdef RGBLIGHT_ENABLE
rgblight_task();
#endif
}
#ifdef RGB_MATRIX_ENABLE
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
* | | G location
* | | | B location
* | | | | */
// left CB
{0, C1_9, C3_10, C4_10},
{0, C1_10, C2_10, C4_11},
{0, C1_11, C2_11, C3_11},
{0, C1_12, C2_12, C3_12},
{0, C1_13, C2_13, C3_13},
{0, C1_14, C2_14, C3_14},
{0, C1_15, C2_15, C3_15},
{0, C1_16, C2_16, C3_16},
{0, C5_9, C4_9, C6_9},
{0, C5_16, C4_16, C6_16},
{0, C9_9, C8_9, C7_9},
{0, C9_10, C8_10, C7_10},
{0, C9_11, C8_11, C7_11},
{0, C9_12, C8_12, C7_12},
{0, C9_13, C8_13, C7_13},
{0, C9_14, C8_14, C7_14},
{0, C9_15, C8_15, C6_14},
{0, C9_16, C7_15, C6_15},
// left CA
{0, C1_1, C3_2, C4_2},
{0, C1_2, C2_2, C4_3},
{0, C1_3, C2_3, C3_3},
{0, C1_4, C2_4, C3_4},
{0, C1_5, C2_5, C3_5},
{0, C1_6, C2_6, C3_6},
{0, C1_7, C2_7, C3_7},
{0, C1_8, C2_8, C3_8},
{0, C5_1, C4_1, C6_1},
{0, C5_8, C4_8, C6_8},
{0, C9_1, C8_1, C7_1},
{0, C9_2, C8_2, C7_2},
{0, C9_3, C8_3, C7_3},
{0, C9_4, C8_4, C7_4},
{0, C9_5, C8_5, C7_5},
{0, C9_6, C8_6, C7_6},
{0, C9_7, C8_7, C6_6},
{0, C9_8, C7_7, C6_7},
// right CA
{1, C1_1, C3_2, C4_2},
{1, C1_2, C2_2, C4_3},
{1, C1_3, C2_3, C3_3},
{1, C1_4, C2_4, C3_4},
{1, C1_5, C2_5, C3_5},
{1, C1_6, C2_6, C3_6},
{1, C1_7, C2_7, C3_7},
{1, C1_8, C2_8, C3_8},
{1, C5_1, C4_1, C6_1},
{1, C5_8, C4_8, C6_8},
{1, C9_1, C8_1, C7_1},
{1, C9_2, C8_2, C7_2},
{1, C9_3, C8_3, C7_3},
{1, C9_4, C8_4, C7_4},
{1, C9_5, C8_5, C7_5},
{1, C9_6, C8_6, C7_6},
{1, C9_7, C8_7, C6_6},
{1, C9_8, C7_7, C6_7},
// right CB
{1, C1_9, C3_10, C4_10},
{1, C1_10, C2_10, C4_11},
{1, C1_11, C2_11, C3_11},
{1, C1_12, C2_12, C3_12},
{1, C1_13, C2_13, C3_13},
{1, C1_14, C2_14, C3_14},
{1, C1_15, C2_15, C3_15},
{1, C1_16, C2_16, C3_16},
{1, C5_9, C4_9, C6_9},
{1, C5_16, C4_16, C6_16},
{1, C9_9, C8_9, C7_9},
{1, C9_10, C8_10, C7_10},
{1, C9_11, C8_11, C7_11},
{1, C9_12, C8_12, C7_12},
{1, C9_13, C8_13, C7_13},
{1, C9_14, C8_14, C7_14},
{1, C9_15, C8_15, C6_14},
{1, C9_16, C7_15, C6_15},
};
led_config_t g_led_config = {
{
{ 1, 2, 3, 4, 5, 6, 7, 36, 37, 38, 39, 40, NO_LED, 41},
{ 0, 8, 10, 11, 12, 13, 14, 44, 46, 47, 48, 49, 50, 51},
{ 30, 18, 26, 9, 19, 15, 16, 17, 55, 56, 57, 58, 59, 60},
{ 29, 31, 32, 33, 20, 21, 23, 22, 54, 62, 64, 65, 66, 63},
{ 34, 35, 27, 25, 67, 68, 69, 70, 71, 61, 53, 45, 42, 43},
},
{
{ 0, 16},{ 0, 0},{ 15, 0},{ 30, 0},{ 45, 0},{ 60, 0},{ 75, 0},{ 90, 0},
{ 20, 16},{ 42, 32},
{ 45, 16},{ 50, 16},{ 65, 16},{ 80, 16},{ 95, 16},{ 70, 32},{ 84, 32},{ 98, 32},
{ 14, 32},{ 56, 32},{ 50, 48},{ 80, 48},{110, 48},{ 95, 48},{100, 64},{112, 64},
{ 42, 32},{ 38, 64},
{ 0, 32},{ 10, 48},{ 0, 48},{ 20, 48},{ 35, 48},{ 65, 48},{ 0, 64},{ 19, 64},
{105, 0},{120, 0},{135, 0},{150, 0},{165, 0},{180, 0},{202, 0},{224, 0},
{110, 16},{224, 16},
{125, 16},{140, 16},{155, 16},{172, 16},{187, 16},{202, 16},{210, 32},{224, 32},
{125, 48},{112, 32},{126, 32},{140, 32},{154, 32},{168, 32},{182, 32},{224, 48},
{140, 48},{200, 48},
{155, 48},{170, 48},{185, 48},{150, 64},{173, 64},{195, 64},{210, 64},{224, 64}
},
{
1, 1, 4, 4, 4, 4, 4, 4,
4, 4,
4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4,
4, 4,
1, 1, 1, 4, 4, 4, 1, 1,
4, 4, 4, 4, 4, 4, 1, 1,
4, 1,
4, 4, 4, 4, 4, 4, 4, 1,
4, 4, 4, 4, 4, 4, 4, 1,
4, 4,
4, 4, 4, 1, 1, 1, 1, 1,
}
};
#endif
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
switch(keycode) {
#ifdef RGBLIGHT_ENABLE
case KC_F24: // switch the led mode on or off
noah_led_mode = !noah_led_mode;
return false;
#ifdef RGB_MATRIX_ENABLE
case KC_F13: // toggle rgb matrix
rgb_matrix_toggle();
return false;
case KC_F14:
rgb_matrix_step();
return false;
#endif
#endif
default:
break;
}
}
return true;
}
+91
View File
@@ -0,0 +1,91 @@
/**
* noah.h
*/
#pragma once
#include "quantum.h"
#define LAYOUT_default( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, k2e, \
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \
k40, k41, k42, k43, k44, k45, k46, k47, k48) \
{ \
{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, KC_NO}, \
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b,KC_NO,k2d, KC_NO}, \
{k30,KC_NO,k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO}, \
{k40, k41, k42,KC_NO,k43,KC_NO,k44, k45, k46, k47, k48, k1e, k2e, k3e, k0f} \
}
#define LAYOUT_wkl( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, k2e, \
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \
k40, k41, k42, k43, k45, k46, k47, k48 \
) { \
{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, KC_NO}, \
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b,KC_NO,k2d, KC_NO}, \
{k30,KC_NO,k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO}, \
{k40, k41, k42,KC_NO,k43,KC_NO,KC_NO, k45, k46, k47, k48, k1e, k2e, k3e, k0f} \
}
#define LAYOUT_iso( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0f, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \
k40, k41, k42, k43, k45, k46, k47, k48 \
) { \
{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, KC_NO}, \
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO}, \
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO}, \
{k40, k41, k42,KC_NO,k43,KC_NO,KC_NO, k45, k46, k47, k48, k1e, k2e, k3e, k0f} \
}
#define LAYOUT_default_splitspace( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, k2e, \
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a \
) { \
{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, KC_NO}, \
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b,KC_NO,k2d, KC_NO}, \
{k30,KC_NO,k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO}, \
{k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k1e, k2e, k3e, k0f} \
}
#define LAYOUT_wkl_splitspace( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, k2e, \
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \
k40, k41, k42, k43, k45, k46, k47, k48, k49, k4a \
) { \
{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, KC_NO}, \
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b,KC_NO,k2d, KC_NO}, \
{k30,KC_NO,k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO}, \
{k40, k41, k42, k43, k45,KC_NO,k46, k47, k48, k49, k4a, k1e, k2e, k3e, k0f} \
}
#define LAYOUT_iso_splitspace( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0f, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \
k40, k41, k42, k43, k45, k46, k47, k48, k49, k4a \
) { \
{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, KC_NO}, \
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO}, \
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO}, \
{k40, k41, k42, k43, k45,KC_NO,k46, k47, k48, k49, k4a, k1e, k2e, k3e, k0f} \
}
+19
View File
@@ -0,0 +1,19 @@
# NOAH 65 keyboard
![NOAH](https://raw.githubusercontent.com/yulei/qmk_webusb_tool/master/public/noah.jpg)
This was the first 65% keyboard made by the Matrix team, it had the following features:
- per key rgb led
- 7 RGB led for caps, scroll , num lock and layer state indicator, or just play light animation effects
- ansi and iso layouts, and split spacebar supported
- pre-programmed bootloader which emulated usb stick to ease firmware updating
Keyboard Maintainer: [astro](https://github.com/yulei)
Hardware Supported: Matrix NOAH keyboard
Hardware Availability: [NOAH Keybaord](https://geekhack.org/index.php?topic=102300.0)
Make example for this keyboard (after setting up your build environment):
make matrix/noah:default
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
+57
View File
@@ -0,0 +1,57 @@
## chip/board settings
# - the next two should match the directories in
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
MCU_FAMILY = STM32
MCU_SERIES = STM32F4xx
# Linker script to use
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
# or <this_dir>/ld/
MCU_LDSCRIPT = noah_boot
# Startup code to use
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
MCU_STARTUP = stm32f4xx
# Board: it should exist either in <chibios>/os/hal/boards/
# or <this_dir>/boards
BOARD = noah_bd
# Cortex version
MCU = cortex-m4
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
ARMV = 7
USE_FPU = yes
# Vector table for application
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
OPT_DEFS =
# Options to pass to dfu-util when flashing
#DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
#DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no # USB Nkey Rollover
NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in
CUSTOM_MATRIX = yes
RGB_MATRIX_ENABLE = yes
RGBLIGHT_ENABLE = yes
RGBLIGHT_CUSTOM_DRIVER = yes
# project specific files
SRC += \
matrix.c \
ws2812_f4.c \
eeprom_f4.c
+272
View File
@@ -0,0 +1,272 @@
/**
* @file ws2812.c
* @author Austin Glaser <[email protected]>, Joerg Wangemann <[email protected]>
* @brief WS2812 LED driver
*
* Copyright (C) 2016 Austin Glaser, 2017 Joerg Wangemann
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*
* @todo Put in names and descriptions of variables which need to be defined to use this file
*
* @addtogroup WS2812
* @{
*/
/* --- PRIVATE DEPENDENCIES ------------------------------------------------- */
// This Driver
#include "ws2812_f4.h"
// Standard
#include <stdint.h>
// ChibiOS
#include "ch.h"
#include "hal.h"
#include "wait.h"
// Application
//#include "board.h"
// TODO: Add these #define's to the headers of your project.
// Pin, timer and dma are all connected, check them all if you change one.
// Tested with STM32F4, working at 144 or 168 MHz.
//#define WS2812_LED_N 2 // Number of LEDs
//#define PORT_WS2812 GPIOB
//#define PIN_WS2812 9
//#define WS2812_TIM_N 4 // timer, 1-11
//#define WS2812_TIM_CH 3 // timer channel, 0-3
//#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection)
//#define WS2812_DMA_CHANNEL 6 // DMA channel for TIMx_UP
// The WS2812 expects 5V signal level (or at least 0.7 * VDD). Sometimes it works
// with a 3V signal level, otherwise the easiest way to get the signal level to 5V
// is to add an external pullup resistor from the DI pin to 5V (10k will do) and
// configure the pin as open drain.
// (An SMD resistor is easily solders on the connections of a light strip)
// Uncomment the next line if an external pullup resistor is used.
//#define WS2812_EXTERNAL_PULLUP
/* --- CONFIGURATION CHECK -------------------------------------------------- */
#if !defined(WS2812_LED_N)
#error WS2812 LED chain length not specified
#elif WS2812_LED_N <= 0
#error WS2812 LED chain length set to invalid value
#endif
#if !defined(WS2812_TIM_N)
#error WS2812 timer not specified
#endif
#if defined(STM32F2XX) || defined(STM32F4XX) || defined(STM32F7XX)
#if WS2812_TIM_N <= 2
#define WS2812_AF 1
#elif WS2812_TIM_N <= 5
#define WS2812_AF 2
#elif WS2812_TIM_N <= 11
#define WS2812_AF 3
#endif
#elif !defined(WS2812_AF)
#error WS2812_AF timer alternate function not specified
#endif
#if !defined(WS2812_TIM_CH)
#error WS2812 timer channel not specified
#elif WS2812_TIM_CH >= 4
#error WS2812 timer channel set to invalid value
#endif
/* --- PRIVATE CONSTANTS ---------------------------------------------------- */
#define WS2812_PWM_FREQUENCY (STM32_SYSCLK/2) /**< Clock frequency of PWM, must be valid with respect to system clock! */
#define WS2812_PWM_PERIOD (WS2812_PWM_FREQUENCY/800000) /**< Clock period in ticks. 1 / 800kHz = 1.25 uS (as per datasheet) */
/**
* @brief Number of bit-periods to hold the data line low at the end of a frame
*
* The reset period for each frame must be at least 50 uS; so we add in 50 bit-times
* of zeroes at the end. (50 bits)*(1.25 uS/bit) = 62.5 uS, which gives us some
* slack in the timing requirements
*/
#define WS2812_RESET_BIT_N (50)
#define WS2812_COLOR_BIT_N (WS2812_LED_N*24) /**< Number of data bits */
#define WS2812_BIT_N (WS2812_COLOR_BIT_N + WS2812_RESET_BIT_N) /**< Total number of bits in a frame */
/**
* @brief High period for a zero, in ticks
*
* Per the datasheet:
* WS2812:
* - T0H: 200 nS to 500 nS, inclusive
* - T0L: 650 nS to 950 nS, inclusive
* WS2812B:
* - T0H: 200 nS to 500 nS, inclusive
* - T0L: 750 nS to 1050 nS, inclusive
*
* The duty cycle is calculated for a high period of 350 nS.
*/
#define WS2812_DUTYCYCLE_0 (WS2812_PWM_FREQUENCY/(1000000000/450))
/**
* @brief High period for a one, in ticks
*
* Per the datasheet:
* WS2812:
* - T1H: 550 nS to 850 nS, inclusive
* - T1L: 450 nS to 750 nS, inclusive
* WS2812B:
* - T1H: 750 nS to 1050 nS, inclusive
* - T1L: 200 nS to 500 nS, inclusive
*
* The duty cycle is calculated for a high period of 800 nS.
* This is in the middle of the specifications of the WS2812 and WS2812B.
*/
#define WS2812_DUTYCYCLE_1 (WS2812_PWM_FREQUENCY/(1000000000/900))
/* --- PRIVATE MACROS ------------------------------------------------------- */
/**
* @brief Generates a reference to a numbered PWM driver
*
* @param[in] n: The driver (timer) number
*
* @return A reference to the driver
*/
#define PWMD(n) CONCAT_EXPANDED_SYMBOLS(PWMD, n)
#define WS2812_PWMD PWMD(WS2812_TIM_N) /**< The PWM driver to use for the LED chain */
/**
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given bit
*
* @param[in] led: The led index [0, @ref WS2812_LED_N)
* @param[in] byte: The byte number [0, 2]
* @param[in] bit: The bit number [0, 7]
*
* @return The bit index
*/
#define WS2812_BIT(led, byte, bit) (24*(led) + 8*(byte) + (7 - (bit)))
/**
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given red bit
*
* @note The red byte is the middle byte in the color packet
*
* @param[in] led: The led index [0, @ref WS2812_LED_N)
* @param[in] bit: The bit number [0, 7]
*
* @return The bit index
*/
#define WS2812_RED_BIT(led, bit) WS2812_BIT((led), 1, (bit))
/**
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given green bit
*
* @note The green byte is the first byte in the color packet
*
* @param[in] led: The led index [0, @ref WS2812_LED_N)
* @param[in] bit: The bit number [0, 7]
*
* @return The bit index
*/
#define WS2812_GREEN_BIT(led, bit) WS2812_BIT((led), 0, (bit))
/**
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given blue bit
*
* @note The blue byte is the last byte in the color packet
*
* @param[in] led: The led index [0, @ref WS2812_LED_N)
* @param[in] bit: The bit index [0, 7]
*
* @return The bit index
*/
#define WS2812_BLUE_BIT(led, bit) WS2812_BIT((led), 2, (bit))
/* --- PRIVATE VARIABLES ---------------------------------------------------- */
static uint32_t ws2812_frame_buffer[WS2812_BIT_N + 1]; /**< Buffer for a frame */
/* --- PUBLIC FUNCTIONS ----------------------------------------------------- */
/*
* Gedanke: Double-buffer type transactions: double buffer transfers using two memory pointers for
the memory (while the DMA is reading/writing from/to a buffer, the application can
write/read to/from the other buffer).
*/
void ws2812_init(void)
{
// Initialize led frame buffer
uint32_t i;
for (i = 0; i < WS2812_COLOR_BIT_N; i++) ws2812_frame_buffer[i] = WS2812_DUTYCYCLE_0; // All color bits are zero duty cycle
for (i = 0; i < WS2812_RESET_BIT_N; i++) ws2812_frame_buffer[i + WS2812_COLOR_BIT_N] = 0; // All reset bits are zero
// Configure pin as AF output. If there's an external pull up resistor the signal level is brought to 5V using open drain mode.
#ifdef WS2812_EXTERNAL_PULLUP
palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_ALTERNATE(WS2812_AF) | PAL_STM32_OTYPE_OPENDRAIN);
#else
palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_ALTERNATE(WS2812_AF) | PAL_STM32_OTYPE_PUSHPULL); //PAL_MODE_STM32_ALTERNATE_PUSHPULL);
#endif
//palClearPad(PORT_WS2812, PIN_WS2812);
//wait_ms(1);
// PWM Configuration
#pragma GCC diagnostic ignored "-Woverride-init" // Turn off override-init warning for this struct. We use the overriding ability to set a "default" channel config
static const PWMConfig ws2812_pwm_config = {
.frequency = WS2812_PWM_FREQUENCY,
.period = WS2812_PWM_PERIOD, //Mit dieser Periode wird UDE-Event erzeugt und ein neuer Wert (Länge WS2812_BIT_N) vom DMA ins CCR geschrieben
.callback = NULL,
.channels = {
[0 ... 3] = {.mode = PWM_OUTPUT_DISABLED, .callback = NULL}, // Channels default to disabled
[WS2812_TIM_CH] = {.mode = PWM_OUTPUT_ACTIVE_HIGH, .callback = NULL}, // Turn on the channel we care about
},
.cr2 = 0,
.dier = TIM_DIER_UDE, // DMA on update event for next period
};
#pragma GCC diagnostic pop // Restore command-line warning options
// Configure DMA
//dmaInit(); // Joe added this
dmaStreamAllocate(WS2812_DMA_STREAM, 10, NULL, NULL);
dmaStreamSetPeripheral(WS2812_DMA_STREAM, &(WS2812_PWMD.tim->CCR[WS2812_TIM_CH])); // Ziel ist der An-Zeit im Cap-Comp-Register
dmaStreamSetMemory0(WS2812_DMA_STREAM, ws2812_frame_buffer);
dmaStreamSetTransactionSize(WS2812_DMA_STREAM, WS2812_BIT_N);
dmaStreamSetMode(WS2812_DMA_STREAM,
STM32_DMA_CR_CHSEL(WS2812_DMA_CHANNEL) | STM32_DMA_CR_DIR_M2P | STM32_DMA_CR_PSIZE_WORD | STM32_DMA_CR_MSIZE_WORD |
STM32_DMA_CR_MINC | STM32_DMA_CR_CIRC | STM32_DMA_CR_PL(3));
// M2P: Memory 2 Periph; PL: Priority Level
// Start DMA
dmaStreamEnable(WS2812_DMA_STREAM);
// Configure PWM
// NOTE: It's required that preload be enabled on the timer channel CCR register. This is currently enabled in the
// ChibiOS driver code, so we don't have to do anything special to the timer. If we did, we'd have to start the timer,
// disable counting, enable the channel, and then make whatever configuration changes we need.
pwmStart(&WS2812_PWMD, &ws2812_pwm_config);
pwmEnableChannel(&WS2812_PWMD, WS2812_TIM_CH, 0); // Initial period is 0; output will be low until first duty cycle is DMA'd in
}
ws2812_err_t ws2812_write_led(uint32_t led_number, uint8_t r, uint8_t g, uint8_t b)
{
// Check for valid LED
if (led_number > WS2812_LED_N) return WS2812_LED_INVALID;
// Write color to frame buffer
for (uint32_t bit = 0; bit < 8; bit++) {
ws2812_frame_buffer[WS2812_RED_BIT(led_number, bit)] = ((r >> bit) & 0x01) ? WS2812_DUTYCYCLE_1 : WS2812_DUTYCYCLE_0;
ws2812_frame_buffer[WS2812_GREEN_BIT(led_number, bit)] = ((g >> bit) & 0x01) ? WS2812_DUTYCYCLE_1 : WS2812_DUTYCYCLE_0;
ws2812_frame_buffer[WS2812_BLUE_BIT(led_number, bit)] = ((b >> bit) & 0x01) ? WS2812_DUTYCYCLE_1 : WS2812_DUTYCYCLE_0;
}
// Success
return WS2812_SUCCESS;
}
void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds)
{
for(int i = 0; i < number_of_leds; i++) {
ws2812_write_led(i, ledarray[i].r, ledarray[i].g, ledarray[i].b);
}
}
/** @} addtogroup WS2812 */
+102
View File
@@ -0,0 +1,102 @@
/**
* @file ws2812.h
* @author Austin Glaser <[email protected]>
* @brief Interface to WS2812 LED driver
*
* Copyright (C) 2016 Austin Glaser
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*
* @todo Put in names and descriptions of variables which need to be defined to use this file
*/
#ifndef WS2812_H_
#define WS2812_H_
/**
* @defgroup WS2812 WS2812 Driver
* @{
*
* @brief DMA-based WS2812 LED driver
*
* A driver for WS2812 LEDs
*/
/* --- PUBLIC DEPENDENCIES -------------------------------------------------- */
// Standard
#include <stdint.h>
#include "color.h"
/* --- PUBLIC MACROS -------------------------------------------------------- */
/**
* @brief Concatenates two symbols s1 and s2 exactly, without expanding either
*
* @param[in] s1: The first symbol to concatenate
* @param[in] s2: The second symbol to concatenate
*
* @return A single symbol containing s1 and s2 concatenated without expansion
*/
#define CONCAT_SYMBOLS(s1, s2) s1##s2
/**
* @brief Concatenate the symbols s1 and s2, expanding both of them
*
* This is important because simply applying s1##s2 doesn't expand them if they're
* preprocessor tokens themselves
*
* @param[in] s1: The first symbol to concatenate
* @param[in] s2: The second symbol to concatenate
*
* @return A single symbol containing s1 expanded followed by s2 expanded
*/
#define CONCAT_EXPANDED_SYMBOLS(s1, s2) CONCAT_SYMBOLS(s1, s2)
/* --- PUBLIC CONSTANTS ----------------------------------------------------- */
/**
* @brief Return codes from ws2812 interface functions
*/
typedef enum {
WS2812_SUCCESS = 0x00, /**< Operation completeed successfully */
WS2812_LED_INVALID, /**< Attempted to index an invalid LED (@ref WS2812_N_LEDS) */
MAX_WS2812_ERR, /**< Total number of possible error codes */
WS2812_ERR_INVALID /**< Invalid error value */
} ws2812_err_t;
/* --- PUBLIC FUNCTIONS ----------------------------------------------------- */
/**
* @brief Initialize the driver
*
* After this function is called, all necessary background tasks will be started.
* The frame is initially dark.
*/
void ws2812_init(void);
/**
* @brief Write the value of a single LED in the chain
*
* The color value is written to a frame buffer, and will not
* be updated until the next frame is written. Frames are written
* at the maximum possible speed -- the longest latency between a
* call to this function and the value being displayed is
* 1.25uS*(24*@ref WS2812_LED_N + 50)
*
* @param[in] led_number: The index of the LED to be written. Must be strictly less than
* @ref WS2812_N_LEDS
* @param[in] r: The red level of the LED
* @param[in] g: The green level of the LED
* @param[in] b: The blue level of the LED
*
* @retval WS2812_SUCCESS: The write was successful
* @retval WS2812_LED_INVALID: The write was to an invalid LED index
*/
ws2812_err_t ws2812_write_led(uint32_t led_number, uint8_t r, uint8_t g, uint8_t b);
void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds);
/** @} defgroup WS2812 */
#endif // ifndef WS2812_H_
+6 -6
View File
@@ -63,16 +63,16 @@
#define gbp A(KC_3) #define gbp A(KC_3)
#define down KC_DOWN #define down KC_DOWN
#define home KC_HOME #define home G(KC_LEFT)
#define end KC_END #define end G(KC_RGHT)
#define up KC_UP #define up KC_UP
#define pgdn KC_PGDN #define pgdn KC_PGDN
#define pgup KC_PGUP #define pgup KC_PGUP
#define left KC_LEFT #define left KC_LEFT
#define rght KC_RGHT #define rght KC_RGHT
#define tabl S(C(KC_TAB)) #define tabl G(S(KC_LBRC))
#define tabr C(KC_TAB) #define tabr G(S(KC_RBRC))
#define fwd G(KC_RBRC) #define fwd G(KC_RBRC)
#define back G(KC_LBRC) #define back G(KC_LBRC)
#define dtl C(KC_LEFT) #define dtl C(KC_LEFT)
@@ -162,8 +162,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[SYMB] = LAYOUT_planck_grid( [SYMB] = LAYOUT_planck_grid(
esc, n7, n5, n3, n1, n9, n8, n0, n2, n4, n6, dash, esc, n7, n5, n3, n1, n9, n8, n0, n2, n4, n6, dash,
del, bsls, hash, astr, eql, pipe, at, rprn, lprn, dlr, ampr, gbp, del, at, dlr, eql, lprn, lbrc, rbrc, rprn, astr, hash, plus, gbp,
caps, grv, exlm, lbrc, rbrc, circ, tild, rcbr, lcbr, plus, perc, caps, caps, grv, pipe, bsls, lcbr, tild, circ, rcbr, ampr, exlm, perc, caps,
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____
), ),
+1 -1
View File
@@ -28,7 +28,7 @@ This is a layout for the grid planck, built with a few ideals in mind:
Layout rendered with [keyboard-layout-editor.com][]: Layout rendered with [keyboard-layout-editor.com][]:
![](https://callum-oakley.github.io/images/keymap.png) ![](https://callumoakley.net/images/keymap.png)
The only behaviour not captured in this graphic is: pressing both cmd keys will The only behaviour not captured in this graphic is: pressing both cmd keys will
send cmd+ctrl. See [keymap.c][] for details. send cmd+ctrl. See [keymap.c][] for details.
+1 -1
View File
@@ -13,7 +13,7 @@
#define MATRIX_COLS 15 #define MATRIX_COLS 15
// wiring of each half // wiring of each half
#define MATRIX_ROW_PINS { D2, E6, C7, F7, F6, F5 } #define MATRIX_ROW_PINS { D2, E6, E2, F7, F6, F5 }
#define MATRIX_COL_PINS { B0, B1, B2, B3, F4, F1, C6, B6, B5, B4, D7, D6, D4, D5, D3} #define MATRIX_COL_PINS { B0, B1, B2, B3, F4, F1, C6, B6, B5, B4, D7, D6, D4, D5, D3}
/* COL2ROW or ROW2COL */ /* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW #define DIODE_DIRECTION COL2ROW
+3 -3
View File
@@ -11,12 +11,12 @@ void matrix_init_kb(void) {
void led_init_ports(void) { void led_init_ports(void) {
setPinOutput(D1); setPinOutput(D1);
writePinHigh(D1); writePinHigh(D1);
setPinOutput(E2); setPinOutput(C7);
writePinHigh(E2); writePinHigh(C7);
} }
bool led_update_kb(led_t led_state) { bool led_update_kb(led_t led_state) {
if(led_update_user(led_state)) { if(led_update_user(led_state)) {
writePin(E2, !led_state.caps_lock); writePin(C7, !led_state.caps_lock);
writePin(D1, !led_state.num_lock); writePin(D1, !led_state.num_lock);
} }
return true; return true;
+4 -6
View File
@@ -1,21 +1,19 @@
"""Serve QMK documentation locally """Serve QMK documentation locally
""" """
import http.server import http.server
import os
from milc import cli from milc import cli
class DocsHandler(http.server.SimpleHTTPRequestHandler):
def __init__(self, *args, **kwargs):
super().__init__(*args, directory='docs', **kwargs)
@cli.argument('-p', '--port', default=8936, type=int, help='Port number to use.') @cli.argument('-p', '--port', default=8936, type=int, help='Port number to use.')
@cli.subcommand('Run a local webserver for QMK documentation.') @cli.subcommand('Run a local webserver for QMK documentation.')
def docs(cli): def docs(cli):
"""Spin up a local HTTPServer instance for the QMK docs. """Spin up a local HTTPServer instance for the QMK docs.
""" """
with http.server.HTTPServer(('', cli.config.docs.port), DocsHandler) as httpd: os.chdir('docs')
with http.server.HTTPServer(('', cli.config.docs.port), http.server.SimpleHTTPRequestHandler) as httpd:
cli.log.info("Serving QMK docs at http://localhost:%d/", cli.config.docs.port) cli.log.info("Serving QMK docs at http://localhost:%d/", cli.config.docs.port)
cli.log.info("Press Control+C to exit.") cli.log.info("Press Control+C to exit.")
+11 -25
View File
@@ -37,16 +37,15 @@ static pin_t encoders_pad_b[] = ENCODERS_PAD_B;
static int8_t encoder_LUT[] = {0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0}; static int8_t encoder_LUT[] = {0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0};
static uint8_t encoder_state[NUMBER_OF_ENCODERS] = {0}; static uint8_t encoder_state[NUMBER_OF_ENCODERS] = {0};
static int8_t encoder_pulses[NUMBER_OF_ENCODERS] = {0};
#ifdef SPLIT_KEYBOARD #ifdef SPLIT_KEYBOARD
// right half encoders come over as second set of encoders // right half encoders come over as second set of encoders
static uint8_t encoder_value[NUMBER_OF_ENCODERS * 2] = {0}; static int8_t encoder_value[NUMBER_OF_ENCODERS * 2] = {0};
// row offsets for each hand // row offsets for each hand
static uint8_t thisHand, thatHand; static uint8_t thisHand, thatHand;
#else #else
static uint8_t encoder_value[NUMBER_OF_ENCODERS] = {0}; static int8_t encoder_value[NUMBER_OF_ENCODERS] = {0};
#endif #endif
__attribute__((weak)) void encoder_update_user(int8_t index, bool clockwise) {} __attribute__((weak)) void encoder_update_user(int8_t index, bool clockwise) {}
@@ -79,16 +78,14 @@ void encoder_init(void) {
} }
static void encoder_update(int8_t index, uint8_t state) { static void encoder_update(int8_t index, uint8_t state) {
encoder_pulses[index] += encoder_LUT[state & 0xF]; encoder_value[index] += encoder_LUT[state & 0xF];
if (encoder_pulses[index] >= ENCODER_RESOLUTION) { if (encoder_value[index] >= ENCODER_RESOLUTION) {
encoder_value[index]++;
encoder_update_kb(index, true);
}
if (encoder_pulses[index] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise
encoder_value[index]--;
encoder_update_kb(index, false); encoder_update_kb(index, false);
} }
encoder_pulses[index] %= ENCODER_RESOLUTION; if (encoder_value[index] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise
encoder_update_kb(index, true);
}
encoder_value[index] %= ENCODER_RESOLUTION;
} }
void encoder_read(void) { void encoder_read(void) {
@@ -104,22 +101,11 @@ void encoder_read(void) {
} }
#ifdef SPLIT_KEYBOARD #ifdef SPLIT_KEYBOARD
void encoder_state_raw(uint8_t* slave_state) { memcpy(slave_state, &encoder_value[thisHand], sizeof(uint8_t) * NUMBER_OF_ENCODERS); } void encoder_state_raw(uint8_t* slave_state) { memcpy(slave_state, encoder_state, sizeof(encoder_state)); }
void encoder_update_raw(uint8_t* slave_state) { void encoder_update_raw(uint8_t* slave_state) {
for (int i = 0; i < NUMBER_OF_ENCODERS; i++) { for (int i = 0; i < NUMBER_OF_ENCODERS; i++) {
uint8_t index = i + thatHand; encoder_update(i + thatHand, slave_state[i]);
int8_t delta = slave_state[i] - encoder_value[index];
while (delta > 0) {
delta--;
encoder_value[index]++;
encoder_update_kb(index, true);
}
while (delta < 0) {
delta++;
encoder_value[index]--;
encoder_update_kb(index, false);
}
} }
} }
#endif #endif
+9 -3
View File
@@ -52,9 +52,6 @@ action_t action_for_key(uint8_t layer, keypos_t key) {
uint8_t action_layer, when, mod; uint8_t action_layer, when, mod;
switch (keycode) { switch (keycode) {
case KC_FN0 ... KC_FN31:
action.code = keymap_function_id_to_action(FN_INDEX(keycode));
break;
case KC_A ... KC_EXSEL: case KC_A ... KC_EXSEL:
case KC_LCTRL ... KC_RGUI: case KC_LCTRL ... KC_RGUI:
action.code = ACTION_KEY(keycode); action.code = ACTION_KEY(keycode);
@@ -65,9 +62,11 @@ action_t action_for_key(uint8_t layer, keypos_t key) {
case KC_AUDIO_MUTE ... KC_BRIGHTNESS_DOWN: case KC_AUDIO_MUTE ... KC_BRIGHTNESS_DOWN:
action.code = ACTION_USAGE_CONSUMER(KEYCODE2CONSUMER(keycode)); action.code = ACTION_USAGE_CONSUMER(KEYCODE2CONSUMER(keycode));
break; break;
#ifdef MOUSEKEY_ENABLE
case KC_MS_UP ... KC_MS_ACCEL2: case KC_MS_UP ... KC_MS_ACCEL2:
action.code = ACTION_MOUSEKEY(keycode); action.code = ACTION_MOUSEKEY(keycode);
break; break;
#endif
case KC_TRNS: case KC_TRNS:
action.code = ACTION_TRANSPARENT; action.code = ACTION_TRANSPARENT;
break; break;
@@ -76,17 +75,24 @@ action_t action_for_key(uint8_t layer, keypos_t key) {
// Split it up // Split it up
action.code = ACTION_MODS_KEY(keycode >> 8, keycode & 0xFF); // adds modifier to key action.code = ACTION_MODS_KEY(keycode >> 8, keycode & 0xFF); // adds modifier to key
break; break;
#ifndef NO_ACTION_FUNCTION
case KC_FN0 ... KC_FN31:
action.code = keymap_function_id_to_action(FN_INDEX(keycode));
break;
case QK_FUNCTION ... QK_FUNCTION_MAX:; case QK_FUNCTION ... QK_FUNCTION_MAX:;
// Is a shortcut for function action_layer, pull last 12bits // Is a shortcut for function action_layer, pull last 12bits
// This means we have 4,096 FN macros at our disposal // This means we have 4,096 FN macros at our disposal
action.code = keymap_function_id_to_action((int)keycode & 0xFFF); action.code = keymap_function_id_to_action((int)keycode & 0xFFF);
break; break;
#endif
#ifndef NO_ACTION_MACRO
case QK_MACRO ... QK_MACRO_MAX: case QK_MACRO ... QK_MACRO_MAX:
if (keycode & 0x800) // tap macros have upper bit set if (keycode & 0x800) // tap macros have upper bit set
action.code = ACTION_MACRO_TAP(keycode & 0xFF); action.code = ACTION_MACRO_TAP(keycode & 0xFF);
else else
action.code = ACTION_MACRO(keycode & 0xFF); action.code = ACTION_MACRO(keycode & 0xFF);
break; break;
#endif
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF); action.code = ACTION_LAYER_TAP_KEY((keycode >> 0x8) & 0xF, keycode & 0xFF);
break; break;
+1 -1
View File
@@ -61,7 +61,7 @@ void enable_terminal(void) {
memset(cmd_buffer, 0, CMD_BUFF_SIZE * 80); memset(cmd_buffer, 0, CMD_BUFF_SIZE * 80);
for (int i = 0; i < 6; i++) strcpy(arguments[i], ""); for (int i = 0; i < 6; i++) strcpy(arguments[i], "");
// select all text to start over // select all text to start over
// SEND_STRING(SS_LCTRL("a")); // SEND_STRING(SS_LCTL("a"));
send_string(terminal_prompt); send_string(terminal_prompt);
} }
Loaded 100 of 111 files, more files were not shown because too many files have changed in this diff. Show more