diff --git a/.gitignore b/.gitignore index 9381f1afe4..a1f3ce4719 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ quantum/version.h CMakeLists.txt .DS_STORE /util/wsl_downloaded +/util/win_downloaded # Eclipse/PyCharm/Other IDE Settings .cproject @@ -32,10 +33,15 @@ CMakeLists.txt .browse.VC.db* *.stackdump util/Win_Check_Output.txt -.vscode +# Let these ones be user specific, since we have so many different configurations +.vscode/launch.json +.vscode/tasks.json .stfolder # ignore image files *.png *.jpg -*.gif \ No newline at end of file +*.gif + +# Do not ignore MiniDox left/right hand eeprom files +!keyboards/minidox/*.eep \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..be0b85b78f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,14 @@ +// Place your settings in this file to overwrite default and user settings. +{ + // Configure glob patterns for excluding files and folders. + "files.exclude": { + "**/.build": true, + "**/*.hex": true + }, + "files.associations": { + "*.h": "c", + "*.c": "c", + "*.cpp": "cpp", + "*.hpp": "cpp" + } +} \ No newline at end of file diff --git a/Makefile b/Makefile index f789409b7e..ebad723bee 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,11 @@ endif # Otherwise the [OK], [ERROR] and [WARN] messages won't be displayed correctly override SILENT := false +QMK_VERSION := $(shell git describe --abbrev=0 --tags 2>/dev/null) +ifneq ($(QMK_VERSION),) +$(info QMK Firmware v$(QMK_VERSION)) +endif + ON_ERROR := error_occurred=1 BREAK_ON_ERRORS = no @@ -419,7 +424,7 @@ define BUILD_TEST MAKE_TARGET := $2 COMMAND := $1 MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_test.mk $$(MAKE_TARGET) - MAKE_VARS := TEST=$$(TEST_NAME) FULL_TESTS=$$(FULL_TESTS) + MAKE_VARS := TEST=$$(TEST_NAME) FULL_TESTS="$$(FULL_TESTS)" MAKE_MSG := $$(MSG_MAKE_TEST) $$(eval $$(call BUILD)) ifneq ($$(MAKE_TARGET),clean) @@ -483,6 +488,8 @@ define RUN_TEST +error_occurred=0;\ $($(TEST)_COMMAND)\ if [ $$error_occurred -gt 0 ]; then $(HANDLE_ERROR); fi; + + endef # Allow specifying just the subproject, in the keyboard directory, which will compile all keymaps diff --git a/book.json b/book.json index ff19e2974a..09e1bfd94e 100644 --- a/book.json +++ b/book.json @@ -1,24 +1,41 @@ { "structure": { - "readme": "home.md", "summary": "_summary.md" }, - "plugins" : ["toolbar", "edit-link", "anchors"], + "plugins" : [ + "edit-link", + "forkmegithub", + "hints", + "page-toc", + "terminal", + "toolbar" + ], "pluginsConfig": { - "edit-link": { - "base": "https://github.com/qmk/qmk_firmware/edit/master/docs", - "label": "Suggest an edit" - }, - "toolbar": { - "buttons": - [ - { - "label": "QMK Firmware", - "icon": "fa fa-github", - "url": "https://github.com/qmk/qmk_firmware" - } - ] - } + "edit-link": { + "base": "https://github.com/qmk/qmk_firmware/edit/master/docs", + "label": "Suggest an edit" + }, + "forkmegithub": { + "color": "red", + "url": "https://github.com/qmk/qmk_firmware" + }, + "page-toc": { + "selector": ".markdown-section h1, .markdown-section h2" + }, + "terminal": { + "copyButtons": true, + "fade": false, + "style": "flat" + }, + "toolbar": { + "buttons": [ + { + "label": "QMK Firmware", + "icon": "fa fa-github", + "url": "https://github.com/qmk/qmk_firmware" + } + ] + } }, "root": "./docs/" } diff --git a/build_full_test.mk b/build_full_test.mk index bfd89174de..170020b968 100644 --- a/build_full_test.mk +++ b/build_full_test.mk @@ -18,13 +18,16 @@ TEST_PATH=tests/$(TEST) $(TEST)_SRC= \ - $(TEST_PATH)/test.cpp \ + $(TEST_PATH)/keymap.c \ $(TMK_COMMON_SRC) \ $(QUANTUM_SRC) \ + $(SRC) \ tests/test_common/matrix.c \ tests/test_common/test_driver.cpp \ tests/test_common/keyboard_report_util.cpp \ tests/test_common/test_fixture.cpp -$(TEST)_DEFS=$(TMK_COMMON_DEFS) +$(TEST)_SRC += $(patsubst $(ROOTDIR)/%,%,$(wildcard $(TEST_PATH)/*.cpp)) + +$(TEST)_DEFS=$(TMK_COMMON_DEFS) $(OPT_DEFS) $(TEST)_CONFIG=$(TEST_PATH)/config.h -VPATH+=$(TOP_DIR)/tests/test_common +VPATH+=$(TOP_DIR)/tests/test_common \ No newline at end of file diff --git a/common.mk b/common.mk index f87c209341..5b49680ea1 100644 --- a/common.mk +++ b/common.mk @@ -9,6 +9,9 @@ LIB_PATH = $(TOP_DIR)/lib QUANTUM_DIR = quantum QUANTUM_PATH = $(TOP_DIR)/$(QUANTUM_DIR) +DRIVER_DIR = drivers +DRIVER_PATH = $(TOP_DIR)/$(DRIVER_DIR) + BUILD_DIR := $(TOP_DIR)/.build COMMON_VPATH := $(TOP_DIR) @@ -17,4 +20,5 @@ COMMON_VPATH += $(QUANTUM_PATH) COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras COMMON_VPATH += $(QUANTUM_PATH)/audio COMMON_VPATH += $(QUANTUM_PATH)/process_keycode -COMMON_VPATH += $(QUANTUM_PATH)/api \ No newline at end of file +COMMON_VPATH += $(QUANTUM_PATH)/api +COMMON_VPATH += $(DRIVER_PATH) \ No newline at end of file diff --git a/common_features.mk b/common_features.mk index f5e7af01fa..f405d5c07b 100644 --- a/common_features.mk +++ b/common_features.mk @@ -54,6 +54,12 @@ ifeq ($(strip $(COMBO_ENABLE)), yes) SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c endif +ifeq ($(strip $(STENO_ENABLE)), yes) + OPT_DEFS += -DSTENO_ENABLE + VIRTSER_ENABLE := yes + SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c +endif + ifeq ($(strip $(VIRTSER_ENABLE)), yes) OPT_DEFS += -DVIRTSER_ENABLE endif @@ -87,7 +93,7 @@ endif ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) OPT_DEFS += -DRGBLIGHT_ENABLE - SRC += $(QUANTUM_DIR)/light_ws2812.c + SRC += ws2812.c SRC += $(QUANTUM_DIR)/rgblight.c CIE1931_CURVE = yes LED_BREATHING_TABLE = yes @@ -98,6 +104,11 @@ ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c endif +ifeq ($(strip $(KEY_LOCK_ENABLE)), yes) + OPT_DEFS += -DKEY_LOCK_ENABLE + SRC += $(QUANTUM_DIR)/process_keycode/process_key_lock.c +endif + ifeq ($(strip $(PRINTING_ENABLE)), yes) OPT_DEFS += -DPRINTING_ENABLE SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c @@ -150,4 +161,4 @@ QUANTUM_SRC:= \ ifndef CUSTOM_MATRIX QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c -endif \ No newline at end of file +endif diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000000..515ddb7783 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,25 @@ +# Quantum Mechanical Keyboard Firmware + +## What is QMK Firmware? {#what-is-qmk-firmware} + +QMK (*Quantum Mechanical Keyboard*) is an open source community that maintains QMK Firmware, QMK Flasher, qmk.fm, and these docs. QMK Firmware is a keyboard firmware based on the [tmk\_keyboard](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). It has also been ported to ARM chips using ChibiOS. You can use it to power your own hand-wired or custom keyboard PCB. + +## How to get it {#how-to-get-it} + +If you plan on contributing a keymap, keyboard, or features to QMK, the easiest thing to do is [fork the repo through Github](https://github.com/qmk/qmk_firmware#fork-destination-box), and clone your repo locally to make your changes, push them, then open a [Pull Request](https://github.com/qmk/qmk_firmware/pulls) from your fork. + +Otherwise, you can either download it directly ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), or clone it via git (`git@github.com:qmk/qmk_firmware.git`), or https (`https://github.com/qmk/qmk_firmware.git`). + +## How to compile {#how-to-compile} + +Before you are able to compile, you'll need to [install an environment](getting_started_build_tools.md) for AVR or/and ARM development. Once that is complete, you'll use the `make` command to build a keyboard and keymap with the following notation: + + make planck-rev4-default + +This would build the `rev4` revision of the `planck` with the `default` keymap. Not all keyboards have revisions (also called subprojects), in which case, it can be omitted: + + make preonic-default + +## How to customize {#how-to-customize} + +QMK has lots of [features](features.md) to explore, and a good deal of [reference documentation](http://docs.qmk.fm) to dig through. Most features are taken advantage of by modifying your [keymap](keymap.md), and changing the [keycodes](keycodes.md). diff --git a/docs/_summary.md b/docs/_summary.md index c5e29cb520..e32548f5b1 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -1,32 +1,67 @@ +* [Getting started](README.md) + * [QMK Introduction](getting_started_introduction.md) + * [Install Build Tools](getting_started_build_tools.md) + * Alternative: [Vagrant Guide](getting_started_vagrant_guide.md) + * [Build/Compile instructions](getting_started_make_guide.md) + * [How to Use Github](getting_started_github.md) -### Getting started -* [Introduction](home.md) -* [QMK Overview](qmk_overview.md) -* [Build Environment Setup](build_environment_setup.md) -* [Make instructions](make_instructions.md) +* [FAQ](faq.md) + * [General FAQ](faq_general.md) + * [Build/Compile QMK](faq_build.md) + * [Debugging/Troubleshooting QMK](faq_debug.md) + * [Keymap](faq_keymap.md) -### Making a keymap -* [Keymap overview](keymap.md) -* [Custom Quantum Functions](custom_quantum_functions.md) -* [Keycodes](keycodes.md) -* [Layer switching](key_functions.md) -* [Leader Key](leader_key.md) -* [Macros](macros.md) -* [Dynamic Macros](dynamic_macros.md) -* [Space Cadet](space_cadet_shift.md) -* [Tap Dance](tap_dance.md) -* [Mouse keys](mouse_keys.md) -* [FAQ: Creating a Keymap](faq_keymap.md) -* [FAQ: Compiling QMK](faq_build.md) - -### For hardware makers and modders -* [Adding a keyboard to QMK](adding_a_keyboard_to_qmk.md) -* [Porting your keyboard to QMK](porting_your_keyboard_to_qmk.md) -* [Modding your keyboard](modding_your_keyboard.md) -* [Adding features to QMK](adding_features_to_qmk.md) -* [ISP flashing guide](isp_flashing_guide.md) - -### Other topics -* [General FAQ](faq.md) -* [Differences from TMK](differences_from_tmk.md) -* [Using Eclipse with QMK](eclipse.md) +* [Features](features.md) + * [Common Shortcuts](feature_common_shortcuts.md) + * [Backlight](feature_backlight.md) + * [Bootmagic](feature_bootmagic.md) + * [Dynamic Macros](dynamic_macros.md) + * [Key Lock](key_lock.md) + * [Leader Key](feature_leader_key.md) + * [Macros](macros.md) + * [Mouse keys](mouse_keys.md) + * [PS2 Mouse](feature_ps2_mouse.md) + * [Space Cadet](space_cadet_shift.md) + * [Tap Dance](tap_dance.md) + * [Audio](feature_audio.md) + * [Thermal Printer](feature_thermal_printer.md) + * [Stenography](stenography.md) + * [Unicode](unicode.md) + +* Reference + * [Glossary](glossary.md) + * [Keymap overview](keymap.md) + * [Keycodes](keycodes.md) + * [Basic](keycodes_basic.md) + * [Quantum](quantum_keycodes.md) + * [Backlight](feature_backlight.md#backlight-keycodes) + * [Bluetooth](feature_bluetooth.md#bluetooth-keycodes) + * [Bootmagic](feature_bootmagic.md#bootmagic-keycodes) + * [Layer Switching](feature_common_shortcuts.md#switching-and-toggling-layers) + * [Mod+Key](feature_common_shortcuts.md#modifier-keys) + * [Mod Tap](feature_common_shortcuts.md#mod-tap) + * [One Shot Keys](feature_common_shortcuts.md#one-shot-keys) + * [Shifted Keys](feature_common_shortcuts.md#shifted-keycodes) + * [Stenography](stenography.md#keycode-reference) + * [RGB Light](feature_rgblight.md#rgblight-keycodes) + * [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes) + * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) + * [The `config.h` File](config_options.md) + * [Customizing Functionality](custom_quantum_functions.md) + * [Documentation Best Practices](documentation_best_practices.md) + * [Unit Testing](unit_testing.md) + +* For Makers and Modders + * [Adding a keyboard to QMK](adding_a_keyboard_to_qmk.md) + * [Adding features to QMK](adding_features_to_qmk.md) + * [Hand Wiring Guide](hand_wiring.md) + * [ISP flashing guide](isp_flashing_guide.md) + * [Modding your keyboard](modding_your_keyboard.md) + * [Porting your keyboard to QMK](porting_your_keyboard_to_qmk.md) + +* For a Deeper Understanding + * [How Keyboards Work](how_keyboards_work.md) + * [Understanding QMK](understanding_qmk.md) + +* Other Topics + * [Using Eclipse with QMK](eclipse.md) diff --git a/docs/adding_features_to_qmk.md b/docs/adding_features_to_qmk.md index f6f7cba208..e031ddbb7b 100644 --- a/docs/adding_features_to_qmk.md +++ b/docs/adding_features_to_qmk.md @@ -1,7 +1,16 @@ -If you have an idea for a custom feature or extra hardware connection, we'd love to accept it into QMK! These are generally done via [pull request](https://github.com/qmk/qmk_firmware/pulls) after forking, and here are some things to keep in mind when creating one: +# How To Add Features To QMK -* **Disable by default** - memory is a pretty limited on most chips QMK supports, and it's important that current keymaps aren't broken, so please allow your feature to be turned **on**, rather than being turned off. If you think it should be on by default, or reduces the size of the code, [open an issue](https://github.com/qmk/qmk_firmware/issues) for everyone to discuss it! +If you have an idea for a custom feature or extra hardware connection, we'd love to accept it into QMK! + +Before you put a lot of work into building your new feature you should make sure you are implementing it in the best way. You can get a basic understanding of QMK by reading [Understaning QMK](understanding_qmk.html), which will take you on a tour of the QMK program flow. From here you should talk to us to get a sense of the best way to implement your idea. There are two main ways to do this: + +* [Chat on Gitter](https://gitter.im/qmk/qmk_firmware) +* [Open an Issue](https://github.com/qmk/qmk_firmware/issues/new) + +Once you have implemented your new feature you will generally submit a [pull request](https://github.com/qmk/qmk_firmware/pulls). Here are some things to keep in mind when creating one: + +* **Disabled by default** - memory is a pretty limited on most chips QMK supports, and it's important that current keymaps aren't broken, so please allow your feature to be turned **on**, rather than being turned off. If you think it should be on by default, or reduces the size of the code, please talk with us about it. * **Compile locally before submitting** - hopefully this one is obvious, but things need to compile! Our Travis system will catch any issues, but it's generally faster for you to compile a few keyboards locally instead of waiting for the results to come back. -* **Consider subprojects and different chip-bases** - there are several keyboards that have subprojects that have allow for slightly different configurations, and even different chip-bases. Try to make a feature supported in ARM and AVR, or automatically disabled in one that doesn't work. -* **Explain your feature** - submitting a markdown write-up of what your feature does with your PR may be needed, and it will allow a collaborator to easily copy it into the wiki for documentation (after proofing and editing). -* **Don't refactor code** - to maintain a clear vision of how things are laid out in QMK, we try to plan out refactors in-depth, and have a collaborator make the changes. If you have an idea for refactoring, or suggestions, [open an issue](https://github.com/qmk/qmk_firmware/issues). \ No newline at end of file +* **Consider subprojects and different chip-bases** - there are several keyboards that have subprojects that allow for slightly different configurations, and even different chip-bases. Try to make a feature supported in ARM and AVR, or automatically disabled on platforms it doesn't work on. +* **Explain your feature** - Document it in `docs/`, either as a new file or as part of an existing file. If you don't document it other people won't be able to benefit from your hard work. +* **Don't refactor code** - to maintain a clear vision of how things are laid out in QMK, we try to plan out refactors in-depth, and have a collaborator make the changes. If you have an idea for refactoring, or suggestions, [open an issue](https://github.com/qmk/qmk_firmware/issues), we'd love to talk about how QMK can be improved. diff --git a/docs/build_guide.md b/docs/build_guide.md deleted file mode 100644 index 8573b0fd15..0000000000 --- a/docs/build_guide.md +++ /dev/null @@ -1,103 +0,0 @@ -# This guide has now been included in the main readme - please reference that one instead. - -## Build Environment Setup - -### Windows (Vista and later) -1. If you have ever installed WinAVR, uninstall it. -2. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**. -3. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location. -4. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/qmk/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. -5. Double-click on the 1-setup-path-win batch script to run it. You'll need to accept a User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up. -6. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete! -7. Future build commands should be run from the standard Windows command prompt, which you can find by searching for "command prompt" from the start menu or start screen. Ignore the "MHV AVR Shell". - -### Mac -If you're using [homebrew,](http://brew.sh/) you can use the following commands: - - brew tap osx-cross/avr - brew install avr-libc - brew install dfu-programmer - -This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. - -You can also try these instructions: - -1. Install Xcode from the App Store. -2. Install the Command Line Tools from `Xcode->Preferences->Downloads`. -3. Install [DFU-Programmer][dfu-prog]. - -### Linux -Install AVR GCC, AVR libc, and dfu-progammer with your favorite package manager. - -Debian/Ubuntu example: - - sudo apt-get update - sudo apt-get install gcc-avr avr-libc dfu-programmer - -### Vagrant -If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [vagrant guide](vagrant_guide.md). - -## Verify Your Installation -1. If you haven't already, obtain this repository ([https://github.com/qmk/qmk_firmware](https://github.com/qmk/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application. -2. Open up a terminal or command prompt and navigate to the `qmk_firmware` folder using the `cd` command. The command prompt will typically open to your home directory. If, for example, you cloned the repository to your Documents folder, then you would type `cd Documents/qmk_firmware`. If you extracted the file from a zip, then it may be named `qmk_firmware-master` instead. -3. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `readme.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboards/`. For example, if you're building for a Planck, run `cd keyboards/planck`. -4. Once you're in the correct keyboard-specific folder, run the `make` command. This should output a lot of information about the build process. More information about the `make` command can be found below. - -## Customizing, Building, and Deploying Your Firmware - -### The Make command - -The `make` command is how you compile the firmware into a .hex file, which can be loaded by a dfu programmer (like dfu-progammer via `make dfu`) or the [Teensy loader](https://www.pjrc.com/teensy/loader.html) (only used with Teensys). You can run `make` from the root (`/`), your keyboard folder (`/keyboards//`), or your keymap folder (`/keyboards//keymaps//`) if you have a `Makefile` there (see the example [here](/doc/keymap_makefile_example.mk)). - -By default, this will generate a `_.hex` file in whichever folder you run `make` from. These files are ignored by git, so don't worry about deleting them when committing/creating pull requests. - -* The "root" (`/`) folder is the qmk_firmware folder, in which are `doc`, `keyboard`, `quantum`, etc. -* The "keyboard" folder is any keyboard project's folder, like `/keyboards/planck`. -* The "keymap" folder is any keymap's folder, like `/keyboards/planck/keymaps/default`. - -Below is a list of the useful `make` commands in QMK: - -* `make` - cleans automatically and builds your keyboard and keymap depending on which folder you're in. This defaults to the "default" layout (unless in a keymap folder), and Planck keyboard in the root folder - * `make keyboard=` - specifies the keyboard (only to be used in root) - * `make keymap=` - specifies the keymap (only to be used in root and keyboard folder - not needed when in keymap folder) -* `make quick` - skips the clean step (cannot be used immediately after modifying config.h or Makefiles) -* `make dfu` - (requires dfu-programmer) builds and flashes the keymap to your keyboard once placed in reset/dfu mode (button or press `KC_RESET`). This does not work for Teensy-based keyboards like the ErgoDox EZ. - * `keyboard=` and `keymap=` are compatible with this -* `make all-keyboards` - builds all keymaps for all keyboards and outputs status of each (use in root) -* `make all-keyboards-default` - builds all default keymaps for all keyboards and outputs status of each (use in root) -* `make all-keymaps [keyboard=]` - builds all of the keymaps for whatever keyboard folder you're in, or specified by `` -* `make all-keyboards-quick`, `make all-keyboards-default-quick` and `make all-keymaps-quick [keyboard=]` - like the normal "make-all-*" commands, but they skip the clean steps - -Other, less useful functionality: - -* `make COLOR=false` - turns off color output -* `make SILENT=true` - turns off output besides errors/warnings -* `make VERBOSE=true` - outputs all of the avr-gcc stuff (not interesting) - -### The Makefile - -There are 3 different `make` and `Makefile` locations: - -* root (`/`) -* keyboard (`/keyboards//`) -* keymap (`/keyboards//keymaps//`) - -The root contains the code used to automatically figure out which keymap or keymaps to compile based on your current directory and commandline arguments. It's considered stable, and shouldn't be modified. The keyboard one will contain the MCU set-up and default settings for your keyboard, and shouldn't be modified unless you are the producer of that keyboard. The keymap Makefile can be modified by users, and is optional. It is included automatically if it exists. You can see an example [here](/doc/keymap_makefile_example.mk) - the last few lines are the most important. The settings you set here will override any defaults set in the keyboard Makefile. **It is required if you want to run `make` in the keymap folder.** - -### The `config.h` file - -There are 2 `config.h` locations: - -* keyboard (`/keyboards//`) -* keymap (`/keyboards//keymaps//`) - -The keyboard `config.h` is included only if the keymap one doesn't exist. The format to use for your custom one [is here](/doc/keymap_config_h_example.h). If you want to override a setting from the parent `config.h` file, you need to do this: - -``` -#undef MY_SETTING -#define MY_SETTING 4 -``` - -For a value of `4` for this imaginary setting. So we `undef` it first, then `define` it. - -You can then override any settings, rather than having to copy and paste the whole thing. diff --git a/docs/build_old.md b/docs/build_old.md deleted file mode 100644 index 9ae3a64ae4..0000000000 --- a/docs/build_old.md +++ /dev/null @@ -1,187 +0,0 @@ -Build Firmware and Program Controller -===================================== - -## This guide may be out-dated - use [build_guide.md](build_guide.md) instead - -Download and Install --------------------- -### 1. Install Tools - -1. **Toolchain** On Windows install [MHV AVR Tools][mhv] for AVR GCC compiler and [Cygwin][cygwin](or [MinGW][mingw]) for shell terminal. On Mac you can use [CrossPack][crosspack]. On Linux you can install AVR GCC (and avr-libc) with your favorite package manager or run the avr_setup.sh script in the root of this repository. - -2. **Programmer** On Windows install [Atmel FLIP][flip]. On Mac and Linux install [dfu-programmer][dfu-prog]. - -3. **Driver** On Windows you start DFU bootloader on the chip first time you will see 'Found New Hardware Wizard' to install driver. If you install device driver properly you can find chip name like 'ATmega32U4' under 'LibUSB-Win32 Devices' tree on 'Device Manager'. If not you shall need to update its driver on 'Device Manager'. You will find the driver in `FLIP` install directory like: C:\Program Files (x86)\Atmel\Flip 3.4.5\usb\. In case of `dfu-programmer` use its driver. - -If you use PJRC Teensy you don't need step 2 and 3 above, just get [Teensy loader][teensy-loader]. - - -### 2. Download source -You can find firmware source at github: - -- - -If you are familiar with `Git` tools you are recommended to use it but you can also download zip archive from: - -- - - -Build firmware --------------- -### 1. Open terminal -Open terminal window to get access to commands. Use Cygwin(or MingGW) `shell terminal` in Windows or `Terminal.app` on Mac OSX. In Windows press `Windows` key and `R` then enter `cmd` in 'Run command' dialog showing up. - -### 2. Change directory -Move to project directory in the firmware source. - - cd tmk_keyboard/{'keyboard' or 'converter'}/ - -### 3. Make -Build firmware using GNU `make` command. You'll see `_.hex` file in that directory unless something unexpected occurs in build process. - - - make -f Makefile. clean - make -f Makefile. - - - - -Program Controller ------------------- -Now you have **hex** file to program on current directory. This **hex** is only needed to program your controller, other files are used for development and you may leave and forget them. - -### 1. Start bootloader -How to program controller depends on controller chip and its board design. To program AVR USB chips you'll need to start it up in bootloader mode. Most of boards with the chip have a push button to let bootloader come up. Consult with your controller board manual. - -### 2. Program with DFU bootloader -Stock AVR USB chip including ATmega32U4 has DFU bootloader by factory default. `FLIP` is a DFU programmer on Windows offered by Atmel. Open source command line tool `dfu-programmer` also supports AVR chips, it runs on Linux, Mac OSX and even Windows. - -To program AVR chip with DFU bootloader use `FLIP` or `dfu-programmer`. -If you have a proper program command in `Makefile` just type this. - -`FLIP` has two version of tool, GUI app and command line program. If you want GUI see tutorial below. -To use command line tool run this command. Note that you need to set PATH variable properly. - - $ make -f Makefile. flip - -Or to program with `dfu-programmer` run: - - $ make -f Makefile. dfu - -#### FLIP GUI tutorial -1. On menu bar click Device -> Select, then. `ATmega32u4`. -2. On menu bar click Settings -> Communication -> USB, then click 'Open' button on 'USB Port Connection' dialog. -At this point you'll see grey-outed widgets on the app get colored and ready. - -3. On menu bar click File -> Load HEX File, then select your firmware hex file on File Selector dialog. -4. On 'Operations Flow' panel click 'Run' button to load the firmware binary to the chip. Note that you should keep 'Erase', 'Blank Check', 'Program' and 'Verify' check boxes selected. -5. Re-plug USB cord or click 'Start Application' button to restart your controller. -Done. - -See also these instructions if you need. - -- -- - - -### 3. Program with Teensy Loader -If you have PJRC Teensy see instruction of `Teensy Loader`. - -- - -Or use this command if you have command line version of Teensy Loader installed. - - $ make -f Makefile. teensy - - -### 4. Program with Other programmer -You may want to use other programmer like `avrdude` with AVRISPmkII, Arduino or USBasp. In that case you can still use make target `program` for build with configuring `PROGRAM_CMD` in Makefile. - - $ make -f Makefile. program - - -[cygwin]: https://www.cygwin.com/ -[mingw]: http://www.mingw.org/ -[mhv]: https://infernoembedded.com/products/avr-tools -[winavr]: http://winavr.sourceforge.net/ -[crosspack]: http://www.obdev.at/products/crosspack/index.html -[flip]: http://www.atmel.com/tools/FLIP.aspx -[dfu-prog]: http://dfu-programmer.sourceforge.net/ -[teensy-loader]:http://www.pjrc.com/teensy/loader.html - - - -Makefile Options ----------------- -### 1. MCU and Frequency. - - MCU = atmega32u4 # Teensy 2.0 - #MCU = at90usb1286 # Teensy++ 2.0 - F_CPU = 16000000 - -Set your MCU and its clock in Hz. - - # Boot Section Size in *bytes* - # Teensy halfKay 512 - # Atmel DFU loader 4096 - # LUFA bootloader 4096 - OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -If you are using PJRC Teensy use `512` for `BOOTLOADER_SIZE`, otherwise use `4096` unless you are sure. - -### 2. Features -Optional. Note that ***comment out*** with `#` to disable them. - - BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) - MOUSEKEY_ENABLE = yes # Mouse keys(+4700) - EXTRAKEY_ENABLE = yes # Audio control and System control(+450) - CONSOLE_ENABLE = yes # Console for debug(+400) - COMMAND_ENABLE = yes # Commands for debug and configuration - SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend - #NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA - #BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality - -### 3. Programmer -Optional. Set proper command for your controller, bootloader and programmer. This command can be used with `make program`. Not needed if you use `FLIP`, `dfu-programmer` or `Teensy Loader`. - - # avrdude with AVRISPmkII - PROGRAM_CMD = avrdude -p $(MCU) -c avrispmkII -P USB -U flash:w:$(TARGET).hex - - # avrdude with USBaspLoader - PROGRAM_CMD = avrdude -p $(MCU) -c usbasp -U flash:w:$(TARGET).hex - - # avrdude with arduino - PROGRAM_CMD = avrdude -p $(MCU) -c arduino -P COM1 -b 57600 -U flash:w:$(TARGET).hex - - - -Config.h Options ----------------- -### 1. Magic command key combination - - #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KB_LSHIFT) | MOD_BIT(KB_RSHIFT))) - -### 2. Mechanical Locking Support for CapsLock - - /* Mechanical locking CapsLock support. Use KC_LCAP instead of KC_CAPS in keymap */ - #define CAPSLOCK_LOCKING_ENABLE - /* Locking CapsLock re-synchronize hack */ - #define CAPSLOCK_LOCKING_RESYNC_ENABLE - -### 3. Disable Debug and Print - - /* disable debug print */ - #define NO_DEBUG - - /* disable print */ - #define NO_PRINT - -### 4. Disable Action Features - - #define NO_ACTION_LAYER - #define NO_ACTION_TAPPING - #define NO_ACTION_ONESHOT - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION - -***TBD*** diff --git a/docs/config_options.md b/docs/config_options.md new file mode 100644 index 0000000000..13c8bdbbe8 --- /dev/null +++ b/docs/config_options.md @@ -0,0 +1,133 @@ +# The `config.h` file + +This is a c header file that is one of the first things included, and will persist over the whole project (if included). Lots of variables can be set here and accessed elsewhere (namely keymaps). This file can exist at a couple different levels: + +## Keyboard + +```c +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +// config options + +#ifdef SUBPROJECT_ + #include "/config.h" +#endif + +#endif +``` + +This file contains config options that should apply to the whole keyboard, and won't change in subprojects, or most keymaps. The suproject block here only applies to keyboards with subprojects. + +## Subproject + +```c +#ifndef _CONFIG_H +#define _CONFIG_H + +#include "../config.h" + +// config options + +#endif +``` + +For keyboards that have subprojects, this file contains config options that should apply to only that subproject, and won't change in most keymaps. + +## Keymap + +```c +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// config options + +#endif +``` + +This file contains all of the options for that particular keymap. If you wish to override a previous declaration, you can use `#undef ` to undefine it, where you can then redefine it without an error. + +# Config Options + +```c +#define VENDOR_ID 0x1234 // defines your VID, and for most DIY projects, can be whatever you want +#define PRODUCT_ID 0x5678 // defines your PID, and for most DIY projects, can be whatever you want +#define DEVICE_VER 0 // defines the device version (often used for revisions) + +#define MANUFACTURER Me // generally who/whatever brand produced the board +#define PRODUCT Board // the name of the keyboard +#define DESCRIPTION a keyboard // a short description of what the keyboard is + +#define MATRIX_ROWS 5 // the number of rows in your keyboard's matrix +#define MATRIX_COLS 15 // the number of columns in your keyboard's matrix + +#define MATRIX_ROW_PINS { D0, D5, B5, B6 } // pins of the rows, from top to bottom +#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } // pins of the columns, from left to right +#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 } // pins unused by the keyboard for reference +#define MATRIX_HAS_GHOST // define is matrix has ghost (unlikely) +#define DIODE_DIRECTION COL2ROW // COL2ROW or ROW2COL - how your matrix is configured +// COL2ROW means the black mark on your diode is facing to the rows, and between the switch and the rows + +#define AUDIO_VOICES // turns on the alternate audio voices (to cycle through) +#define C6_AUDIO // enables audio on pin C6 +#define B5_AUDIO // enables audio on pin B5 (duophony is enable if both are enabled) + +#define BACKLIGHT_PIN B7 // pin of the backlight - B5, B6, B7 use PWM, others use softPWM +#define BACKLIGHT_LEVELS 3 // number of levels your backlight will have (not including off) + +#define DEBOUNCING_DELAY 5 // the delay when reading the value of the pin (5 is default) + +#define LOCKING_SUPPORT_ENABLE // mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap +#define LOCKING_RESYNC_ENABLE // tries to keep switch state consistent with keyboard LED state + +#define IS_COMMAND() ( \ // key combination that allows the use of magic commands (useful for debugging) + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +// the following options can save on file size at the expense of that feature +#define NO_DEBUG // disable debuging (saves on file size) +#define NO_PRINT // disable printing (saves of file size) +#define NO_ACTION_LAYER // no layers +#define NO_ACTION_TAPPING // no tapping for layers/mods +#define NO_ACTION_ONESHOT // no oneshot for layers/mods +#define NO_ACTION_MACRO // no macros +#define NO_ACTION_FUNCTION // no functions + +#define FORCE_NKRO // NKRO by default requires to be turned on, this forces it to be on always + +#define PREVENT_STUCK_MODIFIERS // when switching layers, this will release all mods + +#define TAPPING_TERM 200 // how long before a tap becomes a hold +#define TAPPING_TOGGLE 2 // how many taps before triggering the toggle + +#define PERMISSIVE_HOLD // makes tap and hold keys work better for fast typers who don't want tapping term set above 500 + +#define LEADER_TIMEOUT 300 // how long before the leader key times out + +#define ONESHOT_TIMEOUT 300 // how long before oneshot times out +#define ONESHOT_TAP_TOGGLE 2 // how many taps before oneshot toggle is triggered + +#define IGNORE_MOD_TAP_INTERRUPT // makes it possible to do rolling combos (zx) with keys that convert to other keys on hold + +// ws2812 options +#define RGB_DI_PIN D7 // pin the DI on the ws2812 is hooked-up to +#define RGBLIGHT_ANIMATIONS // run RGB animations +#define RGBLED_NUM 15 // number of LEDs +#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue +#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation +#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness) + +#define RGBW_BB_TWI // bit-bangs twi to EZ RGBW LEDs (only required for Ergodox EZ) + +// mousekey options (self-describing) +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 + +``` \ No newline at end of file diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index 0fb1c163b7..10a718431c 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -1,6 +1,10 @@ -A custom keyboard is about more than sending button presses to your computer. QMK has designed hooks to allow you to inject code, override functionality, and otherwise customize how your keyboard responds in different situations. +# How To Customize Your Keyboard's Behavior -## A Word on Keyboards vs Keymap +For a lot of people a custom keyboard is about more than sending button presses to your computer. You want to be able to do things that are more complex than simple button presses and macros. QMK has hooks that allow you to inject code, override functionality, and otherwise customize how your keyboard behaves in different situations. + +This page does not assume any special knowledge about QMK, but reading [Understanding QMK](understanding_qmk.html) will help you understand what is going on at a more fundamental level. + +## A Word on Core vs Keyboards vs Keymap We have structured QMK as a hierarchy: @@ -8,59 +12,66 @@ We have structured QMK as a hierarchy: * Keyboard/Revision (`_kb`) * Keymap (`_user`) -Each of the functions described below can be defined with a `_kb()` suffix or an `_user()` suffix. We intend for you to use the `_kb()` suffix at the Keyboard/Revision level, while the `_user()` suffix should be used at the Keymap level. +Each of the functions described below can be defined with a `_kb()` suffix or a `_user()` suffix. We intend for you to use the `_kb()` suffix at the Keyboard/Revision level, while the `_user()` suffix should be used at the Keymap level. When defining functions at the Keyboard/Revision level it is important that your `_kb()` implementation call `_user()` before executing anything else- otherwise the keymap level function will never be called. -## Matrix Initialization Code +# Custom Keycodes -* Keyboard/Revision: `void matrix_init_kb(void)` -* Keymap: `void matrix_init_user(void)` +By far the most common task is to change the behavior of an existing keycode or to create a new keycode. From a code standpoint the mechanism for each is very similar. -This function gets called when the matrix is initiated. You should use this function to initialize any custom hardware you may have, such as speakers, LED drivers, or other features which need to be setup after the keyboard powers on. +## Defining a New Keycode -### Example +The first step to creating your own custom keycode(s) is to enumerate them. This means both naming them and assigning a unique number to that keycode. Rather than limit custom keycodes to a fixed range of numbers QMK provides the `SAFE_RANGE` macro. You can use `SAFE_RANGE` when enumerating your custom keycodes to guarantee that you get a unique number. + + +Here is an example of enumerating 2 keycodes. After adding this block to your `keymap.c` you will be able to use `FOO` and `BAR` inside your keymap. ``` -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); +enum my_keycodes { + FOO = SAFE_RANGE, + BAR +}; +``` - // JTAG disable for PORT F. write JTD bit twice within four cycles. - MCUCR |= (1<event.pressed) { + // Do something when pressed + } else { + // Do something else when release + } + return false; // Skip all further processing of this key + case KC_ENTER: + // Play a tone when enter is pressed + if (record->event.pressed) { + PLAY_NOTE_ARRAY(tone_qwerty); + } + return true; // Let QMK send the enter press/release events + } } ``` -## Matrix Scanning Code - -* Keyboard/Revision: `void matrix_scan_kb(void)` -* Keymap: `void matrix_scan_user(void)` - -This function gets called at every matrix scan, which is basically as often as the MCU can handle. Be careful what you put here, as it will get run a lot. - -You should use this function if you need custom matrix scanning code. It can also be used for custom status output (such as LED's or a display) or other functionality that you want to trigger regularly even when the user isn't typing. - -## Hook Into Key Presses +### `process_record_*` Function documentation * Keyboard/Revision: `bool process_record_kb(uint16_t keycode, keyrecord_t *record)` * Keymap: `bool process_record_user(uint16_t keycode, keyrecord_t *record)` -This function gets called every time a key is pressed or released. This is particularly useful when defining custom keys or overriding the behavior of existing keys. +The `keycode` argument is whatever is defined in your keymap, eg `MO(1)`, `KC_L`, etc. You should use a `switch...case` block to handle these events. -The return value is whether or not QMK should continue processing the keycode - returning `false` stops the execution. - -The `keycode` variable is whatever is defined in your keymap, eg `MO(1)`, `KC_L`, etc. and can be switch-cased to execute code whenever a particular code is pressed. - -The `record` variable contains infomation about the actual press: +The `record` argument contains infomation about the actual press: ``` keyrecord_t record { @@ -75,12 +86,7 @@ keyrecord_t record { } ``` -The conditional `if (record->event.pressed)` can tell if the key is being pressed or released, and you can execute code based on that. - -## LED Control - -* Keyboard/Revision: `void led_set_kb(uint8_t usb_led)` -* Keymap: `void led_set_user(uint8_t usb_led)` +# LED Control This allows you to control the 5 LED's defined as part of the USB Keyboard spec. It will be called when the state of one of those 5 LEDs changes. @@ -90,7 +96,7 @@ This allows you to control the 5 LED's defined as part of the USB Keyboard spec. * `USB_LED_COMPOSE` * `USB_LED_KANA` -### Example: +### Example `led_set_kb()` implementation ``` void led_set_kb(uint8_t usb_led) { @@ -121,3 +127,50 @@ void led_set_kb(uint8_t usb_led) { } } ``` + +### `led_set_*` Function documentation + +* Keyboard/Revision: `void led_set_kb(uint8_t usb_led)` +* Keymap: `void led_set_user(uint8_t usb_led)` + +# Matrix Initialization Code + +Before a keyboard can be used the hardware must be initialized. QMK handles initialization of the keyboard matrix itself, but if you have other hardware like LED's or i²c controllers you will need to set up that hardware before it can be used. + +### Example `matrix_init_kb()` implementation + +This example, at the keyboard level, sets up B1, B2, and B3 as LED pins. + +``` +void matrix_init_kb(void) { + // Call the keymap level matrix init. + matrix_init_user(); + + // Set our LED pins as output + DDRB |= (1<<1); + DDRB |= (1<<2); + DDRB |= (1<<3); +} +``` + +### `matrix_init_*` Function documentation + +* Keyboard/Revision: `void matrix_init_kb(void)` +* Keymap: `void matrix_init_user(void)` + +# Matrix Scanning Code + +Whenever possible you should customize your keyboard by using `process_record_*()` and hooking into events that way, to ensure that your code does not have a negative performance impact on your keyboard. However, in rare cases it is necessary to hook into the matrix scanning. Be extremely careful with the performance of code in these functions, as it will be called at least 10 times per second. + +### Example `matrix_scan_*` implementation + +This example has been deliberately omitted. You should understand enough about QMK internals to write this without an example before hooking into such a performance sensitive area. If you need help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) or [chat with us on gitter](https://gitter.im/qmk/qmk_firmware). + +### `matrix_scan_*` Function documentation + +* Keyboard/Revision: `void matrix_scan_kb(void)` +* Keymap: `void matrix_scan_user(void)` + +This function gets called at every matrix scan, which is basically as often as the MCU can handle. Be careful what you put here, as it will get run a lot. + +You should use this function if you need custom matrix scanning code. It can also be used for custom status output (such as LED's or a display) or other functionality that you want to trigger regularly even when the user isn't typing. diff --git a/docs/cygwin_guide.md b/docs/cygwin_guide.md deleted file mode 100644 index 05d71961a4..0000000000 --- a/docs/cygwin_guide.md +++ /dev/null @@ -1,352 +0,0 @@ -#Planck Advanced (but not too advanced) `cygwin` Users Guide -If you are a user of the [cygwin environment](https://cygwin.com) in Windows and want the freedom to use the latest tools available, then this is the guide for you. If compiling your own copy of the latest and greatest Gnu C Compiler makes you super happy, then this is the guide for you. If the command line make you smile, then this is the guide for you. - -This guide was written step by step as I went through the process on a `Windows 10` `x86_64` and a `Windows 7` `amd k10` based system. This should be generally applicable to to any `Windows` environment with `cygwin`. - -#####Do not skip steps. Do not move past a step until the previous step finishes successfully. - -Based on [avr-libc installation guide](http://www.nongnu.org/avr-libc/user-manual/install_tools.html) - -##Get the Required Packages -Download the `cygwin` setup ([x86_64](https://cygwin.com/setup-x86_64.exe)) and install the default system plus the following if they are not already selected: -- devel/git -- devel/gcc-core -- devel/gcc-g++ -- devel/flex -- devel/bison -- devel/make -- devel/texinfo -- devel/gettext-devel -- devel/automake -- devel/autoconfig -- devel/libtool -- text/gettext -- libs/libgcc1 -- interpreters/m4 -- web/wget -- archive/unzip - -The following sources will be required: -- [gmp](https://gmplib.org/) (6.1.0) -- [mpfr](http://www.mpfr.org/) (3.1.4) -- [mpc](http://www.multiprecision.org/) (1.0.3) -- [binutils](https://www.sourceware.org/binutils/) (2.26) -- [gcc](https://gcc.gnu.org/) (5.3.0) -- [avr-libc](http://www.nongnu.org/avr-libc/) (2.0.0) - -The `dfu-programmer` will be required to flash the new firmware -- [dfu-programmer](https://dfu-programmer.github.io/) (0.7.2) - -The set of commands below will create a directory (`~/local/avr`) for the sources you compile to be installed on the machine and a directory (`~/src`) for these source files to be stored. The commands then download the sources of the needed packages and unpack them. Note: the expand commands are different depending on if the packages are offered as a `bz2` or `gz` archive -``` -$ mkdir ~/local -$ mkdir ~/local/avr -$ mkdir ~/src -$ cd ~/src -$ wget https://gmplib.org/download/gmp/gmp-6.1.0.tar.bz2 -$ wget http://www.mpfr.org/mpfr-3.1.4/mpfr-3.1.4.tar.bz2 -$ wget ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz -$ wget http://ftp.gnu.org/gnu/binutils/binutils-2.26.tar.gz -$ wget http://mirror0.babylon.network/gcc/releases/gcc-5.3.0/gcc-5.3.0.tar.gz -$ wget http://download.savannah.gnu.org/releases/avr-libc/avr-libc-2.0.0.tar.bz2 -$ tar -xjf gmp-6.1.0.tar.bz2 -$ tar -xjf mpfr-3.1.4.tar.bz2 -$ tar -zxf mpc-1.0.3.tar.gz -$ tar -zxf binutils-2.26.tar.gz -$ tar -zxf gcc-5.3.0.tar.gz -$ tar -xjf avr-libc-2.0.0.tar.bz2 -``` - -##Setup the Build Environment -These commands will set up the install directory and the `PATH` variable, which will allow you to access your installed packages. Note: if you close the `cygwin` terminal window, you will need to rerun these commands, they are not permanent. -``` -$ PREFIX=$HOME/local/avr -$ export PREFIX -$ PATH=/usr/local/bin:/usr/local/lib:/usr/local/include:/bin:/lib:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS -$ PATH=$PATH:$PREFIX/bin:$PREFIX/lib -$ export PATH -``` - -##The `gcc` Required Math Library Packages -The following packages are required to be complied and installed in order to compile `gcc`. They are not sufficiently available through the `cygwin` package system, so we have to make them ourselves. They must be complied in this order because each one depends on the previous. Verfiy that for each package, `make check` returns all passing and no fails. - -###Build and Install `gmp` -``` -$ cd ~/src/gmp-6.1.0 -$ ./configure --enable-static --disable-shared -$ make -$ make check -$ make install -``` - -###Build and Install `mpfr` -``` -$ cd ~/src/mpfr-3.1.4 -$ ./configure --with-gmp-build=../gmp-6.1.0 --enable-static --disable-shared -$ make -$ make check -$ make install -``` - -###Build and Install `mpc` -``` -$ cd ~/src/mpc-1.0.3 -$ ./configure --with-gmp=/usr/local --with-mpfr=/usr/local --enable-static --disable-shared -$ make -$ make check -$ make install -``` - -##OPTIONAL Part -You can build and install a brand new `gcc` or you can use the one supplied by `cygwin`. This will take about 4-5 hours to compile (It is a "native build", so it does the entire build **3 times**. This takes a long while). - -###Build and Install `gcc` for Your Machine -``` -$ cd ~/src/gcc-5.3.0 -$ mkdir obj-local -$ cd obj-local -$ ../configure --enable-languages=c,c++ --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --enable-static --disable-shared -$ make -$ make install -``` -##End OPTIONAL Part - -###Build and Install `binutils` for Your Machine -``` -$ cd ~/src/binutils-2.26 -$ mkdir obj-local -$ cd obj-local -$ ../configure -$ make -$ make install -``` - -##Buliding `binutils`, `gcc`, and `avr-libc` for the AVR system -Now we can make the critical stuff for compiling our firmware: `binutils`, `gcc`, and `avr-libc` for the AVR architecture. These allow us to build and manipulate the firmware for the keyboard. - -###Build `binutils` for AVR -If you plan to build and install `avr-gdb` also, use the `gdb` install at the end of this guide as it also builds the `binutils` -``` -$ cd ~/src/binutils-2.26 -$ mkdir obj-avr -$ cd obj-avr -$ ../configure --prefix=$PREFIX --target=avr --disable-nls -$ make -$ make install -``` - -###Build `gcc` for AVR -``` -$ cd ~/src/gcc-5.3.0 -$ mkdir obj-avr -$ cd obj-avr -$ ../configure --prefix=$PREFIX --target=avr --enable-languages=c,c++ --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --enable-static --disable-shared --disable-nls --disable-libssp --with-dwarf2 -$ make -$ make install -``` - -###Build `avr-libc` for AVR -For building the `avr-libc`, we have to specify the host build system. In my case it is `x86_64-unknown-cygwin`. You can look for build system type in the `gcc` configure notes for the proper `--build` specification to pass when you configure `avr-libc`. -``` -$ cd ~/src/avr-libc-2.0.0 -$ ./configure --prefix=$PREFIX --build=x86_64-unknown-cygwin --host=avr -$ make -$ make install -``` - -##Building 'dfu-programmer' for flashing the firmware via USB and installing the drivers -We can either build our own, or use the precomplied binaries. The precompiled binaries don't play well with `cygwin` so it is better to build them ourselves. The procedure for the precompiled binaries is included at the end of this guide. - -### Build and Install the `libusb` -The `dfu-programmer` requires `libusb` so that it can interact with the USB system. These repos must be bootstrapped in order to create an appropriate `./configure` and `Makefile` for your system. -``` -$ cd ~/src -$ git clone https://github.com/libusb/libusb.git -$ cd libusb -$ ./bootstrap.sh -$ ./configure -$ make -$ make install -``` - -### Build and Install the `dfu-programmer` -``` -$ cd ~/src -$ git clone https://github.com/dfu-programmer/dfu-programmer.git -$ cd dfu-programmer -$ ./bootstrap.sh -$ ./configure -$ make -$ make install -``` - -Verify the installation with: -``` -$ which dfu-programmer -/usr/local/bin/dfu-programmer - -$ dfu-programmer -dfu-programmer 0.7.2 -https://github.com/dfu-programmer/dfu-programmer -Type 'dfu-programmer --help' for a list of commands - 'dfu-programmer --targets' to list supported target devices -``` -If you are not getting the above result, you will not be able to flash the firmware! - -###Install the USB drivers -The drivers are included in the windows binary version of [`dfu-programmer` 0.7.2](http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip). -``` -$ cd ~/src -$ wget http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip -$ unzip dfu-programmer-win-0.7.2.zip -d dfu-programmer-win-0.7.2 -``` - -or - -The official drivers are found in [Atmel's `FLIP` installer](http://www.atmel.com/images/Flip%20Installer%20-%203.4.7.112.exe). Download and then install `FLIP`. Upon installation, the drivers will be found in `C:\Program Files (x86)\Atmel\Flip 3.4.7\usb`. - -Then, from an **administrator-privileged** `Windows` terminal, run the following command (adjust the path for username, etc. as necessary) and accept the prompt that pops up: -``` -C:\> pnputil -i -a C:\cygwin64\home\Kevin\src\dfu-programmer-win-0.7.2\dfu-prog-usb-1.2.2\atmel_usb_dfu.inf -or -C:\> pnputil -i -a "C:\Program Files (x86)\Atmel\Flip 3.4.7\usb\atmel_usb_dfu.inf" -``` - -This should be the result: -``` -Microsoft PnP Utility - -Processing inf : atmel_usb_dfu.inf -Successfully installed the driver on a device on the system. -Driver package added successfully. -Published name : oem104.inf - - -Total attempted: 1 -Number successfully imported: 1 -``` - -Alternatively, the `Windows` driver can be installed when prompted by `Windows` when the keyboard is attached. Do not let `Windows` search for a driver; specify the path to search for a driver and point it to the `atmel_usb_dfu.inf` file. - -##Building and Flashing the Planck firmware! -If you did everything else right. This part should be a snap! Grab the latest sources from `github`, make the Plank firmware, then flash it. - -###Build Planck and Load the Firmware -``` -$ cd ~/src -$ git clone https://github.com/qmk/qmk_firmware.git -$ cd qmk_firmware/keyboards/planck -$ make -``` - -Make sure there are no errors. You should end up with this or something similar: -``` -Creating load file for Flash: planck.hex -avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature planck.elf planck.hex - -Creating load file for EEPROM: planck.eep -avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \ ---change-section-lma .eeprom=0 --no-change-warnings -O ihex planck.elf planck.eep || exit 0 - -Creating Extended Listing: planck.lss -avr-objdump -h -S -z planck.elf > planck.lss - -Creating Symbol Table: planck.sym -avr-nm -n planck.elf > planck.sym - -Size after: - text data bss dec hex filename - 18602 82 155 18839 4997 planck.elf - --------- end -------- -``` - -If you do not get the above, you **did not** build the firmware, and you will have nothing to flash. If you have the fresh clone from `github`, it was probably something gone wrong in this install process, go check and see what didn't work and threw errors or what steps you might have missed. - -But if everything went OK, you are ready to flash! Press the reset button on the bottom of the Planck, wait two seconds, then: -``` -$ make dfu -``` -. -. -. -profit!!! - - - - - -##extra bits... - -###Installing Precompiled `dfu-programmer` Binaries (not recommended for `cygwin`) -To install the `dfu-programmer` from the binaries, we must get if from [the `dfu-programmer` website](https://dfu-programmer.github.io/) ([0.7.2](http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip)). - -Copy this file into your `cygwin` home\src directory. (For me, it is `C:\cygwin64\home\Kevin\src`), extract the files, move `dfu-programmer.exe` to `~/local/avr/bin`. Most obnoxiously, the `libusb0_x86.dll` and `libusb0.sys` need to be moved from `./dfu-prog-usb-1.2.2/x86/` to a directory in the `Windows` `PATH` and the `cygwin` `PATH`. This is because the `dfu-programmer` binary is `mingw` based, not `cygwin` based, so the `dlls` do not cooperate. I achieved acceptable pathing by moving the files to `C:\cygwin64\home\Kevin\local\avr\bin` Then, in a `WINDOWS` command prompt running (Adjusting your path for username, etc. as needed): -``` -C:\> set PATH=%PATH%;C:\cygwin64\home\Kevin\local\avr\bin -``` - -Then, rename `libusb0_x86.dll` to `libusb0.dll`. - -You can tell that you were successful by trying to execute 'dfu-programmer' from the 'cygwin' prompt: -``` -$ which dfu-programmer -/home/Kevin/local/avr/bin/dfu-programmer - -$ dfu-programmer -dfu-programmer 0.7.2 -https://github.com/dfu-programmer/dfu-programmer -Type 'dfu-programmer --help' for a list of commands - 'dfu-programmer --targets' to list supported target devices -``` - -If you are not getting the above result, you will not be able to flash the firmware! -- Try making sure your `PATH` variables are set correctly for both `Windows` and `cygwin`. -- Make sure the `dll` is named correctly. -- Do not extract it with `cygwin`'s `unzip` as it does not set the executable permission. If you did it anyway, do `chmod +x dfu-programmer.exe`. -- Still have problems? Try building it instead. - - -##Debugging Tools - -These tools are for debugging your firmware, etc. before flashing. Theoretically, it can save your memory from wearing out. However, these tool do not work 100% for the Planck firmware. - -### `gdb` for AVR -`gdb` has a simulator for AVR but it does not support all instructions (like WDT), so it immediately crashes when running the Planck firmware (because `lufa.c` disables the WDT in the first few lines of execution). But it can still be useful in debugging example code and test cases, if you know how to use it. - -``` -$ cd ~/src -$ git clone git://sourceware.org/git/binutils-gdb.git -$ cd binutils-gdb -$ mkdir obj-avr -$ cd obj-avr -$ ../configure --prefix=$PREFIX --target=avr --build=x86_64-unknown-cygwin --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --disable-nls --enable-static -$ make -$ make install -``` - -### `simulavr` -`simulavr` is an AVR simulator. It runs the complied AVR elfs. `simulavr` does not support the `atmega32u4` device... it does `atmega32` but that is not good enough for the firmware (no PORTE and other things), so you cannot run the Planck firmware. I use it to simulate ideas I have for features in separate test projects. - -This one is a major pain in the butt because it has a lot of dependencies and it is buggy. I will do my best to explain it but... it was hard to figure out. A few things need to be changed in the 'Makefile' to make it work in `cygwin`. - - -``` -$ cd ~/src -$ git clone https://github.com/Traumflug/simulavr.git -$ cd simulavr -$ ./bootstrap -$ ./configure --prefix=$PREFIX --enable-static --disable-tcl --disable-doxygen-doc -``` - Edit `src/Makefile.am` now so that `-no-undefined` is included (I did this by removing the SYS_MINGW conditional surrounding `libsim_la_LDFLAGS += -no-undefined` and `libsimulavr_la_LDFLAGS += -no-undefined \ libsimulavr_la_LIBADD += $(TCL_LIB)`. Also, `$(EXEEXT)` is added after `kbdgentables` in two places. - -``` -$ make -$ make install -``` - - -TODO: -- git repos for all sources -- command line magic for cygwin setup -- better options for `dfu-drivers` diff --git a/docs/differences_from_tmk.md b/docs/differences_from_tmk.md deleted file mode 100644 index 10ca329dc9..0000000000 --- a/docs/differences_from_tmk.md +++ /dev/null @@ -1,7 +0,0 @@ -Understanding the essential changes made on the [tmk_keyboard firmware](http://github.com/tmk/tmk_keyboard) should help you understand the QMK Firmware. - -| Firmware |TMK |QMK | -|------------------------------|-----------------------|-------------------------| -| Maintainer |hasu (@tmk) |Jack Humbert et al. | -| Build path customization | `TMK_DIR = ...` | `include .../Makefile` | -| `keymaps` array data | 3D array of `uint8_t` holding **keycode** | 3D array of `uint16_t` holding **keycode** | diff --git a/docs/documentation_best_practices.md b/docs/documentation_best_practices.md new file mode 100644 index 0000000000..059b25bcd3 --- /dev/null +++ b/docs/documentation_best_practices.md @@ -0,0 +1,97 @@ +# Documentation Best Practices + +This page exists to document best practices when writing documentation for QMK. Following these guidelines will help to keep a consistent tone and style, which will in turn help other people more easily understand QMK. + +# Page Opening + +Your documentation page should generally start with an H1 heading, followed by a 1 paragrah description of what the user will find on this page. Keep in mind that this heading and paragraph will sit next to the Table of Contents, so keep the heading short and avoid long strings with no whitespace. + +Example: + +``` +# My Page Title + +This page covers my super cool feature. You can use this feature to make coffee, squeeze fresh oj, and have an egg mcmuffin and hashbrowns delivered from your local macca's by drone. +``` + +# Headings + +Your page should generally have multiple "H1" headings. Only H1 and H2 headings will included in the Table of Contents, so plan them out appropriately. Excess width should be avoided in H1 and H2 headings to prevent the Table of Contents from getting too wide. + +# Styled Hint Blocks + +You can have styled hint blocks drawn around text to draw attention to it. + +``` +{% hint style='info' %} +This uses `hint style='info'` +{% endhint %} +``` + +### Examples: + +{% hint style='info' %} +This uses `hint style='info'` +{% endhint %} + +{% hint style='tip' %} +This uses `hint style='tip'` +{% endhint %} + +{% hint style='danger' %} +This uses `hint style='danger'` +{% endhint %} + +{% hint style='working' %} +This uses `hint style='working'` +{% endhint %} + +# Styled Terminal Blocks + +You can present styled terminal blocks by including special tokens inside your text block. + +``` +\`\`\` +**[terminal] +**[prompt foo@joe]**[path ~]**[delimiter $ ]**[command ./myscript] +Normal output line. Nothing special here... +But... +You can add some colors. What about a warning message? +**[warning [WARNING] The color depends on the theme. Could look normal too] +What about an error message? +**[error [ERROR] This is not the error you are looking for] +\`\`\` +``` + +### Example + +``` +**[terminal] +**[prompt foo@joe]**[path ~]**[delimiter $ ]**[command ./myscript] +Normal output line. Nothing special here... +But... +You can add some colors. What about a warning message? +**[warning [WARNING] The color depends on the theme. Could look normal too] +What about an error message? +**[error [ERROR] This is not the error you are looking for] +``` + +# Documenting Features + +If you create a new feature for QMK, create a documentation page for it. It doesn't have to be very long, a few sentances describing your feature and a table listing any relevant keycodes is enough. Here is a basic template: + +```markdown +# My Cool Feature + +This page describes my cool feature. You can use my cool feature to make coffee and order cream and sugar to be delivered via drone. + +## My Cool Feature Keycodes + +|Long Name|Short Name|Description| +|---------|----------|-----------| +|KC_COFFEE||Make Coffee| +|KC_CREAM||Order Cream| +|KC_SUGAR||Order Sugar| +``` + +Place your documentation into `docs/feature_.md`, and add that file to the appropriate place in `docs/_summary.md`. If you have added any keycodes be sure to add them to `docs/keycodes.md` with a link back to your feature page. diff --git a/docs/eclipse.md b/docs/eclipse.md index ec5f2dc0d1..a63b84607f 100644 --- a/docs/eclipse.md +++ b/docs/eclipse.md @@ -1,3 +1,5 @@ +# Setting Up Eclipse for QMK Development + [Eclipse](https://en.wikipedia.org/wiki/Eclipse_(software)) is an open-source [Integrated Development Environment](https://en.wikipedia.org/wiki/Integrated_development_environment) (IDE) widely used for Java development, but with an extensible plugin system that allows to customize it for other languages and usages. Using an IDE such as Eclipse provides many advantages over a plain text editor, such as: @@ -81,4 +83,4 @@ We will now configure a make target that cleans the project and builds the keyma 6. Leave the other options checked and click OK. Your make target will now appear under the selected keyboard. 7. (Optional) Toggle the Hide Empty Folders icon button above the targets tree to only show your build target. 8. Double-click the build target you created to trigger a build. -9. Select the Console view at the bottom to view the running build. \ No newline at end of file +9. Select the Console view at the bottom to view the running build. diff --git a/docs/embedding.md b/docs/embedding.md deleted file mode 100644 index 5c2f3b31e0..0000000000 --- a/docs/embedding.md +++ /dev/null @@ -1,64 +0,0 @@ -# WARNING: Until issue [#173](https://github.com/tmk/tmk_keyboard/issues/173) goes through, the [core][1] repository will not be up-to-date with the latest changes and fixes, but can still be used. - -If you want to use TMK for your own keyboard project, you've got three options for embedding the [core][1]. -The recommended option is [subtrees](#1-git-subtree). - -After adding the embed you'll need to [modify the Makefile](#modifications-to-the-makefile) of your project to point to the core correctly. - -## 1. git subtree - -In order to set up the subtree in your project, first add the core repository as a remote: -``` -git remote add -f core https://github.com/tmk/tmk_core -``` - -Then add the core as a subtree (directory) in your local repository: -``` -git subtree add -P tmk_core core master --squash -``` - -And that's it! - -When you want to update the subtree in your repository to match the master on [tmk_core][1], do this: -``` -git subtree pull -P tmk_core core master --squash -``` - -## 2. git submodule - -In order to set up the submodule in your project, first add a new submodule: -``` -git submodule add https://github.com/tmk/tmk_core tmk_core -``` - -Then pull, sync and update the submodule: -``` -git pull -git submodule sync --recursive -git submodule update --init --recursive -``` - -And that's it! - -When you want to update the subtree in your repository to match the master on [tmk_core][1], follow the same steps as above. - -If you want to clone a repository from GitHub that has submodule(s) in it, pass --recursive when cloning, like so: -`git clone --recursive https://github.com//` - -## 3. Manually (without git) - -*Note: This is not recommended in any way, but it's still possible.* - -Download a zipped version of the [tmk_core][1] repository using this link: - - -Extract the zip in your project's directory, then rename the folder to tmk_core. - -## Modifications to the *Makefile* - -The one thing you have to make sure to change in the *Makefile* (compared to [tmk_keyboard](https://github.com/tmk/tmk_keyboard) drivers' *[Makefile](https://github.com/tmk/tmk_keyboard/blob/master/keyboard/gh60/Makefile#L45)*) is the "TMK_DIR" variable, which needs to point to the embed directory: -```Makefile -TMK_DIR = ./tmk_core -``` - -[1]: https://github.com/tmk/tmk_core \ No newline at end of file diff --git a/docs/faq.md b/docs/faq.md index 0636d8b544..506f57a72b 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -1,238 +1,6 @@ -## READ FIRST -- **README** of top directory : https://github.com/tmk/tmk_keyboard/blob/master/README.md -- **README** of target project(keyboard/converter) directory. +# Frequently Asked Questions -Note that you'll need to read **both**. - - -# Build -- [[FAQ/Build]] - - -# Keymap -- [[FAQ/Keymap]] - - -# Debug Console -## hid_listen can't recognize device -When debug console of your device is not ready you will see like this: - - Waiting for device:......... - -once the device is pluged in then *hid_listen* finds it you will get this message: - - Waiting for new device:......................... - Listening: - -Check if you can't get this 'Listening:' message: -- build with `CONSOLE_ENABLE=yes` in **Makefile**. - -You may need privilege to access the device on OS like Linux. -- try `sudo hid_listen` - -## Can't get message on console -Check: -- *hid_listen* finds your device. See above. -- Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands). -- set `debug_enable=true` usually in `matrix_init()` in **matrix.c**. -- try using 'print' function instead of debug print. See **common/print.h**. -- disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97). - -## Linux or UNIX like system requires Super User privilege -Just use 'sudo' to execute *hid_listen* with privilege. -``` -$ sudo hid_listen -``` - -Or add an *udev rule* for TMK devices with placing a file in rules directory. The directory may vary on each system. - -File: /etc/udev/rules.d/52-tmk-keyboard.rules(in case of Ubuntu) -``` -# tmk keyboard products https://github.com/tmk/tmk_keyboard -SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" -``` - -*** - -# Miscellaneous -## NKRO Doesn't work -First you have to compile frimware with this build option `NKRO_ENABLE` in **Makefile**. - -Try `Magic` **N** command(`LShift+RShift+N` by default) when **NKRO** still doesn't work. You can use this command to toggle between **NKRO** and **6KRO** mode temporarily. In some situations **NKRO** doesn't work you need to switch to **6KRO** mode, in particular when you are in BIOS. - -If your firmeare built with `BOOTMAGIC_ENABLE` you need to turn its switch on by `BootMagic` **N** command(`Space+N` by default). This setting is stored in EEPROM and keeped over power cycles. - -https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch - - -## TrackPoint needs reset circuit(PS/2 mouse support) -Without reset circuit you will have inconsistent reuslt due to improper initialize of the hardware. See circuit schematic of TPM754. - -- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447 -- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf - - -## Can't read column of matrix beyond 16 -Use `1UL<<16` instead of `1<<16` in `read_cols()` in **matrix.h** when your columns goes beyond 16. - -In C `1` means one of **int** type which is **16bit** in case of AVR so you can't shift left more than 15. You will get unexpected zero when you say `1<<16`. You have to use **unsigned long** type with `1UL`. - -http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279 - - - -## Pull-up Resistor -In some case converters needed to have pull-up resistors to work correctly. Place the resistor between VCC and signal line in parallel. - -For example: -``` -Keyboard Conveter - ,------. -5V------+------|VCC | - | | | - R | | - | | | -Signal--+------|PD0 | - | | -GND------------|GND | - `------' -R: 1K Ohm resistor -``` - -https://github.com/tmk/tmk_keyboard/issues/71 - - -## Arduino Micro's pin naming is confusing -Note that Arduino Micro PCB marking is different from real AVR port name. D0 of Arduino Micro is not PD0, PD0 is D3. Check schematic yourself. -http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf - - - -## Bootloader jump doesn't work -Properly configure bootloader size in **Makefile**. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**. -``` -# Size of Bootloaders in bytes: -# Atmel DFU loader(ATmega32U4) 4096 -# Atmel DFU loader(AT90USB128) 8192 -# LUFA bootloader(ATmega32U4) 4096 -# Arduino Caterina(ATmega32U4) 4096 -# USBaspLoader(ATmega***) 2048 -# Teensy halfKay(ATmega32U4) 512 -# Teensy++ halfKay(AT90USB128) 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 -``` -AVR Boot section size are defined by setting **BOOTSZ** fuse in fact. Consult with your MCU datasheet. -Note that **Word**(2 bytes) size and address are used in datasheet while TMK uses **Byte**. - -AVR Boot section is located at end of Flash memory like the followings. -``` -byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286) -0x0000 +---------------+ 0x00000 +---------------+ - | | | | - | | | | - | Application | | Application | - | | | | - = = = = - | | 32KB-4KB | | 128KB-8KB -0x6000 +---------------+ 0x1E000 +---------------+ - | Bootloader | 4KB | Bootloader | 8KB -0x7FFF +---------------+ 0x1FFFF +---------------+ - - -byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286) -0x0000 +---------------+ 0x00000 +---------------+ - | | | | - | | | | - | Application | | Application | - | | | | - = = = = - | | 32KB-512B | | 128KB-2KB -0x7E00 +---------------+ 0x1FC00 +---------------+ - | Bootloader | 512B | Bootloader | 2KB -0x7FFF +---------------+ 0x1FFFF +---------------+ -``` - -And see this discussion for further reference. -https://github.com/tmk/tmk_keyboard/issues/179 - - -## Special Extra key doesn't work(System, Audio control keys) -You need to define `EXTRAKEY_ENABLE` in **makefile** to use them in TMK. -``` -EXTRAKEY_ENABLE = yes # Audio control and System control -``` -http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-60.html#p157919 - - -## Wakeup from sleep doesn't work -In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting. - -Pressing any key during sleep should wake host. - - -## Using Arduino? -**Note that Arduino pin naming is different from actual chip.** For example, Arduino pin `D0` is not `PD0`. Check circuit with its schematics yourself. - -- http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf -- http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf - -Arduino leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem. - - -## Using PF4-7 pins of USB AVR? -You need to set JTD bit of MCUCR yourself to use PF4-7 as GPIO. Those pins are configured to serve JTAG function by default. MCUs like ATMega*U* or AT90USB* are affeteced with this. - -If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function. - -See this code. -``` - // JTAG disable for PORT F. write JTD bit twice within four cycles. - MCUCR |= (1<] [KEYMAP=...] clean - $ make [-f Makefile.] [KEYMAP=...] - $ make [-f Makefile.] [KEYMAP=...] dfu - - -## Can't program on Linux and Mac -You will need proper permission to operate a device. For Linux users see udev rules below. -Easy way is to use `sudo` command, if you are not familiar with this command check its manual with `man sudo` or this page on line. - -https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man8/sudo.8.html +## Can't program on Linux +You will need proper permission to operate a device. For Linux users see udev rules below. Easy way is to use `sudo` command, if you are not familiar with this command check its manual with `man sudo` or this page on line. In short when your controller is ATMega32u4, @@ -22,67 +13,18 @@ In short when your controller is ATMega32u4, or just - $ sudo make dfu - -But to run `make` with root privilege is not good idea. Use former method as possible. - -## Do 'make clean' before 'make' -You'll need `make clean` after you edit **config.h** or change options like `KEYMAP`. - -Frist remove all files made in previous build, - - $ make clean - -then build new firmware. - - $ make [KEYMAP=...] - -Also you can always try `make clean` when you get other strange result during build. + $ sudo make --dfu +But to run `make` with root privilege is not good idea. Use former method if possible. ## WINAVR is obsolete It is no longer recommended and may cause some problem. -See [Issue #99](https://github.com/tmk/tmk_keyboard/issues/99). - -## USB stack: LUFA or PJRC? -Use **LUFA**. - -**PJRC** stack won't be supported actively anymore. There is no reason to hesitate to use LUFA except for binary size(about 1KB lager?). But **PJRC** is still very useful for debug and development purpose. -See also [Issue #50](https://github.com/tmk/tmk_keyboard/issues/50) and [Issue #58](https://github.com/tmk/tmk_keyboard/issues/58). - -## Edit configuration but not change -You will need followings after editing `CONSOLE_ENABLE`, `NKRO_ENABLE`, `EXTRAKEY_ENABLE` or `MOUSEKEY_ENABLE` option in **Makefile**. - -### 1. make clean -This will be needed when you edit **config.h**. - -### 2. Remove Drivers from Device Manager(Windows) -**Windows only.** Linux, OSX and other OS's doesn't require this. It looks like Windows keeps using driver installed when device was connected first time even after the device changes its configuration. To load proper drivers for new configuration you need to remove existent drivers from **Drvice Manager**. - -### 3. Build with different VID:PID -**Windows only.** If method 2. does't work fou you try this. Change Vendor ID or Product ID in **config.h** and build firmware. Windows should recognize it as whole new device and start drivers install process. - -### 4. Just try other ports -This will be useful and the easiest workaround for **Windows**. - - +See [TMK Issue #99](https://github.com/tmk/tmk_keyboard/issues/99). ## USB VID and PID -You can use any ID you want with editing `config.h`. Using any presumably unused ID will be no problem in fact except for very least chance of collision with other product. +You can use any ID you want with editing `config.h`. Using any presumably unused ID will be no problem in fact except for very low chance of collision with other product. -For example TMK uses following numbers by default. -``` -keyboard: -hhkb: FEED:CAFE -gh60: FEED:6060 - -converter: -x68k: FEED:6800 -ps2: FEED:6512 -adb: FEED:0ADB -ibm4704: FEED:4704 -pc98: FEED:9898 -``` +Most boards in QMK use `0xFEED` as the vendor ID. You should look through other keyboards to make sure you pick a unique Product ID. Also see this. https://github.com/tmk/tmk_keyboard/issues/150 @@ -91,7 +33,6 @@ You can buy a really unique VID:PID here. I don't think you need this for person - http://www.obdev.at/products/vusb/license.html - http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1 - ## Linux udev rules On Linux you need proper privilege to access device file of MCU, you'll have to use `sudo` when flashing firmware. You can circumvent this with placing these files in `/etc/udev/rules.d/`. @@ -112,7 +53,6 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" ``` - ## Cortex: cstddef: No such file or directory GCC 4.8 of Ubuntu 14.04 had this problem and had to update to 4.9 with this PPA. https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded @@ -148,4 +88,4 @@ Note that Teensy2.0++ bootloader size is 2048byte. Some Makefiles may have wrong # LUFA bootloader 4096 # USBaspLoader 2048 OPT_DEFS += -DBOOTLOADER_SIZE=2048 -``` \ No newline at end of file +``` diff --git a/docs/faq_debug.md b/docs/faq_debug.md new file mode 100644 index 0000000000..3f7cfe7477 --- /dev/null +++ b/docs/faq_debug.md @@ -0,0 +1,242 @@ +# Debugging FAQ + +This page details various common questions people have about troubleshooting their keyboards. + +# Debug Console + +## hid_listen can't recognize device +When debug console of your device is not ready you will see like this: + +``` +Waiting for device:......... +``` + +once the device is pluged in then *hid_listen* finds it you will get this message: + +``` +Waiting for new device:......................... +Listening: +``` + +If you can't get this 'Listening:' message try building with `CONSOLE_ENABLE=yes` in [Makefile] + +You may need privilege to access the device on OS like Linux. +- try `sudo hid_listen` + +## Can't get message on console +Check: +- *hid_listen* finds your device. See above. +- Enable debug with pressing **Magic**+d. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands). +- set `debug_enable=true` usually in `matrix_init()` in **matrix.c**. +- try using 'print' function instead of debug print. See **common/print.h**. +- disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97). + +## Linux or UNIX like system requires Super User privilege +Just use 'sudo' to execute *hid_listen* with privilege. +``` +$ sudo hid_listen +``` + +Or add an *udev rule* for TMK devices with placing a file in rules directory. The directory may vary on each system. + +File: /etc/udev/rules.d/52-tmk-keyboard.rules(in case of Ubuntu) +``` +# tmk keyboard products https://github.com/tmk/tmk_keyboard +SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" +``` + +*** + +# Miscellaneous +## Safety Considerations + +You probably don't want to "brick" your keyboard, making it impossible +to rewrite firmware onto it. Here are some of the parameters to show +what things are (and likely aren't) too risky. + +- If your keyboard map does not include RESET, then, to get into DFU + mode, you will need to press the reset button on the PCB, which + requires unscrewing the bottom. +- Messing with tmk_core / common files might make the keyboard + inoperable +- Too large a .hex file is trouble; `make dfu` will erase the block, + test the size (oops, wrong order!), which errors out, failing to + flash the keyboard, leaving it in DFU mode. + - To this end, note that the maximum .hex file size on Planck is + 7000h (28672 decimal) + +``` +Linking: .build/planck_rev4_cbbrowne.elf [OK] +Creating load file for Flash: .build/planck_rev4_cbbrowne.hex [OK] + +Size after: + text data bss dec hex filename + 0 22396 0 22396 577c planck_rev4_cbbrowne.hex +``` + + - The above file is of size 22396/577ch, which is less than + 28672/7000h + - As long as you have a suitable alternative .hex file around, you + can retry, loading that one + - Some of the options you might specify in your keyboard's Makefile + consume extra memory; watch out for BOOTMAGIC_ENABLE, + MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE, API_SYSEX_ENABLE +- DFU tools do /not/ allow you to write into the bootloader (unless + you throw in extra fruitsalad of options), so there is little risk + there. +- EEPROM has around a 100000 write cycle. You shouldn't rewrite the + firmware repeatedly and continually; that'll burn the EEPROM + eventually. +## NKRO Doesn't work +First you have to compile frimware with this build option `NKRO_ENABLE` in **Makefile**. + +Try `Magic` **N** command(`LShift+RShift+N` by default) when **NKRO** still doesn't work. You can use this command to toggle between **NKRO** and **6KRO** mode temporarily. In some situations **NKRO** doesn't work you need to switch to **6KRO** mode, in particular when you are in BIOS. + +If your firmeare built with `BOOTMAGIC_ENABLE` you need to turn its switch on by `BootMagic` **N** command(`Space+N` by default). This setting is stored in EEPROM and keeped over power cycles. + +https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch + + +## TrackPoint needs reset circuit(PS/2 mouse support) +Without reset circuit you will have inconsistent reuslt due to improper initialize of the hardware. See circuit schematic of TPM754. + +- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447 +- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf + + +## Can't read column of matrix beyond 16 +Use `1UL<<16` instead of `1<<16` in `read_cols()` in [matrix.h] when your columns goes beyond 16. + +In C `1` means one of [int] type which is [16bit] in case of AVR so you can't shift left more than 15. You will get unexpected zero when you say `1<<16`. You have to use [unsigned long] type with `1UL`. + +http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279 + + +## Bootloader jump doesn't work +Properly configure bootloader size in **Makefile**. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**. +``` +# Size of Bootloaders in bytes: +# Atmel DFU loader(ATmega32U4) 4096 +# Atmel DFU loader(AT90USB128) 8192 +# LUFA bootloader(ATmega32U4) 4096 +# Arduino Caterina(ATmega32U4) 4096 +# USBaspLoader(ATmega***) 2048 +# Teensy halfKay(ATmega32U4) 512 +# Teensy++ halfKay(AT90USB128) 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 +``` +AVR Boot section size are defined by setting **BOOTSZ** fuse in fact. Consult with your MCU datasheet. +Note that **Word**(2 bytes) size and address are used in datasheet while TMK uses **Byte**. + +AVR Boot section is located at end of Flash memory like the followings. +``` +byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286) +0x0000 +---------------+ 0x00000 +---------------+ + | | | | + | | | | + | Application | | Application | + | | | | + = = = = + | | 32KB-4KB | | 128KB-8KB +0x6000 +---------------+ 0x1E000 +---------------+ + | Bootloader | 4KB | Bootloader | 8KB +0x7FFF +---------------+ 0x1FFFF +---------------+ + + +byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286) +0x0000 +---------------+ 0x00000 +---------------+ + | | | | + | | | | + | Application | | Application | + | | | | + = = = = + | | 32KB-512B | | 128KB-2KB +0x7E00 +---------------+ 0x1FC00 +---------------+ + | Bootloader | 512B | Bootloader | 2KB +0x7FFF +---------------+ 0x1FFFF +---------------+ +``` + +And see this discussion for further reference. +https://github.com/tmk/tmk_keyboard/issues/179 + + +## Special Extra key doesn't work(System, Audio control keys) +You need to define `EXTRAKEY_ENABLE` in `rules.mk` to use them in QMK. + +``` +EXTRAKEY_ENABLE = yes # Audio control and System control +``` + +## Wakeup from sleep doesn't work + +In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting. + +Pressing any key during sleep should wake host. + +## Using Arduino? + +**Note that Arduino pin naming is different from actual chip.** For example, Arduino pin `D0` is not `PD0`. Check circuit with its schematics yourself. + +- http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf +- http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf + +Arduino leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem. + + +## Using PF4-7 pins of USB AVR? +You need to set JTD bit of MCUCR yourself to use PF4-7 as GPIO. Those pins are configured to serve JTAG function by default. MCUs like ATMega*U* or AT90USB* are affeteced with this. + +If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function. + +See this code. +``` + // JTAG disable for PORT F. write JTD bit twice within four cycles. + MCUCR |= (1< + +## What Differences Are There Between QMK and TMK? + +TMK was originally designed and implemented by [Jun Wako](https://github.com/tmk). QMK started as [Jack Humbert's](https://github.com/jackhumbert) fork of TMK for the Planck. After a while Jack's fork had diverged quite a bit from TMK, and in 2015 Jack decided to rename his fork to QMK. + +From a technical standpoint QMK builds upon TMK by adding several new features. Most notably QMK has expanded the number of available keycodes and uses these to implement advanced features like `S()`, `LCTL()`, and `MO()`. You can see a complete list of these keycodes in [Keycodes](keycodes.md). + +From a project and community management standpoint TMK maintains all the officially supported keyboards by himself, with a bit of community support. Separate community maintained forks exist or can be created for other keyboards. Only a few keymaps are provided by default, so users typically don't share keymaps with each other. QMK encourages sharing of both keyboards and keymaps through a centrally managed repository, accepting all pull requests that follow the quality standards. These are mostly community maintained, but the QMK team also helps when necessary. + +Both approaches have their merits and their drawbacks, and code flows freely between TMK and QMK when it makes sense. + diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md index 623726ab2e..eb49a36996 100644 --- a/docs/faq_keymap.md +++ b/docs/faq_keymap.md @@ -1,10 +1,13 @@ -## READ FIRST -https://github.com/tmk/tmk_core/blob/master/doc/keymap.md +# Keymap FAQ -## How to get keycode -See [Keycodes](Keycodes). Keycodes are actually defined in [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h). +This page covers questions people often have about keymaps. If you haven't you should read [Keymap Overview](keymap.md) first. -## Sysrq key +## What Keycodes Can I Use? +See [Keycodes](keycodes.md) for an index of keycodes available to you. These link to more extensive documentation when available. + +Keycodes are actually defined in [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h). + +## `KC_SYSREQ` isn't working Use keycode for Print Screen(`KC_PSCREEN` or `KC_PSCR`) instead of `KC_SYSREQ`. Key combination of 'Alt + Print Screen' is recognized as 'System request'. See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and @@ -16,7 +19,7 @@ Use `KC_PWR` instead of `KC_POWER` or vice versa. - `KC_PWR` works with Windows and Linux, not with OSX. - `KC_POWER` works with OSX and Linux, not with Windows. -http://geekhack.org/index.php?topic=14290.msg1327264#msg1327264 +More info: http://geekhack.org/index.php?topic=14290.msg1327264#msg1327264 ## Oneshot modifier Solves my personal 'the' problem. I often got 'the' or 'THe' wrongly instead of 'The'. Oneshot Shift mitgates this for me. @@ -32,15 +35,17 @@ For Modifier keys and layer actions you have to place `KC_TRANS` on same positio ## Mechanical Lock Switch Support -https://github.com/tmk/tmk_keyboard#mechanical-locking-support -This feature is for *mechanical lock switch* like this Alps one. -http://deskthority.net/wiki/Alps_SKCL_Lock +This feature is for *mechanical lock switch* like [this Alps one](http://deskthority.net/wiki/Alps_SKCL_Lock). You can enable it by adding this to your `config.h`: + +``` +#define LOCKING_SUPPORT_ENABLE +#define LOCKING_RESYNC_ENABLE +``` -Using enabling this feature and using keycodes `LCAP`, `LNUM` or `LSCR` in keymap you can use physical locking CapsLock, NumLock or ScrollLock keys as you expected. - -Old vintage mechanical keyboards occasionally have lock switches but modern ones don't have. ***You don't need this feature in most case and just use keycodes `CAPS`, `NLCK` and `SLCK`.*** +After enabling this feature use keycodes `KC_LCAP`, `KC_LNUM` and `KC_LSCR` in your keymap instead. +Old vintage mechanical keyboards occasionally have lock switches but modern ones don't have. ***You don't need this feature in most case and just use keycodes `KC_CAPS`, `KC_NLCK` and `KC_SLCK`.*** ## Input special charactors other than ASCII like Cédille 'Ç' NO UNIVERSAL METHOD TO INPUT THOSE WORKS OVER ALL SYSTEMS. You have to define **MACRO** in way specific to your OS or layout. @@ -111,68 +116,14 @@ https://github.com/tekezo/Karabiner/issues/403 ## Esc and `~ on a key -You can define FC660 and Poker style ESC with `ACTION_LAYER_MODS`. -https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#35-momentary-switching-with-modifiers - -``` -#include "keymap_common.h" - - -/* Leopold FC660 - * https://elitekeyboards.com/products.php?sub=leopold,compact&pid=fc660c - * Shift + Esc = ~ - * Fn + Esc = ` - * - * Votex Poker II - * https://adprice.fedorapeople.org/poker2_manual.pdf - * Fn + Esc = ` - * Fn + Shift + Esc = ~ - */ -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: qwerty */ - [0] = KEYMAP( \ - ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS,BSPC, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ - LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \ - FN0, NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT,ESC, \ - LCTL,LGUI,LALT, SPC, RALT,FN1, RGUI,RCTL), - [1] = KEYMAP( \ - GRV, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS), - [2] = KEYMAP( \ - GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS), -}; - -const uint16_t PROGMEM fn_actions[] = { - // https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#35-momentary-switching-with-modifiers - [0] = ACTION_LAYER_MODS(1, MOD_LSFT), - [1] = ACTION_LAYER_MOMENTARY(2), -}; -``` - -Otherwise, you can write code, see this. -https://github.com/p3lim/keyboard_firmware/commit/fd799c12b69a5ab5addd1d4c03380a1b8ef8e9dc - - -## 32 Fn keys are not enough? -### actionmap -It uses 16 bit codes and has no limitation of 32 Fn at the expense of memory space. TMK keymap is actually is 8 bit codes as subset of the actionmap. -https://github.com/tmk/tmk_keyboard/issues?utf8=%E2%9C%93&q=is%3Aissue+actionmap - -### extension for modified keys -https://geekhack.org/index.php?topic=41989.msg1885526#msg1885526 +Use `GRAVE_ESC` or `KC_GESC` in your keymap. `GUI`+`GRAVE_ESC` results in `` ` `` and `SHIFT`+`GRAVE_ESC` results in `~`. +Note that this will break the CTRL+SHIFT+ESC shortcut to the Windows task manager. Use `#define GRAVE_ESC_CTRL_OVERRIDE` in your `config.h` to get the shortcut back. With this option, `ESC_GRAVE` results in `ESC` if `CTRL` is held, even if `SHIFT` or `GUI` are also held. ## Arrow on Right Modifier keys with Dual-Role This turns right modifer keys into arrow keys when the keys are tapped while still modifiers when the keys are hold. In TMK the dual-role function is dubbed **TAP**. ``` + #include "keymap_common.h" @@ -211,18 +162,16 @@ const uint16_t PROGMEM fn_actions[] = { ``` - Dual-role key: https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys ## Eject on Mac OSX -`EJCT` keycode works on OSX. https://github.com/tmk/tmk_keyboard/issues/250 +`KC_EJCT` keycode works on OSX. https://github.com/tmk/tmk_keyboard/issues/250 It seems Windows 10 ignores the code and Linux/Xorg recognizes but has no mapping by default. Not sure what keycode Eject is on genuine Apple keyboard actually. HHKB uses `F20` for Eject key(`Fn+f`) on Mac mode but this is not same as Apple Eject keycode probably. - ## What's weak_mods and real_mods in action_util.c ___TO BE IMPROVED___ @@ -262,4 +211,3 @@ if (timer_elapsed(key_timer) < 100) { ``` It's best to declare the `static uint16_t key_timer;` at the top of the file, outside of any code blocks you're using it in. - diff --git a/docs/feature_audio.md b/docs/feature_audio.md new file mode 100644 index 0000000000..c142ff69c2 --- /dev/null +++ b/docs/feature_audio.md @@ -0,0 +1,204 @@ +# Audio + +Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any AVR keyboard that allows access to the C6 or B5 port (`#define C6_AUDIO` and/or `#define B5_AUDIO`), you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes. + +If you add `AUDIO_ENABLE = yes` to your `rules.mk`, there's a couple different sounds that will automatically be enabled without any other configuration: + +``` +STARTUP_SONG // plays when the keyboard starts up (audio.c) +GOODBYE_SONG // plays when you press the RESET key (quantum.c) +AG_NORM_SONG // plays when you press AG_NORM (quantum.c) +AG_SWAP_SONG // plays when you press AG_SWAP (quantum.c) +MUSIC_ON_SONG // plays when music mode is activated (process_music.c) +MUSIC_OFF_SONG // plays when music mode is deactivated (process_music.c) +CHROMATIC_SONG // plays when the chromatic music mode is selected (process_music.c) +GUITAR_SONG // plays when the guitar music mode is selected (process_music.c) +VIOLIN_SONG // plays when the violin music mode is selected (process_music.c) +MAJOR_SONG // plays when the major music mode is selected (process_music.c) +``` + +You can override the default songs by doing something like this in your `config.h`: + +```c +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(STARTUP_SOUND) +#endif +``` + +A full list of sounds can be found in [quantum/audio/song_list.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/song_list.h) - feel free to add your own to this list! All available notes can be seen in [quantum/audio/musical_notes.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/musical_notes.h). + +To play a custom sound at a particular time, you can define a song like this (near the top of the file): + +```c +float my_song[][2] = SONG(QWERTY_SOUND); +``` + +And then play your song like this: + +```c +PLAY_SONG(my_song); +``` + +Alternatively, you can play it in a loop like this: + +```c +PLAY_LOOP(my_song); +``` + +It's advised that you wrap all audio features in `#ifdef AUDIO_ENABLE` / `#endif` to avoid causing problems when audio isn't built into the keyboard. + +## Music mode + +The music mode maps your columns to a chromatic scale, and your rows to octaves. This works best with ortholinear keyboards, but can be made to work with others. All keycodes less than `0xFF` get blocked, so you won't type while playing notes - if you have special keys/mods, those will still work. A work-around for this is to jump to a different layer with KC_NOs before (or after) enabling music mode. + +Recording is experimental due to some memory issues - if you experience some weird behavior, unplugging/replugging your keyboard will fix things. + +Keycodes available: + +* `MU_ON` - Turn music mode on +* `MU_OFF` - Turn music mode off +* `MU_TOG` - Toggle music mode +* `MU_MOD` - Cycle through the music modes: + * `CHROMATIC_MODE` - Chromatic scale, row changes the octave + * `GUITAR_MODE` - Chromatic scale, but the row changes the string (+5 st) + * `VIOLIN_MODE` - Chromatic scale, but the row changes the string (+7 st) + * `MAJOR_MODE` - Major scale + +In music mode, the following keycodes work differently, and don't pass through: + +* `LCTL` - start a recording +* `LALT` - stop recording/stop playing +* `LGUI` - play recording +* `KC_UP` - speed-up playback +* `KC_DOWN` - slow-down playback + +By default, `MUSIC_MASK` is set to `keycode < 0xFF` which means keycodes less than `0xFF` are turned into notes, and don't output anything. You can change this by defining this in your `config.h` like this: + + #define MUSIC_MASK keycode != KC_NO + +Which will capture all keycodes - be careful, this will get you stuck in music mode until you restart your keyboard! + +The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`: + + #define PITCH_STANDARD_A 432.0f + +## MIDI functionalty + +This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile. + + diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md new file mode 100644 index 0000000000..c419b7cccb --- /dev/null +++ b/docs/feature_backlight.md @@ -0,0 +1,17 @@ +# Backlighting + + + +## Backlight Keycodes + +These keycodes control the backlight. Most keyboards use this for single color in-switch lighting. + +|Name|Description| +|----|-----------| +|`BL_x`|Set a specific backlight level between 0-9| +|`BL_ON`|An alias for `BL_9`| +|`BL_OFF`|An alias for `BL_0`| +|`BL_DEC`|Turn the backlight level down by 1| +|`BL_INC`|Turn the backlight level up by 1| +|`BL_TOGG`|Toggle the backlight on or off| +|`BL_STEP`|Step through backlight levels, wrapping around to 0 when you reach the top.| diff --git a/docs/feature_bluetooth.md b/docs/feature_bluetooth.md new file mode 100644 index 0000000000..79a54208ea --- /dev/null +++ b/docs/feature_bluetooth.md @@ -0,0 +1,17 @@ +# Bluetooth + +## Bluetooth functionality + +This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will. + + + +## Bluetooth Keycodes + +This is used when multiple keyboard outputs can be selected. Currently this only allows for switching between USB and Bluetooth on keyboards that support both. + +|Name|Description| +|----|-----------| +|`OUT_AUTO`|auto mode| +|`OUT_USB`|usb only| +|`OUT_BT`|bluetooth| diff --git a/docs/feature_bootmagic.md b/docs/feature_bootmagic.md new file mode 100644 index 0000000000..3cf7d8d2a9 --- /dev/null +++ b/docs/feature_bootmagic.md @@ -0,0 +1,29 @@ +# Bootmagic + + + +## Bootmagic Keycodes + +Shortcuts for bootmagic options. You can use these even when bootmagic is off. + +|Name|Description| +|----|-----------| +|`MAGIC_SWAP_CONTROL_CAPSLOCK`|Swap Capslock and Left Control| +|`MAGIC_CAPSLOCK_TO_CONTROL`|Treat Capslock like a Control Key| +|`MAGIC_SWAP_LALT_LGUI`|Swap the left Alt and GUI keys| +|`MAGIC_SWAP_RALT_RGUI`|Swap the right Alt and GUI keys| +|`MAGIC_NO_GUI`|Disable the GUI key| +|`MAGIC_SWAP_GRAVE_ESC`|Swap the Grave and Esc key.| +|`MAGIC_SWAP_BACKSLASH_BACKSPACE`|Swap backslack and backspace| +|`MAGIC_HOST_NKRO`|Force NKRO on| +|`MAGIC_SWAP_ALT_GUI`/`AG_SWAP`|Swap Alt and Gui on both sides| +|`MAGIC_UNSWAP_CONTROL_CAPSLOCK`|Disable the Control/Capslock swap| +|`MAGIC_UNCAPSLOCK_TO_CONTROL`|Disable treating Capslock like Control | +|`MAGIC_UNSWAP_LALT_LGUI`|Disable Left Alt and GUI switching| +|`MAGIC_UNSWAP_RALT_RGUI`|Disable Right Alt and GUI switching| +|`MAGIC_UNNO_GUI`|Enable the GUI key | +|`MAGIC_UNSWAP_GRAVE_ESC`|Disable the Grave/Esc swap | +|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|Disable the backslash/backspace swap| +|`MAGIC_UNHOST_NKRO`|Force NKRO off| +|`MAGIC_UNSWAP_ALT_GUI`/`AG_NORM`|Disable the Alt/GUI switching| +|`MAGIC_TOGGLE_NKRO`|Turn NKRO on or off| diff --git a/docs/feature_common_shortcuts.md b/docs/feature_common_shortcuts.md new file mode 100644 index 0000000000..a3dde8b670 --- /dev/null +++ b/docs/feature_common_shortcuts.md @@ -0,0 +1,163 @@ +# Common Keymap Shortcuts + +Your keymap can include shortcuts to common operations, for example shifted keys. This page documents the functions that are available to you. + +People often define custom names using `#define`. For example: + +```c +#define FN_CAPS LT(_FL, KC_CAPSLOCK) +#define ALT_TAB LALT(KC_TAB) +``` + +This will allow you to use `FN_CAPS` and `ALT_TAB` in your `KEYMAP()`, keeping it more readable. + +### Limits of these aliases + +Currently, the keycodes able to used with these functions are limited to the [Basic Keycodes](keycodes_basic.html), meaning you can't use keycodes like `KC_TILD`, or anything greater than 0xFF. For a full list of the keycodes able to be used see [Basic Keycodes](keycodes_basic.html). + +## Switching and toggling layers + +These functions allow you to activate layers in various ways. + +* `MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer. +* `LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped. +* `TG(layer)` - toggles a layer on or off. +* `TO(layer)` - Goes to a layer. This code is special, because it lets you go either up or down the stack -- just goes directly to the layer you want. So while other codes only let you go _up_ the stack (from layer 0 to layer 3, for example), `TO(2)` is going to get you to layer 2, no matter where you activate it from -- even if you're currently on layer 5. This gets activated on keydown (as soon as the key is pressed). +* `TT(layer)` - Layer Tap-Toggle. If you hold the key down, the layer becomes active, and then deactivates when you let go. And if you tap it, the layer simply becomes active (toggles on). It needs 5 taps by default, but you can set it by defining `TAPPING_TOGGLE`, for example, `#define TAPPING_TOGGLE 2` for just two taps. + +## Working With Layers + +Care must be taken when switching layers, it's possible to lock yourself into a layer with no way to deactivate that layer (without unplugging your keyboard.) We've created some guidelines to help users avoid the most common problems. + +### Beginners + +If you are just getting started with QMK you will want to keep everything simple. Follow these guidelines when setting up your layers: + +* Setup layer 0 as your "base" layer. This is your normal typing layer, and could be whatever layout you want (qwerty, dvorak, colemak, etc.) +* Arrange your layers in a "tree" layout, with layer 0 as the root. Do not try to enter the same layer from more than one other layer. +* Never try to stack a higher numbered layer on top of a lower numbered layer. Doing so is tricky and error prone. + +### Intermediate Users + +Sometimes you need more than one base layer. For example, if you want to switch between QWERTY and Dvorak, switch between layouts for different countries, or switch your layout for different videogames. Your base layers should always be the lowest numbered layers. When you have multiple base layers you should always treat them as multually exclusive. When one base layer is on the others are off. + +### Advanced Users + +Once you have a good feel for how layers work and what you can do, you can get more creative. The rules listed in the beginner section will help you be successful by avoiding some of the tricker details but they can be constraining, especially for ultra-compact keyboard users. Understanding how layers work will allow you to use them in more advanced ways. + +Layers stack on top of each other in numerical order. When determining what a keypress does, QMK scans the layers from the top down, stopping when it reaches the first active layer that is not set to `KC_TRNS`. As a result if you activate a layer that is numerically lower than your current layer, and your current layer (or another layer that is active and higher than your target layer) has something other than `KC_TRNS`, that is the key that will be sent, not the key on the layer you just activated. This is the cause of most people's "why doesn't my layer get switched" problem. + +## Modifier keys + +These functions allow you to combine a mod with a keycode. When pressed the keydown for the mod will be sent first, and then *kc* will be sent. When released the keyup for *kc* will be sent and then the mod will be sent. + +* `LSFT(kc)` or `S(kc)` - applies left Shift to *kc* (keycode) +* `RSFT(kc)` - applies right Shift to *kc* +* `LCTL(kc)` - applies left Control to *kc* +* `RCTL(kc)` - applies right Control to *kc* +* `LALT(kc)` - applies left Alt to *kc* +* `RALT(kc)` - applies right Alt to *kc* +* `LGUI(kc)` - applies left GUI (command/win) to *kc* +* `RGUI(kc)` - applies right GUI (command/win) to *kc* +* `HYPR(kc)` - applies Hyper (all modifiers) to *kc* +* `MEH(kc)` - applies Meh (all modifiers except Win/Cmd) to *kc* +* `LCAG(kc)` - applies CtrlAltGui to *kc* + +You can also chain these, like this: + + LALT(LCTL(KC_DEL)) -- this makes a key that sends Alt, Control, and Delete in a single keypress. + +## Shifted Keycodes + +The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols. + +|Name|Description| +|----|-----------| +| KC_TILD | ~ | +| KC_EXLM | ! | +| KC_QUES | ? | +| KC_AT | @ | +| KC_HASH | # | +| KC_DLR | $ | +| KC_PERC | % | +| KC_CIRC | ^ | +| KC_AMPR | & | +| KC_ASTR | * | +| KC_LPRN | ( | +| KC_RPRN | ) | +| KC_UNDS | _ | +| KC_PLUS | + | +| KC_DQUO | " | +| KC_LCBR | { | +| KC_RCBR | } | +| KC_LABK | < | +| KC_RABK | > | +| KC_PIPE | | | +| KC_COLN | : | + +## Mod Tap + +`MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down. + +These are the values you can use for the `mod` in `MT()` and `OSM()`: + + * MOD_LCTL + * MOD_LSFT + * MOD_LALT + * MOD_LGUI + * MOD_RCTL + * MOD_RSFT + * MOD_RALT + * MOD_RGUI + * MOD_HYPR + * MOD_MEH + +These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped. Note however, that you cannot mix right and left side modifiers. + +We've added shortcuts to make common modifier/tap (mod-tap) mappings more compact: + + * `CTL_T(kc)` - is LCTL when held and *kc* when tapped + * `SFT_T(kc)` - is LSFT when held and *kc* when tapped + * `ALT_T(kc)` - is LALT when held and *kc* when tapped + * `ALGR_T(kc)` - is AltGr when held and *kc* when tapped + * `GUI_T(kc)` - is LGUI when held and *kc* when tapped + * `ALL_T(kc)` - is Hyper (all mods) when held and *kc* when tapped. To read more about what you can do with a Hyper key, see [this blog post by Brett Terpstra](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/) + * `LCAG_T(kc)` - is CtrlAltGui when held and *kc* when tapped + * `MEH_T(kc)` - is like Hyper, but not as cool -- does not include the Cmd/Win key, so just sends Alt+Ctrl+Shift. + +## One Shot Keys + +One shot keys are keys that remain active until the next key is pressed, and then are releasd. This allows you to type keyboard combinations without pressing more than one key at a time. + +For example, if you define a key as `OSM(MOD_LSFT)`, you can type a capital A character by first pressing and releasing shift, and then pressing and releasing A. Your computer will see the shift key being held the moment shift is pressed, and it will see the shift key being released immediately after A is released. + +One shot keys also work as normal modifiers. If you hold down a one shot key and type other keys, your one shot will be released immediately after you let go of the key. + +You can control the behavior of one shot keys by defining these in `config.h`: + +```c +#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */ +#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */ +``` + +* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](#mod-tap), not the `KC_*` codes. +* `OSL(layer)` - momentary switch to *layer*. + +## Permissive Hold + +As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option: + +``` +#define PERMISSIVE_HOLD +``` + +This makes it easier for fast typists to use dual-function keys. Without this, if you let go of a held key inside the tapping term, it won't register. + +Example: (Tapping Term = 200ms) + +- SHFT_T(KC_A) Down +- KC_X Down +- KC_X Up +- SHFT_T(KC_A) Up + +With defaults, if above is typed within tapping term, this will emit `ax`. With permissive hold, if above is typed within tapping term, this will emit `X` (so, Shift+X). diff --git a/docs/leader_key.md b/docs/feature_leader_key.md similarity index 100% rename from docs/leader_key.md rename to docs/feature_leader_key.md diff --git a/docs/feature_ps2_mouse.md b/docs/feature_ps2_mouse.md new file mode 100644 index 0000000000..8629b28cff --- /dev/null +++ b/docs/feature_ps2_mouse.md @@ -0,0 +1,238 @@ +## PS/2 Mouse Support + +Its possible to hook up a PS/2 mouse (for example touchpads or trackpoints) to your keyboard as a composite device. + +To hook up a Trackpoint, you need to obtain a Trackpoint module (i.e. harvest from a Thinkpad keyboard), identify the function of each pin of the module, and make the necessary circuitry between controller and Trackpoint module. For more information, please refer to [Trackpoint Hardware](https://deskthority.net/wiki/TrackPoint_Hardware) page on Deskthority Wiki. + +There are three available modes for hooking up PS/2 devices: USART (best), interrupts (better) or busywait (not recommended). + +### Busywait version + +Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible. + +In rules.mk: + +``` +PS2_MOUSE_ENABLE = yes +PS2_USE_BUSYWAIT = yes +``` + +In your keyboard config.h: + +``` +#ifdef PS2_USE_BUSYWAIT +# define PS2_CLOCK_PORT PORTD +# define PS2_CLOCK_PIN PIND +# define PS2_CLOCK_DDR DDRD +# define PS2_CLOCK_BIT 1 +# define PS2_DATA_PORT PORTD +# define PS2_DATA_PIN PIND +# define PS2_DATA_DDR DDRD +# define PS2_DATA_BIT 2 +#endif +``` + +### Interrupt version + +The following example uses D2 for clock and D5 for data. You can use any INT or PCINT pin for clock, and any pin for data. + +In rules.mk: + +``` +PS2_MOUSE_ENABLE = yes +PS2_USE_INT = yes +``` + +In your keyboard config.h: + +``` +#ifdef PS2_USE_INT +#define PS2_CLOCK_PORT PORTD +#define PS2_CLOCK_PIN PIND +#define PS2_CLOCK_DDR DDRD +#define PS2_CLOCK_BIT 2 +#define PS2_DATA_PORT PORTD +#define PS2_DATA_PIN PIND +#define PS2_DATA_DDR DDRD +#define PS2_DATA_BIT 5 + +#define PS2_INT_INIT() do { \ + EICRA |= ((1< + +## RGB Under Glow Mod + +![Planck with RGB Underglow](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg) + +Here is a quick demo on Youtube (with NPKC KC60) (https://www.youtube.com/watch?v=VKrpPAHlisY). + +For this mod, you need an unused pin wiring to DI of WS2812 strip. After wiring the VCC, GND, and DI, you can enable the underglow in your Makefile. + + RGBLIGHT_ENABLE = yes + +In order to use the underglow animation functions, you need to have `#define RGBLIGHT_ANIMATIONS` in your `config.h`. + +Please add the following options into your config.h, and set them up according your hardware configuration. These settings are for the `F4` pin by default: + + #define RGB_DI_PIN F4 // The pin your RGB strip is wired to + #define RGBLIGHT_ANIMATIONS // Require for fancier stuff (not compatible with audio) + #define RGBLED_NUM 14 // Number of LEDs + #define RGBLIGHT_HUE_STEP 10 + #define RGBLIGHT_SAT_STEP 17 + #define RGBLIGHT_VAL_STEP 17 + +You'll need to edit `RGB_DI_PIN` to the pin you have your `DI` on your RGB strip wired to. + +The firmware supports 5 different light effects, and the color (hue, saturation, brightness) can be customized in most effects. To control the underglow, you need to modify your keymap file to assign those functions to some keys/key combinations. For details, please check this keymap. `keyboards/planck/keymaps/yang/keymap.c` + +### WS2812 Wiring + +![WS2812 Wiring](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/WS2812-wiring.jpg) + +Please note the USB port can only supply a limited amount of power to the keyboard (500mA by standard, however, modern computer and most usb hubs can provide 700+mA.). According to the data of NeoPixel from Adafruit, 30 WS2812 LEDs require a 5V 1A power supply, LEDs used in this mod should not more than 20. + +## RGB Lighting Keycodes + +This controls the RGB Lighting functionality. Most keyboards use WS2812 (and compatible) LEDs for underlight or case lighting. + +|Name|Description| +|----|-----------| +|`RGB_TOG`|toggle on/off| +|`RGB_MOD`|cycle through modes| +|`RGB_HUI`|hue increase| +|`RGB_HUD`|hue decrease| +|`RGB_SAI`|saturation increase| +|`RGB_SAD`|saturation decrease| +|`RGB_VAI`|value increase| +|`RGB_VAD`|value decrease| diff --git a/docs/feature_thermal_printer.md b/docs/feature_thermal_printer.md new file mode 100644 index 0000000000..0c5d15116a --- /dev/null +++ b/docs/feature_thermal_printer.md @@ -0,0 +1,10 @@ +# Thermal Printer + + + +## Thermal Printer Keycodes + +|Name|Description| +|----|-----------| +|`PRINT_ON`|Start printing everything the user types| +|`PRINT_OFF`|Stop printing everything the user types| diff --git a/docs/home.md b/docs/features.md similarity index 70% rename from docs/home.md rename to docs/features.md index df27ebdc5e..c5965f4c0e 100644 --- a/docs/home.md +++ b/docs/features.md @@ -1,19 +1,5 @@ -# Quantum Mechanical Keyboard Firmware +# QMK Features -You have found the QMK Firmware documentation site. This is a keyboard firmware based on the [tmk\_keyboard firmware](http://github.com/tmk/tmk_keyboard) \([view differences](differences_from_tmk.md)\) with some useful features for Atmel AVR controllers, and more specifically, the [OLKB product line](http://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). It has also been ported to ARM chips using ChibiOS. You can use it to power your own hand-wired or custom keyboard PCB. - -# Getting started - -Before you are able to compile, you'll need to install an environment for AVR or ARM development. You'll find the instructions for any OS below. If you find another/better way to set things up from scratch, please consider [making a pull request](https://github.com/qmk/qmk_firmware/pulls) with your changes! - -* [Build Environment Setup](build_environment_setup.md) -* [QMK Overview](qmk_overview.md) - -# Configuring QMK Firmware - -The QMK Firmware can be configured via the `keymaps` array data. For simply generating a [basic keycode](keycodes.md), you add it as an element of your `keymaps` array data. For more complicated actions, there are more advanced keycodes that are organized carefully to represent common operations, some of which can be found on the [Key Functions](key_functions.md) page. - -For more details of the `keymaps` array, see [Keymap Overview](keymap.md) page. ## Space Cadet Shift: The future, built in @@ -21,7 +7,7 @@ Steve Losh [described](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) ## The Leader key: A new kind of modifier -Most modifiers have to be held or toggled. But what if you had a key that indicated the start of a sequence? You could press that key and then rapidly press 1-3 more keys to trigger a macro, or enter a special layer, or anything else you might want to do. To learn more about it check out the [Leader Key](leader_key.md) page. +Most modifiers have to be held or toggled. But what if you had a key that indicated the start of a sequence? You could press that key and then rapidly press 1-3 more keys to trigger a macro, or enter a special layer, or anything else you might want to do. To learn more about it check out the [Leader Key](feature_leader_key.md) page. ## Tap Dance: A single key can do 3, 5, or 100 different things @@ -117,18 +103,3 @@ case MACRO_RAISED: } break; ``` - -## Other firmware shortcut keycodes - -* `RESET` - puts the MCU in DFU mode for flashing new firmware \(with `make dfu`\) -* `DEBUG` - the firmware into debug mode - you'll need hid\_listen to see things -* `BL_ON` - turns the backlight on -* `BL_OFF` - turns the backlight off -* `BL_` - sets the backlight to level _n_ -* `BL_INC` - increments the backlight level by one -* `BL_DEC` - decrements the backlight level by one -* `BL_TOGG` - toggles the backlight -* `BL_STEP` - steps through the backlight levels - -Enable the backlight from the Makefile. - diff --git a/docs/build_environment_setup.md b/docs/getting_started_build_tools.md similarity index 80% rename from docs/build_environment_setup.md rename to docs/getting_started_build_tools.md index 442038a58d..e46b7f2e53 100644 --- a/docs/build_environment_setup.md +++ b/docs/getting_started_build_tools.md @@ -1,65 +1,10 @@ -### Windows 10 +# Installing Build Tools -#### Creators Update -If you have Windows 10 with Creators Update or later, you can build and flash the firmware directly. Before the Creators Update, only building was possible. If you don't have it yet or if are unsure, follow [these instructions](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update). +This page describes setting up the build environment for QMK. These instructions cover AVR processors (such as the atmega32u4.) -#### Windows Subsystem for Linux -In addition to the Creators Update, you need Windows 10 Subystem for Linux, so install it following [these instructions](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/). If you already have the Windows 10 Subsystem for Linux from the Anniversary update it's recommended that you [upgrade](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/) it to 16.04LTS, because some keyboards don't compile with the toolchains included in 14.04LTS. Note that you need to know what your are doing if you chose the `sudo do-release-upgrade` method. + -#### Git -If you already have cloned the repository on your Windows file system you can ignore this section. - -You will need to clone the repository to your Windows file system using the normal Git for Windows and **not** the WSL Git. So if you haven't installed Git before, [download](https://git-scm.com/download/win) and install it. Then [set it up](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), it's important that you setup the e-mail and user name, especially if you are planning to contribute. - -Once Git is installed, open the Git bash command and change the directory to where you want to clone QMK, note that you have to use forward slashes, and that your c drive is accessed like this `/c/path/to/where/you/want/to/go`. Then run `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`, this will create a new folder `qmk_firmware` as a subfolder of the current one. - -#### Toolchain setup -The Toolchain setup is done through the Windows Subsystem for Linux, and the process is fully automated. If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information. - -1. Open "Bash On Ubuntu On Windows" from the start menu. -2. Go to the directory where you cloned `qmk_firmware`. Note that the paths start with `/mnt/` in the WSL, so you have to write for example `cd /mnt/c/path/to/qmk_firmware`. -3. Run `util/wsl_install.sh` and follow the on-screen instructions. -4. Close the Bash command window, and re-open it. -5. You are ready to compile and flash the firmware! - -#### Some important things to keep in mind -* You can run `util/wsl_install.sh` again to get all the newest updates. -* Your QMK repository need to be on a Windows file system path, since WSL can't run executables outside it. -* The WSL Git is **not** compatible with the Windows Git, so use the Windows Git Bash or a windows Git GUI for all Git operations -* You can edit files either inside WSL or normally using Windows, but note that if you edit makefiles or shell scripts, make sure you are using an editor that saves the files with Unix line endings. Otherwise the compilation might not work. - -### Windows (Vista and later) -1. If you have ever installed WinAVR, uninstall it. -2. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**. -3. If you are going to flash Infinity based keyboards you will need to install dfu-util, refer to the instructions by [Input Club](https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware). -4. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location. -5. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/qmk/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. -6. Open the `\util` folder. -7. Double-click on the `1-setup-path-win` batch script to run it. You'll need to accept a User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up. -8. Right-click on the `2-setup-environment-win` batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete! - -If you have trouble and want to ask for help, it is useful to generate a *Win_Check_Output.txt* file by running `Win_Check.bat` in the `\util` folder. - -### Mac -If you're using [homebrew,](http://brew.sh/) you can use the following commands: - - brew tap osx-cross/avr - brew install avr-libc - brew install dfu-programmer - -This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of avr-libc can take over 20 minutes and exhibit high CPU usage. - -You can also try these instructions: - -1. Install Xcode from the App Store. -2. Install the Command Line Tools from `Xcode->Preferences->Downloads`. -3. Install [DFU-Programmer](https://dfu-programmer.github.io/). - -If you are going to flash Infinity based keyboards you will also need dfu-util - - brew install dfu-util - -### Linux +## Linux To ensure you are always up to date, you can just run `sudo util/install_dependencies.sh`. That should always install all the dependencies needed. **This will run `apt-get upgrade`.** @@ -91,7 +36,72 @@ Debian/Ubuntu example: sudo apt-get update sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi -### Docker +# Mac +If you're using [homebrew,](http://brew.sh/) you can use the following commands: + + brew tap osx-cross/avr + brew install avr-libc + brew install dfu-programmer + +This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of avr-libc can take over 20 minutes and exhibit high CPU usage. + +## Windows with msys2 (recommended) + +The best environment to use, for Windows Vista through any later version (tested on 7 and 10,) is [msys2](http://www.msys2.org). + +* Install msys2 by downloading and following the instructions here: http://www.msys2.org +* Open the "MSYS2 MingGW 64-bit" shortcut +* Navigate to your qmk checkout. For example, if it's in the root of your c drive: + * `$ cd /c/qmk_firmware` +* Run `util/msys2_install.sh` and follow the prompts + +## Windows 10 (deprecated) +These are the old instructions for Windows 10. We recommend you use [MSYS2 as outlined above](#windows-with-msys2-recommended). + +### Creators Update +If you have Windows 10 with Creators Update or later, you can build and flash the firmware directly. Before the Creators Update, only building was possible. If you don't have it yet or if are unsure, follow [these instructions](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update). + +### Windows Subsystem for Linux +In addition to the Creators Update, you need Windows 10 Subystem for Linux, so install it following [these instructions](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/). If you already have the Windows 10 Subsystem for Linux from the Anniversary update it's recommended that you [upgrade](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/) it to 16.04LTS, because some keyboards don't compile with the toolchains included in 14.04LTS. Note that you need to know what your are doing if you chose the `sudo do-release-upgrade` method. + +### Git +If you already have cloned the repository on your Windows file system you can ignore this section. + +You will need to clone the repository to your Windows file system using the normal Git for Windows and **not** the WSL Git. So if you haven't installed Git before, [download](https://git-scm.com/download/win) and install it. Then [set it up](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), it's important that you setup the e-mail and user name, especially if you are planning to contribute. + +Once Git is installed, open the Git bash command and change the directory to where you want to clone QMK, note that you have to use forward slashes, and that your c drive is accessed like this `/c/path/to/where/you/want/to/go`. Then run `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`, this will create a new folder `qmk_firmware` as a subfolder of the current one. + +### Toolchain setup +The Toolchain setup is done through the Windows Subsystem for Linux, and the process is fully automated. If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information. + +1. Open "Bash On Ubuntu On Windows" from the start menu. +2. Go to the directory where you cloned `qmk_firmware`. Note that the paths start with `/mnt/` in the WSL, so you have to write for example `cd /mnt/c/path/to/qmk_firmware`. +3. Run `util/wsl_install.sh` and follow the on-screen instructions. +4. Close the Bash command window, and re-open it. +5. You are ready to compile and flash the firmware! + +### Some important things to keep in mind +* You can run `util/wsl_install.sh` again to get all the newest updates. +* Your QMK repository need to be on a Windows file system path, since WSL can't run executables outside it. +* The WSL Git is **not** compatible with the Windows Git, so use the Windows Git Bash or a windows Git GUI for all Git operations +* You can edit files either inside WSL or normally using Windows, but note that if you edit makefiles or shell scripts, make sure you are using an editor that saves the files with Unix line endings. Otherwise the compilation might not work. + +## Windows (Vista and later) (Deprecated) + +These are the old instructions for Windows Vista and later. We recommend you use [MSYS2 as outlined above](#windows-with-msys2-recommended). + +1. If you have ever installed WinAVR, uninstall it. +2. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**. +3. If you are going to flash Infinity based keyboards you will need to install dfu-util, refer to the instructions by [Input Club](https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware). +4. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location. +5. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/qmk/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. +6. Open the `\util` folder. +7. Double-click on the `1-setup-path-win` batch script to run it. You'll need to accept a User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up. +8. Right-click on the `2-setup-environment-win` batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete! + +If you have trouble and want to ask for help, it is useful to generate a *Win_Check_Output.txt* file by running `Win_Check.bat` in the `\util` folder. + +## Docker If this is a bit complex for you, Docker might be the turn-key solution you need. After installing [Docker](https://www.docker.com/products/docker), run the following command at the root of the QMK folder to build a keyboard/keymap: @@ -109,11 +119,5 @@ docker run -e keymap=default -e subproject=ez -e keyboard=ergobox --rm -v D:/Use This will compile the targeted keyboard/keymap and leave it in your QMK directory for you to flash. -### Vagrant +## Vagrant If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [vagrant guide](vagrant_guide.md). - -## Verify Your Installation -1. If you haven't already, obtain this repository ([https://github.com/qmk/qmk_firmware](https://github.com/qmk/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application. -2. Open up a terminal or command prompt and navigate to the `qmk_firmware` folder using the `cd` command. The command prompt will typically open to your home directory. If, for example, you cloned the repository to your Documents folder, then you would type `cd Documents/qmk_firmware`. If you extracted the file from a zip, then it may be named `qmk_firmware-master` instead. -3. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `readme.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboards/`. For example, if you're building for a Planck, run `cd keyboards/planck`. -4. Once you're in the correct keyboard-specific folder, run the `make` command. This should output a lot of information about the build process. More information about the `make` command can be found below. diff --git a/docs/getting_started_github.md b/docs/getting_started_github.md new file mode 100644 index 0000000000..387ddd91e2 --- /dev/null +++ b/docs/getting_started_github.md @@ -0,0 +1,63 @@ +# How to use Github with QMK + +Github can be a little tricky to those that aren't familiar with it - this guide will walk through each step of forking, cloning, and submitting a pull request with QMK. + +{% hint style='info' %} +This guide assumes you're somewhat comfortable with running things at the command line, and have git installed on your system. +{% endhint %} + +Start on the [QMK Github page](https://github.com/qmk/qmk_firmware), and you'll see a button in the upper right that says "Fork": + +![Fork on Github](http://i.imgur.com/8Toomz4.jpg) + +If you're apart of an organization, you'll need to choose which account to fork it to. In most circumstances, you'll want to fork it to your personal account. Once your fork is completed (sometimes this takes a little while), click the "Clone or Download" button: + +![Download from Github](http://i.imgur.com/N1NYcSz.jpg) + +And be sure to select "HTTPS", and select the link and copy it: + +![HTTPS link](http://i.imgur.com/eGO0ohO.jpg) + +From here, enter `git clone ` into the command line, and then paste your link: + +``` +**[terminal] +**[prompt you@computer]**[path ~]**[delimiter $ ]**[command git clone https://github.com/whoeveryouare/qmk_firmware.git] +Cloning into 'qmk_firmware'... +remote: Counting objects: 46625, done. +remote: Compressing objects: 100% (2/2), done. +remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 +Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. +Resolving deltas: 100% (29362/29362), done. +Checking out files: 100% (2799/2799), done. +``` + +You now have your QMK fork on your local machine, and you can add your keymap, compile it and flash it to your board. Once you're happy with your changes, you can add, commit, and push them to your fork like this: + +``` +**[terminal] +**[prompt you@computer]**[path ~/qmk_firmware]**[delimiter $ ]**[command git add .] +**[prompt you@computer]**[path ~/qmk_firmware]**[delimiter $ ]**[command git commit -m "adding my keymap"] +[master cccb1608] adding my keymap + 1 file changed, 1 insertion(+) + create mode 100644 keyboards/planck/keymaps/mine/keymap.c +**[prompt you@computer]**[path ~/qmk_firmware]**[delimiter $ ]**[command git push] +Counting objects: 1, done. +Delta compression using up to 4 threads. +Compressing objects: 100% (1/1), done. +Writing objects: 100% (1/1), 1.64 KiB | 0 bytes/s, done. +Total 1 (delta 1), reused 0 (delta 0) +remote: Resolving deltas: 100% (1/1), completed with 1 local objects. +To https://github.com/whoeveryouare/qmk_firmware.git + + 20043e64...7da94ac5 master -> master +``` + +Your changes now exist on your fork on Github - if you go back there (https://github.com//qmk_firmware), you can create a "New Pull Request" by clicking this button: + +![New Pull Request](http://i.imgur.com/DxMHpJ8.jpg) + +Here you'll be able to see exactly what you've committed - if it all looks good, you can finalize it by clicking "Create Pull Request": + +![Create Pull Request](http://i.imgur.com/Ojydlaj.jpg) + +After submitting, we may talk to you about your changes, ask that you make changes, and eventually accept it! Thanks for contributing to QMK :) \ No newline at end of file diff --git a/docs/getting_started_instroduction.md b/docs/getting_started_instroduction.md new file mode 100644 index 0000000000..3cd27504d3 --- /dev/null +++ b/docs/getting_started_instroduction.md @@ -0,0 +1,47 @@ +# Introduction + +This page attempts to explain the basic information you need to know to work with the QMK project. It assumes that you are familiar with navigating a UNIX shell, but does not assume you are familiar with C or with compiling using make. + +## Basic QMK structure + +QMK is a fork of @tmk's [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders. + +### Keyboard project structure + +Within the `handwired` and `keyboard` folders is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within you'll find the following structure: + +* `keymaps/`: Different keymaps that can be built +* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`. +* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`. + +### Keymap structure + +In every keymap folder, the following files may be found. Only `keymap.c` is required, if the rest of the files are not found the default options will be chosen. + +* `config.h`: the options to configure your keymap +* `keymap.c`: all of your keymap code, required +* `rules.mk`: the features of QMK that are enabled +* `readme.md`: a description of your keymap, how others might use it, and explanations of features. Please upload images to a service like imgur. + +# The `config.h` file + +There are 2 `config.h` locations: + +* keyboard (`/keyboards//config.h`) +* keymap (`/keyboards//keymaps//config.h`) + +If the keymap `config.h` exists that file is included by the build system and the keyboard `config.h` is not included. If you wish to override settings in your keymap's `config.h` you will need to include some glue code: + +``` +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" +``` + +If you want to override a setting from the parent `config.h` file, you need to `#undef` and then `#define` the setting again, like this: + +```c +#undef MY_SETTING +#define MY_SETTING 4 +``` diff --git a/docs/make_instructions.md b/docs/getting_started_make_guide.md similarity index 96% rename from docs/make_instructions.md rename to docs/getting_started_make_guide.md index 6f88f91069..fac801082f 100644 --- a/docs/make_instructions.md +++ b/docs/getting_started_make_guide.md @@ -21,7 +21,7 @@ As mentioned above, there are some shortcuts, when you are in a: * `keyboard` folder, the command will automatically fill the `` part. So you only need to type `--` * `subproject` folder, it will fill in both `` and `` * `keymap` folder, then `` and `` will be filled in. If you need to specify the `` use the following syntax `-` - * Note in order to support this shortcut, the keymap needs its own Makefile (see the example [here](https://github.com/qmk/qmk_firmware/blob/master/doc/keymap_makefile_example.mk)) + * Note in order to support this shortcut, the keymap needs its own Makefile * `keymap` folder of a `subproject`, then everything except the `` will be filled in The `` means the following @@ -48,7 +48,7 @@ Here are some examples commands * `make ergodox-infinity-algernon-clean` will clean the build output of the Ergodox Infinity keyboard. This example uses the full syntax and can be run from any folder with a `Makefile` * `make dfu COLOR=false` from within a keymap folder, builds and uploads the keymap, but without color output. -## The `Makefile` +# The `Makefile` There are 5 different `make` and `Makefile` locations: @@ -62,7 +62,7 @@ The root contains the code used to automatically figure out which keymap or keym For keyboards and subprojects, the make files are split in two parts `Makefile` and `rules.mk`. All settings can be found in the `rules.mk` file, while the `Makefile` is just there for support and including the root `Makefile`. Keymaps contain just one `Makefile` for simplicity. -### Makefile options +## Makefile options Set these variables to `no` to disable them, and `yes` to enable them. @@ -142,7 +142,7 @@ This allows you to interface with a Bluefruit EZ-key to send keycodes wirelessly `AUDIO_ENABLE` -This allows you output audio on the C6 pin (needs abstracting). See the [audio section](#audio-output-from-a-speaker) for more information. +This allows you output audio on the C6 pin (needs abstracting). See the [audio page](feature_audio.md) for more information. `FAUXCLICKY_ENABLE` @@ -150,7 +150,7 @@ Uses buzzer to emulate clicky switches. A cheap imitation of the Cherry blue swi `VARIABLE_TRACE` -Use this to debug changes to variable values, see the [tracing variables](#tracing-variables) section for more information. +Use this to debug changes to variable values, see the [tracing variables](unit_testing.md#tracing-variables) section of the Unit Testing page for more information. `API_SYSEX_ENABLE` @@ -158,7 +158,11 @@ This enables using the Quantum SYSEX API to send strings (somewhere?) This consumes about 5390 bytes. -### Customizing Makefile options on a per-keymap basis +`KEY_LOCK_ENABLE` + +This enables [key lock](key_lock.md). This consumes an additional 260 bytes. + +## Customizing Makefile options on a per-keymap basis If your keymap directory has a file called `Makefile` (note the filename), any Makefile options you set in that file will take precedence over other Makefile options for your particular keyboard. diff --git a/docs/vagrant_guide.md b/docs/getting_started_vagrant.md similarity index 83% rename from docs/vagrant_guide.md rename to docs/getting_started_vagrant.md index 61cd0815bf..e6551cb25b 100644 --- a/docs/vagrant_guide.md +++ b/docs/getting_started_vagrant.md @@ -1,4 +1,4 @@ -# Quick Start Directions +# Vagrant Quick Start This project includes a Vagrantfile that will allow you to build a new firmware for your keyboard very easily without major changes to your primary operating system. This also ensures that when you clone the project and perform a build, you have the exact same environment as anyone else using the Vagrantfile to build. This makes it much easier for people to help you troubleshoot any issues you encounter. @@ -8,20 +8,14 @@ Using the `/Vagrantfile` in this repository requires you have [Vagrant](http://w *COMPATIBILITY NOTICE* Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12. **Alternately, you can try running the following command:** `vagrant plugin install vagrant-vbguest` - Other than having Vagrant and Virtualbox installed and possibly a restart of your computer afterwards, you can simple run a 'vagrant up' anywhere inside the folder where you checked out this project and it will start a Linux virtual machine that contains all the tools required to build this project. There is a post Vagrant startup hint that will get you off on the right foot, otherwise you can also reference the build documentation below. -Build Firmware and Program Controller -------------------------------------- -See [build_guide.md](build_guide.md), or the readme in the particular keyboards/* folder. +# Flashing the firmware -Change your keymap ------------------- -See [keymap.md](keymap.md). +The "easy" way to flash the firmware is using a tool from your host OS: -## Flashing the firmware - -The "easy" way to flash the firmware is using a tool from your host OS like the Teensy programming app. [ErgoDox EZ](/keyboards/ergodox/readme.md) gives a great example. +* [QMK Flasher](https://github.com/qmk/qmk_flasher) +* [Teensy Loader](https://www.pjrc.com/teensy/loader.html) +* [Atmel FLIP](http://www.atmel.com/tools/flip.aspx) If you want to program via the command line you can uncomment the ['modifyvm'] lines in the Vagrantfile to enable the USB passthrough into Linux and then program using the command line tools like dfu-util/dfu-programmer or you can install the Teensy CLI version. - diff --git a/docs/git_subtree.md b/docs/git_subtree.md deleted file mode 100644 index 4fd7f8beaa..0000000000 --- a/docs/git_subtree.md +++ /dev/null @@ -1,7 +0,0 @@ -## Update core branch procedure - git co master - git subtree split -P tmk_core -b - git co core - git merge - git co master - git subtree merge -P tmk_core --squash diff --git a/docs/gitbook/images/favicon.ico b/docs/gitbook/images/favicon.ico index bd9e65bce2..2b4e04abaf 100644 Binary files a/docs/gitbook/images/favicon.ico and b/docs/gitbook/images/favicon.ico differ diff --git a/docs/gitbook/images/favicon.png b/docs/gitbook/images/favicon.png index 0f3343db0d..509cebd879 100644 Binary files a/docs/gitbook/images/favicon.png and b/docs/gitbook/images/favicon.png differ diff --git a/docs/glossary.md b/docs/glossary.md new file mode 100644 index 0000000000..e1103ec94a --- /dev/null +++ b/docs/glossary.md @@ -0,0 +1,170 @@ +# Glossary of QMK terms + +## ARM +A line of 32-bit MCU's produced by a number of companies, such as Atmel, Cypress, Kinetis, NXP, ST, and TI. + +## AVR +A line of 8-bit MCU's produced by [Atmel](http://atmel.com). AVR was the original platform that TMK supported. + +## AZERTY +The standard Français (French) keyboard layout. Named for the first 6 keys on the keyboard. + +## Backlight +A generic term for lighting on a keyboard. The backlight is typically, but not always, an array of LED's that shine through keycaps and/or switches. + +## Bluetooth +A short range peer to peer wireless protocol. Most common wireless protocol for a keyboard. + +## Bootloader +A special program that is written to a protected area of your MCU that allows the MCU to upgrade its own firmware, typically over USB. + +## Bootmagic +A feature that allows for various keyboard behavior changes to happen on the fly, such as swapping or disabling common keys. + +## C +A low-level programming language suitable for system code. Most QMK code is written in C. + +## Colemak +An alternative keyboard layout that is gaining in popularity. + +## Compile +The process of turning human readable code into machine code your MCU can run. + +## Dvorak +An alternative keyboard layout developed by Dr. August Dvorak in the 1930's. A shortened form of the Dvorak Simplified Keyboard. + +## Dynamic Macro +A macro which has been recorded on the keyboard and which will be lost when the keyboard is unplugged or the computer rebooted. + +* [Dynamic Macro Documentation](dynamic_macros.html) + +## Eclipse +An IDE that is popular with many C developers. + +* [Eclipse Setup Instructions](eclipse.html) + +## Firmware +The software that controls your MCU. + +## FLIP +Software provided by Atmel for flashing AVR devices. We generally recommend [QMK Flasher](https://github.com/qmk/qmk_flasher) instead, but for some advanced use cases FLIP is required. + +## git +Versioning software used at the commandline + +## GitHub +The website that hosts most of the QMK project. It provides integration with git, issue tracking, and other features that help us run QMK. + +## ISP +In-system programming, a method of programming an AVR chip using external hardware and the JTAG pins. + +## hid_listen +An interface for receiving debugging messages from your keyboard. You can view these messages using [QMK Flasher](https://github.com/qmk/qmk_flasher) or [PJRC's hid_listen](https://www.pjrc.com/teensy/hid_listen.html) + +## Keycode +A 2-byte number that represents a particular key. `0x00`-`0xFF` are used for [Basic Keycodes](keycodes_basic.html) while `0x100`-`0xFFFF` are used for [Quantum Keycodes](quantum_keycodes.html). + +## Key Down +An event that happens when a key is pressed down, but is completed before a key is released. + +## Key Up +An event that happens when a key is released. + +## Keymap +An array of keycodes mapped to a physical keyboard layout, which are processed on key presses and releases + +## Layer +An abstraction used to allow a key to serve multiple purposes. The highest active layer takes precedence. + +## Leader Key +A feature that allows you to tap the leader key followed by a sequence of 1, 2, or 3 keys to activate key presses or other quantum features. + +* [Leader Key Documentation](feature_leader_key.html) + +## LED +Light Emitting Diode, the most common device used for indicators on a keyboard. + +## Make +Software package that is used to compile all the source files. You run `make` with various options to compile your keyboard firmware. + +## Matrix +A wiring pattern of columns and rows that enables the MCU to detect keypresses with a fewer number of pins. The matrix often incorporates diodes to allow for NKRO. + +## Macro +A feature that lets you send muiltple keypress events (hid reports) after having pressed only a single key. + +* [Macro Documentation](macros.html) + +## MCU +Microcontrol Unit, the processor that powers your keyboard. + +## Modifier +A key that is held down while typing another key to modify the action of that key. Examples include Ctrl, Alt, and Shift. + +## Mousekeys +A feature that lets you control your mouse cursor and click from your keyboard. + +* [Mousekeys Documentation](mouse_keys.html) + +## N-Key Rollover (NKRO) +A term that applies to keyboards that are capable of reporting any number of key-presses at once. + +## Oneshot Modifier +A modifier that acts as if it is held down until another key is released, so you can press the mod and then press the key, rather than holding the mod while pressing the key. + +## ProMicro +A low cost AVR development board. Clones of this device are often found on ebay very inexpensively (under $5) but people often struggle with flashing their pro micros. + +## Pull Request +A request to submit code to QMK. We encourage all users to submit Pull Requests for their personal keymaps. + +## QWERTY +The standard English keyboard layout, and often a shortcut for other language's standard layouts. Named for the first 6 letters on the keyboard. + +## QWERTZ +The standard Deutsche (German) keyboard layout. Named for the first 6 letters on the keyboard. + +## Rollover +The term for pressing a key while a key is already held down. Variants include 2KRO, 6KRO, and NKRO. + +## Scancode +A 1 byte number that is sent as part of a HID report over USB that represents a single key. These numbers are documented in the [HID Usage Tables](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) published by the [USB-IF](http://www.usb.org/). + +## Space Cadet Shift +A special set of shift keys which allow you to type various types of braces by tapping the left or right shift one or more times. + +* [Space Cadet Shift Documentation](space_cadet_shift.html) + +## Tap +Pressing and releasing a key. In some situations you will need to distinguish between a key down and a key up event, and Tap always refers to both at once. + +## Tap Dance +A feature that lets you assign muiltple keycodes to the same key based on how many times you press it. + +* [Tap Dance Documentation](tap_dance.md) + +## Teensy +A low-cost AVR development board that is commonly used for hand-wired builds. A teensy is often chosen despite costing a few dollors more due to its halfkay bootloader, which makes flashing very simple. + +## Underlight +A generic term for LEDs that light the underside of the board. These LED's typically shine away from the bottom of the PCB and towards the surface the keyboard rests on. + +## Unicode +In the larger computer world Unicode is a set of encoding schemes for representing characters in any language. As it relates to QMK it means using various OS schemes to send unicode codepoints instead of scancodes. + +* [Unicode Documentation](unicode.md) + +## Unit Testing +A framework for running automated tests against QMK. Unit testing helps us be confident that our changes do not break anything. + +* [Unit Testing Documentation](unit_testing.md) + +## USB +Universal Serial Bus, the most common wired interface for a keyboard. + +## USB Host (or simply Host) +The USB Host is your computer, or whatever device your keyboard is plugged into. + +# Couldn't find the term you're looking for? + +[Open an issue](https://github.com/qmk/qmk_firmware/issues) with your question and the term in question could be added here. Better still, open a pull request with the definition. :) diff --git a/docs/hand_wire.md b/docs/hand_wire.md index 0d33728156..263cd59948 100644 --- a/docs/hand_wire.md +++ b/docs/hand_wire.md @@ -100,9 +100,9 @@ Things act as they should! Which will get us the following data: The firmware can then use this correct data to detect what it should do, and eventually, what signals it needs to send to the OS. -## The actual hand-wiring +# The actual hand-wiring -### Getting things in place +## Getting things in place When starting this, you should have all of your stabilisers and keyswitches already installed (and optionally keycaps). If you're using a Cherry-type stabiliser (plate-mounted only, obviously), you'll need to install that before your keyswitches. If you're using Costar ones, you can installed them afterwards. @@ -112,27 +112,31 @@ Get your soldering iron heated-up and collect the rest of the materials from the Before continuing, plan out where you're going to place your Teensy. If you're working with a board that has a large (6.25u) spacebar, it may be a good idea to place it in-between switches against the plate. Otherwise, you may want to trim some of the leads on the keyswitches where you plan on putting it - this will make it a little harder to solder the wire/diodes, but give you more room to place the Teensy. -### Preparing the diodes +## Preparing the diodes It's a little easier to solder the diodes in place if you bend them at a 90º angle immediately after the black line - this will help to make sure you put them on the right way (direction matters), and in the correct position. The diodes will look like this when bent (with longer leads): +``` ┌─────┬─┠───┤ │ ├─┠└─────┴─┘ │ │ +``` We'll be using the long lead at the bent end to connect it to the elbow (bent part) of the next diode, creating the row. -### Soldering the diodes +## Soldering the diodes Starting at the top-left switch, place the diode (with tweezers if you have them) on the switch so that the diode itself is vertically aligned, and the black line is facing toward you. The straight end of the diode should be touching the left contact on the switch, and the bent end should be facing to the right and resting on the switch there, like this: +``` │o ┌┴┠o │ │ O ├─┤ └┬┘ └───────────── +``` Letting the diode rest, grab your solder, and touch both it and the soldering iron to the left contact at the same time - the rosin in the solder should make it easy for the solder to flow over both the diode and the keyswitch contact. The diode may move a little, and if it does, carefully position it back it place by grabbing the bent end of the diode - the other end will become hot very quickly. If you find that it's moving too much, using needle-nose pliers of some sort may help to keep the diode still when soldering. @@ -142,18 +146,20 @@ After soldering things in place, it may be helpful to blow on the joint to push When the first diode is complete, the next one will need to be soldered to both the keyswitch, and the previous diode at the new elbow. That will look something like this: +``` │o │o ┌┴┠o ┌┴┠o │ │ O │ │ O ├─┤ ├─┤ └┬┘ └┬┘ └────────────────┴───────────── +``` After completing a row, use the wire cutters to trim the excess wire from the tops of the diodes, and from the right side on the final switch. This process will need to completed for each row you have. When all of the diodes are completely soldered, it's a good idea to quickly inspect each one to ensure that your solder joints are solid and sturdy - repairing things after this is possible, but more difficult. -### Soldering the columns +## Soldering the columns You'll have some options in the next process - it's a good idea to insulate the column wires (since the diodes aren't), but if you're careful enough, you can use exposed wires for the columns - it's not recommended, though. If you're using single-cored wire, stripping the plastic off of the whole wire and feeding it back on is probably the best option, but can be difficult depending on the size and materials. You'll want to leave parts of the wire exposed where you're going to be solder it onto the keyswitch. @@ -163,7 +169,7 @@ Before beginning to solder, it helps to have your wire pre-bent (if using single If you're not using any insulation, you can try to keep the column wires elevated, and solder them near the tips of the keyswitch contacts - if the wires are sturdy enough, they won't short out to the row wiring an diodes. -### Wiring things to the Teensy +## Wiring things to the Teensy Now that the matrix itself is complete, it's time to connect what you've done to the Teensy. You'll be needing the number of pins equal to your number of columns + your number of rows. There are some pins on the Teensy that are special, like D6 (the LED on the chip), or some of the UART, SPI, I2C, or PWM channels, but only avoid those if you're planning something in addition to a keyboard. If you're unsure about wanting to add something later, you should have enough pins in total to avoid a couple. @@ -179,48 +185,55 @@ When you're done with the columns, start with the rows in the same process, from As you move along, be sure that the Teensy is staying in place - recutting and soldering the wires is a pain! -### Getting some basic firmware set-up +# Getting some basic firmware set-up -From here, you should have a working keyboard with the correct firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch. +From here, you should have a working keyboard once you program a firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch. To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/). The first thing we're going to do is create a new project using the script in the root directory of the firmware. In your terminal, run this command with `` replaced by the name of your project - it'll need to be different from any other project in the `keyboards/` folder: +``` util/new_project.sh +``` You'll want to navigate to the `keyboards//` folder by typing, like the print-out from the script specifies: cd keyboards/ -#### config.h +### config.h The first thing you're going to want to modify is the `config.h` file. Find `MATRIX_ROWS` and `MATRIX_COLS` and change their definitions to match the dimensions of your keyboard's matrix. Farther down are `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`. Change their definitions to match how you wired up your matrix (looking from the top of the keyboard, the rows run top-to-bottom and the columns run left-to-right). Likewise, change the definition of `UNUSED_PINS` to match the pins you did not use (this will save power). -#### \.h +### \.h The next file you'll want to look at is `.h`. You're going to want to rewrite the `KEYMAP` definition - the format and syntax here is extremely important, so pay attention to how things are setup. The first half of the definition are considered the arguments - this is the format that you'll be following in your keymap later on, so you'll want to have as many k*xy* variables here as you do keys. The second half is the part that the firmware actually looks at, and will contain gaps depending on how you wired your matrix. We'll dive into how this will work with the following example. Say we have a keyboard like this: +``` ┌───┬───┬───┠│ │ │ │ ├───┴─┬─┴───┤ │ │ │ └─────┴─────┘ +``` This can be described by saying the top row is 3 1u keys, and the bottom row is 2 1.5u keys. The difference between the two rows is important, because the bottom row has an unused column spot (3 v 2). Let's say that this is how we wired the columns: +``` ┌───┬───┬───┠│ ┋ │ ┋ │ ┋ │ ├─┋─┴─┬─┴─┋─┤ │ ┋ │ ┋ │ └─────┴─────┘ +``` The middle column is unused on the bottom row in this example. Our `KEYMAP` definition would look like this: +``` #define KEYMAP( \ k00, k01, k02, \ k10, k11, \ @@ -229,19 +242,23 @@ The middle column is unused on the bottom row in this example. Our `KEYMAP` defi { k00, k01, k02 }, \ { k10, KC_NO, k11 }, \ } +``` Notice how the top half is spaced to resemble our physical layout - this helps us understand which keys are associated with which columns. The bottom half uses the keycode `KC_NO` where there is no keyswitch wired in. It's easiest to keep the bottom half aligned in a grid to help us make sense of how the firmware actually sees the wiring. Let's say that instead, we wired our keyboard like this (a fair thing to do): +``` ┌───┬───┬───┠│ ┋ │ ┋│ ┋ │ ├─┋─┴─┬┋┴───┤ │ ┋ │┋ │ └─────┴─────┘ +``` This would require our `KEYMAP` definition to look like this: +``` #define KEYMAP( \ k00, k01, k02, \ k10, k11, \ @@ -250,10 +267,11 @@ This would require our `KEYMAP` definition to look like this: { k00, k01, k02 }, \ { k10, k11, KC_NO }, \ } +``` Notice how the `k11` and `KC_NO` switched places to represent the wiring, and the unused final column on the bottom row. Sometimes it'll make more sense to put a keyswitch on a particular column, but in the end, it won't matter, as long as all of them are accounted for. You can use this process to write out the `KEYMAP` for your entire keyboard - be sure to remember that your keyboard is actually backwards when looking at the underside of it. -#### keymaps/default.c +### keymaps/default.c This is the actual keymap for your keyboard, and the main place you'll make changes as you perfect your layout. `default.c` is the file that gets pull by default when typing `make`, but you can make other files as well, and specify them by typing `make KEYMAP=`, which will pull `keymaps/.c`. @@ -261,34 +279,38 @@ The basis of a keymap is its layers - by default, layer 0 is active. You can act Using our previous example, let's say we want to create the following layout: +``` ┌───┬───┬───┠│ A │ 1 │ H │ ├───┴─┬─┴───┤ │ TAB │ SPC │ └─────┴─────┘ +``` This can be accomplished by using the following `keymaps` definition: - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +``` +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = KEYMAP( /* Base */ KC_A, KC_1, KC_H, \ KC_TAB, KC_SPC \ ), - }; +}; +``` -Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [tmk_code/doc/keycode.txt](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keycode.txt) - there are also a lot of aliases to condense your keymap file. +Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [Keycodes](keycodes.md) - there are also a lot of aliases to condense your keymap file. It's also important to use the `KEYMAP` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring. -#### Compiling your firmware +## Compiling your firmware -After you've written out your entire keymap, you're ready to get the firmware compiled and onto your Teensy. Before compiling, you'll need to get your [development environment set-up](build_guide.md) - you can skip the dfu-programmer instructions, but you'll need to download and install the [Teensy Loader](https://www.pjrc.com/teensy/loader.html) to get the firmware on your Teensy. +After you've written out your entire keymap, you're ready to get the firmware compiled and onto your Teensy. Before compiling, you'll need to get your [development environment set-up](getting_started_build_tools.md) - you can skip the dfu-programmer instructions, but you'll need to download and install the [Teensy Loader](https://www.pjrc.com/teensy/loader.html) to get the firmware on your Teensy. Once everything is installed, running `make` in the terminal should get you some output, and eventually a `.hex` file in that folder. If you're having trouble with this step, see the end of the guide for the trouble-shooting section. Once you have your `.hex` file, open up the Teensy loader application, and click the file icon. From here, navigate to your `QMK/keyboards//` folder, and select the `.hex` file. Plug in your keyboard and press the button on the Teensy - you should see the LED on the device turn off once you do. The Teensy Loader app will change a little, and the buttons should be clickable - click the download button (down arrow), and then the reset button (right arrow), and your keyboard should be ready to go! -#### Testing your firmware +## Testing your firmware Carefully flip your keyboard over, open up a new text document, and try typing - you should get the characters that you put into your keymap. Test each key, and note the ones that aren't working. Here's a quick trouble-shooting guide for non-working keys: @@ -302,20 +324,8 @@ Carefully flip your keyboard over, open up a new text document, and try typing - If you've done all of these things, keep in mind that sometimes you might have had multiple things affecting the keyswitch, so it doesn't hurt to test the keyswitch by shorting it out at the end. -#### Securing the Teensy, finishing your hardware, getting fancier firmware +# Securing the Teensy, finishing your hardware, getting fancier firmware Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out. -There are a lot of possibilities inside the firmware - check out the [readme](https://github.com/qmk/qmk_firmware/blob/master/readme.md) for a full feature list, and dive into the different project (Planck, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb) - -## Trouble-shooting compiling - -### Windows - -#### fork: Resource temporarily unavailable - -http://www.avrfreaks.net/forum/windows-81-compilation-error - -### Mac - -### Linux +There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](http://docs.qmk.fm) for a full feature list, and dive into the different project (Planck, Clueboard, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb) diff --git a/docs/hhkb_alt_controller.md b/docs/hhkb_alt_controller.md deleted file mode 100644 index c12d8d7ff9..0000000000 --- a/docs/hhkb_alt_controller.md +++ /dev/null @@ -1,5 +0,0 @@ -# Alternative Controller for HHKB - -* [Geekhack.org thread](https://geekhack.org/index.php?topic=12047.0) - -* [Connector unmate](https://geekhack.org/index.php?topic=12047.msg1543860#msg1543860) \ No newline at end of file diff --git a/docs/basic_how_keyboards_work.md b/docs/how_keyboards_work.md similarity index 52% rename from docs/basic_how_keyboards_work.md rename to docs/how_keyboards_work.md index 73c3f5c5fc..edd219a323 100644 --- a/docs/basic_how_keyboards_work.md +++ b/docs/how_keyboards_work.md @@ -23,20 +23,14 @@ in the next sections. Whenever you press a key, the firmware of your keyboard can register this event. It can register when the key is pressed, held and released. -This usually happens with a [periodic scan of key presses with a frequency around 100 hz](https://github.com/benblazak/ergodox-firmware/blob/master/references.md#typical-keyboard-information). -This speed often is limited by the mechanical key response time, the protocol -to transfer those key presses (here USB HID), and by the software it is used in. +This usually happens with a periodic scan of key presses. This speed often is limited by the mechanical key response time, the protocol to transfer those key presses (here USB HID), and by the software it is used in. ## 2. What the Firmware Sends -The [HID specification](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) -tells what a keyboard can actually send through USB to have a chance to be -properly recognised. This includes a pre-defined list of keycodes which are -simple numbers from `0x00` to `0xE7`. The firmware assigns a keycode to each -key of the keyboard. +The [HID specification](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) tells what a keyboard can actually send through USB to have a chance to be properly recognised. This includes a pre-defined list of scancodes which are simple numbers from `0x00` to `0xE7`. The firmware assigns a scancode to each key of the keyboard. -The firmware does not send actually letters or characters, but only keycodes. -Thus, by modifying the firmware, you only can modify what keycode is sent over +The firmware does not send actually letters or characters, but only scancodes. +Thus, by modifying the firmware, you only can modify what scancode is sent over USB for a given key. ## 3. What the Operating System Does @@ -45,49 +39,31 @@ Once the keycode reaches the operating system, a piece of software has to have it match an actual character thanks to a keyboard layout. For example, if your layout is set to QWERTY, a sample of the matching table is as follow: -``` text | keycode | character | -|---------+-----------| -| 0x04 | a/A | -| 0x05 | b/B | -| 0x06 | c/C | -| ... | ... | -| 0x1C | y/Y | -| 0x1D | z/Z | -| ... | ... | -|---------+-----------| -``` +|---------|-----------| +| 0x04 | a/A | +| 0x05 | b/B | +| 0x06 | c/C | +| ... | ... | +| 0x1C | y/Y | +| 0x1D | z/Z | +| ... | ... | ## Back to the firmware -As the layout is generally fixed (unless you create your own), the firmware can -actually call a keycode by its layout name directly to ease things for you. - -This is exactly what is done here with `KC_A` actually representing `0x04` in -QWERTY. The full list can be found in `keycode.txt`. +As the layout is generally fixed (unless you create your own), the firmware can actually call a keycode by its layout name directly to ease things for you. This is exactly what is done here with `KC_A` actually representing `0x04` in QWERTY. The full list can be found in [keycodes](keycodes.md). ## List of Characters You Can Send -Putting aside shortcuts, having a limited set of keycodes mapped to a limited -layout means that **the list of characters you can assign to a given key only -is the ones present in the layout**. +Putting aside shortcuts, having a limited set of keycodes mapped to a limited layout means that **the list of characters you can assign to a given key only is the ones present in the layout**. -For example, this means that if you have a QWERTY US layout, and you want to -assign 1 key to produce `€` (euro currency symbol), you are unable to do so, -because the QWERTY US layout does not have such mapping. You could fix that by -using a QWERTY UK layout, or a QWERTY US International. +For example, this means that if you have a QWERTY US layout, and you want to assign 1 key to produce `€` (euro currency symbol), you are unable to do so, because the QWERTY US layout does not have such mapping. You could fix that by using a QWERTY UK layout, or a QWERTY US International. -You may wonder why a keyboard layout containing all of Unicode is not devised -then? The limited number of keycode available through USB simply disallow such -a thing. +You may wonder why a keyboard layout containing all of Unicode is not devised then? The limited number of keycode available through USB simply disallow such a thing. ## How to (Maybe) Enter Unicode Characters -You can have the firmware send *sequences of keys* to use the [software Unicode -Input -Method](https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input) of -the target operating system, thus effectively entering characters independently -of the layout defined in the OS. +You can have the firmware send *sequences of keys* to use the [software Unicode Input Method](https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input) of the target operating system, thus effectively entering characters independently of the layout defined in the OS. Yet, it does come with multiple disadvantages: diff --git a/docs/key_functions.md b/docs/key_functions.md deleted file mode 100644 index 74b80b42f1..0000000000 --- a/docs/key_functions.md +++ /dev/null @@ -1,121 +0,0 @@ -# Quick Aliases To Common Actions - -Your keymap can include shortcuts to common operations (called "function actions" in tmk). - -These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk `ACTION_*` functions, please see the [TMK documentation](keymap.md#2-action). - -Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them. - -### Limits of these aliases - -Currently, the keycodes able to used with these functions are limited to the TMK ones, meaning you can't use keycodes like `KC_TILD`, or anything greater than 0xFF. For a full list of the keycodes able to be used, [see this list](keycode.txt). - -### Switching and toggling layers - -`MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer. When you apply this to a key, that same key must be set as `KC_TRNS` on the destination layer. Otherwise, you won't make it back to the original layer when you release the key (and you'll get a keycode sent). You can only switch to layers *above* your current layer. If you're on layer 0 and you use `MO(1)`, that will switch to layer 1 just fine. But if you include `MO(3)` on layer 5, that won't do anything for you -- because layer 3 is lower than layer 5 on the stack. - -`OSL(layer)` - momentary switch to *layer*, as a one-shot operation. So if you have a key that's defined as `OSL(1)`, and you tap that key, then only the very next keystroke would come from layer 1. You would drop back to layer zero immediately after that one keystroke. That's handy if you have a layer full of custom shortcuts -- for example, a dedicated key for closing a window. So you tap your one-shot layer mod, then tap that magic 'close window' key, and keep typing like a boss. Layer 1 would remain active as long as you hold that key down, too (so you can use it like a momentary toggle-layer key with extra powers). - -`LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped. Like `MO()`, this only works upwards in the layer stack (`layer` must be higher than the current layer). - -`TG(layer)` - toggles a layer on or off. As with `MO()`, you should set this key as `KC_TRNS` in the destination layer so that tapping it again actually toggles back to the original layer. Only works upwards in the layer stack. - -`TO(layer)` - Goes to a layer. This code is special, because it lets you go either up or down the stack -- just goes directly to the layer you want. So while other codes only let you go _up_ the stack (from layer 0 to layer 3, for example), `TO(2)` is going to get you to layer 2, no matter where you activate it from -- even if you're currently on layer 5. This gets activated on keydown (as soon as the key is pressed). - -`TT(layer)` - Layer Tap-Toggle. If you hold the key down, the layer becomes active, and then deactivates when you let go. And if you tap it, the layer simply becomes active (toggles on). It needs 5 taps by default, but you can set it by defining `TAPPING_TOGGLE`, for example, `#define TAPPING_TOGGLE 1` for just one tap. - - -### Fun with modifier keys - -* `LSFT(kc)` - applies left Shift to *kc* (keycode) - `S(kc)` is an alias -* `RSFT(kc)` - applies right Shift to *kc* -* `LCTL(kc)` - applies left Control to *kc* -* `RCTL(kc)` - applies right Control to *kc* -* `LALT(kc)` - applies left Alt to *kc* -* `RALT(kc)` - applies right Alt to *kc* -* `LGUI(kc)` - applies left GUI (command/win) to *kc* -* `RGUI(kc)` - applies right GUI (command/win) to *kc* -* `HYPR(kc)` - applies Hyper (all modifiers) to *kc* -* `MEH(kc)` - applies Meh (all modifiers except Win/Cmd) to *kc* -* `LCAG(kc)` - applies CtrlAltGui to *kc* - -You can also chain these, like this: - - LALT(LCTL(KC_DEL)) -- this makes a key that sends Alt, Control, and Delete in a single keypress. - -The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols. Their long names are also available and documented in `quantum/quantum_keycodes.h`. - - KC_TILD ~ - KC_EXLM ! - KC_QUES ? - KC_AT @ - KC_HASH # - KC_DLR $ - KC_PERC % - KC_CIRC ^ - KC_AMPR & - KC_ASTR * - KC_LPRN ( - KC_RPRN ) - KC_UNDS _ - KC_PLUS + - KC_DQUO " - KC_LCBR { - KC_RCBR } - KC_LABK < - KC_RABK > - KC_PIPE | - KC_COLN : - -`OSM(mod)` - this is a "one shot" modifier. So let's say you have your left Shift key defined as `OSM(MOD_LSFT)`. Tap it, let go, and Shift is "on" -- but only for the next character you'll type. So to write "The", you don't need to hold down Shift -- you tap it, tap t, and move on with life. And if you hold down the left Shift key, it just works as a left Shift key, as you would expect (so you could type THE). There's also a magical, secret way to "lock" a modifier by tapping it multiple times. If you want to learn more about that, open an issue. :) - -`MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down. - -These are the values you can use for the `mod` in `MT()` and `OSM()`: - - * MOD_LCTL - * MOD_LSFT - * MOD_LALT - * MOD_LGUI - * MOD_RCTL - * MOD_RSFT - * MOD_RALT - * MOD_RGUI - * MOD_HYPR - * MOD_MEH - -These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped. Note however, that you cannot mix right and left side modifiers. - -We've added shortcuts to make common modifier/tap (mod-tap) mappings more compact: - - * `CTL_T(kc)` - is LCTL when held and *kc* when tapped - * `SFT_T(kc)` - is LSFT when held and *kc* when tapped - * `ALT_T(kc)` - is LALT when held and *kc* when tapped - * `ALGR_T(kc)` - is AltGr when held and *kc* when tapped - * `GUI_T(kc)` - is LGUI when held and *kc* when tapped - * `ALL_T(kc)` - is Hyper (all mods) when held and *kc* when tapped. To read more about what you can do with a Hyper key, see [this blog post by Brett Terpstra](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/) - * `LCAG_T(kc)` - is CtrlAltGui when held and *kc* when tapped - * `MEH_T(kc)` - is like Hyper, but not as cool -- does not include the Cmd/Win key, so just sends Alt+Ctrl+Shift. - -##### Permissive Hold - -As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option: - -``` -#define PERMISSIVE_HOLD -``` - -This makes it easier for fast typists to use dual-function keys. As described in the PR: - -Without this, if you let go of a held key inside the tapping term, it won't register. - -Example: (Tapping Term = 200) - -- SHFT_T(KC_A) Down -- KC_X Down -- KC_X Up -- SHFT_T(KC_A) Up - -With permissive hold, if above is typed within tapping term, this will emit `X` (so, Shift+X). - -With defaults, if above is typed within tapping term, this will emit `ax`, which I doubt is what anyone really wants diff --git a/docs/key_lock.md b/docs/key_lock.md new file mode 100644 index 0000000000..e424061a9a --- /dev/null +++ b/docs/key_lock.md @@ -0,0 +1,11 @@ +## Key Lock: Holding down keys for you + +Sometimes, you need to hold down a specific key for a long period of time. Whether this is while typing in ALL CAPS, or playing a video game that hasn't implemented auto-run, Key Lock is here to help. Key Lock adds a new keycode, `KC_LOCK`, that will hold down the next key you hit for you. The key is released when you hit it again. Here's an example: let's say you need to type in all caps for a few sentences. You hit KC_LOCK, and then shift. Now, shift will be considered held until you hit it again. You can think of key lock as caps lock, but supercharged. + +Here's how to use it: + +1. Pick a key on your keyboard. This will be the key lock key. Assign it the keycode `KC_LOCK`. This will be a single-action key: you won't be able to use it for anything else. +2. Enable key lock by including `KEY_LOCK_ENABLE = yes` in your Makefile. +3. That's it! + +Important: switching layers does not cancel the key lock. Additionally, key lock is only able to hold standard action keys and One Shot modifier keys (for example, if you have your shift defined as `OSM(KC_LSFT)`; see [One Shot Keys](quantum_keycodes.md#one-shot-keys)). This does not include any of the QMK special functions (except One Shot modifiers), or shifted versions of keys such as KC_LPRN. If it's in the [basic_keycodes](basic_keycodes.md) list, it can be held. If it's not, then it can't be. diff --git a/docs/keycodes.md b/docs/keycodes.md index 5cf5c019d0..c601ad4ced 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -1,228 +1,315 @@ # Overview -When defining a [keymap](keymap.md) each key needs a valid key definition. +When defining a [keymap](keymap.md) each key needs a valid key definition. This page documents the symbols that correspond to keycodes that are available to you in QMK. This is a reference only. Where possible keys link to the page documenting their functionality. -This page documents the symbols that correspond to keycodes that are available to you in QMK. - -To customize your board, they can be used by themselves or as **action codes** in combination with one of the [many C macros](https://github.com/qmk/qmk_firmware/wiki#c-macros-for-action-code). - -The source of truth for these codes is [tmk_core/common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h) file in the qmk source code. - -# The Keycodes - -Keycodes in QMK are based on [HID Usage Keyboard/Keypad Page(0x07)](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) with following exceptions: - -* `KC_NO` = 0 for no action -* `KC_TRNS` = 1 for layer transparency -* internal special keycodes in the `0xA5-DF` range (tmk heritage). - -## Letters and Numbers - -|KC_1|KC_2|KC_3|KC_4|KC_5|KC_6|KC_7|KC_8| -|----|----|----|----|----|----|----|----| -|KC_9|KC_0|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_F13|KC_F14| -|KC_F15|KC_F16|KC_F17|KC_F18|KC_F19|KC_F20|KC_F21|KC_F22| -|KC_F23|KC_F24|KC_A|KC_B|KC_C|KC_D|KC_E|KC_F| -|KC_G|KC_H|KC_I|KC_J|KC_K|KC_L|KC_M|KC_N| -|KC_O|KC_P|KC_Q|KC_R|KC_S|KC_T|KC_U|KC_V| -|KC_W|KC_X|KC_Y|KC_Z||||| - -## Punctuation +## Keycode Index |Long Name|Short Name|Description| |---------|----------|-----------| -|KC_ENTER|KC_ENT|`Return (ENTER)`| -|KC_ESCAPE|KC_ESC|`ESCAPE`| -|KC_BSPACE|KC_BSPC|`DELETE (Backspace)`| -|KC_TAB||`Tab`| -|KC_SPACE|KC_SPC|Spacebar| -|KC_MINUS|KC_MINS|`-` and `_`| -|KC_EQUAL|KC_EQL|`=` and `+`| -|KC_LBRACKET|KC_LBRC|`[` and `{`| -|KC_RBRACKET|KC_RBRC|`]` and `}`| -|KC_BSLASH|KC_BSLS|`\` and | | -|KC_NONUS_HASH|KC_NUHS|Non-US `#` and `~`| -|KC_NONUS_BSLASH|KC_NUBS|Non-US `\` and | | -|KC_INT1|KC_RO|JIS `\` and | | -|KC_INT2|KC_KANA|International216| -|KC_INT3|KC_JYEN|Yen Symbol (`Â¥`)| -|KC_SCOLON|KC_SCLN|`;` and `:`| -|KC_QUOTE|KC_QUOT|`‘` and `“`| -|KC_GRAVE|KC_GRV|Grave Accent and Tilde| -|KC_COMMA|KC_COMM|`,` and `<`| -|KC_DOT||`.` and `>`| -|KC_SLASH|KC_SLSH|`/` and `?`| -|KC_CAPSLOCK|KC_CAPS|Caps Lock| - -## Modifiers - -|Long Name|Short Name|Description| -|---------|----------|-----------| -|KC_LCTRL|KC_LCTL|LeftControl| -|KC_LSHIFT|KC_LSFT|LeftShift| -|KC_LALT||LeftAlt| -|KC_LGUI||Left GUI(Windows/Apple/Meta key)| -|KC_RCTRL|KC_RCTL|RightControl| -|KC_RSHIFT|KC_RSFT|RightShift| -|KC_RALT||RightAlt| -|KC_RGUI||Right GUI(Windows/Apple/Meta key)| -|KC_LOCKING_CAPS||Locking Caps Lock| -|KC_LOCKING_NUM||Locking Num Lock| -|KC_LOCKING_SCROLL||Locking Scroll Lock| -|KC_INT4|KC_HENK|JIS Henken| -|KC_INT5|KC_MHEN|JIS Muhenken| - -## Commands - -|Long Name|Short Name|Description| -|---------|----------|-----------| -|KC_PSCREEN|KC_PSCR|PrintScreen| -|KC_SCROLLLOCK|KC_SLCK|Scroll Lock| -|KC_PAUSE|KC_PAUS|Pause| -|KC_INSERT|KC_INS|Insert| -|KC_HOME||Home| -|KC_PGUP||PageUp| -|KC_DELETE|KC_DEL|Delete Forward| -|KC_END||End| -|KC_PGDOWN|KC_PGDN|PageDown| -|KC_RIGHT|KC_RGHT|RightArrow| -|KC_LEFT||LeftArrow| -|KC_DOWN||DownArrow| -|KC_UP||UpArrow| -|KC_APPLICATION|KC_APP|Application| -|KC_POWER||Power| -|KC_EXECUTE||Execute| -|KC_HELP||Help| -|KC_MENU||Menu| -|KC_SELECT||Select| -|KC_AGAIN||Again| -|KC_UNDO||Undo| -|KC_CUT||Cut| -|KC_COPY||Copy| -|KC_PASTE||Paste| -|KC_FIND||Find| -|KC_ALT_ERASE||Alternate Erase| -|KC_SYSREQ||SysReq/Attention| -|KC_CANCEL||Cancel| -|KC_CLEAR||Clear| -|KC_PRIOR||Prior| -|KC_RETURN||Return| -|KC_SEPARATOR||Separator| -|KC_OUT||Out| -|KC_OPER||Oper| -|KC_CLEAR_AGAIN||Clear/Again| -|KC_CRSEL||CrSel/Props| -|KC_EXSEL||ExSel| -|KC_SYSTEM_POWER|KC_PWR|System Power Down| -|KC_SYSTEM_SLEEP|KC_SLEP|System Sleep| -|KC_SYSTEM_WAKE|KC_WAKE|System Wake| -|KC_MAIL|KC_MAIL|| -|KC_CALCULATOR|KC_CALC|| -|KC_MY_COMPUTER|KC_MYCM|| -|KC_WWW_SEARCH|KC_WSCH|| -|KC_WWW_HOME|KC_WHOM|| -|KC_WWW_BACK|KC_WBAK|| -|KC_WWW_FORWARD|KC_WFWD|| -|KC_WWW_STOP|KC_WSTP|| -|KC_WWW_REFRESH|KC_WREF|| -|KC_WWW_FAVORITES|KC_WFAV|| - -## Media Keys - -Windows and Mac use different key codes for next track and previous track. Make sure you choose the keycode that corresponds to your OS. - -|Long Name|Short Name|Description| -|---------|----------|-----------| -|KC_STOP||Stop| -|KC__MUTE||Mute| -|KC__VOLUP||Volume Up| -|KC__VOLDOWN||Volume Down| -|KC_AUDIO_MUTE|KC_MUTE|| -|KC_AUDIO_VOL_UP|KC_VOLU|| -|KC_AUDIO_VOL_DOWN|KC_VOLD|| -|KC_MEDIA_NEXT_TRACK|KC_MNXT|Next Track (Windows)| -|KC_MEDIA_PREV_TRACK|KC_MPRV|Previous Track (Windows)| -|KC_MEDIA_FAST_FORWARD|KC_MFFD|Next Track (macOS)| -|KC_MEDIA_REWIND|KC_MRWD|Previous Track (macOS)| -|KC_MEDIA_STOP|KC_MSTP|| -|KC_MEDIA_PLAY_PAUSE|KC_MPLY|| -|KC_MEDIA_SELECT|KC_MSEL|| - -## Numpad - -|Long Name|Short Name|Description| -|---------|----------|-----------| -|KC_NUMLOCK|KC_NLCK|Keypad Num Lock and Clear| -|KC_KP_SLASH|KC_PSLS|Keypad /| -|KC_KP_ASTERISK|KC_PAST|Keypad *| -|KC_KP_MINUS|KC_PMNS|Keypad -| -|KC_KP_PLUS|KC_PPLS|Keypad +| -|KC_KP_ENTER|KC_PENT|Keypad ENTER| -|KC_KP_1|KC_P1|Keypad 1 and End| -|KC_KP_2|KC_P2|Keypad 2 and Down Arrow| -|KC_KP_3|KC_P3|Keypad 3 and PageDn| -|KC_KP_4|KC_P4|Keypad 4 and Left Arrow| -|KC_KP_5|KC_P5|Keypad 5| -|KC_KP_6|KC_P6|Keypad 6 and Right Arrow| -|KC_KP_7|KC_P7|Keypad 7 and Home| -|KC_KP_8|KC_P8|Keypad 8 and Up Arrow| -|KC_KP_9|KC_P9|Keypad 9 and PageUp| -|KC_KP_0|KC_P0|Keypad 0 and Insert| -|KC_KP_DOT|KC_PDOT|Keypad . and Delete| -|KC_KP_EQUAL|KC_PEQL|Keypad =| -|KC_KP_COMMA|KC_PCMM|Keypad Comma| -|KC_KP_EQUAL_AS400||Keypad Equal Sign| - -## Special Keys - -|Long Name|Short Name|Description| -|---------|----------|-----------| -|KC_NO||Ignore this key. (NOOP) | - -## Mousekey - -|Long Name|Short Name|Description| -|---------|----------|-----------| -|KC_MS_UP|KC_MS_U|Mouse Cursor Up| -|KC_MS_DOWN|KC_MS_D|Mouse Cursor Down| -|KC_MS_LEFT|KC_MS_L|Mouse Cursor Left| -|KC_MS_RIGHT|KC_MS_R|Mouse Cursor Right| -|KC_MS_BTN1|KC_BTN1|Mouse Button 1| -|KC_MS_BTN2|KC_BTN2|Mouse Button 2| -|KC_MS_BTN3|KC_BTN3|Mouse Button 3| -|KC_MS_BTN4|KC_BTN4|Mouse Button 4| -|KC_MS_BTN5|KC_BTN5|Mouse Button 5| -|KC_MS_WH_UP|KC_WH_U|Mouse Wheel Up| -|KC_MS_WH_DOWN|KC_WH_D|Mouse Wheel Down| -|KC_MS_WH_LEFT|KC_WH_L|Mouse Wheel Left| -|KC_MS_WH_RIGHT|KC_WH_R|Mouse Wheel Right| -|KC_MS_ACCEL0|KC_ACL0|Mouse Acceleration 0| -|KC_MS_ACCEL1|KC_ACL1|Mouse Acceleration 1| -|KC_MS_ACCEL2|KC_ACL2|Mouse Acceleration 2| - -## Magic Keys - -The following keys can be used to turn on and off various "Magic" features. These include Boot Magic (holding certain keys down while plugging the keyboard in) and the Magic Key. - -|Long Name|Short Name|Description| -|---------|----------|-----------| -|MAGIC_SWAP_CONTROL_CAPSLOCK||Swap Capslock and Control| -|MAGIC_CAPSLOCK_TO_CONTROL||Change Capslock to Control| -|MAGIC_SWAP_ALT_GUI||Swap ALT and GUI| -|MAGIC_SWAP_LALT_LGUI||Swap LALT and LGUI| -|MAGIC_SWAP_RALT_RGUI||Swap RALT and RGUI| -|MAGIC_NO_GUI||Disable off the GUI key| -|MAGIC_SWAP_GRAVE_ESC||Swap the GRAVE (~ `) and Esc keys| -|MAGIC_SWAP_BACKSLASH_BACKSPACE||Swap Backslash and Backspace| -|MAGIC_UNSWAP_CONTROL_CAPSLOCK||Disable the Control/Caps Swap| -|MAGIC_UNCAPSLOCK_TO_CONTROL||Turn Capslock back into Capslock| -|MAGIC_UNSWAP_ALT_GUI||Turn the ALT/GUI swap off| -|MAGIC_UNSWAP_LALT_LGUI||Turn the LALT/LGUI swap off| -|MAGIC_UNSWAP_RALT_RGUI||Turn the RALT/RGUI swap off| -|MAGIC_UNNO_GUI||Enable the GUI key| -|MAGIC_UNSWAP_GRAVE_ESC||Turn the GRAVE/ESC swap off| -|MAGIC_UNSWAP_BACKSLASH_BACKSPACE||Turn the Backslash/Backspace swap off| -|MAGIC_HOST_NKRO||Turn NKRO on| -|MAGIC_UNHOST_NKRO||Turn NKRO off| -|MAGIC_TOGGLE_NKRO||Toggle NKRO on or off| +|`KC_1`|||| +|`KC_2`|||| +|`KC_3`|||| +|`KC_4`|||| +|`KC_5`|||| +|`KC_6`|||| +|`KC_7`|||| +|`KC_8`|||| +|`KC_9`|||| +|`KC_0`|||| +|`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_F13`|||| +|`KC_F14`|||| +|`KC_F15`|||| +|`KC_F16`|||| +|`KC_F17`|||| +|`KC_F18`|||| +|`KC_F19`|||| +|`KC_F20`|||| +|`KC_F21`|||| +|`KC_F22`|||| +|`KC_F23`|||| +|`KC_F24`|||| +|`KC_A`|||| +|`KC_B`|||| +|`KC_C`|||| +|`KC_D`|||| +|`KC_E`|||| +|`KC_F`|||| +|`KC_G`|||| +|`KC_H`|||| +|`KC_I`|||| +|`KC_J`|||| +|`KC_K`|||| +|`KC_L`|||| +|`KC_M`|||| +|`KC_N`|||| +|`KC_O`|||| +|`KC_P`|||| +|`KC_Q`|||| +|`KC_R`|||| +|`KC_S`|||| +|`KC_T`|||| +|`KC_U`|||| +|`KC_V`|||| +|`KC_W`|||| +|`KC_X`|||| +|`KC_Y`|||| +|`KC_Z`|||| +|`KC_ENTER`|`KC_ENT`|`Return (ENTER)`| +|`KC_ESCAPE`|`KC_ESC`|`ESCAPE`| +|`KC_BSPACE`|`KC_BSPC`|`DELETE (Backspace)`| +|`KC_TAB`||`Tab`| +|`KC_SPACE`|`KC_SPC`|Spacebar| +|`KC_MINUS`|`KC_MINS`|`-` and `_`| +|`KC_EQUAL`|`KC_EQL`|`=` and `+`| +|`KC_LBRACKET`|`KC_LBRC`|`[` and `{`| +|`KC_RBRACKET`|`KC_RBRC`|`]` and `}`| +|`KC_BSLASH`|`KC_BSLS`|`\` and | | +|`KC_NONUS_HASH`|`KC_NUHS`|Non-US `#` and `~`| +|`KC_NONUS_BSLASH`|`KC_NUBS`|Non-US `\` and | | +|`KC_INT1`|`KC_RO`|JIS `\` and | | +|`KC_INT2`|`KC_KANA`|International216| +|`KC_INT3`|`KC_JYEN`|Yen Symbol (`Â¥`)| +|`KC_SCOLON`|`KC_SCLN`|`;` and `:`| +|`KC_QUOTE`|`KC_QUOT`|`‘` and `“`| +|`KC_GRAVE`|`KC_GRV`|Grave Accent and Tilde| +|`KC_COMMA`|`KC_COMM`|`,` and `<`| +|`KC_DOT`||`.` and `>`| +|`KC_SLASH`|`KC_SLSH`|`/` and `?`| +|`KC_CAPSLOCK`|`KC_CAPS`|Caps Lock| +|`KC_LCTRL`|`KC_LCTL`|LeftControl| +|`KC_LSHIFT`|`KC_LSFT`|LeftShift| +|`KC_LALT`||LeftAlt| +|`KC_LGUI`||Left GUI(Windows/Apple/Meta key)| +|`KC_RCTRL`|`KC_RCTL`|RightControl| +|`KC_RSHIFT`|`KC_RSFT`|RightShift| +|`KC_RALT`||RightAlt| +|`KC_RGUI`||Right GUI(Windows/Apple/Meta key)| +|`KC_LOCKING_CAPS`|`KC_LCAP`|Locking Caps Lock| +|`KC_LOCKING_NUM`|`KC_LNUM`|Locking Num Lock| +|`KC_LOCKING_SCROLL`|`KC_LSCR`|Locking Scroll Lock| +|`KC_INT4`|`KC_HENK`|JIS Henken| +|`KC_INT5`|`KC_MHEN`|JIS Muhenken| +|`KC_PSCREEN`|`KC_PSCR`|PrintScreen| +|`KC_SCROLLLOCK`|`KC_SLCK`|Scroll Lock| +|`KC_PAUSE`|`KC_PAUS`|Pause| +|`KC_INSERT`|`KC_INS`|Insert| +|`KC_HOME`||Home| +|`KC_PGUP`||PageUp| +|`KC_DELETE`|`KC_DEL`|Delete Forward| +|`KC_END`||End| +|`KC_PGDOWN`|`KC_PGDN`|PageDown| +|`KC_RIGHT`|`KC_RGHT`|RightArrow| +|`KC_LEFT`||LeftArrow| +|`KC_DOWN`||DownArrow| +|`KC_UP`||UpArrow| +|`KC_APPLICATION`|`KC_APP`|Application| +|`KC_POWER`||Power| +|`KC_EXECUTE`||Execute| +|`KC_HELP`||Help| +|`KC_MENU`||Menu| +|`KC_SELECT`||Select| +|`KC_AGAIN`||Again| +|`KC_UNDO`||Undo| +|`KC_CUT`||Cut| +|`KC_COPY`||Copy| +|`KC_PASTE`||Paste| +|`KC_FIND`||Find| +|`KC_ALT_ERASE`||Alternate Erase| +|`KC_SYSREQ`||SysReq/Attention| +|`KC_CANCEL`||Cancel| +|`KC_CLEAR`||Clear| +|`KC_PRIOR`||Prior| +|`KC_RETURN`||Return| +|`KC_SEPARATOR`||Separator| +|`KC_OUT`||Out| +|`KC_OPER`||Oper| +|`KC_CLEAR_AGAIN`||Clear/Again| +|`KC_CRSEL`||CrSel/Props| +|`KC_EXSEL`||ExSel| +|`KC_SYSTEM_POWER`|`KC_PWR`|System Power Down| +|`KC_SYSTEM_SLEEP`|`KC_SLEP`|System Sleep| +|`KC_SYSTEM_WAKE`|`KC_WAKE`|System Wake| +|`KC_MAIL`|`KC_MAIL`|| +|`KC_CALCULATOR`|`KC_CALC`|| +|`KC_MY_COMPUTER`|`KC_MYCM`|| +|`KC_WWW_SEARCH`|`KC_WSCH`|| +|`KC_WWW_HOME`|`KC_WHOM`|| +|`KC_WWW_BACK`|`KC_WBAK`|| +|`KC_WWW_FORWARD`|`KC_WFWD`|| +|`KC_WWW_STOP`|`KC_WSTP`|| +|`KC_WWW_REFRESH`|`KC_WREF`|| +|`KC_WWW_FAVORITES`|`KC_WFAV`|| +|`KC_STOP`||Stop| +|`KC__MUTE`||Mute| +|`KC__VOLUP`||Volume Up| +|`KC__VOLDOWN`||Volume Down| +|`KC_AUDIO_MUTE`|`KC_MUTE`|| +|`KC_AUDIO_VOL_UP`|`KC_VOLU`|| +|`KC_AUDIO_VOL_DOWN`|`KC_VOLD`|| +|`KC_MEDIA_NEXT_TRACK`|`KC_MNXT`|Next Track (Windows)| +|`KC_MEDIA_PREV_TRACK`|`KC_MPRV`|Previous Track (Windows)| +|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD`|Next Track (macOS)| +|`KC_MEDIA_REWIND`|`KC_MRWD`|Previous Track (macOS)| +|`KC_MEDIA_STOP`|`KC_MSTP`|| +|`KC_MEDIA_PLAY_PAUSE`|`KC_MPLY`|| +|`KC_MEDIA_SELECT`|`KC_MSEL`|| +|`KC_NUMLOCK`|`KC_NLCK`|Keypad Num Lock and Clear| +|`KC_KP_SLASH`|`KC_PSLS`|Keypad /| +|`KC_KP_ASTERISK`|`KC_PAST`|Keypad *| +|`KC_KP_MINUS`|`KC_PMNS`|Keypad -| +|`KC_KP_PLUS`|`KC_PPLS`|Keypad +| +|`KC_KP_ENTER`|`KC_PENT`|Keypad ENTER`| +|`KC_KP_1`|`KC_P1`|Keypad 1 and End| +|`KC_KP_2`|`KC_P2`|Keypad 2 and Down Arrow| +|`KC_KP_3`|`KC_P3`|Keypad 3 and PageDn| +|`KC_KP_4`|`KC_P4`|Keypad 4 and Left Arrow| +|`KC_KP_5`|`KC_P5`|Keypad 5| +|`KC_KP_6`|`KC_P6`|Keypad 6 and Right Arrow| +|`KC_KP_7`|`KC_P7`|Keypad 7 and Home| +|`KC_KP_8`|`KC_P8`|Keypad 8 and Up Arrow| +|`KC_KP_9`|`KC_P9`|Keypad 9 and PageUp| +|`KC_KP_0`|`KC_P0`|Keypad 0 and Insert| +|`KC_KP_DOT`|`KC_PDOT`|Keypad . and Delete| +|`KC_KP_EQUAL`|`KC_PEQL`|Keypad =| +|`KC_KP_COMMA`|`KC_PCMM`|Keypad Comma| +|`KC_KP_EQUAL_AS400`||Keypad Equal Sign| +|`KC_NO`||Ignore this key. (NOOP) | +|`KC_TRNS`||Make this key transparent to find the key on a lower layer.| +|[`KC_MS_UP`](mouse_keys.md)|`KC_MS_U`|Mouse Cursor Up| +|[`KC_MS_DOWN`](mouse_keys.md)|`KC_MS_D`|Mouse Cursor Down| +|[`KC_MS_LEFT`](mouse_keys.md)|`KC_MS_L`|Mouse Cursor Left| +|[`KC_MS_RIGHT`](mouse_keys.md)|`KC_MS_R`|Mouse Cursor Right| +|[`KC_MS_BTN1`](mouse_keys.md)|`KC_BTN1`|Mouse Button 1| +|[`KC_MS_BTN2`](mouse_keys.md)|`KC_BTN2`|Mouse Button 2| +|[`KC_MS_BTN3`](mouse_keys.md)|`KC_BTN3`|Mouse Button 3| +|[`KC_MS_BTN4`](mouse_keys.md)|`KC_BTN4`|Mouse Button 4| +|[`KC_MS_BTN5`](mouse_keys.md)|`KC_BTN5`|Mouse Button 5| +|[`KC_MS_WH_UP`](mouse_keys.md)|`KC_WH_U`|Mouse Wheel Up| +|[`KC_MS_WH_DOWN`](mouse_keys.md)|`KC_WH_D`|Mouse Wheel Down| +|[`KC_MS_WH_LEFT`](mouse_keys.md)|`KC_WH_L`|Mouse Wheel Left| +|[`KC_MS_WH_RIGHT`](mouse_keys.md)|`KC_WH_R`|Mouse Wheel Right| +|[`KC_MS_ACCEL0`](mouse_keys.md)|`KC_ACL0`|Mouse Acceleration 0| +|[`KC_MS_ACCEL1`](mouse_keys.md)|`KC_ACL1`|Mouse Acceleration 1| +|[`KC_MS_ACCEL2`](mouse_keys.md)|`KC_ACL2`|Mouse Acceleration 2| +|[`RESET`](quantum_keycodes.md#qmk-keycodes)||Put the keyboard into DFU mode for flashing| +|[`DEBUG`](quantum_keycodes.md#qmk-keycodes)||Toggles debug mode| +|[`KC_GESC`](quantum_keycodes.md#qmk-keycodes)|`GRAVE_ESC`|Acts as escape when pressed normally but when pressed with Shift or GUI will send a `~`| +|[`KC_LSPO`](quantum_keycodes.md#qmk-keycodes)||Left shift when held, open paranthesis when tapped| +|[`KC_RSPC`](quantum_keycodes.md#qmk-keycodes)||Right shift when held, close paranthesis when tapped| +|[`KC_LEAD`](feature_leader_key.md)||The leader key| +|[`FUNC(n)`](quantum_keycodes.md#qmk-keycodes)|`F(n)`|Call `fn_action(n)`| +|[`M(n)`](quantum_keycodes.md#qmk-keycodes)||to call macro n| +|[`MACROTAP(n)`](quantum_keycodes.md#qmk-keycodes)||to macro-tap n idk FIXME`| +|[`MAGIC_SWAP_CONTROL_CAPSLOCK`](feature_bootmagic.md)||Swap Capslock and Left Control| +|[`MAGIC_CAPSLOCK_TO_CONTROL`](feature_bootmagic.md)||Treat Capslock like a Control Key| +|[`MAGIC_SWAP_LALT_LGUI`](feature_bootmagic.md)||Swap the left Alt and GUI keys| +|[`MAGIC_SWAP_RALT_RGUI`](feature_bootmagic.md)||Swap the right Alt and GUI keys| +|[`MAGIC_NO_GUI`](feature_bootmagic.md)||Disable the GUI key| +|[`MAGIC_SWAP_GRAVE_ESC`](feature_bootmagic.md)||Swap the Grave and Esc key.| +|[`MAGIC_SWAP_BACKSLASH_BACKSPACE`](feature_bootmagic.md)||Swap backslack and backspace| +|[`MAGIC_HOST_NKRO`](feature_bootmagic.md)||Force NKRO on| +|[`MAGIC_SWAP_ALT_GUI`/`AG_SWAP`](feature_bootmagic.md)||Swap Alt and Gui on both sides| +|[`MAGIC_UNSWAP_CONTROL_CAPSLOCK`](feature_bootmagic.md)||Disable the Control/Capslock swap| +|[`MAGIC_UNCAPSLOCK_TO_CONTROL`](feature_bootmagic.md)||Disable treating Capslock like Control | +|[`MAGIC_UNSWAP_LALT_LGUI`](feature_bootmagic.md)||Disable Left Alt and GUI switching| +|[`MAGIC_UNSWAP_RALT_RGUI`](feature_bootmagic.md)||Disable Right Alt and GUI switching| +|[`MAGIC_UNNO_GUI`](feature_bootmagic.md)||Enable the GUI key | +|[`MAGIC_UNSWAP_GRAVE_ESC`](feature_bootmagic.md)||Disable the Grave/Esc swap | +|[`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`](feature_bootmagic.md)||Disable the backslash/backspace swap| +|[`MAGIC_UNHOST_NKRO`](feature_bootmagic.md)||Force NKRO off| +|[`MAGIC_UNSWAP_ALT_GUI`/`AG_NORM`](feature_bootmagic.md)||Disable the Alt/GUI switching| +|[`MAGIC_TOGGLE_NKRO`](feature_bootmagic.md)||Turn NKRO on or off| +|[`BL_x`](feature_backlight.md)||Set a specific backlight level between 0-9| +|[`BL_ON`](feature_backlight.md)||An alias for `BL_9`| +|[`BL_OFF`](feature_backlight.md)||An alias for `BL_0`| +|[`BL_DEC`](feature_backlight.md)||Turn the backlight level down by 1| +|[`BL_INC`](feature_backlight.md)||Turn the backlight level up by 1| +|[`BL_TOGG`](feature_backlight.md)||Toggle the backlight on or off| +|[`BL_STEP`](feature_backlight.md)||Step through backlight levels, wrapping around to 0 when you reach the top.| +|[`RGB_TOG`](feature_rgblight.md)||toggle on/off| +|[`RGB_MOD`](feature_rgblight.md)||cycle through modes| +|[`RGB_HUI`](feature_rgblight.md)||hue increase| +|[`RGB_HUD`](feature_rgblight.md)||hue decrease| +|[`RGB_SAI`](feature_rgblight.md)||saturation increase| +|[`RGB_SAD`](feature_rgblight.md)||saturation decrease| +|[`RGB_VAI`](feature_rgblight.md)||value increase| +|[`RGB_VAD`](feature_rgblight.md)||value decrease| +|[`PRINT_ON`](feature_thermal_printer.md)||Start printing everything the user types| +|[`PRINT_OFF`](feature_thermal_printer.md)||Stop printing everything the user types| +|[`OUT_AUTO`](feature_bluetooth.md)||auto mode| +|[`OUT_USB`](feature_bluetooth.md)||usb only| +|[`OUT_BT`](feature_bluetooth.md)||bluetooth (when `BLUETOOTH_ENABLE`)| +|[`KC_HYPR`](quantum_keycodes.md#modifiers)||Hold down LCTL + LSFT + LALT + LGUI`| +|[`KC_MEH`](quantum_keycodes.md#modifiers)||Hold down LCTL + LSFT + LALT`| +|[`LCTL(kc)`](quantum_keycodes.md#modifiers)||`LCTL` + `kc`| +|[`LSFT(kc)`](quantum_keycodes.md#modifiers)|[`S(kc)`](quantum_keycodes.md#modifiers)|`LSFT` + `kc`| +|[`LALT(kc)`](quantum_keycodes.md#modifiers)||`LALT` + `kc`| +|[`LGUI(kc)`](quantum_keycodes.md#modifiers)||`LGUI` + `kc`| +|[`RCTL(kc)`](quantum_keycodes.md#modifiers)||`RCTL` + `kc`| +|[`RSFT(kc)`](quantum_keycodes.md#modifiers)||`RSFT` + `kc`| +|[`RALT(kc)`](quantum_keycodes.md#modifiers)||`RALT` + `kc`| +|[`RGUI(kc)`](quantum_keycodes.md#modifiers)||`RGUI` + `kc`| +|[`HYPR(kc)`](quantum_keycodes.md#modifiers)||`LCTL` + `LSFT` + `LALT` + `LGUI` + `kc`| +|[`MEH(kc)`](quantum_keycodes.md#modifiers)||`LCTL` + `LSFT` + `LALT` + `kc`| +|[`LCAG(kc)`](quantum_keycodes.md#modifiers)||`LCTL` + `LALT` + `LGUI` + `kc`| +|[`ALTG(kc)`](quantum_keycodes.md#modifiers)||`RCTL` + `RALT` + `kc`| +|[`SCMD(kc)`](quantum_keycodes.md#modifiers)|[`SWIN(kc)`](quantum_keycodes.md#modifiers)|`LGUI` + `LSFT` + `kc`| +|[`LCA(kc)`](quantum_keycodes.md#modifiers)||`LCTL` + `LALT` + `kc`| +|[`CTL_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`LCTL_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`LCTL` when held, `kc` when tapped| +|[`RCTL_T(kc)`](quantum_keycodes.md#mod-tap-keys)||[`RCTL` when held, `kc` when tapped| +|[`SFT_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`LSFT_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`LSFT` when held, `kc` when tapped| +|[`RSFT_T(kc)`](quantum_keycodes.md#mod-tap-keys)||[`RSFT` when held, `kc` when tapped| +|[`ALT_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`LALT_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`LALT` when held, `kc` when tapped| +|[`RALT_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`ALGR_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`RALT` when held, `kc` when tapped| +|[`GUI_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`LGUI_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`LGUI` when held, `kc` when tapped| +|[`RGUI_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`RGUI` when held, `kc` when tapped| +|[`C_S_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`LCTL` + `LSFT` when held, `kc` when tapped| +|[`MEH_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`LCTL` + `LSFT` + `LALT` when held, `kc` when tapped| +|[`LCAG_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`LCTL` + `LALT` + `LGUI` when held, `kc` when tapped| +|[`RCAG_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`RCTL` + `RALT` + `RGUI` when held, `kc` when tapped| +|[`ALL_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`LCTL` + `LSFT` + `LALT` + `LGUI` when held, `kc` when tapped [more info](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| +|[`SCMD_T(kc)`](quantum_keycodes.md#mod-tap-keys)|[`SWIN_T(kc)`](quantum_keycodes.md#mod-tap-keys)|`LGUI` + `LSFT` when held, `kc` when tapped| +|[`LCA_T(kc)`](quantum_keycodes.md#mod-tap-keys)||`LCTL` + `LALT` when held, `kc` when tapped| +|[`KC_TILD`](keycodes_us_ansi_shifted.md)|`KC_TILDE`|tilde `~`| +|[`KC_EXLM`](keycodes_us_ansi_shifted.md)|`KC_EXCLAIM`|exclamation mark `!`| +|[`KC_AT`](keycodes_us_ansi_shifted.md)||at sign `@`| +|[`KC_HASH`](keycodes_us_ansi_shifted.md)||hash sign `#`| +|[`KC_DLR`](keycodes_us_ansi_shifted.md)|`KC_DOLLAR`|dollar sign `$`| +|[`KC_PERC`](keycodes_us_ansi_shifted.md)|`KC_PERCENT`|percent sign `%`| +|[`KC_CIRC`](keycodes_us_ansi_shifted.md)|`KC_CIRCUMFLEX`|circumflex `^`| +|[`KC_AMPR`](keycodes_us_ansi_shifted.md)|`KC_AMPERSAND`|ampersand `&`| +|[`KC_ASTR`](keycodes_us_ansi_shifted.md)|`KC_ASTERISK`|asterisk `*`| +|[`KC_LPRN`](keycodes_us_ansi_shifted.md)|`KC_LEFT_PAREN`|left parenthesis `(`| +|[`KC_RPRN`](keycodes_us_ansi_shifted.md)|`KC_RIGHT_PAREN`|right parenthesis `)`| +|[`KC_UNDS`](keycodes_us_ansi_shifted.md)|`KC_UNDERSCORE`|underscore `_`| +|[`KC_PLUS`](keycodes_us_ansi_shifted.md)||plus sign `+`| +|[`KC_LCBR`](keycodes_us_ansi_shifted.md)|`KC_LEFT_CURLY_BRACE`|left curly brace `{`| +|[`KC_RCBR`](keycodes_us_ansi_shifted.md)|`KC_RIGHT_CURLY_BRACE`|right curly brace `}`| +|[`KC_LT`/`KC_LABK`](keycodes_us_ansi_shifted.md)|`KC_LEFT_ANGLE_BRACKET`|left angle bracket `<`| +|[`KC_GT`/`KC_RABK`](keycodes_us_ansi_shifted.md)|`KC_RIGHT_ANGLE_BRACKET`|right angle bracket `>`| +|[`KC_COLN`](keycodes_us_ansi_shifted.md)|`KC_COLON`|colon `:`| +|[`KC_PIPE`](keycodes_us_ansi_shifted.md)||pipe `\|`| +|[`KC_QUES`](keycodes_us_ansi_shifted.md)|`KC_QUESTION`|question mark `?`| +|[`KC_DQT`/`KC_DQUO`](keycodes_us_ansi_shifted.md)|`KC_DOUBLE_QUOTE`|double quote `"`| +|[`LT(layer, kc)`](feature_common_shortcuts.md#switching-and-toggling-layers)||turn on layer (0-15) when held, kc ([basic keycodes](keycodes_basic.md)) when tapped| +|[`TO(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||turn on layer when depressed| +|[`MO(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||momentarily turn on layer when depressed (requires `KC_TRNS` on destination layer)| +|[`DF(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||sets the base (default) layer| +|[`TG(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||toggle layer on/off| +|[`TT(layer)`](feature_common_shortcuts.md#switching-and-toggling-layers)||tap toggle? idk FIXME`| +|[`OSM(mod)`](quantum_keycodes.md#one-shot-keys)||hold mod for one keypress| +|[`OSL(layer)`](quantum_keycodes.md#one-shot-keys)||switch to layer for one keypress| +|[`UNICODE(n)`](unicode.md)|[`UC(n)`](unicode.md)|if `UNICODE_ENABLE`, this will send characters up to `0x7FFF`| +|[`X(n)`](unicode.md)||if `UNICODEMAP_ENABLE`, also sends unicode via a different method| diff --git a/docs/keycodes_basic.md b/docs/keycodes_basic.md new file mode 100644 index 0000000000..b1f69ab167 --- /dev/null +++ b/docs/keycodes_basic.md @@ -0,0 +1,192 @@ +# Basic keycodes + +Basic keycodes are based on [HID Usage Keyboard/Keypad Page(0x07)](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) with following exceptions: + +* `KC_NO` = 0 for no action +* `KC_TRNS` = 1 for layer transparency +* internal special keycodes in the `0xA5-DF` range (tmk heritage). + +## Letters and Numbers + +|KC_1|KC_2|KC_3|KC_4|KC_5|KC_6|KC_7|KC_8| +|----|----|----|----|----|----|----|----| +|KC_9|KC_0|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_F13|KC_F14| +|KC_F15|KC_F16|KC_F17|KC_F18|KC_F19|KC_F20|KC_F21|KC_F22| +|KC_F23|KC_F24|KC_A|KC_B|KC_C|KC_D|KC_E|KC_F| +|KC_G|KC_H|KC_I|KC_J|KC_K|KC_L|KC_M|KC_N| +|KC_O|KC_P|KC_Q|KC_R|KC_S|KC_T|KC_U|KC_V| +|KC_W|KC_X|KC_Y|KC_Z||||| + +## Punctuation + +|Long Name|Short Name|Description| +|---------|----------|-----------| +|KC_ENTER|KC_ENT|`Return (ENTER)`| +|KC_ESCAPE|KC_ESC|`ESCAPE`| +|KC_BSPACE|KC_BSPC|`DELETE (Backspace)`| +|KC_TAB||`Tab`| +|KC_SPACE|KC_SPC|Spacebar| +|KC_MINUS|KC_MINS|`-` and `_`| +|KC_EQUAL|KC_EQL|`=` and `+`| +|KC_LBRACKET|KC_LBRC|`[` and `{`| +|KC_RBRACKET|KC_RBRC|`]` and `}`| +|KC_BSLASH|KC_BSLS|`\` and | | +|KC_NONUS_HASH|KC_NUHS|Non-US `#` and `~`| +|KC_NONUS_BSLASH|KC_NUBS|Non-US `\` and | | +|KC_INT1|KC_RO|JIS `\` and | | +|KC_INT2|KC_KANA|International216| +|KC_INT3|KC_JYEN|Yen Symbol (`Â¥`)| +|KC_SCOLON|KC_SCLN|`;` and `:`| +|KC_QUOTE|KC_QUOT|`‘` and `“`| +|KC_GRAVE|KC_GRV|Grave Accent and Tilde| +|KC_COMMA|KC_COMM|`,` and `<`| +|KC_DOT||`.` and `>`| +|KC_SLASH|KC_SLSH|`/` and `?`| +|KC_CAPSLOCK|KC_CAPS|Caps Lock| + +## Modifiers + +|Long Name|Short Name|Description| +|---------|----------|-----------| +|KC_LCTRL|KC_LCTL|LeftControl| +|KC_LSHIFT|KC_LSFT|LeftShift| +|KC_LALT||LeftAlt| +|KC_LGUI||Left GUI(Windows/Apple/Meta key)| +|KC_RCTRL|KC_RCTL|RightControl| +|KC_RSHIFT|KC_RSFT|RightShift| +|KC_RALT||RightAlt| +|KC_RGUI||Right GUI(Windows/Apple/Meta key)| +|KC_LOCKING_CAPS|KC_LCAP|Locking Caps Lock| +|KC_LOCKING_NUM|KC_LNUM|Locking Num Lock| +|KC_LOCKING_SCROLL|KC_LSCR|Locking Scroll Lock| +|KC_INT4|KC_HENK|JIS Henken| +|KC_INT5|KC_MHEN|JIS Muhenken| + +## Commands + +|Long Name|Short Name|Description| +|---------|----------|-----------| +|KC_PSCREEN|KC_PSCR|PrintScreen| +|KC_SCROLLLOCK|KC_SLCK|Scroll Lock| +|KC_PAUSE|KC_PAUS|Pause| +|KC_INSERT|KC_INS|Insert| +|KC_HOME||Home| +|KC_PGUP||PageUp| +|KC_DELETE|KC_DEL|Delete Forward| +|KC_END||End| +|KC_PGDOWN|KC_PGDN|PageDown| +|KC_RIGHT|KC_RGHT|RightArrow| +|KC_LEFT||LeftArrow| +|KC_DOWN||DownArrow| +|KC_UP||UpArrow| +|KC_APPLICATION|KC_APP|Application| +|KC_POWER||Power| +|KC_EXECUTE||Execute| +|KC_HELP||Help| +|KC_MENU||Menu| +|KC_SELECT||Select| +|KC_AGAIN||Again| +|KC_UNDO||Undo| +|KC_CUT||Cut| +|KC_COPY||Copy| +|KC_PASTE||Paste| +|KC_FIND||Find| +|KC_ALT_ERASE||Alternate Erase| +|KC_SYSREQ||SysReq/Attention| +|KC_CANCEL||Cancel| +|KC_CLEAR||Clear| +|KC_PRIOR||Prior| +|KC_RETURN||Return| +|KC_SEPARATOR||Separator| +|KC_OUT||Out| +|KC_OPER||Oper| +|KC_CLEAR_AGAIN||Clear/Again| +|KC_CRSEL||CrSel/Props| +|KC_EXSEL||ExSel| +|KC_SYSTEM_POWER|KC_PWR|System Power Down| +|KC_SYSTEM_SLEEP|KC_SLEP|System Sleep| +|KC_SYSTEM_WAKE|KC_WAKE|System Wake| +|KC_MAIL|KC_MAIL|| +|KC_CALCULATOR|KC_CALC|| +|KC_MY_COMPUTER|KC_MYCM|| +|KC_WWW_SEARCH|KC_WSCH|| +|KC_WWW_HOME|KC_WHOM|| +|KC_WWW_BACK|KC_WBAK|| +|KC_WWW_FORWARD|KC_WFWD|| +|KC_WWW_STOP|KC_WSTP|| +|KC_WWW_REFRESH|KC_WREF|| +|KC_WWW_FAVORITES|KC_WFAV|| + +## Media Keys + +Windows and Mac use different key codes for next track and previous track. Make sure you choose the keycode that corresponds to your OS. + +|Long Name|Short Name|Description| +|---------|----------|-----------| +|KC_STOP||Stop| +|KC__MUTE||Mute| +|KC__VOLUP||Volume Up| +|KC__VOLDOWN||Volume Down| +|KC_AUDIO_MUTE|KC_MUTE|| +|KC_AUDIO_VOL_UP|KC_VOLU|| +|KC_AUDIO_VOL_DOWN|KC_VOLD|| +|KC_MEDIA_NEXT_TRACK|KC_MNXT|Next Track (Windows)| +|KC_MEDIA_PREV_TRACK|KC_MPRV|Previous Track (Windows)| +|KC_MEDIA_FAST_FORWARD|KC_MFFD|Next Track (macOS)| +|KC_MEDIA_REWIND|KC_MRWD|Previous Track (macOS)| +|KC_MEDIA_STOP|KC_MSTP|| +|KC_MEDIA_PLAY_PAUSE|KC_MPLY|| +|KC_MEDIA_SELECT|KC_MSEL|| + +## Numpad + +|Long Name|Short Name|Description| +|---------|----------|-----------| +|KC_NUMLOCK|KC_NLCK|Keypad Num Lock and Clear| +|KC_KP_SLASH|KC_PSLS|Keypad /| +|KC_KP_ASTERISK|KC_PAST|Keypad *| +|KC_KP_MINUS|KC_PMNS|Keypad -| +|KC_KP_PLUS|KC_PPLS|Keypad +| +|KC_KP_ENTER|KC_PENT|Keypad ENTER| +|KC_KP_1|KC_P1|Keypad 1 and End| +|KC_KP_2|KC_P2|Keypad 2 and Down Arrow| +|KC_KP_3|KC_P3|Keypad 3 and PageDn| +|KC_KP_4|KC_P4|Keypad 4 and Left Arrow| +|KC_KP_5|KC_P5|Keypad 5| +|KC_KP_6|KC_P6|Keypad 6 and Right Arrow| +|KC_KP_7|KC_P7|Keypad 7 and Home| +|KC_KP_8|KC_P8|Keypad 8 and Up Arrow| +|KC_KP_9|KC_P9|Keypad 9 and PageUp| +|KC_KP_0|KC_P0|Keypad 0 and Insert| +|KC_KP_DOT|KC_PDOT|Keypad . and Delete| +|KC_KP_EQUAL|KC_PEQL|Keypad =| +|KC_KP_COMMA|KC_PCMM|Keypad Comma| +|KC_KP_EQUAL_AS400||Keypad Equal Sign| + +## Special Keys + +|Long Name|Short Name|Description| +|---------|----------|-----------| +|KC_NO||Ignore this key. (NOOP) | + +## Mousekey + +|Long Name|Short Name|Description| +|---------|----------|-----------| +|KC_MS_UP|KC_MS_U|Mouse Cursor Up| +|KC_MS_DOWN|KC_MS_D|Mouse Cursor Down| +|KC_MS_LEFT|KC_MS_L|Mouse Cursor Left| +|KC_MS_RIGHT|KC_MS_R|Mouse Cursor Right| +|KC_MS_BTN1|KC_BTN1|Mouse Button 1| +|KC_MS_BTN2|KC_BTN2|Mouse Button 2| +|KC_MS_BTN3|KC_BTN3|Mouse Button 3| +|KC_MS_BTN4|KC_BTN4|Mouse Button 4| +|KC_MS_BTN5|KC_BTN5|Mouse Button 5| +|KC_MS_WH_UP|KC_WH_U|Mouse Wheel Up| +|KC_MS_WH_DOWN|KC_WH_D|Mouse Wheel Down| +|KC_MS_WH_LEFT|KC_WH_L|Mouse Wheel Left| +|KC_MS_WH_RIGHT|KC_WH_R|Mouse Wheel Right| +|KC_MS_ACCEL0|KC_ACL0|Mouse Acceleration 0| +|KC_MS_ACCEL1|KC_ACL1|Mouse Acceleration 1| +|KC_MS_ACCEL2|KC_ACL2|Mouse Acceleration 2| diff --git a/docs/keycodes_us_ansi_shifted.md b/docs/keycodes_us_ansi_shifted.md new file mode 100644 index 0000000000..6c7ef4caaa --- /dev/null +++ b/docs/keycodes_us_ansi_shifted.md @@ -0,0 +1,31 @@ +# US ANSI Shifted symbols + +These keycodes correspond to characters that are "shifted" on a standard US ANSI keyboards. They do not have dedicated keycodes but are instead typed by holding down shift and then sending a keycode. + +It's important to remember that all of these keycodes send a left shift - this may cause unintended actions if unaccounted for. The short code is preferred in most situations. + +## US ANSI Shifted Keycodes + +|Short Name|Long Name|Description| +|----------|---------|-----------| +|`KC_TILD`|`KC_TILDE`|tilde `~`| +|`KC_EXLM`|`KC_EXCLAIM`|exclamation mark `!`| +|`KC_AT`||at sign `@`| +|`KC_HASH`||hash sign `#`| +|`KC_DLR`|`KC_DOLLAR`|dollar sign `$`| +|`KC_PERC`|`KC_PERCENT`|percent sign `%`| +|`KC_CIRC`|`KC_CIRCUMFLEX`|circumflex `^`| +|`KC_AMPR`|`KC_AMPERSAND`|ampersand `&`| +|`KC_ASTR`|`KC_ASTERISK`|asterisk `*`| +|`KC_LPRN`|`KC_LEFT_PAREN`|left parenthesis `(`| +|`KC_RPRN`|`KC_RIGHT_PAREN`|right parenthesis `)`| +|`KC_UNDS`|`KC_UNDERSCORE`|underscore `_`| +|`KC_PLUS`||plus sign `+`| +|`KC_LCBR`|`KC_LEFT_CURLY_BRACE`|left curly brace `{`| +|`KC_RCBR`|`KC_RIGHT_CURLY_BRACE`|right curly brace `}`| +|`KC_LT`/`KC_LABK`|`KC_LEFT_ANGLE_BRACKET`|left angle bracket `<`| +|`KC_GT`/`KC_RABK`|`KC_RIGHT_ANGLE_BRACKET`|right angle bracket `>`| +|`KC_COLN`|`KC_COLON`|colon `:`| +|`KC_PIPE`||pipe `\|`| +|`KC_QUES`|`KC_QUESTION`|question mark `?`| +|`KC_DQT`/`KC_DQUO`|`KC_DOUBLE_QUOTE`|double quote `"`| diff --git a/docs/keymap.md b/docs/keymap.md index 53b17f4019..170fdaed7d 100644 --- a/docs/keymap.md +++ b/docs/keymap.md @@ -215,8 +215,7 @@ To actually handle the keypress event we define an `action_function()`. This fun This should have given you a basic overview for creating your own keymap. For more details see the following resources: -* https://github.com/qmk/qmk_firmware/wiki/Keycodes -* https://github.com/qmk/qmk_firmware/wiki/FAQ-Keymap -* https://github.com/qmk/qmk_firmware/wiki/Keymap-examples +* [Keycodes](keycodes.md) +* [Keymap FAQ](faq_keymap.md) -We are actively working to improve these docs. If you have suggestions for how they could be made better please [file an issue](https://github.com/qmk/qmk_firmware/issues/new)! \ No newline at end of file +We are actively working to improve these docs. If you have suggestions for how they could be made better please [file an issue](https://github.com/qmk/qmk_firmware/issues/new)! diff --git a/docs/keymap_examples.md b/docs/keymap_examples.md deleted file mode 100644 index 0940119317..0000000000 --- a/docs/keymap_examples.md +++ /dev/null @@ -1,37 +0,0 @@ -# Share your keymap idea here! -https://github.com/tmk/tmk_keyboard/issues/265 - ---- - -## Reverse-shifted for numbers -With pressing Shift and '1' key you get **1** while with just '1' key you get **!**. -- https://geekhack.org/index.php?topic=41989.msg1959718#msg1959718 - - -## KBT Pure layout -Keymap code on Alps64 -https://github.com/thisisshi/tmk_keyboard/blob/15fe63e8d181a8a95988dcc71929f0024df55caa/keyboard/alps64/keymap_pure.c - -and guide. -https://github.com/thisisshi/tmk_keyboard/blob/77ac0805ade565fb23657e3644c920ada71edccf/keyboard/alps64/Guide.md - -## Prevent stuck modifiers - -Consider the following scenario: - -1. Layer 0 has a key defined as Shift. -2. The same key is defined on layer 1 as the letter A. -3. User presses Shift. -4. User switches to layer 1 for whatever reason. -5. User releases Shift, or rather the letter A. -6. User switches back to layer 0. - -Shift was actually never released and is still considered pressed. - -If such situation bothers you add this to your `config.h`: - - #define PREVENT_STUCK_MODIFIERS - -This option uses 5 bytes of memory per every 8 keys on the keyboard -rounded up (5 bits per key). For example on Planck (48 keys) it uses -(48/8)\*5 = 30 bytes. diff --git a/docs/keymap_old.md b/docs/keymap_old.md deleted file mode 100644 index 3ea138ea8f..0000000000 --- a/docs/keymap_old.md +++ /dev/null @@ -1,685 +0,0 @@ -Keymap framework - how to define your keymap -============================================ -***NOTE: This is updated for QMK but this is still work in progress. This may still be inconsistent with the source code.*** - -QMK is based on TMK. Understanding the essential changes made should help you understand variable names etc. - -## TMK vs. QMK - -| Firmware |TMK |QMK | -|---------------------------|-----------------------|-------------------------| -| Maintainer |hasu |Jack Humbert et al. | -| Build path customization | `TMK_DIR = ...` | `include .../Makefile` | -| `keymaps` data | 3D array of `uint8_t` holding **keycode** | 3D array of `uint16_t` holding **action code** | -| `fn_actions` data | 1D array of `uint16_t` holding **action code** | 1D array of `uint16_t` holding **action code** | - -Since QMK is based on TMK and uses major portion of TMK code as is, understanding the essential changes made should help you understand the code. - -## 0. Keymap and layers -In QMK, **`const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS]`** holds multiple **layers** of keymap information in **16 bit** data holding the **action code**. You can define **32 layers** at most. - -For trivial key definitions, the higher 8 bits of the **action code** are all 0 and the lower 8 bits holds the USB HID usage code generated by the key as **keycode**. - -Respective layers can be validated simultaneously. Layers are indexed with 0 to 31 and higher layer has precedence. - - Keymap: 32 Layers Layer: action code matrix - ----------------- --------------------- - stack of layers array_of_action_code[row][column] - ____________ precedence _______________________ - / / | high / ESC / F1 / F2 / F3 .... - 31 /___________// | /-----/-----/-----/----- - 30 /___________// | / TAB / Q / W / E .... - 29 /___________/ | /-----/-----/-----/----- - : _:_:_:_:_:__ | : /LCtrl/ A / S / D .... - : / : : : : : / | : / : : : : - 2 /___________// | 2 `-------------------------- - 1 /___________// | 1 `-------------------------- - 0 /___________/ V low 0 `-------------------------- - - -Sometimes, the action code stored in keymap may be referred as keycode in some documents due to the TMK history. - -### 0.1 Keymap layer status -Keymap layer has its state in two 32 bit parameters: - -* **`default_layer_state`** indicates a base keymap layer(0-31) which is always valid and to be referred. -* **`layer_state`** () has current on/off status of the layer on its each bit. - -Keymap has its state in two parameter **`default_layer`** indicates a base keymap layer(0-31) which is always valid and to be referred, **`keymap_stat`** is 16bit variable which has current on/off status of layers on its each bit. -Keymap layer '0' is usually `default_layer` and which is the only valid layer and other layers is initially off after boot up firmware, though, you can configured them in `config.h`. -To change `default_layer` will be useful when you switch key layout completely, say you want Colmak instead of Qwerty. - - Initial state of Keymap Change base layout - ----------------------- ------------------ - - 31 31 - 30 30 - 29 29 - : : - : : ____________ - 2 ____________ 2 / / - 1 / / ,->1 /___________/ - ,->0 /___________/ | 0 - | | - `--- default_layer = 0 `--- default_layer = 1 - layer_state = 0x00000001 layer_state = 0x00000002 - -On the other hand, you shall change `layer_state` to overlay base layer with some layers for feature such as navigation keys, function key(F1-F12), media keys or special actions. - - Overlay feature layer - --------------------- bit|status - ____________ ---+------ - 31 / / 31 | 0 - 30 /___________// -----> 30 | 1 - 29 /___________/ -----> 29 | 1 - : : | : - : ____________ : | : - 2 / / 2 | 0 - ,->1 /___________/ -----> 1 | 1 - | 0 0 | 0 - | + - `--- default_layer = 1 | - layer_state = 0x60000002 <-' - - - -### 0.2 Layer Precedence and Transparency -Note that ***higher layer has higher priority on stack of layers***, namely firmware falls down from top layer to bottom to look up keycode. Once it spots keycode other than **`KC_TRNS`**(transparent) on a layer it stops searching and lower layers aren't referred. - -You can place `KC_TRANS` on overlay layer changes just part of layout to fall back on lower or base layer. -Key with `KC_TRANS` (`KC_TRNS` and `_______` are the alias) doesn't has its own keycode and refers to lower valid layers for keycode, instead. -See example below. - - -### 0.3 Keymap Example -Keymap in this QMK is **`static const uint16_t PROGMEM keymaps[]`** C array in fact and you can define layers in it with **`KEYMAP()`** C macro and keycodes. To use complex actions you need to define `Fn` keycode in **`fn_actions[]`** array. It holds the 16 bit quantum keycode (action code). - -> Please note that keymap in the TMK, which QMK was forked from, is **`static const uint8_t PROGMEM keymaps[]`** C array which holds the 8 bit keycode (~USB HID usage code). - -This is a keymap example for [HHKB](http://en.wikipedia.org/wiki/Happy_Hacking_Keyboard) keyboard. -This example has three layers, 'QWERTY' as base layer, 'FN' and 'MOUSE'. - -In this example, - - `MO(layer)` is a **momentary layer switching** key. - -You can find other keymap definitions in file `keymap.c` located on project directories. -``` -/* - * dbroqua HHKB Layout - */ -#include "hhkb.h" - -#define BASE 0 -#define FN 1 -#define MOUSE 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* BASE Level: Default Layer - * ,-----------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | - * |-----------------------------------------------------------------------------------------+ - * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | - * |-----------------------------------------------------------------------------------------+ - * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | - * |-----------------------------------------------------------------------------------------+ - * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | fn | - * +-----------------------------------------------------------------------------------------+ - * | Gui | Alt | Space | AltGr |Mouse| - * `----------------------------------------------------------------´ - */ - [BASE] = KEYMAP( - 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_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_LCTL, 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_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, MO(MOUSE) - ), - - /* FN Layer - * ,-----------------------------------------------------------------------------------------. - * | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | Ins | Del| - * |-----------------------------------------------------------------------------------------+ - * | Caps | | | | | | | |PrtSc| Slck| Paus| Up | | | - * |-----------------------------------------------------------------------------------------+ - * | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left |Right| | - * |-----------------------------------------------------------------------------------------+ - * | | Prev| Play| Next| | | + | - | End |PgDwn| Down| | | - * +-----------------------------------------------------------------------------------------+ - * | | | | Stop | | - * `----------------------------------------------------------------´ - */ - [FN] = KEYMAP( - KC_PWR, 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_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \ - KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_TRNS - ), - - /* MOUSE Layer - * ,-----------------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------------------------------------+ - * | | | WUp | | | | | | | | Btn1| Up | Btn2| | - * |-----------------------------------------------------------------------------------------+ - * | | WLt | WDn | WRt | | | | | | | Left |Right| | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | | | Btn3| Down| | | - * +-----------------------------------------------------------------------------------------+ - * | | | | | | - * `----------------------------------------------------------------´ - */ - [MOUSE] = KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, \ - KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_R, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, KC_MS_D, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ) -}; - -const uint16_t PROGMEM fn_actions[] = { - -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; -``` - - -## 1. Keycode -See [`tmk_core/common/keycode.h`](../tmk_core/common/keycode.h) or keycode table below for the detail. Keycode is internal **8bit code** to indicate action performed on key in keymap. Keycodes are based on [HID Usage Keyboard/Keypad Page(0x07)](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) plus special codes in the `0xA5-DF` range. - -Keycode has `KC_` prefixed symbol respectively. Most of keycodes like `KC_A` have simple action registers key to host on press and unregister on release, while some of other keycodes has some special actions like `Fn` keys, Media control keys, System control keys and Mousekeys. - -keymaps[] - -In `KEYMAP()` macro, TMK recommends you to keep prefix part `KC_` of keycode to keep keymap compact. For example, just use `A` instead you place `KC_A` in `KEYMAP()`. But this doesn't apply for QMK. - -The `KEYMAP()` macro defines correspondence between the physical key location to the electrical key connection. - -Some keycodes has 7-letter **short name** such as `KC_COMM` in addition to descriptive name `KC_COMMA`, you'll prefer short one in `KEYMAP()`. - -### 1.0 Other key -- `KC_NO` for no action -- `KC_TRNS` for layer transparency (See above) - -### 1.1 Normal key -- `KC_A` to `KC_Z`, `KC_1` to `KC_0` for alpha numeric key -- `KC_MINS`, `KC_EQL`, `KC_GRV`, `KC_RBRC`, `KC_LBRC`, `KC_COMM`, `KC_DOT`, `KC_BSLS`, `KC_SLSH`, `KC_SCLN`, `KC_QUOT` -- `KC_ESC`, `KC_TAB`, `KC_SPC`, `KC_BSPC`, `KC_ENT`, `KC_DEL`, `KC_INS` -- `KC_UP`, `KC_DOWN`, `KC_RGHT`, `KC_LEFT`, `KC_PGUP`, `KC_PGDN`, `KC_HOME`, `KC_END` -- `KC_CAPS`, `KC_NLCK`, `KC_SLCK`, `KC_PSCR`, `KC_PAUS`, `KC_APP`, `KC_F1` to `KC_F24` -- `KC_P1` to `KC_P0`, `KC_PDOT`, `KC_PCMM`, `KC_PSLS`, `KC_PAST`, `KC_PMNS`, `KC_PPLS`, `KC_PEQL`, `KC_PENT` for keypad. - -### 1.2 Modifier -There are 8 modifiers which has discrimination between left and right. - -- `KC_LCTL` and `KC_RCTL` for Control -- `KC_LSFT` and `KC_RSFT` for Shift -- `KC_LALT` and `KC_RALT` for Alt -- `KC_LGUI` and `KC_RGUI` for Windows key or Command key in Mac - -### 1.3 Mousekey -- `KC_MS_U`, `KC_MS_D`, `KC_MS_L`, `KC_MS_R` for mouse cursor -- `KC_WH_U`, `KC_WH_D`, `KC_WH_L`, `KC_WH_R` for mouse wheel -- `KC_BTN1`, `KC_BTN2`, `KC_BTN3`, `KC_BTN4`, `KC_BTN5` for mouse buttons - -### 1.4 System & Media key -- `KC_PWR`, `KC_SLEP`, `KC_WAKE` for Power, Sleep, Wake -- `KC_MUTE`, `KC_VOLU`, `KC_VOLD` for audio volume control -- `KC_MNXT`, `KC_MPRV`, `KC_MSTP`, `KC_MPLY`, `KC_MSEL` for media control -- `KC_MAIL`, `KC_CALC`, `KC_MYCM` for application launch -- `KC_WSCH`, `KC_WHOM`, `KC_WBAK`, `KC_WFWD`, `KC_WSTP`, `KC_WREF`, `KC_WFAV` for web browser operation - -### 1.5 Fn key -You don't need to use this functionality under QMK since this is a backward compatibility functionality. Unlike TMK, you can write action code itself directly in **`static const uint16_t PROGMEM keymaps[]`** C array using `MO(layer)`, etc. - -`KC_FNnn` are keycodes for `Fn` key which not given any actions at the beginning unlike most of keycodes has its own inborn action. To use these keycodes in `KEYMAP()` you need to assign action you want at first. Action of `Fn` key is defined in `fn_actions[]` and its index of the array is identical with number part of `KC_FNnn`. Thus `KC_FN0` keycode indicates the action defined in first element of the array. ***Only 32 `Fn` keys can be defined at most.*** - - -### 1.6 Keycode Table - See keycode table in [`doc/keycode.txt`](./keycode.txt) for description of keycodes. - - In regard to implementation side most of keycodes are identical with [HID usage][HID_usage](pdf) sent to host for real and some virtual keycodes are defined to support special actions. -[HID_usage]: http://www.usb.org/developers/hidpage/Hut1_12v2.pdf - - - -## 2. Action -See [`common/action_code.h`](../common/action_code.h). Action is a **16bit code** and defines function to perform on events of a key like press, release, holding and tapping. - -Most of keys just register 8bit scancode to host, but to support other complex features needs 16bit extended action codes internally. However, using 16bit action codes in keymap results in double size in memory compared to using just keycodes. To avoid this waste 8bit keycodes are used in `KEYMAP()` instead of action codes. - -***You can just use keycodes of `Normal key`, `Modifier`, `Mousekey` and `System & Media key` in keymap*** to indicate corresponding actions instead of using action codes. While ***to use other special actions you should use keycode of `Fn` key defined in `fn_actions[]`.*** - - -### 2.1 Key Action -This is a simple action that registers scancodes(HID usage in fact) to host on press event of key and unregister on release. - -#### Parameters -+ **mods**: { ` MOD_LCTL`, ` MOD_LSFT`, ` MOD_LALT`, ` MOD_LGUI`, - ` MOD_RCTL`, ` MOD_RSFT`, ` MOD_RALT`, ` MOD_RGUI` } -+ **key**: keycode - - -#### 2.1.1 Normal key and Modifier -***This action usually won't be used expressly in keymap*** because you can just use keycodes in `KEYMAP()` instead. - -You can define these actions on *'A'* key and *'left shift'* modifier with: - - ACTION_KEY(KC_A) - ACTION_KEY(KC_LSFT) - -#### 2.1.2 Modified key -This action is comprised of strokes of modifiers and a key. `Macro` action is needed if you want more complex key strokes. - -Say you want to assign a key to `Shift + 1` to get character *'!'* or `Alt + Tab` to switch application windows. - - ACTION_MODS_KEY(MOD_LSFT, KC_1) - ACTION_MODS_KEY(MOD_LALT, KC_TAB) - -Or `Alt,Shift + Tab` can be defined. `ACTION_MODS_KEY(mods, key)` requires **4-bit modifier state** and a **keycode** as arguments. See `keycode.h` for `MOD_BIT()` macro. - - ACTION_MODS_KEY(MOD_LALT | MOD_LSFT, KC_TAB) - -#### 2.1.3 Multiple Modifiers -Registers multiple modifiers with pressing a key. To specify multiple modifiers use `|`. - - ACTION_MODS(MOD_ALT | MOD_LSFT) - -#### 2.1.3 Modifier with Tap key([Dual role][dual_role]) -Works as a modifier key while holding, but registers a key on tap(press and release quickly). - - - ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT) - - - -### 2.2 Layer Action -These actions operate layers of keymap. - -#### Parameters -You can specify a **target layer** of action and **when the action is executed**. Some actions take a **bit value** for bitwise operation. - - -+ **layer**: `0`-`31` -+ **on**: { `ON_PRESS` | `ON_RELEASE` | `ON_BOTH` } -+ **bits**: 4-bit value and 1-bit mask bit - - -#### 2.2.1 Default Layer -Default Layer is a layer which always is valid and referred to when actions is not defined on other overlay layers. - -This sets Default Layer to given parameter `layer` and activate it. - - ACTION_DEFAULT_LAYER_SET(layer) - - -#### 2.2.2 Momentary -Turns on `layer` momentarily while holding, in other words it activates when key is pressed and deactivate when released. - - ACTION_LAYER_MOMENTARY(layer) - - -#### 2.2.3 Toggle Switch -Turns on `layer` with first type(press and release) and turns off with next. - - ACTION_LAYER_TOGGLE(layer) - - -#### 2.2.4 Momentary Switch with tap key -Turns on `layer` momentary while holding, but registers key on tap(press and release quickly). - - ACTION_LAYER_TAP_KEY(layer, key) - - -#### 2.2.5 Momentary Switch with tap toggle -Turns on `layer` momentary while holding and toggles it with serial taps. - - ACTION_LAYER_TAP_TOGGLE(layer) - - -#### 2.2.6 Invert state of layer -Inverts current state of `layer`. If the layer is on it becomes off with this action. - - ACTION_LAYER_INVERT(layer, on) - - -#### 2.2.7 Turn On layer -Turns on layer state. - - ACTION_LAYER_ON(layer, on) - -Turns on layer state on press and turns off on release. - - ACTION_LAYER_ON_OFF(layer) - - -#### 2.2.8 Turn Off layer -Turns off layer state. - - ACTION_LAYER_OFF(layer, on) - -Turns off layer state on press and activates on release. - - ACTION_LAYER_OFF_ON(layer) - - -#### 2.2.9 Set layer -Turn on layer only. -`layer_state = (1< ((bits< diff --git a/docs/kiibohd.asciidoc b/docs/kiibohd.asciidoc deleted file mode 100644 index 4a7ee64d8c..0000000000 --- a/docs/kiibohd.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -== KLL vs TMK -1. **Shift** = Memontary -1. Latch = One shot -1. Lock = Toggle - -## KLL terminology -### Fall-through -When a key is undefined on a particular layer, the key -definition on the previously stacked layer will be used. Eventually -the key definition will be set to using the default layer. If the None -keyword is used, then the fall-through will stop and no action will -take place. -###Latch -When referring to keyboards, a key function that is only enabled -until the release of the next keypress. -###Lock -When referring to keyboards, a key function that is enabled until -that key is pressed again (e.g. Caps Lock). -### NKRO -N-Key Rollover is the capability to press N number of keys at the -same time on a keyboard and have them all register on the OS simultaneously. -### Scan Code -Row x Column code or native protocol code used by the keyboard. -### Shift -When referring to keyboards, a key function that is enabled while -that key is held. -### USB Code -Keyboard Press/Release codes as defined by the USB HID -Spec. \ No newline at end of file diff --git a/docs/license_clarification.md b/docs/license_clarification.md deleted file mode 100644 index cf30619b91..0000000000 --- a/docs/license_clarification.md +++ /dev/null @@ -1,38 +0,0 @@ -# Overview - -As raised in #1038 and other issues, the licensing status of QMK is not clear. In an effort to remove ambiguity and to clarify the licensing status of the quantum code we are identifying the providence of our source code files and clarifying what license applies to each one. - -# Signoff - -This section documents the people who need to sign off on applying the GPL to one or more of their contributions. If your name appears below and you consent to applying the GPL to your contributions, please put today's date in the last field of your row. Please stick to the following date format: 2017 Jan 28 - -Username | Files | Sign Off Date | ----------|-------|---------------| -@0xdec | quantum/rgblight.c | 2017 Jan 29 | -@algernon | quantum/quantum.c
quantum/quantum.h
quantum/process_keycode/process_tap_dance.c
quantum/process_keycode/process_tap_dance.h
quantum/process_keycode/process_unicode.c
quantum/process_keycode/process_unicode.h | 2017 Jan 29 | -@cdlm | quantum/template/template.c
quantum/template/template.h | 2017 Feb 03 | -@DidierLoiseau | quantum/keymap_extras/keymap_canadian_multilingual.h
quantum/keymap_extras/keymap_bepo.h |2017 Jan 29 | -@eltang | quantum/config_common.h
quantum/matrix.c
quantum/quantum.c
quantum/quantum.h
quantum/rgblight.c
quantum/rgblight.h
quantum/template/config.h | 2017 Feb 28 | -@ezuk | quantum/matrix.c
quantum/quantum.c
quantum/quantum.h
quantum/quantum_keycodes.h
quantum/rgblight.c
quantum/rgblight.h
quantum/keymap_extras/keymap_colemak.h
quantum/keymap_extras/keymap_nordic.h | 2017 Jan 31 | -@fredizzimo | quantum/config_common.h
quantum/keycode_config.h
quantum/keymap.h
quantum/keymap_common.c
quantum/keymap_common.c
quantum/matrix.c
quantum/quantum.h
quantum/rgblight.c
quantum/rgblight.h
quantum/api/api_sysex.c | 2017 Jan 29 | -@h-youhei | quantum/keymap_extras/keymap_jp.h | 2017 Jan 28 | -@heartsekai | quantum/keymap_extras/keymap_german_ch.h | 2017 Jan 29 | -@IBnobody | quantum/keycode_config.h
quantum/matrix.c
quantum/quantum.c
quantum/audio/audio.c
quantum/audio/audio.h
quantum/audio/audio_pwm.c
quantum/audio/audio_pwm.c
quantum/audio/voices.c
quantum/audio/voices.h
quantum/template/config.h
quantum/template/template.c | 2017 Jan 30 | -@jackhumbert | quantum/config_common.h
quantum/keycode_config.h
quantum/keymap.h
quantum/keymap_common.c
quantum/light_ws2812.c
quantum/light_ws2812.h
quantum/matrix.c
quantum/quantum.c
quantum/quantum.h
quantum/quantum_keycodes.h
quantum/rgblight.c
quantum/rgblight.h
quantum/api/api_sysex.c
quantum/audio/audio.c
quantum/audio/audio.h
quantum/audio/audio_pwm.c
quantum/audio/audio_pwm.c
quantum/audio/voices.c
quantum/audio/voices.h
quantum/keymap_extras/keymap_colemak.h
quantum/keymap_extras/keymap_dvorak.h
quantum/keymap_extras/keymap_fr_ch.h
quantum/keymap_extras/keymap_french.h
quantum/keymap_extras/keymap_french_osx.h
quantum/keymap_extras/keymap_german.h
quantum/keymap_extras/keymap_german_ch.h
quantum/keymap_extras/keymap_german_osx.h
quantum/keymap_extras/keymap_neo2.h
quantum/keymap_extras/keymap_nordic.h
quantum/keymap_extras/keymap_plover.h
quantum/keymap_extras/keymap_spanish.h
quantum/keymap_extras/keymap_uk.h
quantum/process_keycode/process_midi.c
quantum/process_keycode/process_music.c
quantum/process_keycode/process_tap_dance.c
quantum/process_keycode/process_tap_dance.h
quantum/process_keycode/process_unicode.c
quantum/process_keycode/process_unicode.h
quantum/template/config.h
quantum/template/template.c
quantum/template/template.h | 2017-01-29 | -@jakllsch | quantum/keymap_extras/keymap_dvorak.h
quantum/keymap_extras/keymap_fr_ch.h
quantum/keymap_extras/keymap_french.h
quantum/keymap_extras/keymap_german.h
quantum/keymap_extras/keymap_german_ch.h
quantum/keymap_extras/keymap_nordic.h
quantum/keymap_extras/keymap_spanish.h
quantum/keymap_extras/keymap_uk.h | 2017 Jan 29 | -kuel | quantum/keymap_extras/keymap_unicode_cyrillic.h
quantum/keymap_extras/keymap_russian.h | | -@lindhe | quantum/keymap_extras/keymap_nordic.h
quantum/keymap_extras/keymap_norwegian.h | 2017 Jan 30 | -@matzebond | quantum/keymap_extras/keymap_german.h
quantum/keymap_extras/keymap_neo2.h | 2017 Jan 30 | -@plgruener | quantum/keymap_extras/keymap_german.h
quantum/keymap_extras/keymap_neo2.h | 2017 Jan 30 | -@priyadi | quantum/quantum.c
quantum/process_keycode/process_unicode.c
quantum/process_keycode/process_unicode.h | 2017 Jan 31 | -@pvinis | quantum/quantum.c
quantum/quantum.h
quantum/process_keycode/process_tap_dance.c
quantum/process_keycode/process_tap_dance.h | 2017 Jan 29 | -@Smilliam | quantum/quantum.c | 2017 Feb 25 | -@sperochon | quantum/keymap_extras/keymap_french_osx.h | 2017 Jan 30 | -stephan . bosebeck at holidayinsider.com | quantum/keymap_extras/keymap_german_osx.h | 2017 Feb 15 | -@TerryMathews | quantum/quantum.c | 2017 Jan 29 | -@Twey | quantum/keymap_extras/keymap_plover.h | | -@Vifon | quantum/dynamic_macro.h
quantum/quantum.c | 2017 Feb 09 | -@vincent-pochet | quantum/keymap_extras/keymap_fr_ch.h | 2017 Feb 09 | -@wez | quantum/dynamic_macro.h | 2017 Jan 29 | -@Wilba6582 | quantum/keymap.h
quantum/keymap_common.c
quantum/quantum_keycodes.h | 2017 Feb 15 | -@yangliu | quantum/light_ws2812.c
quantum/light_ws2812.h
quantum/rgblight.c
quantum/rgblight.h | 2017 Jan 30 | \ No newline at end of file diff --git a/docs/license_clarification_details.md b/docs/license_clarification_details.md deleted file mode 100644 index 77ee688bb4..0000000000 --- a/docs/license_clarification_details.md +++ /dev/null @@ -1,1272 +0,0 @@ -# Details - -This page contains details that are no longer relevant to the License Clarification effort. - -## Small Contributions - -Smaller contributions that don't need to sign off on the license change. - -Username | # Lines | Files | ----------|---------|-------| -@AGausmann | 3 | quantum/process_keycode/process_midi.c | -@Chipairon | 2 | quantum/keymap_extras/keymap_spanish.h | -@coderkun | 5 | quantum/process_keycode/process_unicode.c | -@fernandodeperto | 3 | quantum/keymap_extras/keymap_nordic.h | -@jeebak | 8 | quantum/audio/audio_pwm.c | -@Keller-Laminar | 1 | quantum/keymap_extras/keymap_dvorak.h | -kevin at letord.fr | 1 | quantum/keymap_extras/keymap_french.h | -@ofpies | 3 | quantum/config_common.h
quantum/quantum.c | -@MagicianVivi | 2 | quantum/keymap_extras/keymap_bepo.h | -@NoahAndrews | 1 | quantum/template/template.h | -@robertdale | 6 | quantum/process_keycode/process_music.c | -@scott-t-wilson | 3 | quantum/rgblight.c
quantum/rgblight.h | -@skullydazed | 2 | quantum/rgblight.c | -@yoyoerx | 6 | quantum/matrix.c
quantum/template/template.c | - -# Single Author Files - -These are the single author files that still need to have their license clarified. - -* quantum/dynamic_macro.h: @Vifon -* quantum/pincontrol.h: @wez -* quantum/keymap_extras/keymap_canadian_multilingual.h: @DidierLoiseau -* quantum/keymap_extras/keymap_jp.h: @h-youhei -* quantum/keymap_extras/keymap_unicode_cyrillic.h: @kuel -* quantum/keymap_extras/keymap_russian.h: @kuel - -# Multi Author Files - -Each file listed below has more than one author and needs to have copyright resolved. The number of lines contributed by each author is shown as determined by: - -```git blame | cut -f 2 -d '(' | cut -f 1 -d '2' | sort | uniq -c | sed 's/^ */* /'``` - -## quantum/config_common.h - -* 24 Eric Tang -* 2 Fred Sundvik -* 58 Jack Humbert -* 1 ofples - -## quantum/keycode_config.h - -* 5 IBNobody -* 20 Jack Humbert -* 1 fredizzimo - -## quantum/keymap.h - -* 39 Jack Humbert -* 6 Wilba6582 -* 8 fredizzimo - -## quantum/keymap_common.c - -* 1 Fred Sundvik -* 162 Jack Humbert -* 11 Wilba6582 -* 3 fredizzimo - -## quantum/light_ws2812.c - -* 163 Jack Humbert -* 168 Yang Liu - -## quantum/light_ws2812.h - -* 11 Jack Humbert -* 70 Yang Liu - -## quantum/matrix.c - -* 3 Erez Zukerman -* 15 Eric Tang -* 239 IBNobody -* 152 Jack Humbert -* 2 fredizzimo -* 2 yoyoerx - -## quantum/quantum.c - -* 38 Erez Zukerman -* 96 Eric Tang -* 49 Gergely Nagy -* 68 IBNobody -* 4 Jack & Erez -* 561 Jack Humbert -* 2 Ofer Plesser -* 14 Pavlos Vinieratos -* 2 Priyadi Iman Nurcahyo -* 12 Smilliam -* 52 TerryMathews -* 12 Wojciech Siewierski - -## quantum/quantum.h - -* 23 Erez Zukerman -* 4 Eric Tang -* 1 Fred Sundvik -* 3 Gergely Nagy -* 86 Jack Humbert -* 2 Pavlos Vinieratos -* 5 fredizzimo - -## quantum/quantum_keycodes.h - -* 2 Erez Zukerman -* 2 Jack Humbert -* 313 Wilba6582 - -## quantum/rgblight.c - -* 13 Erez Zukerman -* 5 Eric Tang -* 39 Fred Sundvik -* 101 Jack Humbert -* 311 Jordi Orlando -* 1 Scott Wilson -* 147 Yang Liu -* 2 skullY - -## quantum/rgblight.h - -* 3 Erez Zukerman -* 2 Eric Tang -* 6 Fred Sundvik -* 12 Jack Humbert -* 2 Scott Wilson -* 80 Yang Liu - -## quantum/api/api_sysex.c - -* 44 Fred Sundvik -* 13 Jack Humbert - -## quantum/audio/audio.c - -* 318 IBNobody -* 164 Jack Humbert - -## quantum/audio/audio.h - -* 15 IBNobody -* 76 Jack Humbert - -## quantum/audio/audio_pwm.c - -* 642 IBNobody -* 1 Jack Humbert - -## quantum/audio/song_list.h - -* 101 IBNobody -* 16 Jack Humbert -* 8 JeeBak Kim - -## quantum/audio/voices.c - -* 24 IBNobody -* 256 Jack Humbert - -## quantum/audio/voices.h - -* 3 IBNobody -* 32 Jack Humbert - -## quantum/keymap_extras/keymap_bepo.h - -* 308 Didier Loiseau -* 1 Jack Humbert -* 2 Vivien Alger - -## quantum/keymap_extras/keymap_colemak.h - -* 31 Erez Zukerman -* 44 Jack Humbert - -## quantum/keymap_extras/keymap_dvorak.h - -* 69 Jack Humbert -* 15 Jonathan A. Kollasch -* 1 Keller-Laminar - -## quantum/keymap_extras/keymap_fr_ch.h - -* 1 Jack Humbert -* 1 Jonathan A. Kollasch -* 96 Vincent Pochet - -## quantum/keymap_extras/keymap_french.h - -* 80 Jack Humbert -* 2 Jonathan A. Kollasch -* 1 Kévin Letord - -## quantum/keymap_extras/keymap_french_osx.h - -* 1 Jack Humbert -* 76 Sébastien Pérochon - -## quantum/keymap_extras/keymap_german.h - -* 1 Jack Humbert -* 1 Jonathan A. Kollasch -* 58 Matthias Schmitt -* 39 plgruener - -## quantum/keymap_extras/keymap_german_ch.h - -* 1 Jack Humbert -* 1 Jonathan A. Kollasch -* 100 heartsekai - -## quantum/keymap_extras/keymap_german_osx.h - -* 1 Jack Humbert -* 96 Stephan Bösebeck - -## quantum/keymap_extras/keymap_neo2.h - -* 2 Jack Humbert -* 42 Matthias Schmitt -* 19 plgruener - -## quantum/keymap_extras/keymap_nordic.h - -* 1 Andreas Lindhé -* 1 Erez Zukerman -* 3 Fernando Mendonca -* 53 Jack Humbert -* 1 Jonathan A. Kollasch - -## quantum/keymap_extras/keymap_norwegian.h - -* 1 Andreas Lindhé -* 40 joar - -## quantum/keymap_extras/keymap_plover.h - -* 1 Jack Humbert -* 31 James ‘Twey’ Kay - -## quantum/keymap_extras/keymap_spanish.h - -* 59 Jack Humbert -* 1 Jonathan A. Kollasch -* 2 Rubén Díaz-Jorge - -## quantum/keymap_extras/keymap_uk.h - -* 34 Jack Humbert -* 2 Jonathan A. Kollasch - -## quantum/process_keycode/process_midi.c - -* 3 Adam Gausmann -* 65 Jack Humbert - -## quantum/process_keycode/process_music.c - -* 180 Jack Humbert -* 6 Robert Dale - -## quantum/process_keycode/process_tap_dance.c - -* 90 Gergely Nagy -* 38 Jack Humbert -* 8 Pavlos Vinieratos - -## quantum/process_keycode/process_tap_dance.h - -* 22 Gergely Nagy -* 41 Jack Humbert -* 9 Pavlos Vinieratos - -## quantum/process_keycode/process_unicode.c - -* 176 Gergely Nagy -* 24 Jack Humbert -* 84 Priyadi Iman Nurcahyo -* 5 coderkun - -## quantum/process_keycode/process_unicode.h - -* 40 Gergely Nagy -* 117 Jack Humbert -* 10 Priyadi Iman Nurcahyo - -## quantum/template/config.h - -* 9 Eric Tang -* 78 IBNobody -* 75 Jack Humbert - -## quantum/template/template.c - -* 9 Damien Pollet -* 7 IBNobody -* 8 Jack Humbert -* 4 yoyoerx - -## quantum/template/template.h - -* 2 Damien Pollet -* 16 Jack Humbert -* 1 Noah Andrews - -# All Single Author Files - -These files have only a single author and so clarifying licensing should be pretty straightforward. - -* quantum/analog.c: Jack Humbert -* quantum/analog.h: Jack Humbert -* quantum/api.h: Jack Humbert -* quantum/keycode_config.c: Jack Humbert -* quantum/pincontrol.h: Wez Furlong -* quantum/api/api_sysex.h: Jack Humbert -* quantum/audio/luts.c: IBNobody -* quantum/audio/luts.h: IBNobody -* quantum/audio/musical_notes.h: Jack Humbert -* quantum/audio/wave.h: Jack Humbert -* quantum/keymap_extras/keymap_br_abnt2.h: Potiguar Faga -* quantum/keymap_extras/keymap_dvp.h: Artyom Mironov -* quantum/keymap_extras/keymap_jp.h: h-youhei -* quantum/keymap_extras/keymap_unicode_cyrillic.h: kuel -* quantum/process_keycode/process_chording.c: Jack Humbert -* quantum/process_keycode/process_chording.h: Jack Humbert -* quantum/process_keycode/process_leader.c: Jack Humbert -* quantum/process_keycode/process_leader.h: Jack Humbert -* quantum/process_keycode/process_midi.h: Jack Humbert -* quantum/process_keycode/process_music.h: Jack Humbert -* quantum/process_keycode/process_printer.c: Jack Humbert -* quantum/process_keycode/process_printer.h: Jack Humbert -* quantum/process_keycode/process_printer_bb.c: Jack Humbert -* quantum/serial_link/LICENSE: Fred Sundvik -* quantum/serial_link/protocol/frame_router.c: Fred Sundvik -* quantum/serial_link/protocol/frame_router.h: Fred Sundvik -* quantum/serial_link/protocol/frame_validator.c: Fred Sundvik -* quantum/serial_link/protocol/frame_validator.h: Fred Sundvik -* quantum/serial_link/protocol/physical.h: Fred Sundvik -* quantum/serial_link/protocol/triple_buffered_object.c: Fred Sundvik -* quantum/serial_link/protocol/triple_buffered_object.h: Fred Sundvik -* quantum/serial_link/system/serial_link.c: Fred Sundvik -* quantum/serial_link/system/serial_link.h: Fred Sundvik -* quantum/serial_link/tests/byte_stuffer_tests.cpp: Fred Sundvik -* quantum/serial_link/tests/frame_router_tests.cpp: Fred Sundvik -* quantum/serial_link/tests/frame_validator_tests.cpp: Fred Sundvik -* quantum/serial_link/tests/Makefile: Fred Sundvik -* quantum/serial_link/tests/transport_tests.cpp: Fred Sundvik -* quantum/serial_link/tests/triple_buffered_object_tests.cpp: Fred Sundvik -* quantum/template/rules.mk: Fred Sundvik -* quantum/template/keymaps/default/config.h: Jack Humbert -* quantum/template/keymaps/default/Makefile: Jack Humbert -* quantum/template/keymaps/default/readme.md: Jack Humbert -* quantum/tools/eeprom_reset.hex: Jack Humbert -* quantum/tools/readme.md: Jack Humbert -* quantum/visualizer/lcd_backlight.c: Fred Sundvik -* quantum/visualizer/lcd_backlight.h: Fred Sundvik -* quantum/visualizer/led_test.h: Fred Sundvik -* quantum/visualizer/LICENSE.md: Fred Sundvik -* quantum/visualizer/readme.md: Fred Sundvik -* quantum/visualizer/example_integration/callbacks.c: Fred Sundvik -* quantum/visualizer/example_integration/gfxconf.h: Fred Sundvik -* quantum/visualizer/example_integration/lcd_backlight_hal.c: Fred Sundvik -* quantum/visualizer/example_integration/visualizer_user.c: Fred Sundvik - -# All Files - -## quantum/analog.c - -* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert - -## quantum/analog.h - -* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert - -## quantum/api.c - -* 7edac212c8ed8442bf4207e70dc8194631b2bf27 Sat Nov 26 15:37:46 2016 -0500 Jack Humbert -* 06c64bbff3e228df542149acde64eadaf59b9b0f Mon Dec 19 11:18:18 2016 -0500 Jack Humbert - -## quantum/api.h - -* 7edac212c8ed8442bf4207e70dc8194631b2bf27 Sat Nov 26 15:37:46 2016 -0500 Jack Humbert - -## quantum/config_common.h - -* 35a81f5b8b081e1607a7c04489b01f551c3213cc Mon Oct 26 16:32:37 2015 -0400 Jack Humbert -* aaa758f1d3f97dda39879f2b055ad2da9680adfe Mon May 23 20:42:21 2016 -0700 Eric Tang -* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert -* 705c775a4a433249081321cea0c2def2627817dc Sun Aug 21 22:05:55 2016 -0500 IBNobody -* 936a26d04ffa12801031c058f27e221174e3fabd Thu Aug 25 00:15:41 2016 -0500 IBNobody -* 6390033e8688550826a4bd3004a2e76568600657 Mon Nov 21 20:14:16 2016 -0500 Jack Humbert -* 03d6e165bb0baf9d0093250d3c3c0771290df4d6 Fri Nov 25 09:17:40 2016 +0200 ofples -* 0c9d66eb59add717397ba83d508577073412ce86 Fri Nov 25 09:20:41 2016 +0200 ofples -* de1df639535817e17f1c01f07e7a629cec478526 Sat Nov 26 13:55:41 2016 +0700 Priyadi Iman Nurcahyo -* 17acde94ee2695ab69ea336742c904d649dce17c Sat Nov 26 14:02:38 2016 +0700 Priyadi Iman Nurcahyo -* d9d67e7b7686fdcbc7269a76d2a54c42325bdd03 Sat Nov 26 15:26:02 2016 +0700 Priyadi Iman Nurcahyo -* f2214ce1cb6cfe7a0efabe870a2c00fb8451ee80 Sat Nov 26 15:57:48 2016 +0700 Priyadi Iman Nurcahyo -* 6e0f994950435aa5867e7b7ce780186d881d74ac Mon Nov 28 23:51:07 2016 -0500 Jack Humbert -* dd685eceb2045371d38f24d454f1ab08ca7416f4 Thu Dec 29 12:13:30 2016 +0200 Fred Sundvik - -## quantum/dynamic_macro.h - -* 39e8e61258b51a2c33a94dd877e983f0b1dae0c1 Thu Aug 18 01:37:13 2016 +0200 Wojciech Siewierski -* 70f32842e5d94f14d05c1f9adcb1b1144a25a132 Sun Oct 9 12:52:39 2016 +0200 Wojciech Siewierski - -## quantum/keycode_config.c - -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert - -## quantum/keycode_config.h - -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert -* 4d4f7684e684bec319f166121463a88cd4a62703 Fri Jul 1 17:04:53 2016 +0300 fredizzimo -* 558f3ec1eb325caf706efc15e2fab26121aba442 Tue Sep 6 23:19:01 2016 -0500 IBNobody - -## quantum/keymap.h - -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert -* 76076db72545bbb649f11394a12721f61579527f Mon Jun 20 22:36:36 2016 -0400 Jack & Erez -* 1a0bac8bccf0e156d2f3c5f14a7214f9677b6370 Tue Jun 21 17:42:29 2016 -0400 Jack Humbert -* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert -* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert -* 4d4f7684e684bec319f166121463a88cd4a62703 Fri Jul 1 17:04:53 2016 +0300 fredizzimo -* 50c686587ed49d8079ba1b11d45ceb6a55d6cd4b Thu Jul 7 23:34:33 2016 -0400 TerryMathews -* e692ebf86a962e90c51302e7b17a953ea2858f79 Fri Aug 12 20:38:26 2016 +0900 shela -* 558f3ec1eb325caf706efc15e2fab26121aba442 Tue Sep 6 23:19:01 2016 -0500 IBNobody -* 1048a588c750e27ff0f900cd6aaf670e034086d0 Fri Oct 7 17:15:11 2016 +0200 npoirey -* 5b2e455d3b71bfb90754930d1f22d3e8ce98b927 Mon Oct 10 00:46:20 2016 +0700 Priyadi Iman Nurcahyo -* e27a754b70434de88a37c4a572e4ca5f7730ff58 Wed Oct 12 22:18:27 2016 -0400 Jack & Erez -* 52d7f7d2770a35adf0b0b0c803e05ae8719f539f Sun Oct 16 15:49:45 2016 -0400 Jack Humbert -* 5f91fb413624781ac79db641549b9e08753c04b5 Sun Oct 16 16:03:33 2016 -0400 Jack Humbert -* 33e62c080c9161a0fc921c90ed299a67fc2e1799 Sat Nov 12 20:54:37 2016 -0500 Jack Humbert -* 01038ab54ca6c2858ea9e856c717a1129ffe4156 Fri Dec 23 21:51:11 2016 +0200 Ofer Plesser -* d8a608f3ff4cb4d73cd57be500fd9881e230099d Thu Dec 29 18:28:48 2016 +1100 Wilba6582 - -## quantum/keymap_common.c - -* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert -* 35a81f5b8b081e1607a7c04489b01f551c3213cc Mon Oct 26 16:32:37 2015 -0400 Jack Humbert -* cc1c32671eb1eb43a87e55ac4ffa60b15115e48d Mon Oct 26 20:02:25 2015 -0400 Jack Humbert -* d9f08e6177271594fa573993d9f4dbc2d98c7416 Tue Oct 27 22:00:52 2015 -0400 Jack Humbert -* 18da1e6801335b0d9515ab72e9236a01d629915f Tue Oct 27 23:06:18 2015 -0400 Jack Humbert -* d3db8d62f6fc6a7dee43978ddc8356579b502b37 Wed Oct 28 04:07:15 2015 +0200 Erez Zukerman -* 7d6716beded4a60cd9de24e95d8ec60694692b6f Fri Jan 29 23:27:36 2016 -0500 Jack Humbert -* 65b41e2e59e274354e57ed36cad097823f111f1a Sun Feb 7 11:48:28 2016 +0100 Wojciech Siewierski -* 47dcec29456106828b83fe5b85fa7a7427ddc710 Sun Jan 3 17:49:28 2016 -0500 Chris Gerber -* 1d13aa933bbb57bf0c1fe0196981b81233c3df97 Mon Mar 28 19:45:20 2016 -0500 IBNobody -* 3755ef5ddbdad9f25a53fee951c3eb78035b52c3 Wed Apr 13 20:57:51 2016 -0500 IBNobody -* ee2ee7f4f049dda385a9db7dddd8e7e91681315b Fri Apr 15 13:44:07 2016 -0400 Jack Humbert -* 9cfc74c35b940884618b0fe1e6fd25c570e1c974 Thu Apr 7 15:21:06 2016 +0300 Erez Zukerman -* ab19ebd08a8b955775e6fa94cdf6b8d128d8b43c Sat Apr 16 18:51:58 2016 -0400 Jack Humbert -* c83aa16f1d614c1c10f7597a67ffb9f2ae871951 Sat Apr 16 20:26:02 2016 -0400 Jack Humbert -* 41cc35425ab32c9a9492006da8b667d01d32dfa6 Sat Apr 16 21:31:40 2016 -0400 Jack Humbert -* 8bbd064cf52a76508589579f19595607a1f3af21 Sat Apr 16 23:07:50 2016 -0400 Jack Humbert -* 45f10b4c4b308226fa1568277654a13853a03ab4 Sat Apr 16 22:10:18 2016 -0500 IBNobody -* e7b9959819e709d7df2e96a94bdaf36e4e9e23e3 Sat Apr 16 23:15:40 2016 -0400 Jack Humbert -* a67d425f4d5278595e7ab785a0f246b83fb1a09f Sun Apr 17 01:00:39 2016 -0400 Jack Humbert -* d5b72e7bde5ede25f7d5699b50b7d9eb6f31ba92 Sun Apr 17 12:54:32 2016 -0500 IBNobody -* 3103ea542f0039637a1a266df79a97a7a13fa6b4 Sun Apr 17 12:55:19 2016 -0500 IBNobody -* 23231fa577f7c6c585124226a83f21a7668e62dd Sun Apr 17 14:16:03 2016 -0500 IBNobody -* 5c98ad59606ee95b82c27bf2525383a9ec88542b Sun Apr 17 20:14:37 2016 -0500 IBNobody -* e49712b5593b887c8af18aeb7196513f1c7b7bcf Mon Apr 18 21:01:48 2016 -0400 Jack Humbert -* 620ac4b260fa663d12b11a0b15ac50379523c125 Thu Apr 21 19:35:18 2016 -0700 Eric Tang -* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody -* 41b3e399b1d43db9574c6016951d92974b3d93e7 Thu May 5 21:50:51 2016 -0400 Jack Humbert -* 1a8c0dd22d6a2255511d0db6a456315541b5815b Sun May 15 00:27:32 2016 -0400 Erez Zukerman -* fde477a927edc6b4207a6968d44aeed021e8b300 Sun May 15 00:51:06 2016 -0400 Jack Humbert -* b732b79b49b098dba8e14493c745075f336747d8 Wed May 18 23:47:16 2016 -0400 Jack Humbert -* 287eb7ad148abc8fe3fb014218d71e205fd9131d Tue May 24 11:56:53 2016 -0400 Jack Humbert -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert -* 4d4f7684e684bec319f166121463a88cd4a62703 Fri Jul 1 17:04:53 2016 +0300 fredizzimo -* 9870082a06386eba8c0c5f22da90d0256ef6244b Thu Jul 7 19:48:39 2016 +0300 Fred Sundvik -* 8b94e26d7c3b30cc57d710a11e5651d15e8e3b20 Sun Jul 24 22:07:43 2016 -0400 Jack Humbert -* d8a608f3ff4cb4d73cd57be500fd9881e230099d Thu Dec 29 18:28:48 2016 +1100 Wilba6582 - -## quantum/light_ws2812.c - -* ba9ac457b2159097ecfd9848c5171c52e3a68260 Sun Jan 24 17:05:47 2016 -0800 Yang Liu -* 57e08eb8badc5db2fb44d2df684f32ea48cce411 Thu Jul 7 11:33:32 2016 -0400 Jack Humbert -* 5f91fb413624781ac79db641549b9e08753c04b5 Sun Oct 16 16:03:33 2016 -0400 Jack Humbert -* 33e62c080c9161a0fc921c90ed299a67fc2e1799 Sat Nov 12 20:54:37 2016 -0500 Jack Humbert -* e9f748751808de2f1e85cf7fb670d78773bd5e76 Sun Nov 13 23:02:38 2016 -0500 Jack Humbert -* 530dd3377e4d409a7ca2fee7e47b60b735ebc0fa Tue Nov 15 13:18:10 2016 -0500 Jack Humbert -* 3774a7fcdab5544fc787f4c200be05fcd417e31f Thu Nov 17 17:42:14 2016 -0500 Jack Humbert - -## quantum/light_ws2812.h - -* ba9ac457b2159097ecfd9848c5171c52e3a68260 Sun Jan 24 17:05:47 2016 -0800 Yang Liu -* 5f91fb413624781ac79db641549b9e08753c04b5 Sun Oct 16 16:03:33 2016 -0400 Jack Humbert -* e9f748751808de2f1e85cf7fb670d78773bd5e76 Sun Nov 13 23:02:38 2016 -0500 Jack Humbert -* 664c0a036b3d7c3ed39f4a7a78d97f4a9cc7d20c Mon Nov 21 19:50:55 2016 -0500 Jack Humbert -* 06c64bbff3e228df542149acde64eadaf59b9b0f Mon Dec 19 11:18:18 2016 -0500 Jack Humbert - -## quantum/matrix.c - -* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert -* 35a81f5b8b081e1607a7c04489b01f551c3213cc Mon Oct 26 16:32:37 2015 -0400 Jack Humbert -* 641859df84bf40025b2c14319d1a168a435562e2 Thu Mar 10 11:28:34 2016 -0500 yoyoerx -* 684793360cdb08ac1e50a6d27e1796fadd527adb Mon May 9 00:36:23 2016 -0400 Jack Humbert -* 1a8c0dd22d6a2255511d0db6a456315541b5815b Sun May 15 00:27:32 2016 -0400 Erez Zukerman -* aaa758f1d3f97dda39879f2b055ad2da9680adfe Mon May 23 20:42:21 2016 -0700 Eric Tang -* 1ae6011cef2230826a9e6db6c5b638677bc640b7 Tue May 24 08:44:40 2016 -0700 Eric Tang -* de57799530d3184722532f93d156364067d8fcd5 Sat May 28 11:56:06 2016 -0400 Jack Humbert -* 008c8d54a0a1a1e908d372d0fe9edb45a2d491e5 Fri Jun 17 22:09:59 2016 -0400 Jack Humbert -* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert -* 215c2119af5281072d5a6efb0308408793cadd08 Wed Jun 29 16:21:41 2016 -0400 Jack Humbert -* 4d4f7684e684bec319f166121463a88cd4a62703 Fri Jul 1 17:04:53 2016 +0300 fredizzimo -* 8e88d55bfd7c88cb15845e0c6415e4e892532861 Mon Jul 4 11:45:58 2016 -0400 Jack Humbert -* 3577e26fd9916ceab58779ec6323d43da54eb3b5 Wed Jul 6 00:24:31 2016 -0400 Jack Humbert -* 17170ba76d3c94edcf1ab263520238fdb0384774 Sun Oct 23 23:00:43 2016 -0500 IBNobody -* 508eddf8ba8548d3f71e1c09a404839beb49f45c Fri Oct 28 14:21:38 2016 -0500 IBNobody -* 4c6960835c0a6e29670dabdc27117d7d3c7f99f5 Fri Oct 28 16:24:20 2016 -0500 IBNobody -* 32f88c07173b795c6981c779057dceba00aeb1cb Sat Oct 29 10:39:03 2016 -0500 IBNobody -* f4030289744fc6dc82dd85c955070c0845813cc5 Sat Oct 29 16:12:58 2016 -0500 IBNobody -* a06115df19a74d39b08758472b221e630c3680d3 Fri Nov 18 23:20:07 2016 -0500 Jack Humbert - -## quantum/pincontrol.h - -* 8485bb34d2e291db5b6c81f892850da1cdca37ba Sun Nov 27 22:43:11 2016 -0800 Wez Furlong - -## quantum/quantum.c - -* 1a8c0dd22d6a2255511d0db6a456315541b5815b Sun May 15 00:27:32 2016 -0400 Erez Zukerman -* 15719f3574c6274ee0f3ec87431927c5a523aa3e Sun May 15 00:40:59 2016 -0400 Jack Humbert -* bf5c2ccee5497523c214dae7aacdc27fdbb0f235 Sun May 15 00:47:25 2016 -0400 Jack Humbert -* fde477a927edc6b4207a6968d44aeed021e8b300 Sun May 15 00:51:06 2016 -0400 Jack Humbert -* 0428214b905e5f8b3bed721885957ce249ba4991 Wed May 18 23:14:00 2016 -0400 Jack Humbert -* b732b79b49b098dba8e14493c745075f336747d8 Wed May 18 23:47:16 2016 -0400 Jack Humbert -* 0275d444d77c9d85d2189b09d8813fb76dc4d566 Thu May 19 15:36:28 2016 +0300 purpleP -* 287eb7ad148abc8fe3fb014218d71e205fd9131d Tue May 24 11:56:53 2016 -0400 Jack Humbert -* 1237025963484d70bbe5185a790bec6544653ccc Tue May 24 23:27:59 2016 -0400 Erez Zukerman -* 8bc69afc633d3e199e3ac0a5bf39e4d255f2ce4a Tue May 24 23:48:46 2016 -0400 Erez Zukerman -* 17977a7e24ddab6ca101341b33c8fe7ad13e68f5 Sat May 28 15:22:30 2016 -0400 Jack Humbert -* 1c9f33c06a6ef18c9c21e5841180af5ae554c34b Wed Jun 1 22:49:55 2016 -0400 Jack Humbert -* 4635b4453335b61df11008fa907eef221db5912b Wed Jun 1 23:00:55 2016 -0400 Jack Humbert -* 794aed37a0da5a277a07e7fa86263e0852fa9f6d Fri Jun 3 12:48:40 2016 -0700 Eric Tang -* b70248fa2144d297504eedbc80a76dfdc40d9f1f Fri Jun 17 21:42:59 2016 -0400 Jack Humbert -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert -* 76076db72545bbb649f11394a12721f61579527f Mon Jun 20 22:36:36 2016 -0400 Jack & Erez -* 98f0807359cfa78d25442b91ff4c5bbfc5679661 Tue Jun 21 22:55:54 2016 -0400 Jack Humbert -* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert -* b68b722325e1f0f68387e161365fa8e31c79b7b2 Thu Jun 23 23:14:21 2016 -0400 Jack Humbert -* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert -* 197f152dee834a737cd820f2a95d1ade98be4898 Wed Jun 29 18:29:20 2016 -0400 Jack Humbert -* 60fd885a6e540509baa2193932e15caeaeb8f4c5 Wed Jun 29 18:35:29 2016 -0400 Jack Humbert -* 4d4f7684e684bec319f166121463a88cd4a62703 Fri Jul 1 17:04:53 2016 +0300 fredizzimo -* 1412076df68ac00f9a00173977d2826603c12ddf Mon Jul 4 19:56:08 2016 -0700 Smilliam -* 6b0c9cc905c0985f96a80306cf5fe0d6724b28fc Mon Jul 4 19:58:26 2016 -0700 Smilliam -* a4bf46f9b1d0a0be0cecb2cd0f0d941aa7c71bd3 Wed Jul 6 22:48:19 2016 -0400 Jack Humbert -* 50c686587ed49d8079ba1b11d45ceb6a55d6cd4b Thu Jul 7 23:34:33 2016 -0400 TerryMathews -* f7a86822266603b8ffd21e9f89ec1de8d4950791 Fri Jul 8 03:32:28 2016 -0400 TerryMathews -* b12fe6abb25db1feca6a7649097a8d1cb67a063f Sun Jul 10 19:04:01 2016 -0700 Smilliam -* a998a48673372e409991066d7d2d9ba282f79d59 Mon Jul 11 09:14:43 2016 -0400 Jack Humbert -* a28a6e5b79c819e5f9323f62686498eca3ef399f Wed Jul 13 16:38:02 2016 +0200 Pavlos Vinieratos -* 857aa5bef6a74f8785a7039feea5286c07bf7067 Sat Aug 13 11:14:42 2016 +0200 Gergely Nagy -* 644c8c79271db8cf1bd934b9a80a0215585e46e7 Thu Aug 18 01:34:05 2016 +0200 Wojciech Siewierski -* 0d28787c5cf2173d12f57b397515f91cffaa820a Thu Aug 18 11:29:53 2016 +0200 Gergely Nagy -* e571d4656cd283ce8d793fe3dd2ac176b84b0bf5 Tue Sep 6 18:02:43 2016 -0500 IBNobody -* 558f3ec1eb325caf706efc15e2fab26121aba442 Tue Sep 6 23:19:01 2016 -0500 IBNobody -* 5b2e455d3b71bfb90754930d1f22d3e8ce98b927 Mon Oct 10 00:46:20 2016 +0700 Priyadi Iman Nurcahyo -* 5f91fb413624781ac79db641549b9e08753c04b5 Sun Oct 16 16:03:33 2016 -0400 Jack Humbert -* 33e62c080c9161a0fc921c90ed299a67fc2e1799 Sat Nov 12 20:54:37 2016 -0500 Jack Humbert -* e9f748751808de2f1e85cf7fb670d78773bd5e76 Sun Nov 13 23:02:38 2016 -0500 Jack Humbert -* ffa5b1e7ea6697acf9ebfcade1149031642f7870 Sat Nov 19 11:32:09 2016 +0100 Gergely Nagy -* 74a1f00713d1407fb1d2e20d58da93919ab0c221 Sat Nov 19 18:19:18 2016 +0100 Gergely Nagy -* 664c0a036b3d7c3ed39f4a7a78d97f4a9cc7d20c Mon Nov 21 19:50:55 2016 -0500 Jack Humbert -* 450a8fb5b61de8166fe21eb4f57e1c00514afe32 Mon Nov 21 20:17:45 2016 -0500 Jack Humbert -* cefa8468fb5f28bd67a0c02d371a4aef0964e20c Wed Nov 23 20:16:38 2016 -0500 Jack Humbert -* 7edac212c8ed8442bf4207e70dc8194631b2bf27 Sat Nov 26 15:37:46 2016 -0500 Jack Humbert -* 01038ab54ca6c2858ea9e856c717a1129ffe4156 Fri Dec 23 21:51:11 2016 +0200 Ofer Plesser - -## quantum/quantum.h - -* 1a8c0dd22d6a2255511d0db6a456315541b5815b Sun May 15 00:27:32 2016 -0400 Erez Zukerman -* fde477a927edc6b4207a6968d44aeed021e8b300 Sun May 15 00:51:06 2016 -0400 Jack Humbert -* 0428214b905e5f8b3bed721885957ce249ba4991 Wed May 18 23:14:00 2016 -0400 Jack Humbert -* b732b79b49b098dba8e14493c745075f336747d8 Wed May 18 23:47:16 2016 -0400 Jack Humbert -* 287eb7ad148abc8fe3fb014218d71e205fd9131d Tue May 24 11:56:53 2016 -0400 Jack Humbert -* de57799530d3184722532f93d156364067d8fcd5 Sat May 28 11:56:06 2016 -0400 Jack Humbert -* 17977a7e24ddab6ca101341b33c8fe7ad13e68f5 Sat May 28 15:22:30 2016 -0400 Jack Humbert -* 1c9f33c06a6ef18c9c21e5841180af5ae554c34b Wed Jun 1 22:49:55 2016 -0400 Jack Humbert -* 794aed37a0da5a277a07e7fa86263e0852fa9f6d Fri Jun 3 12:48:40 2016 -0700 Eric Tang -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert -* 98f0807359cfa78d25442b91ff4c5bbfc5679661 Tue Jun 21 22:55:54 2016 -0400 Jack Humbert -* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert -* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert -* 197f152dee834a737cd820f2a95d1ade98be4898 Wed Jun 29 18:29:20 2016 -0400 Jack Humbert -* 8125cdb88ce1201fcfd16ed4c5313222ef4c230c Wed Jun 29 18:36:52 2016 -0400 Jack Humbert -* 4d4f7684e684bec319f166121463a88cd4a62703 Fri Jul 1 17:04:53 2016 +0300 fredizzimo -* a28a6e5b79c819e5f9323f62686498eca3ef399f Wed Jul 13 16:38:02 2016 +0200 Pavlos Vinieratos -* e01b4c3fd9a7b66276ffd22dcac25d569d7bb7ff Sat Jul 9 00:41:15 2016 +0300 Fred Sundvik -* 0d28787c5cf2173d12f57b397515f91cffaa820a Thu Aug 18 11:29:53 2016 +0200 Gergely Nagy -* 5f91fb413624781ac79db641549b9e08753c04b5 Sun Oct 16 16:03:33 2016 -0400 Jack Humbert -* 664c0a036b3d7c3ed39f4a7a78d97f4a9cc7d20c Mon Nov 21 19:50:55 2016 -0500 Jack Humbert -* cefa8468fb5f28bd67a0c02d371a4aef0964e20c Wed Nov 23 20:16:38 2016 -0500 Jack Humbert -* 7edac212c8ed8442bf4207e70dc8194631b2bf27 Sat Nov 26 15:37:46 2016 -0500 Jack Humbert - -## quantum/quantum_keycodes.h - -* d8a608f3ff4cb4d73cd57be500fd9881e230099d Thu Dec 29 18:28:48 2016 +1100 Wilba6582 -* 8459bb97c1e8bcb9ccce55a1ed849d373bd7706c Wed Jan 11 21:57:41 2017 -0500 Erez Zukerman -* 3717cf5864d6505e406b5eb75f315e6dc2392912 Thu Jan 12 07:38:07 2017 -0500 Erez Zukerman -* 7288e5ab9c005a7b035d91e68358aa2b6a12420c Fri Jan 13 14:04:51 2017 -0500 Jack Humbert - -## quantum/rgblight.c - -* ba9ac457b2159097ecfd9848c5171c52e3a68260 Sun Jan 24 17:05:47 2016 -0800 Yang Liu -* 2647c7cd84820a833b85e41ea86caf76b36e6ee1 Sun Jan 24 17:19:33 2016 -0800 Yang Liu -* 97f8f378761506914b69d4fd2d5661bfcae28295 Sun Apr 10 21:16:49 2016 -0700 skullY -* 620ac4b260fa663d12b11a0b15ac50379523c125 Thu Apr 21 19:35:18 2016 -0700 Eric Tang -* c37d52d2137acf5739c481cc0c8917ad6fd77161 Tue Apr 26 13:48:36 2016 -0400 Jack Humbert -* e024c11f7a849a38e478cda9fb9939a838cfa2e0 Tue Apr 26 13:50:04 2016 -0400 Jack Humbert -* 80c87054193b9243670aeb85adefbe1aa6c0fda0 Tue Jun 21 12:53:21 2016 -0400 Jack Humbert -* 57e08eb8badc5db2fb44d2df684f32ea48cce411 Thu Jul 7 11:33:32 2016 -0400 Jack Humbert -* 3a860c4bc210857f03ef9fae5043d6d5736d140d Tue Jul 26 14:43:45 2016 -0500 Jordi Orlando -* 899c88cd8bf024792760fcf3ee8be6fed13fb315 Tue Jul 26 14:46:30 2016 -0500 Jordi Orlando -* ea2d2f5d5841791745c93ef27cd1528a7fd69c97 Tue Jul 26 15:31:22 2016 -0500 Jordi Orlando -* b8679bbe045a2285d6ab6bbc420121b26f516b9a Wed Oct 5 20:41:33 2016 -0400 Jack Humbert -* 9b0e21f87f446935f29254bb623c2cfe29472b6e Sun Oct 9 19:26:16 2016 +0300 Fred Sundvik -* 92a3a96849aee708753a6623b0db228023e3baf8 Sun Oct 9 19:47:05 2016 +0300 Fred Sundvik -* ffae9d84c5279b463da112ee15568d536649b819 Sun Oct 9 19:53:41 2016 +0300 Fred Sundvik -* 03b6fcdaf034392e27752a9bd2c11de06a166e39 Mon Oct 10 00:20:24 2016 -0400 Jack Humbert -* 33e62c080c9161a0fc921c90ed299a67fc2e1799 Sat Nov 12 20:54:37 2016 -0500 Jack Humbert -* e9f748751808de2f1e85cf7fb670d78773bd5e76 Sun Nov 13 23:02:38 2016 -0500 Jack Humbert -* 3774a7fcdab5544fc787f4c200be05fcd417e31f Thu Nov 17 17:42:14 2016 -0500 Jack Humbert -* 285c5a91f23e972d9c579184283443111186329d Thu Nov 17 20:56:36 2016 -0500 Erez Zukerman -* 2e23689b8e3222982082c1f5a4f8ce7686f9658b Wed Nov 23 18:52:02 2016 -0500 Jack Humbert -* 4094544d41450617bc21ab58646603b8964eae0e Tue Nov 29 09:23:16 2016 -0500 Erez Zukerman -* cae269b08b642b07ee06dec7120a784a3c3d7aab Fri Dec 23 10:29:19 2016 -0500 Jack Humbert -* 748181dccddb8c9fa52a776f4fcd904ddca9aa31 Wed Dec 28 16:29:02 2016 -0500 Scott Wilson -* b8e74c378b1f118178edf0634d9fa7f0f9dd5e08 Thu Dec 29 09:32:02 2016 -0500 Scott Wilson - -## quantum/rgblight.h - -* ba9ac457b2159097ecfd9848c5171c52e3a68260 Sun Jan 24 17:05:47 2016 -0800 Yang Liu -* 2647c7cd84820a833b85e41ea86caf76b36e6ee1 Sun Jan 24 17:19:33 2016 -0800 Yang Liu -* 620ac4b260fa663d12b11a0b15ac50379523c125 Thu Apr 21 19:35:18 2016 -0700 Eric Tang -* 80c87054193b9243670aeb85adefbe1aa6c0fda0 Tue Jun 21 12:53:21 2016 -0400 Jack Humbert -* 57e08eb8badc5db2fb44d2df684f32ea48cce411 Thu Jul 7 11:33:32 2016 -0400 Jack Humbert -* b8679bbe045a2285d6ab6bbc420121b26f516b9a Wed Oct 5 20:41:33 2016 -0400 Jack Humbert -* 9b0e21f87f446935f29254bb623c2cfe29472b6e Sun Oct 9 19:26:16 2016 +0300 Fred Sundvik -* 33e62c080c9161a0fc921c90ed299a67fc2e1799 Sat Nov 12 20:54:37 2016 -0500 Jack Humbert -* e9f748751808de2f1e85cf7fb670d78773bd5e76 Sun Nov 13 23:02:38 2016 -0500 Jack Humbert -* 3774a7fcdab5544fc787f4c200be05fcd417e31f Thu Nov 17 17:42:14 2016 -0500 Jack Humbert -* 285c5a91f23e972d9c579184283443111186329d Thu Nov 17 20:56:36 2016 -0500 Erez Zukerman -* 2e23689b8e3222982082c1f5a4f8ce7686f9658b Wed Nov 23 18:52:02 2016 -0500 Jack Humbert -* 4094544d41450617bc21ab58646603b8964eae0e Tue Nov 29 09:23:16 2016 -0500 Erez Zukerman -* cae269b08b642b07ee06dec7120a784a3c3d7aab Fri Dec 23 10:29:19 2016 -0500 Jack Humbert -* 748181dccddb8c9fa52a776f4fcd904ddca9aa31 Wed Dec 28 16:29:02 2016 -0500 Scott Wilson - -## quantum/variable_trace.c - -* f519b94be7086852f2afe4ec248786b47968f7ff Sun Nov 6 21:57:26 2016 +0200 Fred Sundvik -* a377017c95b826d83ac7a46ef176d39a58294b44 Sun Nov 6 22:11:24 2016 +0200 Fred Sundvik - -## quantum/variable_trace.h - -* a377017c95b826d83ac7a46ef176d39a58294b44 Sun Nov 6 22:11:24 2016 +0200 Fred Sundvik -* 0ba3e523a7c124e4ce54dfd043dc32e72ad3233b Sun Nov 6 22:44:43 2016 +0200 Fred Sundvik - -## quantum/version.h - -* None None None - -## quantum/api/api_sysex.c - -* 7edac212c8ed8442bf4207e70dc8194631b2bf27 Sat Nov 26 15:37:46 2016 -0500 Jack Humbert -* dd685eceb2045371d38f24d454f1ab08ca7416f4 Thu Dec 29 12:13:30 2016 +0200 Fred Sundvik - -## quantum/api/api_sysex.h - -* 7edac212c8ed8442bf4207e70dc8194631b2bf27 Sat Nov 26 15:37:46 2016 -0500 Jack Humbert - -## quantum/audio/audio.c - -* 73228f5e5d1d4cd31a46e5e93aa893a8f727e3b9 Thu Apr 21 00:37:45 2016 -0400 Jack Humbert -* 620ac4b260fa663d12b11a0b15ac50379523c125 Thu Apr 21 19:35:18 2016 -0700 Eric Tang -* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody -* 3f02637f4dd765803671c2611191beb096d60b36 Mon May 9 13:17:15 2016 -0400 Jack Humbert -* 15719f3574c6274ee0f3ec87431927c5a523aa3e Sun May 15 00:40:59 2016 -0400 Jack Humbert -* 0428214b905e5f8b3bed721885957ce249ba4991 Wed May 18 23:14:00 2016 -0400 Jack Humbert -* 287eb7ad148abc8fe3fb014218d71e205fd9131d Tue May 24 11:56:53 2016 -0400 Jack Humbert -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert -* 06c64bbff3e228df542149acde64eadaf59b9b0f Mon Dec 19 11:18:18 2016 -0500 Jack Humbert - -## quantum/audio/audio.h - -* 73228f5e5d1d4cd31a46e5e93aa893a8f727e3b9 Thu Apr 21 00:37:45 2016 -0400 Jack Humbert -* 082a0f313d8c842a5de7bae30ec8a3597e35880b Fri Apr 22 00:01:38 2016 -0500 IBNobody -* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody -* 3f02637f4dd765803671c2611191beb096d60b36 Mon May 9 13:17:15 2016 -0400 Jack Humbert -* 15719f3574c6274ee0f3ec87431927c5a523aa3e Sun May 15 00:40:59 2016 -0400 Jack Humbert -* 0428214b905e5f8b3bed721885957ce249ba4991 Wed May 18 23:14:00 2016 -0400 Jack Humbert -* 287eb7ad148abc8fe3fb014218d71e205fd9131d Tue May 24 11:56:53 2016 -0400 Jack Humbert -* 215c2119af5281072d5a6efb0308408793cadd08 Wed Jun 29 16:21:41 2016 -0400 Jack Humbert - -## quantum/audio/audio_pwm.c - -* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert - -## quantum/audio/luts.c - -* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody - -## quantum/audio/luts.h - -* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody - -## quantum/audio/musical_notes.h - -* 73228f5e5d1d4cd31a46e5e93aa893a8f727e3b9 Thu Apr 21 00:37:45 2016 -0400 Jack Humbert - -## quantum/audio/song_list.h - -* 73228f5e5d1d4cd31a46e5e93aa893a8f727e3b9 Thu Apr 21 00:37:45 2016 -0400 Jack Humbert -* 7d0345ef25b5e1924f1e98c76d78607778e0b17d Sat Jul 30 01:52:33 2016 -0700 JeeBak Kim - -## quantum/audio/voices.c - -* 73228f5e5d1d4cd31a46e5e93aa893a8f727e3b9 Thu Apr 21 00:37:45 2016 -0400 Jack Humbert -* e89b806b850ad1b5484176664288b71b0131683e Thu Apr 21 00:40:00 2016 -0400 Jack Humbert -* 9828aba2a12f03fccbc1095bc8e4918ae58fa31b Thu Apr 21 18:14:25 2016 -0400 Jack Humbert -* 7b3f212500210ae85063b043952b5b3ef6988ad6 Thu Apr 21 23:10:47 2016 -0400 Jack Humbert -* 082a0f313d8c842a5de7bae30ec8a3597e35880b Fri Apr 22 00:01:38 2016 -0500 IBNobody -* b1900c8dde2a68e87aaabd84280a99bf6658ea9f Fri Apr 22 01:02:50 2016 -0400 Jack Humbert -* a8086126fecbdce1c192036cf1011329d406949d Fri Apr 22 01:04:13 2016 -0400 Jack Humbert -* a718c53fe77f0b3b4361c850531eee5f23e3e13d Fri Apr 22 11:58:29 2016 -0400 Jack Humbert -* e7b6bb641c0636c01e3781fe51865fdb20014eeb Mon Apr 25 00:59:47 2016 -0400 Jack Humbert -* 140b97a1cd226432a8ec647004943698e3d87f0b Tue Apr 26 01:16:47 2016 -0400 Jack Humbert -* 66e0323881a5a3da65e14daeec41a1e9cfbda431 Fri Apr 29 12:42:55 2016 -0400 Jack Humbert -* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody -* 0edfe55bfe4afd037918ff73e49552a28f39a5ca Mon Dec 12 15:39:07 2016 -0500 Jack Humbert -* 06c64bbff3e228df542149acde64eadaf59b9b0f Mon Dec 19 11:18:18 2016 -0500 Jack Humbert -* 438a5d685bb7b726ff59109ce4229eca6303cd8e Tue Dec 20 19:38:22 2016 -0500 Jack Humbert -* 2fa36e38cf28f07ad4a4d74722486921fa7b8706 Wed Dec 21 00:22:32 2016 -0500 Jack Humbert - -## quantum/audio/voices.h - -* 73228f5e5d1d4cd31a46e5e93aa893a8f727e3b9 Thu Apr 21 00:37:45 2016 -0400 Jack Humbert -* e89b806b850ad1b5484176664288b71b0131683e Thu Apr 21 00:40:00 2016 -0400 Jack Humbert -* 9828aba2a12f03fccbc1095bc8e4918ae58fa31b Thu Apr 21 18:14:25 2016 -0400 Jack Humbert -* 7b3f212500210ae85063b043952b5b3ef6988ad6 Thu Apr 21 23:10:47 2016 -0400 Jack Humbert -* 082a0f313d8c842a5de7bae30ec8a3597e35880b Fri Apr 22 00:01:38 2016 -0500 IBNobody -* b1900c8dde2a68e87aaabd84280a99bf6658ea9f Fri Apr 22 01:02:50 2016 -0400 Jack Humbert -* a8086126fecbdce1c192036cf1011329d406949d Fri Apr 22 01:04:13 2016 -0400 Jack Humbert -* a718c53fe77f0b3b4361c850531eee5f23e3e13d Fri Apr 22 11:58:29 2016 -0400 Jack Humbert -* e7b6bb641c0636c01e3781fe51865fdb20014eeb Mon Apr 25 00:59:47 2016 -0400 Jack Humbert -* 140b97a1cd226432a8ec647004943698e3d87f0b Tue Apr 26 01:16:47 2016 -0400 Jack Humbert -* 83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 Tue May 3 12:56:40 2016 -0500 IBNobody -* 0edfe55bfe4afd037918ff73e49552a28f39a5ca Mon Dec 12 15:39:07 2016 -0500 Jack Humbert -* 06c64bbff3e228df542149acde64eadaf59b9b0f Mon Dec 19 11:18:18 2016 -0500 Jack Humbert -* 438a5d685bb7b726ff59109ce4229eca6303cd8e Tue Dec 20 19:38:22 2016 -0500 Jack Humbert - -## quantum/audio/wave.h - -* 73228f5e5d1d4cd31a46e5e93aa893a8f727e3b9 Thu Apr 21 00:37:45 2016 -0400 Jack Humbert - -## quantum/keymap_extras/keymap_bepo.h - -* 7c33f8493fb4ecd664390232c8de856158f9fcae Sun Feb 7 19:29:49 2016 +0100 Didier Loiseau -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert -* 7b4d30ee50aa534a973473c715924964991739f0 Sun Jul 24 10:57:49 2016 +0200 Vivien Alger - -## quantum/keymap_extras/keymap_br_abnt2.h - -* 7aa31ad338325477199f752ac3e344a6ab9b27d0 Tue Nov 8 13:32:04 2016 -0200 Potiguar Faga - -## quantum/keymap_extras/keymap_canadian_multilingual.h - -* a7cef2ca0a2322448d02008337013936b1d550ec Wed Feb 17 21:45:38 2016 +0100 Didier Loiseau -* 7840e69bfaee1d67de273c235b532d6f20c905a9 Thu Feb 18 00:47:23 2016 +0100 Didier Loiseau -* 911222892ecb1c01551e0abdfbe98ed1dbf82139 Fri Feb 26 00:55:39 2016 +0100 Didier Loiseau -* 3a91ddb0745ae0f52007984793ea1b48abb2098c Tue Mar 1 22:59:38 2016 +0100 Didier Loiseau -* aa5eb49edd993e2abe3adf814e030fcdda4a3596 Wed Mar 2 00:22:41 2016 +0100 Didier Loiseau -* 1aeb59335f2fe67613df25308a630ca453975ac0 Sun Sep 11 02:19:55 2016 +0200 Didier Loiseau - -## quantum/keymap_extras/keymap_colemak.h - -* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert -* 39915b1748cefd99f841fa03b7f6e7c20439fbcf Thu Oct 29 15:12:51 2015 -0400 Jack Humbert -* 3c683aa9f23288ddada760fb49abcc5fa7324f5e Fri Feb 5 16:28:24 2016 +0200 Erez Zukerman -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert - -## quantum/keymap_extras/keymap_dvorak.h - -* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert -* 233af3a41c69d456583bfcfd897233b9c117caa6 Mon Feb 22 13:06:26 2016 -0500 Keller-Laminar -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert -* 4278d8861526ed285d9d00badcdc8c121454be60 Thu Jul 14 11:32:43 2016 -0500 Jonathan A. Kollasch -* f0021c9cb9e30d47d5a3ab5ec75e59e626c3d244 Mon Sep 19 14:25:44 2016 -0500 Jonathan A. Kollasch - -## quantum/keymap_extras/keymap_dvp.h - -* 6e003b1e3fa844cfde0069004e755aae7a9539f3 Wed Oct 19 23:45:55 2016 +0300 Artyom Mironov - -## quantum/keymap_extras/keymap_fr_ch.h - -* 1934e8a270820ff6f08c95f4399b26162623e4e0 Sat Feb 20 14:01:28 2016 +0100 Vincent Pochet -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert -* 25938a09a6bfb2624bc96841b53897eda532e293 Thu Jul 14 11:13:35 2016 -0500 Jonathan A. Kollasch - -## quantum/keymap_extras/keymap_french.h - -* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert -* 4a19cc054dc7aeb0a35613d608143bf51fa791cc Sat Feb 27 15:22:54 2016 +0100 Kévin Letord -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert -* 010dd1308420e25b327fa4d5d6b13f67a849408b Thu Jul 14 11:04:25 2016 -0500 Jonathan A. Kollasch -* 25938a09a6bfb2624bc96841b53897eda532e293 Thu Jul 14 11:13:35 2016 -0500 Jonathan A. Kollasch - -## quantum/keymap_extras/keymap_french_osx.h - -* 48eff6dd89672c6c71afd8a3d1cdc5d35b0bf768 Tue Jan 5 10:49:36 2016 +0100 Sébastien Pérochon -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert - -## quantum/keymap_extras/keymap_german.h - -* 3dbcad51d1217b32c3c17917c2646fa7a9a9165b Sat Dec 19 01:22:12 2015 +0100 Matthias Schmitt -* da09312dd56e3b085fb217cc7cc2abf06f401992 Tue Jan 19 20:04:08 2016 +0100 plgruener -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert -* 25938a09a6bfb2624bc96841b53897eda532e293 Thu Jul 14 11:13:35 2016 -0500 Jonathan A. Kollasch - -## quantum/keymap_extras/keymap_german_ch.h - -* 465aabe11dbd673fb4c68ecbffbfb062273def1a Wed May 18 21:22:04 2016 +0200 heartsekai -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert -* 25938a09a6bfb2624bc96841b53897eda532e293 Thu Jul 14 11:13:35 2016 -0500 Jonathan A. Kollasch - -## quantum/keymap_extras/keymap_german_osx.h - -* e44c30f2030dd4c481a6e38e9392f147be7b0ae2 Fri Jan 15 15:55:00 2016 +0100 Stephan Bösebeck -* bfc6eca44aeb3ad22a1c37206005dcfe617431cd Mon Mar 14 13:35:34 2016 +0100 Daniel Kriesten -* dbd4ab3457dd001ab4bbcec14315047b815f7dfe Thu Mar 31 23:15:59 2016 +0200 Stephan Bösebeck -* 6d40f7c5060f608068b0c4fc90871687c70b4f05 Sun Apr 17 22:19:47 2016 +0200 Stephan Bösebeck -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert -* 1a0bac8bccf0e156d2f3c5f14a7214f9677b6370 Tue Jun 21 17:42:29 2016 -0400 Jack Humbert - -## quantum/keymap_extras/keymap_jp.h - -* 2febf9b9f7d610fc2eca666a842272cb90a87919 Tue Nov 22 20:40:12 2016 +0900 h-youhei - -## quantum/keymap_extras/keymap_neo2.h - -* 7b7870bae178c80138be5c587238fdedeb837df9 Sat Dec 19 01:41:23 2015 +0100 Matthias Schmitt -* 4ca43225011ac94bd0a7976baf7f84059274dfbf Fri Feb 19 21:04:30 2016 +0100 plgruener -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert -* e329729d3a11b5798f4e2b9f65ac9bc2dcc84a9e Tue Jun 21 18:32:28 2016 -0400 Jack Humbert - -## quantum/keymap_extras/keymap_nordic.h - -* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert -* c29ad125a7a58d5a2ced0a619165204136da9019 Fri Feb 5 01:50:54 2016 +0100 Fernando Mendonca -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert -* 25938a09a6bfb2624bc96841b53897eda532e293 Thu Jul 14 11:13:35 2016 -0500 Jonathan A. Kollasch -* 283ebbe14298fe75128765fa42c46f02534fb761 Mon Jul 25 12:50:27 2016 +0200 Andreas Lindhé -* 555e41d9e5f8d393637898e2c77c64066b648245 Fri Dec 2 13:03:51 2016 -0500 Erez Zukerman - -## quantum/keymap_extras/keymap_norwegian.h - -* e329729d3a11b5798f4e2b9f65ac9bc2dcc84a9e Tue Jun 21 18:32:28 2016 -0400 Jack Humbert -* b6fa762234fb5a3590d0ff91ffdf5aa3ae322c8f Mon Jul 25 11:29:54 2016 +0200 Andreas Lindhé - -## quantum/keymap_extras/keymap_plover.h - -* 7ccfaf750d08bdb3a25ef2869cac251b7cd4d3ad Sat Apr 23 18:49:10 2016 +0100 James ‘Twey’ Kay -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert - -## quantum/keymap_extras/keymap_russian.h - -* c5ee24a6c3ea39e9725dfc276c92d5bce726ca78 Sun Aug 7 11:01:12 2016 -0500 kuel -* 2a0121a78643b1dc774d82352f8c9e246010803e Sun Aug 7 11:07:38 2016 -0500 kuel - -## quantum/keymap_extras/keymap_spanish.h - -* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert -* 132c04746910f7230b63ed33717c4ed65599ed1b Sat Jul 2 10:26:04 2016 +0200 Rubén Díaz-Jorge -* 25938a09a6bfb2624bc96841b53897eda532e293 Thu Jul 14 11:13:35 2016 -0500 Jonathan A. Kollasch - -## quantum/keymap_extras/keymap_uk.h - -* 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Oct 26 14:49:46 2015 -0400 Jack Humbert -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert -* 010dd1308420e25b327fa4d5d6b13f67a849408b Thu Jul 14 11:04:25 2016 -0500 Jonathan A. Kollasch -* 25938a09a6bfb2624bc96841b53897eda532e293 Thu Jul 14 11:13:35 2016 -0500 Jonathan A. Kollasch - -## quantum/keymap_extras/keymap_unicode_cyrillic.h - -* c5ee24a6c3ea39e9725dfc276c92d5bce726ca78 Sun Aug 7 11:01:12 2016 -0500 kuel - -## quantum/process_keycode/process_chording.c - -* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert - -## quantum/process_keycode/process_chording.h - -* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert - -## quantum/process_keycode/process_leader.c - -* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert - -## quantum/process_keycode/process_leader.h - -* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert - -## quantum/process_keycode/process_midi.c - -* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert -* 8b94e26d7c3b30cc57d710a11e5651d15e8e3b20 Sun Jul 24 22:07:43 2016 -0400 Jack Humbert -* 8d99140d1b80bf497b2198138d3f481e93b0fbab Thu Sep 29 14:46:10 2016 -0500 Adam Gausmann - -## quantum/process_keycode/process_midi.h - -* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert - -## quantum/process_keycode/process_music.c - -* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert -* 3ea738e450e9326b0d3ee4192da881cffb4c13c1 Sun Jul 24 10:00:39 2016 -0400 Robert Dale -* ae95834f5af7404c04e6fe3446019046278d814b Mon Dec 12 16:06:41 2016 -0500 Jack Humbert -* 273faa4d9cd5a84207548f83ba550c9efee90933 Fri Dec 23 20:59:00 2016 -0500 Jack Humbert -* 841d7e6a1d74b1fc45575ed551132ec27353ebf3 Mon Jan 23 13:55:24 2017 -0500 Jack Humbert - -## quantum/process_keycode/process_music.h - -* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert - -## quantum/process_keycode/process_printer.c - -* a889b899e2cf52b3b7807d8a7ad39f12e0761a10 Sun Oct 16 16:03:56 2016 -0400 Jack Humbert - -## quantum/process_keycode/process_printer.h - -* a889b899e2cf52b3b7807d8a7ad39f12e0761a10 Sun Oct 16 16:03:56 2016 -0400 Jack Humbert - -## quantum/process_keycode/process_printer_bb.c - -* a889b899e2cf52b3b7807d8a7ad39f12e0761a10 Sun Oct 16 16:03:56 2016 -0400 Jack Humbert - -## quantum/process_keycode/process_tap_dance.c - -* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert -* 1a7e954f9fc4d250ba1ae46e3bfc168aca2b5cce Wed Jul 13 00:20:28 2016 +0200 Pavlos Vinieratos -* f3b56701ed7e6c622dc48e429780124ba5fde172 Wed Jul 13 16:47:45 2016 +0200 Pavlos Vinieratos -* d3091faf363afc8fef73ddf4948f872439b0e827 Fri Jul 15 23:54:08 2016 +0200 Pavlos Vinieratos -* dda2fd6ff3984ed96f8275c661b47a0484f9ee18 Mon Jul 18 23:34:02 2016 +0200 Pavlos Vinieratos -* d5daec2a58019ebdb9804787e0f786e4fc3c05b9 Tue Jul 19 18:00:59 2016 +0200 Pavlos Vinieratos -* 4e6a8627d8ebd7af942f68142d1a959d60361d90 Tue Jul 19 18:02:13 2016 +0200 Pavlos Vinieratos -* 70e42489dec375e558d8e81ed5ebfb69b4f3dbd9 Wed Jul 20 10:22:52 2016 +0200 Gergely Nagy -* ce8cc9219fca5dde077f1142d03d011b38d27479 Wed Jul 20 11:34:45 2016 +0200 Gergely Nagy -* 44e16ffc80620b61eaa17aedcfdd8233d9c99bd9 Wed Jul 20 11:49:59 2016 +0200 Gergely Nagy -* b21e8b97acb722bfa7b85831cfd010716ed77962 Wed Jul 27 08:42:09 2016 +0200 Gergely Nagy -* d78058cc75a9b05a6885991506d5f807ebb2a9f9 Wed Aug 17 10:28:08 2016 +0200 Gergely Nagy -* 29f64d7a93d941167c6c6e95f893ab84586b2205 Wed Aug 17 13:04:50 2016 +0200 Gergely Nagy -* 0d28787c5cf2173d12f57b397515f91cffaa820a Thu Aug 18 11:29:53 2016 +0200 Gergely Nagy -* acda2b793f69c6e0e9b9667e9ebe8a0325eb5ecd Thu Sep 1 08:32:47 2016 +0200 Gergely Nagy -* e1f131db8e59c6ed3471906d3a62457d593f51af Wed Sep 21 10:11:42 2016 +0200 Pavlos Vinieratos - -## quantum/process_keycode/process_tap_dance.h - -* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert -* f3b56701ed7e6c622dc48e429780124ba5fde172 Wed Jul 13 16:47:45 2016 +0200 Pavlos Vinieratos -* d3091faf363afc8fef73ddf4948f872439b0e827 Fri Jul 15 23:54:08 2016 +0200 Pavlos Vinieratos -* 70e42489dec375e558d8e81ed5ebfb69b4f3dbd9 Wed Jul 20 10:22:52 2016 +0200 Gergely Nagy -* ce8cc9219fca5dde077f1142d03d011b38d27479 Wed Jul 20 11:34:45 2016 +0200 Gergely Nagy -* b21e8b97acb722bfa7b85831cfd010716ed77962 Wed Jul 27 08:42:09 2016 +0200 Gergely Nagy -* 29f64d7a93d941167c6c6e95f893ab84586b2205 Wed Aug 17 13:04:50 2016 +0200 Gergely Nagy -* 0edc82f0300924394324e2f3c4d2f8f0008439db Wed Sep 21 11:29:34 2016 +0200 Pavlos Vinieratos -* cda4b534fa4921c2d8f9884aa6a144333e7b07c4 Wed Sep 21 11:29:43 2016 +0200 Pavlos Vinieratos - -## quantum/process_keycode/process_unicode.c - -* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert -* 8bdf745909bc2581491acce11225f56a85bc8f24 Sat Aug 13 10:33:47 2016 +0200 Gergely Nagy -* 63e5782d2cdf0ee282ad434c773463d9da9db6b3 Sat Aug 13 10:43:22 2016 +0200 Gergely Nagy -* fa06a163607e8c6c4bd0968c2de96a9a298b777c Sat Aug 13 10:46:38 2016 +0200 Gergely Nagy -* 0b6861827faea747345ea38202d64c8004ab128c Sat Aug 13 11:11:22 2016 +0200 Gergely Nagy -* 857aa5bef6a74f8785a7039feea5286c07bf7067 Sat Aug 13 11:14:42 2016 +0200 Gergely Nagy -* 234dd276cf03be6fd6961473e9d9c8f35deec682 Sun Aug 14 10:37:51 2016 +0200 Gergely Nagy -* a312cbf712764277e0dbbbb99410c2f6fc6c7484 Sun Aug 14 14:34:52 2016 +0200 Gergely Nagy -* 43d08629cf275d0b32281ffe8785258fff226b49 Mon Aug 15 10:02:05 2016 +0200 Gergely Nagy -* e8845f0daf8dc7a7674dc5420cc5a684bbbea09b Mon Aug 15 10:07:13 2016 +0200 Gergely Nagy -* dffdeb50b79d3c623e2ed9fd1c1d82d6d0ae7bf0 Sun Aug 21 20:25:19 2016 +0200 coderkun -* 81594c7883deefedbcd317c72c1b1f1d32e65cd7 Sun Aug 21 21:02:18 2016 +0200 coderkun -* a058ae40e268b34ba5db45f5fd5d557d50fa5437 Wed Aug 24 15:39:23 2016 +0200 Gergely Nagy -* c9ea236fc35d350c0ff33de0af84d3dee7d0eb95 Wed Aug 31 08:21:52 2016 +0200 Gergely Nagy -* a3f5a4cf5839fe29dd37400d72c5e353812002f8 Sun Oct 2 10:35:09 2016 +0200 coderkun -* 5b2e455d3b71bfb90754930d1f22d3e8ce98b927 Mon Oct 10 00:46:20 2016 +0700 Priyadi Iman Nurcahyo -* e7d5dc89f2890007d776f6b613dc9deb473cff22 Sun Oct 23 05:36:26 2016 +0700 Priyadi Iman Nurcahyo -* 4a666c201007eacf13a9031e3c9b156e2e04afe6 Sun Oct 23 19:15:33 2016 +0700 Priyadi Iman Nurcahyo -* 8d60354d5a116b6cb1fc32eac7461eb125543c7d Wed Oct 26 00:48:44 2016 -0400 Jack Humbert -* 30b80a23f3cafd846937b37b249f2df4411e1f5a Mon Jan 9 02:59:10 2017 +0700 Priyadi Iman Nurcahyo - -## quantum/process_keycode/process_unicode.h - -* 65faab3b89245f81c50b029ca178aed175d5f330 Wed Jun 29 17:49:41 2016 -0400 Jack Humbert -* 63e5782d2cdf0ee282ad434c773463d9da9db6b3 Sat Aug 13 10:43:22 2016 +0200 Gergely Nagy -* fa06a163607e8c6c4bd0968c2de96a9a298b777c Sat Aug 13 10:46:38 2016 +0200 Gergely Nagy -* 857aa5bef6a74f8785a7039feea5286c07bf7067 Sat Aug 13 11:14:42 2016 +0200 Gergely Nagy -* 234dd276cf03be6fd6961473e9d9c8f35deec682 Sun Aug 14 10:37:51 2016 +0200 Gergely Nagy -* a312cbf712764277e0dbbbb99410c2f6fc6c7484 Sun Aug 14 14:34:52 2016 +0200 Gergely Nagy -* 43d08629cf275d0b32281ffe8785258fff226b49 Mon Aug 15 10:02:05 2016 +0200 Gergely Nagy -* e8845f0daf8dc7a7674dc5420cc5a684bbbea09b Mon Aug 15 10:07:13 2016 +0200 Gergely Nagy -* a058ae40e268b34ba5db45f5fd5d557d50fa5437 Wed Aug 24 15:39:23 2016 +0200 Gergely Nagy -* c9ea236fc35d350c0ff33de0af84d3dee7d0eb95 Wed Aug 31 08:21:52 2016 +0200 Gergely Nagy -* 5b2e455d3b71bfb90754930d1f22d3e8ce98b927 Mon Oct 10 00:46:20 2016 +0700 Priyadi Iman Nurcahyo -* 4a666c201007eacf13a9031e3c9b156e2e04afe6 Sun Oct 23 19:15:33 2016 +0700 Priyadi Iman Nurcahyo -* 6fee7e178f7c949213a124d78de60bc30267d367 Sat Nov 26 23:53:15 2016 +0700 Priyadi Iman Nurcahyo - -## quantum/serial_link/LICENSE - -* 639cdd363e35c13fe331939d0972aa4db5f5198d Tue Jul 5 23:27:47 2016 +0300 Fred Sundvik - -## quantum/serial_link/README.md - -* 639cdd363e35c13fe331939d0972aa4db5f5198d Tue Jul 5 23:27:47 2016 +0300 Fred Sundvik -* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik - -## quantum/serial_link/protocol/byte_stuffer.c - -* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik -* 0a11460175d6a838c71343c19eb4ce4699936247 Wed Aug 24 22:23:17 2016 +0300 Fred Sundvik - -## quantum/serial_link/protocol/byte_stuffer.h - -* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik -* 0a11460175d6a838c71343c19eb4ce4699936247 Wed Aug 24 22:23:17 2016 +0300 Fred Sundvik - -## quantum/serial_link/protocol/frame_router.c - -* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik - -## quantum/serial_link/protocol/frame_router.h - -* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik - -## quantum/serial_link/protocol/frame_validator.c - -* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik - -## quantum/serial_link/protocol/frame_validator.h - -* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik - -## quantum/serial_link/protocol/physical.h - -* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik - -## quantum/serial_link/protocol/transport.c - -* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik -* bcdf9ab76bf3723e6015d4255d53e7c1e7259b61 Sat Aug 27 14:18:49 2016 +0300 Fred Sundvik - -## quantum/serial_link/protocol/transport.h - -* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik -* bcdf9ab76bf3723e6015d4255d53e7c1e7259b61 Sat Aug 27 14:18:49 2016 +0300 Fred Sundvik - -## quantum/serial_link/protocol/triple_buffered_object.c - -* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik - -## quantum/serial_link/protocol/triple_buffered_object.h - -* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik - -## quantum/serial_link/system/serial_link.c - -* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik - -## quantum/serial_link/system/serial_link.h - -* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik - -## quantum/serial_link/tests/byte_stuffer_tests.cpp - -* 0a11460175d6a838c71343c19eb4ce4699936247 Wed Aug 24 22:23:17 2016 +0300 Fred Sundvik - -## quantum/serial_link/tests/frame_router_tests.cpp - -* cdd0913bcc63334fa20f1a7bd46bdce4d4f2843b Sat Aug 27 13:43:46 2016 +0300 Fred Sundvik - -## quantum/serial_link/tests/frame_validator_tests.cpp - -* b3eba797af74ace19b9f2e762bdd33d9449e3f94 Sat Aug 27 13:54:16 2016 +0300 Fred Sundvik - -## quantum/serial_link/tests/Makefile - -* d5e7603d551a31836bf0c59db259ddc3593a1aa7 Wed Jul 6 13:26:20 2016 +0300 Fred Sundvik - -## quantum/serial_link/tests/rules.mk - -* 0a11460175d6a838c71343c19eb4ce4699936247 Wed Aug 24 22:23:17 2016 +0300 Fred Sundvik -* cdd0913bcc63334fa20f1a7bd46bdce4d4f2843b Sat Aug 27 13:43:46 2016 +0300 Fred Sundvik -* b3eba797af74ace19b9f2e762bdd33d9449e3f94 Sat Aug 27 13:54:16 2016 +0300 Fred Sundvik -* bcdf9ab76bf3723e6015d4255d53e7c1e7259b61 Sat Aug 27 14:18:49 2016 +0300 Fred Sundvik -* ffb0a126f5b2484eda7f6b1c62ea61924eec6521 Sat Aug 27 14:25:52 2016 +0300 Fred Sundvik - -## quantum/serial_link/tests/testlist.mk - -* 6d7cd639a5e4503f00162c7cfa4bc7302b82c71c Sun Aug 21 16:29:54 2016 +0300 Fred Sundvik -* ffb0a126f5b2484eda7f6b1c62ea61924eec6521 Sat Aug 27 14:25:52 2016 +0300 Fred Sundvik - -## quantum/serial_link/tests/transport_tests.cpp - -* bcdf9ab76bf3723e6015d4255d53e7c1e7259b61 Sat Aug 27 14:18:49 2016 +0300 Fred Sundvik - -## quantum/serial_link/tests/triple_buffered_object_tests.cpp - -* ffb0a126f5b2484eda7f6b1c62ea61924eec6521 Sat Aug 27 14:25:52 2016 +0300 Fred Sundvik - -## quantum/template/config.h - -* 6f3141965e88c4ee0ebf7c18a243e4c2d9c5021b Tue Oct 27 14:33:18 2015 -0400 Jack Humbert -* 24f2698fba0055128eb90fbde793e3c84900df69 Sat Jan 23 20:45:52 2016 -0500 Jack Humbert -* 577971ab07a49405e1dcd8e5f75b3ecb87e710b9 Mon Mar 28 00:03:21 2016 -0500 IBNobody -* 1d13aa933bbb57bf0c1fe0196981b81233c3df97 Mon Mar 28 19:45:20 2016 -0500 IBNobody -* aaa758f1d3f97dda39879f2b055ad2da9680adfe Mon May 23 20:42:21 2016 -0700 Eric Tang -* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert - -## quantum/template/Makefile - -* 6f3141965e88c4ee0ebf7c18a243e4c2d9c5021b Tue Oct 27 14:33:18 2015 -0400 Jack Humbert -* 6485c7d7dae01c499a7e1f27e7956f12ce0f6901 Thu Nov 5 12:07:03 2015 -0500 Jack Humbert -* 24f2698fba0055128eb90fbde793e3c84900df69 Sat Jan 23 20:45:52 2016 -0500 Jack Humbert -* 577971ab07a49405e1dcd8e5f75b3ecb87e710b9 Mon Mar 28 00:03:21 2016 -0500 IBNobody -* 0656f2fa10e25e160617c3e5d14cfbae35dd9c8d Fri Apr 29 22:19:40 2016 -0400 Jack Humbert -* 38987d4c1589d2d457459f42e179be24b712be30 Sat May 28 12:05:17 2016 -0400 Jack Humbert -* d9e4dad0a828a8a904f44dda090a4d6d08fe2948 Sat Jun 11 13:31:31 2016 -0400 Jack Humbert -* a8375fa15a6ca9285eb15ae89bcda898349e06f8 Tue Jun 21 10:21:43 2016 -0400 Jack Humbert -* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert -* ab4d7adbb96fa034fd20364247d615f527661594 Fri Aug 19 09:06:28 2016 +0300 Fred Sundvik - -## quantum/template/readme.md - -* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert -* 1f5838a28679975f689e35471a35720ed5c7e7c5 Sat Aug 27 23:29:37 2016 +0300 Fred Sundvik - -## quantum/template/rules.mk - -* ab4d7adbb96fa034fd20364247d615f527661594 Fri Aug 19 09:06:28 2016 +0300 Fred Sundvik - -## quantum/template/template.c - -* 6f3141965e88c4ee0ebf7c18a243e4c2d9c5021b Tue Oct 27 14:33:18 2015 -0400 Jack Humbert -* 641859df84bf40025b2c14319d1a168a435562e2 Thu Mar 10 11:28:34 2016 -0500 yoyoerx -* eba9a7d74db0be548cddc107f0370dabf43b017f Tue Mar 15 23:52:51 2016 -0500 IBNobody -* ec62d9e85cab5cf166241b0536120d005fa7c898 Tue Mar 22 20:39:05 2016 -0500 IBNobody -* 3d56ec052ed485d4b717da930c4024b4a3f792e0 Tue Mar 22 21:06:22 2016 -0500 IBNobody -* 2181be029e01d9cf46ae3cadcdf25f5bca02c631 Mon Mar 28 16:13:37 2016 +0200 Damien Pollet -* 0656f2fa10e25e160617c3e5d14cfbae35dd9c8d Fri Apr 29 22:19:40 2016 -0400 Jack Humbert -* 1a8c0dd22d6a2255511d0db6a456315541b5815b Sun May 15 00:27:32 2016 -0400 Erez Zukerman -* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert -* 589df84d6cd19ad7d776cc19bcddade1cd178ddc Thu Jul 7 09:58:44 2016 -0400 Jack Humbert -* c1dfb636ef61159456bdb24f4fee3f27e5babbeb Thu Jul 7 12:22:10 2016 -0400 Jack Humbert - -## quantum/template/template.h - -* 6f3141965e88c4ee0ebf7c18a243e4c2d9c5021b Tue Oct 27 14:33:18 2015 -0400 Jack Humbert -* 24f2698fba0055128eb90fbde793e3c84900df69 Sat Jan 23 20:45:52 2016 -0500 Jack Humbert -* ee1b94045e5bebda517119cb1853b0ab3fd0f499 Fri Mar 4 10:53:58 2016 -0500 Noah Andrews -* 641859df84bf40025b2c14319d1a168a435562e2 Thu Mar 10 11:28:34 2016 -0500 yoyoerx -* eba9a7d74db0be548cddc107f0370dabf43b017f Tue Mar 15 23:52:51 2016 -0500 IBNobody -* ec62d9e85cab5cf166241b0536120d005fa7c898 Tue Mar 22 20:39:05 2016 -0500 IBNobody -* 2181be029e01d9cf46ae3cadcdf25f5bca02c631 Mon Mar 28 16:13:37 2016 +0200 Damien Pollet -* 0656f2fa10e25e160617c3e5d14cfbae35dd9c8d Fri Apr 29 22:19:40 2016 -0400 Jack Humbert -* 1a8c0dd22d6a2255511d0db6a456315541b5815b Sun May 15 00:27:32 2016 -0400 Erez Zukerman -* db32864ce7029d758f57729cc2f75e051a28d0a2 Sat Jun 18 14:30:24 2016 -0400 Jack Humbert -* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert - -## quantum/template/keymaps/default/config.h - -* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert - -## quantum/template/keymaps/default/keymap.c - -* d9e4dad0a828a8a904f44dda090a4d6d08fe2948 Sat Jun 11 13:31:31 2016 -0400 Jack Humbert -* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert - -## quantum/template/keymaps/default/Makefile - -* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert - -## quantum/template/keymaps/default/readme.md - -* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert - -## quantum/tools/eeprom_reset.hex - -* 0b0ec82427aff54481103559066213056b6d7598 Sat Apr 16 00:01:22 2016 -0400 Jack Humbert - -## quantum/tools/readme.md - -* 13bb6b4b7fdd2b3e419d0f89c93fb980b00eeb9b Thu Jun 23 22:18:20 2016 -0400 Jack Humbert - -## quantum/visualizer/lcd_backlight.c - -* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik - -## quantum/visualizer/lcd_backlight.h - -* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik - -## quantum/visualizer/led_test.c - -* 6c296557909501b71fe344ce379e74094cf77c8e Wed Jul 6 20:30:58 2016 +0300 Fred Sundvik -* 07d0d5cbe48d7afaf0bc8c9916d40179ec51cb42 Thu Jul 7 12:46:10 2016 +0300 Fred Sundvik - -## quantum/visualizer/led_test.h - -* 6c296557909501b71fe344ce379e74094cf77c8e Wed Jul 6 20:30:58 2016 +0300 Fred Sundvik - -## quantum/visualizer/LICENSE.md - -* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik - -## quantum/visualizer/readme.md - -* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik - -## quantum/visualizer/visualizer.c - -* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik -* 6c296557909501b71fe344ce379e74094cf77c8e Wed Jul 6 20:30:58 2016 +0300 Fred Sundvik -* 70797bb8f21c72cba15b314b2d0a6684bfedc369 Thu Jul 7 00:20:20 2016 +0300 Fred Sundvik -* 7229751ba9d402b2a6c9dc1b7b29385b5162fe41 Thu Jul 7 14:01:20 2016 +0300 Fred Sundvik -* dae7c9bfb3325412c542fbbe4342c9c8e0fc1904 Thu Jul 7 14:12:56 2016 +0300 Fred Sundvik -* 9eb8d05246fba4f46c04b8fa1884b8f2d2ee0664 Tue Jan 17 21:47:07 2017 -0500 SjB - -## quantum/visualizer/visualizer.h - -* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik -* 6c296557909501b71fe344ce379e74094cf77c8e Wed Jul 6 20:30:58 2016 +0300 Fred Sundvik -* 70797bb8f21c72cba15b314b2d0a6684bfedc369 Thu Jul 7 00:20:20 2016 +0300 Fred Sundvik -* 9eb8d05246fba4f46c04b8fa1884b8f2d2ee0664 Tue Jan 17 21:47:07 2017 -0500 SjB - -## quantum/visualizer/visualizer.mk - -* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik -* 6c296557909501b71fe344ce379e74094cf77c8e Wed Jul 6 20:30:58 2016 +0300 Fred Sundvik -* 70797bb8f21c72cba15b314b2d0a6684bfedc369 Thu Jul 7 00:20:20 2016 +0300 Fred Sundvik -* 07d0d5cbe48d7afaf0bc8c9916d40179ec51cb42 Thu Jul 7 12:46:10 2016 +0300 Fred Sundvik -* 7229751ba9d402b2a6c9dc1b7b29385b5162fe41 Thu Jul 7 14:01:20 2016 +0300 Fred Sundvik -* aaac254ebce2005272e7385488b5690bbbe6d7c8 Thu Jul 7 14:29:53 2016 +0300 Fred Sundvik -* caedec92d2c22480313c43a364408fb920c55364 Thu Jul 7 14:42:16 2016 +0300 Fred Sundvik - -## quantum/visualizer/example_integration/callbacks.c - -* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik - -## quantum/visualizer/example_integration/gfxconf.h - -* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik - -## quantum/visualizer/example_integration/lcd_backlight_hal.c - -* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik - -## quantum/visualizer/example_integration/visualizer_user.c - -* 9f33a5593cc70dfb0885328061f1aa4b2c2fa386 Wed Jul 6 20:15:45 2016 +0300 Fred Sundvik \ No newline at end of file diff --git a/docs/macros.md b/docs/macros.md index 1418d24ab4..c7a9b2e7a6 100644 --- a/docs/macros.md +++ b/docs/macros.md @@ -1,8 +1,10 @@ -# Macros - Send multiple keystrokes when pressing just one key +# Macros -QMK has a number of ways to define and use macros. These can do anything you want- type common phrases for you, copypasta, repetitive game movements, or even help you code. +Macros allow you to send multiple keystrokes when pressing just one key. QMK has a number of ways to define and use macros. These can do anything you want- type common phrases for you, copypasta, repetitive game movements, or even help you code. +{% hint style='danger' %} **Security Note**: While it is possible to use macros to send passwords, credit card numbers, and other sensitive information it is a supremely bad idea to do so. Anyone who gets ahold of your keyboard will be able to access that information by opening a text editor. +{% endhint %} # Macro Definitions @@ -22,7 +24,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { }; ``` -This defines two macros which will be run when the key they are assigned to is pressed. If you'd like them to run when the release is released instead you can change the if statement: +This defines two macros which will be run when the key they are assigned to is pressed. If instead you'd like them to run when the key is released you can change the if statement: ```c if (!record->event.pressed) { @@ -41,7 +43,7 @@ A macro can include the following commands: ## Sending strings -Sometimes you just want a key to type out words or phrases. For the most common situations we've provided `SEND_STRING()`, which will type out your string for you instead of having to build a `MACRO()`. Right now it assumes a US keymap with a QWERTY layout, so if you are using something else it may not behave as you expect. +Sometimes you just want a key to type out words or phrases. For the most common situations we've provided `SEND_STRING()`, which will type out your string for you instead of having to build a `MACRO()`. For example: @@ -58,6 +60,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { }; ``` +By default, it assumes a US keymap with a QWERTY layout; if you want to change that (e.g. if your OS uses software Colemak), include this somewhere in your keymap: + +``` +#include +``` + ## Mapping a Macro to a key Use the `M()` function within your `KEYMAP()` to call a macro. For example, here is the keymap for a 2-key keyboard: @@ -135,7 +143,7 @@ This will clear all mods currently pressed. This will clear all keys besides the mods currently pressed. -# Advanced Example: Single-key copy/paste (hold to copy, tap to paste) +# Advanced Example: Single-key copy/paste This example defines a macro which sends `Ctrl-C` when pressed down, and `Ctrl-V` when released. diff --git a/docs/mbed_cortex_porting.md b/docs/mbed_cortex_porting.md deleted file mode 100644 index b4b1314e6c..0000000000 --- a/docs/mbed_cortex_porting.md +++ /dev/null @@ -1,36 +0,0 @@ -## supported projects -### PS/2 converter -Confirmed it works on NXP LPC11U35. -- http://developer.mbed.org/platforms/TG-LPC11U35-501/ - -### Infinity keyboard -It runs on Freescale MK20DX128. - - - -## compile error: cstddef -Experienced this with arm-none-eabi-gcc (4.8.2-14ubuntu1+6) 4.8.2 on ubuntu 14.04. - -And resolved with 4.9.3 installed from: -- https://launchpad.net/gcc-arm-embedded -- https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded - -``` -$ make -f Makefile.mbed -mkdir -p build/. -arm-none-eabi-g++ -include config_mbed.h -mcpu=cortex-m0 -mthumb -c -g -fno-common -fmessage-length=0 -Wall -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -fshort-wchar -fno-builtin -MMD -MP -DNDEBUG -Os -DTARGET_LPC11U35_401 -DTARGET_M0 -DTARGET_NXP -DTARGET_LPC11UXX -DTOOLCHAIN_GCC_ARM -DTOOLCHAIN_GCC -D__CORTEX_M0 -DARM_MATH_CM0 -DMBED_BUILD_TIMESTAMP=1399108688.49 -D__MBED__=1 -std=gnu++98 -I. -I../../mbed-sdk/libraries/mbed/targets -I../../mbed-sdk/libraries/mbed/targets/cmsis -I../../mbed-sdk/libraries/mbed/targets/cmsis/TARGET_NXP -I../../mbed-sdk/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11UXX -I../../mbed-sdk/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11UXX/TOOLCHAIN_GCC_ARM -I../../mbed-sdk/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11UXX/TOOLCHAIN_GCC_ARM/TARGET_LPC11U35_501 -I../../mbed-sdk/libraries/mbed/targets/hal -I../../mbed-sdk/libraries/mbed/targets/hal/TARGET_NXP -I../../mbed-sdk/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX -I../../mbed-sdk/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_MCU_LPC11U35_501 -I../../mbed-sdk/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_MCU_LPC11U35_501/TARGET_LPC11U35_501 -I../../mbed-sdk/libraries/mbed -I../../mbed-sdk/libraries/mbed/hal -I../../mbed-sdk/libraries/mbed/api -I../../mbed-sdk/libraries/mbed/common -I../../mbed-sdk/libraries/USBDevice -I../../mbed-sdk/libraries/USBDevice/USBHID -I../../mbed-sdk/libraries/USBDevice/USBDevice -I../../mbed-sdk/libraries/USBDevice/USBAudio -I../../mbed-sdk/libraries/USBDevice/USBSerial -I../../mbed-sdk/libraries/USBDevice/USBMSD -I../../mbed-sdk/libraries/USBDevice/USBMIDI -I../../protocol/mbed -I../../common -I../../protocol -o build/./main.o main.cpp -In file included from ../../mbed-sdk/libraries/mbed/api/mbed.h:21:0, - from main.cpp:1: -../../mbed-sdk/libraries/mbed/api/platform.h:25:19: fatal error: cstddef: No such file or directory - #include - ^ -compilation terminated. -make: *** [build/./main.o] Error 1 - -[13:13] noname@desk:/mnt/old_root/home/noname/tmp/tmk_keyboard/converter/ps2_usb -$ arm-none-eabi-gcc --version -arm-none-eabi-gcc (4.8.2-14ubuntu1+6) 4.8.2 -Copyright (C) 2013 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -``` \ No newline at end of file diff --git a/docs/memory_write_error,_use_debug_for_more_info.md b/docs/memory_write_error,_use_debug_for_more_info.md deleted file mode 100644 index 154f3620b9..0000000000 --- a/docs/memory_write_error,_use_debug_for_more_info.md +++ /dev/null @@ -1,21 +0,0 @@ -In rare circumstances, your keyboard/device can become unwritable, and `dfu-programmer` will give you an error like this: - - Erasing flash... Success - Checking memory from 0x0 to 0x6FFF... Empty. - Checking memory from 0x0 to 0x607F... Empty. - 0% 100% Programming 0x6080 bytes... - [ X ERROR - Memory write error, use debug for more info. - -Currently the only way to solve this is to [reprogram the chip via ISP](https://www.reddit.com/r/olkb/comments/4rjzen/flashing_error_on_mac_os_x/d52rj8o/). This requires another device to be hooked up to a couple of exposed pins on the PCB. __[We now have a guide on ISP flashing](isp_flashing_guide.md)__ and [this is where things are on the Planck PCB](http://imgur.com/lvbxbHt). - -An example command to flash the board once things are hooked up is: - - avrdude -c usbtiny -p m32u4 -U flash:w:planck_default_rev4.hex - -Research is still being done on why this happens, but here are some cases: - -* [`make -f Makefile.rn42 dfu` and not the dfu-programmer commands worked for @tybenz](https://github.com/tmk/tmk_keyboard/issues/316) - also see [the hhkb keyboard on tmk](https://github.com/tmk/tmk_keyboard/tree/master/keyboard/hhkb) -* [Doing a force erase works here](https://geekhack.org/index.php?topic=12047.msg1520147#msg1520147) -* [`dfu-programmer atmega32u4 erase --force` works here as well](https://forum.fhem.de/index.php?topic=29777.0) [DE] -* [Unresolved, but some data dumps](https://github.com/dfu-programmer/dfu-programmer/issues/29) \ No newline at end of file diff --git a/docs/modding_your_keyboard.md b/docs/modding_your_keyboard.md deleted file mode 100644 index 44e6e6e72a..0000000000 --- a/docs/modding_your_keyboard.md +++ /dev/null @@ -1,388 +0,0 @@ - -## Audio output from a speaker - -Your keyboard can make sounds! If you've got a Planck, Preonic, or basically any keyboard that allows access to the C6 or B5 port (`#define C6_AUDIO` and `#define B5_AUDIO`), you can hook up a simple speaker and make it beep. You can use those beeps to indicate layer transitions, modifiers, special keys, or just to play some funky 8bit tunes. - -The audio code lives in [quantum/audio/audio.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/audio.h) and in the other files in the audio directory. It's enabled by default on the Planck [stock keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/default/keymap.c). Here are the important bits: - -``` -#include "audio.h" -``` - -Then, lower down the file: - -``` -float tone_startup[][2] = { - ED_NOTE(_E7 ), - E__NOTE(_CS7), - E__NOTE(_E6 ), - E__NOTE(_A6 ), - M__NOTE(_CS7, 20) -}; -``` - -This is how you write a song. Each of these lines is a note, so we have a little ditty composed of five notes here. - -Then, we have this chunk: - -``` -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -float tone_plover[][2] = SONG(PLOVER_SOUND); -float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); - -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); -float goodbye[][2] = SONG(GOODBYE_SOUND); -``` - -Wherein we bind predefined songs (from [quantum/audio/song_list.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/song_list.h)) into named variables. This is one optimization that helps save on memory: These songs only take up memory when you reference them in your keymap, because they're essentially all preprocessor directives. - -So now you have something called `tone_plover` for example. How do you make it play the Plover tune, then? If you look further down the keymap, you'll see this: - -``` -PLAY_NOTE_ARRAY(tone_plover, false, 0); // Signature is: Song name, repeat, rest style -``` - -This is inside one of the macros. So when that macro executes, your keyboard plays that particular chime. - -"Rest style" in the method signature above (the last parameter) specifies if there's a rest (a moment of silence) between the notes. - -## Music mode - -The music mode maps your columns to a chromatic scale, and your rows to octaves. This works best with ortholinear keyboards, but can be made to work with others. All keycodes less than `0xFF` get blocked, so you won't type while playing notes - if you have special keys/mods, those will still work. A work-around for this is to jump to a different layer with KC_NOs before (or after) enabling music mode. - -Recording is experimental due to some memory issues - if you experience some weird behavior, unplugging/replugging your keyboard will fix things. - -Keycodes available: - -* `MU_ON` - Turn music mode on -* `MU_OFF` - Turn music mode off -* `MU_TOG` - Toggle music mode - -In music mode, the following keycodes work differently, and don't pass through: - -* `LCTL` - start a recording -* `LALT` - stop recording/stop playing -* `LGUI` - play recording -* `KC_UP` - speed-up playback -* `KC_DOWN` - slow-down playback - -## MIDI functionalty - -This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile. - -## Bluetooth functionality - -This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will. - -## RGB Under Glow Mod - -![Planck with RGB Underglow](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/planck-with-rgb-underglow.jpg) - -Here is a quick demo on Youtube (with NPKC KC60) (https://www.youtube.com/watch?v=VKrpPAHlisY). - -For this mod, you need an unused pin wiring to DI of WS2812 strip. After wiring the VCC, GND, and DI, you can enable the underglow in your Makefile. - - RGBLIGHT_ENABLE = yes - -In order to use the underglow animation functions, you need to have `#define RGBLIGHT_ANIMATIONS` in your `config.h`. - -Please add the following options into your config.h, and set them up according your hardware configuration. These settings are for the `F4` pin by default: - - #define RGB_DI_PIN F4 // The pin your RGB strip is wired to - #define RGBLIGHT_ANIMATIONS // Require for fancier stuff (not compatible with audio) - #define RGBLED_NUM 14 // Number of LEDs - #define RGBLIGHT_HUE_STEP 10 - #define RGBLIGHT_SAT_STEP 17 - #define RGBLIGHT_VAL_STEP 17 - -You'll need to edit `RGB_DI_PIN` to the pin you have your `DI` on your RGB strip wired to. - -The firmware supports 5 different light effects, and the color (hue, saturation, brightness) can be customized in most effects. To control the underglow, you need to modify your keymap file to assign those functions to some keys/key combinations. For details, please check this keymap. `keyboards/planck/keymaps/yang/keymap.c` - -### WS2812 Wiring - -![WS2812 Wiring](https://raw.githubusercontent.com/qmk/qmk_firmware/master/keyboards/planck/keymaps/yang/WS2812-wiring.jpg) - -Please note the USB port can only supply a limited amount of power to the keyboard (500mA by standard, however, modern computer and most usb hubs can provide 700+mA.). According to the data of NeoPixel from Adafruit, 30 WS2812 LEDs require a 5V 1A power supply, LEDs used in this mod should not more than 20. - -## PS/2 Mouse Support - -Its possible to hook up a PS/2 mouse (for example touchpads or trackpoints) to your keyboard as a composite device. - -To hook up a Trackpoint, you need to obtain a Trackpoint module (i.e. harvest from a Thinkpad keyboard), identify the function of each pin of the module, and make the necessary circuitry between controller and Trackpoint module. For more information, please refer to [Trackpoint Hardware](https://deskthority.net/wiki/TrackPoint_Hardware) page on Deskthority Wiki. - -There are three available modes for hooking up PS/2 devices: USART (best), interrupts (better) or busywait (not recommended). - -### Busywait version - -Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible. - -In rules.mk: - -``` -PS2_MOUSE_ENABLE = yes -PS2_USE_BUSYWAIT = yes -``` - -In your keyboard config.h: - -``` -#ifdef PS2_USE_BUSYWAIT -# define PS2_CLOCK_PORT PORTD -# define PS2_CLOCK_PIN PIND -# define PS2_CLOCK_DDR DDRD -# define PS2_CLOCK_BIT 1 -# define PS2_DATA_PORT PORTD -# define PS2_DATA_PIN PIND -# define PS2_DATA_DDR DDRD -# define PS2_DATA_BIT 2 -#endif -``` - -### Interrupt version - -The following example uses D2 for clock and D5 for data. You can use any INT or PCINT pin for clock, and any pin for data. - -In rules.mk: - -``` -PS2_MOUSE_ENABLE = yes -PS2_USE_INT = yes -``` - -In your keyboard config.h: - -``` -#ifdef PS2_USE_INT -#define PS2_CLOCK_PORT PORTD -#define PS2_CLOCK_PIN PIND -#define PS2_CLOCK_DDR DDRD -#define PS2_CLOCK_BIT 2 -#define PS2_DATA_PORT PORTD -#define PS2_DATA_PIN PIND -#define PS2_DATA_DDR DDRD -#define PS2_DATA_BIT 5 - -#define PS2_INT_INIT() do { \ - EICRA |= ((1< -- - -## kbupgrade[USB][V-USB][AVR] -- -- - -## c64key[USB][V-USB][AVR] -- - -## rump[USB][V-USB][AVR] -- -- - -## dulcimer[USB][V-USB][AVR] -- - -## humblehacker-keyboard[USB][LUFA][AVR][Ergo] -- -- -- - -## ps2avr[PS/2][AVR] -- - -## ErgoDox[Ergo][Split][USB][AVR] -- -- -- - -## Suka's keyboard collection[Ergo][Split][3DPrinting][USB][AVR] -- -- - -## bpiphany's AVR-Keyboard[PJRC][AVR][USB] -- -- -- - -## USB-USB keyboard remapper[converter][USB-USB][AVR][Arduino] -- -- - -## USB-USB converter threads[converter][USB-USB] -- -- - -## kbdbabel.org[converter][vintage][protocol][8051] -Great resource of vintage keyboard protocol information and code - -- - -## Haata's kiibohd Controller[converter][vintage][protocol][AVR][PJRC][Cortex] -A lots of vintage keyboard protocol supports - -- - -## Kinesis ergonomic keyboard firmware replacement[V-USB][LUFA][Ergo] -- diff --git a/docs/pcb_guide.md b/docs/pcb_guide.md deleted file mode 100644 index e07a114888..0000000000 --- a/docs/pcb_guide.md +++ /dev/null @@ -1,151 +0,0 @@ -# Planck Firmware Guide - -## Setting up the environment - -### Windows -1. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**. -2. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location. -3. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/qmk/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer. -4. Right-click on the 1-setup-path-win batch script, select "Run as administrator", and accept the User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up. -5. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete! - - -### Mac - -If you're using homebrew, you can use the following commands: - - brew tap osx-cross/avr - brew install avr-libc - brew install dfu-programmer - -Otherwise, these instructions will work: - -1. Install Xcode from the App Store. -2. Install the Command Line Tools from `Xcode->Preferences->Downloads`. -3. Install [DFU-Programmer][dfu-prog]. - -### Linux -1. Install AVR GCC with your favorite package manager. -2. Install [DFU-Programmer][dfu-prog]. - -Note that, since it will be directly accessing USB hardware, the -`dfu-programmer` program needs to be run as root. - -## Verify Your Installation -1. Clone the following repository: https://github.com/qmk/qmk_firmware -2. Open a Terminal and `cd` into `qmk_firmware/keyboards/planck` -3. Run `make`. This should output a lot of information about the build process. - -## Using the built-in functions - -Here is a list of some of the functions available from the command line: - -* `make clean`: clean the environment - may be required in-between builds -* `make`: compile the code -* `make KEYMAP=`: compile with the extended keymap file `extended_keymaps/extended_keymap_.c` -* `make dfu`: build and flash the layout to the PCB -* `make dfu-force`: build and force-flash the layout to the PCB (may be require for first flash) - -Generally, the instructions to flash the PCB are as follows: - -1. Make changes to the appropriate keymap file -2. Save the file -3. `make clean` -4. Press the reset button on the PCB/press the key with the `RESET` keycode -5. `make dfu` - use the necessary `KEYMAP=` and/or `COMMON=true` arguments here. - -## Troubleshooting -If you see something like this - - 0 [main] sh 13384 sync_with_child: child 9716(0x178) died before initialization with status code 0xC0000142 - 440 [main] sh 13384 sync_with_child: *** child state waiting for longjmp - /usr/bin/sh: fork: Resource temporarily unavailable - -after running 'make' on Windows than you are encountering a very popular issue with WinAVR on Windows 8.1 and 10. -You can easily fix this problem by replacing msys-1.0.dll in WinAVR/utils/bin with [this one](http://www.madwizard.org/download/electronics/msys-1.0-vista64.zip). -Restart your system and everything should work fine! - - -If you see this - - dfu-programmer atmega32u4 erase - process_begin: CreateProcess(NULL, dfu-programmer atmega32u4 erase, ...) failed. - make (e=2): The system cannot find the file specified. - make: *** [dfu] Error 2 - -when trying to 'make dfu' on Windows you need to copy the dfu-programmer.exe to qmk_firmware/keyboards/planck. - - -## Quantum MK Firmware - -### Keymap - -Unlike the other keymaps, prefixing the keycodes with `KC_` is required. A full list of the keycodes is available [here](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keycode.txt). For the keycodes available only in the extended keymap, see this [header file](https://github.com/qmk/qmk_firmware/blob/master/quantum/keymap_common.h). - -You can use modifiers with keycodes like this: - - LCTL(KC_C) - -Which will generate Ctrl+c. These are daisy-chainable, meaning you can do things like: - - LCTL(LALT(KC_C)) - -That will generate Ctrl+Alt+c. The entire list of these functions is here: - -* `LCTL()`: Left control -* `LSFT()` / `S()`: Left shift -* `LALT()`: Left alt/opt -* `LGUI()`: Left win/cmd -* `RCTL()`: Right control -* `RSFT()`: Right shift -* `RALT()`: Right alt/opt -* `RGUI()`: Right win/cmd - -`S(KC_1)`-like entries are useful in writing keymaps for the Planck. - -### Other keycodes - -A number of other keycodes have been added that you may find useful: - -* `CM_`: the Colemak equivalent of a key (in place of `KC_`), when using Colemak in software (`CM_O` generates `KC_SCLN`) -* `RESET`: jump to bootloader for flashing (same as press the reset button) -* `BL_STEP`: step through the backlight brightnesses -* `BL_<0-15>`: set backlight brightness to 0-15 -* `BL_DEC`: lower the backlight brightness -* `BL_INC`: raise the backlight brightness -* `BL_TOGG`: toggle the backlight on/off - -### Function layers - -The extended keymap extends the number of function layers from 32 to the near-infinite value of 256. Rather than using `FN` notation (still available, but limited to `FN0`-`FN31`), you can use the `FUNC()` notation. `F()` is a shortcut for this. - -The function actions are unchanged, and you can see the full list of them [here](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_code.h). They are explained in detail [here](keymap.md#2-action). - -### Macros - -Macros have been setup in the `keymaps/keymap_default.c` file so that you can use `M()` to access a macro in the `action_get_macro` section on your keymap. The switch/case structure you see here is required, and is setup for `M(0)` - you'll need to copy and paste the code to look like this (e.g. to support `M(3)`): - - switch(id) { - case 0: - return MACRODOWN(TYPE(KC_A), END); - break; - case 1: - return MACRODOWN(TYPE(KC_B), END); - break; - case 2: - return MACRODOWN(TYPE(KC_C), END); - break; - case 3: - return MACRODOWN(TYPE(KC_D), END); - break; - } - return MACRO_NONE; - -`MACRODOWN()` is a shortcut for `(record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE)` which tells the macro to execute when the key is pressed. Without this, the macro will be executed on both the down and up stroke. - -[cygwin]: https://www.cygwin.com/ -[mingw]: http://www.mingw.org/ -[mhv]: https://infernoembedded.com/products/avr-tools -[winavr]: http://winavr.sourceforge.net/ -[crosspack]: http://www.obdev.at/products/crosspack/index.html -[dfu-prog]: http://dfu-programmer.sourceforge.net/ diff --git a/docs/porting_your_keyboard_to_qmk.md b/docs/porting_your_keyboard_to_qmk.md index 05787042fd..3fa08830b2 100644 --- a/docs/porting_your_keyboard_to_qmk.md +++ b/docs/porting_your_keyboard_to_qmk.md @@ -20,7 +20,7 @@ For the `DIODE_DIRECTION`, most hand-wiring guides will instruct you to wire the `BACKLIGHT_LEVELS` is how many levels exist for your backlight - max is 15, and they are computed automatically from this number. -## `/keyboards//Makefile` +## `/keyboards//rules.mk` The values at the top likely won't need to be changed, since most boards use the `atmega32u4` chip. The `BOOTLOADER_SIZE` will need to be adjusted based on your MCU type. It's defaulted to the Teensy, since that's the most common controller. Below is quoted from the `Makefile`. @@ -34,7 +34,7 @@ The values at the top likely won't need to be changed, since most boards use the OPT_DEFS += -DBOOTLOADER_SIZE=512 ``` -At the bottom of the file, you'll find lots of features to turn on and off - all of these options should be set with `?=` to allow for the keymap overrides. `?=` only assigns if the variable was previously undefined. For the full documenation of these features, see the [Makefile options](#makefile-options). +At the bottom of the file, you'll find lots of features to turn on and off - all of these options should be set with `?=` to allow for the keymap overrides. `?=` only assigns if the variable was previously undefined. For the full documenation of these features, see the [Makefile options](getting_started_make_guide.md#makefile-options). ## `/keyboards//readme.md` @@ -42,7 +42,7 @@ This is where you'll describe your keyboard - please write as much as you can ab ## `/keyboards//.c` -This is where all of the custom logic for your keyboard goes - you may not need to put anything in this file, since a lot of things are configured automatically. All of the `*_kb()` functions are defined here. If you modify them, remember to keep the calls to `*_user()`, or things in the keymaps might not work. You can read more about the functions [here](#custom-quantum-functions-for-keyboards-and-keymaps) +This is where all of the custom logic for your keyboard goes - you may not need to put anything in this file, since a lot of things are configured automatically. All of the `*_kb()` functions are defined here. If you modify them, remember to keep the calls to `*_user()`, or things in the keymaps might not work. You can read more about the functions [here](custom_quantum_functions.md). ## `/keyboards//.h` diff --git a/docs/previously_asked_questions.asciidoc b/docs/previously_asked_questions.asciidoc deleted file mode 100644 index 36af1f2035..0000000000 --- a/docs/previously_asked_questions.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -= Previously Asked Questions -:toc: -:toc-placement: preamble - -toc::[] - -= Question thread -http://deskthority.net/workshop-f7/how-to-build-your-very-own-keyboard-firmware-t7177-270.html - -= Questions -== Columns beyond 16(uint16_t) cannot be read -* https://github.com/tmk/tmk_keyboard/wiki/FAQ#cant-read-comlumn-of-matrix-beyond-16 -* http://deskthority.net/workshop-f7/how-to-build-your-very-own-keyboard-firmware-t7177-270.html#p247051 -* http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279 diff --git a/docs/qmk_overview.md b/docs/qmk_overview.md deleted file mode 100644 index 6fdb68c49f..0000000000 --- a/docs/qmk_overview.md +++ /dev/null @@ -1,75 +0,0 @@ -# QMK Overview - -This page attempts to explain the basic information you need to know to work with the QMK project. It assumes that you are familiar with navigating a UNIX shell, but does not assume you are familiar with C or with compiling using make. - -# Basic QMK structure - -QMK is a fork of @tmk's [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders. - -## Keyboard project structure - -Within the `handwired` and `keyboard` folders is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within you'll find the following structure: - -* `keymaps/`: Different keymaps that can be built -* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`. -* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`. - -### Keymap structure - -In every keymap folder, the following files may be found. Only `keymap.c` is required, if the rest of the files are not found the default options will be chosen. - -* `config.h`: the options to configure your keymap -* `keymap.c`: all of your keymap code, required -* `Makefile`: the features of QMK that are enabled, required to run `make` in your keymap folder -* `readme.md`: a description of your keymap, how others might use it, and explanations of features -* Other files: Some people choose to include an image depicting the layout, and other files that help people to use or understand a particular keymap. - -# The `make` command - -The `make` command is how you compile the firmware into a .hex file, which can be loaded by a dfu programmer (like dfu-progammer via `make dfu`) or the [Teensy loader](https://www.pjrc.com/teensy/loader.html) (only used with Teensys). It it recommended that you always run make from within the `root` folder. - -**NOTE:** To abort a make command press `Ctrl-c` - -For more details on the QMK build process see [Make Instructions](make_instructions.md). - -### Simple instructions for building and uploading a keyboard - -**Most keyboards have more specific instructions in the keyboard specific readme.md file, so please check that first** - -1. Enter the `root` folder -2. Run `make ---` - -In the above commands, replace: - -* `` with the name of your keyboard -* `` with the name of your keymap -* `` with the name of the subproject (revision or sub-model of your keyboard). For example, for Ergodox it can be `ez` or `infinity`, and for Planck `rev3` or `rev4`. - * If the keyboard doesn't have a subproject, or if you are happy with the default (defined in `rules.mk` file of the `keyboard` folder), you can leave it out. But remember to also remove the dash (`-`) from the command. -* `` The programmer to use. Most keyboards use `dfu`, but some use `teensy`. Infinity keyboards use `dfu-util`. Check the readme file in the keyboard folder to find out which programmer to use. - * If you don't add `-/`) -* keymap (`/keyboards//keymaps//`) - -The keyboard `config.h` is included only if the keymap one doesn't exist. The format to use for your custom one [is here](https://github.com/qmk/qmk_firmware/blob/master/doc/keymap_config_h_example.h). If you want to override a setting from the parent `config.h` file, you need to do this: - -```c -#undef MY_SETTING -#define MY_SETTING 4 -``` - -For a value of `4` for this imaginary setting. So we `undef` it first, then `define` it. - -You can then override any settings, rather than having to copy and paste the whole thing. \ No newline at end of file diff --git a/docs/quantum_keycodes.md b/docs/quantum_keycodes.md new file mode 100644 index 0000000000..a5160bf94a --- /dev/null +++ b/docs/quantum_keycodes.md @@ -0,0 +1,22 @@ +# Quantum Keycodes + +Quantum keycodes allow for easier customisation of your keymap than the basic ones provide, without having to define custom actions. + +All keycodes within quantum are numbers between `0x0000` and `0xFFFF`. Within your `keymap.c` it may look like you have functions and other special cases, but ultimately the C preprocessor will translate those into a single 4 byte integer. QMK has reserved `0x0000` through `0x00FF` for standard keycodes. These are keycodes such as `KC_A`, `KC_1`, and `KC_LCTL`, which are basic keys defined in the USB HID specification. + +On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are used to implement advanced quantum features. If you define your own custom keycodes they will be put into this range as well. + +## QMK keycodes + +|Name|Description| +|----|-----------| +|`RESET`|Put the keyboard into DFU mode for flashing| +|`DEBUG`|Toggles debug mode| +|`KC_GESC`/`GRAVE_ESC`|Acts as escape when pressed normally but when pressed with Shift or GUI will send a ```| +|`KC_LSPO`|Left shift when held, open paranthesis when tapped| +|`KC_RSPC`|Right shift when held, close paranthesis when tapped| +|`KC_LEAD`|The [leader key](feature_leader_key.md)| +|`KC_LOCK`|The [lock key](key_lock.md)| +|`FUNC(n)`/`F(n)`|Call `fn_action(n)` (deprecated)| +|`M(n)`|to call macro n| +|`MACROTAP(n)`|to macro-tap n idk FIXME| diff --git a/docs/report_descriptor.md b/docs/report_descriptor.md deleted file mode 100644 index fd5e96c67d..0000000000 --- a/docs/report_descriptor.md +++ /dev/null @@ -1 +0,0 @@ -# Get Report Descriptor with lsusb \ No newline at end of file diff --git a/docs/stenography.md b/docs/stenography.md new file mode 100644 index 0000000000..8c779032b9 --- /dev/null +++ b/docs/stenography.md @@ -0,0 +1,108 @@ +# Stenography in QMK + +[Stenography](https://en.wikipedia.org/wiki/Stenotype) is a method of writing most often used by court reports, closed-captioning, and real-time transcription for the deaf. In stenography words are chorded syllable by syllable with a mixture of spelling, phonetic, and shortcut (briefs) strokes. Professional stenographers can reach 200-300 WPM without any of the strain usually found in standard typing and with far fewer errors (>99.9% accuracy). + +The [Open Steno Project](http://www.openstenoproject.org/) has built an open-source program called Plover that provides real-time translation of steno strokes into words and commands. It has an established dictionary and supports + +## Plover with QWERTY Keyboard + +Plover can work with any standard QWERTY keyboard, although it is more efficient if the keyboard supports NKRO (n-key rollover) to allow Plover to see all the pressed keys at once. An example keymap for Plover can be found in `planck/keymaps/default`. Switching to the `PLOVER` layer adjusts the position of the keyboard to support the number bar. + +To use Plover with QMK just enable NKRO and optionally adjust your layout if you have anything other than a standard layout. You may also want to purchase some steno-friendly keycaps to make it easier to hit multiple keys. + +## Plover with Steno Protocol + +Plover also understands the language of several steno machines. QMK can speak a couple of these languages, TX Bolt and GeminiPR. An example layout can be found in `planck/keymaps/steno`. + +When QMK speaks to Plover over a steno protocol Plover will not use the keyboard as input. This means that you can switch back and forth between a standard keyboard and your steno keyboard, or even switch layers from Plover to standard and back without needing to activate/deactive Plover. + +In this mode Plover expects to speak with a steno machine over a serial port so QMK will present itself to the operating system as a virtual serial port in addition to a keyboard. By default QMK will speak the TX Bolt protocol but can be switched to GeminiPR; the last protocol used is stored in non-volatile memory so QMK will use the same protocol on restart. + +> Note: Due to hardware limitations you may not be able to run both a virtual serial port and mouse emulation at the same time. + +### TX Bolt + +TX Bolt communicates the status of 24 keys over a very simple protocol in variable-sized (1-5 byte) packets. + +### GeminiPR + +GeminiPR encodes 42 keys into a 6-byte packet. While TX Bolt contains everything that is necessary for standard stenography, GeminiPR opens up many more options, including supporting non-English theories. + +## Configuring QMK for Steno + +Firstly, enable steno in your keymap's Makefile. You should also diable mousekeys to prevent conflicts. + +```Makefile +STENO_ENABLE = yes +MOUSEKEY_ENABLE = no +``` + +In your keymap create a new layer for Plover. You will need to include `keymap_steno.h`. See `planck/keymaps/steno/keymap.c` for an example. Remember to create a key to switch to the layer as well as a key for exiting the layer. If you would like to switch modes on the fly you can use the keycodes `QK_STENO_BOLT` and `QK_STENO_GEMINI`. If you only want to use one of the protocols you may set it up in your initialization function: + +```C +void matrix_init_user() { + steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT +} +``` + +Once you have your keyboard flashed launch Plover. Click the 'Configure...' button. In the 'Machine' tab select the Stenotype Machine that corresponds to your desired protocol. Click the 'Configure...' button on this tab and enter the serial port or click 'Scan'. Baud rate is fine at 9600 (although you should be able to set as high as 115200 with no issues). Use the default settings for everything else (Data Bits: 8, Stop Bits: 1, Parity: N, no flow control). + +On the display tab click 'Open stroke display'. With Plover disabled you should be able to hit keys on your keyboard and see them show up in the stroke display window. Use this to make sure you have set up your keymap correctly. You are now ready to steno! + +## Learning Stenography + +* [Learn Plover!](https://sites.google.com/site/ploverdoc/) +* [QWERTY Steno](http://qwertysteno.com/Home/) +* [Steno Jig](https://joshuagrams.github.io/steno-jig/) +* More resources at the Plover [Learning Stenography](https://github.com/openstenoproject/plover/wiki/Learning-Stenography) wiki + +## Keycode Reference + +As defined in `keymap_steno.h`. + +> Note: TX Bolt does not support the full set of keys. The TX Bolt implementation in QMK will map the GeminiPR keys to the nearest TX Bolt key so that one key map will work for both. + +|GeminiPR|TX Bolt|Steno Key| +|--------|-------|-----------| +|`STN_N1`|`STN_NUM`|Number bar #1| +|`STN_N2`|`STN_NUM`|Number bar #2| +|`STN_N3`|`STN_NUM`|Number bar #3| +|`STN_N4`|`STN_NUM`|Number bar #4| +|`STN_N5`|`STN_NUM`|Number bar #5| +|`STN_N6`|`STN_NUM`|Number bar #6| +|`STN_N7`|`STN_NUM`|Number bar #7| +|`STN_N8`|`STN_NUM`|Number bar #8| +|`STN_N9`|`STN_NUM`|Number bar #9| +|`STN_NA`|`STN_NUM`|Number bar #A| +|`STN_NB`|`STN_NUM`|Number bar #B| +|`STN_NC`|`STN_NUM`|Number bar #C| +|`STN_S1`|`STN_SL`| `S-` upper| +|`STN_S2`|`STN_SL`| `S-` lower| +|`STN_TL`|`STN_TL`| `T-`| +|`STN_KL`|`STN_KL`| `K-`| +|`STN_PL`|`STN_PL`| `P-`| +|`STN_WL`|`STN_WL`| `W-`| +|`STN_HL`|`STN_HL`| `H-`| +|`STN_RL`|`STN_RL`| `R-`| +|`STN_A`|`STN_A`| `A` vowel| +|`STN_O`|`STN_O`| `O` vowel| +|`STN_ST1`|`STN_STR`| `*` upper-left | +|`STN_ST2`|`STN_STR`| `*` lower-left| +|`STN_ST3`|`STN_STR`| `*` upper-right| +|`STN_ST4`|`STN_STR`| `*` lower-right| +|`STN_E`|`STN_E`| `E` vowel| +|`STN_U`|`STN_U`| `U` vowel| +|`STN_FR`|`STN_FR`| `-F`| +|`STN_PR`|`STN_PR`| `-P`| +|`STN_RR`|`STN_RR`| `-R`| +|`STN_BR`|`STN_BR`| `-B`| +|`STN_LR`|`STN_LR`| `-L`| +|`STN_GR`|`STN_GR`| `-G`| +|`STN_TR`|`STN_TR`| `-T`| +|`STN_SR`|`STN_SR`| `-S`| +|`STN_DR`|`STN_DR`| `-D`| +|`STN_ZR`|`STN_ZR`| `-Z`| +|`STN_FN`|| (GeminiPR only)| +|`STN_RES1`||(GeminiPR only)| +|`STN_RES2`||(GeminiPR only)| +|`STN_PWR`||(GeminiPR only)| diff --git a/docs/tap_dance.md b/docs/tap_dance.md index 25827a6485..38b2ee9993 100644 --- a/docs/tap_dance.md +++ b/docs/tap_dance.md @@ -1,5 +1,7 @@ # Tap Dance: A single key can do 3, 5, or 100 different things + + Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a colon. Hit it three times, and your keyboard's LEDs do a wild dance. That's just one example of what Tap Dance can do. It's one of the nicest community-contributed features in the firmware, conceived and created by [algernon](https://github.com/algernon) in [#451](https://github.com/qmk/qmk_firmware/pull/451). Here's how algernon describes the feature: With this feature one can specify keys that behave differently, based on the amount of times they have been tapped, and when interrupted, they get handled before the interrupter. @@ -34,7 +36,9 @@ Our next stop is `matrix_scan_tap_dance()`. This handles the timeout of tap-danc For the sake of flexibility, tap-dance actions can be either a pair of keycodes, or a user function. The latter allows one to handle higher tap counts, or do extra things, like blink the LEDs, fiddle with the backlighting, and so on. This is accomplished by using an union, and some clever macros. -### Examples +# Examples + +## Simple Example Here's a simple example for a single definition: @@ -59,6 +63,8 @@ qk_tap_dance_action_t tap_dance_actions[] = { TD(TD_ESC_CAPS) ``` +## Complex Example + Here's a more complex example involving custom actions: ```c diff --git a/docs/test_for_asciidoc.asciidoc b/docs/test_for_asciidoc.asciidoc deleted file mode 100644 index ce57d2781b..0000000000 --- a/docs/test_for_asciidoc.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ - - - -.Makefile -[source,Makefile] ----- -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA ----- \ No newline at end of file diff --git a/docs/tmk_based_projects.md b/docs/tmk_based_projects.md deleted file mode 100644 index 0597b04c38..0000000000 --- a/docs/tmk_based_projects.md +++ /dev/null @@ -1,34 +0,0 @@ -## TMK based projects -Add your project here! -See https://github.com/tmk/tmk_keyboard/issues/173 - -### keyboards -**S60-X**: [DIY 60% keyboard](https://www.massdrop.com/buy/sentraq-60-diy-keyboard-kit?mode=guest_open) designed by [VinnyCordeiro](https://github.com/VinnyCordeiro) for Sentraq: -- https://github.com/VinnyCordeiro/tmk_keyboard - -**Octagon V1**: Korean custom keyboard designed by Duck. -- https://github.com/xauser/tmk_keyboard/tree/xauser - -**Compact L3**: Custom keyboard designed by LifeZone and LeeKu. -- https://github.com/xauser/tmk_keyboard/tree/xauser - -**KMAC, 1,2 and Happy**: Custom keyboard designed by kbdmania. -- https://github.com/ageaenes/tmk_keyboard - -**P60**: [DIY wired 60% keyboard](https://imgur.com/a/zwsDN) by [p3lim](https://github.com/p3lim). -- https://github.com/p3lim/keyboard_firmware - -**Nerd, Kitten Paw, Lightsaber, Phantom, Lightpad, Ergodox** on [xauser](https://github.com/xauser)'s repository -- https://github.com/xauser/tmk_keyboard/tree/xauser - -**ErgoDox** on [cub-unanic](https://github.com/cub-uanic)'s repository -- https://github.com/cub-uanic/tmk_keyboard/tree/master/keyboard/ergodox - -**Atreus** by [technomancy](https://atreus.technomancy.us) -- https://github.com/technomancy/tmk_keyboard/tree/atreus/keyboard/atreus - -**[mcdox](https://github.com/DavidMcEwan/mcdox)** -- https://github.com/DavidMcEwan/tmk_keyboard/tree/master/keyboard/mcdox - - -### converters \ No newline at end of file diff --git a/docs/tmk_own_projects.md b/docs/tmk_own_projects.md deleted file mode 100644 index fb5b2c9906..0000000000 --- a/docs/tmk_own_projects.md +++ /dev/null @@ -1,69 +0,0 @@ -## TMK own projects by hasu -Located in [tmk_keyboard](https://github.com/tmk/tmk_keyboard/tree/master/) repository. - -### converter -* [ps2_usb] - [PS/2 keyboard to USB][GH_ps2] -* [adb_usb] - [ADB keyboard to USB][GH_adb] -* [m0110_usb] - [Macintosh 128K/512K/Plus keyboard to USB][GH_m0110] -* [terminal_usb] - [IBM Model M terminal keyboard(PS/2 scancode set3) to USB][GH_terminal] -* [news_usb] - [Sony NEWS keyboard to USB][GH_news] -* [x68k_usb] - [Sharp X68000 keyboard to USB][GH_x68k] -* [sun_usb] - [Sun] to USB(type4, 5 and 3?) -* [pc98_usb] - [PC98] to USB -* [usb_usb] - USB to USB(experimental) -* [ascii_usb] - ASCII(Serial console terminal) to USB -* [ibm4704_usb] - [IBM 4704 keyboard Converter][GH_ibm4704] - -### keyboard -* [hhkb] - [Happy Hacking Keyboard pro][GH_hhkb] -* [gh60] - [GH60][GH60_diy] DIY 60% keyboard [prototype][GH60_proto] -* [hbkb] - [Happy Buckling spring keyboard][GH_hbkb](IBM Model M 60% mod) -* [hid_liber] - [HID liberation][HID_liber] controller (by alaricljs) -* [phantom] - [Phantom] keyboard (by Tranquilite) -* [IIgs_Standard] - Apple [IIGS] keyboard mod(by JeffreySung) -* [macway] - [Compact keyboard mod][GH_macway] [retired] -* [KMAC] - Korean custom keyboard -* [Lightsaber] - Korean custom keyboard - -[ps2_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/ps2_usb/ -[adb_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/adb_usb/ -[m0110_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/m0110_usb -[terminal_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/terminal_usb/ -[news_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/news_usb/ -[x68k_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/x68k_usb/ -[sun_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/sun_usb/ -[pc98_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/pc98_usb/ -[usb_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/usb_usb/ -[ascii_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/ascii_usb/ -[ibm4704_usb]: https://github.com/tmk/tmk_keyboard/tree/master/converter/ibm4704_usb -[hhkb]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/hhkb/ -[gh60]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/gh60/ -[hbkb]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/hbkb/ -[hid_liber]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/hid_liber/ -[phantom]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/phantom/ -[IIgs_Standard]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/IIgs/ -[macway]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/macway/ -[KMAC]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/kmac/ -[Lightsaber]: https://github.com/tmk/tmk_keyboard/tree/master/keyboard/lightsaber/ - -[GH_macway]: http://geekhack.org/showwiki.php?title=Island:11930 -[GH_hhkb]: http://geekhack.org/showwiki.php?title=Island:12047 -[GH_ps2]: http://geekhack.org/showwiki.php?title=Island:14618 -[GH_adb]: http://geekhack.org/showwiki.php?title=Island:14290 -[GH_hhkb_bt]: http://geekhack.org/showwiki.php?title=Island:20851 -[GH_m0110]: http://geekhack.org/showwiki.php?title=Island:24965 -[GH_news]: http://geekhack.org/showwiki.php?title=Island:25759 -[GH_terminal]: http://geekhack.org/showwiki.php?title=Island:27272 -[GH_x68k]: http://geekhack.org/showwiki.php?title=Island:29060 -[GH_hbkb]: http://geekhack.org/showwiki.php?title=Island:29483 -[GH_ibm4704]: http://geekhack.org/index.php?topic=54706.0 -[HID_liber]: http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions -[Phantom]: http://geekhack.org/index.php?topic=26742 -[GH60_diy]: http://geekhack.org/index.php?topic=34959 -[GH60_proto]: http://geekhack.org/index.php?topic=37570.0 -[PC98]: http://en.wikipedia.org/wiki/NEC_PC-9801 -[Sun]: http://en.wikipedia.org/wiki/Sun-3 -[IIGS]: http://en.wikipedia.org/wiki/Apple_IIGS - - -See other [[TMK Based Projects]] \ No newline at end of file diff --git a/docs/tmk_readme.md b/docs/tmk_readme.md deleted file mode 100644 index 85cf68d571..0000000000 --- a/docs/tmk_readme.md +++ /dev/null @@ -1,243 +0,0 @@ -# TMK Documenation - -Features --------- -These features can be used in your keyboard. - -* Multi-layer Keymap - Multiple keyboard layouts with layer switching -* Mouse key - Mouse control with keyboard -* System Control Key - Power Down, Sleep, Wake Up and USB Remote Wake up -* Media Control Key - Volume Down/Up, Mute, Next/Prev track, Play, Stop and etc -* USB NKRO - 120 keys(+ 8 modifiers) simultaneously -* PS/2 mouse support - PS/2 mouse(TrackPoint) as composite device -* Keyboard protocols - PS/2, ADB, M0110, Sun and other old keyboard protocols -* User Function - Customizable function of key with writing code -* Macro - Very primitive at this time -* Keyboard Tricks - Oneshot modifier and modifier with tapping feature -* Debug Console - Messages for debug and interaction with firmware -* Virtual DIP Switch - Configurations stored EEPROM(Boot Magic) -* Locking CapsLock - Mechanical switch support for CapsLock -* Breathing Sleep LED - Sleep indicator with charm during USB suspend -* Backlight - Control backlight levels - - - -Projects --------- -You can find some keyboard specific projects under `converter` and `keyboard` directory. - -## Main projects - -### OLKB products -* [planck](keyboards/planck/) - [Planck] Ortholinear 40% keyboard -* [preonic](keyboards/preonic/) - [Preonic] Ortholinear 50% keyboard -* [atomic](keyboards/atomic/) - [Atomic] Ortholinear 60% keyboard - -### Ergodox EZ -* [ergodox_ez](keyboards/ergodox/ez) - [Ergodox_EZ] Assembled split keyboard - -## Other projects - -### converter -* [ps2_usb](converter/ps2_usb/) - [PS/2 keyboard to USB][GH_ps2] -* [adb_usb](converter/adb_usb/) - [ADB keyboard to USB][GH_adb] -* [m0110_usb](converter/m0110_usb) - [Macintosh 128K/512K/Plus keyboard to USB][GH_m0110] -* [terminal_usb](converter/terminal_usb/) - [IBM Model M terminal keyboard(PS/2 scancode set3) to USB][GH_terminal] -* [news_usb](converter/news_usb/) - [Sony NEWS keyboard to USB][GH_news] -* [x68k_usb](converter/x68k_usb/) - [Sharp X68000 keyboard to USB][GH_x68k] -* [sun_usb](converter/sun_usb/) - [Sun] to USB(type4, 5 and 3?) -* [pc98_usb](converter/pc98_usb/) - [PC98] to USB -* [usb_usb](converter/usb_usb/) - USB to USB(experimental) -* [ascii_usb](converter/ascii_usb/) - ASCII(Serial console terminal) to USB -* [ibm4704_usb](converter/ibm4704_usb) - [IBM 4704 keyboard Converter][GH_ibm4704] - -### keyboard -* [hhkb](keyboards/hhkb/) - [Happy Hacking Keyboard pro][GH_hhkb] hasu's main board -* [gh60](keyboards/gh60/) - [GH60] DIY 60% keyboard [prototype][GH60_proto] hasu's second board -* [hbkb](keyboards/hbkb/) - [Happy Buckling spring keyboard][GH_hbkb](IBM Model M 60% mod) -* [hid_liber](keyboards/hid_liber/) - [HID liberation][HID_liber] controller (by alaricljs) -* [phantom](keyboards/phantom/) - [Phantom] keyboard (by Tranquilite) -* [IIgs_Standard](keyboards/IIgs/) - Apple [IIGS] keyboard mod(by JeffreySung) -* [macway](keyboards/macway/) - [Compact keyboard mod][GH_macway] [retired] -* [KMAC](keyboards/kmac/) - Korean custom keyboard -* [Lightsaber](keyboards/lightsaber/) - Korean custom keyboard -* [Infinity](keyboards/infinity/) - Massdrop [Infinity keyboard][Infinity] -* [NerD](keyboards/nerd/) - Korean custom keyboard -* [KittenPaw](keyboards/kitten_paw) - Custom Majestouch controller -* [Lightpad](keyboards/lightpad) - Korean custom keypad -* [ghost_squid](keyboards/ghost_squid/) - [The Ghost Squid][ghost_squid] controller for [Cooler Master QuickFire XT][cmxt] - -### Extenal projects using tmk_keyboard -* [ErgoDox_cub-uanic][cub-uanic] - Split Ergonomic Keyboard [ErgoDox][ergodox_org] -* [mcdox][mcdox_tmk] - [mcdox][mcdox] - - -[GH_macway]: http://geekhack.org/showwiki.php?title=Island:11930 -[GH_hhkb]: http://geekhack.org/showwiki.php?title=Island:12047 -[GH_ps2]: http://geekhack.org/showwiki.php?title=Island:14618 -[GH_adb]: http://geekhack.org/showwiki.php?title=Island:14290 -[GH_hhkb_bt]: http://geekhack.org/showwiki.php?title=Island:20851 -[GH_m0110]: http://geekhack.org/showwiki.php?title=Island:24965 -[GH_news]: http://geekhack.org/showwiki.php?title=Island:25759 -[GH_terminal]: http://geekhack.org/showwiki.php?title=Island:27272 -[GH_x68k]: http://geekhack.org/showwiki.php?title=Island:29060 -[GH_hbkb]: http://geekhack.org/showwiki.php?title=Island:29483 -[GH_ibm4704]: http://geekhack.org/index.php?topic=54706.0 -[HID_liber]: http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions -[Phantom]: http://geekhack.org/index.php?topic=26742 -[GH60]: http://geekhack.org/index.php?topic=34959 -[GH60_proto]: http://geekhack.org/index.php?topic=37570.0 -[PC98]: http://en.wikipedia.org/wiki/NEC_PC-9801 -[Sun]: http://en.wikipedia.org/wiki/Sun-3 -[IIGS]: http://en.wikipedia.org/wiki/Apple_IIGS -[Infinity]: https://www.massdrop.com/buy/infinity-keyboard-kit -[ghost_squid]: http://deskthority.net/wiki/Costar_replacement_controllers#The_Ghost_Squid -[cmxt]: http://gaming.coolermaster.com/en/products/keyboard/quickfirext/ -[ergodox_org]: http://ergodox.org/ -[cub-uanic]: https://github.com/cub-uanic/tmk_keyboard/tree/master/keyboard/ergodox -[mcdox]: https://github.com/DavidMcEwan/mcdox -[mcdox_tmk]: https://github.com/DavidMcEwan/tmk_keyboard/tree/master/keyboard/mcdox -[Planck]: http://olkb.co/planck -[Preonic]: http://olkb.co/preonic -[Atomic]: http://olkb.co/atomic -[Ergodox_EZ]: https://www.indiegogo.com/projects/ergodox-ez-an-incredible-mechanical-keyboard - - -License -------- -**GPLv2** or later. Some protocol files are under **Modified BSD License**. - -Third party libraries like LUFA, PJRC and V-USB have their own license respectively. - - - -Build Firmware and Program Controller -------------------------------------- -See [build environment setup](build_environment_setup.md), or the readme in the particular keyboards/* folder. - - - -Change your keymap ------------------- -See [keymap.md](keymap.md). - - - -Magic Commands --------------- -To see help press `Magic` + `H`. - -`Magic` key combination is `LShift` + `RShift` in many project, but `Power` key on ADB converter. -`Magic` keybind can be vary on each project, check `config.h` in project directory. - -Following commands can be also executed with `Magic` + key. In console mode `Magic` keybind is not needed. - - ----- Command Help ----- - c: enter console mode - d: toggle debug enable - x: toggle matrix debug - k: toggle keyboard debug - m: toggle mouse debug - v: print device version & info - t: print timer count - s: print status - e: print eeprom config - n: toggle NKRO - 0/F10: switch to Layer0 - 1/F1: switch to Layer1 - 2/F2: switch to Layer2 - 3/F3: switch to Layer3 - 4/F4: switch to Layer4 - PScr: power down/remote wake-up - Caps: Lock Keyboard(Child Proof) - Paus: jump to bootloader - - - -Boot Magic Configuration - Virtual DIP Switch ---------------------------------------------- -Boot Magic are executed during boot up time. Press Magic key below then plug in keyboard cable. -Note that you must use keys of **Layer 0** as Magic keys. These settings are stored in EEPROM so that retain your configure over power cycles. - -To avoid configuring accidentally additive salt key `KC_SPACE` also needs to be pressed along with the following configuration keys. The salt key is configurable in `config.h`. See [tmk_core/common/bootmagic.h](/tmk_core/common/bootmagic.h). - -#### General -- Skip reading EEPROM to start with default configuration(`ESC`) -- Clear configuration stored in EEPROM to reset configuration(`Backspace`) - -#### Bootloader -- Kick up Bootloader(`B`) - -#### Debug -- Debug enable(`D`) -- Debug matrix enable(`D`+`X`) -- Debug keyboard enable(`D`+`K`) -- Debug mouse enable(`D`+`M`) - -#### Keymap -- Swap Control and CapsLock(`Left Control`) -- Change CapsLock to Control(`Caps Lock`) -- Swap LeftAlt and Gui(`Left Alt`) -- Swap RightAlt and Gui(`Right Alt`) -- Disable Gui(`Left Gui`) -- Swap Grave and Escape(`Grave`) -- Swap BackSlash and BackSpace(`Back Slash`) -- Enable NKRO on boot(`N`) - -#### Default Layer -- Set Default Layer to 0(`0`) -- Set Default Layer to 1(`1`) -- Set Default Layer to 2(`2`) -- Set Default Layer to 3(`3`) -- Set Default Layer to 4(`4`) -- Set Default Layer to 5(`5`) -- Set Default Layer to 6(`6`) -- Set Default Layer to 7(`7`) - - - -Mechanical Locking support --------------------------- -This feature makes it possible for you to use mechanical locking switch for `CapsLock`, `NumLock` -or `ScrollLock`. To enable this feature define these macros in `config.h` and use `KC_LCAP`, `KC_LN -UM` or `KC_LSCR` in keymap for locking key instead of normal `KC_CAPS`, `KC_NLCK` or `KC_SLCK`. Res -ync option tries to keep switch state consistent with keyboard LED state. - - #define LOCKING_SUPPORT_ENABLE - #define LOCKING_RESYNC_ENABLE - - - -Start Your Own Project ------------------------ -**TBD** - - - -Debugging --------- -Use PJRC's `hid_listen` to see debug messages. You can use the tool for debug even if firmware use LUFA stack. - -You can use xprintf() to display debug info on `hid_listen`, see `tmk_core/common/xprintf.h`. - - - -Files and Directories -------------------- -### Top -* tmk_core/ - core library -* keyboards/ - keyboard projects -* converter/ - protocol converter projects -* doc/ - documents - - - -Coding Style -------------- -- Doesn't use Tab to indent, use 4-spaces instead. - - - -Other Keyboard Firmware Projects ------------------- -You can learn a lot about keyboard firmware from these. See [docs/other_projects.md](other_projects.md). diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md new file mode 100644 index 0000000000..2ac4f30365 --- /dev/null +++ b/docs/understanding_qmk.md @@ -0,0 +1,172 @@ +# Understanding QMK's Code + +This document attempts to explain how the QMK firmware works from a very high level. It assumes you understand basic programming concepts but does not (except where needed to demonstrate) assume familiarity with C. It assumes that you have a basic understanding of the following documents: + +* [QMK Overview](qmk_overview.md) +* [How Keyboards Work](how_keyboards_work.md) +* [FAQ](faq.md) + +## Startup + +You can think of QMK as no different from any other computer program. It is started, performs its tasks, and then ends. The entry point for the program is the `main()` function, just like it is on any other C program. However, for a newcomer to QMK it can be confusing because the `main()` function appears in multiple places, and it can be hard to tell which one to look at. + +The reason for this is the different platforms that QMK supports. The most common platform is `lufa`, which runs on AVR processors such at the atmega32u4. We also support `chibios` and `vusb`. + +We'll focus on AVR processors for the moment, which use the `lufa` platform. You can find the `main()` function in [tmk_core/protocol/lufa/lufa.c](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/protocol/lufa/lufa.c#L1129). If you browse through that function you'll find that it initializes any hardware that has been configured (including USB to the host) and then it starts the core part of the program with a [`while(1)`](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/protocol/lufa/lufa.c#L1182). This is [The Main Loop](#the_main_loop). + +## The Main Loop + +This section of code is called "The Main Loop" because it's responsible for looping over the same set of instructions forever. This is where QMK dispatches out to the functions responsible for making the keyboard do everything it is supposed to do. At first glance it can look like a lot of functionality but most of the time the code will be disabled by `#define`'s. + +``` + keyboard_task(); +``` + +This is where all the keyboard specific functionality is dispatched. The source code for `keyboard_task()` can be found in [tmk_core/common/keyboard.c](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keyboard.c#L154), and it is responsible for detecting changes in the matrix and turning status LED's on and off. + +Within `keyboard_task()` you'll find code to handle: + +* [Matrix Scanning](#matrix-scanning) +* Mouse Handling +* Serial Link(s) +* Visualizer +* Keyboard status LED's (Caps Lock, Num Lock, Scroll Lock) + +#### Matrix Scanning + +Matrix scanning is the core function of a keyboard firmware. It is the process of detecting which keys are currently pressed, and your keyboard runs this function many times a second. It's no exaggeration to say that 99% of your firmware's CPU time is spent on matrix scanning. + +While there are different strategies for doing the actual matrix detection, they are out of scope for this document. It is sufficient to treat matrix scanning as a black box, you ask for the matrix's current state and get back a datastructure that looks like this: + + +``` +{ + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0} +} +``` + +That datastructure is a direct representation of the matrix for a 4 row by 5 column numpad. When a key is pressed that key's position within the matrix will be returned as `1` instead of `0`. + +Matrix Scanning runs many times per second. The exact rate varies but typically it runs at least 10 times per second to avoid perceptible lag. + +##### Matrix to Physical Layout Map + +Once we know the state of every switch on our keyboard we have to map that to a keycode. In QMK this is done by making use of C macros to allow us to separate the definition of the physical layout from the definition of keycodes. + +At the keyboard level we define a C macro (typically named `KEYMAP()`) which maps our keyboard's matrix to physical keys. Sometimes the matrix does not have a switch in every location, and we can use this macro to pre-populate those with KC_NO, making the keymap definition easier to work with. Here's an example `KEYMAP()` macro for a numpad: + +```c +#define KEYMAP( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k33, \ + k40, k42 \ +) { \ + { k00, k01, k02, k03, }, \ + { k10, k11, k12, k13, }, \ + { k20, k21, k22, KC_NO, }, \ + { k30, k31, k32, k33, }, \ + { k40, KC_NO, k42, KC_NO } \ +} +``` + +Notice how the second block of our `KEYMAP()` macro matches the Matrix Scanning array above? This macro is what will map the matrix scanning array to keycodes. However, if you look at a 17 key numpad you'll notice that it has 3 places where the matrix could have a switch but doesn't, due to larger keys. We have populated those spaces with `KC_NO` so that our keymap definition doesn't have to. + +You can also use this macro to handle unusual matrix layouts, for example the [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/rev2/rev2.h). Explaining that is outside the scope of this document. + +##### Keycode Assignment + +At the keymap level we make use of our `KEYMAP()` macro above to map keycodes to physical locations to matrix locations. It looks like this: + +``` +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = KEYMAP( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7, KC_P8, KC_P9, KC_PPLS, \ + KC_P4, KC_P5, KC_P6, \ + KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_P0, KC_PDOT) +} +``` + +Notice how all of these arguments match up with the first half of the `KEYMAP()` macro from the last section? This is how we take a keycode and map it to our Matrix Scan from earlier. + +##### State Change Detection + +The matrix scanning described above tells us the state of the matrix at a given moment, but your computer only wants to know about changes, it doesn't care about the current state. QMK stores the results from the last matrix scan and compares the results from this matrix to determine when a key has been pressed or released. + +Let's look at an example. We'll hop into the middle of a keyboard scanning loop to find that our previous scan looks like this: + +``` +{ + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0} +} +``` + +And when our current scan completes it will look like this: + +``` +{ + {1,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0} +} +``` + +Comparing against our keymap we can see that the pressed key is KC_NLCK. From here we dispatch to the `process_record` set of functions. + + + +##### Process Record + +The `process_record()` function itself is deceptively simple, but hidden within is a gateway to overriding functionality at various levels of QMK. The chain of events is described below, using cluecard whenever we need to look at the keyboard/keymap level functions. + +* [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action.c#L128) + * [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c#L140) + * [Map this record to a keycode](https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c#L143) + * [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/keyboards/cluecard/cluecard.c#L20) + * [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/keyboards/cluecard/keymaps/default/keymap.c#L58) + * [`bool process_midi(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_midi.c#L102) + * [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_audio.c#L10) + * [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_music.c#L69) + * [`bool process_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_tap_dance.c#L75) + * [`bool process_leader(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_leader.c#L32) + * [`bool process_chording(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_chording.c#L41) + * [`bool process_combo(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_combo.c#L115) + * [`bool process_unicode(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicode.c#L22) + * [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_ucis.c#L91) + * [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_printer.c#L77) + * [`bool process_unicode_map(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicodemap.c#L47) + * [Identify and process quantum specific keycodes](https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c#L211) + +At any step during this chain of events a function (such as `process_record_kb()`) can `return false` to halt all further processing. + + diff --git a/docs/unicode_and_additional_language_support.md b/docs/unicode.md similarity index 95% rename from docs/unicode_and_additional_language_support.md rename to docs/unicode.md index 562dae4b5c..ae722fe2b4 100644 --- a/docs/unicode_and_additional_language_support.md +++ b/docs/unicode.md @@ -1,20 +1,20 @@ -## Unicode support +# Unicode support There are three Unicode keymap definition method available in QMK: -### UNICODE_ENABLE +## UNICODE_ENABLE Supports Unicode input up to 0xFFFF. The keycode function is `UC(n)` in keymap file, where *n* is a 4 digit hexadecimal. -### UNICODEMAP_ENABLE +## UNICODEMAP_ENABLE Supports Unicode up to 0xFFFFFFFF. You need to maintain a separate mapping table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file. The keycode function is `X(n)` where *n* is the array index of the mapping table. -### UCIS_ENABLE +## UCIS_ENABLE TBD @@ -28,11 +28,11 @@ This is the current list of Unicode input method in QMK: * UC_WIN: (not recommended) Windows built-in Unicode input. To enable: create registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad`, set its value to 1, and reboot. This method is not recommended because of reliability and compatibility issue, use WinCompose method below instead. * UC_WINC: Windows Unicode input using WinCompose. Requires [WinCompose](https://github.com/samhocevar/wincompose). Works reliably under many (all?) variations of Windows. -## Additional language support +# Additional language support In `quantum/keymap_extras/`, you'll see various language files - these work the same way as the alternative layout ones do. Most are defined by their two letter country/language code followed by an underscore and a 4-letter abbreviation of its name. `FR_UGRV` which will result in a `ù` when using a software-implemented AZERTY layout. It's currently difficult to send such characters in just the firmware. -## International Characters on Windows +# International Characters on Windows [AutoHotkey](https://autohotkey.com) allows Windows users to create custom hotkeys among others. diff --git a/docs/usb_hid.md b/docs/usb_hid.md deleted file mode 100644 index 1d0c458695..0000000000 --- a/docs/usb_hid.md +++ /dev/null @@ -1,11 +0,0 @@ -# Getting Report Descriptor -``` - $ cd /sys/bus/usb/drivers/usbhid - $ ls - 1-1.3.4:1.0 1-1.3.4:1.2 bind new_id uevent - 1-1.3.4:1.1 1-1.3.4:1.3 module remove_id unbind - $ echo -n 1-1.4\:1.0 | sudo tee unbind - $ sudo lsusb -vvv -d 046d:c01d - $ echo -n 1-1.4\:1.0 | sudo tee bind -``` - diff --git a/quantum/analog.c b/drivers/avr/analog.c similarity index 100% rename from quantum/analog.c rename to drivers/avr/analog.c diff --git a/quantum/analog.h b/drivers/avr/analog.h similarity index 100% rename from quantum/analog.h rename to drivers/avr/analog.h diff --git a/keyboards/lets_split/common/glcdfont.c b/drivers/avr/glcdfont.c similarity index 100% rename from keyboards/lets_split/common/glcdfont.c rename to drivers/avr/glcdfont.c diff --git a/keyboards/atreus62/pro_micro.h b/drivers/avr/pro_micro.h similarity index 100% rename from keyboards/atreus62/pro_micro.h rename to drivers/avr/pro_micro.h diff --git a/keyboards/orthodox/ssd1306.c b/drivers/avr/ssd1306.c similarity index 57% rename from keyboards/orthodox/ssd1306.c rename to drivers/avr/ssd1306.c index 5c6dff27f8..bb8938bba3 100644 --- a/keyboards/orthodox/ssd1306.c +++ b/drivers/avr/ssd1306.c @@ -1,12 +1,10 @@ #ifdef SSD1306OLED #include "ssd1306.h" -#include "config.h" #include "i2c.h" #include #include "print.h" -#include "lets_split.h" -#include "common/glcdfont.c" +#include "glcdfont.c" #ifdef ADAFRUIT_BLE_ENABLE #include "adafruit_ble.h" #endif @@ -14,18 +12,7 @@ #include "lufa.h" #endif #include "sendchar.h" -#include "pincontrol.h" - -//assign the right code to your layers -#define _BASE 0 -#define _LOWER 8 -#define _RAISE 16 -#define _FNLAYER 64 -#define _NUMLAY 128 -#define _NLOWER 136 -#define _NFNLAYER 192 -#define _MOUSECURSOR 256 -#define _ADJUST 65560 +#include "timer.h" // Set this to 1 to help diagnose early startup problems // when testing power-on with ble. Turn it off otherwise, @@ -33,26 +20,6 @@ // with the matrix scan, causing keys to drop. #define DEBUG_TO_SCREEN 0 -// Controls the SSD1306 128x32 OLED display via i2c - -#define i2cAddress 0x3C - -#define DisplayHeight 32 -#define DisplayWidth 128 - -#define FontHeight 8 -#define FontWidth 6 - -#define MatrixRows (DisplayHeight / FontHeight) -#define MatrixCols (DisplayWidth / FontWidth) - -struct CharacterMatrix { - uint8_t display[MatrixRows][MatrixCols]; - uint8_t *cursor; - bool dirty; -}; - -static struct CharacterMatrix display; //static uint16_t last_battery_update; //static uint32_t vbat; //#define BatteryUpdateInterval 10000 /* milliseconds */ @@ -62,54 +29,13 @@ static uint8_t displaying; #endif static uint16_t last_flush; -enum ssd1306_cmds { - DisplayOff = 0xAE, - DisplayOn = 0xAF, - - SetContrast = 0x81, - DisplayAllOnResume = 0xA4, - - DisplayAllOn = 0xA5, - NormalDisplay = 0xA6, - InvertDisplay = 0xA7, - SetDisplayOffset = 0xD3, - SetComPins = 0xda, - SetVComDetect = 0xdb, - SetDisplayClockDiv = 0xD5, - SetPreCharge = 0xd9, - SetMultiPlex = 0xa8, - SetLowColumn = 0x00, - SetHighColumn = 0x10, - SetStartLine = 0x40, - - SetMemoryMode = 0x20, - ColumnAddr = 0x21, - PageAddr = 0x22, - - ComScanInc = 0xc0, - ComScanDec = 0xc8, - SegRemap = 0xa0, - SetChargePump = 0x8d, - ExternalVcc = 0x01, - SwitchCapVcc = 0x02, - - ActivateScroll = 0x2f, - DeActivateScroll = 0x2e, - SetVerticalScrollArea = 0xa3, - RightHorizontalScroll = 0x26, - LeftHorizontalScroll = 0x27, - VerticalAndRightHorizontalScroll = 0x29, - VerticalAndLeftHorizontalScroll = 0x2a, -}; - - // Write command sequence. // Returns true on success. static inline bool _send_cmd1(uint8_t cmd) { bool res = false; - if (i2c_start_write(i2cAddress)) { - xprintf("failed to start write to %d\n", i2cAddress); + if (i2c_start_write(SSD1306_ADDRESS)) { + xprintf("failed to start write to %d\n", SSD1306_ADDRESS); goto done; } @@ -154,8 +80,6 @@ static inline bool _send_cmd3(uint8_t cmd, uint8_t opr1, uint8_t opr2) { #define send_cmd2(c,o) if (!_send_cmd2(c,o)) {goto done;} #define send_cmd3(c,o1,o2) if (!_send_cmd3(c,o1,o2)) {goto done;} -static void matrix_clear(struct CharacterMatrix *matrix); - static void clear_display(void) { matrix_clear(&display); @@ -164,7 +88,7 @@ static void clear_display(void) { send_cmd3(PageAddr, 0, (DisplayHeight / 8) - 1); send_cmd3(ColumnAddr, 0, DisplayWidth - 1); - if (i2c_start_write(i2cAddress)) { + if (i2c_start_write(SSD1306_ADDRESS)) { goto done; } if (i2c_master_write(0x40)) { @@ -210,14 +134,17 @@ bool iota_gfx_init(void) { send_cmd2(SetChargePump, 0x14 /* Enable */); send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); -/// Flips the display orientation 0 degrees - send_cmd1(SegRemap | 0x1); - send_cmd1(ComScanDec); -/* +#ifdef OLED_ROTATE180 // the following Flip the display orientation 180 degrees send_cmd1(SegRemap); send_cmd1(ComScanInc); -// end flip */ +#endif +#ifndef OLED_ROTATE180 +// Flips the display orientation 0 degrees + send_cmd1(SegRemap | 0x1); + send_cmd1(ComScanDec); +#endif + send_cmd2(SetComPins, 0x2); send_cmd2(SetContrast, 0x8f); send_cmd2(SetPreCharge, 0xf1); @@ -263,7 +190,7 @@ done: return success; } -static void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { +void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { *matrix->cursor = c; ++matrix->cursor; @@ -276,7 +203,7 @@ static void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { } } -static void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) { +void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) { matrix->dirty = true; if (c == '\n') { @@ -297,7 +224,7 @@ void iota_gfx_write_char(uint8_t c) { matrix_write_char(&display, c); } -static void matrix_write(struct CharacterMatrix *matrix, const char *data) { +void matrix_write(struct CharacterMatrix *matrix, const char *data) { const char *end = data + strlen(data); while (data < end) { matrix_write_char(matrix, *data); @@ -309,7 +236,7 @@ void iota_gfx_write(const char *data) { matrix_write(&display, data); } -static void matrix_write_P(struct CharacterMatrix *matrix, const char *data) { +void matrix_write_P(struct CharacterMatrix *matrix, const char *data) { while (true) { uint8_t c = pgm_read_byte(data); if (c == 0) { @@ -324,7 +251,7 @@ void iota_gfx_write_P(const char *data) { matrix_write_P(&display, data); } -static void matrix_clear(struct CharacterMatrix *matrix) { +void matrix_clear(struct CharacterMatrix *matrix) { memset(matrix->display, ' ', sizeof(matrix->display)); matrix->cursor = &matrix->display[0][0]; matrix->dirty = true; @@ -334,7 +261,7 @@ void iota_gfx_clear_screen(void) { matrix_clear(&display); } -static void matrix_render(struct CharacterMatrix *matrix) { +void matrix_render(struct CharacterMatrix *matrix) { last_flush = timer_read(); iota_gfx_on(); #if DEBUG_TO_SCREEN @@ -345,7 +272,7 @@ static void matrix_render(struct CharacterMatrix *matrix) { send_cmd3(PageAddr, 0, MatrixRows - 1); send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1); - if (i2c_start_write(i2cAddress)) { + if (i2c_start_write(SSD1306_ADDRESS)) { goto done; } if (i2c_master_write(0x40)) { @@ -380,84 +307,12 @@ void iota_gfx_flush(void) { matrix_render(&display); } -static void matrix_update(struct CharacterMatrix *dest, - const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -static void render_status_info(void) { -#if DEBUG_TO_SCREEN - if (debug_enable) { - return; - } -#endif - - struct CharacterMatrix matrix; - - matrix_clear(&matrix); - matrix_write_P(&matrix, PSTR("USB: ")); -#ifdef PROTOCOL_LUFA - switch (USB_DeviceState) { - case DEVICE_STATE_Unattached: - matrix_write_P(&matrix, PSTR("Unattached")); - break; - case DEVICE_STATE_Suspended: - matrix_write_P(&matrix, PSTR("Suspended")); - break; - case DEVICE_STATE_Configured: - matrix_write_P(&matrix, PSTR("Connected")); - break; - case DEVICE_STATE_Powered: - matrix_write_P(&matrix, PSTR("Powered")); - break; - case DEVICE_STATE_Default: - matrix_write_P(&matrix, PSTR("Default")); - break; - case DEVICE_STATE_Addressed: - matrix_write_P(&matrix, PSTR("Addressed")); - break; - default: - matrix_write_P(&matrix, PSTR("Invalid")); - } -#endif - -// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below - - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); - matrix_write_P(&matrix, PSTR("\n\nLayer: ")); - switch (layer_state) { - case _BASE: - matrix_write_P(&matrix, PSTR("Default")); - break; - case _RAISE: - matrix_write_P(&matrix, PSTR("Raise")); - break; - case _LOWER: - matrix_write_P(&matrix, PSTR("Lower")); - break; - case _ADJUST: - matrix_write_P(&matrix, PSTR("ADJUST")); - break; - default: - matrix_write(&matrix, buf); - } - - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n%s %s %s", - (host_keyboard_leds() & (1< +#include +#include "pincontrol.h" +#include "config.h" + +enum ssd1306_cmds { + DisplayOff = 0xAE, + DisplayOn = 0xAF, + + SetContrast = 0x81, + DisplayAllOnResume = 0xA4, + + DisplayAllOn = 0xA5, + NormalDisplay = 0xA6, + InvertDisplay = 0xA7, + SetDisplayOffset = 0xD3, + SetComPins = 0xda, + SetVComDetect = 0xdb, + SetDisplayClockDiv = 0xD5, + SetPreCharge = 0xd9, + SetMultiPlex = 0xa8, + SetLowColumn = 0x00, + SetHighColumn = 0x10, + SetStartLine = 0x40, + + SetMemoryMode = 0x20, + ColumnAddr = 0x21, + PageAddr = 0x22, + + ComScanInc = 0xc0, + ComScanDec = 0xc8, + SegRemap = 0xa0, + SetChargePump = 0x8d, + ExternalVcc = 0x01, + SwitchCapVcc = 0x02, + + ActivateScroll = 0x2f, + DeActivateScroll = 0x2e, + SetVerticalScrollArea = 0xa3, + RightHorizontalScroll = 0x26, + LeftHorizontalScroll = 0x27, + VerticalAndRightHorizontalScroll = 0x29, + VerticalAndLeftHorizontalScroll = 0x2a, +}; + +// Controls the SSD1306 128x32 OLED display via i2c + +#ifndef SSD1306_ADDRESS +#define SSD1306_ADDRESS 0x3C +#endif + +#define DisplayHeight 32 +#define DisplayWidth 128 + +#define FontHeight 8 +#define FontWidth 6 + +#define MatrixRows (DisplayHeight / FontHeight) +#define MatrixCols (DisplayWidth / FontWidth) + +struct CharacterMatrix { + uint8_t display[MatrixRows][MatrixCols]; + uint8_t *cursor; + bool dirty; +}; + +struct CharacterMatrix display; + +bool iota_gfx_init(void); +void iota_gfx_task(void); +bool iota_gfx_off(void); +bool iota_gfx_on(void); +void iota_gfx_flush(void); +void iota_gfx_write_char(uint8_t c); +void iota_gfx_write(const char *data); +void iota_gfx_write_P(const char *data); +void iota_gfx_clear_screen(void); + +void iota_gfx_task_user(void); + +void matrix_clear(struct CharacterMatrix *matrix); +void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c); +void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c); +void matrix_write(struct CharacterMatrix *matrix, const char *data); +void matrix_write_P(struct CharacterMatrix *matrix, const char *data); +void matrix_render(struct CharacterMatrix *matrix); + + + +#endif diff --git a/quantum/light_ws2812.c b/drivers/avr/ws2812.c old mode 100755 new mode 100644 similarity index 99% rename from quantum/light_ws2812.c rename to drivers/avr/ws2812.c index 2506e3d8ec..59e032bf71 --- a/quantum/light_ws2812.c +++ b/drivers/avr/ws2812.c @@ -21,7 +21,7 @@ * along with this program. If not, see . */ -#include "light_ws2812.h" +#include "ws2812.h" #include #include #include diff --git a/quantum/light_ws2812.h b/drivers/avr/ws2812.h old mode 100755 new mode 100644 similarity index 100% rename from quantum/light_ws2812.h rename to drivers/avr/ws2812.h diff --git a/keyboards/ergodox/infinity/drivers/gdisp/IS31FL3731C/board_IS31FL3731C.h b/drivers/ugfx/gdisp/is31fl3731c/board_is31fl3731c_template.h similarity index 98% rename from keyboards/ergodox/infinity/drivers/gdisp/IS31FL3731C/board_IS31FL3731C.h rename to drivers/ugfx/gdisp/is31fl3731c/board_is31fl3731c_template.h index 2ea73f1fb3..f248cc25ba 100644 --- a/keyboards/ergodox/infinity/drivers/gdisp/IS31FL3731C/board_IS31FL3731C.h +++ b/drivers/ugfx/gdisp/is31fl3731c/board_is31fl3731c_template.h @@ -22,9 +22,6 @@ static const I2CConfig i2ccfg = { 400000 // clock speed (Hz); 400kHz max for IS31 }; -#define GDISP_SCREEN_WIDTH 7 -#define GDISP_SCREEN_HEIGHT 7 - static const uint8_t led_mask[] = { 0xFF, 0x00, /* C1-1 -> C1-16 */ 0xFF, 0x00, /* C2-1 -> C2-16 */ diff --git a/drivers/ugfx/gdisp/is31fl3731c/driver.mk b/drivers/ugfx/gdisp/is31fl3731c/driver.mk new file mode 100644 index 0000000000..4364787c90 --- /dev/null +++ b/drivers/ugfx/gdisp/is31fl3731c/driver.mk @@ -0,0 +1,3 @@ +GFXINC += drivers/ugfx/gdisp/is31fl3731c +GFXSRC += drivers/ugfx/gdisp/is31fl3731c/gdisp_is31fl3731c.c +GDISP_DRIVER_LIST += GDISPVMT_IS31FL3731C_QMK \ No newline at end of file diff --git a/keyboards/ergodox/infinity/drivers/gdisp/IS31FL3731C/gdisp_IS31FL3731C.c b/drivers/ugfx/gdisp/is31fl3731c/gdisp_is31fl3731c.c similarity index 56% rename from keyboards/ergodox/infinity/drivers/gdisp/IS31FL3731C/gdisp_IS31FL3731C.c rename to drivers/ugfx/gdisp/is31fl3731c/gdisp_is31fl3731c.c index b4a5c84b0a..917adadb84 100644 --- a/keyboards/ergodox/infinity/drivers/gdisp/IS31FL3731C/gdisp_IS31FL3731C.c +++ b/drivers/ugfx/gdisp/is31fl3731c/gdisp_is31fl3731c.c @@ -19,11 +19,14 @@ along with this program. If not, see . #if GFX_USE_GDISP -#define GDISP_DRIVER_VMT GDISPVMT_IS31FL3731C_ERGODOX -#include "drivers/gdisp/IS31FL3731C/gdisp_lld_config.h" +#define GDISP_DRIVER_VMT GDISPVMT_IS31FL3731C_QMK +#define GDISP_SCREEN_HEIGHT LED_HEIGHT +#define GDISP_SCREEN_WIDTH LED_WIDTH + +#include "gdisp_lld_config.h" #include "src/gdisp/gdisp_driver.h" -#include "board_IS31FL3731C.h" +#include "board_is31fl3731c.h" // Can't include led_tables from here @@ -33,27 +36,21 @@ extern const uint8_t CIE1931_CURVE[]; /* Driver local definitions. */ /*===========================================================================*/ -#ifndef GDISP_SCREEN_HEIGHT - #define GDISP_SCREEN_HEIGHT 9 -#endif -#ifndef GDISP_SCREEN_WIDTH - #define GDISP_SCREEN_WIDTH 16 -#endif #ifndef GDISP_INITIAL_CONTRAST - #define GDISP_INITIAL_CONTRAST 0 + #define GDISP_INITIAL_CONTRAST 0 #endif #ifndef GDISP_INITIAL_BACKLIGHT - #define GDISP_INITIAL_BACKLIGHT 0 + #define GDISP_INITIAL_BACKLIGHT 0 #endif -#define GDISP_FLG_NEEDFLUSH (GDISP_FLG_DRIVER<<0) +#define GDISP_FLG_NEEDFLUSH (GDISP_FLG_DRIVER<<0) #define IS31_ADDR_DEFAULT 0x74 -#define IS31_REG_CONFIG 0x00 +#define IS31_REG_CONFIG 0x00 // bits in reg -#define IS31_REG_CONFIG_PICTUREMODE 0x00 -#define IS31_REG_CONFIG_AUTOPLAYMODE 0x08 +#define IS31_REG_CONFIG_PICTUREMODE 0x00 +#define IS31_REG_CONFIG_AUTOPLAYMODE 0x08 #define IS31_REG_CONFIG_AUDIOPLAYMODE 0x18 // D2:D0 bits are starting frame for autoplay mode @@ -100,7 +97,6 @@ extern const uint8_t CIE1931_CURVE[]; #define IS31_PWM_SIZE 0x90 #define IS31_LED_MASK_SIZE 0x12 -#define IS31_SCREEN_WIDTH 16 #define IS31 @@ -144,14 +140,14 @@ static GFXINLINE void write_ram(GDisplay *g, uint8_t page, uint16_t offset, uint } LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { - // The private area is the display surface. - g->priv = gfxAlloc(sizeof(PrivData)); + // The private area is the display surface. + g->priv = gfxAlloc(sizeof(PrivData)); __builtin_memset(PRIV(g), 0, sizeof(PrivData)); - PRIV(g)->page = 0; + PRIV(g)->page = 0; - // Initialise the board interface - init_board(g); - gfxSleepMilliseconds(10); + // Initialise the board interface + init_board(g); + gfxSleepMilliseconds(10); // zero function page, all registers (assuming full_page is all zeroes) write_ram(g, IS31_FUNCTIONREG, 0, IS31_FUNCTIONREG_SIZE); @@ -179,134 +175,134 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { // Finish Init post_init_board(g); - /* Initialise the GDISP structure */ - g->g.Width = GDISP_SCREEN_WIDTH; - g->g.Height = GDISP_SCREEN_HEIGHT; - g->g.Orientation = GDISP_ROTATE_0; - g->g.Powermode = powerOff; - g->g.Backlight = GDISP_INITIAL_BACKLIGHT; - g->g.Contrast = GDISP_INITIAL_CONTRAST; - return TRUE; + /* Initialise the GDISP structure */ + g->g.Width = GDISP_SCREEN_WIDTH; + g->g.Height = GDISP_SCREEN_HEIGHT; + g->g.Orientation = GDISP_ROTATE_0; + g->g.Powermode = powerOff; + g->g.Backlight = GDISP_INITIAL_BACKLIGHT; + g->g.Contrast = GDISP_INITIAL_CONTRAST; + return TRUE; } #if GDISP_HARDWARE_FLUSH - LLDSPEC void gdisp_lld_flush(GDisplay *g) { - // Don't flush if we don't need it. - if (!(g->flags & GDISP_FLG_NEEDFLUSH)) - return; + LLDSPEC void gdisp_lld_flush(GDisplay *g) { + // Don't flush if we don't need it. + if (!(g->flags & GDISP_FLG_NEEDFLUSH)) + return; - PRIV(g)->page++; - PRIV(g)->page %= 2; - // TODO: some smarter algorithm for this - // We should run only one physical page at a time - // This way we don't need to send so much data, and - // we could use slightly less memory - uint8_t* src = PRIV(g)->frame_buffer; - for (int y=0;yg.Backlight / 100; - PRIV(g)->write_buffer[get_led_address(g, x, y)]=CIE1931_CURVE[val]; - ++src; - } - } + PRIV(g)->page++; + PRIV(g)->page %= 2; + // TODO: some smarter algorithm for this + // We should run only one physical page at a time + // This way we don't need to send so much data, and + // we could use slightly less memory + uint8_t* src = PRIV(g)->frame_buffer; + for (int y=0;yg.Backlight / 100; + PRIV(g)->write_buffer[get_led_address(g, x, y)]=CIE1931_CURVE[val]; + ++src; + } + } write_ram(g, PRIV(g)->page, IS31_PWM_REG, IS31_PWM_SIZE); gfxSleepMilliseconds(1); write_register(g, IS31_FUNCTIONREG, IS31_REG_PICTDISP, PRIV(g)->page); - g->flags &= ~GDISP_FLG_NEEDFLUSH; - } + g->flags &= ~GDISP_FLG_NEEDFLUSH; + } #endif #if GDISP_HARDWARE_DRAWPIXEL - LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) { - coord_t x, y; + LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) { + coord_t x, y; - switch(g->g.Orientation) { - default: - case GDISP_ROTATE_0: - x = g->p.x; - y = g->p.y; - break; - case GDISP_ROTATE_180: - x = GDISP_SCREEN_WIDTH-1 - g->p.x; - y = g->p.y; - break; - } - PRIV(g)->frame_buffer[y * GDISP_SCREEN_WIDTH + x] = gdispColor2Native(g->p.color); - g->flags |= GDISP_FLG_NEEDFLUSH; - } + switch(g->g.Orientation) { + default: + case GDISP_ROTATE_0: + x = g->p.x; + y = g->p.y; + break; + case GDISP_ROTATE_180: + x = GDISP_SCREEN_WIDTH-1 - g->p.x; + y = g->p.y; + break; + } + PRIV(g)->frame_buffer[y * GDISP_SCREEN_WIDTH + x] = gdispColor2Native(g->p.color); + g->flags |= GDISP_FLG_NEEDFLUSH; + } #endif #if GDISP_HARDWARE_PIXELREAD - LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) { - coord_t x, y; + LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) { + coord_t x, y; - switch(g->g.Orientation) { - default: - case GDISP_ROTATE_0: - x = g->p.x; - y = g->p.y; - break; - case GDISP_ROTATE_180: - x = GDISP_SCREEN_WIDTH-1 - g->p.x; - y = g->p.y; - break; - } - return gdispNative2Color(PRIV(g)->frame_buffer[y * GDISP_SCREEN_WIDTH + x]); - } + switch(g->g.Orientation) { + default: + case GDISP_ROTATE_0: + x = g->p.x; + y = g->p.y; + break; + case GDISP_ROTATE_180: + x = GDISP_SCREEN_WIDTH-1 - g->p.x; + y = g->p.y; + break; + } + return gdispNative2Color(PRIV(g)->frame_buffer[y * GDISP_SCREEN_WIDTH + x]); + } #endif #if GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL - LLDSPEC void gdisp_lld_control(GDisplay *g) { - switch(g->p.x) { - case GDISP_CONTROL_POWER: - if (g->g.Powermode == (powermode_t)g->p.ptr) - return; - switch((powermode_t)g->p.ptr) { - case powerOff: - case powerSleep: - case powerDeepSleep: - write_register(g, IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_OFF); - break; - case powerOn: - write_register(g, IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_ON); - break; - default: - return; - } - g->g.Powermode = (powermode_t)g->p.ptr; - return; - - case GDISP_CONTROL_ORIENTATION: - if (g->g.Orientation == (orientation_t)g->p.ptr) - return; - switch((orientation_t)g->p.ptr) { - /* Rotation is handled by the drawing routines */ - case GDISP_ROTATE_0: - case GDISP_ROTATE_180: - g->g.Height = GDISP_SCREEN_HEIGHT; - g->g.Width = GDISP_SCREEN_WIDTH; - break; - case GDISP_ROTATE_90: - case GDISP_ROTATE_270: - g->g.Height = GDISP_SCREEN_WIDTH; - g->g.Width = GDISP_SCREEN_HEIGHT; - break; - default: - return; - } - g->g.Orientation = (orientation_t)g->p.ptr; - return; - - case GDISP_CONTROL_BACKLIGHT: - if (g->g.Backlight == (unsigned)g->p.ptr) + LLDSPEC void gdisp_lld_control(GDisplay *g) { + switch(g->p.x) { + case GDISP_CONTROL_POWER: + if (g->g.Powermode == (powermode_t)g->p.ptr) return; - unsigned val = (unsigned)g->p.ptr; - g->g.Backlight = val > 100 ? 100 : val; + switch((powermode_t)g->p.ptr) { + case powerOff: + case powerSleep: + case powerDeepSleep: + write_register(g, IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_OFF); + break; + case powerOn: + write_register(g, IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_ON); + break; + default: + return; + } + g->g.Powermode = (powermode_t)g->p.ptr; + return; + + case GDISP_CONTROL_ORIENTATION: + if (g->g.Orientation == (orientation_t)g->p.ptr) + return; + switch((orientation_t)g->p.ptr) { + /* Rotation is handled by the drawing routines */ + case GDISP_ROTATE_0: + case GDISP_ROTATE_180: + g->g.Height = GDISP_SCREEN_HEIGHT; + g->g.Width = GDISP_SCREEN_WIDTH; + break; + case GDISP_ROTATE_90: + case GDISP_ROTATE_270: + g->g.Height = GDISP_SCREEN_WIDTH; + g->g.Width = GDISP_SCREEN_HEIGHT; + break; + default: + return; + } + g->g.Orientation = (orientation_t)g->p.ptr; + return; + + case GDISP_CONTROL_BACKLIGHT: + if (g->g.Backlight == (unsigned)g->p.ptr) + return; + unsigned val = (unsigned)g->p.ptr; + g->g.Backlight = val > 100 ? 100 : val; g->flags |= GDISP_FLG_NEEDFLUSH; - return; - } - } + return; + } + } #endif // GDISP_NEED_CONTROL #endif // GFX_USE_GDISP diff --git a/keyboards/ergodox/infinity/drivers/gdisp/IS31FL3731C/gdisp_lld_config.h b/drivers/ugfx/gdisp/is31fl3731c/gdisp_lld_config.h similarity index 73% rename from keyboards/ergodox/infinity/drivers/gdisp/IS31FL3731C/gdisp_lld_config.h rename to drivers/ugfx/gdisp/is31fl3731c/gdisp_lld_config.h index bb28ad775e..588d688cf6 100644 --- a/keyboards/ergodox/infinity/drivers/gdisp/IS31FL3731C/gdisp_lld_config.h +++ b/drivers/ugfx/gdisp/is31fl3731c/gdisp_lld_config.h @@ -24,13 +24,13 @@ along with this program. If not, see . /* Driver hardware support. */ /*===========================================================================*/ -#define GDISP_HARDWARE_FLUSH TRUE // This controller requires flushing -#define GDISP_HARDWARE_DRAWPIXEL TRUE -#define GDISP_HARDWARE_PIXELREAD TRUE -#define GDISP_HARDWARE_CONTROL TRUE +#define GDISP_HARDWARE_FLUSH TRUE // This controller requires flushing +#define GDISP_HARDWARE_DRAWPIXEL TRUE +#define GDISP_HARDWARE_PIXELREAD TRUE +#define GDISP_HARDWARE_CONTROL TRUE -#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_GRAY256 +#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_GRAY256 -#endif /* GFX_USE_GDISP */ +#endif /* GFX_USE_GDISP */ -#endif /* _GDISP_LLD_CONFIG_H */ +#endif /* _GDISP_LLD_CONFIG_H */ diff --git a/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/board_ST7565.h b/drivers/ugfx/gdisp/st7565/board_st7565_template.h similarity index 98% rename from keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/board_ST7565.h rename to drivers/ugfx/gdisp/st7565/board_st7565_template.h index 9650ffb440..9ab636c95d 100644 --- a/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/board_ST7565.h +++ b/drivers/ugfx/gdisp/st7565/board_st7565_template.h @@ -83,7 +83,7 @@ static GFXINLINE void init_board(GDisplay *g) { } static GFXINLINE void post_init_board(GDisplay *g) { - (void) g; + (void) g; } static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) { @@ -106,8 +106,8 @@ static GFXINLINE void enter_cmd_mode(GDisplay *g) { static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) { - (void) g; - spiSend(&SPID1, length, data); + (void) g; + spiSend(&SPID1, length, data); } #endif /* _GDISP_LLD_BOARD_H */ diff --git a/drivers/ugfx/gdisp/st7565/driver.mk b/drivers/ugfx/gdisp/st7565/driver.mk new file mode 100644 index 0000000000..31fc8f1c76 --- /dev/null +++ b/drivers/ugfx/gdisp/st7565/driver.mk @@ -0,0 +1,3 @@ +GFXINC += drivers/ugfx/gdisp/st7565 +GFXSRC += drivers/ugfx/gdisp/st7565/gdisp_lld_ST7565.c +GDISP_DRIVER_LIST += GDISPVMT_ST7565_QMK \ No newline at end of file diff --git a/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/gdisp_lld_ST7565.c b/drivers/ugfx/gdisp/st7565/gdisp_lld_ST7565.c similarity index 90% rename from keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/gdisp_lld_ST7565.c rename to drivers/ugfx/gdisp/st7565/gdisp_lld_ST7565.c index b04ad02935..c38194b069 100644 --- a/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/gdisp_lld_ST7565.c +++ b/drivers/ugfx/gdisp/st7565/gdisp_lld_ST7565.c @@ -9,35 +9,35 @@ #if GFX_USE_GDISP -#define GDISP_DRIVER_VMT GDISPVMT_ST7565_ERGODOX -#include "drivers/gdisp/st7565ergodox/gdisp_lld_config.h" +#define GDISP_DRIVER_VMT GDISPVMT_ST7565_QMK +#include "gdisp_lld_config.h" #include "src/gdisp/gdisp_driver.h" -#include "board_ST7565.h" +#include "board_st7565.h" /*===========================================================================*/ /* Driver local definitions. */ /*===========================================================================*/ #ifndef GDISP_SCREEN_HEIGHT -#define GDISP_SCREEN_HEIGHT 32 +#define GDISP_SCREEN_HEIGHT LCD_HEIGHT #endif #ifndef GDISP_SCREEN_WIDTH -#define GDISP_SCREEN_WIDTH 128 +#define GDISP_SCREEN_WIDTH LCD_WIDTH #endif #ifndef GDISP_INITIAL_CONTRAST -#define GDISP_INITIAL_CONTRAST 35 +#define GDISP_INITIAL_CONTRAST 35 #endif #ifndef GDISP_INITIAL_BACKLIGHT -#define GDISP_INITIAL_BACKLIGHT 100 +#define GDISP_INITIAL_BACKLIGHT 100 #endif -#define GDISP_FLG_NEEDFLUSH (GDISP_FLG_DRIVER<<0) +#define GDISP_FLG_NEEDFLUSH (GDISP_FLG_DRIVER<<0) -#include "drivers/gdisp/st7565ergodox/st7565.h" +#include "st7565.h" /*===========================================================================*/ -/* Driver config defaults for backward compatibility. */ +/* Driver config defaults for backward compatibility. */ /*===========================================================================*/ #ifndef ST7565_LCD_BIAS #define ST7565_LCD_BIAS ST7565_LCD_BIAS_7 @@ -65,7 +65,7 @@ typedef struct{ // Some common routines and macros #define PRIV(g) ((PrivData*)g->priv) -#define RAM(g) (PRIV(g)->ram) +#define RAM(g) (PRIV(g)->ram) static GFXINLINE void write_cmd(GDisplay* g, uint8_t cmd) { PRIV(g)->data[PRIV(g)->data_pos++] = cmd; @@ -76,15 +76,15 @@ static GFXINLINE void flush_cmd(GDisplay* g) { PRIV(g)->data_pos = 0; } -#define write_cmd2(g, cmd1, cmd2) { write_cmd(g, cmd1); write_cmd(g, cmd2); } -#define write_cmd3(g, cmd1, cmd2, cmd3) { write_cmd(g, cmd1); write_cmd(g, cmd2); write_cmd(g, cmd3); } +#define write_cmd2(g, cmd1, cmd2) { write_cmd(g, cmd1); write_cmd(g, cmd2); } +#define write_cmd3(g, cmd1, cmd2, cmd3) { write_cmd(g, cmd1); write_cmd(g, cmd2); write_cmd(g, cmd3); } // Some common routines and macros -#define delay(us) gfxSleepMicroseconds(us) -#define delay_ms(ms) gfxSleepMilliseconds(ms) +#define delay(us) gfxSleepMicroseconds(us) +#define delay_ms(ms) gfxSleepMilliseconds(ms) -#define xyaddr(x, y) ((x) + ((y)>>3)*GDISP_SCREEN_WIDTH) -#define xybit(y) (1<<((y)&7)) +#define xyaddr(x, y) ((x) + ((y)>>3)*GDISP_SCREEN_WIDTH) +#define xybit(y) (1<<((y)&7)) /*===========================================================================*/ /* Driver exported functions. */ @@ -150,7 +150,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { #if GDISP_HARDWARE_FLUSH LLDSPEC void gdisp_lld_flush(GDisplay *g) { - unsigned p; + unsigned p; // Don't flush if we don't need it. if (!(g->flags & GDISP_FLG_NEEDFLUSH)) @@ -181,7 +181,7 @@ LLDSPEC void gdisp_lld_flush(GDisplay *g) { #if GDISP_HARDWARE_DRAWPIXEL LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) { - coord_t x, y; + coord_t x, y; switch(g->g.Orientation) { default: @@ -212,7 +212,7 @@ LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) { #if GDISP_HARDWARE_PIXELREAD LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) { - coord_t x, y; + coord_t x, y; switch(g->g.Orientation) { default: @@ -257,7 +257,7 @@ LLDSPEC void gdisp_lld_blit_area(GDisplay *g) { else { *dst &= ~xybit(dsty); } - dstx++; + dstx++; srcbit++; } } diff --git a/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/gdisp_lld_config.h b/drivers/ugfx/gdisp/st7565/gdisp_lld_config.h similarity index 83% rename from keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/gdisp_lld_config.h rename to drivers/ugfx/gdisp/st7565/gdisp_lld_config.h index 2b66a877c8..4446bd38bc 100644 --- a/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/gdisp_lld_config.h +++ b/drivers/ugfx/gdisp/st7565/gdisp_lld_config.h @@ -14,7 +14,7 @@ /* Driver hardware support. */ /*===========================================================================*/ -#define GDISP_HARDWARE_FLUSH TRUE // This controller requires flushing +#define GDISP_HARDWARE_FLUSH TRUE // This controller requires flushing #define GDISP_HARDWARE_DRAWPIXEL TRUE #define GDISP_HARDWARE_PIXELREAD TRUE #define GDISP_HARDWARE_CONTROL TRUE @@ -22,6 +22,6 @@ #define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_MONO -#endif /* GFX_USE_GDISP */ +#endif /* GFX_USE_GDISP */ -#endif /* _GDISP_LLD_CONFIG_H */ +#endif /* _GDISP_LLD_CONFIG_H */ diff --git a/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/st7565.h b/drivers/ugfx/gdisp/st7565/st7565.h similarity index 100% rename from keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/st7565.h rename to drivers/ugfx/gdisp/st7565/st7565.h diff --git a/keyboards/alps64/readme.md b/keyboards/alps64/readme.md index 1798b193a5..f282730490 100644 --- a/keyboards/alps64/readme.md +++ b/keyboards/alps64/readme.md @@ -1,4 +1,14 @@ -Alps64 keyboard firmware -====================== +Alps64 +=== -TODO: to be updated. +An Alps-only 60% board designed by Hasu. + +Keyboard Maintainer: QMK Community +Hardware Supported: Alps64 PCB +Hardware Availability: https://geekhack.org/index.php?topic=69666.0 + +Make example for this keyboard (after setting up your build environment): + + make alps64-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/amj40/Makefile b/keyboards/amj40/Makefile new file mode 100755 index 0000000000..4e2a6f00fd --- /dev/null +++ b/keyboards/amj40/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/amj40/amj40.c b/keyboards/amj40/amj40.c new file mode 100755 index 0000000000..5a23769991 --- /dev/null +++ b/keyboards/amj40/amj40.c @@ -0,0 +1,30 @@ +#include "amj40.h" +#include "led.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); +}; + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + matrix_scan_user(); +}; + +void led_init_ports(void) { + // * Set our LED pins as output + DDRB |= (1<<2); +} + +void led_set_kb(uint8_t usb_led) { + if (usb_led & (1< + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6072 +#define DEVICE_VER 0x0002 +#define MANUFACTURER Han Chen +#define PRODUCT AMJ40 +#define DESCRIPTION qmk port of AMJ40 v2 PCB + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { F4, F5, F6, F7} +#define MATRIX_COL_PINS { F1, F0, E6, C7, C6, B0, D4, B1, B7, B5, B4, D7} +#define UNUSED_PINS + +#define BACKLIGHT_PIN B6 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* Backlight configuration + */ +#define BACKLIGHT_LEVELS 4 + +/* Underlight configuration + */ + +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 4 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/amj40/keymaps/default/Makefile b/keyboards/amj40/keymaps/default/Makefile new file mode 100755 index 0000000000..034e697bc2 --- /dev/null +++ b/keyboards/amj40/keymaps/default/Makefile @@ -0,0 +1,27 @@ +# 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(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +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 this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/amj40/keymaps/default/build.sh b/keyboards/amj40/keymaps/default/build.sh new file mode 100755 index 0000000000..6b4b4568f5 --- /dev/null +++ b/keyboards/amj40/keymaps/default/build.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# adjust for cpu +# -j 16 gave best result on a hyperthreaded quad core core i7 + +LIMIT=10 +THREADS="-j 16" +KMAP=iso_split_rshift + +echo "We need sudo later" +sudo ls 2>&1 /dev/null + +function wait_bootloader { + echo "Waiting for Bootloader..." + local STARTTIME=$(date +"%s") + local REMIND=0 + local EXEC=dfu-programmer + local TARGET=atmega32u4 + while true + do + sudo $EXEC $TARGET get > /dev/null 2>&1 + [ $? -eq 0 ] && break + ENDTIME=$(date +"%s") + DURATION=$(($ENDTIME-$STARTTIME)) + if [ $REMIND -eq 0 -a $DURATION -gt $LIMIT ] + then + echo "Did you forget to press the reset button?" + REMIND=1 + fi + sleep 1 + done +} +make clean +make KEYMAP=${KMAP} ${THREADS} +if [[ $? -eq 0 ]] +then + echo "please trigger flashing!" + wait_bootloader + sudo make KEYMAP=${KMAP} dfu ${THREADS} +else + echo "make failed" + exit 77 +fi diff --git a/keyboards/amj40/keymaps/default/keymap.c b/keyboards/amj40/keymaps/default/keymap.c new file mode 100755 index 0000000000..13b48c2ada --- /dev/null +++ b/keyboards/amj40/keymaps/default/keymap.c @@ -0,0 +1,173 @@ + + +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include "amj40.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 3 + + + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + + + + + +// increase readability +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Default Layer + * ,-----------------------------------------------------------. + * | Esc| Q | W | E | R | T | Y | U | I | O | P | BS | + * |-----------------------------------------------------------| + * | Tab | A | S | D | F | G | H | J | K | L | Ent | + * |-----------------------------------------------------------| + * | LSft | Z | X | C | V | B | N | M | , | . | /? | + * |-----------------------------------------------------------| + * | LCtl | LGui| LAlt| spc fn0 | spc fn1 |fn2|RAlt|RCtl | + * `-----------------------------------------------------------' + */ + [_QWERTY] = KEYMAP( \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, 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_LCTL, KC_LGUI, KC_LALT, F(0), F(1), F(2), KC_RALT, KC_RCTL \ + ), + + /* Function Layer 1 HHKB style + * ,-----------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bkspc| + * |-----------------------------------------------------------| + * | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | [ | ] | Pipe | + * |-----------------------------------------------------------| + * | F7 | F8 | F9 | F10 | F11 | F12 | End|PgDn| ↓ | | | + * |-----------------------------------------------------------| + * | | | | | | Stop| App| | + * `-----------------------------------------------------------' + */ + [_LOWER] = KEYMAP( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),BL_TOGG, BL_INC, BL_DEC, \ + _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Function Layer 1 HHKB style + * ,-----------------------------------------------------------. + * |Caps| |MSel| â® | ⯠| â­ |PSCR|SkLk|Paus| ↑ | Ins| Del| + * |-----------------------------------------------------------| + * | | 🔇 | â | | * | / |Hone|PgUp| ↠| → | | + * |-----------------------------------------------------------| + * | | 🔉 | 🔊 | | + | - | End|PgDn| ↓ | | | + * |-----------------------------------------------------------| + * | | | | | | Stop| App| | + * `-----------------------------------------------------------' + */ + [_RAISE] = KEYMAP( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, KC_DEL, \ + _______, KC_TRNS, _______, KC_TRNS, KC_TRNS, _______, _______, RGB_TOG \ + ), + + /* Function Layer 1 HHKB style + * ,-----------------------------------------------------------. + * |Caps| |MSel| â® | ⯠| â­ |PSCR|SkLk|Paus| ↑ | Ins| Del| + * |-----------------------------------------------------------| + * | | 🔇 | â | | * | / |Hone|PgUp| ↠| → | | + * |-----------------------------------------------------------| + * | | 🔉 | 🔊 | | + | - | End|PgDn| ↓ | | | + * |-----------------------------------------------------------| + * | | | | | | Stop| App| | + * `-----------------------------------------------------------' + */ + [_ADJUST] = KEYMAP( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, \ + _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, \ + KC_SYSTEM_SLEEP, _______, _______, _______, _______, _______, _______, _______ \ + ), + + + +}; + + + + +enum function_id { + LAUNCH, + RGBLED_TOGGLE, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), + [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC), + [2] = ACTION_LAYER_TAP_KEY(_ADJUST, KC_LGUI), + +}; + + + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + + return MACRO_NONE; +}; + + + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + switch (keycode) { + + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/amj40/keymaps/default/readme.md b/keyboards/amj40/keymaps/default/readme.md new file mode 100755 index 0000000000..2659292ae5 --- /dev/null +++ b/keyboards/amj40/keymaps/default/readme.md @@ -0,0 +1,11 @@ +AMJ40 Default Layout +===================== + +##Quantum MK Firmware +For the full Quantum feature list, see the parent readme.md. + +# Features +* Based on a combination of the original AMJ40 keymap from the TMK firmware as well as the Planck Ortholinear keyboard's "Lower," "Raise," and "Adjust" layers. +* View the keymap.c file to understand they layout of the keymap. +* Has keys to toggle both the switch LEDs and underglow LEDs. + diff --git a/keyboards/amj40/keymaps/default/updatemerge.sh b/keyboards/amj40/keymaps/default/updatemerge.sh new file mode 100755 index 0000000000..da5457e195 --- /dev/null +++ b/keyboards/amj40/keymaps/default/updatemerge.sh @@ -0,0 +1,4 @@ +#!/bin/bash +git checkout amj60 # gets you on branch amj60 +git fetch origin # gets you up to date with origin +git merge origin/master diff --git a/keyboards/amj40/keymaps/fabian/Makefile b/keyboards/amj40/keymaps/fabian/Makefile new file mode 100755 index 0000000000..a914e4c0ce --- /dev/null +++ b/keyboards/amj40/keymaps/fabian/Makefile @@ -0,0 +1,27 @@ +# 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(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +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 this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/amj40/keymaps/fabian/keymap.c b/keyboards/amj40/keymaps/fabian/keymap.c new file mode 100755 index 0000000000..aef514153e --- /dev/null +++ b/keyboards/amj40/keymaps/fabian/keymap.c @@ -0,0 +1,236 @@ +#include "amj40.h" + +// Set the custom keymap +#undef KEYMAP +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k39, k3a, k3b \ +) { \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b}, \ + {k30, k31, k32, k33, k34, k35, XXX, XXX, XXX, k39, k3a, k3b} \ +} + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Custom +#define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define SFT_BSP SFT_T(KC_BSPC) // Tap for Backspace, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +// #define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) + +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI | Lower and Space | Raise and Bksp | GUI |AltGr | Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ + F(2), KC_LCTL, KC_LALT, KC_LGUI, F(0), F(1), KC_RGUI, KC_RALT, KC_RCTL \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI | Lower and Space | Raise and Bksp | GUI |AltGr | Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = KEYMAP( \ + HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ + F(2), KC_LCTL, KC_LALT, KC_LGUI, F(0), F(1), KC_RGUI, KC_RALT, KC_RCTL \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI | Lower and Space | Raise and Bksp | GUI |AltGr | Ctrl | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = KEYMAP( \ + HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + SFT_BSP, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT , \ + F(2), KC_LCTL, KC_LALT, KC_LGUI, F(0), F(1), KC_RGUI, KC_RALT, KC_RCTL \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | MS L | MS D |MS U | MS R |MS Btn| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, \ + _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | Left | Down | Up | Rght |MS_BN2| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = KEYMAP( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BTN2, \ + _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * |Reset |Colemk|Qwerty|Dvorak| | | | | MU | | |Reset | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |AGNorm|AGSwap| | | | | ML | MD | MR | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |AudOn |AudOff| | | | |MBtn1 |MBtn2 |MBtn3 | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = KEYMAP( \ + RESET, COLEMAK, QWERTY, DVORAK, _______, _______, _______, _______, KC_MS_U, _______, _______, RESET, \ + _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, \ + _______, AU_ON, AU_OFF, _______, _______, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), + [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_BSPC), + [2] = ACTION_LAYER_TAP_KEY(_ADJUST, KC_LGUI), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + return MACRO_NONE; +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/amj40/readme.md b/keyboards/amj40/readme.md new file mode 100755 index 0000000000..e705f20fea --- /dev/null +++ b/keyboards/amj40/readme.md @@ -0,0 +1,35 @@ +AMJ40 keyboard firmware +====================== +DIY/Assembled compact 40% keyboard. + +Ported by N.Hou from the original TMK firmware. + +*Supports both backlight LEDs as well as RGB underglow. + +*For reference, the AMJ40 uses pin D3 for underglow lighting. + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/amj40 +folder. Once your dev env is setup, you'll be able to type `make` to generate +your .hex - you can then use `make dfu` to program your PCB once you hit the +reset button. + +Depending on which keymap you would like to use, you will have to compile +slightly differently. + +### Default +To build with the default keymap, simply run `sudo make all`. +The .hex file will appear in the root of the qmk firmware folder. + + + + +### Original tmk firmware +The original firmware that was used to port to qmk can be found [here](https://github.com/AMJKeyboard/AMJ40). + + diff --git a/keyboards/amj40/rules.mk b/keyboards/amj40/rules.mk new file mode 100755 index 0000000000..18403ac328 --- /dev/null +++ b/keyboards/amj40/rules.mk @@ -0,0 +1,66 @@ + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE ?= no # MIDI controls +AUDIO_ENABLE ?= no +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/amj60/readme.md b/keyboards/amj60/readme.md index 0896134e0c..5b03ff0342 100644 --- a/keyboards/amj60/readme.md +++ b/keyboards/amj60/readme.md @@ -1,57 +1,14 @@ -AMJ60 keyboard firmware -====================== -DIY/Assembled compact 60% keyboard. +AMJ60 +=== -## Quantum MK Firmware +A 60% keyboard. -For the full Quantum feature list, see [the parent readme.md](/readme.md). +Keyboard Maintainer: QMK Community +Hardware Supported: AMJ60 +Hardware Availability: https://geekhack.org/index.php?topic=77636.0 -## Building +Make example for this keyboard (after setting up your build environment): -Download or clone the whole firmware and navigate to the keyboards/amj60 -folder. Once your dev env is setup, you'll be able to type `make` to generate -your .hex - you can then use `make dfu` to program your PCB once you hit the -reset button. + make amj60-maximized -Depending on which keymap you would like to use, you will have to compile -slightly differently. - -### Default -To build with the default keymap, simply run `make`. - -### Other Keymaps -Several version of keymap are available in advance but you are recommended to -define your favorite layout yourself. To define your own keymap create file -named `.c` in the keymaps folder, and see keymap document (you can find -in top readme.md) and existent keymap files. - -To build the firmware binary hex file with a keymap just do `make` with -`KEYMAP` option like: -`` -$ make KEYMAP=[default|jack|] -`` -Keymaps follow the format **__\.c__** and are stored in the `keymaps` -folder. - -## Variations -KEYMAP macros for the following layouts are available: - -* default, for all the available, possible keys -* ANSI, for 60% ANSI keyboard -* ISO -* ISO w/ split right shift key -* HHKB - -Remark: all but "ISO w/ split right shift key" are untested and were done to the best of my knowledge. - -### Original tmk firmware -The original firmware that was used to port to qmk can be found [here](https://github.com/AMJKeyboard/AMJ60). - -## Further information -Since information and documentation for this board are sparse, (at least for non-chinese speaking ppl) here is everything that could be found - -* [geekhack discussion](https://geekhack.org/index.php?topic=53070.0) -* [chinese discussion](https://www.v2ex.com/t/161887) -* Board has [dedicated pinouts](https://i.imgur.com/D0sWhyh.jpg?1) for a bluetooth module -* has pins for external power [picture](https://i.imgur.com/00VrtIp.jpg?1). -* most information comes from [reddit](https://www.reddit.com/r/MechanicalKeyboards/comments/32oonr/gh60_pcb_for_your_custom_keyboard/) +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/amjpad/readme.md b/keyboards/amjpad/readme.md new file mode 100644 index 0000000000..beb4988a9c --- /dev/null +++ b/keyboards/amjpad/readme.md @@ -0,0 +1,14 @@ +AMJ Pad +=== + +A DIY Keypad Kit + +Keyboard Maintainer: QMK Community +Hardware Supported: AMJ Pad +Hardware Availability: https://geekhack.org/index.php?topic=83546.0 + +Make example for this keyboard (after setting up your build environment): + + make amjpad-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/atreus/readme.md b/keyboards/atreus/readme.md index 476d1bce3d..64ad4ba98a 100644 --- a/keyboards/atreus/readme.md +++ b/keyboards/atreus/readme.md @@ -1,187 +1,18 @@ -atreus keyboard firmware -====================== +Atreus +=== -## Quantum MK Firmware - -You have access to a bunch of goodies! Check out the Makefile to enable/disable some of the features. Uncomment the `#` to enable them. Setting them to `no` does nothing and will only confuse future you. - - BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality - MIDI_ENABLE = yes # MIDI controls - # UNICODE_ENABLE = yes # Unicode support - this is commented out, just as an example. You have to use #, not // - BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID - -## Atreus specific information +A small mechanical keyboard that is based around the shape of the human hand. These configuration files are specifically for the Atreus keyboards created by Phil Hagelberg (@technomancy). This keyboard is available in two variants: one powered by a Teensy 2, one powered by an A-Star. This repository currently assumes that you have an A-Star powered Atreus. If you are using a Teensy2, specify that by adding `TEENSY2=yes` to your `make` commands. If you are coming from the [atreus-firmware](https://github.com/technomancy/atreus-firmware), we've also brought forward the `make upload` command for you to use. -## Quick aliases to common actions +Keyboard Maintainer: QMK Community +Hardware Supported: Atreus PCB +Hardware Availability: https://atreus.technomancy.us -Your keymap can include shortcuts to common operations (called "function actions" in tmk). +Make example for this keyboard (after setting up your build environment): -### Switching and toggling layers + make atreus-default -`MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer. When you apply this to a key, that same key must be set as `KC_TRNS` on the destination layer. Otherwise, you won't make it back to the original layer when you release the key (and you'll get a keycode sent). You can only switch to layers *above* your current layer. If you're on layer 0 and you use `MO(1)`, that will switch to layer 1 just fine. But if you include `MO(3)` on layer 5, that won't do anything for you -- because layer 3 is lower than layer 5 on the stack. - -`LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped. Like `MO()`, this only works upwards in the layer stack (`layer` must be higher than the current layer). - -`TG(layer)` - toggles a layer on or off. As with `MO()`, you should set this key as `KC_TRNS` in the destination layer so that tapping it again actually toggles back to the original layer. Only works upwards in the layer stack. - -### Fun with modifier keys - -* `LSFT(kc)` - applies left Shift to *kc* (keycode) - `S(kc)` is an alias -* `RSFT(kc)` - applies right Shift to *kc* -* `LCTL(kc)` - applies left Control to *kc* -* `RCTL(kc)` - applies right Control to *kc* -* `LALT(kc)` - applies left Alt to *kc* -* `RALT(kc)` - applies right Alt to *kc* -* `LGUI(kc)` - applies left GUI (command/win) to *kc* -* `RGUI(kc)` - applies right GUI (command/win) to *kc* - -You can also chain these, like this: - - LALT(LCTL(KC_DEL)) -- this makes a key that sends Alt, Control, and Delete in a single keypress. - -The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols. Their long names are also available and documented in `/quantum/keymap_common.h`. - - KC_TILD ~ - KC_EXLM ! - KC_AT @ - KC_HASH # - KC_DLR $ - KC_PERC % - KC_CIRC ^ - KC_AMPR & - KC_ASTR * - KC_LPRN ( - KC_RPRN ) - KC_UNDS _ - KC_PLUS + - KC_LCBR { - KC_RCBR } - KC_PIPE | - KC_COLN : - -`MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down. - -These are the values you can use for the `mod` in `MT()` (right-hand modifiers are not available): - - * MOD_LCTL - * MOD_LSFT - * MOD_LALT - * MOD_LGUI - -These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped. - -We've added shortcuts to make common modifier/tap (mod-tap) mappings more compact: - - * `CTL_T(kc)` - is LCTL when held and *kc* when tapped - * `SFT_T(kc)` - is LSFT when held and *kc* when tapped - * `ALT_T(kc)` - is LALT when held and *kc* when tapped - * `GUI_T(kc)` - is LGUI when held and *kc* when tapped - * `ALL_T(kc)` - is Hyper (all mods) when held and *kc* when tapped. To read more about what you can do with a Hyper key, see [this blog post by Brett Terpstra](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/) - -### Temporarily setting the default layer - -`DF(layer)` - sets default layer to *layer*. The default layer is the one at the "bottom" of the layer stack - the ultimate fallback layer. This currently does not persist over power loss. When you plug the keyboard back in, layer 0 will always be the default. It is theoretically possible to work around that, but that's not what `DF` does. - -### Remember: These are just aliases - -These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). - -Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them. - -## Macro shortcuts: Send a whole string when pressing just one key - -Instead of using the `ACTION_MACRO` function, you can simply use `M(n)` to access macro *n* - *n* will get passed into the `action_get_macro` as the `id`, and you can use a switch statement to trigger it. This gets called on the keydown and keyup, so you'll need to use an if statement testing `record->event.pressed` (see keymap_default.c). - -```c -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is. -{ - switch(id) { - case 0: // this would trigger when you hit a key mapped as M(0) - if (record->event.pressed) { - return MACRO( I(255), T(H), T(E), T(L), T(L), W(255), T(O), END ); // this sends the string 'hello' when the macro executes - } - break; - } - return MACRO_NONE; -}; -``` -A macro can include the following commands: - -* I() change interval of stroke in milliseconds. -* D() press key. -* U() release key. -* T() type key(press and release). -* W() wait (milliseconds). -* END end mark. - -So above you can see the stroke interval changed to 255ms between each keystroke, then a bunch of keys being typed, waits a while, then the macro ends. - -Note: Using macros to have your keyboard send passwords for you is a bad idea. - -### Additional keycode aliases for software-implemented layouts (Colemak, Dvorak, etc) - -Everything is assuming you're in Qwerty (in software) by default, but there is built-in support for using a Colemak or Dvorak layout by including this at the top of your keymap: - - #include "keymap_.h" - -Where is "colemak" or "dvorak". After including this line, you will get access to: - - * `CM_*` for all of the Colemak-equivalent characters - * `DV_*` for all of the Dvorak-equivalent characters - -These implementations assume you're using Colemak or Dvorak on your OS, not on your keyboard - this is referred to as a software-implemented layout. If your computer is in Qwerty and your keymap is in Colemak or Dvorak, this is referred to as a firmware-implemented layout, and you won't need these features. - -To give an example, if you're using software-implemented Colemak, and want to get an `F`, you would use `CM_F` - `KC_F` under these same circumstances would result in `T`. - -## Additional language support - -In `quantum/keymap_extras/`, you'll see various language files - these work the same way as the alternative layout ones do. Most are defined by their two letter country/language code followed by an underscore and a 4-letter abbreviation of its name. `FR_UGRV` which will result in a `ù` when using a software-implemented AZERTY layout. It's currently difficult to send such characters in just the firmware (but it's being worked on - see Unicode support). - -## Unicode support - -You can currently send 4 hex digits with your OS-specific modifier key (RALT for OSX with the "Unicode Hex Input" layout) - this is currently limited to supporting one OS at a time, and requires a recompile for switching. 8 digit hex codes are being worked on. The keycode function is `UC(n)`, where *n* is a 4 digit hexidecimal. Enable from the Makefile. - -## Other firmware shortcut keycodes - -* `RESET` - puts the MCU in DFU mode for flashing new firmware (with `make dfu`) -* `DEBUG` - the firmware into debug mode - you'll need hid_listen to see things -* `BL_ON` - turns the backlight on -* `BL_OFF` - turns the backlight off -* `BL_` - sets the backlight to level *n* -* `BL_INC` - increments the backlight level by one -* `BL_DEC` - decrements the backlight level by one -* `BL_TOGG` - toggles the backlight -* `BL_STEP` - steps through the backlight levels - -Enable the backlight from the Makefile. - -## MIDI functionalty - -This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile. - -## Bluetooth functionality - -This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will. - -## Building - -Download or clone the whole firmware and navigate to the keyboards/atreus folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button. - -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default -To build with the default keymap, simply run `make default`. - -### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/atreus62/readme.md b/keyboards/atreus62/readme.md index 0245b4f9f0..d68d1b615b 100644 --- a/keyboards/atreus62/readme.md +++ b/keyboards/atreus62/readme.md @@ -1,10 +1,16 @@ -atreus62 keyboard firmware -====================== +Atreus +=== -This firmware is for the atreus62 keyboard. - -This version utilizes a Pro Micro for its controller and has a 62 key layout. +A 62 key variant of the Atreus keyboard. https://github.com/profet23/atreus62 -TODO: More information \ No newline at end of file +Keyboard Maintainer: QMK Community +Hardware Supported: Atreus62 PCB +Hardware Availability: http://shop.profetkeyboards.com/product/atreus62-keyboard + +Make example for this keyboard (after setting up your build environment): + + make atreus62-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/bananasplit/Makefile b/keyboards/bananasplit/Makefile new file mode 100644 index 0000000000..57b2ef62e5 --- /dev/null +++ b/keyboards/bananasplit/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/bananasplit/README.md b/keyboards/bananasplit/README.md new file mode 100644 index 0000000000..b059a0834d --- /dev/null +++ b/keyboards/bananasplit/README.md @@ -0,0 +1,29 @@ +# BananaSplit60 keyboard firmware + +Ported from evangs/tmk_keyboard + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme](/). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/bananasplit folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default + +To build with the default keymap, simply run `make default`. + +### Other Keymaps + +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. + +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + +``` +$ make [default|jack|] +``` + +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/bananasplit/bananasplit.c b/keyboards/bananasplit/bananasplit.c new file mode 100644 index 0000000000..1aa8fb1745 --- /dev/null +++ b/keyboards/bananasplit/bananasplit.c @@ -0,0 +1,28 @@ +#include "bananasplit.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +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); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/bananasplit/bananasplit.h b/keyboards/bananasplit/bananasplit.h new file mode 100644 index 0000000000..fa4c13258b --- /dev/null +++ b/keyboards/bananasplit/bananasplit.h @@ -0,0 +1,142 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#ifndef BANANASPLIT_H +#define BANANASPLIT_H + +#include "quantum.h" + +/* +------------------------------------------------------------------------------------------- +| K00 | K01 | K02 | K03 | K04 | K05 | K06 | K07 | K08 | K09 | K0A | K0B | K0C | K0D | +------------------------------------------------------------------------------------------- +| K10 | K11 | K12 | K13 | K14 | K15 | K16 | K17 | K18 | K19 | K1A | K1B | K1C | K1D | +------------------------------------------------------------------------------------------- +| K20 | K21 | K22 | K23 | K24 | K25 | K26 | K27 | K28 | K29 | K2A | K2B | K2C | +------------------------------------------------------------------------------------------- +| K30 | K32 | K33 | K34 | K35 | K36 | K37 | K38 | K39 | K3A | K3B | K3C | K3D | +------------------------------------------------------------------------------------------- +| K40 | K41 | K42 | K44 | K45 | K46 | K48 | K49 | K4A | K4B | K4C | +------------------------------------------------------------------------------------------- +*/ +#define KEYMAP( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K44, K45, K46, K48, K49, K4A, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C, KC_NO } \ +} +/* Here is the above keymap filled with KC_TRNS. It's a useful starting point when defining layers. +KEYMAP( \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,\ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______ \ +) +*/ + +#define KEYMAP_HHKBANANA( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K44, K45, K46, K48, K49, K4A, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ + { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C, KC_NO } \ +} + +#define KEYMAP_ANSI( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K45, K48, K49, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, K48, K49, KC_NO, K4B, K4C, KC_NO } \ +} + +#define KEYMAP_ISO( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K45, K48, K49, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, K48, K49, KC_NO, K4B, K4C, KC_NO } \ +} + +/* +------------------------------------------------------------------------------------------- +| K00 | K01 | K02 | K03 | K04 | K05 | K06 | K07 | K08 | K09 | K0A | K0B | K0C | K0D | K2D | +------------------------------------------------------------------------------------------- +| K10 | K11 | K12 | K13 | K14 | K15 | K16 | K17 | K18 | K19 | K1A | K1B | K1C | K1D | +------------------------------------------------------------------------------------------- +| K20 | K21 | K22 | K23 | K24 | K25 | K26 | K27 | K28 | K29 | K2A | K2B | K2C | +------------------------------------------------------------------------------------------- +| K30 | K31 | K32 | K33 | K34 | K35 | K36 | K37 | K38 | K39 | K3A | K3B | K3C | K3D | +------------------------------------------------------------------------------------------- +| K40 | K41 | K42 | K44 | K45 | K46 | K48 | K49 | K4A | K4B | K4C | +------------------------------------------------------------------------------------------- +*/ +#define KEYMAP_ALL( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K44, K45, K46, K48, K49, K4A, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C, KC_NO } \ +} + +#define KEYMAP_HHKB_ARROW( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D,\ + K40, K41, K42, K44, K45, K46, K48, K49, K4A, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, K44, K45, K46, KC_NO, K48, K49, K4A, K4B, K4C, KC_NO } \ +} + + +#endif diff --git a/keyboards/bananasplit/config.h b/keyboards/bananasplit/config.h new file mode 100644 index 0000000000..4bb5b85e05 --- /dev/null +++ b/keyboards/bananasplit/config.h @@ -0,0 +1,84 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEAE +#define PRODUCT_ID 0x8870 +#define DEVICE_VER 0x0001 +#define MANUFACTURER TheVan Keyboards +#define PRODUCT BananaSplit 60 +#define DESCRIPTION keyboard firmware for BananaSplit 60 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define MATRIX_ROW_PINS { B0, B2, B4, B5, B6 } +#define MATRIX_COL_PINS { F5, B1, F0, F1, F4, B3, D7, D6, D4, D5, D3, D2, D1, D0 } +#define UNUSED_PINS + +#define DIODE_DIRECTION ROW2COL + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 1 + +/* mapping backlight LEDs to correct Pin */ +#define BACKLIGHT_PIN B7 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 +#define TAPPING_TERM 175 + +/* 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 + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + + + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/bananasplit/keymaps/0010/Makefile b/keyboards/bananasplit/keymaps/0010/Makefile new file mode 100644 index 0000000000..7d09c322e5 --- /dev/null +++ b/keyboards/bananasplit/keymaps/0010/Makefile @@ -0,0 +1,37 @@ +# Copyright 2017 Balz Guenat +# +# 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 . + + +# QMK 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(+1000) +# MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +# EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +# CONSOLE_ENABLE = no # Console for debug(+400) +# COMMAND_ENABLE = yes # Commands for debug and configuration +# NKRO_ENABLE = yes # 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 support (+2400 to 4200, depending on config) +# 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 = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +# SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/bananasplit/keymaps/0010/config.h b/keyboards/bananasplit/keymaps/0010/config.h new file mode 100644 index 0000000000..060f5922f2 --- /dev/null +++ b/keyboards/bananasplit/keymaps/0010/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Balz Guenat + * + * 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 . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/bananasplit/keymaps/0010/keymap.c b/keyboards/bananasplit/keymaps/0010/keymap.c new file mode 100644 index 0000000000..a1795a1ef4 --- /dev/null +++ b/keyboards/bananasplit/keymaps/0010/keymap.c @@ -0,0 +1,73 @@ +/* Copyright 2017 Balz Guenat + * + * 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 . + */ + +#include "bananasplit.h" + +#define ______ KC_TRNS + +/* + This switch layout is ANSI with the following modifications: + Split right shift + 225 125 275 spacebar + Bottom right singles +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* +------------------------------------------------------------------------------------------- +|Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | +------------------------------------------------------------------------------------------- +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | +------------------------------------------------------------------------------------------- +| Cpslock | A | S | D | F | G | H | J | K | L | ; | ' | Enter | +------------------------------------------------------------------------------------------- +| Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Up | +------------------------------------------------------------------------------------------- +| Ctrl | GUI | Alt | L1(Space) | LED | Space | Home | End | Left |Rght |Down | +------------------------------------------------------------------------------------------- +*/ +[0] = KEYMAP( \ + 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_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_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, LT(1,KC_SPACE), BL_TOGG, KC_SPC, KC_HOME, KC_END, KC_LEFT, KC_RGHT, KC_DOWN \ +), +/* +------------------------------------------------------------------------------------------- +| ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | +------------------------------------------------------------------------------------------- +| | | UP | | | | | | | | | | | PrtSc | +------------------------------------------------------------------------------------------- +| |Left | Down |Right | | | | | | | | | | SLEEP | +------------------------------------------------------------------------------------------- +| | | | | | | | | | | | | | | +------------------------------------------------------------------------------------------- +| | | | | Reset | | | | | | +------------------------------------------------------------------------------------------- +*/ +[1] = KEYMAP( \ + 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_UP, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, \ + ______, KC_LEFT, KC_DOWN, KC_RGHT, ______, ______, ______, ______, ______, ______, ______, ______, KC_SLEP, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_PGUP, \ + ______, ______, ______, ______, RESET, ______, ______, ______, ______, ______, KC_PGDN \ +), +}; + + +const uint16_t PROGMEM fn_actions[] = { +}; diff --git a/keyboards/bananasplit/keymaps/coloneljesus/Makefile b/keyboards/bananasplit/keymaps/coloneljesus/Makefile new file mode 100644 index 0000000000..7d09c322e5 --- /dev/null +++ b/keyboards/bananasplit/keymaps/coloneljesus/Makefile @@ -0,0 +1,37 @@ +# Copyright 2017 Balz Guenat +# +# 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 . + + +# QMK 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(+1000) +# MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +# EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +# CONSOLE_ENABLE = no # Console for debug(+400) +# COMMAND_ENABLE = yes # Commands for debug and configuration +# NKRO_ENABLE = yes # 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 support (+2400 to 4200, depending on config) +# 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 = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +# SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/bananasplit/keymaps/coloneljesus/config.h b/keyboards/bananasplit/keymaps/coloneljesus/config.h new file mode 100644 index 0000000000..af6cf8ef1f --- /dev/null +++ b/keyboards/bananasplit/keymaps/coloneljesus/config.h @@ -0,0 +1,25 @@ +/* Copyright 2017 Balz Guenat + * + * 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 . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here +#define GRAVE_ESC_CTRL_OVERRIDE + +#endif diff --git a/keyboards/bananasplit/keymaps/coloneljesus/keymap.c b/keyboards/bananasplit/keymaps/coloneljesus/keymap.c new file mode 100644 index 0000000000..5d67079f81 --- /dev/null +++ b/keyboards/bananasplit/keymaps/coloneljesus/keymap.c @@ -0,0 +1,96 @@ +/* Copyright 2017 Balz Guenat + * + * 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 . + */ +#include "bananasplit.h" + +#define ______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* +------------------------------------------------------------------------------------------- +|GvEsc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | +------------------------------------------------------------------------------------------- +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | +------------------------------------------------------------------------------------------- +| Fn1 | A | S | D | F | G | H | J | K | L | ; | ' | Enter | +------------------------------------------------------------------------------------------- +| Shift | Z | X | C | V | B | N | M | , | . | / | Shift |M(0) | +------------------------------------------------------------------------------------------- +| Ctrl | GUI | Alt | Space | Fn1 | Space | Alt | GUI | App | Ctrl | +------------------------------------------------------------------------------------------- +*/ +[0] = KEYMAP( \ + 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_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, \ + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, M(0),\ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_NO, KC_APP, KC_RCTL \ +), +/* +------------------------------------------------------------------------------------------- +| | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | +------------------------------------------------------------------------------------------- +| CpsLck |Prev |Vol+ |Next |PgUp | Ins |Home |WrdL |WrdR | End | | | | PrtSc | +------------------------------------------------------------------------------------------- +| TRNS |Mute |Vol- |Play |PgDn | Del |Left |Down | Up |Right| | | | +------------------------------------------------------------------------------------------- +| | | | | | |DelWL|DelWR| | | | | | +------------------------------------------------------------------------------------------- +| | | | | TRNS | | | | | Reset | +------------------------------------------------------------------------------------------- +*/ +[1] = KEYMAP( \ + ______, 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_CAPS, KC_MPRV, KC_VOLU, KC_MNXT, KC_PGUP, KC_INS, KC_HOME, LCTL(KC_LEFT), LCTL(KC_RGHT), KC_END, ______, ______, ______, KC_PSCR, \ + ______, KC_MUTE, KC_VOLD, KC_MPLY, KC_PGDN, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, LCTL(KC_BSPC), LCTL(KC_DEL), ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET \ +), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch(id) { + case 0: + // Sends Alt+Shift on both key down and key up. + // Fesigned to switch between two keyboard layouts on Windows using a locking switch. + // Does nothing if right shift is pressed for easier resync. + if (!(get_mods() & MOD_BIT(KC_RSFT))) + return MACRO(D(LALT), T(LSFT), U(LALT), END); + else + return MACRO_NONE; + } + return MACRO_NONE; +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/bananasplit/keymaps/coloneljesus/readme.md b/keyboards/bananasplit/keymaps/coloneljesus/readme.md new file mode 100644 index 0000000000..b9ce5f44a1 --- /dev/null +++ b/keyboards/bananasplit/keymaps/coloneljesus/readme.md @@ -0,0 +1,33 @@ +# /u/Coloneljesus's keymap for the Bananasplit + +Default layer: + +``` +------------------------------------------------------------------------------------------- +|GvEsc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | +------------------------------------------------------------------------------------------- +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | +------------------------------------------------------------------------------------------- +| Fn1 | A | S | D | F | G | H | J | K | L | ; | ' | Enter | +------------------------------------------------------------------------------------------- +| Shift | Z | X | C | V | B | N | M | , | . | / | Shift | +------------------------------------------------------------------------------------------- +| Ctrl | GUI | Alt | Space | Fn1 | Space | Alt | GUI | App | Ctrl | +------------------------------------------------------------------------------------------- +``` + +Fn1 layer: + +``` +------------------------------------------------------------------------------------------- +| | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | +------------------------------------------------------------------------------------------- +| CpsLck |Prev |Vol+ |Next |PgUp | Ins |Home |WrdL |WrdR | End | | | | PrtSc | +------------------------------------------------------------------------------------------- +| TRNS |Mute |Vol- |Play |PgDn | Del |Left |Down | Up |Right| | | | +------------------------------------------------------------------------------------------- +| | | | | | |DelWL|DelWR| | | | | +------------------------------------------------------------------------------------------- +| | | | | TRNS | | | | | Reset | +------------------------------------------------------------------------------------------- +``` \ No newline at end of file diff --git a/keyboards/bananasplit/keymaps/default/Makefile b/keyboards/bananasplit/keymaps/default/Makefile new file mode 100644 index 0000000000..7d09c322e5 --- /dev/null +++ b/keyboards/bananasplit/keymaps/default/Makefile @@ -0,0 +1,37 @@ +# Copyright 2017 Balz Guenat +# +# 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 . + + +# QMK 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(+1000) +# MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +# EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +# CONSOLE_ENABLE = no # Console for debug(+400) +# COMMAND_ENABLE = yes # Commands for debug and configuration +# NKRO_ENABLE = yes # 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 support (+2400 to 4200, depending on config) +# 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 = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +# SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/bananasplit/keymaps/default/config.h b/keyboards/bananasplit/keymaps/default/config.h new file mode 100644 index 0000000000..060f5922f2 --- /dev/null +++ b/keyboards/bananasplit/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Balz Guenat + * + * 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 . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/bananasplit/keymaps/default/keymap.c b/keyboards/bananasplit/keymaps/default/keymap.c new file mode 100644 index 0000000000..f07278df9b --- /dev/null +++ b/keyboards/bananasplit/keymaps/default/keymap.c @@ -0,0 +1,25 @@ +#include "bananasplit.h" + +#define DEFAULT_LAYER 0 +#define LAYER_1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEFAULT_LAYER] = KEYMAP( + 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_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_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, RSFT_T(KC_SLSH), KC_UP, _______, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_ENT, MO(LAYER_1), KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [LAYER_1] = KEYMAP( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; diff --git a/keyboards/bananasplit/keymaps/default/readme.md b/keyboards/bananasplit/keymaps/default/readme.md new file mode 100644 index 0000000000..aaf6daa08c --- /dev/null +++ b/keyboards/bananasplit/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for the Bananasplit diff --git a/keyboards/bananasplit/keymaps/hhkbanana/keymap.c b/keyboards/bananasplit/keymaps/hhkbanana/keymap.c new file mode 100644 index 0000000000..10593de8db --- /dev/null +++ b/keyboards/bananasplit/keymaps/hhkbanana/keymap.c @@ -0,0 +1,25 @@ +#include "bananasplit.h" + +#define DEFAULT_LAYER 0 +#define LAYER_1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEFAULT_LAYER] = KEYMAP_HHKBANANA( \ + 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_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_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_LCTL, KC_LGUI, KC_LALT, KC_ENT, MO(LAYER_1), KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), + + [LAYER_1] = KEYMAP_HHKBANANA( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; diff --git a/keyboards/bananasplit/keymaps/nic/keymap.c b/keyboards/bananasplit/keymaps/nic/keymap.c new file mode 100644 index 0000000000..f9794b5b10 --- /dev/null +++ b/keyboards/bananasplit/keymaps/nic/keymap.c @@ -0,0 +1,45 @@ +#include "bananasplit.h" + +#define DEFAULT_LAYER 0 +#define THUMB_LAYER 1 +#define NORMAN_LAYER 2 +#define MOD_LAYER 3 + +#define HYPER_TAB ALL_T(KC_TAB) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEFAULT_LAYER] = KEYMAP_HHKB_ARROW( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, \ + HYPER_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, \ + CTL_T(KC_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, RSFT_T(KC_SLSH), KC_UP, TG(NORMAN_LAYER), \ + KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, MO(THUMB_LAYER), KC_SPC, KC_LGUI, KC_LALT, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), + + [THUMB_LAYER] = KEYMAP_HHKB_ARROW( \ + MO(MOD_LAYER), 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_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [NORMAN_LAYER] = KEYMAP_HHKB_ARROW( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN, _______, _______, _______, \ + _______, _______, _______, KC_E, KC_T, _______, KC_Y, KC_N, KC_I, KC_O, KC_H, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_P, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [MOD_LAYER] = KEYMAP_HHKB_ARROW( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; diff --git a/keyboards/bananasplit/rules.mk b/keyboards/bananasplit/rules.mk new file mode 100644 index 0000000000..04579d4ce6 --- /dev/null +++ b/keyboards/bananasplit/rules.mk @@ -0,0 +1,65 @@ +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA +BACKLIGHT_ENABLE = yes + + +# Optimize size but this may cause error "relocation truncated to fit" +#EXTRALDFLAGS = -Wl,--relax diff --git a/keyboards/bantam44/readme.md b/keyboards/bantam44/readme.md index 462f67c124..494800958e 100644 --- a/keyboards/bantam44/readme.md +++ b/keyboards/bantam44/readme.md @@ -1,25 +1,14 @@ -Bantam44 keyboard firmware -====================== +Bantam-44 +=== -## Quantum MK Firmware +A small mechanical keyboard. -For the full Quantum feature list, see [the parent readme.md](/readme.md). +Keyboard Maintainer: QMK Community +Hardware Supported: Bantam-44 PCB +Hardware Availability: http://www.bantamkeyboards.com -## Building +Make example for this keyboard (after setting up your build environment): -Download or clone the whole firmware and navigate to the keyboards/Bantam44 folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + make bantam44-default -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default -To build with the default keymap, simply run `make default`. - -### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. \ No newline at end of file +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/clueboard/keymaps/bloodlvst/Makefile b/keyboards/clueboard/keymaps/bloodlvst/Makefile new file mode 100644 index 0000000000..b1c2f32f6a --- /dev/null +++ b/keyboards/clueboard/keymaps/bloodlvst/Makefile @@ -0,0 +1,2 @@ +EXTRAKEY_ENABLE = yes +COMMAND_ENABLE = no diff --git a/keyboards/clueboard/keymaps/bloodlvst/config.h b/keyboards/clueboard/keymaps/bloodlvst/config.h new file mode 100644 index 0000000000..320401dbda --- /dev/null +++ b/keyboards/clueboard/keymaps/bloodlvst/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define PREVENT_STUCK_MODIFIERS +#define DISABLE_SPACE_CADET_ROLLOVER +#endif diff --git a/keyboards/clueboard/keymaps/bloodlvst/keymap.c b/keyboards/clueboard/keymaps/bloodlvst/keymap.c new file mode 100644 index 0000000000..bedb658eaa --- /dev/null +++ b/keyboards/clueboard/keymaps/bloodlvst/keymap.c @@ -0,0 +1,41 @@ +#include "clueboard.h" + +// Helpful defines +#define _______ KC_TRNS + +// 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. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + 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_INS, KC_DEL, 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_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_LSPO, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSPC, KC_UP, \ + KC_LCTL, KC_LGUI, MO(_FL), KC_LALT, KC_BSPC,KC_SPC, KC_RALT, KC_APP, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + 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_HOME, KC_END, KC_VOLU, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,KC_SLCK, KC_PAUS, _______, _______, KC_MUTE, KC_VOLD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, KC_PSCR, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MPLY, \ + _______, KC_MYCM, MO(_FL), _______, _______,_______, _______, KC_CALC, MO(_FL), _______, KC_MPRV, KC_MSTP, KC_MNXT), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + KC_PWR, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, RGB_MOD, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,RGB_HUD, RGB_HUI, _______, _______, _______, KC_WAKE, \ + _______, _______, MO(_FL), _______, RGB_SAD,RGB_SAI, _______, _______, MO(_FL), _______, _______, KC_SLEP, _______), +}; diff --git a/keyboards/clueboard/keymaps/bloodlvst/readme.md b/keyboards/clueboard/keymaps/bloodlvst/readme.md new file mode 100644 index 0000000000..ee287ca476 --- /dev/null +++ b/keyboards/clueboard/keymaps/bloodlvst/readme.md @@ -0,0 +1,17 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +![Clueboard Layout Image](http://i.imgur.com/7Capi8W.png) + +# Default Clueboard Layout + +This is the default layout that comes flashed on every Clueboard. For the most +part it's a straightforward and easy to follow layout. The only unusual key is +the key in the upper left, which sends Escape normally, but Grave when any of +the Ctrl, Alt, or GUI modifiers are held down. diff --git a/keyboards/clueboard/keymaps/caps_fn/keymap.c b/keyboards/clueboard/keymaps/caps_fn/keymap.c index 7fad9c1b21..2e54fdba8a 100644 --- a/keyboards/clueboard/keymaps/caps_fn/keymap.c +++ b/keyboards/clueboard/keymaps/caps_fn/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // Helpful defines -#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) #define _______ KC_TRNS // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -16,7 +15,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ [_BL] = KEYMAP( - F(0), 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_GRV, KC_BSPC, KC_PGUP, \ + 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_GRV, KC_BSPC, 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_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_RO, KC_RSFT, KC_UP, \ @@ -40,47 +39,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/colemak/keymap.c b/keyboards/clueboard/keymaps/colemak/keymap.c index 42c85ff9d8..2ed3541862 100644 --- a/keyboards/clueboard/keymaps/colemak/keymap.c +++ b/keyboards/clueboard/keymaps/colemak/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // Helpful defines -#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) #define _______ KC_TRNS // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -16,71 +15,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ [_BL] = KEYMAP( - F(0), 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_GRV, KC_BSPC, KC_PGUP, \ + 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_GRV, KC_BSPC, KC_PGUP, \ KC_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, KC_PGDN, \ KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_NUHS, KC_ENT, \ KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ - KC_LCTL, MO(_FL), KC_LGUI,KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT), + KC_LCTL, KC_LGUI, KC_LALT,KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer */ [_FL] = KEYMAP( - 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_CAPS, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP, KC_END, _______, _______, _______, _______, \ + 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_CAPS, KC_VOLU, \ + _______, _______, _______,_______,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP, KC_END, _______, _______, _______, KC_VOLD, \ KC_DEL, _______, MO(_CL),_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP, KC_RGHT, _______, _______, _______, \ _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ - _______, _______, _______,_______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + _______, _______, _______,_______, _______,_______, _______, _______, MO(_FL), _______, KC_HOME, KC_PGDN, KC_END), /* Keymap _CL: Control layer */ [_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + BL_STEP, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, \ _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/default/keymap.c b/keyboards/clueboard/keymaps/default/keymap.c index 7fad9c1b21..c4da561fe3 100644 --- a/keyboards/clueboard/keymaps/default/keymap.c +++ b/keyboards/clueboard/keymaps/default/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // Helpful defines -#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) #define _______ KC_TRNS // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -16,71 +15,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ [_BL] = KEYMAP( - F(0), 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_GRV, KC_BSPC, 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_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_RO, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + 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_GRV, KC_BSPC, 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_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_RO, KC_RSFT, KC_UP, \ + KC_LCTL,KC_LGUI,KC_LALT,KC_MHEN, KC_SPC, KC_SPC, KC_HENK,KC_RALT,MO(_FL),KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT), /* Keymap _FL: Function Layer */ [_FL] = KEYMAP( - 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, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ - _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + 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_VOLU, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_MUTE, KC_VOLD, \ + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_PGUP, \ + _______,_______,_______,_______, _______,_______, _______,_______,MO(_FL),_______,KC_HOME,KC_PGDN,KC_END), /* Keymap _CL: Control layer */ [_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ - _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), + BL_STEP,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RGB_TOG, RGB_VAI, \ + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, \ + _______,_______,_______,_______, RGB_MOD, RGB_MOD, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/jokrik/keymap.c b/keyboards/clueboard/keymaps/jokrik/keymap.c index acde4d9e16..dda6a8b907 100644 --- a/keyboards/clueboard/keymaps/jokrik/keymap.c +++ b/keyboards/clueboard/keymaps/jokrik/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // Helpful defines -#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) #define _______ KC_TRNS // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -40,47 +39,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, \ _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, MO(_FL), _______, RGB_HUD, RGB_SAD, RGB_HUI), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/mac_optimized/keymap.c b/keyboards/clueboard/keymaps/mac_optimized/keymap.c index e72733092f..e39edb4d6e 100644 --- a/keyboards/clueboard/keymaps/mac_optimized/keymap.c +++ b/keyboards/clueboard/keymaps/mac_optimized/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // Helpful defines -#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) #define _______ KC_TRNS // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -16,64 +15,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ [_BL] = KEYMAP( - F(0), 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_GRV, KC_BSPC, 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_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_RO, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LALT, KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + 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_GRV, KC_BSPC, 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_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_RO, KC_RSFT, KC_UP, \ + KC_LCTL,KC_LALT,KC_LGUI,KC_MHEN, KC_SPC, KC_SPC, KC_HENK,KC_RGUI,MO(_FL),KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT), /* Keymap _FL: Function Layer */ [_FL] = KEYMAP( - 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, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ - _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), + 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_VOLU, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MRWD,KC_MPLY,KC_MFFD,_______,KC_MUTE, KC_VOLD, \ + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_PGUP, \ + _______,_______,_______,_______, _______,_______, _______,_______,MO(_FL),_______,KC_HOME,KC_PGDN,KC_END), /* Keymap _CL: Control layer */ [_CL] = KEYMAP( - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ - _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ - _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ - MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ - _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), + BL_STEP,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RGB_TOG, RGB_VAI, \ + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ + _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, \ + _______,_______,_______,_______, RGB_MOD, RGB_MOD, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - if (record->event.pressed) { - /* The key is being pressed. - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - if (mods_pressed) { - register_code(KC_GRV); - } else { - register_code(KC_ESC); - } - } else { - /* The key is being released. - */ - if (mods_pressed) { - mods_pressed = false; - unregister_code(KC_GRV); - } else { - unregister_code(KC_ESC); - } - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/magicmonty/keymap.c b/keyboards/clueboard/keymaps/magicmonty/keymap.c index 3d00332b09..feef00e7a2 100644 --- a/keyboards/clueboard/keymaps/magicmonty/keymap.c +++ b/keyboards/clueboard/keymaps/magicmonty/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // Helpful defines -#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) #define _______ KC_TRNS #define xxxxxxx KC_NO @@ -45,16 +44,13 @@ // CTRL when held, ESC when tapped #define CTL_ESC CTL_T(KC_ESC) -// ESC/Grave mode -#define ESC_GRV F(0) - // Reset RGB mode to layer signalling -#define RGB_RST F(1) +#define RGB_RST F(0) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ [_BL] = KEYMAP( - ESC_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_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_INS, \ 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, KC_DEL, \ ESC_FUN, 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, \ @@ -116,44 +112,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_FUNCTION(0), // Calls action_function() - [1] = ACTION_FUNCTION(1), // Calls action_function() }; void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - switch (id) { case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - case 1: if (record->event.pressed) { rgblight_mode(1); rgblight_sethsv(206, 255, 255); diff --git a/keyboards/clueboard/keymaps/maximised/keymap.c b/keyboards/clueboard/keymaps/maximised/keymap.c index ebaefa6690..583c520917 100644 --- a/keyboards/clueboard/keymaps/maximised/keymap.c +++ b/keyboards/clueboard/keymaps/maximised/keymap.c @@ -39,9 +39,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; - -const uint16_t PROGMEM fn_actions[] = { -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { -}; diff --git a/keyboards/clueboard/keymaps/mouse_keys/keymap.c b/keyboards/clueboard/keymaps/mouse_keys/keymap.c index d3108d1e2b..259fa29b74 100644 --- a/keyboards/clueboard/keymaps/mouse_keys/keymap.c +++ b/keyboards/clueboard/keymaps/mouse_keys/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // Helpful defines -#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) #define _______ KC_TRNS // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -17,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ [_BL] = KEYMAP( - F(0), 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_GRV, KC_BSPC, KC_PGUP, \ + 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_GRV, KC_BSPC, 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_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_RO, KC_RSFT, KC_UP, \ @@ -50,47 +49,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_MS_U, \ _______, _______, _______,_______, LT(_ML, KC_SPC),LT(_ML, KC_SPC), _______, KC_BTN1, KC_BTN2, KC_BTN3, KC_MS_L, KC_MS_D,KC_MS_R), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/serubin/keymap.c b/keyboards/clueboard/keymaps/serubin/keymap.c index 18446eb31d..4212e6a529 100644 --- a/keyboards/clueboard/keymaps/serubin/keymap.c +++ b/keyboards/clueboard/keymaps/serubin/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // Helpful defines -#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) #define _______ KC_TRNS // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -51,53 +50,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, MO(_FL), _______, RGB_SAI, \ _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() - [1] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - case 1: - if(record->event.pressed) { - del_key(KC_ESC); - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/shift_fn/keymap.c b/keyboards/clueboard/keymaps/shift_fn/keymap.c index 83ae1d6154..be29a0a174 100644 --- a/keyboards/clueboard/keymaps/shift_fn/keymap.c +++ b/keyboards/clueboard/keymaps/shift_fn/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // Helpful defines -#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) #define _______ KC_TRNS // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -16,7 +15,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ [_BL] = KEYMAP( - F(0), 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_GRV, KC_BSPC, KC_PGUP, \ + 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_GRV, KC_BSPC, 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_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, \ MO(_FL), KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ @@ -40,47 +39,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD,RGB_SAD,RGB_HUI), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/skully/keymap.c b/keyboards/clueboard/keymaps/skully/keymap.c index 47dee8e6d4..81e47811fa 100644 --- a/keyboards/clueboard/keymaps/skully/keymap.c +++ b/keyboards/clueboard/keymaps/skully/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // Helpful defines -#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) #define _______ KC_TRNS // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -16,7 +15,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ [_BL] = KEYMAP( - F(0), 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_GRV, KC_BSPC, KC_PGUP, \ + 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_GRV, KC_BSPC, 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_PGDN, \ KC_LCTL, 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, \ MO(_FL), KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ @@ -40,47 +39,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD,RGB_SAD,RGB_HUI), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/smt/keymap.c b/keyboards/clueboard/keymaps/smt/keymap.c index f097afaa8d..6797faaa3f 100644 --- a/keyboards/clueboard/keymaps/smt/keymap.c +++ b/keyboards/clueboard/keymaps/smt/keymap.c @@ -19,7 +19,6 @@ enum planck_keycodes { // Helpful defines #define _______ KC_TRNS #define XXXXXXX KC_NO -#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl @@ -42,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `------------------------------------------------------------------' */ [_QWERTY] = KEYMAP( - F(0), 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_PGUP, \ + 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_BSLS, KC_GRV, KC_PGUP, \ 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_BSPC, KC_PGDN, \ CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \ KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, MO(_FL), KC_UP, \ @@ -62,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `------------------------------------------------------------------' */ [_COLEMAK] = KEYMAP( - F(0), 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_PGUP, \ + 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_BSLS, KC_GRV, KC_PGUP, \ 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_BSPC, KC_PGDN, \ CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXXX, KC_ENT, \ KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, MO(_FL), KC_UP, \ @@ -82,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `------------------------------------------------------------------' */ [_DVORAK] = KEYMAP( - F(0), 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_BSLS, KC_GRV, KC_PGUP, \ + KC_GESC, 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_BSLS, KC_GRV, KC_PGUP, \ 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_BSPC, KC_PGDN, \ CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT, \ KC_LSFT, XXXXXXX, KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, MO(_FL), KC_UP, \ @@ -107,50 +106,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} - void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); @@ -178,4 +133,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/clueboard/keymaps/unix_optimized/keymap.c b/keyboards/clueboard/keymaps/unix_optimized/keymap.c index 7c1359954b..0de247ca0c 100644 --- a/keyboards/clueboard/keymaps/unix_optimized/keymap.c +++ b/keyboards/clueboard/keymaps/unix_optimized/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // Helpful defines -#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) #define _______ KC_TRNS // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -16,7 +15,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ [_BL] = KEYMAP( - F(0), 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_GRV, KC_BSPC, KC_PGUP, \ + 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_GRV, KC_BSPC, 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_PGDN, \ KC_LCTL, 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_RO, KC_RSFT, KC_UP, \ @@ -40,47 +39,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ _______, _______, _______,_______, RGB_MOD,RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD,RGB_HUI), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/win_optimized/keymap.c b/keyboards/clueboard/keymaps/win_optimized/keymap.c index c5553ff1fb..ad02fd59f2 100644 --- a/keyboards/clueboard/keymaps/win_optimized/keymap.c +++ b/keyboards/clueboard/keymaps/win_optimized/keymap.c @@ -1,7 +1,6 @@ #include "clueboard.h" // Helpful defines -#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) #define _______ KC_TRNS // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -16,7 +15,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ [_BL] = KEYMAP( - F(0), 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_GRV, KC_BSPC, KC_INS, \ + 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_GRV, KC_BSPC, KC_INS, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_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_RO, KC_RSFT, KC_UP, \ @@ -40,47 +39,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \ _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; - -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/clueboard/keymaps/xyverz/keymap.c b/keyboards/clueboard/keymaps/xyverz/keymap.c index 4539119731..540cd79833 100644 --- a/keyboards/clueboard/keymaps/xyverz/keymap.c +++ b/keyboards/clueboard/keymaps/xyverz/keymap.c @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `----------------------------------------------------------------------------------' */ [_BL] = KEYMAP( - F(0), 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_GRV, KC_BSPC, KC_PGUP, \ + KC_GESC, 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_GRV, KC_BSPC, KC_PGUP, \ KC_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, KC_PGDN, \ LT(_FL, KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_NUHS, KC_ENT, \ KC_LSFT, KC_RO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH, KC_RSFT, KC_UP, \ @@ -76,36 +76,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI), }; -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/clueboard/readme.md b/keyboards/clueboard/readme.md index 4a76e2908c..95b69befcf 100644 --- a/keyboards/clueboard/readme.md +++ b/keyboards/clueboard/readme.md @@ -1,97 +1,17 @@ -Clueboard keyboard firmware -====================== +# Clueboard 66% -DIY/Assembled compact 66% keyboard by [Clueboard](http://clueboard.co). +![Clueboard](https://static1.squarespace.com/static/55c13bdee4b099be5dcb82eb/t/5867eeaad2b857fd0d196f4b/1494021396651/IMGP4201.jpg?format=1500w) -For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md). +A fully customizable 66% keyboard. -## First Time Setup +* Keyboard Maintainer: [Zach White](https://github.com/skullydazed) +* Hardware Supported: Clueboard 66% PCB + * rev1 (1.0) + * rev2 (2.0, 2.0.1, 2.1, 2.5, 2.5.1, 2.6) +* Hardware Availability: [clueboard.co](https://clueboard.co/) -Download or clone the whole firmware and navigate to the keyboards/clueboard directory. Once your dev env is setup, you'll be able to generate the default .hex: +Make example for this keyboard (after setting up your build environment): -``` -$ make -``` + make cluepad-default -You will see a lot of output and if everything worked correctly you will see something similar to this: - -``` -Size after: - text data bss dec hex filename - 0 19992 0 19992 4e18 clueboard_rev2_default.hex -``` - -At this point you can press RESET on your Clueboard and flash your keyboard with this command: - -``` -$ make dfu -``` - -If you would like to use one of the alternative keymaps, or create your own, see below. - -## Clueboard 1.0 - -If you have a first generation Clueboard (one with a black PCB) you will need to use the revision 1 code. To do so add `rev1` to your make command, like this: - -``` -$ make rev1 -``` - -And when flashing your keyboard: - -``` -$ make rev1-dfu -``` - -If you are flashing an alternative layout to your rev1, include both `rev1` and `` in your command, for example when flashing max: - -``` -$ make rev1-max-dfu -``` - -## Alternate Keymaps - -There are many alternative and user-contributed layouts available in the [keymaps/](keymaps/) directory. To compile and flash an alternative you will want to add `` to your command: - -``` -$ make skully -``` - -And when flashing your keyboard, put `` between "make" and "dfu": - -``` -$ make skully-dfu -``` - -### Notable Layouts - -These layouts are notable for one reason or another. If you are looking for ideas or inspiration you should look at these first: - -* [keymaps/default](keymaps/default) - The default Clueboard layout -* [keymaps/max](keymaps/max) - A maximised layout that makes use of every key and feature of the Clueboard 2.0 PCB. -* [keymaps/skully](keymaps/skully) - The layout that @skullydazed uses on his own Clueboards. - -## Create Your Own Keymap - -There are a lot of possibilities when creating your own keymap, and the primary documentation for doing that is [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md. As a way to get started, here is the procedure I recommend: - -* Copy `[keymaps/default](keymaps/default/)` to `keymaps/`. -* Compile the firmware (`$ make `) -* Flash the firmware (`$ make -dfu`) -* Make sure everything works like the default keyboard -* Modify `keymaps//readme.md` to tell others about your layout. -* Modify `keymaps//keymap.c` to reflect your desired layout. -* Compile your new custom firmware (`$ make `) -** If you have warnings you may flash without fixing them, but something may not work right. -** If you have any errors you must fix them before continuing. -* Flash the firmware (`$ make -dfu`) - -## Share Your Keymap - -Got your layout dialed in? Please share it with the world so we can benefit from your work! Simply submit a pull request with your layout and we'll include it in the official repository. Please use the following guidelines when putting together your pull request: - -* Include a readme.md that states what your primary keyboard use is, how your layout differs from the default, and highlights anything you think makes your layout particularly great. -* If your layout requires certain features (EG, RGB underlight or backlighting) ensure you have a Makefile and config.h that reflects that -* If your layout requires special hardware to be added, please describe that in the readme.md - -TODO: Write up or link quick how-to on creating and submitting a PR. (Pull requests accepted. :) +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/clueboard/rules.mk b/keyboards/clueboard/rules.mk index f852a01840..74bfcfe745 100644 --- a/keyboards/clueboard/rules.mk +++ b/keyboards/clueboard/rules.mk @@ -92,7 +92,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/cluecard/readme.md b/keyboards/cluecard/readme.md index be13fc0171..d9daa0b2b5 100644 --- a/keyboards/cluecard/readme.md +++ b/keyboards/cluecard/readme.md @@ -1,28 +1,13 @@ -cluecard keyboard firmware -====================== +# Cluecard -## Quantum MK Firmware +A simple QMK dev kit. -For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). +* Keyboard Maintainer: [Zach White](https://github.com/skullydazed) +* Hardware Supported: Cluecard 1.0 +* Hardware Availability: Special gift from [skullydazed](https://github.com/skullydazed) -## Building +Make example for this keyboard (after setting up your build environment): -Download or clone the whole firmware and navigate to the keyboards/cluecard folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + make cluecard-default -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default - -To build with the default keymap, simply run `make default`. - -### Other Keymaps - -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` - -Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/cluepad/readme.md b/keyboards/cluepad/readme.md index 8450340f27..f79d6b5594 100644 --- a/keyboards/cluepad/readme.md +++ b/keyboards/cluepad/readme.md @@ -1,4 +1,15 @@ -Cluepad number pad firmware -====================== +# Cluepad -TODO: to be updated. +![Cluepad](https://static1.squarespace.com/static/55c13bdee4b099be5dcb82eb/5842fbdce3df28eae5ec557e/5844fb2cb8a79bbdfd63bad1/1498501250178/IMGP3931.jpg?format=750w) + +A basic 17 key numpad PCB. + +* Keyboard Maintainer: [Zach White](https://github.com/skullydazed) +* Hardware Supported: Cluepad PCB 1.0 +* Hardware Availability: [clueboard.co](https://clueboard.co/) + +Make example for this keyboard (after setting up your build environment): + + make cluepad-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/converter/usb_usb/Makefile b/keyboards/converter/usb_usb/Makefile new file mode 100644 index 0000000000..bd09e5885d --- /dev/null +++ b/keyboards/converter/usb_usb/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif diff --git a/keyboards/converter/usb_usb/README.md b/keyboards/converter/usb_usb/README.md new file mode 100644 index 0000000000..274e11956e --- /dev/null +++ b/keyboards/converter/usb_usb/README.md @@ -0,0 +1,84 @@ +USB to USB keyboard protocol converter +====================================== +Original code from Hasu's TMK firmware. Ported to QMK by Coloneljesus. + +This port has been tested only on the Pro Micro variant described in the next section. + +See for detail and discussion. +https://geekhack.org/index.php?topic=69169.0 + + +Hardware requirement +-------------------- +There are two options. + +### TMK USB-USB Converter +You can buy a fully assembled converter from me here. + + https://geekhack.org/index.php?topic=69169.0 + +### Arduino Leonardo + Circuit@Home USB Host Shield 2.0 +Buying Arduino Leonardo and USB Host Shield 2.0(from Circuit@home) will be better, you won't need even soldering iron. + + http://arduino.cc/en/Main/ArduinoBoardLeonardo + https://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-2-0-for-arduino-assembled/ + +Other compatible boards like Arduino's Shield will also work well but I think Sparkfun's needs to be modified. + + http://arduino.cc/en/Main/ArduinoUSBHostShield + https://www.sparkfun.com/products/9947 + +Also Pro Micro 3.3V(not Mini) or Teensy with mini host shield will work with some fixes on signal/power routing. + + https://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-for-arduino-pro-mini + https://www.sparkfun.com/products/12587 + https://www.pjrc.com/teensy/td_libs_USBHostShield.html + + + +Build firmware +-------------- +Follow normal QMK build instructions to get a binary file. Flashing depends on you hardware. + +Limitation +---------- +Only supports 'HID Boot protocol'. + +Note that the converter can host only USB "boot protocol" keyboard(6KRO), not NKRO, it is possible to support NKRO keyboard but you will need to write HID report parser for that. Every NKRO keyboard can have different HID report and it is difficult to support all kind of NKRO keyboards in the market. + + + +Keymap editor +------------- +You can editor keymap and download firmware with web brwoser. + +- http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?usb_usb + + + +Update +------ +2014/12/11 Added Hub support(confirmed with HHKB pro2) +2016/09/10 Unimap editor support +2016/10/18 Fix LED state at startup +2017/08/16 Port to QMK + + +Resource +-------- +USB Host Sheild 2.0 + https://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-2-0-for-arduino + https://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-for-arduino-pro-mini +USB Host Sheild 2.0 source + https://github.com/felis/USB_Host_Shield_2.0 +Arduino USB Host Shield(with bootst converter) + http://arduino.cc/en/Main/ArduinoUSBHostShield +Arduino source + https://github.com/arduino/Arduino/hardware/arduino/{cores,variants} +Initial release of TMK USB-USB converter + https://geekhack.org/index.php?topic=33057.msg653549#msg653549 + http://deskthority.net/workshop-f7/is-remapping-a-usb-keyboard-using-teensy-possible-t2841-30.html#p74854 +Arduino-based hardware keyboard remapper - Colemak forum + http://forum.colemak.com/viewtopic.php?id=1561 +Teensy + Host Shield + http://www.pjrc.com/teensy/td_libs_USBHostShield.html diff --git a/keyboards/converter/usb_usb/config.h b/keyboards/converter/usb_usb/config.h new file mode 100644 index 0000000000..591d80f32d --- /dev/null +++ b/keyboards/converter/usb_usb/config.h @@ -0,0 +1,63 @@ +/* +Copyright 2017 Balz Guenat + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +// do not #include "config_common.h" because the pin names conflict with the USB HID code. +// CUSTOM_MATRIX is defined it that file, though, and we need it, so we define it ourselves. +// It's a hack, yeah... +#define CUSTOM_MATRIX 2 + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x005B +#define DEVICE_VER 0x0001 +#define MANUFACTURER QMK +#define PRODUCT QMK USB-USB Converter +#define DESCRIPTION USB to USB Keyboard Converter with QMK + + +/* size of virtual matrix */ +#define MATRIX_ROWS 16 +#define MATRIX_COLS 16 + +/* matrix scanning is done in custom_matrix.cpp */ +#define DIODE_DIRECTION CUSTOM_MATRIX + +/* key combination for command */ +#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/converter/usb_usb/custom_matrix.cpp b/keyboards/converter/usb_usb/custom_matrix.cpp new file mode 100644 index 0000000000..93d13edf0b --- /dev/null +++ b/keyboards/converter/usb_usb/custom_matrix.cpp @@ -0,0 +1,238 @@ +/* +Copyright 2016 Jun Wako + +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 . +*/ + +#include +#include + +// USB HID host +#include "Usb.h" +#include "usbhub.h" +#include "hid.h" +#include "hidboot.h" +#include "parser.h" + +#include "keycode.h" +#include "util.h" +#include "print.h" +#include "debug.h" +#include "timer.h" +#include "matrix.h" +#include "led.h" +#include "host.h" +#include "keyboard.h" + + +/* KEY CODE to Matrix + * + * HID keycode(1 byte): + * Higher 5 bits indicates ROW and lower 3 bits COL. + * + * 7 6 5 4 3 2 1 0 + * +---------------+ + * | ROW | COL | + * +---------------+ + * + * Matrix space(16 * 16): + * r\c0123456789ABCDEF + * 0 +----------------+ + * : | | + * : | | + * 16 +----------------+ + */ +#define ROW_MASK 0xF0 +#define COL_MASK 0x0F +#define CODE(row, col) (((row) << 4) | (col)) +#define ROW(code) (((code) & ROW_MASK) >> 4) +#define COL(code) ((code) & COL_MASK) +#define ROW_BITS(code) (1 << COL(code)) + + +// Integrated key state of all keyboards +static report_keyboard_t keyboard_report; + +static bool matrix_is_mod = false; + +/* + * USB Host Shield HID keyboards + * This supports two cascaded hubs and four keyboards + */ +USB usb_host; +USBHub hub1(&usb_host); +USBHub hub2(&usb_host); +HIDBoot kbd1(&usb_host); +HIDBoot kbd2(&usb_host); +HIDBoot kbd3(&usb_host); +HIDBoot kbd4(&usb_host); +KBDReportParser kbd_parser1; +KBDReportParser kbd_parser2; +KBDReportParser kbd_parser3; +KBDReportParser kbd_parser4; + + +extern "C" +{ + uint8_t matrix_rows(void) { return MATRIX_ROWS; } + uint8_t matrix_cols(void) { return MATRIX_COLS; } + bool matrix_has_ghost(void) { return false; } + void matrix_init(void) { + // USB Host Shield setup + usb_host.Init(); + kbd1.SetReportParser(0, (HIDReportParser*)&kbd_parser1); + kbd2.SetReportParser(0, (HIDReportParser*)&kbd_parser2); + kbd3.SetReportParser(0, (HIDReportParser*)&kbd_parser3); + kbd4.SetReportParser(0, (HIDReportParser*)&kbd_parser4); + } + + static void or_report(report_keyboard_t report) { + // integrate reports into keyboard_report + keyboard_report.mods |= report.mods; + for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { + if (IS_ANY(report.keys[i])) { + for (uint8_t j = 0; j < KEYBOARD_REPORT_KEYS; j++) { + if (! keyboard_report.keys[j]) { + keyboard_report.keys[j] = report.keys[i]; + break; + } + } + } + } + } + + uint8_t matrix_scan(void) { + static uint16_t last_time_stamp1 = 0; + static uint16_t last_time_stamp2 = 0; + static uint16_t last_time_stamp3 = 0; + static uint16_t last_time_stamp4 = 0; + + // check report came from keyboards + if (kbd_parser1.time_stamp != last_time_stamp1 || + kbd_parser2.time_stamp != last_time_stamp2 || + kbd_parser3.time_stamp != last_time_stamp3 || + kbd_parser4.time_stamp != last_time_stamp4) { + + last_time_stamp1 = kbd_parser1.time_stamp; + last_time_stamp2 = kbd_parser2.time_stamp; + last_time_stamp3 = kbd_parser3.time_stamp; + last_time_stamp4 = kbd_parser4.time_stamp; + + // clear and integrate all reports + keyboard_report = {}; + or_report(kbd_parser1.report); + or_report(kbd_parser2.report); + or_report(kbd_parser3.report); + or_report(kbd_parser4.report); + + matrix_is_mod = true; + + dprintf("state: %02X %02X", keyboard_report.mods, keyboard_report.reserved); + for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { + dprintf(" %02X", keyboard_report.keys[i]); + } + dprint("\r\n"); + } else { + matrix_is_mod = false; + } + + uint16_t timer; + timer = timer_read(); + usb_host.Task(); + timer = timer_elapsed(timer); + if (timer > 100) { + dprintf("host.Task: %d\n", timer); + } + + static uint8_t usb_state = 0; + if (usb_state != usb_host.getUsbTaskState()) { + usb_state = usb_host.getUsbTaskState(); + dprintf("usb_state: %02X\n", usb_state); + + // restore LED state when keyboard comes up + if (usb_state == USB_STATE_RUNNING) { + dprintf("speed: %s\n", usb_host.getVbusState()==FSHOST ? "full" : "low"); + keyboard_set_leds(host_keyboard_leds()); + } + } + return 1; + } + + bool matrix_is_modified(void) { + return matrix_is_mod; + } + + bool matrix_is_on(uint8_t row, uint8_t col) { + uint8_t code = CODE(row, col); + + if (IS_MOD(code)) { + if (keyboard_report.mods & ROW_BITS(code)) { + return true; + } + } + for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { + if (keyboard_report.keys[i] == code) { + return true; + } + } + return false; + } + + matrix_row_t matrix_get_row(uint8_t row) { + uint16_t row_bits = 0; + + if (IS_MOD(CODE(row, 0)) && keyboard_report.mods) { + row_bits |= keyboard_report.mods; + } + + for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { + if (IS_ANY(keyboard_report.keys[i])) { + if (row == ROW(keyboard_report.keys[i])) { + row_bits |= ROW_BITS(keyboard_report.keys[i]); + } + } + } + return row_bits; + } + + uint8_t matrix_key_count(void) { + uint8_t count = 0; + + count += bitpop(keyboard_report.mods); + for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { + if (IS_ANY(keyboard_report.keys[i])) { + count++; + } + } + return count; + } + + void matrix_print(void) { + print("\nr/c 0123456789ABCDEF\n"); + for (uint8_t row = 0; row < matrix_rows(); row++) { + xprintf("%02d: ", row); + print_bin_reverse16(matrix_get_row(row)); + print("\n"); + } + } + + void led_set(uint8_t usb_led) + { + kbd1.SetReport(0, 0, 2, 0, 1, &usb_led); + kbd2.SetReport(0, 0, 2, 0, 1, &usb_led); + kbd3.SetReport(0, 0, 2, 0, 1, &usb_led); + kbd4.SetReport(0, 0, 2, 0, 1, &usb_led); + } + +}; diff --git a/keyboards/converter/usb_usb/keymap.c b/keyboards/converter/usb_usb/keymap.c new file mode 100644 index 0000000000..16f2a28092 --- /dev/null +++ b/keyboards/converter/usb_usb/keymap.c @@ -0,0 +1,288 @@ +/* +Copyright 2017 Balz Guenat + +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 . +*/ + +#include "keymap_common.h" + + +const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + /* 0: plain Qwerty without layer switching + * ,---------------. ,---------------. ,---------------. + * |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24| + * ,---. |---------------| |---------------| |---------------| ,-----------. ,---------------. ,-------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|Pwr| | Help | + * `---' `---------------' `---------------' `---------------' `-----------' `---------------' `-------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. ,-------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| |Stp|Agn| + * |-----------------------------------------------------------| |-----------| |---------------| |-------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| |Mnu|Und| + * |-----------------------------------------------------------| `-----------' |---------------| |-------| + * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| #|Retn| | 4| 5| 6|KP,| |Sel|Cpy| + * |-----------------------------------------------------------| ,---. |---------------| |-------| + * |Shft| <| Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|KP=| |Exe|Pst| + * |-----------------------------------------------------------| ,-----------. |---------------| |-------| + * |Ctl|Gui|Alt|MHEN|HNJ| Space |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|Ent| |Fnd|Cut| + * `-----------------------------------------------------------' `-----------' `---------------' `-------' + */ + // KEYMAP_ALL( + // F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + // ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + // GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + // TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + // CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + // LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + // LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + // ), + KEYMAP_ALL( + F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + FN0, A, S, D, F, G, H, J, K, L, SCLN,QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + ), + KEYMAP_ALL( + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS, + GRV, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + CAPS,MPRV,VOLU,MNXT,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + TRNS,MUTE,VOLD,MPLY,TRNS,TRNS,LEFT,DOWN,UP, RGHT,TRNS,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS, TRNS,TRNS, TRNS,TRNS + ), +}; + +// const action_t fn_actions[] PROGMEM = {}; + +const action_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1), +}; + + + +/* + * Keymap samples + */ +#if 0 + /* ANSI layout + * ,---. ,---------------. ,---------------. ,---------------. ,-----------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| + * `---' `---------------' `---------------' `---------------' `-----------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Bsp| |Ins|Hom|PgU| |NmL| /| *| -| + * |-----------------------------------------------------------| |-----------| |---------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| + * |-----------------------------------------------------------| `-----------' |-----------| | + * |CapsL | A| S| D| F| G| H| J| K| L| ;| '| Return| | 4| 5| 6| | + * |-----------------------------------------------------------| ,---. |---------------| + * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| | + * |-----------------------------------------------------------| ,-----------. |-----------| | + * |Ctl|Gui|Alt| Space |Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0| .|Ent| + * `-----------------------------------------------------------' `-----------' `---------------' + */ + KEYMAP( + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, P7, P8, P9, + LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6, PPLS, + LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3, + LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT + ), + + /* ISO layout + * ,---. ,---------------. ,---------------. ,---------------. ,-----------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| + * `---' `---------------' `---------------' `---------------' `-----------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| ^| Bsp| |Ins|Hom|PgU| |NmL| /| *| -| + * |-----------------------------------------------------------| |-----------| |---------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| Retn| |Del|End|PgD| | 7| 8| 9| +| + * |------------------------------------------------------` | `-----------' |-----------| | + * |CapsL | A| S| D| F| G| H| J| K| L| ;| '| #| | | 4| 5| 6| | + * |-----------------------------------------------------------| ,---. |---------------| + * |Shft|\ | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3|Ent| + * |-----------------------------------------------------------| ,-----------. |-----------| | + * |Ctl|Gui|Alt| Space |HNK|KNA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0| .| | + * `-----------------------------------------------------------' `-----------' `---------------' + */ + KEYMAP_ISO( + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,ENT, DEL, END, PGDN, P7, P8, P9, PPLS, + LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,NUHS, P4, P5, P6, + LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3, PENT, + LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT + ), + + /* JIS layout + * ,---. ,---------------. ,---------------. ,---------------. ,-----------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| + * `---' `---------------' `---------------' `---------------' `-----------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| ^|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| + * |-----------------------------------------------------------| |-----------| |---------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| @| [| Retn| |Del|End|PgD| | 7| 8| 9| +| + * |------------------------------------------------------` | `-----------' |-----------| | + * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| ]| | | 4| 5| 6| | + * |-----------------------------------------------------------| ,---. |---------------| + * |Shft | Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|Ent| + * |-----------------------------------------------------------| ,-----------. |-----------| | + * |Ctl|Gui|Alt|MHEN| Space |HENK|KNA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0| .| | + * `-----------------------------------------------------------' `-----------' `---------------' + */ + KEYMAP_JIS( + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JPY, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, ENT, DEL, END, PGDN, P7, P8, P9, PPLS, + LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,NUHS, P4, P5, P6, + LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PENT, + LCTL,LGUI,LALT,MHEN, SPC, HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT + ), + + /* Colemak http://colemak.com + * ,-----------------------------------------------------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| + * |-----------------------------------------------------------| + * |Tab | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \| + * |-----------------------------------------------------------| + * |BackSp| A| R| S| T| D| H| N| E| I| O| '|Return | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| K| M| ,| ,| /|Shift | + * |-----------------------------------------------------------| + * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl| + * `----------------------------------------------------------' + */ + KEYMAP_ALL( + F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + TAB, Q, W, F, P, G, J, L, U, Y, SCLN,LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + BSPC,A, R, S, T, D, H, N, E, I, O, QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + LSFT,NUBS,Z, X, C, V, B, K, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + ), + + /* Dvorak http://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard + * ,-----------------------------------------------------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]|Backspa| + * |-----------------------------------------------------------| + * |Tab | '| ,| .| P| Y| F| G| C| R| L| /| =| \| + * |-----------------------------------------------------------| + * |BackSp| A| O| E| U| I| D| H| T| N| S| -|Return | + * |-----------------------------------------------------------| + * |Shift | ;| Q| J| K| X| B| M| Wl V| Z|Shift | + * |-----------------------------------------------------------| + * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl| + * `-----------------------------------------------------------' + */ + KEYMAP_ALL( + F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, LBRC,RBRC,JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + TAB, QUOT,COMM,DOT, P, Y, F, G, C, R, L, SLSH,EQL, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + CAPS,A, O, E, U, I, D, H, T, N, S, MINS, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + LSFT,NUBS,SCLN,Q, J, K, X, B, M, W, V, Z, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + ), + + /* Workman http://viralintrospection.wordpress.com/2010/09/06/a-different-philosophy-in-designing-keyboard-layouts/ + * ,-----------------------------------------------------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| + * |-----------------------------------------------------------| + * |Tab | Q| D| R| W| B| J| F| U| P| ;| [| ]| \| + * |-----------------------------------------------------------| + * |CapsLo| A| S| H| T| G| Y| N| E| O| I| '|Return | + * |-----------------------------------------------------------| + * |Shift | Z| X| M| C| V| K| L| ,| ,| /|Shift | + * |-----------------------------------------------------------| + * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl| + * `-----------------------------------------------------------' + */ + KEYMAP_ALL( + F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + TAB, Q, D, R, W, B, J, F, U, P, SCLN,LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + CAPS,A, S, H, T, G, Y, N, E, O, I, QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + LSFT,NUBS,Z, X, M, C, V, K, L, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + ), + + +/* + * SpaceFN layout + * http://geekhack.org/index.php?topic=51069.0 + */ +const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: plain Qwerty + * ,---------------. ,---------------. ,---------------. + * |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24| + * ,---. |---------------| |---------------| |---------------| ,-----------. ,---------------. ,-------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|Pwr| | Help | + * `---' `---------------' `---------------' `---------------' `-----------' `---------------' `-------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. ,-------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| |Stp|Agn| + * |-----------------------------------------------------------| |-----------| |---------------| |-------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| |Mnu|Und| + * |-----------------------------------------------------------| `-----------' |---------------| |-------| + * |LCtrl | A| S| D| F| G| H| J| K| L| ;| :| #|Retn| | 4| 5| 6|KP,| |Sel|Cpy| + * |-----------------------------------------------------------| ,---. |---------------| |-------| + * |Shft| <| Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|KP=| |Exe|Pst| + * |-----------------------------------------------------------| ,-----------. |---------------| |-------| + * |Ctl|Gui|Alt|MHEN|HNJ| Space |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|Ent| |Fnd|Cut| + * `-----------------------------------------------------------' `-----------' `---------------' `-------' + */ + [0] = KEYMAP_ALL( + F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + LCTL,LGUI,LALT,MHEN,HANJ, FN0, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + ), + + /* 1: SpaceFN + * ,-----------------------------------------------------------. + * |` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete | + * |-----------------------------------------------------------| + * |Caps | | |Esc| | | |Hom|Up |End|Psc|Slk|Pau|Ins | + * |-----------------------------------------------------------| + * | | | | | | |PgU|Lef|Dow|Rig| | | | + * |-----------------------------------------------------------| + * | | | | | |Spc|PgD|` |~ | |Men| | + * |-----------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------------' + */ + [1] = KEYMAP_ALL( + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS, + GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,DEL, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + CAPS,TRNS,TRNS,ESC, TRNS,TRNS,TRNS,HOME,UP, END, PSCR,SLCK,PAUS, INS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PGUP,LEFT,DOWN,RGHT,TRNS,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,SPC, PGDN,GRV, FN1, TRNS,APP, TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS, TRNS,TRNS, TRNS,TRNS + ), +}; + +const action_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_KEY(1, KC_SPACE), + [1] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // tilde +}; + +#endif diff --git a/keyboards/converter/usb_usb/keymaps/coloneljesus/Makefile b/keyboards/converter/usb_usb/keymaps/coloneljesus/Makefile new file mode 100644 index 0000000000..f5c0545059 --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/coloneljesus/Makefile @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../../Makefile +endif diff --git a/docs/keymap_config_h_example.h b/keyboards/converter/usb_usb/keymaps/coloneljesus/config.h similarity index 75% rename from docs/keymap_config_h_example.h rename to keyboards/converter/usb_usb/keymaps/coloneljesus/config.h index 8893d122e0..7fa3bf328e 100644 --- a/docs/keymap_config_h_example.h +++ b/keyboards/converter/usb_usb/keymaps/coloneljesus/config.h @@ -3,6 +3,4 @@ #include "../../config.h" -// place overrides here - #endif diff --git a/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c b/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c new file mode 100644 index 0000000000..0cc66fd53d --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c @@ -0,0 +1,307 @@ +/* +Copyright 2017 Balz Guenat + +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 . +*/ + +#include "usb_usb.h" + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + /* 0: plain Qwerty without layer switching + * ,---------------. ,---------------. ,---------------. + * |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24| + * ,---. |---------------| |---------------| |---------------| ,-----------. ,---------------. ,-------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|Pwr| | Help | + * `---' `---------------' `---------------' `---------------' `-----------' `---------------' `-------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. ,-------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| |Stp|Agn| + * |-----------------------------------------------------------| |-----------| |---------------| |-------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| |Mnu|Und| + * |-----------------------------------------------------------| `-----------' |---------------| |-------| + * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| #|Retn| | 4| 5| 6|KP,| |Sel|Cpy| + * |-----------------------------------------------------------| ,---. |---------------| |-------| + * |Shft| <| Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|KP=| |Exe|Pst| + * |-----------------------------------------------------------| ,-----------. |---------------| |-------| + * |Ctl|Gui|Alt|MHEN|HNJ| Space |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|Ent| |Fnd|Cut| + * `-----------------------------------------------------------' `-----------' `---------------' `-------' + */ + // KEYMAP_ALL( + // F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + // ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + // GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + // TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + // CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + // LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + // LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + // ), + KEYMAP_ALL( + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, + 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_VOLD, KC_VOLU, KC_MUTE, KC_PWR, KC_HELP, + 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_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_STOP, KC_AGIN, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_MENU, KC_UNDO, + 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_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PCMM, KC_SLCT, KC_COPY, + 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_RO, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PEQL, KC_EXEC, KC_PSTE, + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_HANJ, KC_SPC, KC_HAEN, KC_HENK, KC_KANA, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT, KC_FIND, KC_CUT + ), + KEYMAP_ALL( + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______,______,______,______, ______, + KC_GRV, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______,______,______,______, ______,______, + KC_CAPS, KC_MPRV, KC_VOLU, KC_MNXT, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______,______,______,______, ______,______, + ______, KC_MUTE, KC_VOLD, KC_MPLY, ______, ______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ______, ______, ______, ______, ______,______,______,______, ______,______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______,______, ______,______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, ______,______,______, ______, ______,______, ______,______ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch(id) { + default: + return MACRO_NONE; + } +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} + +/* + * Keymap samples + */ +#if 0 + /* ANSI layout + * ,---. ,---------------. ,---------------. ,---------------. ,-----------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| + * `---' `---------------' `---------------' `---------------' `-----------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Bsp| |Ins|Hom|PgU| |NmL| /| *| -| + * |-----------------------------------------------------------| |-----------| |---------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| + * |-----------------------------------------------------------| `-----------' |-----------| | + * |CapsL | A| S| D| F| G| H| J| K| L| ;| '| Return| | 4| 5| 6| | + * |-----------------------------------------------------------| ,---. |---------------| + * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| | + * |-----------------------------------------------------------| ,-----------. |-----------| | + * |Ctl|Gui|Alt| Space |Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0| .|Ent| + * `-----------------------------------------------------------' `-----------' `---------------' + */ + KEYMAP( + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, P7, P8, P9, + LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6, PPLS, + LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3, + LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT + ), + + /* ISO layout + * ,---. ,---------------. ,---------------. ,---------------. ,-----------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| + * `---' `---------------' `---------------' `---------------' `-----------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| ^| Bsp| |Ins|Hom|PgU| |NmL| /| *| -| + * |-----------------------------------------------------------| |-----------| |---------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| Retn| |Del|End|PgD| | 7| 8| 9| +| + * |------------------------------------------------------` | `-----------' |-----------| | + * |CapsL | A| S| D| F| G| H| J| K| L| ;| '| #| | | 4| 5| 6| | + * |-----------------------------------------------------------| ,---. |---------------| + * |Shft|\ | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3|Ent| + * |-----------------------------------------------------------| ,-----------. |-----------| | + * |Ctl|Gui|Alt| Space |HNK|KNA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0| .| | + * `-----------------------------------------------------------' `-----------' `---------------' + */ + KEYMAP_ISO( + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,ENT, DEL, END, PGDN, P7, P8, P9, PPLS, + LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,NUHS, P4, P5, P6, + LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3, PENT, + LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT + ), + + /* JIS layout + * ,---. ,---------------. ,---------------. ,---------------. ,-----------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| + * `---' `---------------' `---------------' `---------------' `-----------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| ^|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| + * |-----------------------------------------------------------| |-----------| |---------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| @| [| Retn| |Del|End|PgD| | 7| 8| 9| +| + * |------------------------------------------------------` | `-----------' |-----------| | + * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| ]| | | 4| 5| 6| | + * |-----------------------------------------------------------| ,---. |---------------| + * |Shft | Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|Ent| + * |-----------------------------------------------------------| ,-----------. |-----------| | + * |Ctl|Gui|Alt|MHEN| Space |HENK|KNA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0| .| | + * `-----------------------------------------------------------' `-----------' `---------------' + */ + KEYMAP_JIS( + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JPY, BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, ENT, DEL, END, PGDN, P7, P8, P9, PPLS, + LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,NUHS, P4, P5, P6, + LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PENT, + LCTL,LGUI,LALT,MHEN, SPC, HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT + ), + + /* Colemak http://colemak.com + * ,-----------------------------------------------------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| + * |-----------------------------------------------------------| + * |Tab | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \| + * |-----------------------------------------------------------| + * |BackSp| A| R| S| T| D| H| N| E| I| O| '|Return | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| K| M| ,| ,| /|Shift | + * |-----------------------------------------------------------| + * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl| + * `----------------------------------------------------------' + */ + KEYMAP_ALL( + F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + TAB, Q, W, F, P, G, J, L, U, Y, SCLN,LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + BSPC,A, R, S, T, D, H, N, E, I, O, QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + LSFT,NUBS,Z, X, C, V, B, K, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + ), + + /* Dvorak http://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard + * ,-----------------------------------------------------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]|Backspa| + * |-----------------------------------------------------------| + * |Tab | '| ,| .| P| Y| F| G| C| R| L| /| =| \| + * |-----------------------------------------------------------| + * |BackSp| A| O| E| U| I| D| H| T| N| S| -|Return | + * |-----------------------------------------------------------| + * |Shift | ;| Q| J| K| X| B| M| Wl V| Z|Shift | + * |-----------------------------------------------------------| + * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl| + * `-----------------------------------------------------------' + */ + KEYMAP_ALL( + F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, LBRC,RBRC,JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + TAB, QUOT,COMM,DOT, P, Y, F, G, C, R, L, SLSH,EQL, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + CAPS,A, O, E, U, I, D, H, T, N, S, MINS, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + LSFT,NUBS,SCLN,Q, J, K, X, B, M, W, V, Z, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + ), + + /* Workman http://viralintrospection.wordpress.com/2010/09/06/a-different-philosophy-in-designing-keyboard-layouts/ + * ,-----------------------------------------------------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| + * |-----------------------------------------------------------| + * |Tab | Q| D| R| W| B| J| F| U| P| ;| [| ]| \| + * |-----------------------------------------------------------| + * |CapsLo| A| S| H| T| G| Y| N| E| O| I| '|Return | + * |-----------------------------------------------------------| + * |Shift | Z| X| M| C| V| K| L| ,| ,| /|Shift | + * |-----------------------------------------------------------| + * |Ctrl |Gui |Alt | Space |Alt |Gui |Menu|Ctrl| + * `-----------------------------------------------------------' + */ + KEYMAP_ALL( + F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + TAB, Q, D, R, W, B, J, F, U, P, SCLN,LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + CAPS,A, S, H, T, G, Y, N, E, O, I, QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + LSFT,NUBS,Z, X, M, C, V, K, L, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + LCTL,LGUI,LALT,MHEN,HANJ, SPC, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + ), + + +/* + * SpaceFN layout + * http://geekhack.org/index.php?topic=51069.0 + */ +const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: plain Qwerty + * ,---------------. ,---------------. ,---------------. + * |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24| + * ,---. |---------------| |---------------| |---------------| ,-----------. ,---------------. ,-------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|Pwr| | Help | + * `---' `---------------' `---------------' `---------------' `-----------' `---------------' `-------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. ,-------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| |Stp|Agn| + * |-----------------------------------------------------------| |-----------| |---------------| |-------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| |Mnu|Und| + * |-----------------------------------------------------------| `-----------' |---------------| |-------| + * |LCtrl | A| S| D| F| G| H| J| K| L| ;| :| #|Retn| | 4| 5| 6|KP,| |Sel|Cpy| + * |-----------------------------------------------------------| ,---. |---------------| |-------| + * |Shft| <| Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|KP=| |Exe|Pst| + * |-----------------------------------------------------------| ,-----------. |---------------| |-------| + * |Ctl|Gui|Alt|MHEN|HNJ| Space |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|Ent| |Fnd|Cut| + * `-----------------------------------------------------------' `-----------' `---------------' `-------' + */ + [0] = KEYMAP_ALL( + F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, VOLD,VOLU,MUTE,PWR, HELP, + ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, STOP,AGIN, + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, MENU,UNDO, + LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, NUHS,ENT, P4, P5, P6, PCMM, SLCT,COPY, + LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RO, RSFT, UP, P1, P2, P3, PEQL, EXEC,PSTE, + LCTL,LGUI,LALT,MHEN,HANJ, FN0, HAEN,HENK,KANA,RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT, P0, PDOT,PENT, FIND,CUT + ), + + /* 1: SpaceFN + * ,-----------------------------------------------------------. + * |` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete | + * |-----------------------------------------------------------| + * |Caps | | |Esc| | | |Hom|Up |End|Psc|Slk|Pau|Ins | + * |-----------------------------------------------------------| + * | | | | | | |PgU|Lef|Dow|Rig| | | | + * |-----------------------------------------------------------| + * | | | | | |Spc|PgD|` |~ | |Men| | + * |-----------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------------' + */ + [1] = KEYMAP_ALL( + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS, + GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,DEL, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + CAPS,TRNS,TRNS,ESC, TRNS,TRNS,TRNS,HOME,UP, END, PSCR,SLCK,PAUS, INS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PGUP,LEFT,DOWN,RGHT,TRNS,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,SPC, PGDN,GRV, FN1, TRNS,APP, TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS, TRNS,TRNS, TRNS,TRNS + ), +}; + +const action_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_KEY(1, KC_SPACE), + [1] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // tilde +}; + +#endif diff --git a/keyboards/converter/usb_usb/keymaps/default/Makefile b/keyboards/converter/usb_usb/keymaps/default/Makefile new file mode 100644 index 0000000000..f5c0545059 --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/default/Makefile @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../../Makefile +endif diff --git a/keyboards/converter/usb_usb/keymaps/default/config.h b/keyboards/converter/usb_usb/keymaps/default/config.h new file mode 100644 index 0000000000..7fa3bf328e --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/default/config.h @@ -0,0 +1,6 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#endif diff --git a/keyboards/converter/usb_usb/keymaps/default/keymap.c b/keyboards/converter/usb_usb/keymaps/default/keymap.c new file mode 100644 index 0000000000..9817a607d3 --- /dev/null +++ b/keyboards/converter/usb_usb/keymaps/default/keymap.c @@ -0,0 +1,85 @@ +/* +Copyright 2017 Balz Guenat + +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 . +*/ + +#include "usb_usb.h" + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + /* 0: plain Qwerty without layer switching + * ,---------------. ,---------------. ,---------------. + * |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24| + * ,---. |---------------| |---------------| |---------------| ,-----------. ,---------------. ,-------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|Pwr| | Help | + * `---' `---------------' `---------------' `---------------' `-----------' `---------------' `-------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. ,-------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| |Stp|Agn| + * |-----------------------------------------------------------| |-----------| |---------------| |-------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| |Mnu|Und| + * |-----------------------------------------------------------| `-----------' |---------------| |-------| + * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| #|Retn| | 4| 5| 6|KP,| |Sel|Cpy| + * |-----------------------------------------------------------| ,---. |---------------| |-------| + * |Shft| <| Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|KP=| |Exe|Pst| + * |-----------------------------------------------------------| ,-----------. |---------------| |-------| + * |Ctl|Gui|Alt|MHEN|HNJ| Space |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|Ent| |Fnd|Cut| + * `-----------------------------------------------------------' `-----------' `---------------' `-------' + */ + [0] = KEYMAP_ALL( + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, + 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_VOLD, KC_VOLU, KC_MUTE, KC_PWR, KC_HELP, + 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_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_STOP, KC_AGIN, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_MENU, KC_UNDO, + 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_P4, KC_P5, KC_P6, KC_PCMM, KC_SLCT, KC_COPY, + 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_RO, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PEQL, KC_EXEC, KC_PSTE, + KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_HANJ, KC_SPC, KC_HAEN, KC_HENK, KC_KANA, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT, KC_FIND, KC_CUT + ), + [1] = KEYMAP_ALL( + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______,______,______,______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______,______,______,______, ______,______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______,______,______,______, ______,______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______,______, ______,______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______,______, ______,______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______,______, ______, ______,______, ______,______ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch(id) { + default: + return MACRO_NONE; + } +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/converter/usb_usb/main.c b/keyboards/converter/usb_usb/main.c new file mode 100644 index 0000000000..76e88922cb --- /dev/null +++ b/keyboards/converter/usb_usb/main.c @@ -0,0 +1,102 @@ +#include +#include +#include +#include + +// LUFA +#include "lufa.h" + +#include "sendchar.h" +#include "debug.h" +#include "keyboard.h" +#include "led.h" + + +/* LED ping configuration */ +#define TMK_LED +//#define LEONARDO_LED +#if defined(TMK_LED) +// For TMK converter and Teensy +#define LED_TX_INIT (DDRD |= (1<<6)) +#define LED_TX_ON (PORTD |= (1<<6)) +#define LED_TX_OFF (PORTD &= ~(1<<6)) +#define LED_TX_TOGGLE (PORTD ^= (1<<6)) +#elif defined(LEONARDO_LED) +// For Leonardo(TX LED) +#define LED_TX_INIT (DDRD |= (1<<5)) +#define LED_TX_ON (PORTD &= ~(1<<5)) +#define LED_TX_OFF (PORTD |= (1<<5)) +#define LED_TX_TOGGLE (PORTD ^= (1<<5)) +#else +#define LED_TX_INIT +#define LED_TX_ON +#define LED_TX_OFF +#define LED_TX_TOGGLE +#endif + + +static void LUFA_setup(void) +{ + /* Disable watchdog if enabled by bootloader/fuses */ + MCUSR &= ~(1 << WDRF); + wdt_disable(); + + /* Disable clock division */ +#if (F_CPU == 8000000) + clock_prescale_set(clock_div_2); // 16MHz crystal divided by 2 +#else + clock_prescale_set(clock_div_1); +#endif + + // Leonardo needs. Without this USB device is not recognized. + USB_Disable(); + + USB_Init(); + + // for Console_Task + USB_Device_EnableSOFEvents(); + print_set_sendchar(sendchar); +} + + + +int main(void) +{ + // LED for debug + LED_TX_INIT; + LED_TX_ON; + + debug_enable = true; + debug_keyboard = true; + + host_set_driver(&lufa_driver); + keyboard_init(); + + LUFA_setup(); + + /* NOTE: Don't insert time consuming job here. + * It'll cause unclear initialization failure when DFU reset(worm start). + */ + sei(); + +/* Some keyboards bootup quickly and cannot be initialized with this startup wait. + // wait for startup of sendchar routine + while (USB_DeviceState != DEVICE_STATE_Configured) ; + if (debug_enable) { + _delay_ms(1000); + } +*/ + + debug("init: done\n"); + + for (;;) { + keyboard_task(); + +#if !defined(INTERRUPT_CONTROL_ENDPOINT) + // LUFA Task for control request + USB_USBTask(); +#endif + } + + return 0; +} diff --git a/keyboards/converter/usb_usb/matrix.c b/keyboards/converter/usb_usb/matrix.c new file mode 100644 index 0000000000..b077febd74 --- /dev/null +++ b/keyboards/converter/usb_usb/matrix.c @@ -0,0 +1 @@ +// Intentionally left empty. This file must exist for this board to build. diff --git a/keyboards/converter/usb_usb/rules.mk b/keyboards/converter/usb_usb/rules.mk new file mode 100644 index 0000000000..4ee6cdb1ce --- /dev/null +++ b/keyboards/converter/usb_usb/rules.mk @@ -0,0 +1,66 @@ +# MCU name +MCU ?= atmega32u4 + + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU ?= 8000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH ?= AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB ?= $(F_CPU) + +# Interrupt driven control endpoint task +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +# BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +# MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +# CONSOLE_ENABLE ?= yes # Console for debug(+400) +# COMMAND_ENABLE ?= yes # Commands for debug and configuration +# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +# NKRO_ENABLE ?= yes # USB Nkey Rollover - not yet supported in LUFA +# BACKLIGHT_ENABLE ?= yes + + +CUSTOM_MATRIX = yes +SRC = custom_matrix.cpp +include $(TMK_DIR)/protocol/usb_hid.mk diff --git a/keyboards/converter/usb_usb/usb_usb.c b/keyboards/converter/usb_usb/usb_usb.c new file mode 100644 index 0000000000..e7657938d2 --- /dev/null +++ b/keyboards/converter/usb_usb/usb_usb.c @@ -0,0 +1 @@ +#include "usb_usb.h" \ No newline at end of file diff --git a/keyboards/converter/usb_usb/usb_usb.h b/keyboards/converter/usb_usb/usb_usb.h new file mode 100644 index 0000000000..c31fae1d0f --- /dev/null +++ b/keyboards/converter/usb_usb/usb_usb.h @@ -0,0 +1,203 @@ +/* +Copyright 2017 Balz Guenat + +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 . +*/ + +#ifndef USB_USB_H +#define USB_USB_H + +#include "quantum.h" + +#define ______ KC_TRNS + +/* ,---------------. ,---------------. ,---------------. + * |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24| + * ,---. |---------------| |---------------| |---------------| ,-----------. ,---------------. ,-------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|Pwr| | Help | + * `---' `---------------' `---------------' `---------------' `-----------' `---------------' `-------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. ,-------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| |Stp|Agn| + * |-----------------------------------------------------------| |-----------| |---------------| |-------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| |Mnu|Und| + * |-----------------------------------------------------------| `-----------' |---------------| |-------| + * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| #|Retn| | 4| 5| 6|KP,| |Sel|Cpy| + * |-----------------------------------------------------------| ,---. |---------------| |-------| + * |Shft| <| Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|KP=| |Exe|Pst| + * |-----------------------------------------------------------| ,-----------. |---------------| |-------| + * |Ctl|Gui|Alt|MHEN|HNJ| Space |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|Ent| |Fnd|Cut| + * `-----------------------------------------------------------' `-----------' `---------------' `-------' + * + * + * App: Windows Menu key + * Gui: Windows key, Mac ⌘ key or Meta key + * + * Pwr: Power for Unix and Mac + * VDn,Vup,Mut: Volume control for Unix and Mac + * Stp,Agn..: for Unix + * + * KP,: Brazilian Keypad Comma + * KP=: Keypad = for Mac + * <,#: ISO keys(UK legend) + * JPY: Japanese Yen(ï¿¥) + * RO: Japanese ã‚ or Brazilian / + * MHEN: Japanese ç„¡å¤‰æ› Non Conversion + * HENK: Japanese å¤‰æ› Conversion + * KANA: Japanese ã‹ãª Hiragana/Katakana + * https://en.wikipedia.org/wiki/Keyboard_layout#Japanese + * H/E: Korean í•œ/ì˜ Hangul/English + * HNJ: Korean í•œìž Hanja + * https://en.wikipedia.org/wiki/Keyboard_layout#Hangul_.28for_Korean.29 + * + * TODO: use same keycode to pass through instead of KC_NO? + */ +#define KEYMAP_ALL( \ + K68,K69,K6A,K6B,K6C,K6D,K6E,K6F,K70,K71,K72,K73, \ + K29, K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, K81,K80,K7F,K66, K75, \ + K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K89,K2A, K49,K4A,K4B, K53,K54,K55,K56, K78,K79, \ + K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30, K31, K4C,K4D,K4E, K5F,K60,K61,K57, K76,K7A, \ + K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, K32,K28, K5C,K5D,K5E,K85, K77,K7C, \ + KE1,K64,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, K87,KE5, K52, K59,K5A,K5B,K67, K74,K7D, \ + KE0,KE3,KE2,K8B,K91, K2C, K90,K8A,K88,KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63,K58, K7E,K7B \ +) { \ + { KC_NO, KC_NO, KC_NO, KC_NO, K04, K05, K06, K07, /* 00-07 */ \ + K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, /* 08-0F */ \ + { K10, K11, K12, K13, K14, K15, K16, K17, /* 10-17 */ \ + K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, /* 18-1F */ \ + { K20, K21, K22, K23, K24, K25, K26, K27, /* 20-27 */ \ + K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, /* 28-2F */ \ + { K30, K31, K32, K33, K34, K35, K36, K37, /* 30-37 */ \ + K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, /* 38-3F */ \ + { K40, K41, K42, K43, K44, K45, K46, K47, /* 40-47 */ \ + K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, /* 48-4F */ \ + { K50, K51, K52, K53, K54, K55, K56, K57, /* 50-57 */ \ + K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, /* 58-5F */ \ + { K60, K61, K62, K63, K64, K65, K66, K67, /* 60-67 */ \ + K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, /* 68-6F */ \ + { K70, K71, K72, K73, K74, K75, K76, K77, /* 70-77 */ \ + K78, K79, K7A, K7B, K7C, K7D, K7E, K7F }, /* 78-7F */ \ + { K80, K81, KC_NO, KC_NO, KC_NO, K85, KC_NO, K87, /* 80-87 */ \ + K88, K89, K8A, K8B, KC_NO, KC_NO, KC_NO, KC_NO }, /* 88-8F */ \ + { K90, K91, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 90-97 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 98-9F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* A0-A7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* A8-AF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* B0-B7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* B8-BF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* C0-C7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* C8-CF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* D0-D7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* D8-DF */ \ + { KE0, KE1, KE2, KE3, KE4, KE5, KE6, KE7, /* E0-E7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* E8-EF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* F0-F7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* F8-FF */ \ +} + +/* ,---. ,---------------. ,---------------. ,---------------. ,-----------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| + * `---' `---------------' `---------------' `---------------' `-----------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Bsp| |Ins|Hom|PgU| |NmL| /| *| -| + * |-----------------------------------------------------------| |-----------| |---------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| + * |-----------------------------------------------------------| `-----------' |-----------| | + * |CapsL | A| S| D| F| G| H| J| K| L| ;| '| Return| | 4| 5| 6| +| + * |-----------------------------------------------------------| ,---. |---------------| + * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| | + * |-----------------------------------------------------------| ,-----------. |-----------| | + * |Ctl|Gui|Alt| Space |Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0| .|Ent| + * `-----------------------------------------------------------' `-----------' `---------------' + */ +#define KEYMAP( \ + K29,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, \ + K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K2A, K49,K4A,K4B, K53,K54,K55,K56, \ + K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30,K31, K4C,K4D,K4E, K5F,K60,K61, \ + K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, K28, K5C,K5D,K5E,K57, \ + KE1,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, KE5, K52, K59,K5A,K5B, \ + KE0,KE3,KE2, K2C, KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63,K58 \ +) KEYMAP_ALL( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + K29, K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,KC_NO, K2A, K49,K4A,K4B, K53,K54,K55,K56, KC_NO, KC_NO, \ + K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30, K31, K4C,K4D,K4E, K5F,K60,K61,K57, KC_NO, KC_NO, \ + K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, KC_NO, K28, K5C,K5D,K5E,KC_NO, KC_NO, KC_NO, \ + KE1,KC_NO, K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, KC_NO, KE5, K52, K59,K5A,K5B,KC_NO, KC_NO, KC_NO, \ + KE0,KE3,KE2,KC_NO, KC_NO, K2C, KC_NO, KC_NO, KC_NO, KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63,K58, KC_NO, KC_NO \ +) + +/* ,---. ,---------------. ,---------------. ,---------------. ,-----------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| + * `---' `---------------' `---------------' `---------------' `-----------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Bsp| |Ins|Hom|PgU| |NmL| /| *| -| + * |-----------------------------------------------------------| |-----------| |---------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| Retn| |Del|End|PgD| | 7| 8| 9| +| + * |------------------------------------------------------` | `-----------' |-----------| | + * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| #| | | 4| 5| 6| | + * |-----------------------------------------------------------| ,---. |---------------| + * |Shft| <| Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3|Ent| + * |-----------------------------------------------------------| ,-----------. |-----------| | + * |Ctl|Gui|Alt| Space |Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0| .| | + * `-----------------------------------------------------------' `-----------' `---------------' + */ +#define KEYMAP_ISO( \ + K29, K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, \ + K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K2A, K49,K4A,K4B, K53,K54,K55,K56, \ + K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30,K28, K4C,K4D,K4E, K5F,K60,K61,K57, \ + K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34,K32, K5C,K5D,K5E, \ + KE1,K64,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, KE5, K52, K59,K5A,K5B,K58, \ + KE0,KE3,KE2, K2C, KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63 \ +) KEYMAP_ALL( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + K29, K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,KC_NO, K2A, K49,K4A,K4B, K53,K54,K55,K56, KC_NO, KC_NO, \ + K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30, K32, K4C,K4D,K4E, K5F,K60,K61,K57, KC_NO, KC_NO, \ + K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, K32,K28, K5C,K5D,K5E,KC_NO, KC_NO, KC_NO, \ + KE1,K64,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, KC_NO, KE5, K52, K59,K5A,K5B,KC_NO, KC_NO, KC_NO, \ + KE0,KE3,KE2,KC_NO, KC_NO, K2C, KC_NO, KC_NO, KC_NO, KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63,K58, KC_NO, KC_NO \ +) + +/* ,---. ,---------------. ,---------------. ,---------------. ,-----------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| + * `---' `---------------' `---------------' `---------------' `-----------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| ^|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| + * |-----------------------------------------------------------| |-----------| |---------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| @| [| Retn| |Del|End|PgD| | 7| 8| 9| +| + * |------------------------------------------------------` | `-----------' |-----------| | + * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| ]| | | 4| 5| 6| | + * |-----------------------------------------------------------| ,---. |---------------| + * |Shft | Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|Ent| + * |-----------------------------------------------------------| ,-----------. |-----------| | + * |Ctl|Gui|Alt|MHEN| Space |HENK|KNA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0| .| | + * `-----------------------------------------------------------' `-----------' `---------------' + */ +#define KEYMAP_JIS( \ + K29, K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, \ + K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K89,K2A, K49,K4A,K4B, K53,K54,K55,K56, \ + K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30, K28, K4C,K4D,K4E, K5F,K60,K61,K57, \ + K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34,K32, K5C,K5D,K5E, \ + KE1,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, K87,KE5, K52, K59,K5A,K5B,K58, \ + KE0,KE3,KE2,K8B, K2C, K8A,K88,KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63 \ +) KEYMAP_ALL( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + K29, K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K89,K2A, K49,K4A,K4B, K53,K54,K55,K56, KC_NO, KC_NO, \ + K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30, K32, K4C,K4D,K4E, K5F,K60,K61,K57, KC_NO, KC_NO, \ + K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, K32,K28, K5C,K5D,K5E,KC_NO, KC_NO, KC_NO, \ + KE1,KC_NO, K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, K87,KE5, K52, K59,K5A,K5B,KC_NO, KC_NO, KC_NO, \ + KE0,KE3,KE2,K8B,KC_NO, K2C, KC_NO, K8A,K88,KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63,K58, KC_NO, KC_NO \ +) +#endif diff --git a/keyboards/deltasplit75/Makefile b/keyboards/deltasplit75/Makefile new file mode 100644 index 0000000000..d1dec53302 --- /dev/null +++ b/keyboards/deltasplit75/Makefile @@ -0,0 +1,5 @@ +SUBPROJECT_DEFAULT = v2 + +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/deltasplit75/config.h b/keyboards/deltasplit75/config.h new file mode 100644 index 0000000000..89d328be64 --- /dev/null +++ b/keyboards/deltasplit75/config.h @@ -0,0 +1,29 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +#ifdef SUBPROJECT_protosplit + #include "protosplit/config.h" +#endif +#ifdef SUBPROJECT_v2 + #include "v2/config.h" +#endif +#endif diff --git a/keyboards/deltasplit75/deltasplit75.c b/keyboards/deltasplit75/deltasplit75.c new file mode 100644 index 0000000000..6a73db4cd6 --- /dev/null +++ b/keyboards/deltasplit75/deltasplit75.c @@ -0,0 +1 @@ +#include "deltasplit75.h" \ No newline at end of file diff --git a/keyboards/deltasplit75/deltasplit75.h b/keyboards/deltasplit75/deltasplit75.h new file mode 100644 index 0000000000..9db16c78c2 --- /dev/null +++ b/keyboards/deltasplit75/deltasplit75.h @@ -0,0 +1,13 @@ +#ifndef DELTASPLIT75_H +#define DELTASPLIT75_H + +#ifdef SUBPROJECT_v2 + #include "v2.h" +#endif +#ifdef SUBPROJECT_protosplit + #include "protosplit.h" +#endif + +#include "quantum.h" + +#endif \ No newline at end of file diff --git a/keyboards/deltasplit75/eeprom-lefthand.eep b/keyboards/deltasplit75/eeprom-lefthand.eep new file mode 100644 index 0000000000..b9666a74c0 Binary files /dev/null and b/keyboards/deltasplit75/eeprom-lefthand.eep differ diff --git a/keyboards/deltasplit75/eeprom-righthand.eep b/keyboards/deltasplit75/eeprom-righthand.eep new file mode 100644 index 0000000000..94cc5be7fc Binary files /dev/null and b/keyboards/deltasplit75/eeprom-righthand.eep differ diff --git a/keyboards/deltasplit75/i2c.c b/keyboards/deltasplit75/i2c.c new file mode 100644 index 0000000000..084c890c40 --- /dev/null +++ b/keyboards/deltasplit75/i2c.c @@ -0,0 +1,162 @@ +#include +#include +#include +#include +#include +#include +#include "i2c.h" + +#ifdef USE_I2C + +// Limits the amount of we wait for any one i2c transaction. +// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is +// 9 bits, a single transaction will take around 90μs to complete. +// +// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit +// poll loop takes at least 8 clock cycles to execute +#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 + +#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) + +volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +static volatile uint8_t slave_buffer_pos; +static volatile bool slave_has_register_set = false; + +// Wait for an i2c operation to finish +inline static +void i2c_delay(void) { + uint16_t lim = 0; + while(!(TWCR & (1<10. + // Check datasheets for more info. + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; +} + +// Start a transaction with the given i2c slave address. The direction of the +// transfer is set with I2C_READ and I2C_WRITE. +// returns: 0 => success +// 1 => error +uint8_t i2c_master_start(uint8_t address) { + TWCR = (1< slave ACK +// 1 => slave NACK +uint8_t i2c_master_write(uint8_t data) { + TWDR = data; + TWCR = (1<= SLAVE_BUFFER_SIZE ) { + ack = 0; + slave_buffer_pos = 0; + } + slave_has_register_set = true; + } else { + i2c_slave_buffer[slave_buffer_pos] = TWDR; + BUFFER_POS_INC(); + } + break; + + case TW_ST_SLA_ACK: + case TW_ST_DATA_ACK: + // master has addressed this device as a slave transmitter and is + // requesting data. + TWDR = i2c_slave_buffer[slave_buffer_pos]; + BUFFER_POS_INC(); + break; + + case TW_BUS_ERROR: // something went wrong, reset twi state + TWCR = 0; + default: + break; + } + // Reset everything, so we are ready for the next TWI interrupt + TWCR |= (1< + +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +#define I2C_READ 1 +#define I2C_WRITE 0 + +#define I2C_ACK 1 +#define I2C_NACK 0 + +#define SLAVE_BUFFER_SIZE 0x10 + +// i2c SCL clock frequency +#define SCL_CLOCK 100000L + +extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +void i2c_master_init(void); +uint8_t i2c_master_start(uint8_t address); +void i2c_master_stop(void); +uint8_t i2c_master_write(uint8_t data); +uint8_t i2c_master_read(int); +void i2c_reset_state(void); +void i2c_slave_init(uint8_t address); + +#endif diff --git a/keyboards/deltasplit75/keymaps/default/config.h b/keyboards/deltasplit75/keymaps/default/config.h new file mode 100644 index 0000000000..4fb2554e0d --- /dev/null +++ b/keyboards/deltasplit75/keymaps/default/config.h @@ -0,0 +1,31 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + + +#define USE_SERIAL + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + + +#ifdef SUBPROJECT_v2 + #include "../../v2/config.h" +#endif +#ifdef SUBPROJECT_protosplit + #include "../../protosplit/config.h" +#endif diff --git a/keyboards/deltasplit75/keymaps/default/keymap.c b/keyboards/deltasplit75/keymaps/default/keymap.c new file mode 100644 index 0000000000..e2657bfa2a --- /dev/null +++ b/keyboards/deltasplit75/keymaps/default/keymap.c @@ -0,0 +1,31 @@ +#include "deltasplit75.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// 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. + +// Fillers to make layering more clear + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + KEYMAP_V2( + 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_INS, KC_HOME, KC_PGUP, + 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_END, KC_PGDN, + 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_SLCK, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TRNS, KC_ENT, KC_PAUS, //modify KC_TRNS to enable ISO Support + KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PSCR, //modify KC_TRNS to enable ISO Support + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + KEYMAP_V2( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, + KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLU, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + M(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_VOLD, M(0), KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; \ No newline at end of file diff --git a/keyboards/deltasplit75/keymaps/itsaferbie/Makefile b/keyboards/deltasplit75/keymaps/itsaferbie/Makefile new file mode 100644 index 0000000000..bab3b4c564 --- /dev/null +++ b/keyboards/deltasplit75/keymaps/itsaferbie/Makefile @@ -0,0 +1,7 @@ +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +AUDIO_ENABLE = no # Audio disabled while using RGB underlight. +EXTRAKEY_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/deltasplit75/keymaps/itsaferbie/config.h b/keyboards/deltasplit75/keymaps/itsaferbie/config.h new file mode 100644 index 0000000000..4fb2554e0d --- /dev/null +++ b/keyboards/deltasplit75/keymaps/itsaferbie/config.h @@ -0,0 +1,31 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + + +#define USE_SERIAL + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + + +#ifdef SUBPROJECT_v2 + #include "../../v2/config.h" +#endif +#ifdef SUBPROJECT_protosplit + #include "../../protosplit/config.h" +#endif diff --git a/keyboards/deltasplit75/keymaps/itsaferbie/keymap.c b/keyboards/deltasplit75/keymaps/itsaferbie/keymap.c new file mode 100644 index 0000000000..82c292f499 --- /dev/null +++ b/keyboards/deltasplit75/keymaps/itsaferbie/keymap.c @@ -0,0 +1,46 @@ +#include "deltasplit75.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// 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. + +// Fillers to make layering more clear + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + *,-----------------------------------------------------------------------. + * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12|Prnt|Ins|Del| + * |----------------------------------------------------------------------| + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backspace| Home| + * |----------------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| PgUp| + * |----------------------------------------------------------------------| + * |Ctrl| A| S| D| F| G| H| J| K| L| ;| '|Enter | PgDown| + * |----------------------------------------------------------------------| + * |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift | Up| End| + * |----------------------------------------------------------------------| + * |CapsLo|Gui |Alt |Sp |Mod | Sp| Alt| Gui| Ctrl| | Lef| Dow| Rig| + * `----------------------------------------------------------------------' + */ + KEYMAP_V2( + 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_INS, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_TRNS, KC_HOME, // KC_TRNS is the unneeded key in the split backspace. + 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TRNS, KC_ENT, KC_PGDN, // KC_TRNS is unneeded ISO enter key. + KC_LSFT, KC_TRNS, 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_END, // KC_TRNS is uneeded ISO layout key. + KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + KEYMAP_V2( + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_STOP, KC_MNXT), + +}; \ No newline at end of file diff --git a/keyboards/deltasplit75/keymaps/protosplit/config.h b/keyboards/deltasplit75/keymaps/protosplit/config.h new file mode 100644 index 0000000000..4fb2554e0d --- /dev/null +++ b/keyboards/deltasplit75/keymaps/protosplit/config.h @@ -0,0 +1,31 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + + +#define USE_SERIAL + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + + +#ifdef SUBPROJECT_v2 + #include "../../v2/config.h" +#endif +#ifdef SUBPROJECT_protosplit + #include "../../protosplit/config.h" +#endif diff --git a/keyboards/deltasplit75/keymaps/protosplit/keymap.c b/keyboards/deltasplit75/keymaps/protosplit/keymap.c new file mode 100644 index 0000000000..d8db2b88e1 --- /dev/null +++ b/keyboards/deltasplit75/keymaps/protosplit/keymap.c @@ -0,0 +1,32 @@ +#include "deltasplit75.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// 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. + +// Fillers to make layering more clear + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + KEYMAP_PROTOSPLIT( + 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_INS, KC_HOME, KC_PGUP, + 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_END, KC_PGDN, + 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_SLCK, + KC_LCTL, 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_PAUS, + 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_LSFT, KC_UP, KC_PSCR, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + KEYMAP_PROTOSPLIT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, + KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLU, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + M(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, M(0), KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + +}; \ No newline at end of file diff --git a/keyboards/deltasplit75/matrix.c b/keyboards/deltasplit75/matrix.c new file mode 100644 index 0000000000..1389690042 --- /dev/null +++ b/keyboards/deltasplit75/matrix.c @@ -0,0 +1,318 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include +#include +#include +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "split_util.h" +#include "pro_micro.h" +#include "config.h" + +#ifdef USE_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "serial.h" +#endif + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +#define ERROR_DISCONNECT_COUNT 5 + +static uint8_t debouncing = DEBOUNCE; +static const int ROWS_PER_HAND = MATRIX_ROWS/2; +static uint8_t error_count = 0; + +static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static matrix_row_t read_cols(void); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + debug_enable = true; + debug_matrix = true; + debug_mouse = true; + // initialize row and col + unselect_rows(); + init_cols(); + + TX_RX_LED_INIT; + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + + matrix_init_quantum(); +} + +uint8_t _matrix_scan(void) +{ + // Right hand is stored after the left in the matirx so, we need to offset it + int offset = isLeftHand ? 0 : (ROWS_PER_HAND); + + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + select_row(i); + _delay_us(30); // without this wait read unstable value. + matrix_row_t cols = read_cols(); + if (matrix_debouncing[i+offset] != cols) { + matrix_debouncing[i+offset] = cols; + debouncing = DEBOUNCE; + } + unselect_rows(); + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + matrix[i+offset] = matrix_debouncing[i+offset]; + } + } + } + + return 1; +} + +#ifdef USE_I2C + +// Get rows from other half over i2c +int i2c_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); + if (err) goto i2c_error; + + // start of matrix stored at 0x00 + err = i2c_master_write(0x00); + if (err) goto i2c_error; + + // Start read + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); + if (err) goto i2c_error; + + if (!err) { + int i; + for (i = 0; i < ROWS_PER_HAND-1; ++i) { + matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); + } + matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); + i2c_master_stop(); + } else { +i2c_error: // the cable is disconnceted, or something else went wrong + i2c_reset_state(); + return err; + } + + return 0; +} + +#else // USE_SERIAL + +int serial_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + if (serial_update_buffers()) { + return 1; + } + + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = serial_slave_buffer[i]; + } + return 0; +} +#endif + +uint8_t matrix_scan(void) +{ + int ret = _matrix_scan(); + + + +#ifdef USE_I2C + if( i2c_transaction() ) { +#else // USE_SERIAL + if( serial_transaction() ) { +#endif + // turn on the indicator led when halves are disconnected + TXLED1; + + error_count++; + + if (error_count > ERROR_DISCONNECT_COUNT) { + // reset other half if disconnected + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = 0; + } + } + } else { + // turn off the indicator led on no error + TXLED0; + error_count = 0; + } + + matrix_scan_quantum(); + + return ret; +} + +void matrix_slave_scan(void) { + _matrix_scan(); + + int offset = (isLeftHand) ? 0 : (MATRIX_ROWS / 2); + +#ifdef USE_I2C + for (int i = 0; i < ROWS_PER_HAND; ++i) { + /* i2c_slave_buffer[i] = matrix[offset+i]; */ + i2c_slave_buffer[i] = matrix[offset+i]; + } +#else // USE_SERIAL + for (int i = 0; i < ROWS_PER_HAND; ++i) { + serial_slave_buffer[i] = matrix[offset+i]; + } +#endif +} + +bool matrix_is_modified(void) +{ + if (debouncing) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); + _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); + } +} + +static matrix_row_t read_cols(void) +{ + matrix_row_t result = 0; + for(int x = 0; x < MATRIX_COLS; x++) { + result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); + } + return result; +} + +static void unselect_rows(void) +{ + for(int x = 0; x < ROWS_PER_HAND; x++) { + _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); + _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); + } +} + +static void select_row(uint8_t row) +{ + _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); + _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); +} diff --git a/keyboards/deltasplit75/readme.md b/keyboards/deltasplit75/readme.md new file mode 100644 index 0000000000..04ed35c29e --- /dev/null +++ b/keyboards/deltasplit75/readme.md @@ -0,0 +1,137 @@ +DeltaSplit75 +====== + +This readme and most of the code are from https://github.com/ahtn/tmk_keyboard/ and https://github.com/qmk/qmk_firmware/tree/master/keyboards/lets_split + +Credit to ahtn and wootpatoot for work on the split keyboard firmware + +Split keyboard firmware for Arduino Pro Micro or other ATmega32u4 +based boards. + +## Case Files +Files are available here: https://github.com/xyxjj/DeltaSplit75-Case-files + +## Build Guide +The build guide should be found at https://qmk.fm/deltasplit75 + + +## First Time Setup + +Download or clone the whole firmware and navigate to the keyboards/deltasplit75 directory. Once your dev env is setup, you'll be able to generate the .hex using: + +``` +make v2 + +or + +make v2-YOUR_KEYMAP_NAME (if you make a folder for your keymap) + +or + +make protosplit (if you have one of the prototype PCBs) +``` + +You will see a lot of output and if everything worked correctly you will see the built hex files: + +``` +deltasplit75_v2_protosplit.hex + +or + +deltasplit74_v2_YOUR_KEYMAP_NAME.hex + +or + +deltasplit75_v2_default.hex + +``` + + +For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md. + +### DeltaSplit75 V2 +The PCBs available in groupbuy are all v2, if you've bought one of my prototype PCBs (it says DeltaSplit65 on the silkscreen instead of 75), use the code make protosplit instead + +Features +-------- + +For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md). + +Some features supported by the firmware: + +* Either half can connect to the computer via USB, or both halves can be used + independently. +* 75% formfactor +* Support for multiple Bottom Rows +* RGB underglow support +* Split Backspace and ISO support + + +Flashing +------- +I personally use xLoader to upload my hex files to the keyboard, though any other working software is fine too + + +Choosing which board to plug the USB cable into (choosing Master) +-------- +Because the two boards are identical, the firmware has logic to differentiate the left and right board. + +It uses two strategies to figure things out: look at the EEPROM (memory on the chip) or looks if the current board has the usb cable. + +The EEPROM approach requires additional setup (flashing the eeeprom) but allows you to swap the usb cable to either side. + +The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra. + +### Setting the left hand as master +If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set. + +### Setting the right hand as master +If you always plug the usb cable into the right board, add an extra flag to your `config.h` +``` + #define MASTER_RIGHT +``` + +### Setting EE_hands to use either hands as master +If you define `EE_HANDS` in your `config.h`, you will need to set the +EEPROM for the left and right halves. + +The EEPROM is used to store whether the +half is left handed or right handed. This makes it so that the same firmware +file will run on both hands instead of having to flash left and right handed +versions of the firmware to each half. To flash the EEPROM file for the left +half run: +``` +avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-lefthand.eep +// or the equivalent in dfu-programmer + +``` +and similarly for right half +``` +avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-righhand.eep +// or the equivalent in dfu-programmer +``` + +NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`) + +After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash. + +Note that you need to program both halves, but you have the option of using +different keymaps for each half. You could program the left half with a QWERTY +layout and the right half with a Colemak layout using bootmagic's default layout option. +Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the +right half is connected. + + +Notes on Using Pro Micro 3.3V +----------------------------- + +Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects +the frequency on the 3.3V board. + +Also, if the slave board is producing weird characters in certain columns, +update the following line in `matrix.c` to the following: + +``` +// _delay_us(30); // without this wait read unstable value. +_delay_us(300); // without this wait read unstable value. +``` diff --git a/keyboards/deltasplit75/rules.mk b/keyboards/deltasplit75/rules.mk new file mode 100644 index 0000000000..1aee5313c1 --- /dev/null +++ b/keyboards/deltasplit75/rules.mk @@ -0,0 +1,75 @@ +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# 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(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= no # Console for debug(+400) +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 ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SUBPROJECT_rev1 ?= yes +USE_I2C ?= yes +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend + +CUSTOM_MATRIX = yes diff --git a/keyboards/deltasplit75/serial.c b/keyboards/deltasplit75/serial.c new file mode 100644 index 0000000000..6faed09ce0 --- /dev/null +++ b/keyboards/deltasplit75/serial.c @@ -0,0 +1,228 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#include "serial.h" + +#ifdef USE_SERIAL + +// Serial pulse period in microseconds. Its probably a bad idea to lower this +// value. +#define SERIAL_DELAY 24 + +uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; +uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; + +#define SLAVE_DATA_CORRUPT (1<<0) +volatile uint8_t status = 0; + +inline static +void serial_delay(void) { + _delay_us(SERIAL_DELAY); +} + +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static +void serial_input(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +inline static +uint8_t serial_read_pin(void) { + return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); +} + +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +void serial_master_init(void) { + serial_output(); + serial_high(); +} + +void serial_slave_init(void) { + serial_input(); + + // Enable INT0 + EIMSK |= _BV(INT0); + // Trigger on falling edge of INT0 + EICRA &= ~(_BV(ISC00) | _BV(ISC01)); +} + +// Used by the master to synchronize timing with the slave. +static +void sync_recv(void) { + serial_input(); + // This shouldn't hang if the slave disconnects because the + // serial line will float to high if the slave does disconnect. + while (!serial_read_pin()); + serial_delay(); +} + +// Used by the slave to send a synchronization signal to the master. +static +void sync_send(void) { + serial_output(); + + serial_low(); + serial_delay(); + + serial_high(); +} + +// Reads a byte from the serial line +static +uint8_t serial_read_byte(void) { + uint8_t byte = 0; + serial_input(); + for ( uint8_t i = 0; i < 8; ++i) { + byte = (byte << 1) | serial_read_pin(); + serial_delay(); + _delay_us(1); + } + + return byte; +} + +// Sends a byte with MSB ordering +static +void serial_write_byte(uint8_t data) { + uint8_t b = 8; + serial_output(); + while( b-- ) { + if(data & (1 << b)) { + serial_high(); + } else { + serial_low(); + } + serial_delay(); + } +} + +// interrupt handle to be used by the slave device +ISR(SERIAL_PIN_INTERRUPT) { + sync_send(); + + uint8_t checksum = 0; + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_slave_buffer[i]); + sync_send(); + checksum += serial_slave_buffer[i]; + } + serial_write_byte(checksum); + sync_send(); + + // wait for the sync to finish sending + serial_delay(); + + // read the middle of pulses + _delay_us(SERIAL_DELAY/2); + + uint8_t checksum_computed = 0; + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_master_buffer[i] = serial_read_byte(); + sync_send(); + checksum_computed += serial_master_buffer[i]; + } + uint8_t checksum_received = serial_read_byte(); + sync_send(); + + serial_input(); // end transaction + + if ( checksum_computed != checksum_received ) { + status |= SLAVE_DATA_CORRUPT; + } else { + status &= ~SLAVE_DATA_CORRUPT; + } +} + +inline +bool serial_slave_DATA_CORRUPT(void) { + return status & SLAVE_DATA_CORRUPT; +} + +// Copies the serial_slave_buffer to the master and sends the +// serial_master_buffer to the slave. +// +// Returns: +// 0 => no error +// 1 => slave did not respond +int serial_update_buffers(void) { + // this code is very time dependent, so we need to disable interrupts + cli(); + + // signal to the slave that we want to start a transaction + serial_output(); + serial_low(); + _delay_us(1); + + // wait for the slaves response + serial_input(); + serial_high(); + _delay_us(SERIAL_DELAY); + + // check if the slave is present + if (serial_read_pin()) { + // slave failed to pull the line low, assume not present + sei(); + return 1; + } + + // if the slave is present syncronize with it + sync_recv(); + + uint8_t checksum_computed = 0; + // receive data from the slave + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_slave_buffer[i] = serial_read_byte(); + sync_recv(); + checksum_computed += serial_slave_buffer[i]; + } + uint8_t checksum_received = serial_read_byte(); + sync_recv(); + + if (checksum_computed != checksum_received) { + sei(); + return 1; + } + + uint8_t checksum = 0; + // send data to the slave + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_master_buffer[i]); + sync_recv(); + checksum += serial_master_buffer[i]; + } + serial_write_byte(checksum); + sync_recv(); + + // always, release the line when not in use + serial_output(); + serial_high(); + + sei(); + return 0; +} + +#endif diff --git a/keyboards/deltasplit75/serial.h b/keyboards/deltasplit75/serial.h new file mode 100644 index 0000000000..6ef52019a8 --- /dev/null +++ b/keyboards/deltasplit75/serial.h @@ -0,0 +1,26 @@ +#ifndef MY_SERIAL_H +#define MY_SERIAL_H + +#include "config.h" +#include + +/* TODO: some defines for interrupt setup */ +#define SERIAL_PIN_DDR DDRD +#define SERIAL_PIN_PORT PORTD +#define SERIAL_PIN_INPUT PIND +#define SERIAL_PIN_MASK _BV(PD0) +#define SERIAL_PIN_INTERRUPT INT0_vect + +#define SERIAL_SLAVE_BUFFER_LENGTH ((MATRIX_COLS+7)/8 *MATRIX_ROWS/2) +#define SERIAL_MASTER_BUFFER_LENGTH 1 + +// Buffers for master - slave communication +extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(void); +bool serial_slave_data_corrupt(void); + +#endif diff --git a/keyboards/deltasplit75/split_util.c b/keyboards/deltasplit75/split_util.c new file mode 100644 index 0000000000..226dc18816 --- /dev/null +++ b/keyboards/deltasplit75/split_util.c @@ -0,0 +1,81 @@ +#include +#include +#include +#include +#include +#include +#include "split_util.h" +#include "matrix.h" +#include "keyboard.h" +#include "config.h" + +#ifdef USE_I2C +# include "i2c.h" +#else +# include "serial.h" +#endif + +volatile bool isLeftHand = true; + +static void setup_handedness(void) { + #ifdef EE_HANDS + isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); + #else + // I2C_MASTER_RIGHT is deprecated use MASTER_RIGHT instead since this works for both serial and i2c + #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) + isLeftHand = !has_usb(); + #else + isLeftHand = has_usb(); + #endif + #endif +} + +static void keyboard_master_setup(void) { +#ifdef USE_I2C + i2c_master_init(); +#else + serial_master_init(); +#endif +} + +static void keyboard_slave_setup(void) { +#ifdef USE_I2C + i2c_slave_init(SLAVE_I2C_ADDRESS); +#else + serial_slave_init(); +#endif +} + +bool has_usb(void) { + USBCON |= (1 << OTGPADE); //enables VBUS pad + _delay_us(5); + return (USBSTA & (1< + +#ifdef EE_HANDS + #define EECONFIG_BOOTMAGIC_END (uint8_t *)10 + #define EECONFIG_HANDEDNESS EECONFIG_BOOTMAGIC_END +#endif + +#define SLAVE_I2C_ADDRESS 0x32 + +extern volatile bool isLeftHand; + +// slave version of matix scan, defined in matrix.c +void matrix_slave_scan(void); + +void split_keyboard_setup(void); +bool has_usb(void); +void keyboard_slave_loop(void); + +#endif diff --git a/keyboards/deltasplit75/v2/Makefile b/keyboards/deltasplit75/v2/Makefile new file mode 100644 index 0000000000..4e2a6f00fd --- /dev/null +++ b/keyboards/deltasplit75/v2/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/deltasplit75/v2/config.h b/keyboards/deltasplit75/v2/config.h new file mode 100644 index 0000000000..0f4b806e2d --- /dev/null +++ b/keyboards/deltasplit75/v2/config.h @@ -0,0 +1,90 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER xyxjj +#define PRODUCT DeltaSplit75 +#define DESCRIPTION 75% split keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 14 +#define MATRIX_COLS 8 + +// wiring of each half +#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2 } +#define MATRIX_COL_PINS { B6, B5, B4, E6, D7, C6, D4, D1} + +#define CATERINA_BOOTLOADER + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 12 // Number of LEDs +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + + +#endif \ No newline at end of file diff --git a/keyboards/deltasplit75/v2/rules.mk b/keyboards/deltasplit75/v2/rules.mk new file mode 100644 index 0000000000..80a942d06f --- /dev/null +++ b/keyboards/deltasplit75/v2/rules.mk @@ -0,0 +1,5 @@ +BACKLIGHT_ENABLE = no + +ifndef QUANTUM_DIR + include ../../../Makefile +endif diff --git a/keyboards/deltasplit75/v2/v2.c b/keyboards/deltasplit75/v2/v2.c new file mode 100644 index 0000000000..a7ee1fa8a5 --- /dev/null +++ b/keyboards/deltasplit75/v2/v2.c @@ -0,0 +1,14 @@ +#include "deltasplit75.h" + +void matrix_init_kb(void) { + // // green led on + // DDRD |= (1<<5); + // PORTD &= ~(1<<5); + + // // orange led on + // DDRB |= (1<<0); + // PORTB &= ~(1<<0); + + matrix_init_user(); +}; + diff --git a/keyboards/deltasplit75/v2/v2.h b/keyboards/deltasplit75/v2/v2.h new file mode 100644 index 0000000000..985a8b267f --- /dev/null +++ b/keyboards/deltasplit75/v2/v2.h @@ -0,0 +1,62 @@ +#ifndef V2_H +#define V2_H + +#include "deltasplit75.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +//void promicro_bootloader_jmp(bool program); +//matrix is defined in a weird way here; the layout on both sides are asymmetrical, but the "matrix" is symmetrical but with empty gaps +//the last column is defined as a separate row because the firmware currently doesnt support more than 8 columns (this layout has 9 columns per side) K45 and K110 are the Bs on both sides; K53 and K106 are extra keys for ISO +#define KEYMAP_V2( \ + K00, K01, K02, K03, K04, K05, K06, K70, K71, K72, K73, K74, K75, K76, K77, K132, \ + K10, K11, K12, K13, K14, K15, K16, K80, K81, K82, K83, K84, K85, K86, K87, K133, \ + K20, K21, K22, K23, K24, K25, K90, K91, K92, K93, K94, K95, K96, K97, K134, \ + K30, K31, K32, K33, K34, K35, K100, K101, K102, K103, K104, K105, K106, K107, K135, \ + K40, K53, K41, K42, K43, K44, K45, K110, K111, K112, K113, K114, K115, K116, K117, K136, \ + K50, K51, K52, K54, K55, K120, K121, K122, K123, K126, K127, K137 \ + ) \ + { \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO}, \ + { K10, K11, K12, K13, K14, K15, K16, KC_NO}, \ + { K20, K21, K22, K23, K24, K25, KC_NO, KC_NO}, \ + { K30, K31, K32, K33, K34, K35, KC_NO, KC_NO}, \ + { K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \ + { K50, K51, K52, K53, K54, K55, KC_NO, KC_NO}, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, \ + { K70 , K71, K72, K73, K74, K75, K76, K77}, \ + { K80, K81, K82, K83, K84, K85, K86, K87}, \ + { K90, K91, K92, K93, K94, K95, K96, K97}, \ + { K100, K101, K102, K103, K104, K105, K106, K107}, \ + { K110, K111, K112, K113, K114, K115, K116, K117}, \ + { K120, K121, K122, K123, KC_NO, KC_NO, K126, K127}, \ + { KC_NO, KC_NO, K132, K133, K134, K135, K136, K137} \ + } + +#define KEYMAP_PROTOSPLIT( \ + K00, K01, K02, K03, K04, K05, K06, K70, K71, K72, K73, K74, K75, K76, K77, K132, \ + K10, K11, K12, K13, K14, K15, K16, K80, K81, K82, K83, K84, K85, K86, K87, K133, \ + K20, K21, K22, K23, K24, K25, K90, K91, K92, K93, K94, K95, K96, K97, K134, \ + K30, K31, K32, K33, K34, K35, K100, K101, K102, K103, K104, K105, K107, K135, \ + K40, K41, K42, K43, K44, K45, K110, K111, K112, K113, K114, K115, K116, K117, K136, \ + K50, K51, K52, K54, K55, K120, K121, K122, K123, K126, K127, K137 \ + ) \ + { \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO}, \ + { K10, K11, K12, K13, K14, K15, K16, KC_NO}, \ + { K20, K21, K22, K23, K24, K25, KC_NO, KC_NO}, \ + { K30, K31, K32, K33, K34, K35, KC_NO, KC_NO}, \ + { K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \ + { K50, K51, K52, KC_NO, K54, K55, KC_NO, KC_NO}, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, \ + { K70 , K71, K72, K73, K74, K75, K76, K77}, \ + { K80, K81, K82, K83, K84, K85, K86, K87}, \ + { K90, K91, K92, K93, K94, K95, K96, K97}, \ + { K100, K101, K102, K103, K104, K105, KC_NO, K107}, \ + { K110, K111, K112, K113, K114, K115, K116, K117}, \ + { K120, K121, K122, K123, KC_NO, KC_NO, K126, K127}, \ + { KC_NO, KC_NO, K132, K133, K134, K135, K136, K137} \ + } + +#endif \ No newline at end of file diff --git a/keyboards/dk60/config.h b/keyboards/dk60/config.h index 9c5232ef06..5b712fe9bd 100644 --- a/keyboards/dk60/config.h +++ b/keyboards/dk60/config.h @@ -23,7 +23,7 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6060 - #define DEVICE_VER 0x0003 + #define DEVICE_VER 0x0001 #define MANUFACTURER DARKOU #define PRODUCT DK60 #define DESCRIPTION QMK keyboard firmware for DK60 support diff --git a/keyboards/dk60/readme.md b/keyboards/dk60/readme.md index 544b5b0d11..5eba791504 100644 --- a/keyboards/dk60/readme.md +++ b/keyboards/dk60/readme.md @@ -1,8 +1,17 @@ -DK60 keyboard firmware -====================== +DK60 +=== -Another 60% keyboard with different HHKB layout +![DK60](https://github.com/Dbroqua/DK60/raw/master/Previews/DK60.png) -More information here: https://github.com/Dbroqua/DK60 +Another 60% keyboard with different HHKB layout made and sold by dbroqua. [More info on github/dbroqua](https://github.com/Dbroqua/DK60/) + +* Keyboard Maintainer: [Damien Broqua aka DarKou](https://github.com/Dbroqua) +* Hardware Supported: DK60 PCB revA + +Make example for this keyboard (after setting up your build environment): + + make dk60-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. Open Hardware project! diff --git a/keyboards/eco/Makefile b/keyboards/eco/Makefile new file mode 100644 index 0000000000..b9bada8f8d --- /dev/null +++ b/keyboards/eco/Makefile @@ -0,0 +1,5 @@ +SUBPROJECT_DEFAULT = rev2 + +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/eco/config.h b/keyboards/eco/config.h new file mode 100644 index 0000000000..99b057496f --- /dev/null +++ b/keyboards/eco/config.h @@ -0,0 +1,80 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1337 +#define PRODUCT_ID 0x6006 +#define MANUFACTURER Bishop Keyboards +#define PRODUCT The ECO Keyboard +#define DESCRIPTION An economical ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 14 + +#define CATERINA_BOOTLOADER + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#ifdef SUBPROJECT_rev1 + #include "rev1/config.h" +#endif +#ifdef SUBPROJECT_rev2 + #include "rev2/config.h" +#endif + +#endif diff --git a/keyboards/eco/eco.c b/keyboards/eco/eco.c new file mode 100644 index 0000000000..84097652d8 --- /dev/null +++ b/keyboards/eco/eco.c @@ -0,0 +1 @@ +#include "eco.h" diff --git a/keyboards/eco/eco.h b/keyboards/eco/eco.h new file mode 100644 index 0000000000..2cfb8df26b --- /dev/null +++ b/keyboards/eco/eco.h @@ -0,0 +1,14 @@ +#ifndef ECO_H +#define ECO_H + +#ifdef SUBPROJECT_rev1 + #include "rev1.h" +#endif +#ifdef SUBPROJECT_rev2 + #include "rev2.h" +#endif + + +#include "quantum.h" + +#endif \ No newline at end of file diff --git a/keyboards/eco/keymaps/that_canadian/Makefile b/keyboards/eco/keymaps/that_canadian/Makefile new file mode 100644 index 0000000000..7dab979426 --- /dev/null +++ b/keyboards/eco/keymaps/that_canadian/Makefile @@ -0,0 +1,25 @@ + + +# 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(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/eco/keymaps/that_canadian/keymap.c b/keyboards/eco/keymaps/that_canadian/keymap.c new file mode 100644 index 0000000000..87f859e8e0 --- /dev/null +++ b/keyboards/eco/keymaps/that_canadian/keymap.c @@ -0,0 +1,217 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +// Below layout is based upon /u/That-Canadian's planck layout + +#include "eco.h" +#include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// 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. +#define _QWERTY 0 +#define _LOWER 2 +#define _RAISE 3 + +#define _FUNCTION 15 +#define _ADJUST 16 + +enum eco_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Defines for task manager and such +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-------------------------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | ( | ) | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Func | A | S | D | F | G | [ | ] | H | J | K | L | ; | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | { | } | N | M | , | . | / | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | ` | GUI | Alt |Lower | Space|Pg-dwn| Pg-up| Space|Raise | Left | Down | Up |Right | + * `-------------------------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LPRN, KC_RPRN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {MO(_FUNCTION), KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT}, + {OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT}, + {KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_PGDN, KC_PGUP, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Lower + * ,-------------------------------------------------------------------------------------------------. + * | Esc | ! | @ | # | $ | % | | | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | | F6 | _ | + | { | } |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | | F12 | | | Mute | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | |Lower | | | | Bksp |Raise | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ +[_LOWER] = { + {KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Raise + * ,-------------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | 4 | 5 | 6 | + | | | | | - | = | [ | ] |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Enter | 7 | 8 | 9 | - | | | | | | | Mute | | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | , | 0 | . |Lower | Bksp | | | |Raise | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ +[_RAISE] = { + {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, + {_______, KC_4, KC_5, KC_6, KC_PLUS, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______}, + {KC_ENT, KC_7, KC_8, KC_9, KC_MINS, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, KC_BSLS}, + {_______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Adjust (Lower + Raise) + * ,-------------------------------------------------------------------------------------------------. + * |Taskmg| Reset| | | | | | | | | | | |caltde| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {TSKMGR, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CALTDEL}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* Function + * ,-------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | Up | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | Left | Down |Right | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Caps | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ +[_FUNCTION] = { + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______}, + {KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + +}; + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif diff --git a/keyboards/eco/keymaps/that_canadian/readme.md b/keyboards/eco/keymaps/that_canadian/readme.md new file mode 100644 index 0000000000..aa3316af03 --- /dev/null +++ b/keyboards/eco/keymaps/that_canadian/readme.md @@ -0,0 +1 @@ +# ECO Layout by u/That-Canadian \ No newline at end of file diff --git a/keyboards/eco/readme.md b/keyboards/eco/readme.md new file mode 100644 index 0000000000..d29aa8ece7 --- /dev/null +++ b/keyboards/eco/readme.md @@ -0,0 +1,15 @@ +ECO +=== + +![ECO](http://i.imgur.com/YligKxr.jpg) + +An economical 4x14 ortholinear keyboard + +Keyboard Maintainer: BishopKeyboards and That-Canadian +Hardware Supported: ECO PCB rev1 Pro Micro + +Make example for this keyboard (after setting up your build environment): + + make eco-rev2-that_canadian + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ No newline at end of file diff --git a/keyboards/eco/rev1/Makefile b/keyboards/eco/rev1/Makefile new file mode 100644 index 0000000000..4e2a6f00fd --- /dev/null +++ b/keyboards/eco/rev1/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/eco/rev1/config.h b/keyboards/eco/rev1/config.h new file mode 100644 index 0000000000..1e97a703d1 --- /dev/null +++ b/keyboards/eco/rev1/config.h @@ -0,0 +1,30 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef REV1_CONFIG_H +#define REV1_CONFIG_H + +#include "../config.h" + +#define DEVICE_VER 0x0001 + +/* ECO V1 pin-out */ +#define MATRIX_ROW_PINS { B1, B6, B2, B3 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 } +#define UNUSED_PINS + +#endif diff --git a/keyboards/eco/rev1/rev1.c b/keyboards/eco/rev1/rev1.c new file mode 100644 index 0000000000..84097652d8 --- /dev/null +++ b/keyboards/eco/rev1/rev1.c @@ -0,0 +1 @@ +#include "eco.h" diff --git a/keyboards/eco/rev1/rev1.h b/keyboards/eco/rev1/rev1.h new file mode 100644 index 0000000000..41541ac05b --- /dev/null +++ b/keyboards/eco/rev1/rev1.h @@ -0,0 +1,24 @@ +#ifndef REV1_H +#define REV1_H + +#include "../eco.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +//void promicro_bootloader_jmp(bool program); + +#define KEYMAP( \ + k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 \ + ) \ + { \ + { k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014 }, \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114 }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214 }, \ + { k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 } \ + } + +#endif \ No newline at end of file diff --git a/keyboards/eco/rev1/rules.mk b/keyboards/eco/rev1/rules.mk new file mode 100644 index 0000000000..a0825b4ef6 --- /dev/null +++ b/keyboards/eco/rev1/rules.mk @@ -0,0 +1,5 @@ +BACKLIGHT_ENABLE = no + +ifndef QUANTUM_DIR + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/eco/rev2/Makefile b/keyboards/eco/rev2/Makefile new file mode 100644 index 0000000000..4e2a6f00fd --- /dev/null +++ b/keyboards/eco/rev2/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/eco/rev2/config.h b/keyboards/eco/rev2/config.h new file mode 100644 index 0000000000..83f2defc9e --- /dev/null +++ b/keyboards/eco/rev2/config.h @@ -0,0 +1,30 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef REV2_CONFIG_H +#define REV2_CONFIG_H + +#include "../config.h" + +#define DEVICE_VER 0x0002 + +/* ECO V2.1 pin-out */ +#define MATRIX_ROW_PINS { D7, B5, B4, E6 } +#define MATRIX_COL_PINS { D1, D0, D4, C6, B6, B2, B3, B1, F7, F6, F5, F4, D2, D3 } +#define UNUSED_PINS + +#endif diff --git a/keyboards/eco/rev2/rev2.c b/keyboards/eco/rev2/rev2.c new file mode 100644 index 0000000000..84097652d8 --- /dev/null +++ b/keyboards/eco/rev2/rev2.c @@ -0,0 +1 @@ +#include "eco.h" diff --git a/keyboards/eco/rev2/rev2.h b/keyboards/eco/rev2/rev2.h new file mode 100644 index 0000000000..5b377f2908 --- /dev/null +++ b/keyboards/eco/rev2/rev2.h @@ -0,0 +1,24 @@ +#ifndef REV2_H +#define REV2_H + +#include "../eco.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +//void promicro_bootloader_jmp(bool program); + +#define KEYMAP( \ + k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 \ + ) \ + { \ + { k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014 }, \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114 }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214 }, \ + { k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 } \ + } + +#endif \ No newline at end of file diff --git a/keyboards/eco/rev2/rules.mk b/keyboards/eco/rev2/rules.mk new file mode 100644 index 0000000000..a0825b4ef6 --- /dev/null +++ b/keyboards/eco/rev2/rules.mk @@ -0,0 +1,5 @@ +BACKLIGHT_ENABLE = no + +ifndef QUANTUM_DIR + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/eco/rules.mk b/keyboards/eco/rules.mk new file mode 100644 index 0000000000..cf26cdc0db --- /dev/null +++ b/keyboards/eco/rules.mk @@ -0,0 +1,68 @@ +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# 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(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +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 = yes # Enable keyboard backlight functionality +MIDI_ENABLE = yes # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +API_SYSEX_ENABLE = no + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/ergodox/config.h b/keyboards/ergodox/config.h index 2091999bb3..0e461e59dc 100644 --- a/keyboards/ergodox/config.h +++ b/keyboards/ergodox/config.h @@ -32,6 +32,9 @@ #ifdef SUBPROJECT_infinity #include "infinity/config.h" #endif +#ifdef SUBPROJECT_ergodone + #include "ergodone/config.h" +#endif #endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */ diff --git a/keyboards/ergodox/ergodone/Makefile b/keyboards/ergodox/ergodone/Makefile new file mode 100644 index 0000000000..bd09e5885d --- /dev/null +++ b/keyboards/ergodox/ergodone/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif diff --git a/keyboards/ergodox/ergodone/config.h b/keyboards/ergodox/ergodone/config.h new file mode 100644 index 0000000000..52ae2d576c --- /dev/null +++ b/keyboards/ergodox/ergodone/config.h @@ -0,0 +1,55 @@ +#ifndef ERGODOX_ERGODONE_CONFIG_H +#define ERGODOX_ERGODONE_CONFIG_H + +#include "../config.h" + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1307 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ErgoDone +#define PRODUCT ErgoDone +#define DESCRIPTION QMK keyboard firmware for ErgoDone + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 14 + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +#define LED_BRIGHTNESS_LO 15 +#define LED_BRIGHTNESS_HI 255 + +/* fix space cadet rollover issue */ +#define DISABLE_SPACE_CADET_ROLLOVER + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define PREVENT_STUCK_MODIFIERS + +#define USB_MAX_POWER_CONSUMPTION 500 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION +//#define DEBUG_MATRIX_SCAN_RATE + +#endif diff --git a/keyboards/ergodox/ergodone/ergodone.c b/keyboards/ergodox/ergodone/ergodone.c new file mode 100644 index 0000000000..6b8d8a0632 --- /dev/null +++ b/keyboards/ergodox/ergodone/ergodone.c @@ -0,0 +1,5 @@ +#include "ergodone.h" + +void matrix_init_kb(void) { + matrix_init_user(); +} diff --git a/keyboards/ergodox/ergodone/ergodone.h b/keyboards/ergodox/ergodone/ergodone.h new file mode 100644 index 0000000000..cddc1fbe7a --- /dev/null +++ b/keyboards/ergodox/ergodone/ergodone.h @@ -0,0 +1,63 @@ +#ifndef ERGODOX_ERGODONE_H +#define ERGODOX_ERGODONE_H + +#include "quantum.h" +#include +#include + +#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) +#define CPU_16MHz 0x00 + +void init_ergodox(void); + +inline void ergodox_right_led_1_off(void) {} +inline void ergodox_right_led_1_on(void) {} +inline void ergodox_right_led_2_off(void) {} +inline void ergodox_right_led_2_on(void) {} +inline void ergodox_right_led_3_off(void) {} +inline void ergodox_right_led_3_on(void) {} +inline void ergodox_right_led_on(uint8_t l) {} +inline void ergodox_right_led_off(uint8_t l) {} +inline void ergodox_board_led_off(void) {} +inline void ergodox_board_led_on(void) {} +inline void ergodox_led_all_on(void) {} +inline void ergodox_led_all_off(void) {} +inline void ergodox_right_led_1_set(uint8_t n) {} +inline void ergodox_right_led_2_set(uint8_t n) {} +inline void ergodox_right_led_3_set(uint8_t n) {} +inline void ergodox_right_led_set(uint8_t l, uint8_t n) {} +inline void ergodox_led_all_set(uint8_t n) {} + +#define KEYMAP( \ + \ + /* left hand, spatial positions */ \ + k00,k01,k02,k03,k04,k05,k06, \ + k10,k11,k12,k13,k14,k15,k16, \ + k20,k21,k22,k23,k24,k25, \ + k30,k31,k32,k33,k34,k35,k36, \ + k40,k41,k42,k43,k44, \ + k55,k56, \ + k54, \ + k53,k52,k51, \ + \ + /* right hand, spatial positions */ \ + k07,k08,k09,k0A,k0B,k0C,k0D, \ + k17,k18,k19,k1A,k1B,k1C,k1D, \ + k28,k29,k2A,k2B,k2C,k2D, \ + k37,k38,k39,k3A,k3B,k3C,k3D, \ + k49,k4A,k4B,k4C,k4D, \ + k57,k58, \ + k59, \ + k5C,k5B,k5A ) \ + \ + /* matrix positions */ \ + { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, KC_NO, KC_NO, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ + { k40, k41, k42, k43, k44, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4A, k4B, k4C, k4D }, \ + { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, KC_NO } \ + } + +#endif diff --git a/keyboards/ergodox/ergodone/expander.c b/keyboards/ergodox/ergodone/expander.c new file mode 100644 index 0000000000..0c8a2289c5 --- /dev/null +++ b/keyboards/ergodox/ergodone/expander.c @@ -0,0 +1,120 @@ +#include +#include "action.h" +#include "i2cmaster.h" +#include "expander.h" +#include "debug.h" + +static uint8_t expander_status = 0; +static uint8_t expander_input = 0; + +void expander_config(void); +uint8_t expander_write(uint8_t reg, uint8_t data); +uint8_t expander_read(uint8_t reg, uint8_t *data); + +void expander_init(void) +{ + i2c_init(); + expander_scan(); +} + +void expander_scan(void) +{ + dprintf("expander status: %d ... ", expander_status); + uint8_t ret = i2c_start(EXPANDER_ADDR | I2C_WRITE); + if (ret == 0) { + i2c_stop(); + if (expander_status == 0) { + dprintf("attached\n"); + expander_status = 1; + expander_config(); + clear_keyboard(); + } + } + else { + if (expander_status == 1) { + dprintf("detached\n"); + expander_status = 0; + clear_keyboard(); + } + } + dprintf("%d\n", expander_status); +} + +void expander_read_cols(void) +{ + expander_read(EXPANDER_REG_GPIOA, &expander_input); +} + +uint8_t expander_get_col(uint8_t col) +{ + if (col > 4) { + col++; + } + return expander_input & (1< +#include "matrix.h" + +#define MCP23017 +#define MCP23017_A0 0 +#define MCP23017_A1 0 +#define MCP23017_A2 0 + +#ifdef MCP23017 +#define EXPANDER_ADDR ((0x20|(MCP23017_A0<<0)|(MCP23017_A1<<1)|(MCP23017_A2<<2)) << 1) +enum EXPANDER_REG_BANK0 { + EXPANDER_REG_IODIRA = 0, + EXPANDER_REG_IODIRB, + EXPANDER_REG_IPOLA, + EXPANDER_REG_IPOLB, + EXPANDER_REG_GPINTENA, + EXPANDER_REG_GPINTENB, + EXPANDER_REG_DEFVALA, + EXPANDER_REG_DEFVALB, + EXPANDER_REG_INTCONA, + EXPANDER_REG_INTCONB, + EXPANDER_REG_IOCONA, + EXPANDER_REG_IOCONB, + EXPANDER_REG_GPPUA, + EXPANDER_REG_GPPUB, + EXPANDER_REG_INTFA, + EXPANDER_REG_INTFB, + EXPANDER_REG_INTCAPA, + EXPANDER_REG_INTCAPB, + EXPANDER_REG_GPIOA, + EXPANDER_REG_GPIOB, + EXPANDER_REG_OLATA, + EXPANDER_REG_OLATB +}; +#endif + +void expander_init(void); +void expander_scan(void); +void expander_read_cols(void); +uint8_t expander_get_col(uint8_t col); +matrix_row_t expander_read_row(void); +void expander_unselect_rows(void); +void expander_select_row(uint8_t row); + +#endif diff --git a/keyboards/ergodox/ergodone/i2cmaster.h b/keyboards/ergodox/ergodone/i2cmaster.h new file mode 100644 index 0000000000..3917b9e6c0 --- /dev/null +++ b/keyboards/ergodox/ergodone/i2cmaster.h @@ -0,0 +1,178 @@ +#ifndef _I2CMASTER_H +#define _I2CMASTER_H 1 +/************************************************************************* +* Title: C include file for the I2C master interface +* (i2cmaster.S or twimaster.c) +* Author: Peter Fleury http://jump.to/fleury +* File: $Id: i2cmaster.h,v 1.10 2005/03/06 22:39:57 Peter Exp $ +* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3 +* Target: any AVR device +* Usage: see Doxygen manual +**************************************************************************/ + +#ifdef DOXYGEN +/** + @defgroup pfleury_ic2master I2C Master library + @code #include @endcode + + @brief I2C (TWI) Master Software Library + + Basic routines for communicating with I2C slave devices. This single master + implementation is limited to one bus master on the I2C bus. + + This I2c library is implemented as a compact assembler software implementation of the I2C protocol + which runs on any AVR (i2cmaster.S) and as a TWI hardware interface for all AVR with built-in TWI hardware (twimaster.c). + Since the API for these two implementations is exactly the same, an application can be linked either against the + software I2C implementation or the hardware I2C implementation. + + Use 4.7k pull-up resistor on the SDA and SCL pin. + + Adapt the SCL and SDA port and pin definitions and eventually the delay routine in the module + i2cmaster.S to your target when using the software I2C implementation ! + + Adjust the CPU clock frequence F_CPU in twimaster.c or in the Makfile when using the TWI hardware implementaion. + + @note + The module i2cmaster.S is based on the Atmel Application Note AVR300, corrected and adapted + to GNU assembler and AVR-GCC C call interface. + Replaced the incorrect quarter period delays found in AVR300 with + half period delays. + + @author Peter Fleury pfleury@gmx.ch http://jump.to/fleury + + @par API Usage Example + The following code shows typical usage of this library, see example test_i2cmaster.c + + @code + + #include + + + #define Dev24C02 0xA2 // device address of EEPROM 24C02, see datasheet + + int main(void) + { + unsigned char ret; + + i2c_init(); // initialize I2C library + + // write 0x75 to EEPROM address 5 (Byte Write) + i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode + i2c_write(0x05); // write address = 5 + i2c_write(0x75); // write value 0x75 to EEPROM + i2c_stop(); // set stop conditon = release bus + + + // read previously written value back from EEPROM address 5 + i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode + + i2c_write(0x05); // write address = 5 + i2c_rep_start(Dev24C02+I2C_READ); // set device address and read mode + + ret = i2c_readNak(); // read one byte from EEPROM + i2c_stop(); + + for(;;); + } + @endcode + +*/ +#endif /* DOXYGEN */ + +/**@{*/ + +#if (__GNUC__ * 100 + __GNUC_MINOR__) < 304 +#error "This library requires AVR-GCC 3.4 or later, update to newer AVR-GCC compiler !" +#endif + +#include + +/** defines the data direction (reading from I2C device) in i2c_start(),i2c_rep_start() */ +#define I2C_READ 1 + +/** defines the data direction (writing to I2C device) in i2c_start(),i2c_rep_start() */ +#define I2C_WRITE 0 + + +/** + @brief initialize the I2C master interace. Need to be called only once + @param void + @return none + */ +extern void i2c_init(void); + + +/** + @brief Terminates the data transfer and releases the I2C bus + @param void + @return none + */ +extern void i2c_stop(void); + + +/** + @brief Issues a start condition and sends address and transfer direction + + @param addr address and transfer direction of I2C device + @retval 0 device accessible + @retval 1 failed to access device + */ +extern unsigned char i2c_start(unsigned char addr); + + +/** + @brief Issues a repeated start condition and sends address and transfer direction + + @param addr address and transfer direction of I2C device + @retval 0 device accessible + @retval 1 failed to access device + */ +extern unsigned char i2c_rep_start(unsigned char addr); + + +/** + @brief Issues a start condition and sends address and transfer direction + + If device is busy, use ack polling to wait until device ready + @param addr address and transfer direction of I2C device + @return none + */ +extern void i2c_start_wait(unsigned char addr); + + +/** + @brief Send one byte to I2C device + @param data byte to be transfered + @retval 0 write successful + @retval 1 write failed + */ +extern unsigned char i2c_write(unsigned char data); + + +/** + @brief read one byte from the I2C device, request more data from device + @return byte read from I2C device + */ +extern unsigned char i2c_readAck(void); + +/** + @brief read one byte from the I2C device, read is followed by a stop condition + @return byte read from I2C device + */ +extern unsigned char i2c_readNak(void); + +/** + @brief read one byte from the I2C device + + Implemented as a macro, which calls either i2c_readAck or i2c_readNak + + @param ack 1 send ack, request more data from device
+ 0 send nak, read is followed by a stop condition + @return byte read from I2C device + */ +extern unsigned char i2c_read(unsigned char ack); +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + + +/**@}*/ +#endif diff --git a/keyboards/ergodox/ergodone/matrix.c b/keyboards/ergodox/ergodone/matrix.c new file mode 100644 index 0000000000..2eb8f24ba8 --- /dev/null +++ b/keyboards/ergodox/ergodone/matrix.c @@ -0,0 +1,295 @@ +#include +#include +#include +#include "wait.h" +#include "action_layer.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "ergodone.h" +#include "expander.h" +#ifdef DEBUG_MATRIX_SCAN_RATE +#include "timer.h" +#endif + +/* + * This constant define not debouncing time in msecs, but amount of matrix + * scan loops which should be made to get stable debounced results. + * + * On Ergodox matrix scan rate is relatively low, because of slow I2C. + * Now it's only 317 scans/second, or about 3.15 msec/scan. + * According to Cherry specs, debouncing time is 5 msec. + * + * And so, there is no sense to have DEBOUNCE higher than 2. + */ + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; + +// Debouncing: store for each key the number of scans until it's eligible to +// change. When scanning the matrix, ignore any changes in keys that have +// already changed in the last DEBOUNCE scans. +static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS]; + +static matrix_row_t read_cols(uint8_t row); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + +#ifdef DEBUG_MATRIX_SCAN_RATE +uint32_t matrix_timer; +uint32_t matrix_scan_count; +#endif + + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +__attribute__ ((weak)) +void matrix_scan_user(void) {} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + // disable JTAG + MCUCR = (1<1000) { + print("matrix scan frequency: "); + pdec(matrix_scan_count); + print("\n"); + matrix_print(); + + matrix_timer = timer_now; + matrix_scan_count = 0; + } +#endif + + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + select_row(i); + wait_us(30); // without this wait read unstable value. + matrix_row_t mask = debounce_mask(i); + matrix_row_t cols = (read_cols(i) & mask) | (matrix[i] & ~mask); + debounce_report(cols ^ matrix[i], i); + matrix[i] = cols; + + unselect_rows(); + } + + matrix_scan_quantum(); + + return 1; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1< http://jump.to/fleury +* File: $Id: twimaster.c,v 1.3 2005/07/02 11:14:21 Peter Exp $ +* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3 +* Target: any AVR device with hardware TWI +* Usage: API compatible with I2C Software Library i2cmaster.h +**************************************************************************/ +#include +#include + +#include + + +/* define CPU frequency in Mhz here if not defined in Makefile */ +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +/* I2C clock in Hz */ +#define SCL_CLOCK 400000L + + +/************************************************************************* + Initialization of the I2C bus interface. Need to be called only once +*************************************************************************/ +void i2c_init(void) +{ + /* initialize TWI clock + * minimal values in Bit Rate Register (TWBR) and minimal Prescaler + * bits in the TWI Status Register should give us maximal possible + * I2C bus speed - about 444 kHz + * + * for more details, see 20.5.2 in ATmega16/32 secification + */ + + TWSR = 0; /* no prescaler */ + TWBR = 10; /* must be >= 10 for stable operation */ + +}/* i2c_init */ + + +/************************************************************************* + Issues a start condition and sends address and transfer direction. + return 0 = device accessible, 1= failed to access device +*************************************************************************/ +unsigned char i2c_start(unsigned char address) +{ + uint8_t twst; + + // send START condition + TWCR = (1<count == 1) { + register_code (KC_RSFT); + register_code (KC_SCLN); + } else { + register_code (KC_SCLN); + } +} + +void dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code (KC_RSFT); + unregister_code (KC_SCLN); + } else { + unregister_code (KC_SCLN); + } +} + +void dance_egg (qk_tap_dance_state_t *state, void *user_data) { + if (state->count >= 10) { + SEND_STRING ("Safety dance!"); + reset_tap_dance (state); + } +} + +// on each tap, light up one led, from right to left +// on the forth tap, turn them off from right to left +void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) { + if (!skip_leds) { + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + skip_leds = true; + } + switch (state->count) { + case 1: + ergodox_right_led_3_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_1_on(); + break; + case 4: + ergodox_right_led_3_off(); + _delay_ms(50); + ergodox_right_led_2_off(); + _delay_ms(50); + ergodox_right_led_1_off(); + + } +} + +// on the fourth tap, set the keyboard on flash state +void dance_flsh_finished(qk_tap_dance_state_t *state, void *user_data) { + if (state->count >= 4) { +#ifdef LAYER_UNDERGLOW_LIGHTING + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0xff,0x00,0x00); +#endif + reset_keyboard(); + reset_tap_dance(state); + } +} + +void diablo_tapdance_master (qk_tap_dance_state_t *state, void *user_data, uint8_t diablo_key) { + if (state->count >= 7) { + diablo_key_time[diablo_key] = diablo_times[0]; + reset_tap_dance(state); + } else { + diablo_key_time[diablo_key] = diablo_times[state->count - 1]; + } +} + +void diablo_tapdance1 (qk_tap_dance_state_t *state, void *user_data) { + diablo_tapdance_master (state, user_data, 0); +} + +void diablo_tapdance2 (qk_tap_dance_state_t *state, void *user_data) { + diablo_tapdance_master (state, user_data, 1); +} + +void diablo_tapdance3 (qk_tap_dance_state_t *state, void *user_data) { + diablo_tapdance_master (state, user_data, 2); +} + +void diablo_tapdance4 (qk_tap_dance_state_t *state, void *user_data) { + diablo_tapdance_master (state, user_data, 3); +} + + +// if the flash state didnt happen, then turn off leds, left to right +void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) { + _delay_ms(200); + ergodox_right_led_1_off(); + _delay_ms(200); + ergodox_right_led_2_off(); + _delay_ms(200); + ergodox_right_led_3_off(); + _delay_ms(500); + skip_leds = false; +} + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + //Tap one for Space, and twice for Enter + [SFT_CAP] = ACTION_TAP_DANCE_DOUBLE(KC_LSHIFT, KC_CAPS), + // Special Z + [TD_DIABLO_J] = ACTION_TAP_DANCE_DOUBLE(KC_J, S(KC_J)), + // Once for colin, twice for semi-colin + [TD_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset), + // Tap until you get a surprise + [TD_EGG] = ACTION_TAP_DANCE_FN (dance_egg), + //Once for Blue, Twice for Green, Thrice for Red, and four to flash + [TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED (dance_flsh_each, dance_flsh_finished, dance_flsh_reset), + + [TD_DIABLO_1] = ACTION_TAP_DANCE_FN(diablo_tapdance1), + [TD_DIABLO_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2), + [TD_DIABLO_3] = ACTION_TAP_DANCE_FN(diablo_tapdance3), + [TD_DIABLO_4] = ACTION_TAP_DANCE_FN(diablo_tapdance4), + +}; +#endif + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = + | 1 ! | 2 @ | 3 # | 4 $ | 5 % | TG(4)| | TG(4)| 6 ^ | 7 & | 8 * | 9 ( | 0 ) | - _ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | Q | W | E | R | T | TG(3)| |TG(3) | Y | U | I | O | P | \ | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Bksp | A | S | D | F | G |------| |------| H | J | K | L | ; | ' " | + * |--------+------+------+------+------+------| TG(2)| | TG(2)|------+------+------+------+------+--------| + * | Shift | Z | X | C | V | B | | | | N | M | , < | . > | UP | Shift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | `/SYM| ' " | LGUI | [ { | ] } | | SYMB | ? / | LEFT | DOWN |RIGHT | + * `----------------------------------' `----------------------------------' + * ,--------------. ,--------------. + * |Alt/Ap| Win | | Alt |Ctl/Esc| + * ,------|------|-------| |------+-------+------. + * | | | Home | | PgUp | | | + * | Space| Bksp |-------| |------| DEL |Enter | + * | | | End | | PgDn | | | + * `---------------------' `---------------------' + */ + [BASE] = KEYMAP( + KC_EQUAL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(MOUS), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(DIABLO), + KC_BSPACE, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSHIFT, CTL_T(KC_Z),KC_X, KC_C, KC_V, KC_B, TG(OVERWATCH), + LT(SYMB,KC_GRAVE),KC_QUOTE, KC_LGUI, KC_LBRACKET,KC_RBRACKET, + + ALT_T(KC_APPLICATION), KC_LGUI, + KC_HOME, + KC_SPACE, KC_BSPACE, KC_END, + + TG(SYMB), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + TG(DVORAK), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, + KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_QUOTE), + TG(COLEMAK), KC_N, KC_M, KC_COMMA, KC_DOT, CTL_T(KC_SLASH),KC_RSHIFT, + KC_FN1, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, + KC_LALT, CTL_T(KC_ESCAPE), + KC_PGUP, + KC_PGDOWN, KC_DELETE, KC_ENTER + ), +/* Keymap 1: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | F | P | G | L1 | | L1 | J | L | U | Y | ; | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | R | S | T | D |------| |------| H | N | E | I |O / L2| ' | + * |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | K | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[COLEMAK] = KEYMAP( + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(MOUS), + KC_DELT, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(DIABLO), + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(OVERWATCH), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LBRACKET,KC_RBRACKET, + ALT_T(KC_APP), KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_TRANSPARENT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_NO, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + KC_H, KC_N, KC_E, KC_I, LT(MOUS, KC_O), KC_QUOTE, + KC_TRANSPARENT,KC_K, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLASH),KC_RSHIFT, + KC_FN1, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_TAB, KC_ENT + ), +/* Keymap 2: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | \ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | ' | , | . | P | Y | L1 | | L1 | F | G | C | R | L | / | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | O | E | U | I |------| |------| D | H | T | N |S / L2| - | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |:/Ctrl| Q | J | K | X | | | | B | M | W | V |Z/Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[DVORAK] = KEYMAP( + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(MOUS), + KC_DELT, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(DIABLO), + KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(OVERWATCH), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LBRACKET,KC_RBRACKET, + ALT_T(KC_APP), KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_TRANSPARENT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_TRANSPARENT, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_D, KC_H, KC_T, KC_N, LT(MOUS, KC_S), KC_MINS, + KC_NO,KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSHIFT, + KC_FN1, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_TAB, KC_ENT + ), + + /* Keymap 3: Symbol Layer +* +* ,--------------------------------------------------. ,--------------------------------------------------. +* | ESC | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | +* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +* | VERSION| ! | @ | { | } | | | | | | + | 7 | 8 | 9 | * | F12 | +* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +* | MAKE | # | $ | ( | ) | ` |------| |------| - | 4 | 5 | 6 | / | PrtSc | +* |--------+------+------+------+------+------| COVE | | |------+------+------+------+------+--------| +* | RESET | % | ^ | [ | ] | ~ | CUBE | | | NUM | 1 | 2 | 3 | = | PAUSE | +* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' +* | LT0 | & | * | : | ; | | 0 | 0 | NUM. | ENT | ENT | +* `----------------------------------' `----------------------------------' +* ,-------------. ,-------------. +* | RGBM | RED | | OFF | SOLID| +* ,------|------|------| |------+------+------. +* | | | GREEN| | | | | +* | RGB | RGB |------| |------| NUM. | NUM0 | +* | DARK |BRITE | BLUE | | | | | +* `--------------------' `--------------------' +*/ + [SYMB] = KEYMAP( + KC_ESCAPE,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRANSPARENT, + M_VERSION, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRANSPARENT, + M_MAKE, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE, + TD(TD_FLSH), KC_PERC, KC_CIRC, KC_LBRACKET,KC_RBRACKET,KC_TILD, M_COVECUBE, + KC_NO, KC_AMPR, KC_ASTR, KC_COLN, KC_SCOLON, + RGB_MOD, RGB_0000FF, + RGB_008000, + RGB_VAD, RGB_VAI, RGB_FF0000, + + KC_TRANSPARENT, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRANSPARENT, KC_KP_PLUS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_ASTERISK, KC_F12, + KC_KP_MINUS, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_SLASH,KC_PSCREEN, + KC_TRANSPARENT, KC_NUMLOCK, KC_KP_1, KC_KP_2, KC_KP_3, KC_EQUAL, KC_PAUSE, + KC_KP_0, KC_KP_0, KC_KP_DOT, KC_KP_ENTER, KC_KP_ENTER, + RGB_TOG, RGB_SLD, + RGB_HUI, + RGB_HUD, KC_KP_DOT, KC_KP_0 + ), + +/* Keymap 4: Customized Overwatch Layout + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | SALT | SYMM | MORE | DOOM | | | | | F9 | F10 | F11 | F12 | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | F1 | K | Q | W | E | R | T | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | TAB | G | A | S | D | F |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LCTR | LSHFT| Z | X | C | M | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | J | U | I | Y | T | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | O | P | | | | + * ,------|------|------| |------+------+------. + * | | | LGUI | | | | | + * | V | SPACE|------ |------| | Enter| + * | | | H | | | | | + * `--------------------' `--------------------' + */ + [OVERWATCH] = KEYMAP( + KC_ESCAPE, M_SALT, M_SYMM, M_MORESALT, M_DOOMFIST, KC_NO, KC_NO, + KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, + KC_LCTL, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_M, KC_TRANSPARENT, + KC_G, KC_U, KC_I, KC_Y, KC_T, + KC_O, KC_P, + KC_LGUI, + KC_V, KC_SPACE, KC_H, + + KC_NO, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_NO, KC_ENTER + ), + +/* Keymap 3: + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | V | D | ALT | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | S | I | F | M | T | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Q | 1 | 2 | 3 | 4 | G |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | NUMLOCK| NUM1 | NUM2 | NUM3 | NUM4 | Z | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LCTL | MAC1 | MAC2 | MAC3 | MAC4 | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | L | J | | | | + * ,------|------|------| |------+------+------. + * | | | G | | | | | + * | SPACE| Q |------ |------| | | + * | SHIFT| ALT | 0MAC | | | | | + * `--------------------' `--------------------' + */ + [DIABLO] = KEYMAP( + KC_ESCAPE, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO, + KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, KC_TRANSPARENT, + KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, + KC_NUMLOCK, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_4, KC_Z, KC_NO, + KC_LCTL, TD(TD_DIABLO_1), TD(TD_DIABLO_2), TD(TD_DIABLO_3), TD(TD_DIABLO_4), + KC_L, KC_J, + KC_F, + SFT_T(KC_SPACE), ALT_T(KC_Q), KC_DIABLO_CLEAR, + + + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_NO, KC_NO + ), + +/* Keymap 4: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | MsUp | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | |MsLeft|MsDown|MsRght| | |------| |------| | | Acc0 | Acc1 | Acc2 | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | Acc0 | Acc1 | Acc2 | | | | | | Play | Stop | Mute |VolDn |VolUp | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | MWUp | | | | | + * | Lclk | Rclk |------| |------| MBn4 | MBn4 | + * | | | MWDn | | Mclk | | | + * `--------------------' `--------------------' + */ + [MOUS] = KEYMAP( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_NO, KC_NO, KC_MS_UP, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT,KC_NO, KC_NO, + KC_NO, KC_MS_ACCEL0,KC_MS_ACCEL1,KC_MS_ACCEL2,KC_NO, KC_NO, KC_TRANSPARENT, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO,KC_NO, + KC_MS_WH_UP, + KC_MS_BTN1,KC_MS_BTN2,KC_MS_WH_DOWN, + + KC_TRANSPARENT,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, + KC_TRANSPARENT,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, + KC_NO,KC_NO,KC_MS_ACCEL0,KC_MS_ACCEL1,KC_MS_ACCEL2,KC_NO,KC_NO, + KC_TRANSPARENT,KC_MEDIA_PLAY_PAUSE,KC_MEDIA_STOP,KC_AUDIO_MUTE,KC_AUDIO_VOL_DOWN,KC_AUDIO_VOL_UP,KC_NO, + KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, + KC_NO,KC_NO, + KC_NO, + KC_MS_BTN3,KC_MS_BTN4,KC_MS_BTN5 + ), + +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB), + // FN1 - Momentary Layer 1 (Symbols) + [2] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_UP), + [3] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_LEFT), + [4] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_DOWN), + [5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_RIGHT), +}; + +void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) +{ + +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case 0: + if (record->event.pressed) { + // Output Keyboard Firmware info + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + return false; + } + case 1: + if (record->event.pressed) { + // Symmentra "Left Click to win" salt + return MACRO( I(50), T(ENTER), I(5), D(LSFT), T(L), U(LSFT), T(E), T(F), T(T), T(SPACE), T(C), T(L), T(I), T(C), T(K), T(SPACE), T(T), T(O), T(SPACE), T(W), T(I), T(N), D(LSFT), T(1), U(LSFT), T(ENTER), END ); + } + case 2: + if (record->event.pressed) { + //salt salt salt + return MACRO( I(50), T(ENTER), I(5), D(LSFT), T(S), U(LSFT), T(A), T(L), T(T), T(COMMA), T(SPACE), T(S), T(A), T(L), T(T), T(COMMA), T(SPACE), T(S), T(A), T(L), T(T), T(DOT), T(DOT), T(DOT), T(ENTER), END ); + } + case 3: + if (record->event.pressed) { + // your saltiness makes me hard + return MACRO( I(50), T(ENTER), I(5), D(LSFT), T(Y), U(LSFT), T(O), T(U), T(R), T(SPACE), T(S), T(A), T(L), T(T), T(SPACE), T(O), T(N), T(L), T(Y), T(SPACE), T(M), T(A), T(K), T(E), T(S), T(SPACE), T(M), T(Y), T(SPACE), T(P), T(E), T(N), T(I), T(S), T(SPACE), T(T), T(H), T(A), T(T), T(SPACE), T(M), T(U), T(C), T(H), T(SPACE), T(H), T(A), T(R), T(D), T(E), T(R), T(COMMA), T(SPACE), T(A), T(N), T(D), T(SPACE), T(E), T(V), T(E), T(N), T(SPACE), T(M), T(O), T(R), T(E), T(SPACE), T(A), T(G), T(G), T(R), T(E), T(S), T(S), T(I), T(V), T(E), D(LSFT), T(1), U(LSFT), T(ENTER), END ); + } + case 4: + if (record->event.pressed) { + // make ergodox-ez-drashna-custom-teensy + return MACRO( I(5), T(M), T(A), T(K), T(E), T(SPACE), T(E), T(R), T(G), T(O), T(D), T(O), T(X), T(MINUS), T(E), T(Z), T(MINUS), T(D), T(R), T(A), T(S), T(H), T(N), T(A), T(MINUS), T(C), T(U), T(S), T(T), T(O), T(M), T(MINUS), T(T), T(E), T(E), T(N), T(S), T(Y), T(ENTER), END ); + } + case 5: + if (record->event.pressed) { + //super secret hash + SEND_STRING("supersecrethash"); + return MACRO_NONE; + } + case 6: + if (record->event.pressed) { + // Please sir, can I have some more salt + return MACRO( I(50), T(ENTER), I(5), D(LSFT), T(P), U(LSFT), T(L), T(E), T(A), T(S), T(E), T(SPACE), T(S), T(I), T(R), T(COMMA), T(SPACE), T(C), T(A), T(N), T(SPACE), D(LSFT), T(I), U(LSFT), T(SPACE), T(H), T(A), T(V), T(E), T(SPACE), T(S), T(O), T(M), T(E), T(SPACE), T(M), T(O), T(R), T(E), T(SPACE), T(S), T(A), T(L), T(T), D(LSFT), T(SLASH), U(LSFT), D(LSFT), T(1), U(LSFT), T(ENTER), END ); + } + break; + case 7: + if (record->event.pressed) { + // DoomFisted + // Hey, look at me. I'm Doomfist, and I'm overpowered! + // All I do is spam punches all day! I'm DPS, tank and + // defense, rolled into one! All I need is team healing to be complete! + return MACRO( I(50), T(ENTER), I(5), D(LSFT), T(H), U(LSFT), T(E), T(Y), T(COMMA), T(SPACE), T(L), T(O), T(O), T(K), T(SPACE), T(A), T(T), T(SPACE), T(M), T(E), T(DOT), T(SPACE), T(SPACE), D(LSFT), T(I), U(LSFT), T(QUOTE), T(M), T(SPACE), D(LSFT), T(D), U(LSFT), T(O), T(O), T(M), T(F), T(I), T(S), T(T), T(COMMA), T(SPACE), T(A), T(N), T(D), T(SPACE), D(LSFT), T(I), U(LSFT), T(QUOTE), T(M), T(SPACE), T(O), T(V), T(E), T(R), T(P), T(O), T(W), T(E), T(R), T(E), T(D), D(LSFT), T(1), U(LSFT), T(SPACE), T(SPACE), D(LSFT), T(A), U(LSFT), T(L), T(L), T(SPACE), D(LSFT), T(I), U(LSFT), T(SPACE), T(D), T(O), T(SPACE), T(I), T(S), T(SPACE), T(S), T(P), T(A), T(M), T(SPACE), T(P), T(U), T(N), T(C), T(H), T(E), T(S), T(SPACE), T(A), T(L), T(L), T(SPACE), T(D), T(A), T(Y), D(LSFT), T(1), U(LSFT), T(SPACE), T(SPACE), T(SPACE), D(LSFT), T(I), U(LSFT), T(QUOTE), T(M), T(SPACE), D(LSFT), T(D), U(LSFT), D(LSFT), T(P), U(LSFT), D(LSFT), T(S), U(LSFT), T(COMMA), T(SPACE), T(T), T(A), T(N), T(K), T(SPACE), T(A), T(N), T(D), T(SPACE), T(D), T(E), T(F), T(E), T(N), T(S), T(E), T(COMMA), T(SPACE), T(R), T(O), T(L), T(L), T(E), T(D), T(SPACE), T(I), T(N), T(T), T(O), T(SPACE), T(O), T(N), T(E), D(LSFT), T(1), U(LSFT), T(SPACE), D(LSFT), T(A), U(LSFT), T(L), T(L), T(SPACE), D(LSFT), T(I), U(LSFT), T(SPACE), T(N), T(E), T(E), T(D), T(SPACE), T(I), T(S), T(SPACE), T(T), T(E), T(A), T(M), T(SPACE), T(H), T(E), T(A), T(L), T(I), T(N), T(G), T(SPACE), T(T), T(O), T(SPACE), T(B), T(E), T(SPACE), T(C), T(O), T(M), T(P), T(L), T(E), T(T), T(E), D(LSFT), T(1), U(LSFT), T(ENTER), END ); + } + case 8: //MAC1 - Hold for rshift and } on tap + if (record->event.pressed) { + key_timer = timer_read(); + return MACRO(D(LSFT), END ); + } else { + return checktime() ? MACRO(U(LSFT),D(RALT),T(7),U(RALT),END): MACRO(U(LSFT),END); + }; break; + case 9: //MAC1 - Hold for rshift and } on tap + if (record->event.pressed) { + key_timer = timer_read(); + return MACRO(D(RSFT), END ); + } else { + return checktime() ? MACRO(U(RSFT),D(RALT),T(0),U(RALT),END): MACRO(U(RSFT),END); + }; break; + case 10: //MAC2 - Hold for lctrl and [ on tap + if (record->event.pressed) { + key_timer = timer_read(); + return MACRO(D(LCTL), END ); + } else {return checktime() ? MACRO(U(LCTL),D(RALT),T(8),U(RALT),END):MACRO(U(LCTL),END); + }; break; + case 11: //MAC3 - Hold for rctrl and ] on tap + if (record->event.pressed) { + key_timer = timer_read(); + return MACRO(D(RCTL), END ); + } else { + return checktime() ? MACRO(U(RCTL),D(RALT),T(9),U(RALT),END):MACRO(U(RCTL),END); + }; break; + } + return MACRO_NONE; +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + rgblight_mode(1); + } + return false; + break; + + case RGB_0000FF: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0x00,0x00,0xff); + #endif + } + return false; + break; + + case RGB_008000: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0x00,0x80,0x00); + #endif + } + return false; + break; + + case RGB_FF0000: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0xff,0x00,0x00); + #endif + } + return false; + break; + + case RGB_800080: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0x80,0x00,0x80); + #endif + } + return false; + break; + + case RGB_00FF90: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb(0x00,0xff,0x90); + #endif + } + return false; + break; + case KC_DIABLO_CLEAR: + if (record->event.pressed) { + uint8_t dtime; + + for (dtime = 0; dtime < 4; dtime++) { + diablo_key_time[dtime] = diablo_times[0]; + } + } + return false; + break; + + } + return true; +} + +void send_diablo_keystroke (uint8_t diablo_key) { + if (current_layer == DIABLO) { + switch (diablo_key) { + case 0: + SEND_STRING("1"); + break; + case 1: + SEND_STRING("2"); + break; + case 2: + SEND_STRING("3"); + break; + case 3: + SEND_STRING("4"); + break; + } + } +} + +void run_diablo_macro_check(void) { + uint8_t dtime; + + for (dtime = 0; dtime < 4; dtime++) { + if (check_dtimer(dtime) && diablo_key_time[dtime]) { + diablo_timer[dtime] = timer_read(); + send_diablo_keystroke(dtime); + } + } + +} + +void matrix_init_user(void) { // Runs boot tasks for keyboard + wait_ms(500); + ergodox_board_led_on(); + wait_ms(200); + ergodox_right_led_1_on(); + wait_ms(200); + ergodox_right_led_2_on(); + wait_ms(200); + ergodox_right_led_3_on(); + wait_ms(200); + ergodox_board_led_off(); + wait_ms(200); + ergodox_right_led_1_off(); + wait_ms(200); + ergodox_right_led_2_off(); + wait_ms(200); + ergodox_right_led_3_off(); + + +#ifdef LAYER_UNDERGLOW_LIGHTING + rgblight_enable(); + rgblight_sethsv(195,255,255); +#endif + has_layer_changed = false; + + + +}; + + + +void matrix_scan_user(void) { // runs frequently to update info + uint8_t modifiders = get_mods(); + uint8_t layer = biton32(layer_state); + + if (!skip_leds) { + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + + if ( modifiders & MODS_SHIFT_MASK) { + ergodox_right_led_1_on(); + } + if ( modifiders & MODS_CTRL_MASK) { + ergodox_right_led_2_on(); + } + if ( modifiders & MODS_ALT_MASK) { + ergodox_right_led_3_on(); + } + + } + + switch (layer) { + case SYMB: + #ifdef LAYER_UNDERGLOW_LIGHTING + if (has_layer_changed) { + rgblight_sethsv (240,255,255); + } + #else + ergodox_right_led_3_on(); + #endif + break; + case OVERWATCH: + #ifdef LAYER_UNDERGLOW_LIGHTING + if (has_layer_changed) { + rgblight_sethsv (30,255,255); + } + #else + ergodox_right_led_2_on(); + #endif + break; + case DIABLO: + #ifdef LAYER_UNDERGLOW_LIGHTING + if (has_layer_changed) { + rgblight_sethsv (0,255,255); + } + #else + ergodox_right_led_1_on(); + #endif + break; + case MOUS: + #ifdef LAYER_UNDERGLOW_LIGHTING + if (has_layer_changed) { + rgblight_sethsv (60,255,255); + } + #else + ergodox_right_led_3_on(); + ergodox_right_led_2_on(); + #endif + break; + case COLEMAK: + #ifdef LAYER_UNDERGLOW_LIGHTING + if (has_layer_changed) { + rgblight_sethsv (300,255,255); + } + #else + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + #endif + break; + case DVORAK: + #ifdef LAYER_UNDERGLOW_LIGHTING + if (has_layer_changed) { + rgblight_sethsv (120,255,255); + } + #else + ergodox_right_led_2_on(); + ergodox_right_led_1_on(); + #endif + break; + case 7: + #ifdef LAYER_UNDERGLOW_LIGHTING + if (has_layer_changed) { + rgblight_sethsv (255,255,255); + } + #else + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + #endif + break; + default: + // Do not add anything here, as this will be ran EVERY check, and can cause a significant slowdown + #ifdef LAYER_UNDERGLOW_LIGHTING + if (has_layer_changed) { + rgblight_sethsv (195,255,255); + } + #endif + break; + } + + if (current_layer == layer) { + has_layer_changed = false; + } else { + has_layer_changed = true; + current_layer = layer; + } + run_diablo_macro_check(); +}; + + diff --git a/keyboards/ergodox/ez/keymaps/drashna/Makefile b/keyboards/ergodox/ez/keymaps/drashna/Makefile new file mode 100644 index 0000000000..98da6c4ae6 --- /dev/null +++ b/keyboards/ergodox/ez/keymaps/drashna/Makefile @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = yes +RGBLIGHT_ANIMATION = no + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/ergodox/ez/keymaps/drashna/config.h b/keyboards/ergodox/ez/keymaps/drashna/config.h new file mode 100644 index 0000000000..258dc391fe --- /dev/null +++ b/keyboards/ergodox/ez/keymaps/drashna/config.h @@ -0,0 +1,11 @@ + +#include "../../config.h" + + + +// make this easy to toggle behavior, so that it can be more easily toggled +#define LAYER_UNDERGLOW_LIGHTING + +#ifdef LAYER_UNDERGLOW_LIGHTING +#undef RGBLIGHT_ANIMATIONS +#endif \ No newline at end of file diff --git a/keyboards/ergodox/ez/keymaps/drashna/keymap.c b/keyboards/ergodox/ez/keymaps/drashna/keymap.c new file mode 100644 index 0000000000..a6e5b3335a --- /dev/null +++ b/keyboards/ergodox/ez/keymaps/drashna/keymap.c @@ -0,0 +1,195 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + + +#include "keymap_german.h" + +#include "keymap_nordic.h" + +#define VERSION M(0) + + +// Define layer names +#define BASE 0 +#define SYMB 1 +#define MOUS 2 + +#ifdef LAYER_UNDERGLOW_LIGHTING +bool has_layer_changed = true; + +#define rgblight_set_teal rgblight_setrgb(0x00, 0xFF, 0xFF) +#define rgblight_set_red rgblight_setrgb(0xFF, 0x00, 0x00) +#define rgblight_set_blue rgblight_setrgb(0x00, 0xFF, 0x00); +#define rgblight_set_green rgblight_setrgb(0x00, 0x00, 0xFF); +#define rgblight_set_yellow rgblight_setrgb(0xFF, 0xFF, 0x00); + + +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL)) +#define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#endif + + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, +#ifndef LAYER_UNDERGLOW_LIGHTING + RGB_SLD, +#endif +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = KEYMAP(KC_EQUAL,KC_1,KC_2,KC_3,KC_4,KC_5,KC_LEFT,KC_DELETE,KC_Q,KC_W,KC_E,KC_R,KC_T,TG(1),KC_BSPACE,KC_A,KC_S,KC_D,KC_F,KC_G,KC_LSHIFT,CTL_T(KC_Z),KC_X,KC_C,KC_V,KC_B,ALL_T(KC_NO),LT(1,KC_GRAVE),KC_QUOTE,LALT(KC_LSHIFT),KC_LEFT,KC_RIGHT,ALT_T(KC_APPLICATION),KC_LGUI,KC_HOME,KC_SPACE,KC_BSPACE,KC_END,KC_RIGHT,KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINUS,TG(1),KC_Y,KC_U,KC_I,KC_O,KC_P,KC_BSLASH,KC_H,KC_J,KC_K,KC_L,LT(2,KC_SCOLON),GUI_T(KC_QUOTE),MEH_T(KC_NO),KC_N,KC_M,KC_COMMA,KC_DOT,CTL_T(KC_SLASH),KC_RSHIFT,KC_UP,KC_DOWN,KC_LBRACKET,KC_RBRACKET,MO(1),KC_LALT,CTL_T(KC_ESCAPE),KC_PGUP,KC_PGDOWN,KC_TAB,KC_ENTER), + +#ifdef LAYER_UNDERGLOW_LIGHTING + [1] = KEYMAP(KC_ESCAPE,KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_TRANSPARENT,VERSION,KC_EXLM,KC_AT,KC_LCBR,KC_RCBR,KC_PIPE,KC_TRANSPARENT,VRSN,KC_HASH,KC_DLR,KC_LPRN,KC_RPRN,KC_GRAVE,RESET,KC_PERC,KC_CIRC,KC_LBRACKET,KC_RBRACKET,KC_TILD,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,RGB_VAD,RGB_VAI,KC_TRANSPARENT,KC_TRANSPARENT,KC_F6,KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_TRANSPARENT,KC_UP,KC_7,KC_8,KC_9,KC_ASTR,KC_F12,KC_DOWN,KC_4,KC_5,KC_6,KC_PLUS,KC_TRANSPARENT,KC_TRANSPARENT,KC_AMPR,KC_1,KC_2,KC_3,KC_BSLASH,KC_TRANSPARENT,KC_TRANSPARENT,KC_DOT,KC_0,KC_EQUAL,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT), +#else + [1] = KEYMAP(KC_ESCAPE,KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_TRANSPARENT,VERSION,KC_EXLM,KC_AT,KC_LCBR,KC_RCBR,KC_PIPE,KC_TRANSPARENT,VRSN,KC_HASH,KC_DLR,KC_LPRN,KC_RPRN,KC_GRAVE,RESET,KC_PERC,KC_CIRC,KC_LBRACKET,KC_RBRACKET,KC_TILD,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,RGB_MOD,KC_TRANSPARENT,KC_TRANSPARENT,RGB_VAD,RGB_VAI,KC_TRANSPARENT,KC_TRANSPARENT,KC_F6,KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_TRANSPARENT,KC_UP,KC_7,KC_8,KC_9,KC_ASTR,KC_F12,KC_DOWN,KC_4,KC_5,KC_6,KC_PLUS,KC_TRANSPARENT,KC_TRANSPARENT,KC_AMPR,KC_1,KC_2,KC_3,KC_BSLASH,KC_TRANSPARENT,KC_TRANSPARENT,KC_DOT,KC_0,KC_EQUAL,KC_TRANSPARENT,RGB_TOG,RGB_SLD,KC_TRANSPARENT,KC_TRANSPARENT,RGB_HUD,RGB_HUI), +#endif + + [2] = KEYMAP(KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MS_UP,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MS_LEFT,KC_MS_DOWN,KC_MS_RIGHT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MS_BTN1,KC_MS_BTN2,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MEDIA_PLAY_PAUSE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MEDIA_PREV_TRACK,KC_MEDIA_NEXT_TRACK,KC_TRANSPARENT,KC_TRANSPARENT,KC_AUDIO_VOL_UP,KC_AUDIO_VOL_DOWN,KC_AUDIO_MUTE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_WWW_BACK), + +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(1) +}; + +// leaving this in place for compatibilty with old keymaps cloned and re-compiled. +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + } + return MACRO_NONE; +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; +#ifndef LAYER_UNDERGLOW_LIGHTING + case RGB_SLD: + if (record->event.pressed) { + rgblight_mode(1); + } + return false; + break; +#endif + + } + return true; +} + + + + +void matrix_scan_user(void) { + + uint8_t new_layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + +#ifdef LAYER_UNDERGLOW_LIGHTING + static uint8_t old_layer = 0; + uint8_t modifiders = get_mods(); + + if ( modifiders & MODS_SHIFT_MASK) { + ergodox_right_led_1_on(); + } + if ( modifiders & MODS_CTRL_MASK) { + ergodox_right_led_2_on(); + } + if ( modifiders & MODS_ALT_MASK) { + ergodox_right_led_3_on(); + } + + if (old_layer != new_layer) { + has_layer_changed = true; + old_layer = new_layer; + } + if (has_layer_changed) { + switch (new_layer) { + case 1: + rgblight_set_red; + break; + case 2: + rgblight_set_blue; + break; + case 3: + rgblight_set_green; + break; + case 4: + rgblight_set_yellow; + break; + case 5: + rgblight_setrgb(0xFF, 0xFF, 0x00); + break; + case 6: + rgblight_setrgb(0xFF, 0xFF, 0x00); + break; + case 7: + rgblight_setrgb(0xFF, 0xFF, 0xFF); + break; + default: + rgblight_set_teal; + break; + } + has_layer_changed = false; + } + +#else + switch (new_layer) { + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_3_on(); + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + break; + case 5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + break; + case 6: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case 7: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + default: + break; + } +#endif +}; diff --git a/keyboards/ergodox/ez/keymaps/drashna/readme.md b/keyboards/ergodox/ez/keymaps/drashna/readme.md new file mode 100644 index 0000000000..90fe44861a --- /dev/null +++ b/keyboards/ergodox/ez/keymaps/drashna/readme.md @@ -0,0 +1,9 @@ +# Drashna's ErgoDox EZ Underglow Mod + +This is based on the default Ergodox EZ keymap. + +This modifieds the keymay so that it uses the underglow to indicate which layer you're on, rather than the top LEDs. + +Default colors are "teal" for base layer, "red" for Symbols, and "green" for mouse/media. Blue would be the next layer, if you had more. + +Additionally, the top LEDs are Shift/Control/Alt indicators instead (in that order). \ No newline at end of file diff --git a/keyboards/ergodox/infinity/board_is31fl3731c.h b/keyboards/ergodox/infinity/board_is31fl3731c.h new file mode 100644 index 0000000000..f248cc25ba --- /dev/null +++ b/keyboards/ergodox/infinity/board_is31fl3731c.h @@ -0,0 +1,110 @@ +/* +Copyright 2016 Fred Sundvik + +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 . +*/ + +#ifndef _GDISP_LLD_BOARD_H +#define _GDISP_LLD_BOARD_H + +static const I2CConfig i2ccfg = { + 400000 // clock speed (Hz); 400kHz max for IS31 +}; + +static const uint8_t led_mask[] = { + 0xFF, 0x00, /* C1-1 -> C1-16 */ + 0xFF, 0x00, /* C2-1 -> C2-16 */ + 0xFF, 0x00, /* C3-1 -> C3-16 */ + 0xFF, 0x00, /* C4-1 -> C4-16 */ + 0x3F, 0x00, /* C5-1 -> C5-16 */ + 0x00, 0x00, /* C6-1 -> C6-16 */ + 0x00, 0x00, /* C7-1 -> C7-16 */ + 0x00, 0x00, /* C8-1 -> C8-16 */ + 0x00, 0x00, /* C9-1 -> C9-16 */ +}; + +// The address of the LED +#define LA(c, r) (c + r * 16 ) +// Need to be an address that is not mapped, but inside the range of the controller matrix +#define NA LA(8, 8) + +// The numbers in the comments are the led numbers DXX on the PCB +// The mapping is taken from the schematic of left hand side +static const uint8_t led_mapping[GDISP_SCREEN_HEIGHT][GDISP_SCREEN_WIDTH] = { +// 45 44 43 42 41 40 39 + { LA(1, 1), LA(1, 0), LA(0, 4), LA(0, 3), LA(0, 2), LA(0, 1), LA(0, 0)}, +// 52 51 50 49 48 47 46 + { LA(2, 3), LA(2, 2), LA(2, 1), LA(2, 0), LA(1, 4), LA(1, 3), LA(1, 2) }, +// 58 57 56 55 54 53 N/A + { LA(3, 4), LA(3, 3), LA(3, 2), LA(3, 1), LA(3, 0), LA(2, 4), NA }, +// 67 66 65 64 63 62 61 + { LA(5, 3), LA(5, 2), LA(5, 1), LA(5, 0), LA(4, 4), LA(4, 3), LA(4, 2) }, +// 76 75 74 73 72 60 59 + { LA(7, 3), LA(7, 2), LA(7, 1), LA(7, 0), LA(6, 3), LA(4, 1), LA(4, 0) }, +// N/A N/A N/A N/A N/A N/A 68 + { NA, NA, NA, NA, NA, NA, LA(5, 4) }, +// N/A N/A N/A N/A 71 70 69 + { NA, NA, NA, NA, LA(6, 2), LA(6, 1), LA(6, 0) }, +}; + + +#define IS31_ADDR_DEFAULT 0x74 // AD connected to GND +#define IS31_TIMEOUT 5000 + +static GFXINLINE void init_board(GDisplay *g) { + (void) g; + /* I2C pins */ + palSetPadMode(GPIOB, 0, PAL_MODE_ALTERNATIVE_2); // PTB0/I2C0/SCL + palSetPadMode(GPIOB, 1, PAL_MODE_ALTERNATIVE_2); // PTB1/I2C0/SDA + palSetPadMode(GPIOB, 16, PAL_MODE_OUTPUT_PUSHPULL); + palClearPad(GPIOB, 16); + /* start I2C */ + i2cStart(&I2CD1, &i2ccfg); + // try high drive (from kiibohd) + I2CD1.i2c->C2 |= I2Cx_C2_HDRS; + // try glitch fixing (from kiibohd) + I2CD1.i2c->FLT = 4; +} + +static GFXINLINE void post_init_board(GDisplay *g) { + (void) g; +} + +static GFXINLINE const uint8_t* get_led_mask(GDisplay* g) { + (void) g; + return led_mask; +} + +static GFXINLINE uint8_t get_led_address(GDisplay* g, uint16_t x, uint16_t y) +{ + (void) g; + return led_mapping[y][x]; +} + +static GFXINLINE void set_hardware_shutdown(GDisplay* g, bool shutdown) { + (void) g; + if(!shutdown) { + palSetPad(GPIOB, 16); + } + else { + palClearPad(GPIOB, 16); + } +} + +static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) { + (void) g; + i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, data, length, 0, 0, US2ST(IS31_TIMEOUT)); +} + +#endif /* _GDISP_LLD_BOARD_H */ diff --git a/keyboards/ergodox/infinity/board_st7565.h b/keyboards/ergodox/infinity/board_st7565.h new file mode 100644 index 0000000000..9ab636c95d --- /dev/null +++ b/keyboards/ergodox/infinity/board_st7565.h @@ -0,0 +1,113 @@ +/* + * This file is subject to the terms of the GFX License. If a copy of + * the license was not distributed with this file, you can obtain one at: + * + * http://ugfx.org/license.html + */ + +#ifndef _GDISP_LLD_BOARD_H +#define _GDISP_LLD_BOARD_H + +#define ST7565_LCD_BIAS ST7565_LCD_BIAS_9 // actually 6 +#define ST7565_ADC ST7565_ADC_NORMAL +#define ST7565_COM_SCAN ST7565_COM_SCAN_DEC +#define ST7565_PAGE_ORDER 0,1,2,3 +/* + * Custom page order for several LCD boards, e.g. HEM12864-99 + * #define ST7565_PAGE_ORDER 4,5,6,7,0,1,2,3 + */ + +#define ST7565_GPIOPORT GPIOC +#define ST7565_PORT PORTC +#define ST7565_A0_PIN 7 +#define ST7565_RST_PIN 8 +#define ST7565_MOSI_PIN 6 +#define ST7565_SLCK_PIN 5 +#define ST7565_SS_PIN 4 + +#define palSetPadModeRaw(portname, bits) \ + ST7565_PORT->PCR[ST7565_##portname##_PIN] = bits + +#define palSetPadModeNamed(portname, portmode) \ + palSetPadMode(ST7565_GPIOPORT, ST7565_##portname##_PIN, portmode) + +#define ST7565_SPI_MODE PORTx_PCRn_DSE | PORTx_PCRn_MUX(2) +// DSPI Clock and Transfer Attributes +// Frame Size: 8 bits +// MSB First +// CLK Low by default +static const SPIConfig spi1config = { + // Operation complete callback or @p NULL. + .end_cb = NULL, + //The chip select line port - when not using pcs. + .ssport = ST7565_GPIOPORT, + // brief The chip select line pad number - when not using pcs. + .sspad=ST7565_SS_PIN, + // SPI initialization data. + .tar0 = + SPIx_CTARn_FMSZ(7) // Frame size = 8 bytes + | SPIx_CTARn_ASC(1) // After SCK Delay Scaler (min 50 ns) = 55.56ns + | SPIx_CTARn_DT(0) // Delay After Transfer Scaler (no minimum)= 27.78ns + | SPIx_CTARn_CSSCK(0) // PCS to SCK Delay Scaler (min 20 ns) = 27.78ns + | SPIx_CTARn_PBR(0) // Baud Rate Prescaler = 2 + | SPIx_CTARn_BR(0) // Baud rate (min 50ns) = 55.56ns +}; + +static GFXINLINE void acquire_bus(GDisplay *g) { + (void) g; + // Only the LCD is using the SPI bus, so no need to acquire + // spiAcquireBus(&SPID1); + spiSelect(&SPID1); +} + +static GFXINLINE void release_bus(GDisplay *g) { + (void) g; + // Only the LCD is using the SPI bus, so no need to release + //spiReleaseBus(&SPID1); + spiUnselect(&SPID1); +} + +static GFXINLINE void init_board(GDisplay *g) { + (void) g; + palSetPadModeNamed(A0, PAL_MODE_OUTPUT_PUSHPULL); + palSetPad(ST7565_GPIOPORT, ST7565_A0_PIN); + palSetPadModeNamed(RST, PAL_MODE_OUTPUT_PUSHPULL); + palSetPad(ST7565_GPIOPORT, ST7565_RST_PIN); + palSetPadModeRaw(MOSI, ST7565_SPI_MODE); + palSetPadModeRaw(SLCK, ST7565_SPI_MODE); + palSetPadModeNamed(SS, PAL_MODE_OUTPUT_PUSHPULL); + + spiInit(); + spiStart(&SPID1, &spi1config); + release_bus(g); +} + +static GFXINLINE void post_init_board(GDisplay *g) { + (void) g; +} + +static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) { + (void) g; + if (state) { + palClearPad(ST7565_GPIOPORT, ST7565_RST_PIN); + } + else { + palSetPad(ST7565_GPIOPORT, ST7565_RST_PIN); + } +} + +static GFXINLINE void enter_data_mode(GDisplay *g) { + palSetPad(ST7565_GPIOPORT, ST7565_A0_PIN); +} + +static GFXINLINE void enter_cmd_mode(GDisplay *g) { + palClearPad(ST7565_GPIOPORT, ST7565_A0_PIN); +} + + +static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) { + (void) g; + spiSend(&SPID1, length, data); +} + +#endif /* _GDISP_LLD_BOARD_H */ diff --git a/keyboards/ergodox/infinity/config.h b/keyboards/ergodox/infinity/config.h index 25cc8af0fc..c46edeb7b2 100644 --- a/keyboards/ergodox/infinity/config.h +++ b/keyboards/ergodox/infinity/config.h @@ -51,16 +51,9 @@ along with this program. If not, see . #define SERIAL_LINK_BAUD 562500 #define SERIAL_LINK_THREAD_PRIORITY (NORMALPRIO - 1) -// The visualizer needs gfx thread priorities -#define VISUALIZER_THREAD_PRIORITY (NORMAL_PRIORITY - 2) #define VISUALIZER_USER_DATA_SIZE 16 -#define LCD_DISPLAY_NUMBER 0 -#define LED_DISPLAY_NUMBER 1 - -#define LED_NUM_ROWS 7 -#define LED_NUM_COLS 7 /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/ergodox/infinity/drivers/gdisp/IS31FL3731C/driver.mk b/keyboards/ergodox/infinity/drivers/gdisp/IS31FL3731C/driver.mk deleted file mode 100644 index f32d0d8685..0000000000 --- a/keyboards/ergodox/infinity/drivers/gdisp/IS31FL3731C/driver.mk +++ /dev/null @@ -1,2 +0,0 @@ -GFXINC += drivers/gdisp/IS31FL3731C -GFXSRC += drivers/gdisp/IS31FL3731C/gdisp_IS31FL3731C.c diff --git a/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/driver.mk b/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/driver.mk deleted file mode 100644 index 889a1a0317..0000000000 --- a/keyboards/ergodox/infinity/drivers/gdisp/st7565ergodox/driver.mk +++ /dev/null @@ -1,2 +0,0 @@ -GFXINC += drivers/gdisp/st7565ergodox -GFXSRC += drivers/gdisp/st7565ergodox/gdisp_lld_ST7565.c diff --git a/keyboards/ergodox/infinity/gfxconf.h b/keyboards/ergodox/infinity/gfxconf.h index 45b9f58580..ca338399d3 100644 --- a/keyboards/ergodox/infinity/gfxconf.h +++ b/keyboards/ergodox/infinity/gfxconf.h @@ -22,310 +22,6 @@ #ifndef _GFXCONF_H #define _GFXCONF_H - -/////////////////////////////////////////////////////////////////////////// -// GOS - One of these must be defined, preferably in your Makefile // -/////////////////////////////////////////////////////////////////////////// -//#define GFX_USE_OS_CHIBIOS TRUE -//#define GFX_USE_OS_FREERTOS FALSE -// #define GFX_FREERTOS_USE_TRACE FALSE -//#define GFX_USE_OS_WIN32 FALSE -//#define GFX_USE_OS_LINUX FALSE -//#define GFX_USE_OS_OSX FALSE -//#define GFX_USE_OS_ECOS FALSE -//#define GFX_USE_OS_RAWRTOS FALSE -//#define GFX_USE_OS_ARDUINO FALSE -//#define GFX_USE_OS_KEIL FALSE -//#define GFX_USE_OS_CMSIS FALSE -//#define GFX_USE_OS_RAW32 FALSE -// #define INTERRUPTS_OFF() optional_code -// #define INTERRUPTS_ON() optional_code -// These are not defined by default for some reason -#define GOS_NEED_X_THREADS FALSE -#define GOS_NEED_X_HEAP FALSE - -// Options that (should where relevant) apply to all operating systems - #define GFX_NO_INLINE FALSE -// #define GFX_COMPILER GFX_COMPILER_UNKNOWN -// #define GFX_CPU GFX_CPU_UNKNOWN -// #define GFX_OS_HEAP_SIZE 0 -// #define GFX_OS_NO_INIT FALSE -// #define GFX_OS_INIT_NO_WARNING FALSE -// #define GFX_OS_PRE_INIT_FUNCTION myHardwareInitRoutine -// #define GFX_OS_EXTRA_INIT_FUNCTION myOSInitRoutine -// #define GFX_OS_EXTRA_DEINIT_FUNCTION myOSDeInitRoutine - - -/////////////////////////////////////////////////////////////////////////// -// GDISP // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GDISP TRUE - -//#define GDISP_NEED_AUTOFLUSH FALSE -//#define GDISP_NEED_TIMERFLUSH FALSE -//#define GDISP_NEED_VALIDATION TRUE -//#define GDISP_NEED_CLIP TRUE -#define GDISP_NEED_CIRCLE TRUE -#define GDISP_NEED_ELLIPSE TRUE -#define GDISP_NEED_ARC TRUE -#define GDISP_NEED_ARCSECTORS TRUE -#define GDISP_NEED_CONVEX_POLYGON TRUE -//#define GDISP_NEED_SCROLL FALSE -#define GDISP_NEED_PIXELREAD TRUE -#define GDISP_NEED_CONTROL TRUE -//#define GDISP_NEED_QUERY FALSE -//#define GDISP_NEED_MULTITHREAD FALSE -//#define GDISP_NEED_STREAMING FALSE -#define GDISP_NEED_TEXT TRUE -// #define GDISP_NEED_TEXT_WORDWRAP FALSE -// #define GDISP_NEED_ANTIALIAS FALSE -// #define GDISP_NEED_UTF8 FALSE - #define GDISP_NEED_TEXT_KERNING TRUE -// #define GDISP_INCLUDE_FONT_UI1 FALSE -// #define GDISP_INCLUDE_FONT_UI2 FALSE // The smallest preferred font. -// #define GDISP_INCLUDE_FONT_LARGENUMBERS FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS10 FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS12 FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS16 FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS20 FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS24 FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS32 FALSE - #define GDISP_INCLUDE_FONT_DEJAVUSANSBOLD12 TRUE -// #define GDISP_INCLUDE_FONT_FIXED_10X20 FALSE -// #define GDISP_INCLUDE_FONT_FIXED_7X14 FALSE - #define GDISP_INCLUDE_FONT_FIXED_5X8 TRUE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS12_AA FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS16_AA FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS20_AA FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS24_AA FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS32_AA FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANSBOLD12_AA FALSE -// #define GDISP_INCLUDE_USER_FONTS FALSE - -//#define GDISP_NEED_IMAGE FALSE -// #define GDISP_NEED_IMAGE_NATIVE FALSE -// #define GDISP_NEED_IMAGE_GIF FALSE -// #define GDISP_NEED_IMAGE_BMP FALSE -// #define GDISP_NEED_IMAGE_BMP_1 FALSE -// #define GDISP_NEED_IMAGE_BMP_4 FALSE -// #define GDISP_NEED_IMAGE_BMP_4_RLE FALSE -// #define GDISP_NEED_IMAGE_BMP_8 FALSE -// #define GDISP_NEED_IMAGE_BMP_8_RLE FALSE -// #define GDISP_NEED_IMAGE_BMP_16 FALSE -// #define GDISP_NEED_IMAGE_BMP_24 FALSE -// #define GDISP_NEED_IMAGE_BMP_32 FALSE -// #define GDISP_NEED_IMAGE_JPG FALSE -// #define GDISP_NEED_IMAGE_PNG FALSE -// #define GDISP_NEED_IMAGE_ACCOUNTING FALSE -#ifdef EMULATOR -#define GDISP_NEED_PIXMAP TRUE -#endif -// #define GDISP_NEED_PIXMAP_IMAGE FALSE - -//#define GDISP_DEFAULT_ORIENTATION GDISP_ROTATE_LANDSCAPE // If not defined the native hardware orientation is used. -//#define GDISP_LINEBUF_SIZE 128 -//#define GDISP_STARTUP_COLOR Black -#define GDISP_NEED_STARTUP_LOGO FALSE - -//#define GDISP_TOTAL_DISPLAYS 2 - -#ifndef EMULATOR -#define GDISP_DRIVER_LIST GDISPVMT_ST7565_ERGODOX, GDISPVMT_IS31FL3731C_ERGODOX -#else -#define GDISP_DRIVER_LIST GDISPVMT_EMULATOR_LCD_ERGODOX, GDISPVMT_EMULATOR_LED_ERGODOX -#endif - - #ifdef GDISP_DRIVER_LIST - // For code and speed optimization define as TRUE or FALSE if all controllers have the same capability - #define GDISP_HARDWARE_STREAM_WRITE FALSE - #define GDISP_HARDWARE_STREAM_READ FALSE - #define GDISP_HARDWARE_STREAM_POS FALSE - #define GDISP_HARDWARE_DRAWPIXEL TRUE - #define GDISP_HARDWARE_CLEARS FALSE - #define GDISP_HARDWARE_FILLS FALSE - //#define GDISP_HARDWARE_BITFILLS FALSE - #define GDISP_HARDWARE_SCROLL FALSE - #define GDISP_HARDWARE_PIXELREAD TRUE - #define GDISP_HARDWARE_CONTROL TRUE - #define GDISP_HARDWARE_QUERY FALSE - #define GDISP_HARDWARE_CLIP FALSE - - #define GDISP_PIXELFORMAT GDISP_PIXELFORMAT_RGB888 - #endif - -// The custom format is not defined for some reason, so define it as error -// so we don't get compiler warnings -#define GDISP_PIXELFORMAT_CUSTOM GDISP_PIXELFORMAT_ERROR - -#define GDISP_USE_GFXNET FALSE -// #define GDISP_GFXNET_PORT 13001 -// #define GDISP_GFXNET_CUSTOM_LWIP_STARTUP FALSE -// #define GDISP_DONT_WAIT_FOR_NET_DISPLAY FALSE -// #define GDISP_GFXNET_UNSAFE_SOCKETS FALSE - - -/////////////////////////////////////////////////////////////////////////// -// GWIN // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GWIN FALSE - -//#define GWIN_NEED_WINDOWMANAGER FALSE -// #define GWIN_REDRAW_IMMEDIATE FALSE -// #define GWIN_REDRAW_SINGLEOP FALSE -// #define GWIN_NEED_FLASHING FALSE -// #define GWIN_FLASHING_PERIOD 250 - -//#define GWIN_NEED_CONSOLE FALSE -// #define GWIN_CONSOLE_USE_HISTORY FALSE -// #define GWIN_CONSOLE_HISTORY_AVERAGING FALSE -// #define GWIN_CONSOLE_HISTORY_ATCREATE FALSE -// #define GWIN_CONSOLE_ESCSEQ FALSE -// #define GWIN_CONSOLE_USE_BASESTREAM FALSE -// #define GWIN_CONSOLE_USE_FLOAT FALSE -//#define GWIN_NEED_GRAPH FALSE -//#define GWIN_NEED_GL3D FALSE - -//#define GWIN_NEED_WIDGET FALSE -//#define GWIN_FOCUS_HIGHLIGHT_WIDTH 1 -// #define GWIN_NEED_LABEL FALSE -// #define GWIN_LABEL_ATTRIBUTE FALSE -// #define GWIN_NEED_BUTTON FALSE -// #define GWIN_BUTTON_LAZY_RELEASE FALSE -// #define GWIN_NEED_SLIDER FALSE -// #define GWIN_SLIDER_NOSNAP FALSE -// #define GWIN_SLIDER_DEAD_BAND 5 -// #define GWIN_SLIDER_TOGGLE_INC 20 -// #define GWIN_NEED_CHECKBOX FALSE -// #define GWIN_NEED_IMAGE FALSE -// #define GWIN_NEED_IMAGE_ANIMATION FALSE -// #define GWIN_NEED_RADIO FALSE -// #define GWIN_NEED_LIST FALSE -// #define GWIN_NEED_LIST_IMAGES FALSE -// #define GWIN_NEED_PROGRESSBAR FALSE -// #define GWIN_PROGRESSBAR_AUTO FALSE -// #define GWIN_NEED_KEYBOARD FALSE -// #define GWIN_KEYBOARD_DEFAULT_LAYOUT VirtualKeyboard_English1 -// #define GWIN_NEED_KEYBOARD_ENGLISH1 TRUE -// #define GWIN_NEED_TEXTEDIT FALSE -// #define GWIN_FLAT_STYLING FALSE -// #define GWIN_WIDGET_TAGS FALSE - -//#define GWIN_NEED_CONTAINERS FALSE -// #define GWIN_NEED_CONTAINER FALSE -// #define GWIN_NEED_FRAME FALSE -// #define GWIN_NEED_TABSET FALSE -// #define GWIN_TABSET_TABHEIGHT 18 - - -/////////////////////////////////////////////////////////////////////////// -// GEVENT // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GEVENT TRUE - -//#define GEVENT_ASSERT_NO_RESOURCE FALSE -//#define GEVENT_MAXIMUM_SIZE 32 -//#define GEVENT_MAX_SOURCE_LISTENERS 32 - - -/////////////////////////////////////////////////////////////////////////// -// GTIMER // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GTIMER FALSE - -//#define GTIMER_THREAD_PRIORITY HIGH_PRIORITY -//#define GTIMER_THREAD_WORKAREA_SIZE 2048 - - -/////////////////////////////////////////////////////////////////////////// -// GQUEUE // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GQUEUE FALSE - -//#define GQUEUE_NEED_ASYNC FALSE -//#define GQUEUE_NEED_GSYNC FALSE -//#define GQUEUE_NEED_FSYNC FALSE -//#define GQUEUE_NEED_BUFFERS FALSE - -/////////////////////////////////////////////////////////////////////////// -// GINPUT // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GINPUT FALSE - -//#define GINPUT_NEED_MOUSE FALSE -// #define GINPUT_TOUCH_STARTRAW FALSE -// #define GINPUT_TOUCH_NOTOUCH FALSE -// #define GINPUT_TOUCH_NOCALIBRATE FALSE -// #define GINPUT_TOUCH_NOCALIBRATE_GUI FALSE -// #define GINPUT_MOUSE_POLL_PERIOD 25 -// #define GINPUT_MOUSE_CLICK_TIME 300 -// #define GINPUT_TOUCH_CXTCLICK_TIME 700 -// #define GINPUT_TOUCH_USER_CALIBRATION_LOAD FALSE -// #define GINPUT_TOUCH_USER_CALIBRATION_SAVE FALSE -// #define GMOUSE_DRIVER_LIST GMOUSEVMT_Win32, GMOUSEVMT_Win32 -//#define GINPUT_NEED_KEYBOARD FALSE -// #define GINPUT_KEYBOARD_POLL_PERIOD 200 -// #define GKEYBOARD_DRIVER_LIST GKEYBOARDVMT_Win32, GKEYBOARDVMT_Win32 -// #define GKEYBOARD_LAYOUT_OFF FALSE -// #define GKEYBOARD_LAYOUT_SCANCODE2_US FALSE -//#define GINPUT_NEED_TOGGLE FALSE -//#define GINPUT_NEED_DIAL FALSE - - -/////////////////////////////////////////////////////////////////////////// -// GFILE // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GFILE FALSE - -//#define GFILE_NEED_PRINTG FALSE -//#define GFILE_NEED_SCANG FALSE -//#define GFILE_NEED_STRINGS FALSE -//#define GFILE_NEED_FILELISTS FALSE -//#define GFILE_NEED_STDIO FALSE -//#define GFILE_NEED_NOAUTOMOUNT FALSE -//#define GFILE_NEED_NOAUTOSYNC FALSE - -//#define GFILE_NEED_MEMFS FALSE -//#define GFILE_NEED_ROMFS FALSE -//#define GFILE_NEED_RAMFS FALSE -//#define GFILE_NEED_FATFS FALSE -//#define GFILE_NEED_NATIVEFS FALSE -//#define GFILE_NEED_CHBIOSFS FALSE - -//#define GFILE_ALLOW_FLOATS FALSE -//#define GFILE_ALLOW_DEVICESPECIFIC FALSE -//#define GFILE_MAX_GFILES 3 - -/////////////////////////////////////////////////////////////////////////// -// GADC // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GADC FALSE - -//#define GADC_MAX_LOWSPEED_DEVICES 4 - - -/////////////////////////////////////////////////////////////////////////// -// GAUDIO // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GAUDIO FALSE -// There seems to be a bug in the ugfx code, the wrong define is used -// So define it in order to avoid warnings -#define GFX_USE_GAUDIN GFX_USE_GAUDIO -// #define GAUDIO_NEED_PLAY FALSE -// #define GAUDIO_NEED_RECORD FALSE - - -/////////////////////////////////////////////////////////////////////////// -// GMISC // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GMISC TRUE - -//#define GMISC_NEED_ARRAYOPS FALSE -//#define GMISC_NEED_FASTTRIG FALSE -//#define GMISC_NEED_FIXEDTRIG FALSE -//#define GMISC_NEED_INVSQRT FALSE -// #define GMISC_INVSQRT_MIXED_ENDIAN FALSE -// #define GMISC_INVSQRT_REAL_SLOW FALSE -#define GMISC_NEED_MATRIXFLOAT2D TRUE -#define GMISC_NEED_MATRIXFIXED2D FALSE +#include "common_gfxconf.h" #endif /* _GFXCONF_H */ diff --git a/keyboards/ergodox/infinity/rules.mk b/keyboards/ergodox/infinity/rules.mk index bbb0f6efea..a341bbfce8 100644 --- a/keyboards/ergodox/infinity/rules.mk +++ b/keyboards/ergodox/infinity/rules.mk @@ -1,7 +1,6 @@ # project specific files SRC = matrix.c \ - led.c \ - animations.c + led.c ## chip/board settings # - the next two should match the directories in @@ -67,5 +66,10 @@ LCD_BACKLIGHT_ENABLE = yes MIDI_ENABLE = no RGBLIGHT_ENABLE = no -include $(SUBPROJECT_PATH)/drivers/gdisp/st7565ergodox/driver.mk -include $(SUBPROJECT_PATH)/drivers/gdisp/IS31FL3731C/driver.mk \ No newline at end of file +LCD_DRIVER = st7565 +LCD_WIDTH = 128 +LCD_HEIGHT = 32 + +LED_DRIVER = is31fl3731c +LED_WIDTH = 7 +LED_HEIGHT = 7 \ No newline at end of file diff --git a/keyboards/ergodox/infinity/simple_visualizer.h b/keyboards/ergodox/infinity/simple_visualizer.h index ded8a3222e..73d0e08870 100644 --- a/keyboards/ergodox/infinity/simple_visualizer.h +++ b/keyboards/ergodox/infinity/simple_visualizer.h @@ -34,7 +34,7 @@ #include "lcd_backlight_keyframes.h" #include "system/serial_link.h" #include "led.h" -#include "animations.h" +#include "default_animations.h" static const uint32_t logo_background_color = LCD_COLOR(0x00, 0x00, 0xFF); static const uint32_t initial_color = LCD_COLOR(0, 0, 0); @@ -58,7 +58,7 @@ static keyframe_animation_t color_animation = { // this prevents the color from changing when activating the layer // momentarily .frame_lengths = {gfxMillisecondsToTicks(200), gfxMillisecondsToTicks(500)}, - .frame_functions = {keyframe_no_operation, backlight_keyframe_animate_color}, + .frame_functions = {keyframe_no_operation, lcd_backlight_keyframe_animate_color}, }; void initialize_user_visualizer(visualizer_state_t* state) { diff --git a/keyboards/ergodox/infinity/visualizer.c b/keyboards/ergodox/infinity/visualizer.c index 5b6b320074..4b16021abc 100644 --- a/keyboards/ergodox/infinity/visualizer.c +++ b/keyboards/ergodox/infinity/visualizer.c @@ -31,7 +31,7 @@ along with this program. If not, see . #include "lcd_keyframes.h" #include "lcd_backlight_keyframes.h" #include "system/serial_link.h" -#include "animations.h" +#include "default_animations.h" static const uint32_t logo_background_color = LCD_COLOR(0x00, 0x00, 0xFF); static const uint32_t initial_color = LCD_COLOR(0, 0, 0); @@ -79,7 +79,7 @@ static keyframe_animation_t one_led_color = { .num_frames = 1, .loop = false, .frame_lengths = {gfxMillisecondsToTicks(0)}, - .frame_functions = {backlight_keyframe_set_color}, + .frame_functions = {lcd_backlight_keyframe_set_color}, }; bool swap_led_target_color(keyframe_animation_t* animation, visualizer_state_t* state) { @@ -94,7 +94,7 @@ static keyframe_animation_t two_led_colors = { .num_frames = 2, .loop = true, .frame_lengths = {gfxMillisecondsToTicks(1000), gfxMillisecondsToTicks(0)}, - .frame_functions = {backlight_keyframe_set_color, swap_led_target_color}, + .frame_functions = {lcd_backlight_keyframe_set_color, swap_led_target_color}, }; // The LCD animation alternates between the layer name display and a diff --git a/keyboards/ergodox/keymaps/333fred/Makefile b/keyboards/ergodox/keymaps/333fred/Makefile index 17f736458c..2992054341 100644 --- a/keyboards/ergodox/keymaps/333fred/Makefile +++ b/keyboards/ergodox/keymaps/333fred/Makefile @@ -3,7 +3,7 @@ LCD_BACKLIGHT_ENABLE = yes LCD_ENABLE = yes BACKLIGHT_ENABLE = yes NKRO_ENABLE = yes -TAP_DANCE_ENABLE = yes +KEY_LOCK_ENABLE = yes ifndef QUANTUM_DIR include ../../../../Makefile diff --git a/keyboards/ergodox/keymaps/333fred/keymap.c b/keyboards/ergodox/keymaps/333fred/keymap.c index e3f95132d3..c1722c1226 100644 --- a/keyboards/ergodox/keymaps/333fred/keymap.c +++ b/keyboards/ergodox/keymaps/333fred/keymap.c @@ -40,15 +40,6 @@ enum custom_macros { KEEPASS_TYPE, }; -// Tap Dance Definitions -enum tap_dance_custom_keys { - TD_SEMICOLON_COLON = 0 -}; - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_SEMICOLON_COLON] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_COLON) -}; - // NOTE: Cells marked with ACCESS must remain transparent, they're the keys that actually get to that layer const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -59,14 +50,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | TAB | Q | W | E | R | T | L2 | | L2 | Y | U | I | O | P | \ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Esc | A | S | D |LT 3,F| G |------| |------| H | J | K | L |; / : | ' | + * | Esc | A | S | D |LT 3,F| G |------| |------| H | J | K | L | ; | ' | * |--------+------+------+------+------+------| L1 | |MO(3) |------+------+------+------+------+--------| * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * |LCTRL | F4 | F5 | LGUI | LALT | | Left | Down | Up | Right| RGUI | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | Copy | Paste| | Alt |Ctrl/Esc| + * | Copy | Paste| | Alt | Lock | * ,------|------|------| |------+--------+------. * | | | PgUp | | PgDn | | | * | Bcksp|OSL(2)|------| |------| Ent |Space | @@ -86,12 +77,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGUP, KC_BSPC,OSL(SYMB), KC_DEL, // right hand - TG(CODE), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, TD(TD_SEMICOLON_COLON),KC_QUOT, - MO(MDIA), KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), OSM(MOD_RSFT), - KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, KC_RGUI, - KC_RALT, CTL_T(KC_ESC), + TG(CODE), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + MO(MDIA), KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), OSM(MOD_RSFT), + KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, KC_RGUI, + KC_RALT, KC_LOCK, KC_PGDN, KC_RCTL, KC_ENT, KC_SPC ), diff --git a/keyboards/ergodox/keymaps/french_hacker/keymap.c b/keyboards/ergodox/keymaps/french_hacker/keymap.c new file mode 100644 index 0000000000..33b84c2d8d --- /dev/null +++ b/keyboards/ergodox/keymaps/french_hacker/keymap.c @@ -0,0 +1,365 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" +#include "keymap_french.h" + +#define BASE 0 // default Colemak Mod-DH layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys +#define ACC 3 // accented characters + +#define QCOPY 0 // Qubes OS VM to VM copy +#define QPASTE 1 // Qubes OS VM to VM paste +#define M_ACIRC 2 // â +#define M_ECIRC 3 // ê +#define M_ICIRC 4 // î +#define M_OCIRC 5 // ô +#define M_UCIRC 6 // û +#define M_YCIRC 7 // Å· +#define M_AUMLT 8 // ä +#define M_EUMLT 9 // ë +#define M_IUMLT 10 // ï +#define M_OUMLT 11 // ö +#define M_UUMLT 12 // ü +#define M_YUMLT 13 // ÿ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Base Colemak Mod-DH layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | Q | W | F | P | B | TO(0)| |TO(2) | J | L | U | Y | ; | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Tab | A | R | S | T | G |------| |------| M | N | E | I | O | Bcksp | + * |--------+------+------+------+------+------| TO(1)| |OSL(3)|------+------+------+------+------+--------| + * | LShift | Z | X | C | D | V | | | | K | H | , | . | : | Rshift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | Ins | Caps | Left | Right| MO(2)| | MO(2)| Down | Up | PgDn | PgUp | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |QCopy | Ralt | | Ralt |QPaste| + * ,------|------|------| |------+------+------. + * | | | Home | | End | | | + * | Space| Ctrl |------| |------| Ctrl |Enter | + * | | | LAlt | | LAlt | | | + * `--------------------' `--------------------' + */ + // If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, + KC_TRNS, FR_Q, FR_W, KC_F, KC_P, KC_B, TO(BASE), + KC_TAB, FR_A, KC_R, KC_S, KC_T, KC_G, + KC_LSFT, FR_Z, KC_X, KC_C, KC_D, KC_V, TO(SYMB), + KC_INS, KC_CAPS, KC_LEFT,KC_RIGHT, MO(SYMB), + M(QCOPY), KC_RALT, + KC_HOME, + KC_SPC,KC_LCTRL, KC_LALT, + // right hand + KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + TO(MDIA), KC_J, KC_L, KC_U, KC_Y, FR_SCLN, KC_TRNS, + FR_M, KC_N, KC_E, KC_I, KC_O, KC_BSPC, + OSL(ACC), KC_K, KC_H, FR_COMM, FR_DOT, FR_COLN, KC_RSFT, + MO(SYMB), KC_DOWN, KC_UP, KC_PGDN, KC_PGUP, + + KC_RALT, M(QPASTE), + KC_END, + KC_LALT,KC_RCTL, KC_ENT + ), + + +/* Keymap 1: Symbol Layer + * // TODO missing: ¤ + * ,--------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | § | < | { | \ | ~ | | | | % | @ | } | > | µ | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | ' | = | - | ( | + |------| |------| * | ) | _ | / | " | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | ` | ? | # | [ | | | | | | & | ] | $ | ! | ^ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | € | £ | $ | | | | | | | ß | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,FR_SECT,FR_LESS, FR_LCBR,FR_BSLS,FR_TILD,KC_TRNS, + KC_TRNS,FR_APOS,FR_EQL, FR_MINS,FR_LPRN,FR_PLUS, + KC_TRNS,FR_GRV,FR_QUES,FR_HASH,FR_LBRC,FR_PIPE,KC_TRNS, + FR_EURO,FR_PND,FR_DLR,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, FR_PERC, FR_AT, FR_RCBR, FR_GRTR, FR_MU, KC_F12, + FR_ASTR, FR_RPRN, FR_UNDS, FR_SLSH, FR_QUOT, KC_TRNS, + KC_TRNS, FR_AMP, FR_RBRC, FR_DLR, FR_EXLM, FR_CIRC, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, ALGR(KC_S), KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | Lclk | Rclk | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), + +/* Keymap 3: accented characters + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | à | â | ä | | | | | | | î | ï | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | é | è | ê | ë | |------| |------| | | ô | ö | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | ù | û | ü | | | | | | | Å· | ÿ | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// ACCENTED CHARACTERS +[ACC] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, FR_AGRV, M(M_ACIRC), M(M_AUMLT), KC_TRNS, KC_TRNS, + KC_TRNS, FR_EACU, FR_EGRV, M(M_ECIRC), M(M_EUMLT), KC_TRNS, + KC_TRNS, KC_TRNS, FR_UGRV, M(M_UCIRC), M(M_UUMLT), KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, M(M_ICIRC), M(M_IUMLT), KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, M(M_OCIRC), M(M_OUMLT), KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, M(M_YCIRC), M(M_YUMLT), KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case QCOPY: + if (record->event.pressed) { + return MACRO(I(255), + D(LCTRL), + T(C), + D(LSFT), + T(C), + U(LCTRL), + U(LSFT), + END); + } + break; + case QPASTE: + if (record->event.pressed) { + return MACRO(I(255), + D(LCTRL), + D(LSFT), + T(V), + U(LCTRL), + T(INS), + U(LSFT), + END); + } + break; + case M_ACIRC: + if (record->event.pressed) { + return MACRO(T(LBRC), // FR_CIRC + T(Q), // FR_A + END); + } + break; + case M_ECIRC: + if (record->event.pressed) { + return MACRO(T(LBRC), // FR_CIRC + T(E), + END); + } + break; + case M_UCIRC: + if (record->event.pressed) { + return MACRO(T(LBRC), // FR_CIRC + T(U), + END); + } + break; + case M_ICIRC: + if (record->event.pressed) { + return MACRO(T(LBRC), // FR_CIRC + T(I), + END); + } + break; + case M_OCIRC: + if (record->event.pressed) { + return MACRO(T(LBRC), // FR_CIRC + T(O), + END); + } + break; + case M_YCIRC: + if (record->event.pressed) { + return MACRO(T(LBRC), // FR_CIRC + T(Y), + END); + } + break; + case M_AUMLT: + if (record->event.pressed) { + return MACRO(D(LSFT), + T(LBRC), + U(LSFT), + T(Q), + END); + } + break; + case M_EUMLT: + if (record->event.pressed) { + return MACRO(D(LSFT), + T(LBRC), + U(LSFT), + T(E), + END); + } + break; + case M_UUMLT: + if (record->event.pressed) { + return MACRO(D(LSFT), + T(LBRC), + U(LSFT), + T(U), + END); + } + break; + case M_IUMLT: + if (record->event.pressed) { + return MACRO(D(LSFT), + T(LBRC), + U(LSFT), + T(I), + END); + } + break; + case M_OUMLT: + if (record->event.pressed) { + return MACRO(D(LSFT), + T(LBRC), + U(LSFT), + T(O), + END); + } + break; + case M_YUMLT: + if (record->event.pressed) { + return MACRO(D(LSFT), + T(LBRC), + U(LSFT), + T(Y), + END); + } + break; + + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case SYMB: + ergodox_right_led_1_on(); + break; + case MDIA: + ergodox_right_led_2_on(); + break; + case ACC: + ergodox_right_led_3_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/ergodox/keymaps/french_hacker/readme.md b/keyboards/ergodox/keymaps/french_hacker/readme.md new file mode 100644 index 0000000000..6b0575af13 --- /dev/null +++ b/keyboards/ergodox/keymaps/french_hacker/readme.md @@ -0,0 +1,30 @@ +# French hacker layout + +## Introduction + +[Colemak Mod-DH](https://colemakmods.github.io/mod-dh/) layout for +users keeping an `azerty` layout configuration on their OS. + +This keymap is for users keeping their operating systems configured with +`azerty` - for typing passwords or in their native languages - but who +wants a Colemak Mod-DH layout on their mechanical. + +The symbols layers was done after analysing various programming +languages sources codes and should be close to optimal for typing +confort. + +Special macros for [Qubes OS](https://www.qubes-os.org/) are included. + +There is an accented characters layer for infrequent typing of french +accents. + +Special macros for [Qubes OS](https://www.qubes-os.org/) are included. + +## Build + + cd keyboards/ergodox + make french_hacker + +## Design explanations + +See my [blog post](http://dialectical-computing.de/blog/blog/2017/01/29/a-better-coder-layout-for-the-ergodox-ez-keyboard/). diff --git a/keyboards/ergodox/keymaps/replicaJunction/config.h b/keyboards/ergodox/keymaps/replicaJunction/config.h index d32b46e4e6..df349a72dc 100644 --- a/keyboards/ergodox/keymaps/replicaJunction/config.h +++ b/keyboards/ergodox/keymaps/replicaJunction/config.h @@ -58,6 +58,9 @@ along with this program. If not, see . #ifdef SUBPROJECT_infinity #include "infinity/config.h" #endif +#ifdef SUBPROJECT_ergodone + #include "ergodone/config.h" +#endif #endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */ diff --git a/keyboards/ergodox/keymaps/swedish-lindhe/keymap.c b/keyboards/ergodox/keymaps/swedish-lindhe/keymap.c new file mode 100644 index 0000000000..9f3e82184d --- /dev/null +++ b/keyboards/ergodox/keymaps/swedish-lindhe/keymap.c @@ -0,0 +1,199 @@ +/* Copyright 2017 Andreas Lindhé + * + * 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 . + */ + +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "keymap_swedish.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Print | ! | " | # | # | % | | |Middle| & | / | ( | ) | = | ? | + * | Screen | 1 | 2 @ | 3 £ | 4 $ | 5 | F11 | |Mouse | 6 | 7 { | 8 [ | 9 ] | 0 } | + \ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | ~L1 | | L1 | Y | U | I | O | P | Ã… | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | CapsLk | A | S | D | F | G |------| |------| H | J | K | L | Ö | Ä | + * |--------+------+------+------+------+------| ` | | Del |------+------+------+------+------+--------| + * | LShft | Z | X | C | V | B | ' | | | N | M | , | . | - | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LCtl | ^ | * | LAlt | LGui | | AltGr| Down | Up | Left | Right| + * | (') | " ~ | ' ´ | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,--------------. + * | LCtl | LAlt | | Home | End | + * ,------|------|------| |------+-------+------. + * | | | ~ | | PgUp | | | + * | Space|Back- |------| |------| Tab |Enter | + * | |space | Esc | | PgDn | | L2 | + * `--------------------' `---------------------' + */ + +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_PSCR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F11, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(SYMB), + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, NO_ACUT, + CTL_T(NO_APOS), NO_CIRC, NO_ASTR, KC_LALT, KC_LGUI, + KC_LCTRL, KC_LALT, + NO_TILD, + KC_SPC, KC_BSPC, KC_ESC, + // right hand + KC_MS_BTN3, KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA, + KC_H, KC_J, KC_K, KC_L, NO_OSLH, NO_AE, + KC_DELT, KC_N, KC_M, KC_COMM, KC_DOT, NO_MINS, KC_RSFT, + NO_ALGR, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, + KC_HOME, KC_END, + KC_PGUP, + KC_PGDN, KC_TAB, LT(MDIA, KC_ENT) +), + +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | / | * | - | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | F1 | F2 | F3 | F4 | | | | | | 7 | 8 | 9 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | F5 | F6 | F7 | F8 | |------| |------| | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | F9 | F10 | F11 | F12 | | | | | | 1 | 2 | 3 | Enter| | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | 0 | , | . | Enter| | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_TRNS, KC_TRNS, + KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8, KC_TRNS, + KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_PSLS, KC_PAST, KC_PMNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_PPLS, KC_TRNS, + KC_TRNS, KC_4, KC_5, KC_6, KC_PPLS, KC_TRNS, + RESET, KC_TRNS, KC_1, KC_2, KC_3, KC_PENT, KC_TRNS, + KC_0, KC_COMM, KC_DOT, KC_PENT, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | Play | Pause| Prev | Next | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | Lclk | Rclk | | | | | |VolDn |VolUp | Mute | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * |LeClk |RiClk |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_BTN1, KC_BTN2, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_MPLY, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_3_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + default: + // none + break; + } + + if (host_keyboard_leds() & (1<] -``` - -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/gh60/readme.md b/keyboards/gh60/readme.md index bbb0b6e19c..e477b279ce 100644 --- a/keyboards/gh60/readme.md +++ b/keyboards/gh60/readme.md @@ -1,7 +1,23 @@ -## gh60 Rev C keyboard firmware +GH60 +=== ![gh60 Rev C PCB](https://i.imgur.com/FejpoNF.jpg) +A common 60% PCB. + +Keyboard Maintainer: QMK Community +Hardware Supported: GH60 PCB +Hardware Availability: http://blog.komar.be/projects/gh60-programmable-keyboard/ + +Make example for this keyboard (after setting up your build environment): + + make gh60-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. + + +## GH60 Hardware Information + /* Column pin configuration * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 * pin: F0 F1 E6 C7 C6 B6 D4 B1 B7 B5 B4 D7 D6 B3 (Rev.C) @@ -34,29 +50,3 @@ Functions to controls LED clusters gh60_fn_led_off() gh60_esc_led_off() gh60_wasd_leds_off() - -====================== - -## Quantum MK Firmware - -For the full Quantum feature list, see [the parent readme.md](/readme.md). - -## Building - -Download or clone the whole firmware and navigate to the keyboards/gh60_rev_c folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. - -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default -To build with the default keymap, simply run `make default`. - -### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` - -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/gherkin/README.md b/keyboards/gherkin/README.md index 0a3d6fabe0..4d2261829e 100644 --- a/keyboards/gherkin/README.md +++ b/keyboards/gherkin/README.md @@ -1,12 +1,18 @@ +Gherkin +=== -About ------- +A 30 key keyboard. -First pass at adding support for the gherkin keyboard. Compiles but completely -untested. Intended to kick-start development. - -* [Gherkin project on 40% Keyboards](http://www.40percent.club/2016/11/gherkin.html) * [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/gherkin) -Credit to JadedC for the initial work. +Keyboard Maintainer: QMK Community +Hardware Supported: Gherkin PCB +Hardware Availability: [Gherkin project on 40% Keyboards](http://www.40percent.club/2016/11/gherkin.html) +Make example for this keyboard (after setting up your build environment): + + make atreus-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +First pass at adding support for the gherkin keyboard. Compiles but completely +untested. Intended to kick-start development. diff --git a/docs/keymap_makefile_example.mk b/keyboards/gonnerd/keymaps/tkl/Makefile similarity index 93% rename from docs/keymap_makefile_example.mk rename to keyboards/gonnerd/keymaps/tkl/Makefile index f4671a9d11..5854366f9d 100644 --- a/docs/keymap_makefile_example.mk +++ b/keyboards/gonnerd/keymaps/tkl/Makefile @@ -1,11 +1,11 @@ # Build Options -# change to "no" to disable the options, or define them in the Makefile in +# 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(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # 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 @@ -18,4 +18,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend ifndef QUANTUM_DIR include ../../../../Makefile -endif \ No newline at end of file +endif diff --git a/keyboards/gonnerd/keymaps/tkl/keymap.c b/keyboards/gonnerd/keymaps/tkl/keymap.c new file mode 100644 index 0000000000..b0ba335c59 --- /dev/null +++ b/keyboards/gonnerd/keymaps/tkl/keymap.c @@ -0,0 +1,31 @@ +#include "gonnerd.h" + +#define _x_ KC_NO +#define TRN KC_TRNS + +// Keymap layers +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = KEYMAP_TKL( \ + 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, _x_, KC_ENT, \ + KC_LSFT, _x_, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, _x_, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(1), KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \ + ), + + [1] = KEYMAP_TKL( \ + RESET, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, TRN, _x_, _x_, _x_, _x_ \ + ) + +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; diff --git a/keyboards/gonnerd/readme.md b/keyboards/gonnerd/readme.md index 807df308a5..388816abb0 100644 --- a/keyboards/gonnerd/readme.md +++ b/keyboards/gonnerd/readme.md @@ -1,5 +1,17 @@ -GON NerD keyboard firmware -====================== +GON NerD +======== + +A Korean Custom TKL. + +Keyboard Maintainer: QMK Community +Hardware Supported: GON NerD TKL PCB +Hardware Availability: http://www.gonskeyboardworks.com/pcbs-and-controllers/60-nerd-tkl-ver20-pcb.html + +Make example for this keyboard (after setting up your build environment): + + make gonnerd-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. ## Changing Bootloader @@ -14,25 +26,3 @@ not work anymore. You will lose your warranty and official support from GON!_ ## Reset button To run the `make dfu` command to flash keymaps onto the board, you need to put the board into DFU mode. As the GON NerD PCBs do not have a reset button on the board to put it into DFU mode, be sure to include a `RESET` button on your keymap. Otherwise you'll have to unscrew your keyboard from the case and short the GND and RST pins. - -## Building - -Download or clone the whole firmware and navigate to the keyboards/gonnerd folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. - -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default - -To build with the default keymap, simply run `make default`. - -### Other Keymaps - -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` - -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/hadron/Makefile b/keyboards/hadron/Makefile new file mode 100644 index 0000000000..e0e1cc6fb6 --- /dev/null +++ b/keyboards/hadron/Makefile @@ -0,0 +1,5 @@ +SUBPROJECT_DEFAULT = ver2 + +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/hadron/config.h b/keyboards/hadron/config.h new file mode 100644 index 0000000000..0c19d6c791 --- /dev/null +++ b/keyboards/hadron/config.h @@ -0,0 +1,83 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define MANUFACTURER ishtob +#define PRODUCT Hadron Keyboard +#define DESCRIPTION A cherry ML ortholinear keyboard + + + + +//#define AUDIO_VOICES + +//#define BACKLIGHT_PIN B7 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +//#define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION +#ifdef SUBPROJECT_ver0 + #include "ver0/config.h" +#endif +#ifdef SUBPROJECT_ver2 + #include "ver2/config.h" +#endif + +#endif diff --git a/keyboards/hadron/hadron.c b/keyboards/hadron/hadron.c new file mode 100644 index 0000000000..ca5b20e894 --- /dev/null +++ b/keyboards/hadron/hadron.c @@ -0,0 +1,26 @@ +#include "hadron.h" + + +void matrix_init_kb(void) { + + matrix_init_user(); +} + +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); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} \ No newline at end of file diff --git a/keyboards/hadron/hadron.h b/keyboards/hadron/hadron.h new file mode 100644 index 0000000000..fceae50d9a --- /dev/null +++ b/keyboards/hadron/hadron.h @@ -0,0 +1,30 @@ +#ifndef HADRON_H +#define HADRON_H + +#ifdef SUBPROJECT_ver0 + #include "ver0.h" +#endif +#ifdef SUBPROJECT_ver2 + #include "ver2.h" +#endif + +#include "quantum.h" + + +#define KEYMAP( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + 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, K2C, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E \ + ) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, KC_NO, KC_NO, KC_NO }, \ + { 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, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E } \ +} + + +#endif diff --git a/keyboards/hadron/i2c.c b/keyboards/hadron/i2c.c new file mode 100644 index 0000000000..cd2b835d50 --- /dev/null +++ b/keyboards/hadron/i2c.c @@ -0,0 +1,166 @@ +#include +#include +#include +#include +#include +#include +#include "i2c.h" + +#ifdef USE_I2C + +// Limits the amount of we wait for any one i2c transaction. +// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is +// 9 bits, a single transaction will take around 90μs to complete. +// +// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit +// poll loop takes at least 8 clock cycles to execute +#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 + +#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) + +volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +static volatile uint8_t slave_buffer_pos; +static volatile bool slave_has_register_set = false; + +// Wait for an i2c operation to finish +inline static +void i2c_delay(void) { + uint16_t lim = 0; + while(!(TWCR & (1<10. + // Check datasheets for more info. + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; +} + +// Start a transaction with the given i2c slave address. The direction of the +// transfer is set with I2C_READ and I2C_WRITE. +// returns: 0 => success +// 1 => error +uint8_t i2c_master_start(uint8_t address) { + TWCR = (1< slave ACK +// 1 => slave NACK +uint8_t i2c_master_write(uint8_t data) { + TWDR = data; + TWCR = (1<= SLAVE_BUFFER_SIZE ) { + ack = 0; + slave_buffer_pos = 0; + } + slave_has_register_set = true; + } else { + i2c_slave_buffer[slave_buffer_pos] = TWDR; + BUFFER_POS_INC(); + } + break; + + case TW_ST_SLA_ACK: + case TW_ST_DATA_ACK: + // master has addressed this device as a slave transmitter and is + // requesting data. + TWDR = i2c_slave_buffer[slave_buffer_pos]; + BUFFER_POS_INC(); + break; + + case TW_BUS_ERROR: // something went wrong, reset twi state + TWCR = 0; + default: + break; + } + // Reset everything, so we are ready for the next TWI interrupt + TWCR |= (1< + +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +#define I2C_READ 1 +#define I2C_WRITE 0 + +#define I2C_ACK 1 +#define I2C_NACK 0 + +#define SLAVE_BUFFER_SIZE 0x10 + +// i2c SCL clock frequency +#define SCL_CLOCK 800000L + +extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +void i2c_master_init(void); +uint8_t i2c_master_start(uint8_t address); +void i2c_master_stop(void); +uint8_t i2c_master_write(uint8_t data); +uint8_t i2c_master_read(int); +void i2c_reset_state(void); +void i2c_slave_init(uint8_t address); + + +static inline unsigned char i2c_start_read(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_READ); +} + +static inline unsigned char i2c_start_write(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_WRITE); +} + +// from SSD1306 scrips +extern unsigned char i2c_rep_start(unsigned char addr); +extern void i2c_start_wait(unsigned char addr); +extern unsigned char i2c_readAck(void); +extern unsigned char i2c_readNak(void); +extern unsigned char i2c_read(unsigned char ack); + +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + +#endif diff --git a/keyboards/hadron/keymaps/default/Makefile b/keyboards/hadron/keymaps/default/Makefile new file mode 100644 index 0000000000..e24ba04b53 --- /dev/null +++ b/keyboards/hadron/keymaps/default/Makefile @@ -0,0 +1,26 @@ + + +# 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(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 this with audio at the same time. +ONEHAND_ENABLE = no # Enable one-hand typing + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/hadron/keymaps/default/config.h b/keyboards/hadron/keymaps/default/config.h new file mode 100644 index 0000000000..0f349ad932 --- /dev/null +++ b/keyboards/hadron/keymaps/default/config.h @@ -0,0 +1,21 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define LEADER_TIMEOUT 300 +//#define BACKLIGHT_BREATHING +#define PREVENT_STUCK_MODIFIERS + +#define USE_I2C +#define SSD1306OLED +#define OLED_ROTATE180 + +/* ws2812 RGB LED*/ +#define RGB_DI_PIN D4 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#endif diff --git a/keyboards/hadron/keymaps/default/keymap.c b/keyboards/hadron/keymaps/default/keymap.c new file mode 100644 index 0000000000..01cc8abab7 --- /dev/null +++ b/keyboards/hadron/keymaps/default/keymap.c @@ -0,0 +1,496 @@ +#include "hadron.h" +#include "bootloader.h" +#include "action_layer.h" +#include "eeconfig.h" +#include "LUFA/Drivers/Peripheral/TWI.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#ifdef USE_I2C +#include "i2c.h" +#endif +#ifdef SSD1306OLED +#include "ssd1306.h" +#endif +extern keymap_config_t keymap_config; + +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; + +// 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. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _MOUSECURSOR 8 +#define _ADJUST 16 + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + BACKLIT, + RGBLED_TOGGLE, + RGBLED_STEP_MODE, + RGBLED_INCREASE_HUE, + RGBLED_DECREASE_HUE, + RGBLED_INCREASE_SAT, + RGBLED_DECREASE_SAT, + RGBLED_INCREASE_VAL, + RGBLED_DECREASE_VAL, +}; + +enum macro_keycodes { + KC_DEMOMACRO, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +// Custom macros +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define CTL_TTAB CTL_T(KC_TAB) // Tap for Esc, hold for Ctrl +#define CTL_ENT CTL_T(KC_ENT) // Tap for Enter, hold for Ctrl +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +// Requires KC_TRNS/_______ for the trigger key in the destination layer +#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor +#define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise +#define DEMOMACRO M(KC_DEMOMACRO) // Sample for macros + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,------+------+------+------+------+------------------------------------------------. + * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | DEL | + * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. + * | Tab | Q | W | E | R | T | 7 | 8 | 9 | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | CAPS | A | S | D | F | G | 4 | 5 | 6 | H | J | K | L | ;/Nav| ' | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | 1 | 2 | 3 | N | M | , | . | / |Ctl/Et| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space | 0 | . | = |Space |Raise | Left | Down | Up |Right | + * `--------------------------------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_P4, KC_P5, KC_P6, KC_H, KC_J, KC_K, KC_L,LT_MC(KC_SCLN), KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P1, KC_P2, KC_P3, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, CTL_ENT, \ + KC_GRV, KC_LCTRL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_P0, KC_DOT, KC_EQL, KC_SPC, RAISE, KC_LEFT,KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Colemak + * ,------+------+------+------+------+------------------------------------------------. + * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. + * | Tab | Q | W | F | P | G | 7 | 8 | 9 | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | CAPS | A | R | S | T | D | 4 | 5 | 6 | H | N | E | I | O | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | 1 | 2 | 3 | K | M | , | . | / |Ctl/Et| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space | 0 | . | = |Space |Raise | Left | Down | Up |Right | + * `--------------------------------------------------------------------------------------------------------' + */ +[_COLEMAK] = KEYMAP( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,\ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_P7, KC_P8, KC_P9, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_LCTRL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_P4, KC_P5, KC_P6, KC_H, KC_N, KC_E, KC_I, LT_MC(KC_O), KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P1, KC_P2, KC_P3, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, CTL_ENT, \ + KC_GRV, KC_LCTRL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_P0, KC_DOT, KC_EQL, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + +/* Dvorak + * ,------+------+------+------+------+------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. + * | Tab | " | , | . | P | Y | 7 | 8 | 9 | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | Esc | A | O | E | U | I | 4 | 5 | 6 | D | H | T | N | S | / | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | 1 | 2 | 3 | B | M | W | V | Z |Ctl/Et| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | Ctrl | Alt | GUI |Lower |Space | 0 | . | = |Space |Raise | Left | Down | Up |Right | + * `--------------------------------------------------------------------------------------------------------' + */ +[_DVORAK] = KEYMAP( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,\ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_P7, KC_P8, KC_P9, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_P4, KC_P5, KC_P6, KC_D, KC_H, KC_T, KC_N, LT_MC(KC_S), KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_P1, KC_P2, KC_P3, KC_B, KC_M, KC_W, KC_V, KC_Z, CTL_ENT, \ + KC_GRV, KC_LCTRL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_P0, KC_DOT, KC_EQL, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,------+------+------+------+------+------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. + * | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `--------------------------------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, KC_F12,S(KC_NUHS),S(KC_NUBS),_______,_______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,------+------+------+------+------+------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | | | | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `--------------------------------------------------------------------------------------------------------' + */ +[_RAISE] = KEYMAP( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_DEL, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ + _______, _______, _______, _______, _______, KC_SPC, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Mouse Layer (semi-col) + * ,------+------+------+------+------+------------------------------------------------. + * | ACCL0| ACCL1| ACCL2| | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. + * | | | | | | | | | Home | Wh_Up| WHL_L| M_Up | WHL_R| Macro| | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | End | Wh_Dn| M_Lft| M_Dn | M_Rt | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | BTN2 | BTN3 | BTN4 | BTN5 | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | BTN1 | | | | BTN1 | | | | | | + * `--------------------------------------------------------------------------------------------------------' + */ + +[_MOUSECURSOR] = KEYMAP( + KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_WH_L, KC_MS_U, KC_WH_R,DEMOMACRO,_______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_END , KC_PGDN, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN2, KC_BTN3, KC_BTN4, KC_BTN5, _______, _______, \ + _______, _______, _______, _______, _______, KC_BTN1, _______, _______, _______, KC_BTN1, _______, _______, _______, _______, _______ \ +), + +/* Adjust (Lower + Raise) + * ,------+------+------+------+------+------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. + * | Reset|RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | | | | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm| | | |AGswap|Qwerty|Colemk| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff| | | | | | | | BL + |BL ST |BL TG | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * `--------------------------------------------------------------------------------------------------------' + */ +[_ADJUST] = KEYMAP( + 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, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\ +) + + + +}; + + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +// define variables for reactive RGB +bool RGB_INIT = false; +bool TOG_STATUS = false; +int RGB_current_mode; + + + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + rgblight_mode(RGB_current_mode); + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (RGB_INIT) {} else { + RGB_current_mode = rgblight_config.mode; + RGB_INIT = true; + } + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + rgblight_mode(16); + } + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + TOG_STATUS = false; + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (RGB_INIT) {} else { + RGB_current_mode = rgblight_config.mode; + RGB_INIT = true; + } + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + rgblight_mode(15); + } + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + layer_off(_RAISE); + TOG_STATUS = false; + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + case RGB_MOD: + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef USE_I2C + i2c_master_init(); + #ifdef SSD1306OLED + // calls code for the SSD1306 OLED + _delay_ms(400); + TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); + iota_gfx_init(); // turns on the display + #endif + #endif + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +void matrix_scan_user(void) { + #ifdef SSD1306OLED + iota_gfx_task(); // this is what updates the display continuously + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{cc + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif + +/* + * Macro definition + */ +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + + switch (id) { + case KC_DEMOMACRO: + if (record->event.pressed){ + return MACRO (I(1), T(H),T(E),T(L), T(L), T(O), T(SPACE), T(W), T(O), T(R), T(L), T(D), END); + } + } + + return MACRO_NONE; +} + +void matrix_update(struct CharacterMatrix *dest, + const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +//assign the right code to your layers for OLED display +#define L_BASE 0 +#define L_LOWER 8 +#define L_RAISE 16 +#define L_FNLAYER 64 +#define L_NUMLAY 128 +#define L_NLOWER 136 +#define L_NFNLAYER 192 +#define L_MOUSECURSOR 256 +#define L_ADJUST 65560 + +void iota_gfx_task_user(void) { +#if DEBUG_TO_SCREEN + if (debug_enable) { + return; + } +#endif + + struct CharacterMatrix matrix; + + matrix_clear(&matrix); + matrix_write_P(&matrix, PSTR("USB: ")); +#ifdef PROTOCOL_LUFA + switch (USB_DeviceState) { + case DEVICE_STATE_Unattached: + matrix_write_P(&matrix, PSTR("Unattached")); + break; + case DEVICE_STATE_Suspended: + matrix_write_P(&matrix, PSTR("Suspended")); + break; + case DEVICE_STATE_Configured: + matrix_write_P(&matrix, PSTR("Connected")); + break; + case DEVICE_STATE_Powered: + matrix_write_P(&matrix, PSTR("Powered")); + break; + case DEVICE_STATE_Default: + matrix_write_P(&matrix, PSTR("Default")); + break; + case DEVICE_STATE_Addressed: + matrix_write_P(&matrix, PSTR("Addressed")); + break; + default: + matrix_write_P(&matrix, PSTR("Invalid")); + } +#endif + +// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below + + char buf[40]; + snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); + matrix_write_P(&matrix, PSTR("\n\nLayer: ")); + switch (layer_state) { + case L_BASE: + matrix_write_P(&matrix, PSTR("Default")); + break; + case L_RAISE: + matrix_write_P(&matrix, PSTR("Raise")); + break; + case L_LOWER: + matrix_write_P(&matrix, PSTR("Lower")); + break; + case L_ADJUST: + matrix_write_P(&matrix, PSTR("ADJUST")); + break; + default: + matrix_write(&matrix, buf); + } + + // Host Keyboard LED Status + char led[40]; + snprintf(led, sizeof(led), "\n%s %s %s", + (host_keyboard_leds() & (1<sort lines), and use this format: + + * **folder_name** description + +# List of Planck keymaps + +* **default** default Planck layout +* **cbbrowne** cbbrowne's Planck layout \ No newline at end of file diff --git a/keyboards/hadron/keymaps/side_numpad/Makefile b/keyboards/hadron/keymaps/side_numpad/Makefile new file mode 100644 index 0000000000..5cdc186cd6 --- /dev/null +++ b/keyboards/hadron/keymaps/side_numpad/Makefile @@ -0,0 +1,26 @@ + + +# 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(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 = yes # 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 this with audio at the same time. +ONEHAND_ENABLE = no # Enable one-hand typing + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/hadron/keymaps/side_numpad/config.h b/keyboards/hadron/keymaps/side_numpad/config.h new file mode 100644 index 0000000000..0f349ad932 --- /dev/null +++ b/keyboards/hadron/keymaps/side_numpad/config.h @@ -0,0 +1,21 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define LEADER_TIMEOUT 300 +//#define BACKLIGHT_BREATHING +#define PREVENT_STUCK_MODIFIERS + +#define USE_I2C +#define SSD1306OLED +#define OLED_ROTATE180 + +/* ws2812 RGB LED*/ +#define RGB_DI_PIN D4 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#endif diff --git a/keyboards/hadron/keymaps/side_numpad/keymap.c b/keyboards/hadron/keymaps/side_numpad/keymap.c new file mode 100644 index 0000000000..a5ccfd0222 --- /dev/null +++ b/keyboards/hadron/keymaps/side_numpad/keymap.c @@ -0,0 +1,505 @@ +#include "hadron.h" +#include "bootloader.h" +#include "action_layer.h" +#include "eeconfig.h" +#include "LUFA/Drivers/Peripheral/TWI.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#ifdef USE_I2C +#include "i2c.h" +#endif +#ifdef SSD1306OLED +#include "ssd1306.h" +#endif +extern keymap_config_t keymap_config; + +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; + +// 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. +#define _QWERTY 0 +#define _LOWER 3 +#define _RAISE 4 +#define _FNLAYER 6 +#define _NUMLAY 7 +#define _MOUSECURSOR 8 +#define _ADJUST 16 + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + BACKLIT, + RGBLED_TOGGLE, + RGBLED_STEP_MODE, + RGBLED_INCREASE_HUE, + RGBLED_DECREASE_HUE, + RGBLED_INCREASE_SAT, + RGBLED_DECREASE_SAT, + RGBLED_INCREASE_VAL, + RGBLED_DECREASE_VAL, +}; + +enum macro_keycodes { + KC_DEMOMACRO, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +// Custom macros +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define CTL_TTAB CTL_T(KC_TAB) // Tap for Esc, hold for Ctrl +#define CTL_ENT CTL_T(KC_ENT) // Tap for Enter, hold for Ctrl +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +// Requires KC_TRNS/_______ for the trigger key in the destination layer +#define LT_FN(kc) LT(_FNLAYER, kc) // L-ayer T-ap Function Layer +#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor +#define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise +#define TG_NUMLAY TG(_NUMLAY) //Toggle for layer _NUMLAY +#define DEMOMACRO M(KC_DEMOMACRO) // My login macros + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,------+------+------+------+------+------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | 7 | 8 | 9 | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | CAPS | A | S | D | F | G | H | J | K | L | ; |Enter | 4 | 5 | 6 | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | = | 1 | 2 | 3 | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | ~ | Ctrl | Alt | GUI |Lower |Space |Space |Raise | RAlt | Ins | Del |NumLay| 0 | . | ENT | + * `--------------------------------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_P7, KC_P8, KC_P9, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT_MC(KC_SCLN), CTL_ENT, KC_P4, KC_P5, KC_P6, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_EQL, KC_P1, KC_P2, KC_P3, \ + KC_GRV, KC_RCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_RALT, KC_INS, KC_DEL, TG_NUMLAY, KC_P0, KC_PDOT, KC_PENT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. + * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ~ | \ | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | CAPS | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | [ | ] | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | | | | + * `--------------------------------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_BSLS, _______, _______, _______, \ + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_EQL, KC_LBRC, KC_RBRC, KC_PIPE, _______, _______, _______, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_LCBR, KC_RCBR, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, _______\ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. + * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ~ | \ | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | | A | Up | D | PrSc | | 4 | 5 | 6 | * | : | ' | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | Lt | Dn | Rt | Mute | | 1 | 2 | 3 | Up | / | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | |Space | 0 | | Left | Down | Right| | | | | + * `--------------------------------------------------------------------------------------------------------' + */ +[_RAISE] = KEYMAP( + 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PLUS, KC_BSLS, _______, _______, _______, \ + _______, KC_A, KC_UP, KC_D, KC_PSCR, _______, KC_4, KC_5, KC_6, KC_PAST, KC_COLN, KC_QUOT, _______, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RIGHT, KC__MUTE, _______, KC_1, KC_2, KC_3, KC_UP, KC_SLSH, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, KC_SPC, KC_0, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______ \ +), + +/* FN layer on Esc key + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. + * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | + | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | = | [ | ] | ' | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | { | } | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | | | | + * `--------------------------------------------------------------------------------------------------------' + */ +[_FNLAYER] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS, _______, _______, _______, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_EQL, KC_LBRC, KC_RBRC, KC_QUOT, _______, _______, _______, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS), S(KC_NUBS), KC_LCBR, KC_RCBR, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, _______ \ +), + +/* Num Layer + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. + * | | | | | | | | | | | | | F7 | F8 | F9 | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | F4 | F5 | F6 | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | Up | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | Exit | Left | Down | Rght | + * `--------------------------------------------------------------------------------------------------------' + */ +[_NUMLAY] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PMNS, KC_UP, KC_PPLS, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT \ +), + +/* Mouse Layer (semi-col) + * ,-----------------------------------------------------------------------------------. + * | |ACCL0| ACCL1| ACCL2 | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. + * | | | | | | Home | Wh_Up| WHL_L| M_Up | WHL_R| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | End | Wh_Dn| M_Lft| M_Dn | M_Rt | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | BTN2 | BTN3 | BTN4 | BTN5 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | BTN1 | | | | BTN1 | | | | | | + * `--------------------------------------------------------------------------------------------------------' + */ + +[_MOUSECURSOR] = KEYMAP( + _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_WH_L, KC_MS_U, KC_WH_R, DEMOMACRO, _______, _______, _______, _______, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_END , KC_PGDN, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, _______, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_BTN2, KC_BTN3, KC_BTN4, KC_BTN5, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* Adjust (Lower + Raise) + + * ,-----------------------------------------------------------------------------------. + * | Reset| | | | | | | | | VolD | VolU | Mute | + * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. + * | |RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | Del | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | BL + |BL ST |BLSTEP| BL TG| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * `--------------------------------------------------------------------------------------------------------' + */ +[_ADJUST] = KEYMAP( + RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, \ + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, KC_DEL, _______, _______, _______, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, _______, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + + +}; + + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +// define variables for reactive RGB +bool RGB_INIT = false; +bool TOG_STATUS = false; +bool NUMLAY_STATUS = false; +int RGB_current_mode; + + + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + rgblight_mode(RGB_current_mode); + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (RGB_INIT) {} else { + RGB_current_mode = rgblight_config.mode; + RGB_INIT = true; + } + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + rgblight_mode(16); + } + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + TOG_STATUS = false; + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (RGB_INIT) {} else { + RGB_current_mode = rgblight_config.mode; + RGB_INIT = true; + } + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + rgblight_mode(15); + } + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + layer_off(_RAISE); + TOG_STATUS = false; + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + //my attempt for RGB layer lock indication via changing the mode, still have to figure out how to not have other keypress not override this mode + case TG_NUMLAY: + if (record->event.pressed) { + if (RGB_INIT) {} else { + RGB_current_mode = rgblight_config.mode; + RGB_INIT = true; + } + NUMLAY_STATUS = !NUMLAY_STATUS; + if (NUMLAY_STATUS) { + rgblight_mode(4); + layer_on(_NUMLAY); + } else { + rgblight_mode(RGB_current_mode); + layer_off(_NUMLAY); } + } + return false; + break; + case RGB_MOD: + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef USE_I2C + i2c_master_init(); + #ifdef SSD1306OLED + // calls code for the SSD1306 OLED + _delay_ms(400); + TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); + iota_gfx_init(); // turns on the display + #endif + #endif + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +void matrix_scan_user(void) { + #ifdef SSD1306OLED + iota_gfx_task(); // this is what updates the display continuously + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{cc + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif + +/* + * Macro definition + */ +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + + switch (id) { + case KC_DEMOMACRO: + if (record->event.pressed){ + return MACRO (I(1), T(H),T(E),T(L), T(L), T(O), T(SPACE), T(W), T(O), T(R), T(L), T(D), END); + } + } + + return MACRO_NONE; +} + +void matrix_update(struct CharacterMatrix *dest, + const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +//assign the right code to your layers for OLED display +#define L_BASE 0 +#define L_LOWER 8 +#define L_RAISE 16 +#define L_FNLAYER 64 +#define L_NUMLAY 128 +#define L_NLOWER 136 +#define L_NFNLAYER 192 +#define L_MOUSECURSOR 256 +#define L_ADJUST 65560 + +void iota_gfx_task_user(void) { +#if DEBUG_TO_SCREEN + if (debug_enable) { + return; + } +#endif + + struct CharacterMatrix matrix; + + matrix_clear(&matrix); + matrix_write_P(&matrix, PSTR("USB: ")); +#ifdef PROTOCOL_LUFA + switch (USB_DeviceState) { + case DEVICE_STATE_Unattached: + matrix_write_P(&matrix, PSTR("Unattached")); + break; + case DEVICE_STATE_Suspended: + matrix_write_P(&matrix, PSTR("Suspended")); + break; + case DEVICE_STATE_Configured: + matrix_write_P(&matrix, PSTR("Connected")); + break; + case DEVICE_STATE_Powered: + matrix_write_P(&matrix, PSTR("Powered")); + break; + case DEVICE_STATE_Default: + matrix_write_P(&matrix, PSTR("Default")); + break; + case DEVICE_STATE_Addressed: + matrix_write_P(&matrix, PSTR("Addressed")); + break; + default: + matrix_write_P(&matrix, PSTR("Invalid")); + } +#endif + +// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below + + char buf[40]; + snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); + matrix_write_P(&matrix, PSTR("\n\nLayer: ")); + switch (layer_state) { + case L_BASE: + matrix_write_P(&matrix, PSTR("Default")); + break; + case L_RAISE: + matrix_write_P(&matrix, PSTR("Raise")); + break; + case L_LOWER: + matrix_write_P(&matrix, PSTR("Lower")); + break; + case L_ADJUST: + matrix_write_P(&matrix, PSTR("ADJUST")); + break; + default: + matrix_write(&matrix, buf); + } + + // Host Keyboard LED Status + char led[40]; + snprintf(led, sizeof(led), "\n%s %s %s", + (host_keyboard_leds() & (1< + +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 . +*/ +#ifndef VER0_CONFIG_H +#define VER0_CONFIG_H + +#include "../config.h" + +/* USB Device descriptor parameter */ +#define DEVICE_VER 0x0001 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* Hadron Ver0 PCB default pin-out */ +#define MATRIX_ROW_PINS { D7, E6, B4, B5, B6 } +#define MATRIX_COL_PINS { F6, F7, C6, C7, F5, F4, F1, F0, D2, D3, D5, B3, B2, B1, B0 } +#define UNUSED_PINS + + +#endif diff --git a/keyboards/hadron/ver0/rules.mk b/keyboards/hadron/ver0/rules.mk new file mode 100644 index 0000000000..0f9667a8ae --- /dev/null +++ b/keyboards/hadron/ver0/rules.mk @@ -0,0 +1,5 @@ +#AUDIO_ENABLE ?= yes # Audio output on port C6 + +ifndef QUANTUM_DIR + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/hadron/ver0/ver0.c b/keyboards/hadron/ver0/ver0.c new file mode 100644 index 0000000000..acb3a9105f --- /dev/null +++ b/keyboards/hadron/ver0/ver0.c @@ -0,0 +1 @@ +#include "ver0.h" \ No newline at end of file diff --git a/keyboards/hadron/ver0/ver0.h b/keyboards/hadron/ver0/ver0.h new file mode 100644 index 0000000000..5710af322e --- /dev/null +++ b/keyboards/hadron/ver0/ver0.h @@ -0,0 +1,6 @@ +#ifndef VER0_H +#define VER0_H + +#include "../hadron.h" + +#endif \ No newline at end of file diff --git a/keyboards/hadron/ver2/Makefile b/keyboards/hadron/ver2/Makefile new file mode 100644 index 0000000000..191c6bb664 --- /dev/null +++ b/keyboards/hadron/ver2/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/hadron/ver2/config.h b/keyboards/hadron/ver2/config.h new file mode 100644 index 0000000000..71a0ab5b3f --- /dev/null +++ b/keyboards/hadron/ver2/config.h @@ -0,0 +1,35 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ +#ifndef VER2_CONFIG_H +#define VER2_CONFIG_H + +#include "../config.h" + +/* USB Device descriptor parameter */ +#define DEVICE_VER 0x0002 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* Hadron Ver0 PCB default pin-out */ +#define MATRIX_ROW_PINS { D7, E6, B4, B5, B6 } +#define MATRIX_COL_PINS { F6, F7, D6, C7, F5, F4, F1, F0, D2, D3, D5, B3, B2, B1, B0 } +#define UNUSED_PINS + + +#endif diff --git a/keyboards/hadron/ver2/rules.mk b/keyboards/hadron/ver2/rules.mk new file mode 100644 index 0000000000..0f9667a8ae --- /dev/null +++ b/keyboards/hadron/ver2/rules.mk @@ -0,0 +1,5 @@ +#AUDIO_ENABLE ?= yes # Audio output on port C6 + +ifndef QUANTUM_DIR + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/hadron/ver2/ver2.c b/keyboards/hadron/ver2/ver2.c new file mode 100644 index 0000000000..bc0917746a --- /dev/null +++ b/keyboards/hadron/ver2/ver2.c @@ -0,0 +1 @@ +#include "ver2.h" \ No newline at end of file diff --git a/keyboards/hadron/ver2/ver2.h b/keyboards/hadron/ver2/ver2.h new file mode 100644 index 0000000000..54e141ffac --- /dev/null +++ b/keyboards/hadron/ver2/ver2.h @@ -0,0 +1,6 @@ +#ifndef VER2_H +#define VER2_H + +#include "../hadron.h" + +#endif \ No newline at end of file diff --git a/keyboards/handwired/atreus50/rules.mk b/keyboards/handwired/atreus50/rules.mk index 5e808dfa7f..2e2d48f6ab 100644 --- a/keyboards/handwired/atreus50/rules.mk +++ b/keyboards/handwired/atreus50/rules.mk @@ -67,15 +67,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/handwired/magicforce61/rules.mk b/keyboards/handwired/magicforce61/rules.mk index 913bcb93e2..a3fdd3d707 100644 --- a/keyboards/handwired/magicforce61/rules.mk +++ b/keyboards/handwired/magicforce61/rules.mk @@ -69,15 +69,3 @@ AUDIO_ENABLE ?= no # Audio output on port C6 ifndef QUANTUM_DIR include ../../../Makefile endif - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/handwired/magicforce68/README.md b/keyboards/handwired/magicforce68/README.md index 2877169ef4..a0de66069d 100644 --- a/keyboards/handwired/magicforce68/README.md +++ b/keyboards/handwired/magicforce68/README.md @@ -5,7 +5,7 @@ This firmware is for a Magicforce 68 that's had its PCB removed and is handwired ## Wiring Layout -![Wiring Layout](http://imgur.com/NmTCv5u) +![Wiring Layout](http://i.imgur.com/NmTCv5u.png) ## Pinout diff --git a/keyboards/handwired/magicforce68/rules.mk b/keyboards/handwired/magicforce68/rules.mk index 0e07bde403..0d21623ced 100644 --- a/keyboards/handwired/magicforce68/rules.mk +++ b/keyboards/handwired/magicforce68/rules.mk @@ -69,15 +69,3 @@ AUDIO_ENABLE = no # Audio output on port C6 ifndef QUANTUM_DIR include ../../../Makefile endif - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/handwired/numpad20/rules.mk b/keyboards/handwired/numpad20/rules.mk index 0e07bde403..0d21623ced 100644 --- a/keyboards/handwired/numpad20/rules.mk +++ b/keyboards/handwired/numpad20/rules.mk @@ -69,15 +69,3 @@ AUDIO_ENABLE = no # Audio output on port C6 ifndef QUANTUM_DIR include ../../../Makefile endif - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/handwired/ortho5x13/rules.mk b/keyboards/handwired/ortho5x13/rules.mk index 0e07bde403..0d21623ced 100644 --- a/keyboards/handwired/ortho5x13/rules.mk +++ b/keyboards/handwired/ortho5x13/rules.mk @@ -69,15 +69,3 @@ AUDIO_ENABLE = no # Audio output on port C6 ifndef QUANTUM_DIR include ../../../Makefile endif - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index efb9ebdd74..ea5f2b76e8 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -161,7 +161,7 @@ along with this program. If not, see . #define ___ KC_NO -#define KEYMAP( \ +#define KEYMAP_CUSTOM( \ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 763fa5a27a..e229b67e54 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -686,7 +686,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Alt | GUI | Punc | Num | Space | Fun |Greek | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = KEYMAP( +[_QWERTY] = KEYMAP_CUSTOM( KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, 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, @@ -706,7 +706,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ #ifdef LAYOUT_DVORAK -[_DVORAK] = KEYMAP( +[_DVORAK] = KEYMAP_CUSTOM( _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______, _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, _______, _______, KC_SLSH, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, @@ -728,7 +728,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ #ifdef LAYOUT_COLEMAK -[_COLEMAK] = KEYMAP( +[_COLEMAK] = KEYMAP_CUSTOM( _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______, _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, @@ -750,7 +750,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ #ifdef LAYOUT_NORMAN -[_NORMAN] = KEYMAP( +[_NORMAN] = KEYMAP_CUSTOM( _______, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_QUOT, _______, _______, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, _______, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, @@ -772,7 +772,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ #ifdef LAYOUT_WORKMAN -[_WORKMAN] = KEYMAP( +[_WORKMAN] = KEYMAP_CUSTOM( _______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______, _______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______, _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______, @@ -792,7 +792,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | : | | * `-----------------------------------------------------------------------------------' */ -[_PUNC] = KEYMAP( +[_PUNC] = KEYMAP_CUSTOM( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, X(LTEQ), X(GTEQ), _______, KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, X(NOTEQ),KC_LPRN, KC_RPRN, KC_LABK, KC_RABK, _______, KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, X(PLMIN),KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, @@ -811,7 +811,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | x | | | | | 0 | , | . | : | | * `-----------------------------------------------------------------------------------' */ -[_NUM] = KEYMAP( +[_NUM] = KEYMAP_CUSTOM( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, S(KC_A), KC_1, KC_2, KC_3, S(KC_D), _______, KC_GRV, KC_ASTR, KC_BSLS, KC_MINS, KC_EQL, KC_SLSH, S(KC_B), KC_4, KC_5, KC_6, S(KC_E), _______, KC_AMPR, KC_CIRC, KC_PIPE, KC_UNDS, KC_PLUS, KC_QUES, S(KC_C), KC_7, KC_8, KC_9, S(KC_F), _______, @@ -830,7 +830,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_FUN] = KEYMAP( +[_FUN] = KEYMAP_CUSTOM( XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, @@ -849,7 +849,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_GREEKU] = KEYMAP( +[_GREEKU] = KEYMAP_CUSTOM( _______, XXXXXXX, XXXXXXX,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______, _______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), KC_QUOT, _______, _______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), KC_COMM, KC_DOT, KC_SLSH, _______, @@ -868,7 +868,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_GREEKL] = KEYMAP( +[_GREEKL] = KEYMAP_CUSTOM( _______, XXXXXXX,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______, _______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), KC_QUOT, _______, _______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), KC_COMM, KC_DOT, KC_SLSH, _______, @@ -887,7 +887,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_EMPTY] = KEYMAP( +[_EMPTY] = KEYMAP_CUSTOM( XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, @@ -906,7 +906,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_EMOJI] = KEYMAP( +[_EMOJI] = KEYMAP_CUSTOM( X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW), X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS), X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH), @@ -925,7 +925,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_GUI] = KEYMAP( +[_GUI] = KEYMAP_CUSTOM( XXXXXXX, G(KC_1), G(KC_2), G(KC_3), G(KC_4), G(KC_5), G(KC_6), G(KC_7), G(KC_8), G(KC_9), G(KC_0), XXXXXXX, KC_ESC, XXXXXXX, S(KC_TAB),KC_ESC, KC_TAB, XXXXXXX, XXXXXXX, KC_WWWB, XXXXXXX, KC_WWWF, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, KC_SPC, KC_SPC, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, @@ -944,7 +944,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_SYS] = KEYMAP( +[_SYS] = KEYMAP_CUSTOM( DEBUG, QWERTY, WIN, XXXXXXX, RESET, XXXXXXX, XXXXXXX, OUT_USB, XXXXXXX, XXXXXXX, XXXXXXX, RGBDEMO, XXXXXXX, FC_TOG, XXXXXXX, DVORAK, XXXXXXX, GLOW, XXXXXXX, XXXXXXX, WORKMAN, LINUX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, OUT_BT, NORMAN, OSX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, diff --git a/keyboards/handwired/promethium/rgbsps.c b/keyboards/handwired/promethium/rgbsps.c index f30badd356..84fac1ae1f 100644 --- a/keyboards/handwired/promethium/rgbsps.c +++ b/keyboards/handwired/promethium/rgbsps.c @@ -1,4 +1,4 @@ -#include "light_ws2812.h" +#include "ws2812.h" #include "rgbsps.h" struct cRGB led[RGBSPS_NUM]; diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk index 6fa45b42b6..69903dcebe 100644 --- a/keyboards/handwired/promethium/rules.mk +++ b/keyboards/handwired/promethium/rules.mk @@ -72,7 +72,7 @@ BLUETOOTH = AdafruitBLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -SRC += $(QUANTUM_DIR)/light_ws2812.c +SRC += ws2812.c SRC += rgbsps.c -SRC += $(QUANTUM_DIR)/analog.c +SRC += analog.c SRC += matrix.c diff --git a/keyboards/hhkb/readme.md b/keyboards/hhkb/readme.md index ee7d11121c..fe4402a04f 100644 --- a/keyboards/hhkb/readme.md +++ b/keyboards/hhkb/readme.md @@ -1,182 +1,14 @@ -hhkb_qmk keyboard firmware -====================== +HHKB Alternate Controller +=== -## Quantum MK Firmware +An alternative controler for the HHKB designed by hasu. -You have access to a bunch of goodies! Check out the Makefile to enable/disable some of the features. Uncomment the `#` to enable them. Setting them to `no` does nothing and will only confuse future you. +Keyboard Maintainer: QMK Community +Hardware Supported: HHKB Alternate Controller +Hardware Availability: https://geekhack.org/index.php?topic=12047.0 - BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality - MIDI_ENABLE = yes # MIDI controls - # UNICODE_ENABLE = yes # Unicode support - this is commented out, just as an example. You have to use #, not // - BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID +Make example for this keyboard (after setting up your build environment): -## Quick aliases to common actions + make hhkb-default -Your keymap can include shortcuts to common operations (called "function actions" in tmk). - -### Switching and toggling layers - -`MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer. When you apply this to a key, that same key must be set as `KC_TRNS` on the destination layer. Otherwise, you won't make it back to the original layer when you release the key (and you'll get a keycode sent). You can only switch to layers *above* your current layer. If you're on layer 0 and you use `MO(1)`, that will switch to layer 1 just fine. But if you include `MO(3)` on layer 5, that won't do anything for you -- because layer 3 is lower than layer 5 on the stack. - -`LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped. Like `MO()`, this only works upwards in the layer stack (`layer` must be higher than the current layer). - -`TG(layer)` - toggles a layer on or off. As with `MO()`, you should set this key as `KC_TRNS` in the destination layer so that tapping it again actually toggles back to the original layer. Only works upwards in the layer stack. - -### Fun with modifier keys - -* `LSFT(kc)` - applies left Shift to *kc* (keycode) - `S(kc)` is an alias -* `RSFT(kc)` - applies right Shift to *kc* -* `LCTL(kc)` - applies left Control to *kc* -* `RCTL(kc)` - applies right Control to *kc* -* `LALT(kc)` - applies left Alt to *kc* -* `RALT(kc)` - applies right Alt to *kc* -* `LGUI(kc)` - applies left GUI (command/win) to *kc* -* `RGUI(kc)` - applies right GUI (command/win) to *kc* - -You can also chain these, like this: - - LALT(LCTL(KC_DEL)) -- this makes a key that sends Alt, Control, and Delete in a single keypress. - -The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols. Their long names are also available and documented in `/quantum/keymap_common.h`. - - KC_TILD ~ - KC_EXLM ! - KC_AT @ - KC_HASH # - KC_DLR $ - KC_PERC % - KC_CIRC ^ - KC_AMPR & - KC_ASTR * - KC_LPRN ( - KC_RPRN ) - KC_UNDS _ - KC_PLUS + - KC_LCBR { - KC_RCBR } - KC_PIPE | - KC_COLN : - -`MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down. - -These are the values you can use for the `mod` in `MT()` (right-hand modifiers are not available): - - * MOD_LCTL - * MOD_LSFT - * MOD_LALT - * MOD_LGUI - -These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped. - -We've added shortcuts to make common modifier/tap (mod-tap) mappings more compact: - - * `CTL_T(kc)` - is LCTL when held and *kc* when tapped - * `SFT_T(kc)` - is LSFT when held and *kc* when tapped - * `ALT_T(kc)` - is LALT when held and *kc* when tapped - * `GUI_T(kc)` - is LGUI when held and *kc* when tapped - * `ALL_T(kc)` - is Hyper (all mods) when held and *kc* when tapped. To read more about what you can do with a Hyper key, see [this blog post by Brett Terpstra](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/) - -### Temporarily setting the default layer - -`DF(layer)` - sets default layer to *layer*. The default layer is the one at the "bottom" of the layer stack - the ultimate fallback layer. This currently does not persist over power loss. When you plug the keyboard back in, layer 0 will always be the default. It is theoretically possible to work around that, but that's not what `DF` does. - -### Remember: These are just aliases - -These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). - -Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them. - -## Macro shortcuts: Send a whole string when pressing just one key - -Instead of using the `ACTION_MACRO` function, you can simply use `M(n)` to access macro *n* - *n* will get passed into the `action_get_macro` as the `id`, and you can use a switch statement to trigger it. This gets called on the keydown and keyup, so you'll need to use an if statement testing `record->event.pressed` (see keymap_default.c). - -```c -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is. -{ - switch(id) { - case 0: // this would trigger when you hit a key mapped as M(0) - if (record->event.pressed) { - return MACRO( I(255), T(H), T(E), T(L), T(L), W(255), T(O), END ); // this sends the string 'hello' when the macro executes - } - break; - } - return MACRO_NONE; -}; -``` -A macro can include the following commands: - -* I() change interval of stroke in milliseconds. -* D() press key. -* U() release key. -* T() type key(press and release). -* W() wait (milliseconds). -* END end mark. - -So above you can see the stroke interval changed to 255ms between each keystroke, then a bunch of keys being typed, waits a while, then the macro ends. - -Note: Using macros to have your keyboard send passwords for you is a bad idea. - -### Additional keycode aliases for software-implemented layouts (Colemak, Dvorak, etc) - -Everything is assuming you're in Qwerty (in software) by default, but there is built-in support for using a Colemak or Dvorak layout by including this at the top of your keymap: - - #include "keymap_.h" - -Where is "colemak" or "dvorak". After including this line, you will get access to: - - * `CM_*` for all of the Colemak-equivalent characters - * `DV_*` for all of the Dvorak-equivalent characters - -These implementations assume you're using Colemak or Dvorak on your OS, not on your keyboard - this is referred to as a software-implemented layout. If your computer is in Qwerty and your keymap is in Colemak or Dvorak, this is referred to as a firmware-implemented layout, and you won't need these features. - -To give an example, if you're using software-implemented Colemak, and want to get an `F`, you would use `CM_F` - `KC_F` under these same circumstances would result in `T`. - -## Additional language support - -In `quantum/keymap_extras/`, you'll see various language files - these work the same way as the alternative layout ones do. Most are defined by their two letter country/language code followed by an underscore and a 4-letter abbreviation of its name. `FR_UGRV` which will result in a `ù` when using a software-implemented AZERTY layout. It's currently difficult to send such characters in just the firmware (but it's being worked on - see Unicode support). - -## Unicode support - -You can currently send 4 hex digits with your OS-specific modifier key (RALT for OSX with the "Unicode Hex Input" layout) - this is currently limited to supporting one OS at a time, and requires a recompile for switching. 8 digit hex codes are being worked on. The keycode function is `UC(n)`, where *n* is a 4 digit hexidecimal. Enable from the Makefile. - -## Other firmware shortcut keycodes - -* `RESET` - puts the MCU in DFU mode for flashing new firmware (with `make dfu`) -* `DEBUG` - the firmware into debug mode - you'll need hid_listen to see things -* `BL_ON` - turns the backlight on -* `BL_OFF` - turns the backlight off -* `BL_` - sets the backlight to level *n* -* `BL_INC` - increments the backlight level by one -* `BL_DEC` - decrements the backlight level by one -* `BL_TOGG` - toggles the backlight -* `BL_STEP` - steps through the backlight levels - -Enable the backlight from the Makefile. - -## MIDI functionalty - -This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile. - -## Bluetooth functionality - -This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will. - -## Building - -Download or clone the whole firmware and navigate to the keyboards/planck folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button. - -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default -To build with the default keymap, simply run `make default`. - -### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a file in the keymaps folder named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` - -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/infinity60/readme.md b/keyboards/infinity60/readme.md index 97457b4077..bca26c69f9 100644 --- a/keyboards/infinity60/readme.md +++ b/keyboards/infinity60/readme.md @@ -1,29 +1,14 @@ -Infinity 60% keyboard firmware -====================== +Infinity 60% +============ -## Quantum MK Firmware +A compact community driven keyboard. -For the full Quantum feature list, see [the parent readme](/). +Keyboard Maintainer: QMK Community +Hardware Supported: Infinity 60% PCB +Hardware Availability: https://input.club/devices/infinity-keyboard/ -## Keymaps +Make example for this keyboard (after setting up your build environment): -Several versions of keymaps are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. - -Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` - - -## Compiling - -Download or clone the whole firmware and navigate to the keyboards/infinity60 folder. Once your dev env is setup, you'll be able to use the `make` command to both compile your keymap and flash it to your keyboard. - -To just compile, which generates the output files in the `.build` folder at the root of the repository, run `make keymap`, where keymap is the name of the keymap that you want to compile. - -## Flashing - -To flash the firmware to the keyboard - -1. First press the flash button on the bottom of the keyboard. If you already have a flah button mapped in a keyboard layout running on the keyboard, you can also use that. -2. Then run `make keymap-dfu-util`, where keymap is the name of the keymap you want to flash. On Linux based operating systems you might need to run the comamnd as root, for example `sudo make keymap-dfu-util` on Ubuntu. - -**Tip** `make keymap-dfu-util` will also compile the keymap if needed, so you can skip the compilation step if you want to. + make infinity60-default +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/jc65/Makefile b/keyboards/jc65/Makefile new file mode 100644 index 0000000000..57b2ef62e5 --- /dev/null +++ b/keyboards/jc65/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/jc65/config.h b/keyboards/jc65/config.h new file mode 100644 index 0000000000..6e1306b276 --- /dev/null +++ b/keyboards/jc65/config.h @@ -0,0 +1,63 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0002 +#define MANUFACTURER dou +#define PRODUCT KEYCLACK65-V1 +#define DESCRIPTION JC65 PCB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* QMK JC65 PCB default pin-out */ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4, F5 } +#define UNUSED_PINS + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 20 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCING_DELAY 5 + +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ + ) + + + +#endif diff --git a/keyboards/jc65/jc65.c b/keyboards/jc65/jc65.c new file mode 100644 index 0000000000..82b1d57416 --- /dev/null +++ b/keyboards/jc65/jc65.c @@ -0,0 +1,28 @@ +#include "jc65.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +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); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/jc65/jc65.h b/keyboards/jc65/jc65.h new file mode 100644 index 0000000000..41ec3cf64e --- /dev/null +++ b/keyboards/jc65/jc65.h @@ -0,0 +1,21 @@ +#ifndef JC65_H +#define JC65_H + +#include "quantum.h" + +#define KEYMAP( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ + K40, K41, K43, K44, K46, K48, K4A, K4B, K4C, K4D, K4E, K4F \ +)\ +{\ + {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F}, \ + {K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F}, \ + {K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F}, \ + {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F}, \ + {K40, K41, KC_NO, K43, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F}, \ +} + +#endif diff --git a/keyboards/jc65/keymaps/default/Makefile b/keyboards/jc65/keymaps/default/Makefile new file mode 100644 index 0000000000..e69de29bb2 diff --git a/keyboards/jc65/keymaps/default/config.h b/keyboards/jc65/keymaps/default/config.h new file mode 100644 index 0000000000..a5568e400d --- /dev/null +++ b/keyboards/jc65/keymaps/default/config.h @@ -0,0 +1 @@ +#include "../../config.h" diff --git a/keyboards/jc65/keymaps/default/keymap.c b/keyboards/jc65/keymaps/default/keymap.c new file mode 100644 index 0000000000..de787f3892 --- /dev/null +++ b/keyboards/jc65/keymaps/default/keymap.c @@ -0,0 +1,11 @@ +#include "jc65.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = KEYMAP( + 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_BSLS, KC_BSPC, KC_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + 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_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_SPACE, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), +}; diff --git a/keyboards/jc65/keymaps/default/readme.md b/keyboards/jc65/keymaps/default/readme.md new file mode 100644 index 0000000000..13430a630b --- /dev/null +++ b/keyboards/jc65/keymaps/default/readme.md @@ -0,0 +1,10 @@ +Default Keymap +=== + +Super simple default keymap with only a base layer. + +Keymap Maintainer: [Ethan Madden](https://github.com/jetpacktuxedo) + +Difference from base layout: This is (as close as I can tell) the same as the layout that ships on the boards other than default underglow color. + +Intended usage: This is mostly provided for testing before you build your own keymap and as a reference to a stock(ish) configuration diff --git a/keyboards/jc65/keymaps/jetpacktuxedo/Makefile b/keyboards/jc65/keymaps/jetpacktuxedo/Makefile new file mode 100644 index 0000000000..e69de29bb2 diff --git a/keyboards/jc65/keymaps/jetpacktuxedo/config.h b/keyboards/jc65/keymaps/jetpacktuxedo/config.h new file mode 100644 index 0000000000..a5568e400d --- /dev/null +++ b/keyboards/jc65/keymaps/jetpacktuxedo/config.h @@ -0,0 +1 @@ +#include "../../config.h" diff --git a/keyboards/jc65/keymaps/jetpacktuxedo/keymap.c b/keyboards/jc65/keymaps/jetpacktuxedo/keymap.c new file mode 100644 index 0000000000..af02b6f104 --- /dev/null +++ b/keyboards/jc65/keymaps/jetpacktuxedo/keymap.c @@ -0,0 +1,25 @@ +#include "jc65.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = KEYMAP( + 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_BSLS, KC_GRV, KC_INS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL, + 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_PGUP, + 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_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_SPACE, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = KEYMAP( + 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_TRNS, KC_TRNS, KC_TRNS, + 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_END, KC_DEL, KC_TRNS, + MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_PGUP, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_HOME, KC_PGDN, KC_END + ), + [2] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + MO(1), RGB_SAD, RGB_SAI, KC_TRNS, KC_TRNS, RGB_HUD, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS, KC_TRNS + ), +}; diff --git a/keyboards/jc65/keymaps/jetpacktuxedo/readme.md b/keyboards/jc65/keymaps/jetpacktuxedo/readme.md new file mode 100644 index 0000000000..4083d8f470 --- /dev/null +++ b/keyboards/jc65/keymaps/jetpacktuxedo/readme.md @@ -0,0 +1,10 @@ +Jetpacktuxedo's Keymap +=== + +Split backspace, 6.25u space, caps is fn, my standard fn layer, reset + rgb controls on layer(2) + +Keymap Maintainer: [Ethan Madden](https://github.com/jetpacktuxedo) + +Difference from base layout: The base layer is the same, except caps is fn, and there are additional tools on layers + +Intended usage: This is my daily driver keymap diff --git a/keyboards/jc65/readme.md b/keyboards/jc65/readme.md new file mode 100644 index 0000000000..55ed72229c --- /dev/null +++ b/keyboards/jc65/readme.md @@ -0,0 +1,22 @@ +JC65 +=== + +![JC65](https://imgur.com/a/C2oa5) + +The JC65 PCB actually has two revisions: A QMK native version, and a PS2AVRGB version. Jchan offered both PCBs as options during the M65-A Round 1 group buy, and were also available choices for the 65% acrylic case group buy. In the near future both PCB versions should be available from keyclack.com when the storefront part opens. + +These docs are for the QMK version of the PCB. [More info on qmk.fm](http://qmk.fm/planck/) + +Keyboard Maintainer: [Ethan Madden](https://github.com/jetpacktuxedo) +Hardware Supported: JC65 rev.qmk +Hardware Availability: [keyclack.com](https://keyclack.com/) + +Make example for this keyboard (after setting up your build environment): + + make jc65-default + +Or to make and flash: + + make jc65-default-dfu + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/jc65/rules.mk b/keyboards/jc65/rules.mk new file mode 100644 index 0000000000..c2c02b6147 --- /dev/null +++ b/keyboards/jc65/rules.mk @@ -0,0 +1,68 @@ +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/jd40/readme.md b/keyboards/jd40/readme.md index 7daa0980eb..1684a562e0 100644 --- a/keyboards/jd40/readme.md +++ b/keyboards/jd40/readme.md @@ -1,17 +1,14 @@ -## jd40 mkii keyboard firmware +JD40 +=== - Pins: - MATRIX_ROW_PINS { F0, F1, F5, B4 } - MATRIX_COL_PINS { F4, D7, B5, B6, C6, C7, D4, D6, D5, D0, D1, D2 } - RGB_DI_PIN D3 - -====================== +A compact 40% keyboard. -## Quantum MK Firmware +Keyboard Maintainer: QMK Community +Hardware Supported: JD40 PCB +Hardware Availability: [1up](https://1upkeyboards.com/jd40-mkii-1up-keyboards-logo-pcb.html) [mechanicalkeyboards.com](https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=2452) [originative](https://originative.co/products/jd40-pcb) -For the full Quantum feature list, see [the parent readme.md](/readme.md). +Make example for this keyboard (after setting up your build environment): -## Building + make atreus-default -Download or clone the whole firmware and navigate to the keyboards/jd40 folder. -Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Amtel Flip to program your .hex file. +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/jd45/readme.md b/keyboards/jd45/readme.md index 2822666e89..4bed1be416 100644 --- a/keyboards/jd45/readme.md +++ b/keyboards/jd45/readme.md @@ -1,4 +1,14 @@ -JD45 keyboard firmware -====================== +JD45 +=== -TODO: to be updated. +A compact 45% keyboard. + +Keyboard Maintainer: QMK Community +Hardware Supported: JD45 PCB +Hardware Availability: https://mechanicalkeyboards.com/shop/index.php?l=product_list&c=346 + +Make example for this keyboard (after setting up your build environment): + + make jd45-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/kbd75/readme.md b/keyboards/kbd75/readme.md new file mode 100644 index 0000000000..42fdc0d386 --- /dev/null +++ b/keyboards/kbd75/readme.md @@ -0,0 +1,12 @@ +KBD75 +=== + +Keyboard Maintainer: QMK Community +Hardware Supported: KBD75 PCB +Hardware Availability: https://kbdfans.myshopify.com/products/kbd75-keyboard-set?variant=35638534029 + +Make example for this keyboard (after setting up your build environment): + + make kbd75-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/kc60/keymaps/mechmerlin/keymap.c b/keyboards/kc60/keymaps/mechmerlin/keymap.c new file mode 100644 index 0000000000..97d458dec4 --- /dev/null +++ b/keyboards/kc60/keymaps/mechmerlin/keymap.c @@ -0,0 +1,61 @@ +// This is the 60% layout preferred by u/merlin36 the host of the MechMerlin YouTube channel. +// The layout is highly influenced by the WKL B.Face and KBP V60 standard layouts. +// Layout designed for use on KC60 with no inswitch or underglow lighting. + +#include "kc60.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = KEYMAP( /* Basic QWERTY */ + 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_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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, 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_NO, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, MO(2), KC_RALT, KC_RGUI, KC_RCTL \ + ), + [1] = KEYMAP( /* HHKB-ish Base 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_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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, 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_NO, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, MO(3), KC_RALT, KC_RGUI, KC_RCTL \ + ), + [2] = KEYMAP( /* FN Layer 1 - Basic QWERTY */ + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ + KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_NO, KC_PGUP, \ + KC_TRNS, KC_TRNS, KC_TRNS, TG(4), KC_NO, KC_TRNS, KC_HOME, KC_PGDN, KC_END \ + ), + [3] = KEYMAP( /* FN Layer 2 - HHKB-ish Base 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, KC_INS, \ + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_BSPC, \ + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_NO, KC_TRNS, \ + KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [4] = KEYMAP( /* Arrow Layers - Basic QWERTY ONLY */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ + KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_UP, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), + [5] = KEYMAP( /* Blank Layer for later usage */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ + KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + return MACRO_NONE; +}; diff --git a/keyboards/kc60/keymaps/mechmerlin/readme.md b/keyboards/kc60/keymaps/mechmerlin/readme.md new file mode 100644 index 0000000000..3a67ab17f9 --- /dev/null +++ b/keyboards/kc60/keymaps/mechmerlin/readme.md @@ -0,0 +1,20 @@ +MechMerlin's KC60 Layout +====================== + +This is the 60% layout used by u/merlin36, host of the MechMerlin YouTube channel. +It has 5 layers, base QWERTY, base HHKB, FN 1, FN 2(HHKB), and an arrows only layer. + +Merlin's KC60 was acquired from Massdrop: https://www.massdrop.com/buy/kc60-mechanical-keyboard and is the Co-Star stabilizer version + +If you would like to program your KC60 using the manufacturer recommended approach, please follow the guide on keychatter: https://www.keychatter.com/2015/07/05/programming-the-kc60/. + +## Keymap Notes +- Highly influenced by the KBP V60 and WKL B.Face standard layouts +- Does not support any form of inswitch or underglow lighting as Merlin hates them. +- Arrow toggle switch is FN + Space +- Reset is FN + R +- HHKB keymap is approximate as keyboard is not built like HHKB + + +### Build +To build this keymap, simply run `make KEYMAP=mechmerlin`. diff --git a/keyboards/kc60/keymaps/workman-dead/keymap.c b/keyboards/kc60/keymaps/workman-dead/keymap.c index 9e3b9bb656..36e1c6506d 100644 --- a/keyboards/kc60/keymaps/workman-dead/keymap.c +++ b/keyboards/kc60/keymaps/workman-dead/keymap.c @@ -6,9 +6,6 @@ #define _FUN 3 #define _MS 4 -#define _______ KC_NO -#define XXXXXXX KC_TRNS - #define _DK_ACT 0 #define _DK_REL 1 #define _KC_COMS 2 diff --git a/keyboards/kitten_paw/readme.md b/keyboards/kitten_paw/readme.md index a6ef2a0672..55fac2ba5b 100644 --- a/keyboards/kitten_paw/readme.md +++ b/keyboards/kitten_paw/readme.md @@ -1,32 +1,16 @@ -kitten_paw keyboard firmware -====================== -This is the firmware for the 2016 revision of the Kitten Paw controller by Bathroom Epiphanies. -Most of the boilerplate code is the work of [BathroomEpiphanies](https://github.com/BathroomEpiphanies). +kitten_paw +========== + +This is the firmware for the 2016 revision of the Kitten Paw controller by Bathroom Epiphanies. Most of the boilerplate code is the work of [BathroomEpiphanies](https://github.com/BathroomEpiphanies). NKRO doesn't work at the moment, I don't know if I will take the time to find out how to fix this, so far 6KRO is enough for me. -## Quantum MK Firmware +Keyboard Maintainer: QMK Community +Hardware Supported: Kitten Paw PCB +Hardware Availability: https://geekhack.org/index.php?topic=46700.0 -For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). +Make example for this keyboard (after setting up your build environment): -## Building + make kitten_paw-default -Download or clone the whole firmware and navigate to the keyboards/kitten_paw folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. - -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default - -To build with the default keymap, simply run `make`. - -### Other Keymaps - -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. - -To build the firmware binary hex file with a keymap just do `make` with `keymap` option like: - -``` -$ make keymap=[default|jack|] -``` - -Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/lets_split/keymaps/OLED_sample/config.h b/keyboards/lets_split/keymaps/OLED_sample/config.h index c7cbc9372d..57ed7d763b 100644 --- a/keyboards/lets_split/keymaps/OLED_sample/config.h +++ b/keyboards/lets_split/keymaps/OLED_sample/config.h @@ -36,6 +36,7 @@ along with this program. If not, see . #define FLIP_HALF #define SSD1306OLED +//#define OLED_ROTATE180 #define PREVENT_STUCK_MODIFIERS diff --git a/keyboards/lets_split/keymaps/OLED_sample/keymap.c b/keyboards/lets_split/keymaps/OLED_sample/keymap.c index 274f917e21..9553309f89 100644 --- a/keyboards/lets_split/keymaps/OLED_sample/keymap.c +++ b/keyboards/lets_split/keymaps/OLED_sample/keymap.c @@ -2,7 +2,7 @@ #include "bootloader.h" #include "action_layer.h" #include "eeconfig.h" -#include "tmk_core/protocol/lufa/LUFA-git/LUFA/Drivers/Peripheral/TWI.h" +#include "LUFA/Drivers/Peripheral/TWI.h" #ifdef AUDIO_ENABLE #include "audio.h" #endif @@ -357,3 +357,91 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) return MACRO_NONE; } + + +void matrix_update(struct CharacterMatrix *dest, + const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +//assign the right code to your layers for OLED display +#define L_BASE 0 +#define L_LOWER 8 +#define L_RAISE 16 +#define L_FNLAYER 64 +#define L_NUMLAY 128 +#define L_NLOWER 136 +#define L_NFNLAYER 192 +#define L_MOUSECURSOR 256 +#define L_ADJUST 65560 + +void iota_gfx_task_user(void) { +#if DEBUG_TO_SCREEN + if (debug_enable) { + return; + } +#endif + + struct CharacterMatrix matrix; + + matrix_clear(&matrix); + matrix_write_P(&matrix, PSTR("USB: ")); +#ifdef PROTOCOL_LUFA + switch (USB_DeviceState) { + case DEVICE_STATE_Unattached: + matrix_write_P(&matrix, PSTR("Unattached")); + break; + case DEVICE_STATE_Suspended: + matrix_write_P(&matrix, PSTR("Suspended")); + break; + case DEVICE_STATE_Configured: + matrix_write_P(&matrix, PSTR("Connected")); + break; + case DEVICE_STATE_Powered: + matrix_write_P(&matrix, PSTR("Powered")); + break; + case DEVICE_STATE_Default: + matrix_write_P(&matrix, PSTR("Default")); + break; + case DEVICE_STATE_Addressed: + matrix_write_P(&matrix, PSTR("Addressed")); + break; + default: + matrix_write_P(&matrix, PSTR("Invalid")); + } +#endif + +// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below + + char buf[40]; + snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); + matrix_write_P(&matrix, PSTR("\n\nLayer: ")); + switch (layer_state) { + case L_BASE: + matrix_write_P(&matrix, PSTR("Default")); + break; + case L_RAISE: + matrix_write_P(&matrix, PSTR("Raise")); + break; + case L_LOWER: + matrix_write_P(&matrix, PSTR("Lower")); + break; + case L_ADJUST: + matrix_write_P(&matrix, PSTR("ADJUST")); + break; + default: + matrix_write(&matrix, buf); + } + + // Host Keyboard LED Status + char led[40]; + snprintf(led, sizeof(led), "\n%s %s %s", + (host_keyboard_leds() & (1< +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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + +#endif \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/ergodoxish/keymap.c b/keyboards/lets_split/keymaps/ergodoxish/keymap.c new file mode 100644 index 0000000000..936312b2e0 --- /dev/null +++ b/keyboards/lets_split/keymaps/ergodoxish/keymap.c @@ -0,0 +1,214 @@ +#include "lets_split.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// 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. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = KEYMAP( \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = KEYMAP( \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = KEYMAP( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = KEYMAP( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/fabian/Makefile b/keyboards/lets_split/keymaps/fabian/Makefile new file mode 100644 index 0000000000..b8c82cb99d --- /dev/null +++ b/keyboards/lets_split/keymaps/fabian/Makefile @@ -0,0 +1,9 @@ +# 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 +# +# UNICODE_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/lets_split/keymaps/fabian/config.h b/keyboards/lets_split/keymaps/fabian/config.h new file mode 100644 index 0000000000..ba271d1ac6 --- /dev/null +++ b/keyboards/lets_split/keymaps/fabian/config.h @@ -0,0 +1,34 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + + +#define USE_SERIAL + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + + +#ifdef SUBPROJECT_rev1 + #include "../../rev1/config.h" +#endif +#ifdef SUBPROJECT_rev2 + #include "../../rev2/config.h" +#endif +#ifdef SUBPROJECT_rev2fliphalf + #include "../../rev2fliphalf/config.h" +#endif diff --git a/keyboards/lets_split/keymaps/fabian/keymap.c b/keyboards/lets_split/keymaps/fabian/keymap.c new file mode 100644 index 0000000000..0af505b476 --- /dev/null +++ b/keyboards/lets_split/keymaps/fabian/keymap.c @@ -0,0 +1,221 @@ +#include "lets_split.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// 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. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Custom +#define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define SFT_BSP SFT_T(KC_BSPC) // Tap for Backspace, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +// #define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | GUI |AltGr | Ctrl |Adjust| + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, ADJUST \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | GUI |AltGr | Ctrl |Adjust| + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = KEYMAP( \ + HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, ADJUST \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | Bksp |Raise | GUI |AltGr | Ctrl |Adjust| + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = KEYMAP( \ + HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + SFT_BSP, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, ADJUST \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | MS L | MS D |MS U | MS R |MS Btn| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | Left | Down | Up | Rght |MS_BN2| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = KEYMAP( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BTN2, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | |Reset | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Reset | Del | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = KEYMAP( \ + _______, RESET, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, RESET, KC_DEL, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/lets_split/keymaps/piemod/README.md b/keyboards/lets_split/keymaps/piemod/README.md new file mode 100644 index 0000000000..f2a051da14 --- /dev/null +++ b/keyboards/lets_split/keymaps/piemod/README.md @@ -0,0 +1,31 @@ +PieMod +====== + +A keymap for users that need: + +- *P*: Programming symbols. + +- *I*: i3wm. + +- *E*: Emacs. + +- *M*: Macros. + +- *O*: Ortholinear. + +- *D*: Dvorak. + +Still a work-in-progress. Suggestions welcome @ https://github.com/dwrz/piemod. + +### Keymap + +![PieMod Keymap](./keymap.png) + +### TODO + +- [ ] Add Emacs layer. +- [ ] Add Macro layer. +- [ ] Add system control keys (rotation, brightness). +- [ ] Switch " and ' quotes (or function to toggle default). +- [ ] Add capslock. +. diff --git a/keyboards/lets_split/keymaps/piemod/config.h b/keyboards/lets_split/keymaps/piemod/config.h new file mode 100644 index 0000000000..7f33a43630 --- /dev/null +++ b/keyboards/lets_split/keymaps/piemod/config.h @@ -0,0 +1,37 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define _MASTER_RIGHT +// #define EE_HANDS + +#endif \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/piemod/keymap.c b/keyboards/lets_split/keymaps/piemod/keymap.c new file mode 100644 index 0000000000..558370fa86 --- /dev/null +++ b/keyboards/lets_split/keymaps/piemod/keymap.c @@ -0,0 +1,121 @@ +#include "lets_split.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _DVORAK 0 +#define _ARROW 1 //F(1) +#define _SYMBOL 2 // F(2) +#define _NUMBER 3 // F(3) +#define _FUNCTION 4 // F(4) +#define _EMACS 5 // F(5) +#define _MACROS 6 // F(6) +#define _MOUSE 7 // F(7) + +enum custom_keycodes { + DVORAK = SAFE_RANGE, + ARROW, + SYMBOL, + NUMBER, + FUNCTION, + EMACS, + MACROS, + MOUSE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_DVORAK] = KEYMAP( \ + KC_ESC, KC_QUOTE, F(7), KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DELETE, \ + KC_TAB, F(1), F(2), F(3), F(4), KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, \ + KC_LSHIFT, KC_SCOLON, F(5), KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_MINUS, \ + F(10), F(6), KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ +), + +[_ARROW] = KEYMAP( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP, \ + KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ +), + +[_SYMBOL] = KEYMAP( \ + KC_TILD, KC_GRAVE, KC_NO, KC_EQUAL, KC_PLUS, KC_NO, KC_LBRACKET, KC_RBRACKET, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ + KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, F(21), \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH, KC_SLASH, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL \ +), + +[_NUMBER] = KEYMAP( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_0, KC_1, KC_2, KC_3, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL \ +), + +[_FUNCTION] = KEYMAP( \ + KC_PSCREEN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, \ + RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DELETE, KC_INSERT, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ +), + +[_EMACS] = KEYMAP( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ +), + +[_MACROS] = KEYMAP( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ +), + +[_MOUSE] = KEYMAP( \ + KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_NO, KC_NO, KC_NO \ +) +}; + +enum function_id { + TEENSY_KEY, + CUSTOM_KEY, + L_CTRL_ALT_ENT, + R_CTRL_ALT_ENT, +}; + +int CAPSLOCKED = 0; + + const uint16_t PROGMEM fn_actions[] = { + + // DVORAK 0 + // ARROW 1, F(1) + // SYMBOL 2, F(2) + // NUMBER 3, F(3) + // FUNCTION 4, F(4) + // EMACS 5, F(5) + // MACROS 6, F(6) + // MOUSE 7, F(7) + + // Layers + [1] = ACTION_LAYER_TAP_KEY(1, KC_A), // FN1 = Momentary Arrow layer on A. + [2] = ACTION_LAYER_TAP_KEY(2, KC_O), // FN2 = Momentary symbOl layer on O. + [3] = ACTION_LAYER_TAP_KEY(3, KC_E), // FN3 = Momentary numbEr layer on E. + [4] = ACTION_LAYER_TAP_KEY(4, KC_U), // FN4 = Momentary fUnction layer on U. + [5] = ACTION_LAYER_TAP_KEY(5, KC_Q), // FN5 = Momentary emaQs layer on Q. + [6] = ACTION_LAYER_TAP_KEY(6, KC_LCTRL), // FN6 = Momentary MACROS on ??? key. + [7] = ACTION_LAYER_TAP_KEY(7, KC_COMMA), // FN7 = Momentary MOUSE on , key. + + // Special Keys + [10] = ACTION_MODS_KEY(KC_LCTRL, KC_LALT), // FN10 = Ctrl + Alt. + + // Symbols + [21] = ACTION_MODS_KEY(MOD_LSFT, KC_SLASH), // FN21 = Question mark. + + }; diff --git a/keyboards/lets_split/keymaps/xk/Makefile b/keyboards/lets_split/keymaps/xk/Makefile new file mode 100644 index 0000000000..46eb7989d5 --- /dev/null +++ b/keyboards/lets_split/keymaps/xk/Makefile @@ -0,0 +1,19 @@ +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +USE_I2C = yes +TAP_DANCE_ENABLE = yes + +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +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 = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/lets_split/keymaps/xk/config.h b/keyboards/lets_split/keymaps/xk/config.h new file mode 100644 index 0000000000..d37985043c --- /dev/null +++ b/keyboards/lets_split/keymaps/xk/config.h @@ -0,0 +1,47 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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. +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define TAPPING_TOGGLE 1 +#define TAPPING_TERM 200 +#define ONESHOT_TAP_TOGGLE 2 +#define ONESHOT_LAYER_TOGGLE 2 +#define ONESHOT_TIMEOUT 300 + +/* Use I2C or Serial, not both */ + +// #define USE_SERIAL +#define USE_I2C + +#define MOUSEKEY_INTERVAL 50 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 + +#define MOUSEKEY_WHEEL_DELAY 0 +#define MOUSEKEY_WHEEL_MAX_SPEED 8 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 + +// #define MASTER_LEFT +// #define _MASTER_RIGHT +#define EE_HANDS + + +#define PREVENT_STUCK_MODIFIERS +//#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD + +#endif \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/xk/keymap.c b/keyboards/lets_split/keymaps/xk/keymap.c new file mode 100755 index 0000000000..4d89a67f7f --- /dev/null +++ b/keyboards/lets_split/keymaps/xk/keymap.c @@ -0,0 +1,353 @@ +#include "lets_split.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _COLEMAK 0 +#define _KAMELOC 1 +#define _IKAPILA 2 +#define _IKASHFT 3 +#define _ARROWKY 4 +#define _FNCTION 5 +#define _NINEKEY 6 +#define _NAVIGAT 7 +#define _QWERTY 8 +#define _GRVTABL 15 + +enum custom_keycodes { + COLEMAK = SAFE_RANGE, + KAMELOC, + IKAPILA, + IKASHFT, + ARROWKY, + FNCTION, + NINEKEY, + NAVIGAT, + QWERTY, + GRVTABL, +}; + +//TD Declarations +enum { + VOM = 0, + PRN, + EGT, + HRD, + DSH, + QUT, + ESC, + EQE, + PGN, + UND, + BSDEL, + bsdel_mods, + BOOTME, +}; + +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// action-TAP for key/mod behavior LT(layer, kc) +#define XK_TAB LT(_FNCTION, KC_TAB) +#define XK_BSP LT(_KAMELOC, M(3)) + +#define XK_HARD LT(_FNCTION, M(1)) +#define XK_SPC LT(_IKAPILA, KC_SPC) +#define XK_ENT LT(_IKAPILA, KC_ENT) +#define XK_PGDN LT(_NAVIGAT, TD(PGN)) +#define XK_PREN LT(_IKASHFT, M(0)) +#define PIPBOY LT(_FNCTION, KC_BSLS) + +#define XK_DEL LT(_KAMELOC, KC_DEL) +#define XK_GRV LT(_GRVTABL, KC_GRV) + +// mod-TAP for mod/key behavior MT(modkey, kc) +#define ESC_IT MT(MOD_MEH, TD(ESC)) + +#define ALT_IT MT(MOD_LALT, KC_SCLN) +#define CTL_IT MT(MOD_LCTL, KC_SLSH) +#define XK_EGPT MT((MOD_LCTL | MOD_LALT | MOD_LGUI), M(2)) + +#define SFT_IT MT(MOD_RSFT, TG(_NAVIGAT)) +#define SFT_ENT MT(MOD_RSFT, KC_ENT) + +//sticky modifiers +#define KYCTL OSM(MOD_LCTL) +#define KYGUI OSM(MOD_LGUI) +#define KYSFT OSM(MOD_LSFT) +#define KYALT OSM(MOD_LALT) +#define CAKY OSM(MOD_LCTL | MOD_LALT) + +//shortcuts +#define CADEL LALT(LCTL(KC_DEL)) +#define CAINS LALT(LCTL(KC_INS)) +#define TGNKRO MAGIC_TOGGLE_NKRO + +#define NAVCH LCTL(KC_HOME) +#define NAVCPD LCTL(KC_PGDN) +#define NAVCPU LCTL(KC_PGUP) +#define NAVCE LCTL(KC_END) +#define NAVCU LCTL(KC_UP) +#define NAVCD LCTL(KC_DOWN) +#define NAVCL LCTL(KC_LEFT) +#define NAVCR LCTL(KC_RGHT) +#define NAVGU LGUI(KC_UP) +#define NAVGD LGUI(KC_DOWN) +#define NAVGL LGUI(KC_LEFT) +#define NAVGR LGUI(KC_RGHT) + +#define KC_NDSH LCTL(KC_PMNS) +#define KC_MDSH LALT(LCTL(KC_PMNS)) + +//!not sure if this old TMK code will work +//#define BOOTME ACTION_FUNCTION(BOOTLOADER) +#define LCLEAR ACTION_LAYER_SET_CLEAR(0) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + TAP + ┌────┬────┬────┬────┬────┬────┠┌────┬────┬────┬────┬────┬────┠+ │TAB │ Q │ W │ F │ P │ B │ │ J │ L │ U │ Y │ ; │DEL │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │BKSP│ A │ R │ S │ T │ G │ │ M │ N │ E │ I │ O │ ' │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │OSFT│ X │ C │ D │ V │ Z │ │ K │ H │ , │ . │ / │LNAV│ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │OCTL│OALT│L9KY│ [] │OGUI│SPC │ │ENT │PGDN│ () │ {} │ \ │ ` │ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ + HOLD + ┌────┬────┬────┬────┬────┬────┠┌────┬────┬────┬────┬────┬────┠+ │L FN│ │ │ │ │ │ │ │ │ │ │ALT │L!@#│ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │L OH│ │ │ │ │ │ │ │ │ │ │ │L OH│ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │SFT │ │ │ │ │ │ │ │ │ │ │CTL │SFT │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │CTL │ALT │L9KY│L!@#│GUI │L123│ │L123│LNAV│L!@#│MEH │L FN│LGRV│ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ + DOUBLETAP + ┌────┬────┬────┬────┬────┬────┠┌────┬────┬────┬────┬────┬────┠+ │ │!F4 │ │ │ │ │ │ │ │ │ │ │ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │OSML│ │ │ │ │UNDO│ │ │ │ │ │ │ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │OSML│OSML│ESC │ │OSML│ │ │ │PGUP│ │ │ │ │ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ + Switch type + ┌────┬────┬────┬────┬────┬────┠┌────┬────┬────┬────┬────┬────┠+ │Br │Z │Z │Z │Z │Z │ │Z │Z │Z │Z │Br │G │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │G │Z │Z │Z │Z │Z │ │Z │Z │Z │Z │Z │Z │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │Y │Z │Z │Z │Z │Z │ │Z │Z │Z │Z │B │Y │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │Y │Y │C │Z │BLK │BLK │ │BLK │BLK │Z │Z │B │G │ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ +*/ + +// Colemak PB&J (Mod-DH) +[_COLEMAK] = KEYMAP( \ + XK_TAB, TD(QUT), KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, ALT_IT, XK_GRV, \ + XK_BSP, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, XK_DEL, \ + KYSFT, KC_X, KC_C, KC_D, KC_V, TD(UND), KC_K, KC_H, KC_COMM, KC_DOT, CTL_IT, SFT_IT, \ + KYCTL, KYALT, ESC_IT, XK_HARD, KYGUI, XK_SPC, XK_ENT, XK_PGDN, XK_PREN, XK_EGPT, PIPBOY, XK_GRV \ +), + +// useful for one-handed typing +[_KAMELOC] = KEYMAP( \ + _______, KC_SCLN, KC_Y, KC_U, KC_L, KC_J, KC_B, KC_P, KC_F, KC_W, TD(QUT), _______, \ + _______, KC_O, KC_I, KC_E, KC_N, KC_M, KC_G, KC_T, KC_S, KC_R, KC_A, _______, \ + _______, KC_SLSH, KC_DOT, KC_COMM, KC_H, KC_K, TD(UND), KC_V, KC_D, KC_C, KC_X, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* + ┌────┬────┬────┬────┬────┬────┠┌────┬────┬────┬────┬────┬────┠+ │ ~ │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │DASH│MV- │ V+ │NEXT│PLAY│ │ ↠│ ↓ │ ↑ │ → │INS │ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │ - │ = │ [ │ ] │ \ │ │HOME│PGDN│PGUP│END │ \ │ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ +*/ +[_IKAPILA] = KEYMAP( \ + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + _______, TD(DSH), TD(VOM), KC_VOLU, KC_MNXT, KC_MPLY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_INS, _______, \ + _______, KC_MINS, KC_EQL, TD(HRD), KC_RBRC, KC_BSLS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BSLS, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* + ┌────┬────┬────┬────┬────┬────┠┌────┬────┬────┬────┬────┬────┠+ │ │ ! │ @ │ # │ $ │ % │ │ ^ │ & │ * │ ( │ ) │ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │DASH│MV- │ V+ │NEXT│PLAY│ │HOME│PGDN│PGUP│END │PSCR│ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │ _ │ + │ { │ } │ | │ │ ↠│ ↓ │ ↑ │ → │ │ │ + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ +*/ + +[_IKASHFT] = KEYMAP( \ + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + KC_DEL, TD(DSH), TD(VOM), KC_VOLU, KC_MNXT, KC_MPLY, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_PSCR, _______, \ + _______, KC_UNDS, KC_PLUS, TD(EGT), KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_PAUS, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* + ┌────┬────┬────┬────┬────┬────┠┌────┬────┬────┬────┬────┬────┠+ │ │ → │ ↑ │ ↠│ ↓ │ → │ │ → │ ↓ │ ↠│ ↑ │ ↑ │ │ just in case someone hacks my IP with a 10MeG pipe, you know? + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ + │ │ ↠│ ↓ │ → │ ↑ │ ↠│ │ ↑ │ ↠│ ↓ │ → │ ↠│ │ hacker_evasion layer + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ >>init network SEQUENCE + │ │ ↑ │ ↠│ ↓ │ → │ ↑ │ │ ↓ │ ↠│ ↑ │ → │ ↠│ │ sleep 11; echo "DONE\n" + ├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ throttle INPUT 11001001 OUTPUT 010011001 ? FULL )); \ + │ │ │ │ → │ ↠│ ↓ │ │ → │ ↑ │ ↠│ ↓ │ ↑ │ │ <event.pressed) { + switch(id) { + case 0: + return MACRO(D(LSHIFT),T(9), T(0),U(LSHIFT), T(LEFT), END); + case 1: + return MACRO(T(LBRC), T(RBRC), T(LEFT), END); + case 2: + return MACRO(D(LSHIFT),T(LBRC), T(RBRC),U(LSHIFT), T(ENT), T(UP), END); + case 3: + return MACRO(T(BSPC), END); +/* static bool bsdel_mods = false; + case BSDEL: { + uint8_t kc = KC_BSPC; + if (record->event.pressed) { + if (keyboard_report->mods) { + kc = KC_DEL; + } + register_code (kc); + bsdel_mods = keyboard_report->mods; + } + else { + if (bsdel_mods) { + kc = KC_DEL; + } + + unregister_code (kc); + } + } +*/ case 4: + if (!record->event.pressed) { +// bootloader(); + } + } + } + return MACRO_NONE; +}; diff --git a/keyboards/lets_split/matrix.c b/keyboards/lets_split/matrix.c index 81dfb14455..4def27239c 100644 --- a/keyboards/lets_split/matrix.c +++ b/keyboards/lets_split/matrix.c @@ -21,9 +21,7 @@ along with this program. If not, see . #include #include #include -#include -#include -#include +#include "wait.h" #include "print.h" #include "debug.h" #include "util.h" @@ -31,6 +29,7 @@ along with this program. If not, see . #include "split_util.h" #include "pro_micro.h" #include "config.h" +#include "timer.h" #ifdef USE_I2C # include "i2c.h" @@ -38,14 +37,29 @@ along with this program. If not, see . # include "serial.h" #endif -#ifndef DEBOUNCE -# define DEBOUNCE 5 +#ifndef DEBOUNCING_DELAY +# define DEBOUNCING_DELAY 5 #endif +#if (DEBOUNCING_DELAY > 0) + static uint16_t debouncing_time; + static bool debouncing = false; +#endif + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#else +# error "Currently only supports 8 COLS" +#endif +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + #define ERROR_DISCONNECT_COUNT 5 -static uint8_t debouncing = DEBOUNCE; -static const int ROWS_PER_HAND = MATRIX_ROWS/2; +#define ROWS_PER_HAND (MATRIX_ROWS/2) + static uint8_t error_count = 0; static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; @@ -55,11 +69,19 @@ static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - +#if (DIODE_DIRECTION == COL2ROW) + static void init_cols(void); + static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); + static void unselect_rows(void); + static void select_row(uint8_t row); + static void unselect_row(uint8_t row); +#elif (DIODE_DIRECTION == ROW2COL) + static void init_rows(void); + static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); + static void unselect_cols(void); + static void unselect_col(uint8_t col); + static void select_col(uint8_t col); +#endif __attribute__ ((weak)) void matrix_init_quantum(void) { matrix_init_kb(); @@ -118,33 +140,54 @@ void matrix_init(void) } matrix_init_quantum(); + } uint8_t _matrix_scan(void) { - // Right hand is stored after the left in the matirx so, we need to offset it int offset = isLeftHand ? 0 : (ROWS_PER_HAND); +#if (DIODE_DIRECTION == COL2ROW) + // Set row, read cols + for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); + + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + PORTD ^= (1 << 2); + } + +# else + read_cols_on_row(matrix+offset, current_row); +# endif - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - select_row(i); - _delay_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i+offset] != cols) { - matrix_debouncing[i+offset] = cols; - debouncing = DEBOUNCE; - } - unselect_rows(); } - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { +#elif (DIODE_DIRECTION == ROW2COL) + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + } +# else + read_rows_on_col(matrix+offset, current_col); +# endif + + } +#endif + +# if (DEBOUNCING_DELAY > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { matrix[i+offset] = matrix_debouncing[i+offset]; } + debouncing = false; } - } +# endif return 1; } @@ -200,9 +243,7 @@ int serial_transaction(void) { uint8_t matrix_scan(void) { - int ret = _matrix_scan(); - - + uint8_t ret = _matrix_scan(); #ifdef USE_I2C if( i2c_transaction() ) { @@ -233,11 +274,10 @@ uint8_t matrix_scan(void) void matrix_slave_scan(void) { _matrix_scan(); - int offset = (isLeftHand) ? 0 : (MATRIX_ROWS / 2); + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; #ifdef USE_I2C for (int i = 0; i < ROWS_PER_HAND; ++i) { - /* i2c_slave_buffer[i] = matrix[offset+i]; */ i2c_slave_buffer[i] = matrix[offset+i]; } #else // USE_SERIAL @@ -284,33 +324,141 @@ uint8_t matrix_key_count(void) return count; } -static void init_cols(void) +#if (DIODE_DIRECTION == COL2ROW) + +static void init_cols(void) { - for(int x = 0; x < MATRIX_COLS; x++) { - _SFR_IO8((col_pins[x] >> 4) + 1) &= ~_BV(col_pins[x] & 0xF); - _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + uint8_t pin = col_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI } } -static matrix_row_t read_cols(void) +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { - matrix_row_t result = 0; - for(int x = 0; x < MATRIX_COLS; x++) { - result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); - } - return result; -} + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; -static void unselect_rows(void) -{ - for(int x = 0; x < ROWS_PER_HAND; x++) { - _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); - _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + // For each col... + for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + + // Select the col pin to read (active low) + uint8_t pin = col_pins[col_index]; + uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); } static void select_row(uint8_t row) { - _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); - _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW } + +static void unselect_row(uint8_t row) +{ + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI +} + +static void unselect_rows(void) +{ + for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +#elif (DIODE_DIRECTION == ROW2COL) + +static void init_rows(void) +{ + for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) +{ + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + wait_us(30); + + // For each row... + for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) + { + + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row_index]; + + // Check row pin state + if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0) + { + // Pin LO, set col bit + current_matrix[row_index] |= (ROW_SHIFTER << current_col); + } + else + { + // Pin HI, clear col bit + current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) + { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +static void select_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW +} + +static void unselect_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI +} + +static void unselect_cols(void) +{ + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + uint8_t pin = col_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +#endif diff --git a/keyboards/lets_split/readme.md b/keyboards/lets_split/readme.md index 610b776ee1..0ef7ff59d7 100644 --- a/keyboards/lets_split/readme.md +++ b/keyboards/lets_split/readme.md @@ -106,7 +106,7 @@ Notes on Software Configuration ------------------------------- Configuring the firmware is similar to any other QMK project. One thing -to note is that `MATIX_ROWS` in `config.h` is the total number of rows between +to note is that `MATRIX_ROWS` in `config.h` is the total number of rows between the two halves, i.e. if your split keyboard has 4 rows in each half, then `MATRIX_ROWS=8`. @@ -115,7 +115,7 @@ not be very difficult to adapt it to support more if required. Flashing ------- -From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. +From the `lets_split` directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. Example: `make rev2-default-avrdude` diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk index cc87ee31c6..c2b7d556eb 100644 --- a/keyboards/lets_split/rules.mk +++ b/keyboards/lets_split/rules.mk @@ -74,15 +74,3 @@ USE_I2C = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [ -z $$USB ]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/lets_split/split_util.c b/keyboards/lets_split/split_util.c index 39639c3b4b..346cbc9089 100644 --- a/keyboards/lets_split/split_util.c +++ b/keyboards/lets_split/split_util.c @@ -8,6 +8,7 @@ #include "matrix.h" #include "keyboard.h" #include "config.h" +#include "timer.h" #ifdef USE_I2C # include "i2c.h" @@ -42,6 +43,7 @@ static void keyboard_master_setup(void) { } static void keyboard_slave_setup(void) { + timer_init(); #ifdef USE_I2C i2c_slave_init(SLAVE_I2C_ADDRESS); #else diff --git a/keyboards/lets_split/ssd1306.c b/keyboards/lets_split/ssd1306.c deleted file mode 100644 index 5c6dff27f8..0000000000 --- a/keyboards/lets_split/ssd1306.c +++ /dev/null @@ -1,470 +0,0 @@ -#ifdef SSD1306OLED - -#include "ssd1306.h" -#include "config.h" -#include "i2c.h" -#include -#include "print.h" -#include "lets_split.h" -#include "common/glcdfont.c" -#ifdef ADAFRUIT_BLE_ENABLE -#include "adafruit_ble.h" -#endif -#ifdef PROTOCOL_LUFA -#include "lufa.h" -#endif -#include "sendchar.h" -#include "pincontrol.h" - -//assign the right code to your layers -#define _BASE 0 -#define _LOWER 8 -#define _RAISE 16 -#define _FNLAYER 64 -#define _NUMLAY 128 -#define _NLOWER 136 -#define _NFNLAYER 192 -#define _MOUSECURSOR 256 -#define _ADJUST 65560 - -// Set this to 1 to help diagnose early startup problems -// when testing power-on with ble. Turn it off otherwise, -// as the latency of printing most of the debug info messes -// with the matrix scan, causing keys to drop. -#define DEBUG_TO_SCREEN 0 - -// Controls the SSD1306 128x32 OLED display via i2c - -#define i2cAddress 0x3C - -#define DisplayHeight 32 -#define DisplayWidth 128 - -#define FontHeight 8 -#define FontWidth 6 - -#define MatrixRows (DisplayHeight / FontHeight) -#define MatrixCols (DisplayWidth / FontWidth) - -struct CharacterMatrix { - uint8_t display[MatrixRows][MatrixCols]; - uint8_t *cursor; - bool dirty; -}; - -static struct CharacterMatrix display; -//static uint16_t last_battery_update; -//static uint32_t vbat; -//#define BatteryUpdateInterval 10000 /* milliseconds */ -#define ScreenOffInterval 300000 /* milliseconds */ -#if DEBUG_TO_SCREEN -static uint8_t displaying; -#endif -static uint16_t last_flush; - -enum ssd1306_cmds { - DisplayOff = 0xAE, - DisplayOn = 0xAF, - - SetContrast = 0x81, - DisplayAllOnResume = 0xA4, - - DisplayAllOn = 0xA5, - NormalDisplay = 0xA6, - InvertDisplay = 0xA7, - SetDisplayOffset = 0xD3, - SetComPins = 0xda, - SetVComDetect = 0xdb, - SetDisplayClockDiv = 0xD5, - SetPreCharge = 0xd9, - SetMultiPlex = 0xa8, - SetLowColumn = 0x00, - SetHighColumn = 0x10, - SetStartLine = 0x40, - - SetMemoryMode = 0x20, - ColumnAddr = 0x21, - PageAddr = 0x22, - - ComScanInc = 0xc0, - ComScanDec = 0xc8, - SegRemap = 0xa0, - SetChargePump = 0x8d, - ExternalVcc = 0x01, - SwitchCapVcc = 0x02, - - ActivateScroll = 0x2f, - DeActivateScroll = 0x2e, - SetVerticalScrollArea = 0xa3, - RightHorizontalScroll = 0x26, - LeftHorizontalScroll = 0x27, - VerticalAndRightHorizontalScroll = 0x29, - VerticalAndLeftHorizontalScroll = 0x2a, -}; - - -// Write command sequence. -// Returns true on success. -static inline bool _send_cmd1(uint8_t cmd) { - bool res = false; - - if (i2c_start_write(i2cAddress)) { - xprintf("failed to start write to %d\n", i2cAddress); - goto done; - } - - if (i2c_master_write(0x0 /* command byte follows */)) { - print("failed to write control byte\n"); - - goto done; - } - - if (i2c_master_write(cmd)) { - xprintf("failed to write command %d\n", cmd); - goto done; - } - res = true; -done: - i2c_master_stop(); - return res; -} - -// Write 2-byte command sequence. -// Returns true on success -static inline bool _send_cmd2(uint8_t cmd, uint8_t opr) { - if (!_send_cmd1(cmd)) { - return false; - } - return _send_cmd1(opr); -} - -// Write 3-byte command sequence. -// Returns true on success -static inline bool _send_cmd3(uint8_t cmd, uint8_t opr1, uint8_t opr2) { - if (!_send_cmd1(cmd)) { - return false; - } - if (!_send_cmd1(opr1)) { - return false; - } - return _send_cmd1(opr2); -} - -#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;} -#define send_cmd2(c,o) if (!_send_cmd2(c,o)) {goto done;} -#define send_cmd3(c,o1,o2) if (!_send_cmd3(c,o1,o2)) {goto done;} - -static void matrix_clear(struct CharacterMatrix *matrix); - -static void clear_display(void) { - matrix_clear(&display); - - // Clear all of the display bits (there can be random noise - // in the RAM on startup) - send_cmd3(PageAddr, 0, (DisplayHeight / 8) - 1); - send_cmd3(ColumnAddr, 0, DisplayWidth - 1); - - if (i2c_start_write(i2cAddress)) { - goto done; - } - if (i2c_master_write(0x40)) { - // Data mode - goto done; - } - for (uint8_t row = 0; row < MatrixRows; ++row) { - for (uint8_t col = 0; col < DisplayWidth; ++col) { - i2c_master_write(0); - } - } - - display.dirty = false; - -done: - i2c_master_stop(); -} - -#if DEBUG_TO_SCREEN -#undef sendchar -static int8_t capture_sendchar(uint8_t c) { - sendchar(c); - iota_gfx_write_char(c); - - if (!displaying) { - iota_gfx_flush(); - } - return 0; -} -#endif - -bool iota_gfx_init(void) { - bool success = false; - - send_cmd1(DisplayOff); - send_cmd2(SetDisplayClockDiv, 0x80); - send_cmd2(SetMultiPlex, DisplayHeight - 1); - - send_cmd2(SetDisplayOffset, 0); - - - send_cmd1(SetStartLine | 0x0); - send_cmd2(SetChargePump, 0x14 /* Enable */); - send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); - -/// Flips the display orientation 0 degrees - send_cmd1(SegRemap | 0x1); - send_cmd1(ComScanDec); -/* -// the following Flip the display orientation 180 degrees - send_cmd1(SegRemap); - send_cmd1(ComScanInc); -// end flip */ - send_cmd2(SetComPins, 0x2); - send_cmd2(SetContrast, 0x8f); - send_cmd2(SetPreCharge, 0xf1); - send_cmd2(SetVComDetect, 0x40); - send_cmd1(DisplayAllOnResume); - send_cmd1(NormalDisplay); - send_cmd1(DeActivateScroll); - send_cmd1(DisplayOn); - - send_cmd2(SetContrast, 0); // Dim - - clear_display(); - - success = true; - - iota_gfx_flush(); - -#if DEBUG_TO_SCREEN - print_set_sendchar(capture_sendchar); -#endif - -done: - return success; -} - -bool iota_gfx_off(void) { - bool success = false; - - send_cmd1(DisplayOff); - success = true; - -done: - return success; -} - -bool iota_gfx_on(void) { - bool success = false; - - send_cmd1(DisplayOn); - success = true; - -done: - return success; -} - -static void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { - *matrix->cursor = c; - ++matrix->cursor; - - if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) { - // We went off the end; scroll the display upwards by one line - memmove(&matrix->display[0], &matrix->display[1], - MatrixCols * (MatrixRows - 1)); - matrix->cursor = &matrix->display[MatrixRows - 1][0]; - memset(matrix->cursor, ' ', MatrixCols); - } -} - -static void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) { - matrix->dirty = true; - - if (c == '\n') { - // Clear to end of line from the cursor and then move to the - // start of the next line - uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols; - - while (cursor_col++ < MatrixCols) { - matrix_write_char_inner(matrix, ' '); - } - return; - } - - matrix_write_char_inner(matrix, c); -} - -void iota_gfx_write_char(uint8_t c) { - matrix_write_char(&display, c); -} - -static void matrix_write(struct CharacterMatrix *matrix, const char *data) { - const char *end = data + strlen(data); - while (data < end) { - matrix_write_char(matrix, *data); - ++data; - } -} - -void iota_gfx_write(const char *data) { - matrix_write(&display, data); -} - -static void matrix_write_P(struct CharacterMatrix *matrix, const char *data) { - while (true) { - uint8_t c = pgm_read_byte(data); - if (c == 0) { - return; - } - matrix_write_char(matrix, c); - ++data; - } -} - -void iota_gfx_write_P(const char *data) { - matrix_write_P(&display, data); -} - -static void matrix_clear(struct CharacterMatrix *matrix) { - memset(matrix->display, ' ', sizeof(matrix->display)); - matrix->cursor = &matrix->display[0][0]; - matrix->dirty = true; -} - -void iota_gfx_clear_screen(void) { - matrix_clear(&display); -} - -static void matrix_render(struct CharacterMatrix *matrix) { - last_flush = timer_read(); - iota_gfx_on(); -#if DEBUG_TO_SCREEN - ++displaying; -#endif - - // Move to the home position - send_cmd3(PageAddr, 0, MatrixRows - 1); - send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1); - - if (i2c_start_write(i2cAddress)) { - goto done; - } - if (i2c_master_write(0x40)) { - // Data mode - goto done; - } - - for (uint8_t row = 0; row < MatrixRows; ++row) { - for (uint8_t col = 0; col < MatrixCols; ++col) { - const uint8_t *glyph = font + (matrix->display[row][col] * (FontWidth - 1)); - - for (uint8_t glyphCol = 0; glyphCol < FontWidth - 1; ++glyphCol) { - uint8_t colBits = pgm_read_byte(glyph + glyphCol); - i2c_master_write(colBits); - } - - // 1 column of space between chars (it's not included in the glyph) - i2c_master_write(0); - } - } - - matrix->dirty = false; - -done: - i2c_master_stop(); -#if DEBUG_TO_SCREEN - --displaying; -#endif -} - -void iota_gfx_flush(void) { - matrix_render(&display); -} - -static void matrix_update(struct CharacterMatrix *dest, - const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -static void render_status_info(void) { -#if DEBUG_TO_SCREEN - if (debug_enable) { - return; - } -#endif - - struct CharacterMatrix matrix; - - matrix_clear(&matrix); - matrix_write_P(&matrix, PSTR("USB: ")); -#ifdef PROTOCOL_LUFA - switch (USB_DeviceState) { - case DEVICE_STATE_Unattached: - matrix_write_P(&matrix, PSTR("Unattached")); - break; - case DEVICE_STATE_Suspended: - matrix_write_P(&matrix, PSTR("Suspended")); - break; - case DEVICE_STATE_Configured: - matrix_write_P(&matrix, PSTR("Connected")); - break; - case DEVICE_STATE_Powered: - matrix_write_P(&matrix, PSTR("Powered")); - break; - case DEVICE_STATE_Default: - matrix_write_P(&matrix, PSTR("Default")); - break; - case DEVICE_STATE_Addressed: - matrix_write_P(&matrix, PSTR("Addressed")); - break; - default: - matrix_write_P(&matrix, PSTR("Invalid")); - } -#endif - -// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below - - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); - matrix_write_P(&matrix, PSTR("\n\nLayer: ")); - switch (layer_state) { - case _BASE: - matrix_write_P(&matrix, PSTR("Default")); - break; - case _RAISE: - matrix_write_P(&matrix, PSTR("Raise")); - break; - case _LOWER: - matrix_write_P(&matrix, PSTR("Lower")); - break; - case _ADJUST: - matrix_write_P(&matrix, PSTR("ADJUST")); - break; - default: - matrix_write(&matrix, buf); - } - - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n%s %s %s", - (host_keyboard_leds() & (1< ScreenOffInterval) { - iota_gfx_off(); - } -} -#endif diff --git a/keyboards/lets_split/ssd1306.h b/keyboards/lets_split/ssd1306.h deleted file mode 100644 index b0c74f987e..0000000000 --- a/keyboards/lets_split/ssd1306.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef SSD1306_H -#define SSD1306_H - -#include -#include - -bool iota_gfx_init(void); -void iota_gfx_task(void); -bool iota_gfx_off(void); -bool iota_gfx_on(void); -void iota_gfx_flush(void); -void iota_gfx_write_char(uint8_t c); -void iota_gfx_write(const char *data); -void iota_gfx_write_P(const char *data); -void iota_gfx_clear_screen(void); - -#endif diff --git a/keyboards/mechmini/README.md b/keyboards/mechmini/README.md index 72743319fa..ed590f3f1b 100644 --- a/keyboards/mechmini/README.md +++ b/keyboards/mechmini/README.md @@ -1,16 +1,24 @@ -mechmini keyboard firmware -========================== +mechmini +======== -This is a port of the QMK firmware for boards that are based on the -ps2avrGB firmware, like the [ps2avrGB -keyboard](https://www.keyclack.com/product/gb-ps2avrgb/) or the ones sold -by [Winkeyless](http://winkeyless.kr/product/ps2avrgb-parts/). +A compact ortholinear/staggered keyboard. + +Keyboard Maintainer: QMK Community +Hardware Supported: mechmini PCB +Hardware Availability: https://mechkeys.ca/collections/keyboards/products/mechmini-2-0-pcb + +Make example for this keyboard (after setting up your build environment): + + make mechmini-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. + +## Mechmini Notes Note that this is a complete replacement for the firmware, so you won't be using Bootmapper Client to change any keyboard settings, since not all the USB report options are supported. - ## Installing First, install the requirements. These commands are for OSX, but all you diff --git a/keyboards/minidox/Makefile b/keyboards/minidox/Makefile new file mode 100644 index 0000000000..30b43c4eaa --- /dev/null +++ b/keyboards/minidox/Makefile @@ -0,0 +1,5 @@ +SUBPROJECT_DEFAULT = rev1 + +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/minidox/config.h b/keyboards/minidox/config.h new file mode 100644 index 0000000000..306a486cb9 --- /dev/null +++ b/keyboards/minidox/config.h @@ -0,0 +1,74 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define MANUFACTURER That-Canadian +#define PRODUCT MiniDox +#define DESCRIPTION A compact version of the Ergo Dox + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 5 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#ifdef SUBPROJECT_rev1 + #include "rev1/config.h" +#endif + +#endif diff --git a/keyboards/minidox/eeprom-lefthand.eep b/keyboards/minidox/eeprom-lefthand.eep new file mode 100644 index 0000000000..e5a7bc1e57 Binary files /dev/null and b/keyboards/minidox/eeprom-lefthand.eep differ diff --git a/keyboards/minidox/eeprom-righthand.eep b/keyboards/minidox/eeprom-righthand.eep new file mode 100644 index 0000000000..7ea44f52ef Binary files /dev/null and b/keyboards/minidox/eeprom-righthand.eep differ diff --git a/keyboards/minidox/i2c.c b/keyboards/minidox/i2c.c new file mode 100644 index 0000000000..084c890c40 --- /dev/null +++ b/keyboards/minidox/i2c.c @@ -0,0 +1,162 @@ +#include +#include +#include +#include +#include +#include +#include "i2c.h" + +#ifdef USE_I2C + +// Limits the amount of we wait for any one i2c transaction. +// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is +// 9 bits, a single transaction will take around 90μs to complete. +// +// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit +// poll loop takes at least 8 clock cycles to execute +#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 + +#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) + +volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +static volatile uint8_t slave_buffer_pos; +static volatile bool slave_has_register_set = false; + +// Wait for an i2c operation to finish +inline static +void i2c_delay(void) { + uint16_t lim = 0; + while(!(TWCR & (1<10. + // Check datasheets for more info. + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; +} + +// Start a transaction with the given i2c slave address. The direction of the +// transfer is set with I2C_READ and I2C_WRITE. +// returns: 0 => success +// 1 => error +uint8_t i2c_master_start(uint8_t address) { + TWCR = (1< slave ACK +// 1 => slave NACK +uint8_t i2c_master_write(uint8_t data) { + TWDR = data; + TWCR = (1<= SLAVE_BUFFER_SIZE ) { + ack = 0; + slave_buffer_pos = 0; + } + slave_has_register_set = true; + } else { + i2c_slave_buffer[slave_buffer_pos] = TWDR; + BUFFER_POS_INC(); + } + break; + + case TW_ST_SLA_ACK: + case TW_ST_DATA_ACK: + // master has addressed this device as a slave transmitter and is + // requesting data. + TWDR = i2c_slave_buffer[slave_buffer_pos]; + BUFFER_POS_INC(); + break; + + case TW_BUS_ERROR: // something went wrong, reset twi state + TWCR = 0; + default: + break; + } + // Reset everything, so we are ready for the next TWI interrupt + TWCR |= (1< + +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +#define I2C_READ 1 +#define I2C_WRITE 0 + +#define I2C_ACK 1 +#define I2C_NACK 0 + +#define SLAVE_BUFFER_SIZE 0x10 + +// i2c SCL clock frequency +#define SCL_CLOCK 400000L + +extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +void i2c_master_init(void); +uint8_t i2c_master_start(uint8_t address); +void i2c_master_stop(void); +uint8_t i2c_master_write(uint8_t data); +uint8_t i2c_master_read(int); +void i2c_reset_state(void); +void i2c_slave_init(uint8_t address); + + +static inline unsigned char i2c_start_read(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_READ); +} + +static inline unsigned char i2c_start_write(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_WRITE); +} + +// from SSD1306 scrips +extern unsigned char i2c_rep_start(unsigned char addr); +extern void i2c_start_wait(unsigned char addr); +extern unsigned char i2c_readAck(void); +extern unsigned char i2c_readNak(void); +extern unsigned char i2c_read(unsigned char ack); + +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + +#endif diff --git a/keyboards/minidox/keymaps/default/keymap.c b/keyboards/minidox/keymaps/default/keymap.c new file mode 100644 index 0000000000..3fa20e1ebe --- /dev/null +++ b/keyboards/minidox/keymaps/default/keymap.c @@ -0,0 +1,168 @@ +#include "minidox.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// 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. +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Defines for task manager and such +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | E | R | T | | Y | U | I | O | P | + * |------+------+------+------+------| |------+------+------+------+------| + * | A | S | D | F | G | | H | J | K | L | ; | + * |------+------+------+------+------| |------+------+------+------+------| + * | Z | X | C | V | B | | N | M | , | . | / | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | Ctrl | LOWER| | | | RAISE| Shift| + * `-------------| Space| |BckSpc|------+------. + * | | | | + * `------' `------' + */ +[_QWERTY] = KEYMAP( \ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, \ + KC_LCTL, LOWER, KC_SPC, KC_BSPC, RAISE, OSM(MOD_LSFT) \ +), + +/* Raise + * + * ,----------------------------------. ,----------------------------------. + * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | + * |------+------+------+------+------| |------+------+------+------+------| + * | Tab | Left | Down | Up | Right| | | - | = | [ | ] | + * |------+------+------+------+------| |------+------+------+------+------| + * | Ctrl| ` | GUI | Alt | | | | | | \ | ' | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | LOWER| | | | RAISE| | + * `-------------| | | |------+------. + * | | | | + * `------' `------' + */ +[_RAISE] = KEYMAP( \ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ + KC_TAB, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, \ + KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, _______, _______, _______, _______, KC_BSLS, KC_QUOT, \ + _______, _______, _______, _______, _______, _______ \ +), + +/* Lower + * + * ,----------------------------------. ,----------------------------------. + * | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + * |------+------+------+------+------| |------+------+------+------+------| + * | Esc | | | | | | | _ | + | { | } | + * |------+------+------+------+------| |------+------+------+------+------| + * | Caps| ~ | | | | | | | | | | " | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | LOWER| | | | RAISE| Del | + * `-------------| | | Enter|------+------. + * | | | | + * `------' `------' + */ +[_LOWER] = KEYMAP( \ + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ + KC_ESC, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, \ + KC_CAPS, KC_TILD, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_DQT, \ + _______, _______, _______, KC_ENT, _______, KC_DEL \ +), + +/* Adjust (Lower + Raise) + * + * ,----------------------------------. ,----------------------------------. + * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + * |------+------+------+------+------| |------+------+------+------+------| + * | F11 | F12 | | | | | | | |Taskmg|caltde| + * |------+------+------+------+------| |------+------+------+------+------| + * | Reset| | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | LOWER| | | | RAISE| | + * `-------------| | | |------+------. + * | | | | + * `------' `------' + */ +[_ADJUST] = KEYMAP( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ + KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, TSKMGR, CALTDEL, \ + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______ \ +) +}; + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} \ No newline at end of file diff --git a/keyboards/minidox/keymaps/that_canadian/Makefile b/keyboards/minidox/keymaps/that_canadian/Makefile new file mode 100644 index 0000000000..52ef1ad3e4 --- /dev/null +++ b/keyboards/minidox/keymaps/that_canadian/Makefile @@ -0,0 +1,5 @@ +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/minidox/keymaps/that_canadian/config.h b/keyboards/minidox/keymaps/that_canadian/config.h new file mode 100644 index 0000000000..5832d1866e --- /dev/null +++ b/keyboards/minidox/keymaps/that_canadian/config.h @@ -0,0 +1,39 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define USE_SERIAL + +#define EE_HANDS + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D7 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 8 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#endif \ No newline at end of file diff --git a/keyboards/minidox/keymaps/that_canadian/keymap.c b/keyboards/minidox/keymaps/that_canadian/keymap.c new file mode 100644 index 0000000000..b1ca139b7b --- /dev/null +++ b/keyboards/minidox/keymaps/that_canadian/keymap.c @@ -0,0 +1,165 @@ +#include "minidox.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// 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. +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Defines for task manager and such +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | E | R | T | | Y | U | I | O | P | + * |------+------+------+------+------| |------+------+------+------+------| + * | A | S | D | F | G | | H | J | K | L | ; | + * |------+------+------+------+------| |------+------+------+------+------| + * | Z | X | C | V | B | | N | M | , | . | / | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | Shift| LOWER| | | | RAISE| Ctrl | + * `-------------| Space| |BckSpc|------+------. + * | | | | + * `------' `------' + */ +[_QWERTY] = KEYMAP( \ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, \ + OSM(MOD_LSFT), LOWER, KC_SPC, KC_BSPC, RAISE, KC_LCTL \ +), + +/* Raise + * + * ,----------------------------------. ,----------------------------------. + * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | + * |------+------+------+------+------| |------+------+------+------+------| + * | Tab | Left | Down | Up | Right| | | - | = | [ | ] | + * |------+------+------+------+------| |------+------+------+------+------| + * | Ctrl| ` | GUI | Alt | | | | | | \ | ' | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | LOWER| | | | RAISE| | + * `-------------| | | |------+------. + * | | | | + * `------' `------' + */ +[_RAISE] = KEYMAP( \ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ + KC_TAB, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, \ + KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, _______, _______, _______, _______, KC_BSLS, KC_QUOT, \ + _______, _______, _______, _______, _______, _______ \ +), + +/* Lower + * + * ,----------------------------------. ,----------------------------------. + * | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + * |------+------+------+------+------| |------+------+------+------+------| + * | Esc | | | | | | | _ | + | { | } | + * |------+------+------+------+------| |------+------+------+------+------| + * | Caps| ~ | | | | | | | | | | " | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | LOWER| | | | RAISE| Del | + * `-------------| | | Enter|------+------. + * | | | | + * `------' `------' + */ +[_LOWER] = KEYMAP( \ + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ + KC_ESC, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, \ + KC_CAPS, KC_TILD, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_DQT, \ + _______, _______, _______, KC_ENT, _______, KC_DEL \ +), + +/* Adjust (Lower + Raise) + * + * ,----------------------------------. ,----------------------------------. + * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | Up | F9 | F10 | + * |------+------+------+------+------| |------+------+------+------+------| + * | F11 | F12 | |RGBSAI|RGBSAD| | | Left | Down |Right |caltde| + * |------+------+------+------+------| |------+------+------+------+------| + * | Reset|RGBTOG|RGBMOD|RGBHUI|RGBHUD| |RGBVAI|RGBVAD| F8 |Taskmg| | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | LOWER| | | | RAISE| | + * `-------------| | | |------+------. + * | | | | + * `------' `------' + */ +[_ADJUST] = KEYMAP( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_UP, KC_F9, KC_F10, \ + KC_F11, KC_F12, _______, RGB_SAI, RGB_SAD, _______, KC_LEFT, KC_DOWN, KC_RGHT, CALTDEL, \ + RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_VAI, RGB_VAD, KC_F8, TSKMGR, _______, \ + _______, _______, _______, _______, _______, _______ \ +) +}; + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} \ No newline at end of file diff --git a/keyboards/minidox/matrix.c b/keyboards/minidox/matrix.c new file mode 100644 index 0000000000..81dfb14455 --- /dev/null +++ b/keyboards/minidox/matrix.c @@ -0,0 +1,316 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include +#include +#include +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "split_util.h" +#include "pro_micro.h" +#include "config.h" + +#ifdef USE_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "serial.h" +#endif + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +#define ERROR_DISCONNECT_COUNT 5 + +static uint8_t debouncing = DEBOUNCE; +static const int ROWS_PER_HAND = MATRIX_ROWS/2; +static uint8_t error_count = 0; + +static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static matrix_row_t read_cols(void); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + debug_enable = true; + debug_matrix = true; + debug_mouse = true; + // initialize row and col + unselect_rows(); + init_cols(); + + TX_RX_LED_INIT; + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + + matrix_init_quantum(); +} + +uint8_t _matrix_scan(void) +{ + // Right hand is stored after the left in the matirx so, we need to offset it + int offset = isLeftHand ? 0 : (ROWS_PER_HAND); + + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + select_row(i); + _delay_us(30); // without this wait read unstable value. + matrix_row_t cols = read_cols(); + if (matrix_debouncing[i+offset] != cols) { + matrix_debouncing[i+offset] = cols; + debouncing = DEBOUNCE; + } + unselect_rows(); + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + matrix[i+offset] = matrix_debouncing[i+offset]; + } + } + } + + return 1; +} + +#ifdef USE_I2C + +// Get rows from other half over i2c +int i2c_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); + if (err) goto i2c_error; + + // start of matrix stored at 0x00 + err = i2c_master_write(0x00); + if (err) goto i2c_error; + + // Start read + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); + if (err) goto i2c_error; + + if (!err) { + int i; + for (i = 0; i < ROWS_PER_HAND-1; ++i) { + matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); + } + matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); + i2c_master_stop(); + } else { +i2c_error: // the cable is disconnceted, or something else went wrong + i2c_reset_state(); + return err; + } + + return 0; +} + +#else // USE_SERIAL + +int serial_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + if (serial_update_buffers()) { + return 1; + } + + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = serial_slave_buffer[i]; + } + return 0; +} +#endif + +uint8_t matrix_scan(void) +{ + int ret = _matrix_scan(); + + + +#ifdef USE_I2C + if( i2c_transaction() ) { +#else // USE_SERIAL + if( serial_transaction() ) { +#endif + // turn on the indicator led when halves are disconnected + TXLED1; + + error_count++; + + if (error_count > ERROR_DISCONNECT_COUNT) { + // reset other half if disconnected + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = 0; + } + } + } else { + // turn off the indicator led on no error + TXLED0; + error_count = 0; + } + matrix_scan_quantum(); + return ret; +} + +void matrix_slave_scan(void) { + _matrix_scan(); + + int offset = (isLeftHand) ? 0 : (MATRIX_ROWS / 2); + +#ifdef USE_I2C + for (int i = 0; i < ROWS_PER_HAND; ++i) { + /* i2c_slave_buffer[i] = matrix[offset+i]; */ + i2c_slave_buffer[i] = matrix[offset+i]; + } +#else // USE_SERIAL + for (int i = 0; i < ROWS_PER_HAND; ++i) { + serial_slave_buffer[i] = matrix[offset+i]; + } +#endif +} + +bool matrix_is_modified(void) +{ + if (debouncing) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); + _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); + } +} + +static matrix_row_t read_cols(void) +{ + matrix_row_t result = 0; + for(int x = 0; x < MATRIX_COLS; x++) { + result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); + } + return result; +} + +static void unselect_rows(void) +{ + for(int x = 0; x < ROWS_PER_HAND; x++) { + _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); + _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); + } +} + +static void select_row(uint8_t row) +{ + _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); + _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); +} diff --git a/keyboards/minidox/minidox.c b/keyboards/minidox/minidox.c new file mode 100644 index 0000000000..b4bffbb3e4 --- /dev/null +++ b/keyboards/minidox/minidox.c @@ -0,0 +1 @@ +#include "minidox.h" \ No newline at end of file diff --git a/keyboards/minidox/minidox.h b/keyboards/minidox/minidox.h new file mode 100644 index 0000000000..479c7aec71 --- /dev/null +++ b/keyboards/minidox/minidox.h @@ -0,0 +1,10 @@ +#ifndef MINIDOX_H +#define MINIDOX_H + +#ifdef SUBPROJECT_rev1 + #include "rev1.h" +#endif + +#include "quantum.h" + +#endif \ No newline at end of file diff --git a/keyboards/lets_split/pro_micro.h b/keyboards/minidox/pro_micro.h similarity index 100% rename from keyboards/lets_split/pro_micro.h rename to keyboards/minidox/pro_micro.h diff --git a/keyboards/minidox/readme.md b/keyboards/minidox/readme.md new file mode 100644 index 0000000000..c15fd244a4 --- /dev/null +++ b/keyboards/minidox/readme.md @@ -0,0 +1,75 @@ +MiniDox +===== + +![MiniDox](http://i.imgur.com/iWb3yO0.jpg) + +A compact version of the ErgoDox + +Keyboard Maintainer: That-Canadian +Hardware Supported: MiniDox PCB rev1 Pro Micro + +Make example for this keyboard (after setting up your build environment): + + make minidox-rev1-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. + +## Build Guide + +A build guide for putting together the MiniDox v1 can be found here: [MiniDox Build Log / Guide](http://imgur.com/a/vImo6) + +Flashing +------- +Note: Most of this is copied from the Let's Split readme, because it is awesome + +From the `minidox` directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. +Example: `make rev1-default-avrdude` + +Choosing which board to plug the USB cable into (choosing Master) +-------- +Because the two boards are identical, the firmware has logic to differentiate the left and right board. + +It uses two strategies to figure things out: look at the EEPROM (memory on the chip) or looks if the current board has the usb cable. + +The EEPROM approach requires additional setup (flashing the eeeprom) but allows you to swap the usb cable to either side. + +The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra. + +### Setting the left hand as master +If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set. + +### Setting the right hand as master +If you always plug the usb cable into the right board, add an extra flag to your `config.h` +``` + #define MASTER_RIGHT +``` + +### Setting EE_hands to use either hands as master +If you define `EE_HANDS` in your `config.h`, you will need to set the +EEPROM for the left and right halves. + +The EEPROM is used to store whether the +half is left handed or right handed. This makes it so that the same firmware +file will run on both hands instead of having to flash left and right handed +versions of the firmware to each half. To flash the EEPROM file for the left +half run: +``` +avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-lefthand.eep +// or the equivalent in dfu-programmer + +``` +and similarly for right half +``` +avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-righhand.eep +// or the equivalent in dfu-programmer +``` + +NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`) + +After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash. + +Note that you need to program both halves, but you have the option of using +different keymaps for each half. You could program the left half with a QWERTY +layout and the right half with a Colemak layout using bootmagic's default layout option. +Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the +right half is connected. diff --git a/keyboards/minidox/rev1/Makefile b/keyboards/minidox/rev1/Makefile new file mode 100644 index 0000000000..4e2a6f00fd --- /dev/null +++ b/keyboards/minidox/rev1/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/minidox/rev1/config.h b/keyboards/minidox/rev1/config.h new file mode 100644 index 0000000000..9799c41994 --- /dev/null +++ b/keyboards/minidox/rev1/config.h @@ -0,0 +1,38 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef REV1_CONFIG_H +#define REV1_CONFIG_H + +#include "../config.h" + +#define DEVICE_VER 0x0001 + +// wiring of each half +#define MATRIX_ROW_PINS { B2, B6, B4, B5 } +#define MATRIX_COL_PINS { F4, D3, D2, D1, D4 } + +#define CATERINA_BOOTLOADER + +#define USE_SERIAL + +//#define EE_HANDS + +#define I2C_MASTER_LEFT +//#define I2C_MASTER_RIGHT + +#endif diff --git a/keyboards/minidox/rev1/rev1.c b/keyboards/minidox/rev1/rev1.c new file mode 100644 index 0000000000..72b473933e --- /dev/null +++ b/keyboards/minidox/rev1/rev1.c @@ -0,0 +1 @@ +#include "minidox.h" diff --git a/keyboards/minidox/rev1/rev1.h b/keyboards/minidox/rev1/rev1.h new file mode 100644 index 0000000000..379dbf64ad --- /dev/null +++ b/keyboards/minidox/rev1/rev1.h @@ -0,0 +1,28 @@ +#ifndef REV1_H +#define REV1_H + +#include "../minidox.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +//void promicro_bootloader_jmp(bool program); + +#define KEYMAP( \ + k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, \ + k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, \ + k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, \ + k33, k34, k35, k75, k74, k73 \ + ) \ + { \ + { k01, k02, k03, k04, k05 }, \ + { k11, k12, k13, k14, k15 }, \ + { k21, k22, k23, k24, k25 }, \ + { KC_NO, KC_NO, k33, k34, k35 }, \ + { k41, k42, k43, k44, k45 }, \ + { k51, k52, k53, k54, k55 }, \ + { k61, k62, k63, k64, k65 }, \ + { KC_NO, KC_NO, k73, k74, k75 } \ + } + +#endif \ No newline at end of file diff --git a/keyboards/minidox/rev1/rules.mk b/keyboards/minidox/rev1/rules.mk new file mode 100644 index 0000000000..a0825b4ef6 --- /dev/null +++ b/keyboards/minidox/rev1/rules.mk @@ -0,0 +1,5 @@ +BACKLIGHT_ENABLE = no + +ifndef QUANTUM_DIR + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/minidox/rules.mk b/keyboards/minidox/rules.mk new file mode 100644 index 0000000000..539456ae02 --- /dev/null +++ b/keyboards/minidox/rules.mk @@ -0,0 +1,74 @@ +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# 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(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= no # Audio control and System control(+450) +CONSOLE_ENABLE ?= no # Console for debug(+400) +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 ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +USE_I2C ?= no +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend + +CUSTOM_MATRIX = yes diff --git a/keyboards/minidox/serial.c b/keyboards/minidox/serial.c new file mode 100644 index 0000000000..6faed09ce0 --- /dev/null +++ b/keyboards/minidox/serial.c @@ -0,0 +1,228 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#include "serial.h" + +#ifdef USE_SERIAL + +// Serial pulse period in microseconds. Its probably a bad idea to lower this +// value. +#define SERIAL_DELAY 24 + +uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; +uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; + +#define SLAVE_DATA_CORRUPT (1<<0) +volatile uint8_t status = 0; + +inline static +void serial_delay(void) { + _delay_us(SERIAL_DELAY); +} + +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static +void serial_input(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +inline static +uint8_t serial_read_pin(void) { + return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); +} + +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +void serial_master_init(void) { + serial_output(); + serial_high(); +} + +void serial_slave_init(void) { + serial_input(); + + // Enable INT0 + EIMSK |= _BV(INT0); + // Trigger on falling edge of INT0 + EICRA &= ~(_BV(ISC00) | _BV(ISC01)); +} + +// Used by the master to synchronize timing with the slave. +static +void sync_recv(void) { + serial_input(); + // This shouldn't hang if the slave disconnects because the + // serial line will float to high if the slave does disconnect. + while (!serial_read_pin()); + serial_delay(); +} + +// Used by the slave to send a synchronization signal to the master. +static +void sync_send(void) { + serial_output(); + + serial_low(); + serial_delay(); + + serial_high(); +} + +// Reads a byte from the serial line +static +uint8_t serial_read_byte(void) { + uint8_t byte = 0; + serial_input(); + for ( uint8_t i = 0; i < 8; ++i) { + byte = (byte << 1) | serial_read_pin(); + serial_delay(); + _delay_us(1); + } + + return byte; +} + +// Sends a byte with MSB ordering +static +void serial_write_byte(uint8_t data) { + uint8_t b = 8; + serial_output(); + while( b-- ) { + if(data & (1 << b)) { + serial_high(); + } else { + serial_low(); + } + serial_delay(); + } +} + +// interrupt handle to be used by the slave device +ISR(SERIAL_PIN_INTERRUPT) { + sync_send(); + + uint8_t checksum = 0; + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_slave_buffer[i]); + sync_send(); + checksum += serial_slave_buffer[i]; + } + serial_write_byte(checksum); + sync_send(); + + // wait for the sync to finish sending + serial_delay(); + + // read the middle of pulses + _delay_us(SERIAL_DELAY/2); + + uint8_t checksum_computed = 0; + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_master_buffer[i] = serial_read_byte(); + sync_send(); + checksum_computed += serial_master_buffer[i]; + } + uint8_t checksum_received = serial_read_byte(); + sync_send(); + + serial_input(); // end transaction + + if ( checksum_computed != checksum_received ) { + status |= SLAVE_DATA_CORRUPT; + } else { + status &= ~SLAVE_DATA_CORRUPT; + } +} + +inline +bool serial_slave_DATA_CORRUPT(void) { + return status & SLAVE_DATA_CORRUPT; +} + +// Copies the serial_slave_buffer to the master and sends the +// serial_master_buffer to the slave. +// +// Returns: +// 0 => no error +// 1 => slave did not respond +int serial_update_buffers(void) { + // this code is very time dependent, so we need to disable interrupts + cli(); + + // signal to the slave that we want to start a transaction + serial_output(); + serial_low(); + _delay_us(1); + + // wait for the slaves response + serial_input(); + serial_high(); + _delay_us(SERIAL_DELAY); + + // check if the slave is present + if (serial_read_pin()) { + // slave failed to pull the line low, assume not present + sei(); + return 1; + } + + // if the slave is present syncronize with it + sync_recv(); + + uint8_t checksum_computed = 0; + // receive data from the slave + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + serial_slave_buffer[i] = serial_read_byte(); + sync_recv(); + checksum_computed += serial_slave_buffer[i]; + } + uint8_t checksum_received = serial_read_byte(); + sync_recv(); + + if (checksum_computed != checksum_received) { + sei(); + return 1; + } + + uint8_t checksum = 0; + // send data to the slave + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + serial_write_byte(serial_master_buffer[i]); + sync_recv(); + checksum += serial_master_buffer[i]; + } + serial_write_byte(checksum); + sync_recv(); + + // always, release the line when not in use + serial_output(); + serial_high(); + + sei(); + return 0; +} + +#endif diff --git a/keyboards/minidox/serial.h b/keyboards/minidox/serial.h new file mode 100644 index 0000000000..15fe4db7b4 --- /dev/null +++ b/keyboards/minidox/serial.h @@ -0,0 +1,26 @@ +#ifndef MY_SERIAL_H +#define MY_SERIAL_H + +#include "config.h" +#include + +/* TODO: some defines for interrupt setup */ +#define SERIAL_PIN_DDR DDRD +#define SERIAL_PIN_PORT PORTD +#define SERIAL_PIN_INPUT PIND +#define SERIAL_PIN_MASK _BV(PD0) +#define SERIAL_PIN_INTERRUPT INT0_vect + +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH 1 + +// Buffers for master - slave communication +extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(void); +bool serial_slave_data_corrupt(void); + +#endif diff --git a/keyboards/minidox/split_util.c b/keyboards/minidox/split_util.c new file mode 100644 index 0000000000..39639c3b4b --- /dev/null +++ b/keyboards/minidox/split_util.c @@ -0,0 +1,84 @@ +#include +#include +#include +#include +#include +#include +#include "split_util.h" +#include "matrix.h" +#include "keyboard.h" +#include "config.h" + +#ifdef USE_I2C +# include "i2c.h" +#else +# include "serial.h" +#endif + +volatile bool isLeftHand = true; + +static void setup_handedness(void) { + #ifdef EE_HANDS + isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); + #else + // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c + #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) + isLeftHand = !has_usb(); + #else + isLeftHand = has_usb(); + #endif + #endif +} + +static void keyboard_master_setup(void) { +#ifdef USE_I2C + i2c_master_init(); +#ifdef SSD1306OLED + matrix_master_OLED_init (); +#endif +#else + serial_master_init(); +#endif +} + +static void keyboard_slave_setup(void) { +#ifdef USE_I2C + i2c_slave_init(SLAVE_I2C_ADDRESS); +#else + serial_slave_init(); +#endif +} + +bool has_usb(void) { + USBCON |= (1 << OTGPADE); //enables VBUS pad + _delay_us(5); + return (USBSTA & (1< +#include "eeconfig.h" + +#define SLAVE_I2C_ADDRESS 0x32 + +extern volatile bool isLeftHand; + +// slave version of matix scan, defined in matrix.c +void matrix_slave_scan(void); + +void split_keyboard_setup(void); +bool has_usb(void); +void keyboard_slave_loop(void); + +void matrix_master_OLED_init (void); + +#endif diff --git a/keyboards/mitosis/readme.md b/keyboards/mitosis/readme.md index 70755e32ac..ef1eb0d832 100644 --- a/keyboards/mitosis/readme.md +++ b/keyboards/mitosis/readme.md @@ -1,5 +1,19 @@ -Mitosis Keyboard Firmware -====================== +Mitosis +======= + +A wireless split compact keyboard. + +Keyboard Maintainer: [@reversebias](https://github.com/reversebias] +Hardware Supported: Mitosis PCB +Hardware Availability: https://www.reddit.com/r/MechanicalKeyboards/comments/66588f/wireless_split_qmk_mitosis/ + +Make example for this keyboard (after setting up your build environment): + + make mitosis-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. + +## Mitosis Notes These configuration files were based off the Atreus keyboard. It assumes a Pro Micro is being used, however retains the 'make upload' feature from the Atreus branch. This keyboard uses a completely different 'matrix scan' system to other keyboards, it relies on an external nRF51822 microcontroller maintaining a matrix of keystates received from the keyboard halves. The matrix.c file contains the code to poll the external microcontroller for the key matrix. As long as this file is not changed, all other QMK features are supported. @@ -8,26 +22,3 @@ Build log of the keyboard can be found [here](https://www.reddit.com/r/Mechanica Hardware design files can be found [here](https://github.com/reversebias/mitosis-hardware) Firmware for the nordic MCUs can be found [here](https://github.com/reversebias/mitosis) - -## Quantum MK Firmware - -For the full Quantum feature list, see [the parent readme](/). - -## Building - -Download or clone the whole firmware and navigate to the keyboards/atreus folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button. - -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default -To build with the default keymap, simply run `make default`. - -### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/miuni32/readme.md b/keyboards/miuni32/readme.md index 36696ddbcb..3f3ddc8dfb 100644 --- a/keyboards/miuni32/readme.md +++ b/keyboards/miuni32/readme.md @@ -1,28 +1,14 @@ -miuni32 keyboard firmware -====================== +miuni32 +======= -## Quantum MK Firmware +A compact 30% keyboard. -For the full Quantum feature list, see [the parent readme](/). +Keyboard Maintainer: QMK Community +Hardware Supported: miuni32 PCB +Hardware Availability: https://zealpc.net/products/miuni32 -## Building +Make example for this keyboard (after setting up your build environment): -Download or clone the whole firmware and navigate to the keyboards/miuni32 folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + make miuni32-default -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default - -To build with the default keymap, simply run `make default`. - -### Other Keymaps - -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` - -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/nyquist/eeprom-lefthand.eep b/keyboards/nyquist/eeprom-lefthand.eep new file mode 100644 index 0000000000..b9666a74c0 Binary files /dev/null and b/keyboards/nyquist/eeprom-lefthand.eep differ diff --git a/keyboards/nyquist/eeprom-righthand.eep b/keyboards/nyquist/eeprom-righthand.eep new file mode 100644 index 0000000000..94cc5be7fc Binary files /dev/null and b/keyboards/nyquist/eeprom-righthand.eep differ diff --git a/keyboards/nyquist/keymaps/333fred/Makefile b/keyboards/nyquist/keymaps/333fred/Makefile new file mode 100644 index 0000000000..f854432807 --- /dev/null +++ b/keyboards/nyquist/keymaps/333fred/Makefile @@ -0,0 +1,7 @@ +KEY_LOCK_ENABLE = yes +NKRO_ENABLE = yes +CONSOLE_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/nyquist/keymaps/333fred/README.md b/keyboards/nyquist/keymaps/333fred/README.md new file mode 100644 index 0000000000..4276591415 --- /dev/null +++ b/keyboards/nyquist/keymaps/333fred/README.md @@ -0,0 +1,75 @@ +# 333fred's Nyquist Layout + +This nyquist layout is based on my Ergodox Infinity Layout, which is [here](../../../ergodox/keymaps/333fred/README.md). It doesn't have all of my VS extensions, as I have my nyquist at home, not at work. + +## Layers + +### QWERTY +The shift modifiers on this layer all use OSM to allow for quick single capitalization. Press and hold F to go to the VIM movement layer. Layer is also a one-shot layer toggle, and can be held down to type multiple characters on the Lower layer. Game is a regular toggle layer. + +``` +Qwerty +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | W | E | R | T | Y | U | I | O | P | \ | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | S | D |LTVIMF| G | H | J | K | L | ; | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| Z | X | C | V | B | N | M | , | . |/ Ctrl| Shift| +|------+------+------+------+------+------+------+------+------+------+------+------| +| Ctrl | Alt | F4 | GUI |Lower | Bksp | Spc | Ent | Lock | = | Game | Del | +`-----------------------------------------------------------------------------------' +``` + +### Lower +My symbol and numpad layer. APscr is a macro that sends ALT+PRSC, to take a screenshot of the current application. + +``` +Lower +,-----------------------------------------------------------------------------------. +| Caps | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | ! | @ | ( | ) | | | 7 | 8 | 9 | * | ) | F12 | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | # | $ | { | } | ` | 4 | 5 | 6 | + | } | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| APscr| % | ^ | [ | ] | ~ | 1 | 2 | 3 | \ | Vol- | Vol+ | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Pscr | | | | | | 0 | . | = | Prev | Next | Play | +`-----------------------------------------------------------------------------------' +``` + +### VIM Movement +Pressing and holding F moves to this layer, which turns hjkl into vim movement keys. a and d are macros which send WIN+Left and WIN+Right, respectively. Shift and CTRL have been remapped for ease of selecting text. +``` +Vim Movement (Hold down F) +,-----------------------------------------------------------------------------------. +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | DLeft|DRight| LCTRL| | | Left | Down | Up | Right| | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | LShft| | | | | | | | +`-----------------------------------------------------------------------------------' + ``` + +### Gaming +This layer is designed for playing games. All one-shot modification has been turned off, and the common game controls keys have been moved around for easier access. +``` +Gaming mode (Raise) +,-----------------------------------------------------------------------------------. +| ESC | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| CTRL | | | | F | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| Z | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Enter| | Lock | | Alt | Spc | Lower| Left | Up | Down | Right|QWERTY| +`-----------------------------------------------------------------------------------' +``` diff --git a/keyboards/nyquist/keymaps/333fred/config.h b/keyboards/nyquist/keymaps/333fred/config.h new file mode 100644 index 0000000000..86fe521654 --- /dev/null +++ b/keyboards/nyquist/keymaps/333fred/config.h @@ -0,0 +1,14 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define USE_SERIAL +#define MASTER_LEFT + +#undef TAPPING_TERM +#define TAPPING_TERM 150 + +#define PERMISSIVE_HOLD + +#endif diff --git a/keyboards/nyquist/keymaps/333fred/keymap.c b/keyboards/nyquist/keymaps/333fred/keymap.c new file mode 100644 index 0000000000..2edfeefe7b --- /dev/null +++ b/keyboards/nyquist/keymaps/333fred/keymap.c @@ -0,0 +1,135 @@ +#include "nyquist.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 1 +#define _VIM 2 +#define _GAME 3 + +enum custom_macros { + DLEFT, + DRIGHT, + PSCREEN_APP +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | \ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D |LTVIMF| G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . |/ Ctrl| Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | F4 | GUI |Lower | Bksp | Spc | Ent | Alt | + | Game | Del | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, \ + KC_ESC, KC_A, KC_S, KC_D, LT(_VIM, KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + OSM(MOD_LSFT), LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RCTL_T(KC_SLSH), OSM(MOD_RSFT), \ + KC_LCTL, KC_LALT, KC_F4, KC_LGUI, OSL(_LOWER), KC_BSPC, KC_SPC, KC_ENT, KC_LOCK, KC_EQL, TG(_GAME), KC_DEL \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | ! | @ | ( | ) | | | 7 | 8 | 9 | * | ) | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | # | $ | { | } | ` | 4 | 5 | 6 | + | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | APscr| % | ^ | [ | ] | ~ | 1 | 2 | 3 | \ | Vol- | Vol+ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Pscr | | | | | | 0 | . | = | Prev | Next | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( \ + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ + _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, KC_7, KC_8, KC_9, KC_ASTR, KC_RPRN, KC_F12, \ + _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, KC_4, KC_5, KC_6, KC_PLUS, KC_RCBR, KC_PIPE, \ + M(PSCREEN_APP), KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_1, KC_2, KC_3, KC_BSLS, KC_VOLD, KC_VOLU, \ + KC_PSCR, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, KC_MPRV, KC_MNXT, KC_MPLY \ +), + +/* Vim Movement (Hold down F) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | DLeft|DRight| LCTRL| | | Left | Down | Up | Right| | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | LShft| | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_VIM] = KEYMAP( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, M(DLEFT), M(DRIGHT), KC_LCTL, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* Gaming mode (Raise) + * All one-shot mods are disabled on this layer + * ,-----------------------------------------------------------------------------------. + * | ESC | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CTRL | | | | F | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Enter| | Lock | | Alt | Spc | Lower| Left | Up | Down | Right|QWERTY| + * `-----------------------------------------------------------------------------------' + */ +[_GAME] = KEYMAP( \ + KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_LCTL, _______, _______, _______, KC_F, _______, _______, _______, _______, _______, _______, _______, \ + KC_LSFT, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_ENT, _______, KC_LOCK, _______, KC_LALT, KC_SPC, OSL(_LOWER), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TO(_QWERTY) \ +) + +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch(id) { + case DLEFT: + if (record->event.pressed) { // Windows move desktop left + return MACRO(D(LCTL), D(LGUI), T(LEFT), U(LGUI), U(LCTL), END); + } + break; + case DRIGHT: + if (record->event.pressed) { // Windows move desktop right + return MACRO(D(LCTL), D(LGUI), T(RIGHT), U(LGUI), U(LCTL), END); + } + break; + case PSCREEN_APP: + if (record->event.pressed) { + return MACRO(D(LALT), T(PSCR), U(LALT), END); + } + break; + } + return MACRO_NONE; +} diff --git a/keyboards/nyquist/keymaps/default/Makefile b/keyboards/nyquist/keymaps/default/Makefile index 457a3d01d4..1e57612788 100644 --- a/keyboards/nyquist/keymaps/default/Makefile +++ b/keyboards/nyquist/keymaps/default/Makefile @@ -1,3 +1,5 @@ +RGBLIGHT_ENABLE = yes + ifndef QUANTUM_DIR include ../../../../Makefile endif diff --git a/keyboards/nyquist/keymaps/default/config.h b/keyboards/nyquist/keymaps/default/config.h index 624d284cac..072d4a7ce2 100644 --- a/keyboards/nyquist/keymaps/default/config.h +++ b/keyboards/nyquist/keymaps/default/config.h @@ -31,4 +31,11 @@ along with this program. If not, see . // #define _MASTER_RIGHT // #define EE_HANDS +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + #endif \ No newline at end of file diff --git a/keyboards/nyquist/keymaps/default/keymap.c b/keyboards/nyquist/keymaps/default/keymap.c index dcb68a6e06..97fee4e1e2 100644 --- a/keyboards/nyquist/keymaps/default/keymap.c +++ b/keyboards/nyquist/keymaps/default/keymap.c @@ -139,7 +139,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Reset| | | | | | | | | | Del | + * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| @@ -150,7 +150,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = KEYMAP( \ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ diff --git a/keyboards/nyquist/matrix.c b/keyboards/nyquist/matrix.c index dcb94c67c8..21eef94564 100644 --- a/keyboards/nyquist/matrix.c +++ b/keyboards/nyquist/matrix.c @@ -21,9 +21,7 @@ along with this program. If not, see . #include #include #include -#include -#include -#include +#include "wait.h" #include "print.h" #include "debug.h" #include "util.h" @@ -31,6 +29,7 @@ along with this program. If not, see . #include "split_util.h" #include "pro_micro.h" #include "config.h" +#include "timer.h" #ifdef USE_I2C # include "i2c.h" @@ -38,14 +37,29 @@ along with this program. If not, see . # include "serial.h" #endif -#ifndef DEBOUNCE -# define DEBOUNCE 5 +#ifndef DEBOUNCING_DELAY +# define DEBOUNCING_DELAY 5 #endif +#if (DEBOUNCING_DELAY > 0) + static uint16_t debouncing_time; + static bool debouncing = false; +#endif + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#else +# error "Currently only supports 8 COLS" +#endif +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + #define ERROR_DISCONNECT_COUNT 5 -static uint8_t debouncing = DEBOUNCE; -static const int ROWS_PER_HAND = MATRIX_ROWS/2; +#define ROWS_PER_HAND (MATRIX_ROWS/2) + static uint8_t error_count = 0; static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; @@ -55,11 +69,19 @@ static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - +#if (DIODE_DIRECTION == COL2ROW) + static void init_cols(void); + static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); + static void unselect_rows(void); + static void select_row(uint8_t row); + static void unselect_row(uint8_t row); +#elif (DIODE_DIRECTION == ROW2COL) + static void init_rows(void); + static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); + static void unselect_cols(void); + static void unselect_col(uint8_t col); + static void select_col(uint8_t col); +#endif __attribute__ ((weak)) void matrix_init_quantum(void) { matrix_init_kb(); @@ -118,33 +140,54 @@ void matrix_init(void) } matrix_init_quantum(); + } uint8_t _matrix_scan(void) { - // Right hand is stored after the left in the matirx so, we need to offset it int offset = isLeftHand ? 0 : (ROWS_PER_HAND); +#if (DIODE_DIRECTION == COL2ROW) + // Set row, read cols + for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); + + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + PORTD ^= (1 << 2); + } + +# else + read_cols_on_row(matrix+offset, current_row); +# endif - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - select_row(i); - _delay_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i+offset] != cols) { - matrix_debouncing[i+offset] = cols; - debouncing = DEBOUNCE; - } - unselect_rows(); } - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { +#elif (DIODE_DIRECTION == ROW2COL) + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + } +# else + read_rows_on_col(matrix+offset, current_col); +# endif + + } +#endif + +# if (DEBOUNCING_DELAY > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { matrix[i+offset] = matrix_debouncing[i+offset]; } + debouncing = false; } - } +# endif return 1; } @@ -200,9 +243,7 @@ int serial_transaction(void) { uint8_t matrix_scan(void) { - int ret = _matrix_scan(); - - + uint8_t ret = _matrix_scan(); #ifdef USE_I2C if( i2c_transaction() ) { @@ -233,11 +274,10 @@ uint8_t matrix_scan(void) void matrix_slave_scan(void) { _matrix_scan(); - int offset = (isLeftHand) ? 0 : (MATRIX_ROWS / 2); + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; #ifdef USE_I2C for (int i = 0; i < ROWS_PER_HAND; ++i) { - /* i2c_slave_buffer[i] = matrix[offset+i]; */ i2c_slave_buffer[i] = matrix[offset+i]; } #else // USE_SERIAL @@ -284,33 +324,141 @@ uint8_t matrix_key_count(void) return count; } -static void init_cols(void) +#if (DIODE_DIRECTION == COL2ROW) + +static void init_cols(void) { - for(int x = 0; x < MATRIX_COLS; x++) { - _SFR_IO8((col_pins[x] >> 4) + 1) &= ~_BV(col_pins[x] & 0xF); - _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + uint8_t pin = col_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI } } -static matrix_row_t read_cols(void) +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { - matrix_row_t result = 0; - for(int x = 0; x < MATRIX_COLS; x++) { - result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); - } - return result; -} + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; -static void unselect_rows(void) -{ - for(int x = 0; x < ROWS_PER_HAND; x++) { - _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); - _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + // For each col... + for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + + // Select the col pin to read (active low) + uint8_t pin = col_pins[col_index]; + uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); } static void select_row(uint8_t row) { - _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); - _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW } + +static void unselect_row(uint8_t row) +{ + uint8_t pin = row_pins[row]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI +} + +static void unselect_rows(void) +{ + for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +#elif (DIODE_DIRECTION == ROW2COL) + +static void init_rows(void) +{ + for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { + uint8_t pin = row_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) +{ + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + wait_us(30); + + // For each row... + for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) + { + + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row_index]; + + // Check row pin state + if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0) + { + // Pin LO, set col bit + current_matrix[row_index] |= (ROW_SHIFTER << current_col); + } + else + { + // Pin HI, clear col bit + current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) + { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +static void select_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW +} + +static void unselect_col(uint8_t col) +{ + uint8_t pin = col_pins[col]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI +} + +static void unselect_cols(void) +{ + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + uint8_t pin = col_pins[x]; + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } +} + +#endif diff --git a/keyboards/nyquist/pro_micro.h b/keyboards/nyquist/pro_micro.h deleted file mode 100644 index f9e7ed75d9..0000000000 --- a/keyboards/nyquist/pro_micro.h +++ /dev/null @@ -1,362 +0,0 @@ -/* - pins_arduino.h - Pin definition functions for Arduino - Part of Arduino - http://www.arduino.cc/ - - Copyright (c) 2007 David A. Mellis - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General - Public License along with this library; if not, write to the - Free Software Foundation, Inc., 59 Temple Place, Suite 330, - Boston, MA 02111-1307 USA - - $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ -*/ - -#ifndef Pins_Arduino_h -#define Pins_Arduino_h - -#include - -// Workaround for wrong definitions in "iom32u4.h". -// This should be fixed in the AVR toolchain. -#undef UHCON -#undef UHINT -#undef UHIEN -#undef UHADDR -#undef UHFNUM -#undef UHFNUML -#undef UHFNUMH -#undef UHFLEN -#undef UPINRQX -#undef UPINTX -#undef UPNUM -#undef UPRST -#undef UPCONX -#undef UPCFG0X -#undef UPCFG1X -#undef UPSTAX -#undef UPCFG2X -#undef UPIENX -#undef UPDATX -#undef TCCR2A -#undef WGM20 -#undef WGM21 -#undef COM2B0 -#undef COM2B1 -#undef COM2A0 -#undef COM2A1 -#undef TCCR2B -#undef CS20 -#undef CS21 -#undef CS22 -#undef WGM22 -#undef FOC2B -#undef FOC2A -#undef TCNT2 -#undef TCNT2_0 -#undef TCNT2_1 -#undef TCNT2_2 -#undef TCNT2_3 -#undef TCNT2_4 -#undef TCNT2_5 -#undef TCNT2_6 -#undef TCNT2_7 -#undef OCR2A -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 -#undef OCR2B -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 - -#define NUM_DIGITAL_PINS 30 -#define NUM_ANALOG_INPUTS 12 - -#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0) -#define TXLED0 PORTD |= (1<<5) -#define TXLED1 PORTD &= ~(1<<5) -#define RXLED0 PORTB |= (1<<0) -#define RXLED1 PORTB &= ~(1<<0) - -static const uint8_t SDA = 2; -static const uint8_t SCL = 3; -#define LED_BUILTIN 13 - -// Map SPI port to 'new' pins D14..D17 -static const uint8_t SS = 17; -static const uint8_t MOSI = 16; -static const uint8_t MISO = 14; -static const uint8_t SCK = 15; - -// Mapping of analog pins as digital I/O -// A6-A11 share with digital pins -static const uint8_t ADC0 = 18; -static const uint8_t ADC1 = 19; -static const uint8_t ADC2 = 20; -static const uint8_t ADC3 = 21; -static const uint8_t ADC4 = 22; -static const uint8_t ADC5 = 23; -static const uint8_t ADC6 = 24; // D4 -static const uint8_t ADC7 = 25; // D6 -static const uint8_t ADC8 = 26; // D8 -static const uint8_t ADC9 = 27; // D9 -static const uint8_t ADC10 = 28; // D10 -static const uint8_t ADC11 = 29; // D12 - -#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) -#define digitalPinToPCICRbit(p) 0 -#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0)) -#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4)))))) - -// __AVR_ATmega32U4__ has an unusual mapping of pins to channels -extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; -#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) ) - -#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT))))) - -#ifdef ARDUINO_MAIN - -// On the Arduino board, digital pins are also used -// for the analog output (software PWM). Analog input -// pins are a separate set. - -// ATMEL ATMEGA32U4 / ARDUINO LEONARDO -// -// D0 PD2 RXD1/INT2 -// D1 PD3 TXD1/INT3 -// D2 PD1 SDA SDA/INT1 -// D3# PD0 PWM8/SCL OC0B/SCL/INT0 -// D4 A6 PD4 ADC8 -// D5# PC6 ??? OC3A/#OC4A -// D6# A7 PD7 FastPWM #OC4D/ADC10 -// D7 PE6 INT6/AIN0 -// -// D8 A8 PB4 ADC11/PCINT4 -// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5 -// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6 -// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7 -// D12 A11 PD6 T1/#OC4D/ADC9 -// D13# PC7 PWM10 CLK0/OC4A -// -// A0 D18 PF7 ADC7 -// A1 D19 PF6 ADC6 -// A2 D20 PF5 ADC5 -// A3 D21 PF4 ADC4 -// A4 D22 PF1 ADC1 -// A5 D23 PF0 ADC0 -// -// New pins D14..D17 to map SPI port to digital pins -// -// MISO D14 PB3 MISO,PCINT3 -// SCK D15 PB1 SCK,PCINT1 -// MOSI D16 PB2 MOSI,PCINT2 -// SS D17 PB0 RXLED,SS/PCINT0 -// -// Connected LEDs on board for TX and RX -// TXLED D24 PD5 XCK1 -// RXLED D17 PB0 -// HWB PE2 HWB - -// these arrays map port names (e.g. port B) to the -// appropriate addresses for various functions (e.g. reading -// and writing) -const uint16_t PROGMEM port_to_mode_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &DDRB, - (uint16_t) &DDRC, - (uint16_t) &DDRD, - (uint16_t) &DDRE, - (uint16_t) &DDRF, -}; - -const uint16_t PROGMEM port_to_output_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PORTB, - (uint16_t) &PORTC, - (uint16_t) &PORTD, - (uint16_t) &PORTE, - (uint16_t) &PORTF, -}; - -const uint16_t PROGMEM port_to_input_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PINB, - (uint16_t) &PINC, - (uint16_t) &PIND, - (uint16_t) &PINE, - (uint16_t) &PINF, -}; - -const uint8_t PROGMEM digital_pin_to_port_PGM[] = { - PD, // D0 - PD2 - PD, // D1 - PD3 - PD, // D2 - PD1 - PD, // D3 - PD0 - PD, // D4 - PD4 - PC, // D5 - PC6 - PD, // D6 - PD7 - PE, // D7 - PE6 - - PB, // D8 - PB4 - PB, // D9 - PB5 - PB, // D10 - PB6 - PB, // D11 - PB7 - PD, // D12 - PD6 - PC, // D13 - PC7 - - PB, // D14 - MISO - PB3 - PB, // D15 - SCK - PB1 - PB, // D16 - MOSI - PB2 - PB, // D17 - SS - PB0 - - PF, // D18 - A0 - PF7 - PF, // D19 - A1 - PF6 - PF, // D20 - A2 - PF5 - PF, // D21 - A3 - PF4 - PF, // D22 - A4 - PF1 - PF, // D23 - A5 - PF0 - - PD, // D24 - PD5 - PD, // D25 / D6 - A7 - PD7 - PB, // D26 / D8 - A8 - PB4 - PB, // D27 / D9 - A9 - PB5 - PB, // D28 / D10 - A10 - PB6 - PD, // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { - _BV(2), // D0 - PD2 - _BV(3), // D1 - PD3 - _BV(1), // D2 - PD1 - _BV(0), // D3 - PD0 - _BV(4), // D4 - PD4 - _BV(6), // D5 - PC6 - _BV(7), // D6 - PD7 - _BV(6), // D7 - PE6 - - _BV(4), // D8 - PB4 - _BV(5), // D9 - PB5 - _BV(6), // D10 - PB6 - _BV(7), // D11 - PB7 - _BV(6), // D12 - PD6 - _BV(7), // D13 - PC7 - - _BV(3), // D14 - MISO - PB3 - _BV(1), // D15 - SCK - PB1 - _BV(2), // D16 - MOSI - PB2 - _BV(0), // D17 - SS - PB0 - - _BV(7), // D18 - A0 - PF7 - _BV(6), // D19 - A1 - PF6 - _BV(5), // D20 - A2 - PF5 - _BV(4), // D21 - A3 - PF4 - _BV(1), // D22 - A4 - PF1 - _BV(0), // D23 - A5 - PF0 - - _BV(5), // D24 - PD5 - _BV(7), // D25 / D6 - A7 - PD7 - _BV(4), // D26 / D8 - A8 - PB4 - _BV(5), // D27 / D9 - A9 - PB5 - _BV(6), // D28 / D10 - A10 - PB6 - _BV(6), // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - TIMER0B, /* 3 */ - NOT_ON_TIMER, - TIMER3A, /* 5 */ - TIMER4D, /* 6 */ - NOT_ON_TIMER, - - NOT_ON_TIMER, - TIMER1A, /* 9 */ - TIMER1B, /* 10 */ - TIMER0A, /* 11 */ - - NOT_ON_TIMER, - TIMER4A, /* 13 */ - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, -}; - -const uint8_t PROGMEM analog_pin_to_channel_PGM[] = { - 7, // A0 PF7 ADC7 - 6, // A1 PF6 ADC6 - 5, // A2 PF5 ADC5 - 4, // A3 PF4 ADC4 - 1, // A4 PF1 ADC1 - 0, // A5 PF0 ADC0 - 8, // A6 D4 PD4 ADC8 - 10, // A7 D6 PD7 ADC10 - 11, // A8 D8 PB4 ADC11 - 12, // A9 D9 PB5 ADC12 - 13, // A10 D10 PB6 ADC13 - 9 // A11 D12 PD6 ADC9 -}; - -#endif /* ARDUINO_MAIN */ - -// These serial port names are intended to allow libraries and architecture-neutral -// sketches to automatically default to the correct port name for a particular type -// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, -// the first hardware serial port whose RX/TX pins are not dedicated to another use. -// -// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor -// -// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial -// -// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library -// -// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. -// -// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX -// pins are NOT connected to anything by default. -#define SERIAL_PORT_MONITOR Serial -#define SERIAL_PORT_USBVIRTUAL Serial -#define SERIAL_PORT_HARDWARE Serial1 -#define SERIAL_PORT_HARDWARE_OPEN Serial1 - -#endif /* Pins_Arduino_h */ diff --git a/keyboards/nyquist/readme.md b/keyboards/nyquist/readme.md index c70bf02576..16debb9870 100644 --- a/keyboards/nyquist/readme.md +++ b/keyboards/nyquist/readme.md @@ -1,167 +1,20 @@ -The Nyquist Keyboard -==================== +Nyquist +======= -The Nyquist is a 60% split ortholinear board by [Keebio](https://keeb.io). It has been designed in a similar manner to the Let's Split v2 by /u/wootpatoot. Each half of the keyboard is arranged in a 5x6 grid. There is an option to use a 2u key with PCB mounted MX stablizers, in place of the two innermost 1u keys on the bottom row. +A split 60% split 5x12 ortholinear keyboard made and sold by Keebio. [More info at Keebio](https://keeb.io). +Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +Hardware Supported: Pro Micro +Hardware Availability: [Keebio](https://keeb.io) -## Build Guide +Make example for this keyboard (after setting up your build environment): -Since the design is very similar to the Let's Split v2, the build guide for that can be used while the build guide for the Nyquist is being fully developed. A build guide for putting together the Let's Split v2 can be found here: [An Overly Verbose Guide to Building a Let's Split Keyboard](https://github.com/nicinabox/lets-split-guide) + make nyquist-rev1-default -There is additional information there about flashing and adding RGB underglow. +Example of flashing this keyboard: -## First Time Setup + make nyquist-rev1-default-avrdude -Download or clone the whole firmware and navigate to the keyboards/nyquist directory. Once your development environment is setup, you'll be able to generate the default .hex using: +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. -``` -$ make serial -``` - -You will see a lot of output and if everything worked correctly you will see the built hex file: - -``` -nyquist_rev1_serial.hex -``` - -If you would like to use one of the alternative keymaps, or create your own, copy one of the existing [keymaps](keymaps/) and run make like so: - - -``` -$ make YOUR_KEYMAP_NAME -``` - -If everything worked correctly you will see a file: - -``` -nyquist_rev1_YOUR_KEYMAP_NAME.hex -``` - -For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md. - -Features --------- - -For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md). - -Some features supported by the firmware: - -* Either half can connect to the computer via USB, or both halves can be used - independently. -* You only need 3 wires to connect the two halves. Two for VCC and GND and one - for serial communication. -* Optional support for I2C connection between the two halves if for some - reason you require a faster connection between the two halves. Note this - requires an extra wire between halves and pull-up resistors on the data lines. - -### 2u Support -In place of the two innermost 1u keys on the bottom row, a single 2u key can be used. If you choose to use this option, then in your keymap, set the innermost key on the bottom row to what you want the 2u key to be. For example, if using the 2u key on the left half of the board, set the keycode for the lower right key. - -Required Hardware ------------------ - -Apart from diodes and key switches for the keyboard matrix in each half, you -will need: - -* 2 Arduino Pro Micro's. You can find theses on aliexpress for ≈3.50USD each. -* 2 TRRS sockets and 1 TRRS cable, or 2 TRS sockets and 1 TRS cable - -Alternatively, you can use any sort of cable and socket that has at least 3 -wires. If you want to use I2C to communicate between halves, you will need a -cable with at least 4 wires and 2x 4.7kΩ pull-up resistors - -Optional Hardware ------------------ - -A speaker can be hooked-up to either side to the `5` (`C6`) pin and `GND`, and turned on via `AUDIO_ENABLE`. - -Wiring ------- - -The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and digital pin 3 (i.e. -PD0 on the ATmega32u4) between the two Pro Micros. - -Then wire your key matrix to any of the remaining 17 IO pins of the pro micro -and modify the `matrix.c` accordingly. - -The wiring for serial: - -![serial wiring](http://imgur.com/BnCGU1Y) - -The wiring for i2c: - -![i2c wiring](http://imgur.com/5eiArDA) - -The pull-up resistors may be placed on either half. It is also possible -to use 4 resistors and have the pull-ups in both halves, but this is -unnecessary in simple use cases. - -Flashing -------- -From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. -Example: `make rev1-serial-avrdude` - - -Choosing which board to plug the USB cable into (choosing Master) --------- -Because the two boards are identical, the firmware has logic to differentiate the left and right board. - -It uses two strategies to figure things out: look at the EEPROM (memory on the chip) or looks if the current board has the usb cable. - -The EEPROM approach requires additional setup (flashing the eeeprom) but allows you to swap the usb cable to either side. - -The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra. - -### Setting the left hand as master -If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set. - -### Setting the right hand as master -If you always plug the usb cable into the right board, add an extra flag to your `config.h` -``` - #define MASTER_RIGHT -``` - -### Setting EE_hands to use either hands as master -If you define `EE_HANDS` in your `config.h`, you will need to set the -EEPROM for the left and right halves. - -The EEPROM is used to store whether the -half is left handed or right handed. This makes it so that the same firmware -file will run on both hands instead of having to flash left and right handed -versions of the firmware to each half. To flash the EEPROM file for the left -half run: -``` -avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-lefthand.eep -// or the equivalent in dfu-programmer - -``` -and similarly for right half -``` -avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-righhand.eep -// or the equivalent in dfu-programmer -``` - -NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`) - -After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash. - -Note that you need to program both halves, but you have the option of using -different keymaps for each half. You could program the left half with a QWERTY -layout and the right half with a Colemak layout using bootmagic's default layout option. -Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the -right half is connected. - - -Notes on Using Pro Micro 3.3V ------------------------------ - -Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects -the frequency on the 3.3V board. - -Also, if the slave board is producing weird characters in certain columns, -update the following line in `matrix.c` to the following: - -``` -// _delay_us(30); // without this wait read unstable value. -_delay_us(300); // without this wait read unstable value. -``` +A build guide for this keyboard can be found here: [Nyquist Build Guide](https://docs.keeb.io) diff --git a/keyboards/nyquist/rules.mk b/keyboards/nyquist/rules.mk index dfcff1d902..3f40ff2f82 100644 --- a/keyboards/nyquist/rules.mk +++ b/keyboards/nyquist/rules.mk @@ -73,15 +73,3 @@ USE_I2C = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/nyquist/split_util.c b/keyboards/nyquist/split_util.c index 39639c3b4b..346cbc9089 100644 --- a/keyboards/nyquist/split_util.c +++ b/keyboards/nyquist/split_util.c @@ -8,6 +8,7 @@ #include "matrix.h" #include "keyboard.h" #include "config.h" +#include "timer.h" #ifdef USE_I2C # include "i2c.h" @@ -42,6 +43,7 @@ static void keyboard_master_setup(void) { } static void keyboard_slave_setup(void) { + timer_init(); #ifdef USE_I2C i2c_slave_init(SLAVE_I2C_ADDRESS); #else diff --git a/keyboards/org60/Makefile b/keyboards/org60/Makefile new file mode 100644 index 0000000000..57b2ef62e5 --- /dev/null +++ b/keyboards/org60/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/org60/config.h b/keyboards/org60/config.h new file mode 100644 index 0000000000..62b3b69a0e --- /dev/null +++ b/keyboards/org60/config.h @@ -0,0 +1,82 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER 大橘å­å¤–设 (Large orange peripherals) +#define PRODUCT Org60 +#define DESCRIPTION Org60 Keyboard PCB by 大橘å­å¤–设 (Large orange peripherals) + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } +#define UNUSED_PINS + +/* Backlight Setup */ +#define BACKLIGHT_PIN F5 +#define BACKLIGHT_LEVELS 6 +//#define BACKLIGHT_BREATHING + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* RGB Underglow + * F6 PIN for Org60 that has pre-soldered WS2812 LEDs + */ +#define RGB_DI_PIN F6 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 20 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* 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 + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#define TAPPING_TERM 200 + +#endif diff --git a/keyboards/org60/keymaps/boardy/Makefile b/keyboards/org60/keymaps/boardy/Makefile new file mode 100644 index 0000000000..0755d50093 --- /dev/null +++ b/keyboards/org60/keymaps/boardy/Makefile @@ -0,0 +1,15 @@ + +# QMK 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 +# +CONSOLE_ENABLE = no # Enable debugging console +COMMAND_ENABLE = no # Commands for debug and configuration +TAP_DANCE_ENABLE = no # Tap Dance skills +UNICODE_ENABLE = no # Unicode + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + + diff --git a/keyboards/org60/keymaps/boardy/keymap.c b/keyboards/org60/keymaps/boardy/keymap.c new file mode 100644 index 0000000000..635838f6cf --- /dev/null +++ b/keyboards/org60/keymaps/boardy/keymap.c @@ -0,0 +1,121 @@ +#include "org60.h" +#include "action_layer.h" + +// Keyboard Layers +enum keyboard_layers { + _BASE, // Base Layer + _FUNCTION, // Function Layer +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = KEYMAP( + /* + 0: Base Layer + .--------------------------------------------------------------------------------------------------------------------------------------. + | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | _ | + | | + | | | | | | | | | | | | | | | + | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | | | | | | | | { | ] | | | + | | | | | | | | | | | | | | | + | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | | | | | | | : | " | | + | | | | | | | | | | | | | | + | PrntScr | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | | | | | < | > | ? |â–‘â–‘â–‘â–‘â–‘â–‘| |â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘| + | | | | | | | | | | | |â–‘â–‘â–‘â–‘â–‘â–‘| |â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘| + | Shift | Z | X | C | V | B | N | M | , | . | / |â–‘â–‘â–‘â–‘â–‘â–‘| Up |â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘| + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | |â–‘â–‘â–‘â–‘â–‘â–‘| | | | + | | | | | |â–‘â–‘â–‘â–‘â–‘â–‘| | | | + | Ctrl | Win | Alt | Space | FnO |â–‘â–‘â–‘â–‘â–‘â–‘| Left | Down | Right | + '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + //--------------------------------------------------------------------------------------------------------------------------------------. + // | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | + 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_NO, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | + 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_PSCR, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, 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_NO, KC_UP, KC_NO, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | |â–‘â–‘â–‘â–‘â–‘â–‘| | | | + // | | | | |â–‘â–‘â–‘â–‘â–‘â–‘| | | | + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, F(0), KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT), + //--------------------------------------------------------------------------------------------------------------------------------------' + + + [_FUNCTION] = KEYMAP( + /* + 1: Function Layer + .--------------------------------------------------------------------------------------------------------------------------------------. + | | | | | | | | | | | | | | | + | | | | | | | | | | | | | | | + | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | | | | | | | | | | | + | | | | | RGB | RGB | RGB | RGB | | | | | | | + | Reset | 7 | 8 | 9 | Toggle | Mode | Pwr+ | Pwr- | | Insert | Pause | Home | End | Sleep | + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | | | | | | | | | | + | | | | | RGB | RGB | RGB | RGB | | | Page | Page | | + | Caps Lock | 4 | 5 | 6 | Hue+ | Hue- | Sat+ | Sat- | | | Up | Down | Enter | + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | | | | | | | |â–‘â–‘â–‘â–‘â–‘â–‘| |â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘| + | | | | | | Back | Back | | Prev | Next | |â–‘â–‘â–‘â–‘â–‘â–‘| |â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘| + | Shift | 1 | 2 | 3 | | Light+ | Light- | | Track | Track | |â–‘â–‘â–‘â–‘â–‘â–‘| Up |â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘| + |--------------------------------------------------------------------------------------------------------------------------------------| + | | | | | |â–‘â–‘â–‘â–‘â–‘â–‘| | | | + | | | | | |â–‘â–‘â–‘â–‘â–‘â–‘| | | | + | Ctrl | Win | Alt | 0 | Fn0 |â–‘â–‘â–‘â–‘â–‘â–‘| Mute | Down | Right | + '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + //--------------------------------------------------------------------------------------------------------------------------------------. + // | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_NO, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | | | | | | | | | | | + // | | | | | | | | | | | | | | + RESET, KC_7, KC_8, KC_9, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, KC_NO, KC_INS, KC_PAUS, KC_HOME, KC_END, KC_SLEP, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | | | | | | | | | | + // | | | | | | | | | | | | | + KC_CAPS, KC_4, KC_5, KC_6, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_NO, KC_NO, KC_PGUP, KC_PGDN, KC_NO, KC_ENT, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | | | | | | | |â–‘â–‘â–‘â–‘â–‘â–‘| |â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘| + // | | | | | | | | | | |â–‘â–‘â–‘â–‘â–‘â–‘| |â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘| + KC_LSFT, KC_NO, KC_1, KC_2, KC_3, KC_NO, BL_INC, BL_DEC, KC_NO, KC_MPRV, KC_MNXT, KC_NO, KC_NO, KC_VOLU, KC_NO, + //--------------------------------------------------------------------------------------------------------------------------------------| + // | | | | |â–‘â–‘â–‘â–‘â–‘â–‘| | | | + // | | | | |â–‘â–‘â–‘â–‘â–‘â–‘| | | | + KC_LCTL, KC_LGUI, KC_LALT, KC_0, F(0), KC_NO, KC_MUTE, KC_VOLD, KC_MPLY), + //--------------------------------------------------------------------------------------------------------------------------------------' + +}; + + +// Custom Actions +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(_FUNCTION), // to Function overlay +}; + + +// Loop +void matrix_scan_user(void) { + // Empty +}; \ No newline at end of file diff --git a/keyboards/org60/keymaps/boardy/readme.md b/keyboards/org60/keymaps/boardy/readme.md new file mode 100644 index 0000000000..3643fbce30 --- /dev/null +++ b/keyboards/org60/keymaps/boardy/readme.md @@ -0,0 +1,7 @@ +# Boardy layout + +![Uses this layout](http://i.imgur.com/k3g488o.jpg) + +This is my custom layout for my board Boardy designed to be used with an [Org60] and custom plate. + +[Org60]: https://world.taobao.com/item/544441405112.htm diff --git a/keyboards/org60/keymaps/default/keymap.c b/keyboards/org60/keymaps/default/keymap.c new file mode 100644 index 0000000000..9d18d50e31 --- /dev/null +++ b/keyboards/org60/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +#include "org60.h" +#include "action_layer.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // 0: Base Layer + KEYMAP( + 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_NO, \ + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, 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_NO, KC_RSFT ,KC_UP, KC_DEL, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), + + // 1: Function Layer + KEYMAP( + RESET, 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_NO, KC_NO, \ + KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ + KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ + KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_RSFT, KC_NO ,KC_PGUP, KC_INS, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END), + +}; + +// Custom Actions +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay +}; + +// Macros +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { register_code(KC_RSFT); } + else { unregister_code(KC_RSFT); } + break; + } + + return MACRO_NONE; +}; + +// Loop +void matrix_scan_user(void) { + // Empty +}; \ No newline at end of file diff --git a/keyboards/org60/keymaps/default/readme.md b/keyboards/org60/keymaps/default/readme.md new file mode 100644 index 0000000000..89f9acaa97 --- /dev/null +++ b/keyboards/org60/keymaps/default/readme.md @@ -0,0 +1,5 @@ +![Uses this layout](https://i.redd.it/v64eqwsrk8jx.jpg) + +All of the keys which CAN have a function should be assigned one. + +The keys with KC_NO cannot be assigned a value diff --git a/keyboards/org60/org60.c b/keyboards/org60/org60.c new file mode 100644 index 0000000000..77a5e7c18b --- /dev/null +++ b/keyboards/org60/org60.c @@ -0,0 +1,19 @@ +#include "org60.h" + + +extern inline void org60_caps_led_on(void); +extern inline void org60_bl_led_on(void); + +extern inline void org60_caps_led_off(void); +extern inline void org60_bl_led_off(void); + + +void led_set_kb(uint8_t usb_led) { + if (usb_led & (1< - -// Workaround for wrong definitions in "iom32u4.h". -// This should be fixed in the AVR toolchain. -#undef UHCON -#undef UHINT -#undef UHIEN -#undef UHADDR -#undef UHFNUM -#undef UHFNUML -#undef UHFNUMH -#undef UHFLEN -#undef UPINRQX -#undef UPINTX -#undef UPNUM -#undef UPRST -#undef UPCONX -#undef UPCFG0X -#undef UPCFG1X -#undef UPSTAX -#undef UPCFG2X -#undef UPIENX -#undef UPDATX -#undef TCCR2A -#undef WGM20 -#undef WGM21 -#undef COM2B0 -#undef COM2B1 -#undef COM2A0 -#undef COM2A1 -#undef TCCR2B -#undef CS20 -#undef CS21 -#undef CS22 -#undef WGM22 -#undef FOC2B -#undef FOC2A -#undef TCNT2 -#undef TCNT2_0 -#undef TCNT2_1 -#undef TCNT2_2 -#undef TCNT2_3 -#undef TCNT2_4 -#undef TCNT2_5 -#undef TCNT2_6 -#undef TCNT2_7 -#undef OCR2A -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 -#undef OCR2B -#undef OCR2_0 -#undef OCR2_1 -#undef OCR2_2 -#undef OCR2_3 -#undef OCR2_4 -#undef OCR2_5 -#undef OCR2_6 -#undef OCR2_7 - -#define NUM_DIGITAL_PINS 30 -#define NUM_ANALOG_INPUTS 12 - -#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0) -#define TXLED0 PORTD |= (1<<5) -#define TXLED1 PORTD &= ~(1<<5) -#define RXLED0 PORTB |= (1<<0) -#define RXLED1 PORTB &= ~(1<<0) - -static const uint8_t SDA = 2; -static const uint8_t SCL = 3; -#define LED_BUILTIN 13 - -// Map SPI port to 'new' pins D14..D17 -static const uint8_t SS = 17; -static const uint8_t MOSI = 16; -static const uint8_t MISO = 14; -static const uint8_t SCK = 15; - -// Mapping of analog pins as digital I/O -// A6-A11 share with digital pins -static const uint8_t ADC0 = 18; -static const uint8_t ADC1 = 19; -static const uint8_t ADC2 = 20; -static const uint8_t ADC3 = 21; -static const uint8_t ADC4 = 22; -static const uint8_t ADC5 = 23; -static const uint8_t ADC6 = 24; // D4 -static const uint8_t ADC7 = 25; // D6 -static const uint8_t ADC8 = 26; // D8 -static const uint8_t ADC9 = 27; // D9 -static const uint8_t ADC10 = 28; // D10 -static const uint8_t ADC11 = 29; // D12 - -#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) -#define digitalPinToPCICRbit(p) 0 -#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0)) -#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4)))))) - -// __AVR_ATmega32U4__ has an unusual mapping of pins to channels -extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; -#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) ) - -#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT))))) - -#ifdef ARDUINO_MAIN - -// On the Arduino board, digital pins are also used -// for the analog output (software PWM). Analog input -// pins are a separate set. - -// ATMEL ATMEGA32U4 / ARDUINO LEONARDO -// -// D0 PD2 RXD1/INT2 -// D1 PD3 TXD1/INT3 -// D2 PD1 SDA SDA/INT1 -// D3# PD0 PWM8/SCL OC0B/SCL/INT0 -// D4 A6 PD4 ADC8 -// D5# PC6 ??? OC3A/#OC4A -// D6# A7 PD7 FastPWM #OC4D/ADC10 -// D7 PE6 INT6/AIN0 -// -// D8 A8 PB4 ADC11/PCINT4 -// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5 -// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6 -// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7 -// D12 A11 PD6 T1/#OC4D/ADC9 -// D13# PC7 PWM10 CLK0/OC4A -// -// A0 D18 PF7 ADC7 -// A1 D19 PF6 ADC6 -// A2 D20 PF5 ADC5 -// A3 D21 PF4 ADC4 -// A4 D22 PF1 ADC1 -// A5 D23 PF0 ADC0 -// -// New pins D14..D17 to map SPI port to digital pins -// -// MISO D14 PB3 MISO,PCINT3 -// SCK D15 PB1 SCK,PCINT1 -// MOSI D16 PB2 MOSI,PCINT2 -// SS D17 PB0 RXLED,SS/PCINT0 -// -// Connected LEDs on board for TX and RX -// TXLED D24 PD5 XCK1 -// RXLED D17 PB0 -// HWB PE2 HWB - -// these arrays map port names (e.g. port B) to the -// appropriate addresses for various functions (e.g. reading -// and writing) -const uint16_t PROGMEM port_to_mode_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &DDRB, - (uint16_t) &DDRC, - (uint16_t) &DDRD, - (uint16_t) &DDRE, - (uint16_t) &DDRF, -}; - -const uint16_t PROGMEM port_to_output_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PORTB, - (uint16_t) &PORTC, - (uint16_t) &PORTD, - (uint16_t) &PORTE, - (uint16_t) &PORTF, -}; - -const uint16_t PROGMEM port_to_input_PGM[] = { - NOT_A_PORT, - NOT_A_PORT, - (uint16_t) &PINB, - (uint16_t) &PINC, - (uint16_t) &PIND, - (uint16_t) &PINE, - (uint16_t) &PINF, -}; - -const uint8_t PROGMEM digital_pin_to_port_PGM[] = { - PD, // D0 - PD2 - PD, // D1 - PD3 - PD, // D2 - PD1 - PD, // D3 - PD0 - PD, // D4 - PD4 - PC, // D5 - PC6 - PD, // D6 - PD7 - PE, // D7 - PE6 - - PB, // D8 - PB4 - PB, // D9 - PB5 - PB, // D10 - PB6 - PB, // D11 - PB7 - PD, // D12 - PD6 - PC, // D13 - PC7 - - PB, // D14 - MISO - PB3 - PB, // D15 - SCK - PB1 - PB, // D16 - MOSI - PB2 - PB, // D17 - SS - PB0 - - PF, // D18 - A0 - PF7 - PF, // D19 - A1 - PF6 - PF, // D20 - A2 - PF5 - PF, // D21 - A3 - PF4 - PF, // D22 - A4 - PF1 - PF, // D23 - A5 - PF0 - - PD, // D24 - PD5 - PD, // D25 / D6 - A7 - PD7 - PB, // D26 / D8 - A8 - PB4 - PB, // D27 / D9 - A9 - PB5 - PB, // D28 / D10 - A10 - PB6 - PD, // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { - _BV(2), // D0 - PD2 - _BV(3), // D1 - PD3 - _BV(1), // D2 - PD1 - _BV(0), // D3 - PD0 - _BV(4), // D4 - PD4 - _BV(6), // D5 - PC6 - _BV(7), // D6 - PD7 - _BV(6), // D7 - PE6 - - _BV(4), // D8 - PB4 - _BV(5), // D9 - PB5 - _BV(6), // D10 - PB6 - _BV(7), // D11 - PB7 - _BV(6), // D12 - PD6 - _BV(7), // D13 - PC7 - - _BV(3), // D14 - MISO - PB3 - _BV(1), // D15 - SCK - PB1 - _BV(2), // D16 - MOSI - PB2 - _BV(0), // D17 - SS - PB0 - - _BV(7), // D18 - A0 - PF7 - _BV(6), // D19 - A1 - PF6 - _BV(5), // D20 - A2 - PF5 - _BV(4), // D21 - A3 - PF4 - _BV(1), // D22 - A4 - PF1 - _BV(0), // D23 - A5 - PF0 - - _BV(5), // D24 - PD5 - _BV(7), // D25 / D6 - A7 - PD7 - _BV(4), // D26 / D8 - A8 - PB4 - _BV(5), // D27 / D9 - A9 - PB5 - _BV(6), // D28 / D10 - A10 - PB6 - _BV(6), // D29 / D12 - A11 - PD6 -}; - -const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - TIMER0B, /* 3 */ - NOT_ON_TIMER, - TIMER3A, /* 5 */ - TIMER4D, /* 6 */ - NOT_ON_TIMER, - - NOT_ON_TIMER, - TIMER1A, /* 9 */ - TIMER1B, /* 10 */ - TIMER0A, /* 11 */ - - NOT_ON_TIMER, - TIMER4A, /* 13 */ - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, - NOT_ON_TIMER, -}; - -const uint8_t PROGMEM analog_pin_to_channel_PGM[] = { - 7, // A0 PF7 ADC7 - 6, // A1 PF6 ADC6 - 5, // A2 PF5 ADC5 - 4, // A3 PF4 ADC4 - 1, // A4 PF1 ADC1 - 0, // A5 PF0 ADC0 - 8, // A6 D4 PD4 ADC8 - 10, // A7 D6 PD7 ADC10 - 11, // A8 D8 PB4 ADC11 - 12, // A9 D9 PB5 ADC12 - 13, // A10 D10 PB6 ADC13 - 9 // A11 D12 PD6 ADC9 -}; - -#endif /* ARDUINO_MAIN */ - -// These serial port names are intended to allow libraries and architecture-neutral -// sketches to automatically default to the correct port name for a particular type -// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, -// the first hardware serial port whose RX/TX pins are not dedicated to another use. -// -// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor -// -// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial -// -// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library -// -// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. -// -// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX -// pins are NOT connected to anything by default. -#define SERIAL_PORT_MONITOR Serial -#define SERIAL_PORT_USBVIRTUAL Serial -#define SERIAL_PORT_HARDWARE Serial1 -#define SERIAL_PORT_HARDWARE_OPEN Serial1 - -#endif /* Pins_Arduino_h */ diff --git a/keyboards/orthodox/readme.md b/keyboards/orthodox/readme.md index 57e940b0f4..e1fbf94baf 100644 --- a/keyboards/orthodox/readme.md +++ b/keyboards/orthodox/readme.md @@ -96,7 +96,7 @@ the two halves, i.e. if your split keyboard has 3 rows in each half, then Flashing ------- -From the keymap directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. +From the `orthodox` directory run `make SUBPROJECT-KEYMAP-avrdude` for automatic serial port resolution and flashing. Example: `make rev2-default-avrdude` diff --git a/keyboards/orthodox/rules.mk b/keyboards/orthodox/rules.mk index dfcff1d902..3f40ff2f82 100644 --- a/keyboards/orthodox/rules.mk +++ b/keyboards/orthodox/rules.mk @@ -73,15 +73,3 @@ USE_I2C = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes - -avrdude: build - ls /dev/tty* > /tmp/1; \ - echo "Reset your Pro Micro now"; \ - while [[ -z $$USB ]]; do \ - sleep 1; \ - ls /dev/tty* > /tmp/2; \ - USB=`diff /tmp/1 /tmp/2 | grep -o '/dev/tty.*'`; \ - done; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex - -.PHONY: avrdude diff --git a/keyboards/orthodox/ssd1306.h b/keyboards/orthodox/ssd1306.h deleted file mode 100644 index b0c74f987e..0000000000 --- a/keyboards/orthodox/ssd1306.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef SSD1306_H -#define SSD1306_H - -#include -#include - -bool iota_gfx_init(void); -void iota_gfx_task(void); -bool iota_gfx_off(void); -bool iota_gfx_on(void); -void iota_gfx_flush(void); -void iota_gfx_write_char(uint8_t c); -void iota_gfx_write(const char *data); -void iota_gfx_write_P(const char *data); -void iota_gfx_clear_screen(void); - -#endif diff --git a/keyboards/pegasushoof/README.md b/keyboards/pegasushoof/README.md index 074222c714..c4c152d401 100644 --- a/keyboards/pegasushoof/README.md +++ b/keyboards/pegasushoof/README.md @@ -1,24 +1,12 @@ -pegasushoof keyboard firmware -============================= +Pegasus Hoof Controller +=== -## Quantum MK Firmware +Keyboard Maintainer: QMK Community +Hardware Supported: Pegasus Hoof +Hardware Availability: https://1upkeyboards.com/filco-pegasus-hoof-controller.html -For the full Quantum feature list, see [the parent README.md](/README.md). +Make example for this keyboard (after setting up your build environment): -## Building + make pegasus_hoof-default -Download or clone the whole firmware and navigate to the `keyboard/pegasushoof` folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your `.hex` file. - -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default -To build all keymaps, simply run `make`, the `.hex` files will end up in the top directory. - -### Specific Keymap -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `/keymap.c` in the `keymaps` folder, and see keymap document (you can find in top README.md) and existent keymap files. - -To build the firmware binary hex file with a keymap just enter the keymap directory and type `make`: -``` -$ cd keymaps/default -$ make -``` +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/phantom/readme.md b/keyboards/phantom/readme.md index 614c21fda0..7a31d106e0 100644 --- a/keyboards/phantom/readme.md +++ b/keyboards/phantom/readme.md @@ -1,48 +1,16 @@ -Phantom keyboard firmware -========================= +Phantom +======= A community-developed keyboard PCB designed to fit inside the case of a Filco Majestouch. See the [Deskthority wiki](https://deskthority.net/wiki/Phantom) for more information. -## Bootloader +Keyboard Maintainer: QMK Community +Hardware Supported: Phantom PCB +Hardware Availability: https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=536 -The Phantom uses a [Teensy 2.0](https://www.pjrc.com/store/teensy.html) as a controller. +Make example for this keyboard (after setting up your build environment): -The Teensy has a special bootloader that can be accessed by pressing the button on the Teensy PCB. It is also possible to use Boot Magic and Command to access the bootloader. + make phantom-default -To write the firmware to the Teensy use [Teensy loader](https://www.pjrc.com/teensy/loader.html). - -## Quantum MK Firmware - -For the full Quantum feature list, see the [documentation](https://docs.qmk.fm). - -## RGB underlight - -It is possible to connect a WS2812B LED strip to the Teensy for RGB underlight support. - -For this to work the DIN connection on the WS2812B strip should be soldered to PE2 on the Teensy (see reference image https://i.imgur.com/aDfNoHT.jpg). - -See [rgbmod](keymaps/rgbmod) for a keymap that utilizes the RGB underlight feature. - -## Building - -The Phantom allows for a huge amount of different layouts. - -Depending on which layout and keymap you would like to use, you will have to compile the firmware slightly differently. All of the commands should be run in the [keyboards/phantom](/keyboards/phantom) folder. - -### Custom keymaps - -To define your own keymap, copy one of the [existing keymap](keymaps) folders and give it the name of your keymap. Then check the [keymap documentation](https://docs.qmk.fm/Keymap.html) for details on how to modify the keymap. - -To make it easy to define keymaps for the most common layouts a few macros are provided. - -| Layout | Macro | -| --------------- | ------------------------- | -| Winkey ANSI | `KEYMAP()` | -| Winkeyless ANSI | `KEYMAP_WINKEYLESS()` | -| Winkey ISO | `KEYMAP_ISO()` | -| Winkeyless ISO | `KEYMAP_ISO_WINKEYLESS()` | -| 7BIT | `KEYMAP_7BIT()` | - -To build the firmware with a custom keymap, run `make ` +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/planck/keymaps/coloneljesus/Makefile b/keyboards/planck/keymaps/coloneljesus/Makefile new file mode 100644 index 0000000000..457a3d01d4 --- /dev/null +++ b/keyboards/planck/keymaps/coloneljesus/Makefile @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/coloneljesus/config.h b/keyboards/planck/keymaps/coloneljesus/config.h new file mode 100644 index 0000000000..b406e2fed9 --- /dev/null +++ b/keyboards/planck/keymaps/coloneljesus/config.h @@ -0,0 +1,42 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * 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 2 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/coloneljesus/keymap.c b/keyboards/planck/keymaps/coloneljesus/keymap.c new file mode 100644 index 0000000000..668da5c103 --- /dev/null +++ b/keyboards/planck/keymaps/coloneljesus/keymap.c @@ -0,0 +1,261 @@ +/* Copyright 2015-2017 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 . + */ + +#include "planck.h" +#include "action_layer.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + LOWER, + RAISE, + BACKLIT, + EXT_PLV +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | App |Lower | Space |Raise | - | = | \ | Alt | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT) }, + {KC_LCTL, KC_LGUI, KC_LALT, KC_APP, LOWER, KC_SPC, KC_SPC, RAISE, KC_MINS, KC_EQL, KC_BSLS, KC_RALT} +}, + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = { + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, + {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, + {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH}, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | { | } | Del | Home | PgDn | PgUp | End | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Mute | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, + {_______, _______, _______, KC_LCBR, KC_RCBR, KC_DEL, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______}, + {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, S(KC_NUHS), S(KC_NUBS), KC_MPRV, KC_MNXT, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | [ | ] | Del | Left | Down | Up | Right| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Mute | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {_______, _______, _______, KC_LBRC, KC_RBRC, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_MPRV, KC_MNXT, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_PLOVER] = { + {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, + {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, + {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, + {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} \ No newline at end of file diff --git a/keyboards/planck/keymaps/coloneljesus/readme.md b/keyboards/planck/keymaps/coloneljesus/readme.md new file mode 100644 index 0000000000..31107f59ce --- /dev/null +++ b/keyboards/planck/keymaps/coloneljesus/readme.md @@ -0,0 +1,2 @@ +# /u/Coloneljesus's Planck Layout + diff --git a/keyboards/planck/keymaps/default/config.h b/keyboards/planck/keymaps/default/config.h index 4c61581993..b406e2fed9 100644 --- a/keyboards/planck/keymaps/default/config.h +++ b/keyboards/planck/keymaps/default/config.h @@ -3,6 +3,18 @@ #include "../../config.h" +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + /* * MIDI options */ @@ -13,6 +25,7 @@ /* enable basic MIDI features: - MIDI notes can be sent when in Music mode is on */ + #define MIDI_BASIC /* enable advanced MIDI features: diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c index 61275cb26a..f71a2b59b9 100644 --- a/keyboards/planck/keymaps/default/keymap.c +++ b/keyboards/planck/keymaps/default/keymap.c @@ -1,20 +1,24 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. +/* Copyright 2015-2017 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 . + */ #include "planck.h" #include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" extern keymap_config_t keymap_config; -// 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 planck_layers { _QWERTY, _COLEMAK, @@ -36,10 +40,6 @@ enum planck_keycodes { EXT_PLV }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -164,7 +164,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = { {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, + {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } @@ -173,50 +173,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef AUDIO_ENABLE - -float tone_startup[][2] = SONG(STARTUP_SOUND); -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -float tone_plover[][2] = SONG(PLOVER_SOUND); -float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); - -float tone_goodbye[][2] = SONG(GOODBYE_SOUND); + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif - persistent_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_QWERTY); } return false; break; case COLEMAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); + set_single_persistent_default_layer(_COLEMAK); } return false; break; case DVORAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); - #endif - persistent_default_layer_set(1UL<<_DVORAK); + set_single_persistent_default_layer(_DVORAK); } return false; break; @@ -255,7 +232,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { #ifdef AUDIO_ENABLE stop_all_notes(); - PLAY_NOTE_ARRAY(tone_plover, false, 0); + PLAY_SONG(plover_song); #endif layer_off(_RAISE); layer_off(_LOWER); @@ -273,7 +250,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case EXT_PLV: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); + PLAY_SONG(plover_gb_song); #endif layer_off(_PLOVER); } @@ -281,37 +258,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} - -void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -#ifdef AUDIO_ENABLE - -void startup_user() -{ - _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); -} - -void shutdown_user() -{ - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); - _delay_ms(150); - stop_all_notes(); -} - -void music_on_user(void) -{ - music_scale_user(); -} - -void music_scale_user(void) -{ - PLAY_NOTE_ARRAY(music_scale, false, 0); -} - -#endif +} \ No newline at end of file diff --git a/keyboards/planck/keymaps/experimental/Makefile b/keyboards/planck/keymaps/experimental/Makefile index 3a8250a9b5..29108e522b 100644 --- a/keyboards/planck/keymaps/experimental/Makefile +++ b/keyboards/planck/keymaps/experimental/Makefile @@ -1,11 +1,11 @@ # Build Options -# change to "no" to disable the options, or define them in the Makefile in +# 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(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration @@ -17,6 +17,7 @@ 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 this with audio at the same time. ONEHAND_ENABLE = yes # Enable one-hand typing +STENO_ENABLE = yes # Enable TX Bolt protocol for Stenography, requires VIRTSER and may not work with mouse keys # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/keymaps/experimental/config.h b/keyboards/planck/keymaps/experimental/config.h index 492490ca1c..0864b5fbc9 100644 --- a/keyboards/planck/keymaps/experimental/config.h +++ b/keyboards/planck/keymaps/experimental/config.h @@ -5,6 +5,7 @@ #define LEADER_TIMEOUT 300 #define BACKLIGHT_BREATHING +#define PREVENT_STUCK_MODIFIERS /* ws2812 RGB LED */ diff --git a/keyboards/planck/keymaps/experimental/keymap.c b/keyboards/planck/keymaps/experimental/keymap.c index 17fad784e7..2d648b211a 100644 --- a/keyboards/planck/keymaps/experimental/keymap.c +++ b/keyboards/planck/keymaps/experimental/keymap.c @@ -3,6 +3,7 @@ #include "planck.h" #include "action_layer.h" +#include "keymap_steno.h" #ifdef AUDIO_ENABLE #include "audio.h" #endif @@ -49,7 +50,7 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = { - {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL}, + {QWERTY, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL}, {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL}, {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL}, {KC_NO, KC_NO, KC_NO, KC_NO, RGBLED_TOGGLE, RGBLED_STEP_MODE, RGBLED_INCREASE_HUE, RGBLED_DECREASE_HUE, RGBLED_INCREASE_SAT, RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL} @@ -158,10 +159,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} + {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC }, + {STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR }, + {XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR }, + {EXT_PLV, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2} }, /* Adjust (Lower + Raise) @@ -279,21 +280,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; return false; case PLOVER: - if (record->event.pressed) { + if (!record->event.pressed) { #ifdef AUDIO_ENABLE stop_all_notes(); PLAY_NOTE_ARRAY(tone_plover, false, 0); #endif - layer_off(_RAISE); - layer_off(_LOWER); - layer_off(_ADJUST); layer_on(_PLOVER); - if (!eeconfig_is_enabled()) { - eeconfig_init(); - } - keymap_config.raw = eeconfig_read_keymap(); - keymap_config.nkro = 1; - eeconfig_update_keymap(keymap_config.raw); } break; return false; @@ -397,9 +389,9 @@ void music_scale_user(void) LEADER_EXTERNS(); void matrix_scan_user(void) { - LEADER_DICTIONARY() { + LEADER_DICTIONARY() { leading = false; - leader_end(); + leader_end(); SEQ_ONE_KEY (KC_R) { tap_random_base64(); diff --git a/keyboards/planck/keymaps/piemod/Makefile b/keyboards/planck/keymaps/piemod/Makefile new file mode 100755 index 0000000000..1e48872e39 --- /dev/null +++ b/keyboards/planck/keymaps/piemod/Makefile @@ -0,0 +1,10 @@ +SUBPROJECT_DEFAULT = rev4 + +MOUSEKEY_ENABLE = yes +BLUETOOTH_ENABLE = yes +EXTRAKEY_ENABLE = yes +AUDIO_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/piemod/README.md b/keyboards/planck/keymaps/piemod/README.md new file mode 100644 index 0000000000..f2a051da14 --- /dev/null +++ b/keyboards/planck/keymaps/piemod/README.md @@ -0,0 +1,31 @@ +PieMod +====== + +A keymap for users that need: + +- *P*: Programming symbols. + +- *I*: i3wm. + +- *E*: Emacs. + +- *M*: Macros. + +- *O*: Ortholinear. + +- *D*: Dvorak. + +Still a work-in-progress. Suggestions welcome @ https://github.com/dwrz/piemod. + +### Keymap + +![PieMod Keymap](./keymap.png) + +### TODO + +- [ ] Add Emacs layer. +- [ ] Add Macro layer. +- [ ] Add system control keys (rotation, brightness). +- [ ] Switch " and ' quotes (or function to toggle default). +- [ ] Add capslock. +. diff --git a/keyboards/planck/keymaps/piemod/keymap.c b/keyboards/planck/keymaps/piemod/keymap.c new file mode 100644 index 0000000000..e6e7a8a5a0 --- /dev/null +++ b/keyboards/planck/keymaps/piemod/keymap.c @@ -0,0 +1,111 @@ +#include "planck.h" +#include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#include "eeconfig.h" + +#define DVORAK 0 +#define ARROW 1 //F(1) +#define SYMBOL 2 // F(2) +#define NUMBER 3 // F(3) +#define FUNCTION 4 // F(4) +#define EMACS 5 // F(5) +#define CUSTOM_MACROS 6 // F(6) +#define MOUSE 7 // F(7) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DVORAK] = { + {KC_ESC, KC_QUOTE, F(7), KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DELETE}, + {KC_TAB, F(1), F(2), F(3), F(4), KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER}, + {KC_LSHIFT, KC_SCOLON, F(5), KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_MINUS}, + {F(10), F(6), KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}, + }, + + [ARROW] = { + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP}, + {KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} + }, + + [SYMBOL] = { + {KC_TILD, KC_GRAVE, KC_NO, KC_EQUAL, KC_PLUS, KC_NO, KC_LBRACKET, KC_RBRACKET, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN}, + {KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, F(21)}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH, KC_SLASH, KC_EXLM, KC_AT, KC_HASH, KC_PIPE}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL} + }, + + [NUMBER] = { + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_0, KC_1, KC_2, KC_3, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL} + }, + + [FUNCTION] = { + {KC_PSCREEN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE}, + {RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DELETE, KC_INSERT, KC_HOME, KC_PGDN, KC_PGUP, KC_END} + }, + + [EMACS] = { + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} + }, + + [CUSTOM_MACROS] = { + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} + }, + + [MOUSE] = { + {KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_NO, KC_NO, KC_NO} + }, + + }; + + enum function_id { + TEENSY_KEY, + CUSTOM_KEY, + L_CTRL_ALT_ENT, + R_CTRL_ALT_ENT, + }; + + int CAPSLOCKED = 0; + + const uint16_t PROGMEM fn_actions[] = { + + // DVORAK 0 + // ARROW 1, F(1) + // SYMBOL 2, F(2) + // NUMBER 3, F(3) + // FUNCTION 4, F(4) + // EMACS 5, F(5) + // MACROS 6, F(6) + // MOUSE 7, F(7) + + // Layers + [1] = ACTION_LAYER_TAP_KEY(1, KC_A), // FN1 = Momentary Arrow layer on A. + [2] = ACTION_LAYER_TAP_KEY(2, KC_O), // FN2 = Momentary symbOl layer on O. + [3] = ACTION_LAYER_TAP_KEY(3, KC_E), // FN3 = Momentary numbEr layer on E. + [4] = ACTION_LAYER_TAP_KEY(4, KC_U), // FN4 = Momentary fUnction layer on U. + [5] = ACTION_LAYER_TAP_KEY(5, KC_Q), // FN5 = Momentary emaQs layer on Q. + [6] = ACTION_LAYER_TAP_KEY(6, KC_LCTRL), // FN6 = Momentary MACROS on ??? key. + [7] = ACTION_LAYER_TAP_KEY(7, KC_COMMA), // FN7 = Momentary MOUSE on , key. + + // Special Keys + [10] = ACTION_MODS_KEY(KC_LCTRL, KC_LALT), // FN10 = Ctrl + Alt. + + // Symbols + [21] = ACTION_MODS_KEY(MOD_LSFT, KC_SLASH), // FN21 = Question mark. + + }; diff --git a/keyboards/planck/keymaps/priyadi/config.h b/keyboards/planck/keymaps/priyadi/config.h index adc1c69aa5..448ae3b908 100644 --- a/keyboards/planck/keymaps/priyadi/config.h +++ b/keyboards/planck/keymaps/priyadi/config.h @@ -23,7 +23,7 @@ #define DOUBLESPACE_LAYER_ENABLE // #define TOLELOT_ENABLE -#define KEYMAP( \ +#define KEYMAP_CUSTOM( \ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ diff --git a/keyboards/planck/keymaps/rai-suta/Makefile b/keyboards/planck/keymaps/rai-suta/Makefile index 4263440ec1..38efe374cf 100644 --- a/keyboards/planck/keymaps/rai-suta/Makefile +++ b/keyboards/planck/keymaps/rai-suta/Makefile @@ -20,9 +20,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# Option defines -OPT_DEFS += -DJIS_KEYCODE - ifndef QUANTUM_DIR include ../../../../Makefile endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/rai-suta/keymap.c b/keyboards/planck/keymaps/rai-suta/keymap.c index 13fc3677e6..3206ffd35f 100644 --- a/keyboards/planck/keymaps/rai-suta/keymap.c +++ b/keyboards/planck/keymaps/rai-suta/keymap.c @@ -3,6 +3,8 @@ #include "planck.h" #include "version.h" +#include "sendstring_jis.h" + // Keycode defines #define _______ KC_TRNS #define XXXXXXX KC_NO diff --git a/keyboards/planck/keymaps/steno/Makefile b/keyboards/planck/keymaps/steno/Makefile new file mode 100644 index 0000000000..874154af63 --- /dev/null +++ b/keyboards/planck/keymaps/steno/Makefile @@ -0,0 +1,7 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER +AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/planck/keymaps/steno/config.h b/keyboards/planck/keymaps/steno/config.h new file mode 100644 index 0000000000..1879ab007f --- /dev/null +++ b/keyboards/planck/keymaps/steno/config.h @@ -0,0 +1,44 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +#define PREVENT_STUCK_MODIFIERS + +/* + * 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 2 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/steno/keymap.c b/keyboards/planck/keymaps/steno/keymap.c new file mode 100644 index 0000000000..38540a2613 --- /dev/null +++ b/keyboards/planck/keymaps/steno/keymap.c @@ -0,0 +1,256 @@ +/* Copyright 2015-2017 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 . + */ + +#include "planck.h" +#include "action_layer.h" +#include "keymap_steno.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + LOWER, + RAISE, + BACKLIT, + EXT_PLV +}; + +#define ST_BOLT QK_STENO_BOLT +#define ST_GEM QK_STENO_GEMINI + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = { + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, + {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, + {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH}, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, + {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | FN | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | PWR | RES1 | RES2 | + * `-----------------------------------------------------------------------------------' + */ + +[_PLOVER] = { + {STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC }, + {STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR }, + {XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR }, + {EXT_PLV, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | |TXBOLT|GEM RP| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, + {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, ST_BOLT, ST_GEM}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + case PLOVER: + if (!record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_on(_PLOVER); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} \ No newline at end of file diff --git a/keyboards/planck/keymaps/steno/readme.md b/keyboards/planck/keymaps/steno/readme.md new file mode 100644 index 0000000000..e8ffd97565 --- /dev/null +++ b/keyboards/planck/keymaps/steno/readme.md @@ -0,0 +1,4 @@ +# The Default Planck Layout with TX Bolt for the Plover Layer + +To use set Plover to TX Bolt and select the COM port that represents your keyboard. + diff --git a/keyboards/planck/planck.h b/keyboards/planck/planck.h index 8cfee5d1cc..10f17b4a46 100644 --- a/keyboards/planck/planck.h +++ b/keyboards/planck/planck.h @@ -36,4 +36,6 @@ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ } +#define KEYMAP PLANCK_GRID + #endif diff --git a/keyboards/preonic/keymaps/default/config.h b/keyboards/preonic/keymaps/default/config.h index 4c61581993..003fd259c5 100644 --- a/keyboards/preonic/keymaps/default/config.h +++ b/keyboards/preonic/keymaps/default/config.h @@ -3,6 +3,18 @@ #include "../../config.h" +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + /* * MIDI options */ @@ -13,6 +25,7 @@ /* enable basic MIDI features: - MIDI notes can be sent when in Music mode is on */ + #define MIDI_BASIC /* enable advanced MIDI features: diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c index 2516a726bd..01f40542ca 100644 --- a/keyboards/preonic/keymaps/default/keymap.c +++ b/keyboards/preonic/keymaps/default/keymap.c @@ -1,14 +1,21 @@ +/* Copyright 2015-2017 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 . + */ + #include "preonic.h" #include "action_layer.h" -#include "eeconfig.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif - -// 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 preonic_layers { _QWERTY, @@ -28,10 +35,6 @@ enum preonic_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -155,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_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}, {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, + {_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } @@ -163,54 +166,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -#ifdef AUDIO_ENABLE -float tone_startup[][2] = { - {NOTE_B5, 20}, - {NOTE_B6, 8}, - {NOTE_DS6, 20}, - {NOTE_B6, 8} -}; - -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); - -float tone_goodbye[][2] = SONG(GOODBYE_SOUND); - -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); -#endif - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif - persistent_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_QWERTY); } return false; break; case COLEMAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); + set_single_persistent_default_layer(_COLEMAK); } return false; break; case DVORAK: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); - #endif - persistent_default_layer_set(1UL<<_DVORAK); + set_single_persistent_default_layer(_DVORAK); } return false; break; @@ -248,36 +220,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; }; - -void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -#ifdef AUDIO_ENABLE - -void startup_user() -{ - _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); -} - -void shutdown_user() -{ - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); - _delay_ms(150); - stop_all_notes(); -} - -void music_on_user(void) -{ - music_scale_user(); -} - -void music_scale_user(void) -{ - PLAY_NOTE_ARRAY(music_scale, false, 0); -} - -#endif diff --git a/keyboards/readme.md b/keyboards/readme.md index 9ee3fc7abc..5d72a2a413 100644 --- a/keyboards/readme.md +++ b/keyboards/readme.md @@ -57,3 +57,4 @@ These keyboards are part of the QMK repository, but their manufacturers are not * [TheVan 44](/keyboards/tv44) — A 44-key staggered keybard by Evangs. * [WhiteFox](/keyboards/whitefox) — A 65% keyboard designed as a partnership by matt3o, Massdrop and Input Club * [Vision Division](/keyboards/vision_division) — Full Size / Split Linear Keyboard by IBNobody. +* [XD75](/keyboards/xd75) — 15x5 ortholinear keyboard by XIUDI. diff --git a/keyboards/roadkit/keymaps/singlesBrent/Makefile b/keyboards/roadkit/keymaps/singlesBrent/Makefile new file mode 100644 index 0000000000..b61d6cca2c --- /dev/null +++ b/keyboards/roadkit/keymaps/singlesBrent/Makefile @@ -0,0 +1,22 @@ +# 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(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +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 = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +TAP_DANCE_ENABLE = yes # Enable Tap Dance functionality + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/roadkit/keymaps/singlesBrent/config.h b/keyboards/roadkit/keymaps/singlesBrent/config.h new file mode 100644 index 0000000000..57468e122a --- /dev/null +++ b/keyboards/roadkit/keymaps/singlesBrent/config.h @@ -0,0 +1,15 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here +#define TAPPING_TERM 175 + +#ifdef BACKLIGHT_ENABLE + #define BACKLIGHT_PIN B5 + #define BACKLIGHT_LEVELS 3 + #define BACKLIGHT_ON_STATE 0 +#endif + +#endif \ No newline at end of file diff --git a/keyboards/roadkit/keymaps/singlesBrent/keymap.c b/keyboards/roadkit/keymaps/singlesBrent/keymap.c new file mode 100644 index 0000000000..13197346a9 --- /dev/null +++ b/keyboards/roadkit/keymaps/singlesBrent/keymap.c @@ -0,0 +1,242 @@ +#include "roadkit.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// 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. + +#define _NP 0 +#define _L1 1 +#define _L2 2 +#define _L3 3 + +// Macro name shortcuts +#define NUMPAD M(_NP) +#define LAYER1 M(_L1) +#define LAYER2 M(_L2) +#define LAYER3 M(_L3) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +void matrix_init_user(void) { + backlight_level(4); +} + + + +//Tap Dance Declarations + +enum { + + TD_EQUAL_NP = 0, + TD_KP_PLUS_L1, + TD_DOT_L2, + TD_0_L3 + +}; + +//Tap Dance Definitions + + + //TD equal to turn on layer NP +void _td_equal_tg_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code(KC_EQUAL); + } else if (state->count == 2) { + backlight_set(3); + layer_on(_NP); + layer_off(_L1); + layer_off(_L2); + layer_off(_L3); + } +} + +void _td_equal_tg_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code(KC_EQUAL); + } +} + + + //TD kp plus to toggle layer 1 +void _td_kp_plus_tg_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code(KC_KP_PLUS); + } else if (state->count == 2) { +// layer_invert(_L1); + backlight_set(2); + layer_on(_L1); + layer_off(_L2); + layer_off(_L3); + } +} + +void _td_kp_plus_tg_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code(KC_KP_PLUS); + } +} + + + //TD dot to toggle layer 2 +void _td_dot_tg_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code(KC_DOT); + } else if (state->count == 2) { + backlight_set(1); + layer_on(_L2); + layer_off(_L1); + layer_off(_L3); + } +} + +void _td_dot_tg_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code(KC_DOT); + } +} + + //TD 0 to toggle layer 3 +void _td_0_tg_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code(KC_0); + } else if (state->count == 2) { + backlight_set(0); + layer_on(_L3); + layer_off(_L1); + layer_off(_L2); + } +} + +void _td_0_tg_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code(KC_0); + } +} + +//TD Actions +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_EQUAL_NP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, _td_equal_tg_finished, _td_equal_tg_reset), + [TD_KP_PLUS_L1] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, _td_kp_plus_tg_finished, _td_kp_plus_tg_reset), + [TD_DOT_L2] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, _td_dot_tg_finished, _td_dot_tg_reset), + [TD_0_L3] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, _td_0_tg_finished, _td_0_tg_reset) +}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Numberpad + * ,-----------------------. + * | 7 | 8 | 9 | / | + * |-----`-----`-----`-----| + * | 4 | 5 | 6 | * | + * |-----`-----`-----`-----| + * | 1 | 2 | 3 | - | + * |-----`-----`-----`-----| + * | 0 | . | + | = | + * `-----`-----`-----`-----' + * Tapdances: + * | L3 | L2 | L1 | NP | + * `-----`-----`-----`-----' + */ + [_NP] = /* Numpad */ + SINGLES_KEYMAP(KC_7, KC_8, KC_9, KC_SLASH, \ + KC_4, KC_5, KC_6, KC_KP_ASTERISK, \ + KC_1, KC_2, KC_3, KC_MINUS, \ + TD(TD_0_L3), TD(TD_DOT_L2), TD(TD_KP_PLUS_L1), TD(TD_EQUAL_NP)), + +/* L1 + * ,-----------------------. + * | Esc |Bksp |Home |PgUp | + * |-----`-----`-----`-----| + * | Tab | Up | End |PgDn | + * |-----`-----`-----`-----| + * |Left |Down |Right|Enter| + * |-----`-----`-----`-----| + * | 0 | . | + | = | + * `-----`-----`-----`-----' + */ + [_L1] = /* LAYER 1 */ + SINGLES_KEYMAP(KC_ESCAPE, KC_BSPACE, KC_HOME, KC_PGUP, \ + KC_TAB, KC_UP, KC_END, KC_PGDOWN, \ + KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +/* L2 + * ,-----------------------. + * |Sleep|LClik|RClik|VolUp| + * |-----`-----`-----`-----| + * |AltF4| F11 |WinTb|VolDn| + * |-----`-----`-----`-----| + * |PrvTk|Play |NxtTk|Mute | + * |-----`-----`-----`-----| + * | 0 | . | + | = | + * `-----`-----`-----`-----' + */ + [_L2] = /* LAYER 2 */ + SINGLES_KEYMAP(KC_SYSTEM_SLEEP, KC_MS_BTN1, KC_MS_BTN2, KC_AUDIO_VOL_UP, \ + LALT(KC_F4), KC_F11, LGUI(KC_TAB), KC_AUDIO_VOL_DOWN, \ + KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + +/* L3 needs cut, copy, paste, undo, again (redo), find, calc, www back, www forward, F5 + * ,-----------------------. + * |WBack|WHome|WFor | F5 | + * |-----`-----`-----`-----| + * |Calc |Undo |Redo |WSrch| + * |-----`-----`-----`-----| + * | Cut |Copy |Paste|Find | + * |-----`-----`-----`-----| + * | 0 | . | + | = | + * `-----`-----`-----`-----' + */ + [_L3] = /* LAYER 3 */ + SINGLES_KEYMAP(KC_WWW_BACK, KC_WWW_HOME, KC_WWW_FORWARD, KC_F5, \ + KC_CALCULATOR, LCTL(KC_Z), LCTL(KC_Y), KC_WWW_SEARCH, \ + LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_F), \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case _L3: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_L3); + } + break; + case _L2: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_L2); + } + break; + case _L1: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_L1); + } + break; + case _NP: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_NP); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/roadkit/keymaps/singlesBrent/readme.md b/keyboards/roadkit/keymaps/singlesBrent/readme.md new file mode 100644 index 0000000000..48ea4a8b35 --- /dev/null +++ b/keyboards/roadkit/keymaps/singlesBrent/readme.md @@ -0,0 +1,3 @@ +# The singles keymap for roadkit + +This keymap has a base layer with numpad functionality, and then a second layer with some additional keys. The user is encouraged to develop their own keymap using this as a starting point. diff --git a/keyboards/roadkit/readme.md b/keyboards/roadkit/readme.md index d7480a1654..e99b385f37 100644 --- a/keyboards/roadkit/readme.md +++ b/keyboards/roadkit/readme.md @@ -1,32 +1,14 @@ -roadkit keyboard firmware -====================== +roadkit +======= -## Quantum MK Firmware +A programmable macro pad. -For the full Quantum feature list, see [the QMK Wiki](https://github.com/qmk/qmk_firmware/wiki). +Keyboard Maintainer: QMK Community +Hardware Supported: Roadkit PCB +Hardware Availability: https://thevankeyboards.com/products/roadkit-r2?variant=37353813966 -## Building +Make example for this keyboard (after setting up your build environment): -Download or clone the whole firmware and navigate to the `keyboards/roadkit` folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex. You can then use the programmer of your choice to program your .hex file. + make roadkit-default -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default - -To build with the default keymap, simply run `make default`. For the roadkit, the default layout is a standard numpad layout. - -### Singles - -The singles layout for the roadkit corresponds to the configuration where only 1u keys are used and there are 16 of them on the board. To build the singles keymap, run `make singles`. - -### Other Keymaps - -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` - -Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/s60_x/readme.md b/keyboards/s60_x/readme.md index e30b2f76ce..9e1d06150f 100644 --- a/keyboards/s60_x/readme.md +++ b/keyboards/s60_x/readme.md @@ -1,255 +1,13 @@ -S60-x keyboard firmware -====================== +S60-x +===== DIY compact keyboard designed by VinnyCordeiro for Sentraq. Most of the keymaps are based on GH60 code. This is a port from TMK to QMK based on the [original S60-X Repo](https://github.com/VinnyCordeiro/tmk_keyboard). -## S60X Resources -- [Massdrop page](https://www.massdrop.com/buy/sentraq-60-diy-keyboard-kit?mode=guest_open) +Keyboard Maintainer: QMK Community +Hardware Supported: S60-x PCB +Hardware Availability: https://www.massdrop.com/buy/sentraq-60-diy-keyboard-kit?mode=guest_open -## Flashing your keyboard -The recommended programs for flashing your keyboard are [Atmel FLIP](http://www.atmel.com/tools/FLIP.aspx) (Windows) and [dfu-programmer](http://dfu-programmer.sourceforge.net/) (Linux/Windows). +Make example for this keyboard (after setting up your build environment): -[QMK Firmware Flasher](https://github.com/qmk/qmk_firmware_flasher/releases) may work, as the S60-X keyboard uses the ATMega32U4 microcontroller, but it is untested. Use at your own risk. + make s60_x-default -[Easy AVR USB Keyboard Firmware](https://deskthority.net/wiki/Easy_AVR_USB_Keyboard_Firmware) also supports S60-X, but it is completely unrelated to TMK firmware. Use at your own risk. - -**Programming the firmware (Windows)** - -1. download and install FLIP (http://www.atmel.com/tools/FLIP.aspx) -2. connect the keyboard, press the program button on the underside of the board (S1) and wait until it enumerates (you'll hear the "disconnect" and "connect" sound) -3. go to device manager, find the atmega32u4 chip and click "update driver" -4. choose location manually: folder named "usb" inside the installation directory of FLIP -5. once the driver is installed, run flip -6. Device -> Select: choose ATMega32U4 -7. Settings -> Communication -> USB, FLIP should show the signature at this point (58 1E 95 87) -8. File -> Load HEX file: choose the hex firmware: .hex -9. click "Run" -10. after programming is done, disconnect the device from USB and connect again. - - -**Programming the firmware (Linux)** - -1. Download and install/compile/unpack dfu-programmer from http://dfu-programmer.sourceforge.net/. -2. Issue the following commands in the command prompt after connecting the device and pressing the programming button (S1). You may need root permissions or udev rules to do that. - 1. `sudo dfu-programmer atmega32u4 erase` - 2. `sudo dfu-programmer atmega32u4 flash .hex` - 3. `sudo dfu-programmer atmega32u4 start` -3. The keyboard should start working. If it doesn't, reconnect the cable. - -## Building the firmware - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - - $ make [custom|poker|poker_set|poker_bit|plain|hasu|spacefn|hhkb|] - -For a more detailed explanation of the build process and the environment setup, see the ["Getting Started" section](/readme.md#getting-started). - -## List of included Keymaps - -Several versions of keymaps are available in advance but you are recommended to define your favorite layout yourself. -To define your own keymap, copy the [default keymap template](/quantum/template/keymaps/default) directory into the `keymaps` directory and start modifying the `keymap.c` file. Some options might require you to change the `config.h` or `Makefile` as well, refer to the main documentation for more information on those. -If you want to later merge your finalised keymap into this repository to make it available for everyone, make sure to also modify the `readme.md` in your keymap directory to show a visual version of your keymap. - -Here's a list of the standard layouts that are provided with the precompiled .hex-files. - -### 0 Initial explanations -The █████ blocks on the layouts hides the switch positions that do not exist physically on the PCB. If you feel like hacking the keyboard and adding new keys, those are the positions that can be used. You'll have to modify the [keymap_common.h](keymap_common.h) file for that. - -The â–’â–’â–’â–’â–’ blocks hides switch positions not used on this particular layout, but they do exist on the PCB. - -There is no LED support on the PCB at the moment, but I'll let the code for that untouched. - - -### 1 [Standard - ANSI (default layout)](keymaps/default/keymap.c) -The standard keymap is the one that is pre-flashed on the S60-X. - -#### 1.0 Default layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠- │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │RCTRL│█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ -#### 1.1 Fn layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠- │GRAVE│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ Up │ │ │ │ │ │PGUP │PGDWN│PRTSC│SCLCK│PAUSE│ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │Left │Down │Right│ │ │ │ │ │ │ │ │▒▒▒▒▒│ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ - - -### 2 [Standard - ISO](keymaps/iso/keymap.c) -The same as the standard keymap, but with additional ISO keys. - - -#### 2.0 Default layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠- │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │▒▒▒▒▒│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │NUHS │ENTER│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │LSHFT│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │RCTRL│█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ -#### 2.1 Fn layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠- │GRAVE│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ Up │ │ │ │ │ │PGUP │PGDWN│PRTSC│SCLCK│PAUSE│▒▒▒▒▒│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │Left │Down │Right│ │ │ │ │ │ │ │ │ │ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ - - -### 3 Poker -[The poker keymap](keymaps/poker/keymap.c) emulates original Vortex Poker layers -while both [poker_bit](keymaps/poker_bit/keymap.c) and [poker_set](keymap/poker_set/keymap.c) implement the same layout in a slightly different way, fix a minor issue of the original poker Layout and enhance arrow keys. - - Fn + Esc = ` - Fn + {left, down, up, right} = {home, pgdown, pgup, end} - -#### 3.0 Default layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠- │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BkSpc│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│Enter│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Shift│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│Shift│▒▒▒▒▒│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Ctrl │ Gui │ Alt │█████│█████│█████│Space│█████│█████│█████│ Fn │ Gui │ App │Ctrl │█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ -#### 3.1 Poker Fn layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠- │ Esc │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ FnQ │ Up │ │ │ │ │ │ │ Cal │ │Home │ Ins │ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │Left │Down │Right│ │ │ Psc │ Slk │Pause│ │ Tsk │ End │▒▒▒▒▒│ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │▒▒▒▒▒│ Del │ │ Web │Mute │ VoU │ VoD │ │PgUp │PgDwn│ Del │▒▒▒▒▒│ Up │▒▒▒▒▒│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ │█████│█████│█████│ FnS │█████│█████│█████│ Fn │Left │Down │Right│█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ - - -### 4. [Plain](keymaps/plain/keymap.c) -Without any Fn layer this will be useful if you want to use key remapping tool like AHK on host. - -#### 4.0 Plain Default layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠- │ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BkSpc│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│Enter│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Shift│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│Shift│▒▒▒▒▒│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Ctrl │ Gui │ Alt │█████│█████│█████│Space│█████│█████│█████│ Alt │ Gui │ App │Ctrl │█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ - - -### 5. [Hasu](keymaps/hasu/keymap.c) -This is Hasu's favorite keymap with HHKB Fn, Vi cursor and Mousekey layer. - -(Hasu is the creator of the TMK firmware, for those who do not know that.) - - -### 6. [SpaceFN](keymaps/spacefn/keymap.c) -This layout proposed by spiceBar uses space bar to change layer with using Dual role key technique. Check the sourcefile and [SpaceFN discussion](http://geekhack.org/index.php?topic=51069.0) for more information. - -#### 6.0 Default layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠- │ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BkSpc│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│Enter│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Shift│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│Shift│▒▒▒▒▒│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Ctrl │ Gui │ Alt │█████│█████│████ Space/Fn ███│█████│█████│ Alt │ Gui │ App │Ctrl │█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ -#### 6.1 SpaceFN layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠- │ ` │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│ Del │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ │ │ │ │ │Home │ Up │ End │ Psc │ Slk │Pause│ Ins │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ │ │ │ │PgUp │Left │Down │Right│ │ │▒▒▒▒▒│ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │▒▒▒▒▒│ │ │ │ │Space│PgDwn│ ` │ ~ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ │█████│█████│█████│ Fn │█████│█████│█████│ Alt │ Gui │ App │Ctrl │█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ - - -### 7. [HHKB](keymap/hhkb/keymap.c) -The HHKB keymap emulates original HHKB layers. -#### 7.0: Default layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠- │ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │BkSpc│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Ctrl │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Fn3 │ ' │▒▒▒▒▒│Enter│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Shift│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│Shift│ Fn │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │▒▒▒▒▒│ Gui │ Alt │█████│█████│█████│Space│█████│█████│█████│▒▒▒▒▒│ Alt │ Gui │▒▒▒▒▒│█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ -#### 7.1: HHKB Fn layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠- │ Pwr │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ Ins │ Del │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Caps │ │ │ │ │ │ │ │ Psc │ Slk │ Pus │ Up │ │ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ VoD │ VoU │ Mut │ Ejc │ │ * │ / │Home │PgUp │Left │Right│▒▒▒▒▒│Enter│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │▒▒▒▒▒│ │ │ │ │ │ + │ - │ End │PgDwn│Down │▒▒▒▒▒│ │ │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │▒▒▒▒▒│ │ │█████│█████│█████│ │█████│█████│█████│▒▒▒▒▒│ │ │▒▒▒▒▒│█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ - - -### 8 [Custom](keymaps/custom/keymap.c) -The custom keymap is where I tested all the switches, not being concerned with a specific layout or layers. It's a plain layout option with the extra keys used on ISO & HHKB layouts being assigned some other keys. - -#### 8.0 Default layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠- │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │PgUp │BkSpc│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │PgDwn│Enter│█████│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Shift│Home │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ End │Shift│ Up │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │Ctrl │ Gui │ Alt │█████│█████│█████│Space│█████│█████│█████│ Alt │ Gui │ App │Ctrl │█████│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ - -### 9. [ANSI_QWERTZ](keymaps/ansi_qwertz/keymap.c) - -This keymap was designed for inputting characters with diacritics with ANSI keycaps. -It provides toggleable SpaceFn functionality, a dedicated arrow cluster and a microphone mute key on the function layer as well as a bootloader reset key. - -For more info, [check here](keymaps/ansi_qwertz/readme.md). +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/s65_x/readme.md b/keyboards/s65_x/readme.md index 0c558428b4..9021af4dff 100644 --- a/keyboards/s65_x/readme.md +++ b/keyboards/s65_x/readme.md @@ -1,80 +1,13 @@ -S65-x keyboard firmware -====================== +S65-x +===== DIY 65% keyboard from Sentraq. -## S65X Resources -- [Sentraq page](https://sentraq.com/collections/group-buys/products/gb-s65-x-rgb-diy-kit?variant=39246723914) +Keyboard Maintainer: QMK Community +Hardware Supported: S65-x PCB +Hardware Availability: https://sentraq.com/collections/group-buys/products/gb-s65-x-rgb-diy-kit?variant=39246723914 -## Flashing your keyboard -The recommended programs for flashing your keyboard are [Atmel FLIP](http://www.atmel.com/tools/FLIP.aspx) (Windows) and [dfu-programmer](http://dfu-programmer.sourceforge.net/) (Linux/Windows). +Make example for this keyboard (after setting up your build environment): -[QMK Firmware Flasher](https://github.com/qmk/qmk_firmware_flasher/releases) may work, as the S65-X keyboard uses the ATMega32U4 microcontroller, but it is untested. Use at your own risk. - -**Programming the firmware (Windows)** - -1. download and install FLIP (http://www.atmel.com/tools/FLIP.aspx) -2. connect the keyboard, press the program button on the underside of the board (S1) and wait until it enumerates (you'll hear the "disconnect" and "connect" sound) -3. go to device manager, find the atmega32u4 chip and click "update driver" -4. choose location manually: folder named "usb" inside the installation directory of FLIP -5. once the driver is installed, run flip -6. Device -> Select: choose ATMega32U4 -7. Settings -> Communication -> USB, FLIP should show the signature at this point (58 1E 95 87) -8. File -> Load HEX file: choose the hex firmware: .hex -9. click "Run" -10. after programming is done, disconnect the device from USB and connect again. - - -**Programming the firmware (Linux/Mac)** - -1. Download and install/compile/unpack dfu-programmer from http://dfu-programmer.sourceforge.net/. -2. Issue the following commands in the command prompt after connecting the device and pressing the programming button (S1). You may need root permissions or udev rules to do that. - 1. `sudo dfu-programmer atmega32u4 erase` - 2. `sudo dfu-programmer atmega32u4 flash .hex` - 3. `sudo dfu-programmer atmega32u4 start` -3. The keyboard should start working. If it doesn't, reconnect the cable. - -## Building the firmware - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - - $ make default - -For a more detailed explanation of the build process and the environment setup, see the ["Getting Started" section](/readme.md#getting-started). - -## Keymaps - -Currently only an ANSI keymap is provided, hopefully others will contribute theirs. - -### 0 Initial explanations -The █████ blocks on the layouts hides the switch positions that do not exist physically on the PCB. If you feel like hacking the keyboard and adding new keys, those are the positions that can be used. You'll have to modify the [keymap_common.h](keymap_common.h) file for that. - -The â–’â–’â–’â–’â–’ blocks hides switch positions not used on this particular layout, but they do exist on the PCB. - - -### 1 [Standard - ANSI (default layout)](keymaps/default/keymap.c) - -#### 1.0 Default layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠- │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│DEL │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │▒▒▒▒▒│END │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│▒▒▒▒▒│PG_UP│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│ UP │PG_DN│ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │LCTRL│L_ALT│L_GUI│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │LEFT │DOWN │RIGHT│ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ -#### 1.1 Fn layer - ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┠- │GRAVE│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│▒▒▒▒▒│ │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ _AL │ Up │ │ │ │ │ │PGUP │PGDWN│PRTSC│SCLCK│PAUSE│ │▒▒▒▒▒│ │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │Left │Down │Right│ │ │Left │Down │ Up │Right│ │ │▒▒▒▒▒│ │▒▒▒▒▒│ │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │▒▒▒▒▒│_UL │ │ │ │ │ │ │Home │ End │ │▒▒▒▒▒│Vol+ │▒▒▒▒▒│ │ - ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │Mute │Vol- │Play │ │ - └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + make s65_x-default +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/satan/keymaps/poker/keymap.c b/keyboards/satan/keymaps/poker/keymap.c index 9da7d29b78..b7e6fac219 100644 --- a/keyboards/satan/keymaps/poker/keymap.c +++ b/keyboards/satan/keymaps/poker/keymap.c @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------. * | ~ | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| DEL | * |-----------------------------------------------------------| - * | | Up| | | | |Cal| |Ins| |PrSc|Sclk|Paus| | + * | | |Up| | | |Cal| |Ins| |PrSc|Sclk|Paus| | * |-----------------------------------------------------------| * | |Left|Down|Rig| | | | | | |Home|PgUp| | * |-----------------------------------------------------------| @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_APP, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, KC_PGDN, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - + /* Keymap _RL: Function Layer * ,-----------------------------------------------------------. * | | | | | | | | | | | | | | RESET| @@ -63,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | F1|F2 | F3|F4 | F5| F6| F7| F8| | | | * |-----------------------------------------------------------| * | | | | | | | | | - * `-----------------------------------------------------------' + * `-----------------------------------------------------------' */ [_RL] = KEYMAP_ANSI( #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/satan/readme.md b/keyboards/satan/readme.md index 1fd388935e..33310ce251 100644 --- a/keyboards/satan/readme.md +++ b/keyboards/satan/readme.md @@ -1,7 +1,15 @@ -Satan GH60 keyboard firmware -====================== - -TODO: to be updated. +Satan GH60 +========== ![controller](https://i.imgur.com/9vyRBoT.jpg) -![power](https://i.imgur.com/pHMZHLP.jpg) \ No newline at end of file +![power](https://i.imgur.com/pHMZHLP.jpg) + +Keyboard Maintainer: QMK Community +Hardware Supported: Satan GH60 PCB +Hardware Availability: https://1upkeyboards.com/gh60-satan-pcb.html + +Make example for this keyboard (after setting up your build environment): + + make satan-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/sixkeyboard/readme.md b/keyboards/sixkeyboard/readme.md index 7d78a0cae5..a2fc9eb46b 100644 --- a/keyboards/sixkeyboard/readme.md +++ b/keyboards/sixkeyboard/readme.md @@ -1,6 +1,17 @@ -# Techkeys SixKeyBoard +Techkeys SixKeyBoard +=== -[Get one here!](http://techkeys.us/collections/accessories/products/sixkeyboard) +Keyboard Maintainer: QMK Community +Hardware Supported: Techkeys SixKeyBoard PCB +Hardware Availability: http://techkeys.us/collections/accessories/products/sixkeyboard + +Make example for this keyboard (after setting up your build environment): + + make sixkeyboard-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. + +## Hardware Info The schematic is like this: @@ -15,4 +26,4 @@ The schematic is like this: The LED on the bottom is `C4`. All 7 of the leds are turned on when the keyboard boots-up in the `sixkeyboard.c` file - backlight_enable is not required. The MCU is an Atmega16u2, so the flash memory is limited to 0x3000 bytes - the current setup uses just about all of that! I'm sure things can be opitimised a bit. -There is a jumper on the bottom of the board (next to the USB port) that serves as a reset button - I drilled a hole in my case to allow for quick access via a screwdriver/metal object. \ No newline at end of file +There is a jumper on the bottom of the board (next to the USB port) that serves as a reset button - I drilled a hole in my case to allow for quick access via a screwdriver/metal object. diff --git a/keyboards/tada68/Makefile b/keyboards/tada68/Makefile old mode 100644 new mode 100755 diff --git a/keyboards/tada68/config.h b/keyboards/tada68/config.h old mode 100644 new mode 100755 index 19cf9c9b39..3e011bc754 --- a/keyboards/tada68/config.h +++ b/keyboards/tada68/config.h @@ -63,19 +63,6 @@ along with this program. If not, see . */ #define BACKLIGHT_LEVELS 4 -/* Underlight configuration - */ - -/*#define RGB_DI_PIN E2 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 2 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17*/ -//Disabled while I figure out a suitable pin for RGB support. -//I've tried F5, D2, D3, and E2 but it's possible the end of my -//strand is bad. New LEDs on order. - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/tada68/keymaps/default/Makefile b/keyboards/tada68/keymaps/default/Makefile old mode 100644 new mode 100755 diff --git a/keyboards/tada68/keymaps/default/keymap.c b/keyboards/tada68/keymaps/default/keymap.c old mode 100644 new mode 100755 index f28116e0a5..8e7cbdaf26 --- a/keyboards/tada68/keymaps/default/keymap.c +++ b/keyboards/tada68/keymaps/default/keymap.c @@ -38,14 +38,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |----------------------------------------------------------------| * | |<- |Dn | ->| | | | | | | | | |End | * |----------------------------------------------------------------| - * | | | |Bl-|BL |BL+| |VU-|VU+|MUT| |MouseL|MsU|Rck | + * | | | |Bl-|BL |BL+| |VU-|VU+|MUT| | McL|MsU|McR | * |----------------------------------------------------------------| * | | | | | | | |MsL|MsD|MsR | * `----------------------------------------------------------------' */ [_FL] = KEYMAP_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_INS , \ - _______,_______,KC_UP, _______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG,KC_HOME, \ + _______,_______, KC_UP,_______,_______, _______,_______,_______,_______,_______,_______,_______,_______, _______,KC_HOME, \ _______,KC_LEFT,KC_DOWN,KC_RIGHT,_______,_______,_______,_______,_______,_______,_______,_______, _______,KC_END, \ _______,_______,_______,BL_DEC, BL_TOGG,BL_INC, _______,KC_VOLD,KC_VOLU,KC_MUTE,_______,KC_BTN1, KC_MS_U, KC_BTN2, \ _______,_______,_______, _______, _______,_______,_______,KC_MS_L,KC_MS_D, KC_MS_R), diff --git a/keyboards/tada68/keymaps/default/readme.md b/keyboards/tada68/keymaps/default/readme.md old mode 100644 new mode 100755 diff --git a/keyboards/tada68/keymaps/maartenwut/Makefile b/keyboards/tada68/keymaps/maartenwut/Makefile new file mode 100755 index 0000000000..f9e1699063 --- /dev/null +++ b/keyboards/tada68/keymaps/maartenwut/Makefile @@ -0,0 +1,22 @@ +# 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(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +COMBO_ENABLE = no # Enable key combinations + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/tada68/keymaps/maartenwut/config.h b/keyboards/tada68/keymaps/maartenwut/config.h new file mode 100755 index 0000000000..7d81548b7f --- /dev/null +++ b/keyboards/tada68/keymaps/maartenwut/config.h @@ -0,0 +1,3 @@ +#include "../../config.h" + +#define BACKLIGHT_BREATHING \ No newline at end of file diff --git a/keyboards/tada68/keymaps/maartenwut/keymap.c b/keyboards/tada68/keymaps/maartenwut/keymap.c new file mode 100755 index 0000000000..8ddd6e3056 --- /dev/null +++ b/keyboards/tada68/keymaps/maartenwut/keymap.c @@ -0,0 +1,414 @@ +#include "tada68.h" +#include "action_layer.h" +#include "timer.h" +#include "bootloader.h" +#include "command.h" + +#define _MA 0 +#define _GA 1 +#define _FL 2 +#define _AR 3 +#define _LO 4 +#define _UL 5 + +#define TRNS KC_TRNS +#define trigger_time 400 + +#define T1 M(1) +#define T2 M(2) +#define T3 M(3) +#define T4 M(4) +#define T5 M(5) +#define T6 M(6) +#define T7 M(7) +#define T8 M(8) +#define T9 M(9) +#define T10 M(10) +#define T11 M(11) +#define T12 M(12) +#define END_HOME M(0) +#define LSHIFT OSM(MOD_LSFT) +#define SPACE LT(_AR, KC_SPC) + +static uint16_t key_timer; + +enum emoticons { + LENNY = SAFE_RANGE, + DWNHRT, + SHRUG +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _MA: Main Layer, Default + * ,----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |P/P | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del | + * |----------------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp| + * |----------------------------------------------------------------| + * |Shft|End| Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt|Ctrl| FN|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ +[_MA] = KEYMAP_ANSI( + KC_ESC, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, KC_BSPC, KC_MPLY, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \ + LSHIFT, END_HOME, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, SPACE, KC_RALT, KC_RCTRL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + * ,----------------------------------------------------------------. + * |~` | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Reset |Prsc| + * |----------------------------------------------------------------| + * | |MbL|MsU|MbR| | | | | | | | | | |_LO | + * |----------------------------------------------------------------| + * | |MsL|MsD|MsR| |_GA| | | | | | | |Hme | + * |----------------------------------------------------------------| + * | | | | | | | | | |VoU|VoD|Mut| |MwU|End | + * |----------------------------------------------------------------| + * | | | | | | | |MwL|MwD|MwR | + * `----------------------------------------------------------------' + */ +[_FL] = KEYMAP_ANSI( + 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, KC_PSCR, \ + TRNS, KC_BTN1, KC_MS_U, KC_BTN2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TO(_LO), \ + TRNS, KC_MS_L, KC_MS_D, KC_MS_R, TRNS, TG(_GA), TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_HOME, \ + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_VOLD, KC_VOLU, KC_MUTE, TRNS, KC_WH_U, KC_END, \ + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_WH_L, KC_WH_D, KC_WH_R), + + /* Keymap _AR: Arrow layer + * ,----------------------------------------------------------------. + * |~` | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| | | + * |----------------------------------------------------------------| + * |Lenny| | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * |Dwnhrt| | | | | |Lft|Dwn| Up|Rgt| | | | | + * |----------------------------------------------------------------| + * |Shrg| | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * | | | | | | | | | | | + * `----------------------------------------------------------------' + */ +[_AR] = KEYMAP_ANSI( + 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, TRNS, TRNS, \ + LENNY, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ + DWNHRT, TRNS, TRNS, TRNS, TRNS, TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TRNS, TRNS, TRNS, TRNS, \ + SHRUG, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), + + /* Keymap _GA: Game layer + * ,----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |P/P | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del | + * |----------------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp| + * |----------------------------------------------------------------| + * |Shft|End| Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt|Ctrl| FN|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ +[_GA] = KEYMAP_ANSI( + KC_ESC, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, KC_BSPC, KC_MPLY, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \ + KC_LSFT, END_HOME, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTRL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _UL: Unlock layer + * ,----------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * | | | | | | | | | | | | | | |_MA | + * |----------------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * | | | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * | | | | | | | | | | | + * `----------------------------------------------------------------' + */ +[_UL] = KEYMAP_ANSI( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TO(_MA), \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TRNS, KC_NO, KC_NO, KC_NO), + + /* Keymap _LO: Lock layer + * ,----------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * | | | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * | | | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * | | | | | | | _UL | | | | + * `----------------------------------------------------------------' + */ +[_LO] = KEYMAP_ANSI( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MO(_UL), KC_NO, KC_NO, KC_NO), +}; + +void tap(uint16_t keycode){ + register_code(keycode); + unregister_code(keycode); +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LENNY: // ( ͡° ͜ʖ ͡°) + if(record->event.pressed){ + set_unicode_input_mode(UC_WIN); + register_code(KC_LSFT); + tap(KC_9); // Head + unregister_code(KC_LSFT); + tap(KC_SPC); // Space + process_unicode((0x0361|QK_UNICODE), record); // Eyebrow + process_unicode((0x00B0|QK_UNICODE), record); // Eye + tap(KC_SPC); + process_unicode((0x035C|QK_UNICODE), record); // Mouth + process_unicode((0x0296|QK_UNICODE), record); // Nose + tap(KC_SPC); + process_unicode((0x0361|QK_UNICODE), record); // Eyebrow + process_unicode((0x00B0|QK_UNICODE), record); // Eye + register_code(KC_LSFT); + tap(KC_0); // Head + unregister_code(KC_LSFT); + } + return false; + break; + case DWNHRT: // (´・ω・`) + if(record->event.pressed){ + set_unicode_input_mode(UC_WIN); + register_code(KC_LSFT); + tap(KC_9); // Head + unregister_code(KC_LSFT); + process_unicode((0x00B4|QK_UNICODE), record); // Eyebrow + process_unicode((0x30FB|QK_UNICODE), record); // Eye + process_unicode((0x03C9|QK_UNICODE), record); // Mouth + process_unicode((0x30FB|QK_UNICODE), record); // Eye + process_unicode((0x0060|QK_UNICODE), record); // Eyebrow + register_code(KC_LSFT); + tap(KC_0); // Head + unregister_code(KC_LSFT); + } + return false; + break; + case SHRUG: // ¯\_(ツ)_/¯ + if(record->event.pressed){ + set_unicode_input_mode(UC_WIN); + process_unicode((0x00AF|QK_UNICODE), record); // Hand + tap(KC_BSLS); // Arm + register_code(KC_LSFT); + tap(KC_UNDS); // Arm + tap(KC_LPRN); // Head + unregister_code(KC_LSFT); + process_unicode((0x30C4|QK_UNICODE), record); // Face + register_code(KC_LSFT); + tap(KC_RPRN); // Head + tap(KC_UNDS); // Arm + unregister_code(KC_LSFT); + tap(KC_SLSH); // Arm + process_unicode((0x00AF|QK_UNICODE), record); // Hand + } + return false; + break; + } + return true; +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch (id) { + case 0: + if (record->event.pressed) { + key_timer = timer_read(); + } + else { + if (timer_elapsed(key_timer) > trigger_time) { + return MACRO( T(END), END ); + } + else { + return MACRO( T(HOME), END ); + } + } + break; + case 1: + if (record->event.pressed) { + key_timer = timer_read(); + } + else { + if (timer_elapsed(key_timer) > trigger_time) { + return MACRO( T(F1), END ); + } + else { + return MACRO( T(1), END ); + } + } + break; + case 2: + if (record->event.pressed) { + key_timer = timer_read(); + } + else { + if (timer_elapsed(key_timer) > trigger_time) { + return MACRO( T(F2), END ); + } + else { + return MACRO( T(2), END ); + } + } + break; + case 3: + if (record->event.pressed) { + key_timer = timer_read(); + } + else { + if (timer_elapsed(key_timer) > trigger_time) { + return MACRO( T(F3), END ); + } + else { + return MACRO( T(3), END ); + } + } + break; + case 4: + if (record->event.pressed) { + key_timer = timer_read(); + } + else { + if (timer_elapsed(key_timer) > trigger_time) { + return MACRO( T(F4), END ); + } + else { + return MACRO( T(4), END ); + } + } + break; + case 5: + if (record->event.pressed) { + key_timer = timer_read(); + } + else { + if (timer_elapsed(key_timer) > trigger_time) { + return MACRO( T(F5), END ); + } + else { + return MACRO( T(5), END ); + } + } + break; + case 6: + if (record->event.pressed) { + key_timer = timer_read(); + } + else { + if (timer_elapsed(key_timer) > trigger_time) { + return MACRO( T(F6), END ); + } + else { + return MACRO( T(6), END ); + } + } + break; + case 7: + if (record->event.pressed) { + key_timer = timer_read(); + } + else { + if (timer_elapsed(key_timer) > trigger_time) { + return MACRO( T(F7), END ); + } + else { + return MACRO( T(7), END ); + } + } + break; + case 8: + if (record->event.pressed) { + key_timer = timer_read(); + } + else { + if (timer_elapsed(key_timer) > trigger_time) { + return MACRO( T(F8), END ); + } + else { + return MACRO( T(8), END ); + } + } + break; + case 9: + if (record->event.pressed) { + key_timer = timer_read(); + } + else { + if (timer_elapsed(key_timer) > trigger_time) { + return MACRO( T(F9), END ); + } + else { + return MACRO( T(9), END ); + } + } + break; + case 10: + if (record->event.pressed) { + key_timer = timer_read(); + } + else { + if (timer_elapsed(key_timer) > trigger_time) { + return MACRO( T(F10), END ); + } + else { + return MACRO( T(0), END ); + } + } + break; + case 11: + if (record->event.pressed) { + key_timer = timer_read(); + } + else { + if (timer_elapsed(key_timer) > trigger_time) { + return MACRO( T(F11), END ); + } + else { + return MACRO( T(MINS), END ); + } + } + break; + case 12: + if (record->event.pressed) { + key_timer = timer_read(); + } + else { + if (timer_elapsed(key_timer) > trigger_time) { + return MACRO( T(F12), END ); + } + else { + return MACRO( T(EQL), END ); + } + } + break; + } + return MACRO_NONE; +}; + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1<| | | | | | | | | |End | + * |----------------------------------------------------------------| + * | | | |Bl-|BL |BL+| |VU-|VU+|MUT| | McL|MsU|McR | + * |----------------------------------------------------------------| + * | | | | | | | |MsL|MsD|MsR | + * `----------------------------------------------------------------' + */ +[_FL] = KEYMAP_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_INS , \ + _______,_______,KC_UP,_______,_______, RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, _______,KC_HOME, \ + _______,KC_LEFT,KC_DOWN,KC_RIGHT,_______,_______,_______,_______,_______,_______,_______,_______, _______,KC_END, \ + _______,_______,_______,BL_DEC, BL_TOGG,BL_INC, _______,KC_VOLD,KC_VOLU,KC_MUTE,_______,KC_BTN1, KC_MS_U, KC_BTN2, \ + _______,_______,_______, _______, _______,_______,_______,KC_MS_L,KC_MS_D, KC_MS_R), +}; diff --git a/keyboards/tada68/keymaps/rgb/readme.md b/keyboards/tada68/keymaps/rgb/readme.md new file mode 100755 index 0000000000..fb5a5abd0c --- /dev/null +++ b/keyboards/tada68/keymaps/rgb/readme.md @@ -0,0 +1,3 @@ +# RGB on the TADA68 +This board has unused pins, which means that you can add some nice RGB leds, although they have no use at this momen because not a single transparent case has been made yet. Here's where you have to solder the wires on the PCB: +![Image of solder points for RGB on the Tada68](http://i.imgur.com/5Xmiz6Q.jpg) \ No newline at end of file diff --git a/keyboards/tada68/readme.md b/keyboards/tada68/readme.md old mode 100644 new mode 100755 index dbe2fdca1b..1986008bdc --- a/keyboards/tada68/readme.md +++ b/keyboards/tada68/readme.md @@ -1,9 +1,23 @@ -TADA68 keyboard firmware -======================== +TADA68 +====== -1) from the keyboards/tada68 directory run: +A compact 65% keyboard. + +Keyboard Maintainer: QMK Community +Hardware Supported: TADA68 PCB +Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/products/tada68-mechanical-keyboard-gateron-swtich-65-layout-dye-sub-keycaps-cherry-profils?variant=34710238797) [kbdist](http://www.kbdist.com/shop/saber-68) + +Make example for this keyboard (after setting up your build environment): + + make tada68-default-bin + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. + +## Flashing Instructions + +1) from the `qmk_firmware` directory run: ``` -$ make flashbin +$ make tada68-default-bin ``` 2) hit the reset button on the TADA, the lights will start flashing. @@ -12,4 +26,4 @@ $ make flashbin 4) Delete `FLASH.BIN` from the TADA drive and copy `tada68_default.bin` that was generated at the root of the qmk directory into the TADA drive. -5) Hit ESC on the keyboard. The lights will stop flashing and your firmware is loaded! \ No newline at end of file +5) Hit ESC on the keyboard. The lights will stop flashing and your firmware is loaded! diff --git a/keyboards/tada68/rules.mk b/keyboards/tada68/rules.mk old mode 100644 new mode 100755 diff --git a/keyboards/tada68/tada68.c b/keyboards/tada68/tada68.c old mode 100644 new mode 100755 index 24f89048cb..e4fab98101 --- a/keyboards/tada68/tada68.c +++ b/keyboards/tada68/tada68.c @@ -27,4 +27,5 @@ void led_set_kb(uint8_t usb_led) { // Turn capslock off PORTB |= (1<<2); } + led_set_user(usb_led); } diff --git a/keyboards/tada68/tada68.h b/keyboards/tada68/tada68.h old mode 100644 new mode 100755 diff --git a/keyboards/tiger_lily/readme.md b/keyboards/tiger_lily/readme.md index b5f30f2e11..b24c468366 100644 --- a/keyboards/tiger_lily/readme.md +++ b/keyboards/tiger_lily/readme.md @@ -1,32 +1,16 @@ -tiger_lily keyboard firmware -====================== +tiger_lily +========== This is the firmware for Rev. 20161114 of the Tiger Lily controller by [Bathroom Epiphanies](http://bathroomepiphanies.com/controllers/), a replacement controller for the [Filco Majestouch 2 104 key](https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=1819). Bathroom Epiphanies has advised that the source is also compatible with the Black Petal controller, however I do not own an example to test against. The code was adapted from the [BathroomEpiphanies TMK Firmware](https://github.com/BathroomEpiphanies/epiphanies_tmk_keyboard/tree/master/be_controllers). -## Quantum MK Firmware +Keyboard Maintainer: QMK Community +Hardware Supported: Tiger Lily +Hardware Availability: https://geekhack.org/index.php?topic=46700.0 -For the full Quantum feature list, see [the parent readme](/). +Make example for this keyboard (after setting up your build environment): -## Building + make tiger_lily-default -Download or clone the whole firmware and navigate to the keyboards/tiger_lily folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. - -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default - -To build with the default keymap, simply run `make default`. - -### Other Keymaps - -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` - -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/tv44/readme.md b/keyboards/tv44/readme.md index 4f691a4ca0..f0a277dec9 100644 --- a/keyboards/tv44/readme.md +++ b/keyboards/tv44/readme.md @@ -1,28 +1,14 @@ -tv44 keyboard firmware -====================== +The Van 44 +========== -## Quantum MK Firmware +A compact 44% keyboard. -For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). +Keyboard Maintainer: QMK Community +Hardware Supported: The Van PCB +Hardware Availability: https://thevankeyboards.com/products/minivan-r4-keyboard-kit?variant=37353952718 -## Building +Make example for this keyboard (after setting up your build environment): -Download or clone the whole firmware and navigate to the keyboards/tv44 folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + make tv44-default -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default - -To build with the default keymap, simply run `make default`. - -### Other Keymaps - -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` - -Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` \ No newline at end of file +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/uk78/Makefile b/keyboards/uk78/Makefile new file mode 100644 index 0000000000..57b2ef62e5 --- /dev/null +++ b/keyboards/uk78/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/uk78/config.h b/keyboards/uk78/config.h new file mode 100644 index 0000000000..e538ad33b7 --- /dev/null +++ b/keyboards/uk78/config.h @@ -0,0 +1,76 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x554B /* Ascii */ +#define PRODUCT_ID 0x004E +#define DEVICE_VER 0x0002 +#define MANUFACTURER UK Keyboards +#define PRODUCT UK78 +#define DESCRIPTION QMK keyboard firmware for UK78 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 19 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F3, F2, F1, F0, A0 } +#define MATRIX_COL_PINS { A2, A1, F5, F4, E6, E7, E5, E4, B7, D0, D1, D2, D3, D4, D5, D6, D7, B5, E0 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + +/* ws2812b options */ +#define RGB_DI_PIN F6 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 20 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif diff --git a/keyboards/uk78/keymaps/default/keymap.c b/keyboards/uk78/keymaps/default/keymap.c new file mode 100644 index 0000000000..b01beae182 --- /dev/null +++ b/keyboards/uk78/keymaps/default/keymap.c @@ -0,0 +1,119 @@ +#include "uk78.h" + +// Helpful defines +#define _______ KC_TRNS + +// 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. +#define _BL 0 +#define _FL1 1 +#define _FL2 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* _BL: Base Layer(Default) - For ISO enter use ANSI \ + * ,-------------------------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| /|BSpc| Del| P/| P*| P-| + * |-------------------------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | P7| P8| P9| P=| + * |-------------------------------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent| P4| P5| P6| P+| + * |-------------------------------------------------------------------------------| + * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | Up| P1| P2| P3|SLck| + * |-------------------------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt|Mo(1)|Ctrl|Lef|Dow| Rig| P0| P.|PEnt| + * `-------------------------------------------------------------------------------' + */ + [_BL] = KEYMAP( + 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_BSPC, KC_DEL, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PEQL, + 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_P4, KC_P5, KC_P6, KC_PPLS, + 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_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_SLCK, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + /* _FL1: Function Layer 1 - For ISO enter use ANSI \ + * ,-------------------------------------------------------------------------------. + * | `|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|PScr|Ins|NLck| | | | + * |-------------------------------------------------------------------------------| + * | | | | |RST| | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | |Hu+|Va+|Sa+| | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | |RGB|Hu-|Va-|Sa-|Bl-|Bl+| |Mute|Vol+| | | | | + * |-------------------------------------------------------------------------------| + * | | | | BL_Toggle | | | | |Vol-| | | | | + * `-------------------------------------------------------------------------------' + */ + [_FL1] = KEYMAP( + 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_PSCR, KC_INS, KC_NLCK, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, BL_INC, KC_TRNS, KC_MUTE, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + /* _FL2: Function Layer 2 - For ISO enter use ANSI \ + * ,-------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------' + */ + [_FL2] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + +}; + + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRA |= (1 << 3); PORTA |= (1 << 3); + } else { + DDRA &= ~(1 << 3); PORTA &= ~(1 << 3); + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} \ No newline at end of file diff --git a/keyboards/uk78/readme.md b/keyboards/uk78/readme.md new file mode 100644 index 0000000000..46f2936143 --- /dev/null +++ b/keyboards/uk78/readme.md @@ -0,0 +1,16 @@ +# UK78 + +![UK78](http://i.imgur.com/42pg6RS.png) + +A fully customizable 60%+numpad keyboard. + +* Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin) +* Hardware Supported: UK78 PCB + * rev2 +* Hardware Availability: [ukkeyboards.](http://ukkeyboards.bigcartel.com/) + +Make example for this keyboard (after setting up your build environment): + + make uk78-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/uk78/rules.mk b/keyboards/uk78/rules.mk new file mode 100644 index 0000000000..4e8d14812f --- /dev/null +++ b/keyboards/uk78/rules.mk @@ -0,0 +1,56 @@ +# MCU name +MCU = at90usb1286 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=8192 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= no # Console for debug(+400) +COMMAND_ENABLE ?= no # Commands for debug and configuration +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality +AUDIO_ENABLE ?= no +RGBLIGHT_ENABLE ?= yes \ No newline at end of file diff --git a/keyboards/uk78/uk78.c b/keyboards/uk78/uk78.c new file mode 100644 index 0000000000..3611427d02 --- /dev/null +++ b/keyboards/uk78/uk78.c @@ -0,0 +1 @@ +#include "uk78.h" diff --git a/keyboards/uk78/uk78.h b/keyboards/uk78/uk78.h new file mode 100644 index 0000000000..6cc5eee479 --- /dev/null +++ b/keyboards/uk78/uk78.h @@ -0,0 +1,20 @@ +#ifndef UK78_H +#define UK78_H + +#include "quantum.h" + +#define KEYMAP( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, K116, K117, K118, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, K217, K218, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, \ + K400, K401, K402, K406, K410, K411, K412, K413, K414, K415, K416, K417, K418 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115, K116, K117, K118 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215, K216, K217, K218 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414, K415, K416, K417, K418 } \ +} + +#endif \ No newline at end of file diff --git a/keyboards/vision_division/readme.md b/keyboards/vision_division/readme.md index de200d7c5b..880c62f58d 100644 --- a/keyboards/vision_division/readme.md +++ b/keyboards/vision_division/readme.md @@ -1,34 +1,14 @@ -vision_division keyboard firmware -====================== +Vision Division +=============== -## Keyboard Info +Full Size / Split Linear Keyboard PCB -[See this thread.](https://geekhack.org/index.php?topic=83692.msg2227856#msg2227856) +Keyboard Maintainer: QMK Community +Hardware Supported: Vision Division PCB +Hardware Availability: https://geekhack.org/index.php?topic=83692.msg2227856#msg2227856 -Vision/Division is a full size or split keyboard that can be customized due to its pcb. +Make example for this keyboard (after setting up your build environment): -## Quantum MK Firmware + make vision_division-default -For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). - -## Building - -Download or clone the whole firmware and navigate to the keyboards/vision_division folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. - -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default - -To build with the default keymap, simply run `make`. - -### Other Keymaps - -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. - -To build the firmware binary hex file with a keymap just do `make` with `keymap` option like: - -``` -$ make keymap=[default|jack|] -``` - -Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` \ No newline at end of file +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/whitefox/animations.c b/keyboards/whitefox/animations.c deleted file mode 100644 index ed1d75efb8..0000000000 --- a/keyboards/whitefox/animations.c +++ /dev/null @@ -1,128 +0,0 @@ -/* Copyright 2017 Fred Sundvik - * - * 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 . - */ - -#if defined(VISUALIZER_ENABLE) - -#include "animations.h" -#include "visualizer.h" - -#ifdef BACKLIGHT_ENABLE -#include "led_keyframes.h" -#endif - -#include "visualizer_keyframes.h" - - -#if defined(LCD_ENABLE) || defined(LCD_BACKLIGHT_ENABLE) || defined(BACKLIGHT_ENABLE) - -static bool keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state) { -#ifdef BACKLIGHT_ENABLE - led_keyframe_enable(animation, state); -#endif - return false; -} - -static bool keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state) { -#ifdef BACKLIGHT_ENABLE - led_keyframe_disable(animation, state); -#endif - return false; -} - -static bool keyframe_fade_in(keyframe_animation_t* animation, visualizer_state_t* state) { - bool ret = false; -#ifdef BACKLIGHT_ENABLE - ret |= led_keyframe_fade_in_all(animation, state); -#endif - return ret; -} - -static bool keyframe_fade_out(keyframe_animation_t* animation, visualizer_state_t* state) { - bool ret = false; -#ifdef BACKLIGHT_ENABLE - ret |= led_keyframe_fade_out_all(animation, state); -#endif - return ret; -} - - -// Don't worry, if the startup animation is long, you can use the keyboard like normal -// during that time -keyframe_animation_t default_startup_animation = { - .num_frames = 2, - .loop = false, - .frame_lengths = {0, gfxMillisecondsToTicks(5000)}, - .frame_functions = { - keyframe_enable, - keyframe_fade_in, - }, -}; - -keyframe_animation_t default_suspend_animation = { - .num_frames = 2, - .loop = false, - .frame_lengths = {gfxMillisecondsToTicks(1000), 0}, - .frame_functions = { - keyframe_fade_out, - keyframe_disable, - }, -}; -#endif - -#if defined(BACKLIGHT_ENABLE) -#define CROSSFADE_TIME 1000 -#define GRADIENT_TIME 3000 - -keyframe_animation_t led_test_animation = { - .num_frames = 14, - .loop = true, - .frame_lengths = { - gfxMillisecondsToTicks(1000), // fade in - gfxMillisecondsToTicks(1000), // no op (leds on) - gfxMillisecondsToTicks(1000), // fade out - gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade - gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in) - gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade - gfxMillisecondsToTicks(GRADIENT_TIME), // top_to_bottom - 0, // mirror leds - gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade - gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out) - gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade - gfxMillisecondsToTicks(GRADIENT_TIME), // top_to_bottom - 0, // normal leds - gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade - - }, - .frame_functions = { - led_keyframe_fade_in_all, - keyframe_no_operation, - led_keyframe_fade_out_all, - led_keyframe_crossfade, - led_keyframe_left_to_right_gradient, - led_keyframe_crossfade, - led_keyframe_top_to_bottom_gradient, - led_keyframe_mirror_orientation, - led_keyframe_crossfade, - led_keyframe_left_to_right_gradient, - led_keyframe_crossfade, - led_keyframe_top_to_bottom_gradient, - led_keyframe_normal_orientation, - led_keyframe_crossfade, - }, -}; -#endif - -#endif diff --git a/keyboards/whitefox/drivers/gdisp/IS31FL3731C/board_IS31FL3731C.h b/keyboards/whitefox/board_is31fl3731c.h similarity index 98% rename from keyboards/whitefox/drivers/gdisp/IS31FL3731C/board_IS31FL3731C.h rename to keyboards/whitefox/board_is31fl3731c.h index 3dc5327a58..dea643f107 100644 --- a/keyboards/whitefox/drivers/gdisp/IS31FL3731C/board_IS31FL3731C.h +++ b/keyboards/whitefox/board_is31fl3731c.h @@ -22,9 +22,6 @@ static const I2CConfig i2ccfg = { 400000 // clock speed (Hz); 400kHz max for IS31 }; -#define GDISP_SCREEN_WIDTH 16 -#define GDISP_SCREEN_HEIGHT 5 - static const uint8_t led_mask[] = { 0xFF, 0x00, /* C1-1 -> C1-16 */ 0xFF, 0x00, /* C2-1 -> C2-16 */ diff --git a/keyboards/whitefox/config.h b/keyboards/whitefox/config.h index 08de9b9aa8..dc33a7ce5b 100644 --- a/keyboards/whitefox/config.h +++ b/keyboards/whitefox/config.h @@ -81,12 +81,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#endif - -// The visualizer needs gfx thread priorities -#define LED_DISPLAY_NUMBER 0 - -#define LED_NUM_ROWS 5 -#define LED_NUM_COLS 16 - -#define VISUALIZER_THREAD_PRIORITY (NORMAL_PRIORITY - 2) +#endif \ No newline at end of file diff --git a/keyboards/whitefox/drivers/gdisp/IS31FL3731C/driver.mk b/keyboards/whitefox/drivers/gdisp/IS31FL3731C/driver.mk deleted file mode 100644 index f32d0d8685..0000000000 --- a/keyboards/whitefox/drivers/gdisp/IS31FL3731C/driver.mk +++ /dev/null @@ -1,2 +0,0 @@ -GFXINC += drivers/gdisp/IS31FL3731C -GFXSRC += drivers/gdisp/IS31FL3731C/gdisp_IS31FL3731C.c diff --git a/keyboards/whitefox/drivers/gdisp/IS31FL3731C/gdisp_IS31FL3731C.c b/keyboards/whitefox/drivers/gdisp/IS31FL3731C/gdisp_IS31FL3731C.c deleted file mode 100644 index c807cbd1e2..0000000000 --- a/keyboards/whitefox/drivers/gdisp/IS31FL3731C/gdisp_IS31FL3731C.c +++ /dev/null @@ -1,312 +0,0 @@ -/* -Copyright 2016 Fred Sundvik - -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 . -*/ - -#include "gfx.h" - -#if GFX_USE_GDISP - -#define GDISP_DRIVER_VMT GDISPVMT_IS31FL3731C_WHITEFOX -#include "drivers/gdisp/IS31FL3731C/gdisp_lld_config.h" -#include "src/gdisp/gdisp_driver.h" - -#include "board_IS31FL3731C.h" - - -// Can't include led_tables from here -extern const uint8_t CIE1931_CURVE[]; - -/*===========================================================================*/ -/* Driver local definitions. */ -/*===========================================================================*/ - -#ifndef GDISP_SCREEN_HEIGHT - #define GDISP_SCREEN_HEIGHT 9 -#endif -#ifndef GDISP_SCREEN_WIDTH - #define GDISP_SCREEN_WIDTH 16 -#endif -#ifndef GDISP_INITIAL_CONTRAST - #define GDISP_INITIAL_CONTRAST 0 -#endif -#ifndef GDISP_INITIAL_BACKLIGHT - #define GDISP_INITIAL_BACKLIGHT 0 -#endif - -#define GDISP_FLG_NEEDFLUSH (GDISP_FLG_DRIVER<<0) - -#define IS31_ADDR_DEFAULT 0x74 - -#define IS31_REG_CONFIG 0x00 -// bits in reg -#define IS31_REG_CONFIG_PICTUREMODE 0x00 -#define IS31_REG_CONFIG_AUTOPLAYMODE 0x08 -#define IS31_REG_CONFIG_AUDIOPLAYMODE 0x18 -// D2:D0 bits are starting frame for autoplay mode - -#define IS31_REG_PICTDISP 0x01 // D2:D0 frame select for picture mode - -#define IS31_REG_AUTOPLAYCTRL1 0x02 -// D6:D4 number of loops (000=infty) -// D2:D0 number of frames to be used - -#define IS31_REG_AUTOPLAYCTRL2 0x03 // D5:D0 delay time (*11ms) - -#define IS31_REG_DISPLAYOPT 0x05 -#define IS31_REG_DISPLAYOPT_INTENSITY_SAME 0x20 // same intensity for all frames -#define IS31_REG_DISPLAYOPT_BLINK_ENABLE 0x8 -// D2:D0 bits blink period time (*0.27s) - -#define IS31_REG_AUDIOSYNC 0x06 -#define IS31_REG_AUDIOSYNC_ENABLE 0x1 - -#define IS31_REG_FRAMESTATE 0x07 - -#define IS31_REG_BREATHCTRL1 0x08 -// D6:D4 fade out time (26ms*2^i) -// D2:D0 fade in time (26ms*2^i) - -#define IS31_REG_BREATHCTRL2 0x09 -#define IS31_REG_BREATHCTRL2_ENABLE 0x10 -// D2:D0 extinguish time (3.5ms*2^i) - -#define IS31_REG_SHUTDOWN 0x0A -#define IS31_REG_SHUTDOWN_OFF 0x0 -#define IS31_REG_SHUTDOWN_ON 0x1 - -#define IS31_REG_AGCCTRL 0x0B -#define IS31_REG_ADCRATE 0x0C - -#define IS31_COMMANDREGISTER 0xFD -#define IS31_FUNCTIONREG 0x0B // helpfully called 'page nine' -#define IS31_FUNCTIONREG_SIZE 0xD - -#define IS31_FRAME_SIZE 0xB4 - -#define IS31_PWM_REG 0x24 -#define IS31_PWM_SIZE 0x90 - -#define IS31_LED_MASK_SIZE 0x12 -#define IS31_SCREEN_WIDTH 16 - -#define IS31 - -/*===========================================================================*/ -/* Driver local functions. */ -/*===========================================================================*/ - -typedef struct{ - uint8_t write_buffer_offset; - uint8_t write_buffer[IS31_FRAME_SIZE]; - uint8_t frame_buffer[GDISP_SCREEN_HEIGHT * GDISP_SCREEN_WIDTH]; - uint8_t page; -}__attribute__((__packed__)) PrivData; - -// Some common routines and macros -#define PRIV(g) ((PrivData*)g->priv) - -/*===========================================================================*/ -/* Driver exported functions. */ -/*===========================================================================*/ - -static GFXINLINE void write_page(GDisplay* g, uint8_t page) { - uint8_t tx[2] __attribute__((aligned(2))); - tx[0] = IS31_COMMANDREGISTER; - tx[1] = page; - write_data(g, tx, 2); -} - -static GFXINLINE void write_register(GDisplay* g, uint8_t page, uint8_t reg, uint8_t data) { - uint8_t tx[2] __attribute__((aligned(2))); - tx[0] = reg; - tx[1] = data; - write_page(g, page); - write_data(g, tx, 2); -} - -static GFXINLINE void write_ram(GDisplay *g, uint8_t page, uint16_t offset, uint16_t length) { - PRIV(g)->write_buffer_offset = offset; - write_page(g, page); - write_data(g, (uint8_t*)PRIV(g), length + 1); -} - -LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { - // The private area is the display surface. - g->priv = gfxAlloc(sizeof(PrivData)); - __builtin_memset(PRIV(g), 0, sizeof(PrivData)); - PRIV(g)->page = 0; - - // Initialise the board interface - init_board(g); - gfxSleepMilliseconds(10); - - // zero function page, all registers (assuming full_page is all zeroes) - write_ram(g, IS31_FUNCTIONREG, 0, IS31_FUNCTIONREG_SIZE); - set_hardware_shutdown(g, false); - gfxSleepMilliseconds(10); - // software shutdown - write_register(g, IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_OFF); - gfxSleepMilliseconds(10); - // zero function page, all registers - write_ram(g, IS31_FUNCTIONREG, 0, IS31_FUNCTIONREG_SIZE); - gfxSleepMilliseconds(10); - - - // zero all LED registers on all 8 pages, and enable the mask - __builtin_memcpy(PRIV(g)->write_buffer, get_led_mask(g), IS31_LED_MASK_SIZE); - for(uint8_t i=0; i<8; i++) { - write_ram(g, i, 0, IS31_FRAME_SIZE); - gfxSleepMilliseconds(1); - } - - // software shutdown disable (i.e. turn stuff on) - write_register(g, IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_OFF); - gfxSleepMilliseconds(10); - - // Finish Init - post_init_board(g); - - /* Initialise the GDISP structure */ - g->g.Width = GDISP_SCREEN_WIDTH; - g->g.Height = GDISP_SCREEN_HEIGHT; - g->g.Orientation = GDISP_ROTATE_0; - g->g.Powermode = powerOff; - g->g.Backlight = GDISP_INITIAL_BACKLIGHT; - g->g.Contrast = GDISP_INITIAL_CONTRAST; - return TRUE; -} - -#if GDISP_HARDWARE_FLUSH - LLDSPEC void gdisp_lld_flush(GDisplay *g) { - // Don't flush if we don't need it. - if (!(g->flags & GDISP_FLG_NEEDFLUSH)) - return; - - PRIV(g)->page++; - PRIV(g)->page %= 2; - // TODO: some smarter algorithm for this - // We should run only one physical page at a time - // This way we don't need to send so much data, and - // we could use slightly less memory - uint8_t* src = PRIV(g)->frame_buffer; - for (int y=0;yg.Backlight / 100; - PRIV(g)->write_buffer[get_led_address(g, x, y)]=CIE1931_CURVE[val]; - ++src; - } - } - write_ram(g, PRIV(g)->page, IS31_PWM_REG, IS31_PWM_SIZE); - gfxSleepMilliseconds(1); - write_register(g, IS31_FUNCTIONREG, IS31_REG_PICTDISP, PRIV(g)->page); - - g->flags &= ~GDISP_FLG_NEEDFLUSH; - } -#endif - -#if GDISP_HARDWARE_DRAWPIXEL - LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) { - coord_t x, y; - - switch(g->g.Orientation) { - default: - case GDISP_ROTATE_0: - x = g->p.x; - y = g->p.y; - break; - case GDISP_ROTATE_180: - x = GDISP_SCREEN_WIDTH-1 - g->p.x; - y = g->p.y; - break; - } - PRIV(g)->frame_buffer[y * GDISP_SCREEN_WIDTH + x] = gdispColor2Native(g->p.color); - g->flags |= GDISP_FLG_NEEDFLUSH; - } -#endif - -#if GDISP_HARDWARE_PIXELREAD - LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) { - coord_t x, y; - - switch(g->g.Orientation) { - default: - case GDISP_ROTATE_0: - x = g->p.x; - y = g->p.y; - break; - case GDISP_ROTATE_180: - x = GDISP_SCREEN_WIDTH-1 - g->p.x; - y = g->p.y; - break; - } - return gdispNative2Color(PRIV(g)->frame_buffer[y * GDISP_SCREEN_WIDTH + x]); - } -#endif - -#if GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL - LLDSPEC void gdisp_lld_control(GDisplay *g) { - switch(g->p.x) { - case GDISP_CONTROL_POWER: - if (g->g.Powermode == (powermode_t)g->p.ptr) - return; - switch((powermode_t)g->p.ptr) { - case powerOff: - case powerSleep: - case powerDeepSleep: - write_register(g, IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_OFF); - break; - case powerOn: - write_register(g, IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_ON); - break; - default: - return; - } - g->g.Powermode = (powermode_t)g->p.ptr; - return; - - case GDISP_CONTROL_ORIENTATION: - if (g->g.Orientation == (orientation_t)g->p.ptr) - return; - switch((orientation_t)g->p.ptr) { - /* Rotation is handled by the drawing routines */ - case GDISP_ROTATE_0: - case GDISP_ROTATE_180: - g->g.Height = GDISP_SCREEN_HEIGHT; - g->g.Width = GDISP_SCREEN_WIDTH; - break; - case GDISP_ROTATE_90: - case GDISP_ROTATE_270: - g->g.Height = GDISP_SCREEN_WIDTH; - g->g.Width = GDISP_SCREEN_HEIGHT; - break; - default: - return; - } - g->g.Orientation = (orientation_t)g->p.ptr; - return; - - case GDISP_CONTROL_BACKLIGHT: - if (g->g.Backlight == (unsigned)g->p.ptr) - return; - unsigned val = (unsigned)g->p.ptr; - g->g.Backlight = val > 100 ? 100 : val; - g->flags |= GDISP_FLG_NEEDFLUSH; - return; - } - } -#endif // GDISP_NEED_CONTROL - -#endif // GFX_USE_GDISP diff --git a/keyboards/whitefox/drivers/gdisp/IS31FL3731C/gdisp_lld_config.h b/keyboards/whitefox/drivers/gdisp/IS31FL3731C/gdisp_lld_config.h deleted file mode 100644 index bb28ad775e..0000000000 --- a/keyboards/whitefox/drivers/gdisp/IS31FL3731C/gdisp_lld_config.h +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright 2016 Fred Sundvik - -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 . -*/ - -#ifndef _GDISP_LLD_CONFIG_H -#define _GDISP_LLD_CONFIG_H - -#if GFX_USE_GDISP - -/*===========================================================================*/ -/* Driver hardware support. */ -/*===========================================================================*/ - -#define GDISP_HARDWARE_FLUSH TRUE // This controller requires flushing -#define GDISP_HARDWARE_DRAWPIXEL TRUE -#define GDISP_HARDWARE_PIXELREAD TRUE -#define GDISP_HARDWARE_CONTROL TRUE - -#define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_GRAY256 - -#endif /* GFX_USE_GDISP */ - -#endif /* _GDISP_LLD_CONFIG_H */ diff --git a/keyboards/whitefox/gfxconf.h b/keyboards/whitefox/gfxconf.h index 890317a0f4..ca338399d3 100644 --- a/keyboards/whitefox/gfxconf.h +++ b/keyboards/whitefox/gfxconf.h @@ -22,308 +22,6 @@ #ifndef _GFXCONF_H #define _GFXCONF_H - -/////////////////////////////////////////////////////////////////////////// -// GOS - One of these must be defined, preferably in your Makefile // -/////////////////////////////////////////////////////////////////////////// -//#define GFX_USE_OS_CHIBIOS TRUE -//#define GFX_USE_OS_FREERTOS FALSE -// #define GFX_FREERTOS_USE_TRACE FALSE -//#define GFX_USE_OS_WIN32 FALSE -//#define GFX_USE_OS_LINUX FALSE -//#define GFX_USE_OS_OSX FALSE -//#define GFX_USE_OS_ECOS FALSE -//#define GFX_USE_OS_RAWRTOS FALSE -//#define GFX_USE_OS_ARDUINO FALSE -//#define GFX_USE_OS_KEIL FALSE -//#define GFX_USE_OS_CMSIS FALSE -//#define GFX_USE_OS_RAW32 FALSE -// #define INTERRUPTS_OFF() optional_code -// #define INTERRUPTS_ON() optional_code -// These are not defined by default for some reason -#define GOS_NEED_X_THREADS FALSE -#define GOS_NEED_X_HEAP FALSE - -// Options that (should where relevant) apply to all operating systems - #define GFX_NO_INLINE FALSE -// #define GFX_COMPILER GFX_COMPILER_UNKNOWN -// #define GFX_CPU GFX_CPU_UNKNOWN -// #define GFX_OS_HEAP_SIZE 0 -// #define GFX_OS_NO_INIT FALSE -// #define GFX_OS_INIT_NO_WARNING FALSE -// #define GFX_OS_PRE_INIT_FUNCTION myHardwareInitRoutine -// #define GFX_OS_EXTRA_INIT_FUNCTION myOSInitRoutine -// #define GFX_OS_EXTRA_DEINIT_FUNCTION myOSDeInitRoutine - - -/////////////////////////////////////////////////////////////////////////// -// GDISP // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GDISP TRUE - -//#define GDISP_NEED_AUTOFLUSH FALSE -//#define GDISP_NEED_TIMERFLUSH FALSE -//#define GDISP_NEED_VALIDATION TRUE -//#define GDISP_NEED_CLIP TRUE -#define GDISP_NEED_CIRCLE TRUE -#define GDISP_NEED_ELLIPSE TRUE -#define GDISP_NEED_ARC TRUE -#define GDISP_NEED_ARCSECTORS TRUE -#define GDISP_NEED_CONVEX_POLYGON TRUE -//#define GDISP_NEED_SCROLL FALSE -#define GDISP_NEED_PIXELREAD TRUE -#define GDISP_NEED_CONTROL TRUE -//#define GDISP_NEED_QUERY FALSE -//#define GDISP_NEED_MULTITHREAD FALSE -//#define GDISP_NEED_STREAMING FALSE -#define GDISP_NEED_TEXT TRUE -// #define GDISP_NEED_TEXT_WORDWRAP FALSE -// #define GDISP_NEED_ANTIALIAS FALSE -// #define GDISP_NEED_UTF8 FALSE - #define GDISP_NEED_TEXT_KERNING TRUE -// #define GDISP_INCLUDE_FONT_UI1 FALSE -// #define GDISP_INCLUDE_FONT_UI2 FALSE // The smallest preferred font. -// #define GDISP_INCLUDE_FONT_LARGENUMBERS FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS10 FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS12 FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS16 FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS20 FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS24 FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS32 FALSE - #define GDISP_INCLUDE_FONT_DEJAVUSANSBOLD12 TRUE -// #define GDISP_INCLUDE_FONT_FIXED_10X20 FALSE -// #define GDISP_INCLUDE_FONT_FIXED_7X14 FALSE - #define GDISP_INCLUDE_FONT_FIXED_5X8 TRUE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS12_AA FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS16_AA FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS20_AA FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS24_AA FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANS32_AA FALSE -// #define GDISP_INCLUDE_FONT_DEJAVUSANSBOLD12_AA FALSE -// #define GDISP_INCLUDE_USER_FONTS FALSE - -//#define GDISP_NEED_IMAGE FALSE -// #define GDISP_NEED_IMAGE_NATIVE FALSE -// #define GDISP_NEED_IMAGE_GIF FALSE -// #define GDISP_NEED_IMAGE_BMP FALSE -// #define GDISP_NEED_IMAGE_BMP_1 FALSE -// #define GDISP_NEED_IMAGE_BMP_4 FALSE -// #define GDISP_NEED_IMAGE_BMP_4_RLE FALSE -// #define GDISP_NEED_IMAGE_BMP_8 FALSE -// #define GDISP_NEED_IMAGE_BMP_8_RLE FALSE -// #define GDISP_NEED_IMAGE_BMP_16 FALSE -// #define GDISP_NEED_IMAGE_BMP_24 FALSE -// #define GDISP_NEED_IMAGE_BMP_32 FALSE -// #define GDISP_NEED_IMAGE_JPG FALSE -// #define GDISP_NEED_IMAGE_PNG FALSE -// #define GDISP_NEED_IMAGE_ACCOUNTING FALSE -#ifdef EMULATOR -#define GDISP_NEED_PIXMAP TRUE -#endif -// #define GDISP_NEED_PIXMAP_IMAGE FALSE - -//#define GDISP_DEFAULT_ORIENTATION GDISP_ROTATE_LANDSCAPE // If not defined the native hardware orientation is used. -//#define GDISP_LINEBUF_SIZE 128 -//#define GDISP_STARTUP_COLOR Black -#define GDISP_NEED_STARTUP_LOGO FALSE - -//#define GDISP_TOTAL_DISPLAYS 2 - -#ifndef EMULATOR -#define GDISP_DRIVER_LIST GDISPVMT_IS31FL3731C_WHITEFOX -#endif - - #ifdef GDISP_DRIVER_LIST - // For code and speed optimization define as TRUE or FALSE if all controllers have the same capability - #define GDISP_HARDWARE_STREAM_WRITE FALSE - #define GDISP_HARDWARE_STREAM_READ FALSE - #define GDISP_HARDWARE_STREAM_POS FALSE - #define GDISP_HARDWARE_DRAWPIXEL TRUE - #define GDISP_HARDWARE_CLEARS FALSE - #define GDISP_HARDWARE_FILLS FALSE - //#define GDISP_HARDWARE_BITFILLS FALSE - #define GDISP_HARDWARE_SCROLL FALSE - #define GDISP_HARDWARE_PIXELREAD TRUE - #define GDISP_HARDWARE_CONTROL TRUE - #define GDISP_HARDWARE_QUERY FALSE - #define GDISP_HARDWARE_CLIP FALSE - - #define GDISP_PIXELFORMAT GDISP_PIXELFORMAT_RGB888 - #endif - -// The custom format is not defined for some reason, so define it as error -// so we don't get compiler warnings -#define GDISP_PIXELFORMAT_CUSTOM GDISP_PIXELFORMAT_ERROR - -#define GDISP_USE_GFXNET FALSE -// #define GDISP_GFXNET_PORT 13001 -// #define GDISP_GFXNET_CUSTOM_LWIP_STARTUP FALSE -// #define GDISP_DONT_WAIT_FOR_NET_DISPLAY FALSE -// #define GDISP_GFXNET_UNSAFE_SOCKETS FALSE - - -/////////////////////////////////////////////////////////////////////////// -// GWIN // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GWIN FALSE - -//#define GWIN_NEED_WINDOWMANAGER FALSE -// #define GWIN_REDRAW_IMMEDIATE FALSE -// #define GWIN_REDRAW_SINGLEOP FALSE -// #define GWIN_NEED_FLASHING FALSE -// #define GWIN_FLASHING_PERIOD 250 - -//#define GWIN_NEED_CONSOLE FALSE -// #define GWIN_CONSOLE_USE_HISTORY FALSE -// #define GWIN_CONSOLE_HISTORY_AVERAGING FALSE -// #define GWIN_CONSOLE_HISTORY_ATCREATE FALSE -// #define GWIN_CONSOLE_ESCSEQ FALSE -// #define GWIN_CONSOLE_USE_BASESTREAM FALSE -// #define GWIN_CONSOLE_USE_FLOAT FALSE -//#define GWIN_NEED_GRAPH FALSE -//#define GWIN_NEED_GL3D FALSE - -//#define GWIN_NEED_WIDGET FALSE -//#define GWIN_FOCUS_HIGHLIGHT_WIDTH 1 -// #define GWIN_NEED_LABEL FALSE -// #define GWIN_LABEL_ATTRIBUTE FALSE -// #define GWIN_NEED_BUTTON FALSE -// #define GWIN_BUTTON_LAZY_RELEASE FALSE -// #define GWIN_NEED_SLIDER FALSE -// #define GWIN_SLIDER_NOSNAP FALSE -// #define GWIN_SLIDER_DEAD_BAND 5 -// #define GWIN_SLIDER_TOGGLE_INC 20 -// #define GWIN_NEED_CHECKBOX FALSE -// #define GWIN_NEED_IMAGE FALSE -// #define GWIN_NEED_IMAGE_ANIMATION FALSE -// #define GWIN_NEED_RADIO FALSE -// #define GWIN_NEED_LIST FALSE -// #define GWIN_NEED_LIST_IMAGES FALSE -// #define GWIN_NEED_PROGRESSBAR FALSE -// #define GWIN_PROGRESSBAR_AUTO FALSE -// #define GWIN_NEED_KEYBOARD FALSE -// #define GWIN_KEYBOARD_DEFAULT_LAYOUT VirtualKeyboard_English1 -// #define GWIN_NEED_KEYBOARD_ENGLISH1 TRUE -// #define GWIN_NEED_TEXTEDIT FALSE -// #define GWIN_FLAT_STYLING FALSE -// #define GWIN_WIDGET_TAGS FALSE - -//#define GWIN_NEED_CONTAINERS FALSE -// #define GWIN_NEED_CONTAINER FALSE -// #define GWIN_NEED_FRAME FALSE -// #define GWIN_NEED_TABSET FALSE -// #define GWIN_TABSET_TABHEIGHT 18 - - -/////////////////////////////////////////////////////////////////////////// -// GEVENT // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GEVENT TRUE - -//#define GEVENT_ASSERT_NO_RESOURCE FALSE -//#define GEVENT_MAXIMUM_SIZE 32 -//#define GEVENT_MAX_SOURCE_LISTENERS 32 - - -/////////////////////////////////////////////////////////////////////////// -// GTIMER // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GTIMER FALSE - -//#define GTIMER_THREAD_PRIORITY HIGH_PRIORITY -//#define GTIMER_THREAD_WORKAREA_SIZE 2048 - - -/////////////////////////////////////////////////////////////////////////// -// GQUEUE // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GQUEUE FALSE - -//#define GQUEUE_NEED_ASYNC FALSE -//#define GQUEUE_NEED_GSYNC FALSE -//#define GQUEUE_NEED_FSYNC FALSE -//#define GQUEUE_NEED_BUFFERS FALSE - -/////////////////////////////////////////////////////////////////////////// -// GINPUT // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GINPUT FALSE - -//#define GINPUT_NEED_MOUSE FALSE -// #define GINPUT_TOUCH_STARTRAW FALSE -// #define GINPUT_TOUCH_NOTOUCH FALSE -// #define GINPUT_TOUCH_NOCALIBRATE FALSE -// #define GINPUT_TOUCH_NOCALIBRATE_GUI FALSE -// #define GINPUT_MOUSE_POLL_PERIOD 25 -// #define GINPUT_MOUSE_CLICK_TIME 300 -// #define GINPUT_TOUCH_CXTCLICK_TIME 700 -// #define GINPUT_TOUCH_USER_CALIBRATION_LOAD FALSE -// #define GINPUT_TOUCH_USER_CALIBRATION_SAVE FALSE -// #define GMOUSE_DRIVER_LIST GMOUSEVMT_Win32, GMOUSEVMT_Win32 -//#define GINPUT_NEED_KEYBOARD FALSE -// #define GINPUT_KEYBOARD_POLL_PERIOD 200 -// #define GKEYBOARD_DRIVER_LIST GKEYBOARDVMT_Win32, GKEYBOARDVMT_Win32 -// #define GKEYBOARD_LAYOUT_OFF FALSE -// #define GKEYBOARD_LAYOUT_SCANCODE2_US FALSE -//#define GINPUT_NEED_TOGGLE FALSE -//#define GINPUT_NEED_DIAL FALSE - - -/////////////////////////////////////////////////////////////////////////// -// GFILE // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GFILE FALSE - -//#define GFILE_NEED_PRINTG FALSE -//#define GFILE_NEED_SCANG FALSE -//#define GFILE_NEED_STRINGS FALSE -//#define GFILE_NEED_FILELISTS FALSE -//#define GFILE_NEED_STDIO FALSE -//#define GFILE_NEED_NOAUTOMOUNT FALSE -//#define GFILE_NEED_NOAUTOSYNC FALSE - -//#define GFILE_NEED_MEMFS FALSE -//#define GFILE_NEED_ROMFS FALSE -//#define GFILE_NEED_RAMFS FALSE -//#define GFILE_NEED_FATFS FALSE -//#define GFILE_NEED_NATIVEFS FALSE -//#define GFILE_NEED_CHBIOSFS FALSE - -//#define GFILE_ALLOW_FLOATS FALSE -//#define GFILE_ALLOW_DEVICESPECIFIC FALSE -//#define GFILE_MAX_GFILES 3 - -/////////////////////////////////////////////////////////////////////////// -// GADC // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GADC FALSE - -//#define GADC_MAX_LOWSPEED_DEVICES 4 - - -/////////////////////////////////////////////////////////////////////////// -// GAUDIO // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GAUDIO FALSE -// There seems to be a bug in the ugfx code, the wrong define is used -// So define it in order to avoid warnings -#define GFX_USE_GAUDIN GFX_USE_GAUDIO -// #define GAUDIO_NEED_PLAY FALSE -// #define GAUDIO_NEED_RECORD FALSE - - -/////////////////////////////////////////////////////////////////////////// -// GMISC // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GMISC TRUE - -//#define GMISC_NEED_ARRAYOPS FALSE -//#define GMISC_NEED_FASTTRIG FALSE -//#define GMISC_NEED_FIXEDTRIG FALSE -//#define GMISC_NEED_INVSQRT FALSE -// #define GMISC_INVSQRT_MIXED_ENDIAN FALSE -// #define GMISC_INVSQRT_REAL_SLOW FALSE -#define GMISC_NEED_MATRIXFLOAT2D TRUE -#define GMISC_NEED_MATRIXFIXED2D FALSE +#include "common_gfxconf.h" #endif /* _GFXCONF_H */ diff --git a/keyboards/whitefox/readme.md b/keyboards/whitefox/readme.md index 0714ad5639..2f1445d33d 100644 --- a/keyboards/whitefox/readme.md +++ b/keyboards/whitefox/readme.md @@ -1,7 +1,14 @@ -WhiteFox keyboard firmware -====================== +WhiteFox +======== -This is an experimental port which came from the original TMK WhiteFox repo. +A compact 65% keyboard. -The LED controller was not ported, as the original was a dirty hack and it would -be good to have complete support. +Keyboard Maintainer: QMK Community +Hardware Supported: Whitefox PCB +Hardware Availability: https://input.club/whitefox/ + +Make example for this keyboard (after setting up your build environment): + + make whitefox-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/whitefox/rules.mk b/keyboards/whitefox/rules.mk index fb34dbb9a4..32273e08aa 100644 --- a/keyboards/whitefox/rules.mk +++ b/keyboards/whitefox/rules.mk @@ -1,7 +1,6 @@ # project specific files SRC = matrix.c \ - led.c \ - animations.c + led.c ## chip/board settings # - the next two should match the directories in @@ -70,4 +69,6 @@ CUSTOM_MATRIX = yes # Custom matrix file BACKLIGHT_ENABLE = yes VISUALIZER_ENABLE = yes -include $(KEYBOARD_PATH)/drivers/gdisp/IS31FL3731C/driver.mk +LED_DRIVER = is31fl3731c +LED_WIDTH = 16 +LED_HEIGHT = 5 \ No newline at end of file diff --git a/keyboards/whitefox/visualizer.c b/keyboards/whitefox/visualizer.c index 167e0ec4de..e5bafcbe95 100644 --- a/keyboards/whitefox/visualizer.c +++ b/keyboards/whitefox/visualizer.c @@ -20,7 +20,7 @@ #include "visualizer.h" #include "visualizer_keyframes.h" #include "led.h" -#include "animations.h" +#include "default_animations.h" static bool initial_update = true; diff --git a/keyboards/xd60/readme.md b/keyboards/xd60/readme.md index 1e8e52caa1..d7aa3d9b9e 100644 --- a/keyboards/xd60/readme.md +++ b/keyboards/xd60/readme.md @@ -1,17 +1,16 @@ -# QMK Firmware for XIUDI's 60% XD60 PCB +XD60 +== + +Compact 60% with arrows. ![Top View of a pair of XD60 Keyboard](https://i.imgur.com/3Jq2743.jpg) -## Quantum MK Firmware -For the full Quantum feature list, see [the parent readme.md](/readme.md). +Keyboard Maintainer: QMK Community +Hardware Supported: XD60 PCB +Hardware Availability: https://www.massdrop.com/buy/xd60-xd64-custom-mechanical-keyboard-kit?mode=guest_open -## Additional Notes -The XD60 is essentially a GH60 rev. C, with support for a right-hand arrow cluster. Includes full compatibility with GH60 expansion boards. Board also supports in-switch LEDs (two-pin, single colour), as well as WS2182 LED strips for underglow lighting. Default keymap included, matching configuration on sale page. +Make example for this keyboard (after setting up your build environment): -Version 2 PCBs include 6 soldered on RGB underglow LEDs on the bottom, and are labelled "XD60v2" on the top. They are otherwise identical to v1 PCBs. + make xd60-default -## Known Issues -In-switch backlight LEDs seem to only support 1 brightness level. - -## Build -To build the default keymap, simply run `make xd60-default`. +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/xd75/Makefile b/keyboards/xd75/Makefile new file mode 100644 index 0000000000..840dc9a286 --- /dev/null +++ b/keyboards/xd75/Makefile @@ -0,0 +1,18 @@ +# Copyright 2013 Jun Wako +# +# 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 . + +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/xd75/config.h b/keyboards/xd75/config.h new file mode 100644 index 0000000000..3764cfba4b --- /dev/null +++ b/keyboards/xd75/config.h @@ -0,0 +1,193 @@ +/* +Copyright 2017 REPLACE_WITH_YOUR_NAME + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCDCD +#define PRODUCT_ID 0x7575 +#define DEVICE_VER 0x0001 +#define MANUFACTURER xiudi +#define PRODUCT XD75 +#define DESCRIPTION XD75Re 15x5 ortholinear 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 { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3, B0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN F5 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* + * 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 */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* 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_HELP1 H +//#define MAGIC_KEY_HELP2 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_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#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 PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#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 +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +// ws2812 options +#define RGB_DI_PIN F6 // pin the DI on the ws2812 is hooked-up to +#define RGBLIGHT_ANIMATIONS // run RGB animations +#define RGBLED_NUM 6 // number of LEDs +#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue +#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation +#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness) + +/* + * 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 + +#endif diff --git a/keyboards/xd75/keymaps/default/Makefile b/keyboards/xd75/keymaps/default/Makefile new file mode 100644 index 0000000000..6e8941fdfd --- /dev/null +++ b/keyboards/xd75/keymaps/default/Makefile @@ -0,0 +1,37 @@ +# Copyright 2013 Jun Wako +# +# 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 . + + +# QMK 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 = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # 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 support (+2400 to 4200, depending on config) +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 this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/xd75/keymaps/default/config.h b/keyboards/xd75/keymaps/default/config.h new file mode 100644 index 0000000000..f52a97bbc8 --- /dev/null +++ b/keyboards/xd75/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 REPLACE_WITH_YOUR_NAME + * + * 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 . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/xd75/keymaps/default/keymap.c b/keyboards/xd75/keymaps/default/keymap.c new file mode 100644 index 0000000000..82ea1f2be8 --- /dev/null +++ b/keyboards/xd75/keymaps/default/keymap.c @@ -0,0 +1,186 @@ +/* Copyright 2017 REPLACE_WITH_YOUR_NAME + * + * 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 . + */ +#include "xd75.h" + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define ___T___ KC_TRNS +#define XXXXXXX KC_NO + +// Layer shorthand +#define _QW 0 +#define _CM 1 +#define _DV 2 +#define _LW 3 +#define _RS 4 +#define _FN 5 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY - MIT ENHANCED / GRID COMPATIBLE + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | ESC | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_QW] = { /* QWERTY */ + { 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_BSPC }, + { 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_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_ENT, KC_PGUP }, + { 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_RSFT, KC_UP, KC_PGDN }, + { M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT }, + }, + +/* COLEMAK - MIT ENHANCED / GRID COMPATIBLE + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | \ | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | ESC | A | R | S | T | D | H | N | E | I | O | ' | XXXXXX . ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | LSHIFT | Z | X | C | V | B | K | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_CM] = { /* COLEMAK */ + { 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_BSPC }, + { KC_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, KC_DEL }, + { KC_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_ENT, KC_PGUP }, + { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, + { M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT }, + }, + +/* DVORAK - MIT ENHANCED / GRID COMPATIBLE + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | ' | , | . | P | Y | F | G | C | R | L | [ | ] | \ | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | ESC | A | O | E | U | I | D | H | T | N | S | / | XXXXXX . ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | LSHIFT | ; | Q | J | K | X | B | M | W | V | Z | XXXXXX . RSHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_DV] = { /* DVORAK */ + { 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_BSPC }, + { KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, + { KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, KC_ENT, KC_ENT, KC_PGUP }, + { KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, + { M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_RS), KC_SPC, KC_SPC, MO(_LW), KC_RGUI, KC_RALT, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT }, + }, + +/* LOWERED + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | | INS | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | XXXXXX . | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | XXXXXX . | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_LW] = { /* LOWERED */ + { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, + { _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, KC_INS }, + { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, ___T___, ___T___, _______ }, + { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, ___T___, ___T___, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + }, + +/* RAISED + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | INS | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | XXXXXX . | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | XXXXXX . | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_RS] = { /* RAISED */ + { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, + { _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, KC_INS }, + { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, ___T___, ___T___, _______ }, + { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, ___T___, ___T___, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + }, + +/* FUNCTION + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | NUM LK | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX . | WHEEL+ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | RGB TG | RGB MD | RGB HI | RGB HD | RGB SI | RGB SD | RGB VI | RGB VD | BL TOG | BL INC | BL DEC | XXXXXX . | MOUS U | WHEEL- | + * |--------+--------+--------+--------+--------+-- 2u -----------+--------+--------+--------+--------+-----------------+--------+--------| + * | RESET | | QWERTY | COLEMK | DVORAK | XXXXXX . MS BT1 | | | | | | MOUS L | MOUS D | MOUS R | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_FN] = { /* FUNCTION */ + { KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, + { KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR }, + { KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U }, + { RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_TOGG, BL_INC, BL_DEC, ___T___, ___T___, KC_MS_U, KC_WH_D }, + { RESET , _______, DF(_QW), DF(_CM), DF(_DV), KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }, + }, +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/xd75/keymaps/default/readme.md b/keyboards/xd75/keymaps/default/readme.md new file mode 100644 index 0000000000..d53c0f34a8 --- /dev/null +++ b/keyboards/xd75/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for xd75 diff --git a/keyboards/xd75/keymaps/fabian/Makefile b/keyboards/xd75/keymaps/fabian/Makefile new file mode 100644 index 0000000000..6e8941fdfd --- /dev/null +++ b/keyboards/xd75/keymaps/fabian/Makefile @@ -0,0 +1,37 @@ +# Copyright 2013 Jun Wako +# +# 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 . + + +# QMK 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 = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # 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 support (+2400 to 4200, depending on config) +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 this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/xd75/keymaps/fabian/config.h b/keyboards/xd75/keymaps/fabian/config.h new file mode 100644 index 0000000000..f52a97bbc8 --- /dev/null +++ b/keyboards/xd75/keymaps/fabian/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 REPLACE_WITH_YOUR_NAME + * + * 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 . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/xd75/keymaps/fabian/keymap.c b/keyboards/xd75/keymaps/fabian/keymap.c new file mode 100644 index 0000000000..f6cc95ba28 --- /dev/null +++ b/keyboards/xd75/keymaps/fabian/keymap.c @@ -0,0 +1,237 @@ +#include "xd75.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// 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. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Custom +#define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define SFT_BSP SFT_T(KC_BSPC) // Tap for Backspace, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +// #define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,--------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | | | | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | | | | Bksp |Raise | GUI |AltGr | Ctrl |Adjust| + * `--------------------------------------------------------------------------------------------------------' + */ +[_QWERTY] = { + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, _______, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, + { CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, _______, _______, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT }, + { SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT }, + { ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, _______, _______, _______, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, ADJUST }, +}, + +/* Colemak + * ,--------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | | | | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | | | | H | N | E | I | O | " | + * |------+------+------+------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | | | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | | | | Bksp |Raise | GUI |AltGr | Ctrl |Adjust| + * `--------------------------------------------------------------------------------------------------------' + */ +[_COLEMAK] = { + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC }, + { CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, _______, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT }, + { SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, _______, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT }, + { ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, _______, _______, _______, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, ADJUST }, +}, + +/* Dvorak + * ,--------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | | | | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | Esc | A | O | E | U | I | | | | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | | | | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | | | | Bksp |Raise | GUI |AltGr | Ctrl |Adjust| + * `--------------------------------------------------------------------------------------------------------' + */ +[_DVORAK] = { + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, _______, _______, _______, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC }, + { CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, _______, _______, _______, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH }, + { SFT_BSP, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, _______, _______, _______, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT }, + { ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, _______, _______, _______, SFT_BSP, RAISE, KC_RGUI, KC_RALT, KC_RCTL, ADJUST }, +}, + +/* Lower + * ,--------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | | | | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | | | F12 | MS L | MS D |MS U | MS R |MS Btn| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `--------------------------------------------------------------------------------------------------------' + */ +[_LOWER] = { + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC }, + { KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE }, + { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, KC_F12, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1 }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY }, +}, + +/* Raise + * ,--------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | | | | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | | | F12 | Left | Down | Up | Rght |MS_BN2| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `--------------------------------------------------------------------------------------------------------' + */ +[_RAISE] = { + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC }, + { KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS }, + { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, KC_F12, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BTN2 }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY }, +}, + +/* Adjust (Lower + Raise) + * ,--------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | |Reset | |Aud on|Audoff|AGnorm| | | |AGswap|Qwerty|Colemk|Dvorak|Reset | Del | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * `--------------------------------------------------------------------------------------------------------' + */ +[_ADJUST] = { + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, RESET, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, DVORAK, RESET, KC_DEL }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, +}, +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/xd75/readme.md b/keyboards/xd75/readme.md new file mode 100644 index 0000000000..0bc82be91e --- /dev/null +++ b/keyboards/xd75/readme.md @@ -0,0 +1,30 @@ +xd75 keyboard firmware +====================== + +The XD75Re is a 15x5 full-grid ortholinear keyboard manufactured by XIUDI. This port of the QMK firmware is my first shot at using QMK, so if you see any features done wrong (or just plain missing), feel free to fix them and put in a pull request! + +## Quantum MK Firmware + +For more info on this firmware (and how to make it your own), head over to [qmk.fm](http://qmk.fm). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/xd75 folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default + +To build with the default keymap, simply run `make default`. + +### Other Keymaps + +The "default" keymap included is basically the OLKB Atomic keymap with a few buttons added for RGB underglow control. This should be usable as a starting point, but most people will be best served creating their own keymap and flashing it - more info on creating your own keymap is available in [the official QMK documentation](https://docs.qmk.fm). + +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + +``` +$ make [default|jack|] +``` + +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/xd75/rules.mk b/keyboards/xd75/rules.mk new file mode 100644 index 0000000000..f6d8978301 --- /dev/null +++ b/keyboards/xd75/rules.mk @@ -0,0 +1,68 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4996 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +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 on B7 by default +MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 +FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches diff --git a/keyboards/xd75/xd75.c b/keyboards/xd75/xd75.c new file mode 100644 index 0000000000..3d635f3c10 --- /dev/null +++ b/keyboards/xd75/xd75.c @@ -0,0 +1,43 @@ +/* Copyright 2017 REPLACE_WITH_YOUR_NAME + * + * 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 . + */ +#include "xd75.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +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); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/xd75/xd75.h b/keyboards/xd75/xd75.h new file mode 100644 index 0000000000..22bc2ecc0c --- /dev/null +++ b/keyboards/xd75/xd75.h @@ -0,0 +1,39 @@ +/* Copyright 2017 REPLACE_WITH_YOUR_NAME + * + * 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 . + */ +#ifndef XD75_H +#define XD75_H + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is an example using the Planck MIT layout +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define KEYMAP( \ + 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, K2C, K2D, K2E,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E,\ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E \ +) { \ + { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E }, \ + { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E }, \ + { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E }, \ + { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E }, \ + { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E } \ +} + +#endif diff --git a/quantum/visualizer/lcd_backlight_keyframes.h b/lcd_backlight_keyframes.h similarity index 74% rename from quantum/visualizer/lcd_backlight_keyframes.h rename to lcd_backlight_keyframes.h index e1c125cf91..bde118449b 100644 --- a/quantum/visualizer/lcd_backlight_keyframes.h +++ b/lcd_backlight_keyframes.h @@ -20,11 +20,11 @@ #include "visualizer.h" // Animates the LCD backlight color between the current color and the target color (of the state) -bool backlight_keyframe_animate_color(keyframe_animation_t* animation, visualizer_state_t* state); +bool lcd_backlight_keyframe_animate_color(keyframe_animation_t* animation, visualizer_state_t* state); // Sets the backlight color to the target color -bool backlight_keyframe_set_color(keyframe_animation_t* animation, visualizer_state_t* state); +bool lcd_backlight_keyframe_set_color(keyframe_animation_t* animation, visualizer_state_t* state); -bool backlight_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state); -bool backlight_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state); +bool lcd_backlight_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state); +bool lcd_backlight_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state); #endif /* QUANTUM_VISUALIZER_LCD_BACKLIGHT_KEYFRAMES_H_ */ diff --git a/lib/chibios b/lib/chibios index 8fce03b3a7..d34e8eb831 160000 --- a/lib/chibios +++ b/lib/chibios @@ -1 +1 @@ -Subproject commit 8fce03b3a75c743e5d5c40b9d59c1637c59d22a7 +Subproject commit d34e8eb83101a95f98892bf68605fe545821f320 diff --git a/lib/lufa/.gitattributes b/lib/lufa/.gitattributes new file mode 100644 index 0000000000..92dfc3c617 --- /dev/null +++ b/lib/lufa/.gitattributes @@ -0,0 +1,94 @@ +# auto for anything unspecified +* text=auto + +# sources +*.c text +*.cc text +*.cxx text +*.cpp text +*.c++ text +*.hpp text +*.h text +*.h++ text +*.hh text +*.bat text +*.coffee text +*.css text +*.htm text +*.html text +*.inc text +*.ini text +*.js text +*.jsx text +*.json text +*.less text +*.php text +*.pl text +*.py text +*.rb text +*.sass text +*.scm text +*.scss text +*.sh text +*.sql text +*.styl text +*.ts text +*.xml text +*.xhtml text + +# make files (need to always use lf for compatibility with Windows 10 bash) +Makefile eol=lf +*.mk eol=lf + +# make files (need to always use lf for compatibility with Windows 10 bash) +*.sh eol=lf + +# documentation +*.markdown text +*.md text +*.mdwn text +*.mdown text +*.mkd text +*.mkdn text +*.mdtxt text +*.mdtext text +*.txt text +AUTHORS text +CHANGELOG text +CHANGES text +CONTRIBUTING text +COPYING text +INSTALL text +license text +LICENSE text +NEWS text +readme text +*README* text +TODO text + +GRAPHICS +*.ai binary +*.bmp binary +*.eps binary +*.gif binary +*.ico binary +*.jng binary +*.jp2 binary +*.jpg binary +*.jpeg binary +*.jpx binary +*.jxr binary +*.pdf binary +*.png binary +*.psb binary +*.psd binary +*.svg text +*.svgz binary +*.tif binary +*.tiff binary +*.wbmp binary +*.webp binary + +# hex files +*.hex binary +*.eep binary diff --git a/tmk_core/protocol/lufa/LUFA-git/.gitignore b/lib/lufa/.gitignore similarity index 78% rename from tmk_core/protocol/lufa/LUFA-git/.gitignore rename to lib/lufa/.gitignore index 045f969808..9f9d39491d 100644 --- a/tmk_core/protocol/lufa/LUFA-git/.gitignore +++ b/lib/lufa/.gitignore @@ -12,3 +12,4 @@ Documentation/ LUFA/StudioIntegration/ProjectGenerator/* LUFA/StudioIntegration/DocBook/* +!LUFA/StudioIntegration/Docbook/mshelp/* diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/BootloaderAPI.c b/lib/lufa/Bootloaders/CDC/BootloaderAPI.c similarity index 95% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/BootloaderAPI.c rename to lib/lufa/Bootloaders/CDC/BootloaderAPI.c index f7564e9827..2be1568082 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/BootloaderAPI.c +++ b/lib/lufa/Bootloaders/CDC/BootloaderAPI.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/BootloaderAPI.h b/lib/lufa/Bootloaders/CDC/BootloaderAPI.h similarity index 94% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/BootloaderAPI.h rename to lib/lufa/Bootloaders/CDC/BootloaderAPI.h index 2462cacdd0..5169bbc3c4 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/BootloaderAPI.h +++ b/lib/lufa/Bootloaders/CDC/BootloaderAPI.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/BootloaderAPITable.S b/lib/lufa/Bootloaders/CDC/BootloaderAPITable.S similarity index 96% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/BootloaderAPITable.S rename to lib/lufa/Bootloaders/CDC/BootloaderAPITable.S index 69ebd387a9..2c60f84e8d 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/BootloaderAPITable.S +++ b/lib/lufa/Bootloaders/CDC/BootloaderAPITable.S @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/BootloaderCDC.c b/lib/lufa/Bootloaders/CDC/BootloaderCDC.c similarity index 92% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/BootloaderCDC.c rename to lib/lufa/Bootloaders/CDC/BootloaderCDC.c index 58bb338927..aa17bc15bd 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/BootloaderCDC.c +++ b/lib/lufa/Bootloaders/CDC/BootloaderCDC.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -72,7 +72,17 @@ void Application_Jump_Check(void) { bool JumpToApplication = false; - #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1)) + #if (BOARD == BOARD_LEONARDO) + /* Enable pull-up on the IO13 pin so we can use it to select the mode */ + PORTC |= (1 << 7); + Delay_MS(10); + + /* If IO13 is not jumpered to ground, start the user application instead */ + JumpToApplication = ((PINC & (1 << 7)) != 0); + + /* Disable pull-up after the check has completed */ + PORTC &= ~(1 << 7); + #elif ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1)) /* Disable JTAG debugging */ JTAG_DISABLE(); @@ -81,21 +91,41 @@ void Application_Jump_Check(void) Delay_MS(10); /* If the TCK pin is not jumpered to ground, start the user application instead */ - JumpToApplication |= ((PINF & (1 << 4)) != 0); + JumpToApplication = ((PINF & (1 << 4)) != 0); /* Re-enable JTAG debugging */ JTAG_ENABLE(); + #else + /* Check if the device's BOOTRST fuse is set */ + if (boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS) & FUSE_BOOTRST) + { + /* If the reset source was not an external reset or the key is correct, clear it and jump to the application */ + if (!(MCUSR & (1 << EXTRF)) || (MagicBootKey == MAGIC_BOOT_KEY)) + JumpToApplication = true; + + /* Clear reset source */ + MCUSR &= ~(1 << EXTRF); + } + else + { + /* If the reset source was the bootloader and the key is correct, clear it and jump to the application; + * this can happen in the HWBE fuse is set, and the HBE pin is low during the watchdog reset */ + if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY)) + JumpToApplication = true; + + /* Clear reset source */ + MCUSR &= ~(1 << WDRF); + } #endif - /* If the reset source was the bootloader and the key is correct, clear it and jump to the application */ - if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY)) - JumpToApplication |= true; + /* Don't run the user application if the reset vector is blank (no app loaded) */ + bool ApplicationValid = (pgm_read_word_near(0) != 0xFFFF); /* If a request has been made to jump to the user application, honor it */ - if (JumpToApplication) + if (JumpToApplication && ApplicationValid) { /* Turn off the watchdog */ - MCUSR &= ~(1<If the device's BOOTRST fuse is set, the bootloader will run any time the system is reset from + * the external reset pin, unless no valid user application has been loaded. To initiate the bootloader, the + * device's external reset pin should be grounded momentarily. + * + * If the device's BOOTRST fuse is not set, the bootloader will run only if initiated via a software + * jump, or if the \c HWB pin was low during the last device reset (if the \c HWBE fuse is set). * * For board specific exceptions to the above, see below. * @@ -196,12 +204,6 @@ * access. * See here for resolution steps. * - * \par After loading an application, it is not run automatically on startup. - * Some USB AVR boards ship with the BOOTRST fuse set, causing the bootloader - * to run automatically when the device is reset. In most cases, the BOOTRST - * fuse should be disabled and the HWBE fuse used instead to run the bootloader - * when needed. - * * \section Sec_Options Project Options * * The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value. diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/Config/AppConfig.h b/lib/lufa/Bootloaders/CDC/Config/AppConfig.h similarity index 94% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/Config/AppConfig.h rename to lib/lufa/Bootloaders/CDC/Config/AppConfig.h index bbb5cb227e..22972b72fe 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/Config/AppConfig.h +++ b/lib/lufa/Bootloaders/CDC/Config/AppConfig.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/Config/LUFAConfig.h b/lib/lufa/Bootloaders/CDC/Config/LUFAConfig.h similarity index 96% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/Config/LUFAConfig.h rename to lib/lufa/Bootloaders/CDC/Config/LUFAConfig.h index af2dd3060e..5aa0e765bf 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/Config/LUFAConfig.h +++ b/lib/lufa/Bootloaders/CDC/Config/LUFAConfig.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/Descriptors.c b/lib/lufa/Bootloaders/CDC/Descriptors.c similarity index 98% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/Descriptors.c rename to lib/lufa/Bootloaders/CDC/Descriptors.c index 2ff6b503ba..6276570373 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/Descriptors.c +++ b/lib/lufa/Bootloaders/CDC/Descriptors.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -199,7 +199,7 @@ const USB_Descriptor_String_t ProductString = USB_STRING_DESCRIPTOR(L"LUFA CDC") * USB host. */ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, - const uint8_t wIndex, + const uint16_t wIndex, const void** const DescriptorAddress) { const uint8_t DescriptorType = (wValue >> 8); diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/Descriptors.h b/lib/lufa/Bootloaders/CDC/Descriptors.h similarity index 96% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/Descriptors.h rename to lib/lufa/Bootloaders/CDC/Descriptors.h index ef04379179..a6fbf5262b 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/Descriptors.h +++ b/lib/lufa/Bootloaders/CDC/Descriptors.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -84,7 +84,7 @@ #define AVR_SIGNATURE_3 0x89 #elif defined(__AVR_AT90USB82__) #define AVR_SIGNATURE_1 0x1E - #define AVR_SIGNATURE_2 0x94 + #define AVR_SIGNATURE_2 0x93 #define AVR_SIGNATURE_3 0x82 #else #error The selected AVR part is not currently supported by this bootloader. @@ -150,7 +150,7 @@ /* Function Prototypes: */ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, - const uint8_t wIndex, + const uint16_t wIndex, const void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/LUFA CDC Bootloader.inf b/lib/lufa/Bootloaders/CDC/LUFA CDC Bootloader.inf similarity index 100% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/LUFA CDC Bootloader.inf rename to lib/lufa/Bootloaders/CDC/LUFA CDC Bootloader.inf diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/asf.xml b/lib/lufa/Bootloaders/CDC/asf.xml similarity index 100% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/asf.xml rename to lib/lufa/Bootloaders/CDC/asf.xml diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/doxyfile b/lib/lufa/Bootloaders/CDC/doxyfile similarity index 92% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/doxyfile rename to lib/lufa/Bootloaders/CDC/doxyfile index 2dfb2a08a6..414693479f 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/doxyfile +++ b/lib/lufa/Bootloaders/CDC/doxyfile @@ -1,4 +1,4 @@ -# Doxyfile 1.8.8 +# Doxyfile 1.8.9 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -46,10 +46,10 @@ PROJECT_NUMBER = PROJECT_BRIEF = -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. PROJECT_LOGO = @@ -60,7 +60,7 @@ PROJECT_LOGO = OUTPUT_DIRECTORY = ./Documentation/ -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where @@ -93,14 +93,14 @@ ALLOW_UNICODE_NAMES = NO OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the @@ -145,7 +145,7 @@ ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. @@ -215,9 +215,9 @@ MULTILINE_CPP_IS_BRIEF = NO INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the documentation of a member will be -# part of the file/class/namespace that contains it. +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO @@ -286,7 +286,7 @@ OPTIMIZE_OUTPUT_VHDL = NO # instance to make doxygen treat .inc files as Fortran files (default is PHP), # and .f files as C (default is Fortran), use: inc=Fortran f=C. # -# Note For files without extension you can use no_extension as a placeholder. +# Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. @@ -305,8 +305,8 @@ MARKDOWN_SUPPORT = NO # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES @@ -346,7 +346,7 @@ SIP_SUPPORT = NO IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first +# tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. @@ -411,7 +411,7 @@ LOOKUP_CACHE_SIZE = 0 # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. @@ -421,35 +421,35 @@ LOOKUP_CACHE_SIZE = 0 EXTRACT_ALL = YES -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = YES -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = YES -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local methods, +# This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO only methods in the interface are +# included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. @@ -474,21 +474,21 @@ HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set -# to NO these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO these declarations will be +# (class|struct|union) declarations. If set to NO, these declarations will be # included in the documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO these +# documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. @@ -502,7 +502,7 @@ HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also +# names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. @@ -511,12 +511,19 @@ INTERNAL_DOCS = NO CASE_SENSE_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES the +# their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. @@ -544,14 +551,14 @@ INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. +# name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. Note that +# name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. @@ -596,27 +603,25 @@ SORT_BY_SCOPE_NAME = NO STRICT_PROTO_MATCHING = NO -# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the -# todo list. This list is created by putting \todo commands in the -# documentation. +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = NO -# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the -# test list. This list is created by putting \test commands in the -# documentation. +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = NO -# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = NO -# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. @@ -641,8 +646,8 @@ ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES the list -# will mention the files that were used to generate the documentation. +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES @@ -706,7 +711,7 @@ CITE_BIB_FILES = QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. @@ -714,7 +719,7 @@ QUIET = YES WARNINGS = YES -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. @@ -731,8 +736,8 @@ WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return -# value. If set to NO doxygen will only warn about wrong or incomplete parameter -# documentation, but not about the absence of documentation. +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. # The default value is: NO. WARN_NO_PARAMDOC = YES @@ -883,7 +888,7 @@ INPUT_FILTER = FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for +# INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. @@ -943,7 +948,7 @@ REFERENCED_BY_RELATION = NO REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. @@ -990,7 +995,7 @@ USE_HTAGS = NO VERBATIM_HEADERS = NO -# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the # clang parser (see: http://clang.llvm.org/) for more accurate parsing at the # cost of reduced performance. This can be particularly helpful with template # rich C++ code for which doxygen's built-in parser lacks the necessary type @@ -1039,7 +1044,7 @@ IGNORE_PREFIX = # Configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES @@ -1105,10 +1110,10 @@ HTML_STYLESHEET = # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefor more robust against future updates. +# standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra stylesheet files is of importance (e.g. the last -# stylesheet in the list overrules the setting of the previous ones in the +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1125,7 +1130,7 @@ HTML_EXTRA_STYLESHEET = HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to +# will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # http://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 @@ -1253,28 +1258,28 @@ GENERATE_HTMLHELP = NO CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = -# The GENERATE_CHI flag controls if a separate .chi index file is generated ( -# YES) or that it should be included in the master .chm file ( NO). +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = -# The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. @@ -1388,7 +1393,7 @@ DISABLE_INDEX = YES # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has @@ -1416,7 +1421,7 @@ ENUM_VALUES_PER_LINE = 1 TREEVIEW_WIDTH = 250 -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1445,7 +1450,7 @@ FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. @@ -1531,7 +1536,7 @@ SERVER_BASED_SEARCH = NO # external search engine pointed to by the SEARCHENGINE_URL option to obtain the # search results. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). # @@ -1544,7 +1549,7 @@ EXTERNAL_SEARCH = NO # The SEARCHENGINE_URL should point to a search engine hosted by a web server # which will return the search results when EXTERNAL_SEARCH is enabled. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). See the section "External Indexing and # Searching" for details. @@ -1582,7 +1587,7 @@ EXTRA_SEARCH_MAPPINGS = # Configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output. +# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. # The default value is: YES. GENERATE_LATEX = NO @@ -1613,7 +1618,7 @@ LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX +# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1648,9 +1653,9 @@ EXTRA_PACKAGES = # Note: Only use a user-defined header if you know what you are doing! The # following commands have a special meaning inside the header: $title, # $datetime, $date, $doxygenversion, $projectname, $projectnumber, -# $projectbrief, $projectlogo. Doxygen will replace $title with the empy string, -# for the replacement values of the other commands the user is refered to -# HTML_HEADER. +# $projectbrief, $projectlogo. Doxygen will replace $title with the empty +# string, for the replacement values of the other commands the user is referred +# to HTML_HEADER. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_HEADER = @@ -1666,6 +1671,17 @@ LATEX_HEADER = LATEX_FOOTER = +# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# LaTeX style sheets that are included after the standard style sheets created +# by doxygen. Using this option one can overrule certain style aspects. Doxygen +# will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EXTRA_STYLESHEET = + # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the LATEX_OUTPUT output # directory. Note that the files will be copied as-is; there are no commands or @@ -1684,7 +1700,7 @@ LATEX_EXTRA_FILES = PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate -# the PDF file directly from the LaTeX files. Set this option to YES to get a +# the PDF file directly from the LaTeX files. Set this option to YES, to get a # higher quality PDF documentation. # The default value is: YES. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1729,7 +1745,7 @@ LATEX_BIB_STYLE = plain # Configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The +# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The # RTF output is optimized for Word 97 and may not look too pretty with other RTF # readers/editors. # The default value is: NO. @@ -1744,7 +1760,7 @@ GENERATE_RTF = NO RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF +# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1781,11 +1797,21 @@ RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = +# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code +# with syntax highlighting in the RTF output. +# +# Note that which sources are shown also depends on other settings such as +# SOURCE_BROWSER. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_SOURCE_CODE = NO + #--------------------------------------------------------------------------- # Configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for +# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for # classes and files. # The default value is: NO. @@ -1829,7 +1855,7 @@ MAN_LINKS = NO # Configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that +# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that # captures the structure of the code including all documentation. # The default value is: NO. @@ -1843,7 +1869,7 @@ GENERATE_XML = NO XML_OUTPUT = xml -# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program +# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program # listings (including syntax highlighting and cross-referencing information) to # the XML output. Note that enabling this will significantly increase the size # of the XML output. @@ -1856,7 +1882,7 @@ XML_PROGRAMLISTING = YES # Configuration options related to the DOCBOOK output #--------------------------------------------------------------------------- -# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files +# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files # that can be used to generate PDF. # The default value is: NO. @@ -1870,7 +1896,7 @@ GENERATE_DOCBOOK = NO DOCBOOK_OUTPUT = docbook -# If the DOCBOOK_PROGRAMLISTING tag is set to YES doxygen will include the +# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the # program listings (including syntax highlighting and cross-referencing # information) to the DOCBOOK output. Note that enabling this will significantly # increase the size of the DOCBOOK output. @@ -1883,10 +1909,10 @@ DOCBOOK_PROGRAMLISTING = NO # Configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen -# Definitions (see http://autogen.sf.net) file that captures the structure of -# the code including all documentation. Note that this feature is still -# experimental and incomplete at the moment. +# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an +# AutoGen Definitions (see http://autogen.sf.net) file that captures the +# structure of the code including all documentation. Note that this feature is +# still experimental and incomplete at the moment. # The default value is: NO. GENERATE_AUTOGEN_DEF = NO @@ -1895,7 +1921,7 @@ GENERATE_AUTOGEN_DEF = NO # Configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module +# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module # file that captures the structure of the code including all documentation. # # Note that this feature is still experimental and incomplete at the moment. @@ -1903,7 +1929,7 @@ GENERATE_AUTOGEN_DEF = NO GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary +# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary # Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI # output from the Perl module output. # The default value is: NO. @@ -1911,9 +1937,9 @@ GENERATE_PERLMOD = NO PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely +# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely # formatted so it can be parsed by a human reader. This is useful if you want to -# understand what is going on. On the other hand, if this tag is set to NO the +# understand what is going on. On the other hand, if this tag is set to NO, the # size of the Perl module output will be much smaller and Perl will parse it # just the same. # The default value is: YES. @@ -1933,14 +1959,14 @@ PERLMOD_MAKEVAR_PREFIX = # Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all +# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all # C-preprocessor directives found in the sources and include files. # The default value is: YES. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names -# in the source code. If set to NO only conditional compilation will be +# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names +# in the source code. If set to NO, only conditional compilation will be # performed. Macro expansion can be done in a controlled way by setting # EXPAND_ONLY_PREDEF to YES. # The default value is: NO. @@ -1956,7 +1982,7 @@ MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES -# If the SEARCH_INCLUDES tag is set to YES the includes files in the +# If the SEARCH_INCLUDES tag is set to YES, the include files in the # INCLUDE_PATH will be searched if a #include is found. # The default value is: YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. @@ -2034,20 +2060,21 @@ TAGFILES = GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external class will be listed in the -# class index. If set to NO only the inherited external classes will be listed. +# If the ALLEXTERNALS tag is set to YES, all external class will be listed in +# the class index. If set to NO, only the inherited external classes will be +# listed. # The default value is: NO. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in -# the modules index. If set to NO, only the current project's groups will be +# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will be # listed. # The default value is: YES. EXTERNAL_GROUPS = YES -# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in +# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in # the related pages index. If set to NO, only the current project's pages will # be listed. # The default value is: YES. @@ -2064,7 +2091,7 @@ PERL_PATH = /usr/bin/perl # Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram +# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram # (in HTML and LaTeX) for classes with base or super classes. Setting the tag to # NO turns the diagrams off. Note that this option also works with HAVE_DOT # disabled, but it is recommended to install and use dot, since it yields more @@ -2089,7 +2116,7 @@ MSCGEN_PATH = DIA_PATH = -# If set to YES, the inheritance and collaboration graphs will hide inheritance +# If set to YES the inheritance and collaboration graphs will hide inheritance # and usage relations if the target is undocumented or is not a class. # The default value is: YES. @@ -2162,7 +2189,7 @@ COLLABORATION_GRAPH = NO GROUP_GRAPHS = NO -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. # The default value is: NO. @@ -2300,10 +2327,14 @@ DIAFILE_DIRS = # PlantUML is not used or called during a preprocessing step. Doxygen will # generate a warning when it encounters a \startuml command in this case and # will not generate output for the diagram. -# This tag requires that the tag HAVE_DOT is set to YES. PLANTUML_JAR_PATH = +# When using plantuml, the specified paths are searched for files specified by +# the !include statement in a plantuml block. + +PLANTUML_INCLUDE_PATH = + # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # that will be shown in the graph. If the number of nodes in a graph becomes # larger than this value, doxygen will truncate the graph, which is visualized @@ -2340,7 +2371,7 @@ MAX_DOT_GRAPH_DEPTH = 2 DOT_TRANSPARENT = YES -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) support # this, this feature is disabled by default. @@ -2357,7 +2388,7 @@ DOT_MULTI_TARGETS = NO GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot +# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot # files that are used to generate the various graphs. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/makefile b/lib/lufa/Bootloaders/CDC/makefile similarity index 77% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/makefile rename to lib/lufa/Bootloaders/CDC/makefile index 161e64c08e..aa5a2117df 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/makefile +++ b/lib/lufa/Bootloaders/CDC/makefile @@ -1,6 +1,6 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2014. +# Copyright (C) Dean Camera, 2017. # # dean [at] fourwalledcubicle [dot] com # www.lufa-lib.org @@ -45,11 +45,18 @@ BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, .apitable_signatures, Boot # Default target all: -# Include LUFA build script makefiles -include $(LUFA_PATH)/Build/lufa_core.mk -include $(LUFA_PATH)/Build/lufa_sources.mk -include $(LUFA_PATH)/Build/lufa_build.mk -include $(LUFA_PATH)/Build/lufa_cppcheck.mk -include $(LUFA_PATH)/Build/lufa_doxygen.mk -include $(LUFA_PATH)/Build/lufa_avrdude.mk -include $(LUFA_PATH)/Build/lufa_atprogram.mk +# Include LUFA-specific DMBS extension modules +DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA +include $(DMBS_LUFA_PATH)/lufa-sources.mk +include $(DMBS_LUFA_PATH)/lufa-gcc.mk + +# Include common DMBS build system modules +DMBS_PATH ?= $(LUFA_PATH)/Build/DMBS/DMBS +include $(DMBS_PATH)/core.mk +include $(DMBS_PATH)/cppcheck.mk +include $(DMBS_PATH)/doxygen.mk +include $(DMBS_PATH)/dfu.mk +include $(DMBS_PATH)/gcc.mk +include $(DMBS_PATH)/hid.mk +include $(DMBS_PATH)/avrdude.mk +include $(DMBS_PATH)/atprogram.mk diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderAPI.c b/lib/lufa/Bootloaders/DFU/BootloaderAPI.c similarity index 95% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderAPI.c rename to lib/lufa/Bootloaders/DFU/BootloaderAPI.c index cad59c8ca2..491c506d0f 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderAPI.c +++ b/lib/lufa/Bootloaders/DFU/BootloaderAPI.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/BootloaderAPI.h b/lib/lufa/Bootloaders/DFU/BootloaderAPI.h similarity index 94% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/BootloaderAPI.h rename to lib/lufa/Bootloaders/DFU/BootloaderAPI.h index 2462cacdd0..5169bbc3c4 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/BootloaderAPI.h +++ b/lib/lufa/Bootloaders/DFU/BootloaderAPI.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/BootloaderAPITable.S b/lib/lufa/Bootloaders/DFU/BootloaderAPITable.S similarity index 96% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/BootloaderAPITable.S rename to lib/lufa/Bootloaders/DFU/BootloaderAPITable.S index 101dcbd722..95fd8e5c37 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/BootloaderAPITable.S +++ b/lib/lufa/Bootloaders/DFU/BootloaderAPITable.S @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/BootloaderDFU.c b/lib/lufa/Bootloaders/DFU/BootloaderDFU.c similarity index 88% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/BootloaderDFU.c rename to lib/lufa/Bootloaders/DFU/BootloaderDFU.c index 00e673268a..928cf6fe3b 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/BootloaderDFU.c +++ b/lib/lufa/Bootloaders/DFU/BootloaderDFU.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -108,7 +108,17 @@ void Application_Jump_Check(void) { bool JumpToApplication = false; - #if ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1)) + #if (BOARD == BOARD_LEONARDO) + /* Enable pull-up on the IO13 pin so we can use it to select the mode */ + PORTC |= (1 << 7); + Delay_MS(10); + + /* If IO13 is not jumpered to ground, start the user application instead */ + JumpToApplication = ((PINC & (1 << 7)) != 0); + + /* Disable pull-up after the check has completed */ + PORTC &= ~(1 << 7); + #elif ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1)) /* Disable JTAG debugging */ JTAG_DISABLE(); @@ -117,21 +127,41 @@ void Application_Jump_Check(void) Delay_MS(10); /* If the TCK pin is not jumpered to ground, start the user application instead */ - JumpToApplication |= ((PINF & (1 << 4)) != 0); + JumpToApplication = ((PINF & (1 << 4)) != 0); /* Re-enable JTAG debugging */ JTAG_ENABLE(); + #else + /* Check if the device's BOOTRST fuse is set */ + if (boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS) & FUSE_BOOTRST) + { + /* If the reset source was not an external reset or the key is correct, clear it and jump to the application */ + //if (!(MCUSR & (1 << EXTRF)) || (MagicBootKey == MAGIC_BOOT_KEY)) + // JumpToApplication = true; + + /* Clear reset source */ + MCUSR &= ~(1 << EXTRF); + } + else + { + /* If the reset source was the bootloader and the key is correct, clear it and jump to the application; + * this can happen in the HWBE fuse is set, and the HBE pin is low during the watchdog reset */ + //if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY)) + // JumpToApplication = true; + + /* Clear reset source */ + MCUSR &= ~(1 << WDRF); + } #endif - /* If the reset source was the bootloader and the key is correct, clear it and jump to the application */ - if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY)) - JumpToApplication |= true; + /* Don't run the user application if the reset vector is blank (no app loaded) */ + bool ApplicationValid = (pgm_read_word_near(0) != 0xFFFF); /* If a request has been made to jump to the user application, honor it */ - if (JumpToApplication) + if (JumpToApplication && ApplicationValid) { /* Turn off the watchdog */ - MCUSR &= ~(1< 5000) && pressed) { + break; + } + if (pressed) { + keypress++; + } else { + keypress = 0; + } + + #endif + } /* Reset configured hardware back to their original states for the user application */ ResetHardware(); @@ -182,6 +230,15 @@ static void SetupHardware(void) MCUCR = (1 << IVCE); MCUCR = (1 << IVSEL); + #if (BOARD == BOARD_QMK) + // column setup + DDR(QMK_ESC_COL) |= NUM(QMK_ESC_COL); + PORT(QMK_ESC_COL) |= NUM(QMK_ESC_COL); + + // row setup + DDR(QMK_ESC_ROW) |= NUM(QMK_ESC_ROW); + #endif + /* Initialize the USB and other board hardware drivers */ USB_Init(); LEDs_Init(); @@ -189,7 +246,8 @@ static void SetupHardware(void) /* Bootloader active LED toggle timer initialization */ TIMSK1 = (1 << TOIE1); TCCR1B = ((1 << CS11) | (1 << CS10)); -} + +} /** Resets all configured hardware required for the bootloader back to their original states. */ static void ResetHardware(void) @@ -205,6 +263,10 @@ static void ResetHardware(void) /* Relocate the interrupt vector table back to the application section */ MCUCR = (1 << IVCE); MCUCR = 0; + + #if (BOARD == BOARD_QMK) + DDR(QMK_ESC_COL) = PORT(QMK_ESC_COL) = DDR(QMK_ESC_ROW) = PORT(QMK_ESC_ROW) = 0; + #endif } /** ISR to periodically toggle the LEDs on the board to indicate that the bootloader is active. */ @@ -751,8 +813,9 @@ static void ProcessWriteCommand(void) } else // Start via jump { - /* Set the flag to terminate the bootloader at next opportunity */ - RunBootloader = false; + /* Set the flag to terminate the bootloader at next opportunity if a valid application has been loaded */ + if (pgm_read_word_near(0) == 0xFFFF) + RunBootloader = false; } } } @@ -787,18 +850,42 @@ static void ProcessReadCommand(void) const uint8_t BootloaderInfo[3] = {BOOTLOADER_VERSION, BOOTLOADER_ID_BYTE1, BOOTLOADER_ID_BYTE2}; const uint8_t SignatureInfo[4] = {0x58, AVR_SIGNATURE_1, AVR_SIGNATURE_2, AVR_SIGNATURE_3}; - uint8_t DataIndexToRead = SentCommand.Data[1]; + uint8_t DataIndexToRead = SentCommand.Data[1]; + bool ReadAddressInvalid = false; if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x00)) // Read bootloader info { - ResponseByte = BootloaderInfo[DataIndexToRead]; + if (DataIndexToRead < 3) + ResponseByte = BootloaderInfo[DataIndexToRead]; + else + ReadAddressInvalid = true; } else if (IS_ONEBYTE_COMMAND(SentCommand.Data, 0x01)) // Read signature byte { - if (DataIndexToRead < 0x60) - ResponseByte = SignatureInfo[DataIndexToRead - 0x30]; - else - ResponseByte = SignatureInfo[DataIndexToRead - 0x60 + 3]; + switch (DataIndexToRead) + { + case 0x30: + ResponseByte = SignatureInfo[0]; + break; + case 0x31: + ResponseByte = SignatureInfo[1]; + break; + case 0x60: + ResponseByte = SignatureInfo[2]; + break; + case 0x61: + ResponseByte = SignatureInfo[3]; + break; + default: + ReadAddressInvalid = true; + break; + } + } + + if (ReadAddressInvalid) + { + /* Set the state and status variables to indicate the error */ + DFU_State = dfuERROR; + DFU_Status = errADDRESS; } } - diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/BootloaderDFU.h b/lib/lufa/Bootloaders/DFU/BootloaderDFU.h similarity index 98% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/BootloaderDFU.h rename to lib/lufa/Bootloaders/DFU/BootloaderDFU.h index c5d812847c..a97ba6c7ef 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/BootloaderDFU.h +++ b/lib/lufa/Bootloaders/DFU/BootloaderDFU.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/BootloaderDFU.txt b/lib/lufa/Bootloaders/DFU/BootloaderDFU.txt similarity index 93% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/BootloaderDFU.txt rename to lib/lufa/Bootloaders/DFU/BootloaderDFU.txt index e63bcc1f09..b2540a5b6c 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/BootloaderDFU.txt +++ b/lib/lufa/Bootloaders/DFU/BootloaderDFU.txt @@ -57,9 +57,17 @@ * * \section Sec_Running Running the Bootloader * - * This bootloader is designed to be started via the HWB mechanism of the USB AVRs; ground the HWB pin (see device - * datasheet) then momentarily ground /RESET to start the bootloader. This assumes the HWBE fuse is set and the BOOTRST - * fuse is cleared. + * On the USB AVR8 devices, setting the \c HWBE device fuse will cause the bootloader to run if the \c HWB pin of + * the AVR is grounded when the device is reset. + * + * The are two behaviours of this bootloader, depending on the device's fuses: + * + * If the device's BOOTRST fuse is set, the bootloader will run any time the system is reset from + * the external reset pin, unless no valid user application has been loaded. To initiate the bootloader, the + * device's external reset pin should be grounded momentarily. + * + * If the device's BOOTRST fuse is not set, the bootloader will run only if initiated via a software + * jump, or if the \c HWB pin was low during the last device reset (if the \c HWBE fuse is set). * * For board specific exceptions to the above, see below. * @@ -205,12 +213,6 @@ * access. * See here for resolution steps. * - * \par After loading an application, it is not run automatically on startup. - * Some USB AVR boards ship with the BOOTRST fuse set, causing the bootloader - * to run automatically when the device is reset. In most cases, the BOOTRST - * fuse should be disabled and the HWBE fuse used instead to run the bootloader - * when needed. - * * \section Sec_Options Project Options * * The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value. diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/Config/AppConfig.h b/lib/lufa/Bootloaders/DFU/Config/AppConfig.h similarity index 93% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/Config/AppConfig.h rename to lib/lufa/Bootloaders/DFU/Config/AppConfig.h index 260a8f4cde..3acf33c7ea 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/Config/AppConfig.h +++ b/lib/lufa/Bootloaders/DFU/Config/AppConfig.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/Config/LUFAConfig.h b/lib/lufa/Bootloaders/DFU/Config/LUFAConfig.h similarity index 96% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/Config/LUFAConfig.h rename to lib/lufa/Bootloaders/DFU/Config/LUFAConfig.h index f123dd5aaa..59ae519e4c 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/Config/LUFAConfig.h +++ b/lib/lufa/Bootloaders/DFU/Config/LUFAConfig.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/Descriptors.c b/lib/lufa/Bootloaders/DFU/Descriptors.c similarity index 97% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/Descriptors.c rename to lib/lufa/Bootloaders/DFU/Descriptors.c index 922c06bcd5..6b7b6d4900 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/Descriptors.c +++ b/lib/lufa/Bootloaders/DFU/Descriptors.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -125,13 +125,13 @@ const USB_Descriptor_String_t LanguageString = USB_STRING_DESCRIPTOR_ARRAY(LANGU * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -const USB_Descriptor_String_t ManufacturerString = USB_STRING_DESCRIPTOR(L"Dean Camera"); +const USB_Descriptor_String_t ManufacturerString = USB_STRING_DESCRIPTOR(L"QMK"); /** Product descriptor string. This is a Unicode string containing the product's details in human readable form, * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device * Descriptor. */ -const USB_Descriptor_String_t ProductString = USB_STRING_DESCRIPTOR(L"LUFA DFU"); +const USB_Descriptor_String_t ProductString = USB_STRING_DESCRIPTOR(L"KB"); /** This function is called by the library when in device mode, and must be overridden (see library "USB Descriptors" * documentation) by the application code so that the address and size of a requested descriptor can be given @@ -140,7 +140,7 @@ const USB_Descriptor_String_t ProductString = USB_STRING_DESCRIPTOR(L"LUFA DFU") * USB host. */ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, - const uint8_t wIndex, + const uint16_t wIndex, const void** const DescriptorAddress) { const uint8_t DescriptorType = (wValue >> 8); diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/Descriptors.h b/lib/lufa/Bootloaders/DFU/Descriptors.h similarity index 97% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/Descriptors.h rename to lib/lufa/Bootloaders/DFU/Descriptors.h index 249172b6de..5487f88f35 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/Descriptors.h +++ b/lib/lufa/Bootloaders/DFU/Descriptors.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -118,7 +118,7 @@ #elif defined(__AVR_AT90USB82__) #define PRODUCT_ID_CODE 0x2FF7 #define AVR_SIGNATURE_1 0x1E - #define AVR_SIGNATURE_2 0x94 + #define AVR_SIGNATURE_2 0x93 #define AVR_SIGNATURE_3 0x82 #else #error The selected AVR part is not currently supported by this bootloader. @@ -186,7 +186,7 @@ /* Function Prototypes: */ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, - const uint8_t wIndex, + const uint16_t wIndex, const void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/asf.xml b/lib/lufa/Bootloaders/DFU/asf.xml similarity index 100% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/asf.xml rename to lib/lufa/Bootloaders/DFU/asf.xml diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/doxyfile b/lib/lufa/Bootloaders/DFU/doxyfile similarity index 92% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/doxyfile rename to lib/lufa/Bootloaders/DFU/doxyfile index 6cc42af79a..cbb03d6fa9 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/doxyfile +++ b/lib/lufa/Bootloaders/DFU/doxyfile @@ -1,4 +1,4 @@ -# Doxyfile 1.8.8 +# Doxyfile 1.8.9 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -46,10 +46,10 @@ PROJECT_NUMBER = PROJECT_BRIEF = -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. PROJECT_LOGO = @@ -60,7 +60,7 @@ PROJECT_LOGO = OUTPUT_DIRECTORY = ./Documentation/ -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where @@ -93,14 +93,14 @@ ALLOW_UNICODE_NAMES = NO OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the @@ -145,7 +145,7 @@ ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. @@ -215,9 +215,9 @@ MULTILINE_CPP_IS_BRIEF = NO INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the documentation of a member will be -# part of the file/class/namespace that contains it. +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO @@ -286,7 +286,7 @@ OPTIMIZE_OUTPUT_VHDL = NO # instance to make doxygen treat .inc files as Fortran files (default is PHP), # and .f files as C (default is Fortran), use: inc=Fortran f=C. # -# Note For files without extension you can use no_extension as a placeholder. +# Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. @@ -305,8 +305,8 @@ MARKDOWN_SUPPORT = NO # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES @@ -346,7 +346,7 @@ SIP_SUPPORT = NO IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first +# tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. @@ -411,7 +411,7 @@ LOOKUP_CACHE_SIZE = 0 # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. @@ -421,35 +421,35 @@ LOOKUP_CACHE_SIZE = 0 EXTRACT_ALL = YES -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = YES -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = YES -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local methods, +# This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO only methods in the interface are +# included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. @@ -474,21 +474,21 @@ HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set -# to NO these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO these declarations will be +# (class|struct|union) declarations. If set to NO, these declarations will be # included in the documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO these +# documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. @@ -502,7 +502,7 @@ HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also +# names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. @@ -511,12 +511,19 @@ INTERNAL_DOCS = NO CASE_SENSE_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES the +# their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. @@ -544,14 +551,14 @@ INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. +# name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. Note that +# name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. @@ -596,27 +603,25 @@ SORT_BY_SCOPE_NAME = NO STRICT_PROTO_MATCHING = NO -# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the -# todo list. This list is created by putting \todo commands in the -# documentation. +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = NO -# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the -# test list. This list is created by putting \test commands in the -# documentation. +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = NO -# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = NO -# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. @@ -641,8 +646,8 @@ ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES the list -# will mention the files that were used to generate the documentation. +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES @@ -706,7 +711,7 @@ CITE_BIB_FILES = QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. @@ -714,7 +719,7 @@ QUIET = YES WARNINGS = YES -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. @@ -731,8 +736,8 @@ WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return -# value. If set to NO doxygen will only warn about wrong or incomplete parameter -# documentation, but not about the absence of documentation. +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. # The default value is: NO. WARN_NO_PARAMDOC = YES @@ -883,7 +888,7 @@ INPUT_FILTER = FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for +# INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. @@ -943,7 +948,7 @@ REFERENCED_BY_RELATION = NO REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. @@ -990,7 +995,7 @@ USE_HTAGS = NO VERBATIM_HEADERS = NO -# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the # clang parser (see: http://clang.llvm.org/) for more accurate parsing at the # cost of reduced performance. This can be particularly helpful with template # rich C++ code for which doxygen's built-in parser lacks the necessary type @@ -1039,7 +1044,7 @@ IGNORE_PREFIX = # Configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES @@ -1105,10 +1110,10 @@ HTML_STYLESHEET = # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefor more robust against future updates. +# standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra stylesheet files is of importance (e.g. the last -# stylesheet in the list overrules the setting of the previous ones in the +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1125,7 +1130,7 @@ HTML_EXTRA_STYLESHEET = HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to +# will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # http://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 @@ -1253,28 +1258,28 @@ GENERATE_HTMLHELP = NO CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = -# The GENERATE_CHI flag controls if a separate .chi index file is generated ( -# YES) or that it should be included in the master .chm file ( NO). +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = -# The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. @@ -1388,7 +1393,7 @@ DISABLE_INDEX = YES # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has @@ -1416,7 +1421,7 @@ ENUM_VALUES_PER_LINE = 1 TREEVIEW_WIDTH = 250 -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1445,7 +1450,7 @@ FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. @@ -1531,7 +1536,7 @@ SERVER_BASED_SEARCH = NO # external search engine pointed to by the SEARCHENGINE_URL option to obtain the # search results. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). # @@ -1544,7 +1549,7 @@ EXTERNAL_SEARCH = NO # The SEARCHENGINE_URL should point to a search engine hosted by a web server # which will return the search results when EXTERNAL_SEARCH is enabled. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). See the section "External Indexing and # Searching" for details. @@ -1582,7 +1587,7 @@ EXTRA_SEARCH_MAPPINGS = # Configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output. +# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. # The default value is: YES. GENERATE_LATEX = NO @@ -1613,7 +1618,7 @@ LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX +# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1648,9 +1653,9 @@ EXTRA_PACKAGES = # Note: Only use a user-defined header if you know what you are doing! The # following commands have a special meaning inside the header: $title, # $datetime, $date, $doxygenversion, $projectname, $projectnumber, -# $projectbrief, $projectlogo. Doxygen will replace $title with the empy string, -# for the replacement values of the other commands the user is refered to -# HTML_HEADER. +# $projectbrief, $projectlogo. Doxygen will replace $title with the empty +# string, for the replacement values of the other commands the user is referred +# to HTML_HEADER. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_HEADER = @@ -1666,6 +1671,17 @@ LATEX_HEADER = LATEX_FOOTER = +# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# LaTeX style sheets that are included after the standard style sheets created +# by doxygen. Using this option one can overrule certain style aspects. Doxygen +# will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EXTRA_STYLESHEET = + # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the LATEX_OUTPUT output # directory. Note that the files will be copied as-is; there are no commands or @@ -1684,7 +1700,7 @@ LATEX_EXTRA_FILES = PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate -# the PDF file directly from the LaTeX files. Set this option to YES to get a +# the PDF file directly from the LaTeX files. Set this option to YES, to get a # higher quality PDF documentation. # The default value is: YES. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1729,7 +1745,7 @@ LATEX_BIB_STYLE = plain # Configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The +# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The # RTF output is optimized for Word 97 and may not look too pretty with other RTF # readers/editors. # The default value is: NO. @@ -1744,7 +1760,7 @@ GENERATE_RTF = NO RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF +# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1781,11 +1797,21 @@ RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = +# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code +# with syntax highlighting in the RTF output. +# +# Note that which sources are shown also depends on other settings such as +# SOURCE_BROWSER. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_SOURCE_CODE = NO + #--------------------------------------------------------------------------- # Configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for +# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for # classes and files. # The default value is: NO. @@ -1829,7 +1855,7 @@ MAN_LINKS = NO # Configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that +# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that # captures the structure of the code including all documentation. # The default value is: NO. @@ -1843,7 +1869,7 @@ GENERATE_XML = NO XML_OUTPUT = xml -# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program +# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program # listings (including syntax highlighting and cross-referencing information) to # the XML output. Note that enabling this will significantly increase the size # of the XML output. @@ -1856,7 +1882,7 @@ XML_PROGRAMLISTING = YES # Configuration options related to the DOCBOOK output #--------------------------------------------------------------------------- -# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files +# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files # that can be used to generate PDF. # The default value is: NO. @@ -1870,7 +1896,7 @@ GENERATE_DOCBOOK = NO DOCBOOK_OUTPUT = docbook -# If the DOCBOOK_PROGRAMLISTING tag is set to YES doxygen will include the +# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the # program listings (including syntax highlighting and cross-referencing # information) to the DOCBOOK output. Note that enabling this will significantly # increase the size of the DOCBOOK output. @@ -1883,10 +1909,10 @@ DOCBOOK_PROGRAMLISTING = NO # Configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen -# Definitions (see http://autogen.sf.net) file that captures the structure of -# the code including all documentation. Note that this feature is still -# experimental and incomplete at the moment. +# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an +# AutoGen Definitions (see http://autogen.sf.net) file that captures the +# structure of the code including all documentation. Note that this feature is +# still experimental and incomplete at the moment. # The default value is: NO. GENERATE_AUTOGEN_DEF = NO @@ -1895,7 +1921,7 @@ GENERATE_AUTOGEN_DEF = NO # Configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module +# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module # file that captures the structure of the code including all documentation. # # Note that this feature is still experimental and incomplete at the moment. @@ -1903,7 +1929,7 @@ GENERATE_AUTOGEN_DEF = NO GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary +# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary # Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI # output from the Perl module output. # The default value is: NO. @@ -1911,9 +1937,9 @@ GENERATE_PERLMOD = NO PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely +# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely # formatted so it can be parsed by a human reader. This is useful if you want to -# understand what is going on. On the other hand, if this tag is set to NO the +# understand what is going on. On the other hand, if this tag is set to NO, the # size of the Perl module output will be much smaller and Perl will parse it # just the same. # The default value is: YES. @@ -1933,14 +1959,14 @@ PERLMOD_MAKEVAR_PREFIX = # Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all +# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all # C-preprocessor directives found in the sources and include files. # The default value is: YES. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names -# in the source code. If set to NO only conditional compilation will be +# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names +# in the source code. If set to NO, only conditional compilation will be # performed. Macro expansion can be done in a controlled way by setting # EXPAND_ONLY_PREDEF to YES. # The default value is: NO. @@ -1956,7 +1982,7 @@ MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES -# If the SEARCH_INCLUDES tag is set to YES the includes files in the +# If the SEARCH_INCLUDES tag is set to YES, the include files in the # INCLUDE_PATH will be searched if a #include is found. # The default value is: YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. @@ -2034,20 +2060,21 @@ TAGFILES = GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external class will be listed in the -# class index. If set to NO only the inherited external classes will be listed. +# If the ALLEXTERNALS tag is set to YES, all external class will be listed in +# the class index. If set to NO, only the inherited external classes will be +# listed. # The default value is: NO. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in -# the modules index. If set to NO, only the current project's groups will be +# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will be # listed. # The default value is: YES. EXTERNAL_GROUPS = YES -# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in +# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in # the related pages index. If set to NO, only the current project's pages will # be listed. # The default value is: YES. @@ -2064,7 +2091,7 @@ PERL_PATH = /usr/bin/perl # Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram +# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram # (in HTML and LaTeX) for classes with base or super classes. Setting the tag to # NO turns the diagrams off. Note that this option also works with HAVE_DOT # disabled, but it is recommended to install and use dot, since it yields more @@ -2089,7 +2116,7 @@ MSCGEN_PATH = DIA_PATH = -# If set to YES, the inheritance and collaboration graphs will hide inheritance +# If set to YES the inheritance and collaboration graphs will hide inheritance # and usage relations if the target is undocumented or is not a class. # The default value is: YES. @@ -2162,7 +2189,7 @@ COLLABORATION_GRAPH = NO GROUP_GRAPHS = NO -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. # The default value is: NO. @@ -2300,10 +2327,14 @@ DIAFILE_DIRS = # PlantUML is not used or called during a preprocessing step. Doxygen will # generate a warning when it encounters a \startuml command in this case and # will not generate output for the diagram. -# This tag requires that the tag HAVE_DOT is set to YES. PLANTUML_JAR_PATH = +# When using plantuml, the specified paths are searched for files specified by +# the !include statement in a plantuml block. + +PLANTUML_INCLUDE_PATH = + # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # that will be shown in the graph. If the number of nodes in a graph becomes # larger than this value, doxygen will truncate the graph, which is visualized @@ -2340,7 +2371,7 @@ MAX_DOT_GRAPH_DEPTH = 2 DOT_TRANSPARENT = YES -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) support # this, this feature is disabled by default. @@ -2357,7 +2388,7 @@ DOT_MULTI_TARGETS = NO GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot +# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot # files that are used to generate the various graphs. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/makefile b/lib/lufa/Bootloaders/DFU/makefile similarity index 72% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/makefile rename to lib/lufa/Bootloaders/DFU/makefile index 9b91cc63fb..0d2014015d 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/makefile +++ b/lib/lufa/Bootloaders/DFU/makefile @@ -1,6 +1,6 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2014. +# Copyright (C) Dean Camera, 2017. # # dean [at] fourwalledcubicle [dot] com # www.lufa-lib.org @@ -11,10 +11,10 @@ # Run "make help" for target help. -MCU = at90usb1287 +MCU = atmega32u4 ARCH = AVR8 -BOARD = USBKEY -F_CPU = 8000000 +BOARD = QMK +F_CPU = 16000000 F_USB = $(F_CPU) OPTIMIZATION = s TARGET = BootloaderDFU @@ -26,8 +26,8 @@ LD_FLAGS = -Wl,--section-start=.text=$(BOOT_START_OFFSET) $(BOOT_API_LD_FLAG # Flash size and bootloader section sizes of the target, in KB. These must # match the target's total FLASH size and the bootloader size set in the # device's fuses. -FLASH_SIZE_KB = 128 -BOOT_SECTION_SIZE_KB = 8 +FLASH_SIZE_KB = 32 +BOOT_SECTION_SIZE_KB = 4 # Bootloader address calculation formulas # Do not modify these macros, but rather modify the dependent values above. @@ -45,11 +45,18 @@ BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, .apitable_signatures, Boot # Default target all: -# Include LUFA build script makefiles -include $(LUFA_PATH)/Build/lufa_core.mk -include $(LUFA_PATH)/Build/lufa_sources.mk -include $(LUFA_PATH)/Build/lufa_build.mk -include $(LUFA_PATH)/Build/lufa_cppcheck.mk -include $(LUFA_PATH)/Build/lufa_doxygen.mk -include $(LUFA_PATH)/Build/lufa_avrdude.mk -include $(LUFA_PATH)/Build/lufa_atprogram.mk +# Include LUFA-specific DMBS extension modules +DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA +include $(DMBS_LUFA_PATH)/lufa-sources.mk +include $(DMBS_LUFA_PATH)/lufa-gcc.mk + +# Include common DMBS build system modules +DMBS_PATH ?= $(LUFA_PATH)/Build/DMBS/DMBS +include $(DMBS_PATH)/core.mk +include $(DMBS_PATH)/cppcheck.mk +include $(DMBS_PATH)/doxygen.mk +include $(DMBS_PATH)/dfu.mk +include $(DMBS_PATH)/gcc.mk +include $(DMBS_PATH)/hid.mk +include $(DMBS_PATH)/avrdude.mk +include $(DMBS_PATH)/atprogram.mk diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/BootloaderHID.c b/lib/lufa/Bootloaders/HID/BootloaderHID.c similarity index 94% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/BootloaderHID.c rename to lib/lufa/Bootloaders/HID/BootloaderHID.c index 518029ac47..fa1dd5873e 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/BootloaderHID.c +++ b/lib/lufa/Bootloaders/HID/BootloaderHID.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -58,6 +58,11 @@ void Application_Jump_Check(void) /* If the reset source was the bootloader and the key is correct, clear it and jump to the application */ if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY)) { + /* Turn off the watchdog */ + MCUSR &= ~(1 << WDRF); + wdt_disable(); + + /* Clear the boot key and jump to the user application */ MagicBootKey = 0; // cppcheck-suppress constStatement @@ -98,6 +103,9 @@ static void SetupHardware(void) MCUSR &= ~(1 << WDRF); wdt_disable(); + /* Disable clock division */ + clock_prescale_set(clock_div_1); + /* Relocate the interrupt vector table to the bootloader section */ MCUCR = (1 << IVCE); MCUCR = (1 << IVSEL); @@ -153,7 +161,7 @@ void EVENT_USB_Device_ControlRequest(void) { RunBootloader = false; } - else + else if (PageAddress < BOOT_START_ADDR) { /* Erase the given FLASH page, ready to be programmed */ boot_page_erase(PageAddress); diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/BootloaderHID.h b/lib/lufa/Bootloaders/HID/BootloaderHID.h similarity index 93% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/BootloaderHID.h rename to lib/lufa/Bootloaders/HID/BootloaderHID.h index 8efd47ec25..62ee07de30 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/BootloaderHID.h +++ b/lib/lufa/Bootloaders/HID/BootloaderHID.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -67,7 +67,5 @@ void Application_Jump_Check(void) ATTR_INIT_SECTION(3); void EVENT_USB_Device_ConfigurationChanged(void); - void EVENT_USB_Device_UnhandledControlRequest(void); #endif - diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/BootloaderHID.txt b/lib/lufa/Bootloaders/HID/BootloaderHID.txt similarity index 85% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/BootloaderHID.txt rename to lib/lufa/Bootloaders/HID/BootloaderHID.txt index 63c1505cc0..e340703c41 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/BootloaderHID.txt +++ b/lib/lufa/Bootloaders/HID/BootloaderHID.txt @@ -61,9 +61,9 @@ * * \section Sec_Running Running the Bootloader * - * This bootloader is designed to be started via the HWB mechanism of the USB AVRs; ground the HWB pin (see device - * datasheet) then momentarily ground /RESET to start the bootloader. This assumes the HWBE fuse is set and the BOOTRST - * fuse is cleared. + * This bootloader is designed to be started via the \c HWB mechanism of the USB AVRs; ground the \c HWB pin (see device + * datasheet) then momentarily ground \c /RESET to start the bootloader. This assumes the \c HWBE fuse is set and the + * \c BOOTRST fuse is cleared. * * \section Sec_Installation Driver Installation * @@ -73,7 +73,7 @@ * \section Sec_HostApp Host Controller Application * * Due to licensing issues, the supplied bootloader is compatible with the HalfKay bootloader protocol designed - * by PJRC, but is non-compatible with the cross-platform loader GUI. A modified version of the open source + * by PJRC, but is not compatible with the cross-platform loader GUI. A modified version of the open source * cross-platform TeensyLoader application is supplied, which can be compiled under most operating systems. The * command-line loader application should remain compatible with genuine Teensy boards in addition to boards using * this custom bootloader. @@ -86,9 +86,9 @@ * \section Sec_KnownIssues Known Issues: * * \par After loading an application, it is not run automatically on startup. - * Some USB AVR boards ship with the BOOTRST fuse set, causing the bootloader - * to run automatically when the device is reset. In most cases, the BOOTRST - * fuse should be disabled and the HWBE fuse used instead to run the bootloader + * Some USB AVR boards ship with the \c BOOTRST fuse set, causing the bootloader + * to run automatically when the device is reset. This booloader requires the + * \c BOOTRST be disabled and the HWBE fuse used instead to run the bootloader * when needed. * * \section SSec_Options Project Options diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/Config/LUFAConfig.h b/lib/lufa/Bootloaders/HID/Config/LUFAConfig.h similarity index 96% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/Config/LUFAConfig.h rename to lib/lufa/Bootloaders/HID/Config/LUFAConfig.h index af2dd3060e..5aa0e765bf 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/Config/LUFAConfig.h +++ b/lib/lufa/Bootloaders/HID/Config/LUFAConfig.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/Descriptors.c b/lib/lufa/Bootloaders/HID/Descriptors.c similarity index 96% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/Descriptors.c rename to lib/lufa/Bootloaders/HID/Descriptors.c index 3eaa192956..854ae1b636 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/Descriptors.c +++ b/lib/lufa/Bootloaders/HID/Descriptors.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -110,7 +110,7 @@ const USB_Descriptor_Configuration_t ConfigurationDescriptor = { .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, - .InterfaceNumber = INTERFACE_ID_Printer, + .InterfaceNumber = INTERFACE_ID_GenericHID, .AlternateSetting = 0x00, .TotalEndpoints = 1, @@ -151,7 +151,7 @@ const USB_Descriptor_Configuration_t ConfigurationDescriptor = * USB host. */ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, - const uint8_t wIndex, + const uint16_t wIndex, const void** const DescriptorAddress) { const uint8_t DescriptorType = (wValue >> 8); @@ -175,7 +175,7 @@ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, Address = &ConfigurationDescriptor.HID_VendorHID; Size = sizeof(USB_HID_Descriptor_HID_t); } - else + else if (DescriptorType == HID_DTYPE_Report) { Address = &HIDReport; Size = sizeof(HIDReport); diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/Descriptors.h b/lib/lufa/Bootloaders/HID/Descriptors.h similarity index 91% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/Descriptors.h rename to lib/lufa/Bootloaders/HID/Descriptors.h index 4c7d08b517..5516b16354 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/Descriptors.h +++ b/lib/lufa/Bootloaders/HID/Descriptors.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -60,7 +60,7 @@ */ enum InterfaceDescriptors_t { - INTERFACE_ID_Printer = 0, /**< Printer interface descriptor ID */ + INTERFACE_ID_GenericHID = 0, /**< GenericHID interface descriptor ID */ }; /* Macros: */ @@ -72,7 +72,7 @@ /* Function Prototypes: */ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, - const uint8_t wIndex, + const uint16_t wIndex, const void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); diff --git a/lib/lufa/Bootloaders/HID/HostLoaderApp/.gitignore b/lib/lufa/Bootloaders/HID/HostLoaderApp/.gitignore new file mode 100644 index 0000000000..4e73d1ec5b --- /dev/null +++ b/lib/lufa/Bootloaders/HID/HostLoaderApp/.gitignore @@ -0,0 +1 @@ +hid_bootloader_cli diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/HostLoaderApp/Makefile b/lib/lufa/Bootloaders/HID/HostLoaderApp/Makefile similarity index 95% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/HostLoaderApp/Makefile rename to lib/lufa/Bootloaders/HID/HostLoaderApp/Makefile index 7b2833e62f..d7d6458a5c 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/HostLoaderApp/Makefile +++ b/lib/lufa/Bootloaders/HID/HostLoaderApp/Makefile @@ -13,8 +13,9 @@ hid_bootloader_cli: hid_bootloader_cli.c else ifeq ($(OS), WINDOWS) CC = i586-mingw32msvc-gcc CFLAGS ?= -O2 -Wall +LDLIB = -lsetupapi -lhid hid_bootloader_cli.exe: hid_bootloader_cli.c - $(CC) $(CFLAGS) -s -DUSE_WIN32 -o hid_bootloader_cli.exe hid_bootloader_cli.c -lhid -lsetupapi + $(CC) $(CFLAGS) -s -DUSE_WIN32 -o hid_bootloader_cli.exe hid_bootloader_cli.c $(LDLIB) else ifeq ($(OS), MACOSX) diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/HostLoaderApp/Makefile.bsd b/lib/lufa/Bootloaders/HID/HostLoaderApp/Makefile.bsd similarity index 100% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/HostLoaderApp/Makefile.bsd rename to lib/lufa/Bootloaders/HID/HostLoaderApp/Makefile.bsd diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/HostLoaderApp/gpl3.txt b/lib/lufa/Bootloaders/HID/HostLoaderApp/gpl3.txt similarity index 100% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/HostLoaderApp/gpl3.txt rename to lib/lufa/Bootloaders/HID/HostLoaderApp/gpl3.txt diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c b/lib/lufa/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c similarity index 99% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c rename to lib/lufa/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c index 058ccc63da..b54f943b1c 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c +++ b/lib/lufa/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c @@ -921,21 +921,22 @@ void ihex_get_data(int addr, int len, unsigned char *bytes) int printf_verbose(const char *format, ...) { va_list ap; - int r; + int r = 0; va_start(ap, format); if (verbose) { r = vprintf(format, ap); fflush(stdout); - return r; } - return 0; + va_end(ap); + + return r; } void delay(double seconds) { - #ifdef WIN32 - Sleep(seconds * 1000.0); + #ifdef USE_WIN32 + sleep(seconds * 1000.0); #else usleep(seconds * 1000000.0); #endif @@ -948,10 +949,12 @@ void die(const char *str, ...) va_start(ap, str); vfprintf(stderr, str, ap); fprintf(stderr, "\n"); + va_end(ap); + exit(1); } -#if defined(WIN32) +#if defined USE_WIN32 #define strcasecmp stricmp #endif diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/HostLoaderApp_Python/hid_bootloader_loader.py b/lib/lufa/Bootloaders/HID/HostLoaderApp_Python/hid_bootloader_loader.py similarity index 97% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/HostLoaderApp_Python/hid_bootloader_loader.py rename to lib/lufa/Bootloaders/HID/HostLoaderApp_Python/hid_bootloader_loader.py index 2598fde605..cb824f5822 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/HostLoaderApp_Python/hid_bootloader_loader.py +++ b/lib/lufa/Bootloaders/HID/HostLoaderApp_Python/hid_bootloader_loader.py @@ -1,6 +1,6 @@ """ LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org @@ -16,7 +16,7 @@ python hid_bootloader_loader.py at90usb1287 Mouse.hex Requires the pywinusb (https://pypi.python.org/pypi/pywinusb/) and - IntelHex (http://bialix.com/intelhex/) libraries. + IntelHex (https://pypi.python.org/pypi/IntelHex/) libraries. """ import sys diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/asf.xml b/lib/lufa/Bootloaders/HID/asf.xml similarity index 100% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/asf.xml rename to lib/lufa/Bootloaders/HID/asf.xml diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/doxyfile b/lib/lufa/Bootloaders/HID/doxyfile similarity index 92% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/doxyfile rename to lib/lufa/Bootloaders/HID/doxyfile index 281792ac9b..4c3de5ab98 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/doxyfile +++ b/lib/lufa/Bootloaders/HID/doxyfile @@ -1,4 +1,4 @@ -# Doxyfile 1.8.8 +# Doxyfile 1.8.9 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -46,10 +46,10 @@ PROJECT_NUMBER = PROJECT_BRIEF = -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. PROJECT_LOGO = @@ -60,7 +60,7 @@ PROJECT_LOGO = OUTPUT_DIRECTORY = ./Documentation/ -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where @@ -93,14 +93,14 @@ ALLOW_UNICODE_NAMES = NO OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the @@ -145,7 +145,7 @@ ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. @@ -215,9 +215,9 @@ MULTILINE_CPP_IS_BRIEF = NO INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the documentation of a member will be -# part of the file/class/namespace that contains it. +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO @@ -286,7 +286,7 @@ OPTIMIZE_OUTPUT_VHDL = NO # instance to make doxygen treat .inc files as Fortran files (default is PHP), # and .f files as C (default is Fortran), use: inc=Fortran f=C. # -# Note For files without extension you can use no_extension as a placeholder. +# Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. @@ -305,8 +305,8 @@ MARKDOWN_SUPPORT = NO # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES @@ -346,7 +346,7 @@ SIP_SUPPORT = NO IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first +# tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. @@ -411,7 +411,7 @@ LOOKUP_CACHE_SIZE = 0 # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. @@ -421,35 +421,35 @@ LOOKUP_CACHE_SIZE = 0 EXTRACT_ALL = YES -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = YES -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = YES -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local methods, +# This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO only methods in the interface are +# included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. @@ -474,21 +474,21 @@ HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set -# to NO these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO these declarations will be +# (class|struct|union) declarations. If set to NO, these declarations will be # included in the documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO these +# documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. @@ -502,7 +502,7 @@ HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also +# names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. @@ -511,12 +511,19 @@ INTERNAL_DOCS = NO CASE_SENSE_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES the +# their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. @@ -544,14 +551,14 @@ INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. +# name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. Note that +# name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. @@ -596,27 +603,25 @@ SORT_BY_SCOPE_NAME = NO STRICT_PROTO_MATCHING = NO -# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the -# todo list. This list is created by putting \todo commands in the -# documentation. +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = NO -# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the -# test list. This list is created by putting \test commands in the -# documentation. +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = NO -# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = NO -# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. @@ -641,8 +646,8 @@ ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES the list -# will mention the files that were used to generate the documentation. +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES @@ -706,7 +711,7 @@ CITE_BIB_FILES = QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. @@ -714,7 +719,7 @@ QUIET = YES WARNINGS = YES -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. @@ -731,8 +736,8 @@ WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return -# value. If set to NO doxygen will only warn about wrong or incomplete parameter -# documentation, but not about the absence of documentation. +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. # The default value is: NO. WARN_NO_PARAMDOC = YES @@ -885,7 +890,7 @@ INPUT_FILTER = FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for +# INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. @@ -945,7 +950,7 @@ REFERENCED_BY_RELATION = NO REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. @@ -992,7 +997,7 @@ USE_HTAGS = NO VERBATIM_HEADERS = NO -# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the # clang parser (see: http://clang.llvm.org/) for more accurate parsing at the # cost of reduced performance. This can be particularly helpful with template # rich C++ code for which doxygen's built-in parser lacks the necessary type @@ -1041,7 +1046,7 @@ IGNORE_PREFIX = # Configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES @@ -1107,10 +1112,10 @@ HTML_STYLESHEET = # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefor more robust against future updates. +# standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra stylesheet files is of importance (e.g. the last -# stylesheet in the list overrules the setting of the previous ones in the +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1127,7 +1132,7 @@ HTML_EXTRA_STYLESHEET = HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to +# will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # http://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 @@ -1255,28 +1260,28 @@ GENERATE_HTMLHELP = NO CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = -# The GENERATE_CHI flag controls if a separate .chi index file is generated ( -# YES) or that it should be included in the master .chm file ( NO). +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = -# The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. @@ -1390,7 +1395,7 @@ DISABLE_INDEX = YES # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has @@ -1418,7 +1423,7 @@ ENUM_VALUES_PER_LINE = 1 TREEVIEW_WIDTH = 250 -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1447,7 +1452,7 @@ FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. @@ -1533,7 +1538,7 @@ SERVER_BASED_SEARCH = NO # external search engine pointed to by the SEARCHENGINE_URL option to obtain the # search results. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). # @@ -1546,7 +1551,7 @@ EXTERNAL_SEARCH = NO # The SEARCHENGINE_URL should point to a search engine hosted by a web server # which will return the search results when EXTERNAL_SEARCH is enabled. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). See the section "External Indexing and # Searching" for details. @@ -1584,7 +1589,7 @@ EXTRA_SEARCH_MAPPINGS = # Configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output. +# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. # The default value is: YES. GENERATE_LATEX = NO @@ -1615,7 +1620,7 @@ LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX +# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1650,9 +1655,9 @@ EXTRA_PACKAGES = # Note: Only use a user-defined header if you know what you are doing! The # following commands have a special meaning inside the header: $title, # $datetime, $date, $doxygenversion, $projectname, $projectnumber, -# $projectbrief, $projectlogo. Doxygen will replace $title with the empy string, -# for the replacement values of the other commands the user is refered to -# HTML_HEADER. +# $projectbrief, $projectlogo. Doxygen will replace $title with the empty +# string, for the replacement values of the other commands the user is referred +# to HTML_HEADER. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_HEADER = @@ -1668,6 +1673,17 @@ LATEX_HEADER = LATEX_FOOTER = +# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# LaTeX style sheets that are included after the standard style sheets created +# by doxygen. Using this option one can overrule certain style aspects. Doxygen +# will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EXTRA_STYLESHEET = + # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the LATEX_OUTPUT output # directory. Note that the files will be copied as-is; there are no commands or @@ -1686,7 +1702,7 @@ LATEX_EXTRA_FILES = PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate -# the PDF file directly from the LaTeX files. Set this option to YES to get a +# the PDF file directly from the LaTeX files. Set this option to YES, to get a # higher quality PDF documentation. # The default value is: YES. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1731,7 +1747,7 @@ LATEX_BIB_STYLE = plain # Configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The +# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The # RTF output is optimized for Word 97 and may not look too pretty with other RTF # readers/editors. # The default value is: NO. @@ -1746,7 +1762,7 @@ GENERATE_RTF = NO RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF +# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1783,11 +1799,21 @@ RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = +# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code +# with syntax highlighting in the RTF output. +# +# Note that which sources are shown also depends on other settings such as +# SOURCE_BROWSER. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_SOURCE_CODE = NO + #--------------------------------------------------------------------------- # Configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for +# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for # classes and files. # The default value is: NO. @@ -1831,7 +1857,7 @@ MAN_LINKS = NO # Configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that +# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that # captures the structure of the code including all documentation. # The default value is: NO. @@ -1845,7 +1871,7 @@ GENERATE_XML = NO XML_OUTPUT = xml -# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program +# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program # listings (including syntax highlighting and cross-referencing information) to # the XML output. Note that enabling this will significantly increase the size # of the XML output. @@ -1858,7 +1884,7 @@ XML_PROGRAMLISTING = YES # Configuration options related to the DOCBOOK output #--------------------------------------------------------------------------- -# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files +# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files # that can be used to generate PDF. # The default value is: NO. @@ -1872,7 +1898,7 @@ GENERATE_DOCBOOK = NO DOCBOOK_OUTPUT = docbook -# If the DOCBOOK_PROGRAMLISTING tag is set to YES doxygen will include the +# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the # program listings (including syntax highlighting and cross-referencing # information) to the DOCBOOK output. Note that enabling this will significantly # increase the size of the DOCBOOK output. @@ -1885,10 +1911,10 @@ DOCBOOK_PROGRAMLISTING = NO # Configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen -# Definitions (see http://autogen.sf.net) file that captures the structure of -# the code including all documentation. Note that this feature is still -# experimental and incomplete at the moment. +# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an +# AutoGen Definitions (see http://autogen.sf.net) file that captures the +# structure of the code including all documentation. Note that this feature is +# still experimental and incomplete at the moment. # The default value is: NO. GENERATE_AUTOGEN_DEF = NO @@ -1897,7 +1923,7 @@ GENERATE_AUTOGEN_DEF = NO # Configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module +# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module # file that captures the structure of the code including all documentation. # # Note that this feature is still experimental and incomplete at the moment. @@ -1905,7 +1931,7 @@ GENERATE_AUTOGEN_DEF = NO GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary +# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary # Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI # output from the Perl module output. # The default value is: NO. @@ -1913,9 +1939,9 @@ GENERATE_PERLMOD = NO PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely +# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely # formatted so it can be parsed by a human reader. This is useful if you want to -# understand what is going on. On the other hand, if this tag is set to NO the +# understand what is going on. On the other hand, if this tag is set to NO, the # size of the Perl module output will be much smaller and Perl will parse it # just the same. # The default value is: YES. @@ -1935,14 +1961,14 @@ PERLMOD_MAKEVAR_PREFIX = # Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all +# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all # C-preprocessor directives found in the sources and include files. # The default value is: YES. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names -# in the source code. If set to NO only conditional compilation will be +# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names +# in the source code. If set to NO, only conditional compilation will be # performed. Macro expansion can be done in a controlled way by setting # EXPAND_ONLY_PREDEF to YES. # The default value is: NO. @@ -1958,7 +1984,7 @@ MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES -# If the SEARCH_INCLUDES tag is set to YES the includes files in the +# If the SEARCH_INCLUDES tag is set to YES, the include files in the # INCLUDE_PATH will be searched if a #include is found. # The default value is: YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. @@ -2036,20 +2062,21 @@ TAGFILES = GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external class will be listed in the -# class index. If set to NO only the inherited external classes will be listed. +# If the ALLEXTERNALS tag is set to YES, all external class will be listed in +# the class index. If set to NO, only the inherited external classes will be +# listed. # The default value is: NO. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in -# the modules index. If set to NO, only the current project's groups will be +# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will be # listed. # The default value is: YES. EXTERNAL_GROUPS = YES -# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in +# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in # the related pages index. If set to NO, only the current project's pages will # be listed. # The default value is: YES. @@ -2066,7 +2093,7 @@ PERL_PATH = /usr/bin/perl # Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram +# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram # (in HTML and LaTeX) for classes with base or super classes. Setting the tag to # NO turns the diagrams off. Note that this option also works with HAVE_DOT # disabled, but it is recommended to install and use dot, since it yields more @@ -2091,7 +2118,7 @@ MSCGEN_PATH = DIA_PATH = -# If set to YES, the inheritance and collaboration graphs will hide inheritance +# If set to YES the inheritance and collaboration graphs will hide inheritance # and usage relations if the target is undocumented or is not a class. # The default value is: YES. @@ -2164,7 +2191,7 @@ COLLABORATION_GRAPH = NO GROUP_GRAPHS = NO -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. # The default value is: NO. @@ -2302,10 +2329,14 @@ DIAFILE_DIRS = # PlantUML is not used or called during a preprocessing step. Doxygen will # generate a warning when it encounters a \startuml command in this case and # will not generate output for the diagram. -# This tag requires that the tag HAVE_DOT is set to YES. PLANTUML_JAR_PATH = +# When using plantuml, the specified paths are searched for files specified by +# the !include statement in a plantuml block. + +PLANTUML_INCLUDE_PATH = + # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # that will be shown in the graph. If the number of nodes in a graph becomes # larger than this value, doxygen will truncate the graph, which is visualized @@ -2342,7 +2373,7 @@ MAX_DOT_GRAPH_DEPTH = 2 DOT_TRANSPARENT = YES -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) support # this, this feature is disabled by default. @@ -2359,7 +2390,7 @@ DOT_MULTI_TARGETS = NO GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot +# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot # files that are used to generate the various graphs. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/makefile b/lib/lufa/Bootloaders/HID/makefile similarity index 65% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/makefile rename to lib/lufa/Bootloaders/HID/makefile index 6589d75aa6..12cfadb5d4 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/HID/makefile +++ b/lib/lufa/Bootloaders/HID/makefile @@ -1,6 +1,6 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2014. +# Copyright (C) Dean Camera, 2017. # # dean [at] fourwalledcubicle [dot] com # www.lufa-lib.org @@ -20,7 +20,7 @@ OPTIMIZATION = s TARGET = BootloaderHID SRC = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) LUFA_PATH = ../../LUFA -CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/ +CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -DBOOT_START_ADDR=$(BOOT_START_OFFSET) -IConfig/ LD_FLAGS = -Wl,--section-start=.text=$(BOOT_START_OFFSET) # Flash size and bootloader section sizes of the target, in KB. These must @@ -38,11 +38,18 @@ BOOT_SEC_OFFSET = $(call CALC_ADDRESS_IN_HEX, ($(FLASH_SIZE_KB) * 1024) - # Default target all: -# Include LUFA build script makefiles -include $(LUFA_PATH)/Build/lufa_core.mk -include $(LUFA_PATH)/Build/lufa_sources.mk -include $(LUFA_PATH)/Build/lufa_build.mk -include $(LUFA_PATH)/Build/lufa_cppcheck.mk -include $(LUFA_PATH)/Build/lufa_doxygen.mk -include $(LUFA_PATH)/Build/lufa_avrdude.mk -include $(LUFA_PATH)/Build/lufa_atprogram.mk +# Include LUFA-specific DMBS extension modules +DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA +include $(DMBS_LUFA_PATH)/lufa-sources.mk +include $(DMBS_LUFA_PATH)/lufa-gcc.mk + +# Include common DMBS build system modules +DMBS_PATH ?= $(LUFA_PATH)/Build/DMBS/DMBS +include $(DMBS_PATH)/core.mk +include $(DMBS_PATH)/cppcheck.mk +include $(DMBS_PATH)/doxygen.mk +include $(DMBS_PATH)/dfu.mk +include $(DMBS_PATH)/gcc.mk +include $(DMBS_PATH)/hid.mk +include $(DMBS_PATH)/avrdude.mk +include $(DMBS_PATH)/atprogram.mk diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/BootloaderAPI.c b/lib/lufa/Bootloaders/MassStorage/BootloaderAPI.c similarity index 95% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/BootloaderAPI.c rename to lib/lufa/Bootloaders/MassStorage/BootloaderAPI.c index cad59c8ca2..491c506d0f 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/DFU/BootloaderAPI.c +++ b/lib/lufa/Bootloaders/MassStorage/BootloaderAPI.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderAPI.h b/lib/lufa/Bootloaders/MassStorage/BootloaderAPI.h similarity index 94% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderAPI.h rename to lib/lufa/Bootloaders/MassStorage/BootloaderAPI.h index 0f0cd70405..4889b4c0db 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderAPI.h +++ b/lib/lufa/Bootloaders/MassStorage/BootloaderAPI.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderAPITable.S b/lib/lufa/Bootloaders/MassStorage/BootloaderAPITable.S similarity index 96% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderAPITable.S rename to lib/lufa/Bootloaders/MassStorage/BootloaderAPITable.S index 91fc949666..44eb15ea9d 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderAPITable.S +++ b/lib/lufa/Bootloaders/MassStorage/BootloaderAPITable.S @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderMassStorage.c b/lib/lufa/Bootloaders/MassStorage/BootloaderMassStorage.c similarity index 84% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderMassStorage.c rename to lib/lufa/Bootloaders/MassStorage/BootloaderMassStorage.c index cfe0cdbf8f..6c9697b660 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderMassStorage.c +++ b/lib/lufa/Bootloaders/MassStorage/BootloaderMassStorage.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -91,11 +91,11 @@ void Application_Jump_Check(void) #if (BOARD == BOARD_LEONARDO) /* Enable pull-up on the IO13 pin so we can use it to select the mode */ - PORTC |= (1 << 7); + PORTC |= (1 << 7); Delay_MS(10); /* If IO13 is not jumpered to ground, start the user application instead */ - JumpToApplication |= ((PINC & (1 << 7)) != 0); + JumpToApplication = ((PINC & (1 << 7)) != 0); /* Disable pull-up after the check has completed */ PORTC &= ~(1 << 7); @@ -108,21 +108,46 @@ void Application_Jump_Check(void) Delay_MS(10); /* If the TCK pin is not jumpered to ground, start the user application instead */ - JumpToApplication |= ((PINF & (1 << 4)) != 0); + JumpToApplication = ((PINF & (1 << 4)) != 0); /* Re-enable JTAG debugging */ JTAG_ENABLE(); + #else + /* Check if the device's BOOTRST fuse is set */ + if (boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS) & FUSE_BOOTRST) + { + /* If the reset source was not an external reset or the key is correct, clear it and jump to the application */ + if (!(MCUSR & (1 << EXTRF)) || (MagicBootKey == MAGIC_BOOT_KEY)) + JumpToApplication = true; + + /* Clear reset source */ + MCUSR &= ~(1 << EXTRF); + } + else + { + /* If the reset source was the bootloader and the key is correct, clear it and jump to the application; + * this can happen in the HWBE fuse is set, and the HBE pin is low during the watchdog reset */ + if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY)) + JumpToApplication = true; + + /* Clear reset source */ + MCUSR &= ~(1 << WDRF); + } #endif - /* If the reset source was the bootloader and the key is correct, clear it and jump to the application */ - if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY)) - { - MagicBootKey = 0; - JumpToApplication = true; - } + /* Don't run the user application if the reset vector is blank (no app loaded) */ + bool ApplicationValid = (pgm_read_word_near(0) != 0xFFFF); - if (JumpToApplication) + /* If a request has been made to jump to the user application, honor it */ + if (JumpToApplication && ApplicationValid) { + /* Turn off the watchdog */ + MCUSR &= ~(1 << WDRF); + wdt_disable(); + + /* Clear the boot key and jump to the user application */ + MagicBootKey = 0; + // cppcheck-suppress constStatement ((void (*)(void))0x0000)(); } diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderMassStorage.h b/lib/lufa/Bootloaders/MassStorage/BootloaderMassStorage.h similarity index 97% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderMassStorage.h rename to lib/lufa/Bootloaders/MassStorage/BootloaderMassStorage.h index c1bd004106..c9ddee4d7f 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderMassStorage.h +++ b/lib/lufa/Bootloaders/MassStorage/BootloaderMassStorage.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderMassStorage.txt b/lib/lufa/Bootloaders/MassStorage/BootloaderMassStorage.txt similarity index 87% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderMassStorage.txt rename to lib/lufa/Bootloaders/MassStorage/BootloaderMassStorage.txt index e094847933..0fea9d9fb5 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/BootloaderMassStorage.txt +++ b/lib/lufa/Bootloaders/MassStorage/BootloaderMassStorage.txt @@ -62,9 +62,17 @@ * * \section Sec_Running Running the Bootloader * - * This bootloader is designed to be started via the HWB mechanism of the USB AVRs; ground the HWB pin (see device - * datasheet) then momentarily ground /RESET to start the bootloader. This assumes the HWBE fuse is set and the BOOTRST - * fuse is cleared. + * On the USB AVR8 devices, setting the \c HWBE device fuse will cause the bootloader to run if the \c HWB pin of + * the AVR is grounded when the device is reset. + * + * The are two behaviours of this bootloader, depending on the device's fuses: + * + * If the device's BOOTRST fuse is set, the bootloader will run any time the system is reset from + * the external reset pin, unless no valid user application has been loaded. To initiate the bootloader, the + * device's external reset pin should be grounded momentarily. + * + * If the device's BOOTRST fuse is not set, the bootloader will run only if initiated via a software + * jump, or if the \c HWB pin was low during the last device reset (if the \c HWBE fuse is set). * * For board specific exceptions to the above, see below. * @@ -88,7 +96,20 @@ * remove your device from the host using the host OS's ejection APIs, to ensure all data is correctly flushed to the * bootloader's virtual filesystem and not cached in the OS's file system driver. * - * The current device firmware can be read from the device by reading a file from the virtual FAT filesystem. + * The current device firmware can be read from the device by reading a file from the virtual FAT filesystem. Two files will + * be present: + * - FLASH.BIN, representing the AVR's internal flash memory + * - EEPROM.BIN, representing the AVR's internal EEPROM memory + * + * To convert an existing Intel HEX (.HEX) program file to a binary (.BIN) file suitable for this bootloader, run: + * \code + * avr-objcopy -O binary -R .eeprom -R .fuse -R .lock -R .signature input.hex output.bin + * \endcode + * From a terminal, replacing input.hex and output.bin with the respective input and output filenames. + * AVR EEPROM data files in Intel HEX format (.EEP) uses a similar technique: + * \code + * avr-objcopy -O binary input.eep output.bin + * \endcode * * \warning This bootloader is currently incompatible with the Apple MacOS X OS Finder GUI, due to the * large amount of meta files this OS attempts to write to the disk along with the new binaries. On @@ -198,12 +219,6 @@ * Mass Storage bootloader, or the file system synced via an appropriate command * (such as the OS's normal disk ejection command) before disconnecting the device. * - * \par After loading an application, it is not run automatically on startup. - * Some USB AVR boards ship with the BOOTRST fuse set, causing the bootloader - * to run automatically when the device is reset. In most cases, the BOOTRST - * fuse should be disabled and the HWBE fuse used instead to run the bootloader - * when needed. - * * \section Sec_Options Project Options * * The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value. diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Config/AppConfig.h b/lib/lufa/Bootloaders/MassStorage/Config/AppConfig.h similarity index 93% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Config/AppConfig.h rename to lib/lufa/Bootloaders/MassStorage/Config/AppConfig.h index 6745a86e3b..92eb364dc9 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Config/AppConfig.h +++ b/lib/lufa/Bootloaders/MassStorage/Config/AppConfig.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Config/LUFAConfig.h b/lib/lufa/Bootloaders/MassStorage/Config/LUFAConfig.h similarity index 96% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Config/LUFAConfig.h rename to lib/lufa/Bootloaders/MassStorage/Config/LUFAConfig.h index c0648160c7..7353178673 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Config/LUFAConfig.h +++ b/lib/lufa/Bootloaders/MassStorage/Config/LUFAConfig.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Descriptors.c b/lib/lufa/Bootloaders/MassStorage/Descriptors.c similarity index 97% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Descriptors.c rename to lib/lufa/Bootloaders/MassStorage/Descriptors.c index a1cefa3516..e8bdbd4f5c 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Descriptors.c +++ b/lib/lufa/Bootloaders/MassStorage/Descriptors.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -131,7 +131,7 @@ const USB_Descriptor_Configuration_t ConfigurationDescriptor = * USB host. */ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, - const uint8_t wIndex, + const uint16_t wIndex, const void** const DescriptorAddress) { const uint8_t DescriptorType = (wValue >> 8); diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Descriptors.h b/lib/lufa/Bootloaders/MassStorage/Descriptors.h similarity index 94% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Descriptors.h rename to lib/lufa/Bootloaders/MassStorage/Descriptors.h index 31747e4c81..506f41af83 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Descriptors.h +++ b/lib/lufa/Bootloaders/MassStorage/Descriptors.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -80,7 +80,7 @@ /* Function Prototypes: */ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, - const uint8_t wIndex, + const uint16_t wIndex, const void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3) AUX_BOOT_SECTION; diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Lib/SCSI.c b/lib/lufa/Bootloaders/MassStorage/Lib/SCSI.c similarity index 99% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Lib/SCSI.c rename to lib/lufa/Bootloaders/MassStorage/Lib/SCSI.c index ace118a481..3c14eb9010 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Lib/SCSI.c +++ b/lib/lufa/Bootloaders/MassStorage/Lib/SCSI.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Lib/SCSI.h b/lib/lufa/Bootloaders/MassStorage/Lib/SCSI.h similarity index 97% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Lib/SCSI.h rename to lib/lufa/Bootloaders/MassStorage/Lib/SCSI.h index 3529fde605..4195593363 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Lib/SCSI.h +++ b/lib/lufa/Bootloaders/MassStorage/Lib/SCSI.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Lib/VirtualFAT.c b/lib/lufa/Bootloaders/MassStorage/Lib/VirtualFAT.c similarity index 99% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Lib/VirtualFAT.c rename to lib/lufa/Bootloaders/MassStorage/Lib/VirtualFAT.c index 907b4e5ff7..ffd453128e 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Lib/VirtualFAT.c +++ b/lib/lufa/Bootloaders/MassStorage/Lib/VirtualFAT.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Lib/VirtualFAT.h b/lib/lufa/Bootloaders/MassStorage/Lib/VirtualFAT.h similarity index 91% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Lib/VirtualFAT.h rename to lib/lufa/Bootloaders/MassStorage/Lib/VirtualFAT.h index 380132c537..ea80eae4d6 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/Lib/VirtualFAT.h +++ b/lib/lufa/Bootloaders/MassStorage/Lib/VirtualFAT.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -99,31 +99,31 @@ /** Bit-rotates a given 8-bit value once to the right. * - * \param x Value to rotate right once + * \param[in] x Value to rotate right once * * \return Bit-rotated input value, rotated once to the right. */ - #define _ROT8(x) ((((x) & 0xFE) >> 1) | (((x) & 1) ? 0x80 : 0x00)) + #define ROT8(x) ((((x) & 0xFE) >> 1) | (((x) & 1) ? 0x80 : 0x00)) /** Computes the LFN entry checksum of a MSDOS 8.3 format file entry, * to associate a LFN entry with its short file entry. * - * \param n0 MSDOS Filename character 1 - * \param n1 MSDOS Filename character 2 - * \param n2 MSDOS Filename character 3 - * \param n3 MSDOS Filename character 4 - * \param n4 MSDOS Filename character 5 - * \param n5 MSDOS Filename character 6 - * \param n6 MSDOS Filename character 7 - * \param n7 MSDOS Filename character 8 - * \param e0 MSDOS Extension character 1 - * \param e1 MSDOS Extension character 2 - * \param e2 MSDOS Extension character 3 + * \param[in] n0 MSDOS Filename character 1 + * \param[in] n1 MSDOS Filename character 2 + * \param[in] n2 MSDOS Filename character 3 + * \param[in] n3 MSDOS Filename character 4 + * \param[in] n4 MSDOS Filename character 5 + * \param[in] n5 MSDOS Filename character 6 + * \param[in] n6 MSDOS Filename character 7 + * \param[in] n7 MSDOS Filename character 8 + * \param[in] e0 MSDOS Extension character 1 + * \param[in] e1 MSDOS Extension character 2 + * \param[in] e2 MSDOS Extension character 3 * * \return LFN checksum of the given MSDOS 8.3 filename. */ #define FAT_CHECKSUM(n0, n1, n2, n3, n4, n5, n6, n7, e0, e1, e2) \ - (uint8_t)(_ROT8(_ROT8(_ROT8(_ROT8(_ROT8(_ROT8(_ROT8(_ROT8(_ROT8(_ROT8(n0)+n1)+n2)+n3)+n4)+n5)+n6)+n7)+e0)+e1)+e2) + (uint8_t)(ROT8(ROT8(ROT8(ROT8(ROT8(ROT8(ROT8(ROT8(ROT8(ROT8(n0)+n1)+n2)+n3)+n4)+n5)+n6)+n7)+e0)+e1)+e2) /** \name FAT Filesystem Flags */ //@{ diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/asf.xml b/lib/lufa/Bootloaders/MassStorage/asf.xml similarity index 100% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/asf.xml rename to lib/lufa/Bootloaders/MassStorage/asf.xml diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/doxyfile b/lib/lufa/Bootloaders/MassStorage/doxyfile similarity index 92% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/doxyfile rename to lib/lufa/Bootloaders/MassStorage/doxyfile index 9e816908eb..795c6e81ad 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/doxyfile +++ b/lib/lufa/Bootloaders/MassStorage/doxyfile @@ -1,4 +1,4 @@ -# Doxyfile 1.8.8 +# Doxyfile 1.8.9 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -46,10 +46,10 @@ PROJECT_NUMBER = PROJECT_BRIEF = -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. PROJECT_LOGO = @@ -60,7 +60,7 @@ PROJECT_LOGO = OUTPUT_DIRECTORY = ./Documentation/ -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where @@ -93,14 +93,14 @@ ALLOW_UNICODE_NAMES = NO OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the @@ -145,7 +145,7 @@ ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. @@ -215,9 +215,9 @@ MULTILINE_CPP_IS_BRIEF = NO INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the documentation of a member will be -# part of the file/class/namespace that contains it. +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO @@ -286,7 +286,7 @@ OPTIMIZE_OUTPUT_VHDL = NO # instance to make doxygen treat .inc files as Fortran files (default is PHP), # and .f files as C (default is Fortran), use: inc=Fortran f=C. # -# Note For files without extension you can use no_extension as a placeholder. +# Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. @@ -305,8 +305,8 @@ MARKDOWN_SUPPORT = NO # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES @@ -346,7 +346,7 @@ SIP_SUPPORT = NO IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first +# tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. @@ -411,7 +411,7 @@ LOOKUP_CACHE_SIZE = 0 # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. @@ -421,35 +421,35 @@ LOOKUP_CACHE_SIZE = 0 EXTRACT_ALL = YES -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = YES -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = YES -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local methods, +# This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO only methods in the interface are +# included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. @@ -474,21 +474,21 @@ HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set -# to NO these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO these declarations will be +# (class|struct|union) declarations. If set to NO, these declarations will be # included in the documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO these +# documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. @@ -502,7 +502,7 @@ HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also +# names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. @@ -511,12 +511,19 @@ INTERNAL_DOCS = NO CASE_SENSE_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES the +# their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. @@ -544,14 +551,14 @@ INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. +# name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. Note that +# name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. @@ -596,27 +603,25 @@ SORT_BY_SCOPE_NAME = NO STRICT_PROTO_MATCHING = NO -# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the -# todo list. This list is created by putting \todo commands in the -# documentation. +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = NO -# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the -# test list. This list is created by putting \test commands in the -# documentation. +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = NO -# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = NO -# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. @@ -641,8 +646,8 @@ ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES the list -# will mention the files that were used to generate the documentation. +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES @@ -706,7 +711,7 @@ CITE_BIB_FILES = QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. @@ -714,7 +719,7 @@ QUIET = YES WARNINGS = YES -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. @@ -731,8 +736,8 @@ WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return -# value. If set to NO doxygen will only warn about wrong or incomplete parameter -# documentation, but not about the absence of documentation. +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. # The default value is: NO. WARN_NO_PARAMDOC = YES @@ -883,7 +888,7 @@ INPUT_FILTER = FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for +# INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. @@ -943,7 +948,7 @@ REFERENCED_BY_RELATION = NO REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. @@ -990,7 +995,7 @@ USE_HTAGS = NO VERBATIM_HEADERS = NO -# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the # clang parser (see: http://clang.llvm.org/) for more accurate parsing at the # cost of reduced performance. This can be particularly helpful with template # rich C++ code for which doxygen's built-in parser lacks the necessary type @@ -1039,7 +1044,7 @@ IGNORE_PREFIX = # Configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES @@ -1105,10 +1110,10 @@ HTML_STYLESHEET = # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefor more robust against future updates. +# standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra stylesheet files is of importance (e.g. the last -# stylesheet in the list overrules the setting of the previous ones in the +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1125,7 +1130,7 @@ HTML_EXTRA_STYLESHEET = HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to +# will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # http://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 @@ -1253,28 +1258,28 @@ GENERATE_HTMLHELP = NO CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = -# The GENERATE_CHI flag controls if a separate .chi index file is generated ( -# YES) or that it should be included in the master .chm file ( NO). +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = -# The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. @@ -1388,7 +1393,7 @@ DISABLE_INDEX = YES # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has @@ -1416,7 +1421,7 @@ ENUM_VALUES_PER_LINE = 1 TREEVIEW_WIDTH = 250 -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1445,7 +1450,7 @@ FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. @@ -1531,7 +1536,7 @@ SERVER_BASED_SEARCH = NO # external search engine pointed to by the SEARCHENGINE_URL option to obtain the # search results. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). # @@ -1544,7 +1549,7 @@ EXTERNAL_SEARCH = NO # The SEARCHENGINE_URL should point to a search engine hosted by a web server # which will return the search results when EXTERNAL_SEARCH is enabled. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). See the section "External Indexing and # Searching" for details. @@ -1582,7 +1587,7 @@ EXTRA_SEARCH_MAPPINGS = # Configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output. +# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. # The default value is: YES. GENERATE_LATEX = NO @@ -1613,7 +1618,7 @@ LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX +# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1648,9 +1653,9 @@ EXTRA_PACKAGES = # Note: Only use a user-defined header if you know what you are doing! The # following commands have a special meaning inside the header: $title, # $datetime, $date, $doxygenversion, $projectname, $projectnumber, -# $projectbrief, $projectlogo. Doxygen will replace $title with the empy string, -# for the replacement values of the other commands the user is refered to -# HTML_HEADER. +# $projectbrief, $projectlogo. Doxygen will replace $title with the empty +# string, for the replacement values of the other commands the user is referred +# to HTML_HEADER. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_HEADER = @@ -1666,6 +1671,17 @@ LATEX_HEADER = LATEX_FOOTER = +# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# LaTeX style sheets that are included after the standard style sheets created +# by doxygen. Using this option one can overrule certain style aspects. Doxygen +# will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EXTRA_STYLESHEET = + # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the LATEX_OUTPUT output # directory. Note that the files will be copied as-is; there are no commands or @@ -1684,7 +1700,7 @@ LATEX_EXTRA_FILES = PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate -# the PDF file directly from the LaTeX files. Set this option to YES to get a +# the PDF file directly from the LaTeX files. Set this option to YES, to get a # higher quality PDF documentation. # The default value is: YES. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1729,7 +1745,7 @@ LATEX_BIB_STYLE = plain # Configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The +# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The # RTF output is optimized for Word 97 and may not look too pretty with other RTF # readers/editors. # The default value is: NO. @@ -1744,7 +1760,7 @@ GENERATE_RTF = NO RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF +# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1781,11 +1797,21 @@ RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = +# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code +# with syntax highlighting in the RTF output. +# +# Note that which sources are shown also depends on other settings such as +# SOURCE_BROWSER. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_SOURCE_CODE = NO + #--------------------------------------------------------------------------- # Configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for +# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for # classes and files. # The default value is: NO. @@ -1829,7 +1855,7 @@ MAN_LINKS = NO # Configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that +# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that # captures the structure of the code including all documentation. # The default value is: NO. @@ -1843,7 +1869,7 @@ GENERATE_XML = NO XML_OUTPUT = xml -# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program +# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program # listings (including syntax highlighting and cross-referencing information) to # the XML output. Note that enabling this will significantly increase the size # of the XML output. @@ -1856,7 +1882,7 @@ XML_PROGRAMLISTING = YES # Configuration options related to the DOCBOOK output #--------------------------------------------------------------------------- -# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files +# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files # that can be used to generate PDF. # The default value is: NO. @@ -1870,7 +1896,7 @@ GENERATE_DOCBOOK = NO DOCBOOK_OUTPUT = docbook -# If the DOCBOOK_PROGRAMLISTING tag is set to YES doxygen will include the +# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the # program listings (including syntax highlighting and cross-referencing # information) to the DOCBOOK output. Note that enabling this will significantly # increase the size of the DOCBOOK output. @@ -1883,10 +1909,10 @@ DOCBOOK_PROGRAMLISTING = NO # Configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen -# Definitions (see http://autogen.sf.net) file that captures the structure of -# the code including all documentation. Note that this feature is still -# experimental and incomplete at the moment. +# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an +# AutoGen Definitions (see http://autogen.sf.net) file that captures the +# structure of the code including all documentation. Note that this feature is +# still experimental and incomplete at the moment. # The default value is: NO. GENERATE_AUTOGEN_DEF = NO @@ -1895,7 +1921,7 @@ GENERATE_AUTOGEN_DEF = NO # Configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module +# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module # file that captures the structure of the code including all documentation. # # Note that this feature is still experimental and incomplete at the moment. @@ -1903,7 +1929,7 @@ GENERATE_AUTOGEN_DEF = NO GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary +# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary # Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI # output from the Perl module output. # The default value is: NO. @@ -1911,9 +1937,9 @@ GENERATE_PERLMOD = NO PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely +# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely # formatted so it can be parsed by a human reader. This is useful if you want to -# understand what is going on. On the other hand, if this tag is set to NO the +# understand what is going on. On the other hand, if this tag is set to NO, the # size of the Perl module output will be much smaller and Perl will parse it # just the same. # The default value is: YES. @@ -1933,14 +1959,14 @@ PERLMOD_MAKEVAR_PREFIX = # Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all +# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all # C-preprocessor directives found in the sources and include files. # The default value is: YES. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names -# in the source code. If set to NO only conditional compilation will be +# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names +# in the source code. If set to NO, only conditional compilation will be # performed. Macro expansion can be done in a controlled way by setting # EXPAND_ONLY_PREDEF to YES. # The default value is: NO. @@ -1956,7 +1982,7 @@ MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES -# If the SEARCH_INCLUDES tag is set to YES the includes files in the +# If the SEARCH_INCLUDES tag is set to YES, the include files in the # INCLUDE_PATH will be searched if a #include is found. # The default value is: YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. @@ -2034,20 +2060,21 @@ TAGFILES = GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external class will be listed in the -# class index. If set to NO only the inherited external classes will be listed. +# If the ALLEXTERNALS tag is set to YES, all external class will be listed in +# the class index. If set to NO, only the inherited external classes will be +# listed. # The default value is: NO. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in -# the modules index. If set to NO, only the current project's groups will be +# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will be # listed. # The default value is: YES. EXTERNAL_GROUPS = YES -# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in +# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in # the related pages index. If set to NO, only the current project's pages will # be listed. # The default value is: YES. @@ -2064,7 +2091,7 @@ PERL_PATH = /usr/bin/perl # Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram +# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram # (in HTML and LaTeX) for classes with base or super classes. Setting the tag to # NO turns the diagrams off. Note that this option also works with HAVE_DOT # disabled, but it is recommended to install and use dot, since it yields more @@ -2089,7 +2116,7 @@ MSCGEN_PATH = DIA_PATH = -# If set to YES, the inheritance and collaboration graphs will hide inheritance +# If set to YES the inheritance and collaboration graphs will hide inheritance # and usage relations if the target is undocumented or is not a class. # The default value is: YES. @@ -2162,7 +2189,7 @@ COLLABORATION_GRAPH = NO GROUP_GRAPHS = NO -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. # The default value is: NO. @@ -2300,10 +2327,14 @@ DIAFILE_DIRS = # PlantUML is not used or called during a preprocessing step. Doxygen will # generate a warning when it encounters a \startuml command in this case and # will not generate output for the diagram. -# This tag requires that the tag HAVE_DOT is set to YES. PLANTUML_JAR_PATH = +# When using plantuml, the specified paths are searched for files specified by +# the !include statement in a plantuml block. + +PLANTUML_INCLUDE_PATH = + # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # that will be shown in the graph. If the number of nodes in a graph becomes # larger than this value, doxygen will truncate the graph, which is visualized @@ -2340,7 +2371,7 @@ MAX_DOT_GRAPH_DEPTH = 2 DOT_TRANSPARENT = YES -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) support # this, this feature is disabled by default. @@ -2357,7 +2388,7 @@ DOT_MULTI_TARGETS = NO GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot +# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot # files that are used to generate the various graphs. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/makefile b/lib/lufa/Bootloaders/MassStorage/makefile similarity index 84% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/makefile rename to lib/lufa/Bootloaders/MassStorage/makefile index a0edb2c4f5..f3948e754f 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/MassStorage/makefile +++ b/lib/lufa/Bootloaders/MassStorage/makefile @@ -1,6 +1,6 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2014. +# Copyright (C) Dean Camera, 2017. # # dean [at] fourwalledcubicle [dot] com # www.lufa-lib.org @@ -58,11 +58,18 @@ endif # Default target all: -# Include LUFA build script makefiles -include $(LUFA_PATH)/Build/lufa_core.mk -include $(LUFA_PATH)/Build/lufa_sources.mk -include $(LUFA_PATH)/Build/lufa_build.mk -include $(LUFA_PATH)/Build/lufa_cppcheck.mk -include $(LUFA_PATH)/Build/lufa_doxygen.mk -include $(LUFA_PATH)/Build/lufa_avrdude.mk -include $(LUFA_PATH)/Build/lufa_atprogram.mk +# Include LUFA-specific DMBS extension modules +DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA +include $(DMBS_LUFA_PATH)/lufa-sources.mk +include $(DMBS_LUFA_PATH)/lufa-gcc.mk + +# Include common DMBS build system modules +DMBS_PATH ?= $(LUFA_PATH)/Build/DMBS/DMBS +include $(DMBS_PATH)/core.mk +include $(DMBS_PATH)/cppcheck.mk +include $(DMBS_PATH)/doxygen.mk +include $(DMBS_PATH)/dfu.mk +include $(DMBS_PATH)/gcc.mk +include $(DMBS_PATH)/hid.mk +include $(DMBS_PATH)/avrdude.mk +include $(DMBS_PATH)/atprogram.mk diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderAPI.c b/lib/lufa/Bootloaders/Printer/BootloaderAPI.c similarity index 95% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderAPI.c rename to lib/lufa/Bootloaders/Printer/BootloaderAPI.c index f7564e9827..2be1568082 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderAPI.c +++ b/lib/lufa/Bootloaders/Printer/BootloaderAPI.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderAPI.h b/lib/lufa/Bootloaders/Printer/BootloaderAPI.h similarity index 94% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderAPI.h rename to lib/lufa/Bootloaders/Printer/BootloaderAPI.h index f44ab06c72..c2d9b4a188 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderAPI.h +++ b/lib/lufa/Bootloaders/Printer/BootloaderAPI.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderAPITable.S b/lib/lufa/Bootloaders/Printer/BootloaderAPITable.S similarity index 96% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderAPITable.S rename to lib/lufa/Bootloaders/Printer/BootloaderAPITable.S index 88c51da825..d8358c31ce 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderAPITable.S +++ b/lib/lufa/Bootloaders/Printer/BootloaderAPITable.S @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderPrinter.c b/lib/lufa/Bootloaders/Printer/BootloaderPrinter.c similarity index 86% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderPrinter.c rename to lib/lufa/Bootloaders/Printer/BootloaderPrinter.c index a19cb06746..9021f998f7 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderPrinter.c +++ b/lib/lufa/Bootloaders/Printer/BootloaderPrinter.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -119,9 +119,65 @@ uint16_t MagicBootKey ATTR_NO_INIT; */ void Application_Jump_Check(void) { - /* If the reset source was the bootloader and the key is correct, clear it and jump to the application */ - if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY)) + bool JumpToApplication = false; + + #if (BOARD == BOARD_LEONARDO) + /* Enable pull-up on the IO13 pin so we can use it to select the mode */ + PORTC |= (1 << 7); + Delay_MS(10); + + /* If IO13 is not jumpered to ground, start the user application instead */ + JumpToApplication = ((PINC & (1 << 7)) != 0); + + /* Disable pull-up after the check has completed */ + PORTC &= ~(1 << 7); + #elif ((BOARD == BOARD_XPLAIN) || (BOARD == BOARD_XPLAIN_REV1)) + /* Disable JTAG debugging */ + JTAG_DISABLE(); + + /* Enable pull-up on the JTAG TCK pin so we can use it to select the mode */ + PORTF |= (1 << 4); + Delay_MS(10); + + /* If the TCK pin is not jumpered to ground, start the user application instead */ + JumpToApplication = ((PINF & (1 << 4)) != 0); + + /* Re-enable JTAG debugging */ + JTAG_ENABLE(); + #else + /* Check if the device's BOOTRST fuse is set */ + if (boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS) & FUSE_BOOTRST) + { + /* If the reset source was not an external reset or the key is correct, clear it and jump to the application */ + if (!(MCUSR & (1 << EXTRF)) || (MagicBootKey == MAGIC_BOOT_KEY)) + JumpToApplication = true; + + /* Clear reset source */ + MCUSR &= ~(1 << EXTRF); + } + else + { + /* If the reset source was the bootloader and the key is correct, clear it and jump to the application; + * this can happen in the HWBE fuse is set, and the HBE pin is low during the watchdog reset */ + if ((MCUSR & (1 << WDRF)) && (MagicBootKey == MAGIC_BOOT_KEY)) + JumpToApplication = true; + + /* Clear reset source */ + MCUSR &= ~(1 << WDRF); + } + #endif + + /* Don't run the user application if the reset vector is blank (no app loaded) */ + bool ApplicationValid = (pgm_read_word_near(0) != 0xFFFF); + + /* If a request has been made to jump to the user application, honor it */ + if (JumpToApplication && ApplicationValid) { + /* Turn off the watchdog */ + MCUSR &= ~(1 << WDRF); + wdt_disable(); + + /* Clear the boot key and jump to the user application */ MagicBootKey = 0; // cppcheck-suppress constStatement diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderPrinter.h b/lib/lufa/Bootloaders/Printer/BootloaderPrinter.h similarity index 97% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderPrinter.h rename to lib/lufa/Bootloaders/Printer/BootloaderPrinter.h index d5cec1914d..8bc1a68799 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderPrinter.h +++ b/lib/lufa/Bootloaders/Printer/BootloaderPrinter.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderPrinter.txt b/lib/lufa/Bootloaders/Printer/BootloaderPrinter.txt similarity index 85% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderPrinter.txt rename to lib/lufa/Bootloaders/Printer/BootloaderPrinter.txt index cfa51d4cf8..d9aa79686f 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/BootloaderPrinter.txt +++ b/lib/lufa/Bootloaders/Printer/BootloaderPrinter.txt @@ -56,9 +56,27 @@ * * \section Sec_Running Running the Bootloader * - * This bootloader is designed to be started via the HWB mechanism of the USB AVRs; ground the HWB pin (see device - * datasheet) then momentarily ground /RESET to start the bootloader. This assumes the HWBE fuse is set and the BOOTRST - * fuse is cleared. + * On the USB AVR8 devices, setting the \c HWBE device fuse will cause the bootloader to run if the \c HWB pin of + * the AVR is grounded when the device is reset. + * + * The are two behaviours of this bootloader, depending on the device's fuses: + * + * If the device's BOOTRST fuse is set, the bootloader will run any time the system is reset from + * the external reset pin, unless no valid user application has been loaded. To initiate the bootloader, the + * device's external reset pin should be grounded momentarily. + * + * If the device's BOOTRST fuse is not set, the bootloader will run only if initiated via a software + * jump, or if the \c HWB pin was low during the last device reset (if the \c HWBE fuse is set). + * + * For board specific exceptions to the above, see below. + * + * \subsection SSec_XPLAIN Atmel Xplain Board + * Ground the USB AVR JTAG's \c TCK pin to ground when powering on the board to start the bootloader. This assumes the + * \c HWBE fuse is cleared and the \c BOOTRST fuse is set as the HWBE pin is not user accessible on this board. + * + * \subsection SSec_Leonardo Arduino Leonardo Board + * Ground \c IO13 when powering the board to start the bootloader. This assumes the \c HWBE fuse is cleared and the + * \c BOOTRST fuse is set as the HWBE pin is not user accessible on this board. * * \section Sec_Installation Driver Installation * @@ -169,12 +187,6 @@ * are unable to handle true plain-text printing. For best results, the low * level \c lpr command should be used to print new firmware to the bootloader. * - * \par After loading an application, it is not run automatically on startup. - * Some USB AVR boards ship with the BOOTRST fuse set, causing the bootloader - * to run automatically when the device is reset. In most cases, the BOOTRST - * fuse should be disabled and the HWBE fuse used instead to run the bootloader - * when needed. - * * \section Sec_Options Project Options * * The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value. diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/Config/LUFAConfig.h b/lib/lufa/Bootloaders/Printer/Config/LUFAConfig.h similarity index 96% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/Config/LUFAConfig.h rename to lib/lufa/Bootloaders/Printer/Config/LUFAConfig.h index af2dd3060e..5aa0e765bf 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/CDC/Config/LUFAConfig.h +++ b/lib/lufa/Bootloaders/Printer/Config/LUFAConfig.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/Descriptors.c b/lib/lufa/Bootloaders/Printer/Descriptors.c similarity index 97% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/Descriptors.c rename to lib/lufa/Bootloaders/Printer/Descriptors.c index 187f7733d6..99625d605a 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/Descriptors.c +++ b/lib/lufa/Bootloaders/Printer/Descriptors.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -149,7 +149,7 @@ const USB_Descriptor_String_t ProductString = USB_STRING_DESCRIPTOR(L"LUFA Print * USB host. */ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, - const uint8_t wIndex, + const uint16_t wIndex, const void** const DescriptorAddress) { const uint8_t DescriptorType = (wValue >> 8); diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/Descriptors.h b/lib/lufa/Bootloaders/Printer/Descriptors.h similarity index 95% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/Descriptors.h rename to lib/lufa/Bootloaders/Printer/Descriptors.h index 144ca0660d..adb0dddb64 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/Descriptors.h +++ b/lib/lufa/Bootloaders/Printer/Descriptors.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -88,7 +88,7 @@ /* Function Prototypes: */ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, - const uint8_t wIndex, + const uint16_t wIndex, const void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/asf.xml b/lib/lufa/Bootloaders/Printer/asf.xml similarity index 100% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/asf.xml rename to lib/lufa/Bootloaders/Printer/asf.xml diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/doxyfile b/lib/lufa/Bootloaders/Printer/doxyfile similarity index 92% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/doxyfile rename to lib/lufa/Bootloaders/Printer/doxyfile index a81be54f46..0f96bb9b73 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/doxyfile +++ b/lib/lufa/Bootloaders/Printer/doxyfile @@ -1,4 +1,4 @@ -# Doxyfile 1.8.8 +# Doxyfile 1.8.9 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. @@ -46,10 +46,10 @@ PROJECT_NUMBER = PROJECT_BRIEF = -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. PROJECT_LOGO = @@ -60,7 +60,7 @@ PROJECT_LOGO = OUTPUT_DIRECTORY = ./Documentation/ -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where @@ -93,14 +93,14 @@ ALLOW_UNICODE_NAMES = NO OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the @@ -145,7 +145,7 @@ ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. @@ -215,9 +215,9 @@ MULTILINE_CPP_IS_BRIEF = NO INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the documentation of a member will be -# part of the file/class/namespace that contains it. +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO @@ -286,7 +286,7 @@ OPTIMIZE_OUTPUT_VHDL = NO # instance to make doxygen treat .inc files as Fortran files (default is PHP), # and .f files as C (default is Fortran), use: inc=Fortran f=C. # -# Note For files without extension you can use no_extension as a placeholder. +# Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. @@ -305,8 +305,8 @@ MARKDOWN_SUPPORT = NO # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES @@ -346,7 +346,7 @@ SIP_SUPPORT = NO IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first +# tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. @@ -411,7 +411,7 @@ LOOKUP_CACHE_SIZE = 0 # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. @@ -421,35 +421,35 @@ LOOKUP_CACHE_SIZE = 0 EXTRACT_ALL = YES -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = YES -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = YES -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local methods, +# This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO only methods in the interface are +# included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. @@ -474,21 +474,21 @@ HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set -# to NO these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO these declarations will be +# (class|struct|union) declarations. If set to NO, these declarations will be # included in the documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO these +# documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. @@ -502,7 +502,7 @@ HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also +# names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. @@ -511,12 +511,19 @@ INTERNAL_DOCS = NO CASE_SENSE_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES the +# their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. @@ -544,14 +551,14 @@ INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. +# name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. Note that +# name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. @@ -596,27 +603,25 @@ SORT_BY_SCOPE_NAME = NO STRICT_PROTO_MATCHING = NO -# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the -# todo list. This list is created by putting \todo commands in the -# documentation. +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = NO -# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the -# test list. This list is created by putting \test commands in the -# documentation. +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = NO -# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = NO -# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. @@ -641,8 +646,8 @@ ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES the list -# will mention the files that were used to generate the documentation. +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES @@ -706,7 +711,7 @@ CITE_BIB_FILES = QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. @@ -714,7 +719,7 @@ QUIET = YES WARNINGS = YES -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. @@ -731,8 +736,8 @@ WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return -# value. If set to NO doxygen will only warn about wrong or incomplete parameter -# documentation, but not about the absence of documentation. +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. # The default value is: NO. WARN_NO_PARAMDOC = YES @@ -883,7 +888,7 @@ INPUT_FILTER = FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for +# INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. @@ -943,7 +948,7 @@ REFERENCED_BY_RELATION = NO REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. @@ -990,7 +995,7 @@ USE_HTAGS = NO VERBATIM_HEADERS = NO -# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the # clang parser (see: http://clang.llvm.org/) for more accurate parsing at the # cost of reduced performance. This can be particularly helpful with template # rich C++ code for which doxygen's built-in parser lacks the necessary type @@ -1039,7 +1044,7 @@ IGNORE_PREFIX = # Configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES @@ -1105,10 +1110,10 @@ HTML_STYLESHEET = # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefor more robust against future updates. +# standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra stylesheet files is of importance (e.g. the last -# stylesheet in the list overrules the setting of the previous ones in the +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1125,7 +1130,7 @@ HTML_EXTRA_STYLESHEET = HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to +# will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # http://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 @@ -1253,28 +1258,28 @@ GENERATE_HTMLHELP = NO CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = -# The GENERATE_CHI flag controls if a separate .chi index file is generated ( -# YES) or that it should be included in the master .chm file ( NO). +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = -# The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. @@ -1388,7 +1393,7 @@ DISABLE_INDEX = YES # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has @@ -1416,7 +1421,7 @@ ENUM_VALUES_PER_LINE = 1 TREEVIEW_WIDTH = 250 -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. @@ -1445,7 +1450,7 @@ FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. @@ -1531,7 +1536,7 @@ SERVER_BASED_SEARCH = NO # external search engine pointed to by the SEARCHENGINE_URL option to obtain the # search results. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). # @@ -1544,7 +1549,7 @@ EXTERNAL_SEARCH = NO # The SEARCHENGINE_URL should point to a search engine hosted by a web server # which will return the search results when EXTERNAL_SEARCH is enabled. # -# Doxygen ships with an example indexer ( doxyindexer) and search engine +# Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library # Xapian (see: http://xapian.org/). See the section "External Indexing and # Searching" for details. @@ -1582,7 +1587,7 @@ EXTRA_SEARCH_MAPPINGS = # Configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output. +# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. # The default value is: YES. GENERATE_LATEX = NO @@ -1613,7 +1618,7 @@ LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX +# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1648,9 +1653,9 @@ EXTRA_PACKAGES = # Note: Only use a user-defined header if you know what you are doing! The # following commands have a special meaning inside the header: $title, # $datetime, $date, $doxygenversion, $projectname, $projectnumber, -# $projectbrief, $projectlogo. Doxygen will replace $title with the empy string, -# for the replacement values of the other commands the user is refered to -# HTML_HEADER. +# $projectbrief, $projectlogo. Doxygen will replace $title with the empty +# string, for the replacement values of the other commands the user is referred +# to HTML_HEADER. # This tag requires that the tag GENERATE_LATEX is set to YES. LATEX_HEADER = @@ -1666,6 +1671,17 @@ LATEX_HEADER = LATEX_FOOTER = +# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# LaTeX style sheets that are included after the standard style sheets created +# by doxygen. Using this option one can overrule certain style aspects. Doxygen +# will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). +# This tag requires that the tag GENERATE_LATEX is set to YES. + +LATEX_EXTRA_STYLESHEET = + # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the LATEX_OUTPUT output # directory. Note that the files will be copied as-is; there are no commands or @@ -1684,7 +1700,7 @@ LATEX_EXTRA_FILES = PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate -# the PDF file directly from the LaTeX files. Set this option to YES to get a +# the PDF file directly from the LaTeX files. Set this option to YES, to get a # higher quality PDF documentation. # The default value is: YES. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -1729,7 +1745,7 @@ LATEX_BIB_STYLE = plain # Configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The +# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The # RTF output is optimized for Word 97 and may not look too pretty with other RTF # readers/editors. # The default value is: NO. @@ -1744,7 +1760,7 @@ GENERATE_RTF = NO RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF +# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF # documents. This may be useful for small projects and may help to save some # trees in general. # The default value is: NO. @@ -1781,11 +1797,21 @@ RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = +# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code +# with syntax highlighting in the RTF output. +# +# Note that which sources are shown also depends on other settings such as +# SOURCE_BROWSER. +# The default value is: NO. +# This tag requires that the tag GENERATE_RTF is set to YES. + +RTF_SOURCE_CODE = NO + #--------------------------------------------------------------------------- # Configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for +# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for # classes and files. # The default value is: NO. @@ -1829,7 +1855,7 @@ MAN_LINKS = NO # Configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that +# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that # captures the structure of the code including all documentation. # The default value is: NO. @@ -1843,7 +1869,7 @@ GENERATE_XML = NO XML_OUTPUT = xml -# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program +# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program # listings (including syntax highlighting and cross-referencing information) to # the XML output. Note that enabling this will significantly increase the size # of the XML output. @@ -1856,7 +1882,7 @@ XML_PROGRAMLISTING = YES # Configuration options related to the DOCBOOK output #--------------------------------------------------------------------------- -# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files +# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files # that can be used to generate PDF. # The default value is: NO. @@ -1870,7 +1896,7 @@ GENERATE_DOCBOOK = NO DOCBOOK_OUTPUT = docbook -# If the DOCBOOK_PROGRAMLISTING tag is set to YES doxygen will include the +# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the # program listings (including syntax highlighting and cross-referencing # information) to the DOCBOOK output. Note that enabling this will significantly # increase the size of the DOCBOOK output. @@ -1883,10 +1909,10 @@ DOCBOOK_PROGRAMLISTING = NO # Configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen -# Definitions (see http://autogen.sf.net) file that captures the structure of -# the code including all documentation. Note that this feature is still -# experimental and incomplete at the moment. +# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an +# AutoGen Definitions (see http://autogen.sf.net) file that captures the +# structure of the code including all documentation. Note that this feature is +# still experimental and incomplete at the moment. # The default value is: NO. GENERATE_AUTOGEN_DEF = NO @@ -1895,7 +1921,7 @@ GENERATE_AUTOGEN_DEF = NO # Configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module +# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module # file that captures the structure of the code including all documentation. # # Note that this feature is still experimental and incomplete at the moment. @@ -1903,7 +1929,7 @@ GENERATE_AUTOGEN_DEF = NO GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary +# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary # Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI # output from the Perl module output. # The default value is: NO. @@ -1911,9 +1937,9 @@ GENERATE_PERLMOD = NO PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely +# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely # formatted so it can be parsed by a human reader. This is useful if you want to -# understand what is going on. On the other hand, if this tag is set to NO the +# understand what is going on. On the other hand, if this tag is set to NO, the # size of the Perl module output will be much smaller and Perl will parse it # just the same. # The default value is: YES. @@ -1933,14 +1959,14 @@ PERLMOD_MAKEVAR_PREFIX = # Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all +# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all # C-preprocessor directives found in the sources and include files. # The default value is: YES. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names -# in the source code. If set to NO only conditional compilation will be +# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names +# in the source code. If set to NO, only conditional compilation will be # performed. Macro expansion can be done in a controlled way by setting # EXPAND_ONLY_PREDEF to YES. # The default value is: NO. @@ -1956,7 +1982,7 @@ MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES -# If the SEARCH_INCLUDES tag is set to YES the includes files in the +# If the SEARCH_INCLUDES tag is set to YES, the include files in the # INCLUDE_PATH will be searched if a #include is found. # The default value is: YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. @@ -2034,20 +2060,21 @@ TAGFILES = GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external class will be listed in the -# class index. If set to NO only the inherited external classes will be listed. +# If the ALLEXTERNALS tag is set to YES, all external class will be listed in +# the class index. If set to NO, only the inherited external classes will be +# listed. # The default value is: NO. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in -# the modules index. If set to NO, only the current project's groups will be +# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will be # listed. # The default value is: YES. EXTERNAL_GROUPS = YES -# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in +# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in # the related pages index. If set to NO, only the current project's pages will # be listed. # The default value is: YES. @@ -2064,7 +2091,7 @@ PERL_PATH = /usr/bin/perl # Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram +# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram # (in HTML and LaTeX) for classes with base or super classes. Setting the tag to # NO turns the diagrams off. Note that this option also works with HAVE_DOT # disabled, but it is recommended to install and use dot, since it yields more @@ -2089,7 +2116,7 @@ MSCGEN_PATH = DIA_PATH = -# If set to YES, the inheritance and collaboration graphs will hide inheritance +# If set to YES the inheritance and collaboration graphs will hide inheritance # and usage relations if the target is undocumented or is not a class. # The default value is: YES. @@ -2162,7 +2189,7 @@ COLLABORATION_GRAPH = NO GROUP_GRAPHS = NO -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. # The default value is: NO. @@ -2300,10 +2327,14 @@ DIAFILE_DIRS = # PlantUML is not used or called during a preprocessing step. Doxygen will # generate a warning when it encounters a \startuml command in this case and # will not generate output for the diagram. -# This tag requires that the tag HAVE_DOT is set to YES. PLANTUML_JAR_PATH = +# When using plantuml, the specified paths are searched for files specified by +# the !include statement in a plantuml block. + +PLANTUML_INCLUDE_PATH = + # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # that will be shown in the graph. If the number of nodes in a graph becomes # larger than this value, doxygen will truncate the graph, which is visualized @@ -2340,7 +2371,7 @@ MAX_DOT_GRAPH_DEPTH = 2 DOT_TRANSPARENT = YES -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) support # this, this feature is disabled by default. @@ -2357,7 +2388,7 @@ DOT_MULTI_TARGETS = NO GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot +# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot # files that are used to generate the various graphs. # The default value is: YES. # This tag requires that the tag HAVE_DOT is set to YES. diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/makefile b/lib/lufa/Bootloaders/Printer/makefile similarity index 78% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/makefile rename to lib/lufa/Bootloaders/Printer/makefile index 0db035de3b..1de35bba02 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/Printer/makefile +++ b/lib/lufa/Bootloaders/Printer/makefile @@ -1,6 +1,6 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2014. +# Copyright (C) Dean Camera, 2017. # # dean [at] fourwalledcubicle [dot] com # www.lufa-lib.org @@ -45,11 +45,18 @@ BOOT_API_LD_FLAGS += $(call BOOT_SECTION_LD_FLAG, .apitable_signatures, Boot # Default target all: -# Include LUFA build script makefiles -include $(LUFA_PATH)/Build/lufa_core.mk -include $(LUFA_PATH)/Build/lufa_sources.mk -include $(LUFA_PATH)/Build/lufa_build.mk -include $(LUFA_PATH)/Build/lufa_cppcheck.mk -include $(LUFA_PATH)/Build/lufa_doxygen.mk -include $(LUFA_PATH)/Build/lufa_avrdude.mk -include $(LUFA_PATH)/Build/lufa_atprogram.mk +# Include LUFA-specific DMBS extension modules +DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA +include $(DMBS_LUFA_PATH)/lufa-sources.mk +include $(DMBS_LUFA_PATH)/lufa-gcc.mk + +# Include common DMBS build system modules +DMBS_PATH ?= $(LUFA_PATH)/Build/DMBS/DMBS +include $(DMBS_PATH)/core.mk +include $(DMBS_PATH)/cppcheck.mk +include $(DMBS_PATH)/doxygen.mk +include $(DMBS_PATH)/dfu.mk +include $(DMBS_PATH)/gcc.mk +include $(DMBS_PATH)/hid.mk +include $(DMBS_PATH)/avrdude.mk +include $(DMBS_PATH)/atprogram.mk diff --git a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/makefile b/lib/lufa/Bootloaders/makefile similarity index 97% rename from tmk_core/protocol/lufa/LUFA-git/Bootloaders/makefile rename to lib/lufa/Bootloaders/makefile index 885b17029e..e030ad44ab 100644 --- a/tmk_core/protocol/lufa/LUFA-git/Bootloaders/makefile +++ b/lib/lufa/Bootloaders/makefile @@ -1,6 +1,6 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2014. +# Copyright (C) Dean Camera, 2017. # # dean [at] fourwalledcubicle [dot] com # www.lufa-lib.org diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/Board/Board.h b/lib/lufa/BuildTests/BoardDriverTest/Board/Board.h similarity index 96% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/Board/Board.h rename to lib/lufa/BuildTests/BoardDriverTest/Board/Board.h index 2eb2c536a7..33b65fe4cd 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/Board/Board.h +++ b/lib/lufa/BuildTests/BoardDriverTest/Board/Board.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/Board/Buttons.h b/lib/lufa/BuildTests/BoardDriverTest/Board/Buttons.h similarity index 96% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/Board/Buttons.h rename to lib/lufa/BuildTests/BoardDriverTest/Board/Buttons.h index b14388527a..c1a23ef087 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/Board/Buttons.h +++ b/lib/lufa/BuildTests/BoardDriverTest/Board/Buttons.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/Board/Dataflash.h b/lib/lufa/BuildTests/BoardDriverTest/Board/Dataflash.h similarity index 98% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/Board/Dataflash.h rename to lib/lufa/BuildTests/BoardDriverTest/Board/Dataflash.h index f32e398eab..86726a2923 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/Board/Dataflash.h +++ b/lib/lufa/BuildTests/BoardDriverTest/Board/Dataflash.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/Board/Joystick.h b/lib/lufa/BuildTests/BoardDriverTest/Board/Joystick.h similarity index 96% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/Board/Joystick.h rename to lib/lufa/BuildTests/BoardDriverTest/Board/Joystick.h index 4aa45ab67c..86a7d7681d 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/Board/Joystick.h +++ b/lib/lufa/BuildTests/BoardDriverTest/Board/Joystick.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/Board/LEDs.h b/lib/lufa/BuildTests/BoardDriverTest/Board/LEDs.h similarity index 97% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/Board/LEDs.h rename to lib/lufa/BuildTests/BoardDriverTest/Board/LEDs.h index a146e99c3b..548d24232c 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/Board/LEDs.h +++ b/lib/lufa/BuildTests/BoardDriverTest/Board/LEDs.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/BoardDeviceMap.cfg b/lib/lufa/BuildTests/BoardDriverTest/BoardDeviceMap.cfg similarity index 96% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/BoardDeviceMap.cfg rename to lib/lufa/BuildTests/BoardDriverTest/BoardDeviceMap.cfg index 3fee2f1e3f..c12050941d 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/BoardDeviceMap.cfg +++ b/lib/lufa/BuildTests/BoardDriverTest/BoardDeviceMap.cfg @@ -1,6 +1,6 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2014. +# Copyright (C) Dean Camera, 2017. # # dean [at] fourwalledcubicle [dot] com # www.lufa-lib.org @@ -73,6 +73,8 @@ BOARD_STANGE_ISP = AVR8 : at90usb162 : BOARD_U2S = AVR8 : atmega32u2 : BOARD_YUN = AVR8 : atmega32u4 : BOARD_MICRO = AVR8 : atmega32u4 : +BOARD_POLOLUMICRO = AVR8 : atmega32u4 : +BOARD_XPLAINED_MINI = AVR8 : atmega32u4 : # # ----------------- XMEGA Boards ----------------- BOARD_A3BU_XPLAINED = XMEGA : atxmega256a3bu : diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/Test.c b/lib/lufa/BuildTests/BoardDriverTest/Test.c similarity index 97% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/Test.c rename to lib/lufa/BuildTests/BoardDriverTest/Test.c index 0105886b22..8baa4460ba 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/Test.c +++ b/lib/lufa/BuildTests/BoardDriverTest/Test.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/makefile b/lib/lufa/BuildTests/BoardDriverTest/makefile similarity index 94% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/makefile rename to lib/lufa/BuildTests/BoardDriverTest/makefile index cfd9da7981..8414d91862 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/makefile +++ b/lib/lufa/BuildTests/BoardDriverTest/makefile @@ -1,6 +1,6 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2014. +# Copyright (C) Dean Camera, 2017. # # dean [at] fourwalledcubicle [dot] com # www.lufa-lib.org @@ -64,5 +64,6 @@ clean: .PHONY: all begin end makeboardlist testboards clean -# Include LUFA build script makefiles -include $(LUFA_PATH)/Build/lufa_core.mk +# Include common DMBS build system modules +DMBS_PATH ?= $(LUFA_PATH)/Build/DMBS/DMBS +include $(DMBS_PATH)/core.mk diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/makefile.test b/lib/lufa/BuildTests/BoardDriverTest/makefile.test similarity index 57% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/makefile.test rename to lib/lufa/BuildTests/BoardDriverTest/makefile.test index 7391b514a7..373a15e753 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BoardDriverTest/makefile.test +++ b/lib/lufa/BuildTests/BoardDriverTest/makefile.test @@ -1,6 +1,6 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2014. +# Copyright (C) Dean Camera, 2017. # # dean [at] fourwalledcubicle [dot] com # www.lufa-lib.org @@ -23,5 +23,13 @@ LUFA_PATH = ../../LUFA CC_FLAGS = -Werror DEBUG_LEVEL = 0 -# Include LUFA build script makefiles -include $(LUFA_PATH)/Build/lufa_build.mk + +# Include LUFA-specific DMBS extension modules +DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA +include $(DMBS_LUFA_PATH)/lufa-sources.mk +include $(DMBS_LUFA_PATH)/lufa-gcc.mk + +# Include common DMBS build system modules +DMBS_PATH ?= $(LUFA_PATH)/Build/DMBS/DMBS +include $(DMBS_PATH)/core.mk +include $(DMBS_PATH)/gcc.mk diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BootloaderTest/BootloaderDeviceMap.cfg b/lib/lufa/BuildTests/BootloaderTest/BootloaderDeviceMap.cfg similarity index 99% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/BootloaderTest/BootloaderDeviceMap.cfg rename to lib/lufa/BuildTests/BootloaderTest/BootloaderDeviceMap.cfg index 9e15c8cf45..e02d0a30d4 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BootloaderTest/BootloaderDeviceMap.cfg +++ b/lib/lufa/BuildTests/BootloaderTest/BootloaderDeviceMap.cfg @@ -1,6 +1,6 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2014. +# Copyright (C) Dean Camera, 2017. # # dean [at] fourwalledcubicle [dot] com # www.lufa-lib.org diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BootloaderTest/makefile b/lib/lufa/BuildTests/BootloaderTest/makefile similarity index 94% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/BootloaderTest/makefile rename to lib/lufa/BuildTests/BootloaderTest/makefile index 52ebb9cdb7..34bdf1b364 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/BootloaderTest/makefile +++ b/lib/lufa/BuildTests/BootloaderTest/makefile @@ -1,6 +1,6 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2014. +# Copyright (C) Dean Camera, 2017. # # dean [at] fourwalledcubicle [dot] com # www.lufa-lib.org @@ -60,5 +60,6 @@ clean: .PHONY: all begin end testbootloaders clean -# Include LUFA build script makefiles -include $(LUFA_PATH)/Build/lufa_core.mk +# Include common DMBS build system modules +DMBS_PATH ?= $(LUFA_PATH)/Build/DMBS/DMBS +include $(DMBS_PATH)/core.mk diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/Dummy.S b/lib/lufa/BuildTests/ModuleTest/Dummy.S similarity index 92% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/Dummy.S rename to lib/lufa/BuildTests/ModuleTest/Dummy.S index dcfe981868..b44cf4c256 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/Dummy.S +++ b/lib/lufa/BuildTests/ModuleTest/Dummy.S @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/Modules.h b/lib/lufa/BuildTests/ModuleTest/Modules.h similarity index 94% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/Modules.h rename to lib/lufa/BuildTests/ModuleTest/Modules.h index cc16fd6b95..686183245d 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/Modules.h +++ b/lib/lufa/BuildTests/ModuleTest/Modules.h @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/Test_C.c b/lib/lufa/BuildTests/ModuleTest/Test_C.c similarity index 91% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/Test_C.c rename to lib/lufa/BuildTests/ModuleTest/Test_C.c index 349ac6eec3..3c3f5a2ab7 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/Test_C.c +++ b/lib/lufa/BuildTests/ModuleTest/Test_C.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/Test_CPP.cpp b/lib/lufa/BuildTests/ModuleTest/Test_CPP.cpp similarity index 91% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/Test_CPP.cpp rename to lib/lufa/BuildTests/ModuleTest/Test_CPP.cpp index 349ac6eec3..3c3f5a2ab7 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/Test_CPP.cpp +++ b/lib/lufa/BuildTests/ModuleTest/Test_CPP.cpp @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/makefile b/lib/lufa/BuildTests/ModuleTest/makefile similarity index 92% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/makefile rename to lib/lufa/BuildTests/ModuleTest/makefile index 2cd33cf871..50f1909a38 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/makefile +++ b/lib/lufa/BuildTests/ModuleTest/makefile @@ -1,6 +1,6 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2014. +# Copyright (C) Dean Camera, 2017. # # dean [at] fourwalledcubicle [dot] com # www.lufa-lib.org @@ -62,5 +62,6 @@ clean: .PHONY: all arch_avr8 arch_xmega arch_uc3 begin end -# Include LUFA build script makefiles -include $(LUFA_PATH)/Build/lufa_core.mk +# Include common DMBS build system modules +DMBS_PATH ?= $(LUFA_PATH)/Build/DMBS/DMBS +include $(DMBS_PATH)/core.mk diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/makefile.test b/lib/lufa/BuildTests/ModuleTest/makefile.test similarity index 84% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/makefile.test rename to lib/lufa/BuildTests/ModuleTest/makefile.test index 1307d5e370..5eeb40398c 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/ModuleTest/makefile.test +++ b/lib/lufa/BuildTests/ModuleTest/makefile.test @@ -1,6 +1,6 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2014. +# Copyright (C) Dean Camera, 2017. # # dean [at] fourwalledcubicle [dot] com # www.lufa-lib.org @@ -75,7 +75,7 @@ ifneq ($(ARCH), UC3) endif # Only check C++ compatibility on the build files, to ensure headers are C++ compatible -Test_C.c Test_CPP.c: CC_FLAGS += -Wc++-compat +Test_C.c Test_CPP.cpp: CC_FLAGS += -Wc++-compat # Potential additional warnings to enable in the future (FIXME) #CC_FLAGS += -Wcast-qual @@ -83,6 +83,12 @@ Test_C.c Test_CPP.c: CC_FLAGS += -Wc++-compat #CC_FLAGS += -Wsign-conversion #CC_FLAGS += -pedantic -# Include LUFA build script makefiles -include $(LUFA_PATH)/Build/lufa_sources.mk -include $(LUFA_PATH)/Build/lufa_build.mk +# Include LUFA-specific DMBS extension modules +DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA +include $(DMBS_LUFA_PATH)/lufa-sources.mk +include $(DMBS_LUFA_PATH)/lufa-gcc.mk + +# Include common DMBS build system modules +DMBS_PATH ?= $(LUFA_PATH)/Build/DMBS/DMBS +include $(DMBS_PATH)/core.mk +include $(DMBS_PATH)/gcc.mk diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/Dummy.S b/lib/lufa/BuildTests/SingleUSBModeTest/Dummy.S similarity index 93% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/Dummy.S rename to lib/lufa/BuildTests/SingleUSBModeTest/Dummy.S index b5655add56..1be4228d2d 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/Dummy.S +++ b/lib/lufa/BuildTests/SingleUSBModeTest/Dummy.S @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/Test.c b/lib/lufa/BuildTests/SingleUSBModeTest/Test.c similarity index 91% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/Test.c rename to lib/lufa/BuildTests/SingleUSBModeTest/Test.c index 7a83794df6..7ac2e008f3 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/Test.c +++ b/lib/lufa/BuildTests/SingleUSBModeTest/Test.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2014. + Copyright (C) Dean Camera, 2017. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* - Copyright 2014 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/makefile b/lib/lufa/BuildTests/SingleUSBModeTest/makefile similarity index 90% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/makefile rename to lib/lufa/BuildTests/SingleUSBModeTest/makefile index cd88754db3..7921ab6ca2 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/makefile +++ b/lib/lufa/BuildTests/SingleUSBModeTest/makefile @@ -1,6 +1,6 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2014. +# Copyright (C) Dean Camera, 2017. # # dean [at] fourwalledcubicle [dot] com # www.lufa-lib.org @@ -52,5 +52,6 @@ clean: .PHONY: begin end compile clean -# Include LUFA build script makefiles -include $(LUFA_PATH)/Build/lufa_core.mk +# Include common DMBS build system modules +DMBS_PATH ?= $(LUFA_PATH)/Build/DMBS/DMBS +include $(DMBS_PATH)/core.mk diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/makefile.test b/lib/lufa/BuildTests/SingleUSBModeTest/makefile.test similarity index 80% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/makefile.test rename to lib/lufa/BuildTests/SingleUSBModeTest/makefile.test index 242e530ea3..365c7d00b5 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/SingleUSBModeTest/makefile.test +++ b/lib/lufa/BuildTests/SingleUSBModeTest/makefile.test @@ -1,6 +1,6 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2014. +# Copyright (C) Dean Camera, 2017. # # dean [at] fourwalledcubicle [dot] com # www.lufa-lib.org @@ -64,6 +64,12 @@ C_FLAGS += -Wnested-externs #CC_FLAGS += -Wjump-misses-init #CC_FLAGS += -pedantic -# Include LUFA build script makefiles -include $(LUFA_PATH)/Build/lufa_sources.mk -include $(LUFA_PATH)/Build/lufa_build.mk +# Include LUFA-specific DMBS extension modules +DMBS_LUFA_PATH ?= $(LUFA_PATH)/Build/LUFA +include $(DMBS_LUFA_PATH)/lufa-sources.mk +include $(DMBS_LUFA_PATH)/lufa-gcc.mk + +# Include common DMBS build system modules +DMBS_PATH ?= $(LUFA_PATH)/Build/DMBS/DMBS +include $(DMBS_PATH)/core.mk +include $(DMBS_PATH)/gcc.mk diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/StaticAnalysisTest/makefile b/lib/lufa/BuildTests/StaticAnalysisTest/makefile similarity index 83% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/StaticAnalysisTest/makefile rename to lib/lufa/BuildTests/StaticAnalysisTest/makefile index f5dc1c007d..0041234d19 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/StaticAnalysisTest/makefile +++ b/lib/lufa/BuildTests/StaticAnalysisTest/makefile @@ -1,6 +1,6 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2014. +# Copyright (C) Dean Camera, 2017. # # dean [at] fourwalledcubicle [dot] com # www.lufa-lib.org @@ -39,9 +39,9 @@ end: %: - .PHONY: all begin end -# Include LUFA build script makefiles -include $(LUFA_PATH)/Build/lufa_core.mk -include $(LUFA_PATH)/Build/lufa_cppcheck.mk +# Include common DMBS build system modules +DMBS_PATH ?= $(LUFA_PATH)/Build/DMBS/DMBS +include $(DMBS_PATH)/core.mk +include $(DMBS_PATH)/cppcheck.mk diff --git a/tmk_core/protocol/lufa/LUFA-git/BuildTests/makefile b/lib/lufa/BuildTests/makefile similarity index 93% rename from tmk_core/protocol/lufa/LUFA-git/BuildTests/makefile rename to lib/lufa/BuildTests/makefile index 1f09b3fec6..369ea9ad29 100644 --- a/tmk_core/protocol/lufa/LUFA-git/BuildTests/makefile +++ b/lib/lufa/BuildTests/makefile @@ -1,6 +1,6 @@ # # LUFA Library -# Copyright (C) Dean Camera, 2014. +# Copyright (C) Dean Camera, 2017. # # dean [at] fourwalledcubicle [dot] com # www.lufa-lib.org diff --git a/lib/lufa/Demos/Device/ClassDriver/AudioInput/AudioInput.c b/lib/lufa/Demos/Device/ClassDriver/AudioInput/AudioInput.c new file mode 100644 index 0000000000..2870bcd6f7 --- /dev/null +++ b/lib/lufa/Demos/Device/ClassDriver/AudioInput/AudioInput.c @@ -0,0 +1,274 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2017. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaims all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * + * Main source file for the AudioInput demo. This file contains the main tasks of + * the demo and is responsible for the initial application hardware configuration. + */ + +#include "AudioInput.h" + +/** LUFA Audio Class driver interface configuration and state information. This structure is + * passed to all Audio Class driver functions, so that multiple instances of the same class + * within a device can be differentiated from one another. + */ +USB_ClassInfo_Audio_Device_t Microphone_Audio_Interface = + { + .Config = + { + .ControlInterfaceNumber = INTERFACE_ID_AudioControl, + .StreamingInterfaceNumber = INTERFACE_ID_AudioStream, + .DataINEndpoint = + { + .Address = AUDIO_STREAM_EPADDR, + .Size = AUDIO_STREAM_EPSIZE, + .Banks = 2, + }, + }, + }; + +/** Current audio sampling frequency of the streaming audio endpoint. */ +static uint32_t CurrentAudioSampleFrequency = 48000; + + +/** Main program entry point. This routine contains the overall program flow, including initial + * setup of all components and the main program loop. + */ +int main(void) +{ + SetupHardware(); + + LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + GlobalInterruptEnable(); + + for (;;) + { + Audio_Device_USBTask(&Microphone_Audio_Interface); + USB_USBTask(); + } +} + +/** Configures the board hardware and chip peripherals for the demo's functionality. */ +void SetupHardware(void) +{ +#if (ARCH == ARCH_AVR8) + /* Disable watchdog if enabled by bootloader/fuses */ + MCUSR &= ~(1 << WDRF); + wdt_disable(); + + /* Disable clock division */ + clock_prescale_set(clock_div_1); +#endif + + /* Hardware Initialization */ + LEDs_Init(); + Buttons_Init(); + ADC_Init(ADC_FREE_RUNNING | ADC_PRESCALE_32); + ADC_SetupChannel(MIC_IN_ADC_CHANNEL); + USB_Init(); + + /* Start the ADC conversion in free running mode */ + ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | ADC_GET_CHANNEL_MASK(MIC_IN_ADC_CHANNEL)); +} + +/** ISR to handle the reloading of the data endpoint with the next sample. */ +ISR(TIMER0_COMPA_vect, ISR_BLOCK) +{ + uint8_t PrevEndpoint = Endpoint_GetCurrentEndpoint(); + + /* Check that the USB bus is ready for the next sample to write */ + if (Audio_Device_IsReadyForNextSample(&Microphone_Audio_Interface)) + { + int16_t AudioSample; + + #if defined(USE_TEST_TONE) + static uint8_t SquareWaveSampleCount; + static int16_t CurrentWaveValue; + + /* In test tone mode, generate a square wave at 1/256 of the sample rate */ + if (SquareWaveSampleCount++ == 0xFF) + CurrentWaveValue ^= 0x8000; + + /* Only generate audio if the board button is being pressed */ + AudioSample = (Buttons_GetStatus() & BUTTONS_BUTTON1) ? CurrentWaveValue : 0; + #else + /* Audio sample is ADC value scaled to fit the entire range */ + AudioSample = ((SAMPLE_MAX_RANGE / ADC_MAX_RANGE) * ADC_GetResult()); + + #if defined(MICROPHONE_BIASED_TO_HALF_RAIL) + /* Microphone is biased to half rail voltage, subtract the bias from the sample value */ + AudioSample -= (SAMPLE_MAX_RANGE / 2); + #endif + #endif + + Audio_Device_WriteSample16(&Microphone_Audio_Interface, AudioSample); + } + + Endpoint_SelectEndpoint(PrevEndpoint); +} + +/** Event handler for the library USB Connection event. */ +void EVENT_USB_Device_Connect(void) +{ + LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING); + + /* Sample reload timer initialization */ + TIMSK0 = (1 << OCIE0A); + OCR0A = ((F_CPU / 8 / CurrentAudioSampleFrequency) - 1); + TCCR0A = (1 << WGM01); // CTC mode + TCCR0B = (1 << CS01); // Fcpu/8 speed +} + +/** Event handler for the library USB Disconnection event. */ +void EVENT_USB_Device_Disconnect(void) +{ + /* Stop the sample reload timer */ + TCCR0B = 0; + + LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); +} + +/** Event handler for the library USB Configuration Changed event. */ +void EVENT_USB_Device_ConfigurationChanged(void) +{ + bool ConfigSuccess = true; + + ConfigSuccess &= Audio_Device_ConfigureEndpoints(&Microphone_Audio_Interface); + + LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR); +} + +/** Event handler for the library USB Control Request reception event. */ +void EVENT_USB_Device_ControlRequest(void) +{ + Audio_Device_ProcessControlRequest(&Microphone_Audio_Interface); +} + +/** Audio class driver callback for the setting and retrieval of streaming endpoint properties. This callback must be implemented + * in the user application to handle property manipulations on streaming audio endpoints. + * + * When the DataLength parameter is NULL, this callback should only indicate whether the specified operation is valid for + * the given endpoint index, and should return as fast as possible. When non-NULL, this value may be altered for GET operations + * to indicate the size of the retrieved data. + * + * \note The length of the retrieved data stored into the Data buffer on GET operations should not exceed the initial value + * of the \c DataLength parameter. + * + * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state. + * \param[in] EndpointProperty Property of the endpoint to get or set, a value from Audio_ClassRequests_t. + * \param[in] EndpointAddress Address of the streaming endpoint whose property is being referenced. + * \param[in] EndpointControl Parameter of the endpoint to get or set, a value from Audio_EndpointControls_t. + * \param[in,out] DataLength For SET operations, the length of the parameter data to set. For GET operations, the maximum + * length of the retrieved data. When NULL, the function should return whether the given property + * and parameter is valid for the requested endpoint without reading or modifying the Data buffer. + * \param[in,out] Data Pointer to a location where the parameter data is stored for SET operations, or where + * the retrieved data is to be stored for GET operations. + * + * \return Boolean \c true if the property get/set was successful, \c false otherwise + */ +bool CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo, + const uint8_t EndpointProperty, + const uint8_t EndpointAddress, + const uint8_t EndpointControl, + uint16_t* const DataLength, + uint8_t* Data) +{ + /* Check the requested endpoint to see if a supported endpoint is being manipulated */ + if (EndpointAddress == Microphone_Audio_Interface.Config.DataINEndpoint.Address) + { + /* Check the requested control to see if a supported control is being manipulated */ + if (EndpointControl == AUDIO_EPCONTROL_SamplingFreq) + { + switch (EndpointProperty) + { + case AUDIO_REQ_SetCurrent: + /* Check if we are just testing for a valid property, or actually adjusting it */ + if (DataLength != NULL) + { + /* Set the new sampling frequency to the value given by the host */ + CurrentAudioSampleFrequency = (((uint32_t)Data[2] << 16) | ((uint32_t)Data[1] << 8) | (uint32_t)Data[0]); + + /* Adjust sample reload timer to the new frequency */ + OCR0A = ((F_CPU / 8 / CurrentAudioSampleFrequency) - 1); + } + + return true; + case AUDIO_REQ_GetCurrent: + /* Check if we are just testing for a valid property, or actually reading it */ + if (DataLength != NULL) + { + *DataLength = 3; + + Data[2] = (CurrentAudioSampleFrequency >> 16); + Data[1] = (CurrentAudioSampleFrequency >> 8); + Data[0] = (CurrentAudioSampleFrequency & 0xFF); + } + + return true; + } + } + } + + return false; +} + +/** Audio class driver callback for the setting and retrieval of streaming interface properties. This callback must be implemented + * in the user application to handle property manipulations on streaming audio interfaces. + * + * When the DataLength parameter is NULL, this callback should only indicate whether the specified operation is valid for + * the given entity and should return as fast as possible. When non-NULL, this value may be altered for GET operations + * to indicate the size of the retrieved data. + * + * \note The length of the retrieved data stored into the Data buffer on GET operations should not exceed the initial value + * of the \c DataLength parameter. + * + * \param[in,out] AudioInterfaceInfo Pointer to a structure containing an Audio Class configuration and state. + * \param[in] Property Property of the interface to get or set, a value from Audio_ClassRequests_t. + * \param[in] EntityAddress Address of the audio entity whose property is being referenced. + * \param[in] Parameter Parameter of the entity to get or set, specific to each type of entity (see USB Audio specification). + * \param[in,out] DataLength For SET operations, the length of the parameter data to set. For GET operations, the maximum + * length of the retrieved data. When NULL, the function should return whether the given property + * and parameter is valid for the requested endpoint without reading or modifying the Data buffer. + * \param[in,out] Data Pointer to a location where the parameter data is stored for SET operations, or where + * the retrieved data is to be stored for GET operations. + * + * \return Boolean \c true if the property GET/SET was successful, \c false otherwise + */ +bool CALLBACK_Audio_Device_GetSetInterfaceProperty(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo, + const uint8_t Property, + const uint8_t EntityAddress, + const uint16_t Parameter, + uint16_t* const DataLength, + uint8_t* Data) +{ + /* No audio interface entities in the device descriptor, thus no properties to get or set. */ + return false; +} diff --git a/lib/lufa/Demos/Device/ClassDriver/AudioInput/AudioInput.h b/lib/lufa/Demos/Device/ClassDriver/AudioInput/AudioInput.h new file mode 100644 index 0000000000..1deaa76885 --- /dev/null +++ b/lib/lufa/Demos/Device/ClassDriver/AudioInput/AudioInput.h @@ -0,0 +1,94 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2017. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaims all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * + * Header file for AudioInput.c. + */ + +#ifndef _AUDIO_INPUT_H_ +#define _AUDIO_INPUT_H_ + + /* Includes: */ + #include + #include + #include + #include + + #include + #include + #include + #include + #include + + #include "Descriptors.h" + #include "Config/AppConfig.h" + + /* Macros: */ + /** Maximum audio sample value for the microphone input. */ + #define SAMPLE_MAX_RANGE 0xFFFF + + /** Maximum ADC range for the microphone input. */ + #define ADC_MAX_RANGE 0x3FF + + /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ + #define LEDMASK_USB_NOTREADY LEDS_LED1 + + /** LED mask for the library LED driver, to indicate that the USB interface is enumerating. */ + #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3) + + /** LED mask for the library LED driver, to indicate that the USB interface is ready. */ + #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4) + + /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */ + #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3) + + /* Function Prototypes: */ + void SetupHardware(void); + + void EVENT_USB_Device_Connect(void); + void EVENT_USB_Device_Disconnect(void); + void EVENT_USB_Device_ConfigurationChanged(void); + void EVENT_USB_Device_ControlRequest(void); + + bool CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo, + const uint8_t EndpointProperty, + const uint8_t EndpointAddress, + const uint8_t EndpointControl, + uint16_t* const DataLength, + uint8_t* Data) ATTR_NON_NULL_PTR_ARG(1); + bool CALLBACK_Audio_Device_GetSetInterfaceProperty(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo, + const uint8_t Property, + const uint8_t EntityAddress, + const uint16_t Parameter, + uint16_t* const DataLength, + uint8_t* Data); +#endif + diff --git a/lib/lufa/Demos/Device/ClassDriver/AudioInput/AudioInput.txt b/lib/lufa/Demos/Device/ClassDriver/AudioInput/AudioInput.txt new file mode 100644 index 0000000000..4b0594244d --- /dev/null +++ b/lib/lufa/Demos/Device/ClassDriver/AudioInput/AudioInput.txt @@ -0,0 +1,92 @@ +/** \file + * + * This file contains special DoxyGen information for the generation of the main page and other special + * documentation pages. It is not a project source file. + */ + +/** \mainpage Audio Input Device Demo + * + * \section Sec_Compat Demo Compatibility: + * + * The following list indicates what microcontrollers are compatible with this demo. + * + * \li Series 7 USB AVRs (AT90USBxxx7) + * \li Series 6 USB AVRs (AT90USBxxx6) + * \li Series 4 USB AVRs (ATMEGAxxU4) + * + * \section Sec_Info USB Information: + * + * The following table gives a rundown of the USB utilization of this demo. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
USB Mode:Device
USB Class:Audio Class
USB Subclass:Standard Audio Device
Relevant Standards:USBIF Audio 1.0 Class Specification \n + * USBIF Audio 1.0 Class Terminal Types Specification \n + * USBIF Audio 1.0 Data Formats Specification
Supported USB Speeds:Full Speed Mode
+ * + * \section Sec_Description Project Description: + * + * Audio demonstration application. This gives a simple reference + * application for implementing a USB Audio Input device using the + * basic USB Audio 1.0 drivers in all modern OSes (i.e. no special drivers + * required). + * + * On start-up the system will automatically enumerate and function as a + * USB microphone. By default, the demo will produce a square wave test tone + * when the board button is pressed. If USE_TEST_TONE is not defined in the + * project makefile, incoming audio from the ADC channel 1 will be sampled + * and sent to the host computer instead. + * + * When in microphone mode, connect a microphone to the ADC channel 2. + * + * Under Windows, if a driver request dialogue pops up, select the option + * to automatically install the appropriate drivers. + * + * \section Sec_Options Project Options + * + * The following defines can be found in this demo, which can control the demo behaviour when defined, or changed in value. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Define Name:Location:Description:
MIC_IN_ADC_CHANNELAppConfig.hSets the ADC channel used by the demo for the input audio samples from an attached microphone.
USE_TEST_TONEAppConfig.hWhen defined, this alters the demo to produce a square wave test tone when the first board button is pressed + * instead of sampling the board microphone.
MICROPHONE_BIASED_TO_HALF_RAILAppConfig.hWhen defined, this alters the demo so that the half VCC bias of the microphone input is subtracted.
+ */ + diff --git a/lib/lufa/Demos/Device/ClassDriver/AudioInput/Config/AppConfig.h b/lib/lufa/Demos/Device/ClassDriver/AudioInput/Config/AppConfig.h new file mode 100644 index 0000000000..ff8ed270de --- /dev/null +++ b/lib/lufa/Demos/Device/ClassDriver/AudioInput/Config/AppConfig.h @@ -0,0 +1,51 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2017. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaims all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief Application Configuration Header File + * + * This is a header file which is be used to configure some of + * the application's compile time options, as an alternative to + * specifying the compile time constants supplied through a + * makefile or build system. + * + * For information on what each token does, refer to the + * \ref Sec_Options section of the application documentation. + */ + +#ifndef _APP_CONFIG_H_ +#define _APP_CONFIG_H_ + + #define MIC_IN_ADC_CHANNEL 2 + + #define MICROPHONE_BIASED_TO_HALF_RAIL + #define USE_TEST_TONE + +#endif diff --git a/lib/lufa/Demos/Device/ClassDriver/AudioInput/Config/LUFAConfig.h b/lib/lufa/Demos/Device/ClassDriver/AudioInput/Config/LUFAConfig.h new file mode 100644 index 0000000000..6048c1d809 --- /dev/null +++ b/lib/lufa/Demos/Device/ClassDriver/AudioInput/Config/LUFAConfig.h @@ -0,0 +1,93 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2017. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaims all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * \brief LUFA Library Configuration Header File + * + * This header file is used to configure LUFA's compile time options, + * as an alternative to the compile time constants supplied through + * a makefile. + * + * For information on what each token does, refer to the LUFA + * manual section "Summary of Compile Tokens". + */ + +#ifndef _LUFA_CONFIG_H_ +#define _LUFA_CONFIG_H_ + + #if (ARCH == ARCH_AVR8) + + /* Non-USB Related Configuration Tokens: */ +// #define DISABLE_TERMINAL_CODES + + /* USB Class Driver Related Tokens: */ +// #define HID_HOST_BOOT_PROTOCOL_ONLY +// #define HID_STATETABLE_STACK_DEPTH {Insert Value Here} +// #define HID_USAGE_STACK_DEPTH {Insert Value Here} +// #define HID_MAX_COLLECTIONS {Insert Value Here} +// #define HID_MAX_REPORTITEMS {Insert Value Here} +// #define HID_MAX_REPORT_IDS {Insert Value Here} +// #define NO_CLASS_DRIVER_AUTOFLUSH + + /* General USB Driver Related Tokens: */ +// #define ORDERED_EP_CONFIG + #define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL) + #define USB_DEVICE_ONLY +// #define USB_HOST_ONLY +// #define USB_STREAM_TIMEOUT_MS {Insert Value Here} +// #define NO_LIMITED_CONTROLLER_CONNECT +// #define NO_SOF_EVENTS + + /* USB Device Mode Driver Related Tokens: */ +// #define USE_RAM_DESCRIPTORS + #define USE_FLASH_DESCRIPTORS +// #define USE_EEPROM_DESCRIPTORS +// #define NO_INTERNAL_SERIAL + #define FIXED_CONTROL_ENDPOINT_SIZE 8 +// #define DEVICE_STATE_AS_GPIOR {Insert Value Here} + #define FIXED_NUM_CONFIGURATIONS 1 +// #define CONTROL_ONLY_DEVICE +// #define INTERRUPT_CONTROL_ENDPOINT +// #define NO_DEVICE_REMOTE_WAKEUP +// #define NO_DEVICE_SELF_POWER + + /* USB Host Mode Driver Related Tokens: */ +// #define HOST_STATE_AS_GPIOR {Insert Value Here} +// #define USB_HOST_TIMEOUT_MS {Insert Value Here} +// #define HOST_DEVICE_SETTLE_DELAY_MS {Insert Value Here} +// #define NO_AUTO_VBUS_MANAGEMENT +// #define INVERTED_VBUS_ENABLE_LINE + + #else + + #error Unsupported architecture for this LUFA configuration file. + + #endif +#endif diff --git a/lib/lufa/Demos/Device/ClassDriver/AudioInput/Descriptors.c b/lib/lufa/Demos/Device/ClassDriver/AudioInput/Descriptors.c new file mode 100644 index 0000000000..82cb337da6 --- /dev/null +++ b/lib/lufa/Demos/Device/ClassDriver/AudioInput/Descriptors.c @@ -0,0 +1,312 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2017. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaims all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * + * USB Device Descriptors, for library use when in USB device mode. Descriptors are special + * computer-readable structures which the host requests upon device enumeration, to determine + * the device's capabilities and functions. + */ + +#include "Descriptors.h" + +/** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall + * device characteristics, including the supported USB version, control endpoint size and the + * number of device configurations. The descriptor is read out by the USB host when the enumeration + * process begins. + */ +const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = +{ + .Header = {.Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device}, + + .USBSpecification = VERSION_BCD(2,0,0), + .Class = USB_CSCP_NoDeviceClass, + .SubClass = USB_CSCP_NoDeviceSubclass, + .Protocol = USB_CSCP_NoDeviceProtocol, + + .Endpoint0Size = FIXED_CONTROL_ENDPOINT_SIZE, + + .VendorID = 0x03EB, + .ProductID = 0x2047, + .ReleaseNumber = VERSION_BCD(0,0,2), + + .ManufacturerStrIndex = STRING_ID_Manufacturer, + .ProductStrIndex = STRING_ID_Product, + .SerialNumStrIndex = NO_DESCRIPTOR, + + .NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS +}; + +/** Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage + * of the device in one of its supported configurations, including information about any device interfaces + * and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting + * a configuration so that the host may correctly communicate with the USB device. + */ +const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = +{ + .Config = + { + .Header = {.Size = sizeof(USB_Descriptor_Configuration_Header_t), .Type = DTYPE_Configuration}, + + .TotalConfigurationSize = sizeof(USB_Descriptor_Configuration_t), + .TotalInterfaces = 2, + + .ConfigurationNumber = 1, + .ConfigurationStrIndex = NO_DESCRIPTOR, + + .ConfigAttributes = (USB_CONFIG_ATTR_RESERVED | USB_CONFIG_ATTR_SELFPOWERED), + + .MaxPowerConsumption = USB_CONFIG_POWER_MA(100) + }, + + .Audio_ControlInterface = + { + .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, + + .InterfaceNumber = INTERFACE_ID_AudioControl, + .AlternateSetting = 0, + + .TotalEndpoints = 0, + + .Class = AUDIO_CSCP_AudioClass, + .SubClass = AUDIO_CSCP_ControlSubclass, + .Protocol = AUDIO_CSCP_ControlProtocol, + + .InterfaceStrIndex = NO_DESCRIPTOR + }, + + .Audio_ControlInterface_SPC = + { + .Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AC_t), .Type = DTYPE_CSInterface}, + .Subtype = AUDIO_DSUBTYPE_CSInterface_Header, + + .ACSpecification = VERSION_BCD(1,0,0), + .TotalLength = (sizeof(USB_Audio_Descriptor_Interface_AC_t) + + sizeof(USB_Audio_Descriptor_InputTerminal_t) + + sizeof(USB_Audio_Descriptor_OutputTerminal_t)), + + .InCollection = 1, + .InterfaceNumber = INTERFACE_ID_AudioStream, + }, + + .Audio_InputTerminal = + { + .Header = {.Size = sizeof(USB_Audio_Descriptor_InputTerminal_t), .Type = DTYPE_CSInterface}, + .Subtype = AUDIO_DSUBTYPE_CSInterface_InputTerminal, + + .TerminalID = 0x01, + .TerminalType = AUDIO_TERMINAL_IN_MIC, + .AssociatedOutputTerminal = 0x00, + + .TotalChannels = 1, + .ChannelConfig = 0, + + .ChannelStrIndex = NO_DESCRIPTOR, + .TerminalStrIndex = NO_DESCRIPTOR + }, + + .Audio_OutputTerminal = + { + .Header = {.Size = sizeof(USB_Audio_Descriptor_OutputTerminal_t), .Type = DTYPE_CSInterface}, + .Subtype = AUDIO_DSUBTYPE_CSInterface_OutputTerminal, + + .TerminalID = 0x02, + .TerminalType = AUDIO_TERMINAL_STREAMING, + .AssociatedInputTerminal = 0x00, + + .SourceID = 0x01, + + .TerminalStrIndex = NO_DESCRIPTOR + }, + + .Audio_StreamInterface_Alt0 = + { + .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, + + .InterfaceNumber = INTERFACE_ID_AudioStream, + .AlternateSetting = 0, + + .TotalEndpoints = 0, + + .Class = AUDIO_CSCP_AudioClass, + .SubClass = AUDIO_CSCP_AudioStreamingSubclass, + .Protocol = AUDIO_CSCP_StreamingProtocol, + + .InterfaceStrIndex = NO_DESCRIPTOR + }, + + .Audio_StreamInterface_Alt1 = + { + .Header = {.Size = sizeof(USB_Descriptor_Interface_t), .Type = DTYPE_Interface}, + + .InterfaceNumber = INTERFACE_ID_AudioStream, + .AlternateSetting = 1, + + .TotalEndpoints = 1, + + .Class = AUDIO_CSCP_AudioClass, + .SubClass = AUDIO_CSCP_AudioStreamingSubclass, + .Protocol = AUDIO_CSCP_StreamingProtocol, + + .InterfaceStrIndex = NO_DESCRIPTOR + }, + + .Audio_StreamInterface_SPC = + { + .Header = {.Size = sizeof(USB_Audio_Descriptor_Interface_AS_t), .Type = DTYPE_CSInterface}, + .Subtype = AUDIO_DSUBTYPE_CSInterface_General, + + .TerminalLink = 0x02, + + .FrameDelay = 1, + .AudioFormat = 0x0001 + }, + + .Audio_AudioFormat = + { + .Header = {.Size = sizeof(USB_Audio_Descriptor_Format_t) + + sizeof(ConfigurationDescriptor.Audio_AudioFormatSampleRates), + .Type = DTYPE_CSInterface}, + .Subtype = AUDIO_DSUBTYPE_CSInterface_FormatType, + + .FormatType = 0x01, + .Channels = 0x01, + + .SubFrameSize = 0x02, + .BitResolution = 16, + + .TotalDiscreteSampleRates = (sizeof(ConfigurationDescriptor.Audio_AudioFormatSampleRates) / sizeof(USB_Audio_SampleFreq_t)) + }, + + .Audio_AudioFormatSampleRates = + { + AUDIO_SAMPLE_FREQ(8000), + AUDIO_SAMPLE_FREQ(11025), + AUDIO_SAMPLE_FREQ(22050), + AUDIO_SAMPLE_FREQ(44100), + AUDIO_SAMPLE_FREQ(48000), + }, + + .Audio_StreamEndpoint = + { + .Endpoint = + { + .Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint}, + + .EndpointAddress = AUDIO_STREAM_EPADDR, + .Attributes = (EP_TYPE_ISOCHRONOUS | ENDPOINT_ATTR_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = AUDIO_STREAM_EPSIZE, + .PollingIntervalMS = 0x01 + }, + + .Refresh = 0, + .SyncEndpointNumber = 0 + }, + + .Audio_StreamEndpoint_SPC = + { + .Header = {.Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Spc_t), .Type = DTYPE_CSEndpoint}, + .Subtype = AUDIO_DSUBTYPE_CSEndpoint_General, + + .Attributes = (AUDIO_EP_ACCEPTS_SMALL_PACKETS | AUDIO_EP_SAMPLE_FREQ_CONTROL), + + .LockDelayUnits = 0x00, + .LockDelay = 0x0000 + } +}; + +/** Language descriptor structure. This descriptor, located in FLASH memory, is returned when the host requests + * the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate + * via the language ID table available at USB.org what languages the device supports for its string descriptors. + */ +const USB_Descriptor_String_t PROGMEM LanguageString = USB_STRING_DESCRIPTOR_ARRAY(LANGUAGE_ID_ENG); + +/** Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable + * form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device + * Descriptor. + */ +const USB_Descriptor_String_t PROGMEM ManufacturerString = USB_STRING_DESCRIPTOR(L"Dean Camera"); + +/** Product descriptor string. This is a Unicode string containing the product's details in human readable form, + * and is read out upon request by the host when the appropriate string ID is requested, listed in the Device + * Descriptor. + */ +const USB_Descriptor_String_t PROGMEM ProductString = USB_STRING_DESCRIPTOR(L"LUFA Audio In Demo"); + +/** This function is called by the library when in device mode, and must be overridden (see library "USB Descriptors" + * documentation) by the application code so that the address and size of a requested descriptor can be given + * to the USB library. When the device receives a Get Descriptor request on the control endpoint, this function + * is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the + * USB host. + */ +uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, + const uint16_t wIndex, + const void** const DescriptorAddress) +{ + const uint8_t DescriptorType = (wValue >> 8); + const uint8_t DescriptorNumber = (wValue & 0xFF); + + const void* Address = NULL; + uint16_t Size = NO_DESCRIPTOR; + + switch (DescriptorType) + { + case DTYPE_Device: + Address = &DeviceDescriptor; + Size = sizeof(USB_Descriptor_Device_t); + break; + case DTYPE_Configuration: + Address = &ConfigurationDescriptor; + Size = sizeof(USB_Descriptor_Configuration_t); + break; + case DTYPE_String: + switch (DescriptorNumber) + { + case STRING_ID_Language: + Address = &LanguageString; + Size = pgm_read_byte(&LanguageString.Header.Size); + break; + case STRING_ID_Manufacturer: + Address = &ManufacturerString; + Size = pgm_read_byte(&ManufacturerString.Header.Size); + break; + case STRING_ID_Product: + Address = &ProductString; + Size = pgm_read_byte(&ProductString.Header.Size); + break; + } + + break; + } + + *DescriptorAddress = Address; + return Size; +} + diff --git a/lib/lufa/Demos/Device/ClassDriver/AudioInput/Descriptors.h b/lib/lufa/Demos/Device/ClassDriver/AudioInput/Descriptors.h new file mode 100644 index 0000000000..bb73220a27 --- /dev/null +++ b/lib/lufa/Demos/Device/ClassDriver/AudioInput/Descriptors.h @@ -0,0 +1,106 @@ +/* + LUFA Library + Copyright (C) Dean Camera, 2017. + + dean [at] fourwalledcubicle [dot] com + www.lufa-lib.org +*/ + +/* + Copyright 2017 Dean Camera (dean [at] fourwalledcubicle [dot] com) + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that the copyright notice and this + permission notice and warranty disclaimer appear in supporting + documentation, and that the name of the author not be used in + advertising or publicity pertaining to distribution of the + software without specific, written prior permission. + + The author disclaims all warranties with regard to this + software, including all implied warranties of merchantability + and fitness. In no event shall the author be liable for any + special, indirect or consequential damages or any damages + whatsoever resulting from loss of use, data or profits, whether + in an action of contract, negligence or other tortious action, + arising out of or in connection with the use or performance of + this software. +*/ + +/** \file + * + * Header file for Descriptors.c. + */ + +#ifndef _DESCRIPTORS_H_ +#define _DESCRIPTORS_H_ + + /* Includes: */ + #include + + #include + + #include "Config/AppConfig.h" + + /* Macros: */ + /** Endpoint address of the Audio isochronous streaming data IN endpoint. */ + #define AUDIO_STREAM_EPADDR (ENDPOINT_DIR_IN | 1) + + /** Endpoint size in bytes of the Audio isochronous streaming data endpoint. */ + #define AUDIO_STREAM_EPSIZE 256 + + /* Type Defines: */ + /** Type define for the device configuration descriptor structure. This must be defined in the + * application code, as the configuration descriptor contains several sub-descriptors which + * vary between devices, and which describe the device's usage to the host. + */ + typedef struct + { + USB_Descriptor_Configuration_Header_t Config; + + // Audio Control Interface + USB_Descriptor_Interface_t Audio_ControlInterface; + USB_Audio_Descriptor_Interface_AC_t Audio_ControlInterface_SPC; + USB_Audio_Descriptor_InputTerminal_t Audio_InputTerminal; + USB_Audio_Descriptor_OutputTerminal_t Audio_OutputTerminal; + + // Audio Streaming Interface + USB_Descriptor_Interface_t Audio_StreamInterface_Alt0; + USB_Descriptor_Interface_t Audio_StreamInterface_Alt1; + USB_Audio_Descriptor_Interface_AS_t Audio_StreamInterface_SPC; + USB_Audio_Descriptor_Format_t Audio_AudioFormat; + USB_Audio_SampleFreq_t Audio_AudioFormatSampleRates[5]; + USB_Audio_Descriptor_StreamEndpoint_Std_t Audio_StreamEndpoint; + USB_Audio_Descriptor_StreamEndpoint_Spc_t Audio_StreamEndpoint_SPC; + } USB_Descriptor_Configuration_t; + + /** Enum for the device interface descriptor IDs within the device. Each interface descriptor + * should have a unique ID index associated with it, which can be used to refer to the + * interface from other descriptors. + */ + enum InterfaceDescriptors_t + { + INTERFACE_ID_AudioControl = 0, /**< Audio control interface descriptor ID */ + INTERFACE_ID_AudioStream = 1, /**< Audio stream interface descriptor ID */ + }; + + /** Enum for the device string descriptor IDs within the device. Each string descriptor should + * have a unique ID index associated with it, which can be used to refer to the string from + * other descriptors. + */ + enum StringDescriptors_t + { + STRING_ID_Language = 0, /**< Supported Languages string descriptor ID (must be zero) */ + STRING_ID_Manufacturer = 1, /**< Manufacturer string ID */ + STRING_ID_Product = 2, /**< Product string ID */ + }; + + /* Function Prototypes: */ + uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, + const uint16_t wIndex, + const void** const DescriptorAddress) + ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); + +#endif + diff --git a/lib/lufa/Demos/Device/ClassDriver/AudioInput/asf.xml b/lib/lufa/Demos/Device/ClassDriver/AudioInput/asf.xml new file mode 100644 index 0000000000..a915925af6 --- /dev/null +++ b/lib/lufa/Demos/Device/ClassDriver/AudioInput/asf.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + Audio 1.0 Input device demo, implementing a basic USB microphone. This demo uses the user-friendly USB Class Driver APIs to provide a simple, abstracted interface into the USB stack. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/lufa/Demos/Device/ClassDriver/AudioInput/doxyfile b/lib/lufa/Demos/Device/ClassDriver/AudioInput/doxyfile new file mode 100644 index 0000000000..d52d22cdcb --- /dev/null +++ b/lib/lufa/Demos/Device/ClassDriver/AudioInput/doxyfile @@ -0,0 +1,2395 @@ +# Doxyfile 1.8.9 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "LUFA Library - Audio Input Device Demo" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = ./Documentation/ + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = YES + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = NO + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = YES + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO, these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = NO + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = NO + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = NO + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = YES + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = YES + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. +# Note: If this tag is empty the current directory is searched. + +INPUT = ./ + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank the +# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, +# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, +# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, +# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, +# *.qsf, *.as and *.js. + +FILE_PATTERNS = *.h \ + *.c \ + *.txt + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = Documentation/ + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = __* \ + INCLUDE_FROM_* + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = NO + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = NO + +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# compiled with the --with-libclang option. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = NO + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = YES + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = YES + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = YES + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = YES + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 1 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /