diff --git a/.github/workflows/info.yml b/.github/workflows/info.yml index 7551c127e0..bb3a508477 100644 --- a/.github/workflows/info.yml +++ b/.github/workflows/info.yml @@ -16,7 +16,7 @@ jobs: with: fetch-depth: 0 - - uses: trilom/file-changes-action@v1.2.3 + - uses: trilom/file-changes-action@v1.2.4 id: file_changes with: output: '\n' diff --git a/.travis.yml b/.travis.yml index d137a42096..f2e8a8411d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,7 @@ addons: install: - npm install -g moxygen script: + - git fetch --depth=50 origin $TRAVIS_BRANCH:$TRAVIS_BRANCH - git rev-parse --short HEAD - git diff --name-only HEAD $TRAVIS_BRANCH - bash util/travis_test.sh diff --git a/.vscode/settings.json b/.vscode/settings.json index 9aa546a787..775b3df172 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -16,7 +16,8 @@ "*.hpp": "cpp", "xstddef": "c", "type_traits": "c", - "utility": "c" + "utility": "c", + "ranges": "c" }, "[markdown]": { "editor.trimAutoWhitespace": false, diff --git a/bootloader.mk b/bootloader.mk index e516e9ff9f..a7e596e476 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -27,6 +27,7 @@ # qmk-dfu QMK DFU (LUFA + blinkenlight) # bootloadHID HIDBootFlash compatible (ATmega32A) # USBasp USBaspLoader (ATmega328P) +# kiibohd Input:Club Kiibohd bootloader (only used on their boards) # # BOOTLOADER_SIZE can still be defined manually, but it's recommended # you add any possible configuration to this list @@ -34,30 +35,30 @@ ifeq ($(strip $(BOOTLOADER)), atmel-dfu) OPT_DEFS += -DBOOTLOADER_ATMEL_DFU OPT_DEFS += -DBOOTLOADER_DFU - ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4)) + ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) BOOTLOADER_SIZE = 4096 endif - ifeq ($(strip $(MCU)), at90usb1286) + ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) BOOTLOADER_SIZE = 8192 endif endif ifeq ($(strip $(BOOTLOADER)), lufa-dfu) OPT_DEFS += -DBOOTLOADER_LUFA_DFU OPT_DEFS += -DBOOTLOADER_DFU - ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4)) + ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) BOOTLOADER_SIZE = 4096 endif - ifeq ($(strip $(MCU)), at90usb1286) + ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) BOOTLOADER_SIZE = 8192 endif endif ifeq ($(strip $(BOOTLOADER)), qmk-dfu) OPT_DEFS += -DBOOTLOADER_QMK_DFU OPT_DEFS += -DBOOTLOADER_DFU - ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4)) + ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) BOOTLOADER_SIZE = 4096 endif - ifeq ($(strip $(MCU)), at90usb1286) + ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) BOOTLOADER_SIZE = 8192 endif endif @@ -89,7 +90,19 @@ ifeq ($(strip $(BOOTLOADER)), lufa-ms) BOOTLOADER_SIZE = 6144 FIRMWARE_FORMAT = bin endif - ifdef BOOTLOADER_SIZE OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE)) endif + +ifeq ($(strip $(BOOTLOADER)), kiibohd) + OPT_DEFS += -DBOOTLOADER_KIIBOHD + ifeq ($(strip $(MCU_ORIG)), MK20DX128) + MCU_LDSCRIPT = MK20DX128BLDR4 + endif + ifeq ($(strip $(MCU_ORIG)), MK20DX256) + MCU_LDSCRIPT = MK20DX256BLDR8 + endif + + DFU_ARGS = -d 1C11:B007 + DFU_SUFFIX_ARGS = -v 1C11 -p B007 +endif diff --git a/build_keyboard.mk b/build_keyboard.mk index 4108704875..b4e1efd9ee 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -16,7 +16,6 @@ include common.mk KEYBOARD_FILESAFE := $(subst /,_,$(KEYBOARD)) TARGET ?= $(KEYBOARD_FILESAFE)_$(KEYMAP) KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD_FILESAFE) -STM32_PATH := quantum/stm32 # Force expansion TARGET := $(TARGET) @@ -138,7 +137,7 @@ endif ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes) TARGET := $(TARGET)_proton_c - include $(STM32_PATH)/proton_c.mk + include platforms/chibios/GENERIC_STM32_F303XC/configs/proton_c.mk OPT_DEFS += -DCONVERT_TO_PROTON_C endif @@ -148,12 +147,6 @@ endif include quantum/mcu_selection.mk -ifdef MCU_FAMILY - OPT_DEFS += -DQMK_STM32 - KEYBOARD_PATHS += $(STM32_PATH) -endif - - # Find all the C source files to be compiled in subfolders. KEYBOARD_SRC := diff --git a/common_features.mk b/common_features.mk index 8443a759b3..ed6908f4b8 100644 --- a/common_features.mk +++ b/common_features.mk @@ -264,7 +264,7 @@ ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) BACKLIGHT_DRIVER := custom endif -VALID_BACKLIGHT_TYPES := pwm software custom +VALID_BACKLIGHT_TYPES := pwm timer software custom BACKLIGHT_ENABLE ?= no BACKLIGHT_DRIVER ?= pwm @@ -304,6 +304,12 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes) SRC += ws2812.c else SRC += ws2812_$(strip $(WS2812_DRIVER)).c + + ifeq ($(strip $(PLATFORM)), CHIBIOS) + ifeq ($(strip $(WS2812_DRIVER)), pwm) + OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE + endif + endif endif # add extra deps @@ -391,9 +397,20 @@ ifneq ($(strip $(CUSTOM_MATRIX)), yes) endif endif +# Support for translating old names to new names: +ifeq ($(strip $(DEBOUNCE_TYPE)),sym_g) + DEBOUNCE_TYPE:=sym_defer_g +else ifeq ($(strip $(DEBOUNCE_TYPE)),eager_pk) + DEBOUNCE_TYPE:=sym_eager_pk +else ifeq ($(strip $(DEBOUNCE_TYPE)),sym_pk) + DEBOUNCE_TYPE:=sym_defer_pk +else ifeq ($(strip $(DEBOUNCE_TYPE)),eager_pr) + DEBOUNCE_TYPE:=sym_eager_pr +endif + DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce # Debounce Modules. Set DEBOUNCE_TYPE=custom if including one manually. -DEBOUNCE_TYPE?= sym_g +DEBOUNCE_TYPE?= sym_defer_g ifneq ($(strip $(DEBOUNCE_TYPE)), custom) QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c endif @@ -529,3 +546,19 @@ ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes) OPT_DEFS += -DAUTO_SHIFT_MODIFIERS endif endif + +JOYSTICK_ENABLE ?= no +ifneq ($(strip $(JOYSTICK_ENABLE)), no) + OPT_DEFS += -DJOYSTICK_ENABLE + SRC += $(QUANTUM_DIR)/process_keycode/process_joystick.c + SRC += $(QUANTUM_DIR)/joystick.c +endif + +ifeq ($(strip $(JOYSTICK_ENABLE)), analog) + OPT_DEFS += -DANALOG_JOYSTICK_ENABLE + SRC += analog.c +endif + +ifeq ($(strip $(JOYSTICK_ENABLE)), digital) + OPT_DEFS += -DDIGITAL_JOYSTICK_ENABLE +endif diff --git a/docs/ChangeLog/20200829.md b/docs/ChangeLog/20200829.md new file mode 100644 index 0000000000..00e0bd1a28 --- /dev/null +++ b/docs/ChangeLog/20200829.md @@ -0,0 +1,148 @@ +# QMK Breaking Change - 2020 Aug 29 Changelog + +Four times a year QMK runs a process for merging Breaking Changes. A Breaking Change is any change which modifies how QMK behaves in a way that is incompatible or potentially dangerous. We limit these changes to 4 times per year so that users can have confidence that updating their QMK tree will not break their keymaps. + + +## Changes Requiring User Action :id=changes-requiring-user-action + +### Relocated Keyboards :id-relocated-keyboards + +#### The Key Company project consolidation ([#9547](https://github.com/qmk/qmk_firmware/pull/9547)) +#### relocating boards by flehrad to flehrad/ folder ([#9635](https://github.com/qmk/qmk_firmware/pull/9635)) + +Keyboards released by The Key Company and keyboards designed by flehrad have moved to vendor folders. If you own any of the keyboards listed below, please use the new names to compile your firmware moving forward. + +Old Name | New Name +:--------------------- | :------------------ +candybar/lefty | tkc/candybar/lefty +candybar/righty | tkc/candybar/righty +m0lly | tkc/m0lly +tkc1800 | tkc/tkc1800 +bigswitch | flehrad/bigswitch +handwired/downbubble | flehrad/downbubble +handwired/numbrero | flehrad/numbrero +snagpad | flehrad/snagpad +handwired/tradestation | flehrad/tradestation + +### Updated Keyboard Codebases :id=keyboard-updates + +#### Keebio RGB wiring update ([#7754](https://github.com/qmk/qmk_firmware/pull/7754)) + +This pull request changes the configuration for Keebio split boards to use the same RGB strip wiring for each half, which provides the following improvements: + +* Easier wiring due to one fewer wire needed (the wire between left DOut to extra data pin) and the fact that wiring is the same for both halves. +* RGB LEDs can be controlled by each half now instead of just master half. +* Extra data line is freed up to allow for I2C usage instead of serial. + +If you have customized the value of `RGBLED_SPLIT` for your keymap, you will need to undefine it using `#undef RGBLED_SPLIT` before defining it to your customized value. + +This change affects: + +* BFO-9000 +* Fourier +* Iris rev2 +* Levinson, revs. 1 and 2 +* Nyquist, revs. 1 and 2 +* Quefrency rev1 +* Viterbi, revs. 1 and 2 + +### Changes to Core Functionality :id=core-updates + +* Bigger Combo index ([#9318](https://github.com/qmk/qmk_firmware/pull/9318)) + +Allows the Combo feature to support more than 256 combos. + +Any fork that uses `process_combo_event` needs to update the function's first argument to `uint16_t`: + +* Old function: `void process_combo_event(uint8_t combo_index, bool pressed)` +* New function: `void process_combo_event(uint16_t combo_index, bool pressed)` + + +## Core Changes :id=core-changes + +### Fixes :id=core-fixes + +* Mousekeys: scrolling acceleration is no longer coupled to mouse movement acceleration ([#9174](https://github.com/qmk/qmk_firmware/pull/9174)) +* Keymap Extras: correctly assign Question Mark in Czech layout ([#9987](https://github.com/qmk/qmk_firmware/pull/9987)) + +### Additions and Enhancements :id=core-additions + +* allow for WS2812 PWM to work on DMAMUX-capable devices ([#9471](https://github.com/qmk/qmk_firmware/pull/9471)) + * Newer STM32 MCUs have a DMAMUX peripheral, which allows mapping of DMAs to different DMA streams, rather than hard-defining the target streams in silicon. + * Affects STM32L4+ devices, as well as the soon-to-be-supported-by-QMK STM32G4/H7 families. + * Tested on F303/Proton C (ChibiOS v19, non-DMAMUX), G474 (ChibiOS v20, with DMAMUX). +* dual-bank STM32 bootloader support ([#8778](https://github.com/qmk/qmk_firmware/pull/8778) and [#9738](https://github.com/qmk/qmk_firmware/pull/9738)) + * Adds support for STM32 dual-bank flash bootloaders, by toggling a GPIO during early init in order to charge an RC circuit attached to `BOOT0`. + * The main rationale behind this is that dual-bank STM32 devices unconditionally execute user-mode code, regardless of whether or not the user-mode code jumps to the bootloader. If either flash bank is valid (and `BOOT0` is low), then the built-in bootloader will skip any sort of DFU. + * This PR allows for the initialisation sequencing to charge the RC circuit based on the example circuit posted on Discord, effectively pulling `BOOT0` high before issuing the system reset. As the RC circuit takes a while to discharge, the system reset executes the ROM bootloader which subsequently sees `BOOT0` high, and starts executing the DFU routines. + * Tested with STM32L082 (with current QMK+current ChibiOS), and STM32G474 (against ChibiOS 20.x). +* update Space Cadet and Tap Dance features to use Custom Tapping Term when appropriate ([#6259](https://github.com/qmk/qmk_firmware/pull/6259)) + * For the Tap Dance feature, this completely removes the need for the `ACTION_TAP_DANCE_FN_ADVANCED_TIME` dance. +* HID Joystick Interface ([#4226](https://github.com/qmk/qmk_firmware/pull/4226) and [#9949](https://github.com/qmk/qmk_firmware/pull/9949 "Fix Joystick Compile Issues")) + * This implements a joystick feature, including a joystick_task function called from TMK, specific keycodes for joystick buttons and a USB HID interface. + * Tested on V-USB backend and Proton C; compiles but untested on LUFA. + * In order to test, you have to add `JOYSTICK_ENABLE = yes` to your `rules.mk` and + ```c + #define JOYSTICK_BUTTON_COUNT 8 + #define JOYSTICK_AXES_COUNT 2 + ``` + in your config.h. +* Christmas RGB Underglow animation now fades between green and red ([#7648](https://github.com/qmk/qmk_firmware/pull/7648)) + * `RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL` has been greatly decreased; please check your animation if you have customized this value. +* layer state now initializes on startup ([#8318](https://github.com/qmk/qmk_firmware/pull/8318)) + * This should produce more consistent behavior between the two functions and layer masks. +* added support for HSV->RGB conversion without using CIE curve ([#9856](https://github.com/qmk/qmk_firmware/pull/9856)) +* added NOEEPROM functions for RGB Matrix ([#9487](https://github.com/qmk/qmk_firmware/pull/9487)) + * Added eeprom_helpers for toggle, mode, sethsv, speed, similar to rgblight versions. + * Added set_speed function. + * Added helper functions, similar to those in rgblight, in order to add NOEEPROM versions of toggle, step, hue, sat, val, and speed. + * Minor: spelling correction for EEPROM in a debug message. +* flashing firmware using `st-flash` utility from [STLink Tools](https://github.com/stlink-org/stlink) is now supported ([#9964](https://github.com/qmk/qmk_firmware/pull/9964)) +* add ability to dump all makefile variables for the specified target ([#8256](https://github.com/qmk/qmk_firmware/pull/8256)) + * Adds a new subtarget to builds, `dump_vars`, which allows for printing out all the variables that make knows about, after all substitutions occur. + * Example: `make handwired/onekey/proton_c:default:dump_vars` +* add ability to change the Auto Shift timeout in real time ([#8441](https://github.com/qmk/qmk_firmware/pull/8441)) +* added a timer implementation for backlight on ChibiOS ([#8291](https://github.com/qmk/qmk_firmware/pull/8291)) +* added a third endpoint to V-USB keyboards ([#9020](https://github.com/qmk/qmk_firmware/pull/9020)) +* added a method to read the OLED display buffer from user space ([#8777](https://github.com/qmk/qmk_firmware/pull/8777)) +* K-Type refactor ([#9864](https://github.com/qmk/qmk_firmware/pull/9864)) + * The K-Type has been refactored to use QMK's native matrix scanning routine, and now has partial support for the RGB Matrix feature. +* Joysticks can now be used without defining analog pins ([#10169](https://github.com/qmk/qmk_firmware/pull/10169)) + +### Clean-ups and Optimizations :id=core-optimizations + +* iWRAP protocol removed ([#9284](https://github.com/qmk/qmk_firmware/pull/9284)) +* work begun for consolidation of ChibiOS platform files ([#8327](https://github.com/qmk/qmk_firmware/pull/8327) and [#9315](https://github.com/qmk/qmk_firmware/pull/9315)) + * Start of the consolidation work to move the ChibiOS board definitions as well as the default set of configuration files for existing board definitions used by keyboards. + * Uses `/platforms/chibios` as previously discussed on discord. + * Consolidates the Proton C configs into the generic F303 definitions. + * Allows for defining a default set of `chconf.h`, `halconf.h`, and `mcuconf.h` files within the platform definition, which is able to be overridden by the keyboard directly, though include path ordering. + * Adds template `chconf.h`, `halconf.h`, `mcuconf.h`, and `board.h` that can be dropped into a keyboard directory, in order to override rather than replace the entire contents of the respective files. + * Removed Proton C QMK board definitions, falling back to ChibiOS board definitions with QMK overrides. +* Various tidy-ups for USB descriptor code ([#9005](https://github.com/qmk/qmk_firmware/pull/9005)) + * Renamed `keyboard_led_stats` in lufa.c and ChibiOS usb_main.c to `keyboard_led_state`, as well as `vusb_keyboard_leds`, for consistency + * Formatted CDC and MIDI descriptors better + * Removed `ENDPOINT_CONFIG` macro, it seems pointless and removes the need for endpoint address defines in the middle of the endpoint numbering enum + * Fixed (possibly?) V-USB `GET_REPORT` request handling. Not sure about this one, but the existing code appears to always return an empty report - now `send_keyboard` sets this variable to the current report, matching what the LUFA code does. +* converted `CONSUMER2BLUEFRUIT()` and `CONSUMER2RN42()` macros to static inline functions ([#9055](https://github.com/qmk/qmk_firmware/pull/9055)) +* Additional cleanups for V-USB code ([#9310](https://github.com/qmk/qmk_firmware/pull/9310)) + * Removing the UART stuff entirely, now that we have Console support. Also fixing up various other things; switching some `debug()` calls to `dprintf()`, moved `raw_hid_report` out of the way so that we can implement the shared endpoint stuff. +* removed inclusion of `adafruit_ble.h` from `ssd1306.c` ([#9355](https://github.com/qmk/qmk_firmware/pull/9355)) +* `outputselect.c` is no longer compiled if Bluetooth is disabled ([#9356](https://github.com/qmk/qmk_firmware/pull/9356)) +* `analogRead()` deprecated in favor of `analogReadPin()` ([#9023](https://github.com/qmk/qmk_firmware/pull/9023)) +* forcibly disable NKRO on V-USB controllers ([#9054](https://github.com/qmk/qmk_firmware/pull/9054)) +* removed warning if running backlight on STM32F072 ([#10040](https://github.com/qmk/qmk_firmware/pull/10040)) +* removed unused CORTEX_VTOR_INIT rules.mk option ([#10053](https://github.com/qmk/qmk_firmware/pull/10053)) +* improved handling for enabling Link Time Optimization ([#9832](https://github.com/qmk/qmk_firmware/pull/9832)) +* streamline rules for supporting Kiibohd bootloader ([#10129](https://github.com/qmk/qmk_firmware/pull/10129)) +* Define `STM32_DMA_REQUIRED` when using DMA-based WS2812 driver on STM32 ([#10127](https://github.com/qmk/qmk_firmware/pull/10127)) +* fix DMA stream ID calculation in ws2812_pwm ([#10008](https://github.com/qmk/qmk_firmware/pull/10008)) +* remove support for Adafruit EZ Key Bluetooth controller ([#10103](https://github.com/qmk/qmk_firmware/pull/10103)) + + +## QMK Infrastructure and Internals :id=qmk-internals + +* Attempt to fix CI for non-master branches. ([#9308](https://github.com/qmk/qmk_firmware/pull/9308)) + * Actually fetch the branch we're attempting to compare against. +* Run `qmk cformat` on `develop` branch ([#9501](https://github.com/qmk/qmk_firmware/pull/9501)) +* minor refactor of Bluetooth API ([#9905](https://github.com/qmk/qmk_firmware/pull/9905)) diff --git a/docs/_summary.md b/docs/_summary.md index 9ed55a3d06..0c43712159 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -103,6 +103,7 @@ * [DIP Switch](feature_dip_switch.md) * [Encoders](feature_encoders.md) * [Haptic Feedback](feature_haptic_feedback.md) + * [Joystick](feature_joystick.md) * [Proton C Conversion](proton_c_conversion.md) * [PS/2 Mouse](feature_ps2_mouse.md) * [Split Keyboard](feature_split_keyboard.md) diff --git a/docs/adc_driver.md b/docs/adc_driver.md index f8fb94094e..6e3d513863 100644 --- a/docs/adc_driver.md +++ b/docs/adc_driver.md @@ -45,9 +45,9 @@ Then place this include at the top of your code: Note that some of these pins are doubled-up on ADCs with the same channel. This is because the pins can be used for either ADC. -Also note that the F0 and F3 use different numbering schemes. The F0 has a single ADC and the channels are 0-based, whereas the F3 has 4 ADCs and the channels are 1 based. This is because the F0 uses the `ADCv1` implementation of the ADC, whereas the F3 uses the `ADCv3` implementation. +Also note that the F0 and F3 use different numbering schemes. The F0 has a single ADC and the channels are 0-indexed, whereas the F3 has 4 ADCs and the channels are 1-indexed. This is because the F0 uses the `ADCv1` implementation of the ADC, whereas the F3 uses the `ADCv3` implementation. -|ADC|Channel|STM32F0XX|STM32F3XX| +|ADC|Channel|STM32F0xx|STM32F3xx| |---|-------|---------|---------| |1 |0 |`A0` | | |1 |1 |`A1` |`A0` | @@ -122,32 +122,29 @@ Also note that the F0 and F3 use different numbering schemes. The F0 has a singl |Function |Description | |----------------------------|-------------------------------------------------------------------------------------------------------------------| |`analogReference(mode)` |Sets the analog voltage reference source. Must be one of `ADC_REF_EXTERNAL`, `ADC_REF_POWER` or `ADC_REF_INTERNAL`.| -|`analogRead(pin)` |Reads the value from the specified Arduino pin, eg. `4` for ADC6 on the ATmega32U4. | -|`analogReadPin(pin)` |Reads the value from the specified QMK pin, eg. `F6` for ADC6 on the ATmega32U4. | -|`pinToMux(pin)` |Translates a given QMK pin to a mux value. If an unsupported pin is given, returns the mux value for "0V (GND)". | +|`analogReadPin(pin)` |Reads the value from the specified pin, eg. `F6` for ADC6 on the ATmega32U4. | +|`pinToMux(pin)` |Translates a given pin to a mux value. If an unsupported pin is given, returns the mux value for "0V (GND)". | |`adc_read(mux)` |Reads the value from the ADC according to the specified mux. See your MCU's datasheet for more information. | ### ARM -Note that care was taken to match all of the functions used for AVR devices, however complications in the ARM platform prevent that from always being possible. For example, the `STM32` chips do not have assigned Arduino pins. We could use the default pin numbers, but those numbers change based on the package type of the device. For this reason, please specify your target pins with their identifiers (`A0`, `F3`, etc.). Also note that there are some variants of functions that accept the target ADC for the pin. Some pins can be used for multiple ADCs, and this specified can help you pick which ADC will be used to interact with that pin. - -|Function |Description | -|----------------------------|--------------------------------------------------------------------------------------------------------------------| -|`analogReadPin(pin)` |Reads the value from the specified QMK pin, eg. `A0` for channel 0 on the STM32F0 and ADC1 channel 1 on the STM32F3. Note that if a pin can be used for multiple ADCs, it will pick the lower numbered ADC for this function. eg. `C0` will be channel 6 of ADC 1 when it could be used for ADC 2 as well.| -|`analogReadPinAdc(pin, adc)`|Reads the value from the specified QMK pin and ADC, eg. `C0, 1` will read from channel 6, ADC 2 instead of ADC 1. Note that the ADCs are 0-indexed for this function.| -|`pinToMux(pin)` |Translates a given QMK pin to a channel and ADC combination. If an unsupported pin is given, returns the mux value for "0V (GND)".| -|`adc_read(mux)` |Reads the value from the ADC according to the specified pin and adc combination. See your MCU's datasheet for more information.| +|Function |Description | +|----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +|`analogReadPin(pin)` |Reads the value from the specified pin, eg. `A0` for channel 0 on the STM32F0 and ADC1 channel 1 on the STM32F3. Note that if a pin can be used for multiple ADCs, it will pick the lower numbered ADC for this function. eg. `C0` will be channel 6 of ADC 1 when it could be used for ADC 2 as well.| +|`analogReadPinAdc(pin, adc)`|Reads the value from the specified pin and ADC, eg. `C0, 1` will read from channel 6, ADC 2 instead of ADC 1. Note that the ADCs are 0-indexed for this function. | +|`pinToMux(pin)` |Translates a given pin to a channel and ADC combination. If an unsupported pin is given, returns the mux value for "0V (GND)". | +|`adc_read(mux)` |Reads the value from the ADC according to the specified pin and ADC combination. See your MCU's datasheet for more information. | ## Configuration ## ARM -The ARM implementation of the ADC has a few additional options that you can override in your own keyboards and keymaps to change how it operates. +The ARM implementation of the ADC has a few additional options that you can override in your own keyboards and keymaps to change how it operates. Please consult the corresponding `hal_adc_lld.h` in ChibiOS for your specific microcontroller for further documentation on your available options. -|`#define` |Type |Default |Description| -|-------------------|------|---------------------|-----------| -|ADC_CIRCULAR_BUFFER|`bool`|`false` |If `TRUE`, then the implementation will use a circular buffer.| -|ADC_NUM_CHANNELS |`int` |`1` |Sets the number of channels that will be scanned as part of an ADC operation. The current implementation only supports `1`.| -|ADC_BUFFER_DEPTH |`int` |`2` |Sets the depth of each result. Since we are only getting a 12-bit result by default, we set this to `2` bytes so we can contain our one value. This could be set to 1 if you opt for a 8-bit or lower result.| -|ADC_SAMPLING_RATE |`int` |`ADC_SMPR_SMP_1P5` |Sets the sampling rate of the ADC. By default, it is set to the fastest setting. Please consult the corresponding `hal_adc_lld.h` in ChibiOS for your specific microcontroller for further documentation on your available options.| -|ADC_RESOLUTION |`int` |`ADC_CFGR1_RES_12BIT`|The resolution of your result. We choose 12 bit by default, but you can opt for 12, 10, 8, or 6 bit. Please consult the corresponding `hal_adc_lld.h` in ChibiOS for your specific microcontroller for further documentation on your available options.| +|`#define` |Type |Default |Description | +|---------------------|------|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +|`ADC_CIRCULAR_BUFFER`|`bool`|`false` |If `true`, then the implementation will use a circular buffer. | +|`ADC_NUM_CHANNELS` |`int` |`1` |Sets the number of channels that will be scanned as part of an ADC operation. The current implementation only supports `1`. | +|`ADC_BUFFER_DEPTH` |`int` |`2` |Sets the depth of each result. Since we are only getting a 12-bit result by default, we set this to 2 bytes so we can contain our one value. This could be set to 1 if you opt for an 8-bit or lower result.| +|`ADC_SAMPLING_RATE` |`int` |`ADC_SMPR_SMP_1P5` |Sets the sampling rate of the ADC. By default, it is set to the fastest setting. | +|`ADC_RESOLUTION` |`int` |`ADC_CFGR1_RES_12BIT`|The resolution of your result. We choose 12 bit by default, but you can opt for 12, 10, 8, or 6 bit. | diff --git a/docs/breaking_changes.md b/docs/breaking_changes.md index 154695ddac..abace81648 100644 --- a/docs/breaking_changes.md +++ b/docs/breaking_changes.md @@ -6,22 +6,23 @@ The breaking change period is when we will merge PR's that change QMK in dangero ## What has been included in past Breaking Changes? +* [2020 Aug 29](ChangeLog/20200829.md) * [2020 May 30](ChangeLog/20200530.md) * [2020 Feb 29](ChangeLog/20200229.md) * [2019 Aug 30](ChangeLog/20190830.md) ## When is the next Breaking Change? -The next Breaking Change is scheduled for Aug 29, 2020. +The next Breaking Change is scheduled for November 28, 2020. ### Important Dates -* [x] 2020 May 30 - `develop` is created. It will be rebased weekly. -* [ ] 2020 Aug 1 - `develop` closed to new PR's. -* [ ] 2020 Aug 1 - Call for testers. -* [ ] 2020 Aug 27 - `master` is locked, no PR's merged. -* [ ] 2020 Aug 29 - Merge `develop` to `master`. -* [ ] 2020 Aug 29 - `master` is unlocked. PR's can be merged again. +* [x] 2020 Aug 29 - `develop` is created. It will be rebased weekly. +* [ ] 2020 Oct 31 - `develop` closed to new PR's. +* [ ] 2020 Oct 31 - Call for testers. +* [ ] 2020 Nov 26 - `master` is locked, no PR's merged. +* [ ] 2020 Nov 28 - Merge `develop` to `master`. +* [ ] 2020 Nov 28 - `master` is unlocked. PR's can be merged again. ## What changes will be included? diff --git a/docs/config_options.md b/docs/config_options.md index 81a3b4b61c..f9b1cc6578 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -324,11 +324,9 @@ This is a [make](https://www.gnu.org/software/make/manual/make.html) file that i ``` * `LAYOUTS` * A list of [layouts](feature_layouts.md) this keyboard supports. -* `LINK_TIME_OPTIMIZATION_ENABLE` +* `LTO_ENABLE` * Enables Link Time Optimization (LTO) when compiling the keyboard. This makes the process take longer, but it can significantly reduce the compiled size (and since the firmware is small, the added time is not noticeable). However, this will automatically disable the legacy TMK Macros and Functions features, as these break when LTO is enabled. It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION`. (Note: This does not affect QMK [Macros](feature_macros.md) and [Layers](feature_layers.md).) -* `LTO_ENABLE` - * Has the same meaning as `LINK_TIME_OPTIMIZATION_ENABLE`. You can use `LTO_ENABLE` instead of `LINK_TIME_OPTIMIZATION_ENABLE`. ## AVR MCU Options * `MCU = atmega32u4` @@ -373,10 +371,8 @@ Use these to enable or disable building certain features. The more you have enab * MIDI controls * `UNICODE_ENABLE` * Unicode -* `BLUETOOTH_ENABLE` - * Legacy option to Enable Bluetooth with the Adafruit EZ-Key HID. See BLUETOOTH * `BLUETOOTH` - * Current options are AdafruitEzKey, AdafruitBLE, RN42 + * Current options are AdafruitBLE, RN42 * `SPLIT_KEYBOARD` * Enables split keyboard support (dual MCU like the let's split and bakingpy's boards) and includes all necessary files located at quantum/split_common * `CUSTOM_MATRIX` diff --git a/docs/faq_build.md b/docs/faq_build.md index e2d0f9b27a..131844a2b7 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -13,65 +13,76 @@ An example of using `sudo`, when your controller is ATMega32u4: or just: - $ sudo make ::dfu + $ sudo make ::flash Note that running `make` with `sudo` is generally ***not*** a good idea, and you should use one of the former methods, if possible. ### Linux `udev` Rules -On Linux, you'll need proper privileges to access the MCU. You can either use -`sudo` when flashing firmware, or place these files in `/etc/udev/rules.d/`. Once added run the following: -```console + +On Linux, you'll need proper privileges to communicate with the bootloader device. You can either use `sudo` when flashing firmware, or place this file in `/etc/udev/rules.d/`: + +**/etc/udev/rules.d/50-qmk.rules:** +``` +# Atmel DFU +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FEF", TAG+="uaccess", RUN{builtin}+="uaccess" # ATmega16U2 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF0", TAG+="uaccess", RUN{builtin}+="uaccess" # ATmega32U2 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF3", TAG+="uaccess", RUN{builtin}+="uaccess" # ATmega16U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF4", TAG+="uaccess", RUN{builtin}+="uaccess" # ATmega32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF9", TAG+="uaccess", RUN{builtin}+="uaccess" # AT90USB64 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FFB", TAG+="uaccess", RUN{builtin}+="uaccess" # AT90USB128 + +# Input Club +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1C11", ATTRS{idProduct}=="B007", TAG+="uaccess", RUN{builtin}+="uaccess" + +# STM32duino +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1EAF", ATTRS{idProduct}=="0003", TAG+="uaccess", RUN{builtin}+="uaccess" +# STM32 DFU +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="DF11", TAG+="uaccess", RUN{builtin}+="uaccess" + +# BootloadHID +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DF", TAG+="uaccess", RUN{builtin}+="uaccess" + +# USBAspLoader +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DC", TAG+="uaccess", RUN{builtin}+="uaccess" + +# ModemManager should ignore the following devices +# Atmel SAM-BA (Massdrop) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="6124", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" + +# Caterina (Pro Micro) +# Spark Fun Electronics +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Pro Micro 3V3/8MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Pro Micro 5V/16MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9207", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # LilyPad 3V3/8MHz (and some Pro Micro clones) +# Pololu Electronics +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1FFB", ATTRS{idProduct}=="0101", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # A-Star 32U4 +# Arduino SA +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Leonardo +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Micro +# Adafruit Industries LLC +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000C", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Feather 32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000D", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # ItsyBitsy 32U4 3V3/8MHz +SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000E", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # ItsyBitsy 32U4 5V/16MHz +# dog hunter AG +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Leonardo +SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Micro +``` + +Once added, run the following: + +``` sudo udevadm control --reload-rules sudo udevadm trigger ``` -**/etc/udev/rules.d/50-atmel-dfu.rules:** -``` -# Atmel ATMega32U4 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess", RUN{builtin}+="uaccess" -# Atmel USBKEY AT90USB1287 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess", RUN{builtin}+="uaccess" -# Atmel ATMega32U2 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess", RUN{builtin}+="uaccess" -``` - -**/etc/udev/rules.d/54-input-club-keyboard.rules:** +**Note:** With older versions of ModemManager (< 1.12), filtering only works when not in strict mode. The following commands can update that setting: ``` -# Input Club keyboard bootloader -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess", RUN{builtin}+="uaccess" -``` - -**/etc/udev/rules.d/55-caterina.rules:** -``` -# ModemManager should ignore the following devices -SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" -``` - -**Note:** With older (before 1.12) ModemManager, filtering only works when not in strict mode, the following commands can update that settings: -```console printf '[Service]\nExecStart=\nExecStart=/usr/sbin/ModemManager --filter-policy=default' | sudo tee /etc/systemd/system/ModemManager.service.d/policy.conf sudo systemctl daemon-reload sudo systemctl restart ModemManager ``` -**/etc/udev/rules.d/56-dfu-util.rules:** -``` -# stm32duino -SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess", RUN{builtin}+="uaccess" -# Generic stm32 -SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess", RUN{builtin}+="uaccess" -``` - -**/etc/udev/rules.d/57-bootloadhid.rules:** -``` -# bootloadHID -SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess", RUN{builtin}+="uaccess" -``` - ### Serial device is not detected in bootloader mode on Linux Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices may require `USB_SERIAL` and any of its sub options. @@ -96,46 +107,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 -## BOOTLOADER_SIZE for AVR -Note that Teensy2.0++ bootloader size is 2048byte. Some Makefiles may have wrong comment. - -``` -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 2048 -# Atmel DFU loader 4096 (TMK Alt Controller) -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=2048 -``` - -## `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)` on MacOS - -This is an issue with updating on brew, causing symlinks that avr-gcc depend on getting mangled. - -The solution is to remove and reinstall all affected modules. - -``` -brew rm avr-gcc avr-gcc@8 dfu-programmer dfu-util gcc-arm-none-eabi arm-gcc-bin@8 avrdude qmk -brew install qmk/qmk/qmk -brew link --force avr-gcc@8 -brew link --force arm-gcc-bin@8 -``` - -### `avr-gcc` and LUFA - -If you updated your `avr-gcc` and you see errors involving LUFA, for example: - -`lib/lufa/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h:380:5: error: 'const' attribute on function returning 'void'` - -For now, you need to rollback `avr-gcc` to 8 in Homebrew. - -``` -brew uninstall --force avr-gcc -brew install avr-gcc@8 -brew link --force avr-gcc@8 -``` - ### I just flashed my keyboard and it does nothing/keypresses don't register - it's also ARM (rev6 planck, clueboard 60, hs60v2, etc...) (Feb 2019) Due to how EEPROM works on ARM based chips, saved settings may no longer be valid. This affects the default layers, and *may*, under certain circumstances we are still figuring out, make the keyboard unusable. Resetting the EEPROM will correct this. diff --git a/docs/faq_debug.md b/docs/faq_debug.md index 08c84fe4fd..7d5473678b 100644 --- a/docs/faq_debug.md +++ b/docs/faq_debug.md @@ -31,20 +31,6 @@ Check: - 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 diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index b8664074a7..745308b29e 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -2,21 +2,24 @@ These allow you to combine a modifier with a keycode. When pressed, the keydown event for the modifier, then `kc` will be sent. On release, the keyup event for `kc`, then the modifier will be sent. -|Key |Aliases |Description | -|----------|-------------------------------|----------------------------------------------------| -|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` | -|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` | -|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` | -|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` | -|`RCTL(kc)`| |Hold Right Control and press `kc` | -|`RSFT(kc)`| |Hold Right Shift and press `kc` | -|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` | -|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` | -|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` | -|`LCA(kc)` | |Hold Left Control and Alt and press `kc` | -|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` | -|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | -|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`| +|Key |Aliases |Description | +|----------|-------------------------------|------------------------------------------------------| +|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` | +|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` | +|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` | +|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` | +|`RCTL(kc)`| |Hold Right Control and press `kc` | +|`RSFT(kc)`| |Hold Right Shift and press `kc` | +|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` | +|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` | +|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` | +|`LCA(kc)` | |Hold Left Control and Alt and press `kc` | +|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` | +|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) and press `kc` | +|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` | +|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` | +|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | +|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc` | You can also chain them, for example `LCTL(LALT(KC_DEL))` or `C(A(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress. diff --git a/docs/feature_auto_shift.md b/docs/feature_auto_shift.md index f0b507bc61..b21a7690d9 100644 --- a/docs/feature_auto_shift.md +++ b/docs/feature_auto_shift.md @@ -139,7 +139,7 @@ completely normal and with no intention of shifted keys. `KC_ASRP`. The keyboard will type by itself the value of your `AUTO_SHIFT_TIMEOUT`. 7. Update `AUTO_SHIFT_TIMEOUT` in your `config.h` with the value reported. -8. Remove `AUTO_SHIFT_SETUP` from your `config.h`. +8. Add `AUTO_SHIFT_NO_SETUP` to your `config.h`. 9. Remove the key bindings `KC_ASDN`, `KC_ASUP` and `KC_ASRP`. 10. Compile and upload your new firmware. diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index 9e467c708a..6bb2bbed84 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md @@ -160,8 +160,6 @@ See the ST datasheet for your particular MCU to determine these values. Unless y Currently only hardware PWM is supported, not timer assisted, and does not provide automatic configuration. -?> Backlight support for STM32F072 has had limited testing, so YMMV. If unsure, set `BACKLIGHT_ENABLE = no` in your `rules.mk`. - ### Software PWM Driver :id=software-pwm-driver In this mode, PWM is "emulated" while running other keyboard tasks. It offers maximum hardware compatibility without extra platform configuration. The tradeoff is the backlight might jitter when the keyboard is busy. To enable, add this to your `rules.mk`: diff --git a/docs/feature_bluetooth.md b/docs/feature_bluetooth.md index 6cd5c3c6cf..08e5f24ac5 100644 --- a/docs/feature_bluetooth.md +++ b/docs/feature_bluetooth.md @@ -2,11 +2,10 @@ ## Bluetooth Known Supported Hardware -Currently Bluetooth support is limited to AVR based chips. For Bluetooth 2.1, QMK has support for RN-42 modules and the Bluefruit EZ-Key, the latter of which is not produced anymore. For more recent BLE protocols, currently only the Adafruit Bluefruit SPI Friend is directly supported. BLE is needed to connect to iOS devices. Note iOS does not support mouse input. +Currently Bluetooth support is limited to AVR based chips. For Bluetooth 2.1, QMK has support for RN-42 modules. For more recent BLE protocols, currently only the Adafruit Bluefruit SPI Friend is directly supported. BLE is needed to connect to iOS devices. Note iOS does not support mouse input. |Board |Bluetooth Protocol |Connection Type |rules.mk |Bluetooth Chip| |----------------------------------------------------------------|----------------------------|----------------|---------------------------|--------------| -|[Adafruit EZ-Key HID](https://www.adafruit.com/product/1535) |Bluetooth Classic | UART |`BLUETOOTH = AdafruitEZKey` | | |Roving Networks RN-42 (Sparkfun Bluesmirf) |Bluetooth Classic | UART |`BLUETOOTH = RN42` | RN-42 | |[Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633)|Bluetooth Low Energy | SPI |`BLUETOOTH = AdafruitBLE` | nRF51822 | @@ -24,16 +23,15 @@ Currently The only bluetooth chipset supported by QMK is the Adafruit Bluefruit A Bluefruit UART friend can be converted to an SPI friend, however this [requires](https://github.com/qmk/qmk_firmware/issues/2274) some reflashing and soldering directly to the MDBT40 chip. -## Adafruit EZ-Key hid -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 Rules.mk Options -Use only one of these + +The currently supported Bluetooth chipsets do not support [N-Key Rollover (NKRO)](reference_glossary.md#n-key-rollover-nkro), so `rules.mk` must contain `NKRO_ENABLE = no`. + +Use only one of these to enable Bluetooth: * BLUETOOTH_ENABLE = yes (Legacy Option) * BLUETOOTH = RN42 -* BLUETOOTH = AdafruitEZKey * BLUETOOTH = AdafruitBLE ## Bluetooth Keycodes diff --git a/docs/feature_debounce_type.md b/docs/feature_debounce_type.md index 65b4ea1e53..83ebafe60e 100644 --- a/docs/feature_debounce_type.md +++ b/docs/feature_debounce_type.md @@ -1,43 +1,151 @@ -# Debounce algorithm +# Contact bounce / contact chatter + +Mechanical switches often don't have a clean single transition between pressed and unpressed states. + +In an ideal world, when you press a switch, you would expect the digital pin to see something like this: +(X axis showing time +``` +voltage +---------------------- + ^ | + | | + | ------------------+ + ----> time +``` + +However in the real world you will actually see contact bounce, which will look like multiple 1->0 and 0->1 transitions, +until the value finally settles. +``` + +-+ +--+ +------------- + | | | | | + | | | | | ++-----------------+ +-+ +-+ +``` +The time it takes for the switch to settle might vary with switch type, age, and even pressing technique. + +If the device chooses not to mitigate contact bounce, then often actions that happen when the switch is pressed are repeated +multiple times. + +There are many ways to handle contact bounce ("Debouncing"). Some include employing additional hardware, for example an RC filter, +while there are various ways to do debouncing in software too, often called debounce algorithms. This page discusses software +debouncing methods available in QMK. + +While technically not considered contact bounce/contact chatter, some switch technologies are susceptible to noise, meaning, +while the key is not changing state, sometimes short random 0->1 or 1->0 transitions might be read by the digital circuit, for example: +``` + +-+ + | | + | | ++-----------------+ +-------------------- +``` + +Many debounce methods (but not all) will also make the device resistant to noise. If you are working with a technology that is +susceptible to noise, you must choose a debounce method that will also mitigate noise for you. + +## Types of debounce algorithms + +1) Unit of time: Timestamp (milliseconds) vs Cycles (scans) + * Debounce algorithms often have a 'debounce time' parameter, that specifies the maximum settling time of the switch contacts. + This time might be measured in various units: + * Cycles-based debouncing waits n cycles (scans), decreasing count by one each matrix_scan + * Timestamp-based debouncing stores the millisecond timestamp a change occurred, and does substraction to figure out time elapsed. + * Timestamp-based debouncing is usually superior, especially in the case of noise-resistant devices because settling times of physical + switches is specified in units of time, and should not depend on the matrix scan-rate of the keyboard. + * Cycles-based debouncing is sometimes considered inferior, because the settling time that it is able to compensate for depends on the + performance of the matrix scanning code. If you use cycles-based debouncing, and you significantly improve the performance of your scanning + code, you might end up with less effective debouncing. A situation in which cycles-based debouncing might be preferable is when + noise is present, and the scanning algorithm is slow, or variable speed. Even if your debounce algorithm is fundamentally noise-resistant, + if the scanning is slow, and you are using a timestamp-based algorithm, you might end up making a debouncing decision based on only two + sampled values, which will limit the noise-resistance of the algorithm. + * Currently all built-in debounce algorithms support timestamp-based debouncing only. In the future we might + implement cycles-based debouncing, and it will be selectable via a ```config.h``` macro. + +2) Symmetric vs Asymmetric + * Symmetric - apply the same debouncing algorithm, to both key-up and key-down events. + * Recommended naming convention: ```sym_*``` + * Asymmetric - apply different debouncing algorithms to key-down and key-up events. E.g. Eager key-down, Defer key-up. + * Recommended naming convention: ```asym_*``` followed by details of the type of algorithm in use, in order, for key-down and then key-up + +3) Eager vs Defer + * Eager - any key change is reported immediately. All further inputs for DEBOUNCE ms are ignored. + * Eager algorithms are not noise-resistant. + * Recommended naming conventions: + * ```sym_eager_*``` + * ```asym_eager_*_*```: key-down is using eager algorithm + * ```asym_*_eager_*```: key-up is using eager algorithm + * Defer - wait for no changes for DEBOUNCE ms before reporting change. + * Defer algorithms are noise-resistant + * Recommended naming conventions: + * ```sym_defer_*``` + * ```asym_defer_*_*```: key-down is using eager algorithm + * ```asym_*_defer_*```: key-up is using eager algorithm + +4) Global vs Per-Key vs Per-Row + * Global - one timer for all keys. Any key change state affects global timer + * Recommended naming convention: ```*_g``` + * Per-key - one timer per key + * Recommended naming convention: ```*_pk``` + * Per-row - one timer per row + * Recommended naming convention: ```*_pr``` + * Per-key and per-row algorithms consume more resources (in terms of performance, + and ram usage), but fast typists might prefer them over global. + +## Debounce algorithms supported by QMK QMK supports multiple debounce algorithms through its debounce API. - -The logic for which debounce method called is below. It checks various defines that you have set in rules.mk +The logic for which debounce method called is below. It checks various defines that you have set in ```rules.mk``` ``` DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce -DEBOUNCE_TYPE?= sym_g +DEBOUNCE_TYPE?= sym_defer_g ifneq ($(strip $(DEBOUNCE_TYPE)), custom) QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c endif ``` -# Debounce selection +### Debounce selection | DEBOUNCE_TYPE | Description | What else is needed | | ------------- | --------------------------------------------------- | ----------------------------- | -| Not defined | Use the default algorithm, currently sym_g | Nothing | +| Not defined | Use the default algorithm, currently sym_defer_g | Nothing | | custom | Use your own debounce code | ```SRC += debounce.c``` add your own debounce.c and implement necessary functions | -| anything_else | Use another algorithm from quantum/debounce/* | Nothing | +| Anything Else | Use another algorithm from quantum/debounce/* | Nothing | **Regarding split keyboards**: The debounce code is compatible with split keyboards. -# Use your own debouncing code -* Set ```DEBOUNCE_TYPE = custom```. -* Add ```SRC += debounce.c``` +### Selecting an included debouncing method +Keyboards may select one of the already implemented debounce methods, by adding to ```rules.mk``` the following line: +``` +DEBOUNCE_TYPE = +``` +Where name of algorithm is one of: +* ```sym_defer_g``` - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE``` milliseconds of no changes has occurred, all input changes are pushed. + * This is the current default algorithm. This is the highest performance algorithm with lowest memory usage, and it's also noise-resistant. +* ```sym_eager_pr``` - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE``` milliseconds of no further input for that row. +For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computationally expensive / low scan rate, and fingers usually only hit one row at a time. This could be +appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use. +* ```sym_eager_pk``` - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key +* ```sym_defer_pk``` - debouncing per key. On any state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that key, the key status change is pushed. + +### A couple algorithms that could be implemented in the future: +* ```sym_defer_pr``` +* ```sym_eager_g``` +* ```asym_eager_defer_pk``` + +### Use your own debouncing code +You have the option to implement you own debouncing algorithm. To do this: +* Set ```DEBOUNCE_TYPE = custom``` in ```rules.mk```. +* Add ```SRC += debounce.c``` in ```rules.mk``` * Add your own ```debounce.c```. Look at current implementations in ```quantum/debounce``` for examples. * Debouncing occurs after every raw matrix scan. * Use num_rows rather than MATRIX_ROWS, so that split keyboards are supported correctly. +* If the algorithm might be applicable to other keyboards, please consider adding it to ```quantum/debounce``` -# Changing between included debouncing methods -You can either use your own code, by including your own debounce.c, or switch to another included one. -Included debounce methods are: -* eager_pr - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE``` milliseconds of no further input for that row. -For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computationally expensive / low scan rate, and fingers usually only hit one row at a time. This could be -appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use. -* eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key -* sym_g - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE``` milliseconds of no changes has occured, all input changes are pushed. -* sym_pk - debouncing per key. On any state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occured on that key, the key status change is pushed. +### Old names +The following old names for existing algorithms will continue to be supported, however it is recommended to use the new names instead. +* sym_g - old name for sym_defer_g +* eager_pk - old name for sym_eager_pk +* sym_pk - old name for sym_defer_pk +* eager_pr - old name for sym_eager_pr diff --git a/docs/feature_joystick.md b/docs/feature_joystick.md new file mode 100644 index 0000000000..be3c781f6c --- /dev/null +++ b/docs/feature_joystick.md @@ -0,0 +1,147 @@ +## Joystick + +The keyboard can be made to be recognized as a joystick HID device by the operating system. + +This is enabled by adding `JOYSTICK_ENABLE` to `rules.mk`. You can set this value to `analog`, `digital`, or `no`. + +!> Joystick support is not currently available on V-USB devices. + +The joystick feature provides two services: + * reading analog input devices (eg. potentiometers) + * sending gamepad HID reports + +Both services can be used without the other, depending on whether you just want to read a device but not send gamepad reports (for volume control for instance) +or send gamepad reports based on values computed by the keyboard. + +### Analog Input + +To use analog input you must first enable it in `rules.mk`: + +```makefile +JOYSTICK_ENABLE = analog +``` + +An analog device such as a potentiometer found on a gamepad's analog axes is based on a [voltage divider](https://en.wikipedia.org/wiki/Voltage_divider). +It is composed of three connectors linked to the ground, the power input and power output (usually the middle one). The power output holds the voltage that varies based on the position of the cursor, +which value will be read using your MCU's [ADC](https://en.wikipedia.org/wiki/Analog-to-digital_converter). +Depending on which pins are already used by your keyboard's matrix, the rest of the circuit can get a little bit more complicated, +feeding the power input and ground connection through pins and using diodes to avoid bad interactions with the matrix scanning procedures. + +### Configuring the Joystick + +By default, two axes and eight buttons are defined. This can be changed in your `config.h`: + +```c +// Max 32 +#define JOYSTICK_BUTTON_COUNT 16 +// Max 6: X, Y, Z, Rx, Ry, Rz +#define JOYSTICK_AXES_COUNT 3 +``` + +When defining axes for your joystick, you have to provide a definition array. You can do this from your keymap.c file. +A joystick will either be read from an input pin that allows the use of the ADC, or can be virtual, so that its value is provided by your code. +You have to define an array of type ''joystick_config_t'' and of proper size. + +There are three ways for your circuit to work with the ADC, that relies on the use of 1, 2 or 3 pins of the MCU: + * 1 pin: your analog device is directly connected to your device GND and VCC. The only pin used is the ADC pin of your choice. + * 2 pins: your analog device is powered through a pin that allows toggling it on or off. The other pin is used to read the input value through the ADC. + * 3 pins: both the power input and ground are connected to pins that must be set to a proper state before reading and restored afterwards. + +The configuration of each axis is performed using one of four macros: + * `JOYSTICK_AXIS_VIRTUAL`: no ADC reading must be performed, that value will be provided by keyboard/keymap-level code + * `JOYSTICK_AXIS_IN(INPUT_PIN, LOW, REST, HIGH)`: a voltage will be read on the provided pin, which must be an ADC-capable pin. + * `JOYSTICK_AXIS_IN_OUT(INPUT_PIN, OUTPUT_PIN, LOW, REST, HIGH)`: the provided `OUTPUT_PIN` will be set high before `INPUT_PIN` is read. + * `JOYSTICK_AXIS_IN_OUT_GROUND(INPUT_PIN, OUTPUT_PIN, GROUND_PIN, LOW, REST, HIGH)`: the `OUTPUT_PIN` will be set high and `GROUND_PIN` will be set low before reading from `INPUT_PIN`. + +In any case where an ADC reading takes place (when `INPUT_PIN` is provided), additional `LOW`, `REST` and `HIGH` parameters are used. +These implement the calibration of the analog device by defining the range of read values that will be mapped to the lowest, resting position and highest possible value for the axis (-127 to 127). +In practice, you have to provide the lowest/highest raw ADC reading, and the raw reading at resting position, when no deflection is applied. You can provide inverted `LOW` and `HIGH` to invert the axis. + +For instance, an axes configuration can be defined in the following way: + +```c +//joystick config +joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT] = { + [0] = JOYSTICK_AXIS_IN_OUT_GROUND(A4, B0, A7, 900, 575, 285), + [1] = JOYSTICK_AXIS_VIRTUAL +}; +``` + +When the ADC reads 900 or higher, the returned axis value will be -127, whereas it will be 127 when the ADC reads 285 or lower. Zero is returned when 575 is read. + +In this example, the first axis will be read from the `A4` pin while `B0` is set high and `A7` is set low, using `analogReadPin()`, whereas the second axis will not be read. + +In order to give a value to the second axis, you can do so in any customizable entry point: as an action, in `process_record_user()` or in `matrix_scan_user()`, or even in `joystick_task()` which is called even when no key has been pressed. +You assign a value by writing to `joystick_status.axes[axis_index]` a signed 8-bit value (ranging from -127 to 127). Then it is necessary to assign the flag `JS_UPDATED` to `joystick_status.status` in order for an updated HID report to be sent. + +The following example writes two axes based on keypad presses, with `KC_P5` as a precision modifier: + +```c +#ifdef ANALOG_JOYSTICK_ENABLE +static uint8_t precision_val = 70; +static uint8_t axesFlags = 0; +enum axes { + Precision = 1, + Axis1High = 2, + Axis1Low = 4, + Axis2High = 8, + Axis2Low = 16 +}; +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { +#ifdef ANALOG_JOYSTICK_ENABLE + // virtual joystick +# if JOYSTICK_AXES_COUNT > 1 + case KC_P8: + if (record->event.pressed) { + axesFlags |= Axis2Low; + } else { + axesFlags &= ~Axis2Low; + } + joystick_status.status |= JS_UPDATED; + break; + case KC_P2: + if (record->event.pressed) { + axesFlags |= Axis2High; + } else { + axesFlags &= ~Axis2High; + } + joystick_status.status |= JS_UPDATED; + break; +# endif + case KC_P4: + if (record->event.pressed) { + axesFlags |= Axis1Low; + } else { + axesFlags &= ~Axis1Low; + } + joystick_status.status |= JS_UPDATED; + break; + case KC_P6: + if (record->event.pressed) { + axesFlags |= Axis1High; + } else { + axesFlags &= ~Axis1High; + } + joystick_status.status |= JS_UPDATED; + break; + case KC_P5: + if (record->event.pressed) { + axesFlags |= Precision; + } else { + axesFlags &= ~Precision; + } + joystick_status.status |= JS_UPDATED; + break; +#endif + } + return true; +} +``` + +### Triggering Joystick Buttons + +Joystick buttons are normal Quantum keycodes, defined as `JS_BUTTON0` to `JS_BUTTON31`, depending on the number of buttons you have configured. +To trigger a joystick button, just add the corresponding keycode to your keymap. diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index 5f3095198f..9e33a321ce 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md @@ -72,6 +72,43 @@ static void render_logo(void) { } ``` +## Buffer Read Example +For some purposes, you may need to read the current state of the OLED display +buffer. The `oled_read_raw` function can be used to safely read bytes from the +buffer. + +In this example, calling `fade_display` in the `oled_task_user` function will +slowly fade away whatever is on the screen by turning random pixels black over +time. +```c +//Setup some mask which can be or'd with bytes to turn off pixels +const uint8_t single_bit_masks[8] = {127, 191, 223, 239, 247, 251, 253, 254}; + +static void fade_display(void) { + //Define the reader structure + oled_buffer_reader_t reader; + uint8_t buff_char; + if (random() % 30 == 0) { + srand(timer_read()); + // Fetch a pointer for the buffer byte at index 0. The return structure + // will have the pointer and the number of bytes remaining from this + // index position if we want to perform a sequential read by + // incrementing the buffer pointer + reader = oled_read_raw(0); + //Loop over the remaining buffer and erase pixels as we go + for (uint16_t i = 0; i < reader.remaining_element_count; i++) { + //Get the actual byte in the buffer by dereferencing the pointer + buff_char = *reader.current_element; + if (buff_char != 0) { + oled_write_raw_byte(buff_char & single_bit_masks[rand() % 8], i); + } + //increment the pointer to fetch a new byte during the next loop + reader.current_element++; + } + } +} +``` + ## Other Examples In split keyboards, it is very common to have two OLED displays that each render different content and are oriented or flipped differently. You can do this by switching which content to render by using the return value from `is_keyboard_master()` or `is_keyboard_left()` found in `split_util.h`, e.g: @@ -238,6 +275,10 @@ void oled_write_P(const char *data, bool invert); // Remapped to call 'void oled_write_ln(const char *data, bool invert);' on ARM void oled_write_ln_P(const char *data, bool invert); +// Returns a pointer to the requested start index in the buffer plus remaining +// buffer length as struct +oled_buffer_reader_t oled_read_raw(uint16_t start_index); + // Writes a string to the buffer at current cursor position void oled_write_raw(const char *data, uint16_t size); @@ -259,6 +300,10 @@ bool oled_on(void); // Returns true if the screen was off or turns off bool oled_off(void); +// Returns true if the oled is currently on, false if it is +// not +bool is_oled_on(void); + // Basically it's oled_render, but with timeout management and oled_task_user calling! void oled_task(void); diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 2cde3ec569..b70a5fcba0 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -129,7 +129,7 @@ Configure the hardware via your `config.h`: From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example: ```c -const led_config_t g_led_config = { { +led_config_t g_led_config = { { // Key Matrix to LED Index { 5, NO_LED, NO_LED, 0 }, { NO_LED, NO_LED, NO_LED, NO_LED }, @@ -422,8 +422,8 @@ Where `28` is an unused index from `eeconfig.h`. |`rgb_matrix_toggle_noeeprom()` |Toggle effect range LEDs between on and off (not written to EEPROM) | |`rgb_matrix_enable()` |Turn effect range LEDs on, based on their previous state | |`rgb_matrix_enable_noeeprom()` |Turn effect range LEDs on, based on their previous state (not written to EEPROM) | -|`rgb_matrix_disable()` |Turn effect range LEDs off | -|`rgb_matrix_disable_noeeprom()` |Turn effect range LEDs off (not written to EEPROM) | +|`rgb_matrix_disable()` |Turn effect range LEDs off, based on their previous state | +|`rgb_matrix_disable_noeeprom()` |Turn effect range LEDs off, based on their previous state (not written to EEPROM) | ### Change Effect Mode :id=change-effect-mode |Function |Description | @@ -431,19 +431,31 @@ Where `28` is an unused index from `eeconfig.h`. |`rgb_matrix_mode(mode)` |Set the mode, if RGB animations are enabled | |`rgb_matrix_mode_noeeprom(mode)` |Set the mode, if RGB animations are enabled (not written to EEPROM) | |`rgb_matrix_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations | +|`rgb_matrix_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) | |`rgb_matrix_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations | -|`rgb_matrix_increase_speed()` |Increases the speed of the animations | -|`rgb_matrix_decrease_speed()` |Decreases the speed of the animations | +|`rgb_matrix_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) | +|`rgb_matrix_increase_speed()` |Increase the speed of the animations | +|`rgb_matrix_increase_speed_noeeprom()` |Increase the speed of the animations (not written to EEPROM) | +|`rgb_matrix_decrease_speed()` |Decrease the speed of the animations | +|`rgb_matrix_decrease_speed_noeeprom()` |Decrease the speed of the animations (not written to EEPROM) | +|`rgb_matrix_set_speed(speed)` |Set the speed of the animations to the given value where `speed` is between 0 and 255 | +|`rgb_matrix_set_speed_noeeprom(speed)` |Set the speed of the animations to the given value where `speed` is between 0 and 255 (not written to EEPROM) | ### Change Color :id=change-color |Function |Description | |--------------------------------------------|-------------| |`rgb_matrix_increase_hue()` |Increase the hue for effect range LEDs. This wraps around at maximum hue | +|`rgb_matrix_increase_hue_noeeprom()` |Increase the hue for effect range LEDs. This wraps around at maximum hue (not written to EEPROM) | |`rgb_matrix_decrease_hue()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue | +|`rgb_matrix_decrease_hue_noeeprom()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue (not written to EEPROM) | |`rgb_matrix_increase_sat()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation | +|`rgb_matrix_increase_sat_noeeprom()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation (not written to EEPROM) | |`rgb_matrix_decrease_sat()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation | +|`rgb_matrix_decrease_sat_noeeprom()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation (not written to EEPROM) | |`rgb_matrix_increase_val()` |Increase the value for effect range LEDs. This wraps around at maximum value | +|`rgb_matrix_increase_val_noeeprom()` |Increase the value for effect range LEDs. This wraps around at maximum value (not written to EEPROM) | |`rgb_matrix_decrease_val()` |Decrease the value for effect range LEDs. This wraps around at minimum value | +|`rgb_matrix_decrease_val_noeeprom()` |Decrease the value for effect range LEDs. This wraps around at minimum value (not written to EEPROM) | |`rgb_matrix_sethsv(h, s, v)` |Set LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 | |`rgb_matrix_sethsv_noeeprom(h, s, v)` |Set LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) | diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index a81b50e828..23b2886edb 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -126,19 +126,19 @@ Use these defines to add or remove animations from the firmware. When you are ru The following options are used to tweak the various animations: -|Define |Default |Description | -|------------------------------------|-------------|-------------------------------------------------------------------------------------| +|Define |Default |Description | +|------------------------------------|-------------|-----------------------------------------------------------------------------------------------| |`RGBLIGHT_EFFECT_BREATHE_CENTER` |*Not defined*|If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 | -|`RGBLIGHT_EFFECT_BREATHE_MAX` |`255` |The maximum brightness for the breathing mode. Valid values are 1 to 255 | -|`RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL`|`1000` |How long to wait between light changes for the "Christmas" animation, in milliseconds| -|`RGBLIGHT_EFFECT_CHRISTMAS_STEP` |`2` |The number of LEDs to group the red/green colors by for the "Christmas" animation | -|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel | -|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation | -|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by | -|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`255` |Range adjustment for the rainbow swirl effect to get different swirls | -|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation | -|`RGBLIGHT_EFFECT_TWINKLE_LIFE` |`75` |Adjusts how quickly each LED brightens and dims when twinkling (in animation steps) | -|`RGBLIGHT_EFFECT_TWINKLE_PROBABILITY`|`1/127` |Adjusts how likely each LED is to twinkle (on each animation step) | +|`RGBLIGHT_EFFECT_BREATHE_MAX` |`255` |The maximum brightness for the breathing mode. Valid values are 1 to 255 | +|`RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL`|`40` |How long (in milliseconds) to wait between animation steps for the "Christmas" animation | +|`RGBLIGHT_EFFECT_CHRISTMAS_STEP` |`2` |The number of LEDs to group the red/green colors by for the "Christmas" animation | +|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel | +|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation | +|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by | +|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`255` |Range adjustment for the rainbow swirl effect to get different swirls | +|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation | +|`RGBLIGHT_EFFECT_TWINKLE_LIFE` |`75` |Adjusts how quickly each LED brightens and dims when twinkling (in animation steps) | +|`RGBLIGHT_EFFECT_TWINKLE_PROBABILITY`|`1/127` |Adjusts how likely each LED is to twinkle (on each animation step) | ### Example Usage to Reduce Memory Footprint 1. Remove `RGBLIGHT_ANIMATIONS` from `config.h`. @@ -377,6 +377,17 @@ rgblight_sethsv(HSV_GREEN, 2); // led 2 |`rgblight_sethsv(h, s, v)` |Set effect range LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 | |`rgblight_sethsv_noeeprom(h, s, v)` |Set effect range LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) | +#### Speed functions +|Function |Description | +|--------------------------------------------|-------------| +|`rgblight_increase_speed()` |Increases the animation speed | +|`rgblight_increase_speed_noeeprom()` |Increases the animation speed (not written to EEPROM) | +|`rgblight_decrease_speed()` |Decreases the animation speed | +|`rgblight_decrease_speed_noeeprom()` |Decreases the animation speed (not written to EEPROM) | +|`rgblight_set_speed()` |Sets the speed. Value is between 0 and 255 | +|`rgblight_set_speed_noeeprom()` |Sets the speed. Value is between 0 and 255 (not written to EEPROM) | + + #### layer functions |Function |Description | |--------------------------------------------|-------------| diff --git a/docs/feature_split_keyboard.md b/docs/feature_split_keyboard.md index ce470b9964..f054f365b6 100644 --- a/docs/feature_split_keyboard.md +++ b/docs/feature_split_keyboard.md @@ -48,11 +48,12 @@ However, USB cables, SATA cables, and even just 4 wires have been known to be us ### Serial Wiring -The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and D0 (aka PDO or pin 3) between the two Pro Micros. +The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and D0/D1/D2/D3 (aka PD0/PD1/PD2/PD3) between the two Pro Micros. ?> Note that the pin used here is actually set by `SOFT_SERIAL_PIN` below. -![serial wiring](https://i.imgur.com/C3D1GAQ.png) +sk-pd0-connection-mono +sk-pd2-connection-mono ### I2C Wiring @@ -60,7 +61,7 @@ The 4 wires of the TRRS cable need to connect GND, VCC, and SCL and SDA (aka PD0 The pull-up resistors may be placed on either half. If you wish to use the halves independently, it is also possible to use 4 resistors and have the pull-ups in both halves. -![I2C wiring](https://i.imgur.com/Hbzhc6E.png) +sk-i2c-connection-mono ## Firmware Configuration diff --git a/docs/feature_tap_dance.md b/docs/feature_tap_dance.md index 877c37336e..d2da39ad2b 100644 --- a/docs/feature_tap_dance.md +++ b/docs/feature_tap_dance.md @@ -28,7 +28,9 @@ After this, you'll want to use the `tap_dance_actions` array to specify what act * `ACTION_TAP_DANCE_LAYER_TOGGLE(kc, layer)`: Sends the `kc` keycode when tapped once, or toggles the state of `layer`. (this functions like the `TG` layer keycode). * `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the final tap count of the tap dance action. * `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function when the dance action finishes (like the previous option), and the last function when the tap dance action resets. -* `ACTION_TAP_DANCE_FN_ADVANCED_TIME(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn, tap_specific_tapping_term)`: This functions identically to the `ACTION_TAP_DANCE_FN_ADVANCED` function, but uses a custom tapping term for it, instead of the predefined `TAPPING_TERM`. +* ~~`ACTION_TAP_DANCE_FN_ADVANCED_TIME(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn, tap_specific_tapping_term)`~~: This functions identically to the `ACTION_TAP_DANCE_FN_ADVANCED` function, but uses a custom tapping term for it, instead of the predefined `TAPPING_TERM`. + * This is deprecated in favor of the Per Key Tapping Term functionality, as outlined [here](custom_quantum_functions.md#Custom_Tapping_Term). You'd want to check for the specific `TD()` macro that you want to use (such as `TD(TD_ESC_CAPS)`) instead of using this specific Tap Dance function. + The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise. diff --git a/docs/flashing.md b/docs/flashing.md index 1f71c253c3..5c245c5675 100644 --- a/docs/flashing.md +++ b/docs/flashing.md @@ -239,3 +239,4 @@ There are a number of DFU commands that you can use to flash firmware to a STM32 * `:dfu-util-split-left` - This flashes the normal firmware, just like the default option (`:dfu-util`). However, this also configures the "Left Side" EEPROM setting for split keyboards. * `:dfu-util-split-right` - This flashes the normal firmware, just like the default option (`:dfu-util`). However, this also configures the "Right Side" EEPROM setting for split keyboards. * `:st-link-cli` - This allows you to flash the firmware via ST-LINK's CLI utility, rather than dfu-util. +* `:st-flash` - This allows you to flash the firmware via the `st-flash` utility from [STLink Tools](https://github.com/stlink-org/stlink), rather than dfu-util. diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md index df82a001f0..a89dc73d01 100644 --- a/docs/getting_started_make_guide.md +++ b/docs/getting_started_make_guide.md @@ -101,10 +101,6 @@ This allows you to send Unicode characters by inputting a mnemonic corresponding For further details, as well as limitations, see the [Unicode page](feature_unicode.md). -`BLUETOOTH_ENABLE` - -This allows you to interface with a Bluefruit EZ-key to send keycodes wirelessly. It uses the D2 and D3 pins. - `AUDIO_ENABLE` This allows you output audio on the C6 pin (needs abstracting). See the [audio page](feature_audio.md) for more information. diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index a862bc0ca8..d49d0d0928 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -192,7 +192,7 @@ When developing your keyboard, keep in mind that all warnings will be treated as ## Copyright Blurb -If you're adapting your keyboard's setup from another project, but not using the same code, but sure to update the copyright header at the top of the files to show your name, in this format: +If you're adapting your keyboard's setup from another project, but not using the same code, be sure to update the copyright header at the top of the files to show your name, in this format: Copyright 2017 Your Name diff --git a/docs/ja/api_development_environment.md b/docs/ja/api_development_environment.md new file mode 100644 index 0000000000..8dce1ba2fd --- /dev/null +++ b/docs/ja/api_development_environment.md @@ -0,0 +1,8 @@ +# 開発環境のセットアップ + + + +開発環境をセットアップするには、[qmk_web_stack](https://github.com/qmk/qmk_web_stack) に行ってください。 diff --git a/docs/ja/api_development_overview.md b/docs/ja/api_development_overview.md new file mode 100644 index 0000000000..0612507b4d --- /dev/null +++ b/docs/ja/api_development_overview.md @@ -0,0 +1,49 @@ +# QMK コンパイラ開発ガイド + + + +このページでは、開発者に QMK コンパイラを紹介しようと思います。コードを読まなければならないような核心となる詳細に立ち入って調べることはしません。ここで得られるものは、コードを読んで理解を深めるためのフレームワークです。 + +# 概要 + +QMK Compile API は、いくつかの可動部分からできています: + +![構造図](https://raw.githubusercontent.com/qmk/qmk_api/master/docs/architecture.svg) + +API クライアントは API サービスと排他的にやりとりをします。ここでジョブをサブミットし、状態を調べ、結果をダウンロードします。API サービスはコンパイルジョブを [Redis Queue](https://python-rq.org) に挿入し、それらのジョブの結果について RQ と S3 の両方を調べます。 + +ワーカーは RQ から新しいコンパイルジョブを取り出し、ソースとバイナリを S3 互換のストレージエンジンにアップロードします。 + +# ワーカー + +QMK コンパイラワーカーは実際のビルド作業に責任を持ちます。ワーカーは RQ からジョブを取り出し、ジョブを完了するためにいくつかの事を行います: + +* 新しい qmk_firmware のチェックアウトを作成する +* 指定されたレイヤーとキーボードメタデータを使って `keymap.c` をビルドする +* ファームウェアをビルドする +* ソースのコピーを zip 形式で圧縮する +* ファームウェア、ソースの zip ファイル、メタデータファイルを S3 にアップロードする +* ジョブの状態を RQ に送信する + +# API サービス + +API サービスは比較的単純な Flask アプリケーションです。理解しておくべきことが幾つかあります。 + +## @app.route('/v1/compile', methods=['POST']) + +これは API の主なエントリーポイントです。クライアントとのやりとりはここから開始されます。クライアントはキーボードを表す JSON ドキュメントを POST し、API はコンパイルジョブをサブミットする前にいくらかの(とても)基本的な検証を行います。 + +## @app.route('/v1/compile/<string:job_id>', methods=['GET']) + +これは最もよく呼ばれるエンドポイントです。ジョブの詳細が redis から利用可能であればそれを取り出し、そうでなければ S3 からキャッシュされたジョブの詳細を取り出します。 + +## @app.route('/v1/compile/<string:job_id>/download', methods=['GET']) + +このメソッドによりユーザはコンパイルされたファームウェアファイルをダウンロードすることができます。 + +## @app.route('/v1/compile/<string:job_id>/source', methods=['GET']) + +このメソッドによりユーザはファームウェアのソースをダウンロードすることができます。 diff --git a/docs/ja/api_docs.md b/docs/ja/api_docs.md new file mode 100644 index 0000000000..b483c045e6 --- /dev/null +++ b/docs/ja/api_docs.md @@ -0,0 +1,73 @@ +# QMK API + + + +このページは QMK API の使い方を説明します。もしあなたがアプリケーション開発者であれば、全ての [QMK](https://qmk.fm) キーボードのファームウェアをコンパイルするために、この API を使うことができます。 + +## 概要 + +このサービスは、カスタムキーマップをコンパイルするための非同期 API です。API に 何らかの JSON を POST し、定期的に状態をチェックし、ファームウェアのコンパイルが完了していれば、結果のファームウェアと(もし希望すれば)そのファームウェアのソースコードをダウンロードすることができます。 + +#### JSON ペイロードの例: + +```json +{ + "keyboard": "clueboard/66/rev2", + "keymap": "my_awesome_keymap", + "layout": "LAYOUT_all", + "layers": [ + ["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_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(1)","KC_LEFT","KC_DOWN","KC_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_TRNS","KC_DEL","BL_STEP","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","_______","KC_TRNS","KC_PSCR","KC_SLCK","KC_PAUS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","MO(2)","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_PGUP","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","MO(1)","KC_LEFT","KC_PGDN","KC_RGHT"], + ["KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","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","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","MO(2)","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","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(1)","KC_TRNS","KC_TRNS","KC_TRNS"] + ] +} +``` + +ご覧のとおり、ペイロードにはファームウェアを作成および生成するために必要なキーボードの全ての側面を記述します。各レイヤーは QMK キーコードの1つのリストで、キーボードの `LAYOUT` マクロと同じ長さです。もしキーボードが複数の `LAYOUT` マクロをサポートする場合、どのマクロを使うかを指定することができます。 + +## コンパイルジョブのサブミット + +キーマップをファームウェアにコンパイルするには、単純に JSON を `/v1/compile` エンドポイントに POST します。以下の例では、JSON ペイロードを `json_data` という名前のファイルに配置しています。 + +``` +$ curl -H "Content-Type: application/json" -X POST -d "$(< json_data)" http://api.qmk.fm/v1/compile +{ + "enqueued": true, + "job_id": "ea1514b3-bdfc-4a7b-9b5c-08752684f7f6" +} +``` + +## 状態のチェック + +キーマップをサブミットした後で、簡単な HTTP GET 呼び出しを使って状態をチェックすることができます: + +``` +$ curl http://api.qmk.fm/v1/compile/ea1514b3-bdfc-4a7b-9b5c-08752684f7f6 +{ + "created_at": "Sat, 19 Aug 2017 21:39:12 GMT", + "enqueued_at": "Sat, 19 Aug 2017 21:39:12 GMT", + "id": "f5f9b992-73b4-479b-8236-df1deb37c163", + "status": "running", + "result": null +} +``` + +これは、ジョブをキューに入れることに成功し、現在実行中であることを示しています。5つの状態がありえます: + +* **failed**: なんらかの理由でコンパイルサービスが失敗しました。 +* **finished**: コンパイルが完了し、結果を見るには `result` をチェックする必要があります。 +* **queued**: キーマップはコンパイルサーバが利用可能になるのを待っています。 +* **running**: コンパイルが進行中で、まもなく完了するはずです。 +* **unknown**: 深刻なエラーが発生し、[バグを報告](https://github.com/qmk/qmk_compiler/issues)する必要があります。 + +## 完了した結果を検証 + +コンパイルジョブが完了したら、`result` キーをチェックします。このキーの値は幾つかの情報を含むハッシュです: + +* `firmware_binary_url`: 書き込み可能なファームウェアの URL のリスト +* `firmware_keymap_url`: `keymap.c` の URL のリスト +* `firmware_source_url`: ファームウェアの完全なソースコードの URL のリスト +* `output`: このコンパイルジョブの stdout と stderr。エラーはここで見つけることができます。 diff --git a/docs/ja/api_overview.md b/docs/ja/api_overview.md new file mode 100644 index 0000000000..18b8eae10f --- /dev/null +++ b/docs/ja/api_overview.md @@ -0,0 +1,20 @@ +# QMK API + + + +QMK API は、Web と GUI ツールが [QMK](http://qmk.fm/) によってサポートされるキーボード用の任意のキーマップをコンパイルするために使うことができる、非同期 API を提供します。標準のキーマップテンプレートは、C コードのサポートを必要としない全ての QMK キーコードをサポートします。キーボードのメンテナは独自のカスタムテンプレートを提供して、より多くの機能を実現することができます。 + +## アプリケーション開発者 + +もしあなたがアプリケーションでこの API を使うことに興味があるアプリケーション開発者であれば、[API の使用](ja/api_docs.md) に行くべきです。 + +## キーボードのメンテナ + +もし QMK Compiler API でのあなたのキーボードのサポートを強化したい場合は、[キーボードサポート](ja/reference_configurator_support.md) の節に行くべきです。 + +## バックエンド開発者 + +もし API 自体に取り組むことに興味がある場合は、[開発環境](ja/api_development_environment.md)のセットアップから始め、それから [API のハッキング](ja/api_development_overview.md) を調べるべきです。 diff --git a/docs/ja/config_options.md b/docs/ja/config_options.md index b4cf3c888c..2a64f2ba2a 100644 --- a/docs/ja/config_options.md +++ b/docs/ja/config_options.md @@ -322,11 +322,9 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 ``` * `LAYOUTS` * このキーボードがサポートする[レイアウト](ja/feature_layouts.md)のリスト -* `LINK_TIME_OPTIMIZATION_ENABLE` +* `LTO_ENABLE` * キーボードをコンパイルする時に、Link Time Optimization (LTO) を有効にします。これは処理に時間が掛かりますが、コンパイルされたサイズを大幅に減らします (そして、ファームウェアが小さいため、追加の時間は分からないくらいです)。 ただし、LTO が有効な場合、古い TMK のマクロと関数の機能が壊れるため、自動的にこれらの機能を無効にします。これは `NO_ACTION_MACRO` と `NO_ACTION_FUNCTION` を自動的に定義することで行われます。(メモ: これは QMK の [マクロ](ja/feature_macros.md) と [レイヤー](ja/feature_layers.md) には影響を与えません。) -* `LTO_ENABLE` - * LINK_TIME_OPTIMIZATION_ENABLE と同じ意味です。`LINK_TIME_OPTIMIZATION_ENABLE` の代わりに `LTO_ENABLE` を使うことができます。 ## AVR MCU オプション * `MCU = atmega32u4` @@ -371,10 +369,8 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 * MIDI 制御 * `UNICODE_ENABLE` * Unicode -* `BLUETOOTH_ENABLE` - * Adafruit EZ-Key HID で Bluetooth を有効にするレガシーオプション。BLUETOOTH を見てください * `BLUETOOTH` - * 現在のオプションは、AdafruitEzKey、AdafruitBLE、RN42 + * 現在のオプションは、AdafruitBLE、RN42 * `SPLIT_KEYBOARD` * 分割キーボード (let's split や bakingpy のキーボードのようなデュアル MCU) のサポートを有効にし、quantum/split_common にある全ての必要なファイルをインクルードします * `CUSTOM_MATRIX` diff --git a/docs/ja/faq_build.md b/docs/ja/faq_build.md index 97e1bd8cf7..62c36f2497 100644 --- a/docs/ja/faq_build.md +++ b/docs/ja/faq_build.md @@ -145,4 +145,4 @@ ARM ベースのチップ上での EEPROM の動作によって、保存され [Planck rev6 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/539284620861243409/planck_rev6_default.bin) を使って eeprom のリセットを強制することができます。このイメージを書き込んだ後で、通常のファームウェアを書き込むと、キーボードが_通常_ の動作順序に復元されます。 [Preonic rev3 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/537849497313738762/preonic_rev3_default.bin) -いずれかの形式でブートマジックが有効になっている場合は、これも実行できるはずです (実行方法の詳細については、[ブートマジックドキュメント](feature_bootmagic.md)とキーボード情報を見てください)。 +いずれかの形式でブートマジックが有効になっている場合は、これも実行できるはずです (実行方法の詳細については、[ブートマジックドキュメント](ja/feature_bootmagic.md)とキーボード情報を見てください)。 diff --git a/docs/ja/faq_general.md b/docs/ja/faq_general.md index a365e380b3..83d1a557bd 100644 --- a/docs/ja/faq_general.md +++ b/docs/ja/faq_general.md @@ -51,7 +51,7 @@ OK、問題ありません。[GitHub で issue を開く](https://github.com/qmk TMK は [Jun Wako](https://github.com/tmk) によって設計され実装されました。QMK は [Jack Humbert](https://github.com/jackhumbert) の Planck 用 TMK のフォークとして始まりました。しばらくして、Jack のフォークは TMK からかなり分岐し、2015年に Jack はフォークを QMK に名前を変えることにしました。 -技術的な観点から、QMK は幾つかの新しい機能を追加した TMK に基づいています。最も注目すべきことは、QMK は利用可能なキーコードの数を増やし、`S()`、`LCTL()` および `MO()` などの高度な機能を実装するためにこれらを使っています。[キーコード](keycodes.md)でこれらのキーコードの完全なリストを見ることができます。 +技術的な観点から、QMK は幾つかの新しい機能を追加した TMK に基づいています。最も注目すべきことは、QMK は利用可能なキーコードの数を増やし、`S()`、`LCTL()` および `MO()` などの高度な機能を実装するためにこれらを使っています。[キーコード](ja/keycodes.md)でこれらのキーコードの完全なリストを見ることができます。 プロジェクトとコミュニティの管理の観点から、TMK は公式にサポートされている全てのキーボードを自分で管理しており、コミュニティのサポートも少し受けています。他のキーボード用に別個のコミュニティが維持するフォークが存在するか、作成できます。デフォルトでは少数のキーマップのみが提供されるため、ユーザは一般的にお互いにキーマップを共有しません。QMK は集中管理されたリポジトリを介して、キーボードとキーマップの両方を共有することを奨励しており、品質基準に準拠する全てのプルリクエストを受け付けます。これらはほとんどコミュニティで管理されますが、必要な場合は QMK チームも支援します。 diff --git a/docs/ja/faq_keymap.md b/docs/ja/faq_keymap.md index 2726e18728..311ebe0e42 100644 --- a/docs/ja/faq_keymap.md +++ b/docs/ja/faq_keymap.md @@ -128,7 +128,7 @@ https://github.com/tekezo/Karabiner/issues/403 ## 単一のキーでの Esc と` -[Grave Escape](feature_grave_esc.md) 機能を見てください。 +[Grave Escape](ja/feature_grave_esc.md) 機能を見てください。 ## Mac OSX での Eject `KC_EJCT` キーコードは OSX で動作します。https://github.com/tmk/tmk_keyboard/issues/250 diff --git a/docs/ja/feature_bluetooth.md b/docs/ja/feature_bluetooth.md index 4443a4e3ea..f7835dd548 100644 --- a/docs/ja/feature_bluetooth.md +++ b/docs/ja/feature_bluetooth.md @@ -7,11 +7,10 @@ ## Bluetooth の既知のサポートハードウェア -現在のところ Bluetooth のサポートは AVR ベースのチップに限られます。Bluetooth 2.1 については、QMK は RN-42 モジュールと、Bluefruit EZ-Key をサポートしますが、後者はもう生産されていません。より最近の BLE プロトコルについては、現在のところ Adafruit Bluefruit SPI Friend のみが直接サポートされています。iOS デバイスに接続するには、BLE が必要です。iOS はマウス入力をサポートしないことに注意してください。 +現在のところ Bluetooth のサポートは AVR ベースのチップに限られます。Bluetooth 2.1 については、QMK は RN-42 モジュールをサポートします。より最近の BLE プロトコルについては、現在のところ Adafruit Bluefruit SPI Friend のみが直接サポートされています。iOS デバイスに接続するには、BLE が必要です。iOS はマウス入力をサポートしないことに注意してください。 | ボード | Bluetooth プロトコル | 接続タイプ | rules.mk | Bluetooth チップ | |----------------------------------------------------------------|----------------------------|----------------|---------------------------|--------------| -| [Adafruit EZ-Key HID](https://www.adafruit.com/product/1535) | Bluetooth Classic | UART | `BLUETOOTH = AdafruitEZKey` | | | Roving Networks RN-42 (Sparkfun Bluesmirf) | Bluetooth Classic | UART | `BLUETOOTH = RN42` | RN-42 | | [Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633) | Bluetooth Low Energy | SPI | `BLUETOOTH = AdafruitBLE` | nRF51822 | @@ -29,16 +28,11 @@ Bluefruit UART friend は SPI friend に変換することができますが、これにはMDBT40 チップへの直接の再書き込みとはんだ付けが[必要です](https://github.com/qmk/qmk_firmware/issues/2274)。 -## Adafruit EZ-Key hid -これには[ハードウェアの変更](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts)が必要ですが、Makefile を使って有効にすることができます。ファームウェアは引き続き USB 経由で文字を出力するため、コンピュータ経由で充電する場合は注意してください。任意にオフにするために Bluefruit 上にスイッチを持つことは理にかなっています。 - - ## Bluetooth の Rules.mk オプション これらのうちの1つだけを使ってください * BLUETOOTH_ENABLE = yes (レガシーオプション) * BLUETOOTH = RN42 -* BLUETOOTH = AdafruitEZKey * BLUETOOTH = AdafruitBLE ## Bluetooth キーコード diff --git a/docs/ja/feature_split_keyboard.md b/docs/ja/feature_split_keyboard.md index 74b62310fb..3bdf96d1c7 100644 --- a/docs/ja/feature_split_keyboard.md +++ b/docs/ja/feature_split_keyboard.md @@ -1,8 +1,8 @@ # 分割キーボード QMK ファームウェアリポジトリの多くのキーボードは、"分割"キーボードです。それらは2つのコントローラを使います — 1つは USB に接続し、もう1つは TRRS または同様のケーブルを介してシリアルまたは I2C 接続で接続します。 @@ -20,12 +20,12 @@ QMK ファームウェアには、任意のキーボードで使用可能な一 | Transport | AVR | ARM | |------------------------------|--------------------|--------------------| -| ['serial'](serial_driver.md) | :heavy_check_mark: | :white_check_mark: 1 | +| ['serial'](ja/serial_driver.md) | :heavy_check_mark: | :white_check_mark: 1 | | I2C | :heavy_check_mark: | | 注意: -1. ハードウェアとソフトウェアの両方の制限は、[ドライバーのドキュメント](serial_driver.md)の中で説明されます。 +1. ハードウェアとソフトウェアの両方の制限は、[ドライバーのドキュメント](ja/serial_driver.md)の中で説明されます。 ## ハードウェア設定 @@ -53,11 +53,12 @@ QMK ファームウェアには、任意のキーボードで使用可能な一 ### シリアル配線 -2つの Pro Micro 間で GND、Vcc、D0 (別名 PDO あるいは pin 3) を TRS/TRRS ケーブルの3本のワイヤで接続します。 +2つの Pro Micro 間で GND、Vcc、D0/D1/D2/D3 (別名 PD0/PD1/PD2/PD3) を TRS/TRRS ケーブルの3本のワイヤで接続します。 ?> ここで使われるピンは実際には以下の `SOFT_SERIAL_PIN` によって設定されることに注意してください。 -![シリアル配線](https://i.imgur.com/C3D1GAQ.png) +sk-pd0-connection-mono +sk-pd2-connection-mono ### I2C 配線 @@ -65,7 +66,7 @@ QMK ファームウェアには、任意のキーボードで使用可能な一 プルアップ抵抗はキーボードの左右どちら側にも配置することができます。もし各側を単独で使いたい場合は、4つの抵抗を使い、両側にプルアップ抵抗を配置することもできます。 -![I2C 配線](https://i.imgur.com/Hbzhc6E.png) +sk-i2c-connection-mono ## ファームウェア設定 diff --git a/docs/ja/getting_started_make_guide.md b/docs/ja/getting_started_make_guide.md index 0d39583a1d..cbc824de8b 100644 --- a/docs/ja/getting_started_make_guide.md +++ b/docs/ja/getting_started_make_guide.md @@ -106,10 +106,6 @@ make コマンド自体にもいくつかの追加オプションがあります 詳細と制限については、[Unicode ページ](ja/feature_unicode.md) を見てください。 -`BLUETOOTH_ENABLE` - -これによりキーコードをワイヤレスで送信するために Bluefruit EZ-key と連動することができます。D2 と D3 ピンを使います。 - `AUDIO_ENABLE` C6 ピン(抽象化が必要)でオーディオ出力できます。詳細は[オーディオページ](ja/feature_audio.md)を見てください。 diff --git a/docs/ja/how_a_matrix_works.md b/docs/ja/how_a_matrix_works.md index ff4fbb115d..b6ded186ba 100644 --- a/docs/ja/how_a_matrix_works.md +++ b/docs/ja/how_a_matrix_works.md @@ -101,4 +101,4 @@ - [Deskthority の記事](https://deskthority.net/wiki/Keyboard_matrix) - [Dave Dribin による Keyboard Matrix Help (2000)](https://www.dribin.org/dave/keyboard/one_html/) - [PCBheaven による How Key Matrices Works](http://pcbheaven.com/wikipages/How_Key_Matrices_Works/) (アニメーションの例) -- [キーボードの仕組み - QMK ドキュメント](how_keyboards_work.md) +- [キーボードの仕組み - QMK ドキュメント](ja/how_keyboards_work.md) diff --git a/docs/ja/quantum_keycodes.md b/docs/ja/quantum_keycodes.md new file mode 100644 index 0000000000..ffcc494460 --- /dev/null +++ b/docs/ja/quantum_keycodes.md @@ -0,0 +1,20 @@ +# Quantum キーコード + + + +Quantum キーコードにより、カスタムアクションを定義することなく、基本的なものが提供するものより簡単にキーマップをカスタマイズすることができます。 + +quantum 内の全てのキーコードは `0x0000` と `0xFFFF` の間の数値です。`keymap.c` の中では、関数やその他の特別な場合があるように見えますが、最終的には C プリプロセッサによってそれらは単一の4バイト整数に変換されます。QMK は標準的なキーコードのために `0x0000` から `0x00FF` を予約しています。これらは、`KC_A`、`KC_1` および `KC_LCTL` のようなキーコードで、USB HID 仕様で定義された基本的なキーです。 + +このページでは、高度な quantum 機能を実装するために使われる `0x00FF` と `0xFFFF` の間のキーコードを説明します。独自のカスタムキーコードを定義する場合は、それらもこの範囲に配置されます。 + +## QMK キーコード :id=qmk-keycodes + +| キー | エイリアス | 説明 | +|----------------|------------|--------------------------------------------------------| +| `RESET` | | 書き込みのために、キーボードを bootloader モードにする | +| `DEBUG` | | デバッグモードの切り替え | +| `EEPROM_RESET` | `EEP_RST` | キーボードの EEPROM (永続化メモリ) を再初期化する | diff --git a/docs/ja/ref_functions.md b/docs/ja/ref_functions.md new file mode 100644 index 0000000000..e9c45fdecc --- /dev/null +++ b/docs/ja/ref_functions.md @@ -0,0 +1,122 @@ +# キーボードをより良くするための便利なコア関数のリスト + + + +QMK には、信じられないほど便利な、またはあなたが望んでいた機能を少し追加する、隠された関数がたくさんあります。特定の機能に固有の関数はそれぞれの機能のページにあるため、ここには含まれていません。 + +## (OLKB) トライレイヤー :id=olkb-tri-layers + +目的に応じて、実際に使うことができる別個の関数があります。 + +### `update_tri_layer(x, y, z)` + +最初は `update_tri_layer(x, y, z)` 関数です。この関数はレイヤー `x` と `y` の両方がオンになっているかどうかを調べます。両方ともオンの場合は、レイヤー `z` がオンになります。それ以外の場合、`x` と `y` の両方がオンではない(一方のみがオン、またはどちらもオンでない)場合は、レイヤー `z` をオフにします。 + +この関数は、この機能を持つ特定のキーを作成したいが、他のレイヤーのキーコードではそうしたくない場合に便利です。 + +#### 例 + +```c +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; + 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; + } + return true; +} +``` + +### `update_tri_layer_state(state, x, y, z)` +もう1つの関数は `update_tri_layer_state(state, x, y, z)` です。この関数は [`layer_state_set_*` 関数](ja/custom_quantum_functions.md#layer-change-code)から呼び出されることを意図しています。これは、キーコードを使ってレイヤーを変更するたびに、これがチェックされることを意味します。したがって、`LT(layer, kc)` を使ってレイヤーを変更すると、同じレイヤーチェックが引き起こされます。 + +このメソッドの注意点は、`x` および `y` レイヤーをオンにしないと、`z` レイヤーにアクセスできないことです。レイヤー `z` のみをアクティブにしようとすると、このコードが実行され、使用前にレイヤー `z` がオフになるからです。 + +#### 例 + +```c +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} +``` + +あるいは、すぐに値を「返す」必要はありません。複数のトライレイヤーを追加、あるいは追加の効果を追加する場合に便利です。 + +```c +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + state = update_tri_layer_state(state, _RAISE, _SYMB, _SPECIAL); + return state; +} +``` + +## 永続的なデフォルトレイヤーの設定 + +デフォルトレイヤーを設定して、キーボードを取り外しても保持されるようにしたいですか?そうであれば、これがそのための関数です。 + +これを使うには、`set_single_persistent_default_layer(layer)` を使います。レイヤーに名前が定義されている場合は、代わりにそれを使うことができます (_QWERTY、_DVORAK、_COLEMAK など)。 + +これは、デフォルトレイヤーを設定し、永続設定が更新され、もし [オーディオ](ja/feature_audio.md) がキーボードで有効でデフォルトレイヤーの音が設定されている場合は、曲を再生します。 + +デフォルトレイヤーの音を設定するには、以下のように `config.h` ファイルに定義する必要があります。 + +```c +#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +``` + + +?> [quantum/audio/song_list.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/audio/song_list.h) に使用できる多くの定義済みの曲があります。 + +## キーボードのリセット + +使用できる `RESET` quantum キーコードがあります。ただし、キーを個別に押すのではなくマクロの一部としてリセットしたい場合は、そうすることができます。 + +そのためには、`reset_keyboard()` を関数またはマクロに追加すると、ブートローダがリセットされます。 + +## EEPROM (永続ストレージ)の消去 + +オーディオ、RGB アンダーグロー、バックライト、キーの動作に問題がある場合は、EEPROM (永続的な設定のストレージ)をリセットすることができます。ブートマジックはこれを行う方法の1つですが、有効になっていない場合はカスタムマクロを使って行うことができます。 + +EEPROM を消去するには、関数またはマクロから `eeconfig_init()` を実行し、ほとんどの設定をデフォルトにリセットします。 + +## タップランダムキー + +ランダムな文字をホストコンピュータに送信する場合は、`tap_random_base64()` 関数を使うことができます。これは[疑似乱数的に](https://en.wikipedia.org/wiki/Pseudorandom_number_generator)0から63の数字を選択し、その選択に基づいてキー押下を送信します。(0–25 は `A`–`Z`、26–51 は `a`–`z`、52–61 は `0`–`9`、62 は `+`、63 は `/`)。 + +?> 言うまでもないですが、これはランダムに Base64 キーあるいはパスワードを生成する暗号的に安全な方法では _ありません_。 + +## ソフトウェアタイマー + +タイマーを開始し、時間固有のイベントの値を読み取ることができます。以下は例です: + +```c +static uint16_t key_timer; +key_timer = timer_read(); + +if (timer_elapsed(key_timer) < 100) { + // 経過時間が 100ms 未満の場合に何かを行う +} else { + // 経過時間が 100ms 以上の場合に何かを行う +} +``` diff --git a/docs/ja/reference_configurator_support.md b/docs/ja/reference_configurator_support.md new file mode 100644 index 0000000000..0151731e99 --- /dev/null +++ b/docs/ja/reference_configurator_support.md @@ -0,0 +1,202 @@ +# QMK Configurator でのキーボードのサポート + + + +このページは [QMK Configurator](https://config.qmk.fm/) でキーボードを適切にサポートする方法について説明します。 + + +## Configurator がキーボードを理解する方法 + +Configurator がキーボードをどのように理解するかを理解するには、最初にレイアウトマクロを理解する必要があります。この演習では、17キーのテンキー PCB を想定します。これを `numpad` と呼びます。 + +``` +|---------------| +|NLk| / | * | - | +|---+---+---+---| +|7 |8 |9 | + | +|---+---+---| | +|4 |5 |6 | | +|---+---+---+---| +|1 |2 |3 |Ent| +|-------+---| | +|0 | . | | +|---------------| +``` + +?> レイアウトマクロの詳細については、[QMK の理解: マトリックススキャン](ja/understanding_qmk.md?id=matrix-scanning) と [QMK の理解: マトリックスから物理レイアウトへのマップ](ja/understanding_qmk.md?id=matrix-to-physical-layout-map) を見てください。 + +Configurator の API はキーボードの `.h` ファイルを `qmk_firmware/keyboards//.h` から読み取ります。numpad の場合、このファイルは `qmk_firmware/keyboards/numpad/numpad.h` です: + +```c +#pragma once + +#define LAYOUT( \ + 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 } \ +} +``` + +QMK は `KC_NO` を使って、スイッチマトリックス内のスイッチがない場所を指定します。デバッグが必要な場合に、このセクションを読みやすくするために、`XXX`、`___`、`____` を略記として使うこともあります。通常は `.h` ファイルの先頭近くで定義されます: + +```c +#pragma once + +#define XXX KC_NO + +#define LAYOUT( \ + 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, XXX }, \ + { k30, k31, k32, k33 }, \ + { k40, XXX, k42, XXX } \ +} +``` + +!> この使用方法はキーマップマクロと異なります。キーマップマクロはほとんど常に`KC_NO`については`XXXXXXX` (7つの大文字の X) を、`KC_TRNS` については `_______` (7つのアンダースコア)を使います。 + +!> ユーザの混乱を防ぐために、`KC_NO` を使うことをお勧めします。 + +レイアウトマクロは、キーボードに17個のキーがあり、4列それぞれが5行に配置されていることを Configurator に伝えます。スイッチの位置は、0から始まる `k` という名前が付けられています。キーマップからキーコードを受け取る上部セクションと、マトリックス内の各キーの位置を指定する下部セクションとが一致する限り、名前自体は実際には問題ではありません。 + +物理的なキーボードに似た形でキーボードを表示するには、それぞれのキーの物理的な位置とサイズをスイッチマトリックスに結びつけることを Configurator に伝える JSON ファイルを作成する必要があります。 + +## JSON ファイルのビルド + +JSON ファイルをビルドする最も簡単な方法は、[Keyboard Layout Editor](http://www.keyboard-layout-editor.com/) ("KLE") でレイアウトを作成することです。この Raw Data を QMK tool に入れて、Configurator が読み出して使用する JSON ファイルに変換します。KLE は numpad レイアウトをデフォルトで開くため、Getting Started の説明を削除し、残りを使います。 + +レイアウトが望み通りのものになったら、KLE の Raw Data タブに移動し、内容をコピーします: + +``` +["Num Lock","/","*","-"], +["7\nHome","8\n↑","9\nPgUp",{h:2},"+"], +["4\n←","5","6\n→"], +["1\nEnd","2\n↓","3\nPgDn",{h:2},"Enter"], +[{w:2},"0\nIns",".\nDel"] +``` + +このデータを JSON に変換するには、[QMK KLE-JSON Converter](https://qmk.fm/converter/) に移動し、Raw Data を Input フィールド に貼り付け、Convert ボタンをクリックします。しばらくすると、JSON データが Output フィールドに表示されます。内容を新しいテキストドキュメントにコピーし、ドキュメントに `info.json` という名前を付け、`numpad.h` を含む同じフォルダに保存します。 + +`keyboard_name` オブジェクトを使ってキーボードの名前を設定します。説明のために、各キーのオブジェクトを各行に配置します。これはファイルを人間が読みやすいものにするためのもので、Configurator の機能には影響しません。 + +```json +{ + "keyboard_name": "Numpad", + "url": "", + "maintainer": "qmk", + "tags": { + "form_factor": "numpad" + }, + "width": 4, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Num Lock", "x":0, "y":0}, + {"label":"/", "x":1, "y":0}, + {"label":"*", "x":2, "y":0}, + {"label":"-", "x":3, "y":0}, + {"label":"7", "x":0, "y":1}, + {"label":"8", "x":1, "y":1}, + {"label":"9", "x":2, "y":1}, + {"label":"+", "x":3, "y":1, "h":2}, + {"label":"4", "x":0, "y":2}, + {"label":"5", "x":1, "y":2}, + {"label":"6", "x":2, "y":2}, + {"label":"1", "x":0, "y":3}, + {"label":"2", "x":1, "y":3}, + {"label":"3", "x":2, "y":3}, + {"label":"Enter", "x":3, "y":3, "h":2}, + {"label":"0", "x":0, "y":4, "w":2}, + {"label":".", "x":2, "y":4} + ] + } + } +} +``` + +`layouts` オブジェクトにはキーボードの物理レイアウトを表すデータが含まれます。このオブジェクトには `LAYOUT` という名前のオブジェクトがあり、このオブジェクト名は `numpad.h` のレイアウトマクロの名前と一致する必要があります。`LAYOUT` オブジェクト自体には `layout` という名前のオブジェクトがあります。このオブジェクトにはキーボードの物理キーごとに 1つの JSON オブジェクトが以下の形式で含まれています: + +``` + キーの名前。Configurator では表示されません。 + | + | キーボードの左端からのキー単位での + | | キーの X 軸の位置。 + | | + | | キーボードの上端(奥側)からのキー単位での + | | | キーの Y 軸位置。 + ↓ ↓ ↓ +{"label":"Num Lock", "x":0, "y":0}, +``` + +一部のオブジェクトには、それぞれキーの幅と高さを表す `"w"` 属性キーと `"h"` 属性キーがあります。 + +?> `info.json` ファイルの詳細については、[`info.json` 形式](ja/reference_info_json.md) を参照してください。 + + +## Configurator がキーをプログラムする方法 + +Configurator の API は、指定されたレイアウトマクロと JSON ファイルを使って、特定のキーに関連付けられた各ビジュアルオブジェクトを順番に持つキーボードのビジュアル表現を作成します: + +| レイアウトマクロのキー | 使用される JSON オブジェクト | +:---: | :---- +| k00 | {"label":"Num Lock", "x":0, "y":0} | +| k01 | {"label":"/", "x":1, "y":0} | +| k02 | {"label":"*", "x":2, "y":0} | +| k03 | {"label":"-", "x":3, "y":0} | +| k10 | {"label":"7", "x":0, "y":1} | +| k11 | {"label":"8", "x":1, "y":1} | +| k12 | {"label":"9", "x":2, "y":1} | +| k13 | {"label":"+", "x":3, "y":1, "h":2} | +| k20 | {"label":"4", "x":0, "y":2} | +| k21 | {"label":"5", "x":1, "y":2} | +| k22 | {"label":"6", "x":2, "y":2} | +| k30 | {"label":"1", "x":0, "y":3} | +| k31 | {"label":"2", "x":1, "y":3} | +| k32 | {"label":"3", "x":2, "y":3} | +| k33 | {"label":"Enter", "x":3, "y":3, "h":2} | +| k40 | {"label":"0", "x":0, "y":4, "w":2} | +| k42 | {"label":".", "x":2, "y":4} | + +ユーザが Configurator で左上のキーを選択し、Num Lock を割り当てると、Configurator は最初のキーとして `KC_NLCK` を持つキーマップを作成し、同様にキーマップが作成されます。`label` キーは使われません; それらは `info.json` ファイルをデバッグする時に特定のキーを識別するためのユーザの参照のためだけのものです。 + + +## 問題と危険 + +現在のところ、Configurator はキーの回転または ISO Enter などの長方形ではないキーをサポートしません。さらに、"行"から垂直方向にずれているキー、— 顕著な例として [TKC1800](https://github.com/qmk/qmk_firmware/tree/4ac48a61a66206beaf2fdd5f2939d8bbedd0004c/keyboards/tkc1800/) のような1800レイアウト上の矢印キー — は、 `info.json` ファイルの提供者によって調整されていない場合は、KLE-to-JSON コンバータを混乱させます。 + +### 回避策 + +#### 長方形ではないキー + +ISO Enter キーについては、QMK custom は幅 1.25u、高さ 2u の長方形のキーとして表示し、右端が英数字キーブロックの右端に揃うように配置されます。 + +![](https://i.imgur.com/JKngtTw.png) +*QMK Configurator によって描画される標準 ISO レイアウトの60%キーボード。* + +#### 垂直方向にずれたキー + +垂直方向にずれたキーについては、ずれていないかのように KLE で配置し、変換された JSON ファイルで必要に応じて Y 値を編集します。 + +![](https://i.imgur.com/fmDvDzR.png) +*矢印キーに適用される垂直方向のずれのない、Keyboard Layout Editor で描画された1800レイアウトのキーボード。* + +![](https://i.imgur.com/8beYMBR.png) +*キーボードの JSON ファイルで矢印キーを垂直方向にずらすために必要な変更を示す、Unix の diff ファイル。* diff --git a/docs/ja/reference_glossary.md b/docs/ja/reference_glossary.md new file mode 100644 index 0000000000..19791206f1 --- /dev/null +++ b/docs/ja/reference_glossary.md @@ -0,0 +1,173 @@ +# QMK 用語集 + + + +## ARM +Atmel、Cypress、Kinetis、NXP、ST、TI など多くの企業が生産する 32 ビット MCU のライン。 + +## AVR +[Atmel](http://www.microchip.com/) が生産する 8 ビット MCU のライン。AVR は TMK がサポートしていた元のプラットフォームでした。 + +## AZERTY +標準的な Français (フランス) キーボードレイアウト。キーボードの最初の6つのキーから命名されました。 + +## バックライト +キーボードのライトの総称。バックライトが一般的ですが、それだけではなく、キーキャップあるいはスイッチを通して光る LED の配列。 + +## Bluetooth +短距離のピアツーピア無線プロトコル。キーボード用のもっとも一般的なワイヤレスプロトコル。 + +## ブートローダ +MCU の保護領域に書き込まれる特別なプログラムで、MCU が独自のファームウェアを通常は USB 経由でアップグレードできるようにします。 + +## ブートマジック +よくあるキーの交換あるいは無効化など、様々なキーボードの挙動の変更をその場で実行できる機能。 + +## C +システムコードに適した低レベルプログラミング言語。QMK のほとんどのコードは C で書かれています。 + +## Colemak +人気が出始めている代替キーボードレイアウト。 + +## コンパイル +人間が読めるコードを MCU が実行できるマシンコードに変換するプロセス。 + +## Dvorak +1930年代に Dr. August Dvorak によって開発された代替キーボードレイアウト。Dvorak Simplified Keyboard の短縮形。 + +## 動的マクロ +キーボードに記録されたマクロで、キーボードのプラグを抜くか、コンピュータを再起動すると失われます。 + +* [動的マクロドキュメント](ja/feature_dynamic_macros.md) + +## Eclipse +多くの C 開発者に人気のある IDE。 + +* [Eclipse セットアップ手順](ja/other_eclipse.md) + +## ファームウェア +MCU を制御するソフトウェア + +## git +コマンドラインで使用されるバージョン管理ソフトウェア + +## GitHub +QMK プロジェクトのほとんどをホストする Web サイト。git、課題管理、および QMK の実行に役立つその他の機能を統合して提供します。 + +## ISP +インシステムプログラミング。外部ハードウェアと JTAG ピンを使って AVR チップをプログラミングする方法。 + +## hid_listen +キーボードからデバッグメッセージを受信するためのインタフェース。[QMK Flasher](https://github.com/qmk/qmk_flasher) あるいは [PJRC の hid_listen](https://www.pjrc.com/teensy/hid_listen.html) を使ってこれらのメッセージを見ることができます。 + +## キーコード +特定のキーを表す2バイトの数値。`0x00`-`0xFF` は[基本キーコード](ja/keycodes_basic.md)に使われ、`0x100`-`0xFFFF` は [Quantum キーコード](ja/quantum_keycodes.md) に使われます。 + +## キーダウン +キーが押された時に発生し、キーが放される前に完了するイベント。 + +## キーアップ +キーが放された時に発生するイベント。 + +## キーマップ +物理的なキーボードレイアウトにマップされたキーコードの配列。キーの押下およびリリース時に処理されます。 + +## レイヤー +1つのキーが複数の目的を果たすために使われる抽象化。最上位のアクティブなレイヤーが優先されます。 + +## リーダーキー +リーダーキーに続けて1, 2 あるいは3つのキーをタップすることで、キーの押下あるいは他の quantum 機能をアクティブにする機能。 + +* [リーダーキードキュメント](ja/feature_leader_key.md) + +## LED +発光ダイオード。キーボードの表示に使われる最も一般的なデバイス。 + +## Make +全てのソースファイルをコンパイルするために使われるソフトウェアパッケージ。キーボードファームウェアをコンパイルするために、様々なオプションを指定して `make` を実行します。 + +## マトリックス +MCU がより少ないピン数でキー押下を検出できるようにする列と行の配線パターン。マトリックスには多くの場合、NKRO を可能にするためのダイオードが組み込まれています。 + +## マクロ +単一のキーのみを押した後で、複数のキー押下イベント (HID レポート) を送信できる機能。 + +* [マクロドキュメント](ja/feature_macros.md) + +## MCU +マイクロコントロールユニット。キーボードを動かすプロセッサ。 + +## モディファイア +別のキーを入力する間押したままにして、そのキーのアクションを変更するキー。例として、Ctrl、Alt および Shift があります。 +(訳注:モディファイヤ、モディファイヤキー、修飾キーなど、訳語が統一されていませんが同じものです) + +## マウスキー +キーボードからマウスカーソルを制御し、クリックできる機能。 + +* [マウスキードキュメント](ja/feature_mouse_keys.md) + +## N キーロールオーバー (NKRO) +一度に任意の数のキーの押下を送信できるキーボードに当てはまる用語。 + +## ワンショットモディファイア +別のキーが放されるまで押されているかのように機能するモディファイア。キーを押している間に mod を押し続けるのではなく、mod を押してからキーを押すことができます。スティッキーキーまたはデッドキーとも呼びます。 + +## ProMicro +低コストの AVR 開発ボード。このデバイスのクローンは ebay で非常に安価(5ドル未満)に見つかることがありますが、多くの場合 pro micro の書き込みに苦労します。 + +## プルリクエスト +QMK にコードを送信するリクエスト。全てのユーザが個人のキーマップのプルリクエストを送信することを推奨します。 + +## QWERTY +標準の英語キーボードレイアウト。多くの場合、他の言語の標準レイアウトへのショートカット。キーボードの最初の6文字から命名されました。 + +## QWERTZ +標準的な Deutsche (ドイツ語) キーボードレイアウト。キーボードの最初の6文字から命名されました。 + +## ロールオーバー +キーが既に押されている間にキーを押すことを指す用語。似たものに 2KRO、6KRO、NKRO が含まれます。 + +## スキャンコード +単一のキーを表す USB 経由の HID レポートの一部として送信される1バイトの数値。これらの値は、[USB-IF](http://www.usb.org/) が発行する [HID Usage Tables](https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf) に記載されています。 + +## スペースカデットシフト +左または右 shift を1回以上タップすることで、様々なタイプの括弧を入力できる特別な shift キーのセット。 + +* [スペースカデットシフトドキュメント](ja/feature_space_cadet_shift.md) + +## タップ +キーを押して放す。状況によってはキーダウンイベントとキーアップイベントを区別する必要がありますが、タップは常に両方を一度に指します。 + +## タップダンス +押す回数に基づいて、同じキーに複数のキーコードを割り当てることができる機能。 + +* [タップダンスドキュメント](ja/feature_tap_dance.md) + +## Teensy +手配線での組み立てによく用いられる低コストの AVR 開発ボード。halfkay ブートローダによって書き込みが非常に簡単になるために、数ドル高いにもかかわらず teensy がしばしば選択されます。 + +## アンダーライト +キーボードの下側を照らす LED の総称。これらの LED は通常 PCB の底面からキーボードが置かれている表面に向けて照らします。 + +## ユニコード +大規模なコンピュータの世界では、ユニコードは任意の言語で文字を表現するためのエンコード方式のセットです。QMK に関しては、様々な OS スキームを使ってスキャンコードの代わりにユニコードコードポイントを送信することを意味します。 + +* [ユニコードドキュメント](ja/feature_unicode.md) + +## 単体テスト +QMK に対して自動テストを実行するためのフレームワーク。単体テストは、変更が何も壊さないことを確信するのに役立ちます。 + +* [単体テストドキュメント](ja/unit_testing.md) + +## USB +ユニバーサルシリアルバス。キーボード用の最も一般的な有線インタフェース。 + +## USB ホスト (あるいは単にホスト) +USB ホストは、あなたのコンピュータ、またはキーボードが差し込まれているデバイスのことです。 + +# 探している用語が見つかりませんでしたか? + +質問についての [issue を開いて](https://github.com/qmk/qmk_firmware/issues) 、質問した用語についてここに追加することができます。さらに良いのは、定義についてのプルリクエストを開くことです。:) diff --git a/docs/ja/reference_info_json.md b/docs/ja/reference_info_json.md new file mode 100644 index 0000000000..0fa1f9d3fe --- /dev/null +++ b/docs/ja/reference_info_json.md @@ -0,0 +1,78 @@ +# `info.json` + + + +このファイルは [QMK API](https://github.com/qmk/qmk_api) によって使われます。このファイルは [QMK Configurator](https://config.qmk.fm/) がキーボードの画像を表示するために必要な情報を含んでいます。ここにメタデータを設定することもできます。 + +このメタデータを指定するために、`qmk_firmware/keyboards/` の下の全てのレベルで `info.json` を作成することができます。これらのファイルは結合され、より具体的なファイルがそうではないファイルのキーを上書きします。つまり、メタデータ情報を複製する必要はありません。例えば、`qmk_firmware/keyboards/clueboard/info.json` は `manufacturer` および `maintainer` を指定し、`qmk_firmware/keyboards/clueboard/66/info.json` は Clueboard 66% についてのより具体的な情報を指定します。 + +## `info.json` の形式 + +`info.json` ファイルは設定可能な以下のキーを持つ JSON 形式の辞書です。全てを設定する必要はなく、キーボードに適用するキーだけを設定します。 + +* `keyboard_name` + * キーボードを説明する自由形式のテキスト文字列。 + * 例: `Clueboard 66%` +* `url` + * キーボードの製品ページ、[QMK.fm/keyboards](https://qmk.fm/keyboards) のページ、あるいはキーボードに関する情報を説明する他のページの URL。 +* `maintainer` + * メンテナの GitHub のユーザ名、あるいはコミュニティが管理するキーボードの場合は `qmk` +* `width` + * キー単位でのキーボードの幅 +* `height` + * キー単位でのキーボードの高さ +* `layouts` + * 物理的なレイアウト表現。詳細は以下のセクションを見てください。 + +### レイアウトの形式 + +`info.json` ファイル内の辞書の `layouts` 部分は、幾つかの入れ子になった辞書を含みます。外側のレイヤーは QMK レイアウトマクロで構成されます。例えば、`LAYOUT_ansi` あるいは `LAYOUT_iso`。各レイアウトマクロ内には、`width`、 `height`、`key_count` のキーがあります。これらは自明でなければなりません。 + +* `width` + * オプション: キー単位でのレイアウトの幅 +* `height` + * オプション: キー単位でのレイアウトの高さ +* `key_count` + * オプション: このレイアウトのキーの数 +* `layout` + * 物理レイアウトを説明するキー辞書のリスト。詳細は次のセクションを見てください。 + +### キー辞書形式 + +レイアウトの各キー辞書は、キーの物理プロパティを記述します。 の Raw Code に精通している場合、多くの概念が同じであることが分かります。可能な限り同じキー名とレイアウトの選択を再利用しますが、keyboard-layout-editor とは異なって各キーはステートレスで、前のキーからプロパティを継承しません。 + +全てのキーの位置と回転は、キーボードの左上と、各キーの左上を基準にして指定されます。 + +* `x` + * **必須**: 水平軸でのキーの絶対位置(キー単位)。 +* `y` + * **必須**: 垂直軸でのキーの絶対位置(キー単位)。 +* `w` + * キー単位でのキーの幅。`ks` が指定された場合は無視されます。デフォルト: `1` +* `h` + * キー単位でのキーの高さ。`ks` が指定された場合は無視されます。デフォルト: `1` +* `r` + * キーを回転させる時計回りの角度。 +* `rx` + * キーを回転させる点の水平軸における絶対位置。デフォルト: `x` +* `ry` + * キーを回転させる点の垂直軸における絶対位置。デフォルト: `y` +* `ks` + * キー形状: キー単位で頂点を列挙することでポリゴンを定義します。 + * **重要**: これらはキーの左上からの相対位置で、絶対位置ではありません。 + * ISO Enter の例: `[ [0,0], [1.5,0], [1.5,2], [0.25,2], [0.25,1], [0,1], [0,0] ]` +* `label` + * マトリックス内のこの位置につける名前。 + * これは通常 PCB 上でこの位置にシルクスクリーン印刷されるものと同じ名前でなければなりません。 + +## メタデータはどのように公開されますか? + +このメタデータは主に2つの方法で使われます: + +* Web ベースの configurator が動的に UI を生成できるようにする。 +* 新しい `make keyboard:keymap:qmk` ターゲットをサポートする。これは、このメタデータをファームウェアにバンドルして QMK Toolbox をよりスマートにします。 + +Configurator の作成者は、JSON API の使用に関する詳細について、[QMK Compiler](https://docs.api.qmk.fm/using-the-api) ドキュメントを参照することができます。 diff --git a/docs/ja/reference_keymap_extras.md b/docs/ja/reference_keymap_extras.md new file mode 100644 index 0000000000..e8104e5f3e --- /dev/null +++ b/docs/ja/reference_keymap_extras.md @@ -0,0 +1,88 @@ +# 言語固有のキーコード + + + +キーボードは多くの言語をサポートすることができます。ただし、それらはキーを押したことで生成される実際の文字を送信しません - 代わりに数字のコードを送信します。USB HID の仕様ではそれらは "usages" と呼ばれますが、キーボードの文脈では「スキャンコード」あるいは「キーコード」と呼ばれることが多いです。 +HID Keyboard/Keypad usage ページでは 256 未満の usage が定義されており、それらの一部は現在のオペレーティングシステムでは機能しません。では、この言語のサポートはどのようにして実現されるのでしょうか? + +簡単に言うと、オペレーティングシステムはユーザが設定したキーボードレイアウトに基づいて受け取った usage を適切な文字にマップします。例えば、スウェーデン人がキーボードの `å` という文字が刻印されたキーを押すと、キーボードは *実際には* `[` のキーコードを送信します。 + +明らかにこれは混乱する可能性があるため、QMK は多くのキーボードレイアウトのために言語固有のキーコードのエイリアスを提供します。これらはそれだけでは何もしません - さらに OS の設定で対応するキーボードレイアウトを設定する必要があります。それらをキーマップのキーキャップラベルと考えてください。 + +これらを使うには、`keymap.c` で対応する [ヘッダファイル](https://github.com/qmk/qmk_firmware/tree/master/quantum/keymap_extras) を `#include` し、それらで定義されているキーコードを `KC_` プリフィクスの代わりに追加します: + +| レイアウト | ヘッダファイル | +|-----------------------------|----------------------------------| +| Canadian Multilingual (CSA) | `keymap_canadian_multilingual.h` | +| Croatian | `keymap_croatian.h` | +| Czech | `keymap_czech.h` | +| Danish | `keymap_danish.h` | +| Dutch (Belgium) | `keymap_belgian.h` | +| English (Ireland) | `keymap_irish.h` | +| English (UK) | `keymap_uk.h` | +| English (US International) | `keymap_us_international.h` | +| Estonian | `keymap_estonian.h` | +| Finnish | `keymap_finnish.h` | +| French | `keymap_french.h` | +| French (AFNOR) | `keymap_french_afnor.h` | +| French (BÉPO) | `keymap_bepo.h` | +| French (Belgium) | `keymap_belgian.h` | +| French (Switzerland) | `keymap_fr_ch.h` | +| French (macOS, ISO) | `keymap_french_osx.h` | +| German | `keymap_german.h` | +| German (Switzerland) | `keymap_german_ch.h` | +| German (macOS) | `keymap_german_osx.h` | +| German (Neo2)* | `keymap_neo2.h` | +| Greek* | `keymap_greek.h` | +| Hebrew* | `keymap_hebrew.h` | +| Hungarian | `keymap_hungarian.h` | +| Icelandic | `keymap_icelandic.h` | +| Italian | `keymap_italian.h` | +| Italian (macOS, ANSI) | `keymap_italian_osx_ansi.h` | +| Italian (macOS, ISO) | `keymap_italian_osx_iso.h` | +| Japanese | `keymap_jp.h` | +| Korean | `keymap_korean.h` | +| Latvian | `keymap_latvian.h` | +| Lithuanian (ĄŽERTY) | `keymap_lithuanian_azerty.h` | +| Lithuanian (QWERTY) | `keymap_lithuanian_qwerty.h` | +| Norwegian | `keymap_norwegian.h` | +| Polish | `keymap_polish.h` | +| Portuguese | `keymap_portuguese.h` | +| Portuguese (Brazil) | `keymap_br_abnt2.h` | +| Romanian | `keymap_romanian.h` | +| Russian* | `keymap_russian.h` | +| Serbian* | `keymap_serbian.h` | +| Serbian (Latin) | `keymap_serbian_latin.h` | +| Slovak | `keymap_slovak.h` | +| Slovenian | `keymap_slovenian.h` | +| Spanish | `keymap_spanish.h` | +| Spanish (Dvorak) | `keymap_spanish_dvorak.h` | +| Swedish | `keymap_swedish.h` | +| Turkish (F) | `keymap_turkish_f.h` | +| Turkish (Q) | `keymap_turkish_q.h` | + +言語固有でないものもありますが、QWERTY レイアウトを使っていない場合に役立ちます: + +| レイアウト | ヘッダファイル | +|---------------------|--------------------------| +| Colemak | `keymap_colemak.h` | +| Dvorak | `keymap_dvorak.h` | +| Dvorak (French) | `keymap_dvorak_fr.h` | +| Dvorak (Programmer) | `keymap_dvp.h` | +| Norman | `keymap_norman.h` | +| Plover* | `keymap_plover.h` | +| Plover (Dvorak)* | `keymap_plover_dvorak.h` | +| Steno* | `keymap_steno.h` | +| Workman | `keymap_workman.h` | +| Workman (ZXCVM) | `keymap_workman_zxcvm.h` | + +## Sendstring サポート + +デフォルトでは、`SEND_STRING()` は US ANSI キーボードレイアウトが設定されたと見なします。別のレイアウトを使っている場合は、キーマップで(上記のように)`#include "sendstring_*.h"` して、ASCII 文字をキーコードにマッピングするために使われるルックアップテーブルを上書きすることができます。 + +ここで注意すべき重要な点は、`SEND_STRING()` は [ASCII 文字](https://en.wikipedia.org/wiki/ASCII#Character_set) でのみ機能するということです。これは、ユニコード文字を含む文字列を渡すことができないことを意味します - 残念ながら、これには希望のレイアウトに存在する可能性のあるアクセント付き文字が含まれています。 +多くのレイアウトでは、Grave または Tilde などの特定の文字を[デッドキー](https://en.wikipedia.org/wiki/Dead_key)としてのみ使えるようにしています。そのため、デッドキーが次の文字と潜在的に結合されることを防ぐためには、送信したい文字列の中のデッドキーのすぐ後にスペースを追加する必要があります。 +ラテン語由来のアルファベットを使わない(例えば、ギリシャ語やロシア語のような)他のレイアウトには、Sendstring ヘッダーがありません。従って ASCII 文字セットのほとんどを入力する方法がありません。これらは上記で `*` でマークされています。 diff --git a/docs/ja/serial_driver.md b/docs/ja/serial_driver.md new file mode 100644 index 0000000000..72071f4f7e --- /dev/null +++ b/docs/ja/serial_driver.md @@ -0,0 +1,75 @@ +# 'シリアル' ドライバ + + + +このドライバは[分割キーボード](ja/feature_split_keyboard.md) 機能に使います。 + +?> この文章でのシリアルは、UART/USART/RS485/RS232 規格の実装ではなく、**一度に1ビットの情報を送信するもの**として読まれるべきです。 + +このカテゴリの全てのドライバには以下の特徴があります: +* 1本の線上でデータと信号を提供 +* シングルマスタ、シングルスレーブに限定 + +## サポートされるドライバの種類 + +| | AVR | ARM | +|-------------------|--------------------|--------------------| +| bit bang | :heavy_check_mark: | :heavy_check_mark: | +| USART Half-duplex | | :heavy_check_mark: | + +## ドライバ設定 + +### Bitbang +デフォルトのドライバ。設定がない場合はこのドライバが想定されます。設定するには、以下を rules.mk に追加します: + +```make +SERIAL_DRIVER = bitbang +``` + +config.h を介してドライバを設定します: +```c +#define SOFT_SERIAL_PIN D0 // または D1, D2, D3, E6 +#define SELECT_SOFT_SERIAL_SPEED 1 // または 0, 2, 3, 4, 5 + // 0: 約 189kbps (実験目的のみ) + // 1: 約 137kbps (デフォルト) + // 2: 約 75kbps + // 3: 約 39kbps + // 4: 約 26kbps + // 5: 約 20kbps +``` + +#### ARM + +!> bitbang ドライバは bitbang WS2812 ドライバと接続の問題があります + +上記の一般的なオプションに加えて、halconf.h で `PAL_USE_CALLBACKS` 機能もオンにする必要があります。 + +### USART Half-duplex +通信が USART ハードウェアデバイスに送信される STM32 ボードが対象です。これにより高速で正確なタイミングを提供できることが利点です。このドライバの `SOFT_SERIAL_PIN` は、設定された USART TX ピンです。**TX ピンに適切なプルアップ抵抗が必要です**。設定するには、以下を rules.mk に追加します: + +```make +SERIAL_DRIVER = usart +``` + +config.h を介してハードウェアを設定します: +```c +#define SOFT_SERIAL_PIN B6 // USART TX ピン +#define SELECT_SOFT_SERIAL_SPEED 1 // または 0, 2, 3, 4, 5 + // 0: 約 460800 ボー + // 1: 約 230400 ボー (デフォルト) + // 2: 約 115200 ボー + // 3: 約 57600 ボー + // 4: 約 38400 ボー + // 5: 約 19200 ボー +#define SERIAL_USART_DRIVER SD1 // TX ピンの USART ドライバ。デフォルトは SD1 +#define SERIAL_USART_TX_PAL_MODE 7 // 「代替機能」 ピン。MCU の適切な値については、それぞれのデータシートを見てください。デフォルトは 7 +``` + +また、ChibiOS `SERIAL` 機能を有効にする必要があります: +* キーボードの halconf.h: `#define HAL_USE_SERIAL TRUE` +* キーボードの mcuconf.h: `#define STM32_SERIAL_USE_USARTn TRUE` (ここで、'n' は MCU で選択した USART のペリフェラル番号と一致) + +必要な構成は、`UART` 周辺機器ではなく、`SERIAL` 周辺機器であることに注意してください。 diff --git a/docs/ja/support.md b/docs/ja/support.md new file mode 100644 index 0000000000..01c2d41d19 --- /dev/null +++ b/docs/ja/support.md @@ -0,0 +1,22 @@ +# 助けを得る + + + +QMK に関して助けを得るための多くのリソースがあります。 + +コミュニティスペースに参加する前に[行動規範](https://qmk.fm/coc/)を読んでください。 + +## リアルタイムチャット + +何かについて助けが必要な場合は、迅速なサポートを受けるための最良の場所は、[Discord Server](https://discord.gg/Uq7gcHh) です。通常は誰かがオンラインで、非常に助けになる多くの人がいます。 + +## OLKB Subreddit + +公式の QMK フォーラムは [reddit.com](https://reddit.com) の [/r/olkb](https://reddit.com/r/olkb) です。 + +## GitHub Issues + +[GitHub で issue](https://github.com/qmk/qmk_firmware/issues) を開くことができます。issue は長期的な議論あるいはデバッグを必要とする場合は、特に便利です。 diff --git a/docs/ja/syllabus.md b/docs/ja/syllabus.md new file mode 100644 index 0000000000..14e743ee9c --- /dev/null +++ b/docs/ja/syllabus.md @@ -0,0 +1,75 @@ +# QMK シラバス + + + +このページは最初に基本を紹介し、そして、QMK に習熟するために必要な全ての概念を理解するように導くことで、QMK の知識を構築するのに役立ちます。 + +# 初級トピック + +他に何も読んでいない場合は、このセクションのドキュメントを読んでください。[QMK 初心者ガイド](ja/newbs.md)を読み終わると、基本的なキーマップを作成し、それをコンパイルし、キーボードに書き込みできるようになっているはずです。残りのドキュメントはこれらの基本的な知識を具体的に肉付けします。 + +* **QMK Tools の使い方を学ぶ** + * [QMK 初心者ガイド](ja/newbs.md) + * [CLI](ja/cli.md) + * [Git](ja/newbs_git_best_practices.md) +* **キーマップについて学ぶ** + * [レイヤー](ja/feature_layers.md) + * [キーコード](ja/keycodes.md) + * 使用できるキーコードの完全なリスト。中級または上級トピックにある知識が必要な場合もあることに注意してください。 +* **IDE の設定** - オプション + * [Eclipse](ja/other_eclipse.md) + * [VS Code](ja/other_vscode.md) + +# 中級トピック + +これらのトピックでは、QMK がサポートする幾つかの機能について掘り下げます。これらのドキュメントを全て読む必要はありませんが、これらの一部をスキップすると、上級トピックのセクションの一部のドキュメントが意味をなさなくなるかもしれません。 + +* **機能の設定方法を学ぶ** + + * [オーディオ](ja/feature_audio.md) + * 電飾 + * [バックライト](ja/feature_backlight.md) + * [LED マトリックス](ja/feature_led_matrix.md) + * [RGB ライト](ja/feature_rgblight.md) + * [RGB マトリックス](ja/feature_rgb_matrix.md) + * [タップホールド設定](ja/tap_hold.md) +* **キーマップについてさらに学ぶ** + * [キーマップ](ja/keymap.md) + * [カスタム関数とキーコード](ja/custom_quantum_functions.md) + * マクロ + * [動的マクロ](ja/feature_dynamic_macros.md) + * [コンパイル済みのマクロ](ja/feature_macros.md) + * [タップダンス](ja/feature_tap_dance.md) + * [コンボ](ja/feature_combo.md) + * [ユーザスペース](ja/feature_userspace.md) + +# 上級トピック + +以下の全ては多くの基礎知識を必要とします。高度な機能を使ってキーマップを作成できることに加えて、`config.h` と `rules.mk` の両方を使ってキーボードのオプションを設定することに慣れている必要があります。 + +* **QMK 内のキーボードの保守** + * [キーボードの手配線](ja/hand_wire.md) + * [キーボードガイドライン](ja/hardware_keyboard_guidelines.md) + * [info.json リファレンス](ja/reference_info_json.md) + * [デバウンス API](ja/feature_debounce_type.md) +* **高度な機能** + * [ユニコード](ja/feature_unicode.md) + * [API](ja/api_overview.md) + * [ブートマジック](ja/feature_bootmagic.md) +* **ハードウェア** + * [キーボードがどのように動作するか](ja/how_keyboards_work.md) + * [キーボードマトリックスの仕組み](ja/how_a_matrix_works.md) + * [分割キーボード](ja/feature_split_keyboard.md) + * [速記](ja/feature_stenography.md) + * [ポインティングデバイス](ja/feature_pointing_device.md) +* **コア開発** + * [コーディング規約](ja/coding_conventions_c.md) + * [互換性のあるマイクロコントローラ](ja/compatible_microcontrollers.md) + * [カスタムマトリックス](ja/custom_matrix.md) + * [QMK を理解する](ja/understanding_qmk.md) +* **CLI 開発** + * [コーディング規約](ja/coding_conventions_python.md) + * [CLI 開発の概要](ja/cli_development.md) diff --git a/docs/ja/tap_hold.md b/docs/ja/tap_hold.md new file mode 100644 index 0000000000..a0f0897628 --- /dev/null +++ b/docs/ja/tap_hold.md @@ -0,0 +1,195 @@ +# タップホールド設定オプション + + + +タップホールドオプションは素晴らしいものですが、問題が無いわけではありません。デフォルト設定を適切なものにしようとしましたが、一部の人にとってまだ問題を引き起こすかもしれません。 + +次のオプションによりタップホールドキーの挙動を変更することができます。 + +## タッピング時間 + +以下の機能の全ての核心は、タッピング時間の設定です。これにより、何をタップとし、何をホールドとするかが決まります。これが自然に感じられるぴったりのタイミングは、キーボードごと、スイッチごと、あるいはキーごとに異ることもありえます。 + +`config.h` に以下の設定を追加することで、この時間を全体的に設定することができます: + +```c +#define TAPPING_TERM 200 +``` + +この設定はミリ秒で定義され、デフォルトは 200ms です。これは大多数の人にとっての適切な平均値です。 + +この機能をより細かく制御するために、以下を `config.h` に追加することができます: +```c +#define TAPPING_TERM_PER_KEY +``` + +そして、以下の関数をキーマップに追加します: + +```c +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_T(KC_SPC): + return TAPPING_TERM + 1250; + case LT(1, KC_GRV): + return 130; + default: + return TAPPING_TERM; + } +} +``` + + +## 許容ホールド + +[PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/) 以降、新しい `config.h` オプションがあります: + +```c +#define PERMISSIVE_HOLD +``` + +これは高速なタイピストや高い `TAPPING_TERM` 設定に対して、タップとホールドキー(モッドタップのような)の動作を向上させます。 + +モッドタップキーを押し、他のキーをタップ(押して放す)して、モッドタップキーを放すという動作の全てをタッピング時間内に行うと、両方のキーの「タッピング」機能が出力されます。 + +例えば: + +- `SFT_T(KC_A)` を押す +- `KC_X` を押す +- `KC_X` を放す +- `SFT_T(KC_A)` を放す + +通常、これら全てを `TAPPING_TERM` (デフォルト: 200ms) 内で行うと、ファームウェアとホストシステムによって `ax` として登録されます。許容ホールドを有効にすると、別のキーがタップされた場合にモッドタップキーを修飾キーと見なすように処理を変更し、 `X` (`SHIFT`+`x`) と登録されます。 + +?> `モッドタップ割り込みの無視`を有効にしている場合、これにより両方の動きが変更されます。通常のキーには、最初のキーが最初に放された場合、あるいは両方のキーが `TAPPING_TERM` より長くホールドされた場合に、修飾キーが追加されます。 + +この機能をより細かく制御するために、以下を `config.h` に追加することができます: + +```c +#define PERMISSIVE_HOLD_PER_KEY +``` + +そして、以下の関数をキーマップに追加します: + +```c +bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LT(1, KC_BSPC): + return true; + default: + return false; + } +} +``` + +## モッドタップ割り込みの無視 + +この設定を有効にするには、これを `config.h` に追加してください: + +```c +#define IGNORE_MOD_TAP_INTERRUPT +``` + +許容ホールドと同様に、これは高速なタイピストのためのファームウェアの処理方法を変更します。モッドタップキーを押し、他のキーを押し、モッドタップキーを放し、通常のキーを放すと、通常は両方のキーの「タッピング」機能が出力されます。これはローリングコンボキーには望ましくないかもしれません。 + +`モッドタップ割り込みの無視`を設定するには、両方のキーを `TAPPING_TERM` の間ホールドすると、(その修飾キーの)ホールド機能を実行する必要があります。 + +例えば: + +- `SFT_T(KC_A)` を押す +- `KC_X` を押す +- `SFT_T(KC_A)` を放す +- `KC_X` を放す + +通常、これは `X` (`SHIFT`+`x`) を送信します。`モッドタップ割り込みの無視` を有効にすると、ホールドアクションを登録するには、両方のキーを `TAPPING_TERM` の間ホールドする必要があります。この場合、素早いタップは `ax` を送信しますが、両方をホールドすると、`X` (`SHIFT`+`x`) を出力します。 + + +?> __注意__: これはモディファイアにのみ関係し、レイヤー切り替えキーには関係しません。 + +?> `許容ホールド`を有効にすると、これは両方がどのように動作するかを変更します。通常のキーには、最初のキーが最初に放された場合、あるいは両方のキーが `TAPPING_TERM` より長くホールドされた場合に、修飾キーが追加されます。 + +この機能をより細かく制御するために、以下を `config.h` に追加することができます: + +```c +#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY +``` + +そして、以下の関数をキーマップに追加します: + +```c +bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_T(KC_SPC): + return true; + default: + return false; + } +} +``` + +## タッピング強制ホールド + +`タッピング強制ホールド` を有効にするには、以下を `config.h` に追加します: + +```c +#define TAPPING_FORCE_HOLD +``` + +タップの後でユーザがキーをホールドすると、これは修飾キーをホールドするかわりにタップされたキーを繰り返します。これにより、タップされたキーのために自動繰り返しを使うことができます。 + +例: + +- SFT_T(KC_A) を押す +- SFT_T(KC_A) を放す +- SFT_T(KC_A) を押す +- タッピング時間より長く待ちます... +- SFT_T(KC_A) を放す + +デフォルトの設定では、最初に放したときに `a` が送信され、2回目の押下で `a` が送信され、コンピュータに自動リピート機能を作動させることができます。 + +`TAPPING_FORCE_HOLD` を使うと、2回目の押下は Shift として解釈され、それをタップして使った後ですぐに修飾キーとして使うことができます。 + +!> `TAPPING_FORCE_HOLD` はタッピングトグル(`TT` レイヤーキーコード、ワンショットタッピングトグルなど)を使うものをすべて破壊します。 + +この機能をより細かく制御するために、以下を `config.h` に追加することができます: + +```c +#define TAPPING_FORCE_HOLD_PER_KEY +``` + +そして、以下の関数をキーマップに追加します: + +```c +bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LT(1, KC_BSPC): + return true; + default: + return false; + } +} +``` + +## レトロタッピング + +`レトロタッピング`を有効にするには、以下を `config.h` に追加してください: + +```c +#define RETRO_TAPPING +``` + +他のキーを押さずにデュアルファンクションキーを押して放しても何も起こりません。レトロタッピングを有効にすると、他のキーを押さずにキーを放すと、元のキーコードがタッピング時間外であっても送信されます。 + +例えば、他のキーを押すことなく `LT(2, KC_SPACE)` を押したり放したりしても何も起こりません。これを有効にすると、代わりに `KC_SPACE` を送信します。 + +## キー別の関数にキーレコードを含めるのはなぜですか? + +「キー別」の関数全てにキーレコードを含んでいることに気付いたかもしれません。そしてなぜそうしたのか不思議に思っているかもしれません。 + +まぁ、それは単純に本当にカスタマイズのためです。ただし、具体的には、それはキーボードの配線方法によって異なります。例えば、各行が実際にキーボードのマトリックスの1行を使っている場合、キーコード全体をチェックする代わりに、`if (record->event.row == 3)` を使うほうが簡単かもしれません。これは、ホームキー行でタップホールドタイプのキーを使っている人にとって特に便利です。そのため、通常のタイピングを妨げないように微調整することができるのではないでしょうか。 + +## `*_kb` や `*_user` 関数が無いのはなぜですか? + +QMK にある他の多くの関数とは異なり、quantum あるいはキーボードレベルの関数を持つ必要はありません (または理由さえありません)。ここではユーザレベルの関数だけが有用なため、そのようにマークする必要はありません。 diff --git a/docs/ja/translating.md b/docs/ja/translating.md new file mode 100644 index 0000000000..f7a273308a --- /dev/null +++ b/docs/ja/translating.md @@ -0,0 +1,60 @@ +# QMK ドキュメントを翻訳する + + + +ルートフォルダ (`docs/`) にある全てのファイルは英語でなければなりません - 他の全ての言語は、ISO 639-1 言語コードと、それに続く`-`と関連する国コードのサブフォルダにある必要があります。[一般的なもののリストはここで見つかります](https://www.andiamo.co.uk/resources/iso-language-codes/)。このフォルダが存在しない場合、作成することができます。翻訳された各ファイルは英語バージョンと同じ名前でなければなりません。そうすることで、正常にフォールバックできます。 + +`_summary.md` ファイルはこのフォルダの中に存在し、各ファイルへのリンクのリスト、翻訳された名前、言語フォルダに続くリンクが含まれている必要があります。 + +```markdown + * [QMK简介](zh-cn/getting_started_introduction.md) +``` + +他の docs ページへの全てのリンクにも、言語のフォルダが前に付いている必要があります。もしリンクがページの特定の部分(例えば、特定の見出し)への場合、以下のように見出しに英語の ID を使う必要があります: + +```markdown +[建立你的环境](zh-cn/newbs-getting-started.md#set-up-your-environment) + +## 建立你的环境 :id=set-up-your-environment +``` + +新しい言語の翻訳が完了したら、以下のファイルも修正する必要があります: + +* [`docs/_langs.md`](https://github.com/qmk/qmk_firmware/blob/master/docs/_langs.md) +各行は、[GitHub emoji shortcode](https://github.com/ikatyang/emoji-cheat-sheet/blob/master/README.md#country-flag) の形式で国フラグと、それに続く言語で表される名前を含む必要があります。 + + ```markdown + - [:cn: 中文](/zh-cn/) + ``` + +* [`docs/index.html`](https://github.com/qmk/qmk_firmware/blob/master/docs/index.html) +`placeholder` と `noData` の両方のオブジェクトは、文字列で言語フォルダの辞書エントリが必要です: + + ```js + '/zh-cn/': '没有结果!', + ``` + + サイドバーの「QMK ファームウェア」の見出しリンクを設定するために、`nameLink` オブジェクトも以下のように追加される必要があります: + + ```js + '/zh-cn/': '/#/zh-cn/', + ``` + + また、`fallbackLanguages` リストに言語フォルダを追加して、404 ではなく英語に適切にフォールバックするようにしてください: + + ```js + fallbackLanguages: [ + // ... + 'zh-cn', + // ... + ], + ``` + +## 翻訳のプレビュー + +ドキュメントのローカルインスタンスをセットアップする方法については、[ドキュメントのプレビュー](ja/contributing.md#previewing-the-documentation)を見てください - 右上の "Translations" メニューから新しい言語を選択することができるはずです。 + +作業に満足したら、遠慮なくプルリクエストを開いてください! diff --git a/docs/ja/understanding_qmk.md b/docs/ja/understanding_qmk.md new file mode 100644 index 0000000000..74b37398f8 --- /dev/null +++ b/docs/ja/understanding_qmk.md @@ -0,0 +1,195 @@ +# QMK のコードの理解 + + + +このドキュメントでは、QMK ファームウェアがどのように機能するかを非常に高いレベルから説明しようとしています。基本的なプログラミングの概念を理解していることを前提としていますが、(実例を示す必要がある場合を除き) C に精通していることを前提にはしていません。以下のドキュメントの基本的な知識があることを前提としています。 + +* [入門](ja/getting_started_introduction.md) +* [キーボードがどのように動作するか](ja/how_keyboards_work.md) +* [FAQ](ja/faq.md) + +## スタートアップ + +QMK は他のコンピュータプログラムと何ら変わりないと考えることができます。開始され、タスクを実行し、そして終了します。プログラムのエントリーポイントは、他の C プログラムと同様に、`main()` 関数です。ただし、QMK を初めて触る人は、`main()` 関数が複数の場所に現れるため、混乱するかもしれません。また、どれを見ればよいか分かりにくいかもしれません。 + +複数ある理由は、QMK は様々なプラットフォームをサポートするからです。最も一般的なプラットフォームは `lufa` です。これは atmega32u4 のような AVR プロセッサ上で実行されます。また、`chibios` および `vusb` もサポートします。 + +ここでは AVR プロセッサに焦点を当てます。これは `lufa` プラットフォームを使います。`main()` 関数は [tmk_core/protocol/lufa/lufa.c](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/protocol/lufa/lufa.c#L1028) にあります。関数にざっと目を通すと、(ホストへの USB も含めて)設定された全てのハードウェアが初期化され、プログラムのコア部分が [`while(1)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/protocol/lufa/lufa.c#L1069) で開始されることが分かります。これが[メインループ](#the-main-loop)です。 + +## メインループ + +コードのこの部分は、同じ命令セットを永久にループ処理するため、「メインループ」と呼ばれます。ここはキーボードに必要なことを実行させる関数を QMK が呼び出す場所です。一見、多くの機能を持つように見えるかもしれませんが、大抵の場合、コードは `#define` によって無効にされます。 + +``` + keyboard_task(); +``` + +ここで、全てのキーボードの固有の機能が実行されます。`keyboard_task()` のソースコードは [tmk_core/common/keyboard.c](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/keyboard.c#L216) にあり、マトリックスの変化を検知し、LED の状態をオンオフする責任があります。 + +`keyboard_task()` に以下を処理するコードがあります: + +* [マトリックスのスキャン](#matrix-scanning) +* マウスの処理 +* シリアルリンク +* ビジュアライザ +* キーボードの状態の LED (Caps Lock, Num Lock, Scroll Lock) + +#### マトリックスのスキャン + +マトリックスのスキャンはキーボードファームウェアのコアの機能です。これは今どのキーが押されているかを検知するプロセスであり、キーボードはこの機能を1秒間に何度も何度も実行します。ファームウェアの CPU 時間の 99% はマトリックスのスキャンに費やされていると言っても過言ではありません。 + +実際のマトリックスの検知には様々な方法がありますが、それはこのドキュメントの対象外です。マトリックスのスキャンをブラックボックスとして扱っても問題ありません。マトリックスの現在の状態を求めると、以下のようなデータ構造を取得します: + + +``` +{ + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0} +} +``` + +これは 4行x5列のテンキー(訳注: 5行x4列の間違いと思われます)のマトリックスを表す直接的な表現のデータ構造です。キーが押されると、マトリックス内のそのキーの位置が、 `0` ではなく `1` として返されます。 + +マトリックスのスキャンは1秒間に何度も実行されます。正確なレートは様々ですが、知覚できるような遅延を避けるために、秒間に少なくとも10回実行します。 + +##### マトリックスから物理的なレイアウトへのマップ + +キーボード上の各スイッチの状態が分かると、それをキーコードへマップする必要があります。QMK ではキーコードへのマップは C マクロを使うことで行われ、C マクロにより物理的なレイアウトの定義はキーコードの定義から分離されています。(訳注:「キーコードの定義」は「キーコードのマトリクス配列による定義」と思われる) + +キーボードレベルで、キーボードのマトリックスを物理キーにマップする C マクロ (一般的には、`LAYOUT()` という名前)を定義します。マトリックスにスイッチがない場所がある場合、このマクロを使って KC_NO を事前に埋め込むことができ、キーマップの定義を扱いやすくすることができます。以下は、テンキー用の `LAYOUT()` マクロです: + +```c +#define LAYOUT( \ + 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 } \ +} +``` + +`LAYOUT()` マクロの2つ目のブロックが、上記のマトリックススキャン配列とどのように一致しているかに注目してください。このマクロはマトリックスのスキャン配列をキーコードにマップするものです。ただし、17キーのテンキーを見ると、マトリックスにはスイッチが置けるが、キーが大きいために実際にはスイッチが無い箇所が3つあることが分かります。これらのスペースに `KC_NO` を設定したので、キーマップ定義には必要ありません。 + +このマクロを使って、少し変わったマトリックスのレイアウト、例えば [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/66/rev2/rev2.h) を扱うこともできます。その説明はこのドキュメントの範囲外です。 + +##### キーコードの割り当て + +キーマップレべルでは、上記の `LAYOUT()` マクロを使って、物理的な場所からマトリックスの場所にマッピングします。以下のようになります: + +``` +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( + 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) +} +``` + +これら全ての引数が、前のセクションの `LAYOUT()` マクロの前半とどのように一致しているかについて注目してください。このようにして、キーコードを取得して、それを前述のマトリックススキャンにマップします。 + +##### 状態変更の検知 + +上記のマトリックススキャンはある時点のマトリックスの状態を伝えますが、コンピュータは変更のみを知りたいだけで、現在の状態を気にしません。QMK は最後のマトリックススキャンの結果を格納し、このマトリックスから結果を比較して、いつキーが押されたか放されたかを決定します。 + +例を見てみましょう。キーボードスキャンループの途中に移動して、前のスキャンが以下のようになっていることがわかったとします: + +``` +{ + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0} +} +``` + +現在のスキャンが完了すると、以下のように見えるとします: + +``` +{ + {1,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0}, + {0,0,0,0} +} +``` + +キーマップと比較すると、押されたキーが KC_NLCK であることが分かります。ここから、`process_record` 関数群を呼び出します。 + + + +##### Process Record + +`process_record()` 関数自体は一見簡単に見えますが、その内部は QMK の様々なレベルで機能を上書きするためのゲートウェイが隠されています。キーボード/キーマップレベルの機能について調べる必要があるときは、以下に列挙した一連のイベントを手引帳として使います。`rules.mk` またはほかの場所で設定されたオプションに応じて、最終的なファームウェアに以下の関数のサブセットのみが含まれます。 + +* [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/action.c#L172) + * [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L206) + * [このレコードをキーコードにマップする](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L226) + * [`void velocikey_accelerate(void)`](https://github.com/qmk/qmk_firmware/blob/c1c5922aae7b60b7c7d13d3769350eed9dda17ab/quantum/velocikey.c#L27) + * [`void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_tap_dance.c#L119) + * [`bool process_key_lock(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_key_lock.c#L62) + * [`bool process_clicky(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_clicky.c#L79) + * [`bool process_haptic(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/2cee371bf125a6ec541dd7c5a809573facc7c456/drivers/haptic/haptic.c#L216) + * [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/card.c#L20) + * [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/keymaps/default/keymap.c#L58) + * [`bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/rgb_matrix.c#L139) + * [`bool process_midi(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_midi.c#L81) + * [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_audio.c#L19) + * [`bool process_steno(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_steno.c#L160) + * [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_music.c#L114) + * [`bool process_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_tap_dance.c#L141) + * [`bool process_unicode_common(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicode_common.c#L169) は、以下のいずれかを呼び出します: + * [`bool process_unicode(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicode.c#L20) + * [`bool process_unicodemap(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicodemap.c#L46) + * [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_ucis.c#L95) + * [`bool process_leader(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_leader.c#L51) + * [`bool process_combo(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_combo.c#L115) + * [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_printer.c#L77) + * [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_auto_shift.c#L94) + * [`bool process_terminal(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_terminal.c#L264) + * [Quantum 固有のキーコードを識別して処理する](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L291) + +この一連のイベントの中の任意のステップで (`process_record_kb()` のような)関数は `false` を返して、以降の処理を停止することができます。 + +この呼び出しの後で、`post_process_record()` が呼ばれます。これはキーコードが通常処理された後に実行する必要がある追加のクリーンアップを処理するために使うことができます。 + +* [`void post_process_record(keyrecord_t *record)`]() + * [`void post_process_record_quantum(keyrecord_t *record)`]() + * [このレコードをキーコードにマップする]() + * [`void post_process_clicky(uint16_t keycode, keyrecord_t *record)`]() + * [`void post_process_record_kb(uint16_t keycode, keyrecord_t *record)`]() + * [`void post_process_record_user(uint16_t keycode, keyrecord_t *record)`]() + + diff --git a/docs/mod_tap.md b/docs/mod_tap.md index ced0beba99..1217b47f92 100644 --- a/docs/mod_tap.md +++ b/docs/mod_tap.md @@ -27,22 +27,25 @@ This key would activate Left Control and Left Shift when held, and send Escape w For convenience, QMK includes some Mod-Tap shortcuts to make common combinations more compact in your keymap: -|Key |Aliases |Description | -|------------|-----------------------------------------------------------------|-------------------------------------------------------| -|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped | -|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped | -|`LALT_T(kc)`|`LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped | -|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped | -|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | -|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | -|`RALT_T(kc)`|`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped | -|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | -|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | -|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | -|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped | -|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped | -|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | -|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| +|Key |Aliases |Description | +|------------|-----------------------------------------------------------------|--------------------------------------------------------------| +|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped | +|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped | +|`LALT_T(kc)`|`LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped | +|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped | +|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | +|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | +|`RALT_T(kc)`|`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped | +|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | +|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | +|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | +|`LSA_T(kc)` | |Left Shift and Alt when held, `kc` when tapped | +|`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped | +|`RCS_T(kc)` | |Right Control and Right Shift when held, `kc` when tapped | +|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped | +|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped | +|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | +|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped | |`HYPR_T(kc)`|`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| ## Caveats diff --git a/docs/other_vscode.md b/docs/other_vscode.md index d98b96bdf1..d132afaab6 100644 --- a/docs/other_vscode.md +++ b/docs/other_vscode.md @@ -48,7 +48,7 @@ This part is super simple. However, there is some configuration that we need to ### Configuring VS Code -First, we need to set up IntelliSense. This isn't strictly required, but it will make your life a LOT easier. To do this, we need to create the `.vscode/c_cpp_properies.json` file in the QMK Firmware folder, You can do this all manually, but I've done most of the work already. +First, we need to set up IntelliSense. This isn't strictly required, but it will make your life a LOT easier. To do this, we need to create the `.vscode/c_cpp_properties.json` file in the QMK Firmware folder, You can do this all manually, but I've done most of the work already. Grab [this file](https://gist.github.com/drashna/48e2c49ce877be592a1650f91f8473e8) and save it. You may need to edit this file, if you didn't install MSYS2 to the default location, or are using WSL/LxSS. diff --git a/docs/platformdev_chibios_earlyinit.md b/docs/platformdev_chibios_earlyinit.md index 699c223771..5fd78bb336 100644 --- a/docs/platformdev_chibios_earlyinit.md +++ b/docs/platformdev_chibios_earlyinit.md @@ -4,17 +4,28 @@ This page describes a part of QMK that is a somewhat advanced concept, and is on QMK uses ChibiOS as the underlying layer to support a multitude of Arm-based devices. Each ChibiOS-supported keyboard has a low-level board definition which is responsible for initializing hardware peripherals such as the clocks, and GPIOs. -Older QMK revisions required duplication of these board definitions inside your keyboard's directory in order to override such early initialization points; this is now abstracted into the following APIs, and allows usage of the board definitions supplied with ChibiOS itself. Check `/lib/chibios/os/hal/boards` for the list of official definitions. If your keyboard needs extra initialization at a very early stage, consider providing keyboard-level overrides of the following APIs: +Older QMK revisions required duplication of these board definitions inside your keyboard's directory in order to override such early initialization points; this is now abstracted into the following APIs, and allows usage of the board definitions supplied with ChibiOS itself. Check `/lib/chibios/os/hal/boards` for the list of official definitions. If your keyboard needs extra initialization at a very early stage, consider providing keyboard-level overrides of the following APIs instead of duplicating the board definitions: ## `early_hardware_init_pre()` :id=early-hardware-init-pre The function `early_hardware_init_pre` is the earliest possible code that can be executed by a keyboard firmware. This is intended as a replacement for the ChibiOS board definition's `__early_init` function, and is the equivalent of executing at the start of the function. -This is executed before RAM gets cleared, and before clocks or GPIOs are configured; any delays or preparation using GPIOs is not likely to work at this point. After executing this function, RAM on the MCU may be zero'ed. Assigning values to variables during execution of this function may be overwritten. +This is executed before RAM gets cleared, and before clocks or GPIOs are configured; for example, ChibiOS delays are not likely to work at this point. After executing this function, RAM on the MCU may be zero'ed. Assigning values to variables during execution of this function may be overwritten. -As such, if you wish to override this API consider limiting use to writing to low-level registers. The default implementation of this function can be configured to jump to bootloader if a `RESET` key was pressed, by ensuring `#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE` is in the keyboard's `config.h` file. +As such, if you wish to override this API consider limiting use to writing to low-level registers. The default implementation of this function can be configured to jump to bootloader if a `RESET` key was pressed: -To implement your own version of this function, in your keyboard's source files: +| `config.h` override | Description | Default | +|-----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------| +| `#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP` | Whether or not bootloader is to be executed during the early initialisation code of QMK. | `FALSE` | +| `#define STM32_BOOTLOADER_ADDRESS` | Relevant for single-bank STM32 MCUs, signifies the memory address to jump to bootloader. Consult [AN2606](https://www.st.com/content/st_com/en/search.html#q=an2606-t=resources-page=1) for the _System Memory_ address for your MCU. This value should be of the format `0x11111111`. | `` | +| `#define STM32_BOOTLOADER_DUAL_BANK` | Relevant for dual-bank STM32 MCUs, signifies that a GPIO is to be toggled in order to enter bootloader mode. | `FALSE` | +| `#define STM32_BOOTLOADER_DUAL_BANK_GPIO` | Relevant for dual-bank STM32 MCUs, the pin to toggle when attempting to enter bootloader mode, e.g. `B8` | `` | +| `#define STM32_BOOTLOADER_DUAL_BANK_POLARITY` | Relevant for dual-bank STM32 MCUs, the value to set the pin to in order to trigger charging of the RC circuit. e.g. `0` or `1`. | `0` | +| `#define STM32_BOOTLOADER_DUAL_BANK_DELAY` | Relevant for dual-bank STM32 MCUs, an arbitrary measurement of time to delay before resetting the MCU. Increasing number increases the delay. | `100000` | + +Kinetis MCUs have no configurable options. + +Alternatively, to implement your own version of this function, in your keyboard's source files: ```c void early_hardware_init_pre(void) { diff --git a/docs/pr_checklist.md b/docs/pr_checklist.md index 8755552b9d..22e8a3fe1a 100644 --- a/docs/pr_checklist.md +++ b/docs/pr_checklist.md @@ -1,39 +1,42 @@ # PR checklists -This is a non-exhaustive checklist of what the QMK collaborators will be checking when reviewing submitted PRs. +This is a non-exhaustive checklist of what the QMK Collaborators will be checking when reviewing submitted PRs. -If there are any inconsistencies with these recommendations, you're best off [creating an issue](https://github.com/qmk/qmk_firmware/issues/new) against this document, or getting in touch with a QMK Collaborator on Discord. +If there are any inconsistencies with these recommendations, you're best off [creating an issue](https://github.com/qmk/qmk_firmware/issues/new) against this document, or getting in touch with a QMK Collaborator on [Discord](https://discord.gg/Uq7gcHh). ## General PRs - PR should be submitted using a non-`master` branch on the source repository - - This does not mean you target a different branch for your PR, rather that you're not working out of your own master branch - - If submitter _does_ use their own `master` branch, they'll be given a link to the ["how to git"](https://docs.qmk.fm/#/newbs_git_using_your_master_branch) page after merging -- (end of this document will contain the contents of the message) -- Newly-added directories and filenames must be lowercase - - This rule may be relaxed if upstream sources originally had uppercase characters (e.g. ChibiOS, or imported files from other repositories etc.) - - If there is enough justification (i.e. consistency with existing core files etc.) this can be relaxed + - this does not mean you target a different branch for your PR, rather that you're not working out of your own master branch + - if submitter _does_ use their own `master` branch, they'll be given a link to the ["how to git"](https://docs.qmk.fm/#/newbs_git_using_your_master_branch) page after merging -- (end of this document will contain the contents of the message) +- newly-added directories and filenames must be lowercase + - this rule may be relaxed if upstream sources originally had uppercase characters (e.g. ChibiOS, or imported files from other repositories etc.) + - if there is enough justification (i.e. consistency with existing core files etc.) this can be relaxed - a board designer naming their keyboard with uppercase letters is not enough justification -- Valid license headers on all `*.c` and `*.h` source files +- valid license headers on all `*.c` and `*.h` source files - GPL2/GPL3 recommended for consistency - - Other licenses are permitted, however they must be GPL-compatible and must allow for redistribution. Using a different license will almost certainly delay a PR getting merged. -- QMK codebase "best practices" followed - - This is not an exhaustive list, and will likely get amended as time goes by + - other licenses are permitted, however they must be GPL-compatible and must allow for redistribution. Using a different license will almost certainly delay a PR getting merged. +- QMK Codebase "best practices" followed + - this is not an exhaustive list, and will likely get amended as time goes by - `#pragma once` instead of `#ifndef` include guards in header files - - No "old-school" GPIO/I2C/SPI functions used -- must use QMK abstractions unless justifiable (and laziness is not valid justification) - - Timing abstractions should be followed too: + - no "old-school" GPIO/I2C/SPI functions used -- must use QMK abstractions unless justifiable (and laziness is not valid justification) + - timing abstractions should be followed too: - `wait_ms()` instead of `_delay_ms()` (remove `#include ` too) - `timer_read()` and `timer_read32()` etc. -- see [timer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/timer.h) for the timing APIs - - If you think a new abstraction is useful, you're encouraged to: + - if you think a new abstraction is useful, you're encouraged to: - prototype it in your own keyboard until it's feature-complete - discuss it with QMK Collaborators on Discord - refactor it as a separate core change - remove your specific copy in your board +- rebase and fix all merge conflicts before opening the PR (in case you need help or advice, reach out to QMK Collaborators on Discord) -## Core PRs +## Keymap PRs -- Must now target `develop` branch, which will subsequently be merged back to `master` on the breaking changes timeline -- Other notes TBD - - Core is a lot more subjective given the breadth of posted changes +- `#include QMK_KEYBOARD_H` preferred to including specific board files +- prefer layer `enum`s to `#define`s +- require custom keycode `enum`s to `#define`s, first entry must have ` = SAFE_RANGE` +- terminating backslash (`\`) in lines of LAYOUT macro parameters is superfluous +- some care with spacing (e.g., alignment on commas or first char of keycodes) makes for a much nicer-looking keymap ## Keyboard PRs @@ -48,12 +51,14 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard - standard template should be present - flash command has `:flash` at end - valid hardware availability link (unless handwired) -- private groupbuys are okay, but one-off prototypes will be questioned. If open-source, a link to files should be provided. + - clear instructions on how to reset the board into bootloader mode + - a picture about the keyboard and preferably about the PCB, too - `rules.mk` - removed `MIDI_ENABLE`, `FAUXCLICKY_ENABLE` and `HD44780_ENABLE` - modified `# Enable Bluetooth with the Adafruit EZ-Key HID` -> `# Enable Bluetooth` - - No `(-/+size)` comments related to enabling features - - Remove the list of alternate bootloaders if one has been specified - - No re-definitions of the default MCU parameters if same value, when compared to the equivalent MCU in [mcu_selection.mk](https://github.com/qmk/qmk_firmware/blob/master/quantum/mcu_selection.mk) + - no `(-/+size)` comments related to enabling features + - remove the list of alternate bootloaders if one has been specified + - no re-definitions of the default MCU parameters if same value, when compared to the equivalent MCU in [mcu_selection.mk](https://github.com/qmk/qmk_firmware/blob/master/quantum/mcu_selection.mk) - keyboard `config.h` - don't repeat `MANUFACTURER` in the `PRODUCT` value - no `#define DESCRIPTION` @@ -71,12 +76,12 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard - `keyboard.h` - `#include "quantum.h"` appears at the top - `LAYOUT` macros should use standard definitions if applicable - - Use the Community Layout macro names where they apply (preferred above `LAYOUT`/`LAYOUT_all`) + - use the Community Layout macro names where they apply (preferred above `LAYOUT`/`LAYOUT_all`) - keymap `config.h` - no duplication of `rules.mk` or `config.h` from keyboard - `keymaps/default/keymap.c` - `QMKBEST`/`QMKURL` removed (sheesh) - - If using `MO(_LOWER)` and `MO(_RAISE)` keycodes or equivalent, and the keymap has an adjust layer when holding both keys -- if the keymap has no "direct-to-adjust" keycode (such as `MO(_ADJUST)`) then you should prefer to write... + - if using `MO(_LOWER)` and `MO(_RAISE)` keycodes or equivalent, and the keymap has an adjust layer when holding both keys -- if the keymap has no "direct-to-adjust" keycode (such as `MO(_ADJUST)`) then you should prefer to write... ``` layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); @@ -90,22 +95,20 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard - submitters can also have a "manufacturer-matching" keymap that mirrors existing functionality of the commercial product, if porting an existing board Also, specific to ChibiOS: -- **Strong** preference to using existing ChibiOS board definitions. - - A lot of the time, an equivalent Nucleo board can be used with a different flash size or slightly different model in the same family - - Example: For an STM32L082KZ, given the similarity to an STM32L073RZ, you can use `BOARD = ST_NUCLEO64_L073RZ` in rules.mk +- **strong** preference to using existing ChibiOS board definitions. + - a lot of the time, an equivalent Nucleo board can be used with a different flash size or slightly different model in the same family + - example: For an STM32L082KZ, given the similarity to an STM32L073RZ, you can use `BOARD = ST_NUCLEO64_L073RZ` in rules.mk - QMK is migrating to not having custom board definitions if at all possible, due to the ongoing maintenance burden when upgrading ChibiOS -- If a board definition is unavoidable, `board.c` must have a standard `__early_init()` (as per normal ChibiOS board defs) and an empty `boardInit()`: +- if a board definition is unavoidable, `board.c` must have a standard `__early_init()` (as per normal ChibiOS board defs) and an empty `boardInit()`: - see Arm/ChibiOS [early initialization](https://docs.qmk.fm/#/platformdev_chibios_earlyinit?id=board-init) - `__early_init()` should be replaced by either `early_hardware_init_pre()` or `early_hardware_init_post()` as appropriate - `boardInit()` should be migrated to `board_init()` -## Keymap PRs +## Core PRs -- `#include QMK_KEYBOARD_H` preferred to including specific board files -- Prefer layer `enum`s to `#define`s -- Require custom keycode `enum`s to `#define`s, first entry must have ` = SAFE_RANGE` -- Terminating backslash (`\`) in lines of LAYOUT macro parameters is superfluous -- Some care with spacing (e.g., alignment on commas or first char of keycodes) makes for a much nicer-looking keymap +- must now target `develop` branch, which will subsequently be merged back to `master` on the breaking changes timeline +- other notes TBD + - core is a lot more subjective given the breadth of posted changes --- diff --git a/docs/ref_functions.md b/docs/ref_functions.md index 997c3fa2ee..176095070b 100644 --- a/docs/ref_functions.md +++ b/docs/ref_functions.md @@ -43,7 +43,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { ### `update_tri_layer_state(state, x, y, z)` The other function is `update_tri_layer_state(state, x, y, z)`. This function is meant to be called from the [`layer_state_set_*` functions](custom_quantum_functions.md#layer-change-code). This means that any time that you use a keycode to change the layer, this will be checked. So you could use `LT(layer, kc)` to change the layer and it will trigger the same layer check. -The caveat to this method is that you cannot access the `z` layer without having `x` and `y` layers on, since if you try to activate just layer `z`, it will run this code and turn off layer `z` before you could use it. +There are a couple of caveats to this method: +1. You cannot access the `z` layer without having `x` and `y` layers on, since if you try to activate just layer `z`, it will run this code and turn off layer `z` before you could use it. +2. Because layers are processed from the highest number `z` should be a higher layer than `x` and `y` or you may not be able to access it. #### Example @@ -97,7 +99,7 @@ To wipe the EEPROM, run `eeconfig_init()` from your function or macro to reset m ## Tap random key -If you want to send a random character to the host computer, you can use the `tap_random_base64()` function. This [pseudorandomly](https://en.wikipedia.org/wiki/Pseudorandom_number_generator) selects a number between 0 and 63, and then sends a key press based on that selection. (0–25 is `A`–`Z`, 26–51 is `a`–`z`, 52–61 is `0`–`9`, 62 is `+` and 63 is `/`). +If you want to send a random character to the host computer, you can use the `tap_random_base64()` function. This [pseudorandomly](https://en.wikipedia.org/wiki/Pseudorandom_number_generator) selects a number between 0 and 63, and then sends a key press based on that selection. (0–25 is `A`–`Z`, 26–51 is `a`–`z`, 52–61 is `0`–`9`, 62 is `+` and 63 is `/`). ?> Needless to say, but this is _not_ a cryptographically secure method of generating random Base64 keys or passwords. diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index badfabd912..3ca62c719e 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -31,7 +31,7 @@ Within our `info.json` file the `layouts` portion of the dictionary contains sev * `height` * Optional: The height of the layout in Key Units * `key_count` - * **Required**: The number of keys in this layout + * Optional: The number of keys in this layout * `layout` * A list of Key Dictionaries describing the physical layout. See the next section for more details. diff --git a/docs/tap_hold.md b/docs/tap_hold.md index 589ec31816..9ffbfde8fc 100644 --- a/docs/tap_hold.md +++ b/docs/tap_hold.md @@ -1,22 +1,22 @@ # Tap-Hold Configuration Options -While Tap-Hold options are fantastic, they are not without their issues. We have tried to configure them with reasonable defaults, but that may still cause issues for some people. +While Tap-Hold options are fantastic, they are not without their issues. We have tried to configure them with reasonable defaults, but that may still cause issues for some people. These options let you modify the behavior of the Tap-Hold keys. ## Tapping Term -The crux of all of the following features is the tapping term setting. This determines what is a tap and what is a hold. And the exact timing for this to feel natural can vary from keyboard to keyboard, from switch to switch, and from key to key. +The crux of all of the following features is the tapping term setting. This determines what is a tap and what is a hold. And the exact timing for this to feel natural can vary from keyboard to keyboard, from switch to switch, and from key to key. -You can set the global time for this by adding the following setting to your `config.h`: +You can set the global time for this by adding the following setting to your `config.h`: ```c #define TAPPING_TERM 200 ``` -This setting is defined in milliseconds, and does default to 200ms. This is a good average for a majority of people. +This setting is defined in milliseconds, and does default to 200ms. This is a good average for a majority of people. -For more granular control of this feature, you can add the following to your `config.h`: +For more granular control of this feature, you can add the following to your `config.h`: ```c #define TAPPING_TERM_PER_KEY ``` @@ -45,9 +45,9 @@ As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new #define PERMISSIVE_HOLD ``` -This makes tap and hold keys (like Mod Tap) work better for fast typists, or for high `TAPPING_TERM` settings. +This makes tap and hold keys (like Mod Tap) work better for fast typists, or for high `TAPPING_TERM` settings. -If you press a Mod Tap key, tap another key (press and release) and then release the Mod Tap key, all within the tapping term, it will output the "tapping" function for both keys. +If you press a Mod Tap key, tap another key (press and release) and then release the Mod Tap key, all within the tapping term, it will output the tapping function for both keys. For Instance: @@ -56,7 +56,7 @@ For Instance: - `KC_X` Up - `SFT_T(KC_A)` Up -Normally, if you do all this within the `TAPPING_TERM` (default: 200ms) this will be registered as `ax` by the firmware and host system. With permissive hold enabled, this modifies how this is handled by considering the Mod Tap keys as a Mod if another key is tapped, and would registered as `X` (`SHIFT`+`x`). +Normally, if you do all this within the `TAPPING_TERM` (default: 200ms) this will be registered as `ax` by the firmware and host system. With permissive hold enabled, this modifies how this is handled by considering the Mod Tap keys as a Mod if another key is tapped, and would registered as `X` (`SHIFT`+`x`). ?> If you have `Ignore Mod Tap Interrupt` enabled, as well, this will modify how both work. The regular key has the modifier added if the first key is released first or if both keys are held longer than the `TAPPING_TERM`. @@ -87,7 +87,7 @@ To enable this setting, add this to your `config.h`: #define IGNORE_MOD_TAP_INTERRUPT ``` -Similar to Permissive Hold, this alters how the firmware processes inputs for fast typists. If you press a Mod Tap key, press another key, release the Mod Tap key, and then release the normal key, it would normally output the "tapping" function for both keys. This may not be desirable for rolling combo keys. +Similar to Permissive Hold, this alters how the firmware processes inputs for fast typists. If you press a Mod Tap key, press another key, release the Mod Tap key, and then release the normal key, it would normally output the tapping function for both keys. This may not be desirable for rolling combo keys. Setting `Ignore Mod Tap Interrupt` requires holding both keys for the `TAPPING_TERM` to trigger the hold function (the mod). @@ -126,27 +126,27 @@ bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { ## Tapping Force Hold -To enable `tapping force hold`, add the following to your `config.h`: +To enable `tapping force hold`, add the following to your `config.h`: ```c #define TAPPING_FORCE_HOLD ``` -When the user holds a key after tap, this repeats the tapped key rather to hold a modifier key. This allows to use auto repeat for the tapped key. +When the user holds a key after tapping it, the tapping function is repeated by default, rather than activating the hold function. This allows keeping the ability to auto-repeat the tapping function of a dual-role key. `TAPPING_FORCE_HOLD` removes that ability to let the user activate the hold function instead, in the case of holding the dual-role key after having tapped it. Example: -- SFT_T(KC_A) Down -- SFT_T(KC_A) Up -- SFT_T(KC_A) Down -- wait more than tapping term... -- SFT_T(KC_A) Up +- `SFT_T(KC_A)` Down +- `SFT_T(KC_A)` Up +- `SFT_T(KC_A)` Down +- wait until the tapping term expires... +- `SFT_T(KC_A)` Up With default settings, `a` will be sent on the first release, then `a` will be sent on the second press allowing the computer to trigger its auto repeat function. With `TAPPING_FORCE_HOLD`, the second press will be interpreted as a Shift, allowing to use it as a modifier shortly after having used it as a tap. -!> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tapping Toggle). +!> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tap Toggle). For more granular control of this feature, you can add the following to your `config.h`: @@ -169,7 +169,7 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { ## Retro Tapping -To enable `retro tapping`, add the following to your `config.h`: +To enable `retro tapping`, add the following to your `config.h`: ```c #define RETRO_TAPPING @@ -179,11 +179,11 @@ Holding and releasing a dual function key without pressing another key will resu For instance, holding and releasing `LT(2, KC_SPACE)` without hitting another key will result in nothing happening. With this enabled, it will send `KC_SPACE` instead. -## Why do we include the key record for the per key functions? +## Why do we include the key record for the per key functions? -One thing that you may notice is that we include the key record for all of the "per key" functions, and may be wondering why we do that. +One thing that you may notice is that we include the key record for all of the "per key" functions, and may be wondering why we do that. -Well, it's simply really: customization. But specifically, it depends on how your keyboard is wired up. For instance, if each row is actually using a row in the keyboard's matrix, then it may be simpler to use `if (record->event.row == 3)` instead of checking a whole bunch of keycodes. Which is especially good for those people using the Tap Hold type keys on the home row. So you could fine tune those to not interfere with your normal typing. +Well, it's simple really: customization. But specifically, it depends on how your keyboard is wired up. For instance, if each row is actually using a row in the keyboard's matrix, then it may be simpler to use `if (record->event.row == 3)` instead of checking a whole bunch of keycodes. Which is especially good for those people using the Tap Hold type keys on the home row. So you could fine tune those to not interfere with your normal typing. ## Why is there no `*_kb` or `*_user` functions?! diff --git a/docs/ws2812_driver.md b/docs/ws2812_driver.md index 941e1bde08..c1b96329e9 100644 --- a/docs/ws2812_driver.md +++ b/docs/ws2812_driver.md @@ -92,6 +92,7 @@ Configure the hardware via your config.h: #define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. #define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU. ``` You must also turn on the PWM feature in your halconf.h and mcuconf.h @@ -117,5 +118,5 @@ Note: This only applies to STM32 boards. To configure the `RGB_DI_PIN` to open drain configuration add this to your config.h file: ```c - #define WS2812_EXTERNAL_PULLUP +#define WS2812_EXTERNAL_PULLUP ``` diff --git a/doxygen-todo b/doxygen-todo index 39fb498d97..d8892e48de 100644 --- a/doxygen-todo +++ b/doxygen-todo @@ -1,6 +1,5 @@ tmk_core/protocol tmk_core/protocol/chibios -tmk_core/protocol/iwrap tmk_core/protocol/lufa tmk_core/protocol/midi tmk_core/protocol/midi/bytequeue diff --git a/drivers/avr/analog.c b/drivers/avr/analog.c index 9b8397b933..8d299ffdb9 100644 --- a/drivers/avr/analog.c +++ b/drivers/avr/analog.c @@ -97,10 +97,11 @@ uint8_t pinToMux(pin_t pin) { #endif // clang-format on } + return 0; } int16_t adc_read(uint8_t mux) { - uint8_t low; + uint16_t low; // Enable ADC and configure prescaler ADCSRA = _BV(ADEN) | ADC_PRESCALER; @@ -128,5 +129,10 @@ int16_t adc_read(uint8_t mux) { // Must read LSB first low = ADCL; // Must read MSB only once! - return (ADCH << 8) | low; + low |= (ADCH << 8); + + // turn off the ADC + ADCSRA &= ~(1 << ADEN); + + return low; } diff --git a/drivers/avr/ssd1306.c b/drivers/avr/ssd1306.c index 61d7a99531..1a09a2bcb7 100644 --- a/drivers/avr/ssd1306.c +++ b/drivers/avr/ssd1306.c @@ -5,15 +5,14 @@ # include # include "print.h" # include "glcdfont.c" -# ifdef ADAFRUIT_BLE_ENABLE -# include "adafruit_ble.h" -# endif # ifdef PROTOCOL_LUFA # include "lufa.h" # endif # include "sendchar.h" # include "timer.h" +struct CharacterMatrix display; + // 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 diff --git a/drivers/avr/ssd1306.h b/drivers/avr/ssd1306.h index 9669d1b7e7..9131afcf61 100644 --- a/drivers/avr/ssd1306.h +++ b/drivers/avr/ssd1306.h @@ -66,7 +66,7 @@ struct CharacterMatrix { bool dirty; }; -struct CharacterMatrix display; +extern struct CharacterMatrix display; bool iota_gfx_init(void); void iota_gfx_task(void); diff --git a/drivers/boards/BLACKPILL_STM32_F401/board.c b/drivers/boards/BLACKPILL_STM32_F401/board.c deleted file mode 100644 index 330e06c8aa..0000000000 --- a/drivers/boards/BLACKPILL_STM32_F401/board.c +++ /dev/null @@ -1,250 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * This file has been automatically generated using ChibiStudio board - * generator plugin. Do not edit manually. - */ - -#include "hal.h" -#include "stm32_gpio.h" - -/*===========================================================================*/ -/* Driver local definitions. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver exported variables. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver local variables and types. */ -/*===========================================================================*/ - -/** - * @brief Type of STM32 GPIO port setup. - */ -typedef struct { - uint32_t moder; - uint32_t otyper; - uint32_t ospeedr; - uint32_t pupdr; - uint32_t odr; - uint32_t afrl; - uint32_t afrh; -} gpio_setup_t; - -/** - * @brief Type of STM32 GPIO initialization data. - */ -typedef struct { -#if STM32_HAS_GPIOA || defined(__DOXYGEN__) - gpio_setup_t PAData; -#endif -#if STM32_HAS_GPIOB || defined(__DOXYGEN__) - gpio_setup_t PBData; -#endif -#if STM32_HAS_GPIOC || defined(__DOXYGEN__) - gpio_setup_t PCData; -#endif -#if STM32_HAS_GPIOD || defined(__DOXYGEN__) - gpio_setup_t PDData; -#endif -#if STM32_HAS_GPIOE || defined(__DOXYGEN__) - gpio_setup_t PEData; -#endif -#if STM32_HAS_GPIOF || defined(__DOXYGEN__) - gpio_setup_t PFData; -#endif -#if STM32_HAS_GPIOG || defined(__DOXYGEN__) - gpio_setup_t PGData; -#endif -#if STM32_HAS_GPIOH || defined(__DOXYGEN__) - gpio_setup_t PHData; -#endif -#if STM32_HAS_GPIOI || defined(__DOXYGEN__) - gpio_setup_t PIData; -#endif -#if STM32_HAS_GPIOJ || defined(__DOXYGEN__) - gpio_setup_t PJData; -#endif -#if STM32_HAS_GPIOK || defined(__DOXYGEN__) - gpio_setup_t PKData; -#endif -} gpio_config_t; - -/** - * @brief STM32 GPIO static initialization data. - */ -static const gpio_config_t gpio_default_config = { -#if STM32_HAS_GPIOA - {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, -#endif -#if STM32_HAS_GPIOB - {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, -#endif -#if STM32_HAS_GPIOC - {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, -#endif -#if STM32_HAS_GPIOD - {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, -#endif -#if STM32_HAS_GPIOE - {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, -#endif -#if STM32_HAS_GPIOF - {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, -#endif -#if STM32_HAS_GPIOG - {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, -#endif -#if STM32_HAS_GPIOH - {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, -#endif -#if STM32_HAS_GPIOI - {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}, -#endif -#if STM32_HAS_GPIOJ - {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, -#endif -#if STM32_HAS_GPIOK - {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} -#endif -}; - -/*===========================================================================*/ -/* Driver local functions. */ -/*===========================================================================*/ - -static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { - gpiop->OTYPER = config->otyper; - gpiop->OSPEEDR = config->ospeedr; - gpiop->PUPDR = config->pupdr; - gpiop->ODR = config->odr; - gpiop->AFRL = config->afrl; - gpiop->AFRH = config->afrh; - gpiop->MODER = config->moder; -} - -static void stm32_gpio_init(void) { - /* Enabling GPIO-related clocks, the mask comes from the - registry header file.*/ - rccResetAHB1(STM32_GPIO_EN_MASK); - rccEnableAHB1(STM32_GPIO_EN_MASK, true); - - /* Initializing all the defined GPIO ports.*/ -#if STM32_HAS_GPIOA - gpio_init(GPIOA, &gpio_default_config.PAData); -#endif -#if STM32_HAS_GPIOB - gpio_init(GPIOB, &gpio_default_config.PBData); -#endif -#if STM32_HAS_GPIOC - gpio_init(GPIOC, &gpio_default_config.PCData); -#endif -#if STM32_HAS_GPIOD - gpio_init(GPIOD, &gpio_default_config.PDData); -#endif -#if STM32_HAS_GPIOE - gpio_init(GPIOE, &gpio_default_config.PEData); -#endif -#if STM32_HAS_GPIOF - gpio_init(GPIOF, &gpio_default_config.PFData); -#endif -#if STM32_HAS_GPIOG - gpio_init(GPIOG, &gpio_default_config.PGData); -#endif -#if STM32_HAS_GPIOH - gpio_init(GPIOH, &gpio_default_config.PHData); -#endif -#if STM32_HAS_GPIOI - gpio_init(GPIOI, &gpio_default_config.PIData); -#endif -#if STM32_HAS_GPIOJ - gpio_init(GPIOJ, &gpio_default_config.PJData); -#endif -#if STM32_HAS_GPIOK - gpio_init(GPIOK, &gpio_default_config.PKData); -#endif -} - -/*===========================================================================*/ -/* Driver interrupt handlers. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver exported functions. */ -/*===========================================================================*/ - -__attribute__((weak)) void enter_bootloader_mode_if_requested(void) {} - -/** - * @brief Early initialization code. - * @details GPIO ports and system clocks are initialized before everything - * else. - */ -void __early_init(void) { - enter_bootloader_mode_if_requested(); - - stm32_gpio_init(); - stm32_clock_init(); -} - -#if HAL_USE_SDC || defined(__DOXYGEN__) -/** - * @brief SDC card detection. - */ -bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { - (void)sdcp; - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief SDC card write protection detection. - */ -bool sdc_lld_is_write_protected(SDCDriver *sdcp) { - (void)sdcp; - /* TODO: Fill the implementation.*/ - return false; -} -#endif /* HAL_USE_SDC */ - -#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) -/** - * @brief MMC_SPI card detection. - */ -bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { - (void)mmcp; - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief MMC_SPI card write protection detection. - */ -bool mmc_lld_is_write_protected(MMCDriver *mmcp) { - (void)mmcp; - /* TODO: Fill the implementation.*/ - return false; -} -#endif - -/** - * @brief Board-specific initialization code. - * @todo Add your board-specific code, if any. - */ -void boardInit(void) {} diff --git a/drivers/boards/BLACKPILL_STM32_F401/board.h b/drivers/boards/BLACKPILL_STM32_F401/board.h deleted file mode 100644 index 2d1cd9ff72..0000000000 --- a/drivers/boards/BLACKPILL_STM32_F401/board.h +++ /dev/null @@ -1,568 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * This file has been automatically generated using ChibiStudio board - * generator plugin. Do not edit manually. - */ - -#ifndef BOARD_H -#define BOARD_H - -/*===========================================================================*/ -/* Driver constants. */ -/*===========================================================================*/ - -/* - * Setup for STM32F401CCU6 black pill board. - */ - -/* - * Board identifier. - */ -#define BOARD_BLACKPILL_STM32_F401 -#define BOARD_NAME "STM32F401CCU6 blackpill" - -/* - * Allow Board to boot USB without extra A9 hardware/software config - */ -#define BOARD_OTG_NOVBUSSENS 1 - -/* - * Board oscillators-related settings. - */ -#if !defined(STM32_LSECLK) -# define STM32_LSECLK 32768U -#endif - -#if !defined(STM32_HSECLK) -# define STM32_HSECLK 25000000U -#endif - -/* - * Board voltages. - * Required for performance limits calculation. - */ -#define STM32_VDD 300U - -/* - * MCU type as defined in the ST header. - */ -#define STM32F401xC - -/* - * IO pins assignments. - */ -#define GPIOA_BUTTON 0U -#define GPIOA_PIN1 1U -#define GPIOA_PIN2 2U -#define GPIOA_PIN3 3U -#define GPIOA_CS43L22_LRCK 4U -#define GPIOA_L3GD20_SCL 5U -#define GPIOA_L3GD20_SD0 6U -#define GPIOA_L3GD20_SDI 7U -#define GPIOA_PIN8 8U -#define GPIOA_VBUS_FS 9U -#define GPIOA_OTG_FS_ID 10U -#define GPIOA_OTG_FS_DM 11U -#define GPIOA_OTG_FS_DP 12U -#define GPIOA_SWDIO 13U -#define GPIOA_SWCLK 14U -#define GPIOA_PIN15 15U - -#define GPIOB_PIN0 0U -#define GPIOB_PIN1 1U -#define GPIOB_PIN2 2U -#define GPIOB_SWO 3U -#define GPIOB_PIN4 4U -#define GPIOB_PIN5 5U -#define GPIOB_LSM303DLHC_SCL 6U -#define GPIOB_PIN7 7U -#define GPIOB_PIN8 8U -#define GPIOB_LSM303DLHC_SDA 9U -#define GPIOB_MP45DT02_CLK_IN 10U -#define GPIOB_PIN11 11U -#define GPIOB_PIN12 12U -#define GPIOB_PIN13 13U -#define GPIOB_PIN14 14U -#define GPIOB_PIN15 15U - -#define GPIOC_OTG_FS_POWER_ON 0U -#define GPIOC_PIN1 1U -#define GPIOC_PIN2 2U -#define GPIOC_CS43L22_AIN4x 3U -#define GPIOC_MP45DT02_PDM_OUT 3U -#define GPIOC_PIN4 4U -#define GPIOC_PIN5 5U -#define GPIOC_PIN6 6U -#define GPIOC_CS43L22_MCLK 7U -#define GPIOC_PIN8 8U -#define GPIOC_PIN9 9U -#define GPIOC_CS43L22_SCLK 10U -#define GPIOC_PIN11 11U -#define GPIOC_CS43L22_SDIN 12U -#define GPIOC_PIN13 13U -#define GPIOC_OSC32_IN 14U -#define GPIOC_OSC32_OUT 15U - -#define GPIOD_PIN0 0U -#define GPIOD_PIN1 1U -#define GPIOD_PIN2 2U -#define GPIOD_PIN3 3U -#define GPIOD_CS43L22_RESET 4U -#define GPIOD_OverCurrent 5U -#define GPIOD_PIN6 6U -#define GPIOD_PIN7 7U -#define GPIOD_PIN8 8U -#define GPIOD_PIN9 9U -#define GPIOD_PIN10 10U -#define GPIOD_PIN11 11U -#define GPIOD_LED4 12U -#define GPIOD_LED3 13U -#define GPIOD_LED5 14U -#define GPIOD_LED6 15U - -#define GPIOE_L3GD20_INT1 0U -#define GPIOE_L3GD20_INT2 1U -#define GPIOE_LSM303DLHC_DRDY 2U -#define GPIOE_L3GD20_CS 3U -#define GPIOE_LSM303DLHC_INT1 4U -#define GPIOE_LSM303DLHC_INT2 5U -#define GPIOE_PIN6 6U -#define GPIOE_PIN7 7U -#define GPIOE_PIN8 8U -#define GPIOE_PIN9 9U -#define GPIOE_PIN10 10U -#define GPIOE_PIN11 11U -#define GPIOE_PIN12 12U -#define GPIOE_PIN13 13U -#define GPIOE_PIN14 14U -#define GPIOE_PIN15 15U - -#define GPIOF_PIN0 0U -#define GPIOF_PIN1 1U -#define GPIOF_PIN2 2U -#define GPIOF_PIN3 3U -#define GPIOF_PIN4 4U -#define GPIOF_PIN5 5U -#define GPIOF_PIN6 6U -#define GPIOF_PIN7 7U -#define GPIOF_PIN8 8U -#define GPIOF_PIN9 9U -#define GPIOF_PIN10 10U -#define GPIOF_PIN11 11U -#define GPIOF_PIN12 12U -#define GPIOF_PIN13 13U -#define GPIOF_PIN14 14U -#define GPIOF_PIN15 15U - -#define GPIOG_PIN0 0U -#define GPIOG_PIN1 1U -#define GPIOG_PIN2 2U -#define GPIOG_PIN3 3U -#define GPIOG_PIN4 4U -#define GPIOG_PIN5 5U -#define GPIOG_PIN6 6U -#define GPIOG_PIN7 7U -#define GPIOG_PIN8 8U -#define GPIOG_PIN9 9U -#define GPIOG_PIN10 10U -#define GPIOG_PIN11 11U -#define GPIOG_PIN12 12U -#define GPIOG_PIN13 13U -#define GPIOG_PIN14 14U -#define GPIOG_PIN15 15U - -#define GPIOH_OSC_IN 0U -#define GPIOH_OSC_OUT 1U -#define GPIOH_PIN2 2U -#define GPIOH_PIN3 3U -#define GPIOH_PIN4 4U -#define GPIOH_PIN5 5U -#define GPIOH_PIN6 6U -#define GPIOH_PIN7 7U -#define GPIOH_PIN8 8U -#define GPIOH_PIN9 9U -#define GPIOH_PIN10 10U -#define GPIOH_PIN11 11U -#define GPIOH_PIN12 12U -#define GPIOH_PIN13 13U -#define GPIOH_PIN14 14U -#define GPIOH_PIN15 15U - -#define GPIOI_PIN0 0U -#define GPIOI_PIN1 1U -#define GPIOI_PIN2 2U -#define GPIOI_PIN3 3U -#define GPIOI_PIN4 4U -#define GPIOI_PIN5 5U -#define GPIOI_PIN6 6U -#define GPIOI_PIN7 7U -#define GPIOI_PIN8 8U -#define GPIOI_PIN9 9U -#define GPIOI_PIN10 10U -#define GPIOI_PIN11 11U -#define GPIOI_PIN12 12U -#define GPIOI_PIN13 13U -#define GPIOI_PIN14 14U -#define GPIOI_PIN15 15U - -/* - * IO lines assignments. - */ -#define LINE_BUTTON PAL_LINE(GPIOA, 0U) -#define LINE_CS43L22_LRCK PAL_LINE(GPIOA, 4U) -#define LINE_L3GD20_SCL PAL_LINE(GPIOA, 5U) -#define LINE_L3GD20_SD0 PAL_LINE(GPIOA, 6U) -#define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U) -#define LINE_VBUS_FS PAL_LINE(GPIOA, 9U) -#define LINE_OTG_FS_ID PAL_LINE(GPIOA, 10U) -#define LINE_OTG_FS_DM PAL_LINE(GPIOA, 11U) -#define LINE_OTG_FS_DP PAL_LINE(GPIOA, 12U) -#define LINE_SWDIO PAL_LINE(GPIOA, 13U) -#define LINE_SWCLK PAL_LINE(GPIOA, 14U) -#define LINE_SWO PAL_LINE(GPIOB, 3U) -#define LINE_LSM303DLHC_SCL PAL_LINE(GPIOB, 6U) -#define LINE_LSM303DLHC_SDA PAL_LINE(GPIOB, 9U) -#define LINE_MP45DT02_CLK_IN PAL_LINE(GPIOB, 10U) -#define LINE_OTG_FS_POWER_ON PAL_LINE(GPIOC, 0U) -#define LINE_CS43L22_AIN4x PAL_LINE(GPIOC, 3U) -#define LINE_MP45DT02_PDM_OUT PAL_LINE(GPIOC, 3U) -#define LINE_CS43L22_MCLK PAL_LINE(GPIOC, 7U) -#define LINE_CS43L22_SCLK PAL_LINE(GPIOC, 10U) -#define LINE_CS43L22_SDIN PAL_LINE(GPIOC, 12U) -#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) -#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) -#define LINE_CS43L22_RESET PAL_LINE(GPIOD, 4U) -#define LINE_OverCurrent PAL_LINE(GPIOD, 5U) -#define LINE_LED4 PAL_LINE(GPIOD, 12U) -#define LINE_LED3 PAL_LINE(GPIOD, 13U) -#define LINE_LED5 PAL_LINE(GPIOD, 14U) -#define LINE_LED6 PAL_LINE(GPIOD, 15U) -#define LINE_L3GD20_INT1 PAL_LINE(GPIOE, 0U) -#define LINE_L3GD20_INT2 PAL_LINE(GPIOE, 1U) -#define LINE_LSM303DLHC_DRDY PAL_LINE(GPIOE, 2U) -#define LINE_L3GD20_CS PAL_LINE(GPIOE, 3U) -#define LINE_LSM303DLHC_INT1 PAL_LINE(GPIOE, 4U) -#define LINE_LSM303DLHC_INT2 PAL_LINE(GPIOE, 5U) -#define LINE_OSC_IN PAL_LINE(GPIOH, 0U) -#define LINE_OSC_OUT PAL_LINE(GPIOH, 1U) - -/*===========================================================================*/ -/* Driver pre-compile time settings. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Derived constants and error checks. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver data structures and types. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver macros. */ -/*===========================================================================*/ - -/* - * I/O ports initial setup, this configuration is established soon after reset - * in the initialization code. - * Please refer to the STM32 Reference Manual for details. - */ -#define PIN_MODE_INPUT(n) (0U << ((n)*2U)) -#define PIN_MODE_OUTPUT(n) (1U << ((n)*2U)) -#define PIN_MODE_ALTERNATE(n) (2U << ((n)*2U)) -#define PIN_MODE_ANALOG(n) (3U << ((n)*2U)) -#define PIN_ODR_LOW(n) (0U << (n)) -#define PIN_ODR_HIGH(n) (1U << (n)) -#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) -#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) -#define PIN_OSPEED_VERYLOW(n) (0U << ((n)*2U)) -#define PIN_OSPEED_LOW(n) (1U << ((n)*2U)) -#define PIN_OSPEED_MEDIUM(n) (2U << ((n)*2U)) -#define PIN_OSPEED_HIGH(n) (3U << ((n)*2U)) -#define PIN_PUPDR_FLOATING(n) (0U << ((n)*2U)) -#define PIN_PUPDR_PULLUP(n) (1U << ((n)*2U)) -#define PIN_PUPDR_PULLDOWN(n) (2U << ((n)*2U)) -#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) - -/* - * GPIOA setup: - * - * PA0 - BUTTON (input floating). - * PA1 - PIN1 (input pullup). - * PA2 - PIN2 (input pullup). - * PA3 - PIN3 (input pullup). - * PA4 - CS43L22_LRCK (alternate 6). - * PA5 - L3GD20_SCL (alternate 5). - * PA6 - L3GD20_SD0 (alternate 5). - * PA7 - L3GD20_SDI (alternate 5). - * PA8 - PIN8 (input pullup). - * PA9 - VBUS_FS (input floating). - * PA10 - OTG_FS_ID (alternate 10). - * PA11 - OTG_FS_DM (alternate 10). - * PA12 - OTG_FS_DP (alternate 10). - * PA13 - SWDIO (alternate 0). - * PA14 - SWCLK (alternate 0). - * PA15 - PIN15 (input pullup). - */ -#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | PIN_MODE_INPUT(GPIOA_PIN1) | PIN_MODE_INPUT(GPIOA_PIN2) | PIN_MODE_INPUT(GPIOA_PIN3) | PIN_MODE_ALTERNATE(GPIOA_CS43L22_LRCK) | PIN_MODE_ALTERNATE(GPIOA_L3GD20_SCL) | PIN_MODE_ALTERNATE(GPIOA_L3GD20_SD0) | PIN_MODE_ALTERNATE(GPIOA_L3GD20_SDI) | PIN_MODE_INPUT(GPIOA_PIN8) | PIN_MODE_INPUT(GPIOA_VBUS_FS) | PIN_MODE_ALTERNATE(GPIOA_OTG_FS_ID) | PIN_MODE_ALTERNATE(GPIOA_OTG_FS_DM) | PIN_MODE_ALTERNATE(GPIOA_OTG_FS_DP) | PIN_MODE_ALTERNATE(GPIOA_SWDIO) | PIN_MODE_ALTERNATE(GPIOA_SWCLK) | PIN_MODE_INPUT(GPIOA_PIN15)) -#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | PIN_OTYPE_PUSHPULL(GPIOA_CS43L22_LRCK) | PIN_OTYPE_PUSHPULL(GPIOA_L3GD20_SCL) | PIN_OTYPE_PUSHPULL(GPIOA_L3GD20_SD0) | PIN_OTYPE_PUSHPULL(GPIOA_L3GD20_SDI) | PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | PIN_OTYPE_PUSHPULL(GPIOA_VBUS_FS) | PIN_OTYPE_PUSHPULL(GPIOA_OTG_FS_ID) | PIN_OTYPE_PUSHPULL(GPIOA_OTG_FS_DM) | PIN_OTYPE_PUSHPULL(GPIOA_OTG_FS_DP) | PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) -#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_HIGH(GPIOA_BUTTON) | PIN_OSPEED_HIGH(GPIOA_PIN1) | PIN_OSPEED_HIGH(GPIOA_PIN2) | PIN_OSPEED_HIGH(GPIOA_PIN3) | PIN_OSPEED_HIGH(GPIOA_CS43L22_LRCK) | PIN_OSPEED_HIGH(GPIOA_L3GD20_SCL) | PIN_OSPEED_HIGH(GPIOA_L3GD20_SD0) | PIN_OSPEED_HIGH(GPIOA_L3GD20_SDI) | PIN_OSPEED_HIGH(GPIOA_PIN8) | PIN_OSPEED_HIGH(GPIOA_VBUS_FS) | PIN_OSPEED_HIGH(GPIOA_OTG_FS_ID) | PIN_OSPEED_HIGH(GPIOA_OTG_FS_DM) | PIN_OSPEED_HIGH(GPIOA_OTG_FS_DP) | PIN_OSPEED_HIGH(GPIOA_SWDIO) | PIN_OSPEED_HIGH(GPIOA_SWCLK) | PIN_OSPEED_HIGH(GPIOA_PIN15)) -#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | PIN_PUPDR_PULLUP(GPIOA_PIN1) | PIN_PUPDR_PULLUP(GPIOA_PIN2) | PIN_PUPDR_PULLUP(GPIOA_PIN3) | PIN_PUPDR_FLOATING(GPIOA_CS43L22_LRCK) | PIN_PUPDR_FLOATING(GPIOA_L3GD20_SCL) | PIN_PUPDR_PULLUP(GPIOA_L3GD20_SD0) | PIN_PUPDR_PULLUP(GPIOA_L3GD20_SDI) | PIN_PUPDR_PULLUP(GPIOA_PIN8) | PIN_PUPDR_FLOATING(GPIOA_VBUS_FS) | PIN_PUPDR_FLOATING(GPIOA_OTG_FS_ID) | PIN_PUPDR_FLOATING(GPIOA_OTG_FS_DM) | PIN_PUPDR_FLOATING(GPIOA_OTG_FS_DP) | PIN_PUPDR_FLOATING(GPIOA_SWDIO) | PIN_PUPDR_FLOATING(GPIOA_SWCLK) | PIN_PUPDR_PULLUP(GPIOA_PIN15)) -#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | PIN_ODR_HIGH(GPIOA_PIN1) | PIN_ODR_HIGH(GPIOA_PIN2) | PIN_ODR_HIGH(GPIOA_PIN3) | PIN_ODR_HIGH(GPIOA_CS43L22_LRCK) | PIN_ODR_HIGH(GPIOA_L3GD20_SCL) | PIN_ODR_HIGH(GPIOA_L3GD20_SD0) | PIN_ODR_HIGH(GPIOA_L3GD20_SDI) | PIN_ODR_HIGH(GPIOA_PIN8) | PIN_ODR_HIGH(GPIOA_VBUS_FS) | PIN_ODR_HIGH(GPIOA_OTG_FS_ID) | PIN_ODR_HIGH(GPIOA_OTG_FS_DM) | PIN_ODR_HIGH(GPIOA_OTG_FS_DP) | PIN_ODR_HIGH(GPIOA_SWDIO) | PIN_ODR_HIGH(GPIOA_SWCLK) | PIN_ODR_HIGH(GPIOA_PIN15)) -#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | PIN_AFIO_AF(GPIOA_PIN1, 0U) | PIN_AFIO_AF(GPIOA_PIN2, 0U) | PIN_AFIO_AF(GPIOA_PIN3, 0U) | PIN_AFIO_AF(GPIOA_CS43L22_LRCK, 6U) | PIN_AFIO_AF(GPIOA_L3GD20_SCL, 5U) | PIN_AFIO_AF(GPIOA_L3GD20_SD0, 5U) | PIN_AFIO_AF(GPIOA_L3GD20_SDI, 5U)) -#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | PIN_AFIO_AF(GPIOA_VBUS_FS, 0U) | PIN_AFIO_AF(GPIOA_OTG_FS_ID, 10U) | PIN_AFIO_AF(GPIOA_OTG_FS_DM, 10U) | PIN_AFIO_AF(GPIOA_OTG_FS_DP, 10U) | PIN_AFIO_AF(GPIOA_SWDIO, 0U) | PIN_AFIO_AF(GPIOA_SWCLK, 0U) | PIN_AFIO_AF(GPIOA_PIN15, 0U)) - -/* - * GPIOB setup: - * - * PB0 - PIN0 (input pullup). - * PB1 - PIN1 (input pullup). - * PB2 - PIN2 (input pullup). - * PB3 - SWO (alternate 0). - * PB4 - PIN4 (input pullup). - * PB5 - PIN5 (input pullup). - * PB6 - LSM303DLHC_SCL (alternate 4). - * PB7 - PIN7 (input pullup). - * PB8 - PIN8 (input pullup). - * PB9 - LSM303DLHC_SDA (alternate 4). - * PB10 - MP45DT02_CLK_IN (alternate 5). - * PB11 - PIN11 (input pullup). - * PB12 - PIN12 (input pullup). - * PB13 - PIN13 (input pullup). - * PB14 - PIN14 (input pullup). - * PB15 - PIN15 (input pullup). - */ -#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | PIN_MODE_INPUT(GPIOB_PIN1) | PIN_MODE_INPUT(GPIOB_PIN2) | PIN_MODE_ALTERNATE(GPIOB_SWO) | PIN_MODE_INPUT(GPIOB_PIN4) | PIN_MODE_INPUT(GPIOB_PIN5) | PIN_MODE_ALTERNATE(GPIOB_LSM303DLHC_SCL) | PIN_MODE_INPUT(GPIOB_PIN7) | PIN_MODE_INPUT(GPIOB_PIN8) | PIN_MODE_ALTERNATE(GPIOB_LSM303DLHC_SDA) | PIN_MODE_ALTERNATE(GPIOB_MP45DT02_CLK_IN) | PIN_MODE_INPUT(GPIOB_PIN11) | PIN_MODE_INPUT(GPIOB_PIN12) | PIN_MODE_INPUT(GPIOB_PIN13) | PIN_MODE_INPUT(GPIOB_PIN14) | PIN_MODE_INPUT(GPIOB_PIN15)) -#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | PIN_OTYPE_PUSHPULL(GPIOB_SWO) | PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | PIN_OTYPE_PUSHPULL(GPIOB_LSM303DLHC_SCL) | PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | PIN_OTYPE_PUSHPULL(GPIOB_LSM303DLHC_SDA) | PIN_OTYPE_PUSHPULL(GPIOB_MP45DT02_CLK_IN) | PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) -#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_HIGH(GPIOB_PIN0) | PIN_OSPEED_HIGH(GPIOB_PIN1) | PIN_OSPEED_HIGH(GPIOB_PIN2) | PIN_OSPEED_HIGH(GPIOB_SWO) | PIN_OSPEED_HIGH(GPIOB_PIN4) | PIN_OSPEED_HIGH(GPIOB_PIN5) | PIN_OSPEED_HIGH(GPIOB_LSM303DLHC_SCL) | PIN_OSPEED_HIGH(GPIOB_PIN7) | PIN_OSPEED_HIGH(GPIOB_PIN8) | PIN_OSPEED_HIGH(GPIOB_LSM303DLHC_SDA) | PIN_OSPEED_HIGH(GPIOB_MP45DT02_CLK_IN) | PIN_OSPEED_HIGH(GPIOB_PIN11) | PIN_OSPEED_HIGH(GPIOB_PIN12) | PIN_OSPEED_HIGH(GPIOB_PIN13) | PIN_OSPEED_HIGH(GPIOB_PIN14) | PIN_OSPEED_HIGH(GPIOB_PIN15)) -#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | PIN_PUPDR_PULLUP(GPIOB_PIN1) | PIN_PUPDR_PULLUP(GPIOB_PIN2) | PIN_PUPDR_PULLUP(GPIOB_SWO) | PIN_PUPDR_PULLUP(GPIOB_PIN4) | PIN_PUPDR_PULLUP(GPIOB_PIN5) | PIN_PUPDR_FLOATING(GPIOB_LSM303DLHC_SCL) | PIN_PUPDR_PULLUP(GPIOB_PIN7) | PIN_PUPDR_PULLUP(GPIOB_PIN8) | PIN_PUPDR_FLOATING(GPIOB_LSM303DLHC_SDA) | PIN_PUPDR_FLOATING(GPIOB_MP45DT02_CLK_IN) | PIN_PUPDR_PULLUP(GPIOB_PIN11) | PIN_PUPDR_PULLUP(GPIOB_PIN12) | PIN_PUPDR_PULLUP(GPIOB_PIN13) | PIN_PUPDR_PULLUP(GPIOB_PIN14) | PIN_PUPDR_PULLUP(GPIOB_PIN15)) -#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | PIN_ODR_HIGH(GPIOB_PIN1) | PIN_ODR_HIGH(GPIOB_PIN2) | PIN_ODR_HIGH(GPIOB_SWO) | PIN_ODR_HIGH(GPIOB_PIN4) | PIN_ODR_HIGH(GPIOB_PIN5) | PIN_ODR_HIGH(GPIOB_LSM303DLHC_SCL) | PIN_ODR_HIGH(GPIOB_PIN7) | PIN_ODR_HIGH(GPIOB_PIN8) | PIN_ODR_HIGH(GPIOB_LSM303DLHC_SDA) | PIN_ODR_HIGH(GPIOB_MP45DT02_CLK_IN) | PIN_ODR_HIGH(GPIOB_PIN11) | PIN_ODR_HIGH(GPIOB_PIN12) | PIN_ODR_HIGH(GPIOB_PIN13) | PIN_ODR_HIGH(GPIOB_PIN14) | PIN_ODR_HIGH(GPIOB_PIN15)) -#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | PIN_AFIO_AF(GPIOB_PIN1, 0U) | PIN_AFIO_AF(GPIOB_PIN2, 0U) | PIN_AFIO_AF(GPIOB_SWO, 0U) | PIN_AFIO_AF(GPIOB_PIN4, 0U) | PIN_AFIO_AF(GPIOB_PIN5, 0U) | PIN_AFIO_AF(GPIOB_LSM303DLHC_SCL, 4U) | PIN_AFIO_AF(GPIOB_PIN7, 0U)) -#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | PIN_AFIO_AF(GPIOB_LSM303DLHC_SDA, 4U) | PIN_AFIO_AF(GPIOB_MP45DT02_CLK_IN, 5U) | PIN_AFIO_AF(GPIOB_PIN11, 0U) | PIN_AFIO_AF(GPIOB_PIN12, 0U) | PIN_AFIO_AF(GPIOB_PIN13, 0U) | PIN_AFIO_AF(GPIOB_PIN14, 0U) | PIN_AFIO_AF(GPIOB_PIN15, 0U)) - -/* - * GPIOC setup: - * - * PC0 - OTG_FS_POWER_ON (output pushpull maximum). - * PC1 - PIN1 (input pullup). - * PC2 - PIN2 (input pullup). - * PC3 - CS43L22_AIN4x MP45DT02_PDM_OUT(alternate 5). - * PC4 - PIN4 (input pullup). - * PC5 - PIN5 (input pullup). - * PC6 - PIN6 (input pullup). - * PC7 - CS43L22_MCLK (alternate 6). - * PC8 - PIN8 (input pullup). - * PC9 - PIN9 (input pullup). - * PC10 - CS43L22_SCLK (alternate 6). - * PC11 - PIN11 (input pullup). - * PC12 - CS43L22_SDIN (alternate 6). - * PC13 - PIN13 (input pullup). - * PC14 - OSC32_IN (input floating). - * PC15 - OSC32_OUT (input floating). - */ -#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_OTG_FS_POWER_ON) | PIN_MODE_INPUT(GPIOC_PIN1) | PIN_MODE_INPUT(GPIOC_PIN2) | PIN_MODE_ALTERNATE(GPIOC_CS43L22_AIN4x) | PIN_MODE_INPUT(GPIOC_PIN4) | PIN_MODE_INPUT(GPIOC_PIN5) | PIN_MODE_INPUT(GPIOC_PIN6) | PIN_MODE_ALTERNATE(GPIOC_CS43L22_MCLK) | PIN_MODE_INPUT(GPIOC_PIN8) | PIN_MODE_INPUT(GPIOC_PIN9) | PIN_MODE_ALTERNATE(GPIOC_CS43L22_SCLK) | PIN_MODE_INPUT(GPIOC_PIN11) | PIN_MODE_ALTERNATE(GPIOC_CS43L22_SDIN) | PIN_MODE_INPUT(GPIOC_PIN13) | PIN_MODE_INPUT(GPIOC_OSC32_IN) | PIN_MODE_INPUT(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_OTG_FS_POWER_ON) | PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | PIN_OTYPE_PUSHPULL(GPIOC_CS43L22_AIN4x) | PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | PIN_OTYPE_PUSHPULL(GPIOC_CS43L22_MCLK) | PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | PIN_OTYPE_PUSHPULL(GPIOC_CS43L22_SCLK) | PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | PIN_OTYPE_PUSHPULL(GPIOC_CS43L22_SDIN) | PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_OTG_FS_POWER_ON) | PIN_OSPEED_HIGH(GPIOC_PIN1) | PIN_OSPEED_HIGH(GPIOC_PIN2) | PIN_OSPEED_HIGH(GPIOC_CS43L22_AIN4x) | PIN_OSPEED_HIGH(GPIOC_PIN4) | PIN_OSPEED_HIGH(GPIOC_PIN5) | PIN_OSPEED_HIGH(GPIOC_PIN6) | PIN_OSPEED_HIGH(GPIOC_CS43L22_MCLK) | PIN_OSPEED_HIGH(GPIOC_PIN8) | PIN_OSPEED_HIGH(GPIOC_PIN9) | PIN_OSPEED_HIGH(GPIOC_CS43L22_SCLK) | PIN_OSPEED_HIGH(GPIOC_PIN11) | PIN_OSPEED_HIGH(GPIOC_CS43L22_SDIN) | PIN_OSPEED_HIGH(GPIOC_PIN13) | PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_OTG_FS_POWER_ON) | PIN_PUPDR_PULLUP(GPIOC_PIN1) | PIN_PUPDR_PULLUP(GPIOC_PIN2) | PIN_PUPDR_FLOATING(GPIOC_CS43L22_AIN4x) | PIN_PUPDR_PULLUP(GPIOC_PIN4) | PIN_PUPDR_PULLUP(GPIOC_PIN5) | PIN_PUPDR_PULLUP(GPIOC_PIN6) | PIN_PUPDR_PULLUP(GPIOC_CS43L22_MCLK) | PIN_PUPDR_PULLUP(GPIOC_PIN8) | PIN_PUPDR_PULLUP(GPIOC_PIN9) | PIN_PUPDR_PULLUP(GPIOC_CS43L22_SCLK) | PIN_PUPDR_PULLUP(GPIOC_PIN11) | PIN_PUPDR_PULLUP(GPIOC_CS43L22_SDIN) | PIN_PUPDR_PULLUP(GPIOC_PIN13) | PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_OTG_FS_POWER_ON) | PIN_ODR_HIGH(GPIOC_PIN1) | PIN_ODR_HIGH(GPIOC_PIN2) | PIN_ODR_HIGH(GPIOC_CS43L22_AIN4x) | PIN_ODR_HIGH(GPIOC_PIN4) | PIN_ODR_HIGH(GPIOC_PIN5) | PIN_ODR_HIGH(GPIOC_PIN6) | PIN_ODR_HIGH(GPIOC_CS43L22_MCLK) | PIN_ODR_HIGH(GPIOC_PIN8) | PIN_ODR_HIGH(GPIOC_PIN9) | PIN_ODR_HIGH(GPIOC_CS43L22_SCLK) | PIN_ODR_HIGH(GPIOC_PIN11) | PIN_ODR_HIGH(GPIOC_CS43L22_SDIN) | PIN_ODR_HIGH(GPIOC_PIN13) | PIN_ODR_HIGH(GPIOC_OSC32_IN) | PIN_ODR_HIGH(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_OTG_FS_POWER_ON, 0U) | PIN_AFIO_AF(GPIOC_PIN1, 0U) | PIN_AFIO_AF(GPIOC_PIN2, 0U) | PIN_AFIO_AF(GPIOC_CS43L22_AIN4x, 5U) | PIN_AFIO_AF(GPIOC_PIN4, 0U) | PIN_AFIO_AF(GPIOC_PIN5, 0U) | PIN_AFIO_AF(GPIOC_PIN6, 0U) | PIN_AFIO_AF(GPIOC_CS43L22_MCLK, 6U)) -#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0U) | PIN_AFIO_AF(GPIOC_PIN9, 0U) | PIN_AFIO_AF(GPIOC_CS43L22_SCLK, 6U) | PIN_AFIO_AF(GPIOC_PIN11, 0U) | PIN_AFIO_AF(GPIOC_CS43L22_SDIN, 6U) | PIN_AFIO_AF(GPIOC_PIN13, 0U) | PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) - -/* - * GPIOD setup: - * - * PD0 - PIN0 (input pullup). - * PD1 - PIN1 (input pullup). - * PD2 - PIN2 (input pullup). - * PD3 - PIN3 (input pullup). - * PD4 - CS43L22_RESET (output pushpull maximum). - * PD5 - OverCurrent (input floating). - * PD6 - PIN6 (input pullup). - * PD7 - PIN7 (input pullup). - * PD8 - PIN8 (input pullup). - * PD9 - PIN9 (input pullup). - * PD10 - PIN10 (input pullup). - * PD11 - PIN11 (input pullup). - * PD12 - LED4 (output pushpull maximum). - * PD13 - LED3 (output pushpull maximum). - * PD14 - LED5 (output pushpull maximum). - * PD15 - LED6 (output pushpull maximum). - */ -#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | PIN_MODE_INPUT(GPIOD_PIN1) | PIN_MODE_INPUT(GPIOD_PIN2) | PIN_MODE_INPUT(GPIOD_PIN3) | PIN_MODE_OUTPUT(GPIOD_CS43L22_RESET) | PIN_MODE_INPUT(GPIOD_OverCurrent) | PIN_MODE_INPUT(GPIOD_PIN6) | PIN_MODE_INPUT(GPIOD_PIN7) | PIN_MODE_INPUT(GPIOD_PIN8) | PIN_MODE_INPUT(GPIOD_PIN9) | PIN_MODE_INPUT(GPIOD_PIN10) | PIN_MODE_INPUT(GPIOD_PIN11) | PIN_MODE_OUTPUT(GPIOD_LED4) | PIN_MODE_OUTPUT(GPIOD_LED3) | PIN_MODE_OUTPUT(GPIOD_LED5) | PIN_MODE_OUTPUT(GPIOD_LED6)) -#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | PIN_OTYPE_PUSHPULL(GPIOD_CS43L22_RESET) | PIN_OTYPE_PUSHPULL(GPIOD_OverCurrent) | PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | PIN_OTYPE_PUSHPULL(GPIOD_LED4) | PIN_OTYPE_PUSHPULL(GPIOD_LED3) | PIN_OTYPE_PUSHPULL(GPIOD_LED5) | PIN_OTYPE_PUSHPULL(GPIOD_LED6)) -#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_HIGH(GPIOD_PIN0) | PIN_OSPEED_HIGH(GPIOD_PIN1) | PIN_OSPEED_HIGH(GPIOD_PIN2) | PIN_OSPEED_HIGH(GPIOD_PIN3) | PIN_OSPEED_HIGH(GPIOD_CS43L22_RESET) | PIN_OSPEED_HIGH(GPIOD_OverCurrent) | PIN_OSPEED_HIGH(GPIOD_PIN6) | PIN_OSPEED_HIGH(GPIOD_PIN7) | PIN_OSPEED_HIGH(GPIOD_PIN8) | PIN_OSPEED_HIGH(GPIOD_PIN9) | PIN_OSPEED_HIGH(GPIOD_PIN10) | PIN_OSPEED_HIGH(GPIOD_PIN11) | PIN_OSPEED_HIGH(GPIOD_LED4) | PIN_OSPEED_HIGH(GPIOD_LED3) | PIN_OSPEED_HIGH(GPIOD_LED5) | PIN_OSPEED_HIGH(GPIOD_LED6)) -#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | PIN_PUPDR_PULLUP(GPIOD_PIN1) | PIN_PUPDR_PULLUP(GPIOD_PIN2) | PIN_PUPDR_PULLUP(GPIOD_PIN3) | PIN_PUPDR_PULLUP(GPIOD_CS43L22_RESET) | PIN_PUPDR_FLOATING(GPIOD_OverCurrent) | PIN_PUPDR_PULLUP(GPIOD_PIN6) | PIN_PUPDR_PULLUP(GPIOD_PIN7) | PIN_PUPDR_PULLUP(GPIOD_PIN8) | PIN_PUPDR_PULLUP(GPIOD_PIN9) | PIN_PUPDR_PULLUP(GPIOD_PIN10) | PIN_PUPDR_PULLUP(GPIOD_PIN11) | PIN_PUPDR_FLOATING(GPIOD_LED4) | PIN_PUPDR_FLOATING(GPIOD_LED3) | PIN_PUPDR_FLOATING(GPIOD_LED5) | PIN_PUPDR_FLOATING(GPIOD_LED6)) -#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | PIN_ODR_HIGH(GPIOD_PIN1) | PIN_ODR_HIGH(GPIOD_PIN2) | PIN_ODR_HIGH(GPIOD_PIN3) | PIN_ODR_HIGH(GPIOD_CS43L22_RESET) | PIN_ODR_HIGH(GPIOD_OverCurrent) | PIN_ODR_HIGH(GPIOD_PIN6) | PIN_ODR_HIGH(GPIOD_PIN7) | PIN_ODR_HIGH(GPIOD_PIN8) | PIN_ODR_HIGH(GPIOD_PIN9) | PIN_ODR_HIGH(GPIOD_PIN10) | PIN_ODR_HIGH(GPIOD_PIN11) | PIN_ODR_LOW(GPIOD_LED4) | PIN_ODR_LOW(GPIOD_LED3) | PIN_ODR_LOW(GPIOD_LED5) | PIN_ODR_LOW(GPIOD_LED6)) -#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | PIN_AFIO_AF(GPIOD_PIN1, 0U) | PIN_AFIO_AF(GPIOD_PIN2, 0U) | PIN_AFIO_AF(GPIOD_PIN3, 0U) | PIN_AFIO_AF(GPIOD_CS43L22_RESET, 0U) | PIN_AFIO_AF(GPIOD_OverCurrent, 0U) | PIN_AFIO_AF(GPIOD_PIN6, 0U) | PIN_AFIO_AF(GPIOD_PIN7, 0U)) -#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | PIN_AFIO_AF(GPIOD_PIN9, 0U) | PIN_AFIO_AF(GPIOD_PIN10, 0U) | PIN_AFIO_AF(GPIOD_PIN11, 0U) | PIN_AFIO_AF(GPIOD_LED4, 0U) | PIN_AFIO_AF(GPIOD_LED3, 0U) | PIN_AFIO_AF(GPIOD_LED5, 0U) | PIN_AFIO_AF(GPIOD_LED6, 0U)) - -/* - * GPIOE setup: - * - * PE0 - L3GD20_INT1 (input pullup). - * PE1 - L3GD20_INT2 (input pullup). - * PE2 - LSM303DLHC_DRDY (input floating). - * PE3 - L3GD20_CS (output pushpull maximum). - * PE4 - LSM303DLHC_INT1 (output pushpull maximum). - * PE5 - LSM303DLHC_INT2 (output pushpull maximum). - * PE6 - PIN6 (input pullup). - * PE7 - PIN7 (input pullup). - * PE8 - PIN8 (input pullup). - * PE9 - PIN9 (input pullup). - * PE10 - PIN10 (input pullup). - * PE11 - PIN11 (input pullup). - * PE12 - PIN12 (input pullup). - * PE13 - PIN13 (input pullup). - * PE14 - PIN14 (input pullup). - * PE15 - PIN15 (input pullup). - */ -#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_L3GD20_INT1) | PIN_MODE_INPUT(GPIOE_L3GD20_INT2) | PIN_MODE_INPUT(GPIOE_LSM303DLHC_DRDY) | PIN_MODE_OUTPUT(GPIOE_L3GD20_CS) | PIN_MODE_OUTPUT(GPIOE_LSM303DLHC_INT1) | PIN_MODE_OUTPUT(GPIOE_LSM303DLHC_INT2) | PIN_MODE_INPUT(GPIOE_PIN6) | PIN_MODE_INPUT(GPIOE_PIN7) | PIN_MODE_INPUT(GPIOE_PIN8) | PIN_MODE_INPUT(GPIOE_PIN9) | PIN_MODE_INPUT(GPIOE_PIN10) | PIN_MODE_INPUT(GPIOE_PIN11) | PIN_MODE_INPUT(GPIOE_PIN12) | PIN_MODE_INPUT(GPIOE_PIN13) | PIN_MODE_INPUT(GPIOE_PIN14) | PIN_MODE_INPUT(GPIOE_PIN15)) -#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_L3GD20_INT1) | PIN_OTYPE_PUSHPULL(GPIOE_L3GD20_INT2) | PIN_OTYPE_PUSHPULL(GPIOE_LSM303DLHC_DRDY) | PIN_OTYPE_PUSHPULL(GPIOE_L3GD20_CS) | PIN_OTYPE_PUSHPULL(GPIOE_LSM303DLHC_INT1) | PIN_OTYPE_PUSHPULL(GPIOE_LSM303DLHC_INT2) | PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) -#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_HIGH(GPIOE_L3GD20_INT1) | PIN_OSPEED_HIGH(GPIOE_L3GD20_INT2) | PIN_OSPEED_HIGH(GPIOE_LSM303DLHC_DRDY) | PIN_OSPEED_HIGH(GPIOE_L3GD20_CS) | PIN_OSPEED_HIGH(GPIOE_LSM303DLHC_INT1) | PIN_OSPEED_HIGH(GPIOE_LSM303DLHC_INT2) | PIN_OSPEED_HIGH(GPIOE_PIN6) | PIN_OSPEED_HIGH(GPIOE_PIN7) | PIN_OSPEED_HIGH(GPIOE_PIN8) | PIN_OSPEED_HIGH(GPIOE_PIN9) | PIN_OSPEED_HIGH(GPIOE_PIN10) | PIN_OSPEED_HIGH(GPIOE_PIN11) | PIN_OSPEED_HIGH(GPIOE_PIN12) | PIN_OSPEED_HIGH(GPIOE_PIN13) | PIN_OSPEED_HIGH(GPIOE_PIN14) | PIN_OSPEED_HIGH(GPIOE_PIN15)) -#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_L3GD20_INT1) | PIN_PUPDR_PULLUP(GPIOE_L3GD20_INT2) | PIN_PUPDR_FLOATING(GPIOE_LSM303DLHC_DRDY) | PIN_PUPDR_PULLUP(GPIOE_L3GD20_CS) | PIN_PUPDR_PULLUP(GPIOE_LSM303DLHC_INT1) | PIN_PUPDR_PULLUP(GPIOE_LSM303DLHC_INT2) | PIN_PUPDR_PULLUP(GPIOE_PIN6) | PIN_PUPDR_PULLUP(GPIOE_PIN7) | PIN_PUPDR_PULLUP(GPIOE_PIN8) | PIN_PUPDR_PULLUP(GPIOE_PIN9) | PIN_PUPDR_PULLUP(GPIOE_PIN10) | PIN_PUPDR_PULLUP(GPIOE_PIN11) | PIN_PUPDR_PULLUP(GPIOE_PIN12) | PIN_PUPDR_PULLUP(GPIOE_PIN13) | PIN_PUPDR_PULLUP(GPIOE_PIN14) | PIN_PUPDR_PULLUP(GPIOE_PIN15)) -#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_L3GD20_INT1) | PIN_ODR_HIGH(GPIOE_L3GD20_INT2) | PIN_ODR_HIGH(GPIOE_LSM303DLHC_DRDY) | PIN_ODR_HIGH(GPIOE_L3GD20_CS) | PIN_ODR_HIGH(GPIOE_LSM303DLHC_INT1) | PIN_ODR_HIGH(GPIOE_LSM303DLHC_INT2) | PIN_ODR_HIGH(GPIOE_PIN6) | PIN_ODR_HIGH(GPIOE_PIN7) | PIN_ODR_HIGH(GPIOE_PIN8) | PIN_ODR_HIGH(GPIOE_PIN9) | PIN_ODR_HIGH(GPIOE_PIN10) | PIN_ODR_HIGH(GPIOE_PIN11) | PIN_ODR_HIGH(GPIOE_PIN12) | PIN_ODR_HIGH(GPIOE_PIN13) | PIN_ODR_HIGH(GPIOE_PIN14) | PIN_ODR_HIGH(GPIOE_PIN15)) -#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_L3GD20_INT1, 0U) | PIN_AFIO_AF(GPIOE_L3GD20_INT2, 0U) | PIN_AFIO_AF(GPIOE_LSM303DLHC_DRDY, 0U) | PIN_AFIO_AF(GPIOE_L3GD20_CS, 0U) | PIN_AFIO_AF(GPIOE_LSM303DLHC_INT1, 0U) | PIN_AFIO_AF(GPIOE_LSM303DLHC_INT2, 0U) | PIN_AFIO_AF(GPIOE_PIN6, 0U) | PIN_AFIO_AF(GPIOE_PIN7, 0U)) -#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | PIN_AFIO_AF(GPIOE_PIN9, 0U) | PIN_AFIO_AF(GPIOE_PIN10, 0U) | PIN_AFIO_AF(GPIOE_PIN11, 0U) | PIN_AFIO_AF(GPIOE_PIN12, 0U) | PIN_AFIO_AF(GPIOE_PIN13, 0U) | PIN_AFIO_AF(GPIOE_PIN14, 0U) | PIN_AFIO_AF(GPIOE_PIN15, 0U)) - -/* - * GPIOF setup: - * - * PF0 - PIN0 (input pullup). - * PF1 - PIN1 (input pullup). - * PF2 - PIN2 (input pullup). - * PF3 - PIN3 (input pullup). - * PF4 - PIN4 (input pullup). - * PF5 - PIN5 (input pullup). - * PF6 - PIN6 (input pullup). - * PF7 - PIN7 (input pullup). - * PF8 - PIN8 (input pullup). - * PF9 - PIN9 (input pullup). - * PF10 - PIN10 (input pullup). - * PF11 - PIN11 (input pullup). - * PF12 - PIN12 (input pullup). - * PF13 - PIN13 (input pullup). - * PF14 - PIN14 (input pullup). - * PF15 - PIN15 (input pullup). - */ -#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_PIN0) | PIN_MODE_INPUT(GPIOF_PIN1) | PIN_MODE_INPUT(GPIOF_PIN2) | PIN_MODE_INPUT(GPIOF_PIN3) | PIN_MODE_INPUT(GPIOF_PIN4) | PIN_MODE_INPUT(GPIOF_PIN5) | PIN_MODE_INPUT(GPIOF_PIN6) | PIN_MODE_INPUT(GPIOF_PIN7) | PIN_MODE_INPUT(GPIOF_PIN8) | PIN_MODE_INPUT(GPIOF_PIN9) | PIN_MODE_INPUT(GPIOF_PIN10) | PIN_MODE_INPUT(GPIOF_PIN11) | PIN_MODE_INPUT(GPIOF_PIN12) | PIN_MODE_INPUT(GPIOF_PIN13) | PIN_MODE_INPUT(GPIOF_PIN14) | PIN_MODE_INPUT(GPIOF_PIN15)) -#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_PIN0) | PIN_OTYPE_PUSHPULL(GPIOF_PIN1) | PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) -#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_PIN0) | PIN_OSPEED_HIGH(GPIOF_PIN1) | PIN_OSPEED_HIGH(GPIOF_PIN2) | PIN_OSPEED_HIGH(GPIOF_PIN3) | PIN_OSPEED_HIGH(GPIOF_PIN4) | PIN_OSPEED_HIGH(GPIOF_PIN5) | PIN_OSPEED_HIGH(GPIOF_PIN6) | PIN_OSPEED_HIGH(GPIOF_PIN7) | PIN_OSPEED_HIGH(GPIOF_PIN8) | PIN_OSPEED_HIGH(GPIOF_PIN9) | PIN_OSPEED_HIGH(GPIOF_PIN10) | PIN_OSPEED_HIGH(GPIOF_PIN11) | PIN_OSPEED_HIGH(GPIOF_PIN12) | PIN_OSPEED_HIGH(GPIOF_PIN13) | PIN_OSPEED_HIGH(GPIOF_PIN14) | PIN_OSPEED_HIGH(GPIOF_PIN15)) -#define VAL_GPIOF_PUPDR (PIN_PUPDR_PULLUP(GPIOF_PIN0) | PIN_PUPDR_PULLUP(GPIOF_PIN1) | PIN_PUPDR_PULLUP(GPIOF_PIN2) | PIN_PUPDR_PULLUP(GPIOF_PIN3) | PIN_PUPDR_PULLUP(GPIOF_PIN4) | PIN_PUPDR_PULLUP(GPIOF_PIN5) | PIN_PUPDR_PULLUP(GPIOF_PIN6) | PIN_PUPDR_PULLUP(GPIOF_PIN7) | PIN_PUPDR_PULLUP(GPIOF_PIN8) | PIN_PUPDR_PULLUP(GPIOF_PIN9) | PIN_PUPDR_PULLUP(GPIOF_PIN10) | PIN_PUPDR_PULLUP(GPIOF_PIN11) | PIN_PUPDR_PULLUP(GPIOF_PIN12) | PIN_PUPDR_PULLUP(GPIOF_PIN13) | PIN_PUPDR_PULLUP(GPIOF_PIN14) | PIN_PUPDR_PULLUP(GPIOF_PIN15)) -#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_PIN0) | PIN_ODR_HIGH(GPIOF_PIN1) | PIN_ODR_HIGH(GPIOF_PIN2) | PIN_ODR_HIGH(GPIOF_PIN3) | PIN_ODR_HIGH(GPIOF_PIN4) | PIN_ODR_HIGH(GPIOF_PIN5) | PIN_ODR_HIGH(GPIOF_PIN6) | PIN_ODR_HIGH(GPIOF_PIN7) | PIN_ODR_HIGH(GPIOF_PIN8) | PIN_ODR_HIGH(GPIOF_PIN9) | PIN_ODR_HIGH(GPIOF_PIN10) | PIN_ODR_HIGH(GPIOF_PIN11) | PIN_ODR_HIGH(GPIOF_PIN12) | PIN_ODR_HIGH(GPIOF_PIN13) | PIN_ODR_HIGH(GPIOF_PIN14) | PIN_ODR_HIGH(GPIOF_PIN15)) -#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_PIN0, 0U) | PIN_AFIO_AF(GPIOF_PIN1, 0U) | PIN_AFIO_AF(GPIOF_PIN2, 0U) | PIN_AFIO_AF(GPIOF_PIN3, 0U) | PIN_AFIO_AF(GPIOF_PIN4, 0U) | PIN_AFIO_AF(GPIOF_PIN5, 0U) | PIN_AFIO_AF(GPIOF_PIN6, 0U) | PIN_AFIO_AF(GPIOF_PIN7, 0U)) -#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | PIN_AFIO_AF(GPIOF_PIN9, 0U) | PIN_AFIO_AF(GPIOF_PIN10, 0U) | PIN_AFIO_AF(GPIOF_PIN11, 0U) | PIN_AFIO_AF(GPIOF_PIN12, 0U) | PIN_AFIO_AF(GPIOF_PIN13, 0U) | PIN_AFIO_AF(GPIOF_PIN14, 0U) | PIN_AFIO_AF(GPIOF_PIN15, 0U)) - -/* - * GPIOG setup: - * - * PG0 - PIN0 (input pullup). - * PG1 - PIN1 (input pullup). - * PG2 - PIN2 (input pullup). - * PG3 - PIN3 (input pullup). - * PG4 - PIN4 (input pullup). - * PG5 - PIN5 (input pullup). - * PG6 - PIN6 (input pullup). - * PG7 - PIN7 (input pullup). - * PG8 - PIN8 (input pullup). - * PG9 - PIN9 (input pullup). - * PG10 - PIN10 (input pullup). - * PG11 - PIN11 (input pullup). - * PG12 - PIN12 (input pullup). - * PG13 - PIN13 (input pullup). - * PG14 - PIN14 (input pullup). - * PG15 - PIN15 (input pullup). - */ -#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | PIN_MODE_INPUT(GPIOG_PIN1) | PIN_MODE_INPUT(GPIOG_PIN2) | PIN_MODE_INPUT(GPIOG_PIN3) | PIN_MODE_INPUT(GPIOG_PIN4) | PIN_MODE_INPUT(GPIOG_PIN5) | PIN_MODE_INPUT(GPIOG_PIN6) | PIN_MODE_INPUT(GPIOG_PIN7) | PIN_MODE_INPUT(GPIOG_PIN8) | PIN_MODE_INPUT(GPIOG_PIN9) | PIN_MODE_INPUT(GPIOG_PIN10) | PIN_MODE_INPUT(GPIOG_PIN11) | PIN_MODE_INPUT(GPIOG_PIN12) | PIN_MODE_INPUT(GPIOG_PIN13) | PIN_MODE_INPUT(GPIOG_PIN14) | PIN_MODE_INPUT(GPIOG_PIN15)) -#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) -#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_HIGH(GPIOG_PIN0) | PIN_OSPEED_HIGH(GPIOG_PIN1) | PIN_OSPEED_HIGH(GPIOG_PIN2) | PIN_OSPEED_HIGH(GPIOG_PIN3) | PIN_OSPEED_HIGH(GPIOG_PIN4) | PIN_OSPEED_HIGH(GPIOG_PIN5) | PIN_OSPEED_HIGH(GPIOG_PIN6) | PIN_OSPEED_HIGH(GPIOG_PIN7) | PIN_OSPEED_HIGH(GPIOG_PIN8) | PIN_OSPEED_HIGH(GPIOG_PIN9) | PIN_OSPEED_HIGH(GPIOG_PIN10) | PIN_OSPEED_HIGH(GPIOG_PIN11) | PIN_OSPEED_HIGH(GPIOG_PIN12) | PIN_OSPEED_HIGH(GPIOG_PIN13) | PIN_OSPEED_HIGH(GPIOG_PIN14) | PIN_OSPEED_HIGH(GPIOG_PIN15)) -#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | PIN_PUPDR_PULLUP(GPIOG_PIN1) | PIN_PUPDR_PULLUP(GPIOG_PIN2) | PIN_PUPDR_PULLUP(GPIOG_PIN3) | PIN_PUPDR_PULLUP(GPIOG_PIN4) | PIN_PUPDR_PULLUP(GPIOG_PIN5) | PIN_PUPDR_PULLUP(GPIOG_PIN6) | PIN_PUPDR_PULLUP(GPIOG_PIN7) | PIN_PUPDR_PULLUP(GPIOG_PIN8) | PIN_PUPDR_PULLUP(GPIOG_PIN9) | PIN_PUPDR_PULLUP(GPIOG_PIN10) | PIN_PUPDR_PULLUP(GPIOG_PIN11) | PIN_PUPDR_PULLUP(GPIOG_PIN12) | PIN_PUPDR_PULLUP(GPIOG_PIN13) | PIN_PUPDR_PULLUP(GPIOG_PIN14) | PIN_PUPDR_PULLUP(GPIOG_PIN15)) -#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | PIN_ODR_HIGH(GPIOG_PIN1) | PIN_ODR_HIGH(GPIOG_PIN2) | PIN_ODR_HIGH(GPIOG_PIN3) | PIN_ODR_HIGH(GPIOG_PIN4) | PIN_ODR_HIGH(GPIOG_PIN5) | PIN_ODR_HIGH(GPIOG_PIN6) | PIN_ODR_HIGH(GPIOG_PIN7) | PIN_ODR_HIGH(GPIOG_PIN8) | PIN_ODR_HIGH(GPIOG_PIN9) | PIN_ODR_HIGH(GPIOG_PIN10) | PIN_ODR_HIGH(GPIOG_PIN11) | PIN_ODR_HIGH(GPIOG_PIN12) | PIN_ODR_HIGH(GPIOG_PIN13) | PIN_ODR_HIGH(GPIOG_PIN14) | PIN_ODR_HIGH(GPIOG_PIN15)) -#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0U) | PIN_AFIO_AF(GPIOG_PIN1, 0U) | PIN_AFIO_AF(GPIOG_PIN2, 0U) | PIN_AFIO_AF(GPIOG_PIN3, 0U) | PIN_AFIO_AF(GPIOG_PIN4, 0U) | PIN_AFIO_AF(GPIOG_PIN5, 0U) | PIN_AFIO_AF(GPIOG_PIN6, 0U) | PIN_AFIO_AF(GPIOG_PIN7, 0U)) -#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0U) | PIN_AFIO_AF(GPIOG_PIN9, 0U) | PIN_AFIO_AF(GPIOG_PIN10, 0U) | PIN_AFIO_AF(GPIOG_PIN11, 0U) | PIN_AFIO_AF(GPIOG_PIN12, 0U) | PIN_AFIO_AF(GPIOG_PIN13, 0U) | PIN_AFIO_AF(GPIOG_PIN14, 0U) | PIN_AFIO_AF(GPIOG_PIN15, 0U)) - -/* - * GPIOH setup: - * - * PH0 - OSC_IN (input floating). - * PH1 - OSC_OUT (input floating). - * PH2 - PIN2 (input pullup). - * PH3 - PIN3 (input pullup). - * PH4 - PIN4 (input pullup). - * PH5 - PIN5 (input pullup). - * PH6 - PIN6 (input pullup). - * PH7 - PIN7 (input pullup). - * PH8 - PIN8 (input pullup). - * PH9 - PIN9 (input pullup). - * PH10 - PIN10 (input pullup). - * PH11 - PIN11 (input pullup). - * PH12 - PIN12 (input pullup). - * PH13 - PIN13 (input pullup). - * PH14 - PIN14 (input pullup). - * PH15 - PIN15 (input pullup). - */ -#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_OSC_IN) | PIN_MODE_INPUT(GPIOH_OSC_OUT) | PIN_MODE_INPUT(GPIOH_PIN2) | PIN_MODE_INPUT(GPIOH_PIN3) | PIN_MODE_INPUT(GPIOH_PIN4) | PIN_MODE_INPUT(GPIOH_PIN5) | PIN_MODE_INPUT(GPIOH_PIN6) | PIN_MODE_INPUT(GPIOH_PIN7) | PIN_MODE_INPUT(GPIOH_PIN8) | PIN_MODE_INPUT(GPIOH_PIN9) | PIN_MODE_INPUT(GPIOH_PIN10) | PIN_MODE_INPUT(GPIOH_PIN11) | PIN_MODE_INPUT(GPIOH_PIN12) | PIN_MODE_INPUT(GPIOH_PIN13) | PIN_MODE_INPUT(GPIOH_PIN14) | PIN_MODE_INPUT(GPIOH_PIN15)) -#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_OSC_IN) | PIN_OTYPE_PUSHPULL(GPIOH_OSC_OUT) | PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) -#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_HIGH(GPIOH_OSC_IN) | PIN_OSPEED_HIGH(GPIOH_OSC_OUT) | PIN_OSPEED_HIGH(GPIOH_PIN2) | PIN_OSPEED_HIGH(GPIOH_PIN3) | PIN_OSPEED_HIGH(GPIOH_PIN4) | PIN_OSPEED_HIGH(GPIOH_PIN5) | PIN_OSPEED_HIGH(GPIOH_PIN6) | PIN_OSPEED_HIGH(GPIOH_PIN7) | PIN_OSPEED_HIGH(GPIOH_PIN8) | PIN_OSPEED_HIGH(GPIOH_PIN9) | PIN_OSPEED_HIGH(GPIOH_PIN10) | PIN_OSPEED_HIGH(GPIOH_PIN11) | PIN_OSPEED_HIGH(GPIOH_PIN12) | PIN_OSPEED_HIGH(GPIOH_PIN13) | PIN_OSPEED_HIGH(GPIOH_PIN14) | PIN_OSPEED_HIGH(GPIOH_PIN15)) -#define VAL_GPIOH_PUPDR (PIN_PUPDR_FLOATING(GPIOH_OSC_IN) | PIN_PUPDR_FLOATING(GPIOH_OSC_OUT) | PIN_PUPDR_PULLUP(GPIOH_PIN2) | PIN_PUPDR_PULLUP(GPIOH_PIN3) | PIN_PUPDR_PULLUP(GPIOH_PIN4) | PIN_PUPDR_PULLUP(GPIOH_PIN5) | PIN_PUPDR_PULLUP(GPIOH_PIN6) | PIN_PUPDR_PULLUP(GPIOH_PIN7) | PIN_PUPDR_PULLUP(GPIOH_PIN8) | PIN_PUPDR_PULLUP(GPIOH_PIN9) | PIN_PUPDR_PULLUP(GPIOH_PIN10) | PIN_PUPDR_PULLUP(GPIOH_PIN11) | PIN_PUPDR_PULLUP(GPIOH_PIN12) | PIN_PUPDR_PULLUP(GPIOH_PIN13) | PIN_PUPDR_PULLUP(GPIOH_PIN14) | PIN_PUPDR_PULLUP(GPIOH_PIN15)) -#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_OSC_IN) | PIN_ODR_HIGH(GPIOH_OSC_OUT) | PIN_ODR_HIGH(GPIOH_PIN2) | PIN_ODR_HIGH(GPIOH_PIN3) | PIN_ODR_HIGH(GPIOH_PIN4) | PIN_ODR_HIGH(GPIOH_PIN5) | PIN_ODR_HIGH(GPIOH_PIN6) | PIN_ODR_HIGH(GPIOH_PIN7) | PIN_ODR_HIGH(GPIOH_PIN8) | PIN_ODR_HIGH(GPIOH_PIN9) | PIN_ODR_HIGH(GPIOH_PIN10) | PIN_ODR_HIGH(GPIOH_PIN11) | PIN_ODR_HIGH(GPIOH_PIN12) | PIN_ODR_HIGH(GPIOH_PIN13) | PIN_ODR_HIGH(GPIOH_PIN14) | PIN_ODR_HIGH(GPIOH_PIN15)) -#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_OSC_IN, 0U) | PIN_AFIO_AF(GPIOH_OSC_OUT, 0U) | PIN_AFIO_AF(GPIOH_PIN2, 0U) | PIN_AFIO_AF(GPIOH_PIN3, 0U) | PIN_AFIO_AF(GPIOH_PIN4, 0U) | PIN_AFIO_AF(GPIOH_PIN5, 0U) | PIN_AFIO_AF(GPIOH_PIN6, 0U) | PIN_AFIO_AF(GPIOH_PIN7, 0U)) -#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0U) | PIN_AFIO_AF(GPIOH_PIN9, 0U) | PIN_AFIO_AF(GPIOH_PIN10, 0U) | PIN_AFIO_AF(GPIOH_PIN11, 0U) | PIN_AFIO_AF(GPIOH_PIN12, 0U) | PIN_AFIO_AF(GPIOH_PIN13, 0U) | PIN_AFIO_AF(GPIOH_PIN14, 0U) | PIN_AFIO_AF(GPIOH_PIN15, 0U)) - -/* - * GPIOI setup: - * - * PI0 - PIN0 (input pullup). - * PI1 - PIN1 (input pullup). - * PI2 - PIN2 (input pullup). - * PI3 - PIN3 (input pullup). - * PI4 - PIN4 (input pullup). - * PI5 - PIN5 (input pullup). - * PI6 - PIN6 (input pullup). - * PI7 - PIN7 (input pullup). - * PI8 - PIN8 (input pullup). - * PI9 - PIN9 (input pullup). - * PI10 - PIN10 (input pullup). - * PI11 - PIN11 (input pullup). - * PI12 - PIN12 (input pullup). - * PI13 - PIN13 (input pullup). - * PI14 - PIN14 (input pullup). - * PI15 - PIN15 (input pullup). - */ -#define VAL_GPIOI_MODER (PIN_MODE_INPUT(GPIOI_PIN0) | PIN_MODE_INPUT(GPIOI_PIN1) | PIN_MODE_INPUT(GPIOI_PIN2) | PIN_MODE_INPUT(GPIOI_PIN3) | PIN_MODE_INPUT(GPIOI_PIN4) | PIN_MODE_INPUT(GPIOI_PIN5) | PIN_MODE_INPUT(GPIOI_PIN6) | PIN_MODE_INPUT(GPIOI_PIN7) | PIN_MODE_INPUT(GPIOI_PIN8) | PIN_MODE_INPUT(GPIOI_PIN9) | PIN_MODE_INPUT(GPIOI_PIN10) | PIN_MODE_INPUT(GPIOI_PIN11) | PIN_MODE_INPUT(GPIOI_PIN12) | PIN_MODE_INPUT(GPIOI_PIN13) | PIN_MODE_INPUT(GPIOI_PIN14) | PIN_MODE_INPUT(GPIOI_PIN15)) -#define VAL_GPIOI_OTYPER (PIN_OTYPE_PUSHPULL(GPIOI_PIN0) | PIN_OTYPE_PUSHPULL(GPIOI_PIN1) | PIN_OTYPE_PUSHPULL(GPIOI_PIN2) | PIN_OTYPE_PUSHPULL(GPIOI_PIN3) | PIN_OTYPE_PUSHPULL(GPIOI_PIN4) | PIN_OTYPE_PUSHPULL(GPIOI_PIN5) | PIN_OTYPE_PUSHPULL(GPIOI_PIN6) | PIN_OTYPE_PUSHPULL(GPIOI_PIN7) | PIN_OTYPE_PUSHPULL(GPIOI_PIN8) | PIN_OTYPE_PUSHPULL(GPIOI_PIN9) | PIN_OTYPE_PUSHPULL(GPIOI_PIN10) | PIN_OTYPE_PUSHPULL(GPIOI_PIN11) | PIN_OTYPE_PUSHPULL(GPIOI_PIN12) | PIN_OTYPE_PUSHPULL(GPIOI_PIN13) | PIN_OTYPE_PUSHPULL(GPIOI_PIN14) | PIN_OTYPE_PUSHPULL(GPIOI_PIN15)) -#define VAL_GPIOI_OSPEEDR (PIN_OSPEED_HIGH(GPIOI_PIN0) | PIN_OSPEED_HIGH(GPIOI_PIN1) | PIN_OSPEED_HIGH(GPIOI_PIN2) | PIN_OSPEED_HIGH(GPIOI_PIN3) | PIN_OSPEED_HIGH(GPIOI_PIN4) | PIN_OSPEED_HIGH(GPIOI_PIN5) | PIN_OSPEED_HIGH(GPIOI_PIN6) | PIN_OSPEED_HIGH(GPIOI_PIN7) | PIN_OSPEED_HIGH(GPIOI_PIN8) | PIN_OSPEED_HIGH(GPIOI_PIN9) | PIN_OSPEED_HIGH(GPIOI_PIN10) | PIN_OSPEED_HIGH(GPIOI_PIN11) | PIN_OSPEED_HIGH(GPIOI_PIN12) | PIN_OSPEED_HIGH(GPIOI_PIN13) | PIN_OSPEED_HIGH(GPIOI_PIN14) | PIN_OSPEED_HIGH(GPIOI_PIN15)) -#define VAL_GPIOI_PUPDR (PIN_PUPDR_PULLUP(GPIOI_PIN0) | PIN_PUPDR_PULLUP(GPIOI_PIN1) | PIN_PUPDR_PULLUP(GPIOI_PIN2) | PIN_PUPDR_PULLUP(GPIOI_PIN3) | PIN_PUPDR_PULLUP(GPIOI_PIN4) | PIN_PUPDR_PULLUP(GPIOI_PIN5) | PIN_PUPDR_PULLUP(GPIOI_PIN6) | PIN_PUPDR_PULLUP(GPIOI_PIN7) | PIN_PUPDR_PULLUP(GPIOI_PIN8) | PIN_PUPDR_PULLUP(GPIOI_PIN9) | PIN_PUPDR_PULLUP(GPIOI_PIN10) | PIN_PUPDR_PULLUP(GPIOI_PIN11) | PIN_PUPDR_PULLUP(GPIOI_PIN12) | PIN_PUPDR_PULLUP(GPIOI_PIN13) | PIN_PUPDR_PULLUP(GPIOI_PIN14) | PIN_PUPDR_PULLUP(GPIOI_PIN15)) -#define VAL_GPIOI_ODR (PIN_ODR_HIGH(GPIOI_PIN0) | PIN_ODR_HIGH(GPIOI_PIN1) | PIN_ODR_HIGH(GPIOI_PIN2) | PIN_ODR_HIGH(GPIOI_PIN3) | PIN_ODR_HIGH(GPIOI_PIN4) | PIN_ODR_HIGH(GPIOI_PIN5) | PIN_ODR_HIGH(GPIOI_PIN6) | PIN_ODR_HIGH(GPIOI_PIN7) | PIN_ODR_HIGH(GPIOI_PIN8) | PIN_ODR_HIGH(GPIOI_PIN9) | PIN_ODR_HIGH(GPIOI_PIN10) | PIN_ODR_HIGH(GPIOI_PIN11) | PIN_ODR_HIGH(GPIOI_PIN12) | PIN_ODR_HIGH(GPIOI_PIN13) | PIN_ODR_HIGH(GPIOI_PIN14) | PIN_ODR_HIGH(GPIOI_PIN15)) -#define VAL_GPIOI_AFRL (PIN_AFIO_AF(GPIOI_PIN0, 0U) | PIN_AFIO_AF(GPIOI_PIN1, 0U) | PIN_AFIO_AF(GPIOI_PIN2, 0U) | PIN_AFIO_AF(GPIOI_PIN3, 0U) | PIN_AFIO_AF(GPIOI_PIN4, 0U) | PIN_AFIO_AF(GPIOI_PIN5, 0U) | PIN_AFIO_AF(GPIOI_PIN6, 0U) | PIN_AFIO_AF(GPIOI_PIN7, 0U)) -#define VAL_GPIOI_AFRH (PIN_AFIO_AF(GPIOI_PIN8, 0U) | PIN_AFIO_AF(GPIOI_PIN9, 0U) | PIN_AFIO_AF(GPIOI_PIN10, 0U) | PIN_AFIO_AF(GPIOI_PIN11, 0U) | PIN_AFIO_AF(GPIOI_PIN12, 0U) | PIN_AFIO_AF(GPIOI_PIN13, 0U) | PIN_AFIO_AF(GPIOI_PIN14, 0U) | PIN_AFIO_AF(GPIOI_PIN15, 0U)) - -/*===========================================================================*/ -/* External declarations. */ -/*===========================================================================*/ - -#if !defined(_FROM_ASM_) -# ifdef __cplusplus -extern "C" { -# endif -void boardInit(void); -# ifdef __cplusplus -} -# endif -#endif /* _FROM_ASM_ */ - -#endif /* BOARD_H */ diff --git a/drivers/boards/BLACKPILL_STM32_F401/cfg/board.chcfg b/drivers/boards/BLACKPILL_STM32_F401/cfg/board.chcfg deleted file mode 100644 index 7559ceb938..0000000000 --- a/drivers/boards/BLACKPILL_STM32_F401/cfg/board.chcfg +++ /dev/null @@ -1,1193 +0,0 @@ - - - - - resources/gencfg/processors/boards/stm32f4xx/templates - .. - 5.0.x - - STMicroelectronics STM32F401C-Discovery - ST_STM32F401C_DISCOVERY - - STM32F401xC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/drivers/boards/BLACKPILL_STM32_F401/cfg/board.fmpp b/drivers/boards/BLACKPILL_STM32_F401/cfg/board.fmpp deleted file mode 100644 index 41754c1414..0000000000 --- a/drivers/boards/BLACKPILL_STM32_F401/cfg/board.fmpp +++ /dev/null @@ -1,15 +0,0 @@ -sourceRoot: ../../../../../tools/ftl/processors/boards/stm32f4xx/templates -outputRoot: .. -dataRoot: . - -freemarkerLinks: { - lib: ../../../../../tools/ftl/libs -} - -data : { - doc1:xml ( - board.chcfg - { - } - ) -} diff --git a/drivers/boards/BLACKPILL_STM32_F411/board.c b/drivers/boards/BLACKPILL_STM32_F411/board.c deleted file mode 100644 index 330e06c8aa..0000000000 --- a/drivers/boards/BLACKPILL_STM32_F411/board.c +++ /dev/null @@ -1,250 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * This file has been automatically generated using ChibiStudio board - * generator plugin. Do not edit manually. - */ - -#include "hal.h" -#include "stm32_gpio.h" - -/*===========================================================================*/ -/* Driver local definitions. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver exported variables. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver local variables and types. */ -/*===========================================================================*/ - -/** - * @brief Type of STM32 GPIO port setup. - */ -typedef struct { - uint32_t moder; - uint32_t otyper; - uint32_t ospeedr; - uint32_t pupdr; - uint32_t odr; - uint32_t afrl; - uint32_t afrh; -} gpio_setup_t; - -/** - * @brief Type of STM32 GPIO initialization data. - */ -typedef struct { -#if STM32_HAS_GPIOA || defined(__DOXYGEN__) - gpio_setup_t PAData; -#endif -#if STM32_HAS_GPIOB || defined(__DOXYGEN__) - gpio_setup_t PBData; -#endif -#if STM32_HAS_GPIOC || defined(__DOXYGEN__) - gpio_setup_t PCData; -#endif -#if STM32_HAS_GPIOD || defined(__DOXYGEN__) - gpio_setup_t PDData; -#endif -#if STM32_HAS_GPIOE || defined(__DOXYGEN__) - gpio_setup_t PEData; -#endif -#if STM32_HAS_GPIOF || defined(__DOXYGEN__) - gpio_setup_t PFData; -#endif -#if STM32_HAS_GPIOG || defined(__DOXYGEN__) - gpio_setup_t PGData; -#endif -#if STM32_HAS_GPIOH || defined(__DOXYGEN__) - gpio_setup_t PHData; -#endif -#if STM32_HAS_GPIOI || defined(__DOXYGEN__) - gpio_setup_t PIData; -#endif -#if STM32_HAS_GPIOJ || defined(__DOXYGEN__) - gpio_setup_t PJData; -#endif -#if STM32_HAS_GPIOK || defined(__DOXYGEN__) - gpio_setup_t PKData; -#endif -} gpio_config_t; - -/** - * @brief STM32 GPIO static initialization data. - */ -static const gpio_config_t gpio_default_config = { -#if STM32_HAS_GPIOA - {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, -#endif -#if STM32_HAS_GPIOB - {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, -#endif -#if STM32_HAS_GPIOC - {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, -#endif -#if STM32_HAS_GPIOD - {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, -#endif -#if STM32_HAS_GPIOE - {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, -#endif -#if STM32_HAS_GPIOF - {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, -#endif -#if STM32_HAS_GPIOG - {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, -#endif -#if STM32_HAS_GPIOH - {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, -#endif -#if STM32_HAS_GPIOI - {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}, -#endif -#if STM32_HAS_GPIOJ - {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, -#endif -#if STM32_HAS_GPIOK - {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} -#endif -}; - -/*===========================================================================*/ -/* Driver local functions. */ -/*===========================================================================*/ - -static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { - gpiop->OTYPER = config->otyper; - gpiop->OSPEEDR = config->ospeedr; - gpiop->PUPDR = config->pupdr; - gpiop->ODR = config->odr; - gpiop->AFRL = config->afrl; - gpiop->AFRH = config->afrh; - gpiop->MODER = config->moder; -} - -static void stm32_gpio_init(void) { - /* Enabling GPIO-related clocks, the mask comes from the - registry header file.*/ - rccResetAHB1(STM32_GPIO_EN_MASK); - rccEnableAHB1(STM32_GPIO_EN_MASK, true); - - /* Initializing all the defined GPIO ports.*/ -#if STM32_HAS_GPIOA - gpio_init(GPIOA, &gpio_default_config.PAData); -#endif -#if STM32_HAS_GPIOB - gpio_init(GPIOB, &gpio_default_config.PBData); -#endif -#if STM32_HAS_GPIOC - gpio_init(GPIOC, &gpio_default_config.PCData); -#endif -#if STM32_HAS_GPIOD - gpio_init(GPIOD, &gpio_default_config.PDData); -#endif -#if STM32_HAS_GPIOE - gpio_init(GPIOE, &gpio_default_config.PEData); -#endif -#if STM32_HAS_GPIOF - gpio_init(GPIOF, &gpio_default_config.PFData); -#endif -#if STM32_HAS_GPIOG - gpio_init(GPIOG, &gpio_default_config.PGData); -#endif -#if STM32_HAS_GPIOH - gpio_init(GPIOH, &gpio_default_config.PHData); -#endif -#if STM32_HAS_GPIOI - gpio_init(GPIOI, &gpio_default_config.PIData); -#endif -#if STM32_HAS_GPIOJ - gpio_init(GPIOJ, &gpio_default_config.PJData); -#endif -#if STM32_HAS_GPIOK - gpio_init(GPIOK, &gpio_default_config.PKData); -#endif -} - -/*===========================================================================*/ -/* Driver interrupt handlers. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver exported functions. */ -/*===========================================================================*/ - -__attribute__((weak)) void enter_bootloader_mode_if_requested(void) {} - -/** - * @brief Early initialization code. - * @details GPIO ports and system clocks are initialized before everything - * else. - */ -void __early_init(void) { - enter_bootloader_mode_if_requested(); - - stm32_gpio_init(); - stm32_clock_init(); -} - -#if HAL_USE_SDC || defined(__DOXYGEN__) -/** - * @brief SDC card detection. - */ -bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { - (void)sdcp; - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief SDC card write protection detection. - */ -bool sdc_lld_is_write_protected(SDCDriver *sdcp) { - (void)sdcp; - /* TODO: Fill the implementation.*/ - return false; -} -#endif /* HAL_USE_SDC */ - -#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) -/** - * @brief MMC_SPI card detection. - */ -bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { - (void)mmcp; - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief MMC_SPI card write protection detection. - */ -bool mmc_lld_is_write_protected(MMCDriver *mmcp) { - (void)mmcp; - /* TODO: Fill the implementation.*/ - return false; -} -#endif - -/** - * @brief Board-specific initialization code. - * @todo Add your board-specific code, if any. - */ -void boardInit(void) {} diff --git a/drivers/boards/BLACKPILL_STM32_F411/board.h b/drivers/boards/BLACKPILL_STM32_F411/board.h deleted file mode 100644 index c0613b4a71..0000000000 --- a/drivers/boards/BLACKPILL_STM32_F411/board.h +++ /dev/null @@ -1,583 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * This file has been automatically generated using ChibiStudio board - * generator plugin. Do not edit manually. - */ - -#ifndef BOARD_H -#define BOARD_H - -/*===========================================================================*/ -/* Driver constants. */ -/*===========================================================================*/ - -/* - * Setup for STM32F411CEU6 black pill board. - */ - -/* - * Board identifier. - */ -#define BOARD_BLACKPILL_STM32_F411 -#define BOARD_NAME "STM32F411CEU6 blackpill" - -/* - * Allow Board to boot USB without extra A9 hardware/software config - */ -#define BOARD_OTG_NOVBUSSENS 1 - -/* - * Board oscillators-related settings. - */ -#if !defined(STM32_LSECLK) -# define STM32_LSECLK 32768U -#endif - -#if !defined(STM32_HSECLK) -# define STM32_HSECLK 25000000U -#endif - -//#define STM32_HSE_BYPASS - -/* - * Board voltages. - * Required for performance limits calculation. - */ -#define STM32_VDD 300U - -/* - * MCU type as defined in the ST header. - */ -#define STM32F411xE - -/* - * IO pins assignments. - */ -#define GPIOA_ARD_A0 0U -#define GPIOA_ADC1_IN0 0U -#define GPIOA_ARD_A1 1U -#define GPIOA_ADC1_IN1 1U -#define GPIOA_ARD_D1 2U -#define GPIOA_USART2_TX 2U -#define GPIOA_ARD_D0 3U -#define GPIOA_USART2_RX 3U -#define GPIOA_ARD_A2 4U -#define GPIOA_ADC1_IN4 4U -#define GPIOA_LED_GREEN 5U -#define GPIOA_ARD_D13 5U -#define GPIOA_ARD_D12 6U -#define GPIOA_ARD_D11 7U -#define GPIOA_ARD_D7 8U -#define GPIOA_ARD_D8 9U -#define GPIOA_ARD_D2 10U -#define GPIOA_OTG_FS_DM 11U -#define GPIOA_OTG_FS_DP 12U -#define GPIOA_SWDIO 13U -#define GPIOA_SWCLK 14U -#define GPIOA_PIN15 15U - -#define GPIOB_ARD_A3 0U -#define GPIOB_ADC1_IN8 0U -#define GPIOB_PIN1 1U -#define GPIOB_PIN2 2U -#define GPIOB_SWO 3U -#define GPIOB_ARD_D3 3U -#define GPIOB_ARD_D5 4U -#define GPIOB_ARD_D4 5U -#define GPIOB_ARD_D10 6U -#define GPIOB_PIN7 7U -#define GPIOB_ARD_D15 8U -#define GPIOB_ARD_D14 9U -#define GPIOB_ARD_D6 10U -#define GPIOB_PIN11 11U -#define GPIOB_PIN12 12U -#define GPIOB_PIN13 13U -#define GPIOB_PIN14 14U -#define GPIOB_PIN15 15U - -#define GPIOC_ARD_A5 0U -#define GPIOC_ADC1_IN10 0U -#define GPIOC_ARD_A4 1U -#define GPIOC_ADC1_IN11 1U -#define GPIOC_PIN2 2U -#define GPIOC_PIN3 3U -#define GPIOC_PIN4 4U -#define GPIOC_PIN5 5U -#define GPIOC_PIN6 6U -#define GPIOC_ARD_D9 7U -#define GPIOC_PIN8 8U -#define GPIOC_PIN9 9U -#define GPIOC_PIN10 10U -#define GPIOC_PIN11 11U -#define GPIOC_PIN12 12U -#define GPIOC_BUTTON 13U -#define GPIOC_OSC32_IN 14U -#define GPIOC_OSC32_OUT 15U - -#define GPIOD_PIN0 0U -#define GPIOD_PIN1 1U -#define GPIOD_PIN2 2U -#define GPIOD_PIN3 3U -#define GPIOD_PIN4 4U -#define GPIOD_PIN5 5U -#define GPIOD_PIN6 6U -#define GPIOD_PIN7 7U -#define GPIOD_PIN8 8U -#define GPIOD_PIN9 9U -#define GPIOD_PIN10 10U -#define GPIOD_PIN11 11U -#define GPIOD_PIN12 12U -#define GPIOD_PIN13 13U -#define GPIOD_PIN14 14U -#define GPIOD_PIN15 15U - -#define GPIOE_PIN0 0U -#define GPIOE_PIN1 1U -#define GPIOE_PIN2 2U -#define GPIOE_PIN3 3U -#define GPIOE_PIN4 4U -#define GPIOE_PIN5 5U -#define GPIOE_PIN6 6U -#define GPIOE_PIN7 7U -#define GPIOE_PIN8 8U -#define GPIOE_PIN9 9U -#define GPIOE_PIN10 10U -#define GPIOE_PIN11 11U -#define GPIOE_PIN12 12U -#define GPIOE_PIN13 13U -#define GPIOE_PIN14 14U -#define GPIOE_PIN15 15U - -#define GPIOF_PIN0 0U -#define GPIOF_PIN1 1U -#define GPIOF_PIN2 2U -#define GPIOF_PIN3 3U -#define GPIOF_PIN4 4U -#define GPIOF_PIN5 5U -#define GPIOF_PIN6 6U -#define GPIOF_PIN7 7U -#define GPIOF_PIN8 8U -#define GPIOF_PIN9 9U -#define GPIOF_PIN10 10U -#define GPIOF_PIN11 11U -#define GPIOF_PIN12 12U -#define GPIOF_PIN13 13U -#define GPIOF_PIN14 14U -#define GPIOF_PIN15 15U - -#define GPIOG_PIN0 0U -#define GPIOG_PIN1 1U -#define GPIOG_PIN2 2U -#define GPIOG_PIN3 3U -#define GPIOG_PIN4 4U -#define GPIOG_PIN5 5U -#define GPIOG_PIN6 6U -#define GPIOG_PIN7 7U -#define GPIOG_PIN8 8U -#define GPIOG_PIN9 9U -#define GPIOG_PIN10 10U -#define GPIOG_PIN11 11U -#define GPIOG_PIN12 12U -#define GPIOG_PIN13 13U -#define GPIOG_PIN14 14U -#define GPIOG_PIN15 15U - -#define GPIOH_OSC_IN 0U -#define GPIOH_OSC_OUT 1U -#define GPIOH_PIN2 2U -#define GPIOH_PIN3 3U -#define GPIOH_PIN4 4U -#define GPIOH_PIN5 5U -#define GPIOH_PIN6 6U -#define GPIOH_PIN7 7U -#define GPIOH_PIN8 8U -#define GPIOH_PIN9 9U -#define GPIOH_PIN10 10U -#define GPIOH_PIN11 11U -#define GPIOH_PIN12 12U -#define GPIOH_PIN13 13U -#define GPIOH_PIN14 14U -#define GPIOH_PIN15 15U - -#define GPIOI_PIN0 0U -#define GPIOI_PIN1 1U -#define GPIOI_PIN2 2U -#define GPIOI_PIN3 3U -#define GPIOI_PIN4 4U -#define GPIOI_PIN5 5U -#define GPIOI_PIN6 6U -#define GPIOI_PIN7 7U -#define GPIOI_PIN8 8U -#define GPIOI_PIN9 9U -#define GPIOI_PIN10 10U -#define GPIOI_PIN11 11U -#define GPIOI_PIN12 12U -#define GPIOI_PIN13 13U -#define GPIOI_PIN14 14U -#define GPIOI_PIN15 15U - -/* - * IO lines assignments. - */ -#define LINE_ARD_A0 PAL_LINE(GPIOA, 0U) -#define LINE_ADC1_IN0 PAL_LINE(GPIOA, 0U) -#define LINE_ARD_A1 PAL_LINE(GPIOA, 1U) -#define LINE_ADC1_IN1 PAL_LINE(GPIOA, 1U) -#define LINE_ARD_D1 PAL_LINE(GPIOA, 2U) -#define LINE_USART2_TX PAL_LINE(GPIOA, 2U) -#define LINE_ARD_D0 PAL_LINE(GPIOA, 3U) -#define LINE_USART2_RX PAL_LINE(GPIOA, 3U) -#define LINE_ARD_A2 PAL_LINE(GPIOA, 4U) -#define LINE_ADC1_IN4 PAL_LINE(GPIOA, 4U) -#define LINE_LED_GREEN PAL_LINE(GPIOA, 5U) -#define LINE_ARD_D13 PAL_LINE(GPIOA, 5U) -#define LINE_ARD_D12 PAL_LINE(GPIOA, 6U) -#define LINE_ARD_D11 PAL_LINE(GPIOA, 7U) -#define LINE_ARD_D7 PAL_LINE(GPIOA, 8U) -#define LINE_ARD_D8 PAL_LINE(GPIOA, 9U) -#define LINE_ARD_D2 PAL_LINE(GPIOA, 10U) -#define LINE_OTG_FS_DM PAL_LINE(GPIOA, 11U) -#define LINE_OTG_FS_DP PAL_LINE(GPIOA, 12U) -#define LINE_SWDIO PAL_LINE(GPIOA, 13U) -#define LINE_SWCLK PAL_LINE(GPIOA, 14U) -#define LINE_ARD_A3 PAL_LINE(GPIOB, 0U) -#define LINE_ADC1_IN8 PAL_LINE(GPIOB, 0U) -#define LINE_SWO PAL_LINE(GPIOB, 3U) -#define LINE_ARD_D3 PAL_LINE(GPIOB, 3U) -#define LINE_ARD_D5 PAL_LINE(GPIOB, 4U) -#define LINE_ARD_D4 PAL_LINE(GPIOB, 5U) -#define LINE_ARD_D10 PAL_LINE(GPIOB, 6U) -#define LINE_ARD_D15 PAL_LINE(GPIOB, 8U) -#define LINE_ARD_D14 PAL_LINE(GPIOB, 9U) -#define LINE_ARD_D6 PAL_LINE(GPIOB, 10U) -#define LINE_ARD_A5 PAL_LINE(GPIOC, 0U) -#define LINE_ADC1_IN10 PAL_LINE(GPIOC, 0U) -#define LINE_ARD_A4 PAL_LINE(GPIOC, 1U) -#define LINE_ADC1_IN11 PAL_LINE(GPIOC, 1U) -#define LINE_ARD_D9 PAL_LINE(GPIOC, 7U) -#define LINE_BUTTON PAL_LINE(GPIOC, 13U) -#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) -#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) -#define LINE_OSC_IN PAL_LINE(GPIOH, 0U) -#define LINE_OSC_OUT PAL_LINE(GPIOH, 1U) - -/*===========================================================================*/ -/* Driver pre-compile time settings. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Derived constants and error checks. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver data structures and types. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver macros. */ -/*===========================================================================*/ - -/* - * I/O ports initial setup, this configuration is established soon after reset - * in the initialization code. - * Please refer to the STM32 Reference Manual for details. - */ -#define PIN_MODE_INPUT(n) (0U << ((n)*2U)) -#define PIN_MODE_OUTPUT(n) (1U << ((n)*2U)) -#define PIN_MODE_ALTERNATE(n) (2U << ((n)*2U)) -#define PIN_MODE_ANALOG(n) (3U << ((n)*2U)) -#define PIN_ODR_LOW(n) (0U << (n)) -#define PIN_ODR_HIGH(n) (1U << (n)) -#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) -#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) -#define PIN_OSPEED_VERYLOW(n) (0U << ((n)*2U)) -#define PIN_OSPEED_LOW(n) (1U << ((n)*2U)) -#define PIN_OSPEED_MEDIUM(n) (2U << ((n)*2U)) -#define PIN_OSPEED_HIGH(n) (3U << ((n)*2U)) -#define PIN_PUPDR_FLOATING(n) (0U << ((n)*2U)) -#define PIN_PUPDR_PULLUP(n) (1U << ((n)*2U)) -#define PIN_PUPDR_PULLDOWN(n) (2U << ((n)*2U)) -#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) - -/* - * GPIOA setup: - * - * PA0 - ARD_A0 ADC1_IN0 (input pullup). - * PA1 - ARD_A1 ADC1_IN1 (input pullup). - * PA2 - ARD_D1 USART2_TX (alternate 7). - * PA3 - ARD_D0 USART2_RX (alternate 7). - * PA4 - ARD_A2 ADC1_IN4 (input pullup). - * PA5 - LED_GREEN ARD_D13 (output pushpull high). - * PA6 - ARD_D12 (input pullup). - * PA7 - ARD_D11 (input pullup). - * PA8 - ARD_D7 (input pullup). - * PA9 - ARD_D8 (input pullup). - * PA10 - ARD_D2 (input pullup). - * PA11 - OTG_FS_DM (alternate 10). - * PA12 - OTG_FS_DP (alternate 10). - * PA13 - SWDIO (alternate 0). - * PA14 - SWCLK (alternate 0). - * PA15 - PIN15 (input pullup). - */ -#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_ARD_A0) | PIN_MODE_INPUT(GPIOA_ARD_A1) | PIN_MODE_ALTERNATE(GPIOA_ARD_D1) | PIN_MODE_ALTERNATE(GPIOA_ARD_D0) | PIN_MODE_INPUT(GPIOA_ARD_A2) | PIN_MODE_OUTPUT(GPIOA_LED_GREEN) | PIN_MODE_INPUT(GPIOA_ARD_D12) | PIN_MODE_INPUT(GPIOA_ARD_D11) | PIN_MODE_INPUT(GPIOA_ARD_D7) | PIN_MODE_INPUT(GPIOA_ARD_D8) | PIN_MODE_INPUT(GPIOA_ARD_D2) | PIN_MODE_ALTERNATE(GPIOA_OTG_FS_DM) | PIN_MODE_ALTERNATE(GPIOA_OTG_FS_DP) | PIN_MODE_ALTERNATE(GPIOA_SWDIO) | PIN_MODE_ALTERNATE(GPIOA_SWCLK) | PIN_MODE_INPUT(GPIOA_PIN15)) -#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_ARD_A0) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_A1) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D1) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D0) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_A2) | PIN_OTYPE_PUSHPULL(GPIOA_LED_GREEN) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D12) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D11) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D7) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D8) | PIN_OTYPE_PUSHPULL(GPIOA_ARD_D2) | PIN_OTYPE_PUSHPULL(GPIOA_OTG_FS_DM) | PIN_OTYPE_PUSHPULL(GPIOA_OTG_FS_DP) | PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) -#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_HIGH(GPIOA_ARD_A0) | PIN_OSPEED_HIGH(GPIOA_ARD_A1) | PIN_OSPEED_MEDIUM(GPIOA_ARD_D1) | PIN_OSPEED_MEDIUM(GPIOA_ARD_D0) | PIN_OSPEED_HIGH(GPIOA_ARD_A2) | PIN_OSPEED_MEDIUM(GPIOA_LED_GREEN) | PIN_OSPEED_HIGH(GPIOA_ARD_D12) | PIN_OSPEED_HIGH(GPIOA_ARD_D11) | PIN_OSPEED_HIGH(GPIOA_ARD_D7) | PIN_OSPEED_HIGH(GPIOA_ARD_D8) | PIN_OSPEED_HIGH(GPIOA_ARD_D2) | PIN_OSPEED_HIGH(GPIOA_OTG_FS_DM) | PIN_OSPEED_HIGH(GPIOA_OTG_FS_DP) | PIN_OSPEED_HIGH(GPIOA_SWDIO) | PIN_OSPEED_HIGH(GPIOA_SWCLK) | PIN_OSPEED_HIGH(GPIOA_PIN15)) -#define VAL_GPIOA_PUPDR (PIN_PUPDR_PULLUP(GPIOA_ARD_A0) | PIN_PUPDR_PULLUP(GPIOA_ARD_A1) | PIN_PUPDR_FLOATING(GPIOA_ARD_D1) | PIN_PUPDR_FLOATING(GPIOA_ARD_D0) | PIN_PUPDR_PULLUP(GPIOA_ARD_A2) | PIN_PUPDR_FLOATING(GPIOA_LED_GREEN) | PIN_PUPDR_PULLUP(GPIOA_ARD_D12) | PIN_PUPDR_PULLUP(GPIOA_ARD_D11) | PIN_PUPDR_PULLUP(GPIOA_ARD_D7) | PIN_PUPDR_PULLUP(GPIOA_ARD_D8) | PIN_PUPDR_PULLUP(GPIOA_ARD_D2) | PIN_PUPDR_FLOATING(GPIOA_OTG_FS_DM) | PIN_PUPDR_FLOATING(GPIOA_OTG_FS_DP) | PIN_PUPDR_PULLUP(GPIOA_SWDIO) | PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | PIN_PUPDR_PULLUP(GPIOA_PIN15)) -#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_ARD_A0) | PIN_ODR_HIGH(GPIOA_ARD_A1) | PIN_ODR_HIGH(GPIOA_ARD_D1) | PIN_ODR_HIGH(GPIOA_ARD_D0) | PIN_ODR_HIGH(GPIOA_ARD_A2) | PIN_ODR_LOW(GPIOA_LED_GREEN) | PIN_ODR_HIGH(GPIOA_ARD_D12) | PIN_ODR_HIGH(GPIOA_ARD_D11) | PIN_ODR_HIGH(GPIOA_ARD_D7) | PIN_ODR_HIGH(GPIOA_ARD_D8) | PIN_ODR_HIGH(GPIOA_ARD_D2) | PIN_ODR_HIGH(GPIOA_OTG_FS_DM) | PIN_ODR_HIGH(GPIOA_OTG_FS_DP) | PIN_ODR_HIGH(GPIOA_SWDIO) | PIN_ODR_HIGH(GPIOA_SWCLK) | PIN_ODR_HIGH(GPIOA_PIN15)) -#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_ARD_A0, 0U) | PIN_AFIO_AF(GPIOA_ARD_A1, 0U) | PIN_AFIO_AF(GPIOA_ARD_D1, 7U) | PIN_AFIO_AF(GPIOA_ARD_D0, 7U) | PIN_AFIO_AF(GPIOA_ARD_A2, 0U) | PIN_AFIO_AF(GPIOA_LED_GREEN, 0U) | PIN_AFIO_AF(GPIOA_ARD_D12, 0U) | PIN_AFIO_AF(GPIOA_ARD_D11, 0U)) -#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_ARD_D7, 0U) | PIN_AFIO_AF(GPIOA_ARD_D8, 0U) | PIN_AFIO_AF(GPIOA_ARD_D2, 0U) | PIN_AFIO_AF(GPIOA_OTG_FS_DM, 10U) | PIN_AFIO_AF(GPIOA_OTG_FS_DP, 10U) | PIN_AFIO_AF(GPIOA_SWDIO, 0U) | PIN_AFIO_AF(GPIOA_SWCLK, 0U) | PIN_AFIO_AF(GPIOA_PIN15, 0U)) - -/* - * GPIOB setup: - * - * PB0 - ARD_A3 ADC1_IN8 (input pullup). - * PB1 - PIN1 (input pullup). - * PB2 - PIN2 (input pullup). - * PB3 - SWO ARD_D3 (alternate 0). - * PB4 - ARD_D5 (input pullup). - * PB5 - ARD_D4 (input pullup). - * PB6 - ARD_D10 (input pullup). - * PB7 - PIN7 (input pullup). - * PB8 - ARD_D15 (input pullup). - * PB9 - ARD_D14 (input pullup). - * PB10 - ARD_D6 (input pullup). - * PB11 - PIN11 (input pullup). - * PB12 - PIN12 (input pullup). - * PB13 - PIN13 (input pullup). - * PB14 - PIN14 (input pullup). - * PB15 - PIN15 (input pullup). - */ -#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_ARD_A3) | PIN_MODE_INPUT(GPIOB_PIN1) | PIN_MODE_INPUT(GPIOB_PIN2) | PIN_MODE_ALTERNATE(GPIOB_SWO) | PIN_MODE_INPUT(GPIOB_ARD_D5) | PIN_MODE_INPUT(GPIOB_ARD_D4) | PIN_MODE_INPUT(GPIOB_ARD_D10) | PIN_MODE_INPUT(GPIOB_PIN7) | PIN_MODE_INPUT(GPIOB_ARD_D15) | PIN_MODE_INPUT(GPIOB_ARD_D14) | PIN_MODE_INPUT(GPIOB_ARD_D6) | PIN_MODE_INPUT(GPIOB_PIN11) | PIN_MODE_INPUT(GPIOB_PIN12) | PIN_MODE_INPUT(GPIOB_PIN13) | PIN_MODE_INPUT(GPIOB_PIN14) | PIN_MODE_INPUT(GPIOB_PIN15)) -#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_ARD_A3) | PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | PIN_OTYPE_PUSHPULL(GPIOB_SWO) | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D5) | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D4) | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D10) | PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D15) | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D14) | PIN_OTYPE_PUSHPULL(GPIOB_ARD_D6) | PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) -#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_HIGH(GPIOB_ARD_A3) | PIN_OSPEED_HIGH(GPIOB_PIN1) | PIN_OSPEED_HIGH(GPIOB_PIN2) | PIN_OSPEED_HIGH(GPIOB_SWO) | PIN_OSPEED_HIGH(GPIOB_ARD_D5) | PIN_OSPEED_HIGH(GPIOB_ARD_D4) | PIN_OSPEED_HIGH(GPIOB_ARD_D10) | PIN_OSPEED_HIGH(GPIOB_PIN7) | PIN_OSPEED_HIGH(GPIOB_ARD_D15) | PIN_OSPEED_HIGH(GPIOB_ARD_D14) | PIN_OSPEED_HIGH(GPIOB_ARD_D6) | PIN_OSPEED_HIGH(GPIOB_PIN11) | PIN_OSPEED_HIGH(GPIOB_PIN12) | PIN_OSPEED_HIGH(GPIOB_PIN13) | PIN_OSPEED_HIGH(GPIOB_PIN14) | PIN_OSPEED_HIGH(GPIOB_PIN15)) -#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_ARD_A3) | PIN_PUPDR_PULLUP(GPIOB_PIN1) | PIN_PUPDR_PULLUP(GPIOB_PIN2) | PIN_PUPDR_PULLUP(GPIOB_SWO) | PIN_PUPDR_PULLUP(GPIOB_ARD_D5) | PIN_PUPDR_PULLUP(GPIOB_ARD_D4) | PIN_PUPDR_PULLUP(GPIOB_ARD_D10) | PIN_PUPDR_PULLUP(GPIOB_PIN7) | PIN_PUPDR_PULLUP(GPIOB_ARD_D15) | PIN_PUPDR_PULLUP(GPIOB_ARD_D14) | PIN_PUPDR_PULLUP(GPIOB_ARD_D6) | PIN_PUPDR_PULLUP(GPIOB_PIN11) | PIN_PUPDR_PULLUP(GPIOB_PIN12) | PIN_PUPDR_PULLUP(GPIOB_PIN13) | PIN_PUPDR_PULLUP(GPIOB_PIN14) | PIN_PUPDR_PULLUP(GPIOB_PIN15)) -#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_ARD_A3) | PIN_ODR_HIGH(GPIOB_PIN1) | PIN_ODR_HIGH(GPIOB_PIN2) | PIN_ODR_HIGH(GPIOB_SWO) | PIN_ODR_HIGH(GPIOB_ARD_D5) | PIN_ODR_HIGH(GPIOB_ARD_D4) | PIN_ODR_HIGH(GPIOB_ARD_D10) | PIN_ODR_HIGH(GPIOB_PIN7) | PIN_ODR_HIGH(GPIOB_ARD_D15) | PIN_ODR_HIGH(GPIOB_ARD_D14) | PIN_ODR_HIGH(GPIOB_ARD_D6) | PIN_ODR_HIGH(GPIOB_PIN11) | PIN_ODR_HIGH(GPIOB_PIN12) | PIN_ODR_HIGH(GPIOB_PIN13) | PIN_ODR_HIGH(GPIOB_PIN14) | PIN_ODR_HIGH(GPIOB_PIN15)) -#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_ARD_A3, 0U) | PIN_AFIO_AF(GPIOB_PIN1, 0U) | PIN_AFIO_AF(GPIOB_PIN2, 0U) | PIN_AFIO_AF(GPIOB_SWO, 0U) | PIN_AFIO_AF(GPIOB_ARD_D5, 0U) | PIN_AFIO_AF(GPIOB_ARD_D4, 0U) | PIN_AFIO_AF(GPIOB_ARD_D10, 0U) | PIN_AFIO_AF(GPIOB_PIN7, 0U)) -#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_ARD_D15, 0U) | PIN_AFIO_AF(GPIOB_ARD_D14, 0U) | PIN_AFIO_AF(GPIOB_ARD_D6, 0U) | PIN_AFIO_AF(GPIOB_PIN11, 0U) | PIN_AFIO_AF(GPIOB_PIN12, 0U) | PIN_AFIO_AF(GPIOB_PIN13, 0U) | PIN_AFIO_AF(GPIOB_PIN14, 0U) | PIN_AFIO_AF(GPIOB_PIN15, 0U)) - -/* - * GPIOC setup: - * - * PC0 - ARD_A5 ADC1_IN10 (input pullup). - * PC1 - ARD_A4 ADC1_IN11 (input pullup). - * PC2 - PIN2 (input pullup). - * PC3 - PIN3 (input pullup). - * PC4 - PIN4 (input pullup). - * PC5 - PIN5 (input pullup). - * PC6 - PIN6 (input pullup). - * PC7 - ARD_D9 (input pullup). - * PC8 - PIN8 (input pullup). - * PC9 - PIN9 (input pullup). - * PC10 - PIN10 (input pullup). - * PC11 - PIN11 (input pullup). - * PC12 - PIN12 (input pullup). - * PC13 - BUTTON (input floating). - * PC14 - OSC32_IN (input floating). - * PC15 - OSC32_OUT (input floating). - */ -#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_ARD_A5) | PIN_MODE_INPUT(GPIOC_ARD_A4) | PIN_MODE_INPUT(GPIOC_PIN2) | PIN_MODE_INPUT(GPIOC_PIN3) | PIN_MODE_INPUT(GPIOC_PIN4) | PIN_MODE_INPUT(GPIOC_PIN5) | PIN_MODE_INPUT(GPIOC_PIN6) | PIN_MODE_INPUT(GPIOC_ARD_D9) | PIN_MODE_INPUT(GPIOC_PIN8) | PIN_MODE_INPUT(GPIOC_PIN9) | PIN_MODE_INPUT(GPIOC_PIN10) | PIN_MODE_INPUT(GPIOC_PIN11) | PIN_MODE_INPUT(GPIOC_PIN12) | PIN_MODE_INPUT(GPIOC_BUTTON) | PIN_MODE_INPUT(GPIOC_OSC32_IN) | PIN_MODE_INPUT(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_ARD_A5) | PIN_OTYPE_PUSHPULL(GPIOC_ARD_A4) | PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | PIN_OTYPE_PUSHPULL(GPIOC_ARD_D9) | PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | PIN_OTYPE_PUSHPULL(GPIOC_BUTTON) | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_ARD_A5) | PIN_OSPEED_HIGH(GPIOC_ARD_A4) | PIN_OSPEED_HIGH(GPIOC_PIN2) | PIN_OSPEED_HIGH(GPIOC_PIN3) | PIN_OSPEED_HIGH(GPIOC_PIN4) | PIN_OSPEED_HIGH(GPIOC_PIN5) | PIN_OSPEED_HIGH(GPIOC_PIN6) | PIN_OSPEED_HIGH(GPIOC_ARD_D9) | PIN_OSPEED_HIGH(GPIOC_PIN8) | PIN_OSPEED_HIGH(GPIOC_PIN9) | PIN_OSPEED_HIGH(GPIOC_PIN10) | PIN_OSPEED_HIGH(GPIOC_PIN11) | PIN_OSPEED_HIGH(GPIOC_PIN12) | PIN_OSPEED_HIGH(GPIOC_BUTTON) | PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_ARD_A5) | PIN_PUPDR_PULLUP(GPIOC_ARD_A4) | PIN_PUPDR_PULLUP(GPIOC_PIN2) | PIN_PUPDR_PULLUP(GPIOC_PIN3) | PIN_PUPDR_PULLUP(GPIOC_PIN4) | PIN_PUPDR_PULLUP(GPIOC_PIN5) | PIN_PUPDR_PULLUP(GPIOC_PIN6) | PIN_PUPDR_PULLUP(GPIOC_ARD_D9) | PIN_PUPDR_PULLUP(GPIOC_PIN8) | PIN_PUPDR_PULLUP(GPIOC_PIN9) | PIN_PUPDR_PULLUP(GPIOC_PIN10) | PIN_PUPDR_PULLUP(GPIOC_PIN11) | PIN_PUPDR_PULLUP(GPIOC_PIN12) | PIN_PUPDR_FLOATING(GPIOC_BUTTON) | PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_ARD_A5) | PIN_ODR_HIGH(GPIOC_ARD_A4) | PIN_ODR_HIGH(GPIOC_PIN2) | PIN_ODR_HIGH(GPIOC_PIN3) | PIN_ODR_HIGH(GPIOC_PIN4) | PIN_ODR_HIGH(GPIOC_PIN5) | PIN_ODR_HIGH(GPIOC_PIN6) | PIN_ODR_HIGH(GPIOC_ARD_D9) | PIN_ODR_HIGH(GPIOC_PIN8) | PIN_ODR_HIGH(GPIOC_PIN9) | PIN_ODR_HIGH(GPIOC_PIN10) | PIN_ODR_HIGH(GPIOC_PIN11) | PIN_ODR_HIGH(GPIOC_PIN12) | PIN_ODR_HIGH(GPIOC_BUTTON) | PIN_ODR_HIGH(GPIOC_OSC32_IN) | PIN_ODR_HIGH(GPIOC_OSC32_OUT)) -#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_ARD_A5, 0U) | PIN_AFIO_AF(GPIOC_ARD_A4, 0U) | PIN_AFIO_AF(GPIOC_PIN2, 0U) | PIN_AFIO_AF(GPIOC_PIN3, 0U) | PIN_AFIO_AF(GPIOC_PIN4, 0U) | PIN_AFIO_AF(GPIOC_PIN5, 0U) | PIN_AFIO_AF(GPIOC_PIN6, 0U) | PIN_AFIO_AF(GPIOC_ARD_D9, 0U)) -#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0U) | PIN_AFIO_AF(GPIOC_PIN9, 0U) | PIN_AFIO_AF(GPIOC_PIN10, 0U) | PIN_AFIO_AF(GPIOC_PIN11, 0U) | PIN_AFIO_AF(GPIOC_PIN12, 0U) | PIN_AFIO_AF(GPIOC_BUTTON, 0U) | PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) - -/* - * GPIOD setup: - * - * PD0 - PIN0 (input pullup). - * PD1 - PIN1 (input pullup). - * PD2 - PIN2 (input pullup). - * PD3 - PIN3 (input pullup). - * PD4 - PIN4 (input pullup). - * PD5 - PIN5 (input pullup). - * PD6 - PIN6 (input pullup). - * PD7 - PIN7 (input pullup). - * PD8 - PIN8 (input pullup). - * PD9 - PIN9 (input pullup). - * PD10 - PIN10 (input pullup). - * PD11 - PIN11 (input pullup). - * PD12 - PIN12 (input pullup). - * PD13 - PIN13 (input pullup). - * PD14 - PIN14 (input pullup). - * PD15 - PIN15 (input pullup). - */ -#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | PIN_MODE_INPUT(GPIOD_PIN1) | PIN_MODE_INPUT(GPIOD_PIN2) | PIN_MODE_INPUT(GPIOD_PIN3) | PIN_MODE_INPUT(GPIOD_PIN4) | PIN_MODE_INPUT(GPIOD_PIN5) | PIN_MODE_INPUT(GPIOD_PIN6) | PIN_MODE_INPUT(GPIOD_PIN7) | PIN_MODE_INPUT(GPIOD_PIN8) | PIN_MODE_INPUT(GPIOD_PIN9) | PIN_MODE_INPUT(GPIOD_PIN10) | PIN_MODE_INPUT(GPIOD_PIN11) | PIN_MODE_INPUT(GPIOD_PIN12) | PIN_MODE_INPUT(GPIOD_PIN13) | PIN_MODE_INPUT(GPIOD_PIN14) | PIN_MODE_INPUT(GPIOD_PIN15)) -#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) -#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_HIGH(GPIOD_PIN0) | PIN_OSPEED_HIGH(GPIOD_PIN1) | PIN_OSPEED_HIGH(GPIOD_PIN2) | PIN_OSPEED_HIGH(GPIOD_PIN3) | PIN_OSPEED_HIGH(GPIOD_PIN4) | PIN_OSPEED_HIGH(GPIOD_PIN5) | PIN_OSPEED_HIGH(GPIOD_PIN6) | PIN_OSPEED_HIGH(GPIOD_PIN7) | PIN_OSPEED_HIGH(GPIOD_PIN8) | PIN_OSPEED_HIGH(GPIOD_PIN9) | PIN_OSPEED_HIGH(GPIOD_PIN10) | PIN_OSPEED_HIGH(GPIOD_PIN11) | PIN_OSPEED_HIGH(GPIOD_PIN12) | PIN_OSPEED_HIGH(GPIOD_PIN13) | PIN_OSPEED_HIGH(GPIOD_PIN14) | PIN_OSPEED_HIGH(GPIOD_PIN15)) -#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | PIN_PUPDR_PULLUP(GPIOD_PIN1) | PIN_PUPDR_PULLUP(GPIOD_PIN2) | PIN_PUPDR_PULLUP(GPIOD_PIN3) | PIN_PUPDR_PULLUP(GPIOD_PIN4) | PIN_PUPDR_PULLUP(GPIOD_PIN5) | PIN_PUPDR_PULLUP(GPIOD_PIN6) | PIN_PUPDR_PULLUP(GPIOD_PIN7) | PIN_PUPDR_PULLUP(GPIOD_PIN8) | PIN_PUPDR_PULLUP(GPIOD_PIN9) | PIN_PUPDR_PULLUP(GPIOD_PIN10) | PIN_PUPDR_PULLUP(GPIOD_PIN11) | PIN_PUPDR_PULLUP(GPIOD_PIN12) | PIN_PUPDR_PULLUP(GPIOD_PIN13) | PIN_PUPDR_PULLUP(GPIOD_PIN14) | PIN_PUPDR_PULLUP(GPIOD_PIN15)) -#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | PIN_ODR_HIGH(GPIOD_PIN1) | PIN_ODR_HIGH(GPIOD_PIN2) | PIN_ODR_HIGH(GPIOD_PIN3) | PIN_ODR_HIGH(GPIOD_PIN4) | PIN_ODR_HIGH(GPIOD_PIN5) | PIN_ODR_HIGH(GPIOD_PIN6) | PIN_ODR_HIGH(GPIOD_PIN7) | PIN_ODR_HIGH(GPIOD_PIN8) | PIN_ODR_HIGH(GPIOD_PIN9) | PIN_ODR_HIGH(GPIOD_PIN10) | PIN_ODR_HIGH(GPIOD_PIN11) | PIN_ODR_HIGH(GPIOD_PIN12) | PIN_ODR_HIGH(GPIOD_PIN13) | PIN_ODR_HIGH(GPIOD_PIN14) | PIN_ODR_HIGH(GPIOD_PIN15)) -#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | PIN_AFIO_AF(GPIOD_PIN1, 0U) | PIN_AFIO_AF(GPIOD_PIN2, 0U) | PIN_AFIO_AF(GPIOD_PIN3, 0U) | PIN_AFIO_AF(GPIOD_PIN4, 0U) | PIN_AFIO_AF(GPIOD_PIN5, 0U) | PIN_AFIO_AF(GPIOD_PIN6, 0U) | PIN_AFIO_AF(GPIOD_PIN7, 0U)) -#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | PIN_AFIO_AF(GPIOD_PIN9, 0U) | PIN_AFIO_AF(GPIOD_PIN10, 0U) | PIN_AFIO_AF(GPIOD_PIN11, 0U) | PIN_AFIO_AF(GPIOD_PIN12, 0U) | PIN_AFIO_AF(GPIOD_PIN13, 0U) | PIN_AFIO_AF(GPIOD_PIN14, 0U) | PIN_AFIO_AF(GPIOD_PIN15, 0U)) - -/* - * GPIOE setup: - * - * PE0 - PIN0 (input pullup). - * PE1 - PIN1 (input pullup). - * PE2 - PIN2 (input pullup). - * PE3 - PIN3 (input pullup). - * PE4 - PIN4 (input pullup). - * PE5 - PIN5 (input pullup). - * PE6 - PIN6 (input pullup). - * PE7 - PIN7 (input pullup). - * PE8 - PIN8 (input pullup). - * PE9 - PIN9 (input pullup). - * PE10 - PIN10 (input pullup). - * PE11 - PIN11 (input pullup). - * PE12 - PIN12 (input pullup). - * PE13 - PIN13 (input pullup). - * PE14 - PIN14 (input pullup). - * PE15 - PIN15 (input pullup). - */ -#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | PIN_MODE_INPUT(GPIOE_PIN1) | PIN_MODE_INPUT(GPIOE_PIN2) | PIN_MODE_INPUT(GPIOE_PIN3) | PIN_MODE_INPUT(GPIOE_PIN4) | PIN_MODE_INPUT(GPIOE_PIN5) | PIN_MODE_INPUT(GPIOE_PIN6) | PIN_MODE_INPUT(GPIOE_PIN7) | PIN_MODE_INPUT(GPIOE_PIN8) | PIN_MODE_INPUT(GPIOE_PIN9) | PIN_MODE_INPUT(GPIOE_PIN10) | PIN_MODE_INPUT(GPIOE_PIN11) | PIN_MODE_INPUT(GPIOE_PIN12) | PIN_MODE_INPUT(GPIOE_PIN13) | PIN_MODE_INPUT(GPIOE_PIN14) | PIN_MODE_INPUT(GPIOE_PIN15)) -#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) -#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_HIGH(GPIOE_PIN0) | PIN_OSPEED_HIGH(GPIOE_PIN1) | PIN_OSPEED_HIGH(GPIOE_PIN2) | PIN_OSPEED_HIGH(GPIOE_PIN3) | PIN_OSPEED_HIGH(GPIOE_PIN4) | PIN_OSPEED_HIGH(GPIOE_PIN5) | PIN_OSPEED_HIGH(GPIOE_PIN6) | PIN_OSPEED_HIGH(GPIOE_PIN7) | PIN_OSPEED_HIGH(GPIOE_PIN8) | PIN_OSPEED_HIGH(GPIOE_PIN9) | PIN_OSPEED_HIGH(GPIOE_PIN10) | PIN_OSPEED_HIGH(GPIOE_PIN11) | PIN_OSPEED_HIGH(GPIOE_PIN12) | PIN_OSPEED_HIGH(GPIOE_PIN13) | PIN_OSPEED_HIGH(GPIOE_PIN14) | PIN_OSPEED_HIGH(GPIOE_PIN15)) -#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | PIN_PUPDR_PULLUP(GPIOE_PIN1) | PIN_PUPDR_PULLUP(GPIOE_PIN2) | PIN_PUPDR_PULLUP(GPIOE_PIN3) | PIN_PUPDR_PULLUP(GPIOE_PIN4) | PIN_PUPDR_PULLUP(GPIOE_PIN5) | PIN_PUPDR_PULLUP(GPIOE_PIN6) | PIN_PUPDR_PULLUP(GPIOE_PIN7) | PIN_PUPDR_PULLUP(GPIOE_PIN8) | PIN_PUPDR_PULLUP(GPIOE_PIN9) | PIN_PUPDR_PULLUP(GPIOE_PIN10) | PIN_PUPDR_PULLUP(GPIOE_PIN11) | PIN_PUPDR_PULLUP(GPIOE_PIN12) | PIN_PUPDR_PULLUP(GPIOE_PIN13) | PIN_PUPDR_PULLUP(GPIOE_PIN14) | PIN_PUPDR_PULLUP(GPIOE_PIN15)) -#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | PIN_ODR_HIGH(GPIOE_PIN1) | PIN_ODR_HIGH(GPIOE_PIN2) | PIN_ODR_HIGH(GPIOE_PIN3) | PIN_ODR_HIGH(GPIOE_PIN4) | PIN_ODR_HIGH(GPIOE_PIN5) | PIN_ODR_HIGH(GPIOE_PIN6) | PIN_ODR_HIGH(GPIOE_PIN7) | PIN_ODR_HIGH(GPIOE_PIN8) | PIN_ODR_HIGH(GPIOE_PIN9) | PIN_ODR_HIGH(GPIOE_PIN10) | PIN_ODR_HIGH(GPIOE_PIN11) | PIN_ODR_HIGH(GPIOE_PIN12) | PIN_ODR_HIGH(GPIOE_PIN13) | PIN_ODR_HIGH(GPIOE_PIN14) | PIN_ODR_HIGH(GPIOE_PIN15)) -#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | PIN_AFIO_AF(GPIOE_PIN1, 0U) | PIN_AFIO_AF(GPIOE_PIN2, 0U) | PIN_AFIO_AF(GPIOE_PIN3, 0U) | PIN_AFIO_AF(GPIOE_PIN4, 0U) | PIN_AFIO_AF(GPIOE_PIN5, 0U) | PIN_AFIO_AF(GPIOE_PIN6, 0U) | PIN_AFIO_AF(GPIOE_PIN7, 0U)) -#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | PIN_AFIO_AF(GPIOE_PIN9, 0U) | PIN_AFIO_AF(GPIOE_PIN10, 0U) | PIN_AFIO_AF(GPIOE_PIN11, 0U) | PIN_AFIO_AF(GPIOE_PIN12, 0U) | PIN_AFIO_AF(GPIOE_PIN13, 0U) | PIN_AFIO_AF(GPIOE_PIN14, 0U) | PIN_AFIO_AF(GPIOE_PIN15, 0U)) - -/* - * GPIOF setup: - * - * PF0 - PIN0 (input pullup). - * PF1 - PIN1 (input pullup). - * PF2 - PIN2 (input pullup). - * PF3 - PIN3 (input pullup). - * PF4 - PIN4 (input pullup). - * PF5 - PIN5 (input pullup). - * PF6 - PIN6 (input pullup). - * PF7 - PIN7 (input pullup). - * PF8 - PIN8 (input pullup). - * PF9 - PIN9 (input pullup). - * PF10 - PIN10 (input pullup). - * PF11 - PIN11 (input pullup). - * PF12 - PIN12 (input pullup). - * PF13 - PIN13 (input pullup). - * PF14 - PIN14 (input pullup). - * PF15 - PIN15 (input pullup). - */ -#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_PIN0) | PIN_MODE_INPUT(GPIOF_PIN1) | PIN_MODE_INPUT(GPIOF_PIN2) | PIN_MODE_INPUT(GPIOF_PIN3) | PIN_MODE_INPUT(GPIOF_PIN4) | PIN_MODE_INPUT(GPIOF_PIN5) | PIN_MODE_INPUT(GPIOF_PIN6) | PIN_MODE_INPUT(GPIOF_PIN7) | PIN_MODE_INPUT(GPIOF_PIN8) | PIN_MODE_INPUT(GPIOF_PIN9) | PIN_MODE_INPUT(GPIOF_PIN10) | PIN_MODE_INPUT(GPIOF_PIN11) | PIN_MODE_INPUT(GPIOF_PIN12) | PIN_MODE_INPUT(GPIOF_PIN13) | PIN_MODE_INPUT(GPIOF_PIN14) | PIN_MODE_INPUT(GPIOF_PIN15)) -#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_PIN0) | PIN_OTYPE_PUSHPULL(GPIOF_PIN1) | PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) -#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_PIN0) | PIN_OSPEED_HIGH(GPIOF_PIN1) | PIN_OSPEED_HIGH(GPIOF_PIN2) | PIN_OSPEED_HIGH(GPIOF_PIN3) | PIN_OSPEED_HIGH(GPIOF_PIN4) | PIN_OSPEED_HIGH(GPIOF_PIN5) | PIN_OSPEED_HIGH(GPIOF_PIN6) | PIN_OSPEED_HIGH(GPIOF_PIN7) | PIN_OSPEED_HIGH(GPIOF_PIN8) | PIN_OSPEED_HIGH(GPIOF_PIN9) | PIN_OSPEED_HIGH(GPIOF_PIN10) | PIN_OSPEED_HIGH(GPIOF_PIN11) | PIN_OSPEED_HIGH(GPIOF_PIN12) | PIN_OSPEED_HIGH(GPIOF_PIN13) | PIN_OSPEED_HIGH(GPIOF_PIN14) | PIN_OSPEED_HIGH(GPIOF_PIN15)) -#define VAL_GPIOF_PUPDR (PIN_PUPDR_PULLUP(GPIOF_PIN0) | PIN_PUPDR_PULLUP(GPIOF_PIN1) | PIN_PUPDR_PULLUP(GPIOF_PIN2) | PIN_PUPDR_PULLUP(GPIOF_PIN3) | PIN_PUPDR_PULLUP(GPIOF_PIN4) | PIN_PUPDR_PULLUP(GPIOF_PIN5) | PIN_PUPDR_PULLUP(GPIOF_PIN6) | PIN_PUPDR_PULLUP(GPIOF_PIN7) | PIN_PUPDR_PULLUP(GPIOF_PIN8) | PIN_PUPDR_PULLUP(GPIOF_PIN9) | PIN_PUPDR_PULLUP(GPIOF_PIN10) | PIN_PUPDR_PULLUP(GPIOF_PIN11) | PIN_PUPDR_PULLUP(GPIOF_PIN12) | PIN_PUPDR_PULLUP(GPIOF_PIN13) | PIN_PUPDR_PULLUP(GPIOF_PIN14) | PIN_PUPDR_PULLUP(GPIOF_PIN15)) -#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_PIN0) | PIN_ODR_HIGH(GPIOF_PIN1) | PIN_ODR_HIGH(GPIOF_PIN2) | PIN_ODR_HIGH(GPIOF_PIN3) | PIN_ODR_HIGH(GPIOF_PIN4) | PIN_ODR_HIGH(GPIOF_PIN5) | PIN_ODR_HIGH(GPIOF_PIN6) | PIN_ODR_HIGH(GPIOF_PIN7) | PIN_ODR_HIGH(GPIOF_PIN8) | PIN_ODR_HIGH(GPIOF_PIN9) | PIN_ODR_HIGH(GPIOF_PIN10) | PIN_ODR_HIGH(GPIOF_PIN11) | PIN_ODR_HIGH(GPIOF_PIN12) | PIN_ODR_HIGH(GPIOF_PIN13) | PIN_ODR_HIGH(GPIOF_PIN14) | PIN_ODR_HIGH(GPIOF_PIN15)) -#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_PIN0, 0U) | PIN_AFIO_AF(GPIOF_PIN1, 0U) | PIN_AFIO_AF(GPIOF_PIN2, 0U) | PIN_AFIO_AF(GPIOF_PIN3, 0U) | PIN_AFIO_AF(GPIOF_PIN4, 0U) | PIN_AFIO_AF(GPIOF_PIN5, 0U) | PIN_AFIO_AF(GPIOF_PIN6, 0U) | PIN_AFIO_AF(GPIOF_PIN7, 0U)) -#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | PIN_AFIO_AF(GPIOF_PIN9, 0U) | PIN_AFIO_AF(GPIOF_PIN10, 0U) | PIN_AFIO_AF(GPIOF_PIN11, 0U) | PIN_AFIO_AF(GPIOF_PIN12, 0U) | PIN_AFIO_AF(GPIOF_PIN13, 0U) | PIN_AFIO_AF(GPIOF_PIN14, 0U) | PIN_AFIO_AF(GPIOF_PIN15, 0U)) - -/* - * GPIOG setup: - * - * PG0 - PIN0 (input pullup). - * PG1 - PIN1 (input pullup). - * PG2 - PIN2 (input pullup). - * PG3 - PIN3 (input pullup). - * PG4 - PIN4 (input pullup). - * PG5 - PIN5 (input pullup). - * PG6 - PIN6 (input pullup). - * PG7 - PIN7 (input pullup). - * PG8 - PIN8 (input pullup). - * PG9 - PIN9 (input pullup). - * PG10 - PIN10 (input pullup). - * PG11 - PIN11 (input pullup). - * PG12 - PIN12 (input pullup). - * PG13 - PIN13 (input pullup). - * PG14 - PIN14 (input pullup). - * PG15 - PIN15 (input pullup). - */ -#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | PIN_MODE_INPUT(GPIOG_PIN1) | PIN_MODE_INPUT(GPIOG_PIN2) | PIN_MODE_INPUT(GPIOG_PIN3) | PIN_MODE_INPUT(GPIOG_PIN4) | PIN_MODE_INPUT(GPIOG_PIN5) | PIN_MODE_INPUT(GPIOG_PIN6) | PIN_MODE_INPUT(GPIOG_PIN7) | PIN_MODE_INPUT(GPIOG_PIN8) | PIN_MODE_INPUT(GPIOG_PIN9) | PIN_MODE_INPUT(GPIOG_PIN10) | PIN_MODE_INPUT(GPIOG_PIN11) | PIN_MODE_INPUT(GPIOG_PIN12) | PIN_MODE_INPUT(GPIOG_PIN13) | PIN_MODE_INPUT(GPIOG_PIN14) | PIN_MODE_INPUT(GPIOG_PIN15)) -#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) -#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_HIGH(GPIOG_PIN0) | PIN_OSPEED_HIGH(GPIOG_PIN1) | PIN_OSPEED_HIGH(GPIOG_PIN2) | PIN_OSPEED_HIGH(GPIOG_PIN3) | PIN_OSPEED_HIGH(GPIOG_PIN4) | PIN_OSPEED_HIGH(GPIOG_PIN5) | PIN_OSPEED_HIGH(GPIOG_PIN6) | PIN_OSPEED_HIGH(GPIOG_PIN7) | PIN_OSPEED_HIGH(GPIOG_PIN8) | PIN_OSPEED_HIGH(GPIOG_PIN9) | PIN_OSPEED_HIGH(GPIOG_PIN10) | PIN_OSPEED_HIGH(GPIOG_PIN11) | PIN_OSPEED_HIGH(GPIOG_PIN12) | PIN_OSPEED_HIGH(GPIOG_PIN13) | PIN_OSPEED_HIGH(GPIOG_PIN14) | PIN_OSPEED_HIGH(GPIOG_PIN15)) -#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | PIN_PUPDR_PULLUP(GPIOG_PIN1) | PIN_PUPDR_PULLUP(GPIOG_PIN2) | PIN_PUPDR_PULLUP(GPIOG_PIN3) | PIN_PUPDR_PULLUP(GPIOG_PIN4) | PIN_PUPDR_PULLUP(GPIOG_PIN5) | PIN_PUPDR_PULLUP(GPIOG_PIN6) | PIN_PUPDR_PULLUP(GPIOG_PIN7) | PIN_PUPDR_PULLUP(GPIOG_PIN8) | PIN_PUPDR_PULLUP(GPIOG_PIN9) | PIN_PUPDR_PULLUP(GPIOG_PIN10) | PIN_PUPDR_PULLUP(GPIOG_PIN11) | PIN_PUPDR_PULLUP(GPIOG_PIN12) | PIN_PUPDR_PULLUP(GPIOG_PIN13) | PIN_PUPDR_PULLUP(GPIOG_PIN14) | PIN_PUPDR_PULLUP(GPIOG_PIN15)) -#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | PIN_ODR_HIGH(GPIOG_PIN1) | PIN_ODR_HIGH(GPIOG_PIN2) | PIN_ODR_HIGH(GPIOG_PIN3) | PIN_ODR_HIGH(GPIOG_PIN4) | PIN_ODR_HIGH(GPIOG_PIN5) | PIN_ODR_HIGH(GPIOG_PIN6) | PIN_ODR_HIGH(GPIOG_PIN7) | PIN_ODR_HIGH(GPIOG_PIN8) | PIN_ODR_HIGH(GPIOG_PIN9) | PIN_ODR_HIGH(GPIOG_PIN10) | PIN_ODR_HIGH(GPIOG_PIN11) | PIN_ODR_HIGH(GPIOG_PIN12) | PIN_ODR_HIGH(GPIOG_PIN13) | PIN_ODR_HIGH(GPIOG_PIN14) | PIN_ODR_HIGH(GPIOG_PIN15)) -#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0U) | PIN_AFIO_AF(GPIOG_PIN1, 0U) | PIN_AFIO_AF(GPIOG_PIN2, 0U) | PIN_AFIO_AF(GPIOG_PIN3, 0U) | PIN_AFIO_AF(GPIOG_PIN4, 0U) | PIN_AFIO_AF(GPIOG_PIN5, 0U) | PIN_AFIO_AF(GPIOG_PIN6, 0U) | PIN_AFIO_AF(GPIOG_PIN7, 0U)) -#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0U) | PIN_AFIO_AF(GPIOG_PIN9, 0U) | PIN_AFIO_AF(GPIOG_PIN10, 0U) | PIN_AFIO_AF(GPIOG_PIN11, 0U) | PIN_AFIO_AF(GPIOG_PIN12, 0U) | PIN_AFIO_AF(GPIOG_PIN13, 0U) | PIN_AFIO_AF(GPIOG_PIN14, 0U) | PIN_AFIO_AF(GPIOG_PIN15, 0U)) - -/* - * GPIOH setup: - * - * PH0 - OSC_IN (input floating). - * PH1 - OSC_OUT (input floating). - * PH2 - PIN2 (input pullup). - * PH3 - PIN3 (input pullup). - * PH4 - PIN4 (input pullup). - * PH5 - PIN5 (input pullup). - * PH6 - PIN6 (input pullup). - * PH7 - PIN7 (input pullup). - * PH8 - PIN8 (input pullup). - * PH9 - PIN9 (input pullup). - * PH10 - PIN10 (input pullup). - * PH11 - PIN11 (input pullup). - * PH12 - PIN12 (input pullup). - * PH13 - PIN13 (input pullup). - * PH14 - PIN14 (input pullup). - * PH15 - PIN15 (input pullup). - */ -#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_OSC_IN) | PIN_MODE_INPUT(GPIOH_OSC_OUT) | PIN_MODE_INPUT(GPIOH_PIN2) | PIN_MODE_INPUT(GPIOH_PIN3) | PIN_MODE_INPUT(GPIOH_PIN4) | PIN_MODE_INPUT(GPIOH_PIN5) | PIN_MODE_INPUT(GPIOH_PIN6) | PIN_MODE_INPUT(GPIOH_PIN7) | PIN_MODE_INPUT(GPIOH_PIN8) | PIN_MODE_INPUT(GPIOH_PIN9) | PIN_MODE_INPUT(GPIOH_PIN10) | PIN_MODE_INPUT(GPIOH_PIN11) | PIN_MODE_INPUT(GPIOH_PIN12) | PIN_MODE_INPUT(GPIOH_PIN13) | PIN_MODE_INPUT(GPIOH_PIN14) | PIN_MODE_INPUT(GPIOH_PIN15)) -#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_OSC_IN) | PIN_OTYPE_PUSHPULL(GPIOH_OSC_OUT) | PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) -#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_HIGH(GPIOH_OSC_IN) | PIN_OSPEED_HIGH(GPIOH_OSC_OUT) | PIN_OSPEED_HIGH(GPIOH_PIN2) | PIN_OSPEED_HIGH(GPIOH_PIN3) | PIN_OSPEED_HIGH(GPIOH_PIN4) | PIN_OSPEED_HIGH(GPIOH_PIN5) | PIN_OSPEED_HIGH(GPIOH_PIN6) | PIN_OSPEED_HIGH(GPIOH_PIN7) | PIN_OSPEED_HIGH(GPIOH_PIN8) | PIN_OSPEED_HIGH(GPIOH_PIN9) | PIN_OSPEED_HIGH(GPIOH_PIN10) | PIN_OSPEED_HIGH(GPIOH_PIN11) | PIN_OSPEED_HIGH(GPIOH_PIN12) | PIN_OSPEED_HIGH(GPIOH_PIN13) | PIN_OSPEED_HIGH(GPIOH_PIN14) | PIN_OSPEED_HIGH(GPIOH_PIN15)) -#define VAL_GPIOH_PUPDR (PIN_PUPDR_FLOATING(GPIOH_OSC_IN) | PIN_PUPDR_FLOATING(GPIOH_OSC_OUT) | PIN_PUPDR_PULLUP(GPIOH_PIN2) | PIN_PUPDR_PULLUP(GPIOH_PIN3) | PIN_PUPDR_PULLUP(GPIOH_PIN4) | PIN_PUPDR_PULLUP(GPIOH_PIN5) | PIN_PUPDR_PULLUP(GPIOH_PIN6) | PIN_PUPDR_PULLUP(GPIOH_PIN7) | PIN_PUPDR_PULLUP(GPIOH_PIN8) | PIN_PUPDR_PULLUP(GPIOH_PIN9) | PIN_PUPDR_PULLUP(GPIOH_PIN10) | PIN_PUPDR_PULLUP(GPIOH_PIN11) | PIN_PUPDR_PULLUP(GPIOH_PIN12) | PIN_PUPDR_PULLUP(GPIOH_PIN13) | PIN_PUPDR_PULLUP(GPIOH_PIN14) | PIN_PUPDR_PULLUP(GPIOH_PIN15)) -#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_OSC_IN) | PIN_ODR_HIGH(GPIOH_OSC_OUT) | PIN_ODR_HIGH(GPIOH_PIN2) | PIN_ODR_HIGH(GPIOH_PIN3) | PIN_ODR_HIGH(GPIOH_PIN4) | PIN_ODR_HIGH(GPIOH_PIN5) | PIN_ODR_HIGH(GPIOH_PIN6) | PIN_ODR_HIGH(GPIOH_PIN7) | PIN_ODR_HIGH(GPIOH_PIN8) | PIN_ODR_HIGH(GPIOH_PIN9) | PIN_ODR_HIGH(GPIOH_PIN10) | PIN_ODR_HIGH(GPIOH_PIN11) | PIN_ODR_HIGH(GPIOH_PIN12) | PIN_ODR_HIGH(GPIOH_PIN13) | PIN_ODR_HIGH(GPIOH_PIN14) | PIN_ODR_HIGH(GPIOH_PIN15)) -#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_OSC_IN, 0U) | PIN_AFIO_AF(GPIOH_OSC_OUT, 0U) | PIN_AFIO_AF(GPIOH_PIN2, 0U) | PIN_AFIO_AF(GPIOH_PIN3, 0U) | PIN_AFIO_AF(GPIOH_PIN4, 0U) | PIN_AFIO_AF(GPIOH_PIN5, 0U) | PIN_AFIO_AF(GPIOH_PIN6, 0U) | PIN_AFIO_AF(GPIOH_PIN7, 0U)) -#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0U) | PIN_AFIO_AF(GPIOH_PIN9, 0U) | PIN_AFIO_AF(GPIOH_PIN10, 0U) | PIN_AFIO_AF(GPIOH_PIN11, 0U) | PIN_AFIO_AF(GPIOH_PIN12, 0U) | PIN_AFIO_AF(GPIOH_PIN13, 0U) | PIN_AFIO_AF(GPIOH_PIN14, 0U) | PIN_AFIO_AF(GPIOH_PIN15, 0U)) - -/* - * GPIOI setup: - * - * PI0 - PIN0 (input pullup). - * PI1 - PIN1 (input pullup). - * PI2 - PIN2 (input pullup). - * PI3 - PIN3 (input pullup). - * PI4 - PIN4 (input pullup). - * PI5 - PIN5 (input pullup). - * PI6 - PIN6 (input pullup). - * PI7 - PIN7 (input pullup). - * PI8 - PIN8 (input pullup). - * PI9 - PIN9 (input pullup). - * PI10 - PIN10 (input pullup). - * PI11 - PIN11 (input pullup). - * PI12 - PIN12 (input pullup). - * PI13 - PIN13 (input pullup). - * PI14 - PIN14 (input pullup). - * PI15 - PIN15 (input pullup). - */ -#define VAL_GPIOI_MODER (PIN_MODE_INPUT(GPIOI_PIN0) | PIN_MODE_INPUT(GPIOI_PIN1) | PIN_MODE_INPUT(GPIOI_PIN2) | PIN_MODE_INPUT(GPIOI_PIN3) | PIN_MODE_INPUT(GPIOI_PIN4) | PIN_MODE_INPUT(GPIOI_PIN5) | PIN_MODE_INPUT(GPIOI_PIN6) | PIN_MODE_INPUT(GPIOI_PIN7) | PIN_MODE_INPUT(GPIOI_PIN8) | PIN_MODE_INPUT(GPIOI_PIN9) | PIN_MODE_INPUT(GPIOI_PIN10) | PIN_MODE_INPUT(GPIOI_PIN11) | PIN_MODE_INPUT(GPIOI_PIN12) | PIN_MODE_INPUT(GPIOI_PIN13) | PIN_MODE_INPUT(GPIOI_PIN14) | PIN_MODE_INPUT(GPIOI_PIN15)) -#define VAL_GPIOI_OTYPER (PIN_OTYPE_PUSHPULL(GPIOI_PIN0) | PIN_OTYPE_PUSHPULL(GPIOI_PIN1) | PIN_OTYPE_PUSHPULL(GPIOI_PIN2) | PIN_OTYPE_PUSHPULL(GPIOI_PIN3) | PIN_OTYPE_PUSHPULL(GPIOI_PIN4) | PIN_OTYPE_PUSHPULL(GPIOI_PIN5) | PIN_OTYPE_PUSHPULL(GPIOI_PIN6) | PIN_OTYPE_PUSHPULL(GPIOI_PIN7) | PIN_OTYPE_PUSHPULL(GPIOI_PIN8) | PIN_OTYPE_PUSHPULL(GPIOI_PIN9) | PIN_OTYPE_PUSHPULL(GPIOI_PIN10) | PIN_OTYPE_PUSHPULL(GPIOI_PIN11) | PIN_OTYPE_PUSHPULL(GPIOI_PIN12) | PIN_OTYPE_PUSHPULL(GPIOI_PIN13) | PIN_OTYPE_PUSHPULL(GPIOI_PIN14) | PIN_OTYPE_PUSHPULL(GPIOI_PIN15)) -#define VAL_GPIOI_OSPEEDR (PIN_OSPEED_HIGH(GPIOI_PIN0) | PIN_OSPEED_HIGH(GPIOI_PIN1) | PIN_OSPEED_HIGH(GPIOI_PIN2) | PIN_OSPEED_HIGH(GPIOI_PIN3) | PIN_OSPEED_HIGH(GPIOI_PIN4) | PIN_OSPEED_HIGH(GPIOI_PIN5) | PIN_OSPEED_HIGH(GPIOI_PIN6) | PIN_OSPEED_HIGH(GPIOI_PIN7) | PIN_OSPEED_HIGH(GPIOI_PIN8) | PIN_OSPEED_HIGH(GPIOI_PIN9) | PIN_OSPEED_HIGH(GPIOI_PIN10) | PIN_OSPEED_HIGH(GPIOI_PIN11) | PIN_OSPEED_HIGH(GPIOI_PIN12) | PIN_OSPEED_HIGH(GPIOI_PIN13) | PIN_OSPEED_HIGH(GPIOI_PIN14) | PIN_OSPEED_HIGH(GPIOI_PIN15)) -#define VAL_GPIOI_PUPDR (PIN_PUPDR_PULLUP(GPIOI_PIN0) | PIN_PUPDR_PULLUP(GPIOI_PIN1) | PIN_PUPDR_PULLUP(GPIOI_PIN2) | PIN_PUPDR_PULLUP(GPIOI_PIN3) | PIN_PUPDR_PULLUP(GPIOI_PIN4) | PIN_PUPDR_PULLUP(GPIOI_PIN5) | PIN_PUPDR_PULLUP(GPIOI_PIN6) | PIN_PUPDR_PULLUP(GPIOI_PIN7) | PIN_PUPDR_PULLUP(GPIOI_PIN8) | PIN_PUPDR_PULLUP(GPIOI_PIN9) | PIN_PUPDR_PULLUP(GPIOI_PIN10) | PIN_PUPDR_PULLUP(GPIOI_PIN11) | PIN_PUPDR_PULLUP(GPIOI_PIN12) | PIN_PUPDR_PULLUP(GPIOI_PIN13) | PIN_PUPDR_PULLUP(GPIOI_PIN14) | PIN_PUPDR_PULLUP(GPIOI_PIN15)) -#define VAL_GPIOI_ODR (PIN_ODR_HIGH(GPIOI_PIN0) | PIN_ODR_HIGH(GPIOI_PIN1) | PIN_ODR_HIGH(GPIOI_PIN2) | PIN_ODR_HIGH(GPIOI_PIN3) | PIN_ODR_HIGH(GPIOI_PIN4) | PIN_ODR_HIGH(GPIOI_PIN5) | PIN_ODR_HIGH(GPIOI_PIN6) | PIN_ODR_HIGH(GPIOI_PIN7) | PIN_ODR_HIGH(GPIOI_PIN8) | PIN_ODR_HIGH(GPIOI_PIN9) | PIN_ODR_HIGH(GPIOI_PIN10) | PIN_ODR_HIGH(GPIOI_PIN11) | PIN_ODR_HIGH(GPIOI_PIN12) | PIN_ODR_HIGH(GPIOI_PIN13) | PIN_ODR_HIGH(GPIOI_PIN14) | PIN_ODR_HIGH(GPIOI_PIN15)) -#define VAL_GPIOI_AFRL (PIN_AFIO_AF(GPIOI_PIN0, 0U) | PIN_AFIO_AF(GPIOI_PIN1, 0U) | PIN_AFIO_AF(GPIOI_PIN2, 0U) | PIN_AFIO_AF(GPIOI_PIN3, 0U) | PIN_AFIO_AF(GPIOI_PIN4, 0U) | PIN_AFIO_AF(GPIOI_PIN5, 0U) | PIN_AFIO_AF(GPIOI_PIN6, 0U) | PIN_AFIO_AF(GPIOI_PIN7, 0U)) -#define VAL_GPIOI_AFRH (PIN_AFIO_AF(GPIOI_PIN8, 0U) | PIN_AFIO_AF(GPIOI_PIN9, 0U) | PIN_AFIO_AF(GPIOI_PIN10, 0U) | PIN_AFIO_AF(GPIOI_PIN11, 0U) | PIN_AFIO_AF(GPIOI_PIN12, 0U) | PIN_AFIO_AF(GPIOI_PIN13, 0U) | PIN_AFIO_AF(GPIOI_PIN14, 0U) | PIN_AFIO_AF(GPIOI_PIN15, 0U)) - -/*===========================================================================*/ -/* External declarations. */ -/*===========================================================================*/ - -#if !defined(_FROM_ASM_) -# ifdef __cplusplus -extern "C" { -# endif -void boardInit(void); -# ifdef __cplusplus -} -# endif -#endif /* _FROM_ASM_ */ - -#endif /* BOARD_H */ diff --git a/drivers/boards/BLACKPILL_STM32_F411/cfg/board.chcfg b/drivers/boards/BLACKPILL_STM32_F411/cfg/board.chcfg deleted file mode 100644 index 3095409cca..0000000000 --- a/drivers/boards/BLACKPILL_STM32_F411/cfg/board.chcfg +++ /dev/null @@ -1,1193 +0,0 @@ - - - - - resources/gencfg/processors/boards/stm32f4xx/templates - .. - 5.0.x - - STMicroelectronics STM32 Nucleo64-F411RE - ST_NUCLEO64_F411RE - - STM32F411xE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/drivers/boards/BLACKPILL_STM32_F411/cfg/board.fmpp b/drivers/boards/BLACKPILL_STM32_F411/cfg/board.fmpp deleted file mode 100644 index 41754c1414..0000000000 --- a/drivers/boards/BLACKPILL_STM32_F411/cfg/board.fmpp +++ /dev/null @@ -1,15 +0,0 @@ -sourceRoot: ../../../../../tools/ftl/processors/boards/stm32f4xx/templates -outputRoot: .. -dataRoot: . - -freemarkerLinks: { - lib: ../../../../../tools/ftl/libs -} - -data : { - doc1:xml ( - board.chcfg - { - } - ) -} diff --git a/drivers/boards/GENERIC_STM32_F072XB/cfg/board.chcfg b/drivers/boards/GENERIC_STM32_F072XB/cfg/board.chcfg deleted file mode 100644 index e6ceecb62e..0000000000 --- a/drivers/boards/GENERIC_STM32_F072XB/cfg/board.chcfg +++ /dev/null @@ -1,703 +0,0 @@ - - - - - resources/gencfg/processors/boards/stm32f0xx/templates - .. - 5.0.x - - ST STM32F072B-Discovery - ST_STM32F072B_DISCOVERY - - STM32F072xB - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/drivers/boards/GENERIC_STM32_F072XB/cfg/board.fmpp b/drivers/boards/GENERIC_STM32_F072XB/cfg/board.fmpp deleted file mode 100644 index 55cd396e41..0000000000 --- a/drivers/boards/GENERIC_STM32_F072XB/cfg/board.fmpp +++ /dev/null @@ -1,15 +0,0 @@ -sourceRoot: ../../../../../tools/ftl/processors/boards/stm32f0xx/templates -outputRoot: .. -dataRoot: . - -freemarkerLinks: { - lib: ../../../../../tools/ftl/libs -} - -data : { - doc1:xml ( - board.chcfg - { - } - ) -} diff --git a/drivers/boards/GENERIC_STM32_F303XC/board.c b/drivers/boards/GENERIC_STM32_F303XC/board.c deleted file mode 100644 index 9b0fc1b6b9..0000000000 --- a/drivers/boards/GENERIC_STM32_F303XC/board.c +++ /dev/null @@ -1,242 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * This file has been automatically generated using ChibiStudio board - * generator plugin. Do not edit manually. - */ - -#include "hal.h" -#include "stm32_gpio.h" - -/*===========================================================================*/ -/* Driver local definitions. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver exported variables. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver local variables and types. */ -/*===========================================================================*/ - -/** - * @brief Type of STM32 GPIO port setup. - */ -typedef struct { - uint32_t moder; - uint32_t otyper; - uint32_t ospeedr; - uint32_t pupdr; - uint32_t odr; - uint32_t afrl; - uint32_t afrh; -} gpio_setup_t; - -/** - * @brief Type of STM32 GPIO initialization data. - */ -typedef struct { -#if STM32_HAS_GPIOA || defined(__DOXYGEN__) - gpio_setup_t PAData; -#endif -#if STM32_HAS_GPIOB || defined(__DOXYGEN__) - gpio_setup_t PBData; -#endif -#if STM32_HAS_GPIOC || defined(__DOXYGEN__) - gpio_setup_t PCData; -#endif -#if STM32_HAS_GPIOD || defined(__DOXYGEN__) - gpio_setup_t PDData; -#endif -#if STM32_HAS_GPIOE || defined(__DOXYGEN__) - gpio_setup_t PEData; -#endif -#if STM32_HAS_GPIOF || defined(__DOXYGEN__) - gpio_setup_t PFData; -#endif -#if STM32_HAS_GPIOG || defined(__DOXYGEN__) - gpio_setup_t PGData; -#endif -#if STM32_HAS_GPIOH || defined(__DOXYGEN__) - gpio_setup_t PHData; -#endif -#if STM32_HAS_GPIOI || defined(__DOXYGEN__) - gpio_setup_t PIData; -#endif -#if STM32_HAS_GPIOJ || defined(__DOXYGEN__) - gpio_setup_t PJData; -#endif -#if STM32_HAS_GPIOK || defined(__DOXYGEN__) - gpio_setup_t PKData; -#endif -} gpio_config_t; - -/** - * @brief STM32 GPIO static initialization data. - */ -static const gpio_config_t gpio_default_config = { -#if STM32_HAS_GPIOA - {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, -#endif -#if STM32_HAS_GPIOB - {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, -#endif -#if STM32_HAS_GPIOC - {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, -#endif -#if STM32_HAS_GPIOD - {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, -#endif -#if STM32_HAS_GPIOE - {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, -#endif -#if STM32_HAS_GPIOF - {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, -#endif -#if STM32_HAS_GPIOG - {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, -#endif -#if STM32_HAS_GPIOH - {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, -#endif -#if STM32_HAS_GPIOI - {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}, -#endif -#if STM32_HAS_GPIOJ - {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, -#endif -#if STM32_HAS_GPIOK - {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} -#endif -}; - -/*===========================================================================*/ -/* Driver local functions. */ -/*===========================================================================*/ - -static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { - gpiop->OTYPER = config->otyper; - gpiop->OSPEEDR = config->ospeedr; - gpiop->PUPDR = config->pupdr; - gpiop->ODR = config->odr; - gpiop->AFRL = config->afrl; - gpiop->AFRH = config->afrh; - gpiop->MODER = config->moder; -} - -static void stm32_gpio_init(void) { - /* Enabling GPIO-related clocks, the mask comes from the - registry header file.*/ - rccResetAHB(STM32_GPIO_EN_MASK); - rccEnableAHB(STM32_GPIO_EN_MASK, true); - - /* Initializing all the defined GPIO ports.*/ -#if STM32_HAS_GPIOA - gpio_init(GPIOA, &gpio_default_config.PAData); -#endif -#if STM32_HAS_GPIOB - gpio_init(GPIOB, &gpio_default_config.PBData); -#endif -#if STM32_HAS_GPIOC - gpio_init(GPIOC, &gpio_default_config.PCData); -#endif -#if STM32_HAS_GPIOD - gpio_init(GPIOD, &gpio_default_config.PDData); -#endif -#if STM32_HAS_GPIOE - gpio_init(GPIOE, &gpio_default_config.PEData); -#endif -#if STM32_HAS_GPIOF - gpio_init(GPIOF, &gpio_default_config.PFData); -#endif -#if STM32_HAS_GPIOG - gpio_init(GPIOG, &gpio_default_config.PGData); -#endif -#if STM32_HAS_GPIOH - gpio_init(GPIOH, &gpio_default_config.PHData); -#endif -#if STM32_HAS_GPIOI - gpio_init(GPIOI, &gpio_default_config.PIData); -#endif -#if STM32_HAS_GPIOJ - gpio_init(GPIOJ, &gpio_default_config.PJData); -#endif -#if STM32_HAS_GPIOK - gpio_init(GPIOK, &gpio_default_config.PKData); -#endif -} - -void enter_bootloader_mode_if_requested(void); - -/** - * @brief Early initialization code. - * @details This initialization must be performed just after stack setup - * and before any other initialization. - */ -void __early_init(void) { - enter_bootloader_mode_if_requested(); - - stm32_gpio_init(); - stm32_clock_init(); -} - -#if HAL_USE_SDC || defined(__DOXYGEN__) -/** - * @brief SDC card detection. - */ -bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { - (void)sdcp; - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief SDC card write protection detection. - */ -bool sdc_lld_is_write_protected(SDCDriver *sdcp) { - (void)sdcp; - /* TODO: Fill the implementation.*/ - return false; -} -#endif /* HAL_USE_SDC */ - -#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) -/** - * @brief MMC_SPI card detection. - */ -bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { - (void)mmcp; - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief MMC_SPI card write protection detection. - */ -bool mmc_lld_is_write_protected(MMCDriver *mmcp) { - (void)mmcp; - /* TODO: Fill the implementation.*/ - return false; -} -#endif - -/** - * @brief Board-specific initialization code. - * @todo Add your board-specific code, if any. - */ -void boardInit(void) {} diff --git a/drivers/boards/GENERIC_STM32_F303XC/board.h b/drivers/boards/GENERIC_STM32_F303XC/board.h deleted file mode 100644 index 3579c82770..0000000000 --- a/drivers/boards/GENERIC_STM32_F303XC/board.h +++ /dev/null @@ -1,475 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _BOARD_H_ -#define _BOARD_H_ - -/* - * Setup for Generic STM32_F303 Board - */ - -/* - * Board identifier. - */ -#define BOARD_GENERIC_STM32_F303XC -#define BOARD_NAME "STM32_F303" - -/* - * Board oscillators-related settings. - * NOTE: LSE not fitted. - */ -#if !defined(STM32_LSECLK) -# define STM32_LSECLK 0U -#endif - -#define STM32_LSEDRV (3U << 3U) - -#if !defined(STM32_HSECLK) -# define STM32_HSECLK 8000000U -#endif - -// #define STM32_HSE_BYPASS - -/* - * MCU type as defined in the ST header. - */ -#define STM32F303xC - -/* - * IO pins assignments. - */ -#define GPIOA_PIN0 0U -#define GPIOA_PIN1 1U -#define GPIOA_PIN2 2U -#define GPIOA_PIN3 3U -#define GPIOA_PIN4 4U -#define GPIOA_PIN5 5U -#define GPIOA_PIN6 6U -#define GPIOA_PIN7 7U -#define GPIOA_PIN8 8U -#define GPIOA_PIN9 9U -#define GPIOA_PIN10 10U -#define GPIOA_USB_DM 11U -#define GPIOA_USB_DP 12U -#define GPIOA_SWDIO 13U -#define GPIOA_SWCLK 14U -#define GPIOA_PIN15 15U - -#define GPIOB_PIN0 0U -#define GPIOB_PIN1 1U -#define GPIOB_PIN2 2U -#define GPIOB_PIN3 3U -#define GPIOB_PIN4 4U -#define GPIOB_PIN5 5U -#define GPIOB_PIN6 6U -#define GPIOB_PIN7 7U -#define GPIOB_PIN8 8U -#define GPIOB_PIN9 9U -#define GPIOB_PIN10 10U -#define GPIOB_PIN11 11U -#define GPIOB_PIN12 12U -#define GPIOB_PIN13 13U -#define GPIOB_PIN14 14U -#define GPIOB_PIN15 15U - -#define GPIOC_PIN0 0U -#define GPIOC_PIN1 1U -#define GPIOC_PIN2 2U -#define GPIOC_PIN3 3U -#define GPIOC_PIN4 4U -#define GPIOC_PIN5 5U -#define GPIOC_PIN6 6U -#define GPIOC_PIN7 7U -#define GPIOC_PIN8 8U -#define GPIOC_PIN9 9U -#define GPIOC_PIN10 10U -#define GPIOC_PIN11 11U -#define GPIOC_PIN12 12U -#define GPIOC_PIN13 13U -#define GPIOC_PIN14 14U -#define GPIOC_PIN15 15U - -#define GPIOD_PIN0 0U -#define GPIOD_PIN1 1U -#define GPIOD_PIN2 2U -#define GPIOD_PIN3 3U -#define GPIOD_PIN4 4U -#define GPIOD_PIN5 5U -#define GPIOD_PIN6 6U -#define GPIOD_PIN7 7U -#define GPIOD_PIN8 8U -#define GPIOD_PIN9 9U -#define GPIOD_PIN10 10U -#define GPIOD_PIN11 11U -#define GPIOD_PIN12 12U -#define GPIOD_PIN13 13U -#define GPIOD_PIN14 14U -#define GPIOD_PIN15 15U - -#define GPIOE_PIN0 0U -#define GPIOE_PIN1 1U -#define GPIOE_PIN2 2U -#define GPIOE_PIN3 3U -#define GPIOE_PIN4 4U -#define GPIOE_PIN5 5U -#define GPIOE_PIN6 6U -#define GPIOE_PIN7 7U -#define GPIOE_PIN8 8U -#define GPIOE_PIN9 9U -#define GPIOE_PIN10 10U -#define GPIOE_PIN11 11U -#define GPIOE_PIN12 12U -#define GPIOE_PIN13 13U -#define GPIOE_PIN14 14U -#define GPIOE_PIN15 15U - -#define GPIOF_I2C2_SDA 0U -#define GPIOF_I2C2_SCL 1U -#define GPIOF_PIN2 2U -#define GPIOF_PIN3 3U -#define GPIOF_PIN4 4U -#define GPIOF_PIN5 5U -#define GPIOF_PIN6 6U -#define GPIOF_PIN7 7U -#define GPIOF_PIN8 8U -#define GPIOF_PIN9 9U -#define GPIOF_PIN10 10U -#define GPIOF_PIN11 11U -#define GPIOF_PIN12 12U -#define GPIOF_PIN13 13U -#define GPIOF_PIN14 14U -#define GPIOF_PIN15 15U - -#define GPIOG_PIN0 0U -#define GPIOG_PIN1 1U -#define GPIOG_PIN2 2U -#define GPIOG_PIN3 3U -#define GPIOG_PIN4 4U -#define GPIOG_PIN5 5U -#define GPIOG_PIN6 6U -#define GPIOG_PIN7 7U -#define GPIOG_PIN8 8U -#define GPIOG_PIN9 9U -#define GPIOG_PIN10 10U -#define GPIOG_PIN11 11U -#define GPIOG_PIN12 12U -#define GPIOG_PIN13 13U -#define GPIOG_PIN14 14U -#define GPIOG_PIN15 15U - -#define GPIOH_PIN0 0U -#define GPIOH_PIN1 1U -#define GPIOH_PIN2 2U -#define GPIOH_PIN3 3U -#define GPIOH_PIN4 4U -#define GPIOH_PIN5 5U -#define GPIOH_PIN6 6U -#define GPIOH_PIN7 7U -#define GPIOH_PIN8 8U -#define GPIOH_PIN9 9U -#define GPIOH_PIN10 10U -#define GPIOH_PIN11 11U -#define GPIOH_PIN12 12U -#define GPIOH_PIN13 13U -#define GPIOH_PIN14 14U -#define GPIOH_PIN15 15U - -/* - * IO lines assignments. - */ -#define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U) -#define LINE_USB_DM PAL_LINE(GPIOA, 11U) -#define LINE_USB_DP PAL_LINE(GPIOA, 12U) -#define LINE_SWDIO PAL_LINE(GPIOA, 13U) -#define LINE_SWCLK PAL_LINE(GPIOA, 14U) - -#define LINE_PIN6 PAL_LINE(GPIOF, 0U) -#define LINE_PIN7 PAL_LINE(GPIOF, 1U) - -#define LINE_CAPS_LOCK PAL_LINE(GPIOB, 7U) - -/* - * I/O ports initial setup, this configuration is established soon after reset - * in the initialization code. - * Please refer to the STM32 Reference Manual for details. - */ -#define PIN_MODE_INPUT(n) (0U << ((n)*2U)) -#define PIN_MODE_OUTPUT(n) (1U << ((n)*2U)) -#define PIN_MODE_ALTERNATE(n) (2U << ((n)*2U)) -#define PIN_MODE_ANALOG(n) (3U << ((n)*2U)) -#define PIN_ODR_LOW(n) (0U << (n)) -#define PIN_ODR_HIGH(n) (1U << (n)) -#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) -#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) -#define PIN_OSPEED_VERYLOW(n) (0U << ((n)*2U)) -#define PIN_OSPEED_LOW(n) (1U << ((n)*2U)) -#define PIN_OSPEED_MEDIUM(n) (2U << ((n)*2U)) -#define PIN_OSPEED_HIGH(n) (3U << ((n)*2U)) -#define PIN_PUPDR_FLOATING(n) (0U << ((n)*2U)) -#define PIN_PUPDR_PULLUP(n) (1U << ((n)*2U)) -#define PIN_PUPDR_PULLDOWN(n) (2U << ((n)*2U)) -#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) - -/* - * GPIOA setup: - * - * PA0 - NC - * PA1 - NC - * PA2 - COL1 - * PA3 - COL2 - * PA4 - SPEAKER1 - * PA5 - SPEAKER2 - * PA6 - COL3 - * PA7 - COL8 - * PA8 - COL6 - * PA9 - COL7 - * PA10 - ROW5 - * PA11 - USB_DM (alternate 14). - * PA12 - USB_DP (alternate 14). - * PA13 - SWDIO (alternate 0). - * PA14 - SWCLK (alternate 0). - * PA15 - ROW4 - */ -#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | PIN_MODE_ALTERNATE(GPIOA_PIN1) | PIN_MODE_INPUT(GPIOA_PIN2) | PIN_MODE_INPUT(GPIOA_PIN3) | PIN_MODE_INPUT(GPIOA_PIN4) | PIN_MODE_INPUT(GPIOA_PIN5) | PIN_MODE_INPUT(GPIOA_PIN6) | PIN_MODE_INPUT(GPIOA_PIN7) | PIN_MODE_INPUT(GPIOA_PIN8) | PIN_MODE_INPUT(GPIOA_PIN9) | PIN_MODE_INPUT(GPIOA_PIN10) | PIN_MODE_ALTERNATE(GPIOA_USB_DM) | PIN_MODE_ALTERNATE(GPIOA_USB_DP) | PIN_MODE_ALTERNATE(GPIOA_SWDIO) | PIN_MODE_ALTERNATE(GPIOA_SWCLK) | PIN_MODE_INPUT(GPIOA_PIN15)) -#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_PIN0) | PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) -#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_PIN0) | PIN_OSPEED_HIGH(GPIOA_PIN1) | PIN_OSPEED_VERYLOW(GPIOA_PIN2) | PIN_OSPEED_VERYLOW(GPIOA_PIN3) | PIN_OSPEED_VERYLOW(GPIOA_PIN4) | PIN_OSPEED_VERYLOW(GPIOA_PIN5) | PIN_OSPEED_VERYLOW(GPIOA_PIN6) | PIN_OSPEED_VERYLOW(GPIOA_PIN7) | PIN_OSPEED_VERYLOW(GPIOA_PIN8) | PIN_OSPEED_VERYLOW(GPIOA_PIN9) | PIN_OSPEED_VERYLOW(GPIOA_PIN10) | PIN_OSPEED_HIGH(GPIOA_USB_DM) | PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | PIN_OSPEED_HIGH(GPIOA_SWDIO) | PIN_OSPEED_HIGH(GPIOA_SWCLK) | PIN_OSPEED_VERYLOW(GPIOA_PIN15)) -#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_PIN0) | PIN_PUPDR_FLOATING(GPIOA_PIN1) | PIN_PUPDR_PULLUP(GPIOA_PIN2) | PIN_PUPDR_PULLUP(GPIOA_PIN3) | PIN_PUPDR_PULLUP(GPIOA_PIN4) | PIN_PUPDR_PULLUP(GPIOA_PIN5) | PIN_PUPDR_PULLUP(GPIOA_PIN6) | PIN_PUPDR_FLOATING(GPIOA_PIN7) | PIN_PUPDR_PULLUP(GPIOA_PIN8) | PIN_PUPDR_PULLUP(GPIOA_PIN9) | PIN_PUPDR_PULLUP(GPIOA_PIN10) | PIN_PUPDR_FLOATING(GPIOA_USB_DM) | PIN_PUPDR_FLOATING(GPIOA_USB_DP) | PIN_PUPDR_PULLUP(GPIOA_SWDIO) | PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | PIN_PUPDR_PULLUP(GPIOA_PIN15)) -#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_PIN0) | PIN_ODR_HIGH(GPIOA_PIN1) | PIN_ODR_HIGH(GPIOA_PIN2) | PIN_ODR_HIGH(GPIOA_PIN3) | PIN_ODR_HIGH(GPIOA_PIN4) | PIN_ODR_HIGH(GPIOA_PIN5) | PIN_ODR_HIGH(GPIOA_PIN6) | PIN_ODR_HIGH(GPIOA_PIN7) | PIN_ODR_HIGH(GPIOA_PIN8) | PIN_ODR_HIGH(GPIOA_PIN9) | PIN_ODR_HIGH(GPIOA_PIN10) | PIN_ODR_HIGH(GPIOA_USB_DM) | PIN_ODR_HIGH(GPIOA_USB_DP) | PIN_ODR_HIGH(GPIOA_SWDIO) | PIN_ODR_HIGH(GPIOA_SWCLK) | PIN_ODR_HIGH(GPIOA_PIN15)) -#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_PIN0, 0) | PIN_AFIO_AF(GPIOA_PIN1, 1) | PIN_AFIO_AF(GPIOA_PIN2, 0) | PIN_AFIO_AF(GPIOA_PIN3, 0) | PIN_AFIO_AF(GPIOA_PIN4, 0) | PIN_AFIO_AF(GPIOA_PIN5, 5) | PIN_AFIO_AF(GPIOA_PIN6, 5) | PIN_AFIO_AF(GPIOA_PIN7, 5)) -#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0) | PIN_AFIO_AF(GPIOA_PIN9, 0) | PIN_AFIO_AF(GPIOA_PIN10, 0) | PIN_AFIO_AF(GPIOA_USB_DM, 14) | PIN_AFIO_AF(GPIOA_USB_DP, 14) | PIN_AFIO_AF(GPIOA_SWDIO, 0) | PIN_AFIO_AF(GPIOA_SWCLK, 0) | PIN_AFIO_AF(GPIOA_PIN15, 0)) - -/* - * GPIOB setup: - * - * PB0 - PIN0 (input pullup). - * PB1 - PIN1 (input pullup). - * PB2 - PIN2 (input pullup). - * PB3 - PIN3 (alternate 0). - * PB4 - PIN4 (input pullup). - * PB5 - PIN5 (input pullup). - * PB6 - PIN6 LSM303DLHC_SCL (alternate 4). - * PB7 - PIN7 LSM303DLHC_SDA (alternate 4). - * PB8 - PIN8 (input pullup). - * PB9 - PIN9 (input pullup). - * PB10 - PIN10 (input pullup). - * PB11 - PIN11 (input pullup). - * PB12 - PIN12 (input pullup). - * PB13 - PIN13 (input pullup). - * PB14 - PIN14 (input pullup). - * PB15 - PIN15 (input pullup). - */ -#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | PIN_MODE_INPUT(GPIOB_PIN1) | PIN_MODE_INPUT(GPIOB_PIN2) | PIN_MODE_ALTERNATE(GPIOB_PIN3) | PIN_MODE_INPUT(GPIOB_PIN4) | PIN_MODE_INPUT(GPIOB_PIN5) | PIN_MODE_ALTERNATE(GPIOB_PIN6) | PIN_MODE_OUTPUT(GPIOB_PIN7) | PIN_MODE_INPUT(GPIOB_PIN8) | PIN_MODE_INPUT(GPIOB_PIN9) | PIN_MODE_INPUT(GPIOB_PIN10) | PIN_MODE_INPUT(GPIOB_PIN11) | PIN_MODE_INPUT(GPIOB_PIN12) | PIN_MODE_INPUT(GPIOB_PIN13) | PIN_MODE_INPUT(GPIOB_PIN14) | PIN_MODE_INPUT(GPIOB_PIN15)) -#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | PIN_OTYPE_OPENDRAIN(GPIOB_PIN6) | PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) -#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | PIN_OSPEED_VERYLOW(GPIOB_PIN1) | PIN_OSPEED_VERYLOW(GPIOB_PIN2) | PIN_OSPEED_HIGH(GPIOB_PIN3) | PIN_OSPEED_VERYLOW(GPIOB_PIN4) | PIN_OSPEED_VERYLOW(GPIOB_PIN5) | PIN_OSPEED_HIGH(GPIOB_PIN6) | PIN_OSPEED_VERYLOW(GPIOB_PIN7) | PIN_OSPEED_VERYLOW(GPIOB_PIN8) | PIN_OSPEED_VERYLOW(GPIOB_PIN9) | PIN_OSPEED_VERYLOW(GPIOB_PIN10) | PIN_OSPEED_VERYLOW(GPIOB_PIN11) | PIN_OSPEED_VERYLOW(GPIOB_PIN12) | PIN_OSPEED_VERYLOW(GPIOB_PIN13) | PIN_OSPEED_VERYLOW(GPIOB_PIN14) | PIN_OSPEED_VERYLOW(GPIOB_PIN15)) -#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | PIN_PUPDR_PULLUP(GPIOB_PIN1) | PIN_PUPDR_PULLUP(GPIOB_PIN2) | PIN_PUPDR_FLOATING(GPIOB_PIN3) | PIN_PUPDR_PULLUP(GPIOB_PIN4) | PIN_PUPDR_PULLUP(GPIOB_PIN5) | PIN_PUPDR_FLOATING(GPIOB_PIN6) | PIN_PUPDR_PULLDOWN(GPIOB_PIN7) | PIN_PUPDR_PULLUP(GPIOB_PIN8) | PIN_PUPDR_PULLUP(GPIOB_PIN9) | PIN_PUPDR_PULLUP(GPIOB_PIN10) | PIN_PUPDR_PULLUP(GPIOB_PIN11) | PIN_PUPDR_PULLUP(GPIOB_PIN12) | PIN_PUPDR_PULLUP(GPIOB_PIN13) | PIN_PUPDR_PULLUP(GPIOB_PIN14) | PIN_PUPDR_PULLUP(GPIOB_PIN15)) -#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | PIN_ODR_HIGH(GPIOB_PIN1) | PIN_ODR_HIGH(GPIOB_PIN2) | PIN_ODR_HIGH(GPIOB_PIN3) | PIN_ODR_HIGH(GPIOB_PIN4) | PIN_ODR_HIGH(GPIOB_PIN5) | PIN_ODR_HIGH(GPIOB_PIN6) | PIN_ODR_LOW(GPIOB_PIN7) | PIN_ODR_HIGH(GPIOB_PIN8) | PIN_ODR_HIGH(GPIOB_PIN9) | PIN_ODR_HIGH(GPIOB_PIN10) | PIN_ODR_HIGH(GPIOB_PIN11) | PIN_ODR_HIGH(GPIOB_PIN12) | PIN_ODR_HIGH(GPIOB_PIN13) | PIN_ODR_HIGH(GPIOB_PIN14) | PIN_ODR_HIGH(GPIOB_PIN15)) -#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0) | PIN_AFIO_AF(GPIOB_PIN1, 0) | PIN_AFIO_AF(GPIOB_PIN2, 0) | PIN_AFIO_AF(GPIOB_PIN3, 0) | PIN_AFIO_AF(GPIOB_PIN4, 0) | PIN_AFIO_AF(GPIOB_PIN5, 0) | PIN_AFIO_AF(GPIOB_PIN6, 4) | PIN_AFIO_AF(GPIOB_PIN7, 0)) -#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0) | PIN_AFIO_AF(GPIOB_PIN9, 0) | PIN_AFIO_AF(GPIOB_PIN10, 0) | PIN_AFIO_AF(GPIOB_PIN11, 0) | PIN_AFIO_AF(GPIOB_PIN12, 0) | PIN_AFIO_AF(GPIOB_PIN13, 0) | PIN_AFIO_AF(GPIOB_PIN14, 0) | PIN_AFIO_AF(GPIOB_PIN15, 0)) - -/* - * GPIOC setup: - * - * PC0 - PIN0 (input pullup). - * PC1 - PIN1 (input pullup). - * PC2 - PIN2 (input pullup). - * PC3 - PIN3 (input pullup). - * PC4 - PIN4 (input pullup). - * PC5 - PIN5 (input pullup). - * PC6 - PIN6 (input pullup). - * PC7 - PIN7 (input pullup). - * PC8 - PIN8 (input pullup). - * PC9 - PIN9 (input pullup). - * PC10 - PIN10 (input pullup). - * PC11 - PIN11 (input pullup). - * PC12 - PIN12 (input pullup). - * PC13 - PIN13 (input pullup). - * PC14 - PIN14 (input floating). - * PC15 - PIN15 (input floating). - */ -#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | PIN_MODE_INPUT(GPIOC_PIN1) | PIN_MODE_INPUT(GPIOC_PIN2) | PIN_MODE_INPUT(GPIOC_PIN3) | PIN_MODE_INPUT(GPIOC_PIN4) | PIN_MODE_INPUT(GPIOC_PIN5) | PIN_MODE_INPUT(GPIOC_PIN6) | PIN_MODE_INPUT(GPIOC_PIN7) | PIN_MODE_INPUT(GPIOC_PIN8) | PIN_MODE_INPUT(GPIOC_PIN9) | PIN_MODE_INPUT(GPIOC_PIN10) | PIN_MODE_INPUT(GPIOC_PIN11) | PIN_MODE_INPUT(GPIOC_PIN12) | PIN_MODE_INPUT(GPIOC_PIN13) | PIN_MODE_INPUT(GPIOC_PIN14) | PIN_MODE_INPUT(GPIOC_PIN15)) -#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) -#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOC_PIN0) | PIN_OSPEED_VERYLOW(GPIOC_PIN1) | PIN_OSPEED_VERYLOW(GPIOC_PIN2) | PIN_OSPEED_VERYLOW(GPIOC_PIN3) | PIN_OSPEED_VERYLOW(GPIOC_PIN4) | PIN_OSPEED_VERYLOW(GPIOC_PIN5) | PIN_OSPEED_VERYLOW(GPIOC_PIN6) | PIN_OSPEED_VERYLOW(GPIOC_PIN7) | PIN_OSPEED_VERYLOW(GPIOC_PIN8) | PIN_OSPEED_VERYLOW(GPIOC_PIN9) | PIN_OSPEED_VERYLOW(GPIOC_PIN10) | PIN_OSPEED_VERYLOW(GPIOC_PIN11) | PIN_OSPEED_VERYLOW(GPIOC_PIN12) | PIN_OSPEED_VERYLOW(GPIOC_PIN13) | PIN_OSPEED_HIGH(GPIOC_PIN14) | PIN_OSPEED_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | PIN_PUPDR_PULLUP(GPIOC_PIN1) | PIN_PUPDR_PULLUP(GPIOC_PIN2) | PIN_PUPDR_PULLUP(GPIOC_PIN3) | PIN_PUPDR_PULLUP(GPIOC_PIN4) | PIN_PUPDR_PULLUP(GPIOC_PIN5) | PIN_PUPDR_PULLUP(GPIOC_PIN6) | PIN_PUPDR_PULLUP(GPIOC_PIN7) | PIN_PUPDR_PULLUP(GPIOC_PIN8) | PIN_PUPDR_PULLUP(GPIOC_PIN9) | PIN_PUPDR_PULLUP(GPIOC_PIN10) | PIN_PUPDR_PULLUP(GPIOC_PIN11) | PIN_PUPDR_PULLUP(GPIOC_PIN12) | PIN_PUPDR_PULLUP(GPIOC_PIN13) | PIN_PUPDR_FLOATING(GPIOC_PIN14) | PIN_PUPDR_FLOATING(GPIOC_PIN15)) -#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | PIN_ODR_HIGH(GPIOC_PIN1) | PIN_ODR_HIGH(GPIOC_PIN2) | PIN_ODR_HIGH(GPIOC_PIN3) | PIN_ODR_HIGH(GPIOC_PIN4) | PIN_ODR_HIGH(GPIOC_PIN5) | PIN_ODR_HIGH(GPIOC_PIN6) | PIN_ODR_HIGH(GPIOC_PIN7) | PIN_ODR_HIGH(GPIOC_PIN8) | PIN_ODR_HIGH(GPIOC_PIN9) | PIN_ODR_HIGH(GPIOC_PIN10) | PIN_ODR_HIGH(GPIOC_PIN11) | PIN_ODR_HIGH(GPIOC_PIN12) | PIN_ODR_HIGH(GPIOC_PIN13) | PIN_ODR_HIGH(GPIOC_PIN14) | PIN_ODR_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0) | PIN_AFIO_AF(GPIOC_PIN1, 0) | PIN_AFIO_AF(GPIOC_PIN2, 0) | PIN_AFIO_AF(GPIOC_PIN3, 0) | PIN_AFIO_AF(GPIOC_PIN4, 0) | PIN_AFIO_AF(GPIOC_PIN5, 0) | PIN_AFIO_AF(GPIOC_PIN6, 0) | PIN_AFIO_AF(GPIOC_PIN7, 0)) -#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0) | PIN_AFIO_AF(GPIOC_PIN9, 0) | PIN_AFIO_AF(GPIOC_PIN10, 0) | PIN_AFIO_AF(GPIOC_PIN11, 0) | PIN_AFIO_AF(GPIOC_PIN12, 0) | PIN_AFIO_AF(GPIOC_PIN13, 0) | PIN_AFIO_AF(GPIOC_PIN14, 0) | PIN_AFIO_AF(GPIOC_PIN15, 0)) - -/* - * GPIOD setup: - * - * PD0 - PIN0 (input pullup). - * PD1 - PIN1 (input pullup). - * PD2 - PIN2 (input pullup). - * PD3 - PIN3 (input pullup). - * PD4 - PIN4 (input pullup). - * PD5 - PIN5 (input pullup). - * PD6 - PIN6 (input pullup). - * PD7 - PIN7 (input pullup). - * PD8 - PIN8 (input pullup). - * PD9 - PIN9 (input pullup). - * PD11 - PIN10 (input pullup). - * PD11 - PIN11 (input pullup). - * PD12 - PIN12 (input pullup). - * PD13 - PIN13 (input pullup). - * PD14 - PIN14 (input pullup). - * PD15 - PIN15 (input pullup). - */ -#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | PIN_MODE_INPUT(GPIOD_PIN1) | PIN_MODE_INPUT(GPIOD_PIN2) | PIN_MODE_INPUT(GPIOD_PIN3) | PIN_MODE_INPUT(GPIOD_PIN4) | PIN_MODE_INPUT(GPIOD_PIN5) | PIN_MODE_INPUT(GPIOD_PIN6) | PIN_MODE_INPUT(GPIOD_PIN7) | PIN_MODE_INPUT(GPIOD_PIN8) | PIN_MODE_INPUT(GPIOD_PIN9) | PIN_MODE_INPUT(GPIOD_PIN10) | PIN_MODE_INPUT(GPIOD_PIN11) | PIN_MODE_INPUT(GPIOD_PIN12) | PIN_MODE_INPUT(GPIOD_PIN13) | PIN_MODE_INPUT(GPIOD_PIN14) | PIN_MODE_INPUT(GPIOD_PIN15)) -#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) -#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | PIN_OSPEED_VERYLOW(GPIOD_PIN1) | PIN_OSPEED_VERYLOW(GPIOD_PIN2) | PIN_OSPEED_VERYLOW(GPIOD_PIN3) | PIN_OSPEED_VERYLOW(GPIOD_PIN4) | PIN_OSPEED_VERYLOW(GPIOD_PIN5) | PIN_OSPEED_VERYLOW(GPIOD_PIN6) | PIN_OSPEED_VERYLOW(GPIOD_PIN7) | PIN_OSPEED_VERYLOW(GPIOD_PIN8) | PIN_OSPEED_VERYLOW(GPIOD_PIN9) | PIN_OSPEED_VERYLOW(GPIOD_PIN10) | PIN_OSPEED_VERYLOW(GPIOD_PIN11) | PIN_OSPEED_VERYLOW(GPIOD_PIN12) | PIN_OSPEED_VERYLOW(GPIOD_PIN13) | PIN_OSPEED_VERYLOW(GPIOD_PIN14) | PIN_OSPEED_VERYLOW(GPIOD_PIN15)) -#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | PIN_PUPDR_PULLUP(GPIOD_PIN1) | PIN_PUPDR_PULLUP(GPIOD_PIN2) | PIN_PUPDR_PULLUP(GPIOD_PIN3) | PIN_PUPDR_PULLUP(GPIOD_PIN4) | PIN_PUPDR_PULLUP(GPIOD_PIN5) | PIN_PUPDR_PULLUP(GPIOD_PIN6) | PIN_PUPDR_PULLUP(GPIOD_PIN7) | PIN_PUPDR_PULLUP(GPIOD_PIN8) | PIN_PUPDR_PULLUP(GPIOD_PIN9) | PIN_PUPDR_PULLUP(GPIOD_PIN10) | PIN_PUPDR_PULLUP(GPIOD_PIN11) | PIN_PUPDR_PULLUP(GPIOD_PIN12) | PIN_PUPDR_PULLUP(GPIOD_PIN13) | PIN_PUPDR_PULLUP(GPIOD_PIN14) | PIN_PUPDR_PULLUP(GPIOD_PIN15)) -#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | PIN_ODR_HIGH(GPIOD_PIN1) | PIN_ODR_HIGH(GPIOD_PIN2) | PIN_ODR_HIGH(GPIOD_PIN3) | PIN_ODR_HIGH(GPIOD_PIN4) | PIN_ODR_HIGH(GPIOD_PIN5) | PIN_ODR_HIGH(GPIOD_PIN6) | PIN_ODR_HIGH(GPIOD_PIN7) | PIN_ODR_HIGH(GPIOD_PIN8) | PIN_ODR_HIGH(GPIOD_PIN9) | PIN_ODR_HIGH(GPIOD_PIN10) | PIN_ODR_HIGH(GPIOD_PIN11) | PIN_ODR_HIGH(GPIOD_PIN12) | PIN_ODR_HIGH(GPIOD_PIN13) | PIN_ODR_HIGH(GPIOD_PIN14) | PIN_ODR_HIGH(GPIOD_PIN15)) -#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0) | PIN_AFIO_AF(GPIOD_PIN1, 0) | PIN_AFIO_AF(GPIOD_PIN2, 0) | PIN_AFIO_AF(GPIOD_PIN3, 0) | PIN_AFIO_AF(GPIOD_PIN4, 0) | PIN_AFIO_AF(GPIOD_PIN5, 0) | PIN_AFIO_AF(GPIOD_PIN6, 0) | PIN_AFIO_AF(GPIOD_PIN7, 0)) -#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0) | PIN_AFIO_AF(GPIOD_PIN9, 0) | PIN_AFIO_AF(GPIOD_PIN10, 0) | PIN_AFIO_AF(GPIOD_PIN11, 0) | PIN_AFIO_AF(GPIOD_PIN12, 0) | PIN_AFIO_AF(GPIOD_PIN13, 0) | PIN_AFIO_AF(GPIOD_PIN14, 0) | PIN_AFIO_AF(GPIOD_PIN15, 0)) - -/* - * GPIOE setup: - * - * PE0 - PIN0 (input pullup). - * PE1 - PIN1 (input pullup). - * PE2 - PIN2 (input pullup). - * PE3 - PIN3 L3GD20_CS (output pushpull maximum). - * PE4 - PIN4 (input pullup). - * PE5 - PIN5 (input pullup). - * PE6 - PIN6 (input pullup). - * PE7 - PIN7 (input pullup). - * PE8 - PIN8 (output pushpull maximum). - * PE9 - PIN9 (output pushpull maximum). - * PE10 - PIN10 (output pushpull maximum). - * PE11 - PIN11 (output pushpull maximum). - * PE12 - PIN12 (output pushpull maximum). - * PE13 - PIN13 (output pushpull maximum). - * PE14 - PIN14 (output pushpull maximum). - * PE15 - PIN15 (output pushpull maximum). - */ -#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | PIN_MODE_INPUT(GPIOE_PIN1) | PIN_MODE_INPUT(GPIOE_PIN2) | PIN_MODE_OUTPUT(GPIOE_PIN3) | PIN_MODE_INPUT(GPIOE_PIN4) | PIN_MODE_INPUT(GPIOE_PIN5) | PIN_MODE_INPUT(GPIOE_PIN6) | PIN_MODE_INPUT(GPIOE_PIN7) | PIN_MODE_OUTPUT(GPIOE_PIN8) | PIN_MODE_OUTPUT(GPIOE_PIN9) | PIN_MODE_OUTPUT(GPIOE_PIN10) | PIN_MODE_OUTPUT(GPIOE_PIN11) | PIN_MODE_OUTPUT(GPIOE_PIN12) | PIN_MODE_OUTPUT(GPIOE_PIN13) | PIN_MODE_OUTPUT(GPIOE_PIN14) | PIN_MODE_OUTPUT(GPIOE_PIN15)) -#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) -#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | PIN_OSPEED_VERYLOW(GPIOE_PIN1) | PIN_OSPEED_VERYLOW(GPIOE_PIN2) | PIN_OSPEED_HIGH(GPIOE_PIN3) | PIN_OSPEED_VERYLOW(GPIOE_PIN4) | PIN_OSPEED_VERYLOW(GPIOE_PIN5) | PIN_OSPEED_VERYLOW(GPIOE_PIN6) | PIN_OSPEED_VERYLOW(GPIOE_PIN7) | PIN_OSPEED_HIGH(GPIOE_PIN8) | PIN_OSPEED_HIGH(GPIOE_PIN9) | PIN_OSPEED_HIGH(GPIOE_PIN10) | PIN_OSPEED_HIGH(GPIOE_PIN11) | PIN_OSPEED_HIGH(GPIOE_PIN12) | PIN_OSPEED_HIGH(GPIOE_PIN13) | PIN_OSPEED_HIGH(GPIOE_PIN14) | PIN_OSPEED_HIGH(GPIOE_PIN15)) -#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | PIN_PUPDR_PULLUP(GPIOE_PIN1) | PIN_PUPDR_PULLUP(GPIOE_PIN2) | PIN_PUPDR_FLOATING(GPIOE_PIN3) | PIN_PUPDR_PULLUP(GPIOE_PIN4) | PIN_PUPDR_PULLUP(GPIOE_PIN5) | PIN_PUPDR_PULLUP(GPIOE_PIN6) | PIN_PUPDR_PULLUP(GPIOE_PIN7) | PIN_PUPDR_PULLUP(GPIOE_PIN8) | PIN_PUPDR_PULLUP(GPIOE_PIN9) | PIN_PUPDR_PULLUP(GPIOE_PIN10) | PIN_PUPDR_FLOATING(GPIOE_PIN11) | PIN_PUPDR_PULLUP(GPIOE_PIN12) | PIN_PUPDR_FLOATING(GPIOE_PIN13) | PIN_PUPDR_FLOATING(GPIOE_PIN14) | PIN_PUPDR_FLOATING(GPIOE_PIN15)) -#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | PIN_ODR_HIGH(GPIOE_PIN1) | PIN_ODR_HIGH(GPIOE_PIN2) | PIN_ODR_HIGH(GPIOE_PIN3) | PIN_ODR_HIGH(GPIOE_PIN4) | PIN_ODR_HIGH(GPIOE_PIN5) | PIN_ODR_HIGH(GPIOE_PIN6) | PIN_ODR_HIGH(GPIOE_PIN7) | PIN_ODR_LOW(GPIOE_PIN8) | PIN_ODR_LOW(GPIOE_PIN9) | PIN_ODR_LOW(GPIOE_PIN10) | PIN_ODR_LOW(GPIOE_PIN11) | PIN_ODR_LOW(GPIOE_PIN12) | PIN_ODR_LOW(GPIOE_PIN13) | PIN_ODR_LOW(GPIOE_PIN14) | PIN_ODR_LOW(GPIOE_PIN15)) -#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0) | PIN_AFIO_AF(GPIOE_PIN1, 0) | PIN_AFIO_AF(GPIOE_PIN2, 0) | PIN_AFIO_AF(GPIOE_PIN3, 0) | PIN_AFIO_AF(GPIOE_PIN4, 0) | PIN_AFIO_AF(GPIOE_PIN5, 0) | PIN_AFIO_AF(GPIOE_PIN6, 0) | PIN_AFIO_AF(GPIOE_PIN7, 0)) -#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0) | PIN_AFIO_AF(GPIOE_PIN9, 0) | PIN_AFIO_AF(GPIOE_PIN10, 0) | PIN_AFIO_AF(GPIOE_PIN11, 0) | PIN_AFIO_AF(GPIOE_PIN12, 0) | PIN_AFIO_AF(GPIOE_PIN13, 0) | PIN_AFIO_AF(GPIOE_PIN14, 0) | PIN_AFIO_AF(GPIOE_PIN15, 0)) - -/* - * GPIOF setup: - * - * PF0 - I2C2_SDA (input floating). - * PF1 - I2C2_SCL (input floating). - * PF2 - PIN2 (input pullup). - * PF3 - PIN3 (input pullup). - * PF4 - PIN4 (input pullup). - * PF5 - PIN5 (input pullup). - * PF6 - PIN6 (input pullup). - * PF7 - PIN7 (input pullup). - * PF8 - PIN8 (input pullup). - * PF9 - PIN9 (input pullup). - * PF10 - PIN10 (input pullup). - * PF11 - PIN11 (input pullup). - * PF12 - PIN12 (input pullup). - * PF13 - PIN13 (input pullup). - * PF14 - PIN14 (input pullup). - * PF15 - PIN15 (input pullup). - */ -#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_I2C2_SDA) | PIN_MODE_INPUT(GPIOF_I2C2_SCL) | PIN_MODE_INPUT(GPIOF_PIN2) | PIN_MODE_INPUT(GPIOF_PIN3) | PIN_MODE_INPUT(GPIOF_PIN4) | PIN_MODE_INPUT(GPIOF_PIN5) | PIN_MODE_INPUT(GPIOF_PIN6) | PIN_MODE_INPUT(GPIOF_PIN7) | PIN_MODE_INPUT(GPIOF_PIN8) | PIN_MODE_INPUT(GPIOF_PIN9) | PIN_MODE_INPUT(GPIOF_PIN10) | PIN_MODE_INPUT(GPIOF_PIN11) | PIN_MODE_INPUT(GPIOF_PIN12) | PIN_MODE_INPUT(GPIOF_PIN13) | PIN_MODE_INPUT(GPIOF_PIN14) | PIN_MODE_INPUT(GPIOF_PIN15)) -#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SDA) | PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SCL) | PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) -#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_HIGH(GPIOF_I2C2_SDA) | PIN_OSPEED_HIGH(GPIOF_I2C2_SCL) | PIN_OSPEED_VERYLOW(GPIOF_PIN2) | PIN_OSPEED_VERYLOW(GPIOF_PIN3) | PIN_OSPEED_VERYLOW(GPIOF_PIN4) | PIN_OSPEED_VERYLOW(GPIOF_PIN5) | PIN_OSPEED_VERYLOW(GPIOF_PIN6) | PIN_OSPEED_VERYLOW(GPIOF_PIN7) | PIN_OSPEED_VERYLOW(GPIOF_PIN8) | PIN_OSPEED_VERYLOW(GPIOF_PIN9) | PIN_OSPEED_VERYLOW(GPIOF_PIN10) | PIN_OSPEED_VERYLOW(GPIOF_PIN11) | PIN_OSPEED_VERYLOW(GPIOF_PIN12) | PIN_OSPEED_VERYLOW(GPIOF_PIN13) | PIN_OSPEED_VERYLOW(GPIOF_PIN14) | PIN_OSPEED_VERYLOW(GPIOF_PIN15)) -#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_I2C2_SDA) | PIN_PUPDR_FLOATING(GPIOF_I2C2_SCL) | PIN_PUPDR_PULLUP(GPIOF_PIN2) | PIN_PUPDR_PULLUP(GPIOF_PIN3) | PIN_PUPDR_PULLUP(GPIOF_PIN4) | PIN_PUPDR_PULLUP(GPIOF_PIN5) | PIN_PUPDR_PULLUP(GPIOF_PIN6) | PIN_PUPDR_PULLUP(GPIOF_PIN7) | PIN_PUPDR_PULLUP(GPIOF_PIN8) | PIN_PUPDR_PULLUP(GPIOF_PIN9) | PIN_PUPDR_PULLUP(GPIOF_PIN10) | PIN_PUPDR_PULLUP(GPIOF_PIN11) | PIN_PUPDR_PULLUP(GPIOF_PIN12) | PIN_PUPDR_PULLUP(GPIOF_PIN13) | PIN_PUPDR_PULLUP(GPIOF_PIN14) | PIN_PUPDR_PULLUP(GPIOF_PIN15)) -#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_I2C2_SDA) | PIN_ODR_HIGH(GPIOF_I2C2_SCL) | PIN_ODR_HIGH(GPIOF_PIN2) | PIN_ODR_HIGH(GPIOF_PIN3) | PIN_ODR_HIGH(GPIOF_PIN4) | PIN_ODR_HIGH(GPIOF_PIN5) | PIN_ODR_HIGH(GPIOF_PIN6) | PIN_ODR_HIGH(GPIOF_PIN7) | PIN_ODR_HIGH(GPIOF_PIN8) | PIN_ODR_HIGH(GPIOF_PIN9) | PIN_ODR_HIGH(GPIOF_PIN10) | PIN_ODR_HIGH(GPIOF_PIN11) | PIN_ODR_HIGH(GPIOF_PIN12) | PIN_ODR_HIGH(GPIOF_PIN13) | PIN_ODR_HIGH(GPIOF_PIN14) | PIN_ODR_HIGH(GPIOF_PIN15)) -#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_I2C2_SDA, 0) | PIN_AFIO_AF(GPIOF_I2C2_SCL, 0) | PIN_AFIO_AF(GPIOF_PIN2, 0) | PIN_AFIO_AF(GPIOF_PIN3, 0) | PIN_AFIO_AF(GPIOF_PIN4, 0) | PIN_AFIO_AF(GPIOF_PIN5, 0) | PIN_AFIO_AF(GPIOF_PIN6, 0) | PIN_AFIO_AF(GPIOF_PIN7, 0)) -#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0) | PIN_AFIO_AF(GPIOF_PIN9, 0) | PIN_AFIO_AF(GPIOF_PIN10, 0) | PIN_AFIO_AF(GPIOF_PIN11, 0) | PIN_AFIO_AF(GPIOF_PIN12, 0) | PIN_AFIO_AF(GPIOF_PIN13, 0) | PIN_AFIO_AF(GPIOF_PIN14, 0) | PIN_AFIO_AF(GPIOF_PIN15, 0)) - -/* - * GPIOG setup: - * - * PG0 - PIN0 (input pullup). - * PG1 - PIN1 (input pullup). - * PG2 - PIN2 (input pullup). - * PG3 - PIN3 (input pullup). - * PG4 - PIN4 (input pullup). - * PG5 - PIN5 (input pullup). - * PG6 - PIN6 (input pullup). - * PG7 - PIN7 (input pullup). - * PG8 - PIN8 (input pullup). - * PG9 - PIN9 (input pullup). - * PG10 - PIN10 (input pullup). - * PG11 - PIN11 (input pullup). - * PG12 - PIN12 (input pullup). - * PG13 - PIN13 (input pullup). - * PG14 - PIN14 (input pullup). - * PG15 - PIN15 (input pullup). - */ -#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | PIN_MODE_INPUT(GPIOG_PIN1) | PIN_MODE_INPUT(GPIOG_PIN2) | PIN_MODE_INPUT(GPIOG_PIN3) | PIN_MODE_INPUT(GPIOG_PIN4) | PIN_MODE_INPUT(GPIOG_PIN5) | PIN_MODE_INPUT(GPIOG_PIN6) | PIN_MODE_INPUT(GPIOG_PIN7) | PIN_MODE_INPUT(GPIOG_PIN8) | PIN_MODE_INPUT(GPIOG_PIN9) | PIN_MODE_INPUT(GPIOG_PIN10) | PIN_MODE_INPUT(GPIOG_PIN11) | PIN_MODE_INPUT(GPIOG_PIN12) | PIN_MODE_INPUT(GPIOG_PIN13) | PIN_MODE_INPUT(GPIOG_PIN14) | PIN_MODE_INPUT(GPIOG_PIN15)) -#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) -#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_PIN0) | PIN_OSPEED_VERYLOW(GPIOG_PIN1) | PIN_OSPEED_VERYLOW(GPIOG_PIN2) | PIN_OSPEED_VERYLOW(GPIOG_PIN3) | PIN_OSPEED_VERYLOW(GPIOG_PIN4) | PIN_OSPEED_VERYLOW(GPIOG_PIN5) | PIN_OSPEED_VERYLOW(GPIOG_PIN6) | PIN_OSPEED_VERYLOW(GPIOG_PIN7) | PIN_OSPEED_VERYLOW(GPIOG_PIN8) | PIN_OSPEED_VERYLOW(GPIOG_PIN9) | PIN_OSPEED_VERYLOW(GPIOG_PIN10) | PIN_OSPEED_VERYLOW(GPIOG_PIN11) | PIN_OSPEED_VERYLOW(GPIOG_PIN12) | PIN_OSPEED_VERYLOW(GPIOG_PIN13) | PIN_OSPEED_VERYLOW(GPIOG_PIN14) | PIN_OSPEED_VERYLOW(GPIOG_PIN15)) -#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | PIN_PUPDR_PULLUP(GPIOG_PIN1) | PIN_PUPDR_PULLUP(GPIOG_PIN2) | PIN_PUPDR_PULLUP(GPIOG_PIN3) | PIN_PUPDR_PULLUP(GPIOG_PIN4) | PIN_PUPDR_PULLUP(GPIOG_PIN5) | PIN_PUPDR_PULLUP(GPIOG_PIN6) | PIN_PUPDR_PULLUP(GPIOG_PIN7) | PIN_PUPDR_PULLUP(GPIOG_PIN8) | PIN_PUPDR_PULLUP(GPIOG_PIN9) | PIN_PUPDR_PULLUP(GPIOG_PIN10) | PIN_PUPDR_PULLUP(GPIOG_PIN11) | PIN_PUPDR_PULLUP(GPIOG_PIN12) | PIN_PUPDR_PULLUP(GPIOG_PIN13) | PIN_PUPDR_PULLUP(GPIOG_PIN14) | PIN_PUPDR_PULLUP(GPIOG_PIN15)) -#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | PIN_ODR_HIGH(GPIOG_PIN1) | PIN_ODR_HIGH(GPIOG_PIN2) | PIN_ODR_HIGH(GPIOG_PIN3) | PIN_ODR_HIGH(GPIOG_PIN4) | PIN_ODR_HIGH(GPIOG_PIN5) | PIN_ODR_HIGH(GPIOG_PIN6) | PIN_ODR_HIGH(GPIOG_PIN7) | PIN_ODR_HIGH(GPIOG_PIN8) | PIN_ODR_HIGH(GPIOG_PIN9) | PIN_ODR_HIGH(GPIOG_PIN10) | PIN_ODR_HIGH(GPIOG_PIN11) | PIN_ODR_HIGH(GPIOG_PIN12) | PIN_ODR_HIGH(GPIOG_PIN13) | PIN_ODR_HIGH(GPIOG_PIN14) | PIN_ODR_HIGH(GPIOG_PIN15)) -#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0) | PIN_AFIO_AF(GPIOG_PIN1, 0) | PIN_AFIO_AF(GPIOG_PIN2, 0) | PIN_AFIO_AF(GPIOG_PIN3, 0) | PIN_AFIO_AF(GPIOG_PIN4, 0) | PIN_AFIO_AF(GPIOG_PIN5, 0) | PIN_AFIO_AF(GPIOG_PIN6, 0) | PIN_AFIO_AF(GPIOG_PIN7, 0)) -#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0) | PIN_AFIO_AF(GPIOG_PIN9, 0) | PIN_AFIO_AF(GPIOG_PIN10, 0) | PIN_AFIO_AF(GPIOG_PIN11, 0) | PIN_AFIO_AF(GPIOG_PIN12, 0) | PIN_AFIO_AF(GPIOG_PIN13, 0) | PIN_AFIO_AF(GPIOG_PIN14, 0) | PIN_AFIO_AF(GPIOG_PIN15, 0)) - -/* - * GPIOH setup: - * - * PH0 - PIN0 (input pullup). - * PH1 - PIN1 (input pullup). - * PH2 - PIN2 (input pullup). - * PH3 - PIN3 (input pullup). - * PH4 - PIN4 (input pullup). - * PH5 - PIN5 (input pullup). - * PH6 - PIN6 (input pullup). - * PH7 - PIN7 (input pullup). - * PH8 - PIN8 (input pullup). - * PH9 - PIN9 (input pullup). - * PH10 - PIN10 (input pullup). - * PH11 - PIN11 (input pullup). - * PH12 - PIN12 (input pullup). - * PH13 - PIN13 (input pullup). - * PH14 - PIN14 (input pullup). - * PH15 - PIN15 (input pullup). - */ -#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_PIN0) | PIN_MODE_INPUT(GPIOH_PIN1) | PIN_MODE_INPUT(GPIOH_PIN2) | PIN_MODE_INPUT(GPIOH_PIN3) | PIN_MODE_INPUT(GPIOH_PIN4) | PIN_MODE_INPUT(GPIOH_PIN5) | PIN_MODE_INPUT(GPIOH_PIN6) | PIN_MODE_INPUT(GPIOH_PIN7) | PIN_MODE_INPUT(GPIOH_PIN8) | PIN_MODE_INPUT(GPIOH_PIN9) | PIN_MODE_INPUT(GPIOH_PIN10) | PIN_MODE_INPUT(GPIOH_PIN11) | PIN_MODE_INPUT(GPIOH_PIN12) | PIN_MODE_INPUT(GPIOH_PIN13) | PIN_MODE_INPUT(GPIOH_PIN14) | PIN_MODE_INPUT(GPIOH_PIN15)) -#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_PIN0) | PIN_OTYPE_PUSHPULL(GPIOH_PIN1) | PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) -#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOH_PIN0) | PIN_OSPEED_VERYLOW(GPIOH_PIN1) | PIN_OSPEED_VERYLOW(GPIOH_PIN2) | PIN_OSPEED_VERYLOW(GPIOH_PIN3) | PIN_OSPEED_VERYLOW(GPIOH_PIN4) | PIN_OSPEED_VERYLOW(GPIOH_PIN5) | PIN_OSPEED_VERYLOW(GPIOH_PIN6) | PIN_OSPEED_VERYLOW(GPIOH_PIN7) | PIN_OSPEED_VERYLOW(GPIOH_PIN8) | PIN_OSPEED_VERYLOW(GPIOH_PIN9) | PIN_OSPEED_VERYLOW(GPIOH_PIN10) | PIN_OSPEED_VERYLOW(GPIOH_PIN11) | PIN_OSPEED_VERYLOW(GPIOH_PIN12) | PIN_OSPEED_VERYLOW(GPIOH_PIN13) | PIN_OSPEED_VERYLOW(GPIOH_PIN14) | PIN_OSPEED_VERYLOW(GPIOH_PIN15)) -#define VAL_GPIOH_PUPDR (PIN_PUPDR_PULLUP(GPIOH_PIN0) | PIN_PUPDR_PULLUP(GPIOH_PIN1) | PIN_PUPDR_PULLUP(GPIOH_PIN2) | PIN_PUPDR_PULLUP(GPIOH_PIN3) | PIN_PUPDR_PULLUP(GPIOH_PIN4) | PIN_PUPDR_PULLUP(GPIOH_PIN5) | PIN_PUPDR_PULLUP(GPIOH_PIN6) | PIN_PUPDR_PULLUP(GPIOH_PIN7) | PIN_PUPDR_PULLUP(GPIOH_PIN8) | PIN_PUPDR_PULLUP(GPIOH_PIN9) | PIN_PUPDR_PULLUP(GPIOH_PIN10) | PIN_PUPDR_PULLUP(GPIOH_PIN11) | PIN_PUPDR_PULLUP(GPIOH_PIN12) | PIN_PUPDR_PULLUP(GPIOH_PIN13) | PIN_PUPDR_PULLUP(GPIOH_PIN14) | PIN_PUPDR_PULLUP(GPIOH_PIN15)) -#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_PIN0) | PIN_ODR_HIGH(GPIOH_PIN1) | PIN_ODR_HIGH(GPIOH_PIN2) | PIN_ODR_HIGH(GPIOH_PIN3) | PIN_ODR_HIGH(GPIOH_PIN4) | PIN_ODR_HIGH(GPIOH_PIN5) | PIN_ODR_HIGH(GPIOH_PIN6) | PIN_ODR_HIGH(GPIOH_PIN7) | PIN_ODR_HIGH(GPIOH_PIN8) | PIN_ODR_HIGH(GPIOH_PIN9) | PIN_ODR_HIGH(GPIOH_PIN10) | PIN_ODR_HIGH(GPIOH_PIN11) | PIN_ODR_HIGH(GPIOH_PIN12) | PIN_ODR_HIGH(GPIOH_PIN13) | PIN_ODR_HIGH(GPIOH_PIN14) | PIN_ODR_HIGH(GPIOH_PIN15)) -#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_PIN0, 0) | PIN_AFIO_AF(GPIOH_PIN1, 0) | PIN_AFIO_AF(GPIOH_PIN2, 0) | PIN_AFIO_AF(GPIOH_PIN3, 0) | PIN_AFIO_AF(GPIOH_PIN4, 0) | PIN_AFIO_AF(GPIOH_PIN5, 0) | PIN_AFIO_AF(GPIOH_PIN6, 0) | PIN_AFIO_AF(GPIOH_PIN7, 0)) -#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0) | PIN_AFIO_AF(GPIOH_PIN9, 0) | PIN_AFIO_AF(GPIOH_PIN10, 0) | PIN_AFIO_AF(GPIOH_PIN11, 0) | PIN_AFIO_AF(GPIOH_PIN12, 0) | PIN_AFIO_AF(GPIOH_PIN13, 0) | PIN_AFIO_AF(GPIOH_PIN14, 0) | PIN_AFIO_AF(GPIOH_PIN15, 0)) - -/* - * USB bus activation macro, required by the USB driver. - */ -// #define usb_lld_connect_bus(usbp) -#define usb_lld_connect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_ALTERNATE(14))) -// #define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT) -/* - * USB bus de-activation macro, required by the USB driver. - */ -// #define usb_lld_disconnect_bus(usbp) -#define usb_lld_disconnect_bus(usbp) \ - (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)); \ - palClearPad(GPIOA, GPIOA_USB_DP) -// #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12) - -#if !defined(_FROM_ASM_) -# ifdef __cplusplus -extern "C" { -# endif -void boardInit(void); -# ifdef __cplusplus -} -# endif -#endif /* _FROM_ASM_ */ - -#endif /* _BOARD_H_ */ diff --git a/drivers/boards/GENERIC_STM32_F303XC/board.mk b/drivers/boards/GENERIC_STM32_F303XC/board.mk deleted file mode 100644 index 43377629a3..0000000000 --- a/drivers/boards/GENERIC_STM32_F303XC/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC diff --git a/drivers/boards/IC_TEENSY_3_1/board.mk b/drivers/boards/IC_TEENSY_3_1/board.mk deleted file mode 100644 index 62f5b751c7..0000000000 --- a/drivers/boards/IC_TEENSY_3_1/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/IC_TEENSY_3_1/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/IC_TEENSY_3_1 diff --git a/drivers/boards/STM32_F103_STM32DUINO/board.mk b/drivers/boards/STM32_F103_STM32DUINO/board.mk deleted file mode 100644 index 81141bdfd9..0000000000 --- a/drivers/boards/STM32_F103_STM32DUINO/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/STM32_F103_STM32DUINO/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/STM32_F103_STM32DUINO diff --git a/drivers/chibios/ws2812_pwm.c b/drivers/chibios/ws2812_pwm.c index 7113db11e0..bfb44ce4a4 100644 --- a/drivers/chibios/ws2812_pwm.c +++ b/drivers/chibios/ws2812_pwm.c @@ -23,6 +23,9 @@ #ifndef WS2812_DMA_CHANNEL # define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP #endif +#if (STM32_DMA_SUPPORTS_DMAMUX == TRUE) && !defined(WS2812_DMAMUX_ID) +# error "please consult your MCU's datasheet and specify in your config.h: #define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM?_UP" +#endif // Push Pull or Open Drain Configuration // Default Push Pull @@ -177,13 +180,18 @@ void ws2812_init(void) { // Configure DMA // dmaInit(); // Joe added this - dmaStreamAlloc(WS2812_DMA_STREAM - STM32_DMA1_STREAM1, 10, NULL, NULL); + dmaStreamAlloc(WS2812_DMA_STREAM - STM32_DMA_STREAM(0), 10, NULL, NULL); dmaStreamSetPeripheral(WS2812_DMA_STREAM, &(WS2812_PWM_DRIVER.tim->CCR[WS2812_PWM_CHANNEL - 1])); // Ziel ist der An-Zeit im Cap-Comp-Register dmaStreamSetMemory0(WS2812_DMA_STREAM, ws2812_frame_buffer); dmaStreamSetTransactionSize(WS2812_DMA_STREAM, WS2812_BIT_N); dmaStreamSetMode(WS2812_DMA_STREAM, STM32_DMA_CR_CHSEL(WS2812_DMA_CHANNEL) | STM32_DMA_CR_DIR_M2P | STM32_DMA_CR_PSIZE_WORD | STM32_DMA_CR_MSIZE_WORD | STM32_DMA_CR_MINC | STM32_DMA_CR_CIRC | STM32_DMA_CR_PL(3)); // M2P: Memory 2 Periph; PL: Priority Level +#if (STM32_DMA_SUPPORTS_DMAMUX == TRUE) + // If the MCU has a DMAMUX we need to assign the correct resource + dmaSetRequestSource(WS2812_DMA_STREAM, WS2812_DMAMUX_ID); +#endif + // Start DMA dmaStreamEnable(WS2812_DMA_STREAM); diff --git a/drivers/issi/is31fl3741.c b/drivers/issi/is31fl3741.c index fc5c58835d..1b533c9b6a 100644 --- a/drivers/issi/is31fl3741.c +++ b/drivers/issi/is31fl3741.c @@ -78,23 +78,6 @@ bool g_scaling_registers_update_required[DRIVER_COUNT] = {false}; uint8_t g_scaling_registers[DRIVER_COUNT][ISSI_MAX_LEDS]; -uint32_t IS31FL3741_get_cw_sw_position(uint8_t cs, uint8_t sw) { - uint32_t pos = 0; - - if (cs < 31) { - if (sw < 7) { - pos = (sw - 1) * 30 + (cs - 1); - - } else { - pos = 0xB4 + (sw - 7) * 30 + (cs - 1); - } - } else { - pos = 0xB4 + 0x5A + (sw - 1) * 9 + (cs - 31); - } - - return pos; -} - void IS31FL3741_write_register(uint8_t addr, uint8_t reg, uint8_t data) { g_twi_transfer_buffer[0] = reg; g_twi_transfer_buffer[1] = data; @@ -114,14 +97,13 @@ bool IS31FL3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM0); for (int i = 0; i < 342; i += 18) { - g_twi_transfer_buffer[0] = i % 180; - if (i == 180) { // unlock the command register and select PG2 IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM1); } + g_twi_transfer_buffer[0] = i % 180; memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 18); #if ISSI_PERSISTENCE > 0 @@ -186,16 +168,11 @@ void IS31FL3741_init(uint8_t addr) { void IS31FL3741_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { if (index >= 0 && index < DRIVER_LED_TOTAL) { is31_led led = g_is31_leds[index]; - uint32_t rp = 0, gp = 0, bp = 0; - rp = IS31FL3741_get_cw_sw_position(led.rcs, led.rsw); - gp = IS31FL3741_get_cw_sw_position(led.gcs, led.gsw); - bp = IS31FL3741_get_cw_sw_position(led.bcs, led.bsw); - - g_pwm_buffer[led.driver][rp] = red; - g_pwm_buffer[led.driver][gp] = green; - g_pwm_buffer[led.driver][bp] = blue; - g_pwm_buffer_update_required = true; + g_pwm_buffer[led.driver][led.r] = red; + g_pwm_buffer[led.driver][led.g] = green; + g_pwm_buffer[led.driver][led.b] = blue; + g_pwm_buffer_update_required = true; } } @@ -208,26 +185,22 @@ void IS31FL3741_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { void IS31FL3741_set_led_control_register(uint8_t index, bool red, bool green, bool blue) { is31_led led = g_is31_leds[index]; - uint32_t scaling_register_r = IS31FL3741_get_cw_sw_position(led.rcs, led.rsw); - uint32_t scaling_register_g = IS31FL3741_get_cw_sw_position(led.gcs, led.gsw); - uint32_t scaling_register_b = IS31FL3741_get_cw_sw_position(led.bcs, led.bsw); - if (red) { - g_scaling_registers[led.driver][scaling_register_r] = 0xFF; + g_scaling_registers[led.driver][led.r] = 0xFF; } else { - g_scaling_registers[led.driver][scaling_register_r] = 0x00; + g_scaling_registers[led.driver][led.r] = 0x00; } if (green) { - g_scaling_registers[led.driver][scaling_register_g] = 0xFF; + g_scaling_registers[led.driver][led.g] = 0xFF; } else { - g_scaling_registers[led.driver][scaling_register_g] = 0x00; + g_scaling_registers[led.driver][led.g] = 0x00; } if (blue) { - g_scaling_registers[led.driver][scaling_register_b] = 0xFF; + g_scaling_registers[led.driver][led.b] = 0xFF; } else { - g_scaling_registers[led.driver][scaling_register_b] = 0x00; + g_scaling_registers[led.driver][led.b] = 0x00; } g_scaling_registers_update_required[led.driver] = true; @@ -242,15 +215,9 @@ void IS31FL3741_update_pwm_buffers(uint8_t addr1, uint8_t addr2) { } void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue) { - uint32_t rp = 0, gp = 0, bp = 0; - - rp = IS31FL3741_get_cw_sw_position(pled->rcs, pled->rsw); - gp = IS31FL3741_get_cw_sw_position(pled->gcs, pled->gsw); - bp = IS31FL3741_get_cw_sw_position(pled->bcs, pled->bsw); - - g_pwm_buffer[pled->driver][rp] = red; - g_pwm_buffer[pled->driver][gp] = green; - g_pwm_buffer[pled->driver][bp] = blue; + g_pwm_buffer[pled->driver][pled->r] = red; + g_pwm_buffer[pled->driver][pled->g] = green; + g_pwm_buffer[pled->driver][pled->b] = blue; g_pwm_buffer_update_required = true; } @@ -261,7 +228,8 @@ void IS31FL3741_update_led_control_registers(uint8_t addr, uint8_t index) { IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_SCALING_0); - for (int i = 0; i < 180; ++i) { + // CS1_SW1 to CS30_SW6 are on PG2 + for (int i = CS1_SW1; i <= CS30_SW6; ++i) { IS31FL3741_write_register(addr, i, g_scaling_registers[0][i]); } @@ -269,8 +237,9 @@ void IS31FL3741_update_led_control_registers(uint8_t addr, uint8_t index) { IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_SCALING_1); - for (int i = 0; i < 171; ++i) { - IS31FL3741_write_register(addr, i, g_scaling_registers[0][180 + i]); + // CS1_SW7 to CS39_SW9 are on PG3 + for (int i = CS1_SW7; i <= CS39_SW9; ++i) { + IS31FL3741_write_register(addr, i - CS1_SW7, g_scaling_registers[0][i]); } g_scaling_registers_update_required[index] = false; @@ -278,13 +247,9 @@ void IS31FL3741_update_led_control_registers(uint8_t addr, uint8_t index) { } void IS31FL3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue) { - uint32_t rp = 0, gp = 0, bp = 0; + g_scaling_registers[pled->driver][pled->r] = red; + g_scaling_registers[pled->driver][pled->g] = green; + g_scaling_registers[pled->driver][pled->b] = blue; - rp = IS31FL3741_get_cw_sw_position(pled->rcs, pled->rsw); - gp = IS31FL3741_get_cw_sw_position(pled->gcs, pled->gsw); - bp = IS31FL3741_get_cw_sw_position(pled->bcs, pled->bsw); - - g_scaling_registers[pled->driver][rp] = red; - g_scaling_registers[pled->driver][gp] = green; - g_scaling_registers[pled->driver][bp] = blue; + g_scaling_registers_update_required[pled->driver] = true; } diff --git a/drivers/issi/is31fl3741.h b/drivers/issi/is31fl3741.h index 3fa853467b..2df0c5b1a7 100644 --- a/drivers/issi/is31fl3741.h +++ b/drivers/issi/is31fl3741.h @@ -23,17 +23,13 @@ #include typedef struct is31_led { - uint8_t driver : 2; - uint8_t rcs; - uint8_t rsw; - uint8_t gcs; - uint8_t gsw; - uint8_t bcs; - uint8_t bsw; + uint32_t driver : 2; + uint32_t r : 10; + uint32_t g : 10; + uint32_t b : 10; } __attribute__((packed)) is31_led; extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; -extern const is31_led g_is31_indicator_leds[DRIVER_INDICATOR_LED_TOTAL]; void IS31FL3741_init(uint8_t addr); void IS31FL3741_write_register(uint8_t addr, uint8_t reg, uint8_t data); @@ -53,3 +49,372 @@ void IS31FL3741_update_led_control_registers(uint8_t addr1, uint8_t addr2); void IS31FL3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue); void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue); + +#define CS1_SW1 0x00 +#define CS2_SW1 0x01 +#define CS3_SW1 0x02 +#define CS4_SW1 0x03 +#define CS5_SW1 0x04 +#define CS6_SW1 0x05 +#define CS7_SW1 0x06 +#define CS8_SW1 0x07 +#define CS9_SW1 0x08 +#define CS10_SW1 0x09 +#define CS11_SW1 0x0A +#define CS12_SW1 0x0B +#define CS13_SW1 0x0C +#define CS14_SW1 0x0D +#define CS15_SW1 0x0E +#define CS16_SW1 0x0F +#define CS17_SW1 0x10 +#define CS18_SW1 0x11 +#define CS19_SW1 0x12 +#define CS20_SW1 0x13 +#define CS21_SW1 0x14 +#define CS22_SW1 0x15 +#define CS23_SW1 0x16 +#define CS24_SW1 0x17 +#define CS25_SW1 0x18 +#define CS26_SW1 0x19 +#define CS27_SW1 0x1A +#define CS28_SW1 0x1B +#define CS29_SW1 0x1C +#define CS30_SW1 0x1D + +#define CS1_SW2 0x1E +#define CS2_SW2 0x1F +#define CS3_SW2 0x20 +#define CS4_SW2 0x21 +#define CS5_SW2 0x22 +#define CS6_SW2 0x23 +#define CS7_SW2 0x24 +#define CS8_SW2 0x25 +#define CS9_SW2 0x26 +#define CS10_SW2 0x27 +#define CS11_SW2 0x28 +#define CS12_SW2 0x29 +#define CS13_SW2 0x2A +#define CS14_SW2 0x2B +#define CS15_SW2 0x2C +#define CS16_SW2 0x2D +#define CS17_SW2 0x2E +#define CS18_SW2 0x2F +#define CS19_SW2 0x30 +#define CS20_SW2 0x31 +#define CS21_SW2 0x32 +#define CS22_SW2 0x33 +#define CS23_SW2 0x34 +#define CS24_SW2 0x35 +#define CS25_SW2 0x36 +#define CS26_SW2 0x37 +#define CS27_SW2 0x38 +#define CS28_SW2 0x39 +#define CS29_SW2 0x3A +#define CS30_SW2 0x3B + +#define CS1_SW3 0x3C +#define CS2_SW3 0x3D +#define CS3_SW3 0x3E +#define CS4_SW3 0x3F +#define CS5_SW3 0x40 +#define CS6_SW3 0x41 +#define CS7_SW3 0x42 +#define CS8_SW3 0x43 +#define CS9_SW3 0x44 +#define CS10_SW3 0x45 +#define CS11_SW3 0x46 +#define CS12_SW3 0x47 +#define CS13_SW3 0x48 +#define CS14_SW3 0x49 +#define CS15_SW3 0x4A +#define CS16_SW3 0x4B +#define CS17_SW3 0x4C +#define CS18_SW3 0x4D +#define CS19_SW3 0x4E +#define CS20_SW3 0x4F +#define CS21_SW3 0x50 +#define CS22_SW3 0x51 +#define CS23_SW3 0x52 +#define CS24_SW3 0x53 +#define CS25_SW3 0x54 +#define CS26_SW3 0x55 +#define CS27_SW3 0x56 +#define CS28_SW3 0x57 +#define CS29_SW3 0x58 +#define CS30_SW3 0x59 + +#define CS1_SW4 0x5A +#define CS2_SW4 0x5B +#define CS3_SW4 0x5C +#define CS4_SW4 0x5D +#define CS5_SW4 0x5E +#define CS6_SW4 0x5F +#define CS7_SW4 0x60 +#define CS8_SW4 0x61 +#define CS9_SW4 0x62 +#define CS10_SW4 0x63 +#define CS11_SW4 0x64 +#define CS12_SW4 0x65 +#define CS13_SW4 0x66 +#define CS14_SW4 0x67 +#define CS15_SW4 0x68 +#define CS16_SW4 0x69 +#define CS17_SW4 0x6A +#define CS18_SW4 0x6B +#define CS19_SW4 0x6C +#define CS20_SW4 0x6D +#define CS21_SW4 0x6E +#define CS22_SW4 0x6F +#define CS23_SW4 0x70 +#define CS24_SW4 0x71 +#define CS25_SW4 0x72 +#define CS26_SW4 0x73 +#define CS27_SW4 0x74 +#define CS28_SW4 0x75 +#define CS29_SW4 0x76 +#define CS30_SW4 0x77 + +#define CS1_SW5 0x78 +#define CS2_SW5 0x79 +#define CS3_SW5 0x7A +#define CS4_SW5 0x7B +#define CS5_SW5 0x7C +#define CS6_SW5 0x7D +#define CS7_SW5 0x7E +#define CS8_SW5 0x7F +#define CS9_SW5 0x80 +#define CS10_SW5 0x81 +#define CS11_SW5 0x82 +#define CS12_SW5 0x83 +#define CS13_SW5 0x84 +#define CS14_SW5 0x85 +#define CS15_SW5 0x86 +#define CS16_SW5 0x87 +#define CS17_SW5 0x88 +#define CS18_SW5 0x89 +#define CS19_SW5 0x8A +#define CS20_SW5 0x8B +#define CS21_SW5 0x8C +#define CS22_SW5 0x8D +#define CS23_SW5 0x8E +#define CS24_SW5 0x8F +#define CS25_SW5 0x90 +#define CS26_SW5 0x91 +#define CS27_SW5 0x92 +#define CS28_SW5 0x93 +#define CS29_SW5 0x94 +#define CS30_SW5 0x95 + +#define CS1_SW6 0x96 +#define CS2_SW6 0x97 +#define CS3_SW6 0x98 +#define CS4_SW6 0x99 +#define CS5_SW6 0x9A +#define CS6_SW6 0x9B +#define CS7_SW6 0x9C +#define CS8_SW6 0x9D +#define CS9_SW6 0x9E +#define CS10_SW6 0x9F +#define CS11_SW6 0xA0 +#define CS12_SW6 0xA1 +#define CS13_SW6 0xA2 +#define CS14_SW6 0xA3 +#define CS15_SW6 0xA4 +#define CS16_SW6 0xA5 +#define CS17_SW6 0xA6 +#define CS18_SW6 0xA7 +#define CS19_SW6 0xA8 +#define CS20_SW6 0xA9 +#define CS21_SW6 0xAA +#define CS22_SW6 0xAB +#define CS23_SW6 0xAC +#define CS24_SW6 0xAD +#define CS25_SW6 0xAE +#define CS26_SW6 0xAF +#define CS27_SW6 0xB0 +#define CS28_SW6 0xB1 +#define CS29_SW6 0xB2 +#define CS30_SW6 0xB3 + +#define CS1_SW7 0xB4 +#define CS2_SW7 0xB5 +#define CS3_SW7 0xB6 +#define CS4_SW7 0xB7 +#define CS5_SW7 0xB8 +#define CS6_SW7 0xB9 +#define CS7_SW7 0xBA +#define CS8_SW7 0xBB +#define CS9_SW7 0xBC +#define CS10_SW7 0xBD +#define CS11_SW7 0xBE +#define CS12_SW7 0xBF +#define CS13_SW7 0xC0 +#define CS14_SW7 0xC1 +#define CS15_SW7 0xC2 +#define CS16_SW7 0xC3 +#define CS17_SW7 0xC4 +#define CS18_SW7 0xC5 +#define CS19_SW7 0xC6 +#define CS20_SW7 0xC7 +#define CS21_SW7 0xC8 +#define CS22_SW7 0xC9 +#define CS23_SW7 0xCA +#define CS24_SW7 0xCB +#define CS25_SW7 0xCC +#define CS26_SW7 0xCD +#define CS27_SW7 0xCE +#define CS28_SW7 0xCF +#define CS29_SW7 0xD0 +#define CS30_SW7 0xD1 + +#define CS1_SW8 0xD2 +#define CS2_SW8 0xD3 +#define CS3_SW8 0xD4 +#define CS4_SW8 0xD5 +#define CS5_SW8 0xD6 +#define CS6_SW8 0xD7 +#define CS7_SW8 0xD8 +#define CS8_SW8 0xD9 +#define CS9_SW8 0xDA +#define CS10_SW8 0xDB +#define CS11_SW8 0xDC +#define CS12_SW8 0xDD +#define CS13_SW8 0xDE +#define CS14_SW8 0xDF +#define CS15_SW8 0xE0 +#define CS16_SW8 0xE1 +#define CS17_SW8 0xE2 +#define CS18_SW8 0xE3 +#define CS19_SW8 0xE4 +#define CS20_SW8 0xE5 +#define CS21_SW8 0xE6 +#define CS22_SW8 0xE7 +#define CS23_SW8 0xE8 +#define CS24_SW8 0xE9 +#define CS25_SW8 0xEA +#define CS26_SW8 0xEB +#define CS27_SW8 0xEC +#define CS28_SW8 0xED +#define CS29_SW8 0xEE +#define CS30_SW8 0xEF + +#define CS1_SW9 0xF0 +#define CS2_SW9 0xF1 +#define CS3_SW9 0xF2 +#define CS4_SW9 0xF3 +#define CS5_SW9 0xF4 +#define CS6_SW9 0xF5 +#define CS7_SW9 0xF6 +#define CS8_SW9 0xF7 +#define CS9_SW9 0xF8 +#define CS10_SW9 0xF9 +#define CS11_SW9 0xFA +#define CS12_SW9 0xFB +#define CS13_SW9 0xFC +#define CS14_SW9 0xFD +#define CS15_SW9 0xFE +#define CS16_SW9 0xFF +#define CS17_SW9 0x100 +#define CS18_SW9 0x101 +#define CS19_SW9 0x102 +#define CS20_SW9 0x103 +#define CS21_SW9 0x104 +#define CS22_SW9 0x105 +#define CS23_SW9 0x106 +#define CS24_SW9 0x107 +#define CS25_SW9 0x108 +#define CS26_SW9 0x109 +#define CS27_SW9 0x10A +#define CS28_SW9 0x10B +#define CS29_SW9 0x10C +#define CS30_SW9 0x10D + +#define CS31_SW1 0x10E +#define CS32_SW1 0x10F +#define CS33_SW1 0x110 +#define CS34_SW1 0x111 +#define CS35_SW1 0x112 +#define CS36_SW1 0x113 +#define CS37_SW1 0x114 +#define CS38_SW1 0x115 +#define CS39_SW1 0x116 + +#define CS31_SW2 0x117 +#define CS32_SW2 0x118 +#define CS33_SW2 0x119 +#define CS34_SW2 0x11A +#define CS35_SW2 0x11B +#define CS36_SW2 0x11C +#define CS37_SW2 0x11D +#define CS38_SW2 0x11E +#define CS39_SW2 0x11F + +#define CS31_SW3 0x120 +#define CS32_SW3 0x121 +#define CS33_SW3 0x122 +#define CS34_SW3 0x123 +#define CS35_SW3 0x124 +#define CS36_SW3 0x125 +#define CS37_SW3 0x126 +#define CS38_SW3 0x127 +#define CS39_SW3 0x128 + +#define CS31_SW4 0x129 +#define CS32_SW4 0x12A +#define CS33_SW4 0x12B +#define CS34_SW4 0x12C +#define CS35_SW4 0x12D +#define CS36_SW4 0x12E +#define CS37_SW4 0x12F +#define CS38_SW4 0x130 +#define CS39_SW4 0x131 + +#define CS31_SW5 0x132 +#define CS32_SW5 0x133 +#define CS33_SW5 0x134 +#define CS34_SW5 0x135 +#define CS35_SW5 0x136 +#define CS36_SW5 0x137 +#define CS37_SW5 0x138 +#define CS38_SW5 0x139 +#define CS39_SW5 0x13A + +#define CS31_SW6 0x13B +#define CS32_SW6 0x13C +#define CS33_SW6 0x13D +#define CS34_SW6 0x13E +#define CS35_SW6 0x13F +#define CS36_SW6 0x140 +#define CS37_SW6 0x141 +#define CS38_SW6 0x142 +#define CS39_SW6 0x143 + +#define CS31_SW7 0x144 +#define CS32_SW7 0x145 +#define CS33_SW7 0x146 +#define CS34_SW7 0x147 +#define CS35_SW7 0x148 +#define CS36_SW7 0x149 +#define CS37_SW7 0x14A +#define CS38_SW7 0x14B +#define CS39_SW7 0x14C + +#define CS31_SW8 0x14D +#define CS32_SW8 0x14E +#define CS33_SW8 0x14F +#define CS34_SW8 0x150 +#define CS35_SW8 0x151 +#define CS36_SW8 0x152 +#define CS37_SW8 0x153 +#define CS38_SW8 0x154 +#define CS39_SW8 0x155 + +#define CS31_SW9 0x156 +#define CS32_SW9 0x157 +#define CS33_SW9 0x158 +#define CS34_SW9 0x159 +#define CS35_SW9 0x15A +#define CS36_SW9 0x15B +#define CS37_SW9 0x15C +#define CS38_SW9 0x15D +#define CS39_SW9 0x15E diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c index f1990567f7..0b24a987de 100644 --- a/drivers/oled/oled_driver.c +++ b/drivers/oled/oled_driver.c @@ -75,8 +75,14 @@ along with this program. If not, see . #define CHARGE_PUMP 0x8D // Misc defines -#define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) -#define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) +#ifndef OLED_BLOCK_COUNT +# define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) +#endif +#ifndef OLED_BLOCK_SIZE +# define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) +#endif + +#define OLED_ALL_BLOCKS_MASK (((((OLED_BLOCK_TYPE)1 << (OLED_BLOCK_COUNT - 1)) - 1) << 1) | 1) // i2c defines #define I2C_CMD 0x00 @@ -212,7 +218,7 @@ __attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { void oled_clear(void) { memset(oled_buffer, 0, sizeof(oled_buffer)); oled_cursor = &oled_buffer[0]; - oled_dirty = -1; // -1 will be max value as long as display_dirty is unsigned type + oled_dirty = OLED_ALL_BLOCKS_MASK; } static void calc_bounds(uint8_t update_start, uint8_t *cmd_array) { @@ -262,13 +268,14 @@ static void rotate_90(const uint8_t *src, uint8_t *dest) { void oled_render(void) { // Do we have work to do? + oled_dirty &= OLED_ALL_BLOCKS_MASK; if (!oled_dirty || oled_scrolling) { return; } // Find first dirty block uint8_t update_start = 0; - while (!(oled_dirty & (1 << update_start))) { + while (!(oled_dirty & ((OLED_BLOCK_TYPE)1 << update_start))) { ++update_start; } @@ -314,7 +321,7 @@ void oled_render(void) { oled_on(); // Clear dirty flag - oled_dirty &= ~(1 << update_start); + oled_dirty &= ~((OLED_BLOCK_TYPE)1 << update_start); } void oled_set_cursor(uint8_t col, uint8_t line) { @@ -404,9 +411,9 @@ void oled_write_char(const char data, bool invert) { // Dirty check if (memcmp(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH)) { uint16_t index = oled_cursor - &oled_buffer[0]; - oled_dirty |= (1 << (index / OLED_BLOCK_SIZE)); + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE)); // Edgecase check if the written data spans the 2 chunks - oled_dirty |= (1 << ((index + OLED_FONT_WIDTH) / OLED_BLOCK_SIZE)); + oled_dirty |= ((OLED_BLOCK_TYPE)1 << ((index + OLED_FONT_WIDTH - 1) / OLED_BLOCK_SIZE)); } // Finally move to the next char @@ -441,14 +448,22 @@ void oled_pan(bool left) { } } } - oled_dirty = ~((OLED_BLOCK_TYPE)0); + oled_dirty = OLED_ALL_BLOCKS_MASK; +} + +oled_buffer_reader_t oled_read_raw(uint16_t start_index) { + if (start_index > OLED_MATRIX_SIZE) start_index = OLED_MATRIX_SIZE; + oled_buffer_reader_t ret_reader; + ret_reader.current_element = &oled_buffer[start_index]; + ret_reader.remaining_element_count = OLED_MATRIX_SIZE - start_index; + return ret_reader; } void oled_write_raw_byte(const char data, uint16_t index) { if (index > OLED_MATRIX_SIZE) index = OLED_MATRIX_SIZE; if (oled_buffer[index] == data) return; oled_buffer[index] = data; - oled_dirty |= (1 << (index / OLED_BLOCK_SIZE)); + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE)); } void oled_write_raw(const char *data, uint16_t size) { @@ -456,21 +471,28 @@ void oled_write_raw(const char *data, uint16_t size) { for (uint16_t i = 0; i < size; i++) { if (oled_buffer[i] == data[i]) continue; oled_buffer[i] = data[i]; - oled_dirty |= (1 << (i / OLED_BLOCK_SIZE)); + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE)); } } void oled_write_pixel(uint8_t x, uint8_t y, bool on) { - if (x >= OLED_DISPLAY_WIDTH || y >= OLED_DISPLAY_HEIGHT) { + if (x >= oled_rotation_width) { return; } - uint16_t index = x + (y / 8) * OLED_DISPLAY_WIDTH; - if (on) { - oled_buffer[index] |= (1 << (y % 8)); - } else { - oled_buffer[index] &= ~(1 << (y % 8)); + uint16_t index = x + (y / 8) * oled_rotation_width; + if (index >= OLED_MATRIX_SIZE) { + return; + } + uint8_t data = oled_buffer[index]; + if (on) { + data |= (1 << (y % 8)); + } else { + data &= ~(1 << (y % 8)); + } + if (oled_buffer[index] != data) { + oled_buffer[index] = data; + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE)); } - oled_dirty |= (1 << (index / OLED_BLOCK_SIZE)); } #if defined(__AVR__) @@ -493,7 +515,7 @@ void oled_write_raw_P(const char *data, uint16_t size) { uint8_t c = pgm_read_byte(data++); if (oled_buffer[i] == c) continue; oled_buffer[i] = c; - oled_dirty |= (1 << (i / OLED_BLOCK_SIZE)); + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE)); } } #endif // defined(__AVR__) @@ -526,6 +548,8 @@ bool oled_off(void) { return !oled_active; } +bool is_oled_on(void) { return oled_active; } + // Set the specific 8 lines rows of the screen to scroll. // 0 is the default for start, and 7 for end, which is the entire // height of the screen. For 128x32 screens, rows 4-7 are not used. @@ -587,7 +611,7 @@ bool oled_scroll_off(void) { return oled_scrolling; } oled_scrolling = false; - oled_dirty = -1; + oled_dirty = OLED_ALL_BLOCKS_MASK; } return !oled_scrolling; } diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h index 5c21c0cc8e..58e2bb7386 100644 --- a/drivers/oled/oled_driver.h +++ b/drivers/oled/oled_driver.h @@ -154,6 +154,11 @@ along with this program. If not, see . # define OLED_I2C_TIMEOUT 100 #endif +typedef struct __attribute__((__packed__)) { + uint8_t *current_element; + uint16_t remaining_element_count; +} oled_buffer_reader_t; + // OLED Rotation enum values are flags typedef enum { OLED_ROTATION_0 = 0, @@ -207,6 +212,10 @@ void oled_write_ln(const char *data, bool invert); // Pans the buffer to the right (or left by passing true) by moving contents of the buffer void oled_pan(bool left); +// Returns a pointer to the requested start index in the buffer plus remaining +// buffer length as struct +oled_buffer_reader_t oled_read_raw(uint16_t start_index); + void oled_write_raw(const char *data, uint16_t size); void oled_write_raw_byte(const char data, uint16_t index); @@ -248,6 +257,10 @@ bool oled_on(void); // Returns true if the screen was off or turns off bool oled_off(void); +// Returns true if the oled is currently on, false if it is +// not +bool is_oled_on(void); + // Basically it's oled_render, but with timeout management and oled_task_user calling! void oled_task(void); diff --git a/keyboards/10bleoledhub/10bleoledhub.c b/keyboards/10bleoledhub/10bleoledhub.c new file mode 100644 index 0000000000..095d49d388 --- /dev/null +++ b/keyboards/10bleoledhub/10bleoledhub.c @@ -0,0 +1,17 @@ +/* Copyright 2020 haierwangwei2005 + * + * 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 "10bleoledhub.h" + diff --git a/keyboards/10bleoledhub/10bleoledhub.h b/keyboards/10bleoledhub/10bleoledhub.h new file mode 100644 index 0000000000..ad73017e12 --- /dev/null +++ b/keyboards/10bleoledhub/10bleoledhub.h @@ -0,0 +1,30 @@ +/* Copyright 2020 haierwangwei2005 + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, \ + K10, K11, K12, \ + K20, K21, K22, \ + K30, K31, K32 \ +) { \ + { K00, KC_NO, KC_NO }, \ + { K10, K11, K12 }, \ + { K20, K21, K22 }, \ + { K30, K31, K32 } \ +} diff --git a/keyboards/10bleoledhub/config.h b/keyboards/10bleoledhub/config.h new file mode 100644 index 0000000000..0cc7831f3c --- /dev/null +++ b/keyboards/10bleoledhub/config.h @@ -0,0 +1,50 @@ +/* +Copyright 2020 haierwangwei2005 + +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 .*/ + +#pragma once + +#include "config_common.h" +#define VENDOR_ID 0x7C88 // "hw" = haierwangwei2005 +#define PRODUCT_ID 0x7C99 // "10b" = 10bleoledhub +#define DEVICE_VER 0x0001 +#define MANUFACTURER haierwangwei2005 +#define PRODUCT 10bleoledhub + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 3 +#define MATRIX_ROW_PINS { F6, F5, F4, F1 } +#define MATRIX_COL_PINS { D6, D7, B5 } +#define UNUSED_PINS + +#define DIODE_DIRECTION ROW2COL + +#define SSD1306OLED +#define RGB_DI_PIN B7 + +#define RGBLED_NUM 4 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 +#define RGBLIGHT_ANIMATIONS + + +#define OLED_FONT_H "./lib/glcdfont.c" + +#define ENCODERS_PAD_A { C7 } +#define ENCODERS_PAD_B { F7 } + +#define ENCODER_RESOLUTION 4 diff --git a/keyboards/10bleoledhub/info.json b/keyboards/10bleoledhub/info.json new file mode 100644 index 0000000000..368efab381 --- /dev/null +++ b/keyboards/10bleoledhub/info.json @@ -0,0 +1,24 @@ +{ + "keyboard_name": "10bleoledhub", + "url": "https://github.com/haierwangwei2005/10BLE-OLED-HUB", + "maintainer": "haierwangwei2005", + + "width": 4, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Num Lock", "x":0, "y":0, "w":0.8, "h":0.8}, + {"label":"7", "x":0, "y":1}, + {"label":"8", "x":1, "y":1}, + {"label":"9", "x":2, "y":1}, + {"label":"4", "x":0, "y":2}, + {"label":"5", "x":1, "y":2}, + {"label":"6", "x":2, "y":2}, + {"label":"1", "x":0, "y":3}, + {"label":"2", "x":1, "y":3}, + {"label":"3", "x":2, "y":3} + ] + } + } +} diff --git a/keyboards/10bleoledhub/keymaps/default/keymap.c b/keyboards/10bleoledhub/keymaps/default/keymap.c new file mode 100644 index 0000000000..ee26168196 --- /dev/null +++ b/keyboards/10bleoledhub/keymaps/default/keymap.c @@ -0,0 +1,72 @@ + /* +Copyright 2020 haierwangwei2005 +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 .*/ +/* Keymap _0: (Base Layer) Default Layer + + * .-----. + * |PGUP | + * |-----------------. + * | 7 | 8 | 9 | + * |-----|-----|-----| + * | 4 | 5 | 6 | + * |-----|-----|-----| + * | 1 | 2 | 3 | + * .-----------------. + */ + /* Keymap _1: (Second Layer) second Layer + + * .-------. + * |NUMLOCK| + * |-----------------------. + * |RGB_TOG|RGB_MOD|RGB_M_K| + * |-------|-------|-------| + * |RGB_SAI|RGB_SAD|RGB_HUI| + * |-------|-------|-------| + * |RGB_VAI|RGB_VAD|RGB_SPI| + * .-----------------------. +*/ + +#include QMK_KEYBOARD_H +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_PGUP, + KC_KP_7, KC_KP_8, MO(1), + KC_P4, KC_P5, KC_P6, + KC_P1, KC_P2, KC_P3), + [1] = LAYOUT( + KC_NUMLOCK, + RGB_TOG, RGB_MOD, RGB_M_K, + RGB_SAI, RGB_SAD, RGB_HUI, + RGB_VAI, RGB_VAD, RGB_SPI), +}; + +static void render_logo(void) { + static const char PROGMEM qmk_logo[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0}; + oled_write_P(qmk_logo, false); +} + +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { render_logo(); } +#endif + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} + + +void matrix_init_user(void) { render_logo(); } diff --git a/keyboards/10bleoledhub/keymaps/via/keymap.c b/keyboards/10bleoledhub/keymaps/via/keymap.c new file mode 100644 index 0000000000..d7e986acfc --- /dev/null +++ b/keyboards/10bleoledhub/keymaps/via/keymap.c @@ -0,0 +1,72 @@ +/* +Copyright 2020 haierwangwei2005 +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 .*/ +/* Keymap _0: (Base Layer) Default Layer + + * .-----. + * |PGUP | + * |-----------------. + * | 7 | 8 | 9 | + * |-----|-----|-----| + * | 4 | 5 | 6 | + * |-----|-----|-----| + * | 1 | 2 | 3 | + * .-----------------. + */ + /* Keymap _1: (Second Layer) second Layer + + * .-------. + * |NUMLOCK| + * |-----------------------. + * |RGB_TOG|RGB_MOD|RGB_M_K| + * |-------|-------|-------| + * |RGB_SAI|RGB_SAD|RGB_HUI| + * |-------|-------|-------| + * |RGB_VAI|RGB_VAD|RGB_SPI| + * .-----------------------. +*/ + +#include QMK_KEYBOARD_H +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_PGUP, + KC_KP_7, KC_KP_8, MO(1), + KC_P4, KC_P5, KC_P6, + KC_P1, KC_P2, KC_P3), + [1] = LAYOUT( + KC_NUMLOCK, + RGB_TOG, RGB_MOD, RGB_M_K, + RGB_SAI, RGB_SAD, RGB_HUI, + RGB_VAI, RGB_VAD, RGB_SPI), +}; + +static void render_logo(void) { + static const char PROGMEM qmk_logo[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0}; + oled_write_P(qmk_logo, false); +} + +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { render_logo(); } +#endif + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} + + +void matrix_init_user(void) { render_logo(); } diff --git a/keyboards/10bleoledhub/keymaps/via/rules.mk b/keyboards/10bleoledhub/keymaps/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/10bleoledhub/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/10bleoledhub/lib/glcdfont.c b/keyboards/10bleoledhub/lib/glcdfont.c new file mode 100644 index 0000000000..c99ba25fda --- /dev/null +++ b/keyboards/10bleoledhub/lib/glcdfont.c @@ -0,0 +1,241 @@ +/* +Copyright 2020 haierwangwei2005 +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 "progmem.h" +// Standard ASCII 5x7 font +const unsigned char font[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, + 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, + 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, + 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, + 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, + 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, + 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, + 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, + 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, + 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, + 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, + 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, + 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, + 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, + 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, + 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, + 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, + 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, + 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, + 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, + 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, + 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, + 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, + 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, + 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, + 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, + 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, + 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, + 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, + 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, + 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, + 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, + 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, + 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, + 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, + 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, + 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, + 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, + 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, + 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, + 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, + 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, + 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, + 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, + 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, + 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, + 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, + 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, + 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, + 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, + 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, + 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, + 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, + 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, + 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, + 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, + 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, + 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, + 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, + 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, + 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, + 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, + 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, + 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, + 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, + 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, + 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, + 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, + 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, + 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, + 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, + 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, + 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, + 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, + 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, + 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, + 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, + 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, + 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, + 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, + 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, + 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, + 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, + 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, + 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, + 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, + 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, + 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, + 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, + 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xF8, 0xF8, 0x58, 0x58, 0x5E, + 0xDA, 0x5A, 0x5B, 0x59, 0xDB, 0x5A, + 0x5B, 0x58, 0xD8, 0x58, 0x58, 0x58, + 0xD8, 0x58, 0x58, 0x58, 0xD8, 0x58, + 0x58, 0x58, 0xD8, 0x58, 0x58, 0x58, + 0xD8, 0x58, 0x58, 0x78, 0xF8, 0xF8, + 0xF8, 0x78, 0x78, 0x78, 0xF8, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x44, 0x28, 0xFF, 0x5A, 0x24, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xFF, 0xFF, 0x44, 0x55, 0x44, + 0xFF, 0x44, 0x55, 0x44, 0xFF, 0x44, + 0x55, 0x44, 0xFF, 0x44, 0x55, 0x44, + 0xFF, 0x44, 0x55, 0x44, 0xFF, 0x44, + 0x55, 0x44, 0xFF, 0x44, 0x55, 0x44, + 0xFF, 0x44, 0x55, 0x44, 0xFF, 0xFF, + 0xFF, 0xC4, 0xD5, 0xC4, 0xFF, 0x00, + 0x00, 0xFE, 0x21, 0x61, 0xA1, 0x1E, + 0x00, 0xFE, 0x01, 0x21, 0x21, 0xEF, + 0x00, 0xFF, 0x11, 0x11, 0x11, 0xFE, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFF, 0x11, 0x11, 0x11, 0xFE, 0x00, + 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, + 0xFF, 0x11, 0x11, 0x11, 0x01, 0x00, + 0x01, 0x01, 0xFF, 0x01, 0x01, 0x00, + 0xFF, 0x01, 0x01, 0xFF, 0x00, 0xFF, + 0x01, 0x01, 0xFF, 0x00, 0x01, 0x01, + 0xFF, 0x01, 0x01, 0x00, 0xFF, 0x20, + 0x20, 0x20, 0xFF, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x7F, 0x7F, 0x44, 0x55, 0x44, + 0x7F, 0x44, 0x55, 0x54, 0x57, 0x54, + 0x55, 0x54, 0x57, 0x54, 0x55, 0x54, + 0x57, 0x54, 0x55, 0x54, 0x57, 0x54, + 0x45, 0x7C, 0x47, 0x54, 0x45, 0x7C, + 0x7F, 0x7C, 0x45, 0x54, 0x57, 0x50, + 0x5E, 0x50, 0x57, 0x47, 0x7F, 0x00, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x01, 0x02, 0x02, 0x02, 0x03, + 0x00, 0x03, 0x02, 0x02, 0x02, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x02, 0x02, 0x02, 0x01, 0x00, + 0x03, 0x02, 0x02, 0x02, 0x02, 0x00, + 0x03, 0x02, 0x02, 0x02, 0x03, 0x00, + 0x03, 0x02, 0x02, 0x02, 0x02, 0x00, + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x03, 0x02, 0x02, 0x03, 0x00, 0x03, + 0x02, 0x02, 0x03, 0x00, 0x00, 0x30, + 0x2B, 0x7C, 0x20, 0x40, 0x03, 0x7C, + 0x44, 0x7C, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; diff --git a/keyboards/10bleoledhub/readme.md b/keyboards/10bleoledhub/readme.md new file mode 100644 index 0000000000..2ab41d4b47 --- /dev/null +++ b/keyboards/10bleoledhub/readme.md @@ -0,0 +1,14 @@ +# 10bleoledhub + +![10bleoledhub](https://github.com/haierwangwei2005/10BLE-OLED-HUB/blob/master/20200801103918.png) + +10 BLE OLED HUB + +* Keyboard Maintainer: [haierwangwei2005](https://github.com/haierwangwei2005) +* Hardware Availability: https://github.com/haierwangwei2005/10bleoled-hub + +Make example for this keyboard (after setting up your build environment): + + make 10bleoledhub:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/10bleoledhub/rules.mk b/keyboards/10bleoledhub/rules.mk new file mode 100644 index 0000000000..e582b213f7 --- /dev/null +++ b/keyboards/10bleoledhub/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +BLUETOOTH = AdafruitBLE +OLED_DRIVER_ENABLE = yes +ENCODER_ENABLE = yes diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/badger/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/badger/keymap.c new file mode 100644 index 0000000000..8e64c543d5 --- /dev/null +++ b/keyboards/1upkeyboards/1up60hte/keymaps/badger/keymap.c @@ -0,0 +1,59 @@ +/* +Copyright 2020 Dan White + +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 "badger.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY_MAC] = LAYOUT_tsangan(\ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + MOVE_MAC, 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, CFG_MAC, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, ADJUST, KC_RALT, KC_RGUI), + + [_MOVE_MAC] = LAYOUT_tsangan(\ + MAC_FRC, MM_LEFT, MM_RGHT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_0, IJ_TOP, IJ_BOTT, _______, _______, \ + KC_BACK, IJ_STEP, IJ_INTO, IJ_OUT, IJ_RUN, IJ_STOP, _______, WD_BACK, KC_HOME, KC_END, WD_FRWD, IJ_BACK, IJ_FWD, KC_NEXT, \ + _______, MM_LH, MM_MAX, MM_RH, IJ_FIND, IJ_IMPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CM_RIGHT, CM_DOWN, _______, \ + _______, MM_UH, MM_BH, MAC_CPY, MAC_PST, IJ_IMPH, _______, IJ_REN, IJ_IMPL, IJ_DECL, IJ_USAG, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______), + + [_QWERTY_LINUX] = LAYOUT_tsangan(\ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + MOVE, 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, CFG_LNX, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, ADJUST, KC_RALT, KC_RGUI), + + [_MOVE_LINUX] = LAYOUT_tsangan(\ + KC_GRV, VD_1, VD_2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \ + KC_BACK, WM_VD1, WM_UH, WM_VD2, RESET, KC_MSTP, KC_MPLY, KC_PGUP, KC_HOME, KC_END, KC_PGDN, _______, _______, KC_NEXT, \ + _______, WM_LH, WM_MAX, WM_RH, WD_FRWD, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CS_RIGHT, CS_DOWN, _______, \ + _______, WM_VD3, WM_BH, OS_COPY, OS_PAST, WD_BACK, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______), + + [_ADJUST] = LAYOUT_tsangan(\ + 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_WREF, KC_MSTP, KC_MPLY, KC_PGUP, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_INS, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, KC_CAPS, _______, KC_MPRV, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, KC_WSCH, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______), + + [_CONFIG] = LAYOUT_tsangan(\ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \ + _______, NK_ON, NK_OFF, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \ + _______, GE_SWAP, GE_NORM, DEBUG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_M_B, _______, _______, RGB_TOG, _______, \ + _______, DF_1, DF_2, _______, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_SPD, RGB_M_K, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______) +}; diff --git a/keyboards/1upkeyboards/1up60rgb/1up60rgb.h b/keyboards/1upkeyboards/1up60rgb/1up60rgb.h index 9e866bb50f..5ee6c12bcf 100644 --- a/keyboards/1upkeyboards/1up60rgb/1up60rgb.h +++ b/keyboards/1upkeyboards/1up60rgb/1up60rgb.h @@ -28,11 +28,26 @@ ) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, XXX }, \ { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ - { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, XXX }, \ { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, XXX }, \ { k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, XXX, k4D, k4E } \ } +/* ANSI-Tsangan variant, with split right shift key */ +#define LAYOUT_60_ansi_tsangan_split_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \ + k40, k41, k43, k46, k4B, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0D }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ + { k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4B, XXX, k4D, k4E } \ +} + /* ISO variant. Remove useless ANSI keys */ #define LAYOUT_60_iso( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ @@ -42,8 +57,8 @@ k40, k41, k43, k46, k4A, k4B, k4D, k4E \ ) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, XXX }, \ - { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ - { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k2D }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, XXX }, \ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, XXX }, \ { k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, XXX, k4D, k4E } \ } @@ -58,7 +73,22 @@ ) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ - { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ + { k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, XXX, k4D, k4E } \ +} + +/* ANSI Variant */ +#define LAYOUT_60_ansi_split_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \ + k40, k41, k43, k46, k4A, k4B, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0D }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, XXX }, \ { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ { k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, XXX, k4D, k4E } \ } @@ -73,7 +103,7 @@ ) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ - { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, XXX }, \ { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ { XXX, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4B, XXX, k4D, XXX } \ } diff --git a/keyboards/1upkeyboards/1up60rgb/info.json b/keyboards/1upkeyboards/1up60rgb/info.json index 2185f0bb19..9f6ed62189 100644 --- a/keyboards/1upkeyboards/1up60rgb/info.json +++ b/keyboards/1upkeyboards/1up60rgb/info.json @@ -6,22 +6,68 @@ "height": 5, "layouts": { "LAYOUT_all": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + "layout": [ + {"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] }, "LAYOUT_60_ansi": { - "layout": [{"x":0, "y":0, "label":"~"}, {"x":1, "y":0, "label":"!"}, {"x":2, "y":0, "label":"@"}, {"x":3, "y":0, "label":"#"}, {"x":4, "y":0, "label":"$"}, {"x":5, "y":0, "label":"%"}, {"x":6, "y":0, "label":"^"}, {"x":7, "y":0, "label":"&"}, {"x":8, "y":0, "label":"*"}, {"x":9, "y":0, "label":"("}, {"x":10, "y":0, "label":")"}, {"x":11, "y":0, "label":"_"}, {"x":12, "y":0, "label":"+"}, {"x":13, "y":0, "label":"Backspace", "w":2}, {"x":0, "y":1, "label":"Tab", "w":1.5}, {"x":1.5, "y":1, "label":"Q"}, {"x":2.5, "y":1, "label":"W"}, {"x":3.5, "y":1, "label":"E"}, {"x":4.5, "y":1, "label":"R"}, {"x":5.5, "y":1, "label":"T"}, {"x":6.5, "y":1, "label":"Y"}, {"x":7.5, "y":1, "label":"U"}, {"x":8.5, "y":1, "label":"I"}, {"x":9.5, "y":1, "label":"O"}, {"x":10.5, "y":1, "label":"P"}, {"x":11.5, "y":1, "label":"{"}, {"x":12.5, "y":1, "label":"}"}, {"x":13.5, "y":1, "label":"|", "w":1.5}, {"x":0, "y":2, "label":"Caps Lock", "w":1.75}, {"x":1.75, "y":2, "label":"A"}, {"x":2.75, "y":2, "label":"S"}, {"x":3.75, "y":2, "label":"D"}, {"x":4.75, "y":2, "label":"F"}, {"x":5.75, "y":2, "label":"G"}, {"x":6.75, "y":2, "label":"H"}, {"x":7.75, "y":2, "label":"J"}, {"x":8.75, "y":2, "label":"K"}, {"x":9.75, "y":2, "label":"L"}, {"x":10.75, "y":2, "label":":"}, {"x":11.75, "y":2, "label":"\""}, {"x":12.75, "y":2, "label":"Enter", "w":2.25}, {"x":0, "y":3, "label":"Shift", "w":2.25}, {"x":2.25, "y":3, "label":"Z"}, {"x":3.25, "y":3, "label":"X"}, {"x":4.25, "y":3, "label":"C"}, {"x":5.25, "y":3, "label":"V"}, {"x":6.25, "y":3, "label":"B"}, {"x":7.25, "y":3, "label":"N"}, {"x":8.25, "y":3, "label":"M"}, {"x":9.25, "y":3, "label":"<"}, {"x":10.25, "y":3, "label":">"}, {"x":11.25, "y":3, "label":"?"}, {"x":12.25, "y":3, "label":"Shift", "w":2.75}, {"x":0, "y":4, "label":"Ctrl", "w":1.25}, {"x":1.25, "y":4, "label":"Win", "w":1.25}, {"x":2.5, "y":4, "label":"Alt", "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "label":"Alt", "w":1.25}, {"x":11.25, "y":4, "label":"Win", "w":1.25}, {"x":12.5, "y":4, "label":"Menu", "w":1.25}, {"x":13.75, "y":4, "label":"Ctrl", "w":1.25}] + "layout": [ + {"x":0, "y":0, "label":"~"}, {"x":1, "y":0, "label":"!"}, {"x":2, "y":0, "label":"@"}, {"x":3, "y":0, "label":"#"}, {"x":4, "y":0, "label":"$"}, {"x":5, "y":0, "label":"%"}, {"x":6, "y":0, "label":"^"}, {"x":7, "y":0, "label":"&"}, {"x":8, "y":0, "label":"*"}, {"x":9, "y":0, "label":"("}, {"x":10, "y":0, "label":")"}, {"x":11, "y":0, "label":"_"}, {"x":12, "y":0, "label":"+"}, {"x":13, "y":0, "label":"Backspace", "w":2}, + {"x":0, "y":1, "label":"Tab", "w":1.5}, {"x":1.5, "y":1, "label":"Q"}, {"x":2.5, "y":1, "label":"W"}, {"x":3.5, "y":1, "label":"E"}, {"x":4.5, "y":1, "label":"R"}, {"x":5.5, "y":1, "label":"T"}, {"x":6.5, "y":1, "label":"Y"}, {"x":7.5, "y":1, "label":"U"}, {"x":8.5, "y":1, "label":"I"}, {"x":9.5, "y":1, "label":"O"}, {"x":10.5, "y":1, "label":"P"}, {"x":11.5, "y":1, "label":"{"}, {"x":12.5, "y":1, "label":"}"}, {"x":13.5, "y":1, "label":"|", "w":1.5}, + {"x":0, "y":2, "label":"Caps Lock", "w":1.75}, {"x":1.75, "y":2, "label":"A"}, {"x":2.75, "y":2, "label":"S"}, {"x":3.75, "y":2, "label":"D"}, {"x":4.75, "y":2, "label":"F"}, {"x":5.75, "y":2, "label":"G"}, {"x":6.75, "y":2, "label":"H"}, {"x":7.75, "y":2, "label":"J"}, {"x":8.75, "y":2, "label":"K"}, {"x":9.75, "y":2, "label":"L"}, {"x":10.75, "y":2, "label":":"}, {"x":11.75, "y":2, "label":"\""}, {"x":12.75, "y":2, "label":"Enter", "w":2.25}, + {"x":0, "y":3, "label":"Shift", "w":2.25}, {"x":2.25, "y":3, "label":"Z"}, {"x":3.25, "y":3, "label":"X"}, {"x":4.25, "y":3, "label":"C"}, {"x":5.25, "y":3, "label":"V"}, {"x":6.25, "y":3, "label":"B"}, {"x":7.25, "y":3, "label":"N"}, {"x":8.25, "y":3, "label":"M"}, {"x":9.25, "y":3, "label":"<"}, {"x":10.25, "y":3, "label":">"}, {"x":11.25, "y":3, "label":"?"}, {"x":12.25, "y":3, "label":"Shift", "w":2.75}, + {"x":0, "y":4, "label":"Ctrl", "w":1.25}, {"x":1.25, "y":4, "label":"Win", "w":1.25}, {"x":2.5, "y":4, "label":"Alt", "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "label":"Alt", "w":1.25}, {"x":11.25, "y":4, "label":"Win", "w":1.25}, {"x":12.5, "y":4, "label":"Menu", "w":1.25}, {"x":13.75, "y":4, "label":"Ctrl", "w":1.25}] }, "LAYOUT_60_iso": { - "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + "layout": [ + {"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] }, "LAYOUT_60_ansi_split_bs_rshift": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Win", "x":11.5, "y":4}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + "layout": [ + {"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Win", "x":11.5, "y":4}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] }, + + "LAYOUT_60_ansi_split_rshift": { + "layout": [ + {"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0, "w":2}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Esc", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Alt", "x":1.25, "y":4, "w": 1.25}, {"label":"Gui", "x":2.5, "y":4, "w":1.25}, {"label": "Space", "x":3.75, "y":4, "w":6.25}, {"label":"Fn", "x":10, "y":4, "w":1.25}, {"label":"Gui", "x":11.25, "y":4, "w": 1.25}, {"label":"Alt", "x":12.5, "y":4, "w": 1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] + }, + + "LAYOUT_60_ansi_tsangan_split_rshift": { + "layout": [ + {"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label": "Bksp", "x":13, "y":0, "w":2}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Esc", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label": "Alt Gr", "x":14, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":1.5, "y":4}, {"label":"GUI", "x":2.5, "y":4, "w":1.5}, {"label":"space", "x":4, "y":4, "w":7}, {"label":"Fn", "x":11, "y":4, "w":1.5}, {"label":"Alt", "x":12.5, "y":4}, {"label":"GUI", "x":13.5, "y":4, "w": 1.5} + ] + }, + "LAYOUT_60_hhkb": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Delete", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Os", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Os", "x":12.5, "y":4}] + "layout": [ + {"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Delete", "x":13.5, "y":1, "w":1.5}, + {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, + {"label":"Os", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Os", "x":12.5, "y":4}] } } } diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/badger/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/badger/keymap.c new file mode 100644 index 0000000000..5229657bc6 --- /dev/null +++ b/keyboards/1upkeyboards/1up60rgb/keymaps/badger/keymap.c @@ -0,0 +1,59 @@ +/* +Copyright 2020 Dan White +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 "badger.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY_MAC] = LAYOUT_60_ansi_tsangan_split_rshift(\ + 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_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, \ + MOVE_MAC, 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, CFG_MAC, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, ADJUST, KC_RALT, KC_RGUI), + + [_MOVE_MAC] = LAYOUT_60_ansi_tsangan_split_rshift(\ + MAC_FRC, MM_LEFT, MM_RGHT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_0, IJ_TOP, IJ_BOTT, KC_DEL, \ + KC_BACK, IJ_STEP, IJ_INTO, IJ_OUT, IJ_RUN, IJ_STOP, _______, WD_BACK, KC_HOME, KC_END, WD_FRWD, IJ_BACK, IJ_FWD, KC_NEXT, \ + _______, MM_LH, MM_MAX, MM_RH, IJ_FIND, IJ_IMPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CM_RIGHT, CM_DOWN, _______, \ + _______, MM_UH, MM_BH, MAC_CPY, MAC_PST, IJ_IMPH, _______, IJ_REN, IJ_IMPL, IJ_DECL, IJ_USAG, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______), + + [_QWERTY_LINUX] = LAYOUT_60_ansi_tsangan_split_rshift(\ + 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_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, \ + MOVE, 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, CFG_LNX, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, ADJUST, KC_LALT, KC_RGUI), + + [_MOVE_LINUX] = LAYOUT_60_ansi_tsangan_split_rshift(\ + KC_GRV, VD_1, VD_2, VD_3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + KC_BACK, WM_VD1, WM_UH, WM_VD2, RESET, KC_MSTP, KC_MPLY, KC_PGUP, KC_HOME, KC_END, KC_PGDN, _______, _______, KC_NEXT, \ + _______, WM_LH, WM_MAX, WM_RH, WD_FRWD, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CS_RIGHT, CS_DOWN, _______, \ + _______, WM_VD3, WM_BH, OS_COPY, OS_PAST, WD_BACK, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______), + + [_ADJUST] = LAYOUT_60_ansi_tsangan_split_rshift(\ + 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_WREF, KC_MSTP, KC_MPLY, KC_PGUP, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_INS, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, DF_1, DF_2, KC_CAPS, _______, KC_MPRV, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, KC_WSCH, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______), + + [_CONFIG] = LAYOUT_60_ansi_tsangan_split_rshift(\ + _______, 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, \ + _______, NK_ON, NK_OFF, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \ + _______, GE_SWAP, GE_NORM, DEBUG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_M_B, _______, _______, RGB_TOG, _______, \ + _______, LAG_SWP, LAG_NRM, _______, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_SPD, RGB_M_K, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______) +}; + diff --git a/keyboards/1upkeyboards/super16/keymaps/via/rules.mk b/keyboards/1upkeyboards/super16/keymaps/via/rules.mk index 36b7ba9cbc..7fe9493aff 100644 --- a/keyboards/1upkeyboards/super16/keymaps/via/rules.mk +++ b/keyboards/1upkeyboards/super16/keymaps/via/rules.mk @@ -1,2 +1,4 @@ VIA_ENABLE = yes LTO_ENABLE = yes +RGB_MATRIX_ENABLE = no +RGBLIGHT_ENABLE = yes diff --git a/keyboards/1upkeyboards/sweet16/v1/rules.mk b/keyboards/1upkeyboards/sweet16/v1/rules.mk index 09bd9e9e25..4c4280cdd4 100644 --- a/keyboards/1upkeyboards/sweet16/v1/rules.mk +++ b/keyboards/1upkeyboards/sweet16/v1/rules.mk @@ -14,4 +14,4 @@ BOOTLOADER = caterina RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/1upkeyboards/sweet16/v2/promicro/rules.mk b/keyboards/1upkeyboards/sweet16/v2/promicro/rules.mk index 9f38504a8c..16510f7674 100644 --- a/keyboards/1upkeyboards/sweet16/v2/promicro/rules.mk +++ b/keyboards/1upkeyboards/sweet16/v2/promicro/rules.mk @@ -18,4 +18,4 @@ CONSOLE_ENABLE = yes RGBLIGHT_ENABLE = no ENCODER_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/40percentclub/mf68/keymaps/andyjack/keymap.c b/keyboards/40percentclub/mf68/keymaps/andyjack/keymap.c new file mode 100644 index 0000000000..0dc41dd82e --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/andyjack/keymap.c @@ -0,0 +1,144 @@ +/* +Copyright 2020 Andy Jack + +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 QMK_KEYBOARD_H + +enum layers { + _QWERTY, + _L1, + _L2 +}; + +#define CTL_ESC LCTL_T(KC_ESC) + +/* these key combos are mapped to shell commands in my .keylaunchrc */ +#define MUT_IN LALT(KC_F10) +#define MUT_OUT LALT(KC_F11) +#define MUT_MIC LALT(KC_F12) +#define SCN_LCK LCTL(KC_SLCK) + +extern keymap_config_t keymap_config; + +enum custom_keycodes { + AJ_FN = SAFE_RANGE, + AJ_RCTL, + AJ_MSWP, + AJ_MLCK, +}; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_68_ansi( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, 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_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, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, AJ_FN, AJ_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_L1] = LAYOUT_68_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, KC_VOLU, KC_HOME, + _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, MUT_IN , MUT_OUT, MUT_MIC, _______, _______, BL_STEP, _______, KC_VOLD, KC_END, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, SCN_LCK, _______, _______, _______, + _______, _______, _______, _______, KC_BTN3, _______, _______, KC_MUTE, _______, _______, _______, _______, KC_MUTE, + _______, AJ_MLCK, AJ_MSWP, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT + ), + [_L2] = LAYOUT_68_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, KC_BSPC, KC_VOLU, KC_HOME, + _______, _______, _______, KC_UP, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, KC_VOLD, KC_END, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, _______, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT + ) +}; +// clang-format on + +static bool aj_fn_down = false; +static bool aj_rctl_down = false; +static uint8_t keycode_for_aj_rctl; + +/* My version of: + https://www.reddit.com/r/olkb/comments/8eticz/how_to_activate_a_layer_with_a_combination/dxygw0f/ +* AJ_FN by itself turns on layer 1 +* AJ_RCTL by itself acts as a control key +* pressing FN and RCTL together, in any order, turns on layer 2 +*/ +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case AJ_FN: + if (record->event.pressed) { + if (aj_rctl_down) { + layer_on(_L2); + } else { + layer_on(_L1); + } + aj_fn_down = true; + } else { + layer_off(_L1); + layer_off(_L2); + aj_fn_down = false; + } + return false; + break; + case AJ_RCTL: + if (record->event.pressed) { + if (aj_fn_down) { + layer_on(_L2); + } else { + register_code(keycode_for_aj_rctl); + } + aj_rctl_down = true; + } else { + layer_off(_L2); + unregister_code(keycode_for_aj_rctl); + aj_rctl_down = false; + } + return false; + break; + case AJ_MSWP: + case AJ_MLCK: + if (record->event.pressed) { + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + switch (keycode) { + case AJ_MSWP: + keymap_config.swap_lalt_lgui = !keymap_config.swap_lalt_lgui; + keymap_config.swap_ralt_rgui = keymap_config.swap_lalt_lgui; + keycode_for_aj_rctl = keymap_config.swap_lalt_lgui ? KC_RALT : KC_RCTL; + break; + case AJ_MLCK: + keymap_config.no_gui = !keymap_config.no_gui; + break; + } + eeconfig_update_keymap(keymap_config.raw); + clear_keyboard(); // clear to prevent stuck keys + } + return false; + break; + } + return true; +} + +void keyboard_post_init_user(void) { + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keycode_for_aj_rctl = keymap_config.swap_lalt_lgui ? KC_RALT : KC_RCTL; + eeconfig_update_keymap(keymap_config.raw); + clear_keyboard(); // clear to prevent stuck keys +} diff --git a/keyboards/40percentclub/mf68/keymaps/andyjack/readme.md b/keyboards/40percentclub/mf68/keymaps/andyjack/readme.md new file mode 100644 index 0000000000..17a9d9e90f --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/andyjack/readme.md @@ -0,0 +1,22 @@ +## Customizations from the `default` keymap + +* caps lock is left ctrl / press & release for escape +* keyboard LED brightness control - Fn + ] (same as default) +* bootmagic: + * ability to swap keys - for moving between mac and win/linux + * for win/linux - keys are as labeled in layer 0; AJ_RCTL is right ctl + * for mac: + * LALT and LGUI swapped + * RALT key sends RGUI code + * AJ_RCTL key sends RALT code + * layer 2 access via Fn + AJ_RCTL pressed in any order + * regardless of swapped state + * ability to disable left gui +* Fn + v sends a middle mouse click - nice for pasting the mouse selection in + linux - I always mess up and scroll while clicking + * note: the mouse cursor has to be placed at the insert point +* mapping some Fn + key combinations to program launch shortcuts + + diff --git a/keyboards/40percentclub/mf68/keymaps/andyjack/rules.mk b/keyboards/40percentclub/mf68/keymaps/andyjack/rules.mk new file mode 100644 index 0000000000..617f5f6fc9 --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/andyjack/rules.mk @@ -0,0 +1,2 @@ +MOUSEKEY_ENABLE = yes +BOOTMAGIC_ENABLE = full diff --git a/keyboards/40percentclub/mf68/keymaps/delivrance/config.h b/keyboards/40percentclub/mf68/keymaps/delivrance/config.h new file mode 100644 index 0000000000..7ae8805765 --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/delivrance/config.h @@ -0,0 +1,42 @@ +/* + * Dan's Magicforce 68 (MF68) QMK Keyboard + * Copyright (C) Dan + * + * This file is part of Dan's MF68 QMK Keyboard. + * + * Dan's MF68 QMK Keyboard is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Dan's MF68 QMK Keyboard 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 Dan's MF68 QMK Keyboard. If not, see . + */ + +#pragma once + +#undef MANUFACTURER +#define MANUFACTURER Dan + +#undef PRODUCT +#define PRODUCT Magicforce 68 QMK + +#undef BACKLIGHT_LEVELS +#define BACKLIGHT_LEVELS 20 + +// Disable backlight breathing +#undef BACKLIGHT_BREATHING + +// Set USB polling rate to 1000 Hz +#define USB_POLLING_INTERVAL_MS 1 + +// Enable NKRO on boot +#define FORCE_NKRO + +// Backlight idle timeout in seconds +#define BACKLIGHT_IDLE_TIMEOUT 1200 \ No newline at end of file diff --git a/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c b/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c new file mode 100644 index 0000000000..6f9179926c --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/delivrance/keymap.c @@ -0,0 +1,232 @@ +/* + * Dan's Magicforce 68 (MF68) QMK Keyboard + * Copyright (C) Dan + * + * This file is part of Dan's MF68 QMK Keyboard. + * + * Dan's MF68 QMK Keyboard is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Dan's MF68 QMK Keyboard 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 Dan's MF68 QMK Keyboard. If not, see . + */ + +#include QMK_KEYBOARD_H + +#define KC_ KC_TRNS + +#define KC_FN1 MO(_FN) +#define KC_FN2 LT(_FN, KC_CAPS) + +#define KC_BLUP BL_INC // Backlight increase +#define KC_BLDN BL_DEC // Backlight decrease +#define KC_BLTOG BL_TOGG // Backlight toggle +#define KC_TERM TERM_ON // Terminal mode on +#define KC_REC1 DM_REC1 // Record macro 1 +#define KC_PLY1 DM_PLY1 // Play macro 1 +#define KC_REC2 DM_REC2 // Record macro 2 +#define KC_PLY2 DM_PLY2 // Play macro 1 +#define KC_RSTP DM_RSTP // Stop macro recording + +enum { + _QWERTY, + _FN +}; + +/* ┏━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━━━━━┓ ┏━━━━┳━━━━┓ + ┃Esc ┃ 1! ┃ 2@ ┃ 3# ┃ 4$ ┃ 5% ┃ 6^ ┃ 7& ┃ 8* ┃ 9( ┃ 0) ┃ -_ ┃ =+ ┃ ←─ ┃ ┃Ins ┃PgUp┃ + ┣━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━━━━━┫ ┣━━━━╋━━━━┫ + ┃ Tab ┃ Q ┃ W ┃ E ┃ R ┃ T ┃ Y ┃ U ┃ I ┃ O ┃ P ┃ [{ ┃ ]} ┃ \| ┃ ┃Del ┃PgDn┃ + ┣━━━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━━━━━━┫ ┗━━━━┻━━━━┛ + ┃ Caps ┃ A ┃ S ┃ D ┃ F ┃ G ┃ H ┃ J ┃ K ┃ L ┃ ;: ┃ '" ┃ Enter ┃ Magicforce + ┣━━━━━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━━━━━━━━━┫ ┏━━━━┓ + ┃ Shift ┃ Z ┃ X ┃ C ┃ V ┃ B ┃ N ┃ M ┃ ,< ┃ .> ┃ /? ┃ Shift ┃ ┃ ↑ ┃ Dan + ┣━━━━━┳━━━━┻┳━━━┻━┳━━┻━━━━┻━━━━┻━━━━┻━━━━┻━━━━┻━━━┳┻━━━━╋━━━━┻┳━━━━━┳━━┳━━┻━╋━━━━╋━━━━┓ + ┃Ctrl ┃ GUI ┃ Alt ┃ ━━━━━ ┃ Alt ┃ Fn ┃Ctrl ┃ ┃ ← ┃ ↓ ┃ → ┃ + ┗━━━━━┻━━━━━┻━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━┻━━━━━┻━━━━━┛ ┗━━━━┻━━━━┻━━━━┛ */ + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_QWERTY] = LAYOUT_kc( /* Default layer + ┏━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━━━━━┓ ┏━━━━┳━━━━┓ */ + GESC, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP, /* + ┣━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━━━━━┫ ┣━━━━╋━━━━┫ */ + TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN, /* + ┣━━━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━━━━━━┫ ┗━━━━┻━━━━┛ */ + FN2 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER , /* + ┣━━━━━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━━━━━━━━━┫ ┏━━━━┓ */ + LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP , /* + ┣━━━━━┳━━━━┻┳━━━┻━┳━━┻━━━━┻━━━━┻━━━━┻━━━━┻━━━━┻━━━┳┻━━━━╋━━━━┻┳━━━━━┳━━┳━━┻━╋━━━━╋━━━━┓ */ + LCTL ,LGUI ,LALT , SPACE ,RALT , FN1 ,RCTL , LEFT,DOWN,RGHT /* + ┗━━━━━┻━━━━━┻━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━┻━━━━━┻━━━━━┛ ┗━━━━┻━━━━┻━━━━┛ */), + +[_FN] = LAYOUT_kc( /* FN & CAPS layer + ┏━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━━━━━┓ ┏━━━━┳━━━━┓ */ + GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10, F11, F12, RSTP , PSCR,HOME, /* + ┣Esc ┻ 1! ┻ 2@ ┻ 3# ┻ 4$ ┻ 5% ┻ 6^ ┻ 7& ┻ 8* ┻ 9( ┻ 0) ┻ -_ ┻ =+ ┻━┳━ ←─ ━┫ ┣Ins ╋PgUp┫ */ + ,PLY1,PLY2, , , , , , 7 , 8 , 9 ,BLDN,BLUP,BLTOG , ,END , /* + ┣ Tab ━┻ Q ━┻ W ━┻ E ━┻ R ━┻ T ━┻ Y ━┻ U ━┻ I ━┻ O ━┻ P ━┻ [{ ┻ ]} ┻━ \| ━┫ ┗Del ┻PgDn┛ */ + , , , , , , , , 4 , 5 , 6 , , TERM , /* + ┣━ Caps ━┻ A ━┻ S ━┻ D ━┻ F ━┻ G ━┻ H ━┻ J ━┻ K ━┻ L ━┻ ;: ┻ '" ┻━ Enter ━┫ ┏━━━━┓ */ + ,REC1,REC2, , ,MSTP, ,MUTE, 1 , 2 , 3 , , VOLU, /* + ┣━━ Shift ━┻ Z ━┻ X ━┻ C ━┻ V ━┻ B ━┻ N ━┻ M ━┻ ,< ┻ .> ╋ /? ┻┳━━ Shift ━━┻━╋ ↑ ━╋━━━━┓ */ + , , , MPLY , 0 , , , MPRV,VOLD,MNXT /* + ┗Ctrl ┻ GUI ┻ Alt ┻━━━━━━━━━━━━ Space ━━━━━━━━━━━━┻ Alt ┻ Fn ━┻Ctrl ┛ ┗ ← ━┻ ↓ ━┻ → ━┛ */) +}; +// clang-format on + +// Initialization code +// ------------------- + +void keyboard_post_init_user(void) { + backlight_level(2); +} + +// Custom backlight driver +// ----------------------- + +// http://jared.geek.nz/2013/feb/linear-led-pwm +float cie1931(float x) { + x *= 100.0 / BACKLIGHT_LEVELS; + float y; + + if (x < 8) { + y = x / 902.3; + } else { + y = (x + 16.0) / 116.0; + y = y * y * y; + } + + return round(y * 255); +} + +void backlight_init_ports(void) { + setPinOutput(BACKLIGHT_PIN); + writePinLow(BACKLIGHT_PIN); + + TCCR1A = _BV(COM1A1) | _BV(WGM11); + TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); + + ICR1 = 0xFFU; // Set PWM levels to 255 (enables high-frequency PWM) +} + +void backlight_set(uint8_t level) { + if (level > BACKLIGHT_LEVELS) { + level = BACKLIGHT_LEVELS; + } + + if (level == 0) { + TCCR1A &= ~(_BV(COM1A1)); // Disable PWM + } else { + TCCR1A |= _BV(COM1A1); // Enable PWM + } + + OCR1A = cie1931(level); +} + +// Custom macro hooks +// ------------------ + +// Redefine with lower delay +void led_blink(void) { + backlight_toggle(); + wait_ms(25); + backlight_toggle(); +} + +void dynamic_macro_record_start_user(void) { + led_blink(); +} + +void dynamic_macro_play_user(int8_t direction) { + led_blink(); +} + +void dynamic_macro_record_key_user(int8_t direction, keyrecord_t *record) { + led_blink(); +} + +void dynamic_macro_record_end_user(int8_t direction) { + led_blink(); +} + +// Custom Caps Lock backlight behaviour +// ------------------------------------ + +void led_set_user(uint8_t usb_led) { + // This exists because I don't like the backlight to turn OFF when the Caps Lock is ON. + // That is, this will turn the backlight ON (at half the brightness) when the Caps Lock is ON as well. + static bool prev_is_caps_on; + bool is_caps_on = IS_LED_ON(usb_led, USB_LED_CAPS_LOCK); + + if (prev_is_caps_on != is_caps_on) { + prev_is_caps_on = is_caps_on; + + if (is_caps_on) { + backlight_set(BACKLIGHT_LEVELS / 2); + } else { + if (is_backlight_enabled()) { + backlight_set(get_backlight_level()); + } else { + backlight_set(0); + } + } + } + + // Turn on the Pro Micro's on-board LEDs for Caps Lock + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + // Set to low + setPinOutput(B0); + writePinLow(B0); + setPinOutput(D5); + writePinLow(D5); + } else { + // Set to Hi-Z + setPinInput(B0); + setPinInput(D5); + } +} + +// Backlight idle timeout feature +// ------------------------------ + +static uint32_t timer; +static bool is_idle; + +void matrix_scan_user() { + // Check the timer only if the keyboard is not idle + if (!is_idle) { + if (timer_elapsed32(timer) >= (uint32_t) BACKLIGHT_IDLE_TIMEOUT * 1000) { + is_idle = true; + + // Both backlight_level and backlight_level_noeeprom modify the global backlight config (not useful) + // Instead, use backlight_set in order to restore the current backlight level later on + backlight_set(0); + } + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // Reset timer on each keypress + timer = timer_read32(); + + // Enable backlight back only when keyboard is idling (which implies the backlight was turned off previously) + if (is_idle) { + is_idle = false; + + // Set back the original backlight level only if it is actually enabled globally + if (is_backlight_enabled()) { + // The current backlight level can be obtained with get_backlight_level + backlight_set(get_backlight_level()); + } + } + + return true; +} diff --git a/keyboards/40percentclub/mf68/keymaps/delivrance/readme.md b/keyboards/40percentclub/mf68/keymaps/delivrance/readme.md new file mode 100644 index 0000000000..158235b5ef --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/delivrance/readme.md @@ -0,0 +1,38 @@ +# Dan's Magicforce 68 (MF68) QMK Keyboard + +> https://github.com/delivrance + +``` +┏━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━━━━━┓ ┏━━━━┳━━━━┓ +┃Esc ┃ 1! ┃ 2@ ┃ 3# ┃ 4$ ┃ 5% ┃ 6^ ┃ 7& ┃ 8* ┃ 9( ┃ 0) ┃ -_ ┃ =+ ┃ ←─ ┃ ┃Ins ┃PgUp┃ +┣━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━━━━━┫ ┣━━━━╋━━━━┫ +┃ Tab ┃ Q ┃ W ┃ E ┃ R ┃ T ┃ Y ┃ U ┃ I ┃ O ┃ P ┃ [{ ┃ ]} ┃ \| ┃ ┃Del ┃PgDn┃ +┣━━━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━━━━━━┫ ┗━━━━┻━━━━┛ +┃ Caps ┃ A ┃ S ┃ D ┃ F ┃ G ┃ H ┃ J ┃ K ┃ L ┃ ;: ┃ '" ┃ Enter ┃ Magicforce +┣━━━━━━━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━┳━━┻━━━━━━━━━┫ ┏━━━━┓ +┃ Shift ┃ Z ┃ X ┃ C ┃ V ┃ B ┃ N ┃ M ┃ ,< ┃ .> ┃ /? ┃ Shift ┃ ┃ ↑ ┃ Dan +┣━━━━━┳━━━━┻┳━━━┻━┳━━┻━━━━┻━━━━┻━━━━┻━━━━┻━━━━┻━━━┳┻━━━━╋━━━━┻┳━━━━━┳━━┳━━┻━╋━━━━╋━━━━┓ +┃Ctrl ┃ GUI ┃ Alt ┃ ━━━━━ ┃ Alt ┃ Fn ┃Ctrl ┃ ┃ ← ┃ ↓ ┃ → ┃ +┗━━━━━┻━━━━━┻━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━┻━━━━━┻━━━━━┛ ┗━━━━┻━━━━┻━━━━┛ +``` + +## Features + +- Right ALT and FN keys swapped. +- USB Polling rate set to 1000 Hz (1 ms). +- Dynamic macros enabled (2 macros). +- Transient EEPROM to avoid wearing (r/w from/to RAM). +- NKRO enabled on boot (up to 248 keys at once). +- CAPS LOCK key used as alias to the FN key. +- Pro Micro's on-board LEDs used for CAPS LOCK status. +- Backlight also used as CAPS LOCK status indicator. +- Both Grave and Tilde characters embedded in ESC. +- Media control keys and extra number keys (numpad). +- Flicker-free backlight thanks to high-frequency PWM mode. +- Linear backlight brightness intensity (better for human eyes). +- Backlight turns off automatically after 20 minutes idle. +- Backlight brightness levels set to 20 (5% steps) + 1 (off). +- Backlight breathing completely disabled. +- Link Time Optimizations to reduce compiled size. +- QMK Terminal enabled for fun (pretty useless in practice). +- Performing ~1550 matrix scans per second. diff --git a/keyboards/40percentclub/mf68/keymaps/delivrance/rules.mk b/keyboards/40percentclub/mf68/keymaps/delivrance/rules.mk new file mode 100644 index 0000000000..5ac2ce5ccb --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/delivrance/rules.mk @@ -0,0 +1,10 @@ +BACKLIGHT_DRIVER = custom +NKRO_ENABLE = yes +TERMINAL_ENABLE = yes +DYNAMIC_MACRO_ENABLE = yes + +# Use RAM (fake EEPROM, transient) instead of real EEPROM +EEPROM_DRIVER = transient + +# LTO: Link Time Optimizations. Reduce compiled size +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/40percentclub/nein/config.h b/keyboards/40percentclub/nein/config.h index e053b487fd..b96f5fbe5d 100644 --- a/keyboards/40percentclub/nein/config.h +++ b/keyboards/40percentclub/nein/config.h @@ -19,8 +19,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0A0C +#define VENDOR_ID 0x3430 // "40" +#define PRODUCT_ID 0x9999 #define DEVICE_VER 0x9999 #define MANUFACTURER di0ib #define PRODUCT The nein Keyboard diff --git a/keyboards/40percentclub/nein/info.json b/keyboards/40percentclub/nein/info.json index aaadc71861..2a28ffc008 100644 --- a/keyboards/40percentclub/nein/info.json +++ b/keyboards/40percentclub/nein/info.json @@ -1,6 +1,6 @@ { "keyboard_name": "nein", - "url": "", + "url": "http://www.40percent.club/2019/04/nein.html", "maintainer": "qmk", "width": 3, "height": 3, diff --git a/keyboards/40percentclub/nein/keymaps/via/keymap.c b/keyboards/40percentclub/nein/keymaps/via/keymap.c new file mode 100644 index 0000000000..528de8246d --- /dev/null +++ b/keyboards/40percentclub/nein/keymaps/via/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2019 + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_3x3( + KC_MUTE, KC_HOME, KC_MPLY, + MO(1), KC_UP, KC_END, + KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_ortho_3x3( + RESET, _______, KC_STOP, + _______, _______, RGB_MOD, + KC_MPRV, _______, KC_MNXT + ), + [2] = LAYOUT_ortho_3x3( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), + [3] = LAYOUT_ortho_3x3( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), +}; diff --git a/keyboards/40percentclub/nein/keymaps/via/rules.mk b/keyboards/40percentclub/nein/keymaps/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/40percentclub/nein/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/4pplet/waffling60/README.md b/keyboards/4pplet/waffling60/README.md index 6c333a5607..a6b56a69ea 100644 --- a/keyboards/4pplet/waffling60/README.md +++ b/keyboards/4pplet/waffling60/README.md @@ -5,7 +5,7 @@ A 60% PCB for MX switches, one hot swap and one solder-pcb version with decent l More info: https://geekhack.org/index.php?topic=103531.0 * Keyboard Maintainer: [4pplet](https://github.com/4pplet) -* Hardware Supported: waffling60 Rev A +* Hardware Supported: [waffling60](https://github.com/4pplet/waffling60) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/4pplet/waffling60/rev_a/config.h b/keyboards/4pplet/waffling60/rev_a/config.h index d232d3e70a..6bbc68be60 100644 --- a/keyboards/4pplet/waffling60/rev_a/config.h +++ b/keyboards/4pplet/waffling60/rev_a/config.h @@ -25,7 +25,7 @@ //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 0 +#define DEBOUNCE 5 #define QMK_ESC_OUTPUT D3 // usually COL #define QMK_ESC_INPUT D4 // usually ROW diff --git a/keyboards/ai03/soyuz/config.h b/keyboards/ai03/soyuz/config.h index 213b6509b4..feb55107c3 100644 --- a/keyboards/ai03/soyuz/config.h +++ b/keyboards/ai03/soyuz/config.h @@ -21,11 +21,10 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0xA103 -#define PRODUCT_ID 0x0004 +#define PRODUCT_ID 0x0018 #define DEVICE_VER 0x0001 #define MANUFACTURER ai03 Design Studio #define PRODUCT Soyuz -#define DESCRIPTION Single-PCB Numpad Kit /* key matrix size */ #define MATRIX_ROWS 5 @@ -118,59 +117,6 @@ along with this program. If not, see . */ //#define FORCE_NKRO -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* key combination for magic key command */ -/* defined by default; to change, uncomment and set to the combination you want */ -// #define IS_COMMAND() (get_mods() == (MOD_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_HELP H -//#define MAGIC_KEY_HELP_ALT SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER0_ALT GRAVE -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER B -//#define MAGIC_KEY_BOOTLOADER_ALT ESC -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_EEPROM_CLEAR BSPACE -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - /* * Feature disable options * These options are also useful to firmware size reduction. @@ -189,29 +135,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * 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 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ai03/soyuz/keymaps/mrsendyyk/keymap.c b/keyboards/ai03/soyuz/keymaps/mrsendyyk/keymap.c deleted file mode 100644 index f55f58a571..0000000000 --- a/keyboards/ai03/soyuz/keymaps/mrsendyyk/keymap.c +++ /dev/null @@ -1,24 +0,0 @@ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /*[0] - *┌───┬───┬───┬───┐ - *│N L│/ │* │- │ - *├───┼───┼───┼───┤ - *│7 │8 │9 │ │ - *├───┼───┼───┤+ │ - *│4 │5 │6 │ │ - *├───┼───┼───┼───┤ - *│1 │2 │3 │ │ - *├───┴───┼───┤Ent│ - *│0 │. │ │ - *└───────┴───┴───┘ - */ - - [0] = LAYOUT_numpad_5x4(KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_P7, KC_P8, KC_P9, - KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_P1, KC_P2, KC_P3, - KC_P0, KC_PDOT, KC_PENT) -}; diff --git a/keyboards/ai03/soyuz/keymaps/mrsendyyk/readme.md b/keyboards/ai03/soyuz/keymaps/mrsendyyk/readme.md deleted file mode 100644 index 44db060bb7..0000000000 --- a/keyboards/ai03/soyuz/keymaps/mrsendyyk/readme.md +++ /dev/null @@ -1,25 +0,0 @@ -# [Sendy YK](https://mr.sendyyk.com)'s Keymap - -`LAYOUT_numpad_5x4` - -### [0] - -``` -┌───┬───┬───┬───┐ -│N L│/ │* │- │ -├───┼───┼───┼───┤ -│7 │8 │9 │ │ -├───┼───┼───┤+ │ -│4 │5 │6 │ │ -├───┼───┼───┼───┤ -│1 │2 │3 │ │ -├───┴───┼───┤Ent│ -│0 │. │ │ -└───────┴───┴───┘ -``` - -## Build The Firmware - -You will need to build the firmware. To do so go to your terminal window and run the compile command: - - qmk compile -kb ai03/soyuz -km mrsendyyk diff --git a/keyboards/ai03/soyuz/keymaps/via/keymap.c b/keyboards/ai03/soyuz/keymaps/via/keymap.c new file mode 100644 index 0000000000..9b62ca2172 --- /dev/null +++ b/keyboards/ai03/soyuz/keymaps/via/keymap.c @@ -0,0 +1,59 @@ +/* Copyright (C) 2020 Sendy YK (https://mr.sendyyk.com). + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, // Default Layer + _FN, // Fn Layer 1 + _FN2, // Fn Layer 2 + _FN3 // Fn Layer 3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default Layer + [_BASE] = LAYOUT_ortho_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_P0, KC_PDOT, KC_PENT + ), + // Fn Layer 1 + [_FN] = LAYOUT_ortho_5x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + // Fn Layer 2 + [_FN2] = LAYOUT_ortho_5x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + // Fn Layer 3 + [_FN3] = LAYOUT_ortho_5x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/m0lly/keymaps/via/rules.mk b/keyboards/ai03/soyuz/keymaps/via/rules.mk similarity index 100% rename from keyboards/m0lly/keymaps/via/rules.mk rename to keyboards/ai03/soyuz/keymaps/via/rules.mk diff --git a/keyboards/anavi/macropad8/rules.mk b/keyboards/anavi/macropad8/rules.mk index 498c27a209..d4443e3fe6 100644 --- a/keyboards/anavi/macropad8/rules.mk +++ b/keyboards/anavi/macropad8/rules.mk @@ -23,7 +23,6 @@ NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: ht 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 = yes # Enable WS2812 RGB underlight. OLED_DRIVER_ENABLE = yes # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C diff --git a/keyboards/ashpil/modelm_usbc/keymaps/ashpil/keymap.c b/keyboards/ashpil/modelm_usbc/keymaps/ashpil/keymap.c index 35b45e9ccf..30e6af7f6e 100644 --- a/keyboards/ashpil/modelm_usbc/keymaps/ashpil/keymap.c +++ b/keyboards/ashpil/modelm_usbc/keymaps/ashpil/keymap.c @@ -36,7 +36,7 @@ combo_t key_combos[COMBO_COUNT] = { [CTRL_PAUS_RESET] = COMBO_ACTION(reset_combo), }; -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { switch(combo_index) { case CTRL_PAUS_RESET: if (pressed) { diff --git a/keyboards/bakeneko60/bakeneko60.c b/keyboards/bakeneko60/bakeneko60.c new file mode 100644 index 0000000000..809c1ccf18 --- /dev/null +++ b/keyboards/bakeneko60/bakeneko60.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Koichi Katano + * + * 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 "bakeneko60.h" diff --git a/keyboards/bakeneko60/bakeneko60.h b/keyboards/bakeneko60/bakeneko60.h new file mode 100644 index 0000000000..eb2e344f03 --- /dev/null +++ b/keyboards/bakeneko60/bakeneko60.h @@ -0,0 +1,61 @@ +/* Copyright 2020 Koichi Katano + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_60_ansi_split_bs_rshift( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k400, k401, k402, k406, k410, k411, k412, k413 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, KC_NO}, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, KC_NO, k213, KC_NO}, \ + { k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO}, \ + { k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, KC_NO, k410, k411, k412, k413, KC_NO} \ +} + +#define LAYOUT_60_ansi( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k014, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, \ + k400, k401, k402, k406, k410, k411, k412, k413 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, KC_NO, k014 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, KC_NO}, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, KC_NO, k213, KC_NO}, \ + { k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, KC_NO, KC_NO}, \ + { k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, KC_NO, k410, k411, k412, k413, KC_NO} \ +} + +#define LAYOUT_60_tsangan_hhkb( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k400, k401, k402, k406, k411, k412, k413 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, KC_NO}, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, KC_NO, k213, KC_NO}, \ + { k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO}, \ + { k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, KC_NO, KC_NO, k411, k412, k413, KC_NO} \ +} diff --git a/keyboards/bakeneko60/config.h b/keyboards/bakeneko60/config.h new file mode 100644 index 0000000000..9b923552bb --- /dev/null +++ b/keyboards/bakeneko60/config.h @@ -0,0 +1,109 @@ +/* +Copyright 2020 Koichi Katano + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x3A0E +#define PRODUCT_ID 0xCBDC +#define DEVICE_VER 0x0001 +#define MANUFACTURER kkatano +#define PRODUCT Bakeneko 60 + +/* 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 { E6, B7, F7, F4, F5 } +#define MATRIX_COL_PINS { F6, B0, F1, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/bakeneko60/info.json b/keyboards/bakeneko60/info.json new file mode 100644 index 0000000000..6310825ae2 --- /dev/null +++ b/keyboards/bakeneko60/info.json @@ -0,0 +1,219 @@ +{ + "keyboard_name": "Bakeneko 60", + "url": "https://github.com/kkatano/bakeneko-60-pcb", + "maintainer": "kkatano", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi_split_bs_rshift": { + "layout": [ + { "x":0, "y":0 }, + { "x":1, "y":0 }, + { "x":2, "y":0 }, + { "x":3, "y":0 }, + { "x":4, "y":0 }, + { "x":5, "y":0 }, + { "x":6, "y":0 }, + { "x":7, "y":0 }, + { "x":8, "y":0 }, + { "x":9, "y":0 }, + { "x":10, "y":0 }, + { "x":11, "y":0 }, + { "x":12, "y":0 }, + { "x":13, "y":0 }, + { "x":14, "y":0 }, + + { "x":0, "y":1, "w":1.5 }, + { "x":1.5, "y":1 }, + { "x":2.5, "y":1 }, + { "x":3.5, "y":1 }, + { "x":4.5, "y":1 }, + { "x":5.5, "y":1 }, + { "x":6.5, "y":1 }, + { "x":7.5, "y":1 }, + { "x":8.5, "y":1 }, + { "x":9.5, "y":1 }, + { "x":10.5, "y":1 }, + { "x":11.5, "y":1 }, + { "x":12.5, "y":1 }, + { "x":13.5, "y":1, "w":1.5 }, + + { "x":0, "y":2, "w":1.75 }, + { "x":1.75, "y":2 }, + { "x":2.75, "y":2 }, + { "x":3.75, "y":2 }, + { "x":4.75, "y":2 }, + { "x":5.75, "y":2 }, + { "x":6.75, "y":2 }, + { "x":7.75, "y":2 }, + { "x":8.75, "y":2 }, + { "x":9.75, "y":2 }, + { "x":10.75, "y":2 }, + { "x":11.75, "y":2 }, + { "x":12.75, "y":2, "w":2.25 }, + + { "x":0, "y":3, "w":2.25 }, + { "x":2.25, "y":3 }, + { "x":3.25, "y":3 }, + { "x":4.25, "y":3 }, + { "x":5.25, "y":3 }, + { "x":6.25, "y":3 }, + { "x":7.25, "y":3 }, + { "x":8.25, "y":3 }, + { "x":9.25, "y":3 }, + { "x":10.25, "y":3 }, + { "x":11.25, "y":3 }, + { "x":12.25, "y":3, "w":1.75 }, + { "x":14, "y":3 }, + + { "x":0, "y":4, "w":1.25 }, + { "x":1.25, "y":4, "w":1.25 }, + { "x":2.5, "y":4, "w":1.25 }, + { "x":3.75, "y":4, "w":6.25 }, + { "x":10, "y":4, "w":1.25 }, + { "x":11.25, "y":4, "w":1.25 }, + { "x":12.5, "y":4, "w":1.25 }, + { "x":13.75, "y":4, "w":1.25 } + ] + }, + "LAYOUT_60_ansi": { + "layout": [ + { "x":0, "y":0 }, + { "x":1, "y":0 }, + { "x":2, "y":0 }, + { "x":3, "y":0 }, + { "x":4, "y":0 }, + { "x":5, "y":0 }, + { "x":6, "y":0 }, + { "x":7, "y":0 }, + { "x":8, "y":0 }, + { "x":9, "y":0 }, + { "x":10, "y":0 }, + { "x":11, "y":0 }, + { "x":12, "y":0 }, + { "x":13, "y":0, "w":2 }, + + { "x":0, "y":1, "w":1.5 }, + { "x":1.5, "y":1 }, + { "x":2.5, "y":1 }, + { "x":3.5, "y":1 }, + { "x":4.5, "y":1 }, + { "x":5.5, "y":1 }, + { "x":6.5, "y":1 }, + { "x":7.5, "y":1 }, + { "x":8.5, "y":1 }, + { "x":9.5, "y":1 }, + { "x":10.5, "y":1 }, + { "x":11.5, "y":1 }, + { "x":12.5, "y":1 }, + { "x":13.5, "y":1, "w":1.5 }, + + { "x":0, "y":2, "w":1.75 }, + { "x":1.75, "y":2 }, + { "x":2.75, "y":2 }, + { "x":3.75, "y":2 }, + { "x":4.75, "y":2 }, + { "x":5.75, "y":2 }, + { "x":6.75, "y":2 }, + { "x":7.75, "y":2 }, + { "x":8.75, "y":2 }, + { "x":9.75, "y":2 }, + { "x":10.75, "y":2 }, + { "x":11.75, "y":2 }, + { "x":12.75, "y":2, "w":2.25 }, + + { "x":0, "y":3, "w":2.25 }, + { "x":2.25, "y":3 }, + { "x":3.25, "y":3 }, + { "x":4.25, "y":3 }, + { "x":5.25, "y":3 }, + { "x":6.25, "y":3 }, + { "x":7.25, "y":3 }, + { "x":8.25, "y":3 }, + { "x":9.25, "y":3 }, + { "x":10.25, "y":3 }, + { "x":11.25, "y":3 }, + { "x":12.25, "y":3, "w":2.75 }, + + { "x":0, "y":4, "w":1.25 }, + { "x":1.25, "y":4, "w":1.25 }, + { "x":2.5, "y":4, "w":1.25 }, + { "x":3.75, "y":4, "w":6.25 }, + { "x":10, "y":4, "w":1.25 }, + { "x":11.25, "y":4, "w":1.25 }, + { "x":12.5, "y":4, "w":1.25 }, + { "x":13.75, "y":4, "w":1.25 } + ] + }, + "LAYOUT_60_tsangan_hhkb": { + "layout": [ + { "x":0, "y":0 }, + { "x":1, "y":0 }, + { "x":2, "y":0 }, + { "x":3, "y":0 }, + { "x":4, "y":0 }, + { "x":5, "y":0 }, + { "x":6, "y":0 }, + { "x":7, "y":0 }, + { "x":8, "y":0 }, + { "x":9, "y":0 }, + { "x":10, "y":0 }, + { "x":11, "y":0 }, + { "x":12, "y":0 }, + { "x":13, "y":0 }, + { "x":14, "y":0 }, + + { "x":0, "y":1, "w":1.5 }, + { "x":1.5, "y":1 }, + { "x":2.5, "y":1 }, + { "x":3.5, "y":1 }, + { "x":4.5, "y":1 }, + { "x":5.5, "y":1 }, + { "x":6.5, "y":1 }, + { "x":7.5, "y":1 }, + { "x":8.5, "y":1 }, + { "x":9.5, "y":1 }, + { "x":10.5, "y":1 }, + { "x":11.5, "y":1 }, + { "x":12.5, "y":1 }, + { "x":13.5, "y":1, "w":1.5 }, + + { "x":0, "y":2, "w":1.75 }, + { "x":1.75, "y":2 }, + { "x":2.75, "y":2 }, + { "x":3.75, "y":2 }, + { "x":4.75, "y":2 }, + { "x":5.75, "y":2 }, + { "x":6.75, "y":2 }, + { "x":7.75, "y":2 }, + { "x":8.75, "y":2 }, + { "x":9.75, "y":2 }, + { "x":10.75, "y":2 }, + { "x":11.75, "y":2 }, + { "x":12.75, "y":2, "w":2.25 }, + + { "x":0, "y":3, "w":2.25 }, + { "x":2.25, "y":3 }, + { "x":3.25, "y":3 }, + { "x":4.25, "y":3 }, + { "x":5.25, "y":3 }, + { "x":6.25, "y":3 }, + { "x":7.25, "y":3 }, + { "x":8.25, "y":3 }, + { "x":9.25, "y":3 }, + { "x":10.25, "y":3 }, + { "x":11.25, "y":3 }, + { "x":12.25, "y":3, "w":1.75 }, + { "x":14, "y":3 }, + + { "x":0, "y":4, "w":1.5 }, + { "x":1.5, "y":4 }, + { "x":2.5, "y":4, "w":1.5 }, + { "x":4, "y":4, "w":7 }, + { "x":11, "y":4, "w":1.5 }, + { "x":12.5, "y":4 }, + { "x":13.5, "y":4, "w":1.5 } + ] + } + } +} diff --git a/keyboards/bakeneko60/keymaps/default/keymap.c b/keyboards/bakeneko60/keymaps/default/keymap.c new file mode 100644 index 0000000000..e1f5cfc2e2 --- /dev/null +++ b/keyboards/bakeneko60/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +/* Copyright 2020 Koichi Katano + * + * 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 QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_60_ansi_split_bs_rshift( + 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_GRV, 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, MO(_FN), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + ), + [_FN] = LAYOUT_60_ansi_split_bs_rshift( + 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, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/bakeneko60/keymaps/default/readme.md b/keyboards/bakeneko60/keymaps/default/readme.md new file mode 100644 index 0000000000..5609e2adbb --- /dev/null +++ b/keyboards/bakeneko60/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Bakeneko 60 diff --git a/keyboards/bakeneko60/keymaps/via/keymap.c b/keyboards/bakeneko60/keymaps/via/keymap.c new file mode 100644 index 0000000000..4034ba70d3 --- /dev/null +++ b/keyboards/bakeneko60/keymaps/via/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2020 Koichi Katano + * + * 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 QMK_KEYBOARD_H + +enum layer_names { + _L0, + _L1, + _L2, + _L3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_L0] = LAYOUT_60_ansi_split_bs_rshift( + 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_GRV, 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, MO(_L1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + ), + [_L1] = LAYOUT_60_ansi_split_bs_rshift( + 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, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_L2] = LAYOUT_60_ansi_split_bs_rshift( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_L3] = LAYOUT_60_ansi_split_bs_rshift( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/candybar/lefty/keymaps/via/rules.mk b/keyboards/bakeneko60/keymaps/via/rules.mk similarity index 100% rename from keyboards/candybar/lefty/keymaps/via/rules.mk rename to keyboards/bakeneko60/keymaps/via/rules.mk diff --git a/keyboards/bakeneko60/readme.md b/keyboards/bakeneko60/readme.md new file mode 100644 index 0000000000..9d8b2d3a2e --- /dev/null +++ b/keyboards/bakeneko60/readme.md @@ -0,0 +1,17 @@ +# Bakeneko 60 + +An open source O-ring gasket mount keyboard + +* Keyboard Maintainer: [kkatano](https://github.com/kkatano) +* Hardware Supported: Bakeneko 60 +* Hardware Availability: [Open source on GitHub](https://github.com/kkatano/bakeneko-60-pcb) + +Make example for this keyboard (after setting up your build environment): + + make bakeneko60:default + +Flashing example for this keyboard: + + make bakeneko60:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/bakeneko60/rules.mk b/keyboards/bakeneko60/rules.mk new file mode 100644 index 0000000000..cc1b100ec9 --- /dev/null +++ b/keyboards/bakeneko60/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 60_ansi_split_bs_rshift 60_ansi 60_tsangan_hhkb diff --git a/keyboards/bakeneko65/bakeneko65.c b/keyboards/bakeneko65/bakeneko65.c new file mode 100644 index 0000000000..aa1ba8e661 --- /dev/null +++ b/keyboards/bakeneko65/bakeneko65.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Koichi Katano + * + * 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 "bakeneko65.h" diff --git a/keyboards/bakeneko65/bakeneko65.h b/keyboards/bakeneko65/bakeneko65.h new file mode 100644 index 0000000000..db2d5c14a6 --- /dev/null +++ b/keyboards/bakeneko65/bakeneko65.h @@ -0,0 +1,75 @@ +/* Copyright 2020 Koichi Katano + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_65_ansi_split_bs( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, k215, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \ + k400, k401, k402, k406, k409, k410, k411, k412, k413, k415 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, KC_NO, k115 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, KC_NO, k213, KC_NO, k215 }, \ + { k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO, k315 }, \ + { k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, k409, k410, k411, k412, k413, KC_NO, k415 } \ +} + +#define LAYOUT_65_ansi( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k014, k015, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, k215, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \ + k400, k401, k402, k406, k409, k410, k411, k412, k413, k415 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, KC_NO, k014, k015 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, KC_NO, k115 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, KC_NO, k213, KC_NO, k215 }, \ + { k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO, k315 }, \ + { k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, k409, k410, k411, k412, k413, KC_NO, k415 } \ +} + +#define LAYOUT_65_ansi_split_bs_2_right_mods( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, k215, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \ + k400, k401, k402, k406, k409, k411, k412, k413, k415 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, KC_NO, k115 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, KC_NO, k213, KC_NO, k215 }, \ + { k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO, k315 }, \ + { k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, k409, KC_NO, k411, k412, k413, KC_NO, k415 } \ +} + +#define LAYOUT_65_ansi_2_right_mods( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k014, k015, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, k215, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \ + k400, k401, k402, k406, k409, k411, k412, k413, k415 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, KC_NO, k014, k015 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, KC_NO, k115 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, KC_NO, k213, KC_NO, k215 }, \ + { k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO, k315 }, \ + { k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, k409, KC_NO, k411, k412, k413, KC_NO, k415 } \ +} diff --git a/keyboards/bakeneko65/config.h b/keyboards/bakeneko65/config.h new file mode 100644 index 0000000000..65b3ff88e2 --- /dev/null +++ b/keyboards/bakeneko65/config.h @@ -0,0 +1,109 @@ +/* +Copyright 2020 Koichi Katano + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x3A0E +#define PRODUCT_ID 0x4C82 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kkatano +#define PRODUCT Bakeneko 65 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* + * 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 { E6, B7, F7, F4, F5 } +#define MATRIX_COL_PINS { F6, B0, F1, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/bakeneko65/info.json b/keyboards/bakeneko65/info.json new file mode 100644 index 0000000000..25b438c297 --- /dev/null +++ b/keyboards/bakeneko65/info.json @@ -0,0 +1,313 @@ +{ + "keyboard_name": "Bakeneko 65", + "url": "https://github.com/kkatano/bakeneko-65-pcb", + "maintainer": "kkatano", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_split_bs": { + "layout": [ + { "x":0, "y":0 }, + { "x":1, "y":0 }, + { "x":2, "y":0 }, + { "x":3, "y":0 }, + { "x":4, "y":0 }, + { "x":5, "y":0 }, + { "x":6, "y":0 }, + { "x":7, "y":0 }, + { "x":8, "y":0 }, + { "x":9, "y":0 }, + { "x":10, "y":0 }, + { "x":11, "y":0 }, + { "x":12, "y":0 }, + { "x":13, "y":0 }, + { "x":14, "y":0 }, + { "x":15, "y":0 }, + + { "x":0, "y":1, "w":1.5 }, + { "x":1.5, "y":1 }, + { "x":2.5, "y":1 }, + { "x":3.5, "y":1 }, + { "x":4.5, "y":1 }, + { "x":5.5, "y":1 }, + { "x":6.5, "y":1 }, + { "x":7.5, "y":1 }, + { "x":8.5, "y":1 }, + { "x":9.5, "y":1 }, + { "x":10.5, "y":1 }, + { "x":11.5, "y":1 }, + { "x":12.5, "y":1 }, + { "x":13.5, "y":1, "w":1.5 }, + { "x":15, "y":1 }, + + { "x":0, "y":2, "w":1.75 }, + { "x":1.75, "y":2 }, + { "x":2.75, "y":2 }, + { "x":3.75, "y":2 }, + { "x":4.75, "y":2 }, + { "x":5.75, "y":2 }, + { "x":6.75, "y":2 }, + { "x":7.75, "y":2 }, + { "x":8.75, "y":2 }, + { "x":9.75, "y":2 }, + { "x":10.75, "y":2 }, + { "x":11.75, "y":2 }, + { "x":12.75, "y":2, "w":2.25 }, + { "x":15, "y":2 }, + + { "x":0, "y":3, "w":2.25 }, + { "x":2.25, "y":3 }, + { "x":3.25, "y":3 }, + { "x":4.25, "y":3 }, + { "x":5.25, "y":3 }, + { "x":6.25, "y":3 }, + { "x":7.25, "y":3 }, + { "x":8.25, "y":3 }, + { "x":9.25, "y":3 }, + { "x":10.25, "y":3 }, + { "x":11.25, "y":3 }, + { "x":12.25, "y":3, "w":1.75 }, + { "x":14, "y":3 }, + { "x":15, "y":3 }, + + { "x":0, "y":4, "w":1.25 }, + { "x":1.25, "y":4, "w":1.25 }, + { "x":2.5, "y":4, "w":1.25 }, + { "x":3.75, "y":4, "w":6.25 }, + { "x":10, "y":4 }, + { "x":11, "y":4 }, + { "x":12, "y":4 }, + { "x":13, "y":4 }, + { "x":14, "y":4 }, + { "x":15, "y":4 } + ] + }, + "LAYOUT_65_ansi": { + "layout": [ + { "x":0, "y":0 }, + { "x":1, "y":0 }, + { "x":2, "y":0 }, + { "x":3, "y":0 }, + { "x":4, "y":0 }, + { "x":5, "y":0 }, + { "x":6, "y":0 }, + { "x":7, "y":0 }, + { "x":8, "y":0 }, + { "x":9, "y":0 }, + { "x":10, "y":0 }, + { "x":11, "y":0 }, + { "x":12, "y":0 }, + { "x":13, "y":0, "w": 2 }, + { "x":15, "y":0 }, + + { "x":0, "y":1, "w":1.5 }, + { "x":1.5, "y":1 }, + { "x":2.5, "y":1 }, + { "x":3.5, "y":1 }, + { "x":4.5, "y":1 }, + { "x":5.5, "y":1 }, + { "x":6.5, "y":1 }, + { "x":7.5, "y":1 }, + { "x":8.5, "y":1 }, + { "x":9.5, "y":1 }, + { "x":10.5, "y":1 }, + { "x":11.5, "y":1 }, + { "x":12.5, "y":1 }, + { "x":13.5, "y":1, "w":1.5 }, + { "x":15, "y":1 }, + + { "x":0, "y":2, "w":1.75 }, + { "x":1.75, "y":2 }, + { "x":2.75, "y":2 }, + { "x":3.75, "y":2 }, + { "x":4.75, "y":2 }, + { "x":5.75, "y":2 }, + { "x":6.75, "y":2 }, + { "x":7.75, "y":2 }, + { "x":8.75, "y":2 }, + { "x":9.75, "y":2 }, + { "x":10.75, "y":2 }, + { "x":11.75, "y":2 }, + { "x":12.75, "y":2, "w":2.25 }, + { "x":15, "y":2 }, + + { "x":0, "y":3, "w":2.25 }, + { "x":2.25, "y":3 }, + { "x":3.25, "y":3 }, + { "x":4.25, "y":3 }, + { "x":5.25, "y":3 }, + { "x":6.25, "y":3 }, + { "x":7.25, "y":3 }, + { "x":8.25, "y":3 }, + { "x":9.25, "y":3 }, + { "x":10.25, "y":3 }, + { "x":11.25, "y":3 }, + { "x":12.25, "y":3, "w":1.75 }, + { "x":14, "y":3 }, + { "x":15, "y":3 }, + + { "x":0, "y":4, "w":1.25 }, + { "x":1.25, "y":4, "w":1.25 }, + { "x":2.5, "y":4, "w":1.25 }, + { "x":3.75, "y":4, "w":6.25 }, + { "x":10, "y":4 }, + { "x":11, "y":4 }, + { "x":12, "y":4 }, + { "x":13, "y":4 }, + { "x":14, "y":4 }, + { "x":15, "y":4 } + ] + }, + "LAYOUT_65_ansi_split_bs_2_right_mods": { + "layout": [ + { "x":0, "y":0 }, + { "x":1, "y":0 }, + { "x":2, "y":0 }, + { "x":3, "y":0 }, + { "x":4, "y":0 }, + { "x":5, "y":0 }, + { "x":6, "y":0 }, + { "x":7, "y":0 }, + { "x":8, "y":0 }, + { "x":9, "y":0 }, + { "x":10, "y":0 }, + { "x":11, "y":0 }, + { "x":12, "y":0 }, + { "x":13, "y":0 }, + { "x":14, "y":0 }, + { "x":15, "y":0 }, + + { "x":0, "y":1, "w":1.5 }, + { "x":1.5, "y":1 }, + { "x":2.5, "y":1 }, + { "x":3.5, "y":1 }, + { "x":4.5, "y":1 }, + { "x":5.5, "y":1 }, + { "x":6.5, "y":1 }, + { "x":7.5, "y":1 }, + { "x":8.5, "y":1 }, + { "x":9.5, "y":1 }, + { "x":10.5, "y":1 }, + { "x":11.5, "y":1 }, + { "x":12.5, "y":1 }, + { "x":13.5, "y":1, "w":1.5 }, + { "x":15, "y":1 }, + + { "x":0, "y":2, "w":1.75 }, + { "x":1.75, "y":2 }, + { "x":2.75, "y":2 }, + { "x":3.75, "y":2 }, + { "x":4.75, "y":2 }, + { "x":5.75, "y":2 }, + { "x":6.75, "y":2 }, + { "x":7.75, "y":2 }, + { "x":8.75, "y":2 }, + { "x":9.75, "y":2 }, + { "x":10.75, "y":2 }, + { "x":11.75, "y":2 }, + { "x":12.75, "y":2, "w":2.25 }, + { "x":15, "y":2 }, + + { "x":0, "y":3, "w":2.25 }, + { "x":2.25, "y":3 }, + { "x":3.25, "y":3 }, + { "x":4.25, "y":3 }, + { "x":5.25, "y":3 }, + { "x":6.25, "y":3 }, + { "x":7.25, "y":3 }, + { "x":8.25, "y":3 }, + { "x":9.25, "y":3 }, + { "x":10.25, "y":3 }, + { "x":11.25, "y":3 }, + { "x":12.25, "y":3, "w":1.75 }, + { "x":14, "y":3 }, + { "x":15, "y":3 }, + + { "x":0, "y":4, "w":1.25 }, + { "x":1.25, "y":4, "w":1.25 }, + { "x":2.5, "y":4, "w":1.25 }, + { "x":3.75, "y":4, "w":6.25 }, + { "x":10, "y":4, "w":1.5 }, + { "x":11.5, "y":4, "w":1.5 }, + { "x":13, "y":4 }, + { "x":14, "y":4 }, + { "x":15, "y":4 } + ] + }, + "LAYOUT_65_ansi_2_right_mods": { + "layout": [ + { "x":0, "y":0 }, + { "x":1, "y":0 }, + { "x":2, "y":0 }, + { "x":3, "y":0 }, + { "x":4, "y":0 }, + { "x":5, "y":0 }, + { "x":6, "y":0 }, + { "x":7, "y":0 }, + { "x":8, "y":0 }, + { "x":9, "y":0 }, + { "x":10, "y":0 }, + { "x":11, "y":0 }, + { "x":12, "y":0 }, + { "x":13, "y":0, "w": 2 }, + { "x":15, "y":0 }, + + { "x":0, "y":1, "w":1.5 }, + { "x":1.5, "y":1 }, + { "x":2.5, "y":1 }, + { "x":3.5, "y":1 }, + { "x":4.5, "y":1 }, + { "x":5.5, "y":1 }, + { "x":6.5, "y":1 }, + { "x":7.5, "y":1 }, + { "x":8.5, "y":1 }, + { "x":9.5, "y":1 }, + { "x":10.5, "y":1 }, + { "x":11.5, "y":1 }, + { "x":12.5, "y":1 }, + { "x":13.5, "y":1, "w":1.5 }, + { "x":15, "y":1 }, + + { "x":0, "y":2, "w":1.75 }, + { "x":1.75, "y":2 }, + { "x":2.75, "y":2 }, + { "x":3.75, "y":2 }, + { "x":4.75, "y":2 }, + { "x":5.75, "y":2 }, + { "x":6.75, "y":2 }, + { "x":7.75, "y":2 }, + { "x":8.75, "y":2 }, + { "x":9.75, "y":2 }, + { "x":10.75, "y":2 }, + { "x":11.75, "y":2 }, + { "x":12.75, "y":2, "w":2.25 }, + { "x":15, "y":2 }, + + { "x":0, "y":3, "w":2.25 }, + { "x":2.25, "y":3 }, + { "x":3.25, "y":3 }, + { "x":4.25, "y":3 }, + { "x":5.25, "y":3 }, + { "x":6.25, "y":3 }, + { "x":7.25, "y":3 }, + { "x":8.25, "y":3 }, + { "x":9.25, "y":3 }, + { "x":10.25, "y":3 }, + { "x":11.25, "y":3 }, + { "x":12.25, "y":3, "w":1.75 }, + { "x":14, "y":3 }, + { "x":15, "y":3 }, + + { "x":0, "y":4, "w":1.25 }, + { "x":1.25, "y":4, "w":1.25 }, + { "x":2.5, "y":4, "w":1.25 }, + { "x":3.75, "y":4, "w":6.25 }, + { "x":10, "y":4, "w":1.5 }, + { "x":11.5, "y":4, "w":1.5 }, + { "x":13, "y":4 }, + { "x":14, "y":4 }, + { "x":15, "y":4 } + ] + } + } +} diff --git a/keyboards/bakeneko65/keymaps/default/keymap.c b/keyboards/bakeneko65/keymaps/default/keymap.c new file mode 100644 index 0000000000..4d6d297d94 --- /dev/null +++ b/keyboards/bakeneko65/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +/* Copyright 2020 kkatano + * + * 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 QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_65_ansi_split_bs( + 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_GRV, KC_BSPC, KC_HOME, + 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_END, + 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_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, MO(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT_65_ansi_split_bs( + 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, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/bakeneko65/keymaps/default/readme.md b/keyboards/bakeneko65/keymaps/default/readme.md new file mode 100644 index 0000000000..34d1b4e931 --- /dev/null +++ b/keyboards/bakeneko65/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Bakeneko 65 diff --git a/keyboards/bakeneko65/keymaps/via/keymap.c b/keyboards/bakeneko65/keymaps/via/keymap.c new file mode 100644 index 0000000000..a4cc2d8e8a --- /dev/null +++ b/keyboards/bakeneko65/keymaps/via/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2020 kkatano + * + * 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 QMK_KEYBOARD_H + +enum layer_names { + _L0, + _L1, + _L2, + _L3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_L0] = LAYOUT_65_ansi_split_bs( + 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_GRV, KC_BSPC, KC_HOME, + 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_END, + 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_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, MO(_L1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_L1] = LAYOUT_65_ansi_split_bs( + 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, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_L2] = LAYOUT_65_ansi_split_bs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_L3] = LAYOUT_65_ansi_split_bs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/nebula65/keymaps/via/rules.mk b/keyboards/bakeneko65/keymaps/via/rules.mk old mode 100755 new mode 100644 similarity index 100% rename from keyboards/nebula65/keymaps/via/rules.mk rename to keyboards/bakeneko65/keymaps/via/rules.mk diff --git a/keyboards/bakeneko65/readme.md b/keyboards/bakeneko65/readme.md new file mode 100644 index 0000000000..f16c0757d8 --- /dev/null +++ b/keyboards/bakeneko65/readme.md @@ -0,0 +1,17 @@ +# Bakeneko 65 + +An open source O-ring gasket mount keyboard + +* Keyboard Maintainer: [kkatano](https://github.com/kkatano) +* Hardware Supported: Bakeneko 65 +* Hardware Availability: [Open source on GitHub](https://github.com/kkatano/bakeneko-65-pcb) + +Make example for this keyboard (after setting up your build environment): + + make bakeneko65:default + +Flashing example for this keyboard: + + make bakeneko65:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/bakeneko65/rules.mk b/keyboards/bakeneko65/rules.mk new file mode 100644 index 0000000000..f8a290cad5 --- /dev/null +++ b/keyboards/bakeneko65/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 65_ansi diff --git a/keyboards/barleycorn/barleycorn.c b/keyboards/barleycorn/barleycorn.c new file mode 100644 index 0000000000..4d555de195 --- /dev/null +++ b/keyboards/barleycorn/barleycorn.c @@ -0,0 +1,37 @@ +/* Copyright 2020 Yiancar + * + * 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 "barleycorn.h" + +void keyboard_pre_init_kb(void) { + // Set our LED pins as output + setPinOutput(B5); + setPinOutput(C0); + keyboard_pre_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + // writePin sets the pin high for 1 and low for 0. + // In this example the pins are inverted, setting + // it low/0 turns it on, and high/1 turns the LED off. + // This behavior depends on whether the LED is between the pin + // and VCC or the pin and GND. + writePin(B5, led_state.caps_lock); + writePin(C0, led_state.num_lock); + } + return res; +} diff --git a/keyboards/barleycorn/barleycorn.h b/keyboards/barleycorn/barleycorn.h new file mode 100644 index 0000000000..0b266feaed --- /dev/null +++ b/keyboards/barleycorn/barleycorn.h @@ -0,0 +1,63 @@ +/* Copyright 2020 Yiancar + * + * 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 . + */ + +#pragma once + +#define XXX KC_NO + +#include "quantum.h" + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, K0E, K0F, K0G, K0H, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, K1F, K1G, K1H, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, K2F, K2G, K2H, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H }, \ + { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H } \ +} + +#define LAYOUT_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, K0E, K0F, K0G, K0H, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, K1F, K1G, K1H, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, K2F, K2G, K2H, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H }, \ + { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H } \ +} + +#define LAYOUT_iso( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, K0E, K0F, K0G, K0H, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, K1G, K1H, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H }, \ + { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H } \ +} diff --git a/keyboards/barleycorn/config.h b/keyboards/barleycorn/config.h new file mode 100644 index 0000000000..77714a87fc --- /dev/null +++ b/keyboards/barleycorn/config.h @@ -0,0 +1,103 @@ +/* +Copyright 2020 Yiancar + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0x8968 +#define PRODUCT_ID 0x4749 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar-Designs +#define PRODUCT Barleycorn + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 18 + +/* + * 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) + * + */ + +/* A Custom matrix.c is used to poll the port expander C6 shows that the pins are hardwired there */ +#define MATRIX_ROW_PINS { B4, B3, B2, B1, C1 } +#define MATRIX_COL_PINS { B0, D7, D6, D4, D1, D0, C3, C2, D5, D5, D5, D5, D5, D5, D5, D5, D5, D5 } +#define UNUSED_PINS +#define PORT_EXPANDER_ADDRESS 0x20 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define USB_MAX_POWER_CONSUMPTION 100 + + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + + +/* + * 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 diff --git a/keyboards/barleycorn/info.json b/keyboards/barleycorn/info.json new file mode 100644 index 0000000000..4334f383f0 --- /dev/null +++ b/keyboards/barleycorn/info.json @@ -0,0 +1,283 @@ +{ + "keyboard_name": "Barleycorn", + "maintainer": "Yiancar", + "width": 19.5, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"0,0", "x":0, "y":0}, + {"label":"0,1", "x":1, "y":0}, + {"label":"0,2", "x":2, "y":0}, + {"label":"0,3", "x":3, "y":0}, + {"label":"0,4", "x":4, "y":0}, + {"label":"0,5", "x":5, "y":0}, + {"label":"0,6", "x":6, "y":0}, + {"label":"0,7", "x":7, "y":0}, + {"label":"0,8", "x":8, "y":0}, + {"label":"0,9", "x":9, "y":0}, + {"label":"0,10", "x":10, "y":0}, + {"label":"0,11", "x":11, "y":0}, + {"label":"0,12", "x":12, "y":0}, + {"label":"0,13", "x":13, "y":0}, + {"label":"1,13", "x":14, "y":0}, + {"label":"0,14", "x":15.5, "y":0}, + {"label":"0,15", "x":16.5, "y":0}, + {"label":"0,16", "x":17.5, "y":0}, + {"label":"0,17", "x":18.5, "y":0}, + + {"label":"1,0", "x":0, "y":1, "w":1.5}, + {"label":"1,1", "x":1.5, "y":1}, + {"label":"1,2", "x":2.5, "y":1}, + {"label":"1,3", "x":3.5, "y":1}, + {"label":"1,4", "x":4.5, "y":1}, + {"label":"1,5", "x":5.5, "y":1}, + {"label":"1,6", "x":6.5, "y":1}, + {"label":"1,7", "x":7.5, "y":1}, + {"label":"1,8", "x":8.5, "y":1}, + {"label":"1,9", "x":9.5, "y":1}, + {"label":"1,10", "x":10.5, "y":1}, + {"label":"1,11", "x":11.5, "y":1}, + {"label":"1,12", "x":12.5, "y":1}, + {"label":"2,12", "x":13.5, "y":1, "w":1.5}, + {"label":"1,14", "x":15.5, "y":1}, + {"label":"1,15", "x":16.5, "y":1}, + {"label":"1,16", "x":17.5, "y":1}, + {"label":"1,17", "x":18.5, "y":1}, + + {"label":"2,0", "x":0, "y":2, "w":1.75}, + {"label":"2,1", "x":1.75, "y":2}, + {"label":"2,2", "x":2.75, "y":2}, + {"label":"2,3", "x":3.75, "y":2}, + {"label":"2,4", "x":4.75, "y":2}, + {"label":"2,5", "x":5.75, "y":2}, + {"label":"2,6", "x":6.75, "y":2}, + {"label":"2,7", "x":7.75, "y":2}, + {"label":"2,8", "x":8.75, "y":2}, + {"label":"2,9", "x":9.75, "y":2}, + {"label":"2,10", "x":10.75, "y":2}, + {"label":"2,11", "x":11.75, "y":2}, + {"label":"2,13", "x":12.75, "y":2, "w":2.25}, + {"label":"2,14", "x":15.5, "y":2}, + {"label":"2,15", "x":16.5, "y":2}, + {"label":"2,16", "x":17.5, "y":2}, + {"label":"2,17", "x":18.5, "y":2}, + + {"label":"3,0", "x":0, "y":3, "w":1.25}, + {"label":"3,1", "x":1.25, "y":3}, + {"label":"3,2", "x":2.25, "y":3}, + {"label":"3,3", "x":3.25, "y":3}, + {"label":"3,4", "x":4.25, "y":3}, + {"label":"3,5", "x":5.25, "y":3}, + {"label":"3,6", "x":6.25, "y":3}, + {"label":"3,7", "x":7.25, "y":3}, + {"label":"3,8", "x":8.25, "y":3}, + {"label":"3,9", "x":9.25, "y":3}, + {"label":"3,10", "x":10.25, "y":3}, + {"label":"3,11", "x":11.25, "y":3}, + {"label":"3,12", "x":12.25, "y":3, "w":1.75}, + {"label":"3,13", "x":14.25, "y":3.25}, + {"label":"3,14", "x":15.5, "y":3}, + {"label":"3,15", "x":16.5, "y":3}, + {"label":"3,16", "x":17.5, "y":3}, + {"label":"3,17", "x":18.5, "y":3}, + + {"label":"4,0", "x":0, "y":4, "w":1.25}, + {"label":"4,1", "x":1.25, "y":4, "w":1.25}, + {"label":"4,2", "x":2.5, "y":4, "w":1.25}, + {"label":"4,6", "x":3.75, "y":4, "w":6.25}, + {"label":"4,10", "x":10, "y":4, "w":1.5}, + {"label":"4,11", "x":11.5, "y":4, "w":1.5}, + {"label":"4,12", "x":13.25, "y":4.25}, + {"label":"4,13", "x":14.25, "y":4.25}, + {"label":"4,14", "x":15.25, "y":4.25}, + {"label":"4,15", "x":16.5, "y":4}, + {"label":"4,16", "x":17.5, "y":4}, + {"label":"4,17", "x":18.5, "y":4} + ] + }, + "LAYOUT_ansi": { + "layout": [ + {"label":"0,0", "x":0, "y":0}, + {"label":"0,1", "x":1, "y":0}, + {"label":"0,2", "x":2, "y":0}, + {"label":"0,3", "x":3, "y":0}, + {"label":"0,4", "x":4, "y":0}, + {"label":"0,5", "x":5, "y":0}, + {"label":"0,6", "x":6, "y":0}, + {"label":"0,7", "x":7, "y":0}, + {"label":"0,8", "x":8, "y":0}, + {"label":"0,9", "x":9, "y":0}, + {"label":"0,10", "x":10, "y":0}, + {"label":"0,11", "x":11, "y":0}, + {"label":"0,12", "x":12, "y":0}, + {"label":"0,13", "x":13, "y":0}, + {"label":"1,13", "x":14, "y":0}, + {"label":"0,14", "x":15.5, "y":0}, + {"label":"0,15", "x":16.5, "y":0}, + {"label":"0,16", "x":17.5, "y":0}, + {"label":"0,17", "x":18.5, "y":0}, + + {"label":"1,0", "x":0, "y":1, "w":1.5}, + {"label":"1,1", "x":1.5, "y":1}, + {"label":"1,2", "x":2.5, "y":1}, + {"label":"1,3", "x":3.5, "y":1}, + {"label":"1,4", "x":4.5, "y":1}, + {"label":"1,5", "x":5.5, "y":1}, + {"label":"1,6", "x":6.5, "y":1}, + {"label":"1,7", "x":7.5, "y":1}, + {"label":"1,8", "x":8.5, "y":1}, + {"label":"1,9", "x":9.5, "y":1}, + {"label":"1,10", "x":10.5, "y":1}, + {"label":"1,11", "x":11.5, "y":1}, + {"label":"1,12", "x":12.5, "y":1}, + {"label":"2,12", "x":13.5, "y":1, "w":1.5}, + {"label":"1,14", "x":15.5, "y":1}, + {"label":"1,15", "x":16.5, "y":1}, + {"label":"1,16", "x":17.5, "y":1}, + {"label":"1,17", "x":18.5, "y":1}, + + {"label":"2,0", "x":0, "y":2, "w":1.75}, + {"label":"2,1", "x":1.75, "y":2}, + {"label":"2,2", "x":2.75, "y":2}, + {"label":"2,3", "x":3.75, "y":2}, + {"label":"2,4", "x":4.75, "y":2}, + {"label":"2,5", "x":5.75, "y":2}, + {"label":"2,6", "x":6.75, "y":2}, + {"label":"2,7", "x":7.75, "y":2}, + {"label":"2,8", "x":8.75, "y":2}, + {"label":"2,9", "x":9.75, "y":2}, + {"label":"2,10", "x":10.75, "y":2}, + {"label":"2,11", "x":11.75, "y":2}, + {"label":"2,13", "x":12.75, "y":2, "w":2.25}, + {"label":"2,14", "x":15.5, "y":2}, + {"label":"2,15", "x":16.5, "y":2}, + {"label":"2,16", "x":17.5, "y":2}, + {"label":"2,17", "x":18.5, "y":2}, + + {"label":"3,0", "x":0, "y":3, "w":2.25}, + {"label":"3,2", "x":2.25, "y":3}, + {"label":"3,3", "x":3.25, "y":3}, + {"label":"3,4", "x":4.25, "y":3}, + {"label":"3,5", "x":5.25, "y":3}, + {"label":"3,6", "x":6.25, "y":3}, + {"label":"3,7", "x":7.25, "y":3}, + {"label":"3,8", "x":8.25, "y":3}, + {"label":"3,9", "x":9.25, "y":3}, + {"label":"3,10", "x":10.25, "y":3}, + {"label":"3,11", "x":11.25, "y":3}, + {"label":"3,12", "x":12.25, "y":3, "w":1.75}, + {"label":"3,13", "x":14.25, "y":3.25}, + {"label":"3,14", "x":15.5, "y":3}, + {"label":"3,15", "x":16.5, "y":3}, + {"label":"3,16", "x":17.5, "y":3}, + {"label":"3,17", "x":18.5, "y":3}, + + {"label":"4,0", "x":0, "y":4, "w":1.25}, + {"label":"4,1", "x":1.25, "y":4, "w":1.25}, + {"label":"4,2", "x":2.5, "y":4, "w":1.25}, + {"label":"4,6", "x":3.75, "y":4, "w":6.25}, + {"label":"4,10", "x":10, "y":4, "w":1.5}, + {"label":"4,11", "x":11.5, "y":4, "w":1.5}, + {"label":"4,12", "x":13.25, "y":4.25}, + {"label":"4,13", "x":14.25, "y":4.25}, + {"label":"4,14", "x":15.25, "y":4.25}, + {"label":"4,15", "x":16.5, "y":4}, + {"label":"4,16", "x":17.5, "y":4}, + {"label":"4,17", "x":18.5, "y":4} + ] + }, + "LAYOUT_iso": { + "layout": [ + {"label":"0,0", "x":0, "y":0}, + {"label":"0,1", "x":1, "y":0}, + {"label":"0,2", "x":2, "y":0}, + {"label":"0,3", "x":3, "y":0}, + {"label":"0,4", "x":4, "y":0}, + {"label":"0,5", "x":5, "y":0}, + {"label":"0,6", "x":6, "y":0}, + {"label":"0,7", "x":7, "y":0}, + {"label":"0,8", "x":8, "y":0}, + {"label":"0,9", "x":9, "y":0}, + {"label":"0,10", "x":10, "y":0}, + {"label":"0,11", "x":11, "y":0}, + {"label":"0,12", "x":12, "y":0}, + {"label":"0,13", "x":13, "y":0}, + {"label":"1,13", "x":14, "y":0}, + {"label":"0,14", "x":15.5, "y":0}, + {"label":"0,15", "x":16.5, "y":0}, + {"label":"0,16", "x":17.5, "y":0}, + {"label":"0,17", "x":18.5, "y":0}, + + {"label":"1,0", "x":0, "y":1, "w":1.5}, + {"label":"1,1", "x":1.5, "y":1}, + {"label":"1,2", "x":2.5, "y":1}, + {"label":"1,3", "x":3.5, "y":1}, + {"label":"1,4", "x":4.5, "y":1}, + {"label":"1,5", "x":5.5, "y":1}, + {"label":"1,6", "x":6.5, "y":1}, + {"label":"1,7", "x":7.5, "y":1}, + {"label":"1,8", "x":8.5, "y":1}, + {"label":"1,9", "x":9.5, "y":1}, + {"label":"1,10", "x":10.5, "y":1}, + {"label":"1,11", "x":11.5, "y":1}, + {"label":"1,12", "x":12.5, "y":1}, + {"label":"1,14", "x":15.5, "y":1}, + {"label":"1,15", "x":16.5, "y":1}, + {"label":"1,16", "x":17.5, "y":1}, + {"label":"1,17", "x":18.5, "y":1}, + + {"label":"2,0", "x":0, "y":2, "w":1.75}, + {"label":"2,1", "x":1.75, "y":2}, + {"label":"2,2", "x":2.75, "y":2}, + {"label":"2,3", "x":3.75, "y":2}, + {"label":"2,4", "x":4.75, "y":2}, + {"label":"2,5", "x":5.75, "y":2}, + {"label":"2,6", "x":6.75, "y":2}, + {"label":"2,7", "x":7.75, "y":2}, + {"label":"2,8", "x":8.75, "y":2}, + {"label":"2,9", "x":9.75, "y":2}, + {"label":"2,10", "x":10.75, "y":2}, + {"label":"2,11", "x":11.75, "y":2}, + {"label":"2,12", "x":12.75, "y":2}, + {"label":"2,13", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"2,14", "x":15.5, "y":2}, + {"label":"2,15", "x":16.5, "y":2}, + {"label":"2,16", "x":17.5, "y":2}, + {"label":"2,17", "x":18.5, "y":2}, + + {"label":"3,0", "x":0, "y":3, "w":1.25}, + {"label":"3,1", "x":1.25, "y":3}, + {"label":"3,2", "x":2.25, "y":3}, + {"label":"3,3", "x":3.25, "y":3}, + {"label":"3,4", "x":4.25, "y":3}, + {"label":"3,5", "x":5.25, "y":3}, + {"label":"3,6", "x":6.25, "y":3}, + {"label":"3,7", "x":7.25, "y":3}, + {"label":"3,8", "x":8.25, "y":3}, + {"label":"3,9", "x":9.25, "y":3}, + {"label":"3,10", "x":10.25, "y":3}, + {"label":"3,11", "x":11.25, "y":3}, + {"label":"3,12", "x":12.25, "y":3, "w":1.75}, + {"label":"3,13", "x":14.25, "y":3.25}, + {"label":"3,14", "x":15.5, "y":3}, + {"label":"3,15", "x":16.5, "y":3}, + {"label":"3,16", "x":17.5, "y":3}, + {"label":"3,17", "x":18.5, "y":3}, + + {"label":"4,0", "x":0, "y":4, "w":1.25}, + {"label":"4,1", "x":1.25, "y":4, "w":1.25}, + {"label":"4,2", "x":2.5, "y":4, "w":1.25}, + {"label":"4,6", "x":3.75, "y":4, "w":6.25}, + {"label":"4,10", "x":10, "y":4, "w":1.5}, + {"label":"4,11", "x":11.5, "y":4, "w":1.5}, + {"label":"4,12", "x":13.25, "y":4.25}, + {"label":"4,13", "x":14.25, "y":4.25}, + {"label":"4,14", "x":15.25, "y":4.25}, + {"label":"4,15", "x":16.5, "y":4}, + {"label":"4,16", "x":17.5, "y":4}, + {"label":"4,17", "x":18.5, "y":4} + ] + } + } + } diff --git a/keyboards/barleycorn/keymaps/default/keymap.c b/keyboards/barleycorn/keymaps/default/keymap.c new file mode 100644 index 0000000000..230b78e991 --- /dev/null +++ b/keyboards/barleycorn/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 Yiancar + * + * 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 QMK_KEYBOARD_H + +//This is the ANSI version of the PCB + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_ansi( /* Base */ + 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_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_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_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_BSPC, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + +[1] = LAYOUT_ansi( /* FN */ + 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_UP, 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, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_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_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/barleycorn/keymaps/default/readme.md b/keyboards/barleycorn/keymaps/default/readme.md new file mode 100644 index 0000000000..04903f8cc9 --- /dev/null +++ b/keyboards/barleycorn/keymaps/default/readme.md @@ -0,0 +1,11 @@ +# The default keymap for Barleycorn + +![Layer 0](https://i.imgur.com/cU9lzz3.png) + +![Layer 1](https://i.imgur.com/0G3e1K3.png) + +Default layer is normal ANSI and Fn layer is used for Volume control and arrow cluster. + +Alternative ANSI layouts: + +![Alt Keymap](https://i.imgur.com/6uAx8jZ.png) diff --git a/keyboards/barleycorn/keymaps/iso/keymap.c b/keyboards/barleycorn/keymaps/iso/keymap.c new file mode 100644 index 0000000000..7fd4d06969 --- /dev/null +++ b/keyboards/barleycorn/keymaps/iso/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Yiancar + * + * 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 QMK_KEYBOARD_H + +//This is the ISO version of the PCB + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_iso( /* Base */ + 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_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_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_UP, KC_P1, KC_P2, KC_P3, KC_BSPC, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + +[1] = LAYOUT_iso( /* FN */ + 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_UP, 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, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_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_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + diff --git a/keyboards/barleycorn/keymaps/iso/readme.md b/keyboards/barleycorn/keymaps/iso/readme.md new file mode 100644 index 0000000000..492abfcecc --- /dev/null +++ b/keyboards/barleycorn/keymaps/iso/readme.md @@ -0,0 +1,11 @@ +# The default keymap for ISO Barleycorn + +![Layer 0](https://i.imgur.com/llZlVHt.png) + +![Layer 1](https://i.imgur.com/hrYtMQk.png) + +Default layer is normal ISO and Fn layer is used for Volume control and arrow cluster + +Alternative ISO layouts: + +![Alt Keymap](https://i.imgur.com/2cL0IGQ.png) diff --git a/keyboards/barleycorn/keymaps/via/keymap.c b/keyboards/barleycorn/keymaps/via/keymap.c new file mode 100644 index 0000000000..90ce60d1ea --- /dev/null +++ b/keyboards/barleycorn/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2020 Yiancar + * + * 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 QMK_KEYBOARD_H + +// This keymaps is used for VIA, it reflects the default keymap. + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_all( /* Base */ + 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_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_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_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_UP, KC_P1, KC_P2, KC_P3, KC_BSPC, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + +[1] = LAYOUT_all( /* FN */ + 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_UP, 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, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_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_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_all( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[3] = LAYOUT_all( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/barleycorn/keymaps/via/readme.md b/keyboards/barleycorn/keymaps/via/readme.md new file mode 100644 index 0000000000..b82bc8e79f --- /dev/null +++ b/keyboards/barleycorn/keymaps/via/readme.md @@ -0,0 +1 @@ +# Compile with this keymap to use VIA diff --git a/keyboards/snagpad/keymaps/via/rules.mk b/keyboards/barleycorn/keymaps/via/rules.mk similarity index 100% rename from keyboards/snagpad/keymaps/via/rules.mk rename to keyboards/barleycorn/keymaps/via/rules.mk diff --git a/keyboards/barleycorn/matrix.c b/keyboards/barleycorn/matrix.c new file mode 100644 index 0000000000..99366d6098 --- /dev/null +++ b/keyboards/barleycorn/matrix.c @@ -0,0 +1,138 @@ +/* +Copyright 2012-2020 Jun Wako, Jack Humbert, Yiancar + +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 +#include "wait.h" +#include "quantum.h" +#include "i2c_master.h" + +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +static void unselect_rows(void) { + for(uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static void select_row(uint8_t row) { + setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); +} + +static void unselect_row(uint8_t row) { + setPinInputHigh(row_pins[row]); +} + +static void init_pins(void) { + unselect_rows(); + // Set I/O + uint8_t send_data[2] = { 0xFF, 0x03}; + i2c_writeReg((PORT_EXPANDER_ADDRESS << 1), 0x00, &send_data[0], 2, 20); + // Set Pull-up + i2c_writeReg((PORT_EXPANDER_ADDRESS << 1), 0x0C, &send_data[0], 2, 20); + + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + if ( x < 8 ) { + setPinInputHigh(col_pins[x]); + } + } +} + +void matrix_init_custom(void) { + // TODO: initialize hardware here + // Initialize I2C + i2c_init(); + + // initialize key pins + init_pins(); + wait_ms(50); +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + matrix_io_delay(); + + uint8_t port_expander_col_buffer[2]; + i2c_readReg((PORT_EXPANDER_ADDRESS << 1), 0x12, &port_expander_col_buffer[0], 2, 20); + + // For each col... + for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + uint8_t pin_state; + // Select the col pin to read (active low) + switch (col_index) { + case 8 : + pin_state = port_expander_col_buffer[0] & (1 << 0); + break; + case 9 : + pin_state = port_expander_col_buffer[0] & (1 << 1); + break; + case 10 : + pin_state = port_expander_col_buffer[0] & (1 << 2); + break; + case 11 : + pin_state = port_expander_col_buffer[0] & (1 << 3); + break; + case 12 : + pin_state = port_expander_col_buffer[0] & (1 << 4); + break; + case 13 : + pin_state = port_expander_col_buffer[0] & (1 << 5); + break; + case 14 : + pin_state = port_expander_col_buffer[0] & (1 << 6); + break; + case 15 : + pin_state = port_expander_col_buffer[0] & (1 << 7); + break; + case 16 : + pin_state = port_expander_col_buffer[1] & (1 << 0); + break; + case 17 : + pin_state = port_expander_col_buffer[1] & (1 << 1); + break; + default : + pin_state = readPin(col_pins[col_index]); + } + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool matrix_has_changed = false; + + // Set row, read cols + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + matrix_has_changed |= read_cols_on_row(current_matrix, current_row); + } + + return matrix_has_changed; +} diff --git a/keyboards/barleycorn/readme.md b/keyboards/barleycorn/readme.md new file mode 100644 index 0000000000..775d259681 --- /dev/null +++ b/keyboards/barleycorn/readme.md @@ -0,0 +1,23 @@ +# Barleycorn + +![Barleycorn](https://i.imgur.com/vi3L1HYl.png) + +An f-row less compact 1800 kit with only through hole components. + +* Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) +* Hardware Supported: ATMEGA328p with vusb [PCB](https://github.com/yiancar/gingham_pcb) +* Hardware Availability: https://mykeyboard.eu/, https://novelkeys.xyz + +Make example for this keyboard (after setting up your build environment): + + make barleycorn:default + +Flashing example for this keyboard: + + make barleycorn:default:flash + +Bootloader: +use usbasploader from HSGW's repository. +https://github.com/hsgw/USBaspLoader/tree/plaid + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/barleycorn/rules.mk b/keyboards/barleycorn/rules.mk new file mode 100644 index 0000000000..be005ab297 --- /dev/null +++ b/keyboards/barleycorn/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega328p + +# Bootloader selection +BOOTLOADER = USBasp + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +CUSTOM_MATRIX = lite + +SRC += matrix.c +QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/basekeys/slice/config.h b/keyboards/basekeys/slice/config.h index cfb6bf4ffc..e7e65de3b9 100644 --- a/keyboards/basekeys/slice/config.h +++ b/keyboards/basekeys/slice/config.h @@ -1,6 +1,5 @@ /* -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert +Copyright 2020 2Moons 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 @@ -15,7 +14,6 @@ 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 . */ - #pragma once #include "config_common.h" diff --git a/keyboards/basekeys/slice/keymaps/default/config.h b/keyboards/basekeys/slice/keymaps/default/config.h index d3acebb7e3..3dc07fdac1 100644 --- a/keyboards/basekeys/slice/keymaps/default/config.h +++ b/keyboards/basekeys/slice/keymaps/default/config.h @@ -1,19 +1,19 @@ -/* Copyright 2020 2Moons - * - * 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 . - */ +/* +Copyright 2020 2Moons +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 . +*/ #pragma once /* Select hand configuration */ diff --git a/keyboards/basekeys/slice/keymaps/default/keymap.c b/keyboards/basekeys/slice/keymaps/default/keymap.c index d6e5cefaee..ffb64998e2 100644 --- a/keyboards/basekeys/slice/keymaps/default/keymap.c +++ b/keyboards/basekeys/slice/keymaps/default/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * 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 QMK_KEYBOARD_H #include "split_util.h" // Each layer gets a name for readability, which is then used in the keymap matrix below. diff --git a/keyboards/basekeys/slice/keymaps/default_split_left_space/config.h b/keyboards/basekeys/slice/keymaps/default_split_left_space/config.h index d3acebb7e3..3dc07fdac1 100644 --- a/keyboards/basekeys/slice/keymaps/default_split_left_space/config.h +++ b/keyboards/basekeys/slice/keymaps/default_split_left_space/config.h @@ -1,19 +1,19 @@ -/* Copyright 2020 2Moons - * - * 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 . - */ +/* +Copyright 2020 2Moons +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 . +*/ #pragma once /* Select hand configuration */ diff --git a/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c b/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c index 40d55bdc63..331dfc0fe4 100644 --- a/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c +++ b/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * 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 QMK_KEYBOARD_H #include "split_util.h" // Each layer gets a name for readability, which is then used in the keymap matrix below. diff --git a/keyboards/basekeys/slice/rev1/config.h b/keyboards/basekeys/slice/rev1/config.h index d151d5873f..ea4d5d3dc3 100644 --- a/keyboards/basekeys/slice/rev1/config.h +++ b/keyboards/basekeys/slice/rev1/config.h @@ -1,6 +1,5 @@ /* -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert +Copyright 2020 2Moons 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 diff --git a/keyboards/basekeys/slice/rev1/keymaps/2moons/config.h b/keyboards/basekeys/slice/rev1/keymaps/2moons/config.h index 62ee1d1a90..8f38938b10 100644 --- a/keyboards/basekeys/slice/rev1/keymaps/2moons/config.h +++ b/keyboards/basekeys/slice/rev1/keymaps/2moons/config.h @@ -1,19 +1,19 @@ -/* Copyright 2020 2Moons - * - * 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 . - */ +/* +Copyright 2020 2Moons +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 . +*/ #pragma once /* Select hand configuration */ diff --git a/keyboards/basekeys/slice/rev1/keymaps/2moons/keymap.c b/keyboards/basekeys/slice/rev1/keymaps/2moons/keymap.c index 5a9b14606d..97f7039a79 100644 --- a/keyboards/basekeys/slice/rev1/keymaps/2moons/keymap.c +++ b/keyboards/basekeys/slice/rev1/keymaps/2moons/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * 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 QMK_KEYBOARD_H #include "keymap_jp.h" diff --git a/keyboards/basekeys/slice/rev1/keymaps/default_all/config.h b/keyboards/basekeys/slice/rev1/keymaps/default_all/config.h index d3acebb7e3..3dc07fdac1 100644 --- a/keyboards/basekeys/slice/rev1/keymaps/default_all/config.h +++ b/keyboards/basekeys/slice/rev1/keymaps/default_all/config.h @@ -1,19 +1,19 @@ -/* Copyright 2020 2Moons - * - * 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 . - */ +/* +Copyright 2020 2Moons +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 . +*/ #pragma once /* Select hand configuration */ diff --git a/keyboards/basekeys/slice/rev1/keymaps/default_all/keymap.c b/keyboards/basekeys/slice/rev1/keymaps/default_all/keymap.c index 198c449b7f..34e1b7c43a 100644 --- a/keyboards/basekeys/slice/rev1/keymaps/default_all/keymap.c +++ b/keyboards/basekeys/slice/rev1/keymaps/default_all/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * 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 QMK_KEYBOARD_H extern uint8_t is_master; diff --git a/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/config.h b/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/config.h index d3acebb7e3..3dc07fdac1 100644 --- a/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/config.h +++ b/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/config.h @@ -1,19 +1,19 @@ -/* Copyright 2020 2Moons - * - * 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 . - */ +/* +Copyright 2020 2Moons +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 . +*/ #pragma once /* Select hand configuration */ diff --git a/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/keymap.c b/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/keymap.c index b1423378ef..772f9f6f1f 100644 --- a/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/keymap.c +++ b/keyboards/basekeys/slice/rev1/keymaps/default_split_backspace/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * 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 QMK_KEYBOARD_H extern uint8_t is_master; diff --git a/keyboards/bigswitch/keymaps/333fred/config.h b/keyboards/basekeys/slice/rev1/keymaps/via/config.h similarity index 81% rename from keyboards/bigswitch/keymaps/333fred/config.h rename to keyboards/basekeys/slice/rev1/keymaps/via/config.h index 76f13f08b5..3dc07fdac1 100644 --- a/keyboards/bigswitch/keymaps/333fred/config.h +++ b/keyboards/basekeys/slice/rev1/keymaps/via/config.h @@ -1,5 +1,5 @@ /* -Copyright 2018 Fredric Silberberg (333fred) +Copyright 2020 2Moons 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 @@ -16,5 +16,7 @@ along with this program. If not, see . */ #pragma once -// Long tapping term on the big switch, because it takes so long to press -#define TAPPING_TERM 500 +/* Select hand configuration */ + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 diff --git a/keyboards/basekeys/slice/rev1/keymaps/via/keymap.c b/keyboards/basekeys/slice/rev1/keymaps/via/keymap.c new file mode 100644 index 0000000000..900f1b3ba7 --- /dev/null +++ b/keyboards/basekeys/slice/rev1/keymaps/via/keymap.c @@ -0,0 +1,85 @@ +/* Copyright 2020 2Moons + * + * 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 QMK_KEYBOARD_H +#include "keymap_jp.h" +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _FN, + _LOWER, + _RAISE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_all( + //,------------------------------------------------------------------------| |--------------------------------------------------------------------------------------. + KC_ESC, KC_GRAVE, 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_BSPACE, KC_BSPACE, KC_BSPACE, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_FORWARD, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_GRADIENT, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_XMAS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_RSFT, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN) + //`------------------------------------------------------------------------| |--------------------------------------------------------------------------------------' + ), + + [_FN] = LAYOUT_all( + //,------------------------------------------------------------------------| |--------------------------------------------------------------------------------------. + KC_ESC, KC_GRAVE, 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_BSPACE, KC_DEL, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUSE, KC_UP, _______, _______, _______, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT,KC_RIGHT, _______, _______, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, _______, _______, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`------------------------------------------------------------------------| |--------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_all( + //,------------------------------------------------------------------------| |--------------------------------------------------------------------------------------. + KC_ESC, KC_GRAVE, 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_BSPACE, KC_BSPACE, KC_BSPACE, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_FORWARD, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_GRADIENT, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_XMAS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_RSFT, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN) + //`------------------------------------------------------------------------| |--------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_all( + //,------------------------------------------------------------------------| |--------------------------------------------------------------------------------------. + KC_ESC, KC_GRAVE, 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_BSPACE, KC_BSPACE, KC_BSPACE, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_FORWARD, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_GRADIENT, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_MODE_XMAS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_RSFT, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------+----------| + RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN) + //`------------------------------------------------------------------------| |--------------------------------------------------------------------------------------' + ) +}; diff --git a/keyboards/basekeys/slice/rev1/keymaps/via/rules.mk b/keyboards/basekeys/slice/rev1/keymaps/via/rules.mk new file mode 100644 index 0000000000..fe10d4e093 --- /dev/null +++ b/keyboards/basekeys/slice/rev1/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +TAP_DANCE_ENABLE = no +VIA_ENABLE = yes +BACKLIGHT_ENABLE = no \ No newline at end of file diff --git a/keyboards/basekeys/slice/rev1/rev1.c b/keyboards/basekeys/slice/rev1/rev1.c index 520a869e57..a3c8f66fe0 100644 --- a/keyboards/basekeys/slice/rev1/rev1.c +++ b/keyboards/basekeys/slice/rev1/rev1.c @@ -1 +1,16 @@ +/* Copyright 2020 2Moons + * + * 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 "rev1.h" diff --git a/keyboards/basekeys/slice/rev1/rev1.h b/keyboards/basekeys/slice/rev1/rev1.h index ae417d99c7..26a5da31bc 100644 --- a/keyboards/basekeys/slice/rev1/rev1.h +++ b/keyboards/basekeys/slice/rev1/rev1.h @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * 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 . + */ #pragma once #include "slice.h" diff --git a/keyboards/basekeys/slice/rev1_rgb/config.h b/keyboards/basekeys/slice/rev1_rgb/config.h index 1145d08647..08afff765a 100644 --- a/keyboards/basekeys/slice/rev1_rgb/config.h +++ b/keyboards/basekeys/slice/rev1_rgb/config.h @@ -1,6 +1,5 @@ /* -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert +Copyright 2020 2Moons 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 @@ -15,7 +14,6 @@ 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 . */ - #pragma once /* USB Device descriptor parameter */ diff --git a/keyboards/basekeys/slice/rev1_rgb/info.json b/keyboards/basekeys/slice/rev1_rgb/info.json index 101da97580..08ffb969f7 100644 --- a/keyboards/basekeys/slice/rev1_rgb/info.json +++ b/keyboards/basekeys/slice/rev1_rgb/info.json @@ -1,15 +1,18 @@ { - "keyboard_name": "slice", - "url": "https://www.basekeys.com", - "maintainer": "2Moons", - "width": 17.72, - "height": 5, + "keyboard_name": "slice", + "url": "https://www.basekeys.com", + "maintainer": "2Moons", + "width": 17.72, + "height": 5, "layouts": { "LAYOUT": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.6600000000000001, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.3900000000000001, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":2.75}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.660, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.390, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":2.75}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] }, - "LAYOUT_split_left_space": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.6600000000000001, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.3900000000000001, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":1.75}, {"x":7.5, "y":4}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] + "LAYOUT_split_left_space": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.660, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.390, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":1.75}, {"x":7.5, "y":4}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] + }, + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.660, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.390, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":0.917}, {"x":6.667, "y":4, "w":0.916}, {"x":7.583, "y":4, "w":0.917}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}] } } -} \ No newline at end of file +} diff --git a/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/config.h b/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/config.h index 62ee1d1a90..8f38938b10 100644 --- a/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/config.h +++ b/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/config.h @@ -1,19 +1,19 @@ -/* Copyright 2020 2Moons - * - * 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 . - */ +/* +Copyright 2020 2Moons +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 . +*/ #pragma once /* Select hand configuration */ diff --git a/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c b/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c index d9e5808a6f..36bfb79abd 100644 --- a/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c +++ b/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * 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 QMK_KEYBOARD_H #include "keymap_jp.h" #include "split_util.h" diff --git a/keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c b/keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c new file mode 100644 index 0000000000..5670f275ef --- /dev/null +++ b/keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c @@ -0,0 +1,127 @@ +/* Copyright 2020 2Moons + * + * 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 QMK_KEYBOARD_H +#include "split_util.h" +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY, + _FN, + _LOWER, + _RAISE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_all( + //,------------------------------------------------------------------------| |---------------------------------------------------------------------------. + KC_ESC, KC_GRAVE, 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_BSPACE, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_FORWARD, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_GRADIENT, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_XMAS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN) + //`------------------------------------------------------------------------| |---------------------------------------------------------------------------' + ), + + [_FN] = LAYOUT_all( + //,-------------------------------------------------------------------------| |---------------------------------------------------------------------------. + KC_ESC, KC_GRAVE, 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_BSPACE, + //|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUSE, KC_UP, _______, _______, _______, + //|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT,KC_RIGHT, _______, _______, + //|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, _______, + //|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //`-------------------------------------------------------------------------| |---------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_all( + //,------------------------------------------------------------------------| |---------------------------------------------------------------------------. + KC_ESC, KC_GRAVE, 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_BSPACE, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_FORWARD, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_GRADIENT, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_XMAS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN) + //`------------------------------------------------------------------------| |---------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_all( + //,------------------------------------------------------------------------| |---------------------------------------------------------------------------. + KC_ESC, KC_GRAVE, 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_BSPACE, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_FORWARD, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_GRADIENT, 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, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_MODE_XMAS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, + //|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------| + RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN) + //`------------------------------------------------------------------------| |---------------------------------------------------------------------------' + ) +}; + +#ifdef OLED_DRIVER_ENABLE + +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, + 0}; + oled_write_P(qmk_logo, false); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0; +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_P(PSTR("Default\n"), false); + break; + case _FN: + oled_write_P(PSTR("Function\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + + // Host Keyboard LED Status + led_t led_usb_state = host_keyboard_led_state(); + oled_write_P(led_usb_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(led_usb_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); + } else { + render_qmk_logo(); + } +} +#endif diff --git a/keyboards/tkc1800/keymaps/via/rules.mk b/keyboards/basekeys/slice/rev1_rgb/keymaps/via/rules.mk similarity index 100% rename from keyboards/tkc1800/keymaps/via/rules.mk rename to keyboards/basekeys/slice/rev1_rgb/keymaps/via/rules.mk diff --git a/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.c b/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.c index 3cdec58c50..9ab3d2539a 100644 --- a/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.c +++ b/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.c @@ -1 +1,16 @@ +/* Copyright 2020 2Moons + * + * 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 "rev1_rgb.h" diff --git a/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.h b/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.h index 809c278db7..fdc5331585 100644 --- a/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.h +++ b/keyboards/basekeys/slice/rev1_rgb/rev1_rgb.h @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * 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 . + */ #pragma once #include "slice.h" @@ -61,5 +76,23 @@ { R40, R41, R42, R43, R44, KC_NO, KC_NO, KC_NO, KC_NO } \ } - +#define LAYOUT_all( \ + L00, L01, L02, L03, L04, L05, L06, L07, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, R17, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, R37,\ + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, L16, KC_NO, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, L26, KC_NO, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, L36, KC_NO, KC_NO }, \ + { L40, L41, L42, L43, L44, L45, L46, KC_NO, KC_NO }, \ + { R00, R01, R02, R03, R04, R05, R06, KC_NO, KC_NO }, \ + { R10, R11, R12, R13, R14, R15, R16, R17, KC_NO }, \ + { R20, R21, R22, R23, R24, R25, R26, KC_NO, KC_NO }, \ + { R30, R31, R32, R33, R34, R35, R36, R37, KC_NO }, \ + { R40, R41, R42, R43, R44, KC_NO, KC_NO, KC_NO, KC_NO } \ + } diff --git a/keyboards/basekeys/slice/slice.c b/keyboards/basekeys/slice/slice.c index 6aaf721790..2d7d111f9a 100644 --- a/keyboards/basekeys/slice/slice.c +++ b/keyboards/basekeys/slice/slice.c @@ -1 +1,16 @@ +/* Copyright 2020 2Moons + * + * 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 "slice.h" diff --git a/keyboards/basekeys/slice/slice.h b/keyboards/basekeys/slice/slice.h index 7d4f7ee513..bc3eb813a2 100644 --- a/keyboards/basekeys/slice/slice.h +++ b/keyboards/basekeys/slice/slice.h @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * 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 . + */ #pragma once #include "quantum.h" diff --git a/keyboards/basekeys/slice/slice_font.c b/keyboards/basekeys/slice/slice_font.c index f969f85c7a..b59fbcf5b9 100644 --- a/keyboards/basekeys/slice/slice_font.c +++ b/keyboards/basekeys/slice/slice_font.c @@ -1,3 +1,18 @@ +/* Copyright 2020 2Moons + * + * 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 . + */ // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. // See gfxfont.h for newer custom bitmap font info. diff --git a/keyboards/basekeys/trifecta/config.h b/keyboards/basekeys/trifecta/config.h new file mode 100644 index 0000000000..8a95291260 --- /dev/null +++ b/keyboards/basekeys/trifecta/config.h @@ -0,0 +1,123 @@ +/* Copyright 2020 Swiftrax and Basekeys.com + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEAF3 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Swiftrax +#define PRODUCT Trifecta + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +/* key matrix pins */ + +#define MATRIX_ROW_PINS { B0, B7, F7, B1, B6, C6, C7, B5, F6, D2 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, D1, B2, D0, B3 } + + +#define ENCODERS_PAD_A { D4, D6, D7 } +#define ENCODERS_PAD_B { B4, D3, D5 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +#define RGB_DI_PIN E6 +#define DRIVER_LED_TOTAL 80 + +/* RGB LED */ +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN E6 +#define RGBLED_NUM 80 // Number of LEDs. backlight x69 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 +#define RGBLIGHT_ANIMATIONS +#endif +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Limits the brightness of the LEDS range of 255-0 (255 is default)*/ +#define RGBLIGHT_LIMIT_VAL 128 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* EEPROM for via */ +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 + +/* bootmagic row col assignment */ +#define BOOTMAGIC_LITE_ROW 1 +#define BOOTMAGIC_LITE_COLUMN 0 + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +//# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +# define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +# define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +# define RGB_MATRIX_HUE_STEP 8 +# define RGB_MATRIX_SAT_STEP 8 +# define RGB_MATRIX_VAL_STEP 8 +# define RGB_MATRIX_SPD_STEP 10 + +/* Disable the animations you don't want/need. You will need to disable a good number of these * + * because they take up a lot of space. Disable until you can successfully compile your firmware. */ +// # define DISABLE_RGB_MATRIX_ALPHAS_MODS +// # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// # define DISABLE_RGB_MATRIX_BREATHING +// # define DISABLE_RGB_MATRIX_CYCLE_ALL +// # define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +// # define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN +// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +// # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +// # define DISABLE_RGB_MATRIX_DUAL_BEACON +// # define DISABLE_RGB_MATRIX_RAINBOW_BEACON +// # define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// # define DISABLE_RGB_MATRIX_RAINDROPS +// # define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP +// # define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define DISABLE_RGB_MATRIX_SPLASH +// # define DISABLE_RGB_MATRIX_MULTISPLASH +// # define DISABLE_RGB_MATRIX_SOLID_SPLASH +// # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif diff --git a/keyboards/basekeys/trifecta/info.json b/keyboards/basekeys/trifecta/info.json new file mode 100644 index 0000000000..3badb40d20 --- /dev/null +++ b/keyboards/basekeys/trifecta/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Trifecta", + "url": "https://www.basekeys.com", + "maintainer": "Swiftrax", + "width": 18, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":8.75, "y":0}, {"label":"*", "x":9.75, "y":0}, {"label":"(", "x":10.75, "y":0}, {"label":")", "x":11.75, "y":0}, {"label":"_", "x":12.75, "y":0}, {"label":"+", "x":13.75, "y":0}, {"label":"BS", "x":14.75, "y":0}, {"x":15.75, "y":0}, {"x":17, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":8.25, "y":1}, {"label":"U", "x":9.25, "y":1}, {"label":"I", "x":10.25, "y":1}, {"label":"O", "x":11.25, "y":1}, {"label":"P", "x":12.25, "y":1}, {"label":"{", "x":13.25, "y":1}, {"label":"}", "x":14.25, "y":1}, {"label":"|", "x":15.25, "y":1, "w":1.5}, {"x":17, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":8.5, "y":2}, {"label":"J", "x":9.5, "y":2}, {"label":"K", "x":10.5, "y":2}, {"label":"L", "x":11.5, "y":2}, {"label":":", "x":12.5, "y":2}, {"label":"\"", "x":13.5, "y":2}, {"label":"Enter", "x":14.5, "y":2, "w":2.25}, {"x":17, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"x":8, "y":3}, {"label":"N", "x":9, "y":3}, {"label":"M", "x":10, "y":3}, {"label":"<", "x":11, "y":3}, {"label":">", "x":12, "y":3}, {"label":"?", "x":13, "y":3}, {"label":"Shift", "x":14, "y":3, "w":1.75}, {"x":16, "y":3.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":3, "y":4, "w":1.5}, {"x":4.5, "y":4, "w":2.25}, {"x":6.75, "y":4}, {"x":8.5, "y":4, "w":2.75}, {"label":"Alt", "x":11.25, "y":4, "w":1.5}, {"label":"Win", "x":13.5, "y":4, "w":1.25}, {"x":15, "y":4.25}, {"x":16, "y":4.25}, {"x":17, "y":4.25}] + } + } +} diff --git a/keyboards/basekeys/trifecta/keymaps/default/keymap.c b/keyboards/basekeys/trifecta/keymaps/default/keymap.c new file mode 100644 index 0000000000..727ebf381a --- /dev/null +++ b/keyboards/basekeys/trifecta/keymaps/default/keymap.c @@ -0,0 +1,71 @@ +/* Copyright 2020 Swiftrax and Basekeys.com + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN, + _MEDIA }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_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_BSPC, KC_DEL, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, + 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_HOME, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_MEDIA), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RGUI, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + + [_MEDIA] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_MNXT); + } else { + tap_code(KC_MPRV); + } + } else if (index == 2) { /* Third encoder */ + if (clockwise) { + tap_code(KC_RGHT); + } else { + tap_code(KC_LEFT); + } + } +} diff --git a/keyboards/basekeys/trifecta/keymaps/default/rules.mk b/keyboards/basekeys/trifecta/keymaps/default/rules.mk new file mode 100644 index 0000000000..910bd64a59 --- /dev/null +++ b/keyboards/basekeys/trifecta/keymaps/default/rules.mk @@ -0,0 +1,2 @@ +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no \ No newline at end of file diff --git a/keyboards/basekeys/trifecta/keymaps/via/keymap.c b/keyboards/basekeys/trifecta/keymaps/via/keymap.c new file mode 100644 index 0000000000..e1f401bc24 --- /dev/null +++ b/keyboards/basekeys/trifecta/keymaps/via/keymap.c @@ -0,0 +1,71 @@ +/* Copyright 2020 Swiftrax and Basekeys.com + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN, + _MEDIA }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_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_BSPC, KC_DEL, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, + 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_HOME, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_MEDIA), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RGUI, KC_RCTL, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + + [_MEDIA] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_RGHT); + } else { + tap_code(KC_LEFT); + } + } else if (index == 2) { /* Third encoder */ + if (clockwise) { + rgblight_step(); + } else { + rgblight_step_reverse(); + } + } +} diff --git a/keyboards/basekeys/trifecta/keymaps/via/rules.mk b/keyboards/basekeys/trifecta/keymaps/via/rules.mk new file mode 100644 index 0000000000..32f462d06c --- /dev/null +++ b/keyboards/basekeys/trifecta/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no \ No newline at end of file diff --git a/keyboards/basekeys/trifecta/readme.md b/keyboards/basekeys/trifecta/readme.md new file mode 100644 index 0000000000..efe6fb0abe --- /dev/null +++ b/keyboards/basekeys/trifecta/readme.md @@ -0,0 +1,17 @@ +# Trifecta + +![Trifecta](https://i.imgur.com/tlIwQowl.jpeg) + +An Alice style board with arrowkeys, based on the Fate Arisu layout. + +* Keyboard Maintainer: [swiftrax](https://github.com/swiftrax) +* Hardware Supported: Trifecta PCB, ATMEGA32U4-AU +* Hardware Availability: [Website](https://mykeyboard.eu/catalogue/) + +Make example for this keyboard (after setting up your build environment): + + make basekeys/trifecta:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs) + +[Build guide](https://www.basekeys.com/category/build-guides/) diff --git a/keyboards/basekeys/trifecta/rules.mk b/keyboards/basekeys/trifecta/rules.mk new file mode 100644 index 0000000000..975fe84620 --- /dev/null +++ b/keyboards/basekeys/trifecta/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +ENCODER_ENABLE = yes diff --git a/keyboards/basekeys/trifecta/trifecta.c b/keyboards/basekeys/trifecta/trifecta.c new file mode 100644 index 0000000000..e7aca201ce --- /dev/null +++ b/keyboards/basekeys/trifecta/trifecta.c @@ -0,0 +1,61 @@ +/* Copyright 2020 Swiftrax and Basekeys.com + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "trifecta.h" + +#ifdef RGB_MATRIX_ENABLE + +led_config_t g_led_config = { { + { NO_LED, 70, 61, 52, 43, 34, 24, 14 }, + { 79, 69, 60, 51, 42, 33, 23, NO_LED }, + { NO_LED, 71, 62, 53, 44, 35, 25, 15 }, + { 78, 68, 59, 50, 41, 32, 22, NO_LED }, + { 77, 67, 58, 49, 40, 31, NO_LED, 16 }, + { NO_LED, 72, 63, 54, 45, 36, 26, NO_LED }, + { NO_LED, 73, 64, 55, 46, 37, 27, 17 }, + { 76, 66, 57, 48, 39, 30, 21, NO_LED }, + { NO_LED, 74, 56, NO_LED, NO_LED, 38, 28, 18 }, + { 75, 65, NO_LED, NO_LED, 47, 29, 20, 19 } +}, { + // Underglow + { 218, 7 }, { 214, 45 }, { 180, 47 }, { 147, 50 }, { 94, 62 }, { 37, 51 }, { 4, 8 }, { 36, 15 }, + { 62, 18 }, { 78, 5 }, { 119, 7 }, { 145, 16 }, { 166, 3 }, { 200, 16 }, + + //Per Key + { 185, 11 }, { 191, 22 }, { 188, 33 }, { 200, 46 }, { 200, 57 }, { 212, 57 }, { 188, 57 }, { 181, 44 }, + { 176, 22 }, { 168, 11 }, { 155, 11 }, { 164, 22 }, { 169, 32 }, { 165, 44 }, { 172, 55 }, { 157, 54 }, + { 153, 44 }, { 156, 33 }, { 153, 22 }, { 142, 12 }, { 130, 13 }, { 138, 23 }, { 143, 33 }, { 140, 45 }, + { 137, 56 }, { 128, 47 }, { 132, 35 }, { 127, 25 }, { 119, 16 }, { 107, 17 }, { 115, 27 }, { 120, 37 }, + { 116, 48 }, { 117, 59 }, { 104, 51 }, { 109, 39 }, { 104, 29 }, { 86, 19 }, { 74, 16 }, { 78, 28 }, + { 79, 39 }, { 82, 50 }, { 73, 60 }, { 71, 48 }, { 67, 37 }, { 66, 26 }, { 63, 15 }, { 50, 12 }, + { 55, 24 }, { 55, 35 }, { 59, 47 }, { 50, 56 }, { 47, 45 }, { 43, 33 }, { 43, 22 }, { 39, 10 }, + { 25, 11 }, { 29, 22 }, { 30, 33 }, { 34, 44 }, { 24, 54 }, { 9, 55 }, { 15, 44 }, { 14, 33 }, + { 14, 22 }, { 14, 11 } +}, { + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, + + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4 +} }; +#endif \ No newline at end of file diff --git a/keyboards/basekeys/trifecta/trifecta.h b/keyboards/basekeys/trifecta/trifecta.h new file mode 100644 index 0000000000..ed337813c6 --- /dev/null +++ b/keyboards/basekeys/trifecta/trifecta.h @@ -0,0 +1,48 @@ +/* Copyright 2020 Swiftrax and Basekeys.com + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO//readabilty + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k37, \ + k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k57, \ + k40, k51, k41, k52, k42, k53, k43, k54, k44, k55, k45, k56, k47, k77, \ + k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k67, \ + k90, k81, k91, k82, k94, k85, k95, k86, k96, k87, k97 \ +) \ +{ \ + { XXX, k01, k02, k03, k04, k05, k06, k07}, \ + { k10, k11, k12, k13, k14, k15, k16, k17}, \ + { XXX, k21, k22, k23, k24, k25, k26, k27}, \ + { k30, k31, k32, k33, k34, k35, k36, k37}, \ + { k40, k41, k42, k43, k44, k45, XXX, k47}, \ + { XXX, k51, k52, k53, k54, k55, k56, k57}, \ + { XXX, k61, k62, k63, k64, k65, k66, k67}, \ + { k70, k71, k72, k73, k74, k75, k76, k77}, \ + { XXX, k81, k82, XXX, XXX, k85, k86, k87}, \ + { k90, k91, XXX, XXX, k94, k95, k96, k97} \ +} diff --git a/keyboards/bear_65/bear_65.c b/keyboards/bear_65/bear_65.c new file mode 100644 index 0000000000..a2ae572b82 --- /dev/null +++ b/keyboards/bear_65/bear_65.c @@ -0,0 +1,17 @@ +/* Copyright 2020 MudkipMao + * + * 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 "bear_65.h" diff --git a/keyboards/bear_65/bear_65.h b/keyboards/bear_65/bear_65.h new file mode 100644 index 0000000000..94ec89c889 --- /dev/null +++ b/keyboards/bear_65/bear_65.h @@ -0,0 +1,46 @@ +/* Copyright 2020 MudkipMao + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K31, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K4E, \ + K1E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K2E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K43, K45, K46, K48, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, KC_NO, K43, KC_NO, K45, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ +} + +#define LAYOUT_full_bs( \ + K31, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K4E, \ + K1E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K2E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K43, K45, K46, K48, K4A, K4B, K4C, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, 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, KC_NO, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, KC_NO, K43, KC_NO, K45, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ +} diff --git a/keyboards/bear_65/config.h b/keyboards/bear_65/config.h new file mode 100644 index 0000000000..1b7524f074 --- /dev/null +++ b/keyboards/bear_65/config.h @@ -0,0 +1,76 @@ +/* +Copyright 2020 MudkipMao + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xA13B // Jacky's vendor ID, arbitrarily selected by MudkipMao +#define PRODUCT_ID 0x000A +#define DEVICE_VER 0x0001 +#define MANUFACTURER Jacky +#define PRODUCT Jacky Bear 65 Ergo + +/* 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 { B0, B1, B2, B3, B7 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, F7, F6, F5, F4, F1, F0 } + +/* Setting the matrix value of top left key for bootmagic lite */ +#define BOOTMAGIC_LITE_ROW 3 +#define BOOTMAGIC_LITE_COLUMN 1 + +#define DIODE_DIRECTION ROW2COL + +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 4 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 15 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 139 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif diff --git a/keyboards/bear_65/info.json b/keyboards/bear_65/info.json new file mode 100644 index 0000000000..67fc090af8 --- /dev/null +++ b/keyboards/bear_65/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Bear 65", + "url": "https://qmk.fm/keyboards", + "maintainer": "qmk", + "width": 20.75, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0.5, "y":0}, {"label":"~", "x":1.75, "y":0}, {"label":"!", "x":2.75, "y":0}, {"label":"@", "x":3.75, "y":0}, {"label":"#", "x":4.75, "y":0}, {"label":"$", "x":5.75, "y":0}, {"label":"%", "x":6.75, "y":0}, {"label":"^", "x":7.75, "y":0}, {"label":"&", "x":11.25, "y":0}, {"label":"*", "x":12.25, "y":0}, {"label":"(", "x":13.25, "y":0}, {"label":")", "x":14.25, "y":0}, {"label":"_", "x":15.25, "y":0}, {"label":"+", "x":16.25, "y":0}, {"label":"|", "x":17.25, "y":0}, {"label":"~", "x":18.25, "y":0}, {"label":"Del", "x":19.75, "y":0}, {"label":"PgUp", "x":0.25, "y":1}, {"label":"Tab", "x":1.75, "y":1, "w":1.5}, {"label":"Q", "x":3.25, "y":1}, {"label":"W", "x":4.25, "y":1}, {"label":"E", "x":5.25, "y":1}, {"label":"R", "x":6.25, "y":1}, {"label":"T", "x":7.25, "y":1}, {"label":"Y", "x":10.75, "y":1}, {"label":"U", "x":11.75, "y":1}, {"label":"I", "x":12.75, "y":1}, {"label":"O", "x":13.75, "y":1}, {"label":"P", "x":14.75, "y":1}, {"label":"{", "x":15.75, "y":1}, {"label":"}", "x":16.75, "y":1}, {"label":"Backspace", "x":17.75, "y":1, "w":1.5}, {"label":"PgDn", "x":0, "y":2}, {"label":"Caps Lock", "x":1.75, "y":2, "w":1.75}, {"label":"A", "x":3.5, "y":2}, {"label":"S", "x":4.5, "y":2}, {"label":"D", "x":5.5, "y":2}, {"label":"F", "x":6.5, "y":2}, {"label":"G", "x":7.5, "y":2}, {"label":"H", "x":11, "y":2}, {"label":"J", "x":12, "y":2}, {"label":"K", "x":13, "y":2}, {"label":"L", "x":14, "y":2}, {"label":":", "x":15, "y":2}, {"label":"\"", "x":16, "y":2}, {"label":"Enter", "x":17, "y":2, "w":2.25}, {"label":"Shift", "x":1.75, "y":3, "w":2.25}, {"label":"Z", "x":4, "y":3}, {"label":"X", "x":5, "y":3}, {"label":"C", "x":6, "y":3}, {"label":"V", "x":7, "y":3}, {"label":"B", "x":8, "y":3}, {"label":"B", "x":10.5, "y":3}, {"label":"N", "x":11.5, "y":3}, {"label":"M", "x":12.5, "y":3}, {"label":"<", "x":13.5, "y":3}, {"label":">", "x":14.5, "y":3}, {"label":"?", "x":15.5, "y":3}, {"label":"Shift", "x":16.5, "y":3, "w":1.75}, {"label":"Up", "x":18.25, "y":3}, {"label":"Ctrl", "x":1.75, "y":4, "w":1.5}, {"label":"Alt", "x":4.75, "y":4, "w":1.25}, {"x":6, "y":4, "w":2.25}, {"label":"Win", "x":8.25, "y":4}, {"x":10.5, "y":4, "w":2.75}, {"label":"Alt", "x":13.25, "y":4, "w":1.5}, {"label":"Left", "x":17.25, "y":4}, {"label":"Down", "x":18.25, "y":4}, {"label":"Right", "x":19.25, "y":4}] + }, + "LAYOUT_full_bs": { + "layout": [{"label":"Esc", "x":0.5, "y":0}, {"label":"~", "x":1.75, "y":0}, {"label":"!", "x":2.75, "y":0}, {"label":"@", "x":3.75, "y":0}, {"label":"#", "x":4.75, "y":0}, {"label":"$", "x":5.75, "y":0}, {"label":"%", "x":6.75, "y":0}, {"label":"^", "x":7.75, "y":0}, {"label":"&", "x":11.25, "y":0}, {"label":"*", "x":12.25, "y":0}, {"label":"(", "x":13.25, "y":0}, {"label":")", "x":14.25, "y":0}, {"label":"_", "x":15.25, "y":0}, {"label":"+", "x":16.25, "y":0}, {"label":"Backspace", "x":17.25, "y":0, "w":2}, {"label":"Del", "x":19.75, "y":0}, {"label":"PgUp", "x":0.25, "y":1}, {"label":"Tab", "x":1.75, "y":1, "w":1.5}, {"label":"Q", "x":3.25, "y":1}, {"label":"W", "x":4.25, "y":1}, {"label":"E", "x":5.25, "y":1}, {"label":"R", "x":6.25, "y":1}, {"label":"T", "x":7.25, "y":1}, {"label":"Y", "x":10.75, "y":1}, {"label":"U", "x":11.75, "y":1}, {"label":"I", "x":12.75, "y":1}, {"label":"O", "x":13.75, "y":1}, {"label":"P", "x":14.75, "y":1}, {"label":"{", "x":15.75, "y":1}, {"label":"}", "x":16.75, "y":1}, {"label":"|", "x":17.75, "y":1, "w":1.5}, {"label":"PgDn", "x":0, "y":2}, {"label":"Caps Lock", "x":1.75, "y":2, "w":1.75}, {"label":"A", "x":3.5, "y":2}, {"label":"S", "x":4.5, "y":2}, {"label":"D", "x":5.5, "y":2}, {"label":"F", "x":6.5, "y":2}, {"label":"G", "x":7.5, "y":2}, {"label":"H", "x":11, "y":2}, {"label":"J", "x":12, "y":2}, {"label":"K", "x":13, "y":2}, {"label":"L", "x":14, "y":2}, {"label":":", "x":15, "y":2}, {"label":"\"", "x":16, "y":2}, {"label":"Enter", "x":17, "y":2, "w":2.25}, {"label":"Shift", "x":1.75, "y":3, "w":2.25}, {"label":"Z", "x":4, "y":3}, {"label":"X", "x":5, "y":3}, {"label":"C", "x":6, "y":3}, {"label":"V", "x":7, "y":3}, {"label":"B", "x":8, "y":3}, {"label":"B", "x":10.5, "y":3}, {"label":"N", "x":11.5, "y":3}, {"label":"M", "x":12.5, "y":3}, {"label":"<", "x":13.5, "y":3}, {"label":">", "x":14.5, "y":3}, {"label":"?", "x":15.5, "y":3}, {"label":"Shift", "x":16.5, "y":3, "w":1.75}, {"label":"Up", "x":18.25, "y":3}, {"label":"Ctrl", "x":1.75, "y":4, "w":1.5}, {"label":"Alt", "x":4.75, "y":4, "w":1.25}, {"x":6, "y":4, "w":2.25}, {"label":"Win", "x":8.25, "y":4}, {"x":10.5, "y":4, "w":2.75}, {"label":"Alt", "x":13.25, "y":4, "w":1.5}, {"label":"Left", "x":17.25, "y":4}, {"label":"Down", "x":18.25, "y":4}, {"label":"Right", "x":19.25, "y":4}] + } + } +} diff --git a/keyboards/bear_65/keymaps/default/keymap.c b/keyboards/bear_65/keymaps/default/keymap.c new file mode 100644 index 0000000000..b7d5cdf61c --- /dev/null +++ b/keyboards/bear_65/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2020 MudkipMao + * + * 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 QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, KC_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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT_all( + 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, _______, _______, _______, + RGB_MOD, _______, KC_BRID, KC_BRIU, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, _______, + RGB_TOG, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______,_______ + ) +}; diff --git a/keyboards/bear_65/keymaps/default/readme.md b/keyboards/bear_65/keymaps/default/readme.md new file mode 100644 index 0000000000..d517348557 --- /dev/null +++ b/keyboards/bear_65/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for bear_65 diff --git a/keyboards/bear_65/keymaps/via/keymap.c b/keyboards/bear_65/keymaps/via/keymap.c new file mode 100644 index 0000000000..2ddc5b43d8 --- /dev/null +++ b/keyboards/bear_65/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2020 MudkipMao + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_full_bs( + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_full_bs( + 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, _______, _______, + RGB_MOD, _______, KC_BRID, KC_BRIU, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, _______, + RGB_TOG, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______,_______ + ), + [2] = LAYOUT_full_bs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______,_______ + ), + [3] = LAYOUT_full_bs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______,_______ + ) +}; diff --git a/keyboards/bear_65/keymaps/via/readme.md b/keyboards/bear_65/keymaps/via/readme.md new file mode 100644 index 0000000000..5cb67ab25f --- /dev/null +++ b/keyboards/bear_65/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for bear_65 diff --git a/keyboards/bear_65/keymaps/via/rules.mk b/keyboards/bear_65/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/bear_65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/bear_65/readme.md b/keyboards/bear_65/readme.md new file mode 100644 index 0000000000..44a5e95537 --- /dev/null +++ b/keyboards/bear_65/readme.md @@ -0,0 +1,19 @@ +# Bear 65 + +![Bear 65](https://i.imgur.com/W1sVP1Tl.jpg) + +A gasket-mounted 65% keyboard inspired by the [TGR Alice](https://github.com/qmk/qmk_firmware/tree/master/keyboards/tgr/alice). Designed and produced by [jacky](https://geekhack.org/index.php?action=profile;u=63864) from Geekhack. + +* Keyboard Maintainer: QMK Community +* Hardware Supported: Bear 65 +* Hardware Availability: The GB happened July 15th 2020, units are still in production + +Make example for this keyboard (after setting up your build environment): + + make bear_65:default + +Flashing example for this keyboard: + + make bear_65:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/bear_65/rules.mk b/keyboards/bear_65/rules.mk new file mode 100644 index 0000000000..339c37c7ee --- /dev/null +++ b/keyboards/bear_65/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LTO_ENABLE = yes # Use LTO flags to reduce firmware size diff --git a/keyboards/bemeier/bmek/README.md b/keyboards/bemeier/bmek/README.md new file mode 100755 index 0000000000..3437a5afdd --- /dev/null +++ b/keyboards/bemeier/bmek/README.md @@ -0,0 +1,30 @@ +# BMEK + +![BMEK](https://i.imgur.com/p1KFi6ql.jpg) + +BMEK combines the best of HHKB & Alice-likes. All PCB and case design files are open source. + +* Keyboard Maintainer: [Bemeier](https://github.com/Bemeier) +* Hardware Supported: BMEK PCB rev1, rev2, rev3 +* Hardware Availability: Case & PCB files: [github.com/bemeier/bmek](https://github.com/bemeier/bmek) + +Make example for this keyboard, for an hhkb-like layout and keymap (after setting up your build environment): + + make bemeier/bmek/rev3:default + +Make the VIA compatible firmware: + + make bemeier/bmek/rev3:via + +The ```rev3```, denotes the version of the PCB. +Check on the PCB to find out which version you have, and set it to rev1, rev2 or rev3 accordingly (the BMEK group buy PCBs are all rev3). + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +# Layouts + +Starting with rev3 (the version of the PCB to be shipped in the GB), the following layout options are supported: + +![layouts](https://i.imgur.com/XuFxwthl.png) + +Note that the keymap shown above may not accurately reflect the default keymap of the firmware (see the keymaps folder). diff --git a/keyboards/bemeier/bmek/bmek.c b/keyboards/bemeier/bmek/bmek.c new file mode 100755 index 0000000000..47e8742695 --- /dev/null +++ b/keyboards/bemeier/bmek/bmek.c @@ -0,0 +1,23 @@ +/* Copyright 2020 bemeier + * + * 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 "bmek.h" + +__attribute__((weak)) +void shutdown_user() { +#ifdef RGBLIGHT_ENABLE + rgblight_setrgb(255, 0, 0); +#endif +} diff --git a/keyboards/bemeier/bmek/bmek.h b/keyboards/bemeier/bmek/bmek.h new file mode 100755 index 0000000000..4249d02566 --- /dev/null +++ b/keyboards/bemeier/bmek/bmek.h @@ -0,0 +1,58 @@ +/* Copyright 2020 bemeier + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#if defined(KEYBOARD_bemeier_bmek_rev1) +# include "rev1.h" +#elif defined(KEYBOARD_bemeier_bmek_rev2) +# include "rev2.h" +#elif defined(KEYBOARD_bemeier_bmek_rev3) +# include "rev3.h" +#endif + +#define XXX KC_NO // makes the switch matrix easier to read + +// This layout is supported by all revisions +#define LAYOUT_hhkb(\ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K1E,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K2E,\ + 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, K3E,\ + K42, K43, K45, K48, K4A, K4B \ + ) { \ + { 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 }, \ + { XXX, XXX, K42, K43, XXX, K45, XXX, XXX, K48, XXX, K4A, K4B, XXX, XXX, XXX } \ +} + +// Layout exposing all keys (adding the ISO-style split left shift, which is supported starting rev3) +#define LAYOUT_all(\ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K1E,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K2E,\ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D,\ + K30, K31, K41, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E,\ + K42, K43, K45, K48, K4A, K4B \ + ) { \ + { 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 }, \ + { XXX, K41, K42, K43, XXX, K45, XXX, XXX, K48, XXX, K4A, K4B, XXX, XXX, XXX } \ +} diff --git a/keyboards/bemeier/bmek/config.h b/keyboards/bemeier/bmek/config.h new file mode 100755 index 0000000000..1bd996d07a --- /dev/null +++ b/keyboards/bemeier/bmek/config.h @@ -0,0 +1,47 @@ +/* Copyright 2020 bemeier + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x626D // BeMeier +#define PRODUCT_ID 0x656B // ErgonomicKeyboard +#define MANUFACTURER Bemeier +#define PRODUCT BMEK + +#define DYNAMIC_KEYMAP_LAYER_COUNT 5 +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 20 + +/* Keyboard Matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define DIODE_DIRECTION COL2ROW + +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_MODE_STATIC_GRADIENT + +#define RGBLED_NUM 6 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 255 + +#define DEBOUNCE 5 +//#define RETRO_TAPPING +#define TAPPING_TERM 175 diff --git a/keyboards/bemeier/bmek/info.json b/keyboards/bemeier/bmek/info.json new file mode 100755 index 0000000000..51dc980c21 --- /dev/null +++ b/keyboards/bemeier/bmek/info.json @@ -0,0 +1,25 @@ +{ + "keyboard_name": "bmek", + "url": "https://github.com/Bemeier/bmek", + "maintainer": "Bemeier", + "width": 18, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"Home", "x":0, "y":0}, {"label":"Esc", "x":1.5, "y":0}, {"label":"!", "x":2.5, "y":0}, {"label":"@", "x":3.5, "y":0}, {"label":"#", "x":4.5, "y":0}, {"label":"$", "x":5.5, "y":0}, {"label":"%", "x":6.5, "y":0}, {"label":"^", "x":7.5, "y":0}, {"label":"&", "x":10, "y":0}, {"label":"*", "x":11, "y":0}, {"label":"(", "x":12, "y":0}, {"label":")", "x":13, "y":0}, {"label":"_", "x":14, "y":0}, {"label":"+", "x":15, "y":0}, {"label":"|", "x":16, "y":0}, {"label":"~", "x":17, "y":0}, + {"label":"PgUp", "x":0, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":9.5, "y":1}, {"label":"U", "x":10.5, "y":1}, {"label":"I", "x":11.5, "y":1}, {"label":"O", "x":12.5, "y":1}, {"label":"P", "x":13.5, "y":1}, {"label":"{", "x":14.5, "y":1}, {"label":"}", "x":15.5, "y":1}, {"label":"Backspace", "x":16.5, "y":1, "w":1.5}, + {"label":"PgDn", "x":0, "y":2}, {"label":"Ctrl", "x":1.5, "y":2, "w":1.75}, {"label":"A", "x":3.25, "y":2}, {"label":"S", "x":4.25, "y":2}, {"label":"D", "x":5.25, "y":2}, {"label":"F", "x":6.25, "y":2}, {"label":"G", "x":7.25, "y":2}, {"label":"H", "x":9.75, "y":2}, {"label":"J", "x":10.75, "y":2}, {"label":"K", "x":11.75, "y":2}, {"label":"L", "x":12.75, "y":2}, {"label":":", "x":13.75, "y":2}, {"label":"\"", "x":14.75, "y":2}, {"label":"Enter", "x":15.75, "y":2, "w":2.25}, + {"label":"End", "x":0, "y":3}, {"label":"Shift", "x":1.5, "y":3, "w":1.25}, {"label":"~", "x":2.75, "y":3}, {"label":"Z", "x":3.75, "y":3}, {"label":"X", "x":4.75, "y":3}, {"label":"C", "x":5.75, "y":3}, {"label":"V", "x":6.75, "y":3}, {"label":"B", "x":7.75, "y":3}, {"label":"B", "x":9.25, "y":3}, {"label":"N", "x":10.25, "y":3}, {"label":"M", "x":11.25, "y":3}, {"label":"<", "x":12.25, "y":3}, {"label":">", "x":13.25, "y":3}, {"label":"?", "x":14.25, "y":3}, {"label":"Shift", "x":15.25, "y":3, "w":1.75}, {"label":"Fn", "x":17, "y":3}, {"label":"Win", "x":3.75, "y":4}, {"label":"Alt", "x":4.75, "y":4, "w":1.25}, {"x":6, "y":4, "w":2.75}, {"x":9.25, "y":4, "w":2.75}, {"label":"Alt", "x":12, "y":4, "w":1.25}, {"label":"Win", "x":13.25, "y":4} + ] + }, + "LAYOUT_hhkb": { + "layout": [ + {"label":"Home", "x":0, "y":0}, {"label":"Esc", "x":1.5, "y":0}, {"label":"!", "x":2.5, "y":0}, {"label":"@", "x":3.5, "y":0}, {"label":"#", "x":4.5, "y":0}, {"label":"$", "x":5.5, "y":0}, {"label":"%", "x":6.5, "y":0}, {"label":"^", "x":7.5, "y":0}, {"label":"&", "x":10, "y":0}, {"label":"*", "x":11, "y":0}, {"label":"(", "x":12, "y":0}, {"label":")", "x":13, "y":0}, {"label":"_", "x":14, "y":0}, {"label":"+", "x":15, "y":0}, {"label":"|", "x":16, "y":0}, {"label":"~", "x":17, "y":0}, + {"label":"PgUp", "x":0, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, {"label":"E", "x":5, "y":1}, {"label":"R", "x":6, "y":1}, {"label":"T", "x":7, "y":1}, {"label":"Y", "x":9.5, "y":1}, {"label":"U", "x":10.5, "y":1}, {"label":"I", "x":11.5, "y":1}, {"label":"O", "x":12.5, "y":1}, {"label":"P", "x":13.5, "y":1}, {"label":"{", "x":14.5, "y":1}, {"label":"}", "x":15.5, "y":1}, {"label":"Backspace", "x":16.5, "y":1, "w":1.5}, + {"label":"PgDn", "x":0, "y":2}, {"label":"Ctrl", "x":1.5, "y":2, "w":1.75}, {"label":"A", "x":3.25, "y":2}, {"label":"S", "x":4.25, "y":2}, {"label":"D", "x":5.25, "y":2}, {"label":"F", "x":6.25, "y":2}, {"label":"G", "x":7.25, "y":2}, {"label":"H", "x":9.75, "y":2}, {"label":"J", "x":10.75, "y":2}, {"label":"K", "x":11.75, "y":2}, {"label":"L", "x":12.75, "y":2}, {"label":":", "x":13.75, "y":2}, {"label":"\"", "x":14.75, "y":2}, {"label":"Enter", "x":15.75, "y":2, "w":2.25}, + {"label":"End", "x":0, "y":3}, {"label":"Shift", "x":1.5, "y":3, "w":2.25}, {"label":"Z", "x":3.75, "y":3}, {"label":"X", "x":4.75, "y":3}, {"label":"C", "x":5.75, "y":3}, {"label":"V", "x":6.75, "y":3}, {"label":"B", "x":7.75, "y":3}, {"label":"B", "x":9.25, "y":3}, {"label":"N", "x":10.25, "y":3}, {"label":"M", "x":11.25, "y":3}, {"label":"<", "x":12.25, "y":3}, {"label":">", "x":13.25, "y":3}, {"label":"?", "x":14.25, "y":3}, {"label":"Shift", "x":15.25, "y":3, "w":1.75}, {"label":"Fn", "x":17, "y":3}, {"label":"Win", "x":3.75, "y":4}, {"label":"Alt", "x":4.75, "y":4, "w":1.25}, {"x":6, "y":4, "w":2.75}, {"x":9.25, "y":4, "w":2.75}, {"label":"Alt", "x":12, "y":4, "w":1.25}, {"label":"Win", "x":13.25, "y":4} + ] + } + } +} diff --git a/keyboards/bemeier/bmek/keymaps/default/README.md b/keyboards/bemeier/bmek/keymaps/default/README.md new file mode 100755 index 0000000000..a2c12ad3d6 --- /dev/null +++ b/keyboards/bemeier/bmek/keymaps/default/README.md @@ -0,0 +1,4 @@ +# Default BMEK Keymap +This is the default keymap for the BMEK, besides the left macro columns and the split spacebars. +It's uses the HHKB-like layout options (no split left shift, split backspace and split right shift). +Please checkout the diagrams in ```keymap.c``` for an overview of the keymap. diff --git a/keyboards/bemeier/bmek/keymaps/default/keymap.c b/keyboards/bemeier/bmek/keymaps/default/keymap.c new file mode 100755 index 0000000000..a2fccfb2c9 --- /dev/null +++ b/keyboards/bemeier/bmek/keymaps/default/keymap.c @@ -0,0 +1,76 @@ +/* Copyright 2020 bemeier + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_hhkb( +/* Default layer +┌─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ F13 │ │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │ +├─────┤ ├─────┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┘ ┌─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴─────┤ +│ F14 │ │ TAB │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ [ │ ] │ BSPC │ +├─────┤ ├───────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ └─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴───────┤ +│ F15 │ │ CTRL │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ ENTER │ +├─────┤ ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ ┌┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴──────┬────┤ +│ F16 │ │ SHFT │ Z │ X │ C │ V │ B │ │ B │ N │ M │ , │ . │ / │ SHFT │ Fn │ +└─────┘ └─────────┼─────┼─────┴┬────┴─────┴─────┤ ├─────┴─────┴────┬┴─────┼─────┼─────┴───────┴────┘ + │ GUI │ ALT │ SPACE │ │ SPACE/Fn_1 │ ALT │ CTL │ + └─────┴──────┴────────────────┘ └────────────────┴──────┴─────┘ +*/ + KC_F13, 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_F14, 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_F15, 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_F16, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LGUI, KC_LALT, KC_SPC, LT(1, KC_SPC), KC_RALT, KC_RCTL +), [1] = LAYOUT_hhkb( +/* Function Layer 1: Nav +┌─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ RST │ │ PWR │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ INS │ DEL │ +├─────┤ ├─────┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┘ ┌─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴─────┤ +│ │ │ CAPS │ │ │ │ │ │ │ │ │PSCR │SLCK │PAUS │ ^ │ │ │ +├─────┤ ├───────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ └─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴───────┤ +│ │ │ │ o) │ o)} │ Ø │EJCT │ │ │ * │ / │HOME │PGUP │ <- │ -> │ │ +├─────┤ ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ ┌┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴──────┬────┤ +│ │ │ │ │ │ CFG │ │ │ │ + │ - │ │ END │PGDN │ v │ │ │ +└─────┘ └─────────┼─────┼─────┴┬────┴─────┴─────┤ ├─────┴─────┴────┬┴─────┼─────┼─────┴───────┴────┘ + │ │ │ │ │ │ │ │ + └─────┴──────┴────────────────┘ └────────────────┴──────┴─────┘ +*/ + RESET, 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, + _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, + _______, _______, _______, _______, TG(2), _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______ +), [2] = LAYOUT_hhkb( +/* Function Layer 4: Firmware Config (TODO) +┌─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ RST │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┤ ├─────┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┘ ┌─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴─────┤ +│ │ │ │ RGB │RGB+ │RGB- │HUE+ │HUE- │ │ │ │ │ │ │ │ │ │ +├─────┤ ├───────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ └─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴───────┤ +│ │ │ │ │SPD+ │SPD- │SAT+ │SAT- │ │ │ │ │ │ │ │ │ +├─────┤ ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ ┌┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴──────┬────┤ +│ │ │ │ │ │ ___ │VAL+ │VAL- │ │ │ │ │ │ │ │ │ │ +└─────┘ └─────────┼─────┼─────┴┬────┴─────┴─────┤ ├─────┴─────┴────┬┴─────┼─────┼─────┴───────┴────┘ + │ │ │ │ │ │ │ │ + └─────┴──────┴────────────────┘ └────────────────┴──────┴─────┘ +*/ + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, RGB_RMOD, RGB_HUI, RGB_HUD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, RGB_SPI, RGB_SPD, RGB_SAI, RGB_SAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG(2), RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX +) }; diff --git a/keyboards/bemeier/bmek/keymaps/via/README.md b/keyboards/bemeier/bmek/keymaps/via/README.md new file mode 100755 index 0000000000..30d54301fb --- /dev/null +++ b/keyboards/bemeier/bmek/keymaps/via/README.md @@ -0,0 +1,18 @@ +# Default VIA Keymap +Compile the firmware with this keymap for use the BMEK with the [VIA configurator](https://caniusevia.com/). +Layout options can be configured in VIA (see first screenshot below). + +## 0: Base Layer +![Base Layer](https://i.imgur.com/tBu50SS.png) + +## 1: Nav Layer +![Nav Layer](https://i.imgur.com/ZzEow3t.png) + +## 2: NUM Block +![NUM Block](https://i.imgur.com/vzjZIa1.png) + +## 4: FW Config +![FW Config](https://i.imgur.com/L7QynAb.png) + +## Alternative Preconfigured Layouts +TODO: Provide (links to) some alternative via keymaps after VIA support is landed upstream. diff --git a/keyboards/bemeier/bmek/keymaps/via/keymap.c b/keyboards/bemeier/bmek/keymaps/via/keymap.c new file mode 100755 index 0000000000..8e5f7b2d0e --- /dev/null +++ b/keyboards/bemeier/bmek/keymaps/via/keymap.c @@ -0,0 +1,114 @@ +/* Copyright 2020 bemeier + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( +/* Default layer +┌─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ F13 │ │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │ +├─────┤ ├─────┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┘ ┌─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴─────┤ +│ F14 │ │ TAB │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ [ │ ] │ BSPC │ +├─────┤ ├───────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ └─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴───────┤ +│ F15 │ │ CTRL │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ ENTER │ +├─────┤ ├───────┬┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ ┌┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴──────┬────┤ +│ F16 │ │ SHFT │`│ Z │ X │ C │ V │ B │ │ B │ N │ M │ , │ . │ / │ SHFT │ Fn │ +└─────┘ └───────┴─┼─────┼─────┴┬────┴─────┴─────┤ ├─────┴─────┴────┬┴─────┼─────┼─────┴───────┴────┘ + │ GUI │ ALT │ SPACE │ │ SPACE/Fn_1 │ ALT │ CTL │ + └─────┴──────┴────────────────┘ └────────────────┴──────┴─────┘ +*/ + KC_F13, 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_F14, 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_F15, 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_F16, KC_LSFT, KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LGUI, KC_LALT, KC_SPC, LT(1, KC_SPC), KC_RALT, KC_RCTL +), [1] = LAYOUT_all( +/* Function Layer 1: Nav +┌─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ RST │ │ │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ INS │ DEL │ +├─────┤ ├─────┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┘ ┌─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴─────┤ +│ │ │ │ END │ ^ │HOME │PGUP │ │ │ │ │ │ │ |> │ << │ >> │ │ +├─────┤ ├───────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ └─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴───────┤ +│ │ │ │ <- │ v │ -> │PGDN │ │ │ <- │ v │ ^ │ -> │ o) │ o)} │ │ +├─────┤ ├───────┬┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ ┌┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴──────┬────┤ +│ │ │ │ │ │ │ CFG │ │ NUM │ │ │ │ │LDSKT│RDSKT│ Ø │ │ │ +└─────┘ └───────┴─┼─────┼─────┴┬────┴─────┴─────┤ ├─────┴─────┴────┬┴─────┼─────┼─────┴───────┴────┘ + │ │ │ │ │ │ │ │ + └─────┴──────┴────────────────┘ └────────────────┴──────┴─────┘ +*/ + 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_INS, KC_DEL, + _______, _______, KC_END, KC_UP, KC_HOME, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPLY, KC_MPRV, KC_MNXT, _______, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLD, KC_VOLU, _______, + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, TG(4), XXXXXXX, XXXXXXX, TG(2), XXXXXXX, XXXXXXX, LCTL(LGUI(KC_LEFT)), LCTL(LGUI(KC_RGHT)), KC_MUTE, _______, _______, + _______, _______, _______, _______, _______, _______ +), [2] = LAYOUT_all( +/* Function Layer 2: Numpad example +┌─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ │ │ │ │ │ │ │ │ │ │ 7 │ 8 │ 9 │ 0 │ - │ + │ │ │ +├─────┤ ├─────┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┘ ┌─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴─────┤ +│ │ │ │ │ │ │ │ │ │ 4 │ 5 │ 6 │ │ / │ * │ │ │ +├─────┤ ├───────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ └─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴───────┤ +│ │ │ │ │ │ │ │ │ │ 1 │ 2 │ 3 │ │ │ │ KP_ENTER │ +├─────┤ ├───────┬┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ ┌┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴──────┬────┤ +│ │ │ │ │ │ │ │ │ │ │ ___ │ 0 │ . │ │ │ │ │ │ +└─────┘ └───────┴─┼─────┼─────┴┬────┴─────┴─────┤ ├─────┴─────┴────┬┴─────┼─────┼─────┴───────┴────┘ + │ │ │ │ │ │ │ │ + └─────┴──────┴────────────────┘ └────────────────┴──────┴─────┘ +*/ + _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_0, KC_PMNS, KC_PPLS, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, XXXXXXX, KC_PSLS, KC_PAST, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, XXXXXXX, _______, _______, KC_PENT, + _______, _______, _______, _______, _______, _______, _______, _______, TG(2), KC_KP_0, KC_PDOT, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ +), [3] = LAYOUT_all( +/* Function Layer 3 +┌─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┤ ├─────┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┘ ┌─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┤ ├───────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ └─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴───────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┤ ├───────┬┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ ┌┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴──────┬────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└─────┘ └───────┴─┼─────┼─────┴┬────┴─────┴─────┤ ├─────┴─────┴────┬┴─────┼─────┼─────┴───────┴────┘ + │ │ │ │ │ │ │ │ + └─────┴──────┴────────────────┘ └────────────────┴──────┴─────┘ +*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ +), [4] = LAYOUT_all( +/* Function Layer 4: Firmware Config +┌─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ +│ RST │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┤ ├─────┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┘ ┌─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴───┬─┴─────┤ +│ │ │ │ RGB │RGB+ │RGB- │HUE+ │HUE- │ │ │ │ │ │ │ │ │ │ +├─────┤ ├───────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ └─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴─┬───┴───────┤ +│ │ │ │ │SPD+ │SPD- │SAT+ │SAT- │ │ │ │ │ │ │ │ │ +├─────┤ ├───────┬┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ ┌┴────┬┴────┬┴────┬┴────┬┴────┬┴────┬┴──────┬────┤ +│ │ │ │ │ │ │ ___ │VAL+ │VAL- │ │ │ │ │ │ │ │ │ │ +└─────┘ └───────┴─┼─────┼─────┴┬────┴─────┴─────┤ ├─────┴─────┴────┬┴─────┼─────┼─────┴───────┴────┘ + │ │ │ │ │ │ │ │ + └─────┴──────┴────────────────┘ └────────────────┴──────┴─────┘ +*/ + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, RGB_RMOD, RGB_HUI, RGB_HUD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, RGB_SPI, RGB_SPD, RGB_SAI, RGB_SAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG(4), RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX +) }; diff --git a/keyboards/bemeier/bmek/keymaps/via/rules.mk b/keyboards/bemeier/bmek/keymaps/via/rules.mk new file mode 100755 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/bemeier/bmek/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/mechmini/config.h b/keyboards/bemeier/bmek/rev1/config.h old mode 100644 new mode 100755 similarity index 59% rename from keyboards/mechmini/config.h rename to keyboards/bemeier/bmek/rev1/config.h index 98c9fb6510..5c738499f7 --- a/keyboards/mechmini/config.h +++ b/keyboards/bemeier/bmek/rev1/config.h @@ -1,28 +1,29 @@ -/* Copyright 2017 Luiz Ribeiro - * Copyright 2018 TurboMech /u/TurboMech @A9entOran9e#6134 +/* Copyright 2020 bemeier + * * 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, + * 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 . -*/ + */ +#pragma once #include "config_common.h" -#ifndef CONFIG_H -#define CONFIG_H +#define DEVICE_VER 0x0001 -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0xCA40 -#define MANUFACTURER MECHKEYS -#define PRODUCT Mechmini -#define DESCRIPTION 40% modular keyboard +#define MATRIX_ROW_PINS \ + { D4, D7, B6, B4, B7 } +#define MATRIX_COL_PINS \ + { F1, B0, B1, B2, B3, D0, D1, D2, C6, C7, F7, F6, F5, F4, B5 } +#define UNUSED_PINS \ + { D4, D5, F0, B7 } +#define RGB_DI_PIN E6 -#endif diff --git a/keyboards/bemeier/bmek/rev1/rev1.c b/keyboards/bemeier/bmek/rev1/rev1.c new file mode 100755 index 0000000000..24f0dcdb94 --- /dev/null +++ b/keyboards/bemeier/bmek/rev1/rev1.c @@ -0,0 +1,16 @@ +/* Copyright 2020 bemeier + * + * 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 "rev1.h" diff --git a/keyboards/bemeier/bmek/rev1/rev1.h b/keyboards/bemeier/bmek/rev1/rev1.h new file mode 100755 index 0000000000..1c46169bdc --- /dev/null +++ b/keyboards/bemeier/bmek/rev1/rev1.h @@ -0,0 +1,18 @@ +/* Copyright 2020 bemeier + * + * 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 . + */ +#pragma once + +#include "quantum.h" diff --git a/keyboards/bemeier/bmek/rev1/rules.mk b/keyboards/bemeier/bmek/rev1/rules.mk new file mode 100755 index 0000000000..17d390f221 --- /dev/null +++ b/keyboards/bemeier/bmek/rev1/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +SLEEP_LED_ENABLE = yes +SPLIT_KEYBOARD = no +BACKLIGHT_ENABLE = no +NKRO_ENABLE = yes +RGBLIGHT_ENABLE = yes +AUDIO_ENABLE = no +LTO_ENABLE = yes diff --git a/keyboards/bemeier/bmek/rev2/config.h b/keyboards/bemeier/bmek/rev2/config.h new file mode 100755 index 0000000000..c97d0417ad --- /dev/null +++ b/keyboards/bemeier/bmek/rev2/config.h @@ -0,0 +1,29 @@ +/* Copyright 2020 bemeier + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +#define DEVICE_VER 0x0002 + +#define MATRIX_ROW_PINS \ + { F4, F5, D7, B5, B4 } +#define MATRIX_COL_PINS \ + { F6, B0, B1, F7, C7, C6, B6, F1, B2, B3, D6, D3, D2, D1, D0 } +#define UNUSED_PINS \ + { D4, D5, F0, B7 } + +#define RGB_DI_PIN E6 diff --git a/keyboards/bemeier/bmek/rev2/rev2.c b/keyboards/bemeier/bmek/rev2/rev2.c new file mode 100755 index 0000000000..97ee43e318 --- /dev/null +++ b/keyboards/bemeier/bmek/rev2/rev2.c @@ -0,0 +1,16 @@ +/* Copyright 2020 bemeier + * + * 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 "rev2.h" diff --git a/keyboards/bemeier/bmek/rev2/rev2.h b/keyboards/bemeier/bmek/rev2/rev2.h new file mode 100755 index 0000000000..1c46169bdc --- /dev/null +++ b/keyboards/bemeier/bmek/rev2/rev2.h @@ -0,0 +1,18 @@ +/* Copyright 2020 bemeier + * + * 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 . + */ +#pragma once + +#include "quantum.h" diff --git a/keyboards/bemeier/bmek/rev2/rules.mk b/keyboards/bemeier/bmek/rev2/rules.mk new file mode 100755 index 0000000000..17d390f221 --- /dev/null +++ b/keyboards/bemeier/bmek/rev2/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +SLEEP_LED_ENABLE = yes +SPLIT_KEYBOARD = no +BACKLIGHT_ENABLE = no +NKRO_ENABLE = yes +RGBLIGHT_ENABLE = yes +AUDIO_ENABLE = no +LTO_ENABLE = yes diff --git a/keyboards/bemeier/bmek/rev3/config.h b/keyboards/bemeier/bmek/rev3/config.h new file mode 100755 index 0000000000..fd74a74027 --- /dev/null +++ b/keyboards/bemeier/bmek/rev3/config.h @@ -0,0 +1,29 @@ +/* Copyright 2020 bemeier + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +#define DEVICE_VER 0x0003 + +#define MATRIX_ROW_PINS \ + { F1, B4, B5, D6, D7 } +#define MATRIX_COL_PINS \ + { B6, C6, C7, F7, F6, F5, F4, F0, B7, D0, D1, D2, D3, D5, D4 } +#define UNUSED_PINS \ + { D0, B1, B2, B3 } + +#define RGB_DI_PIN E6 diff --git a/keyboards/bemeier/bmek/rev3/rev3.c b/keyboards/bemeier/bmek/rev3/rev3.c new file mode 100755 index 0000000000..6193ab51b4 --- /dev/null +++ b/keyboards/bemeier/bmek/rev3/rev3.c @@ -0,0 +1,16 @@ +/* Copyright 2020 bemeier + * + * 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 "rev3.h" diff --git a/keyboards/bemeier/bmek/rev3/rev3.h b/keyboards/bemeier/bmek/rev3/rev3.h new file mode 100755 index 0000000000..f769927193 --- /dev/null +++ b/keyboards/bemeier/bmek/rev3/rev3.h @@ -0,0 +1,24 @@ +/* Copyright 2020 bemeier + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* +PCB rev3 has a number of layout options that rev2 and rev1 don't have, +however, to me just using "ALL_67" for all for all keymaps seems easier to +maintain than adding all possible permutations of layout options here. +*/ diff --git a/keyboards/bemeier/bmek/rev3/rules.mk b/keyboards/bemeier/bmek/rev3/rules.mk new file mode 100755 index 0000000000..17d390f221 --- /dev/null +++ b/keyboards/bemeier/bmek/rev3/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +SLEEP_LED_ENABLE = yes +SPLIT_KEYBOARD = no +BACKLIGHT_ENABLE = no +NKRO_ENABLE = yes +RGBLIGHT_ENABLE = yes +AUDIO_ENABLE = no +LTO_ENABLE = yes diff --git a/keyboards/binepad/bn003/bn003.c b/keyboards/binepad/bn003/bn003.c new file mode 100644 index 0000000000..80a6d384c0 --- /dev/null +++ b/keyboards/binepad/bn003/bn003.c @@ -0,0 +1,16 @@ +/* Copyright 2020 BINEPAD + * + * 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 "bn003.h" diff --git a/keyboards/binepad/bn003/bn003.h b/keyboards/binepad/bn003/bn003.h new file mode 100644 index 0000000000..15311b5348 --- /dev/null +++ b/keyboards/binepad/bn003/bn003.h @@ -0,0 +1,23 @@ +/* Copyright 2020 BINEPAD + * + * 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 "quantum.h" + +#define LAYOUT( \ + K00, K01, K02 \ +) { \ + { K00, K01, K02 } \ +} + diff --git a/keyboards/binepad/bn003/config.h b/keyboards/binepad/bn003/config.h new file mode 100644 index 0000000000..de5fb533a0 --- /dev/null +++ b/keyboards/binepad/bn003/config.h @@ -0,0 +1,89 @@ +/* Copyright 2020 BINEPAD + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4249 // Binepad +#define PRODUCT_ID 0x4287 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Binepad +#define PRODUCT BN003 + +/* Key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 3 + +#define MATRIX_ROW_PINS { C6 } +#define MATRIX_COL_PINS { B4, B5, B6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ diff --git a/keyboards/binepad/bn003/info.json b/keyboards/binepad/bn003/info.json new file mode 100644 index 0000000000..fdf7e3fbb9 --- /dev/null +++ b/keyboards/binepad/bn003/info.json @@ -0,0 +1,28 @@ +{ + "keyboard_name": "BN003", + "url": "https://binepad.com", + "maintainer": "binepad", + "width": 3, + "height": 1, + "layouts": { + "LAYOUT": { + "layout": [ + { + "label": "K0", + "x": 0, + "y": 0 + }, + { + "label": "K1", + "x": 1, + "y": 0 + }, + { + "label": "K2", + "x": 2, + "y": 0 + } + ] + } + } +} diff --git a/keyboards/binepad/bn003/keymaps/default/keymap.c b/keyboards/binepad/bn003/keymaps/default/keymap.c new file mode 100644 index 0000000000..8e73f05bb4 --- /dev/null +++ b/keyboards/binepad/bn003/keymaps/default/keymap.c @@ -0,0 +1,19 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_0, + KC_1, + KC_2 + ), + [1] = LAYOUT( + KC_NO, + KC_NO, + KC_NO + ), + [2] = LAYOUT( + KC_NO, + KC_NO, + KC_NO + ) +}; diff --git a/keyboards/binepad/bn003/keymaps/default/readme.md b/keyboards/binepad/bn003/keymaps/default/readme.md new file mode 100644 index 0000000000..be0a7d956e --- /dev/null +++ b/keyboards/binepad/bn003/keymaps/default/readme.md @@ -0,0 +1 @@ +# bn003 - Default layout diff --git a/keyboards/binepad/bn003/keymaps/via/keymap.c b/keyboards/binepad/bn003/keymaps/via/keymap.c new file mode 100644 index 0000000000..e0ffb3f80b --- /dev/null +++ b/keyboards/binepad/bn003/keymaps/via/keymap.c @@ -0,0 +1,24 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_0, + KC_1, + KC_2 + ), + [1] = LAYOUT( + KC_NO, + KC_NO, + KC_NO + ), + [2] = LAYOUT( + KC_NO, + KC_NO, + KC_NO + ), + [3] = LAYOUT( + KC_NO, + KC_NO, + KC_NO + ) +}; diff --git a/keyboards/binepad/bn003/keymaps/via/rules.mk b/keyboards/binepad/bn003/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/binepad/bn003/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/binepad/bn003/readme.md b/keyboards/binepad/bn003/readme.md new file mode 100644 index 0000000000..daf406dbef --- /dev/null +++ b/keyboards/binepad/bn003/readme.md @@ -0,0 +1,15 @@ +# BINEPAD BN003 + +![BINEPAD BN003](https://imgur.com/q8JPcNEl.jpg) + +A 3% macropad. + +* Keyboard Maintainer: [BINEPAD] +* Hardware Supported: BN003 PCB (ATmega32U4) +* Hardware Availability: [Interest Check](https://www.binepad.com/bn003) + +Make example for this keyboard (after setting up your build environment): + + make binepad/bn003:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/binepad/bn003/rules.mk b/keyboards/binepad/bn003/rules.mk new file mode 100644 index 0000000000..7b15ae0651 --- /dev/null +++ b/keyboards/binepad/bn003/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/bm60poker/bm60poker.c b/keyboards/bm60poker/bm60poker.c new file mode 100644 index 0000000000..a7a3352097 --- /dev/null +++ b/keyboards/bm60poker/bm60poker.c @@ -0,0 +1,52 @@ +/* Copyright 2020 ipetepete + * + * 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 "bm60poker.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, + { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 }, + { 28, NO_LED, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 }, + { NO_LED, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, NO_LED, 52 }, + { 53, 54, 55, NO_LED, NO_LED, NO_LED, 56, NO_LED, NO_LED, 57, 58, NO_LED, 59, 60 } +}, { + // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace + { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 202, 0 }, + // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , + { 7, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 }, + // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter + { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, + // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, + { 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 }, + // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right + { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 210, 64 }, { 225, 64 }, + // UNDERGLOW + { 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 } +}, { + // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right + 1, 1, 1, 4, 1, 1, 1, 1, + // UNDERGLOW + 2, 2, 2, 2, 2, 2 +} }; +#endif diff --git a/keyboards/bm60poker/bm60poker.h b/keyboards/bm60poker/bm60poker.h new file mode 100644 index 0000000000..02a28377e6 --- /dev/null +++ b/keyboards/bm60poker/bm60poker.h @@ -0,0 +1,32 @@ +/* Copyright 2020 ipetepete + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_60_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K46, K49, K4A, K4C, K4D \ +) { \ + { 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, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { KC_NO, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D }, \ +} diff --git a/keyboards/bm60poker/config.h b/keyboards/bm60poker/config.h new file mode 100644 index 0000000000..5eb4ad2a77 --- /dev/null +++ b/keyboards/bm60poker/config.h @@ -0,0 +1,70 @@ +/* +Copyright 2020 ipetepete + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4B50 // "KP" +#define PRODUCT_ID 0xEF8E +#define DEVICE_VER 0x0001 +#define MANUFACTURER KP Republic +#define PRODUCT BM60POKER + +/* 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 { B0, B1, B2, B3, E6 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7 } + +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN E2 +#define DRIVER_LED_TOTAL 67 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 67 + #define RGB_MATRIX_KEYPRESSES + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 5 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif diff --git a/keyboards/bm60poker/info.json b/keyboards/bm60poker/info.json new file mode 100644 index 0000000000..d2e13ca46d --- /dev/null +++ b/keyboards/bm60poker/info.json @@ -0,0 +1,74 @@ +{ + "keyboard_name": "BM60POKER", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi": { + "layout": [ + {"label":"K00 (B0,D0)", "x":0, "y":0}, + {"label":"K01 (B0,D1)", "x":1, "y":0}, + {"label":"K02 (B0,D2)", "x":2, "y":0}, + {"label":"K03 (B0,D3)", "x":3, "y":0}, + {"label":"K04 (B0,D5)", "x":4, "y":0}, + {"label":"K05 (B0,D4)", "x":5, "y":0}, + {"label":"K06 (B0,D6)", "x":6, "y":0}, + {"label":"K07 (B0,D7)", "x":7, "y":0}, + {"label":"K08 (B0,B4)", "x":8, "y":0}, + {"label":"K09 (B0,B5)", "x":9, "y":0}, + {"label":"K0A (B0,B6)", "x":10, "y":0}, + {"label":"K0B (B0,C6)", "x":11, "y":0}, + {"label":"K0C (B0,C7)", "x":12, "y":0}, + {"label":"K0D (B0,F7)", "x":13, "y":0, "w":2}, + {"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,D1)", "x":1.5, "y":1}, + {"label":"K12 (B1,D2)", "x":2.5, "y":1}, + {"label":"K13 (B1,D3)", "x":3.5, "y":1}, + {"label":"K14 (B1,D5)", "x":4.5, "y":1}, + {"label":"K15 (B1,D4)", "x":5.5, "y":1}, + {"label":"K16 (B1,D6)", "x":6.5, "y":1}, + {"label":"K17 (B1,D7)", "x":7.5, "y":1}, + {"label":"K18 (B1,B4)", "x":8.5, "y":1}, + {"label":"K19 (B1,B5)", "x":9.5, "y":1}, + {"label":"K1A (B1,B6)", "x":10.5, "y":1}, + {"label":"K1B (B1,C6)", "x":11.5, "y":1}, + {"label":"K1C (B1,C7)", "x":12.5, "y":1}, + {"label":"K1D (B1,F7)", "x":13.5, "y":1, "w":1.5}, + {"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75}, + {"label":"K22 (B2,D2)", "x":1.75, "y":2}, + {"label":"K23 (B2,D3)", "x":2.75, "y":2}, + {"label":"K24 (B2,D5)", "x":3.75, "y":2}, + {"label":"K25 (B2,D4)", "x":4.75, "y":2}, + {"label":"K26 (B2,D6)", "x":5.75, "y":2}, + {"label":"K27 (B2,D7)", "x":6.75, "y":2}, + {"label":"K28 (B2,B4)", "x":7.75, "y":2}, + {"label":"K29 (B2,B5)", "x":8.75, "y":2}, + {"label":"K2A (B2,B6)", "x":9.75, "y":2}, + {"label":"K2B (B2,C6)", "x":10.75, "y":2}, + {"label":"K2C (B2,C7)", "x":11.75, "y":2}, + {"label":"K2D (B2,F7)", "x":12.75, "y":2, "w":2.25}, + {"label":"K31 (B3,D1)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (B3,D2)", "x":2.25, "y":3}, + {"label":"K33 (B3,D3)", "x":3.25, "y":3}, + {"label":"K34 (B3,D5)", "x":4.25, "y":3}, + {"label":"K35 (B3,D4)", "x":5.25, "y":3}, + {"label":"K36 (B3,D6)", "x":6.25, "y":3}, + {"label":"K37 (B3,D7)", "x":7.25, "y":3}, + {"label":"K38 (B3,B4)", "x":8.25, "y":3}, + {"label":"K39 (B3,B5)", "x":9.25, "y":3}, + {"label":"K3A (B3,B6)", "x":10.25, "y":3}, + {"label":"K3B (B3,C6)", "x":11.25, "y":3}, + {"label":"K3D (B3,F7)", "x":12.25, "y":3, "w":2.75}, + {"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, + {"label":"K49 (E6,B5)", "x":10, "y":4, "w":1.25}, + {"label":"K4A (E6,B6)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4C (E6,C7)", "x":12.5, "y":4, "w":1.25}, + {"label":"K4D (E6,F7)", "x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/keyboards/bm60poker/keymaps/default/keymap.c b/keyboards/bm60poker/keymaps/default/keymap.c new file mode 100644 index 0000000000..efd74ad134 --- /dev/null +++ b/keyboards/bm60poker/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 ipetepete + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi( + 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL + ), + [1] = LAYOUT_60_ansi( + 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_DEL, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/bm60poker/keymaps/ipetepete/keymap.c b/keyboards/bm60poker/keymaps/ipetepete/keymap.c new file mode 100644 index 0000000000..e59660242e --- /dev/null +++ b/keyboards/bm60poker/keymaps/ipetepete/keymap.c @@ -0,0 +1,144 @@ +/* Copyright 2020 ipetepete + * + * 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 QMK_KEYBOARD_H + +enum layers { +_qwerty, +_gamer, +_colemak, +_fn, +_rgb, +_spcfn +}; + + +enum keycodes { +gamer = SAFE_RANGE, +qwerty, +colemak +}; + +#define KC_SPFN LT(_spcfn, KC_SPC) // press for space, hold for function layer (aka spacefn) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_qwerty] = LAYOUT_60_ansi( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + CTL_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, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPFN, KC_RALT, KC_RCTL, MO(_fn), MO(_rgb) + ), + // Gamer standard qwerty layout but with normal space for jumping etc + [_gamer] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_SPACE, _______, _______, _______, _______ + ), + [_colemak] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, _______, _______, + _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, _______, _______, _______, _______, + _______, _______, _______, KC_SPFN, _______, _______, _______, _______ + ), + [_fn] = LAYOUT_60_ansi( + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + _______, _______, KC_UP, _______, _______, _______, KC_CALC, _______, KC_INS, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, _______, + KC_MPLY, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, NK_TOGG, _______, _______, KC_END, KC_PGDN, KC_MNXT, + qwerty, colemak, gamer, _______, _______, _______, _______, _______ + ), + [_rgb] = LAYOUT_60_ansi( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_spcfn] = LAYOUT_60_ansi( + _______, SGUI(1), SGUI(2), SGUI(3), SGUI(4), SGUI(5), SGUI(6), SGUI(7), SGUI(8), SGUI(9), SGUI(0), _______, _______, KC_DEL, + _______, _______, _______, KC_PGUP, _______, KC_LBRC, KC_RBRC, _______, KC_UP, _______, _______, _______, _______, _______, + KC_CAPS, _______, _______, KC_PGDN, _______, KC_LCBR, KC_RCBR, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, + _______, _______, _______, _______, _______, KC_LPRN, KC_RPRN, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case qwerty: + if (record->event.pressed) { + layer_clear(); + layer_on(_qwerty); + set_single_persistent_default_layer(_qwerty); + } + return false; + break; + case colemak: + if (record->event.pressed) { + layer_clear(); + layer_on(_colemak); + } + return false; + break; + case gamer: + if (record->event.pressed) { + layer_clear(); + layer_on(_gamer); + } + return false; + break; + + } + return true; +} + +void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { + rgb_matrix_set_color( i, red, green, blue ); + } + } +} + + +void rgb_matrix_indicators_kb(void) +{ + if (!g_suspend_state && rgb_matrix_config.enable) { + switch (get_highest_layer(layer_state)) { + //case _qwerty: + // rgb_matrix_set_color(26, 0xFF, 0x00, 0x00); + // break; + case _colemak: + rgb_matrix_set_color(55, 0xFF, 0xFF, 0xFF); + break; + case _spcfn: + rgb_matrix_set_color(22, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(35, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(36, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(37, 0xFF, 0x00, 0x00); + break; + case _gamer: + rgb_matrix_set_color(16, 0xFF, 0x00, 0xFF); + rgb_matrix_set_color(29, 0xFF, 0x00, 0xFF); + rgb_matrix_set_color(30, 0xFF, 0x00, 0xFF); + rgb_matrix_set_color(31, 0xFF, 0x00, 0xFF); + break; + } + } +} diff --git a/keyboards/bm60poker/keymaps/ipetepete/readme.md b/keyboards/bm60poker/keymaps/ipetepete/readme.md new file mode 100644 index 0000000000..7d381ff125 --- /dev/null +++ b/keyboards/bm60poker/keymaps/ipetepete/readme.md @@ -0,0 +1 @@ +# Simple 60% for coding diff --git a/keyboards/bm60poker/keymaps/ipetepete/rules.mk b/keyboards/bm60poker/keymaps/ipetepete/rules.mk new file mode 100644 index 0000000000..3a025ba3a3 --- /dev/null +++ b/keyboards/bm60poker/keymaps/ipetepete/rules.mk @@ -0,0 +1 @@ +NKRO_ENABLE = yes # USB Nkey Rollover diff --git a/keyboards/bm60poker/readme.md b/keyboards/bm60poker/readme.md new file mode 100644 index 0000000000..62dde405c4 --- /dev/null +++ b/keyboards/bm60poker/readme.md @@ -0,0 +1,15 @@ +# BM60 Poker 60% Mechanical Keyboard RGB PCB + +A 60% hotswap inswitch RGB (north facing) keyboard from KP Republic. + +* Keyboard Maintainer: [ipetepete](https://github.com/ipetepete) +* Hardware Supported: BM60 POKER RGB +* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60-rgb-poker-60-gh60-hot-swap-custom-mechanical-keyboard-pcb-program-qmk-underglow-type-c) + +Make example for this keyboard (after setting up your build environment): + + make bm60poker:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +Video tutorials for customizing the layout: [QMK Tutorials](https://www.youtube.com/playlist?list=PLZlceRZZjRugJFL-vnenYnDrbMc6wu_e_) - By MechMerlin diff --git a/keyboards/bm60poker/rules.mk b/keyboards/bm60poker/rules.mk new file mode 100644 index 0000000000..3f4a00ead5 --- /dev/null +++ b/keyboards/bm60poker/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = WS2812 +LAYOUTS = 60_ansi diff --git a/keyboards/bm60rgb/bm60rgb.c b/keyboards/bm60rgb/bm60rgb.c index 3f301d1d47..cbd020faf9 100644 --- a/keyboards/bm60rgb/bm60rgb.c +++ b/keyboards/bm60rgb/bm60rgb.c @@ -43,31 +43,35 @@ void led_set_kb(uint8_t usb_led) { } led_config_t g_led_config = { { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, - { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 }, - { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 40, 41, 42 }, - { NO_LED, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56 }, - { 57, 58, 59, NO_LED, NO_LED, NO_LED, NO_LED, 60, NO_LED, NO_LED, 61, 62, 63, 64} + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, + { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 }, + { 28, NO_LED, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 }, + { NO_LED, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 }, + { 54, 55, 56, NO_LED, NO_LED, NO_LED, 57, NO_LED, NO_LED, 58, 59, 60, 61, 62 } }, { // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 202, 0 }, // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , - { 7, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 }, + { 7, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 }, // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter - { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, + { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - { 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 }, { 210, 48 }, + { 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 }, { 210, 48 }, // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 } + { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 }, + // UNDERGLOW + { 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 } }, { // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - 1, 1, 1, 4, 1, 1, 1, 1, 1 + 1, 1, 1, 4, 1, 1, 1, 1, 1, + // UNDERGLOW + 2, 2, 2, 2, 2, 2 } }; diff --git a/keyboards/bm60rgb/keymaps/jbradforddillon/keymap.c b/keyboards/bm60rgb/keymaps/jbradforddillon/keymap.c new file mode 100644 index 0000000000..c43365356e --- /dev/null +++ b/keyboards/bm60rgb/keymaps/jbradforddillon/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2020 jbradforddillon + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_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_GRV, 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, LT(1,KC_DEL), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(2), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + 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, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, KC_MUTE, + _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ) + +}; diff --git a/keyboards/bm60rgb/keymaps/jbradforddillon/readme.md b/keyboards/bm60rgb/keymaps/jbradforddillon/readme.md new file mode 100644 index 0000000000..aa2009e1e8 --- /dev/null +++ b/keyboards/bm60rgb/keymaps/jbradforddillon/readme.md @@ -0,0 +1,5 @@ +I set this up the same way I set up my dz60 boards. +- Apple layout, +- Capslock replaced with grave/tilde, +- RShift doubles as forward slash, and +- Delete doubles as a layer shift. diff --git a/keyboards/bm60rgb/rules.mk b/keyboards/bm60rgb/rules.mk index 72bfd539da..d888399cfc 100644 --- a/keyboards/bm60rgb/rules.mk +++ b/keyboards/bm60rgb/rules.mk @@ -31,7 +31,7 @@ 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 RGB_MATRIX_ENABLE = WS2812 -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes # partially generated by KBFirmware JSON to QMK Parser # https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/bm60rgb_iso/bm60rgb_iso.c b/keyboards/bm60rgb_iso/bm60rgb_iso.c index 3fa1bc8982..4e292bc549 100644 --- a/keyboards/bm60rgb_iso/bm60rgb_iso.c +++ b/keyboards/bm60rgb_iso/bm60rgb_iso.c @@ -32,7 +32,9 @@ led_config_t g_led_config = { { // LShift, <, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, { 3, 48 }, { 22, 48 }, { 33, 48 }, { 48, 48 }, { 63, 48 }, { 78, 48 }, { 93, 48 }, { 108, 48 }, { 123, 48 }, { 138, 48 }, { 153, 48 }, { 168, 48 }, { 194, 48 }, { 213, 48 }, // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 } + { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 }, + // UNDERGLOW + { 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 } }, { // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, @@ -43,6 +45,8 @@ led_config_t g_led_config = { { // LShift,<, Z, X, C, V, B, N, M, ,, ., Shift, Up, / 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - 1, 1, 1, 4, 1, 1, 1, 1, 1 + 1, 1, 1, 4, 1, 1, 1, 1, 1, + // UNDERGLOW + 2, 2, 2, 2, 2, 2 } }; #endif diff --git a/keyboards/bm60rgb_iso/bm60rgb_iso.h b/keyboards/bm60rgb_iso/bm60rgb_iso.h index f521610821..fce8925a7a 100644 --- a/keyboards/bm60rgb_iso/bm60rgb_iso.h +++ b/keyboards/bm60rgb_iso/bm60rgb_iso.h @@ -17,7 +17,7 @@ #include "quantum.h" -#define LAYOUT( \ +#define LAYOUT_60_iso_arrow( \ 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, \ K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K1D, \ @@ -30,3 +30,5 @@ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D }, \ } + +#define LAYOUT LAYOUT_60_iso_arrow diff --git a/keyboards/bm60rgb_iso/keymaps/default/keymap.c b/keyboards/bm60rgb_iso/keymaps/default/keymap.c index 1cf1804b28..9eca076df9 100644 --- a/keyboards/bm60rgb_iso/keymaps/default/keymap.c +++ b/keyboards/bm60rgb_iso/keymaps/default/keymap.c @@ -16,19 +16,18 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, - KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_SLSH, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + [0] = LAYOUT_60_iso_arrow( + 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_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_RSFT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ), - [1] = LAYOUT( - RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______ + [1] = LAYOUT_60_iso_arrow( + 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_DEL, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END ), - }; diff --git a/keyboards/boardsource/4x12/config.h b/keyboards/boardsource/4x12/config.h index e8f858586c..b1314ca7f2 100644 --- a/keyboards/boardsource/4x12/config.h +++ b/keyboards/boardsource/4x12/config.h @@ -3,7 +3,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xF7E0 +#define VENDOR_ID 0x4273 // "Bs" - Boardsource #define PRODUCT_ID 0x0412 #define DEVICE_VER 0x0000 #define MANUFACTURER Boardsource diff --git a/keyboards/boardsource/4x12/keymaps/via/keymap.c b/keyboards/boardsource/4x12/keymaps/via/keymap.c new file mode 100644 index 0000000000..d9a0c47a6b --- /dev/null +++ b/keyboards/boardsource/4x12/keymaps/via/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +enum layers { + _MAIN, + _RAISE, + _LOWER, +}; + +// Readability keycodes +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_MAIN] = LAYOUT_ortho_4x12( + 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 , + KC_PIPE, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + [_RAISE] = LAYOUT_ortho_4x12( + 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, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + [_LOWER] = LAYOUT_ortho_4x12( + 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 + ) + +}; diff --git a/keyboards/boardsource/4x12/keymaps/via/readme.md b/keyboards/boardsource/4x12/keymaps/via/readme.md new file mode 100644 index 0000000000..534633d45e --- /dev/null +++ b/keyboards/boardsource/4x12/keymaps/via/readme.md @@ -0,0 +1,5 @@ +# The via keymap for boardsource 4x12 ortholinear keybaoard + +This folder contains the [VIA](https://caniusevia.com/) configuration for the boardsource 4x12 ortholinear keybaoard + +Maintained by: [gwillad](https://github.com/gwillad) diff --git a/keyboards/candybar/righty/keymaps/via/rules.mk b/keyboards/boardsource/4x12/keymaps/via/rules.mk similarity index 100% rename from keyboards/candybar/righty/keymaps/via/rules.mk rename to keyboards/boardsource/4x12/keymaps/via/rules.mk diff --git a/keyboards/boardsource/5x12/config.h b/keyboards/boardsource/5x12/config.h index 1cd7101589..05a8ce2b06 100644 --- a/keyboards/boardsource/5x12/config.h +++ b/keyboards/boardsource/5x12/config.h @@ -3,8 +3,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xF7E0 -#define PRODUCT_ID 0x0412 +#define VENDOR_ID 0x4273 // "Bs" - Boardsource +#define PRODUCT_ID 0x0512 #define DEVICE_VER 0x0000 #define MANUFACTURER Boardsource #define PRODUCT 5x12 diff --git a/keyboards/boardsource/5x12/keymaps/via/keymap.c b/keyboards/boardsource/5x12/keymaps/via/keymap.c new file mode 100644 index 0000000000..8601fa377c --- /dev/null +++ b/keyboards/boardsource/5x12/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +#include QMK_KEYBOARD_H + +enum layers { + _MAIN, + _RAISE, + _LOWER, +}; + +// Readability keycodes +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_MAIN] = LAYOUT_ortho_5x12( + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_PIPE, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + [_RAISE] = LAYOUT_ortho_5x12( + 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_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_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + KC_ENT, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_MUTE, _______, KC_BSLS, + RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + [_LOWER] = LAYOUT_ortho_5x12( + 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_UP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + [3] = LAYOUT_ortho_5x12( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/boardsource/5x12/keymaps/via/readme.md b/keyboards/boardsource/5x12/keymaps/via/readme.md new file mode 100644 index 0000000000..d088e0a64c --- /dev/null +++ b/keyboards/boardsource/5x12/keymaps/via/readme.md @@ -0,0 +1,5 @@ +# The via keymap for boardsource 5x12 ortholinear keyboard + +This folder contains the [VIA](https://caniusevia.com/) configuration for the boardsource 5x12 ortholinear keyboard + +Maintained by: [gwillad](https://github.com/gwillad) diff --git a/keyboards/mechlovin/hannah60rgb/keymaps/via/rules.mk b/keyboards/boardsource/5x12/keymaps/via/rules.mk similarity index 100% rename from keyboards/mechlovin/hannah60rgb/keymaps/via/rules.mk rename to keyboards/boardsource/5x12/keymaps/via/rules.mk diff --git a/keyboards/boardwalk/keymaps/default_2x2u/keymap.c b/keyboards/boardwalk/keymaps/default_2x2u/keymap.c new file mode 100644 index 0000000000..f30d15c0f8 --- /dev/null +++ b/keyboards/boardwalk/keymaps/default_2x2u/keymap.c @@ -0,0 +1,90 @@ +/* + * 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 QMK_KEYBOARD_H + +// Layer shorthand +enum layer_names { + _BASE, + _FN, + _RAISE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | LGUI | FN | LALT | RAISE | SPACE | SPACE | LEFT | DOWN | UP | RIGHT | RCTRL | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + [_BASE] = LAYOUT_ortho_2x2u( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, MO(_FN), KC_LALT, MO(_RAISE), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RCTL + ), + + /* Function Layer + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | | MENU | | | | | | | | | | PRT SC | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | | | | | | | | | | | | | | RESET | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | MUTE | VOL DN | VOL UP | \ | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + [_FN] = LAYOUT_ortho_2x2u( + 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_APP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Raise Layer + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | | MENU | | | | | | | | | | PRT SC | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | | | | | | | | | | | | | | RESET | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | MUTE | VOL DN | VOL UP | \ | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT_ortho_2x2u( + 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_APP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/boardwalk/keymaps/default_2x2u/readme.md b/keyboards/boardwalk/keymaps/default_2x2u/readme.md new file mode 100644 index 0000000000..94a68e744f --- /dev/null +++ b/keyboards/boardwalk/keymaps/default_2x2u/readme.md @@ -0,0 +1 @@ +# The default_2x2u keymap for Boardwalk diff --git a/keyboards/boardwalk/keymaps/niclake/config.h b/keyboards/boardwalk/keymaps/niclake/config.h new file mode 100644 index 0000000000..9028fcf9fb --- /dev/null +++ b/keyboards/boardwalk/keymaps/niclake/config.h @@ -0,0 +1,18 @@ +/* + * 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 . + */ + +#pragma once + +#define TAPPING_TOGGLE 2 diff --git a/keyboards/boardwalk/keymaps/niclake/keymap.c b/keyboards/boardwalk/keymaps/niclake/keymap.c new file mode 100644 index 0000000000..2188660d01 --- /dev/null +++ b/keyboards/boardwalk/keymaps/niclake/keymap.c @@ -0,0 +1,150 @@ +/* + * 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 QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _QWERTY, + _FN, + _NUM, + _ADJ, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + FN, + NUM, + ADJ, + MACWIN +}; + +#define QWERTY DF(_QWERTY) +#define COLEMAK DF(_BASE) +#define FN MO(_FN) +#define NUM TT(_NUM) +#define ADJ MO(_ADJ) +#define MACWIN AG_TOGG +#define RGB_ON RGB_MODE_PLAIN + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer (Colemak) + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | F | P | G | [ | ] | J | L | U | Y | ; | \ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | _FN | A | R | S | T | D | HOME | PG UP | H | N | E | I | O | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | PG DN | K | M | , | . | / | RSHIFT | + * '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------' + * | LCTRL | LALT | LGUI | TG_NUM | ENTER | SPACE | LEFT | DOWN | UP | RIGHT | + * '-----------------------------------------------------------------------------------------------------------' + */ + [_BASE] = LAYOUT_ortho_hhkb( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + FN, KC_A, KC_R, KC_S, KC_T, KC_D, KC_HOME, KC_PGUP, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_LCTL, KC_LALT, KC_LGUI, NUM, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* QWERTY + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | \ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | _FN | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT | + * '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------' + * | LCTRL | LALT | LGUI | TG_NUM | ENTER | SPACE | LEFT | DOWN | UP | RIGHT | + * '-----------------------------------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT_ortho_hhkb( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + FN, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_LCTL, KC_LALT, KC_LGUI, NUM, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* FN + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | F1 | F2 | F3 | F4 | F5 | F11 | F12 | F6 | F7 | F8 | F9 | F10 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | Prev | Play | Next | | | | | | Pg Up | Up | Pg Dn | PRT SC | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | XXXXXX | | Mute | Vol Dn | Vol Up | | | | | Left | Down | Right | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | Home | | End | | CapsLk | + * '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------' + * | | | | _ADJ | | | | | | | + * '-----------------------------------------------------------------------------------------------------------' + */ + [_FN] = LAYOUT_ortho_hhkb( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, _______, + _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, _______, KC_END, _______, KC_CAPS, + _______, _______, _______, ADJ, _______, _______, _______, _______, _______, _______ + ), + + /* Num Pad (NUM) + * .-----------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | Num Lk | KP / | KP * | KP - | Scr Lk | Pause | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | | | | | | | | KP 7 | KP 8 | KP 9 | KP + | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | _ADJ | | | | | | | | KP 4 | KP 5 | KP 6 | KP + | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | KP 1 | KP 2 | KP 3 | KP Ent | | | + * '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------' + * | | | | XXXXXX | | KP 0 | KP 0 | KP . | KP Ent | | + * '-----------------------------------------------------------------------------------------------------------' + */ + [_NUM] = LAYOUT_ortho_hhkb( + _______, _______, _______, _______, _______, _______, _______, _______, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_SLCK, KC_PAUS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, _______, _______, + ADJ, _______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, _______, + _______, _______, _______, _______, _______, KC_KP_0, KC_KP_0, KC_PDOT, KC_PENT, _______ + ), + + /* ADJUST + RGB Control + * .-----------------------------------------------------------------------------------------------------------------------------. + * | | Static | Breath | Rainbw | Swirl | Gradnt | Test | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | On/Off | ModeUp | Hue Up | Sat Up | Val Up | | | | | | | RESET | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | XXXXXX | MACWIN | | Hue Dn | Sat Dn | Val Dn | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | Colemak| QWERTY | | | | | | | | | | | | + * '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------' + * | | | | XXXXXX | | | | | | | + * '-----------------------------------------------------------------------------------------------------------' + */ + [_ADJ] = LAYOUT_ortho_hhkb( + _______, RGB_ON, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_G, RGB_M_T, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, MACWIN, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, COLEMAK, QWERTY, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/boardwalk/keymaps/niclake/readme.md b/keyboards/boardwalk/keymaps/niclake/readme.md new file mode 100644 index 0000000000..fb772a9a25 --- /dev/null +++ b/keyboards/boardwalk/keymaps/niclake/readme.md @@ -0,0 +1,8 @@ +# Nic Lake's Boardwalk Layout + +This is Nic's Boardwalk layout, which is based off of the default Pok3r layout. + +- Colemak base layer w/ QWERTY support +- Bottom row set up for Mac usage (use `MACWIN`/`AG_TOGG` to toggle) +- Latching Numpad layer for data entry +- Uses [Space Cadet shift keys](https://docs.qmk.fm/#/feature_space_cadet?id=usage) \ No newline at end of file diff --git a/keyboards/boardwalk/keymaps/niclake/rules.mk b/keyboards/boardwalk/keymaps/niclake/rules.mk new file mode 100644 index 0000000000..000a2e1215 --- /dev/null +++ b/keyboards/boardwalk/keymaps/niclake/rules.mk @@ -0,0 +1,3 @@ +COMMAND_ENABLE = no +RGBLIGHT_ENABLE = yes +BOOTMAGIC_ENABLE = full diff --git a/keyboards/cannonkeys/ortho48/rules.mk b/keyboards/cannonkeys/ortho48/rules.mk index f2fc3e128e..5e18d91ca4 100644 --- a/keyboards/cannonkeys/ortho48/rules.mk +++ b/keyboards/cannonkeys/ortho48/rules.mk @@ -2,7 +2,6 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader -OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = STM32_F103_STM32DUINO diff --git a/keyboards/cannonkeys/ortho60/keymaps/via/keymap.c b/keyboards/cannonkeys/ortho60/keymaps/via/keymap.c index 8c9e553ecd..e982ec247c 100644 --- a/keyboards/cannonkeys/ortho60/keymaps/via/keymap.c +++ b/keyboards/cannonkeys/ortho60/keymaps/via/keymap.c @@ -1,29 +1,33 @@ +/* +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 . +*/ #include QMK_KEYBOARD_H -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -enum layer_names { - _BASE, - _LOWER, - _RAISE, - _FN -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_BASE] = LAYOUT_ortho_5x12( +[0] = LAYOUT_ortho_5x12( 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), -[_LOWER] = LAYOUT_ortho_5x12( +[1] = LAYOUT_ortho_5x12( 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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, @@ -31,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), -[_RAISE] = LAYOUT_ortho_5x12( +[2] = LAYOUT_ortho_5x12( 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, @@ -39,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RGB_TOG, RGB_MOD, BL_INC, BL_DEC, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), -[_FN] = LAYOUT_ortho_5x12( +[3] = LAYOUT_ortho_5x12( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/cannonkeys/ortho60/rules.mk b/keyboards/cannonkeys/ortho60/rules.mk index aaa14c2dbe..80b31a12f4 100644 --- a/keyboards/cannonkeys/ortho60/rules.mk +++ b/keyboards/cannonkeys/ortho60/rules.mk @@ -2,7 +2,6 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader -OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = STM32_F103_STM32DUINO diff --git a/keyboards/cannonkeys/ortho75/rules.mk b/keyboards/cannonkeys/ortho75/rules.mk index fe9cec84c1..ae196fd850 100644 --- a/keyboards/cannonkeys/ortho75/rules.mk +++ b/keyboards/cannonkeys/ortho75/rules.mk @@ -2,7 +2,6 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader -OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = STM32_F103_STM32DUINO diff --git a/keyboards/cannonkeys/practice60/rules.mk b/keyboards/cannonkeys/practice60/rules.mk index 3959137368..3713b6078d 100644 --- a/keyboards/cannonkeys/practice60/rules.mk +++ b/keyboards/cannonkeys/practice60/rules.mk @@ -2,7 +2,6 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader -OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = STM32_F103_STM32DUINO diff --git a/keyboards/cannonkeys/practice65/rules.mk b/keyboards/cannonkeys/practice65/rules.mk index d6d2b3fe7e..5fd4892dc5 100644 --- a/keyboards/cannonkeys/practice65/rules.mk +++ b/keyboards/cannonkeys/practice65/rules.mk @@ -2,7 +2,6 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader -OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = STM32_F103_STM32DUINO diff --git a/keyboards/centromere/keymaps/mattly/keymap.c b/keyboards/centromere/keymaps/mattly/keymap.c new file mode 100644 index 0000000000..9ec77a7cf9 --- /dev/null +++ b/keyboards/centromere/keymaps/mattly/keymap.c @@ -0,0 +1,55 @@ +#include QMK_KEYBOARD_H +#include "mattly.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // I apparently soldered in my switches on the wrong sides of the boards, so this is mirrored + + [_BASE_MAC] = LAYOUT_split_3x6_3( + KC_SCLN, KC_P, O_CTL, I_ALT, U_GUI, KC_Y, KC_T, R_GUI, E_ALT, W_CTL, KC_Q, KC_BSPC, + KC_QUOT, MINSCTL, L_ALT, K_GUI, J_SFT, KC_H, KC_G, F_SFT, D_GUI, S_ALT, A_CTL, KC_CAPS, + KC_ENT, KC_SLSH, KC_DOT, KC_COMM, KC_M, KC_N, KC_B, KC_V, KC_C, KC_X, KC_Z, NAVLOCK, + DEL_WRP, BSP_SYM, SPC_SFT, SPC_SFT, TAB_NUM, ESC_HYP + ), + + [_OVER_WIN] = LAYOUT_split_3x6_3( + _______, _______, O_GUI, _______, U_CTL, _______, _______, R_CTL, _______, W_GUI, _______, _______, + _______, MINSGUI, _______, K_CTL, _______, _______, _______, _______, D_CTL, _______, A_GUI, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + + [_SYMBOL] = LAYOUT_split_3x6_3( + _______, XXXXXXX, KC_ASTR, KC_PLUS, KC_RABK, KC_LABK, KC_RBRC, KC_LBRC, KC_TILD, KC_GRV, KC_AMPR, _______, + _______, KC_UNDS, KC_AT, KC_EXLM, KC_COLN, KC_SCLN, KC_RPRN, KC_LPRN, KC_EQL, KC_PERC, KC_DLR, _______, + _______, KC_QUES, KC_BSLS, KC_PIPE, KC_DQUO, KC_QUOT, KC_RCBR, KC_LCBR, KC_HASH, KC_CIRC, KC_HASH, XXXXXXX, + _______, _______, _______, _______, _______, _______ + ), + + [_NAVNUM] = LAYOUT_split_3x6_3( + KC_PLUS, KC_DOT, KC_P9, KC_P8, KC_P7, KC_DLR, KC_PGUP, M_FWORD, KC_UP, M_BWORD, M_NAVFW, M_NXWIN, + KC_MINS, KC_EQL, KC_P6, KC_P5, KC_P4, KC_PERC, KC_PGDN, KC_RGHT, KC_DOWN, KC_LEFT, M_NAVBK, M_PVWIN, + KC_ASTR, KC_COMM, KC_P3, KC_P2, KC_P1, KC_P0, M_NXTAB, KC_END, XXXXXXX, KC_HOME, M_PVTAB, _______, + KC_P0, _______, _______, _______, _______, _______ + ), + [_NAVNUM_WIN] = LAYOUT_split_3x6_3( + _______, _______, _______, _______, _______, _______, _______, W_FWORD, _______, W_BWORD, W_NAVFW, W_NXWIN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, W_NAVBK, W_PVWIN, + _______, _______, _______, _______, _______, _______, W_NXTAB, _______, _______, _______, W_PVTAB, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_FUNCT] = LAYOUT_split_3x6_3( + KC_F15, KC_F12, KC_F9, KC_F8, KC_F7, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, + KC_F14, KC_F11, KC_F6, KC_F5, KC_F4, KC_MUTE, XXXXXXX, TOG_WIN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_F13, KC_F10, KC_F3, KC_F2, KC_F1, KC_VOLD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______ + ), + [_FUNCT_WIN] = LAYOUT_split_3x6_3( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/centromere/keymaps/mattly/rules.mk b/keyboards/centromere/keymaps/mattly/rules.mk new file mode 100644 index 0000000000..0a5b666e85 --- /dev/null +++ b/keyboards/centromere/keymaps/mattly/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = no diff --git a/keyboards/chavdai40/readme.md b/keyboards/chavdai40/readme.md index 57af68d0ab..6925457a0e 100644 --- a/keyboards/chavdai40/readme.md +++ b/keyboards/chavdai40/readme.md @@ -5,15 +5,17 @@ Chavdai40 is very simple decoratable 40% keyboard * Keyboard Maintainer: [t-miyajima](https://github.com/dvorak55) -* Hardware Supported: Chavdai40 PCB rev1 -* Hardware Availability: not yet available. +* Hardware Supported: Chavdai40 PCB rev1,rev2 +* Hardware Availability: [yushakobo](https://yushakobo.jp/shop/consign_chavdai40/) Make example for this keyboard (after setting up your build environment): - make chavdai40:default + make chavdai40/rev1:default + make chavdai40/rev2:default Flashing example for this keyboard: - make chavdai40:default:flash + make chavdai40/rev1:default:flash + make chavdai40/rev2:default:flash See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/chavdai40/config.h b/keyboards/chavdai40/rev1/config.h similarity index 100% rename from keyboards/chavdai40/config.h rename to keyboards/chavdai40/rev1/config.h diff --git a/keyboards/chavdai40/chavdai40.c b/keyboards/chavdai40/rev1/rev1.c similarity index 96% rename from keyboards/chavdai40/chavdai40.c rename to keyboards/chavdai40/rev1/rev1.c index 6101732e2b..116c301c2b 100644 --- a/keyboards/chavdai40/chavdai40.c +++ b/keyboards/chavdai40/rev1/rev1.c @@ -13,4 +13,4 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "chavdai40.h" +#include "rev1.h" diff --git a/keyboards/chavdai40/chavdai40.h b/keyboards/chavdai40/rev1/rev1.h similarity index 100% rename from keyboards/chavdai40/chavdai40.h rename to keyboards/chavdai40/rev1/rev1.h index a10f695c78..c5899e24bc 100644 --- a/keyboards/chavdai40/chavdai40.h +++ b/keyboards/chavdai40/rev1/rev1.h @@ -17,10 +17,10 @@ #pragma once -#define XXX KC_NO - #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. #define LAYOUT_44key( \ diff --git a/keyboards/chavdai40/rules.mk b/keyboards/chavdai40/rev1/rules.mk similarity index 100% rename from keyboards/chavdai40/rules.mk rename to keyboards/chavdai40/rev1/rules.mk diff --git a/keyboards/chavdai40/rev2/config.h b/keyboards/chavdai40/rev2/config.h new file mode 100644 index 0000000000..a95f025f42 --- /dev/null +++ b/keyboards/chavdai40/rev2/config.h @@ -0,0 +1,74 @@ +/* Copyright 2020 t-miyajima + * + * 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 . + */ + + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x16D0 +#define PRODUCT_ID 0x0F95 +#define DEVICE_VER 0x0002 +#define MANUFACTURER t-miyajima +#define PRODUCT Chavdai40 rev2 + +/* usb power settings */ +#define USB_MAX_POWER_CONSUMPTION 100 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 13 + + +#define MATRIX_ROW_PINS { A0, A15, B5, B6 } +#define MATRIX_COL_PINS { B7, B4, B3, A8, B1, B0, A7, A6, A5, A4, A3, A2, A1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO diff --git a/keyboards/chavdai40/rev2/rev2.c b/keyboards/chavdai40/rev2/rev2.c new file mode 100644 index 0000000000..6bd488c299 --- /dev/null +++ b/keyboards/chavdai40/rev2/rev2.c @@ -0,0 +1,16 @@ +/* Copyright 2020 t-miyajima + * + * 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 "rev2.h" diff --git a/keyboards/chavdai40/rev2/rev2.h b/keyboards/chavdai40/rev2/rev2.h new file mode 100644 index 0000000000..c5899e24bc --- /dev/null +++ b/keyboards/chavdai40/rev2/rev2.h @@ -0,0 +1,49 @@ +/* Copyright 2020 t-miyajima + * + * 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 . + */ + + +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +// This a shortcut to help you visually see your layout. + +#define LAYOUT_44key( \ + k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, \ + k14 , k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25 , \ + k26 , k27, k28, k29, k30, k31, k32, k33, k34, k35, k36, k37, \ + k38, k39, k40, k41, k42, k43, k44 \ +) { \ + { k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13 }, \ + { k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, XXX }, \ + { k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, k36, k37, XXX }, \ + { k38, k39, XXX, k40, XXX, k41, XXX, XXX, k42, k43, k44, XXX, XXX } \ +} + +#define LAYOUT_42key( \ + k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, \ + k14 , k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25 , \ + k26 , k27, k28, k29, k30, k31, k32, k33, k34, k35, k36, k37, \ + k38, k39, k41, k43, k44 \ +) { \ + { k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13 }, \ + { k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, XXX }, \ + { k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, k36, k37, XXX }, \ + { k38, k39, XXX, XXX, XXX, k41, XXX, XXX, XXX, k43, k44, XXX, XXX } \ +} + diff --git a/keyboards/chavdai40/rev2/rules.mk b/keyboards/chavdai40/rev2/rules.mk new file mode 100644 index 0000000000..64c6f662af --- /dev/null +++ b/keyboards/chavdai40/rev2/rules.mk @@ -0,0 +1,18 @@ +# MCU name +MCU = STM32F042 + +# Build Options +# change yes to no to disable +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output \ No newline at end of file diff --git a/keyboards/claw44/ssd1306.c b/keyboards/claw44/ssd1306.c index e32fc091c2..7dea1cc176 100644 --- a/keyboards/claw44/ssd1306.c +++ b/keyboards/claw44/ssd1306.c @@ -4,15 +4,14 @@ #include "i2c.h" #include #include "print.h" -#ifdef ADAFRUIT_BLE_ENABLE -#include "adafruit_ble.h" -#endif #ifdef PROTOCOL_LUFA #include "lufa.h" #endif #include "sendchar.h" #include "timer.h" +struct CharacterMatrix display; + extern const unsigned char font[] PROGMEM; // Set this to 1 to help diagnose early startup problems diff --git a/keyboards/claw44/ssd1306.h b/keyboards/claw44/ssd1306.h index 0ca093093a..11a3cc67f4 100644 --- a/keyboards/claw44/ssd1306.h +++ b/keyboards/claw44/ssd1306.h @@ -65,7 +65,7 @@ struct CharacterMatrix { bool dirty; }; -struct CharacterMatrix display; +extern struct CharacterMatrix display; bool iota_gfx_init(bool rotate); void iota_gfx_task(void); diff --git a/keyboards/clawsome/fightpad/config.h b/keyboards/clawsome/fightpad/config.h new file mode 100644 index 0000000000..6f2e78b6bb --- /dev/null +++ b/keyboards/clawsome/fightpad/config.h @@ -0,0 +1,45 @@ +/* +Copyright 2020 AAClawson (AlisGraveNil) + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x7767 +#define PRODUCT_ID 0x481C +#define DEVICE_VER 0x0001 +#define MANUFACTURER AlisGraveNil +#define PRODUCT FightPad +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 7 + +/* + * 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 { B5, B6 } +#define MATRIX_COL_PINS { D7, E6, B4, B2, B3, B1, F7 } + +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/clawsome/fightpad/fightpad.c b/keyboards/clawsome/fightpad/fightpad.c new file mode 100644 index 0000000000..f0dae8eaf3 --- /dev/null +++ b/keyboards/clawsome/fightpad/fightpad.c @@ -0,0 +1,16 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * 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 "fightpad.h" \ No newline at end of file diff --git a/keyboards/clawsome/fightpad/fightpad.h b/keyboards/clawsome/fightpad/fightpad.h new file mode 100644 index 0000000000..ff92afd6bb --- /dev/null +++ b/keyboards/clawsome/fightpad/fightpad.h @@ -0,0 +1,26 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K01, K03, K04, K05, K06, \ + K10, K11, K12, K13, K14, K15, K16 \ +) { \ + { KC_NO, K01, KC_NO, K03, K04, K05, K06 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ +} diff --git a/keyboards/clawsome/fightpad/info.json b/keyboards/clawsome/fightpad/info.json new file mode 100644 index 0000000000..b5ad80effb --- /dev/null +++ b/keyboards/clawsome/fightpad/info.json @@ -0,0 +1,25 @@ +{ + "keyboard_name": "FightPad", + "url": "www.clawboards.xyz", + "maintainer": "AAClawson (AlisGraveNil)", + "width": 8, + "height": 2, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"K01 (B5,E6)", "x":1, "y":0}, + {"label":"K03 (B5,B2)", "x":4, "y":0}, + {"label":"K04 (B5,B3)", "x":5, "y":0}, + {"label":"K05 (B5,B1)", "x":6, "y":0}, + {"label":"K06 (B5,F7)", "x":7, "y":0}, + {"label":"K10 (B6,D7)", "x":0, "y":1}, + {"label":"K11 (B6,E6)", "x":1, "y":1}, + {"label":"K12 (B6,B4)", "x":2, "y":1}, + {"label":"K13 (B6,B2)", "x":4, "y":1}, + {"label":"K14 (B6,B3)", "x":5, "y":1}, + {"label":"K15 (B6,B1)", "x":6, "y":1}, + {"label":"K16 (B6,F7)", "x":7, "y":1} + ] + } + } +} diff --git a/keyboards/clawsome/fightpad/keymaps/default/keymap.c b/keyboards/clawsome/fightpad/keymaps/default/keymap.c new file mode 100644 index 0000000000..88db84c7d5 --- /dev/null +++ b/keyboards/clawsome/fightpad/keymaps/default/keymap.c @@ -0,0 +1,25 @@ +/* Copyright 2020 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_W, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_H, KC_J, KC_K, KC_L + ), + +}; + diff --git a/keyboards/clawsome/fightpad/readme.md b/keyboards/clawsome/fightpad/readme.md new file mode 100644 index 0000000000..eaca1535df --- /dev/null +++ b/keyboards/clawsome/fightpad/readme.md @@ -0,0 +1,13 @@ +# FightPad + +This is a 2x7 macropad. + +* Keyboard Maintainer: [AAClawson](https://github.com/AlisGraveNil) +* Hardware Supported: FightPad; Pro Micro or Elite-C +* Hardware Availability: [Clawsome Boards](https://www.clawboards.xyz/) + +Make example for this keyboard (after setting up your build environment): + + make clawsome/fightpad:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/clawsome/fightpad/rules.mk b/keyboards/clawsome/fightpad/rules.mk new file mode 100644 index 0000000000..fd76a52478 --- /dev/null +++ b/keyboards/clawsome/fightpad/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/clueboard/66/keymaps/badger/keymap.c b/keyboards/clueboard/66/keymaps/badger/keymap.c new file mode 100644 index 0000000000..74fec0b58e --- /dev/null +++ b/keyboards/clueboard/66/keymaps/badger/keymap.c @@ -0,0 +1,53 @@ +/* +Copyright 2020 Dan White + +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 "badger.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY_LINUX] = LAYOUT_66_ansi(\ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, \ + 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_END, \ + MOVE, 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_LALT, KC_LGUI, KC_SPC, ADJUST, KC_RGUI, KC_LALT, KC_LEFT, KC_DOWN, KC_RGHT), + + [_MOVE_LINUX] = LAYOUT_66_ansi(\ + KC_ESC, VD_1, VD_2, VD_3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, IJ_UP, IJ_DOWN, KC_DEL, KC_PGUP, \ + _______, IJ_STEP, IJ_INTO, IJ_OUT, IJ_RUN, IJ_STOP, IJ_OUT, KC_PGUP, KC_HOME, KC_END, KC_PGDN, IJ_BACK, IJ_FWD, KC_INS, KC_PGDN, \ + _______, WM_LH, WM_UH, WM_RH, WD_FRWD, MAC_POP, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CS_RIGHT, CS_DOWN, _______, \ + _______, MM_UH, MM_BH, MAC_CPY, MAC_PST, WD_BACK, KC_MNXT, IJ_REN, IJ_IMPL, IJ_DECL, IJ_USAG, _______, KC_BRIU, \ + _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_BRID, KC_END), + + [_QWERTY_MAC] = LAYOUT_66_ansi(\ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, \ + 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_END, \ + MOVE_MAC, 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_LALT, KC_LGUI, KC_SPC, ADJUST, KC_RGUI, KC_LALT, KC_LEFT, KC_DOWN, KC_RGHT), + + [_MOVE_MAC] = LAYOUT_66_ansi(\ + KC_ESC, M_VD1, M_VD2, M_VD3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, IJ_UP, IJ_DOWN, KC_DEL, KC_PGUP, \ + _______, IJ_STEP, IJ_INTO, IJ_OUT, IJ_RUN, IJ_STOP, IJ_OUT, KC_PGUP, KC_HOME, KC_END, KC_PGDN, IJ_BACK, IJ_FWD, KC_INS, KC_PGDN, \ + _______, MM_LH, MM_MAX, MM_RH, WD_FRWD, MAC_POP, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CM_RIGHT, CM_DOWN, _______, \ + _______, MM_UH, MM_BH, MAC_CPY, MAC_PST, WD_BACK, KC_MNXT, IJ_REN, IJ_IMPL, IJ_DECL, IJ_USAG, _______, KC_BRIU, \ + _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_BRID, KC_END), + + [_ADJUST] = LAYOUT_66_ansi(\ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_VOLU, \ + _______, NK_ON, NK_OFF, EEP_RST, RESET, KC_MSTP, KC_MPLY, KC_PGUP, KC_HOME, KC_END, KC_PGDN, AG_SWAP, AG_NORM, KC_INS, KC_VOLD, \ + _______, GE_SWAP, GE_NORM, DEBUG, AG_SWAP, AG_NORM, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, \ + _______, DF_1, DF_2, KC_CAPS, _______, KC_MPRV, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, _______, _______, KC_BRIU, \ + _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_BRID, KC_END) +}; + diff --git a/keyboards/clueboard/66/keymaps/via/rules.mk b/keyboards/clueboard/66/keymaps/via/rules.mk index e85bff468f..7a49719505 100644 --- a/keyboards/clueboard/66/keymaps/via/rules.mk +++ b/keyboards/clueboard/66/keymaps/via/rules.mk @@ -1,4 +1,4 @@ # rules.mk overrides to enable VIA VIA_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes \ No newline at end of file +LTO_ENABLE = yes diff --git a/keyboards/clueboard/card/rules.mk b/keyboards/clueboard/card/rules.mk index 37d1d866ef..a1b003f29c 100644 --- a/keyboards/clueboard/card/rules.mk +++ b/keyboards/clueboard/card/rules.mk @@ -26,4 +26,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = yes # Audio output on port C6 -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/comet46/ssd1306.c b/keyboards/comet46/ssd1306.c index 20c2738db7..4bd2d80bc4 100644 --- a/keyboards/comet46/ssd1306.c +++ b/keyboards/comet46/ssd1306.c @@ -4,15 +4,14 @@ #include "i2c.h" #include #include "print.h" -#ifdef ADAFRUIT_BLE_ENABLE -#include "adafruit_ble.h" -#endif #ifdef PROTOCOL_LUFA #include "lufa.h" #endif #include "sendchar.h" #include "timer.h" +struct CharacterMatrix display; + extern const unsigned char font[] PROGMEM; // Set this to 1 to help diagnose early startup problems diff --git a/keyboards/comet46/ssd1306.h b/keyboards/comet46/ssd1306.h index 0ca093093a..11a3cc67f4 100644 --- a/keyboards/comet46/ssd1306.h +++ b/keyboards/comet46/ssd1306.h @@ -65,7 +65,7 @@ struct CharacterMatrix { bool dirty; }; -struct CharacterMatrix display; +extern struct CharacterMatrix display; bool iota_gfx_init(bool rotate); void iota_gfx_task(void); diff --git a/keyboards/converter/adb_usb/adb_usb.h b/keyboards/converter/adb_usb/adb_usb.h index 8691adcc65..3db303b039 100644 --- a/keyboards/converter/adb_usb/adb_usb.h +++ b/keyboards/converter/adb_usb/adb_usb.h @@ -56,7 +56,7 @@ Ported to QMK by Peter Roe { K38, K39, K3A, K3B, K3C, K3D, K3E, KC_NO, }, \ { KC_NO, K41, KC_NO, K43, KC_NO, K45, KC_NO, K47 }, \ { KC_NO, KC_NO, KC_NO, K4B, K4C, KC_NO, K4E, KC_NO, }, \ - { KC_NO, KC_NO, K52, K53, K54, K55, K56, K57 }, \ + { KC_NO, K51, K52, K53, K54, K55, K56, K57 }, \ { K58, K59, KC_NO, K5B, K5C, KC_NO, KC_NO, KC_NO, }, \ { K60, K61, K62, K63, K64, K65, KC_NO, K67 }, \ { KC_NO, K69, KC_NO, K6B, KC_NO, K6D, KC_NO, K6F }, \ diff --git a/keyboards/converter/siemens_tastatur/rules.mk b/keyboards/converter/siemens_tastatur/rules.mk index bc5875962b..03e6b0f49d 100644 --- a/keyboards/converter/siemens_tastatur/rules.mk +++ b/keyboards/converter/siemens_tastatur/rules.mk @@ -2,7 +2,6 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader -OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = STM32_F103_STM32DUINO diff --git a/keyboards/converter/usb_usb/keymaps/chriskopher/combo.c b/keyboards/converter/usb_usb/keymaps/chriskopher/combo.c index c0a354eb55..68a3eda04c 100644 --- a/keyboards/converter/usb_usb/keymaps/chriskopher/combo.c +++ b/keyboards/converter/usb_usb/keymaps/chriskopher/combo.c @@ -33,7 +33,7 @@ combo_t key_combos[COMBO_COUNT] = { }; // Called after a combo event is triggered -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { switch (combo_index) { case SD_LAYER_COMBO: if (pressed) { diff --git a/keyboards/converter/usb_usb/keymaps/chriskopher/rules.mk b/keyboards/converter/usb_usb/keymaps/chriskopher/rules.mk index d80022853b..643e1d013b 100644 --- a/keyboards/converter/usb_usb/keymaps/chriskopher/rules.mk +++ b/keyboards/converter/usb_usb/keymaps/chriskopher/rules.mk @@ -19,6 +19,6 @@ EXTRAKEY_ENABLE = yes # Used for audio control and system control keys COMBO_ENABLE = yes # Used to allow chording of keys to trigger an action TAP_DANCE_ENABLE = yes # Used to allow multiple taps of a key to perform different actions -LINK_TIME_OPTIMIZATION_ENABLE = yes # Reduces the compiled firmware size +LTO_ENABLE = yes # Reduces the compiled firmware size SRC += combo.c tap_dance.c diff --git a/keyboards/converter/usb_usb/keymaps/narze/keymap.c b/keyboards/converter/usb_usb/keymaps/narze/keymap.c index b5938fa359..a84d613a2d 100644 --- a/keyboards/converter/usb_usb/keymaps/narze/keymap.c +++ b/keyboards/converter/usb_usb/keymaps/narze/keymap.c @@ -130,17 +130,17 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // 1. Hold for LGUI, tap for Underscore case GUI_UNDS: - perform_space_cadet(record, KC_LGUI, KC_LSFT, KC_MINS); + perform_space_cadet(record, keycode, KC_LGUI, KC_LSFT, KC_MINS); return false; // 2. Hold for LSHIFT, tap for Parens open case LSFT_LPRN: - perform_space_cadet(record, KC_LSFT, KC_LSFT, KC_9); + perform_space_cadet(record, keycode, KC_LSFT, KC_LSFT, KC_9); return false; // 3. Hold for RSHIFT, tap for Parens close case RSFT_RPRN: - perform_space_cadet(record, KC_RSFT, KC_RSFT, KC_0); + perform_space_cadet(record, keycode, KC_RSFT, KC_RSFT, KC_0); return false; default: @@ -153,7 +153,7 @@ void matrix_setup(void) { set_superduper_key_combos(); } -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { if (pressed) { switch(combo_index) { case CB_SUPERDUPER: diff --git a/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk b/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk index 00c11acccd..fcb7b9eab6 100644 --- a/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk +++ b/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk @@ -1,4 +1,3 @@ VIA_ENABLE = yes LTO_ENABLE = yes -EXTRAKEY_ENABLE = no MOUSEKEY_ENABLE = no diff --git a/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk b/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk index d0e4977b84..fcb7b9eab6 100644 --- a/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk +++ b/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk @@ -1,4 +1,3 @@ VIA_ENABLE = yes LTO_ENABLE = yes -EXTRAKEY_ENABLE = no -MOUSEKEY_ENABLE = no \ No newline at end of file +MOUSEKEY_ENABLE = no diff --git a/keyboards/coseyfannitutti/mysterium/info.json b/keyboards/coseyfannitutti/mysterium/info.json index 1b993a2edc..4c180b7d5f 100644 --- a/keyboards/coseyfannitutti/mysterium/info.json +++ b/keyboards/coseyfannitutti/mysterium/info.json @@ -8,8 +8,14 @@ "LAYOUT_tkl_ansi": { "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Backspace", "x":13, "y":1.25, "w":2}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"PgUp", "x":17.25, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Menu", "x":11.25, "y":5.25, "w":1.25}, {"label":"Fn", "x":12.5, "y":5.25, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.25, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2192", "x":17.25, "y":5.25}] }, - "LAYOUT_tkl_ansi_tsangan": { + "LAYOUT_tkl_ansi_7u": { "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Backspace", "x":13, "y":1.25, "w":2}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"PgUp", "x":17.25, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"PgDn", "x":17.25, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.5}, {"label":"Win", "x":1.5, "y":5.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.5}, {"x":4, "y":5.25, "w":7}, {"label":"Alt", "x":11, "y":5.25, "w":1.5}, {"label":"Fn", "x":12.5, "y":5.25}, {"label":"Ctrl", "x":13.5, "y":5.25, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.25}, {"label":"\u2193", "x":16.25, "y":5.25}, {"label":"\u2192", "x":17.25, "y":5.25}] + }, + "LAYOUT_tkl_iso": { + "layout": [{"x":0, "y":0.25}, {"x":2, "y":0.25}, {"x":3, "y":0.25}, {"x":4, "y":0.25}, {"x":5, "y":0.25}, {"x":6.5, "y":0.25}, {"x":7.5, "y":0.25}, {"x":8.5, "y":0.25}, {"x":9.5, "y":0.25}, {"x":11, "y":0.25}, {"x":12, "y":0.25}, {"x":13, "y":0.25}, {"x":14, "y":0.25}, {"x":15.25, "y":0.25}, {"x":16.25, "y":0.25}, {"x":17.25, "y":0.25}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.75, "y":2.5, "w":1.25, "h":2}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + }, + "LAYOUT_tkl_iso_7u": { + "layout": [{"x":0, "y":0.25}, {"x":2, "y":0.25}, {"x":3, "y":0.25}, {"x":4, "y":0.25}, {"x":5, "y":0.25}, {"x":6.5, "y":0.25}, {"x":7.5, "y":0.25}, {"x":8.5, "y":0.25}, {"x":9.5, "y":0.25}, {"x":11, "y":0.25}, {"x":12, "y":0.25}, {"x":13, "y":0.25}, {"x":14, "y":0.25}, {"x":15.25, "y":0.25}, {"x":16.25, "y":0.25}, {"x":17.25, "y":0.25}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.75, "y":2.5, "w":1.25, "h":2}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.5}, {"x":1.5, "y":5.5}, {"x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"x":11, "y":5.5, "w":1.5}, {"x":12.5, "y":5.5}, {"x":13.5, "y":5.5, "w":1.5}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] } } } \ No newline at end of file diff --git a/keyboards/coseyfannitutti/mysterium/keymaps/tsangan/keymap.c b/keyboards/coseyfannitutti/mysterium/keymaps/ansi_7u/keymap.c similarity index 97% rename from keyboards/coseyfannitutti/mysterium/keymaps/tsangan/keymap.c rename to keyboards/coseyfannitutti/mysterium/keymaps/ansi_7u/keymap.c index 883de97ffb..35487eee55 100644 --- a/keyboards/coseyfannitutti/mysterium/keymaps/tsangan/keymap.c +++ b/keyboards/coseyfannitutti/mysterium/keymaps/ansi_7u/keymap.c @@ -16,7 +16,7 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_tkl_ansi_tsangan( + [0] = LAYOUT_tkl_ansi_7u( KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_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, @@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), - [1] = LAYOUT_tkl_ansi_tsangan( + [1] = LAYOUT_tkl_ansi_7u( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/coseyfannitutti/mysterium/keymaps/iso/keymap.c b/keyboards/coseyfannitutti/mysterium/keymaps/iso/keymap.c new file mode 100644 index 0000000000..bad4dc2f42 --- /dev/null +++ b/keyboards/coseyfannitutti/mysterium/keymaps/iso/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_iso( + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [1] = LAYOUT_tkl_iso( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_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_VOLD, KC_TRNS) +}; diff --git a/keyboards/coseyfannitutti/mysterium/keymaps/via/keymap.c b/keyboards/coseyfannitutti/mysterium/keymaps/via/keymap.c index bd8de69a04..f7baaea8fc 100644 --- a/keyboards/coseyfannitutti/mysterium/keymaps/via/keymap.c +++ b/keyboards/coseyfannitutti/mysterium/keymaps/via/keymap.c @@ -16,35 +16,35 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_tkl_ansi( + [0] = LAYOUT_tkl_iso( KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_BSLS, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), - [1] = LAYOUT_tkl_ansi( + [1] = LAYOUT_tkl_iso( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_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, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS), - [2] = LAYOUT_tkl_ansi( + [2] = LAYOUT_tkl_iso( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - [3] = LAYOUT_tkl_ansi( + [3] = LAYOUT_tkl_iso( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) }; diff --git a/keyboards/coseyfannitutti/mysterium/keymaps/via/rules.mk b/keyboards/coseyfannitutti/mysterium/keymaps/via/rules.mk index d0e4977b84..36b7ba9cbc 100644 --- a/keyboards/coseyfannitutti/mysterium/keymaps/via/rules.mk +++ b/keyboards/coseyfannitutti/mysterium/keymaps/via/rules.mk @@ -1,4 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes -EXTRAKEY_ENABLE = no -MOUSEKEY_ENABLE = no \ No newline at end of file diff --git a/keyboards/coseyfannitutti/mysterium/mysterium.h b/keyboards/coseyfannitutti/mysterium/mysterium.h index c5deacd833..b705f04c0d 100644 --- a/keyboards/coseyfannitutti/mysterium/mysterium.h +++ b/keyboards/coseyfannitutti/mysterium/mysterium.h @@ -37,7 +37,7 @@ { K50, K51, K52, _x_, _x_, _x_, K56, _x_, _x_, K59, K5A, _x_, K5C, _x_, K5E, K5F, K5G, K5H } \ } -#define LAYOUT_tkl_ansi_tsangan( \ +#define LAYOUT_tkl_ansi_7u( \ K00, K02, K03, K04, K05, K06, K07, K08, K09, K0B, K0C, K0D, K0E, K0F, K0G, K0H, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, K1G, K1H, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, K2H, \ @@ -53,3 +53,37 @@ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, _x_, _x_, K4D, _x_, _x_, K4G, _x_ }, \ { K50, K51, K52, _x_, _x_, _x_, K56, _x_, _x_, _x_, K5A, _x_, K5C, _x_, K5E, K5F, K5G, K5H } \ } + +#define LAYOUT_tkl_iso( \ + K00, K02, K03, K04, K05, K06, K07, K08, K09, K0B, K0C, K0D, K0E, K0F, K0G, K0H, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, K1G, K1H, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2F, K2G, K2H, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K2D, \ + K40, K01, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4D, K4G, \ + K50, K51, K52, K56, K59, K5A, K5C, K5E, K5F, K5G, K5H \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, _x_, K0B, K0C, K0D, K0E, K0F, K0G, K0H }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, _x_, K1F, K1G, K1H }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, _x_, K2F, K2G, K2H }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, _x_, K3D, _x_, _x_, _x_, _x_ }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, _x_, _x_, K4D, _x_, _x_, K4G, _x_ }, \ + { K50, K51, K52, _x_, _x_, _x_, K56, _x_, _x_, K59, K5A, _x_, K5C, _x_, K5E, K5F, K5G, K5H } \ +} + +#define LAYOUT_tkl_iso_7u( \ + K00, K02, K03, K04, K05, K06, K07, K08, K09, K0B, K0C, K0D, K0E, K0F, K0G, K0H, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, K1G, K1H, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2F, K2G, K2H, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K2D, \ + K40, K01, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4D, K4G, \ + K50, K51, K52, K56, K5A, K5C, K5E, K5F, K5G, K5H \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, _x_, K0B, K0C, K0D, K0E, K0F, K0G, K0H }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, _x_, K1F, K1G, K1H }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, _x_, K2F, K2G, K2H }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, _x_, K3D, _x_, _x_, _x_, _x_ }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, _x_, _x_, K4D, _x_, _x_, K4G, _x_ }, \ + { K50, K51, K52, _x_, _x_, _x_, K56, _x_, _x_, _x_, K5A, _x_, K5C, _x_, K5E, K5F, K5G, K5H } \ +} diff --git a/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk b/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk index d0e4977b84..fcb7b9eab6 100644 --- a/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk +++ b/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk @@ -1,4 +1,3 @@ VIA_ENABLE = yes LTO_ENABLE = yes -EXTRAKEY_ENABLE = no -MOUSEKEY_ENABLE = no \ No newline at end of file +MOUSEKEY_ENABLE = no diff --git a/keyboards/crkbd/config.h b/keyboards/crkbd/config.h index fb1cdf3962..a2dd710714 100644 --- a/keyboards/crkbd/config.h +++ b/keyboards/crkbd/config.h @@ -1,6 +1,6 @@ /* -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> 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 @@ -19,9 +19,55 @@ along with this program. If not, see . #pragma once #include "config_common.h" -#include -#define USE_I2C +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4653 +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER foostan + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } + +// wiring of each half +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } +// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* 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 DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +//#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +//#define LOCKING_RESYNC_ENABLE + + +/* + * 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 USE_SERIAL #define NO_ACTION_MACRO diff --git a/keyboards/crkbd/crkbd.c b/keyboards/crkbd/crkbd.c index 7417ad6047..af0ef8a345 100644 --- a/keyboards/crkbd/crkbd.c +++ b/keyboards/crkbd/crkbd.c @@ -1,9 +1,19 @@ -#include "crkbd.h" +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { -#ifdef SSD1306OLED - return process_record_gfx(keycode,record) && process_record_user(keycode, record); -#else - return process_record_user(keycode, record); -#endif -} +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 "crkbd.h" diff --git a/keyboards/crkbd/crkbd.h b/keyboards/crkbd/crkbd.h index 73f2a3f074..4ba9397043 100644 --- a/keyboards/crkbd/crkbd.h +++ b/keyboards/crkbd/crkbd.h @@ -1,5 +1,24 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +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 . +*/ #pragma once #ifdef KEYBOARD_crkbd_rev1 - #include "rev1.h" +# include "rev1.h" #endif + +#include "quantum.h" diff --git a/keyboards/crkbd/keymaps/bcat/keymap.c b/keyboards/crkbd/keymaps/bcat/keymap.c index 6018835c24..7b8329fea9 100644 --- a/keyboards/crkbd/keymaps/bcat/keymap.c +++ b/keyboards/crkbd/keymaps/bcat/keymap.c @@ -13,9 +13,9 @@ enum layer { #define LY_RSE MO(LAYER_RAISE) #define KY_CSPC LCTL(KC_SPC) -#define KY_LOCK LGUI(KC_L) -#define KY_WINL LGUI(KC_LEFT) -#define KY_WINR LGUI(KC_RGHT) +#define KY_ZMIN LCTL(KC_EQL) +#define KY_ZMOUT LCTL(KC_MINS) +#define KY_ZMRST LCTL(KC_0) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default layer: http://www.keyboard-layout-editor.com/#/gists/08d9827d916662a9414f48805aa895a5 */ @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Lower layer: http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0 */ [LAYER_LOWER] = LAYOUT( MC_ALTT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - KY_CSPC, KY_WINL, KY_WINR, KY_LOCK, KC_WBAK, KC_WFWD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, + KY_CSPC, KY_ZMRST, KY_ZMOUT, KY_ZMIN, KC_WBAK, KC_WFWD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, _______, KC_APP, KC_PSCR, KC_SLCK, KC_PAUS, KC_LGUI, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV, _______, _______, _______, _______, _______, _______ ), diff --git a/keyboards/crkbd/keymaps/bcat/readme.md b/keyboards/crkbd/keymaps/bcat/readme.md index 743a6572d2..4ffb1562bf 100644 --- a/keyboards/crkbd/keymaps/bcat/readme.md +++ b/keyboards/crkbd/keymaps/bcat/readme.md @@ -50,7 +50,7 @@ elimination. ## Lower layer -![Lower layer layout](https://i.imgur.com/djIkwsa.png) +![Lower layer layout](https://i.imgur.com/vaIc9JY.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/c3fba5eaa2cd70fdfbdbc0f9e34d3bc0)) @@ -74,8 +74,8 @@ And yup, the shifted versions are above the unshifted versions. * Remaining keys from a TKL are placed out of the way on the bottom row of the left half. -* The home row on the left half contains handy shortcuts for window movement, -and browser navigation, and screen lock. +* The home row on the left half contains handy shortcuts for zooming and browser +navigation. * Lower+Esc is bound to Ctrl+Space because the Ctrl and Space keys are both on the left thumb, so this key combination (which I use for tmux prefix and editor @@ -109,7 +109,8 @@ keys (F1–F5) on the home row.) * Insert and Delete are on the rightmost column, because there didn't seem to be a better place to put them. -* Caps Lock is bound in the same position as on an HHKB, for lack of an obvious better location. +* Caps Lock is bound in the same position as on an HHKB, for lack of an obvious +better location. ## Adjust layer diff --git a/keyboards/crkbd/keymaps/default/keymap.c b/keyboards/crkbd/keymaps/default/keymap.c index 4dd0be8992..a3a9d95351 100644 --- a/keyboards/crkbd/keymaps/default/keymap.c +++ b/keyboards/crkbd/keymaps/default/keymap.c @@ -1,3 +1,21 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +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 QMK_KEYBOARD_H diff --git a/keyboards/crkbd/keymaps/ninjonas/rules.mk b/keyboards/crkbd/keymaps/ninjonas/rules.mk index 95cc3fed36..0c7fb3afcb 100644 --- a/keyboards/crkbd/keymaps/ninjonas/rules.mk +++ b/keyboards/crkbd/keymaps/ninjonas/rules.mk @@ -1,7 +1,7 @@ RGB_MATRIX_ENABLE = WS2812 MOUSEKEY_ENABLE = no OLED_DRIVER_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = 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 diff --git a/keyboards/crkbd/keymaps/oled_sample/config.h b/keyboards/crkbd/keymaps/oled_sample/config.h new file mode 100644 index 0000000000..41568c5916 --- /dev/null +++ b/keyboards/crkbd/keymaps/oled_sample/config.h @@ -0,0 +1,48 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +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 . +*/ + + + +#pragma once + +//#define USE_MATRIX_I2C +#ifdef KEYBOARD_crkbd_rev1_common +# undef USE_I2C +# define USE_SERIAL +#endif + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 27 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" diff --git a/keyboards/crkbd/keymaps/oled_sample/keymap.c b/keyboards/crkbd/keymaps/oled_sample/keymap.c new file mode 100644 index 0000000000..f2d5770b63 --- /dev/null +++ b/keyboards/crkbd/keymaps/oled_sample/keymap.c @@ -0,0 +1,208 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +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 QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum crkbd_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) +#define CTLTB CTL_T(KC_TAB) +#define GUIEI GUI_T(KC_LANG2) +#define ALTKN ALT_T(KC_LANG1) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + CTLTB, 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_RSFT, + GUIEI, LOWER, KC_SPC, KC_ENT, RAISE, ALTKN + ), + + [_LOWER] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + CTLTB, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, + KC_LSFT, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, XXXXXXX, + GUIEI, LOWER, KC_SPC, KC_ENT, RAISE, ALTKN + ), + + [_RAISE] = LAYOUT( + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + CTLTB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD, + GUIEI, LOWER, KC_SPC, KC_ENT, RAISE, ALTKN + + ), + + [_ADJUST] = LAYOUT( + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + GUIEI, LOWER, KC_SPC, KC_ENT, RAISE, ALTKN + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); + return state; +} + + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) { + return OLED_ROTATION_270; + } else { + return rotation; + } +} + +void render_crkbd_logo(void) { + static const char PROGMEM crkbd_logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, + 0}; + oled_write_P(crkbd_logo, false); +} + +# define KEYLOG_LEN 5 +char keylog_str[KEYLOG_LEN] = {}; +uint8_t keylogs_str_idx = 0; +uint16_t log_timer = 0; + +const char code_to_name[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', + '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '}; + +void add_keylog(uint16_t keycode) { + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { + keycode = keycode & 0xFF; + } + + for (uint8_t i = KEYLOG_LEN - 1; i > 0; i--) { + keylog_str[i] = keylog_str[i - 1]; + } + if (keycode < 60) { + keylog_str[0] = code_to_name[keycode]; + } + keylog_str[KEYLOG_LEN - 1] = 0; + + log_timer = timer_read(); +} + +void update_log(void) { + if (timer_elapsed(log_timer) > 750) { + add_keylog(0); + } +} + +void render_keylogger_status(void) { + oled_write_P(PSTR("KLogr"), false); + oled_write(keylog_str, false); +} + +void render_default_layer_state(void) { + oled_write_P(PSTR("Lyout"), false); + switch (get_highest_layer(default_layer_state)) { + case _QWERTY: + oled_write_P(PSTR(" QRTY"), false); + break; + } +} + +void render_layer_state(void) { + oled_write_P(PSTR("LAYER"), false); + oled_write_P(PSTR("Lower"), layer_state_is(_LOWER)); + oled_write_P(PSTR("Raise"), layer_state_is(_RAISE)); +} + +void render_keylock_status(uint8_t led_usb_state) { + oled_write_P(PSTR("Lock:"), false); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("N"), led_usb_state & (1 << USB_LED_NUM_LOCK)); + oled_write_P(PSTR("C"), led_usb_state & (1 << USB_LED_CAPS_LOCK)); + oled_write_ln_P(PSTR("S"), led_usb_state & (1 << USB_LED_SCROLL_LOCK)); +} + +void render_mod_status(uint8_t modifiers) { + oled_write_P(PSTR("Mods:"), false); + oled_write_P(PSTR(" "), false); + oled_write_P(PSTR("S"), (modifiers & MOD_MASK_SHIFT)); + oled_write_P(PSTR("C"), (modifiers & MOD_MASK_CTRL)); + oled_write_P(PSTR("A"), (modifiers & MOD_MASK_ALT)); + oled_write_P(PSTR("G"), (modifiers & MOD_MASK_GUI)); +} + +void render_bootmagic_status(void) { + /* Show Ctrl-Gui Swap options */ + static const char PROGMEM logo[][2][3] = { + {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}, + {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, + }; + oled_write_P(PSTR("BTMGK"), false); + oled_write_P(PSTR(" "), false); + oled_write_P(logo[0][0], !keymap_config.swap_lctl_lgui); + oled_write_P(logo[1][0], keymap_config.swap_lctl_lgui); + oled_write_P(PSTR(" "), false); + oled_write_P(logo[0][1], !keymap_config.swap_lctl_lgui); + oled_write_P(logo[1][1], keymap_config.swap_lctl_lgui); + oled_write_P(PSTR(" NKRO"), keymap_config.nkro); +} + +void render_status_main(void) { + /* Show Keyboard Layout */ + render_default_layer_state(); + render_keylock_status(host_keyboard_leds()); + render_mod_status(get_mods()); + render_bootmagic_status(); + + render_keylogger_status(); +} + +void oled_task_user(void) { + update_log(); + if (is_master) { + render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_crkbd_logo(); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + add_keylog(keycode); + } + return true; +} +#endif diff --git a/keyboards/crkbd/keymaps/oled_sample/rules.mk b/keyboards/crkbd/keymaps/oled_sample/rules.mk new file mode 100644 index 0000000000..fb480bba88 --- /dev/null +++ b/keyboards/crkbd/keymaps/oled_sample/rules.mk @@ -0,0 +1,7 @@ + +# 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 +# +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +OLED_DRIVER_ENABLE = yes diff --git a/keyboards/crkbd/keymaps/rpbaptist/rules.mk b/keyboards/crkbd/keymaps/rpbaptist/rules.mk index d9e8b701e2..dedd5753e5 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/rules.mk +++ b/keyboards/crkbd/keymaps/rpbaptist/rules.mk @@ -1,5 +1,5 @@ #This enables Link Time Optimization.This can save a good chunk of space(several KB for me), but the macro and function... functions cause it to error out. -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes #Build Options #change to "no" to disable the options, or define them in the Makefile in diff --git a/keyboards/crkbd/rev1/common/common.c b/keyboards/crkbd/rev1/common/common.c new file mode 100644 index 0000000000..5ea7347de8 --- /dev/null +++ b/keyboards/crkbd/rev1/common/common.c @@ -0,0 +1,21 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +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 "common.h" + +uint8_t is_master; diff --git a/keyboards/crkbd/rev1/common/common.h b/keyboards/crkbd/rev1/common/common.h new file mode 100644 index 0000000000..af1795f480 --- /dev/null +++ b/keyboards/crkbd/rev1/common/common.h @@ -0,0 +1,24 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +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 . +*/ + +#pragma once + +#include "rev1.h" + +#define has_usb() is_keyboard_master() +extern uint8_t is_master; diff --git a/keyboards/crkbd/rev1/common/config.h b/keyboards/crkbd/rev1/common/config.h new file mode 100644 index 0000000000..12f5f75766 --- /dev/null +++ b/keyboards/crkbd/rev1/common/config.h @@ -0,0 +1,30 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +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 . +*/ + +#pragma once + +#define PRODUCT Corne Keyboard Rev.1 (Split Common) + +#define USE_SERIAL +#define SOFT_SERIAL_PIN D2 + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_SPLIT { 27, 27 } +#endif + +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/crkbd/rev1/common/keymaps/via/config.h b/keyboards/crkbd/rev1/common/keymaps/via/config.h new file mode 100644 index 0000000000..aa2d45e56d --- /dev/null +++ b/keyboards/crkbd/rev1/common/keymaps/via/config.h @@ -0,0 +1,46 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +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 . +*/ + + + +#pragma once + +//#define USE_MATRIX_I2C +#ifdef KEYBOARD_crkbd_rev1_legacy +# undef USE_I2C +# define USE_SERIAL +#endif + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 27 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" diff --git a/keyboards/crkbd/rev1/common/keymaps/via/keymap.c b/keyboards/crkbd/rev1/common/keymaps/via/keymap.c new file mode 100644 index 0000000000..a3b2e52ce5 --- /dev/null +++ b/keyboards/crkbd/rev1/common/keymaps/via/keymap.c @@ -0,0 +1,193 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_split_3x6_3( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + 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_LCTL, 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_ESC, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, FN_MO13, KC_SPC, KC_ENT, FN_MO23, KC_RALT + //`--------------------------' `--------------------------' + + ), + + [1] = LAYOUT_split_3x6_3( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT\ + //`--------------------------' `--------------------------' + ), + + [2] = LAYOUT_split_3x6_3( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT + //`--------------------------' `--------------------------' + ), + + [3] = LAYOUT_split_3x6_3( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT\ + //`--------------------------' `--------------------------' + ) +}; + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_master) { + return OLED_ROTATION_180; // flips the display 180 degrees if offhand + } + return rotation; +} + +#define L_BASE 0 +#define L_LOWER 2 +#define L_RAISE 4 +#define L_ADJUST 8 + +void oled_render_layer_state(void) { + oled_write_P("Layer: ", false); + switch (layer_state) { + case L_BASE: + oled_write_ln_P("Default", false); + break; + case L_LOWER: + oled_write_ln_P("Lower", false); + break; + case L_RAISE: + oled_write_ln_P("Raise", false); + break; + case L_ADJUST: + case L_ADJUST|L_LOWER: + case L_ADJUST|L_RAISE: + case L_ADJUST|L_LOWER|L_RAISE: + oled_write_ln_P("Adjust", false); + break; + } +} + + +char keylog_str[24] = {}; +char keylogs_str[21] = {}; +int keylogs_str_idx = 0; + +const char code_to_name[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', + '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '}; + +void set_keylog(uint16_t keycode, keyrecord_t *record) { + char name = ' '; + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || + (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; } + if (keycode < 60) { + name = code_to_name[keycode]; + } + + // update keylog + snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", + record->event.key.row, record->event.key.col, + keycode, name); + + // update keylogs + if (keylogs_str_idx == sizeof(keylogs_str) - 1) { + keylogs_str_idx = 0; + for (int i = 0; i < sizeof(keylogs_str) - 1; i++) { + keylogs_str[i] = ' '; + } + } + + keylogs_str[keylogs_str_idx] = name; + keylogs_str_idx++; +} + +void oled_render_keylog(void) { + oled_write(keylog_str, false); +} +void oled_render_keylogs(void) { + oled_write(keylogs_str, false); +} + +void render_bootmagic_status(bool status) { + /* Show Ctrl-Gui Swap options */ + static const char PROGMEM logo[][2][3] = { + {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}, + {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, + }; + if (status) { + oled_write_ln_P(logo[0][0], false); + oled_write_ln_P(logo[0][1], false); + } else { + oled_write_ln_P(logo[1][0], false); + oled_write_ln_P(logo[1][1], false); + } +} + +void oled_render_logo(void) { + static const char PROGMEM crkbd_logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, + 0}; + oled_write_P(crkbd_logo, false); +} + +void oled_task_user(void) { + if (is_master) { + oled_render_layer_state(); + oled_render_keylog(); + // oled_render_keylogs(); + // oled_renger_bootmagic_icon(keymap_config.swap_lalt_lgui); + } else { + oled_render_logo(); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + set_keylog(keycode, record); + // set_timelog(); + } + return true; +} +#endif // OLED_DRIVER_ENABLE diff --git a/keyboards/crkbd/rev1/common/keymaps/via/rules.mk b/keyboards/crkbd/rev1/common/keymaps/via/rules.mk new file mode 100644 index 0000000000..93b2afed44 --- /dev/null +++ b/keyboards/crkbd/rev1/common/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +MOUSEKEY_ENABLE = no # Mouse keys +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +VIA_ENABLE = yes # Enable VIA +OLED_DRIVER_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/crkbd/rev1/common/rules.mk b/keyboards/crkbd/rev1/common/rules.mk new file mode 100644 index 0000000000..0b8106e3f2 --- /dev/null +++ b/keyboards/crkbd/rev1/common/rules.mk @@ -0,0 +1,2 @@ +SPLIT_KEYBOARD = yes +SPLIT_TRANSPORT = mirror # for when Split Mirroring drops, it will maintain mirroring functionality diff --git a/keyboards/crkbd/rev1/common/ssd1306.c b/keyboards/crkbd/rev1/common/ssd1306.c new file mode 100644 index 0000000000..4a889da673 --- /dev/null +++ b/keyboards/crkbd/rev1/common/ssd1306.c @@ -0,0 +1,360 @@ +#ifdef SSD1306OLED + +#include "ssd1306.h" +#include "i2c_master.h" +#include +#include "print.h" +#ifdef ADAFRUIT_BLE_ENABLE +#include "adafruit_ble.h" +#endif +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#endif +#include "sendchar.h" +#include "timer.h" + +struct CharacterMatrix display; + +extern const unsigned char font[] PROGMEM; + +#ifndef OLED_BLANK_CHAR +#define OLED_BLANK_CHAR ' ' +#endif + +#ifndef OLED_BITS_FILTER +#define OLED_BITS_FILTER +#endif + +// 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 + +//static uint16_t last_battery_update; +//static uint32_t vbat; +//#define BatteryUpdateInterval 10000 /* milliseconds */ + +// 'last_flush' is declared as uint16_t, +// so this must be less than 65535 +#ifndef ScreenOffInterval +#define ScreenOffInterval 60000 /* milliseconds */ +#endif + +#if DEBUG_TO_SCREEN +static uint8_t displaying; +#endif +static uint16_t last_flush; + +static bool force_dirty = true; + +// Write command sequence. +// Returns true on success. +static inline bool _send_cmd1(uint8_t cmd) { + bool res = false; + + if (i2c_start(SSD1306_ADDRESS, 100)) { + xprintf("failed to start write to %d\n", SSD1306_ADDRESS); + goto done; + } + + if (i2c_write(0x0 /* command byte follows */, 100)) { + print("failed to write control byte\n"); + + goto done; + } + + if (i2c_write(cmd, 100)) { + xprintf("failed to write command %d\n", cmd); + goto done; + } + res = true; +done: + i2c_stop(); + return res; +} + +#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;} +#define send_cmds(c) if (!_send_cmds(c,sizeof(c))) {goto done;} +#define cmd1(X) X +#define cmd2(X,Y) X,Y +#define cmd3(X,Y,Z) X,Y,Z + +static bool _send_cmds(const uint8_t* p,uint8_t sz) { + for(uint8_t i=sz;i;i--) { + send_cmd1( pgm_read_byte(p++) ); + } + return true; +done: + return false; +} + +#define SEND_CMDS(...) {static const uint8_t _cmds[] PROGMEM = { __VA_ARGS__,0 };send_cmds(_cmds);} + +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_CMDS( + cmd3(PageAddr, 0, (DisplayHeight / 8) - 1), + cmd3(ColumnAddr, 0, DisplayWidth - 1) + ); + + if (i2c_start(SSD1306_ADDRESS, 100)) { + goto done; + } + if (i2c_write(0x40, 100)) { + // Data mode + goto done; + } + for (uint8_t row = MatrixRows;row; row--) { + for (uint8_t col = DisplayWidth; col; col--) { + i2c_write(0, 100); + } + } + + display.dirty = false; + +done: + i2c_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(bool rotate) { + bool success = false; + + i2c_init(); + SEND_CMDS( + cmd1(DisplayOff), + cmd2(SetDisplayClockDiv, 0x80), + cmd2(SetMultiPlex, DisplayHeight - 1), + cmd2(SetDisplayOffset, 0), + cmd1(SetStartLine | 0x0), + cmd2(SetChargePump, 0x14 /* Enable */), + cmd2(SetMemoryMode, 0 /* horizontal addressing */) + ); + + if(rotate){ + // the following Flip the display orientation 180 degrees + SEND_CMDS( + cmd1(SegRemap), + cmd1(ComScanInc) + ); + }else{ + // Flips the display orientation 0 degrees + SEND_CMDS( + cmd1(SegRemap | 0x1), + cmd1(ComScanDec) + ); + } + + SEND_CMDS( +#ifdef SSD1306_128X64 + cmd2(SetComPins, 0x12), +#else + cmd2(SetComPins, 0x2), +#endif + cmd2(SetContrast, 0x8f), + cmd2(SetPreCharge, 0xf1), + cmd2(SetVComDetect, 0x40), + cmd1(DisplayAllOnResume), + cmd1(NormalDisplay), + cmd1(DeActivateScroll), + cmd1(DisplayOn), + + 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; +} + +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, OLED_BLANK_CHAR, MatrixCols); + } +} + +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, OLED_BLANK_CHAR); + } + return; + } + + matrix_write_char_inner(matrix, c); +} + +void iota_gfx_write_char(uint8_t c) { + matrix_write_char(&display, c); +} + +void matrix_write(struct CharacterMatrix *matrix, const char *data) { + while (*data) { + matrix_write_char(matrix, *data); + ++data; + } +} + +void matrix_write_ln(struct CharacterMatrix *matrix, const char *data) { + matrix_write(matrix, data); + matrix_write(matrix, "\n"); +} + +void iota_gfx_write(const char *data) { + matrix_write(&display, data); +} + +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); +} + +void matrix_clear(struct CharacterMatrix *matrix) { + memset(matrix->display, OLED_BLANK_CHAR, sizeof(matrix->display)); + matrix->cursor = &matrix->display[0][0]; + matrix->dirty = true; +} + +void iota_gfx_clear_screen(void) { + matrix_clear(&display); +} + +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_CMDS( + cmd3(PageAddr, 0, MatrixRows - 1), + cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1) + ); + + if (i2c_write(SSD1306_ADDRESS, 100)) { + goto done; + } + if (i2c_write(0x40, 100)) { + // 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); + + for (uint8_t glyphCol = 0; glyphCol < FontWidth; ++glyphCol) { + uint8_t colBits = pgm_read_byte(glyph + glyphCol); + i2c_write(colBits OLED_BITS_FILTER, 100); + } + + // 1 column of space between chars (it's not included in the glyph) + //i2c_master_write(0); + } + } + + matrix->dirty = false; + +done: + i2c_stop(); +#if DEBUG_TO_SCREEN + --displaying; +#endif +} + +void iota_gfx_flush(void) { + matrix_render(&display); +} + +__attribute__ ((weak)) +void iota_gfx_task_user(void) { +} + +void iota_gfx_task(void) { + iota_gfx_task_user(); + + if (display.dirty|| force_dirty) { + iota_gfx_flush(); + force_dirty = false; + } + + if (ScreenOffInterval !=0 && timer_elapsed(last_flush) > ScreenOffInterval) { + iota_gfx_off(); + } +} + +bool process_record_gfx(uint16_t keycode, keyrecord_t *record) { + force_dirty = true; + return true; +} + +#endif diff --git a/keyboards/crkbd/rev1/config.h b/keyboards/crkbd/rev1/config.h index f7f278f2c0..60bd379724 100644 --- a/keyboards/crkbd/rev1/config.h +++ b/keyboards/crkbd/rev1/config.h @@ -1,6 +1,6 @@ /* -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> 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 @@ -18,64 +18,15 @@ along with this program. If not, see . #pragma once -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x3060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER foostan -#define PRODUCT Corne Keyboard (crkbd) -#define DESCRIPTION A split keyboard with 3x6 vertically staggered keys and 3 thumb keys - -/* key matrix size */ -// Rows are doubled-up -#define MATRIX_ROWS 8 -#define MATRIX_COLS 6 -#define MATRIX_ROW_PINS { D4, C6, D7, E6 } - -// wiring of each half -#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } -// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order - -/* 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 DEBOUNCE 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -//#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -//#define LOCKING_RESYNC_ENABLE - /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #ifdef RGBLIGHT_ENABLE -#define RGBLED_NUM 12 // Number of LEDs +# define RGBLED_NUM 12 // Number of LEDs +# define RGBLIGHT_SPLIT #endif #ifdef RGB_MATRIX_ENABLE -#define RGBLED_NUM 54 // Number of LEDs -#define DRIVER_LED_TOTAL RGBLED_NUM +# define RGBLED_NUM 54 // Number of LEDs +# define DRIVER_LED_TOTAL RGBLED_NUM #endif - -/* - * 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 diff --git a/keyboards/crkbd/rev1/legacy/config.h b/keyboards/crkbd/rev1/legacy/config.h new file mode 100644 index 0000000000..9e3676414c --- /dev/null +++ b/keyboards/crkbd/rev1/legacy/config.h @@ -0,0 +1,23 @@ +/* +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 . +*/ + +#pragma once + +#include + +#define PRODUCT Corne Keyboard Rev.1 (Legacy Split) diff --git a/keyboards/crkbd/i2c.c b/keyboards/crkbd/rev1/legacy/i2c.c similarity index 98% rename from keyboards/crkbd/i2c.c rename to keyboards/crkbd/rev1/legacy/i2c.c index 4bee5c6398..7b45c3f866 100644 --- a/keyboards/crkbd/i2c.c +++ b/keyboards/crkbd/rev1/legacy/i2c.c @@ -6,7 +6,7 @@ #include #include "i2c.h" -#ifdef USE_I2C +#if defined(USE_I2C) || defined(USE_MATRIX_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 diff --git a/keyboards/crkbd/i2c.h b/keyboards/crkbd/rev1/legacy/i2c.h similarity index 100% rename from keyboards/crkbd/i2c.h rename to keyboards/crkbd/rev1/legacy/i2c.h diff --git a/keyboards/crkbd/rev1/legacy/legacy.c b/keyboards/crkbd/rev1/legacy/legacy.c new file mode 100644 index 0000000000..595ff1eaf7 --- /dev/null +++ b/keyboards/crkbd/rev1/legacy/legacy.c @@ -0,0 +1,19 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +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 "legacy.h" diff --git a/keyboards/crkbd/rev1/legacy/legacy.h b/keyboards/crkbd/rev1/legacy/legacy.h new file mode 100644 index 0000000000..6c6308e592 --- /dev/null +++ b/keyboards/crkbd/rev1/legacy/legacy.h @@ -0,0 +1,21 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +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 . +*/ + +#pragma once + +#include "rev1.h" diff --git a/keyboards/crkbd/rev1/matrix.c b/keyboards/crkbd/rev1/legacy/matrix.c similarity index 96% rename from keyboards/crkbd/rev1/matrix.c rename to keyboards/crkbd/rev1/legacy/matrix.c index 46dead369f..8eb028137b 100644 --- a/keyboards/crkbd/rev1/matrix.c +++ b/keyboards/crkbd/rev1/legacy/matrix.c @@ -155,6 +155,7 @@ void matrix_init(void) uint8_t _matrix_scan(void) { + bool changed = false; // Right hand is stored after the left in the matirx so, we need to offset it int offset = isLeftHand ? 0 : (ROWS_PER_HAND); @@ -163,6 +164,7 @@ uint8_t _matrix_scan(void) _delay_us(30); // without this wait read unstable value. matrix_row_t cols = read_cols(); if (matrix_debouncing[i+offset] != cols) { + changed = true; matrix_debouncing[i+offset] = cols; debouncing = DEBOUNCE; } @@ -179,7 +181,7 @@ uint8_t _matrix_scan(void) } } - return 1; + return changed; } #ifdef USE_MATRIX_I2C @@ -237,16 +239,17 @@ int serial_transaction(int master_changed) { uint8_t matrix_scan(void) { + bool changed = false; if (is_master) { - matrix_master_scan(); + changed |= matrix_master_scan(); }else{ - matrix_slave_scan(); + changed |= matrix_slave_scan(); int offset = (isLeftHand) ? ROWS_PER_HAND : 0; memcpy(&matrix[offset], (void *)serial_master_buffer, SERIAL_MASTER_BUFFER_LENGTH); matrix_scan_quantum(); } - return 1; + return (uint8_t) changed; } @@ -297,8 +300,8 @@ uint8_t matrix_master_scan(void) { return ret; } -void matrix_slave_scan(void) { - _matrix_scan(); +uint8_t matrix_slave_scan(void) { + int ret = _matrix_scan(); int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; @@ -314,7 +317,7 @@ void matrix_slave_scan(void) { for (int i = 0; i < ROWS_PER_HAND; ++i) { #ifdef SERIAL_USE_MULTI_TRANSACTION if( serial_slave_buffer[i] != matrix[offset+i] ) - change = 1; + change = 1; #endif serial_slave_buffer[i] = matrix[offset+i]; } @@ -322,6 +325,7 @@ void matrix_slave_scan(void) { slave_buffer_change_count += change; #endif #endif + return ret; } bool matrix_is_modified(void) diff --git a/keyboards/crkbd/rev1/legacy/post_config.h b/keyboards/crkbd/rev1/legacy/post_config.h new file mode 100644 index 0000000000..b3d6346cc8 --- /dev/null +++ b/keyboards/crkbd/rev1/legacy/post_config.h @@ -0,0 +1,27 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +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 . +*/ + +#pragma once + +#ifdef SSD1306OLED +# define USE_I2C +#endif + +#if defined(OLED_DRIVER_ENABLE) && (defined(USE_I2C) || defined(USE_MATRIX_I2C)) +# error Cannot use both legacy i2c driver and new i2c_master driver at the same time. Undefine USE_I2C and/or USE_MATRIX_I2C +#endif diff --git a/keyboards/crkbd/rev1/legacy/rules.mk b/keyboards/crkbd/rev1/legacy/rules.mk new file mode 100644 index 0000000000..2bef242977 --- /dev/null +++ b/keyboards/crkbd/rev1/legacy/rules.mk @@ -0,0 +1,7 @@ +CUSTOM_MATRIX = yes + +SRC += matrix.c \ + split_util.c \ + split_scomm.c + +QUANTUM_LIB_SRC += i2c.c serial.c diff --git a/keyboards/crkbd/serial.c b/keyboards/crkbd/rev1/legacy/serial.c similarity index 100% rename from keyboards/crkbd/serial.c rename to keyboards/crkbd/rev1/legacy/serial.c diff --git a/keyboards/crkbd/serial.h b/keyboards/crkbd/rev1/legacy/serial.h similarity index 100% rename from keyboards/crkbd/serial.h rename to keyboards/crkbd/rev1/legacy/serial.h diff --git a/keyboards/crkbd/rev1/legacy/serial_config.h b/keyboards/crkbd/rev1/legacy/serial_config.h new file mode 100644 index 0000000000..40d11d4de2 --- /dev/null +++ b/keyboards/crkbd/rev1/legacy/serial_config.h @@ -0,0 +1,22 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +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 SOFT_SERIAL_PIN +#define SOFT_SERIAL_PIN D2 +#define SERIAL_USE_MULTI_TRANSACTION +#endif diff --git a/keyboards/crkbd/rev1/legacy/serial_config_simpleapi.h b/keyboards/crkbd/rev1/legacy/serial_config_simpleapi.h new file mode 100644 index 0000000000..bd152ddda3 --- /dev/null +++ b/keyboards/crkbd/rev1/legacy/serial_config_simpleapi.h @@ -0,0 +1,23 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +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 . +*/ + +#pragma once + +#undef SERIAL_USE_MULTI_TRANSACTION +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 diff --git a/keyboards/crkbd/rev1/split_scomm.c b/keyboards/crkbd/rev1/legacy/split_scomm.c similarity index 79% rename from keyboards/crkbd/rev1/split_scomm.c rename to keyboards/crkbd/rev1/legacy/split_scomm.c index 12b00f6840..c14bb32a43 100644 --- a/keyboards/crkbd/rev1/split_scomm.c +++ b/keyboards/crkbd/rev1/legacy/split_scomm.c @@ -1,3 +1,21 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +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 . +*/ + #ifdef USE_SERIAL #ifdef SERIAL_USE_MULTI_TRANSACTION /* --- USE flexible API (using multi-type transaction function) --- */ diff --git a/keyboards/crkbd/rev1/split_scomm.h b/keyboards/crkbd/rev1/legacy/split_scomm.h similarity index 51% rename from keyboards/crkbd/rev1/split_scomm.h rename to keyboards/crkbd/rev1/legacy/split_scomm.h index 873d8939d8..47f0ca1b9d 100644 --- a/keyboards/crkbd/rev1/split_scomm.h +++ b/keyboards/crkbd/rev1/legacy/split_scomm.h @@ -1,3 +1,21 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +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 SPLIT_COMM_H #define SPLIT_COMM_H diff --git a/keyboards/crkbd/rev1/split_util.c b/keyboards/crkbd/rev1/legacy/split_util.c similarity index 76% rename from keyboards/crkbd/rev1/split_util.c rename to keyboards/crkbd/rev1/legacy/split_util.c index b642a734cc..d0fee04ad6 100644 --- a/keyboards/crkbd/rev1/split_util.c +++ b/keyboards/crkbd/rev1/legacy/split_util.c @@ -1,3 +1,21 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +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 #include @@ -14,7 +32,7 @@ #endif #ifdef USE_MATRIX_I2C -# include "i2c.h" +# include "i2c_master.h" #else # include "split_scomm.h" #endif @@ -81,7 +99,7 @@ __attribute__((weak)) bool has_usb(void) { static void keyboard_master_setup(void) { #ifdef USE_MATRIX_I2C - i2c_master_init(); + i2c_init(); #else serial_master_init(); #endif diff --git a/tmk_core/protocol/iwrap/iwrap.h b/keyboards/crkbd/rev1/legacy/split_util.h similarity index 50% rename from tmk_core/protocol/iwrap/iwrap.h rename to keyboards/crkbd/rev1/legacy/split_util.h index 51f2b5670b..b2ddc1f97a 100644 --- a/tmk_core/protocol/iwrap/iwrap.h +++ b/keyboards/crkbd/rev1/legacy/split_util.h @@ -1,5 +1,6 @@ /* -Copyright 2011 Jun Wako +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> 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 @@ -15,33 +16,22 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef IWRAP_H -#define IWRAP_H +#ifndef SPLIT_KEYBOARD_UTIL_H +#define SPLIT_KEYBOARD_UTIL_H -#include #include -#include "host_driver.h" +#include "eeconfig.h" -/* enable iWRAP MUX mode */ -#define MUX_MODE +#define SLAVE_I2C_ADDRESS 0x32 -host_driver_t *iwrap_driver(void); +extern volatile bool isLeftHand; -void iwrap_init(void); -void iwrap_send(const char *s); -void iwrap_mux_send(const char *s); -void iwrap_buf_send(void); -void iwrap_buf_add(uint8_t c); -void iwrap_buf_del(void); +// slave version of matix scan, defined in matrix.c +uint8_t matrix_slave_scan(void); -void iwrap_call(void); -void iwrap_kill(void); -void iwrap_unpair(void); -void iwrap_sleep(void); -void iwrap_sniff(void); -void iwrap_subrate(void); -bool iwrap_failed(void); -uint8_t iwrap_connected(void); -uint8_t iwrap_check_connection(void); +void split_keyboard_setup(void); +bool has_usb(void); + +void matrix_master_OLED_init (void); #endif diff --git a/keyboards/crkbd/ssd1306.c b/keyboards/crkbd/rev1/legacy/ssd1306.c similarity index 98% rename from keyboards/crkbd/ssd1306.c rename to keyboards/crkbd/rev1/legacy/ssd1306.c index 622e44e35f..b04b7e15c1 100644 --- a/keyboards/crkbd/ssd1306.c +++ b/keyboards/crkbd/rev1/legacy/ssd1306.c @@ -4,15 +4,14 @@ #include "i2c.h" #include #include "print.h" -#ifdef ADAFRUIT_BLE_ENABLE -#include "adafruit_ble.h" -#endif #ifdef PROTOCOL_LUFA #include "lufa.h" #endif #include "sendchar.h" #include "timer.h" +struct CharacterMatrix display; + extern const unsigned char font[] PROGMEM; #ifndef OLED_BLANK_CHAR @@ -135,7 +134,7 @@ bool iota_gfx_init(bool rotate) { bool success = false; i2c_master_init(); - SEND_CMDS( + SEND_CMDS( cmd1(DisplayOff), cmd2(SetDisplayClockDiv, 0x80), cmd2(SetMultiPlex, DisplayHeight - 1), @@ -147,19 +146,19 @@ bool iota_gfx_init(bool rotate) { if(rotate){ // the following Flip the display orientation 180 degrees - SEND_CMDS( + SEND_CMDS( cmd1(SegRemap), cmd1(ComScanInc) ); }else{ // Flips the display orientation 0 degrees - SEND_CMDS( + SEND_CMDS( cmd1(SegRemap | 0x1), cmd1(ComScanDec) ); } - SEND_CMDS( + SEND_CMDS( #ifdef SSD1306_128X64 cmd2(SetComPins, 0x12), #else @@ -172,10 +171,10 @@ bool iota_gfx_init(bool rotate) { cmd1(NormalDisplay), cmd1(DeActivateScroll), cmd1(DisplayOn), - + cmd2(SetContrast, 0) // Dim ); - + clear_display(); success = true; diff --git a/keyboards/crkbd/rev1/rev1.c b/keyboards/crkbd/rev1/rev1.c index b26292af5b..5e4e6560f0 100644 --- a/keyboards/crkbd/rev1/rev1.c +++ b/keyboards/crkbd/rev1/rev1.c @@ -1,4 +1,21 @@ -#include "crkbd.h" +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +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 "rev1.h" #ifdef RGB_MATRIX_ENABLE @@ -68,11 +85,12 @@ led_config_t g_led_config = { { } }; #endif -__attribute__((weak)) -void matrix_init_user(void) {} - void matrix_init_kb(void) { +#ifdef KEYBOARD_crkbd_rev1_common + is_master = (uint8_t)is_keyboard_master(); +#endif + #ifdef RGB_MATRIX_ENABLE if (!isLeftHand) { g_led_config = (led_config_t){ { @@ -107,3 +125,9 @@ void matrix_init_kb(void) { #endif matrix_init_user(); } + +#ifdef SSD1306OLED +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_gfx(keycode,record) && process_record_user(keycode, record); +} +#endif diff --git a/keyboards/crkbd/rev1/rev1.h b/keyboards/crkbd/rev1/rev1.h index 2244b87f17..ce88068e64 100644 --- a/keyboards/crkbd/rev1/rev1.h +++ b/keyboards/crkbd/rev1/rev1.h @@ -1,25 +1,41 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +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 . +*/ + #pragma once +extern uint8_t is_master; + #include "crkbd.h" +#if defined(KEYBOARD_crkbd_rev1_legacy) +# include "legacy.h" +#elif defined(KEYBOARD_crkbd_rev1_common) +# include "common.h" +#endif #include "quantum.h" - +#include "split_util.h" #ifdef PROTOCOL_LUFA - #include "lufa.h" - #include "split_util.h" +# include "lufa.h" #endif - #ifdef SSD1306OLED - #include "ssd1306.h" +# include "ssd1306.h" #endif -#ifdef USE_I2C - #include - #ifdef __AVR__ - #include - #include - #endif -#endif // clang-format off #define LAYOUT_split_3x6_3( \ @@ -62,7 +78,7 @@ L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ L30, L31, L32, R30, R31, R32 \ ) \ - LAYOUT( \ + LAYOUT_split_3x6_3( \ KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ diff --git a/keyboards/crkbd/rev1/rules.mk b/keyboards/crkbd/rev1/rules.mk index 21cee6bcf7..6bc5a5b038 100644 --- a/keyboards/crkbd/rev1/rules.mk +++ b/keyboards/crkbd/rev1/rules.mk @@ -1,5 +1,3 @@ -SRC += matrix.c \ - split_util.c \ - split_scomm.c +LIB_SRC += ssd1306.c -LAYOUTS = split_3x5_3 split_3x6_3 +DEFAULT_FOLDER = crkbd/rev1/legacy diff --git a/keyboards/crkbd/rev1/serial_config.h b/keyboards/crkbd/rev1/serial_config.h deleted file mode 100644 index 4fab8e8ddf..0000000000 --- a/keyboards/crkbd/rev1/serial_config.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef SOFT_SERIAL_PIN -#define SOFT_SERIAL_PIN D2 -#define SERIAL_USE_MULTI_TRANSACTION -#endif diff --git a/keyboards/crkbd/rev1/serial_config_simpleapi.h b/keyboards/crkbd/rev1/serial_config_simpleapi.h deleted file mode 100644 index 0e1dd9e4ac..0000000000 --- a/keyboards/crkbd/rev1/serial_config_simpleapi.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#undef SERIAL_USE_MULTI_TRANSACTION -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 diff --git a/keyboards/crkbd/rev1/split_util.h b/keyboards/crkbd/rev1/split_util.h deleted file mode 100644 index 687ca19bd3..0000000000 --- a/keyboards/crkbd/rev1/split_util.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SPLIT_KEYBOARD_UTIL_H -#define SPLIT_KEYBOARD_UTIL_H - -#include -#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 matrix_master_OLED_init (void); - -#endif diff --git a/keyboards/crkbd/ssd1306.h b/keyboards/crkbd/rev1/ssd1306.h similarity index 98% rename from keyboards/crkbd/ssd1306.h rename to keyboards/crkbd/rev1/ssd1306.h index 0ca093093a..11a3cc67f4 100644 --- a/keyboards/crkbd/ssd1306.h +++ b/keyboards/crkbd/rev1/ssd1306.h @@ -65,7 +65,7 @@ struct CharacterMatrix { bool dirty; }; -struct CharacterMatrix display; +extern struct CharacterMatrix display; bool iota_gfx_init(bool rotate); void iota_gfx_task(void); diff --git a/keyboards/crkbd/rules.mk b/keyboards/crkbd/rules.mk index 16d05b589d..30de5b388d 100644 --- a/keyboards/crkbd/rules.mk +++ b/keyboards/crkbd/rules.mk @@ -31,12 +31,8 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -CUSTOM_MATRIX = yes -QUANTUM_LIB_SRC += i2c.c \ - serial.c -SRC += ssd1306.c - # if firmware size over limit, try this option # CFLAGS += -flto +LAYOUTS = split_3x5_3 split_3x6_3 -DEFAULT_FOLDER = crkbd/rev1 +DEFAULT_FOLDER = crkbd/rev1/legacy diff --git a/keyboards/dm9records/plaid/keymaps/default/keymap.c b/keyboards/dm9records/plaid/keymaps/default/keymap.c index 6a858a4a73..c5075b0e0c 100644 --- a/keyboards/dm9records/plaid/keymaps/default/keymap.c +++ b/keyboards/dm9records/plaid/keymaps/default/keymap.c @@ -214,6 +214,10 @@ led_config_t led_config; //Set leds to saved state during powerup void keyboard_post_init_user(void) { + // set LED pin modes + setPinOutput(LED_RED); + setPinOutput(LED_GREEN); + // Call the post init code. led_config.raw = eeconfig_read_user(); diff --git a/keyboards/dm9records/plaid/keymaps/stephen-huan/config.h b/keyboards/dm9records/plaid/keymaps/stephen-huan/config.h new file mode 100644 index 0000000000..5733b9e4b0 --- /dev/null +++ b/keyboards/dm9records/plaid/keymaps/stephen-huan/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/dm9records/plaid/keymaps/stephen-huan/keymap.c b/keyboards/dm9records/plaid/keymaps/stephen-huan/keymap.c new file mode 100644 index 0000000000..c8d48c3955 --- /dev/null +++ b/keyboards/dm9records/plaid/keymaps/stephen-huan/keymap.c @@ -0,0 +1,356 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + + +enum plaid_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum plaid_keycodes { + QWERTY = SAFE_RANGE, + LED_1, + LED_2, + LED_3, + LED_4, + LED_5, + LED_6, + LED_7, + LED_8, + LED_9, + LED_0 +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +// array of keys considered modifiers for led purposes +const uint16_t modifiers[] = { + KC_LCTL, + KC_RCTL, + KC_LALT, + KC_RALT, + KC_LSFT, + KC_RSFT, + KC_LGUI, + KC_RGUI, + LOWER, + RAISE +}; + +//Setup consts for LED modes +#define LEDMODE_ON 1 //always on +#define LEDMODE_OFF 0 //always off +#define LEDMODE_MODS 2 //On with modifiers +#define LEDMODE_BLINKIN 3 //blinkinlights - % chance toggle on keypress +#define LEDMODE_KEY 4 //On with any keypress, off with key release +#define LEDMODE_ENTER 5 // On with enter key + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |Esc/hy| A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | fn | Alt | GUI |Lower | Space |Raise | GUI | Alt |Shift | Ctrl | + * `-----------------------------------------------------------------------------------' + * (karabiner remaps Caps lock -> fn) + */ +[_QWERTY] = LAYOUT_plaid_grid( + KC_TAB , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + HYPR_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_RSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + KC_RCTL , KC_CAPS, KC_RALT, KC_RGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RSFT, KC_RCTL +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Prev | Vol- | Play | + * `-----------------------------------------------------------------------------------' + * volume up key repeats randomly on mac, have to use mac specific volume + */ +[_LOWER] = LAYOUT_plaid_grid( + 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_MPRV, KC__VOLDOWN, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ~ | | | End | | | |Pg Up | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Home | |Pg Dn | | | Left | Down | Up |Right | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | Copy |Paste | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol+ | Mute | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_plaid_grid( + KC_TILD, _______, _______, KC_END, _______, _______, _______, KC_PGUP, _______, _______, _______ , KC_DEL , + _______, KC_HOME, _______, KC_PGDN, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______ , _______, + _______, _______, _______, KC_COPY, KC_PSTE, KC_PGDN, _______, _______, _______, _______, _______ , _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC__VOLUP, KC_MUTE +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * |Reset | Red |Green | Rmod | Gmod |Rblink|Gblink| Rkey | Gkey | Rcar | Gcar | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |Power |Sleep |Wake |Eject | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_plaid_grid( + RESET , LED_1 , LED_2 , LED_3 , LED_4 , LED_5 ,LED_6 , LED_7 , LED_8 , LED_9 , LED_0 , _______ , + _______, KC_PWR , KC_SLEP, KC_WAKE, KC_EJCT, _______, _______, _______, _______, _______, _______, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +//Setup config struct for LED +typedef union { + uint32_t raw; + struct { + uint8_t red_mode :8; + uint8_t green_mode :8; + }; +} led_config_t; +led_config_t led_config; + +//Set leds to saved state during powerup +void keyboard_post_init_user(void) { + // set LED pin modes + setPinOutput(LED_RED); + setPinOutput(LED_GREEN); + + // Call the post init code. + led_config.raw = eeconfig_read_user(); + + if(led_config.red_mode == LEDMODE_ON) { + writePinHigh(LED_RED); + } + + if(led_config.green_mode == LEDMODE_ON) { + writePinHigh(LED_GREEN); + } +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + led_config.raw = 0; + led_config.red_mode = LEDMODE_ON; + led_config.green_mode = LEDMODE_MODS; + eeconfig_update_user(led_config.raw); +} + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +void led_keypress_update(uint8_t led, uint8_t led_mode, uint16_t keycode, keyrecord_t *record) { + switch (led_mode) { + case LEDMODE_MODS: + for (int i=0;ievent.pressed) { + writePinHigh(led); + } + else { + writePinLow(led); + } + } + } + break; + case LEDMODE_BLINKIN: + if (record->event.pressed) { + + /* Markov Chain + * + * 1 - x 1 - y + * /---\ /---\ + * v | v | + * /------\ x /------\ + * | |------>| | + * | on | y | off | + * | |<------| | + * \------/ \------/ + */ + + /* Non-homogeneous Markov Chain + * + * /-----\ 1 - x0 /-----\ 1 - x1 /-----\ + * |on 0|------->|on 1|------->|on 2|----> ... + * \-----/\ /\-----/\ /\-----/\ + * \ / \ / . + * x0\ / x1\ / . + * \/ \/ . + * /\ /\ + * y0/ \ y1/ \ . + * / \ / \ . + * / \ / \ . + * /-----\ 1 - y0 /-----\ 1 - y1 /-----\/ + * |off 0|------->|off 1|------->|off 2|----> ... + * \-----/ \-----/ \-----/ + * + * + * if x = 1/4 and y 1/4, behavior is equivalent to the original code + * and converges to a steady state at the rate of 1/2^k + * where k is the number of key presses + * (the distance from a given vector to the steady state, [1/2, 1/2], + * is cut in half every key press) + * + * if x = y, then it is guaranteed that the steady state is still + * [1/2, 1/2], but the rate at which it converges is variable + * + * if x != y, then there is no well-defined steady state + */ + + double x = (1.0*rand())/RAND_MAX; + double y = x; + + double p = (readPin(led)) ? x : y; + if (rand() < p*RAND_MAX) { + togglePin(led); + } + + /* following code is restriced to x + y <= 1 + * if(rand() % 2 == 1) { */ + /* if(rand() % 2 == 0) { */ + /* writePinLow(led); */ + /* } */ + /* else { */ + /* writePinHigh(led); */ + /* } */ + /* } */ + } + break; + case LEDMODE_KEY: + if (record->event.pressed) { + writePinHigh(led); + return; + } + else { + writePinLow(led); + return; + } + break; + case LEDMODE_ENTER: + if (keycode==KC_ENT) { + writePinHigh(led); + } + else { + writePinLow(led); + } + break; + + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + /* If the either led mode is keypressed based, call the led updater + then let it fall through the keypress handlers. Just to keep + the logic out of this procedure */ + if (led_config.red_mode >= LEDMODE_MODS && led_config.red_mode <= LEDMODE_ENTER) { + led_keypress_update(LED_RED, led_config.red_mode, keycode, record); + } + if (led_config.green_mode >= LEDMODE_MODS && led_config.green_mode <= LEDMODE_ENTER) { + led_keypress_update(LED_GREEN, led_config.green_mode, keycode, record); + } + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LED_1: + if (record->event.pressed) { + if (led_config.red_mode==LEDMODE_ON) { + led_config.red_mode=LEDMODE_OFF; + writePinLow(LED_RED); + } + else { + led_config.red_mode=LEDMODE_ON; + writePinHigh(LED_RED); + } + } + break; + case LED_2: + if (record->event.pressed) { + if (led_config.green_mode==LEDMODE_ON) { + led_config.green_mode=LEDMODE_OFF; + writePinLow(LED_GREEN); + } + else { + led_config.green_mode=LEDMODE_ON; + writePinHigh(LED_GREEN); + } + } + break; + case LED_3: + led_config.red_mode=LEDMODE_MODS; + break; + case LED_4: + led_config.green_mode=LEDMODE_MODS; + break; + case LED_5: + led_config.red_mode=LEDMODE_BLINKIN; + break; + case LED_6: + led_config.green_mode=LEDMODE_BLINKIN; + break; + case LED_7: + led_config.red_mode=LEDMODE_KEY; + break; + case LED_8: + led_config.green_mode=LEDMODE_KEY; + break; + case LED_9: + led_config.red_mode=LEDMODE_ENTER; + break; + case LED_0: + led_config.green_mode=LEDMODE_ENTER; + break; + } + + if (keycode >= LED_1 && keycode <= LED_0) { + eeconfig_update_user(led_config.raw); + } + + return true; +} diff --git a/keyboards/dm9records/plaid/keymaps/stephen-huan/readme.md b/keyboards/dm9records/plaid/keymaps/stephen-huan/readme.md new file mode 100644 index 0000000000..e52d24c3df --- /dev/null +++ b/keyboards/dm9records/plaid/keymaps/stephen-huan/readme.md @@ -0,0 +1 @@ +# stephen-huan's keymap for Plaid diff --git a/keyboards/dmqdesign/spin/keymaps/gorbachev/config.h b/keyboards/dmqdesign/spin/keymaps/gorbachev/config.h new file mode 100644 index 0000000000..10201015ee --- /dev/null +++ b/keyboards/dmqdesign/spin/keymaps/gorbachev/config.h @@ -0,0 +1,25 @@ +/* Copyright 2019-2020 DMQ Design + * + * 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 . + */ + +#pragma once + +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 + +// Use one or the other, determines the orientation of +// the OLED display +// #define RIGHT_HAND +#define LEFT_HAND diff --git a/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c b/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c new file mode 100644 index 0000000000..b9ad17386c --- /dev/null +++ b/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c @@ -0,0 +1,247 @@ +/* Copyright 2019-2020 DMQ Design + * + * 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 QMK_KEYBOARD_H + +enum layers { + _NUMPAD, + _RGB, + _MACRO +}; + +enum custom_keycodes { + HELLO_WORLD = SAFE_RANGE, +}; + +//The below layers are intentionally empty in order to give a good starting point for how to configure multiple layers. +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_NUMPAD] = LAYOUT(/* Base */ + KC_7, KC_8, KC_9, TO(_NUMPAD), + KC_4, KC_5, KC_6, TO(_RGB), + KC_1, KC_2, KC_3, TO(_MACRO), + KC_0, KC_DOT, KC_ENTER + ), + + [_RGB] = LAYOUT(/* Base */ + RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, + RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, + KC_NO, KC_NO, KC_NO, KC_TRNS, + RGB_RMOD, RGB_TOG, RGB_MOD + ), + + [_MACRO] = LAYOUT(/* Base */ + HELLO_WORLD, KC_NO, KC_NO, KC_TRNS, + KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_NO, KC_NO, KC_NO + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case HELLO_WORLD: + if (record->event.pressed) { + SEND_STRING("Hello, world!"); + } + break; + } + + return true; +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + switch (get_highest_layer(layer_state)) { //break each encoder update into a switch statement for the current layer + case _NUMPAD: + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + break; + case _RGB: + if (clockwise) { + rgblight_increase_hue(); + } else { + rgblight_decrease_hue(); + } + break; + case _MACRO: + if (clockwise) { + break; + } else { + break; + } + break; + } + } else if (index == 1) { /* Second encoder */ + switch (get_highest_layer(layer_state)) { + case _NUMPAD: + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + break; + case _RGB: + if (clockwise) { + rgblight_increase_sat(); + } else { + rgblight_decrease_sat(); + } + break; + case _MACRO: + if (clockwise) { + break; + } else { + break; + } + break; + } + } else if (index == 2) { /* Third encoder */ + switch (get_highest_layer(layer_state)) { + case _NUMPAD: + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + case _RGB: + if (clockwise) { + rgblight_increase_val(); + } else { + rgblight_decrease_val(); + } + break; + case _MACRO: + if (clockwise) { + break; + } else { + break; + } + break; + } + } +} + +layer_state_t layer_state_set_user(layer_state_t state) { //This will run every time the layer is updated + switch (get_highest_layer(state)) { + case _NUMPAD: + setrgb(RGB_WHITE, &led[0]); //Set the top LED to white for the bottom layer + setrgb(0, 0, 0, &led[1]); + setrgb(0, 0, 0, &led[2]); + break; + case _RGB: + setrgb(0, 0, 0, &led[0]); //Set the middle LED to white for the middle layer + setrgb(RGB_WHITE, &led[1]); + setrgb(0, 0, 0, &led[2]); + break; + case _MACRO: + setrgb(0, 0, 0, &led[0]); + setrgb(0, 0, 0, &led[1]); + setrgb(RGB_WHITE, &led[2]); //Set the bottom LED to white for the top layer + break; + } + rgblight_set(); + return state; +} + +#ifdef OLED_DRIVER_ENABLE + +static const char *ANIMATION_NAMES[] = { + "unknown", + "static", + "breathing I", + "breathing II", + "breathing III", + "breathing IV", + "rainbow mood I", + "rainbow mood II", + "rainbow mood III", + "rainbow swirl I", + "rainbow swirl II", + "rainbow swirl III", + "rainbow swirl IV", + "rainbow swirl V", + "rainbow swirl VI", + "snake I", + "snake II", + "snake III", + "snake IV", + "snake V", + "snake VI", + "knight I", + "knight II", + "knight III", + "christmas", + "static gradient I", + "static gradient II", + "static gradient III", + "static gradient IV", + "static gradient V", + "static gradient VI", + "static gradient VII", + "static gradient VIII", + "static gradient IX", + "static gradient X", + "rgb test", + "alternating", + "twinkle I", + "twinkle II", + "twinkle III", + "twinkle IV", + "twinkle V", + "twinkle VI" +}; + +void rgblight_get_mode_name(uint8_t mode, size_t bufsize, char *buf) { + snprintf(buf, bufsize, "%-25s", ANIMATION_NAMES[mode]); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { +#ifdef LEFT_HAND + return OLED_ROTATION_180; +#else + return OLED_ROTATION_0; +#endif +} + +void oled_task_user(void) { + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case _NUMPAD: + oled_write_P(PSTR("Numpad\n"), false); + break; + case _RGB: + oled_write_P(PSTR("RGB\n"), false); + break; + case _MACRO: + oled_write_P(PSTR("Macro\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + + static char rgb_mode_name[30]; + rgblight_get_mode_name(rgblight_get_mode(), sizeof(rgb_mode_name), rgb_mode_name); + + oled_write_P(PSTR("Mode: "), false); + oled_write_ln(rgb_mode_name, false); +} +#endif diff --git a/keyboards/dmqdesign/spin/keymaps/gorbachev/readme.md b/keyboards/dmqdesign/spin/keymaps/gorbachev/readme.md new file mode 100644 index 0000000000..451dae7ef7 --- /dev/null +++ b/keyboards/dmqdesign/spin/keymaps/gorbachev/readme.md @@ -0,0 +1,7 @@ +# Keymap for Spin + +* Encoder button push changes layers +* First layer is a number pad +* Second layer is RGB control layer +* Third layer is macro layer +* OLED support diff --git a/keyboards/dmqdesign/spin/keymaps/gorbachev/rules.mk b/keyboards/dmqdesign/spin/keymaps/gorbachev/rules.mk new file mode 100644 index 0000000000..553adac193 --- /dev/null +++ b/keyboards/dmqdesign/spin/keymaps/gorbachev/rules.mk @@ -0,0 +1,3 @@ +OLED_DRIVER_ENABLE = yes +MOUSEKEY_ENABLE = no +MIDI_ENABLE = no diff --git a/keyboards/donutcables/budget96/config.h b/keyboards/donutcables/budget96/config.h index 9482867fa7..7154a67a8c 100644 --- a/keyboards/donutcables/budget96/config.h +++ b/keyboards/donutcables/budget96/config.h @@ -1,5 +1,5 @@ /* -Copyright 2017 Luiz Ribeiro +Copyright 2020 DonutCables 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 @@ -19,11 +19,11 @@ along with this program. If not, see . #include "config_common.h" -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D -#define DEVICE_VER 0x0200 +#define VENDOR_ID 0xDCDC +#define PRODUCT_ID 0x0002 +#define DEVICE_VER 0x0001 #define MANUFACTURER DonutCables -#define PRODUCT budget96 +#define PRODUCT Budget96 #define RGBLED_NUM 18 diff --git a/keyboards/donutcables/budget96/keymaps/donut/config.h b/keyboards/donutcables/budget96/keymaps/donut/config.h new file mode 100644 index 0000000000..da538e7b80 --- /dev/null +++ b/keyboards/donutcables/budget96/keymaps/donut/config.h @@ -0,0 +1,28 @@ +/* +Copyright 2020 DonutCables + +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 . +*/ + +#pragma once + +// place overrides here + +#undef RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE + +#define UNICODE_KEY_WINC KC_RGUI diff --git a/keyboards/donutcables/budget96/keymaps/donut/keymap.c b/keyboards/donutcables/budget96/keymaps/donut/keymap.c new file mode 100644 index 0000000000..53e77437ff --- /dev/null +++ b/keyboards/donutcables/budget96/keymaps/donut/keymap.c @@ -0,0 +1,171 @@ +/* +Copyright 2020 DonutCables + +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 QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _B, + _FN1, + _FN2, +}; + +enum custom_keycodes { + img = SAFE_RANGE, + xkcd, + CD, + AES, + /* Unicode strings maps */ + ALT0, + ALT1, + ALT2, + ALT3, + ALT4, + ALT5, + ALT6, + ALT7, + /* Discord emotes maps */ + B, + X, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT_96_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, KC_INS, KC_END, KC_MPRV, KC_MPLY, KC_MNXT, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_PSCR, KC_PSLS, KC_PAST, + 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_PMNS, + MO(3), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, + KC_LCTL, MO(2), KC_RALT, KC_SPC, KC_CALC, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + + /* (1) Bmode layer */ + [_B] = LAYOUT_96_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, B, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + /* (2) Fn 1 */ + [_FN1] = LAYOUT_96_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, TG(1), KC_PGUP, KC_VOLD, KC_MUTE, KC_VOLU, + ALT0, KC_TRNS, KC_TRNS, ALT1, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ALT2, KC_TRNS, KC_TRNS, KC_NLCK, KC_TRNS, KC_TRNS, + KC_TRNS, CD, KC_TRNS, KC_TRNS, KC_TRNS, ALT3, KC_TRNS, KC_TRNS, KC_TRNS, ALT4, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, AES, xkcd, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_CLCK, KC_TRNS, X, KC_TRNS, img, B, KC_TRNS, ALT7, ALT5, ALT6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + /* (3) Fn 2 */ + [_FN2] = LAYOUT_96_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, UC_M_WC, EEP_RST, RESET, + VLK_TOG, KC_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, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_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, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_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), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case xkcd: + if (record->event.pressed) { + SEND_STRING("https://xkcd.com/927/"); + } + return true; + case CD: + if (record->event.pressed) { + SEND_STRING("cd d:/keyboard_stuff/gits/qmk_firmware"); + } + return true; + case AES: + if (record->event.pressed) { + SEND_STRING("***A E S T H E T I C S***"); + } + return true; + case img: + if (record->event.pressed) { + SEND_STRING("[url=" SS_LCTL("v") "][img]" SS_LCTL("v") "[/img][/url]"); + } + return true; + case ALT0: + if (record->event.pressed) { + send_unicode_string("≈"); + } + return true; + case ALT1: + if (record->event.pressed) { + send_unicode_string("π"); + } + return true; + case ALT2: + if (record->event.pressed) { + send_unicode_string("±"); + } + return true; + case ALT3: + if (record->event.pressed) { + send_unicode_string("™"); + } + return true; + case ALT4: + if (record->event.pressed) { + send_unicode_string("Ω"); + } + return true; + case ALT5: + if (record->event.pressed) { + send_unicode_string("≤"); + } + return true; + case ALT6: + if (record->event.pressed) { + send_unicode_string("≥"); + } + return true; + case ALT7: + if (record->event.pressed) { + send_unicode_string("ゴ"); + } + return true; + case B: + if (record->event.pressed) { + SEND_STRING(":b:"); + } + return true; + case X: + if (record->event.pressed) { + SEND_STRING(":x:"); + } + return true; + case KC_A ... KC_Z: + case KC_1 ... KC_0: + if (layer_state_is(1)) { + if (record->event.pressed) { + register_code(KC_F13); + tap_code(keycode); + unregister_code(KC_F13); + } + } else { + return true; + } + return false; + } + return true; +} diff --git a/keyboards/donutcables/budget96/keymaps/donut/readme.md b/keyboards/donutcables/budget96/keymaps/donut/readme.md new file mode 100644 index 0000000000..3e1ca1361a --- /dev/null +++ b/keyboards/donutcables/budget96/keymaps/donut/readme.md @@ -0,0 +1,3 @@ +# My personal keymap for Budget96 + +My daily map for the Budget96. Includes unicode and masked characters for AHK pickup. \ No newline at end of file diff --git a/keyboards/donutcables/budget96/keymaps/donut/rules.mk b/keyboards/donutcables/budget96/keymaps/donut/rules.mk new file mode 100644 index 0000000000..7d48394b23 --- /dev/null +++ b/keyboards/donutcables/budget96/keymaps/donut/rules.mk @@ -0,0 +1,7 @@ +VELOCIKEY_ENABLE = yes +UNICODE_ENABLE = yes +BACKLIGHT_ENABLE = no +MOUSEKEY_ENABLE = no +COMMAND_ENABLE = no +SPACE_CADET_ENABLE = no +GRAVE_ESC_ENABLE = no diff --git a/keyboards/donutcables/budget96/readme.md b/keyboards/donutcables/budget96/readme.md index 11c49b9834..9cdb3a01bf 100644 --- a/keyboards/donutcables/budget96/readme.md +++ b/keyboards/donutcables/budget96/readme.md @@ -1,8 +1,8 @@ -# budget96 +# Budget96 -96 key atmega32a keyboard. +A budget-oriented 96 key atmega32a keyboard. Runs ps2avrgb by default. -* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [DonutCables](https://github.com/DonutCables) * Hardware Supported: Budget96 PCB * Hardware Availability: [DonutCables](https://donutcables.com/) diff --git a/keyboards/doodboard/duckboard/config.h b/keyboards/doodboard/duckboard/config.h new file mode 100644 index 0000000000..ea8a8ae5dd --- /dev/null +++ b/keyboards/doodboard/duckboard/config.h @@ -0,0 +1,57 @@ +/* Copyright 2020 doodboard + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xFF44 +#define DEVICE_VER 0x0001 +#define MANUFACTURER doodboard +#define PRODUCT duckboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 5 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F7, B1, B3, B2, B6 } +#define UNUSED_PINS + +#define ENCODERS_PAD_A { F5 } +#define ENCODERS_PAD_B { F6 } +#define ENCODER_RESOLUTION 2 + +/* media key slowdown for windows */ +#define TAP_CODE_DELAY 20 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#ifdef RGBLIGHT_ENABLE +#define RGBLED_NUM 8 // Number of LEDs +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 diff --git a/keyboards/doodboard/duckboard/duckboard.c b/keyboards/doodboard/duckboard/duckboard.c new file mode 100644 index 0000000000..af0cb24beb --- /dev/null +++ b/keyboards/doodboard/duckboard/duckboard.c @@ -0,0 +1,17 @@ +/* Copyright 2020 doodboard + * + * 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 "duckboard.h" diff --git a/keyboards/doodboard/duckboard/duckboard.h b/keyboards/doodboard/duckboard/duckboard.h new file mode 100644 index 0000000000..0e753d445e --- /dev/null +++ b/keyboards/doodboard/duckboard/duckboard.h @@ -0,0 +1,34 @@ +/* Copyright 2020 doodboard + * + * 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 . + */ + + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K01, K02, K03, K04, \ + K11, K12, K13, \ + K21, K22, K23, K24, \ + K31, K32, K33, \ + K40, K41, K42, K43, K44 \ +) { \ + { KC_NO, K01, K02, K03, K04 }, \ + { KC_NO, K11, K12, K13, KC_NO }, \ + { KC_NO, K21, K22, K23, K24 }, \ + { KC_NO, K31, K32, K33, KC_NO }, \ + { K40, K41, K42, K43, K44 } \ +} diff --git a/keyboards/doodboard/duckboard/info.json b/keyboards/doodboard/duckboard/info.json new file mode 100644 index 0000000000..ff043779f6 --- /dev/null +++ b/keyboards/doodboard/duckboard/info.json @@ -0,0 +1,36 @@ +{ + "keyboard_name": "duckboard", + "url": "", + "maintainer": "doodboard", + "width": 5, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + {"x": 4, "y": 2}, + + {"x": 1, "y": 3}, + {"x": 2, "y": 3}, + {"x": 3, "y": 3}, + + {"x": 0, "y": 4}, + {"x": 1, "y": 4}, + {"x": 2, "y": 4}, + {"x": 3, "y": 4}, + {"x": 4, "y": 4} + ] + } + } +} diff --git a/keyboards/doodboard/duckboard/keymaps/default/keymap.c b/keyboards/doodboard/duckboard/keymaps/default/keymap.c new file mode 100644 index 0000000000..6684e98633 --- /dev/null +++ b/keyboards/doodboard/duckboard/keymaps/default/keymap.c @@ -0,0 +1,118 @@ +/* Copyright 2020 doodboard + * + * 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 QMK_KEYBOARD_H +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + TG(1), KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_BSPC, KC_MUTE, KC_P0, KC_PDOT, KC_PENT), + [1] = LAYOUT( + TG(1), KC_TRNS, KC_TRNS, KC_TRNS, + KC_HOME, KC_UP, KC_PGUP, + KC_LEFT, KC_TRNS, KC_RGHT, KC_TRNS, + KC_END, KC_DOWN, KC_PGDN, + TG(2), KC_TRNS, KC_INS, KC_DEL, KC_TRNS), + [2] = LAYOUT( + KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, + RGB_HUI, RGB_SAI, RGB_VAI, + RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + TG(2), RESET, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} +} + + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } + + +// WPM-responsive animation stuff here +#define IDLE_FRAMES 2 +#define IDLE_SPEED 40 // below this wpm value your animation will idle + +#define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms +// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing +#define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 + +uint32_t anim_timer = 0; +uint32_t anim_sleep = 0; +uint8_t current_idle_frame = 0; + +// Credit to u/Pop-X- for the initial code. You can find his commit here https://github.com/qmk/qmk_firmware/pull/9264/files#diff-303f6e3a7a5ee54be0a9a13630842956R196-R333. +static void render_anim(void) { + static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { + { + 0, 0,192,192,192,192,192,192,192,248,248, 30, 30,254,254,248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3,255,255,255,255,255,255,255,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,127,127,255,255,255,255,255,159,159,135,135,129,129,129, 97, 97, 25, 25, 7, 7, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 97, 97,127, 1, 1, 97, 97,127, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }, + { + 0, 0,128,128,128,128,128,128,128,240,240, 60, 60,252,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 7, 7, 7, 7, 7,255,255,254,254,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,255,255, 63, 63, 15, 15, 3, 3, 3,195,195, 51, 51, 15, 15, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 99, 99,127, 3, 3, 99, 99,127, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0 + } + }; + + //assumes 1 frame prep stage + void animation_phase(void) { + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE); + } + + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + } + +void oled_task_user(void) { + render_anim(); + oled_set_cursor(0,6); + oled_write_P(PSTR("DUCK\nBOARD\n"), false); + oled_write_P(PSTR("-----\n"), false); + // Host Keyboard Layer Status + oled_write_P(PSTR("MODE\n"), false); + oled_write_P(PSTR("\n"), false); + + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR("BASE\n"), false); + break; + case 1: + oled_write_P(PSTR("FUNC\n"), false); + break; + case 2: + oled_write_P(PSTR("RGB\n"), false); + break; + } +} +#endif + +void keyboard_post_init_user(void) { + //Customise these values to debug + //debug_enable=true; + //debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} diff --git a/keyboards/doodboard/duckboard/readme.md b/keyboards/doodboard/duckboard/readme.md new file mode 100644 index 0000000000..d2b799ab61 --- /dev/null +++ b/keyboards/doodboard/duckboard/readme.md @@ -0,0 +1,17 @@ +# duckboard + +An 18-key numpad with rotary encoder and OLED support. + +* Keyboard Maintainer: [doodboard](https://github.com/doodboard) +* Hardware Supported: duckboard PCB +* Hardware Availability: Private Group Buy + +Make example for this keyboard (after setting up your build environment): + + make doodboard/duckboard:default + +Flashing example for this keyboard: + + make doodboard/duckboard:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/doodboard/duckboard/rules.mk b/keyboards/doodboard/duckboard/rules.mk new file mode 100644 index 0000000000..09a60d8a79 --- /dev/null +++ b/keyboards/doodboard/duckboard/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +ENCODER_ENABLE = yes +OLED_DRIVER_ENABLE = yes diff --git a/keyboards/drakon/config.h b/keyboards/drakon/config.h new file mode 100644 index 0000000000..f9565e41a4 --- /dev/null +++ b/keyboards/drakon/config.h @@ -0,0 +1,114 @@ +/* +Copyright 2020 jagdpietr + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x7776 +#define DEVICE_VER 0x0001 +#define MANUFACTURER jagdpietr +#define PRODUCT drakon + +/* key matrix size */ +#define MATRIX_ROWS 6 +#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 { C7, B5, B6, B0, B1, F1 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, C6, B2, B3, B7, D3, D5, D4, D6, D7, B4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define ENCODERS_PAD_A { D2 } +#define ENCODERS_PAD_B { F0 } + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/drakon/drakon.c b/keyboards/drakon/drakon.c new file mode 100644 index 0000000000..29fe65f46b --- /dev/null +++ b/keyboards/drakon/drakon.c @@ -0,0 +1,17 @@ +/* Copyright 2020 jagdpietr + * + * 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 "drakon.h" diff --git a/keyboards/drakon/drakon.h b/keyboards/drakon/drakon.h new file mode 100644 index 0000000000..68315914d9 --- /dev/null +++ b/keyboards/drakon/drakon.h @@ -0,0 +1,91 @@ +/* Copyright 2020 jagdpietr + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + + +/* LAYOUT_ansi + * ,---------------------------------------------------------. .---. + * |00 |01 |02 |03 |04 |05 |06 |07 |08 |09 |0A |0B |0C |0D|2D| |5C | + * |---------------------------------------------------------| ,-----------. + * |10 |11 |12 |13 |14 |15 |16 |17 |18 |19 |1A |1B |1C |1D | |5A |5D |59 | + * |---------------------------------------------------------| `-----------' + * |20 |21 |22 |23 |24 |25 |26 |27 |28 |29 |2A |2B |2C | |5B | + * |---------------------------------------------------------. `---' + * |30 |31 |32 |33 |34 |35 |36 |37 |38 |39 |3A |3B | |3C | + * |--------------------------------------------------'--`---'---. + * |40 |41 |42 | 43 |49 |4A | |4B |4C |4D | + * `----------------------------------------------' `-----------' + */ + +#define LAYOUT_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, K5C, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K5A, K5D, K59, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K5B, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K43, K49, K4A, K4B, K4C, K4D \ +) \ +{ \ + { 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, XXX }, \ + { K40, K41, K42, K43, XXX, XXX, XXX, XXX, XXX, K49, K4A, K4B, K4C, K4D }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K59, K5A, K5B, K5C, K5D } \ +} + +/* LAYOUT_wkl + * ,---------------------------------------------------------. .---. + * |00 |01 |02 |03 |04 |05 |06 |07 |08 |09 |0A |0B |0C |0D|2D| |5C | + * |---------------------------------------------------------| ,-----------. + * |10 |11 |12 |13 |14 |15 |16 |17 |18 |19 |1A |1B |1C |1D | |5A |5D |59 | + * |---------------------------------------------------------| `-----------' + * |20 |21 |22 |23 |24 |25 |26 |27 |28 |29 |2A |2B |2C | |5B | + * |---------------------------------------------------------. `---' + * |30 |31 |32 |33 |34 |35 |36 |37 |38 |39 |3A |3B | |3C | + * |--------------------------------------------------'--`---'---. + * |40 | |42 | 43 |49 |4A | |4B |4C |4D | + * `----------------------------------------------' `-----------' + */ + +#define LAYOUT_wkl( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, K5C, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K5A, K5D, K59, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K5B, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K42, K43, K49, K4A, K4B, K4C, K4D \ +) \ +{ \ + { 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, XXX }, \ + { K40, XXX, K42, K43, XXX, XXX, XXX, XXX, XXX, K49, K4A, K4B, K4C, K4D }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K59, K5A, K5B, K5C, K5D } \ +} diff --git a/keyboards/drakon/info.json b/keyboards/drakon/info.json new file mode 100644 index 0000000000..328bdba9ee --- /dev/null +++ b/keyboards/drakon/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "drakon", + "url": "", + "maintainer": "jagdpietr", + "width": 18.25, + "height": 5.25, + "layouts": { + "LAYOUT_ansi": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":16.25, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15.25, "y":1}, {"x":16.25, "y":1}, {"x":17.25, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":16.25, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.25}, {"x":13.75, "y":3.25}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.75, "y":4.25}, {"x":13.75, "y":4.25}, {"x":14.75, "y":4.25}] + }, + "LAYOUT_wkl": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":16.25, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15.25, "y":1}, {"x":16.25, "y":1}, {"x":17.25, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":16.25, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.25}, {"x":13.75, "y":3.25}, {"x":0, "y":4, "w":1.25}, {"x":1.75, "y":4, "w":1.25}, {"x":3, "y":4, "w":7}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.75, "y":4.25}, {"x":13.75, "y":4.25}, {"x":14.75, "y":4.25}] + } + } +} diff --git a/keyboards/drakon/keymaps/default/keymap.c b/keyboards/drakon/keymaps/default/keymap.c new file mode 100644 index 0000000000..04c511f211 --- /dev/null +++ b/keyboards/drakon/keymaps/default/keymap.c @@ -0,0 +1,247 @@ +/* Copyright 2020 jagdpietr + * + * 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 QMK_KEYBOARD_H + +char wpm_str[10]; + +// Defines names for use in layer keycodes and the keymap +enum Layer_names { +_Base, +_FN, +_Lyr2 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_Base] = LAYOUT_ansi( + 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_DEL, KC_MUTE, + 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_MPRV, KC_MPLY, KC_MNXT, + 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_MSTP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_APP, MO(_FN), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [_FN] = LAYOUT_ansi( + KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ), + + [_Lyr2] = LAYOUT_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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 encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} + +#ifdef OLED_DRIVER_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_90; // flips the display 90 degrees if offhand + +} + +void render_status(void) { + //Host Keyboard Layer Status + oled_set_cursor(0,10); + oled_write_P(PSTR("Lyr: "), false); + + switch (get_highest_layer(layer_state)) { + case _Base: + oled_write_P(PSTR("Base\n"), false); + break; + case _FN: + oled_write_P(PSTR("FN\n"), false); + break; + case _Lyr2: + oled_write_P(PSTR("Lyr2\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_set_cursor(0,12); + oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); + +} + +// WPM-responsive animation stuff here +#define IDLE_FRAMES 5 +#define IDLE_SPEED 40 // below this wpm value your animation will idle + +// #define PREP_FRAMES 1 // uncomment if >1 + +#define TAP_FRAMES 2 +#define TAP_SPEED 60 // above this wpm value typing animation to triggere + +#define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms +// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing +#define ANIM_SIZE 128 // number of bytes in array, minimize for adequate firmware size, max is 1024 + +uint32_t anim_timer = 0; +uint32_t anim_sleep = 0; +uint8_t current_idle_frame = 0; +// uint8_t current_prep_frame = 0; // uncomment if PREP_FRAMES >1 +uint8_t current_tap_frame = 0; + +// Images credit j-inc(/James Incandenza) and pixelbenny. Credit to obosob for initial animation approach. +static void render_anim(void) { + static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x60, + 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x0c, 0x06, 0x03, 0x81, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x0c, 0x18, 0x10, 0x18, 0x08, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x3e, 0x23, 0x20, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x21, 0x21, 0x63, 0x43, 0x42, + 0xc0, 0x80, 0x88, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x05, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x06, 0x04, 0x0c, 0x08, 0x0b, 0x08, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x60, 0x30, 0x10, 0x08, 0x04, 0x04, 0x06, 0x01, 0x01, 0x06, + 0x04, 0x0c, 0x08, 0x18, 0x10, 0x30, 0x20, 0x40, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0x00, 0x00, + 0xe0, 0x98, 0x04, 0x03, 0x01, 0x80, 0x80, 0x80, 0x80, 0x84, 0x86, 0x80, 0x08, 0x18, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x78, 0x87, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, + 0x02, 0x02, 0x0e, 0x3e, 0x20, 0x20, 0x20, 0x10, 0x10, 0x18, 0x18, 0x10, 0x10, 0x33, 0x3e, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x60, + 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x0c, 0x06, 0x03, 0x81, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x0c, 0x18, 0x10, 0x18, 0x08, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x3e, 0x23, 0x20, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x21, 0x21, 0x63, 0x43, 0x42, + 0xc0, 0x80, 0x88, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x05, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x06, 0x04, 0x0c, 0x08, 0x0b, 0x08, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x60, 0x30, 0x10, 0x08, 0x04, 0x04, 0x06, 0x01, 0x01, 0x06, + 0x04, 0x0c, 0x08, 0x18, 0x10, 0x30, 0x20, 0x40, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0x00, 0x00, + 0xe0, 0x98, 0x04, 0x03, 0x01, 0x80, 0x80, 0x80, 0x80, 0x84, 0x86, 0x80, 0x08, 0x18, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x78, 0x87, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, + 0x02, 0x02, 0x0e, 0x3e, 0x20, 0x20, 0x20, 0x10, 0x10, 0x18, 0x18, 0x10, 0x10, 0x33, 0x3e, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x60, + 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x0c, 0x06, 0x03, 0x81, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x0c, 0x18, 0x10, 0x18, 0x08, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x3e, 0x23, 0x20, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x21, 0x21, 0x63, 0x43, 0x42, + 0xc0, 0x80, 0x88, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x05, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x06, 0x04, 0x0c, 0x08, 0x0b, 0x08, 0x00 + } + }; + static const char PROGMEM prep[][ANIM_SIZE] = { + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x30, 0x18, 0x0c, 0x38, + 0x60, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xf8, 0x18, 0x0c, 0x0c, 0x38, 0x0c, 0x06, 0x03, 0x01, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x03, 0x02, 0x06, 0x04, 0x08, 0x18, 0x30, 0x18, 0x18, 0xf8, 0x00, 0x00, + 0x00, 0x07, 0x0c, 0x18, 0x18, 0x10, 0x10, 0x10, 0x20, 0x60, 0x61, 0x41, 0x42, 0xc2, 0x86, 0x84, + 0x80, 0x00, 0x00, 0x18, 0x10, 0xfc, 0x02, 0x02, 0x04, 0x1c, 0x00, 0x00, 0x3e, 0xe1, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x01, 0x03, 0x03, 0x02, 0x06, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x10, 0x10, 0x30, 0x20, 0x3f, 0x00 + } + }; + static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = { + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x30, 0x18, 0x0c, 0x38, + 0x60, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfe, 0xfe, 0x80, 0xc0, 0x60, 0x18, 0x0c, 0x02, 0x01, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x08, 0x10, 0x10, 0x18, 0x08, 0xfc, 0x00, 0x00, + 0xf9, 0xff, 0xe3, 0xe0, 0xc0, 0x40, 0x60, 0x20, 0x20, 0x60, 0x41, 0x40, 0xc3, 0x82, 0x86, 0x04, + 0x00, 0x00, 0x00, 0x18, 0x18, 0xfc, 0x06, 0x06, 0x04, 0x38, 0x00, 0x00, 0x1c, 0xe7, 0x00, 0x00, + 0xf0, 0xfc, 0x03, 0x00, 0x01, 0x07, 0x7c, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x01, 0x03, 0x02, 0x02, 0x06, 0x07, 0x04, 0x0c, 0x08, 0x08, 0x18, 0x10, 0x30, 0x21, 0x3f, 0x38 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x30, 0x18, 0x0c, 0x38, + 0x60, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xe0, 0xf8, 0x04, 0x04, 0x0c, 0x3c, 0x06, 0x03, 0x01, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x02, 0x06, 0x0c, 0x18, 0x98, 0x08, 0x0c, 0xfc, 0x00, 0x00, + 0x03, 0x07, 0x04, 0x0c, 0x08, 0x08, 0x18, 0x10, 0x10, 0x30, 0x20, 0x20, 0x61, 0x43, 0x43, 0xc2, + 0x80, 0x80, 0x80, 0x8c, 0x80, 0x00, 0x00, 0xe0, 0xf8, 0x7e, 0x3f, 0x1f, 0x1f, 0x7d, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0x70, + 0x30, 0x38, 0x19, 0x0f, 0x1e, 0x1c, 0x79, 0xf8, 0xe8, 0xc4, 0x84, 0x08, 0x08, 0x18, 0x1f, 0x1c + }, + }; + + //assumes 1 frame prep stage + void animation_phase(void) { + if(get_current_wpm() <=IDLE_SPEED){ + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE); + } + if(get_current_wpm() >IDLE_SPEED && get_current_wpm() 1 + oled_write_raw_P(prep[0], ANIM_SIZE); // remove if IDLE_FRAMES >1 + } + if(get_current_wpm() >=TAP_SPEED){ + current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; + oled_write_raw_P(tap[abs((TAP_FRAMES-1)-current_tap_frame)], ANIM_SIZE); + } + } + if(get_current_wpm() != 000) { + oled_on(); // not essential but turns on animation OLED with any alpha keypress + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + anim_sleep = timer_read32(); + } else { + if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { + oled_off(); + } else { + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + } + } +} +void oled_task_user(void) { + + render_anim(); + oled_set_cursor(0,6); + sprintf(wpm_str, " WPM: %03d", get_current_wpm()); + oled_set_cursor(0,5); + oled_write(wpm_str, false); + + render_status(); + + } + +#endif diff --git a/keyboards/drakon/keymaps/default/readme.md b/keyboards/drakon/keymaps/default/readme.md new file mode 100644 index 0000000000..e56b5a93bb --- /dev/null +++ b/keyboards/drakon/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for drakon diff --git a/keyboards/drakon/keymaps/logo/keymap.c b/keyboards/drakon/keymaps/logo/keymap.c new file mode 100644 index 0000000000..a20559d9e1 --- /dev/null +++ b/keyboards/drakon/keymaps/logo/keymap.c @@ -0,0 +1,110 @@ +/* Copyright 2020 jagdpietr + * + * 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 QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum Layer_names { +_Base, +_FN, +_Lyr2 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_Base] = LAYOUT_ansi( + 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_DEL, KC_MUTE, + 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_MPRV, KC_MPLY, KC_MNXT, + 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_MSTP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_APP, MO(_FN), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [_FN] = LAYOUT_ansi( + KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ), + + [_Lyr2] = LAYOUT_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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 encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} + +#ifdef OLED_DRIVER_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_90; // flips the display 90 degrees if offhand + +} + +void oled_task_user(void) { + static const char PROGMEM drakon_logo[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0x40, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x18, 0x18, 0x11, 0x17, 0x11, 0x12, 0x22, 0x24, 0x28, 0x59, + 0x52, 0xec, 0xf0, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1e, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, + 0x03, 0xfc, 0x01, 0x03, 0x07, 0x1e, 0x78, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x09, 0x0b, 0x06, 0x1c, 0x18, 0x10, 0x10, 0x30, + 0x2e, 0x27, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21, 0x27, 0x3c, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x1c, 0x22, 0x41, 0x41, 0xc1, 0x22, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x41, 0x47, 0x06, 0x38, + 0x38, 0x00, 0x47, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x41, 0x7f, 0x4d, 0x0c, 0x10, 0x63, 0x41, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + oled_set_cursor(0,4); + oled_write_raw_P(drakon_logo, 192); + + // Host Keyboard Layer Status + oled_set_cursor(0,10); + oled_write_P(PSTR("Lyr: "), false); + + switch (get_highest_layer(layer_state)) { + case _Base: + oled_write_P(PSTR("Base\n"), false); + break; + case _FN: + oled_write_P(PSTR("FN\n"), false); + break; + case _Lyr2: + oled_write_P(PSTR("Lyr2\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_set_cursor(0,12); + oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); + + +} + +#endif diff --git a/keyboards/drakon/keymaps/logo/readme.md b/keyboards/drakon/keymaps/logo/readme.md new file mode 100644 index 0000000000..419f434ea0 --- /dev/null +++ b/keyboards/drakon/keymaps/logo/readme.md @@ -0,0 +1 @@ +# The logo keymap for drakon diff --git a/keyboards/drakon/keymaps/wkl/keymap.c b/keyboards/drakon/keymaps/wkl/keymap.c new file mode 100644 index 0000000000..ca261f35b5 --- /dev/null +++ b/keyboards/drakon/keymaps/wkl/keymap.c @@ -0,0 +1,248 @@ +/* Copyright 2020 jagdpietr + * + * 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 QMK_KEYBOARD_H + +char wpm_str[10]; + +// Defines names for use in layer keycodes and the keymap +enum Layer_names { +_Base, +_FN, +_Lyr2 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_Base] = LAYOUT_wkl( + 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_DEL, KC_MUTE, + 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_MPRV, KC_MPLY, KC_MNXT, + 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_MSTP, + 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_LALT, KC_SPC, KC_APP, MO(_FN), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [_FN] = LAYOUT_wkl( + KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ), + + [_Lyr2] = LAYOUT_wkl( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ) + +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} + +#ifdef OLED_DRIVER_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_90; // flips the display 90 degrees if offhand + +} + +void render_status(void) { + //Host Keyboard Layer Status + oled_set_cursor(0,10); + oled_write_P(PSTR("Lyr: "), false); + + switch (get_highest_layer(layer_state)) { + case _Base: + oled_write_P(PSTR("Base\n"), false); + break; + case _FN: + oled_write_P(PSTR("FN\n"), false); + break; + case _Lyr2: + oled_write_P(PSTR("Lyr2\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_set_cursor(0,12); + oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); + +} + +// WPM-responsive animation stuff here +#define IDLE_FRAMES 5 +#define IDLE_SPEED 40 // below this wpm value your animation will idle + +// #define PREP_FRAMES 1 // uncomment if >1 + +#define TAP_FRAMES 2 +#define TAP_SPEED 60 // above this wpm value typing animation to triggere + +#define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms +// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing +#define ANIM_SIZE 128 // number of bytes in array, minimize for adequate firmware size, max is 1024 + +uint32_t anim_timer = 0; +uint32_t anim_sleep = 0; +uint8_t current_idle_frame = 0; +// uint8_t current_prep_frame = 0; // uncomment if PREP_FRAMES >1 +uint8_t current_tap_frame = 0; + +// Images credit j-inc(/James Incandenza) and pixelbenny. Credit to obosob for initial animation approach. +static void render_anim(void) { + static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x60, + 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x0c, 0x06, 0x03, 0x81, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x0c, 0x18, 0x10, 0x18, 0x08, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x3e, 0x23, 0x20, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x21, 0x21, 0x63, 0x43, 0x42, + 0xc0, 0x80, 0x88, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x05, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x06, 0x04, 0x0c, 0x08, 0x0b, 0x08, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x60, 0x30, 0x10, 0x08, 0x04, 0x04, 0x06, 0x01, 0x01, 0x06, + 0x04, 0x0c, 0x08, 0x18, 0x10, 0x30, 0x20, 0x40, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0x00, 0x00, + 0xe0, 0x98, 0x04, 0x03, 0x01, 0x80, 0x80, 0x80, 0x80, 0x84, 0x86, 0x80, 0x08, 0x18, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x78, 0x87, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, + 0x02, 0x02, 0x0e, 0x3e, 0x20, 0x20, 0x20, 0x10, 0x10, 0x18, 0x18, 0x10, 0x10, 0x33, 0x3e, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x60, + 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x0c, 0x06, 0x03, 0x81, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x0c, 0x18, 0x10, 0x18, 0x08, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x3e, 0x23, 0x20, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x21, 0x21, 0x63, 0x43, 0x42, + 0xc0, 0x80, 0x88, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x05, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x06, 0x04, 0x0c, 0x08, 0x0b, 0x08, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x60, 0x30, 0x10, 0x08, 0x04, 0x04, 0x06, 0x01, 0x01, 0x06, + 0x04, 0x0c, 0x08, 0x18, 0x10, 0x30, 0x20, 0x40, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0x00, 0x00, + 0xe0, 0x98, 0x04, 0x03, 0x01, 0x80, 0x80, 0x80, 0x80, 0x84, 0x86, 0x80, 0x08, 0x18, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x78, 0x87, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, + 0x02, 0x02, 0x0e, 0x3e, 0x20, 0x20, 0x20, 0x10, 0x10, 0x18, 0x18, 0x10, 0x10, 0x33, 0x3e, 0x00 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x60, 0x30, 0x18, 0x60, + 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x0c, 0x06, 0x03, 0x81, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x0c, 0x18, 0x10, 0x18, 0x08, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x3e, 0x23, 0x20, 0x20, 0x20, 0x30, 0x10, 0x10, 0x10, 0x30, 0x21, 0x21, 0x63, 0x43, 0x42, + 0xc0, 0x80, 0x88, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0xc0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x05, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x06, 0x04, 0x0c, 0x08, 0x0b, 0x08, 0x00 + } + }; + static const char PROGMEM prep[][ANIM_SIZE] = { + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x30, 0x18, 0x0c, 0x38, + 0x60, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xf8, 0x18, 0x0c, 0x0c, 0x38, 0x0c, 0x06, 0x03, 0x01, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x03, 0x02, 0x06, 0x04, 0x08, 0x18, 0x30, 0x18, 0x18, 0xf8, 0x00, 0x00, + 0x00, 0x07, 0x0c, 0x18, 0x18, 0x10, 0x10, 0x10, 0x20, 0x60, 0x61, 0x41, 0x42, 0xc2, 0x86, 0x84, + 0x80, 0x00, 0x00, 0x18, 0x10, 0xfc, 0x02, 0x02, 0x04, 0x1c, 0x00, 0x00, 0x3e, 0xe1, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x01, 0x03, 0x03, 0x02, 0x06, 0x07, 0x06, 0x0c, 0x0c, 0x0c, 0x10, 0x10, 0x30, 0x20, 0x3f, 0x00 + } + }; + static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = { + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x30, 0x18, 0x0c, 0x38, + 0x60, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfe, 0xfe, 0x80, 0xc0, 0x60, 0x18, 0x0c, 0x02, 0x01, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x06, 0x04, 0x08, 0x10, 0x10, 0x18, 0x08, 0xfc, 0x00, 0x00, + 0xf9, 0xff, 0xe3, 0xe0, 0xc0, 0x40, 0x60, 0x20, 0x20, 0x60, 0x41, 0x40, 0xc3, 0x82, 0x86, 0x04, + 0x00, 0x00, 0x00, 0x18, 0x18, 0xfc, 0x06, 0x06, 0x04, 0x38, 0x00, 0x00, 0x1c, 0xe7, 0x00, 0x00, + 0xf0, 0xfc, 0x03, 0x00, 0x01, 0x07, 0x7c, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x01, 0x03, 0x02, 0x02, 0x06, 0x07, 0x04, 0x0c, 0x08, 0x08, 0x18, 0x10, 0x30, 0x21, 0x3f, 0x38 + }, + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x30, 0x18, 0x0c, 0x38, + 0x60, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xe0, 0xf8, 0x04, 0x04, 0x0c, 0x3c, 0x06, 0x03, 0x01, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x02, 0x06, 0x0c, 0x18, 0x98, 0x08, 0x0c, 0xfc, 0x00, 0x00, + 0x03, 0x07, 0x04, 0x0c, 0x08, 0x08, 0x18, 0x10, 0x10, 0x30, 0x20, 0x20, 0x61, 0x43, 0x43, 0xc2, + 0x80, 0x80, 0x80, 0x8c, 0x80, 0x00, 0x00, 0xe0, 0xf8, 0x7e, 0x3f, 0x1f, 0x1f, 0x7d, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf0, 0x70, + 0x30, 0x38, 0x19, 0x0f, 0x1e, 0x1c, 0x79, 0xf8, 0xe8, 0xc4, 0x84, 0x08, 0x08, 0x18, 0x1f, 0x1c + }, + }; + + //assumes 1 frame prep stage + void animation_phase(void) { + if(get_current_wpm() <=IDLE_SPEED){ + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE); + } + if(get_current_wpm() >IDLE_SPEED && get_current_wpm() 1 + oled_write_raw_P(prep[0], ANIM_SIZE); // remove if IDLE_FRAMES >1 + } + if(get_current_wpm() >=TAP_SPEED){ + current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; + oled_write_raw_P(tap[abs((TAP_FRAMES-1)-current_tap_frame)], ANIM_SIZE); + } + } + if(get_current_wpm() != 000) { + oled_on(); // not essential but turns on animation OLED with any alpha keypress + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + anim_sleep = timer_read32(); + } else { + if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { + oled_off(); + } else { + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + } + } +} +void oled_task_user(void) { + + render_anim(); + oled_set_cursor(0,6); + sprintf(wpm_str, " WPM: %03d", get_current_wpm()); + oled_set_cursor(0,5); + oled_write(wpm_str, false); + + render_status(); + + } + +#endif diff --git a/keyboards/drakon/keymaps/wkl/readme.md b/keyboards/drakon/keymaps/wkl/readme.md new file mode 100644 index 0000000000..46356035b0 --- /dev/null +++ b/keyboards/drakon/keymaps/wkl/readme.md @@ -0,0 +1 @@ +# The Winkeyless keymap for drakon diff --git a/keyboards/drakon/readme.md b/keyboards/drakon/readme.md new file mode 100644 index 0000000000..f20bdfdf64 --- /dev/null +++ b/keyboards/drakon/readme.md @@ -0,0 +1,14 @@ +# drakon + +![drakon](https://i.imgur.com/J5PkdURl.jpg) + +60% keyboard with OLED and 4-directional press Encoder + +* Keyboard Maintainer: [jagdpietr](https://github.com/JagdPietr) +* Hardware Supported: Atmega32u4-AU + +Make example for this keyboard (after setting up your build environment): + + make drakon:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/drakon/rules.mk b/keyboards/drakon/rules.mk new file mode 100644 index 0000000000..a74fce2898 --- /dev/null +++ b/keyboards/drakon/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LTO_ENABLE = yes +WPM_ENABLE = yes +OLED_DRIVER_ENABLE = yes +ENCODER_ENABLE = yes diff --git a/keyboards/dz60/config.h b/keyboards/dz60/config.h index bb7b6ae7da..3699ef7552 100644 --- a/keyboards/dz60/config.h +++ b/keyboards/dz60/config.h @@ -8,7 +8,6 @@ #define DEVICE_VER 0x0001 #define MANUFACTURER KBDFans #define PRODUCT DZ60 -#define DESCRIPTION DZ60 Keyboard /* key matrix size */ #define MATRIX_ROWS 5 diff --git a/keyboards/dz60/keymaps/chrisae9/config.h b/keyboards/dz60/keymaps/chrisae9/config.h index 659970b72a..047734e7d1 100644 --- a/keyboards/dz60/keymaps/chrisae9/config.h +++ b/keyboards/dz60/keymaps/chrisae9/config.h @@ -8,6 +8,20 @@ #define RGBLIGHT_SAT_STEP 8 #undef RGBLIGHT_VAL_STEP #define RGBLIGHT_VAL_STEP 16 +#undef RGBLIGHT_ANIMATIONS + +/* In order */ +#define RGBLIGHT_EFFECT_BREATHING +#undef RGBLIGHT_EFFECT_RAINBOW_MOOD +#undef RGBLIGHT_EFFECT_RAINBOW_SWIRL +#undef RGBLIGHT_EFFECT_SNAKE +#undef RGBLIGHT_EFFECT_KNIGHT +#undef RGBLIGHT_EFFECT_CHRISTMAS +#undef RGBLIGHT_EFFECT_STATIC_GRADIENT +#undef RGBLIGHT_EFFECT_RGB_TEST +#undef RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_TWINKLE + /* Mouse Config */ #define MOUSEKEY_DELAY 0 diff --git a/keyboards/dz60/keymaps/chrisae9/keymap.c b/keyboards/dz60/keymaps/chrisae9/keymap.c index 9ba7e7b01d..5893de6e63 100644 --- a/keyboards/dz60/keymaps/chrisae9/keymap.c +++ b/keyboards/dz60/keymaps/chrisae9/keymap.c @@ -2,38 +2,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC, + LAYOUT_directional( + 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_NO, 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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(2), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(3), KC_LEFT, KC_NO, KC_DOWN, KC_RIGHT), - LAYOUT( - KC_CAPS, 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_NO, KC_BSPC, - KC_TRNS, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH, KC_EQL, KC_TRNS, - KC_GESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, - KC_LSFT, KC_NO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_UP, MO(2), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(3), KC_LEFT, KC_NO, KC_DOWN, KC_RIGHT), + KC_GESC, 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, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_MINS, KC_BSPC, KC_RALT, MO(2), KC_LEFT, KC_DOWN, KC_RIGHT), - LAYOUT( + LAYOUT_directional( 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_NO, KC_DEL, - KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - TG(4), KC_TRNS, KC_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, TG(1), TG(1), TG(1), MO(3), KC_HOME, KC_NO, KC_PGDN, KC_END), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + TG(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_HOME, KC_PGDN, KC_END), - LAYOUT( + LAYOUT_directional( KC_PWR, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BRID, KC_BRIU, KC_NO, KC_PSCR, KC_TRNS, KC_PGUP, KC_MS_U, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_MPLY, - KC_TRNS, KC_NO, RGB_M_P, RGB_M_B, KC_BTN3, KC_BTN4, KC_BTN5, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, RGB_SAI, RGB_TOG, - KC_TRNS, KC_TRNS, KC_MS_BTN2, KC_MS_BTN1, KC_MS_BTN1, KC_MS_BTN1, KC_TRNS, RGB_HUD, KC_NO, RGB_SAD, RGB_HUI), + KC_TRNS, RGB_RMOD, RGB_MOD, KC_BTN3, KC_BTN4, KC_BTN5, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, RGB_TOG, RGB_SAI, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN1, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI), - LAYOUT( + LAYOUT_directional( KC_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, - TG(4), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + TG(3), KC_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), - + }; diff --git a/keyboards/dz60/keymaps/chrisae9/readme.md b/keyboards/dz60/keymaps/chrisae9/readme.md index 764a978782..9e85864fa5 100644 --- a/keyboards/dz60/keymaps/chrisae9/readme.md +++ b/keyboards/dz60/keymaps/chrisae9/readme.md @@ -4,15 +4,15 @@ This is a custom keymap for the layout of the DZ60. ## Keyboard Picture -![Keyboard Picture](https://i.imgur.com/cbKxxx4.jpg) +![Keyboard](https://i.imgur.com/qyWgShY.png) ## Keyboard Layout -![Chris DZ60](https://i.imgur.com/sILXwXc.png) +![Chris DZ60](https://i.imgur.com/6mwsEOl.png) ## Setup -[QMK Tookbox Download](https://github.com/qmk/qmk_toolbox/releases/tag/0.0.13) +[QMK Toolbox Download](https://github.com/qmk/qmk_toolbox/releases/tag/0.0.13) [MYSYS2 for Windows](http://www.msys2.org/) @@ -29,5 +29,5 @@ util/qmk_install.sh ``` bash #From the qmk_firware directory run -make dz60:chrisae9:flash +make dz60:chrisae9 ``` diff --git a/keyboards/dz60/keymaps/coppertop/keymap.c b/keyboards/dz60/keymaps/coppertop/keymap.c new file mode 100644 index 0000000000..8586f920f9 --- /dev/null +++ b/keyboards/dz60/keymaps/coppertop/keymap.c @@ -0,0 +1,95 @@ + /* Copyright 2020 Philip Chan + * + * 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 QMK_KEYBOARD_H + +//Layers +enum layer_names { + _QWERTY, + _FN, + _MEDIA, +}; + +//Custom Keymap Definitions +#define KC_CAD LALT(LCTL(KC_DEL)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty Base layer + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSpc| Del | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * | `/_Media| A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / |Home | Up |End | + * |-----------------------------------------------------------------------------------------+ + * | LCtrl | LGui | LAlt | Space | Fn | Space | F7 | F10 |Left |Down |Right| + * `----------------------------------------------------------------------------------------' + */ + + [_QWERTY] = LAYOUT_directional( + 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_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + LT(_MEDIA,KC_GRV), 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_HOME, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_SPC, KC_F7, KC_F10, KC_LEFT, KC_DOWN, KC_RGHT + ), + +/* F-Key/Lighting/whatever layer + * ,-----------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | | Ins | + * |-----------------------------------------------------------------------------------------+ + * | |R_Tog|R_HUI|R_SAI|R_VAI| | | | | | | | | KC_CAD | + * |-----------------------------------------------------------------------------------------+ + * | Caps | |R_HUD|R_SAD| | | | | | | SLCK|PAUSE| Print Screen| + * |-----------------------------------------------------------------------------------------+ + * | |R_M_P|R_M_B|R_M_R|R_M_SW|R_M_S|R_M_K|R_M_X|R_M_G| | |PgUp |BLUP |PgDn | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | |BLTog|BLDN |BLInc| + * `----------------------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT_directional( + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_INS, + XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_CAD, + KC_CAPS, XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLCK, KC_PAUS, KC_PSCR, + _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, XXXXXXX, XXXXXXX, KC_PGUP, BL_INC, KC_PGDN, + _______, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, BL_TOGG, BL_DEC, BL_STEP + ), + +/* SFX/Multimedia/Numpad layer + * ,-----------------------------------------------------------------------------------------. + * | | | | | | | | | / | * | - | = | |Trns |Trns | + * |-----------------------------------------------------------------------------------------+ + * | | | Prev | Play| Next| | | 7 | 8 | 9 | + | | | RESET | + * |-----------------------------------------------------------------------------------------+ + * | | |Mute | VUp | VDn | | | 4 | 5 | 6 | + | | Trns | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | 1 | 2 | 3 |NumEN| | | | + * |-----------------------------------------------------------------------------------------+ + * | Trns | Trns | Trns | Trns | | 0 | . | | | | | + * `----------------------------------------------------------------------------------------' + */ + + [_MEDIA] = LAYOUT_directional( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSLS, KC_PAST, KC_PMNS, KC_PEQL, XXXXXXX, _______, _______, + XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PPLS, XXXXXXX, XXXXXXX, RESET, + _______, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PPLS, XXXXXXX, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PENT, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, KC_P0, KC_PDOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; diff --git a/keyboards/dz60/keymaps/coppertop/rules.mk b/keyboards/dz60/keymaps/coppertop/rules.mk new file mode 100644 index 0000000000..2790548373 --- /dev/null +++ b/keyboards/dz60/keymaps/coppertop/rules.mk @@ -0,0 +1 @@ +BOOTMAGIC_ENABLE = no diff --git a/keyboards/dz60/keymaps/mrsendyyk/keymap.c b/keyboards/dz60/keymaps/mrsendyyk/keymap.c deleted file mode 100644 index 4b0b33e2c8..0000000000 --- a/keyboards/dz60/keymaps/mrsendyyk/keymap.c +++ /dev/null @@ -1,115 +0,0 @@ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* - * Default Layer [0] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [0] = LAYOUT_60_ansi_arrow(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, - 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_RSFT, KC_UP, KC_SLSH, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT - ), - - /* - * Fn Layer [1] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [1] = LAYOUT_60_ansi_arrow(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_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, - KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, - KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, - KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT - ), - - /* - * Fn Layer [2] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │ │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [2] = LAYOUT_60_ansi_arrow(KC_TRNS, KC_TRNS, KC_TRNS, 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_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ) -}; - -void keyboard_post_init_user(void) { - rgblight_enable_noeeprom(); - rgblight_sethsv_noeeprom(0, 0, 0); -} - -/* RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer indicator */ - void update_led(void) { - /* Num Lock Indicator */ - if (host_keyboard_led_state().num_lock) { - rgblight_setrgb(225, 8, 0); - } - /* Scroll Lock Indicator */ - if (host_keyboard_led_state().scroll_lock) { - rgblight_setrgb(0, 100, 255); - } - } - - void led_set_user(uint8_t usb_led) { - /* Caps Lock Indicator */ - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B2); - rgblight_setrgb(100, 255, 100); - } - /* Layer Indicator */ - else { - switch (get_highest_layer(layer_state)) { - /* Fn Layer [1] Indicator */ - case 1: - rgblight_setrgb(255, 110, 0); - break; - /* Fn Layer [2] Indicator */ - case 2: - rgblight_setrgb(255, 110, 0); - break; - /* Default Layer [0] Indicator */ - default: - rgblight_setrgb(0, 0, 0); - break; - } - update_led(); - } - } - -layer_state_t layer_state_set_user(layer_state_t state) { - update_led(); - return state; -} diff --git a/keyboards/dz60/keymaps/mrsendyyk/readme.md b/keyboards/dz60/keymaps/mrsendyyk/readme.md deleted file mode 100644 index f5b74d8ebd..0000000000 --- a/keyboards/dz60/keymaps/mrsendyyk/readme.md +++ /dev/null @@ -1,56 +0,0 @@ -# [Sendy YK](https://mr.sendyyk.com)'s Keymap -`LAYOUT_60_ansi_arrow` with RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer indicator. - -### Default Layer [0] - -``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ -``` - -### Fn Layer [1] -Press and hold *right* **Ctl** key. -``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ -``` - -### Fn Layer [2] -Press and hold *right* **Alt** key. -``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│ │ │ │ │ │ │ │ │ │ │ │ │ │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│ │ │ │ │ │ │ │ │ │ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ -``` - -## Build The Firmware -You will need to build the firmware. To do so go to your terminal window and run the compile command: - - qmk compile -kb dz60 -km mrsendyyk -See [The Complete Newbs Guide To QMK](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/dz60/keymaps/pevecyan/keymap.c b/keyboards/dz60/keymaps/pevecyan/keymap.c index 897b6260ba..8ae4899ac8 100644 --- a/keyboards/dz60/keymaps/pevecyan/keymap.c +++ b/keyboards/dz60/keymaps/pevecyan/keymap.c @@ -8,11 +8,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( \ - KC_GESC,SI_1, SI_2, SI_3, SI_4, SI_5, SI_6, SI_7, SI_8, SI_9, SI_0, SI_QOT, SI_PLUS,XXXXXXX,KC_BSPC, \ - KC_TAB, SI_Q, SI_W, SI_E, SI_R, SI_T, SI_Z, SI_U, SI_I, SI_O, SI_P, SI_GRV, SI_TILD,CARON, \ - MO(2), SI_A, SI_S, SI_D, SI_F, SI_G, SI_H, SI_J, SI_K, SI_L, KC_SCLN,KC_QUOT,KC_ENT, \ + KC_GESC,SI_1, SI_2, SI_3, SI_4, SI_5, SI_6, SI_7, SI_8, SI_9, SI_0, SI_QUOT, SI_PLUS,XXXXXXX,KC_BSPC, \ + KC_TAB, SI_Q, SI_W, SI_E, SI_R, SI_T, SI_Z, SI_U, SI_I, SI_O, SI_P, SI_GRV, SI_TILD,CARON, \ + MO(2), SI_A, SI_S, SI_D, SI_F, SI_G, SI_H, SI_J, SI_K, SI_L, KC_SCLN, KC_QUOT,KC_ENT, \ KC_LSFT,XXXXXXX,SI_Y, SI_X, SI_C, SI_V, SI_B, SI_N, SI_M, SI_COMM,SI_DOT, SI_MINS, KC_RSFT,XXXXXXX, \ - KC_LCTL,KC_LGUI, KC_LALT,KC_SPC, KC_SPC, KC_SPC, KC_RALT,MO(3), XXXXXXX,MO(1), KC_F5 \ + KC_LCTL,KC_LGUI, KC_LALT,KC_SPC, KC_SPC, KC_SPC, KC_RALT,MO(3), XXXXXXX,MO(1), KC_F5 \ ), [1] = LAYOUT( \ @@ -33,9 +33,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [3] = LAYOUT( \ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______, _______,_______,_______,_______,_______,SI_ZV, _______,_______,_______,_______,_______,_______,_______, \ - _______, _______,SI_SV, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______,_______,_______,_______,SI_CV, _______,_______,_______,_______,_______,_______,_______, _______,_______, \ + _______, _______,_______,_______,_______,_______,SI_ZCAR,_______,_______,_______,_______,_______,_______,_______, \ + _______, _______,SI_SCAR, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______,_______,SI_CCAR, _______,_______,_______,_______,_______,_______,_______, _______,_______, \ _______,_______, _______,_______, _______, _______, _______,_______,_______,_______,_______ \ ), }; diff --git a/keyboards/dz60/keymaps/spotpuff/keymap.c b/keyboards/dz60/keymaps/spotpuff/keymap.c new file mode 100644 index 0000000000..edbe635e39 --- /dev/null +++ b/keyboards/dz60/keymaps/spotpuff/keymap.c @@ -0,0 +1,95 @@ + /* Copyright 2020 Philip Chan + * + * 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 QMK_KEYBOARD_H + +//Layers +enum layer_names { + _QWERTY, + _FN, + _MEDIA, +}; + +//Custom Keymap Definitions +#define KC_CAD LALT(LCTL(KC_DEL)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty Base layer + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSpc| Del | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * | `/_Media| A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / |PgUp | Up |PgDn | + * |-----------------------------------------------------------------------------------------+ + * | LCtrl | LGui | LAlt | Space | Fn | Space |Home | End |Left |Down |Right| + * `----------------------------------------------------------------------------------------' + */ + + [_QWERTY] = LAYOUT_directional( + 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_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + LT(_MEDIA,KC_GRV), 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_PGUP, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_SPC, KC_HOME, KC_END, KC_LEFT, KC_DOWN, KC_RGHT + ), + +/* F-Key/Lighting/whatever layer + * ,-----------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | | Ins | + * |-----------------------------------------------------------------------------------------+ + * | |R_Tog|R_HUI|R_SAI|R_VAI| | | | | | | | | KC_CAD | + * |-----------------------------------------------------------------------------------------+ + * | Caps | |R_HUD|R_SAD| | | | | | | SLCK|PAUSE| Print Screen| + * |-----------------------------------------------------------------------------------------+ + * | Trns |R_M_P|R_M_B|R_M_R|R_M_SW|R_M_S|R_M_K|R_M_X|R_M_G| | | |BLUP | | + * |-----------------------------------------------------------------------------------------+ + * | Trns | Trns | Trns | | Trns | | | |BLTog|BLDN |BLInc| + * `----------------------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT_directional( + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_INS, + XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_CAD, + KC_CAPS, XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLCK, KC_PAUS, KC_PSCR, + _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, XXXXXXX, XXXXXXX, XXXXXXX, BL_INC, XXXXXXX, + _______, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, BL_TOGG, BL_DEC, BL_STEP + ), + +/* SFX/Multimedia/Numpad layer + * ,-----------------------------------------------------------------------------------------. + * | | | | | | |NumLk| | / | * | - | = | |Trns |Trns | + * |-----------------------------------------------------------------------------------------+ + * | | | Prev | Play| Next| | | 7 | 8 | 9 | + | | | RESET | + * |-----------------------------------------------------------------------------------------+ + * | Trns | |Mute | VUp | VDn | | | 4 | 5 | 6 | + | | Trns | + * |-----------------------------------------------------------------------------------------+ + * | Trns | | | | | | | 1 | 2 | 3 |NumEN| | | | + * |-----------------------------------------------------------------------------------------+ + * | Trns | Trns | Trns | Trns | Trns | 0 | . | | | | | + * `----------------------------------------------------------------------------------------' + */ + + [_MEDIA] = LAYOUT_directional( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, XXXXXXX, KC_PSLS, KC_PAST, KC_PMNS, KC_PEQL, XXXXXXX, _______, _______, + XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PPLS, XXXXXXX, XXXXXXX, RESET, + _______, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PPLS, XXXXXXX, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PENT, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, KC_P0, KC_PDOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; diff --git a/keyboards/dz60/keymaps/spotpuff/rules.mk b/keyboards/dz60/keymaps/spotpuff/rules.mk new file mode 100644 index 0000000000..2790548373 --- /dev/null +++ b/keyboards/dz60/keymaps/spotpuff/rules.mk @@ -0,0 +1 @@ +BOOTMAGIC_ENABLE = no diff --git a/keyboards/dz60/keymaps/via/rules.mk b/keyboards/dz60/keymaps/via/rules.mk index ea9a831e17..ca9fed0e6b 100644 --- a/keyboards/dz60/keymaps/via/rules.mk +++ b/keyboards/dz60/keymaps/via/rules.mk @@ -1,2 +1,2 @@ -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes VIA_ENABLE = yes diff --git a/keyboards/dz60/readme.md b/keyboards/dz60/readme.md index eb6d28d5d6..55df690cf3 100644 --- a/keyboards/dz60/readme.md +++ b/keyboards/dz60/readme.md @@ -1,12 +1,14 @@ -# DZ60 +# DZ60 60% Mechanical Keyboard PCB -![dz60](https://cdn.shopify.com/s/files/1/1473/3902/files/1_6525343b-ee62-47e8-882a-05e316136a3f.jpg?v=1501657073) +![DZ60](https://cdn.shopify.com/s/files/1/1473/3902/products/c_1.jpg) -A customizable 60% keyboard. +## A Customizable 60% Mechanical Keyboard PCB + +![A Customizable 60% Mechanical Keyboard PCB](https://cdn.shopify.com/s/files/1/1473/3902/files/1_03_abb48769-9486-44bd-a761-7cd39d7e1bda.jpg) * Keyboard Maintainer: QMK Community -* Hardware Supported: DZ60 -* Hardware Availability: [KBDfans](https://kbdfans.myshopify.com/collections/pcb/products/dz60-60-pcb?variant=40971616717) +* Hardware Supported: DZ60 60% Mechanical Keyboard PCB +* Hardware Availability: [KBDfans](https://kbdfans.com/collections/60/products/dz60-60-pcb) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/dztech/dz60rgb/keymaps/xunz/rules.mk b/keyboards/dztech/dz60rgb/keymaps/xunz/rules.mk index 7a77be4939..d12c8dc44e 100644 --- a/keyboards/dztech/dz60rgb/keymaps/xunz/rules.mk +++ b/keyboards/dztech/dz60rgb/keymaps/xunz/rules.mk @@ -1,5 +1,4 @@ NKRO_ENABLE = yes # USB Nkey Rollover # VELOCIKEY_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes - +LTO_ENABLE = yes diff --git a/keyboards/dztech/dz60rgb_ansi/keymaps/badger/keymap.c b/keyboards/dztech/dz60rgb_ansi/keymaps/badger/keymap.c new file mode 100644 index 0000000000..1d2144d7f4 --- /dev/null +++ b/keyboards/dztech/dz60rgb_ansi/keymaps/badger/keymap.c @@ -0,0 +1,60 @@ +/* +Copyright 2020 Dan White + +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 "badger.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY_MAC] = LAYOUT_60_ansi(\ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_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, \ + MOVE_MAC, 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_LALT, KC_LGUI, KC_SPC, ADJUST, KC_RGUI, KC_RALT, MAC_POP), + + [_MOVE_MAC] = LAYOUT_60_ansi(\ + MAC_FRC, MM_LEFT, MM_RGHT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_0, IJ_TOP, IJ_BOTT, KC_DEL, \ + KC_BACK, IJ_STEP, IJ_INTO, IJ_OUT, IJ_RUN, IJ_STOP, _______, WD_BACK, KC_HOME, KC_END, WD_FRWD, IJ_BACK, IJ_FWD, KC_NEXT, \ + _______, MM_LH, MM_MAX, MM_RH, IJ_FIND, IJ_IMPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CM_RIGHT, CM_DOWN, _______, \ + _______, MM_UH, MM_BH, MAC_CPY, MAC_PST, IJ_IMPH, _______, IJ_REN, IJ_IMPL, IJ_DECL, IJ_USAG, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______), + + [_QWERTY_LINUX] = LAYOUT_60_ansi(\ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_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, \ + MOVE, 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_SPC, ADJUST, KC_LALT, KC_RGUI, KC_RCTL), + + [_MOVE_LINUX] = LAYOUT_60_ansi(\ + KC_GRV, VD_1, VD_2, VD_3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + KC_BACK, WM_VD1, WM_UH, WM_VD2, RESET, KC_MSTP, KC_MPLY, KC_PGUP, KC_HOME, KC_END, KC_PGDN, _______, _______, KC_NEXT, \ + _______, WM_LH, WM_MAX, WM_RH, WD_FRWD, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CS_RIGHT, CS_DOWN, _______, \ + _______, WM_VD3, WM_BH, OS_COPY, OS_PAST, WD_BACK, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______), + + [_ADJUST] = LAYOUT_60_ansi(\ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + _______, _______, _______, _______, KC_WREF, KC_MSTP, KC_MPLY, KC_PGUP, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_INS, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, DF_1, DF_2, KC_CAPS, _______, KC_MPRV, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, KC_WSCH, _______, \ + _______, _______, _______, _______, _______, _______, _______, MO(_CONFIG)), + + [_CONFIG] = LAYOUT_60_ansi(\ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + _______, NK_ON, NK_OFF, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \ + _______, GE_SWAP, GE_NORM, DEBUG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, RGB_M_B, _______, _______, RGB_TOG, _______, \ + _______, LAG_SWP, LAG_NRM, _______, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_SPD, RGB_M_K, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______) +}; + diff --git a/keyboards/dztech/dz65rgb/keymaps/chocol8/rules.mk b/keyboards/dztech/dz65rgb/keymaps/chocol8/rules.mk index 626329f811..1778a5e141 100644 --- a/keyboards/dztech/dz65rgb/keymaps/chocol8/rules.mk +++ b/keyboards/dztech/dz65rgb/keymaps/chocol8/rules.mk @@ -2,5 +2,4 @@ NKRO_ENABLE = yes # USB Nkey Rollover VELOCIKEY_ENABLE = yes # AUTO_SHIFT_ENABLE = yes # Auto Shift -LINK_TIME_OPTIMIZATION_ENABLE = yes - +LTO_ENABLE = yes diff --git a/keyboards/dztech/dz65rgb/keymaps/matthewrobo/rules.mk b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/rules.mk index 9a75bb29dc..29afe8cd03 100644 --- a/keyboards/dztech/dz65rgb/keymaps/matthewrobo/rules.mk +++ b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/rules.mk @@ -2,5 +2,4 @@ NKRO_ENABLE = yes # USB Nkey Rollover AUTO_SHIFT_ENABLE = yes # Auto Shift # VELOCIKEY_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes - +LTO_ENABLE = yes diff --git a/keyboards/dztech/dz65rgb/keymaps/pagondel/keymap.c b/keyboards/dztech/dz65rgb/keymaps/pagondel/keymap.c new file mode 100644 index 0000000000..277323987c --- /dev/null +++ b/keyboards/dztech/dz65rgb/keymaps/pagondel/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2020 pagondel + * + * 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 QMK_KEYBOARD_H + +enum layers { + _BL, + _FL, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,-----------------------------------------------------------------------------. + * |Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Backsp |~ ` | + * |-----------------------------------------------------------------------------| + * |Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |Del | + * |-----------------------------------------------------------------------------| + * |FN | A | S | D | F | G | H | J | K | L | ; | ' |Return |PgUp| + * |-----------------------------------------------------------------------------| + * |Shift | Z | X | C | V | B | N | M | , | . | / |Shift | Up |PgDn| + * |-----------------------------------------------------------------------------| + * |Ctrl |Win |Alt | Space |Alt | FN |Ctrl |Lef |Dow |Rig | + * `-----------------------------------------------------------------------------' + */ + [_BL] = LAYOUT_65_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, + KC_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, + 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_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, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + /* Keymap _FL: Function Layer + * ,-----------------------------------------------------------------------------. + * |Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 |F10 |F11 |F12 |DEL |PNTS| + * |-----------------------------------------------------------------------------| + * | |RgbT|RgbM|Hue+|Hue-|Sat+|Sat-|BR+ |BR- | | |SLCK|Paus|RST | | + * |-----------------------------------------------------------------------------| + * | |Eff+|Eff-| | | | | | | | | |EEP RST | | + * |-----------------------------------------------------------------------------| + * |Shift | | | | | |NK T|Mute|Vol-|Vol+| | |PgUp| | + * |-----------------------------------------------------------------------------| + * | | | | Play | | | |Home|PgDn|End | + * `-----------------------------------------------------------------------------' + */ + [_FL] = LAYOUT_65_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_PSCR, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, KC_SLCK, KC_PAUS, RESET, _______, + _______, RGB_SPI, RGB_SPD, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, _______, + KC_LSFT, _______, _______, _______, _______, _______, NK_TOGG, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_PGUP, _______, + _______, _______, _______, KC_MPLY, _______, _______, _______, KC_HOME, KC_VOLD, KC_END + ) +}; diff --git a/keyboards/dztech/dz65rgb/keymaps/pagondel/readme.md b/keyboards/dztech/dz65rgb/keymaps/pagondel/readme.md new file mode 100644 index 0000000000..8f55ce428a --- /dev/null +++ b/keyboards/dztech/dz65rgb/keymaps/pagondel/readme.md @@ -0,0 +1,35 @@ +# pagondel's DZ65RGB v2 layout + +``` + Keymap Default Layer + ,-----------------------------------------------------------------------------. + |Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Backsp |~ ` | + |-----------------------------------------------------------------------------| + |Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |Del | + |-----------------------------------------------------------------------------| + |FN | A | S | D | F | G | H | J | K | L | ; | ' |Return |PgUp| + |-----------------------------------------------------------------------------| + |Shift | Z | X | C | V | B | N | M | , | . | / |Shift | Up |PgDn| + |-----------------------------------------------------------------------------| + |Ctrl |Win |Alt | Space |Alt | FN |Ctrl |Lef |Dow |Rig | + `-----------------------------------------------------------------------------' +``` + +``` + Keymap Function Layer + ,-----------------------------------------------------------------------------. + |Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 |F10 |F11 |F12 |DEL |PNTS| + |-----------------------------------------------------------------------------| + | |RgbT|RgbM|Hue+|Hue-|Sat+|Sat-|BR+ |BR- | | |SLCK|Paus|RST | | + |-----------------------------------------------------------------------------| + | |Eff+|Eff-| | | | | | | | | |EEP RST | | + |-----------------------------------------------------------------------------| + |Shift | | | | | |NK T|Mute|Vol-|Vol+| | |PgUp| | + |-----------------------------------------------------------------------------| + | | | | Play | | | |Home|PgDn|End | + `-----------------------------------------------------------------------------' +``` + +### Build layout + +```qmk compile -kb dztech/dz65rgb/v2 -km pagondel``` diff --git a/keyboards/e88/config.h b/keyboards/e88/config.h new file mode 100644 index 0000000000..a077370c79 --- /dev/null +++ b/keyboards/e88/config.h @@ -0,0 +1,108 @@ +/* Copyright 2019 Maarten Dekkers + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4705 +#define PRODUCT_ID 0x0187 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Pink Labs +#define PRODUCT e88 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 17 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B7, D7, B4, C6, B5, B6 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, D0, D1, D2, D3, B3, B2, B1, E6, D5, D6, D4 } + +#define UNUSED_PINS {B0} + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#define QMK_ESC_OUTPUT F0 // usually COL +#define QMK_ESC_INPUT B7 // usually ROW diff --git a/keyboards/e88/e88.c b/keyboards/e88/e88.c new file mode 100644 index 0000000000..970b04ce4f --- /dev/null +++ b/keyboards/e88/e88.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Maarten Dekkers + * + * 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 "e88.h" diff --git a/keyboards/e88/e88.h b/keyboards/e88/e88.h new file mode 100644 index 0000000000..2fc0428e04 --- /dev/null +++ b/keyboards/e88/e88.h @@ -0,0 +1,45 @@ +/* Copyright 2019 Maarten Dekkers + * + * 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 . + */ +#pragma once + +#include "quantum.h" +#define XXX KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4f, \ + k50, k51, k52, k56, k5a, k5b, k5c, k5d, k5e, k5f, k5g \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX, XXX, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, XXX, k4f, XXX }, \ + { k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, k5a, k5b, k5c, k5d, k5e, k5f, k5g } \ +} diff --git a/keyboards/e88/info.json b/keyboards/e88/info.json new file mode 100644 index 0000000000..eb9c8365df --- /dev/null +++ b/keyboards/e88/info.json @@ -0,0 +1,109 @@ +{ + "keyboard_name": "e88", + "url": "", + "maintainer": "2-n", + "width": 18.25, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1.25, "y": 0}, + {"x": 2.25, "y": 0}, + {"x": 3.25, "y": 0}, + {"x": 4.25, "y": 0}, + {"x": 5.5, "y": 0}, + {"x": 6.5, "y": 0}, + {"x": 7.5, "y": 0}, + {"x": 8.5, "y": 0}, + {"x": 9.75, "y": 0}, + {"x": 10.75, "y": 0}, + {"x": 11.75, "y": 0}, + {"x": 12.75, "y": 0}, + {"x": 14, "y": 0}, + {"x": 15.25, "y": 0}, + {"x": 16.25, "y": 0}, + {"x": 17.25, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + {"x": 4, "y": 1.25}, + {"x": 5, "y": 1.25}, + {"x": 6, "y": 1.25}, + {"x": 7, "y": 1.25}, + {"x": 8, "y": 1.25}, + {"x": 9, "y": 1.25}, + {"x": 10, "y": 1.25}, + {"x": 11, "y": 1.25}, + {"x": 12, "y": 1.25}, + {"x": 13, "y": 1.25, "w": 2}, + {"x": 15.25, "y": 1.25}, + {"x": 16.25, "y": 1.25}, + {"x": 17.25, "y": 1.25}, + + {"x": 0, "y": 2.25, "w": 1.5}, + {"x": 1.5, "y": 2.25}, + {"x": 2.5, "y": 2.25}, + {"x": 3.5, "y": 2.25}, + {"x": 4.5, "y": 2.25}, + {"x": 5.5, "y": 2.25}, + {"x": 6.5, "y": 2.25}, + {"x": 7.5, "y": 2.25}, + {"x": 8.5, "y": 2.25}, + {"x": 9.5, "y": 2.25}, + {"x": 10.5, "y": 2.25}, + {"x": 11.5, "y": 2.25}, + {"x": 12.5, "y": 2.25}, + {"x": 13.5, "y": 2.25, "w": 1.5}, + {"x": 15.25, "y": 2.25}, + {"x": 16.25, "y": 2.25}, + {"x": 17.25, "y": 2.25}, + + {"x": 0, "y": 3.25, "w": 1.75}, + {"x": 1.75, "y": 3.25}, + {"x": 2.75, "y": 3.25}, + {"x": 3.75, "y": 3.25}, + {"x": 4.75, "y": 3.25}, + {"x": 5.75, "y": 3.25}, + {"x": 6.75, "y": 3.25}, + {"x": 7.75, "y": 3.25}, + {"x": 8.75, "y": 3.25}, + {"x": 9.75, "y": 3.25}, + {"x": 10.75, "y": 3.25}, + {"x": 11.75, "y": 3.25}, + {"x": 12.75, "y": 3.25}, + {"x": 13.75, "y": 3.25, "w": 1.25}, + + {"x": 0, "y": 4.25, "w": 1.25}, + {"x": 1.25, "y": 4.25}, + {"x": 2.25, "y": 4.25}, + {"x": 3.25, "y": 4.25}, + {"x": 4.25, "y": 4.25}, + {"x": 5.25, "y": 4.25}, + {"x": 6.25, "y": 4.25}, + {"x": 7.25, "y": 4.25}, + {"x": 8.25, "y": 4.25}, + {"x": 9.25, "y": 4.25}, + {"x": 10.25, "y": 4.25}, + {"x": 11.25, "y": 4.25}, + {"x": 12.25, "y": 4.25, "w": 1.75}, + {"x": 14, "y": 4.25}, + {"x": 16.25, "y": 4.25}, + + {"x": 0, "y": 5.25, "w": 1.25}, + {"x": 1.25, "y": 5.25, "w": 1.25}, + {"x": 2.5, "y": 5.25, "w": 1.25}, + {"x": 3.75, "y": 5.25, "w": 6.25}, + {"x": 10, "y": 5.25, "w": 1.25}, + {"x": 11.25, "y": 5.25, "w": 1.25}, + {"x": 12.5, "y": 5.25, "w": 1.25}, + {"x": 13.75, "y": 5.25, "w": 1.25}, + {"x": 15.25, "y": 5.25}, + {"x": 16.25, "y": 5.25}, + {"x": 17.25, "y": 5.25} + ] + } + } +} diff --git a/keyboards/e88/keymaps/default/keymap.c b/keyboards/e88/keymaps/default/keymap.c new file mode 100644 index 0000000000..e58ffd12dc --- /dev/null +++ b/keyboards/e88/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2019 Maarten Dekkers + * + * 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 QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _MA, //Main layer + _FN //Function layer +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_MA] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LGUI, 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, KC_BSLS, 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, MO(_FN), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RALT, RESET, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT), +[_FN] = LAYOUT_all( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +}; diff --git a/keyboards/e88/keymaps/default/readme.md b/keyboards/e88/keymaps/default/readme.md new file mode 100644 index 0000000000..4918034cac --- /dev/null +++ b/keyboards/e88/keymaps/default/readme.md @@ -0,0 +1 @@ +Default e88 firmware. \ No newline at end of file diff --git a/keyboards/e88/readme.md b/keyboards/e88/readme.md new file mode 100644 index 0000000000..c92fb94760 --- /dev/null +++ b/keyboards/e88/readme.md @@ -0,0 +1,19 @@ +# e88 + +![pink labs logo](https://cdn.shopify.com/s/files/1/0302/4198/0548/files/logo_x60.png?v=1579122787) + +A tenkeyless PCB featuring the DK Saver layout, as designed for the Bliss keyboard by Pink Labs. + +* Maintainer: [elli](https://github.com/2-n) +* Hardware Supported: e88 f13 PCB (proto and final rev) +* Hardware Availability: [labs.pink](http://www.labs.pink/) + +Make example for this keyboard (after setting up your build environment): + + make e88:default + +Flashing example for this keyboard: + + make e88:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/e88/rules.mk b/keyboards/e88/rules.mk new file mode 100644 index 0000000000..dc1dcdb851 --- /dev/null +++ b/keyboards/e88/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = qmk-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/ergodash/mini/keymaps/toyoshimahidenori/config.h b/keyboards/ergodash/mini/keymaps/toyoshimahidenori/config.h new file mode 100644 index 0000000000..df04873a97 --- /dev/null +++ b/keyboards/ergodash/mini/keymaps/toyoshimahidenori/config.h @@ -0,0 +1,33 @@ +/* +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 . +*/ + +#pragma once + + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/ergodash/mini/keymaps/toyoshimahidenori/keymap.c b/keyboards/ergodash/mini/keymaps/toyoshimahidenori/keymap.c new file mode 100644 index 0000000000..7224af7a00 --- /dev/null +++ b/keyboards/ergodash/mini/keymaps/toyoshimahidenori/keymap.c @@ -0,0 +1,141 @@ +/* Copyright 2020 Toyoshima Hidenori +* +* 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 QMK_KEYBOARD_H + +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +#define EISU LALT(KC_GRV) +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,----------------------------------------------------------------------------------------------------------------------. + * | TAB | Q | W | E | R | T | - | | = | Y | U | I | O | P | \ | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | [ | | ] | H | J | K | L | ; | ' | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | GUI | | GUI | N | M | , | . | / | Shift| + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | Ctrl | ESC | ALt | ESC |||||||| Shift| Raise| Space|||||||| enter| Lower| Bcspc|||||||| Left | Down | Up | Right| + * ,----------------------------------------------------------------------------------------------------------------------. + */ + [_QWERTY] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, KC_EQL , KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_LCTL, 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_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI, KC_RGUI, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_ESC, KC_LALT, KC_ESC, KC_LSFT, RAISE, KC_SPC, KC_ENT, LOWER, KC_BSPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Lower + * ,----------------------------------------------------------------------------------------------------------------------. + * | ~ | 1 | 2 | 3 | 4 | 5 | _ | | + | 6 | 7 | 8 | 9 | 0 | | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | Ctrl | ^ | & | * | ( | ) | { | | } | Left | Down | Up | Right| : | " | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | Shift| ! | @ | # | $ | % | GUI | | GUI | - | = | < | > | ? | Shift| + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | Ctrl | ESC | ALt | EISU |||||||| kana | Raise| Space|||||||| Enter| Lower|Delete|||||||| Home |PageDn|PageUp| End | + * ,----------------------------------------------------------------------------------------------------------------------. + */ + [_LOWER] = LAYOUT( + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_UNDS, KC_PLUS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PIPE, + KC_LCTL, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_COLN, KC_DQT , + KC_LSFT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_LGUI, KC_RGUI, KC_MINS, KC_EQL, KC_LT, KC_GT, KC_QUES, KC_RSFT, + KC_LCTL, KC_ESC, KC_LALT, KC_LANG2, KC_LANG1,RAISE, KC_SPC, KC_ENT, LOWER, KC_DEL, KC_HOME,KC_PGDN, KC_PGUP, KC_END + ), + + /* Raise + * ,----------------------------------------------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | _ | | + | 6 | 7 | 8 | 9 | 0 | | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | Ctrl | ^ | & | * | ( | ) | { | | } | Left | Down | Up | Right| : | " | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | Shift| ! | @ | # | $ | % | GUI | | GUI | _ | + | < | > | ? | Shift| + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | Ctrl | ESC | ALt | EISU |||||||| kana | Raise| Space|||||||| Enter| Lower|Delete|||||||| Home |PageDn|PageUp| End | + * ,----------------------------------------------------------------------------------------------------------------------. + */ + [_RAISE] = LAYOUT( + KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_UNDS, KC_PLUS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PIPE, + KC_LCTL, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_COLN, KC_DQT , + KC_LSFT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_LGUI, KC_RGUI, KC_UNDS, KC_PLUS, KC_LT, KC_GT, KC_QUES, KC_RSFT, + KC_LCTL, KC_ESC, KC_LALT, KC_LANG2, KC_LANG1,RAISE, KC_SPC, KC_ENT, LOWER, KC_DEL, KC_HOME, KC_PGDN, KC_PGUP, KC_END + ), + + /* Adjust + * ,----------------------------------------------------------------------------------------------------------------------. + * | | Reset|RGB ON| MODE| HUE-| HUE+| | | | SAT-| SAT+| VAL-| VAL+| | | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 | | | | F7 | F8 | F9 | F10 | F11 | F12 | + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | | | | |||||||| | | |||||||| | | |||||||| | | | | + * ,----------------------------------------------------------------------------------------------------------------------. + */ + [_ADJUST] = LAYOUT( + _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI,_______, _______, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, + _______, _______, BL_TOGG, BL_BRTG, BL_INC , BL_DEC ,_______, _______, _______, _______, _______, _______, _______, _______, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6 ,_______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, _______, _______,_______,_______, _______,_______, _______, _______, _______, _______, _______ + ) +}; + +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/ergodash/mini/keymaps/toyoshimahidenori/readme.md b/keyboards/ergodash/mini/keymaps/toyoshimahidenori/readme.md new file mode 100644 index 0000000000..ebc13043a7 --- /dev/null +++ b/keyboards/ergodash/mini/keymaps/toyoshimahidenori/readme.md @@ -0,0 +1,62 @@ +# ToyoshimaHidenori's keymap for Ergodash mini + +This is the ToyoshimaHidenori's keymap configuration for Ergodash mini. +There are four layers, QWERTY(default), LOWER, RAISE and ADJSUT. + +## Layers + +### Qwerty + +``` +,----------------------------------------------------------------------------------------------------------------------. +| TAB | Q | W | E | R | T | - | | = | Y | U | I | O | P | \ | +|------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| +| Ctrl | A | S | D | F | G | [ | | ] | H | J | K | L | ; | ' | +|------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| +| Shift| Z | X | C | V | B | GUI | | GUI | N | M | , | . | / | Shift| +|-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| +| Ctrl | ESC | ALt | ESC |||||||| Shift| Raise| Space|||||||| enter| Lower| Bcspc|||||||| Left | Down | Up | Right| +,----------------------------------------------------------------------------------------------------------------------. +``` + +### Lower + +``` +,----------------------------------------------------------------------------------------------------------------------. +| ~ | 1 | 2 | 3 | 4 | 5 | _ | | + | 6 | 7 | 8 | 9 | 0 | | | +|------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| +| Ctrl | ^ | & | * | ( | ) | { | | } | Left | Down | Up | Right| : | " | +|------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| +| Shift| ! | @ | # | $ | % | GUI | | GUI | - | = | < | > | ? | Shift| +|-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| +| Ctrl | ESC | ALt | EISU |||||||| kana | Raise| Space|||||||| Enter| Lower|Delete|||||||| Home |PageDn|PageUp| End | +,----------------------------------------------------------------------------------------------------------------------. +``` + +### Raise + +``` +,----------------------------------------------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | _ | | + | 6 | 7 | 8 | 9 | 0 | | | +|------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| +| Ctrl | ^ | & | * | ( | ) | { | | } | Left | Down | Up | Right| : | " | +|------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| +| Shift| ! | @ | # | $ | % | GUI | | GUI | _ | + | < | > | ? | Shift| +|-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| +| Ctrl | ESC | ALt | EISU |||||||| kana | Raise| Space|||||||| Enter| Lower|Delete|||||||| Home |PageDn|PageUp| End | +,----------------------------------------------------------------------------------------------------------------------. +``` + +### Adjust + +``` +,----------------------------------------------------------------------------------------------------------------------. +| | Reset|RGB ON| MODE| HUE-| HUE+| | | | SAT-| SAT+| VAL-| VAL+| | | +|------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| +| | | | | | | | | | | | +|------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| +| F1 | F2 | F3 | F4 | F5 | F6 | | | | F7 | F8 | F9 | F10 | F11 | F12 | +|-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| +| | | | |||||||| | | |||||||| | | |||||||| | | | | +,----------------------------------------------------------------------------------------------------------------------. +``` diff --git a/keyboards/ergodash/mini/keymaps/toyoshimahidenori/rules.mk b/keyboards/ergodash/mini/keymaps/toyoshimahidenori/rules.mk new file mode 100644 index 0000000000..11b62b9bff --- /dev/null +++ b/keyboards/ergodash/mini/keymaps/toyoshimahidenori/rules.mk @@ -0,0 +1,3 @@ +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +AUDIO_ENABLE = no diff --git a/keyboards/ergodash/rev1/keymaps/333fred/config.h b/keyboards/ergodash/rev1/keymaps/333fred/config.h index 862f306d01..b8f5e8c948 100644 --- a/keyboards/ergodash/rev1/keymaps/333fred/config.h +++ b/keyboards/ergodash/rev1/keymaps/333fred/config.h @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #pragma once #include QMK_KEYBOARD_CONFIG_H diff --git a/keyboards/ergodash/rev1/keymaps/333fred/keymap.c b/keyboards/ergodash/rev1/keymaps/333fred/keymap.c index 8ed826d5a1..8fb5d0db26 100644 --- a/keyboards/ergodash/rev1/keymaps/333fred/keymap.c +++ b/keyboards/ergodash/rev1/keymaps/333fred/keymap.c @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include QMK_KEYBOARD_H #include "333fred.h" diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h index 8ef600b089..eb0f2066da 100644 --- a/keyboards/ergodox_ez/config.h +++ b/keyboards/ergodox_ez/config.h @@ -32,6 +32,16 @@ along with this program. If not, see . #define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2) #define MATRIX_COLS 6 +#define COL_EXPANDED { true, true, true, true, true, true, true, false, false, false, false, false, false, false } +#define MATRIX_ONBOARD_ROW_PINS { 0, 0, 0, 0, 0, 0, 0, B0, B1, B2, B3, D2, D3, C6 } +#define MATRIX_ONBOARD_COL_PINS { F0, F1, F4, F5, F6, F7 } +#define DIODE_DIRECTION COL2ROW +#define EXPANDER_COL_REGISTER GPIOB +#define EXPANDER_ROW_REGISTER GPIOA +#define MATRIX_EXPANDER_COL_PINS { 5, 4, 3, 2, 1, 0 } +#define MATRIX_EXPANDER_ROW_PINS { 0, 1, 2, 3, 4, 5, 6 } + + #define MOUSEKEY_INTERVAL 20 #define MOUSEKEY_DELAY 0 #define MOUSEKEY_TIME_TO_MAX 60 diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index d313f7d5d9..6c0b74ec46 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -1,4 +1,4 @@ -#include QMK_KEYBOARD_H +#include "ergodox_ez.h" extern inline void ergodox_board_led_on(void); extern inline void ergodox_right_led_1_on(void); diff --git a/keyboards/ergodox_ez/ergodox_ez.h b/keyboards/ergodox_ez/ergodox_ez.h index 88a0a2ee9f..a8b02a96bd 100644 --- a/keyboards/ergodox_ez/ergodox_ez.h +++ b/keyboards/ergodox_ez/ergodox_ez.h @@ -4,10 +4,6 @@ #include #include #include "i2c_master.h" -#include - -#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) -#define CPU_16MHz 0x00 // I2C aliases and register addresses (see "mcp23018.md") #define I2C_ADDR 0b0100000 diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk b/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk index aa13f98bd6..2eda18ce4f 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk @@ -1,7 +1,7 @@ # Set any rules.mk overrides for your specific keymap here. # See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work TAP_DANCE_ENABLE = yes MOUSEKEY_ENABLE = yes # Mouse keys(+4700b). diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/config.h b/keyboards/ergodox_ez/keymaps/nathanvercaemert/config.h index 6d69b00112..06c50e0a96 100644 --- a/keyboards/ergodox_ez/keymaps/nathanvercaemert/config.h +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/config.h @@ -18,6 +18,9 @@ #undef MOUSEKEY_WHEEL_INTERVAL #define MOUSEKEY_WHEEL_INTERVAL 50 +#undef MK_COMBINED +#define MK_COMBINED + // /* Temporarily defining a tapping term that is ridiculous to see if i can tell if lt is working. */ // #undef TAPPING_TERM // #define TAPPING_TERM 499 diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c b/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c index c2960cfa16..e06d0b769f 100644 --- a/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c @@ -28,13 +28,17 @@ enum custom_keycodes { RGB_SLD = EZ_SAFE_RANGE, + MS_WH_UP, + MS_WH_DOWN, + MS_WH_RIGHT, + MS_WH_LEFT, }; // tapdance keycodes enum td_keycodes { CTRL_TO12, SHIFT_TO13, - ALT_TO11 + ALT_TO11, }; // define a type containing as many tapdance states as you need @@ -59,6 +63,7 @@ void altto11_reset (qk_tap_dance_state_t *state, void *user_data); void shiftto13_finished (qk_tap_dance_state_t *state, void *user_data); void shiftto13_reset (qk_tap_dance_state_t *state, void *user_data); + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_ergodox_pretty( KC_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, @@ -162,9 +167,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [10] = LAYOUT_ergodox_pretty( 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_NO, KC_LGUI, KC_MS_BTN2, KC_NO, KC_NO, KC_TRANSPARENT, MT(MOD_RCTL, KC_A), KC_NO, KC_NO, KC_MS_UP, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_LGUI, KC_MS_BTN2, KC_ACL2, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_MS_UP, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, TD(SHIFT_TO13), TD(CTRL_TO12), TD(ALT_TO11), KC_MS_BTN1, KC_NO, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_NO, KC_TRANSPARENT, - KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), KC_ACL0, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 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, @@ -182,9 +187,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [12] = LAYOUT_ergodox_pretty( 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_NO, KC_LGUI, KC_HYPR, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_MS_WH_UP, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_LGUI, KC_HYPR, KC_ACL2, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_MS_WH_UP, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_LSHIFT, KC_LCTRL, KC_LALT, KC_NO, KC_NO, KC_NO, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT, KC_NO, KC_TRANSPARENT, - KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, MT(MOD_LGUI | MOD_LCTL,KC_NO), MO(14), KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 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, @@ -200,16 +205,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, TO(0) ), + [14] = LAYOUT_ergodox_pretty( + 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_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, MS_WH_UP, KC_NO, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MS_WH_LEFT, MS_WH_DOWN, MS_WH_RIGHT, KC_NO, KC_TRANSPARENT, + KC_TRANSPARENT, KC_NO, KC_NO, KC_TRANSPARENT, KC_NO, KC_NO, KC_TRANSPARENT, KC_TRANSPARENT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 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 + ), }; - -/* Commenting out for debug purposes */ -// bool process_record_user(uint16_t keycode, keyrecord_t *record) { -// switch (keycode) { -// } -// return true; -// } - uint32_t layer_state_set_user(uint32_t state) { uint8_t layer = biton32(state); ergodox_board_led_off(); @@ -252,11 +259,31 @@ uint32_t layer_state_set_user(uint32_t state) { // determine the tapdance state to return int cur_dance (qk_tap_dance_state_t *state) { if (state->count == 1) { - if (state->interrupted || !state->pressed) { return SINGLE_TAP; } + if (state->interrupted && state->pressed && state->interrupting_keycode == KC_MS_BTN1) {return SINGLE_HOLD;} + if (state->interrupted && state->pressed && state->interrupting_keycode == 22273) {return SINGLE_HOLD;} + if (state->interrupted && state->pressed && state->interrupting_keycode == 22272) {return SINGLE_HOLD;} + if (state->interrupted && state->pressed && state->interrupting_keycode == KC_TAB) {return SINGLE_HOLD;} + else if (state->interrupted || !state->pressed) { + // if (state->interrupted) { + // print("interrupted\n"); + // uprintf("Shift: %u\n", KC_LSHIFT); + // uprintf("Control: %u\n", KC_LCTRL); + // uprintf("%u\n",state->interrupting_keycode); + // } + return SINGLE_TAP; + } else { return SINGLE_HOLD; } } else { return 2; } // any number higher than the maximum state value you return above } +// /* Backup in case previous code is hard to piece together. */ +// int cur_dance (qk_tap_dance_state_t *state) { +// if (state->count == 1) { +// if (state->interrupted || !state->pressed) { return SINGLE_TAP; } +// else { return SINGLE_HOLD; } +// } +// else { return 2; } // any number higher than the maximum state value you return above +// } void ctrlto12_finished (qk_tap_dance_state_t *state, void *user_data) { td_state = cur_dance(state); @@ -265,7 +292,14 @@ void ctrlto12_finished (qk_tap_dance_state_t *state, void *user_data) { layer_on(12); break; case SINGLE_HOLD: + if (state->interrupted && (state->interrupting_keycode == 22273 || state->interrupting_keycode == 43)) { + register_mods(MOD_BIT(KC_LCTRL)); + break; + } register_mods(MOD_BIT(KC_LCTRL)); // for a layer-tap key, use `layer_on(_MY_LAYER)` here + if (state->interrupted && state->interrupting_keycode == KC_MS_BTN1) { + register_code16(LCTL(KC_MS_BTN1)); + } break; } } @@ -275,7 +309,14 @@ void ctrlto12_reset (qk_tap_dance_state_t *state, void *user_data) { case SINGLE_TAP: break; case SINGLE_HOLD: + if (state->interrupted && (state->interrupting_keycode == 22273 || state->interrupting_keycode == 43) ) { + unregister_mods(MOD_BIT(KC_LCTRL)); + break; + } unregister_mods(MOD_BIT(KC_LCTRL)); // for a layer-tap key, use `layer_off(_MY_LAYER)` here + if (state->interrupted && state->interrupting_keycode == KC_MS_BTN1) { + unregister_code16(LCTL(KC_MS_BTN1)); + } break; } } @@ -287,7 +328,14 @@ void shiftto13_finished (qk_tap_dance_state_t *state, void *user_data) { layer_on(13); break; case SINGLE_HOLD: + if (state->interrupted && (state->interrupting_keycode == 22272 || state->interrupting_keycode == 43) ) { + register_mods(MOD_BIT(KC_LSHIFT)); + break; + } register_mods(MOD_BIT(KC_LSHIFT)); // for a layer-tap key, use `layer_on(_MY_LAYER)` here + if (state->interrupted && state->interrupting_keycode == KC_MS_BTN1) { + register_code16(LSFT(KC_MS_BTN1)); + } break; } } @@ -297,7 +345,14 @@ void shiftto13_reset (qk_tap_dance_state_t *state, void *user_data) { case SINGLE_TAP: break; case SINGLE_HOLD: + if (state->interrupted && (state->interrupting_keycode == 22272 || state->interrupting_keycode == 43) ) { + unregister_mods(MOD_BIT(KC_LSHIFT)); + break; + } unregister_mods(MOD_BIT(KC_LSHIFT)); // for a layer-tap key, use `layer_off(_MY_LAYER)` here + if (state->interrupted && state->interrupting_keycode == KC_MS_BTN1) { + unregister_code16(LSFT(KC_MS_BTN1)); + } break; } } @@ -310,6 +365,9 @@ void altto11_finished (qk_tap_dance_state_t *state, void *user_data) { break; case SINGLE_HOLD: register_mods(MOD_BIT(KC_LALT)); // for a layer-tap key, use `layer_on(_MY_LAYER)` here + if (state->interrupted && state->interrupting_keycode == KC_MS_BTN1) { + register_code16(LALT(KC_MS_BTN1)); + } break; } } @@ -320,6 +378,9 @@ void altto11_reset (qk_tap_dance_state_t *state, void *user_data) { break; case SINGLE_HOLD: unregister_mods(MOD_BIT(KC_LALT)); // for a layer-tap key, use `layer_off(_MY_LAYER)` here + if (state->interrupted && state->interrupting_keycode == KC_MS_BTN1) { + unregister_code16(LALT(KC_MS_BTN1)); + } break; } } @@ -328,7 +389,7 @@ void altto11_reset (qk_tap_dance_state_t *state, void *user_data) { qk_tap_dance_action_t tap_dance_actions[] = { [CTRL_TO12] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctrlto12_finished, ctrlto12_reset), [SHIFT_TO13] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, shiftto13_finished, shiftto13_reset), - [ALT_TO11] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altto11_finished, altto11_reset) + [ALT_TO11] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altto11_finished, altto11_reset), }; /* Debugging functions */ @@ -342,10 +403,32 @@ void keyboard_post_init_user(void) { } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - // If console is enabled, it will print the matrix position and status of each key pressed -// #ifdef CONSOLE_ENABLE -// uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); -// #endif - return true; + // If console is enabled, it will print the matrix position and status of each key pressed + // #ifdef CONSOLE_ENABLE + // uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); + // #endif + switch (keycode) { + case MS_WH_DOWN: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_MS_WH_DOWN)); + } + break; + case MS_WH_UP: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_MS_WH_UP)); + } + break; + case MS_WH_LEFT: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_MS_WH_LEFT)); + } + break; + case MS_WH_RIGHT: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_MS_WH_RIGHT)); + } + break; + } + return true; } diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/readme.md b/keyboards/ergodox_ez/keymaps/nathanvercaemert/readme.md index 5570d9881c..ff3c8d142c 100644 --- a/keyboards/ergodox_ez/keymaps/nathanvercaemert/readme.md +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/readme.md @@ -1,7 +1,6 @@ # The nathanvercaemert ErgoDox EZ configuration -Centered around the home row and the use of mouse keys, this configuration focuses -on minimal finger movement. No key is more than one unit away from a finger on the home row. +Centered around the home row and the use of mouse keys, this configuration focuses on minimal finger movement. No key is more than one unit away from the home row. ## Layers @@ -20,7 +19,9 @@ on minimal finger movement. No key is more than one unit away from a finger on t navigation layers. * Navigation Layers * From the Mouse Layer, taps to the left home row navigate to scroll keys, arrow keys, and page keys. +* Notes on Acceleration + * Designated as "Slow" and "Fast" on the mouse layers (movement and scroll,) these keys can be held to allow for slow/precise or fast/efficient control. Here is the image of my keymap: -![Default](https://i.imgur.com/kXywQIq.png) \ No newline at end of file +![Imgur Image](https://i.imgur.com/x6VgH9Z.png) \ No newline at end of file diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/rules.mk b/keyboards/ergodox_ez/keymaps/nathanvercaemert/rules.mk index b41c275dd1..0dadd4371f 100644 --- a/keyboards/ergodox_ez/keymaps/nathanvercaemert/rules.mk +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/rules.mk @@ -1,10 +1,9 @@ # Set any rules.mk overrides for your specific keymap here. # See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes COMMAND_ENABLE = no RGBLIGHT_ENABLE = no TAP_DANCE_ENABLE=yes - -#Beginning debugging process for LT() and permissive hold +# Debugging CONSOLE_ENABLE = yes diff --git a/keyboards/ergodox_ez/keymaps/stamm/config.h b/keyboards/ergodox_ez/keymaps/stamm/config.h new file mode 100644 index 0000000000..e1db3d9002 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/stamm/config.h @@ -0,0 +1,40 @@ +/* Copyright 2020 Rustam Zagirov + * + * 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 . + */ + +/* + Set any config.h overrides for your specific keymap here. + See config.h options at https://docs.qmk.fm/#/config_options?id=the-configh-file +*/ +#pragma once + +#define ORYX_CONFIGURATOR +#define LEADER_TIMEOUT 500 +#define LEADER_PER_KEY_TIMING + +#define TAPPING_TERM 200 +#define TAPPING_TERM_PER_KEY +#define PERMISSIVE_HOLD +/* #define PERMISSIVE_HOLD_PER_KEY */ + +#define IGNORE_MOD_TAP_INTERRUPT +#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY + +#define TAPPING_FORCE_HOLD +#define TAPPING_FORCE_HOLD_PER_KEY + +/* #define RETRO_TAPPING */ +#undef LED_BRIGHTNESS_DEFAULT +#define LED_BRIGHTNESS_DEFAULT (LED_BRIGHTNESS_LO) diff --git a/keyboards/ergodox_ez/keymaps/stamm/keymap.c b/keyboards/ergodox_ez/keymaps/stamm/keymap.c new file mode 100644 index 0000000000..e2d9964ba5 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/stamm/keymap.c @@ -0,0 +1,308 @@ +/* Copyright 2020 Rustam Zagirov + * + * 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 QMK_KEYBOARD_H +#include "version.h" + +#define KC_MAC_UNDO LGUI(KC_Z) +#define KC_MAC_CUT LGUI(KC_X) +#define KC_MAC_COPY LGUI(KC_C) +#define KC_MAC_PASTE LGUI(KC_V) +#define KC_PC_UNDO LCTL(KC_Z) +#define KC_PC_CUT LCTL(KC_X) +#define KC_PC_COPY LCTL(KC_C) +#define KC_PC_PASTE LCTL(KC_V) +#define ES_LESS_MAC KC_GRAVE +#define ES_GRTR_MAC LSFT(KC_GRAVE) +#define ES_BSLS_MAC ALGR(KC_6) +#define NO_PIPE_ALT KC_GRAVE +#define NO_BSLS_ALT KC_EQUAL +#define LSA_T(kc) MT(MOD_LSFT | MOD_LALT, kc) + +#define E_NUMBERS LT(_3_NUMBERS,KC_E) +#define R_MOUSE LT(_4_MOUSE,KC_R) +#define O_NUMBERS LT(_3_NUMBERS,KC_O) +#define U_MOUSE LT(_4_MOUSE,KC_U) +#define R_NUMBERS LT(_3_NUMBERS,KC_R) +#define W_MOUSE LT(_4_MOUSE,KC_W) +#define LEFT_NUMBERS LT(_3_NUMBERS, KC_LEFT) +#define RIGHT_MOUSE LT(_4_MOUSE, KC_RIGHT) + +enum custom_keycodes { + RGB_SLD = EZ_SAFE_RANGE, + ALT_TAB, +}; + +bool is_alt_tab_active = false; // ADD this near the begining of keymap.c +uint16_t alt_tab_timer = 0; // we will be using them soon. + +enum layers { + _0_BASE, + _1_BEAKL, + _2_WORKMAN, + _3_NUMBERS, + _4_MOUSE, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_0_BASE] = LAYOUT_ergodox( + KC_NONUS_BSLASH, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_AUDIO_MUTE, + KC_LEAD, KC_Q, KC_W, E_NUMBERS, R_MOUSE, KC_T, TG(_1_BEAKL), + LCTL(KC_B), LSFT_T(KC_A), LCTL_T(KC_S), LALT_T(KC_D), LGUI_T(KC_F), KC_G, + KC_BSLASH, KC_Z, KC_X, KC_C, KC_V, KC_B, TG(_2_WORKMAN), + ALT_TAB, XXXXXXX, XXXXXXX, LEFT_NUMBERS, RIGHT_MOUSE, + KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, + XXXXXXX, + KC_ENTER, KC_TAB, KC_ESCAPE, + KC_CAPSLOCK, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINUS, + XXXXXXX, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRACKET, + KC_H, RGUI_T(KC_J), RALT_T(KC_K), RCTL_T(KC_L), RSFT_T(KC_SCOLON), KC_QUOTE, + KC_RBRACKET, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_EQUAL, + KC_DOWN, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, + KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, + XXXXXXX, + KC_ESCAPE, KC_BSPACE, KC_SPACE +), +[_1_BEAKL] = LAYOUT_ergodox( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_H, O_NUMBERS, U_MOUSE, KC_X, _______, + _______, LSFT_T(KC_Y), LCTL_T(KC_I), LALT_T(KC_E), LGUI_T(KC_A), KC_DOT, + _______, KC_J, KC_SLASH, KC_COMMA, KC_K, KC_QUOTE, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, + _______, KC_G, KC_C, KC_R, KC_F, KC_Z, _______, + KC_D, RGUI_T(KC_S), RALT_T(KC_T), RCTL_T(KC_N), RSFT_T(KC_B), KC_SCOLON, + _______, KC_W, _______, KC_L, KC_P, KC_V, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ +), +[_2_WORKMAN] = LAYOUT_ergodox( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_D, R_NUMBERS, W_MOUSE, KC_B, _______, + _______, _______, _______, LALT_T(KC_H), LGUI_T(KC_T), _______, + _______, _______, _______, KC_M, KC_C, KC_V, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, + _______, KC_J, KC_F, KC_U, KC_P, KC_SCOLON, _______, + KC_Y, RGUI_T(KC_N), RALT_T(KC_E), RCTL_T(KC_O), RSFT_T(KC_I), _______, + _______, KC_K, KC_L, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ +), +[_3_NUMBERS] = LAYOUT_ergodox( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, _______, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + _______, KC_4, KC_5, KC_6, KC_PLUS, _______, + _______, _______, KC_1, KC_2, KC_3, KC_BSLASH, _______, + KC_0, KC_KP_DOT, _______, KC_EQUAL, _______, + _______, _______, + _______, + _______, _______, _______ +), +[_4_MOUSE] = LAYOUT_ergodox( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + RGB_HUI, RGB_HUD, + _______, + _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, RGB_TOG, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______, + RGB_SLD, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______, + TOGGLE_LAYER_COLOR, _______, KC_MS_WH_UP, _______, KC_MS_WH_DOWN, _______, _______, + _______, _______, _______, _______, _______, + + RGB_VAD, RGB_VAI, + _______, + _______, _______, +), +}; + + +/* bool suspended = false; */ + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_SLD: + if (record->event.pressed) { + rgblight_mode(1); + } + return false; + case ALT_TAB: + if (record->event.pressed) { + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_code(KC_LGUI); + } + alt_tab_timer = timer_read(); + register_code(KC_TAB); + } else { + unregister_code(KC_TAB); + } + break; + } + return true; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + ergodox_led_all_off(); + switch (get_highest_layer(state)) { + case _1_BEAKL: + ergodox_right_led_1_on(); + break; + case _2_WORKMAN: + ergodox_right_led_2_on(); + break; + case _3_NUMBERS: + ergodox_right_led_3_on(); + break; + case _4_MOUSE: + ergodox_right_led_1_on(); + ergodox_right_led_2_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; + } + return state; + +}; + + +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + /* case SFT_T(KC_SPC): */ + /* return TAPPING_TERM + 1250; */ + case LT(_3_NUMBERS, KC_E): + return 200; + case LT(_4_MOUSE, KC_R): + return 200; + /* case LGUI_T(KC_F): */ + /* return 50; */ + default: + return TAPPING_TERM; + } +} +bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LT(_3_NUMBERS, KC_E): + case LT(_4_MOUSE, KC_R): + case LSFT_T(KC_A): + case LCTL_T(KC_S): + case LALT_T(KC_D): + case LGUI_T(KC_F): + case RGUI_T(KC_J): + case RALT_T(KC_K): + case RCTL_T(KC_L): + case RSFT_T(KC_SCOLON): + case LEFT_NUMBERS: + case RIGHT_MOUSE: + return true; + default: + return false; + } +} + + +bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LT(_3_NUMBERS, KC_E): + case LT(_4_MOUSE, KC_R): + case LSFT_T(KC_A): + case LCTL_T(KC_S): + case LALT_T(KC_D): + case LGUI_T(KC_F): + case RGUI_T(KC_J): + case RALT_T(KC_K): + case RCTL_T(KC_L): + case RSFT_T(KC_SCOLON): + case LEFT_NUMBERS: + case RIGHT_MOUSE: + return false; + default: + return true; + } +} + + + +LEADER_EXTERNS(); + +void matrix_scan_user(void) { + if (is_alt_tab_active) { + if (timer_elapsed(alt_tab_timer) > 1000) { + unregister_code(KC_LGUI); + is_alt_tab_active = false; + } + } + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_ONE_KEY(KC_F) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + SEQ_ONE_KEY(KC_S) { + SEND_STRING ("sudo -i\n"); + } + SEQ_TWO_KEYS(KC_D, KC_D) { + SEND_STRING(SS_LGUI("ac")); + /* SEND_STRING(SS_LGUI("a") SS_LGUI("c")); */ + } + SEQ_THREE_KEYS(KC_D, KC_D, KC_S) { + SEND_STRING("https://start.duckduckgo.com\n"); + } + SEQ_TWO_KEYS(KC_A, KC_S) { + register_code(KC_LGUI); + register_code(KC_S); + unregister_code(KC_S); + unregister_code(KC_LGUI); + } + } +} diff --git a/keyboards/ergodox_ez/keymaps/stamm/readme.md b/keyboards/ergodox_ez/keymaps/stamm/readme.md new file mode 100644 index 0000000000..f2cdc7ea1a --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/stamm/readme.md @@ -0,0 +1,117 @@ +# Stamm layouts for ergodox_ez + +5 layers: + +* QUERTY +* BEAKL15 +* WORKMAN +* Numbers +* Mouse + +On home row there are hold dual keys: +- shift, ctrl, alt, cmd — on the fingers on the left hand +- cmd, alt, ctrl, shift — mirrored on the finger on the righ hand + +Top row behaves like shifter numbers row. +Hold E switch to layer with numbers. +Hold R switch to mouse controll layer. + +``` + 0 Base +╭────────┬─────┬─────┬─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────┬─────┬─────┬────────╮ +│ ` │ ! │ @ │ # │ $ │ % │Mute │ │Capsl│ ^ │ & │ * │ ( │ ) │ - │ +├────────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼────────┤ +│ Lead │ Q │ W │E|LT3│R|LT4│ T │ TG1 │ │ │ Y │ U │ I │ O │ P │ [ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│Ctrl + B│A | ⇧│S | ⌃│D | ⌥│F | ⌘│ G ├─────┤ ├─────┤ H │J | ⌘│K | ⌥│L | ⌃│; | ⇧│ ' │ +├────────┼─────┼─────┼─────┼─────┼─────┤ TG2 │ │ ] ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ \ │ Z │ X │ C │ V │ B │ │ │ │ N │ M │ , │ . │ / │ = │ +╰──┬─────┼─────┼─────┼─────┼─────┼─────┴─────╯ ╰─────┴─────┼─────┼─────┼─────┼─────┼─────┬──╯ + │⎇ + T│ │ │←|LT3│→|LT4│ │ ↓ │ ↑ │ │ │ │ + ╰─────┴─────┴─────┴─────┴─────╯ ╭─────┬─────╮ ╭─────┬─────╮ ╰─────┴─────┴─────┴─────┴─────╯ + │Vol- │Vol+ │ │Play │Next │ + ╭─────┼─────┼─────┤ ├─────┼─────┼─────╮ + │ │ │ │ │ │ │ │ + │Enter│ Tab ├─────┤ ├─────┤Bspac│ ⎵ │ + │ │ │ Esc │ │ Esc │ │ │ + ╰─────┴─────┴─────╯ ╰─────┴─────┴─────╯ + + 1 Beakl +╭────────┬─────┬─────┬─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────┬─────┬─────┬────────╮ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ H │O|LT3│U|LT4│ X │ │ │ │ G │ C │ R │ F │ Z │ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │Y | ⇧│I | ⌃│E | ⌥│A | ⌘│ . ├─────┤ ├─────┤ D │S | ⌘│T | ⌥│N | ⌃│B | ⇧│ ; │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ J │ / │ , │ K │ ' │ │ │ │ W │ │ L │ P │ V │ │ +╰──┬─────┼─────┼─────┼─────┼─────┼─────┴─────╯ ╰─────┴─────┼─────┼─────┼─────┼─────┼─────┬──╯ + │ │ │ │ │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────┴─────┴─────╯ ╭─────┬─────╮ ╭─────┬─────╮ ╰─────┴─────┴─────┴─────┴─────╯ + │ │ │ │ │ │ + ╭─────┼─────┼─────┤ ├─────┼─────┼─────╮ + │ │ │ │ │ │ │ │ + │ │ ├─────┤ ├─────┤ │ │ + │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────╯ ╰─────┴─────┴─────╯ + + 2 Workman +╭────────┬─────┬─────┬─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────┬─────┬─────┬────────╮ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ D │R|LT3│W|LT4│ B │ │ │ │ J │ F │ U │ P │ ; │ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │H | ⌥│T | ⌘│ ├─────┤ ├─────┤ Y │N | ⌘│E | ⌥│O | ⌃│I | ⇧│ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ M │ C │ V │ │ │ │ K │ L │ │ │ │ │ +╰──┬─────┼─────┼─────┼─────┼─────┼─────┴─────╯ ╰─────┴─────┼─────┼─────┼─────┼─────┼─────┬──╯ + │ │ │ │ │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────┴─────┴─────╯ ╭─────┬─────╮ ╭─────┬─────╮ ╰─────┴─────┴─────┴─────┴─────╯ + │ │ │ │ │ │ + ╭─────┼─────┼─────┤ ├─────┼─────┼─────╮ + │ │ │ │ │ │ │ │ + │ │ ├─────┤ ├─────┤ │ │ + │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────╯ ╰─────┴─────┴─────╯ + + 3 Numbers +╭────────┬─────┬─────┬─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────┬─────┬─────┬────────╮ +│ │ F1 │ F2 │ F3 │ F4 │ F5 │ │ │ │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ +├────────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ │ │ │ │ │ 7 │ 8 │ 9 │ * │ F12 │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ ├─────┤ ├─────┤ │ 4 │ 5 │ 6 │ + │ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ │ │ │ │ │ 1 │ 2 │ 3 │ \ │ │ +╰──┬─────┼─────┼─────┼─────┼─────┼─────┴─────╯ ╰─────┴─────┼─────┼─────┼─────┼─────┼─────┬──╯ + │Reset│ │ │ │ │ │ 0 │ . │ │ = │ │ + ╰─────┴─────┴─────┴─────┴─────╯ ╭─────┬─────╮ ╭─────┬─────╮ ╰─────┴─────┴─────┴─────┴─────╯ + │ │ │ │ │ │ + ╭─────┼─────┼─────┤ ├─────┼─────┼─────╮ + │ │ │ │ │ │ │ │ + │ │ ├─────┤ ├─────┤ │ │ + │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────╯ ╰─────┴─────┴─────╯ + + 4 Mouse +╭────────┬─────┬─────┬─────┬─────┬─────┬─────╮ ╭─────┬─────┬─────┬─────┬─────┬─────┬────────╮ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────────┼─────┼─────┼─────┼─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ │ │ │RgbMo│RgbTo│MsBtn│MsUp │MsBtn│ │ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │ ├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ ├─────┤ ├─────┤RgbSl│MsLef│MsDow│MsRig│ │ │ +├────────┼─────┼─────┼─────┼─────┼─────┤ │ │Toggl├─────┼─────┼─────┼─────┼─────┼────────┤ +│ │ │ │ │ │ │ │ │ │ │MsWhU│ │MsWhD│ │ │ +╰──┬─────┼─────┼─────┼─────┼─────┼─────┴─────╯ ╰─────┴─────┼─────┼─────┼─────┼─────┼─────┬──╯ + │ │ │ │ │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────┴─────┴─────╯ ╭─────┬─────╮ ╭─────┬─────╮ ╰─────┴─────┴─────┴─────┴─────╯ + │RgbHu│RgbHu│ │RgbVa│RgbVa│ + ╭─────┼─────┼─────┤ ├─────┼─────┼─────╮ + │ │ │ │ │ │ │ │ + │ │ ├─────┤ ├─────┤ │ 75 │ + │ │ │ │ │ │ │ │ + ╰─────┴─────┴─────╯ ╰─────┴─────┴─────╯ + +``` + +Copyright © 2020 Rustam Zagirov. Released under [GPL-2.0](/LICENSE). diff --git a/keyboards/ergodox_ez/keymaps/stamm/rules.mk b/keyboards/ergodox_ez/keymaps/stamm/rules.mk new file mode 100644 index 0000000000..619224bef4 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/stamm/rules.mk @@ -0,0 +1,8 @@ +# Set any rules.mk overrides for your specific keymap here. +# See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file +LTO_ENABLE = yes +COMMAND_ENABLE = no +LEADER_ENABLE = yes +RGBLIGHT_ENABLE = yes + +TAP_DANCE_ENABLE = no diff --git a/keyboards/ergodox_ez/matrix.c b/keyboards/ergodox_ez/matrix.c index 28dc37a099..cfa76c1c39 100644 --- a/keyboards/ergodox_ez/matrix.c +++ b/keyboards/ergodox_ez/matrix.c @@ -30,7 +30,8 @@ along with this program. If not, see . #include "util.h" #include "matrix.h" #include "debounce.h" -#include QMK_KEYBOARD_H +#include "ergodox_ez.h" + /* * This constant define not debouncing time in msecs, assuming eager_pr. @@ -45,8 +46,8 @@ along with this program. If not, see . */ /* matrix state(1:on, 0:off) */ -static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values -static matrix_row_t matrix[MATRIX_ROWS]; // debounced values +extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values +extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values static matrix_row_t read_cols(uint8_t row); static void init_cols(void); @@ -54,132 +55,62 @@ static void unselect_rows(void); static void select_row(uint8_t row); static uint8_t mcp23018_reset_loop; -// static uint16_t mcp23018_reset_loop; -__attribute__((weak)) void matrix_init_user(void) {} +void matrix_init_custom(void) { + // initialize row and col -__attribute__((weak)) void matrix_scan_user(void) {} + mcp23018_status = init_mcp23018(); -__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) { - // initialize row and col - - mcp23018_status = init_mcp23018(); - - unselect_rows(); - init_cols(); - - // initialize matrix state: all keys off - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - raw_matrix[i] = 0; - } - - debounce_init(MATRIX_ROWS); - matrix_init_quantum(); -} - -void matrix_power_up(void) { - mcp23018_status = init_mcp23018(); - - unselect_rows(); - init_cols(); - - // initialize matrix state: all keys off - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - } + unselect_rows(); + init_cols(); } // Reads and stores a row, returning // whether a change occurred. static inline bool store_raw_matrix_row(uint8_t index) { - matrix_row_t temp = read_cols(index); - if (raw_matrix[index] != temp) { - raw_matrix[index] = temp; - return true; - } - return false; + matrix_row_t temp = read_cols(index); + if (raw_matrix[index] != temp) { + raw_matrix[index] = temp; + return true; + } + return false; } -uint8_t matrix_scan(void) { - if (mcp23018_status) { // if there was an error - if (++mcp23018_reset_loop == 0) { - // if (++mcp23018_reset_loop >= 1300) { - // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans - // this will be approx bit more frequent than once per second - print("trying to reset mcp23018\n"); - mcp23018_status = init_mcp23018(); - if (mcp23018_status) { - print("left side not responding\n"); - } else { - print("left side attached\n"); - ergodox_blink_all_leds(); +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + if (mcp23018_status) { // if there was an error + if (++mcp23018_reset_loop == 0) { + print("trying to reset mcp23018\n"); + mcp23018_status = init_mcp23018(); + if (mcp23018_status) { + print("left side not responding\n"); + } else { + print("left side attached\n"); + ergodox_blink_all_leds(); #ifdef RGB_MATRIX_ENABLE - rgb_matrix_init(); // re-init driver on reconnect + rgb_matrix_init(); // re-init driver on reconnect #endif - } + } + } } - } #ifdef LEFT_LEDS - mcp23018_status = ergodox_left_leds_update(); + mcp23018_status = ergodox_left_leds_update(); #endif // LEFT_LEDS - bool changed = false; - for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { - // select rows from left and right hands - uint8_t left_index = i; - uint8_t right_index = i + MATRIX_ROWS_PER_SIDE; - select_row(left_index); - select_row(right_index); + bool changed = false; + for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { + // select rows from left and right hands + uint8_t left_index = i; + uint8_t right_index = i + MATRIX_ROWS_PER_SIDE; + select_row(left_index); + select_row(right_index); - // we don't need a 30us delay anymore, because selecting a - // left-hand row requires more than 30us for i2c. + changed |= store_raw_matrix_row(left_index); + changed |= store_raw_matrix_row(right_index); - changed |= store_raw_matrix_row(left_index); - changed |= store_raw_matrix_row(right_index); + unselect_rows(); + } - unselect_rows(); - } - - debounce(raw_matrix, matrix, MATRIX_ROWS, changed); - matrix_scan_quantum(); - - return 1; -} - -bool matrix_is_modified(void) // deprecated and evidently not called. -{ - return true; -} - -inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); } - -inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } - -void matrix_print(void) { - print("\nr/c 0123456789ABCDEF\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - phex(row); - print(": "); - pbin_reverse16(matrix_get_row(row)); - print("\n"); - } -} - -uint8_t matrix_key_count(void) { - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += bitpop16(matrix[i]); - } - return count; + return changed; } /* Column pin configuration @@ -193,42 +124,43 @@ uint8_t matrix_key_count(void) { * pin: B5 B4 B3 B2 B1 B0 */ static void init_cols(void) { - // init on mcp23018 - // not needed, already done as part of init_mcp23018() + // init on mcp23018 + // not needed, already done as part of init_mcp23018() - // init on teensy - // Input with pull-up(DDR:0, PORT:1) - DDRF &= ~(1 << 7 | 1 << 6 | 1 << 5 | 1 << 4 | 1 << 1 | 1 << 0); - PORTF |= (1 << 7 | 1 << 6 | 1 << 5 | 1 << 4 | 1 << 1 | 1 << 0); + // init on teensy + setPinInputHigh(F0); + setPinInputHigh(F1); + setPinInputHigh(F4); + setPinInputHigh(F5); + setPinInputHigh(F6); + setPinInputHigh(F7); } static matrix_row_t read_cols(uint8_t row) { - if (row < 7) { - if (mcp23018_status) { // if there was an error - return 0; + if (row < 7) { + if (mcp23018_status) { // if there was an error + return 0; + } else { + uint8_t data = 0; + // reading GPIOB (column port) since in mcp23018's sequential mode + // it is addressed directly after writing to GPIOA in select_row() + mcp23018_status = i2c_start(I2C_ADDR_READ, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_read_nack(ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status < 0) goto out; + data = ~((uint8_t)mcp23018_status); + mcp23018_status = I2C_STATUS_SUCCESS; + out: + i2c_stop(); + return data; + } } else { - uint8_t data = 0; - // reading GPIOB (column port) since in mcp23018's sequential mode - // it is addressed directly after writing to GPIOA in select_row() - mcp23018_status = i2c_start(I2C_ADDR_READ, ERGODOX_EZ_I2C_TIMEOUT); - if (mcp23018_status) goto out; - mcp23018_status = i2c_read_nack(ERGODOX_EZ_I2C_TIMEOUT); - if (mcp23018_status < 0) goto out; - data = ~((uint8_t)mcp23018_status); - mcp23018_status = I2C_STATUS_SUCCESS; - out: - i2c_stop(); - return data; - } - } else { - /* read from teensy - * bitmask is 0b11110011, but we want those all - * in the lower six bits. - * we'll return 1s for the top two, but that's harmless. - */ + /* read from teensy + * bitmask is 0b11110011, but we want those all + * in the lower six bits. + * we'll return 1s for the top two, but that's harmless. + */ - return ~((PINF & 0x03) | ((PINF & 0xF0) >> 2)); - } + return ~((PINF & 0x03) | ((PINF & 0xF0) >> 2)); + } } /* Row pin configuration @@ -242,69 +174,64 @@ static matrix_row_t read_cols(uint8_t row) { * pin: A0 A1 A2 A3 A4 A5 A6 */ static void unselect_rows(void) { - // no need to unselect on mcp23018, because the select step sets all - // the other row bits high, and it's not changing to a different - // direction + // no need to unselect on mcp23018, because the select step sets all + // the other row bits high, and it's not changing to a different + // direction - // unselect on teensy - // Hi-Z(DDR:0, PORT:0) to unselect - DDRB &= ~(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3); - PORTB &= ~(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3); - DDRD &= ~(1 << 2 | 1 << 3); - PORTD &= ~(1 << 2 | 1 << 3); - DDRC &= ~(1 << 6); - PORTC &= ~(1 << 6); + // unselect on teensy + setPinInput(B0); + setPinInput(B1); + setPinInput(B2); + setPinInput(B3); + setPinInput(D2); + setPinInput(D3); + setPinInput(C6); } static void select_row(uint8_t row) { - if (row < 7) { - // select on mcp23018 - if (mcp23018_status) { // if there was an error - // do nothing + if (row < 7) { + // select on mcp23018 + if (!mcp23018_status) { + // set active row low : 0 + // set other rows hi-Z : 1 + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0xFF & ~(1 << row), ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + out: + i2c_stop(); + } } else { - // set active row low : 0 - // set other rows hi-Z : 1 - mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); - if (mcp23018_status) goto out; - mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); - if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0xFF & ~(1 << row), ERGODOX_EZ_I2C_TIMEOUT); - if (mcp23018_status) goto out; - out: - i2c_stop(); + // select on teensy + // Output low(DDR:1, PORT:0) to select + switch (row) { + case 7: + setPinOutput(B0); + writePinLow(B0); + break; + case 8: + setPinOutput(B1); + writePinLow(B1); + break; + case 9: + setPinOutput(B2); + writePinLow(B2); + break; + case 10: + setPinOutput(B3); + writePinLow(B3); + break; + case 11: + setPinOutput(D2); + writePinLow(D2); + break; + case 12: + setPinOutput(D3); + writePinLow(D3); + break; + case 13: + setPinOutput(C6); + writePinLow(C6); + break; + } } - } else { - // select on teensy - // Output low(DDR:1, PORT:0) to select - switch (row) { - case 7: - DDRB |= (1 << 0); - PORTB &= ~(1 << 0); - break; - case 8: - DDRB |= (1 << 1); - PORTB &= ~(1 << 1); - break; - case 9: - DDRB |= (1 << 2); - PORTB &= ~(1 << 2); - break; - case 10: - DDRB |= (1 << 3); - PORTB &= ~(1 << 3); - break; - case 11: - DDRD |= (1 << 2); - PORTD &= ~(1 << 2); - break; - case 12: - DDRD |= (1 << 3); - PORTD &= ~(1 << 3); - break; - case 13: - DDRC |= (1 << 6); - PORTC &= ~(1 << 6); - break; - } - } } diff --git a/keyboards/ergodox_ez/rules.mk b/keyboards/ergodox_ez/rules.mk index 579e4f59de..9ad4eaa186 100644 --- a/keyboards/ergodox_ez/rules.mk +++ b/keyboards/ergodox_ez/rules.mk @@ -19,20 +19,20 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDox EZ -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -UNICODE_ENABLE = yes # Unicode -SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +CUSTOM_MATRIX = lite # Custom matrix file for the ErgoDox EZ +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +UNICODE_ENABLE = yes # Unicode +SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard SLEEP_LED_ENABLE = no API_SYSEX_ENABLE = no RGBLIGHT_ENABLE = yes -RGB_MATRIX_ENABLE = no # enable later +RGB_MATRIX_ENABLE = no # enable later DEBOUNCE_TYPE = eager_pr # project specific files diff --git a/keyboards/ergodox_infinity/bootloader_defs.h b/keyboards/ergodox_infinity/bootloader_defs.h deleted file mode 100644 index c67153be60..0000000000 --- a/keyboards/ergodox_infinity/bootloader_defs.h +++ /dev/null @@ -1 +0,0 @@ -#define KIIBOHD_BOOTLOADER diff --git a/keyboards/ergodox_infinity/ergodox_infinity.c b/keyboards/ergodox_infinity/ergodox_infinity.c index 9fda7991f1..c69c1eb36f 100644 --- a/keyboards/ergodox_infinity/ergodox_infinity.c +++ b/keyboards/ergodox_infinity/ergodox_infinity.c @@ -6,6 +6,17 @@ #include "lcd_backlight.h" #endif +#ifdef WPM_ENABLE +# include "serial_link/protocol/transport.h" +# include "wpm.h" + +MASTER_TO_ALL_SLAVES_OBJECT(current_wpm, uint8_t); +static remote_object_t* remote_objects[] = { + REMOTE_OBJECT(current_wpm), +}; +static uint8_t last_sent_wpm = 0; +#endif + void init_serial_link_hal(void) { PORTA->PCR[1] = PORTx_PCRn_PE | PORTx_PCRn_PS | PORTx_PCRn_PFE | PORTx_PCRn_MUX(2); PORTA->PCR[2] = PORTx_PCRn_DSE | PORTx_PCRn_SRE | PORTx_PCRn_MUX(2); @@ -39,30 +50,30 @@ void init_serial_link_hal(void) { // Which will reduce the brightness range #define PRESCALAR_DEFINE 0 void lcd_backlight_hal_init(void) { - // Setup Backlight + // Setup Backlight SIM->SCGC6 |= SIM_SCGC6_FTM0; FTM0->CNT = 0; // Reset counter - // PWM Period - // 16-bit maximum - FTM0->MOD = 0xFFFF; + // PWM Period + // 16-bit maximum + FTM0->MOD = 0xFFFF; - // Set FTM to PWM output - Edge Aligned, Low-true pulses + // Set FTM to PWM output - Edge Aligned, Low-true pulses #define CNSC_MODE FTM_SC_CPWMS | FTM_SC_PS(4) | FTM_SC_CLKS(0) - CHANNEL_RED.CnSC = CNSC_MODE; - CHANNEL_GREEN.CnSC = CNSC_MODE; - CHANNEL_BLUE.CnSC = CNSC_MODE; + CHANNEL_RED.CnSC = CNSC_MODE; + CHANNEL_GREEN.CnSC = CNSC_MODE; + CHANNEL_BLUE.CnSC = CNSC_MODE; - // System clock, /w prescalar setting - FTM0->SC = FTM_SC_CLKS(1) | FTM_SC_PS(PRESCALAR_DEFINE); + // System clock, /w prescalar setting + FTM0->SC = FTM_SC_CLKS(1) | FTM_SC_PS(PRESCALAR_DEFINE); - CHANNEL_RED.CnV = 0; - CHANNEL_GREEN.CnV = 0; - CHANNEL_BLUE.CnV = 0; + CHANNEL_RED.CnV = 0; + CHANNEL_GREEN.CnV = 0; + CHANNEL_BLUE.CnV = 0; - RGB_PORT_GPIO->PDDR |= (1 << RED_PIN); - RGB_PORT_GPIO->PDDR |= (1 << GREEN_PIN); - RGB_PORT_GPIO->PDDR |= (1 << BLUE_PIN); + RGB_PORT_GPIO->PDDR |= (1 << RED_PIN); + RGB_PORT_GPIO->PDDR |= (1 << GREEN_PIN); + RGB_PORT_GPIO->PDDR |= (1 << BLUE_PIN); #define RGB_MODE PORTx_PCRn_SRE | PORTx_PCRn_DSE | PORTx_PCRn_MUX(4) RGB_PORT->PCR[RED_PIN] = RGB_MODE; @@ -94,9 +105,9 @@ static uint16_t cie_lightness(uint16_t v) { } void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b) { - CHANNEL_RED.CnV = cie_lightness(r); - CHANNEL_GREEN.CnV = cie_lightness(g); - CHANNEL_BLUE.CnV = cie_lightness(b); + CHANNEL_RED.CnV = cie_lightness(r); + CHANNEL_GREEN.CnV = cie_lightness(g); + CHANNEL_BLUE.CnV = cie_lightness(b); } __attribute__ ((weak)) @@ -109,21 +120,39 @@ void matrix_scan_user(void) { void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up + // put your keyboard start-up code here + // runs once when the firmware starts up - matrix_init_user(); - // The backlight always has to be initialized, otherwise it will stay lit + matrix_init_user(); + // The backlight always has to be initialized, otherwise it will stay lit #ifndef VISUALIZER_ENABLE - lcd_backlight_hal_init(); + lcd_backlight_hal_init(); +#endif +#ifdef WPM_ENABLE + add_remote_objects(remote_objects, sizeof(remote_objects) / sizeof(remote_object_t*)); #endif } void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) + // put your looping keyboard code here + // runs every cycle (a lot) - matrix_scan_user(); +#ifdef WPM_ENABLE + if (is_serial_link_master()) { + uint8_t current_wpm = get_current_wpm(); + if (current_wpm != last_sent_wpm) { + *begin_write_current_wpm() = current_wpm; + end_write_current_wpm(); + last_sent_wpm = current_wpm; + } + } else if (is_serial_link_connected()) { + uint8_t* new_wpm = read_current_wpm(); + if (new_wpm) { + set_current_wpm(*new_wpm); + } + } +#endif + matrix_scan_user(); } bool is_keyboard_master(void) { diff --git a/keyboards/ergodox_infinity/keymaps/narze/keymap.c b/keyboards/ergodox_infinity/keymaps/narze/keymap.c index 4a4e8ab941..d9499f0037 100644 --- a/keyboards/ergodox_infinity/keymaps/narze/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/narze/keymap.c @@ -635,17 +635,17 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // 1. Hold for LGUI, tap for Underscore case GUI_UNDS: - perform_space_cadet(record, KC_LGUI, KC_LSFT, KC_MINS); + perform_space_cadet(record, keycode, KC_LGUI, KC_LSFT, KC_MINS); return false; // 2. Hold for LSHIFT, tap for Parens open case LSFT_LPRN: - perform_space_cadet(record, KC_LSFT, KC_LSFT, KC_9); + perform_space_cadet(record, keycode, KC_LSFT, KC_LSFT, KC_9); return false; // 3. Hold for RSHIFT, tap for Parens close case RSFT_RPRN: - perform_space_cadet(record, KC_RSFT, KC_RSFT, KC_0); + perform_space_cadet(record, keycode, KC_RSFT, KC_RSFT, KC_0); return false; } @@ -683,7 +683,7 @@ void matrix_scan_user(void) { // Combos -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { if (pressed) { switch(combo_index) { case CB_SUPERDUPER: diff --git a/keyboards/ergodox_infinity/rules.mk b/keyboards/ergodox_infinity/rules.mk index 31bc20454c..b9ead9e87c 100644 --- a/keyboards/ergodox_infinity/rules.mk +++ b/keyboards/ergodox_infinity/rules.mk @@ -1,32 +1,12 @@ # MCU name MCU = MK20DX256 -# Linker script to use -# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -# - NOTE: a custom ld script is needed for EEPROM on Teensy LC -# - LDSCRIPT = -# - MKL26Z64 for Teensy LC -# - MK20DX128 for Teensy 3.0 -# - MK20DX256 for Teensy 3.1 and 3.2 -# - MK20DX128BLDR4 for Infinity 60% with Kiibohd bootloader -# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader -MCU_LDSCRIPT = MK20DX256BLDR8 - -# Vector table for application -# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ -# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB -OPT_DEFS += -DCORTEX_VTOR_INIT=0x00002000 - -BOOTLOADER = dfu +# Bootloader selection +BOOTLOADER = kiibohd # Build Options # comment out to disable the options. # - -DFU_ARGS = -d 1c11:b007 -DFU_SUFFIX_ARGS = -p b007 -v 1c11 - BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/exclusive/e85/config.h b/keyboards/exclusive/e85/config.h index d122c93619..758cd8b78c 100644 --- a/keyboards/exclusive/e85/config.h +++ b/keyboards/exclusive/e85/config.h @@ -21,11 +21,8 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0x4558 // EX -#define PRODUCT_ID 0xE851 // E8.5 Version 1 #define DEVICE_VER 0x0001 #define MANUFACTURER Exclusive -#define PRODUCT E8.5 Hotswap PCB -#define DESCRIPTION A custom TKL keyboard /* key matrix size */ #define MATRIX_ROWS 11 diff --git a/keyboards/exclusive/e85/hotswap/config.h b/keyboards/exclusive/e85/hotswap/config.h new file mode 100644 index 0000000000..a0f957db87 --- /dev/null +++ b/keyboards/exclusive/e85/hotswap/config.h @@ -0,0 +1,18 @@ +/* Copyright 2020 MechMerlin + * + * 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 PRODUCT_ID 0xE851 // E8.5 Hotswap +#define PRODUCT E8.5 Hotswap PCB diff --git a/keyboards/exclusive/e85/e85.c b/keyboards/exclusive/e85/hotswap/hotswap.c similarity index 97% rename from keyboards/exclusive/e85/e85.c rename to keyboards/exclusive/e85/hotswap/hotswap.c index 20cd0e03f5..a5893e6bc5 100644 --- a/keyboards/exclusive/e85/e85.c +++ b/keyboards/exclusive/e85/hotswap/hotswap.c @@ -14,4 +14,4 @@ * along with this program. If not, see . */ -#include "e85.h" +#include "hotswap.h" diff --git a/keyboards/exclusive/e85/hotswap/hotswap.h b/keyboards/exclusive/e85/hotswap/hotswap.h new file mode 100644 index 0000000000..377dd8ad5a --- /dev/null +++ b/keyboards/exclusive/e85/hotswap/hotswap.h @@ -0,0 +1,63 @@ +/* Copyright 2020 MechMerlin + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT_ansi_standard( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K68, K67, K65, K64, K63, K66, K62, K61, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K70, K77, K75, K73, K76, K72, K71, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K84, K83, K86, K82, K81, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K93, \ + K40, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, K92, \ + K50, K51, K52, K56, K58, K57, K54, K53, KA6, KA2, KA1 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \ + { K40, KC_NO, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, KC_NO, K56, K57, K58 }, \ + { KC_NO, K61, K62, K63, K64, K65, K66, K67, K68 }, \ + { K70, K71, K72, K73, KC_NO, K75, K76, K77, K78 }, \ + { KC_NO, K81, K82, K83, K84, K85, K86, K87, K88 }, \ + { KC_NO, KC_NO, K92, K93, KC_NO, K95, KC_NO, K97, K98 }, \ + { KC_NO, KA1, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \ +} + +#define LAYOUT_ansi_tsangan( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K68, K67, K65, K64, K63, K66, K62, K61, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K70, K77, K75, K73, K76, K72, K71, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K84, K83, K86, K82, K81, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K93, \ + K40, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, K92, \ + K50, K51, K52, K56, K57, K54, K53, KA6, KA2, KA1 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \ + { K40, KC_NO, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, KC_NO, K56, K57, KC_NO }, \ + { KC_NO, K61, K62, K63, K64, K65, K66, K67, K68 }, \ + { K70, K71, K72, K73, KC_NO, K75, K76, K77, K78 }, \ + { KC_NO, K81, K82, K83, K84, K85, K86, K87, K88 }, \ + { KC_NO, KC_NO, K92, K93, KC_NO, K95, KC_NO, K97, K98 }, \ + { KC_NO, KA1, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \ +} diff --git a/keyboards/exclusive/e85/hotswap/info.json b/keyboards/exclusive/e85/hotswap/info.json new file mode 100644 index 0000000000..e939d4c8b4 --- /dev/null +++ b/keyboards/exclusive/e85/hotswap/info.json @@ -0,0 +1,193 @@ +{ + "keyboard_name": "Exclusive E8.5 TKL", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_ansi_standard": { + "layout": [ + {"label":"K00 (E6,D0)", "x":0, "y":0}, + {"label":"K01 (E6,D1)", "x":1.25, "y":0}, + {"label":"K02 (E6,D2)", "x":2.25, "y":0}, + {"label":"K03 (E6,D3)", "x":3.25, "y":0}, + {"label":"K04 (E6,D5)", "x":4.25, "y":0}, + {"label":"K05 (E6,D4)", "x":5.5, "y":0}, + {"label":"K06 (E6,D6)", "x":6.5, "y":0}, + {"label":"K07 (E6,D7)", "x":7.5, "y":0}, + {"label":"K08 (E6,B4)", "x":8.5, "y":0}, + {"label":"K68 (F7,B4)", "x":9.75, "y":0}, + {"label":"K67 (F7,D7)", "x":10.75, "y":0}, + {"label":"K65 (F7,D4)", "x":11.75, "y":0}, + {"label":"K64 (F7,D5)", "x":12.75, "y":0}, + {"label":"K63 (F7,D3)", "x":14, "y":0}, + {"label":"K66 (F7,D6)", "x":15.25, "y":0}, + {"label":"K62 (F7,D2)", "x":16.25, "y":0}, + {"label":"K61 (F7,D1)", "x":17.25, "y":0}, + {"label":"K10 (B0,D0)", "x":0, "y":1.5}, + {"label":"K11 (B0,D1)", "x":1, "y":1.5}, + {"label":"K12 (B0,D2)", "x":2, "y":1.5}, + {"label":"K13 (B0,D3)", "x":3, "y":1.5}, + {"label":"K14 (B0,D5)", "x":4, "y":1.5}, + {"label":"K15 (B0,D4)", "x":5, "y":1.5}, + {"label":"K16 (B0,D6)", "x":6, "y":1.5}, + {"label":"K17 (B0,D7)", "x":7, "y":1.5}, + {"label":"K18 (B0,B4)", "x":8, "y":1.5}, + {"label":"K78 (F6,B4)", "x":9, "y":1.5}, + {"label":"K70 (F6,D0)", "x":10, "y":1.5}, + {"label":"K77 (F6,D7)", "x":11, "y":1.5}, + {"label":"K75 (F6,D4)", "x":12, "y":1.5}, + {"label":"K73 (F6,D3)", "x":13, "y":1.5, "w":2}, + {"label":"K76 (F6,D6)", "x":15.25, "y":1.5}, + {"label":"K72 (F6,D2)", "x":16.25, "y":1.5}, + {"label":"K71 (F6,D1)", "x":17.25, "y":1.5}, + {"label":"K20 (B1,D0)", "x":0, "y":2.5, "w":1.5}, + {"label":"K21 (B1,D1)", "x":1.5, "y":2.5}, + {"label":"K22 (B1,D2)", "x":2.5, "y":2.5}, + {"label":"K23 (B1,D3)", "x":3.5, "y":2.5}, + {"label":"K24 (B1,D5)", "x":4.5, "y":2.5}, + {"label":"K25 (B1,D4)", "x":5.5, "y":2.5}, + {"label":"K26 (B1,D6)", "x":6.5, "y":2.5}, + {"label":"K27 (B1,D7)", "x":7.5, "y":2.5}, + {"label":"K28 (B1,B4)", "x":8.5, "y":2.5}, + {"label":"K88 (F5,B4)", "x":9.5, "y":2.5}, + {"label":"K87 (F5,D7)", "x":10.5, "y":2.5}, + {"label":"K85 (F5,D4)", "x":11.5, "y":2.5}, + {"label":"K84 (F5,D5)", "x":12.5, "y":2.5}, + {"label":"K83 (F5,D3)", "x":13.5, "y":2.5, "w":1.5}, + {"label":"K86 (F5,D6)", "x":15.25, "y":2.5}, + {"label":"K82 (F5,D2)", "x":16.25, "y":2.5}, + {"label":"K81 (F5,D1)", "x":17.25, "y":2.5}, + {"label":"K30 (B2,D0)", "x":0, "y":3.5, "w":1.75}, + {"label":"K31 (B2,D1)", "x":1.75, "y":3.5}, + {"label":"K32 (B2,D2)", "x":2.75, "y":3.5}, + {"label":"K33 (B2,D3)", "x":3.75, "y":3.5}, + {"label":"K34 (B2,D5)", "x":4.75, "y":3.5}, + {"label":"K35 (B2,D4)", "x":5.75, "y":3.5}, + {"label":"K36 (B2,D6)", "x":6.75, "y":3.5}, + {"label":"K37 (B2,D7)", "x":7.75, "y":3.5}, + {"label":"K38 (B2,B4)", "x":8.75, "y":3.5}, + {"label":"K98 (F4,B4)", "x":9.75, "y":3.5}, + {"label":"K97 (F4,D7)", "x":10.75, "y":3.5}, + {"label":"K95 (F4,D4)", "x":11.75, "y":3.5}, + {"label":"K93 (F4,D3)", "x":12.75, "y":3.5, "w":2.25}, + {"label":"K40 (B3,D0)", "x":0, "y":4.5, "w":2.25}, + {"label":"K42 (B3,D2)", "x":2.25, "y":4.5}, + {"label":"K43 (B3,D3)", "x":3.25, "y":4.5}, + {"label":"K44 (B3,D5)", "x":4.25, "y":4.5}, + {"label":"K45 (B3,D4)", "x":5.25, "y":4.5}, + {"label":"K46 (B3,D6)", "x":6.25, "y":4.5}, + {"label":"K47 (B3,D7)", "x":7.25, "y":4.5}, + {"label":"K48 (B3,B4)", "x":8.25, "y":4.5}, + {"label":"KA8 (F1,B4)", "x":9.25, "y":4.5}, + {"label":"KA7 (F1,D7)", "x":10.25, "y":4.5}, + {"label":"KA5 (F1,D4)", "x":11.25, "y":4.5}, + {"label":"KA4 (F1,D5)", "x":12.25, "y":4.5, "w":2.75}, + {"label":"K92 (F4,D2)", "x":16.25, "y":4.5}, + {"label":"K50 (B7,D0)", "x":0, "y":5.5, "w":1.25}, + {"label":"K51 (B7,D1)", "x":1.25, "y":5.5, "w":1.25}, + {"label":"K52 (B7,D2)", "x":2.5, "y":5.5, "w":1.25}, + {"label":"K56 (B7,D6)", "x":3.75, "y":5.5, "w":6.25}, + {"label":"K58 (B7,B4)", "x":10, "y":5.5, "w":1.25}, + {"label":"K57 (B7,D7)", "x":11.25, "y":5.5, "w":1.25}, + {"label":"K54 (B7,D5)", "x":12.5, "y":5.5, "w":1.25}, + {"label":"K53 (B7,D3)", "x":13.75, "y":5.5, "w":1.25}, + {"label":"KA6 (F1,D6)", "x":15.25, "y":5.5}, + {"label":"KA2 (F1,D2)", "x":16.25, "y":5.5}, + {"label":"KA1 (F1,D1)", "x":17.25, "y":5.5} + ] + }, + + "LAYOUT_ansi_tsangan": { + "layout": [ + {"label":"K00 (E6,D0)", "x":0, "y":0}, + {"label":"K01 (E6,D1)", "x":1.25, "y":0}, + {"label":"K02 (E6,D2)", "x":2.25, "y":0}, + {"label":"K03 (E6,D3)", "x":3.25, "y":0}, + {"label":"K04 (E6,D5)", "x":4.25, "y":0}, + {"label":"K05 (E6,D4)", "x":5.5, "y":0}, + {"label":"K06 (E6,D6)", "x":6.5, "y":0}, + {"label":"K07 (E6,D7)", "x":7.5, "y":0}, + {"label":"K08 (E6,B4)", "x":8.5, "y":0}, + {"label":"K68 (F7,B4)", "x":9.75, "y":0}, + {"label":"K67 (F7,D7)", "x":10.75, "y":0}, + {"label":"K65 (F7,D4)", "x":11.75, "y":0}, + {"label":"K64 (F7,D5)", "x":12.75, "y":0}, + {"label":"K63 (F7,D3)", "x":14, "y":0}, + {"label":"K66 (F7,D6)", "x":15.25, "y":0}, + {"label":"K62 (F7,D2)", "x":16.25, "y":0}, + {"label":"K61 (F7,D1)", "x":17.25, "y":0}, + {"label":"K10 (B0,D0)", "x":0, "y":1.5}, + {"label":"K11 (B0,D1)", "x":1, "y":1.5}, + {"label":"K12 (B0,D2)", "x":2, "y":1.5}, + {"label":"K13 (B0,D3)", "x":3, "y":1.5}, + {"label":"K14 (B0,D5)", "x":4, "y":1.5}, + {"label":"K15 (B0,D4)", "x":5, "y":1.5}, + {"label":"K16 (B0,D6)", "x":6, "y":1.5}, + {"label":"K17 (B0,D7)", "x":7, "y":1.5}, + {"label":"K18 (B0,B4)", "x":8, "y":1.5}, + {"label":"K78 (F6,B4)", "x":9, "y":1.5}, + {"label":"K70 (F6,D0)", "x":10, "y":1.5}, + {"label":"K77 (F6,D7)", "x":11, "y":1.5}, + {"label":"K75 (F6,D4)", "x":12, "y":1.5}, + {"label":"K73 (F6,D3)", "x":13, "y":1.5, "w":2}, + {"label":"K76 (F6,D6)", "x":15.25, "y":1.5}, + {"label":"K72 (F6,D2)", "x":16.25, "y":1.5}, + {"label":"K71 (F6,D1)", "x":17.25, "y":1.5}, + {"label":"K20 (B1,D0)", "x":0, "y":2.5, "w":1.5}, + {"label":"K21 (B1,D1)", "x":1.5, "y":2.5}, + {"label":"K22 (B1,D2)", "x":2.5, "y":2.5}, + {"label":"K23 (B1,D3)", "x":3.5, "y":2.5}, + {"label":"K24 (B1,D5)", "x":4.5, "y":2.5}, + {"label":"K25 (B1,D4)", "x":5.5, "y":2.5}, + {"label":"K26 (B1,D6)", "x":6.5, "y":2.5}, + {"label":"K27 (B1,D7)", "x":7.5, "y":2.5}, + {"label":"K28 (B1,B4)", "x":8.5, "y":2.5}, + {"label":"K88 (F5,B4)", "x":9.5, "y":2.5}, + {"label":"K87 (F5,D7)", "x":10.5, "y":2.5}, + {"label":"K85 (F5,D4)", "x":11.5, "y":2.5}, + {"label":"K84 (F5,D5)", "x":12.5, "y":2.5}, + {"label":"K83 (F5,D3)", "x":13.5, "y":2.5, "w":1.5}, + {"label":"K86 (F5,D6)", "x":15.25, "y":2.5}, + {"label":"K82 (F5,D2)", "x":16.25, "y":2.5}, + {"label":"K81 (F5,D1)", "x":17.25, "y":2.5}, + {"label":"K30 (B2,D0)", "x":0, "y":3.5, "w":1.75}, + {"label":"K31 (B2,D1)", "x":1.75, "y":3.5}, + {"label":"K32 (B2,D2)", "x":2.75, "y":3.5}, + {"label":"K33 (B2,D3)", "x":3.75, "y":3.5}, + {"label":"K34 (B2,D5)", "x":4.75, "y":3.5}, + {"label":"K35 (B2,D4)", "x":5.75, "y":3.5}, + {"label":"K36 (B2,D6)", "x":6.75, "y":3.5}, + {"label":"K37 (B2,D7)", "x":7.75, "y":3.5}, + {"label":"K38 (B2,B4)", "x":8.75, "y":3.5}, + {"label":"K98 (F4,B4)", "x":9.75, "y":3.5}, + {"label":"K97 (F4,D7)", "x":10.75, "y":3.5}, + {"label":"K95 (F4,D4)", "x":11.75, "y":3.5}, + {"label":"K93 (F4,D3)", "x":12.75, "y":3.5, "w":2.25}, + {"label":"K40 (B3,D0)", "x":0, "y":4.5, "w":2.25}, + {"label":"K42 (B3,D2)", "x":2.25, "y":4.5}, + {"label":"K43 (B3,D3)", "x":3.25, "y":4.5}, + {"label":"K44 (B3,D5)", "x":4.25, "y":4.5}, + {"label":"K45 (B3,D4)", "x":5.25, "y":4.5}, + {"label":"K46 (B3,D6)", "x":6.25, "y":4.5}, + {"label":"K47 (B3,D7)", "x":7.25, "y":4.5}, + {"label":"K48 (B3,B4)", "x":8.25, "y":4.5}, + {"label":"KA8 (F1,B4)", "x":9.25, "y":4.5}, + {"label":"KA7 (F1,D7)", "x":10.25, "y":4.5}, + {"label":"KA5 (F1,D4)", "x":11.25, "y":4.5}, + {"label":"KA4 (F1,D5)", "x":12.25, "y":4.5, "w":2.75}, + {"label":"K92 (F4,D2)", "x":16.25, "y":4.5}, + {"label":"K50 (B7,D0)", "x":0, "y":5.5, "w":1.5}, + {"label":"K51 (B7,D1)", "x":1.5, "y":5.5}, + {"label":"K52 (B7,D2)", "x":2.5, "y":5.5, "w":1.5}, + {"label":"K56 (B7,D6)", "x":4, "y":5.5, "w":7}, + {"label":"K57 (B7,D7)", "x":11, "y":5.5, "w":1.5}, + {"label":"K54 (B7,D5)", "x":12.5, "y":5.5}, + {"label":"K53 (B7,D3)", "x":13.5, "y":5.5, "w":1.5}, + {"label":"KA6 (F1,D6)", "x":15.25, "y":5.5}, + {"label":"KA2 (F1,D2)", "x":16.25, "y":5.5}, + {"label":"KA1 (F1,D1)", "x":17.25, "y":5.5} + ] + } + } +} diff --git a/keyboards/exclusive/e85/keymaps/default/keymap.c b/keyboards/exclusive/e85/hotswap/keymaps/default/keymap.c similarity index 100% rename from keyboards/exclusive/e85/keymaps/default/keymap.c rename to keyboards/exclusive/e85/hotswap/keymaps/default/keymap.c diff --git a/keyboards/exclusive/e85/keymaps/standard/keymap.c b/keyboards/exclusive/e85/hotswap/keymaps/standard/keymap.c similarity index 100% rename from keyboards/exclusive/e85/keymaps/standard/keymap.c rename to keyboards/exclusive/e85/hotswap/keymaps/standard/keymap.c diff --git a/keyboards/exclusive/e85/keymaps/tsangan/keymap.c b/keyboards/exclusive/e85/hotswap/keymaps/tsangan/keymap.c similarity index 100% rename from keyboards/exclusive/e85/keymaps/tsangan/keymap.c rename to keyboards/exclusive/e85/hotswap/keymaps/tsangan/keymap.c diff --git a/keyboards/exclusive/e85/hotswap/keymaps/via/config.h b/keyboards/exclusive/e85/hotswap/keymaps/via/config.h new file mode 100644 index 0000000000..7580d4a60e --- /dev/null +++ b/keyboards/exclusive/e85/hotswap/keymaps/via/config.h @@ -0,0 +1,17 @@ + /* Copyright 2020 MechMerlin + * + * 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 DYNAMIC_KEYMAP_LAYER_COUNT 3 \ No newline at end of file diff --git a/keyboards/exclusive/e85/keymaps/via/keymap.c b/keyboards/exclusive/e85/hotswap/keymaps/via/keymap.c similarity index 100% rename from keyboards/exclusive/e85/keymaps/via/keymap.c rename to keyboards/exclusive/e85/hotswap/keymaps/via/keymap.c diff --git a/keyboards/exclusive/e85/keymaps/via/rules.mk b/keyboards/exclusive/e85/hotswap/keymaps/via/rules.mk similarity index 100% rename from keyboards/exclusive/e85/keymaps/via/rules.mk rename to keyboards/exclusive/e85/hotswap/keymaps/via/rules.mk diff --git a/keyboards/exclusive/e85/hotswap/readme.md b/keyboards/exclusive/e85/hotswap/readme.md new file mode 100644 index 0000000000..87792b607d --- /dev/null +++ b/keyboards/exclusive/e85/hotswap/readme.md @@ -0,0 +1,17 @@ +# Exclusive E8.5 Hotswap + +Hotswap PCB for Exclusive E8.5. + +Switch Matrix is identical between the standard and tsangan variants. Please select the correct layout. + +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +* Hardware Supported: E8.5 Hotswap, atmega32u4 +* Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=103520) + +Make example for this keyboard (after setting up your build environment): + + make exclusive/e85/hotswap:default + +**Reset Key**: The board can be reset by shorting the two holes underneath the PCB, or pressing the reset button on the reverse side. + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/exclusive/e85/hotswap/rules.mk b/keyboards/exclusive/e85/hotswap/rules.mk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/keyboards/exclusive/e85/keymaps/via/config.h b/keyboards/exclusive/e85/keymaps/via/config.h deleted file mode 100644 index 78f3f6a696..0000000000 --- a/keyboards/exclusive/e85/keymaps/via/config.h +++ /dev/null @@ -1 +0,0 @@ - #define DYNAMIC_KEYMAP_LAYER_COUNT 3 \ No newline at end of file diff --git a/keyboards/exclusive/e85/readme.md b/keyboards/exclusive/e85/readme.md index fe5af17de8..4ee2f8d0b2 100644 --- a/keyboards/exclusive/e85/readme.md +++ b/keyboards/exclusive/e85/readme.md @@ -1,16 +1,15 @@ # Exclusive E8.5 Hotswap -Custom hotswap PCB for Exclusive E8.5. +Custom PCBs for Exclusive E8.5. -The switch matrix is identical between all three PCB variants of this board. Choose the correct LAYOUT that best matches the physical LAYOUT of your PCB. - -* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [rebeccaby](https://github.com/rebeccaby) * Hardware Supported: E8.5 Hotswap/Soldered, atmega32u4 * Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=103520) Make example for this keyboard (after setting up your build environment): - make exclusive/e85:default + make exclusive/e85/hotswap:default + make exclusive/e85/soldered:default **Reset Key**: The board can be reset by shorting the two holes underneath the PCB, or pressing the reset button on the reverse side. diff --git a/keyboards/exclusive/e85/rules.mk b/keyboards/exclusive/e85/rules.mk index e9c1ed8f1f..ebbb957235 100644 --- a/keyboards/exclusive/e85/rules.mk +++ b/keyboards/exclusive/e85/rules.mk @@ -2,13 +2,6 @@ MCU = atmega32u4 # Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options @@ -25,8 +18,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches LTO_ENABLE = yes + +DEFAULT_FOLDER = exclusive/e85/hotswap diff --git a/keyboards/exclusive/e85/soldered/config.h b/keyboards/exclusive/e85/soldered/config.h new file mode 100644 index 0000000000..c76fcf8074 --- /dev/null +++ b/keyboards/exclusive/e85/soldered/config.h @@ -0,0 +1,18 @@ +/* Copyright 2020 MechMerlin + * + * 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 PRODUCT_ID 0xE852 // E8.5 Soldered +#define PRODUCT E8.5 Soldered PCB diff --git a/keyboards/exclusive/e85/info.json b/keyboards/exclusive/e85/soldered/info.json similarity index 100% rename from keyboards/exclusive/e85/info.json rename to keyboards/exclusive/e85/soldered/info.json diff --git a/keyboards/exclusive/e85/soldered/keymaps/default/keymap.c b/keyboards/exclusive/e85/soldered/keymaps/default/keymap.c new file mode 100644 index 0000000000..80f8e0eeb4 --- /dev/null +++ b/keyboards/exclusive/e85/soldered/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2020 MechMerlin + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ansi_tsangan( + 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, MO(1), KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_ansi_tsangan( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/exclusive/e85/soldered/keymaps/standard/keymap.c b/keyboards/exclusive/e85/soldered/keymaps/standard/keymap.c new file mode 100644 index 0000000000..c6778180be --- /dev/null +++ b/keyboards/exclusive/e85/soldered/keymaps/standard/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2020 MechMerlin + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ansi_standard( + 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, MO(1), KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_APP, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_ansi_standard( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/exclusive/e85/soldered/keymaps/via/config.h b/keyboards/exclusive/e85/soldered/keymaps/via/config.h new file mode 100644 index 0000000000..2de716b720 --- /dev/null +++ b/keyboards/exclusive/e85/soldered/keymaps/via/config.h @@ -0,0 +1,17 @@ + /* Copyright 2020 MechMerlin + * + * 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 DYNAMIC_KEYMAP_LAYER_COUNT 3 \ No newline at end of file diff --git a/keyboards/exclusive/e85/soldered/keymaps/via/keymap.c b/keyboards/exclusive/e85/soldered/keymaps/via/keymap.c new file mode 100644 index 0000000000..c55c35ce19 --- /dev/null +++ b/keyboards/exclusive/e85/soldered/keymaps/via/keymap.c @@ -0,0 +1,45 @@ +/* Copyright 2020 MechMerlin + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ansi_tsangan( + 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, MO(1), KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_ansi_tsangan( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_ansi_tsangan( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/exclusive/e85/soldered/keymaps/via/rules.mk b/keyboards/exclusive/e85/soldered/keymaps/via/rules.mk new file mode 100644 index 0000000000..29a6f75191 --- /dev/null +++ b/keyboards/exclusive/e85/soldered/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration \ No newline at end of file diff --git a/keyboards/exclusive/e85/soldered/readme.md b/keyboards/exclusive/e85/soldered/readme.md new file mode 100644 index 0000000000..292efe0ff3 --- /dev/null +++ b/keyboards/exclusive/e85/soldered/readme.md @@ -0,0 +1,15 @@ +# Exclusive E8.5 Soldered + +Soldered PCB for Exclusive E8.5. + +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [rebeccaby](https://github.com/rebeccaby) +* Hardware Supported: E8.5 Soldered, atmega32u4 +* Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=103520) + +Make example for this keyboard (after setting up your build environment): + + make exclusive/e85/soldered:default + +**Reset Key**: The board can be reset by shorting the two holes underneath the PCB, or pressing the reset button on the reverse side. + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/exclusive/e85/soldered/rules.mk b/keyboards/exclusive/e85/soldered/rules.mk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/keyboards/exclusive/e85/soldered/soldered.c b/keyboards/exclusive/e85/soldered/soldered.c new file mode 100644 index 0000000000..e01221a2c5 --- /dev/null +++ b/keyboards/exclusive/e85/soldered/soldered.c @@ -0,0 +1,17 @@ +/* Copyright 2020 MechMerlin + * + * 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 "soldered.h" diff --git a/keyboards/exclusive/e85/e85.h b/keyboards/exclusive/e85/soldered/soldered.h similarity index 90% rename from keyboards/exclusive/e85/e85.h rename to keyboards/exclusive/e85/soldered/soldered.h index 19b2dff550..c14b9c39e6 100644 --- a/keyboards/exclusive/e85/e85.h +++ b/keyboards/exclusive/e85/soldered/soldered.h @@ -20,7 +20,6 @@ #define ___ KC_NO -// This is the layout for the soldered PCB #define LAYOUT_all( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K68, K67, K65, K64, K63, K66, K62, K61, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K70, K77, K75, K74, K73, K76, K72, K71, \ @@ -42,12 +41,11 @@ { KC_NO, KA1, KA2, KA3, KA4, KA5, KA6, KA7, KA8 }, \ } -// This is the layout for one hotswap PCB and can also be used on the soldered edition #define LAYOUT_ansi_standard( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K68, K67, K65, K64, K63, K66, K62, K61, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K70, K77, K75, K73, K76, K72, K71, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K84, K83, K86, K82, K81, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K93, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K84, K94, K86, K82, K81, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K83, \ K40, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, K92, \ K50, K51, K52, K56, K58, K57, K54, K53, KA6, KA2, KA1 \ ) { \ @@ -60,16 +58,15 @@ { KC_NO, K61, K62, K63, K64, K65, K66, K67, K68 }, \ { K70, K71, K72, K73, KC_NO, K75, K76, K77, K78 }, \ { KC_NO, K81, K82, K83, K84, K85, K86, K87, K88 }, \ - { KC_NO, KC_NO, K92, K93, KC_NO, K95, KC_NO, K97, K98 }, \ + { KC_NO, KC_NO, K92, KC_NO, K94, K95, KC_NO, K97, K98 }, \ { KC_NO, KA1, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \ } -// This is the layout for one hotswap PCB and can also be used on the soldered edition #define LAYOUT_ansi_tsangan( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K68, K67, K65, K64, K63, K66, K62, K61, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K70, K77, K75, K73, K76, K72, K71, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K84, K83, K86, K82, K81, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K93, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K84, K94, K86, K82, K81, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K83, \ K40, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, K92, \ K50, K51, K52, K56, K57, K54, K53, KA6, KA2, KA1 \ ) { \ @@ -82,6 +79,6 @@ { KC_NO, K61, K62, K63, K64, K65, K66, K67, K68 }, \ { K70, K71, K72, K73, KC_NO, K75, K76, K77, K78 }, \ { KC_NO, K81, K82, K83, K84, K85, K86, K87, K88 }, \ - { KC_NO, KC_NO, K92, K93, KC_NO, K95, KC_NO, K97, K98 }, \ - { KC_NO, KA1, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \ + { KC_NO, KC_NO, K92, KC_NO, K94, K95, KC_NO, K97, K98 }, \ + { KC_NO, KA1, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \ } diff --git a/keyboards/fjlabs/bolsa65/bolsa65.c b/keyboards/fjlabs/bolsa65/bolsa65.c new file mode 100644 index 0000000000..1d094ac8eb --- /dev/null +++ b/keyboards/fjlabs/bolsa65/bolsa65.c @@ -0,0 +1,28 @@ +/* +Copyright 2020 +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 "bolsa65.h" + +void matrix_init_kb(void) { + // Initialize indicator LEDs to output + setPinOutput(F7); // Caps + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(F7, led_state.caps_lock); + } + return res; +} diff --git a/keyboards/fjlabs/bolsa65/bolsa65.h b/keyboards/fjlabs/bolsa65/bolsa65.h new file mode 100644 index 0000000000..24325d0f19 --- /dev/null +++ b/keyboards/fjlabs/bolsa65/bolsa65.h @@ -0,0 +1,32 @@ +/* +Copyright 2020 +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 . +*/ + +#pragma once + +#include "quantum.h" + +/* Bolsa65 Keymap Definitions */ +#define LAYOUT_65_ansi_blocker( \ + 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, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ + K40, K41, K42, K44, K49, K4A, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E }, \ + { K40, K41, K42, KC_NO, K44, KC_NO, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D, K4E } \ +} diff --git a/keyboards/fjlabs/bolsa65/config.h b/keyboards/fjlabs/bolsa65/config.h new file mode 100644 index 0000000000..c38da97076 --- /dev/null +++ b/keyboards/fjlabs/bolsa65/config.h @@ -0,0 +1,108 @@ +/* +Copyright 2020 + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x7074 // FJLabs +#define PRODUCT_ID 0x0001 // Bolsa65 +#define DEVICE_VER 0x0001 // Version 1 +#define MANUFACTURER FJLabs +#define PRODUCT bolsa65 + +/* 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) + * +*/ + +// Checked with Eagle Schematic +#define MATRIX_ROW_PINS { F1, F0, F6, F5, F4 } +#define MATRIX_COL_PINS { C7, B1, B2, B3, B7, D0, D1, D2, D3, D5, D4, D6, D7, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* Define RGB Underglow +#define RGB_DI_PIN B0 +#define RGBLED_NUM 24 +#define RGBLIGHT_ANIMATIONS */ +/* #define RGBLIGHT_LAYER_BLINK*/ + +/* Define less important options */ + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/fjlabs/bolsa65/info.json b/keyboards/fjlabs/bolsa65/info.json new file mode 100644 index 0000000000..2485c29f5c --- /dev/null +++ b/keyboards/fjlabs/bolsa65/info.json @@ -0,0 +1,84 @@ +{ + "keyboard_name": "Bolsa65", + "url": "https://www.bolsakeyboardsupply.com", + "maintainer": "FJLabs", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_blocker": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0, "w": 2}, + {"x": 15, "y": 0}, + + {"x": 0, "y": 1, "w": 1.5}, + {"x": 1.5, "y": 1}, + {"x": 2.5, "y": 1}, + {"x": 3.5, "y": 1}, + {"x": 4.5, "y": 1}, + {"x": 5.5, "y": 1}, + {"x": 6.5, "y": 1}, + {"x": 7.5, "y": 1}, + {"x": 8.5, "y": 1}, + {"x": 9.5, "y": 1}, + {"x": 10.5, "y": 1}, + {"x": 11.5, "y": 1}, + {"x": 12.5, "y": 1}, + {"x": 13.5, "y": 1, "w": 1.5}, + {"x": 15, "y": 1}, + + {"x": 0, "y": 2, "w": 1.75}, + {"x": 1.75, "y": 2}, + {"x": 2.75, "y": 2}, + {"x": 3.75, "y": 2}, + {"x": 4.75, "y": 2}, + {"x": 5.75, "y": 2}, + {"x": 6.75, "y": 2}, + {"x": 7.75, "y": 2}, + {"x": 8.75, "y": 2}, + {"x": 9.75, "y": 2}, + {"x": 10.75, "y": 2}, + {"x": 11.75, "y": 2}, + {"x": 12.75, "y": 2, "w": 2.25}, + {"x": 15, "y": 2}, + + {"x": 0, "y": 3, "w": 2.25}, + {"x": 2.25, "y": 3}, + {"x": 3.25, "y": 3}, + {"x": 4.25, "y": 3}, + {"x": 5.25, "y": 3}, + {"x": 6.25, "y": 3}, + {"x": 7.25, "y": 3}, + {"x": 8.25, "y": 3}, + {"x": 9.25, "y": 3}, + {"x": 10.25, "y": 3}, + {"x": 11.25, "y": 3}, + {"x": 12.25, "y": 3, "w": 1.75}, + {"x": 14, "y": 3}, + {"x": 15, "y": 3}, + + {"x": 0, "y": 4, "w": 1.25}, + {"x": 1.25, "y": 4, "w": 1.25}, + {"x": 2.5, "y": 4, "w": 1.25}, + {"x": 3.75, "y": 4, "w": 6.25}, + {"x": 10, "y": 4, "w": 1.25}, + {"x": 11.25, "y": 4, "w": 1.25}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4} + ] + } + } +} diff --git a/keyboards/fjlabs/bolsa65/keymaps/default/keymap.c b/keyboards/fjlabs/bolsa65/keymaps/default/keymap.c new file mode 100644 index 0000000000..d36898e0c6 --- /dev/null +++ b/keyboards/fjlabs/bolsa65/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +/* +Copyright 2020 +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 QMK_KEYBOARD_H + +enum layers { + _LAYER0, + _LAYER1, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_LAYER0] = LAYOUT_65_ansi_blocker( + KC_GRAVE, 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, TG(1), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_ESC , + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_LAYER1] = LAYOUT_65_ansi_blocker( + 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_TRNS, TG(1), + KC_TRNS, RGB_TOG, RGB_RMOD, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_SPI, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/fjlabs/bolsa65/keymaps/via/keymap.c b/keyboards/fjlabs/bolsa65/keymaps/via/keymap.c new file mode 100644 index 0000000000..0db9e52210 --- /dev/null +++ b/keyboards/fjlabs/bolsa65/keymaps/via/keymap.c @@ -0,0 +1,58 @@ +/* +Copyright 2020 +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 QMK_KEYBOARD_H + +enum layers { + _LAYER0, + _LAYER1, + _LAYER2, + _LAYER3, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_LAYER0] = LAYOUT_65_ansi_blocker( + KC_GRAVE, 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, TG(1), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_ESC , + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_LAYER1] = LAYOUT_65_ansi_blocker( + 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_TRNS, TG(1), + KC_TRNS, RGB_TOG, RGB_RMOD, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_SPI, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_LAYER2] = LAYOUT_65_ansi_blocker( + KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_LAYER3] = LAYOUT_65_ansi_blocker( + KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + +}; diff --git a/keyboards/fjlabs/bolsa65/keymaps/via/rules.mk b/keyboards/fjlabs/bolsa65/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/fjlabs/bolsa65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/fjlabs/bolsa65/readme.md b/keyboards/fjlabs/bolsa65/readme.md new file mode 100644 index 0000000000..e668f4b8c8 --- /dev/null +++ b/keyboards/fjlabs/bolsa65/readme.md @@ -0,0 +1,12 @@ +# bolsa65 + +The following is the QMK Firmware for the [BolsaKeyboardSupply](https://www.bolsakeyboardsupply.com) Bolsa65 mechanical keyboard. + +* Keyboard Maintainer: FJLabs +* Hardware Supported: Bolsa65 + +Make example for this keyboard (after setting up your build environment): + + make fjlabs/bolsa65:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/fjlabs/bolsa65/rules.mk b/keyboards/fjlabs/bolsa65/rules.mk new file mode 100644 index 0000000000..945e7be2ee --- /dev/null +++ b/keyboards/fjlabs/bolsa65/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +KEYBOARD_LOCK_ENABLE = yes + +LAYOUTS = 65_ansi_blocker diff --git a/keyboards/bigswitch/README.md b/keyboards/flehrad/bigswitch/README.md similarity index 93% rename from keyboards/bigswitch/README.md rename to keyboards/flehrad/bigswitch/README.md index 65213af7c4..1a0fb155a7 100644 --- a/keyboards/bigswitch/README.md +++ b/keyboards/flehrad/bigswitch/README.md @@ -7,6 +7,8 @@ Designed by Don of the Board Podcast and sold as a kit by [keeb.io](https://keeb https://github.com/flehrad/Big-Switch-PCB +make: flehrad/bigswitch:default + ### Technical Specifications * Uses a atmega32u4 pro micro or pin compatible MCU diff --git a/keyboards/bigswitch/bigswitch.c b/keyboards/flehrad/bigswitch/bigswitch.c similarity index 100% rename from keyboards/bigswitch/bigswitch.c rename to keyboards/flehrad/bigswitch/bigswitch.c diff --git a/keyboards/bigswitch/bigswitch.h b/keyboards/flehrad/bigswitch/bigswitch.h old mode 100755 new mode 100644 similarity index 100% rename from keyboards/bigswitch/bigswitch.h rename to keyboards/flehrad/bigswitch/bigswitch.h diff --git a/keyboards/bigswitch/config.h b/keyboards/flehrad/bigswitch/config.h old mode 100755 new mode 100644 similarity index 100% rename from keyboards/bigswitch/config.h rename to keyboards/flehrad/bigswitch/config.h diff --git a/keyboards/bigswitch/info.json b/keyboards/flehrad/bigswitch/info.json similarity index 100% rename from keyboards/bigswitch/info.json rename to keyboards/flehrad/bigswitch/info.json diff --git a/keyboards/flehrad/bigswitch/keymaps/333fred/config.h b/keyboards/flehrad/bigswitch/keymaps/333fred/config.h new file mode 100644 index 0000000000..3273cc8db4 --- /dev/null +++ b/keyboards/flehrad/bigswitch/keymaps/333fred/config.h @@ -0,0 +1,26 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#pragma once + +// Long tapping term on the big switch, because it takes so long to press +#define TAPPING_TERM 500 diff --git a/keyboards/bigswitch/keymaps/333fred/keymap.c b/keyboards/flehrad/bigswitch/keymaps/333fred/keymap.c similarity index 67% rename from keyboards/bigswitch/keymaps/333fred/keymap.c rename to keyboards/flehrad/bigswitch/keymaps/333fred/keymap.c index be40fecb23..ef1717c6af 100644 --- a/keyboards/bigswitch/keymaps/333fred/keymap.c +++ b/keyboards/flehrad/bigswitch/keymaps/333fred/keymap.c @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include QMK_KEYBOARD_H typedef enum { diff --git a/keyboards/bigswitch/keymaps/333fred/rules.mk b/keyboards/flehrad/bigswitch/keymaps/333fred/rules.mk similarity index 100% rename from keyboards/bigswitch/keymaps/333fred/rules.mk rename to keyboards/flehrad/bigswitch/keymaps/333fred/rules.mk diff --git a/keyboards/bigswitch/keymaps/default/keymap.c b/keyboards/flehrad/bigswitch/keymaps/default/keymap.c old mode 100755 new mode 100644 similarity index 100% rename from keyboards/bigswitch/keymaps/default/keymap.c rename to keyboards/flehrad/bigswitch/keymaps/default/keymap.c diff --git a/keyboards/flehrad/bigswitch/keymaps/via/keymap.c b/keyboards/flehrad/bigswitch/keymaps/via/keymap.c new file mode 100644 index 0000000000..f253f4b12e --- /dev/null +++ b/keyboards/flehrad/bigswitch/keymaps/via/keymap.c @@ -0,0 +1,29 @@ +/* +Copyright 2020 MechMerlin + +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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT(KC_TRNS), + + [1] = LAYOUT(KC_TRNS), + + [2] = LAYOUT(KC_TRNS), + + [3] = LAYOUT(KC_TRNS) +}; diff --git a/keyboards/flehrad/bigswitch/keymaps/via/rules.mk b/keyboards/flehrad/bigswitch/keymaps/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/flehrad/bigswitch/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/bigswitch/keymaps/wanleg/config.h b/keyboards/flehrad/bigswitch/keymaps/wanleg/config.h similarity index 100% rename from keyboards/bigswitch/keymaps/wanleg/config.h rename to keyboards/flehrad/bigswitch/keymaps/wanleg/config.h diff --git a/keyboards/bigswitch/keymaps/wanleg/keymap.c b/keyboards/flehrad/bigswitch/keymaps/wanleg/keymap.c similarity index 100% rename from keyboards/bigswitch/keymaps/wanleg/keymap.c rename to keyboards/flehrad/bigswitch/keymaps/wanleg/keymap.c diff --git a/keyboards/bigswitch/keymaps/wanleg/rules.mk b/keyboards/flehrad/bigswitch/keymaps/wanleg/rules.mk similarity index 100% rename from keyboards/bigswitch/keymaps/wanleg/rules.mk rename to keyboards/flehrad/bigswitch/keymaps/wanleg/rules.mk diff --git a/keyboards/bigswitch/rules.mk b/keyboards/flehrad/bigswitch/rules.mk old mode 100755 new mode 100644 similarity index 100% rename from keyboards/bigswitch/rules.mk rename to keyboards/flehrad/bigswitch/rules.mk diff --git a/keyboards/handwired/downbubble/config.h b/keyboards/flehrad/downbubble/config.h similarity index 84% rename from keyboards/handwired/downbubble/config.h rename to keyboards/flehrad/downbubble/config.h index f2628cb706..04fbc4a0dd 100644 --- a/keyboards/handwired/downbubble/config.h +++ b/keyboards/flehrad/downbubble/config.h @@ -207,34 +207,6 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/downbubble/downbubble.c b/keyboards/flehrad/downbubble/downbubble.c similarity index 100% rename from keyboards/handwired/downbubble/downbubble.c rename to keyboards/flehrad/downbubble/downbubble.c diff --git a/keyboards/handwired/downbubble/downbubble.h b/keyboards/flehrad/downbubble/downbubble.h similarity index 100% rename from keyboards/handwired/downbubble/downbubble.h rename to keyboards/flehrad/downbubble/downbubble.h diff --git a/keyboards/handwired/downbubble/info.json b/keyboards/flehrad/downbubble/info.json similarity index 100% rename from keyboards/handwired/downbubble/info.json rename to keyboards/flehrad/downbubble/info.json diff --git a/keyboards/handwired/downbubble/keymaps/default/config.h b/keyboards/flehrad/downbubble/keymaps/default/config.h similarity index 100% rename from keyboards/handwired/downbubble/keymaps/default/config.h rename to keyboards/flehrad/downbubble/keymaps/default/config.h diff --git a/keyboards/handwired/downbubble/keymaps/default/keymap.c b/keyboards/flehrad/downbubble/keymaps/default/keymap.c similarity index 100% rename from keyboards/handwired/downbubble/keymaps/default/keymap.c rename to keyboards/flehrad/downbubble/keymaps/default/keymap.c diff --git a/keyboards/handwired/downbubble/keymaps/default/readme.md b/keyboards/flehrad/downbubble/keymaps/default/readme.md similarity index 100% rename from keyboards/handwired/downbubble/keymaps/default/readme.md rename to keyboards/flehrad/downbubble/keymaps/default/readme.md diff --git a/keyboards/handwired/downbubble/license b/keyboards/flehrad/downbubble/license similarity index 100% rename from keyboards/handwired/downbubble/license rename to keyboards/flehrad/downbubble/license diff --git a/keyboards/handwired/downbubble/readme.md b/keyboards/flehrad/downbubble/readme.md similarity index 95% rename from keyboards/handwired/downbubble/readme.md rename to keyboards/flehrad/downbubble/readme.md index e662345127..f1c83b8aa8 100644 --- a/keyboards/handwired/downbubble/readme.md +++ b/keyboards/flehrad/downbubble/readme.md @@ -10,6 +10,6 @@ Hardware Availability: The Board Podcast Slack Make example for this keyboard (after setting up your build environment): - make downbubble:default + make flehrad/downbubble:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/downbubble/rules.mk b/keyboards/flehrad/downbubble/rules.mk similarity index 95% rename from keyboards/handwired/downbubble/rules.mk rename to keyboards/flehrad/downbubble/rules.mk index 189b82720e..39fa656c61 100644 --- a/keyboards/handwired/downbubble/rules.mk +++ b/keyboards/flehrad/downbubble/rules.mk @@ -30,4 +30,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/handwired/numbrero/config.h b/keyboards/flehrad/numbrero/config.h similarity index 100% rename from keyboards/handwired/numbrero/config.h rename to keyboards/flehrad/numbrero/config.h diff --git a/keyboards/handwired/numbrero/info.json b/keyboards/flehrad/numbrero/info.json similarity index 100% rename from keyboards/handwired/numbrero/info.json rename to keyboards/flehrad/numbrero/info.json diff --git a/keyboards/handwired/numbrero/keymaps/default/keymap.c b/keyboards/flehrad/numbrero/keymaps/default/keymap.c similarity index 100% rename from keyboards/handwired/numbrero/keymaps/default/keymap.c rename to keyboards/flehrad/numbrero/keymaps/default/keymap.c diff --git a/keyboards/handwired/numbrero/license b/keyboards/flehrad/numbrero/license similarity index 100% rename from keyboards/handwired/numbrero/license rename to keyboards/flehrad/numbrero/license diff --git a/keyboards/handwired/numbrero/numbrero.c b/keyboards/flehrad/numbrero/numbrero.c similarity index 100% rename from keyboards/handwired/numbrero/numbrero.c rename to keyboards/flehrad/numbrero/numbrero.c diff --git a/keyboards/handwired/numbrero/numbrero.h b/keyboards/flehrad/numbrero/numbrero.h similarity index 100% rename from keyboards/handwired/numbrero/numbrero.h rename to keyboards/flehrad/numbrero/numbrero.h diff --git a/keyboards/handwired/numbrero/readme.md b/keyboards/flehrad/numbrero/readme.md similarity index 94% rename from keyboards/handwired/numbrero/readme.md rename to keyboards/flehrad/numbrero/readme.md index 931c601274..823a81fbef 100644 --- a/keyboards/handwired/numbrero/readme.md +++ b/keyboards/flehrad/numbrero/readme.md @@ -8,6 +8,6 @@ Hardware Availability: The Board Podcast Slack Make example for this keyboard (after setting up your build environment): - make handwired/numbrero:default + make flehrad/numbrero:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/numbrero/rules.mk b/keyboards/flehrad/numbrero/rules.mk similarity index 100% rename from keyboards/handwired/numbrero/rules.mk rename to keyboards/flehrad/numbrero/rules.mk diff --git a/keyboards/snagpad/config.h b/keyboards/flehrad/snagpad/config.h similarity index 100% rename from keyboards/snagpad/config.h rename to keyboards/flehrad/snagpad/config.h diff --git a/keyboards/snagpad/info.json b/keyboards/flehrad/snagpad/info.json similarity index 100% rename from keyboards/snagpad/info.json rename to keyboards/flehrad/snagpad/info.json diff --git a/keyboards/snagpad/keymaps/default/keymap.c b/keyboards/flehrad/snagpad/keymaps/default/keymap.c similarity index 100% rename from keyboards/snagpad/keymaps/default/keymap.c rename to keyboards/flehrad/snagpad/keymaps/default/keymap.c diff --git a/keyboards/snagpad/keymaps/via/keymap.c b/keyboards/flehrad/snagpad/keymaps/via/keymap.c similarity index 100% rename from keyboards/snagpad/keymaps/via/keymap.c rename to keyboards/flehrad/snagpad/keymaps/via/keymap.c diff --git a/keyboards/flehrad/snagpad/keymaps/via/rules.mk b/keyboards/flehrad/snagpad/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/flehrad/snagpad/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/handwired/tradestation/license b/keyboards/flehrad/snagpad/license similarity index 100% rename from keyboards/handwired/tradestation/license rename to keyboards/flehrad/snagpad/license diff --git a/keyboards/snagpad/readme.md b/keyboards/flehrad/snagpad/readme.md similarity index 97% rename from keyboards/snagpad/readme.md rename to keyboards/flehrad/snagpad/readme.md index b59bd75886..cefd65e570 100644 --- a/keyboards/snagpad/readme.md +++ b/keyboards/flehrad/snagpad/readme.md @@ -8,7 +8,7 @@ Hardware Availability: [GitHub](https://github.com/flehrad/Snagpad) Make example for this keyboard (after setting up your build environment): - make snagpad:default + make flehrad/snagpad:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/snagpad/rules.mk b/keyboards/flehrad/snagpad/rules.mk similarity index 100% rename from keyboards/snagpad/rules.mk rename to keyboards/flehrad/snagpad/rules.mk diff --git a/keyboards/snagpad/snagpad.c b/keyboards/flehrad/snagpad/snagpad.c similarity index 100% rename from keyboards/snagpad/snagpad.c rename to keyboards/flehrad/snagpad/snagpad.c diff --git a/keyboards/snagpad/snagpad.h b/keyboards/flehrad/snagpad/snagpad.h similarity index 100% rename from keyboards/snagpad/snagpad.h rename to keyboards/flehrad/snagpad/snagpad.h diff --git a/keyboards/handwired/tradestation/config.h b/keyboards/flehrad/tradestation/config.h similarity index 100% rename from keyboards/handwired/tradestation/config.h rename to keyboards/flehrad/tradestation/config.h diff --git a/keyboards/handwired/tradestation/info.json b/keyboards/flehrad/tradestation/info.json similarity index 100% rename from keyboards/handwired/tradestation/info.json rename to keyboards/flehrad/tradestation/info.json diff --git a/keyboards/handwired/tradestation/keymaps/default/keymap.c b/keyboards/flehrad/tradestation/keymaps/default/keymap.c similarity index 100% rename from keyboards/handwired/tradestation/keymaps/default/keymap.c rename to keyboards/flehrad/tradestation/keymaps/default/keymap.c diff --git a/keyboards/snagpad/license b/keyboards/flehrad/tradestation/license similarity index 100% rename from keyboards/snagpad/license rename to keyboards/flehrad/tradestation/license diff --git a/keyboards/handwired/tradestation/readme.md b/keyboards/flehrad/tradestation/readme.md similarity index 97% rename from keyboards/handwired/tradestation/readme.md rename to keyboards/flehrad/tradestation/readme.md index 3a8c39e263..d2a9c4d18d 100644 --- a/keyboards/handwired/tradestation/readme.md +++ b/keyboards/flehrad/tradestation/readme.md @@ -22,6 +22,6 @@ Hardware Supported: Tradestation PCB, Pro Micro Make example for this keyboard (after setting up your build environment): - make tradestation:default + make flehrad/tradestation:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/tradestation/rules.mk b/keyboards/flehrad/tradestation/rules.mk similarity index 100% rename from keyboards/handwired/tradestation/rules.mk rename to keyboards/flehrad/tradestation/rules.mk diff --git a/keyboards/handwired/tradestation/tradestation.c b/keyboards/flehrad/tradestation/tradestation.c similarity index 100% rename from keyboards/handwired/tradestation/tradestation.c rename to keyboards/flehrad/tradestation/tradestation.c diff --git a/keyboards/handwired/tradestation/tradestation.h b/keyboards/flehrad/tradestation/tradestation.h similarity index 100% rename from keyboards/handwired/tradestation/tradestation.h rename to keyboards/flehrad/tradestation/tradestation.h diff --git a/keyboards/flx/virgo/rules.mk b/keyboards/flx/virgo/rules.mk index 529d365b59..cbf45a2b9b 100644 --- a/keyboards/flx/virgo/rules.mk +++ b/keyboards/flx/virgo/rules.mk @@ -30,5 +30,4 @@ 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 -LINK_TIME_OPTIMIZATION_ENABLE = yes - +LTO_ENABLE = yes diff --git a/keyboards/for_science/config.h b/keyboards/for_science/config.h new file mode 100644 index 0000000000..8c9c49d164 --- /dev/null +++ b/keyboards/for_science/config.h @@ -0,0 +1,78 @@ +/* +Copyright 2017 Paul James (paul@peej.co.uk) +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xF22C +#define DEVICE_VER 0x0001 +#define MANUFACTURER Peej +#define PRODUCT For Science + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 5 + +/* + * 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 { F6, B1, B3, B2, B6 } +#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } +//#define MATRIX_COL_PINS { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F6, F7, B1, B3, B2 } +#define UNUSED_PINS + +//#define USE_I2C +#define SOFT_SERIAL_PIN D0 + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +//#define MASTER_RIGHT + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* + * 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 diff --git a/keyboards/for_science/for_science.c b/keyboards/for_science/for_science.c new file mode 100644 index 0000000000..32956ca673 --- /dev/null +++ b/keyboards/for_science/for_science.c @@ -0,0 +1,16 @@ +/* Copyright 2017 Paul James (paul@peej.co.uk) + * + * 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 "for_science.h" diff --git a/keyboards/for_science/for_science.h b/keyboards/for_science/for_science.h new file mode 100644 index 0000000000..09362a5286 --- /dev/null +++ b/keyboards/for_science/for_science.h @@ -0,0 +1,38 @@ +/* Copyright 2017 Paul James (paul@peej.co.uk) + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_split_4x5_3( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L30, L31, L32, L33, L34, R30, R31, R32, R33, R34, \ + LT1, LT2, LT3, RT1, RT2, RT3 \ +) \ +{ \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { L30, L31, L32, L33, L34 }, \ + { KC_NO, KC_NO, LT1, LT2, LT3 }, \ + { R04, R03, R02, R01, R00 }, \ + { R14, R13, R12, R11, R10 }, \ + { R24, R23, R22, R21, R20 }, \ + { R34, R33, R32, R31, R30 }, \ + { KC_NO, KC_NO, RT3, RT2, RT1 } \ +} diff --git a/keyboards/for_science/info.json b/keyboards/for_science/info.json new file mode 100644 index 0000000000..de92f0eca2 --- /dev/null +++ b/keyboards/for_science/info.json @@ -0,0 +1,197 @@ +{ + "keyboard_name": "For Science", + "url": "https://github.com/peej/for-science-keyboard", + "maintainer": "qmk", + "width": 11.25, + "height": 5, + "layouts": { + "LAYOUT_split_4x5_3": { + "layout": [ + { + "x": 0, + "y": 0 + }, + { + "x": 1, + "y": 0 + }, + { + "x": 2, + "y": 0 + }, + { + "x": 3, + "y": 0 + }, + { + "x": 4, + "y": 0 + }, + { + "x": 6.25, + "y": 0 + }, + { + "x": 7.25, + "y": 0 + }, + { + "x": 8.25, + "y": 0 + }, + { + "x": 9.25, + "y": 0 + }, + { + "x": 10.25, + "y": 0 + }, + { + "x": 0, + "y": 1 + }, + { + "x": 1, + "y": 1 + }, + { + "x": 2, + "y": 1 + }, + { + "x": 3, + "y": 1 + }, + { + "x": 4, + "y": 1 + }, + { + "x": 6.25, + "y": 1 + }, + { + "x": 7.25, + "y": 1 + }, + { + "x": 8.25, + "y": 1 + }, + { + "x": 9.25, + "y": 1 + }, + { + "x": 10.25, + "y": 1 + }, + { + "x": 0, + "y": 2 + }, + { + "x": 1, + "y": 2 + }, + { + "x": 2, + "y": 2 + }, + { + "x": 3, + "y": 2 + }, + { + "x": 4, + "y": 2 + }, + { + "x": 6.25, + "y": 2 + }, + { + "x": 7.25, + "y": 2 + }, + { + "x": 8.25, + "y": 2 + }, + { + "x": 9.25, + "y": 2 + }, + { + "x": 10.25, + "y": 2 + }, + { + "x": 0, + "y": 3 + }, + { + "x": 1, + "y": 3 + }, + { + "x": 2, + "y": 3 + }, + { + "x": 3, + "y": 3 + }, + { + "x": 4, + "y": 3 + }, + { + "x": 6.25, + "y": 3 + }, + { + "x": 7.25, + "y": 3 + }, + { + "x": 8.25, + "y": 3 + }, + { + "x": 9.25, + "y": 3 + }, + { + "x": 10.25, + "y": 3 + }, + { + "x": 2, + "y": 4 + }, + { + "x": 3, + "y": 4 + }, + { + "x": 4, + "y": 4 + }, + { + "x": 6.25, + "y": 4 + }, + { + "x": 7.25, + "y": 4 + }, + { + "x": 8.25, + "y": 4 + } + ] + } + } +} diff --git a/keyboards/for_science/keymaps/default/keymap.c b/keyboards/for_science/keymaps/default/keymap.c new file mode 100644 index 0000000000..918f60f4b8 --- /dev/null +++ b/keyboards/for_science/keymaps/default/keymap.c @@ -0,0 +1,113 @@ +/* Copyright 2017 Paul James (paul@peej.co.uk) + * + * 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 QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _LAYER, + _MOD_LAYER, + _FUNCT +}; + +#define SFT_A SFT_T(KC_A) +#define SFT_F1 SFT_T(KC_F1) +#define SFT_Z SFT_T(KC_Z) +#define SFT_F6 SFT_T(KC_F6) +#define LAY_X LT(_LAYER, KC_X) +#define LAY_F7 LT(_LAYER, KC_F7) +#define LAY_SLS LT(_LAYER, KC_SLSH) +#define LAY_SPC LT(_LAYER, KC_SPACE) + +#define LOCK LGUI(KC_L) +#define MAC_LCK LGUI(LCTL(KC_Q)) + +#define LAYER MO(_LAYER) +#define FUNCT MO(_FUNCT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + * ,---------------------------------------- ----------------------------------------. + * | Tab | Esc | ( | { | [ | | ] | } | ) | ' | BkSp | + * | ~ | ` | < | _ | - | | + | = | > | \ | Del | + * |-------+-------+-------+-------+-------+ |-------+-------+-------+-------+-------| + * | Q | W | E | R | T | | Y | U | I | O | P | + * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | + * |-------+-------+-------+-------+-------+ |-------+-------+-------+-------+-------| + * | A | S | D | F | G | | H | J | K | L | Enter | + * | F1 | F2 F3 | F4 | F5 | | PgUp | Home | Up | End | ; | + * |-Shift-+-------+-------+-------+-------+ |-------+-------+-------+-------+-------| + * | Z | X | C | V | B | | N | M | , | . | / | + * | F6 | F7 | F8 | F9 | F10 | | PgDn | Left | Down | Right | | + * `-Shift---Layer-+-------+-------+-------+ |-------+-------+-------+---------Layer-' + * | Ctrl | Gui | Alt | | Space | Layer | Shift | + * | | | | | Funct | | | + * `------------------------ `-Layer-----------------' + */ + +[_BASE] = LAYOUT_split_4x5_3( + KC_TAB, KC_ESC, KC_LPRN, KC_LCBR, KC_LBRC, KC_RBRC, KC_RCBR, KC_RPRN, KC_QUOT, KC_BSPC, + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + SFT_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + SFT_Z, LAY_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LAY_SLS, + KC_LCTL, KC_LGUI, KC_LALT, LAY_SPC, LAYER, KC_RSFT +), + +[_LAYER] = LAYOUT_split_4x5_3( + KC_TILD, KC_GRV, KC_LABK, KC_UNDS, KC_MINS, KC_PLUS, KC_EQL, KC_RABK, KC_BSLS, KC_DEL, + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + SFT_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_SCLN, + SFT_F6, LAY_F7, KC_F8, KC_F9, KC_F10, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, + _______, _______, _______, FUNCT, _______, _______ +), + +[_MOD_LAYER] = LAYOUT_split_4x5_3( + KC_TILD, _______, _______, _______, _______, KC_Q, _______, _______, _______, _______, + KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ +), + +[_FUNCT] = LAYOUT_split_4x5_3( + RESET, _______, _______, _______, LOCK, MAC_LCK, _______, _______, _______, MAGIC_SWAP_LALT_LGUI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ +), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (get_mods() & MOD_MASK_CAG) { + if (record->event.pressed) { + layer_on(_MOD_LAYER); + } else { + layer_off(_MOD_LAYER); + } + } + + if (record->event.pressed) { + if (keycode == KC_BSPC && (get_mods() & MOD_MASK_ALT)) { + tap_code(KC_DEL); + return false; + } + } + + return true; +}; diff --git a/keyboards/for_science/keymaps/default/readme.md b/keyboards/for_science/keymaps/default/readme.md new file mode 100644 index 0000000000..a5cb3ac098 --- /dev/null +++ b/keyboards/for_science/keymaps/default/readme.md @@ -0,0 +1 @@ +# Default layout for For Science diff --git a/keyboards/for_science/readme.md b/keyboards/for_science/readme.md new file mode 100644 index 0000000000..8fa399a10c --- /dev/null +++ b/keyboards/for_science/readme.md @@ -0,0 +1,18 @@ +# For Science + +![for_science](https://raw.githubusercontent.com/peej/for-science-keyboard/master/pcb.png) + +A split ergo 4x5 keyboard with 3 thumb keys where each half is smaller than the 100x100mm cheap PCB production size. +Designed to be easy to build, it only supports serial communication over a TRRS cable and no LED support. +The PCB is reversible, meaning that you use the same PCB for both the left and right halves and thus need two PCBs to create a full keyboard. + +* Keyboard Maintainer: [Peej](https://github.com/peej) +* Hardware Supported: Pro Micro +* Hardware Availability: [Github](https://github.com/peej/for-science-keyboard) + +Make example for this keyboard (after setting up your build environment): + + make for_science:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/for_science/rules.mk b/keyboards/for_science/rules.mk new file mode 100644 index 0000000000..b8e091ef66 --- /dev/null +++ b/keyboards/for_science/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/gami_studio/lex60/rules.mk b/keyboards/gami_studio/lex60/rules.mk index 3b7f4dbd51..84bbccfba1 100644 --- a/keyboards/gami_studio/lex60/rules.mk +++ b/keyboards/gami_studio/lex60/rules.mk @@ -29,4 +29,3 @@ MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/gboards/g/keymap_combo.h b/keyboards/gboards/g/keymap_combo.h index 1302c46035..58e99863ea 100644 --- a/keyboards/gboards/g/keymap_combo.h +++ b/keyboards/gboards/g/keymap_combo.h @@ -60,7 +60,7 @@ int COMBO_LEN = sizeof(key_combos) / sizeof(key_combos[0]); #define COMB BLANK #define SUBS A_ACTI #define TOGG A_TOGG -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { switch (combo_index) { #include "combos.def" } diff --git a/keyboards/getta25/keymaps/oled/rules.mk b/keyboards/getta25/keymaps/oled/rules.mk new file mode 100644 index 0000000000..c582662134 --- /dev/null +++ b/keyboards/getta25/keymaps/oled/rules.mk @@ -0,0 +1 @@ +OLED_DRIVER_ENABLE = yes diff --git a/keyboards/getta25/rules.mk b/keyboards/getta25/rules.mk index 65aca76133..fdb399da28 100644 --- a/keyboards/getta25/rules.mk +++ b/keyboards/getta25/rules.mk @@ -26,7 +26,7 @@ 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. -OLED_DRIVER_ENABLE = yes +OLED_DRIVER_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/gingham/config.h b/keyboards/gingham/config.h index 653c0f6279..0c4d4c97a9 100644 --- a/keyboards/gingham/config.h +++ b/keyboards/gingham/config.h @@ -213,30 +213,3 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ diff --git a/keyboards/gingham/keymaps/via/keymap.c b/keyboards/gingham/keymaps/via/keymap.c index 3f7f1c4229..f303449739 100644 --- a/keyboards/gingham/keymaps/via/keymap.c +++ b/keyboards/gingham/keymaps/via/keymap.c @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_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_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), [2] = LAYOUT_60_iso_split_bs_rshift( /* Empty for dynamic keymaps */ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/gingham/keymaps/via/readme.md b/keyboards/gingham/keymaps/via/readme.md index a49e2c0568..b82bc8e79f 100644 --- a/keyboards/gingham/keymaps/via/readme.md +++ b/keyboards/gingham/keymaps/via/readme.md @@ -1,3 +1 @@ # Compile with this keymap to use VIA - -Sadly right now when using VIA, extrakeys is disabled. This means volume control will not work. diff --git a/keyboards/gingham/keymaps/via/rules.mk b/keyboards/gingham/keymaps/via/rules.mk index 930e3552ad..1e5b99807c 100644 --- a/keyboards/gingham/keymaps/via/rules.mk +++ b/keyboards/gingham/keymaps/via/rules.mk @@ -1,3 +1 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = no diff --git a/keyboards/gingham/rules.mk b/keyboards/gingham/rules.mk index e1046c017b..c4e36e8778 100644 --- a/keyboards/gingham/rules.mk +++ b/keyboards/gingham/rules.mk @@ -33,6 +33,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs CUSTOM_MATRIX = lite diff --git a/keyboards/gon/nerd60/keymaps/mauin/rules.mk b/keyboards/gon/nerd60/keymaps/mauin/rules.mk index 625fc9c029..6094ff6603 100644 --- a/keyboards/gon/nerd60/keymaps/mauin/rules.mk +++ b/keyboards/gon/nerd60/keymaps/mauin/rules.mk @@ -17,4 +17,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/gon/nerd60/rules.mk b/keyboards/gon/nerd60/rules.mk index 8446dd39ca..74fd4fcc32 100644 --- a/keyboards/gon/nerd60/rules.mk +++ b/keyboards/gon/nerd60/rules.mk @@ -33,4 +33,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk b/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk index 65c2a5d622..e827f50723 100644 --- a/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk +++ b/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk @@ -18,7 +18,6 @@ UNICODEMAP_ENABLE = no # Enable extended unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs #VARIABLE_TRACE = no # Use this to debug changes to variable values API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings KEY_LOCK_ENABLE = no # This enables key lock diff --git a/keyboards/gon/nerdtkl/rules.mk b/keyboards/gon/nerdtkl/rules.mk index 8446dd39ca..74fd4fcc32 100644 --- a/keyboards/gon/nerdtkl/rules.mk +++ b/keyboards/gon/nerdtkl/rules.mk @@ -33,4 +33,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/gray_studio/hb85/config.h b/keyboards/gray_studio/hb85/config.h index f3fb20ec6b..9309012a41 100644 --- a/keyboards/gray_studio/hb85/config.h +++ b/keyboards/gray_studio/hb85/config.h @@ -17,8 +17,8 @@ along with this program. If not, see . #pragma once -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422F +#define VENDOR_ID 0x4753 +#define PRODUCT_ID 0x2000 #define DEVICE_VER 0x0200 #define MANUFACTURER Gray Studio #define PRODUCT HB85 diff --git a/keyboards/gray_studio/hb85/keymaps/via/config.h b/keyboards/gray_studio/hb85/keymaps/via/config.h new file mode 100644 index 0000000000..c81bd53bb7 --- /dev/null +++ b/keyboards/gray_studio/hb85/keymaps/via/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2020 MechMerlin + +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 . +*/ + +#pragma once + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/gray_studio/hb85/keymaps/via/keymap.c b/keyboards/gray_studio/hb85/keymaps/via/keymap.c new file mode 100644 index 0000000000..febf4715b8 --- /dev/null +++ b/keyboards/gray_studio/hb85/keymaps/via/keymap.c @@ -0,0 +1,56 @@ +/* +Copyright 2019 Felipe Coury + +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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_DEL, +KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_BSPC, 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_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , KC_P4 , KC_P5 , KC_P6 , +KC_LSFT, KC_NO , KC_Z , KC_Z , KC_X , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_P1 , KC_P2 , KC_P3 , + KC_LCTL, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_PDOT + ), + + [1] = LAYOUT_all( + RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/gray_studio/hb85/keymaps/via/rules.mk b/keyboards/gray_studio/hb85/keymaps/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/gray_studio/hb85/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/gray_studio/hb85/readme.md b/keyboards/gray_studio/hb85/readme.md index 7e39f327c1..523f774c83 100644 --- a/keyboards/gray_studio/hb85/readme.md +++ b/keyboards/gray_studio/hb85/readme.md @@ -4,7 +4,7 @@ A Sony HitBit MSX Computer inspired Keyboard. -* Keyboard Maintainer: [Felipe Coury](https://github.com/fcoury) +* Keyboard Maintainer: [Felipe Coury](https://github.com/fcoury), [MechMerlin](https://github.com/mechmerlin) * Hardware Supported: Gray Studio HB85 * Hardware Availability: [Group buy](https://en.zfrontier.com/products/gray-hb85) finished diff --git a/keyboards/gray_studio/space65/config.h b/keyboards/gray_studio/space65/config.h index 0485afca40..2e3928e695 100644 --- a/keyboards/gray_studio/space65/config.h +++ b/keyboards/gray_studio/space65/config.h @@ -211,34 +211,6 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/gray_studio/space65/rules.mk b/keyboards/gray_studio/space65/rules.mk index 887d870a68..b882a3a19a 100644 --- a/keyboards/gray_studio/space65/rules.mk +++ b/keyboards/gray_studio/space65/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = 65_ansi_blocker 65_iso_blocker diff --git a/keyboards/gray_studio/think65/hotswap/rules.mk b/keyboards/gray_studio/think65/hotswap/rules.mk index 2d789ff59a..dac30fa9fb 100644 --- a/keyboards/gray_studio/think65/hotswap/rules.mk +++ b/keyboards/gray_studio/think65/hotswap/rules.mk @@ -30,9 +30,8 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes LAYOUTS = 65_ansi_blocker diff --git a/keyboards/gray_studio/think65/solder/rules.mk b/keyboards/gray_studio/think65/solder/rules.mk index 2d789ff59a..dac30fa9fb 100644 --- a/keyboards/gray_studio/think65/solder/rules.mk +++ b/keyboards/gray_studio/think65/solder/rules.mk @@ -30,9 +30,8 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes LAYOUTS = 65_ansi_blocker diff --git a/keyboards/grid600/press/rules.mk b/keyboards/grid600/press/rules.mk index 2d9a649e0f..17c51ec37c 100644 --- a/keyboards/grid600/press/rules.mk +++ b/keyboards/grid600/press/rules.mk @@ -30,4 +30,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/halberd/config.h b/keyboards/halberd/config.h index 57e29e858e..746375b70e 100644 --- a/keyboards/halberd/config.h +++ b/keyboards/halberd/config.h @@ -188,34 +188,6 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/halberd/rules.mk b/keyboards/halberd/rules.mk index 145d1f3229..28e6adcc23 100644 --- a/keyboards/halberd/rules.mk +++ b/keyboards/halberd/rules.mk @@ -30,4 +30,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/108key_trackpoint/rules.mk b/keyboards/handwired/108key_trackpoint/rules.mk index 2a8ed6af15..848c79fe34 100644 --- a/keyboards/handwired/108key_trackpoint/rules.mk +++ b/keyboards/handwired/108key_trackpoint/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) PS2_MOUSE_ENABLE = yes PS2_USE_USART = yes diff --git a/keyboards/handwired/3dp660/3dp660.c b/keyboards/handwired/3dp660/3dp660.c new file mode 100644 index 0000000000..3f655d359f --- /dev/null +++ b/keyboards/handwired/3dp660/3dp660.c @@ -0,0 +1,17 @@ + /* Copyright 2020 gooberpsycho + * + * 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 "3dp660.h" diff --git a/keyboards/handwired/3dp660/3dp660.h b/keyboards/handwired/3dp660/3dp660.h new file mode 100644 index 0000000000..67288b1fc8 --- /dev/null +++ b/keyboards/handwired/3dp660/3dp660.h @@ -0,0 +1,35 @@ + /* Copyright 2020 gooberpsycho + * + * 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 . + */ + +#pragma once +#include "quantum.h" + +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT_66_ansi( \ + 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, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3C, k3D, \ + k40, k41, k42, k45, k49, k4A, k4B, k4C, k4D, k4E \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, KC_NO}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, KC_NO, k3C, k3D, KC_NO}, \ + {k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, KC_NO, k49, k4A, k4B, k4C, k4D, k4E} \ +} diff --git a/keyboards/handwired/3dp660/config.h b/keyboards/handwired/3dp660/config.h new file mode 100644 index 0000000000..e719cf2c25 --- /dev/null +++ b/keyboards/handwired/3dp660/config.h @@ -0,0 +1,51 @@ +/* +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 . +*/ + +#pragma once + +#include "config_common.h" +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6075 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Handwired +#define PRODUCT 3dp660 + +#define TAPPING_TERM 400 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 } +#define MATRIX_COL_PINS { D2, D3, C6, C7, D5, D4, D7, B4, B5, B6, F7, F6, F5, F4, F1 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + diff --git a/keyboards/handwired/3dp660/info.json b/keyboards/handwired/3dp660/info.json new file mode 100644 index 0000000000..5b78250885 --- /dev/null +++ b/keyboards/handwired/3dp660/info.json @@ -0,0 +1,80 @@ +{ + "keyboard_name": "3dp660", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_66_ansi": { + + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"-", "x":11, "y":0}, + {"label":"=", "x":12, "y":0}, + {"label":"BKSP", "x":13, "y":0, "w":2}, + {"label":"Insert", "x":15.5, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[", "x":11.5, "y":1}, + {"label":"]", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Del", "x":15.5, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";", "x":10.75, "y":2}, + {"label":"'", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",", "x":9.25, "y":3}, + {"label":".", "x":10.25, "y":3}, + {"label":"/", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":2.25}, + {"label":"Up", "x":14.5, "y":3}, + {"label":"CTRL", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"MO(1)", "x":11.25, "y":4}, + {"label":"CTRL", "x":12.25, "y":4, "w":1.25}, + {"label":"Left", "x":13.5, "y":4}, + {"label":"Down", "x":14.5, "y":4}, + {"label":"Right", "x":15.5, "y":4} + ] + } + } +} diff --git a/keyboards/handwired/3dp660/keymaps/default/keymap.c b/keyboards/handwired/3dp660/keymaps/default/keymap.c new file mode 100644 index 0000000000..e9eee115eb --- /dev/null +++ b/keyboards/handwired/3dp660/keymaps/default/keymap.c @@ -0,0 +1,34 @@ + /* Copyright 2020 gooberpsycho + * + * 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 QMK_KEYBOARD_H +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_66_ansi( + 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_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_66_ansi( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT + ), +}; diff --git a/keyboards/handwired/3dp660/keymaps/via/keymap.c b/keyboards/handwired/3dp660/keymaps/via/keymap.c new file mode 100644 index 0000000000..b39eabe49f --- /dev/null +++ b/keyboards/handwired/3dp660/keymaps/via/keymap.c @@ -0,0 +1,48 @@ + /* Copyright 2020 gooberpsycho + * + * 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 QMK_KEYBOARD_H +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_66_ansi( + 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_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_66_ansi( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT + ), + [2] = LAYOUT_66_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_66_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/handwired/3dp660/keymaps/via/rules.mk b/keyboards/handwired/3dp660/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/handwired/3dp660/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/handwired/3dp660/readme.md b/keyboards/handwired/3dp660/readme.md new file mode 100644 index 0000000000..dfece8ed46 --- /dev/null +++ b/keyboards/handwired/3dp660/readme.md @@ -0,0 +1,24 @@ +# 3dp660 + +![](https://i.imgur.com/KWyU57el.jpg) + +### Teensy 2.0 Pinout +| rows | 0 | 1 | 2 | 3 | 4 | +| --------------- | --- | --- | --- | --- | --- | +| Teensy/QMK pin | B0 | B1 | B2 | B3 | B7 | + +| columns | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | +| --------------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | +| Teensy/QMK pin | D2 | D3 | C6 | C7 | D5 | D4 | D7 | B4 | B5 | B6 | F7 | F6 | F5 | F4 | F1 | + + +Make example for this keyboard (after setting up your build environment): + + make handwired/3dp660:default + +**Reset Key:** Hold down the key located at `k00`, commonly programmed as Escape while plugging in the keyboard. + +* Keyboard Maintainer: [gooberpsycho](https://github.com/gooberpsycho) +* Hardware Availability: [Casefile](https://www.thingiverse.com/thing:2897260) + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/3dp660/rules.mk b/keyboards/handwired/3dp660/rules.mk new file mode 100644 index 0000000000..d97f13a39d --- /dev/null +++ b/keyboards/handwired/3dp660/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = halfkay + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# 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 +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +LTO_ENABLE = yes diff --git a/keyboards/handwired/412_64/config.h b/keyboards/handwired/412_64/config.h index cce38f3e68..4acda46fd4 100644 --- a/keyboards/handwired/412_64/config.h +++ b/keyboards/handwired/412_64/config.h @@ -165,30 +165,3 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ diff --git a/keyboards/handwired/412_64/rules.mk b/keyboards/handwired/412_64/rules.mk index c7dfa8705b..de611b460e 100644 --- a/keyboards/handwired/412_64/rules.mk +++ b/keyboards/handwired/412_64/rules.mk @@ -29,6 +29,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -LAYOUTS = ortho_4x16 +LAYOUTS = ortho_4x16 diff --git a/keyboards/handwired/42/rules.mk b/keyboards/handwired/42/rules.mk index f2306f310f..183d4db0c3 100644 --- a/keyboards/handwired/42/rules.mk +++ b/keyboards/handwired/42/rules.mk @@ -31,7 +31,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = no # ^^ diff --git a/keyboards/handwired/6macro/rules.mk b/keyboards/handwired/6macro/rules.mk index 13760ae066..9add0e5a50 100644 --- a/keyboards/handwired/6macro/rules.mk +++ b/keyboards/handwired/6macro/rules.mk @@ -31,4 +31,3 @@ UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/handwired/aplx2/rules.mk b/keyboards/handwired/aplx2/rules.mk index af9df6087f..38c15fafe5 100644 --- a/keyboards/handwired/aplx2/rules.mk +++ b/keyboards/handwired/aplx2/rules.mk @@ -29,5 +29,4 @@ MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs UNICODE_ENABLE = no # Unicode diff --git a/keyboards/handwired/aranck/config.h b/keyboards/handwired/aranck/config.h index 0de56cc3b6..f07f20738c 100644 --- a/keyboards/handwired/aranck/config.h +++ b/keyboards/handwired/aranck/config.h @@ -229,34 +229,6 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/aranck/rules.mk b/keyboards/handwired/aranck/rules.mk index a6809de9d4..b41c39374a 100644 --- a/keyboards/handwired/aranck/rules.mk +++ b/keyboards/handwired/aranck/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = yes # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = planck_mit \ No newline at end of file diff --git a/keyboards/handwired/bdn9_ble/rules.mk b/keyboards/handwired/bdn9_ble/rules.mk index 4fabf1c89d..48cc9d5f0b 100644 --- a/keyboards/handwired/bdn9_ble/rules.mk +++ b/keyboards/handwired/bdn9_ble/rules.mk @@ -33,5 +33,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH = AdafruitBLE # Enable Bluetooth AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs ENCODER_ENABLE = no diff --git a/keyboards/handwired/bluepill/ld/STM32F103x8_stm32duino_bootloader.ld b/keyboards/handwired/bluepill/ld/STM32F103x8_stm32duino_bootloader.ld index f9bfe9c005..23e44bd63a 100644 --- a/keyboards/handwired/bluepill/ld/STM32F103x8_stm32duino_bootloader.ld +++ b/keyboards/handwired/bluepill/ld/STM32F103x8_stm32duino_bootloader.ld @@ -16,9 +16,6 @@ /* * ST32F103xB memory setup for use with the maplemini bootloader. - * You will have to - * #define CORTEX_VTOR_INIT 0x5000 - * in your projects chconf.h */ MEMORY { diff --git a/keyboards/handwired/cans12er/rules.mk b/keyboards/handwired/cans12er/rules.mk index c6675b6153..84bb4e82d1 100644 --- a/keyboards/handwired/cans12er/rules.mk +++ b/keyboards/handwired/cans12er/rules.mk @@ -29,4 +29,3 @@ MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs \ No newline at end of file diff --git a/keyboards/handwired/chiron/rules.mk b/keyboards/handwired/chiron/rules.mk index 96f6422700..85aff72cb1 100644 --- a/keyboards/handwired/chiron/rules.mk +++ b/keyboards/handwired/chiron/rules.mk @@ -24,7 +24,6 @@ CONSOLE_ENABLE = no DEBUG_ENABLE = no EXTRAKEY_ENABLE = no FAUXCLICKY_ENABLE = no -HD44780_ENABLE = no LEADER_ENABLE = no MIDI_ENABLE = no MOUSEKEY_ENABLE = yes diff --git a/keyboards/handwired/colorlice/rules.mk b/keyboards/handwired/colorlice/rules.mk index 02da465d3e..f41304b2aa 100644 --- a/keyboards/handwired/colorlice/rules.mk +++ b/keyboards/handwired/colorlice/rules.mk @@ -29,7 +29,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs LTO_ENABLE = no # Use link time optimization RGB_MATRIX_ENABLE = WS2812 # Enable keyboard RGB backlight functionality with ws2812 driver RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow diff --git a/keyboards/handwired/curiosity/config.h b/keyboards/handwired/curiosity/config.h new file mode 100644 index 0000000000..8b632a5ec4 --- /dev/null +++ b/keyboards/handwired/curiosity/config.h @@ -0,0 +1,44 @@ +/* +Copyright 2020 Spaceman + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5342 // "SB" +#define PRODUCT_ID 0x4355 // "CU" +#define DEVICE_VER 0x0001 +#define MANUFACTURER Spaceman +#define PRODUCT Curiosity + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D0, F7, F6, F5 } +#define MATRIX_COL_PINS { D3, D4, F4, C6, D7, E6, B5, B4, B1, B3, B2, B6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* 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 diff --git a/keyboards/handwired/curiosity/curiosity.c b/keyboards/handwired/curiosity/curiosity.c new file mode 100644 index 0000000000..e0a6e130e7 --- /dev/null +++ b/keyboards/handwired/curiosity/curiosity.c @@ -0,0 +1,16 @@ +/* Copyright 2020 Spaceman + * + * 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 "curiosity.h" \ No newline at end of file diff --git a/keyboards/handwired/curiosity/curiosity.h b/keyboards/handwired/curiosity/curiosity.h new file mode 100644 index 0000000000..a79bfa6633 --- /dev/null +++ b/keyboards/handwired/curiosity/curiosity.h @@ -0,0 +1,41 @@ +/* Copyright 2020 Spaceman + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_small_mods( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k3b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k3a, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k39, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38 \ +) { \ + { 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, k36, k37, k38, k39, k3a, k3b }, \ +} +#define LAYOUT_large_mods( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k3b, \ + 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, k36, k37, k38 \ +) { \ + { 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, k36, k37, k38, KC_NO, KC_NO, k3b }, \ +} diff --git a/keyboards/handwired/curiosity/info.json b/keyboards/handwired/curiosity/info.json new file mode 100644 index 0000000000..333868e1a7 --- /dev/null +++ b/keyboards/handwired/curiosity/info.json @@ -0,0 +1,25 @@ +{ + "keyboard_name": "Curiosity", + "url": "", + "maintainer": "Spaceman", + "width": 13.5, + "height": 4, + "layouts": { + "LAYOUT_small_mods": { + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0, "w":1.5}, + {"x":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1}, {"x":12.25, "y":1, "w":1.25}, + {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, + {"x":0.75, "y":3, "w":1.25}, {"x":2, "y":3, "w":1.25}, {"x":3.25, "y":3, "w":1.25}, {"x":4.5, "y":3, "w":2}, {"x":6.5, "y":3, "w":2.25}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3} + ] + }, + "LAYOUT_large_mods": { + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0, "w":1.5}, + {"x":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1, "w":2.25}, + {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2, "w":2}, + {"x":0.75, "y":3, "w":1.25}, {"x":2, "y":3, "w":1.25}, {"x":3.25, "y":3, "w":1.25}, {"x":4.5, "y":3, "w":2}, {"x":6.5, "y":3, "w":2.25}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3} + ] + } + } +} diff --git a/keyboards/handwired/curiosity/keymaps/default/keymap.c b/keyboards/handwired/curiosity/keymaps/default/keymap.c new file mode 100644 index 0000000000..741ad387db --- /dev/null +++ b/keyboards/handwired/curiosity/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 Spaceman + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_small_mods( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, 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_ENT, + KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + [1] = LAYOUT_small_mods( + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; diff --git a/keyboards/handwired/curiosity/readme.md b/keyboards/handwired/curiosity/readme.md new file mode 100644 index 0000000000..eaf608e221 --- /dev/null +++ b/keyboards/handwired/curiosity/readme.md @@ -0,0 +1,13 @@ +# The Curiosity + +40% Keyboard + +* Keyboard Maintainer: [Spaceman](https://github.com/Spaceman) +* Hardware Supported: Curiosity PCB +* Hardware Availability: N/A + +Make example for this keyboard (after setting up your build environment): + + make handwired/curiosity:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/curiosity/rules.mk b/keyboards/handwired/curiosity/rules.mk new file mode 100644 index 0000000000..dace27ef32 --- /dev/null +++ b/keyboards/handwired/curiosity/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +LTO_ENABLE = no # Use link time optimization diff --git a/keyboards/handwired/dactyl_left/config.h b/keyboards/handwired/dactyl_left/config.h index 43c0d3d43f..e3924b96a1 100644 --- a/keyboards/handwired/dactyl_left/config.h +++ b/keyboards/handwired/dactyl_left/config.h @@ -218,34 +218,6 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/dactyl_left/rules.mk b/keyboards/handwired/dactyl_left/rules.mk index 1ea1de18da..f29d5333c3 100644 --- a/keyboards/handwired/dactyl_left/rules.mk +++ b/keyboards/handwired/dactyl_left/rules.mk @@ -30,4 +30,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/config.h b/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/config.h index 3190132085..87b5b66375 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/config.h @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #pragma once #define USE_SERIAL diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c b/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c index d8ac1910bf..78c16fb554 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include QMK_KEYBOARD_H #include "333fred.h" diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/config.h b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/config.h new file mode 100644 index 0000000000..eea543ae24 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/config.h @@ -0,0 +1,40 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#pragma once + +#define USE_SERIAL +#define EE_HANDS + +#undef TAPPING_TERM +#define TAPPING_TERM 200 + +#define OLED_DISPLAY_128X64 + +#define ENCODERS_PAD_A { F4 } +#define ENCODERS_PAD_B { F5 } + +#undef SOFT_SERIAL_PIN +#define SOFT_SERIAL_PIN D2 + +#undef OLED_TIMEOUT +#define OLED_TIMEOUT 240000 diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/keymap.c b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/keymap.c new file mode 100644 index 0000000000..f9b5ca6dff --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/keymap.c @@ -0,0 +1,579 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#include QMK_KEYBOARD_H +#include "333fred.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BASE] = LAYOUT_5x6_5( + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + OSM(MOD_LSFT), CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), OSM(MOD_RSFT), + KC_F4, KC_LALT, KC_BSPC, TD(TD_SYM_VIM), KC_DEL, KC_UP, KC_ENT, KC_SPC, OSL(VIM), KC_EQL, + KC_LGUI, TD(TD_COPY_PASTE), KC_DOWN, OSM(MOD_RCTL) + ), + + [SYMB] = LAYOUT_5x6_5( + _______, 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_F12, + _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, _______, KC_4, KC_5, KC_6, _______, _______, + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, KC_1, KC_2, KC_3, _______, _______, + KC_F7, _______, _______, _______, _______, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_ENT, + _______, _______, KC_VOLD, _______ + ), + + [VIM] = LAYOUT_5x6_5( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______, + _______, DLEFT, DRIGHT, KC_LCTL, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______,_______, _______, TG(GAME), _______, _______, _______, _______, + _______, _______, _______, _______ + ), + + [GAME] = LAYOUT_5x6_5( + 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_T, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_G, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_B, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LOCK, KC_LALT, KC_SPC, KC_ENT, KC_GRV, TG(GAME), _______, _______, _______, KC_EQL, + KC_BSPC, KC_F5, KC_F6, _______ + ), +}; + +uint32_t quote_timer; + +void keyboard_post_init_user(void) { quote_timer = 0; } + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + tap_dance_process_keycode(keycode); + return !try_handle_macro(keycode, record); +} + +static void render_logo(void) { + static const char PROGMEM qmk_logo[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00}; + + oled_write_P(qmk_logo, false); +} + +void render_led_status(void) { + led_t led_state = host_keyboard_led_state(); + if (led_state.num_lock || led_state.caps_lock || led_state.scroll_lock) { + oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); + oled_write_ln_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + } +} + +void render_mods_status(void) { + uint8_t mods = get_mods() | get_oneshot_mods(); + bool ctrl = mods & MOD_MASK_CTRL; + bool shft = mods & MOD_MASK_SHIFT; + bool alt = mods & MOD_MASK_ALT; + bool gui = mods & MOD_MASK_GUI; + + oled_write_P(ctrl ? PSTR("CTRL ") : PSTR(" "), false); + oled_write_P(shft ? PSTR("SHIFT ") : PSTR(" "), false); + oled_write_P(alt ? PSTR("ALT ") : PSTR(" "), false); + oled_write_ln_P(gui ? PSTR("GUI ") : PSTR(" "), false); +} + +#define MAX_LINES 8 + +void write_quote(const char* data, const uint8_t num_lines) { + uint8_t current_line = 0; + for (; current_line < (MAX_LINES - num_lines) / 2; current_line++) { + oled_advance_page(true); + } + + oled_write_ln_P(data, false); + + for (current_line += num_lines; current_line < MAX_LINES; current_line++) + { + oled_advance_page(true); + } +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_logo(); + oled_advance_page(/* clearPageRemainder */ true); + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case BASE: + oled_write_ln_P(PSTR("Base"), false); + break; + case SYMB: + oled_write_ln_P(PSTR("Symbols"), false); + break; + case VIM: + oled_write_ln_P(PSTR("Vim"), false); + break; + case GAME: + oled_write_ln_P(PSTR("Gaming"), false); + break; + } + + render_mods_status(); + render_led_status(); + } else { + if ((quote_timer != 0 && timer_elapsed32(quote_timer) < 300000 /* 5 minutes */) || !is_oled_on()) { + return; + } + + srand(timer_read32()); + int currentQuote = rand() % 63; + quote_timer = timer_read32(); + + // Max character count on my screen is 20 characters per line. + // Quotes are from various fantasy books, mostly either from + // The Stormlight Archive or from The Wheel of Time. + switch (currentQuote) { + case 0: + write_quote(PSTR(" Life before Death \n" + " Strength before \n" + " Weakness \n" + " Journey before \n" + " Destination"), + 5); + break; + case 1: + write_quote(PSTR(" Honor is dead, but \n" + "I'll see what I can \n" + " do."), + 3); + break; + case 2: + write_quote(PSTR(" You cannot have my \n" + " pain!"), + 2); + break; + case 3: + write_quote(PSTR(" Pride doesn't win \n" + " battles"), + 2); + break; + case 4: + write_quote(PSTR(" I have practice \n" + " following fools in \n" + " their reckless \n" + " pursuits."), + 4); + break; + case 5: + write_quote(PSTR(" What is the most \n" + " important step a \n" + " man can take?"), + 3); + break; + case 6: + write_quote(PSTR(" It's the next one. \n" + " Always the next \n" + " step, Dalinar."), + 3); + break; + case 7: + write_quote(PSTR(" NO MATING."), 1); + break; + case 8: + write_quote(PSTR(" Inappropriate? \n" + "Such as... dividing \n" + " by zero?"), + 3); + break; + case 9: + write_quote(PSTR(" I am a stick!"), 1); + break; + case 10: + write_quote(PSTR(" But you could be \n" + " fire!"), + 1); + break; + case 11: + write_quote(PSTR(" Sometimes a \n" + " hyprocrite is \n" + " nothing more than \n" + " than a man in the \n" + "process of changing"), + 5); + break; + case 12: + write_quote(PSTR(" You surrender when \n" + " you are dead. Many \n" + "a man has been given\n" + " less."), + 4); + break; + case 13: + write_quote(PSTR(" Kneel and swear to \n" + " the Lord Dragon,...\n" + " or you will be \n" + " knelt."), + 4); + break; + case 14: + write_quote(PSTR("I'm right, anyway. I\n" + "wish I wasn't, but I\n" + " am. I bloody am."), + 3); + break; + case 15: + write_quote(PSTR(" Death rides on my \n" + " shoulder,. Death \n" + " walks in my \n" + " footsteps. I am \n" + " death."), + 5); + break; + case 16: + write_quote(PSTR(" The Golden Crane \n" + " flies for Tarmon \n" + " Gai'don"), + 3); + break; + case 17: + write_quote(PSTR("You humans are very \n" + " excitable"), + 2); + break; + case 18: + write_quote(PSTR(" Phaw!"), 1); + break; + case 19: + write_quote(PSTR("I may be a fool, but\n" + " I intend to be a \n" + " live fool."), + 3); + break; + case 20: + write_quote(PSTR(" Anyone who claimed \n" + " that old age had \n" + " brought them \n" + "patience was either \n" + " lying or senile."), + 5); + break; + case 21: + write_quote(PSTR("Death is light as a \n" + "feather; duty, heavy\n" + " as a mountain"), + 3); + break; + case 22: + write_quote(PSTR("Dovie'andi se tovya \n" + " sagain."), + 2); + break; + case 23: + write_quote(PSTR(" Carai an Caldazar! \n" + "Carai an Ellisande! \n" + " Al Ellisande!"), + 3); + break; + case 24: + write_quote(PSTR(" Mia dovienya \n" + " nesodhin soende."), + 2); + break; + case 25: + write_quote(PSTR(" The Wheel of Time \n" + "turns, and Ages come\n" + " and pass, leaving \n" + "memories that become\n" + " legend."), + 5); + break; + case 26: + write_quote(PSTR(" Legend fades to \n" + "myth, and even myth \n" + " is long forgotten \n" + " when the Age that \n" + "gave it birth comes \n" + " again."), + 6); + break; + case 27: + write_quote(PSTR(" What is too absurd \n" + " to believe is \n" + "believed because it \n" + "is too absurd to be \n" + " a lie."), + 5); + break; + case 28: + write_quote(PSTR("And you gave me the \n" + " way out! Chew on \n" + "that bitterness for \n" + "lunch, you flaming, \n" + "burning, misbegotten\n" + " liars!"), + 6); + break; + case 29: + write_quote(PSTR(" He was going to \n" + "start having, 'I am \n" + "not a bloody Lord', \n" + " embroidered on his \n" + " coats."), + 5); + break; + case 30: + write_quote(PSTR("All was not lost, of\n" + " course. All was \n" + " never lost as long \n" + " as you were alive."), + 4); + break; + case 31: + write_quote(PSTR(" Everything is just \n" + " bloody fine!"), + 2); + break; + case 32: + write_quote(PSTR("The wheel weaves as \n" + " the wheel wills"), + 2); + break; + case 33: + write_quote(PSTR(" Time to toss the \n" + " dice"), + 2); + break; + case 34: + write_quote(PSTR("Always plan for the \n" + " worst, child, that \n" + " way all your \n" + " surprises are \n" + " pleasant ones."), + 5); + break; + case 35: + write_quote(PSTR("'Pessimism, she is a\n" + " fond friend of \n" + "yours, yes?' 'That's\n" + " uncalled for. I \n" + " barely know her. \n" + "Mere acquaintances, \n" + " at best.'"), + 7); + break; + case 36: + write_quote(PSTR(" Do not trouble \n" + "trouble till trouble\n" + " troubles you."), + 3); + break; + case 37: + write_quote(PSTR("If your enemy offers\n" + " you two targets, \n" + " strike at a third."), + 3); + break; + case 38: + write_quote(PSTR("The wind was not the\n" + "beginning. There are\n" + " neither beginnings \n" + " nor endings to the \n" + " turning of the \n" + " Wheel of Time. But \n" + " it was _a_ \n" + " beginning."), + 8); + break; + case 39: + write_quote(PSTR("Bloody flaming ashes"), 1); + break; + case 40: + write_quote(PSTR("Then follow Lord Mat\n" + " whenever he calls \n" + "To dance with Jak O'\n" + " the Shadows."), + 4); + break; + case 41: + write_quote(PSTR(" There are no \n" + " endings, and never \n" + "will be endings, to \n" + " the turning of the \n" + " Wheel of Time. But \n" + " it was an ending."), + 6); + break; + case 42: + write_quote(PSTR(" TAI'SHAR MALKIER!"), 1); + break; + case 43: + write_quote(PSTR("I would not mind you\n" + " in my head, if you \n" + "were not so clearly \n" + " mad."), + 4); + break; + case 44: + write_quote(PSTR(" ILYENA, MY LOVE, \n" + " FORGIVE ME!"), + 2); + break; + case 45: + write_quote(PSTR(" Oh, Light. That's \n" + "impossible! We can't\n" + " use it! Cast it \n" + "away! That is death \n" + " we hold, death and \n" + "betrayal. It is HIM."), + 6); + break; + case 46: + write_quote(PSTR("Nothing ever goes as\n" + " you expect. Expect \n" + " nothing, and you \n" + " will not be \n" + " surprised. Expect \n" + " nothing. Hope for \n" + " nothing. Nothing."), + 7); + break; + case 47: + write_quote(PSTR(" Distant Weeping"), 1); + break; + case 48: + write_quote(PSTR("Are you real? Am I?"), 1); + break; + case 49: + write_quote(PSTR(" I'm just an old \n" + "gleeman, who could I\n" + " possibly be \n" + " dangerous to?"), + 4); + break; + case 50: + write_quote(PSTR(" Mat bloody Cauthon \n" + " is no bloody hero!"), + 2); + break; + case 51: + write_quote(PSTR("You are a coward and\n" + " a tyrant. I'd name \n" + " you Darkfriend as \n" + "well, but I suspect \n" + " that the Dark One \n" + " would perhaps be \n" + " embarrassed to \n" + "associate with you."), + 8); + break; + case 52: + write_quote(PSTR(" I win again, Lews \n" + " Therin."), + 2); + break; + case 53: + write_quote(PSTR("May you always find \n" + " water and shade."), + 2); + break; + case 54: + write_quote(PSTR(" I will never serve \n" + "you, Father of Lies.\n" + "In a thousand lives,\n" + "I never have. I know\n" + " that. I'm sure of \n" + "it. Come. It is time\n" + " to die."), + 7); + break; + case 55: + write_quote(PSTR(" There may be more \n" + "than one way to skin\n" + " a cat, but the cat \n" + "isn't going to like \n" + " any of them."), + 5); + break; + case 56: + write_quote(PSTR("Please see that they\n" + " know, although the \n" + "word Black may brand\n" + "my name forever, my \n" + "soul is Brown. Tell \n" + " them..."), + 6); + break; + case 57: + write_quote(PSTR(" 'Your soul is of a \n" + "pure white, Verin,' \n" + "Egwene said softly. \n" + " 'Like the Light \n" + " itself.'"), + 5); + break; + case 58: + write_quote(PSTR(" Asha'man, Kill!"), 1); + break; + case 59: + write_quote(PSTR(" Let the lord of \n" + " chaos rule."), + 2); + break; + case 60: + write_quote(PSTR(" There's always \n" + " another secret."), + 2); + break; + case 61: + write_quote(PSTR(" You see the great \n" + "thing about madness \n" + "is that it's all in \n" + " your head."), + 4); + break; + case 62: + write_quote(PSTR(" In one Age, called \n" + " the Third Age by \n" + "some, an Age yet to \n" + " come, an Age long \n" + " past, a wind rose \n" + " above..."), + 6); + break; + } + } +} + +void encoder_update_user(uint8_t index, bool clockwise) { + // On the left, control the volume. On the right, scroll the page + if (index == 0) { + if (clockwise) { + tap_code(KC_WH_U); + } else { + tap_code(KC_WH_D); + } + } else { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/rules.mk b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/rules.mk new file mode 100644 index 0000000000..2bd6620c25 --- /dev/null +++ b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/rules.mk @@ -0,0 +1,4 @@ +KEY_LOCK_ENABLE = yes +CONSOLE_ENABLE = no +OLED_DRIVER_ENABLE = yes +ENCODER_ENABLE = yes diff --git a/keyboards/handwired/fc200rt_qmk/rules.mk b/keyboards/handwired/fc200rt_qmk/rules.mk index 8ef9dbd6c3..5e832358bb 100644 --- a/keyboards/handwired/fc200rt_qmk/rules.mk +++ b/keyboards/handwired/fc200rt_qmk/rules.mk @@ -29,4 +29,3 @@ MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/ferris/keymaps/default/keymap.c b/keyboards/handwired/ferris/keymaps/default/keymap.c deleted file mode 100644 index faf5203e7d..0000000000 --- a/keyboards/handwired/ferris/keymaps/default/keymap.c +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright 2020 Pierre Chevalier - -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 QMK_KEYBOARD_H - -// Blank template at the bottom -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: 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 | < | > | ? | - * `-----+-----+-----+-----+-----+--. ,-+-----------------------------' - * | BSPC | SPC | | SPC | ENT | - * '------------' '-----------' - */ -[0] = LAYOUT( - 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_BSPC, KC_SPC, KC_SPC, KC_ENT) -}; diff --git a/keyboards/handwired/ferris/keymaps/default/keymap.json b/keyboards/handwired/ferris/keymaps/default/keymap.json new file mode 100644 index 0000000000..7f7d614e20 --- /dev/null +++ b/keyboards/handwired/ferris/keymaps/default/keymap.json @@ -0,0 +1,106 @@ +{ "version": 1, + "notes": "My awesome keymap", + "documentation": "\"This file is a QMK Configurator export. You can import this at . It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: \n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n", + "keyboard": "handwired/ferris", + "keymap": "default", + "layout": "LAYOUT", + "layers": [ + ["KC_Q" , "KC_W" , "KC_E" , "KC_R" , "KC_T", + "KC_Y" , "KC_U" , "KC_I" , "KC_O" , "KC_P", + + "LSFT_T(KC_A)", "LT(5,KC_S)" , "LT(1,KC_D)" , "LT(3,KC_F)" , "KC_G", + "KC_H" , "LT(4,KC_J)" , "LT(2,KC_K)" , "LT(6,KC_L)" , "LSFT_T(KC_SCLN)", + + "KC_Z" , "LCTL_T(KC_X)", "LALT_T(KC_C)" , "KC_V" , "KC_B", + "KC_N" , "KC_M" , "LALT_T(KC_COMM)", "LCTL_T(KC_DOT)", "KC_SLSH", + + "KC_P0" , "KC_BSPC", + "LT(7,KC_SPC)", "KC_P1" + ], + ["KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_BTN1" , "KC_WH_U" , "KC_BTN2" , "KC_TRNS", + + "KC_TRNS" , "KC_BTN2" , "KC_NO" , "KC_BTN1" , "KC_TRNS", + "KC_TRNS" , "KC_MS_L" , "KC_MS_D" , "KC_MS_U" , "KC_MS_R", + + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "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_TRNS" , "KC_PGUP" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_LEFT" , "KC_UP" , "KC_DOWN" , "KC_RGHT" , "KC_TRNS", + "KC_TRNS" , "KC_LGUI" , "KC_NO" , "LCTL(KC_LALT)" , "LCA(KC_LSFT)", + + "KC_TRNS" , "KC_HOME" , "KC_PGDN" , "KC_END" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" + ], + ["KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_UNDS" , "KC_PIPE" , "KC_QUOT" , "KC_TRNS", + + "KC_CIRC" , "KC_ASTR" , "KC_AMPR" , "KC_NO" , "KC_TRNS", + "KC_HASH" , "KC_TILD" , "KC_SLSH" , "KC_DQUO" , "KC_DLR", + + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_MINS" , "KC_BSLS" , "KC_GRV" , "KC_TRNS", + + "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" + ], + ["KC_TRNS" , "KC_COLN" , "KC_LT" , "KC_GT" , "KC_SCLN", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_LCBR" , "KC_RCBR" , "KC_LPRN" , "KC_RPRN" , "KC_AT", + "KC_TRNS" , "KC_NO" , "KC_EQL" , "KC_PLUS" , "KC_PERC", + + "KC_TRNS" , "KC_EXLM" , "KC_LBRC" , "KC_RBRC" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_VOLD" , "KC_TRNS", + "KC_TRNS" , "KC_VOLU" + ], + ["KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_F7" , "KC_F8" , "KC_F9" , "KC_F10", + + "KC_TRNS" , "KC_NO" , "LCTL(KC_LALT)" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_F4" , "KC_F5" , "KC_F6" , "KC_F11", + + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_F1" , "KC_F2" , "KC_F3" , "KC_F12", + + "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" + ], + ["KC_PSLS" , "KC_7" , "KC_8" , "KC_9" , "KC_PPLS", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_0" , "KC_1" , "KC_2" , "KC_3" , "KC_PMNS", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_NO" , "KC_TRNS", + + "KC_PAST" , "KC_4" , "KC_5" , "KC_6" , "KC_PEQL", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_TRNS" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" + ], + ["KC_TRNS" , "KC_TRNS" , "KC_COLN" , "KC_ESC" , "KC_TRNS", + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_DEL", + + "KC_TRNS" , "KC_PERC" , "KC_SLSH" , "KC_ENT" , "KC_TRNS", + "DF(1)" , "KC_LGUI" , "KC_TRNS" , "KC_TRNS" , "KC_TRNS", + + "KC_TRNS" , "KC_TRNS" , "KC_TRNS" , "KC_EXLM" , "KC_TRNS", + "DF(0)" , "KC_TRNS" , "RALT_T(KC_COMM)", "RCTL_T(KC_DOT)", "RESET", + + "KC_TRNS" , "KC_TAB", + "KC_NO" , "KC_TRNS" + ] + ], + "author": "@pierrec83" +} diff --git a/keyboards/handwired/ferris/keymaps/default/readme.md b/keyboards/handwired/ferris/keymaps/default/readme.md new file mode 100644 index 0000000000..252f886f52 --- /dev/null +++ b/keyboards/handwired/ferris/keymaps/default/readme.md @@ -0,0 +1,122 @@ +A usable default keymap for the Ferris keyboard +=============================================== + +Keymaps in general are quite personal, so it is difficult to come up with a default that will suit every user. + +This keymap makes heavy use of keys behaving differently when tapped and held, so that all the keys one may need remain accessible despite the low number of thumb keys. + +It comes with a number of layers to give access to most of the keys one may need on a keyboard. It is not meant to be the best possible keymap, but rather a good base on which to build a keymap that works for you. + +This is not the only way to make 34 keys a comfortable typing experience, but it is one way to do so. If you don't already know of a better way, this may be as good a starting point as any :) + +Note that this keymap was built from the perspective that it is OK to take a steep learning curve if it results in a keymap that is easier to use in the long run. This means that it may take more effort to learn this keymap than some alternatives. "Easy to use" was assessed against the workflow of the author, so your mileage may vary on some of the details. + +What do all these layers do? +---------------------------- + +### Layer 0: Base layer + +![Layer 0](https://i.imgur.com/HjNHUPL.png) + +On tapping the keys, our base layer is qwerty with space on the right homing thumb and backspace on the left homing thumb. + +In this layer, the non-homing-thumb positions have 0 and 1. I recommend modifying this to some frequently accessed shortcut such as copy/paste, previous/next tab or anything that makes most sense in your own workflow. O and 1 are place-holders and make it easy to troubleshoot that all keys are working properly before soldering in the switches. +The reason I recommend convenience shortcuts instead of more commonly used keys like tab or meta is that unhoming of the thumbs was a frequent source of typos for me when I used more than one thumb key frequently in the context of typing. + +Despite being missing on this layer, "meta", "tab", "esc" and such are accessible from any other layer: see Layer 7. + +The behaviour of some keys differ when held: +* Both homing pinkies behave as shift. +* Both bottom-row ring fingers behave as ctrl. +* Both bottom-row middle fingers behave as alt. + +* The homing left ring finger gives access to the Function keys layer +* The homing right ring finger gives access to the Numbers layer +* The homing left middle finger gives access to the Mouse layer +* The homing right middle finger gives access to the Navigation layer +* The homing left index finger gives access to the Right symbols layer +* The homing right index finger gives access to the Left symbols layer +* The homing right thumb gives access to the Always accessible layer + +### Layer 1: Mouse + +![Layer 1](https://i.imgur.com/0fvTuB9.png) + +Layer 1 is a mouse layer: it can be used one-handed or two-handed. The most common way to use it is two handed, with left and right click on the homerow of the left hand and directions on the homerow of the right hand. +Scrolling is available on the right hand with mid finger up and down for vertical scroll and index and ring finger down for horizontal scroll. +On the right hand, left click and right click are also available with index and ring finger up to allow one handed operation. This can be particularly handy when enabling the mouse layer permanently (no need to hold the left middle finger), which can be done from Layer 7. + +Note that thanks to the transparency, shift, ctrl and alt are all accessible on the left hand while operating the mouse. + +### Layer 2: Navigation + +![Layer 2](https://i.imgur.com/ZquQJRq.png) + +The navigation layer somewhat mirrors the mouse layer. It is accessed by holding the right middle finger and gives access to arrow keys on the left homerow. Page up and down, Home and End mirror the vertical scrolling and horizontal scrolling on the mouse layer. + +On the right hand, in addition to ctrl and alt which are available through transparency, ctrl + alt, ctrl + alt + shift and meta are accessible on the homerow to enable common shortcuts in some window managers. This part is quite workflow dependent, so make sure to adapt it to your own workflow as appropriate. + +### Layer 3: Right symbols + +![Layer 3](https://i.imgur.com/9tLAUqG.png) + +When holding down the left index, one may access about half of the symbols. The pinkies store `^` and `$` symbols that represent begin and end in vim. The left homerow hosts `*` and `&`, symbols which are related in the way that they represent some form of indirection in programming languages such as rust. On the right hand, most symbols used when navigating the command line are stored together, organized by columns of related symbols. + +### Layer 4: Left symbols + +![Layer 4](https://i.imgur.com/CkjUSW6.png) + +When holding down the right index, one may access the other symbols. On the left hand, most of the different brackets are laid out. The most frequent ones (round brackets and curly brackets) get a spot on the homerow. The rest of the layer hosts the remaining symbols that are easier to access here than on any other layers. + +### Layer 5: Function keys + +![Layer 5](https://i.imgur.com/fWgVqc4.png) + +By holding down the left ring finger, one may access the function keys, roughly in a numpad layout. +This means that alt+F4 is easy to type, with F4 being on the homerow. +There is a shortcut for ctrl+alt on the left hand to enable convenient switching between virtual terminals on Linux. + +### Layer 6: Numbers + +![Layer 6](https://i.imgur.com/S8gq9Kj.png) + +The number layer is accessed by holding the right ring finger. It hosts the numbers and some duplicated symbols that are commonly accessed next to numbers, such as mathematical operators. +The number are layed out similarly to a numpad, but with the middle row and the homerow swapped so that the most used numbers: 0, 1, 2 and 3 are all available in homing positions. + +### Layer 7: Always accessible + +![Layer 7](https://i.imgur.com/twqBeBb.png) + +Layer 7 is accessed by holding the right homing thumb down. Because this position is left transparent from every other layer, this layer is always accessible. +It gives access to some essential keys that would typically be accessed on a thumb cluster or pinkies, such as meta, enter, tab, esc and delete. + +As the layer hosting esc, we duplicated some symbols here to allow for fast navigation in vim. For instance, esc, :, w, q can be done in a single roll. + +Where is the keymap.c? +---------------------- + +The keymap.c file is not published to the repository. It is generated from `keymap.json` by the build system. + +This avoids duplicating information and allow users to edit their keymap from the qmk configurator web interface. + +How do I edit and update the keymap? +------------------------------------ + +The `keymap.json` file is generated from the qmk configurator interface and formatted for better readability in the context of the Ferris keyboard. + +To edit it, you may: +* Edit it directly from a text editor. +* Edit it from the qmk configurator. + +If you decide to use the latter workflow, here are the steps to follow: + +* From the qmk configurator, hit the "import QMK keymap json file" button (it has a drawing with an up arrow on it). +* Browse to the location of your keymap (for example, `/keyboards/handwired/ferris/keymaps/default/keymap.json`) +* Perform any modification to the keymap in the web UI +* Export the keymap to your downloads folder, by hitting the "Export QMK keymap json file" button (it has a drawing with a down arrow on it) +* Override your original keymap with the output of formatting the exported keymap by running a command such as this one from the root of your qmk repo: + ``` + ./keyboards/handwired/ferris/keymaps/json2crab.py --input /default.json > ./keyboards/handwired/ferris/keymaps/default/keymap.json + ``` + Note that you may first need to make json2crab executable by using `chmod +x` on it. + Also note that you may then want to remove the exported keymap from your dowload directory. diff --git a/keyboards/handwired/ferris/keymaps/json2crab.py b/keyboards/handwired/ferris/keymaps/json2crab.py new file mode 100755 index 0000000000..a32429fae5 --- /dev/null +++ b/keyboards/handwired/ferris/keymaps/json2crab.py @@ -0,0 +1,76 @@ +#!/usr/bin/env python3 + +import argparse +import sys +import json + +indent_level=4 + +def parse_cli(): + parser = argparse.ArgumentParser(description='Ferris keymap formatter') + parser.add_argument("--input", type=argparse.FileType('r'), + default=sys.stdin, help="Input keymap (json file produced by qmk configurator)") + return parser.parse_args() + +def col_index(key_index): + if key_index < 30: + col = key_index % 5 + else: + col = key_index % 2 + return col + +def format_layers(layers): + formatted = indent_level * " " + "\"layers\": [\n" + max_key_length = {} + for layer in layers: + for (index, keycode) in enumerate(layer): + col = col_index(index) + max_length = max_key_length.get(col) + if (not max_length) or len(keycode) > max_length: + max_key_length.update({col: len(keycode)}) + for (layer_index, layer) in enumerate(layers): + formatted += 2 * indent_level * " " + formatted += "[" + for (index, keycode) in enumerate(layer): + if index > 30 and index % 2 == 0 or index % 5 == 0 and index != 0: + formatted += (1 + 2 * indent_level) * " " + formatted += json.dumps(keycode) + if index == 33: + formatted += "\n" + elif index > 30 and index % 2 == 1 or index % 5 == 4: + formatted += ",\n" + else: + n_spaces = max_key_length[col_index(index)] - len(keycode) + formatted += n_spaces * " " + formatted += ", " + if index % 10 == 9: + formatted += "\n" + formatted += 2 * indent_level * " " + if layer_index < len(layers) - 1: + formatted += "],\n" + else: + formatted += "]\n" + formatted += indent_level * " " + formatted += "]" + + return formatted + +def format_keymap(keymap_json): + formatted = "{" + for (index, k) in enumerate(keymap_json): + if k == "layers": + formatted += format_layers(keymap_json[k]) + else: + formatted += f"{indent_level * ' '}{json.dumps(k)}: {json.dumps(keymap_json[k])}" + if index < len(keymap_json) - 1: + formatted += "," + formatted += "\n" + formatted += "}" + return formatted + +def main(): + args=parse_cli() + keymap_json = json.loads(args.input.read()) + print(format_keymap(keymap_json)) + +main() diff --git a/keyboards/handwired/floorboard/config.h b/keyboards/handwired/floorboard/config.h index bf8646f39a..12ab4387f1 100644 --- a/keyboards/handwired/floorboard/config.h +++ b/keyboards/handwired/floorboard/config.h @@ -218,34 +218,6 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/floorboard/rules.mk b/keyboards/handwired/floorboard/rules.mk index 16f3332aaa..5a83cfcf96 100644 --- a/keyboards/handwired/floorboard/rules.mk +++ b/keyboards/handwired/floorboard/rules.mk @@ -19,5 +19,4 @@ MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = ortho_4x12 diff --git a/keyboards/handwired/hacked_motospeed/config.h b/keyboards/handwired/hacked_motospeed/config.h index 0035a5e282..eba87164f2 100644 --- a/keyboards/handwired/hacked_motospeed/config.h +++ b/keyboards/handwired/hacked_motospeed/config.h @@ -215,34 +215,6 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/hacked_motospeed/rules.mk b/keyboards/handwired/hacked_motospeed/rules.mk index 7cb9e914ec..291da87cfd 100644 --- a/keyboards/handwired/hacked_motospeed/rules.mk +++ b/keyboards/handwired/hacked_motospeed/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in BLUETOOTH = RN42 diff --git a/keyboards/handwired/heisenberg/config.h b/keyboards/handwired/heisenberg/config.h index 9fe57cbeba..34458b492e 100644 --- a/keyboards/handwired/heisenberg/config.h +++ b/keyboards/handwired/heisenberg/config.h @@ -229,34 +229,6 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/heisenberg/rules.mk b/keyboards/handwired/heisenberg/rules.mk index 2fd710029c..10046d7102 100644 --- a/keyboards/handwired/heisenberg/rules.mk +++ b/keyboards/handwired/heisenberg/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = yes # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = planck_mit diff --git a/keyboards/handwired/hnah108/config.h b/keyboards/handwired/hnah108/config.h index b2d84e3e38..a0c20706b0 100644 --- a/keyboards/handwired/hnah108/config.h +++ b/keyboards/handwired/hnah108/config.h @@ -216,30 +216,3 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ diff --git a/keyboards/handwired/hnah108/rules.mk b/keyboards/handwired/hnah108/rules.mk index 8e486c594b..fa28a1ccea 100644 --- a/keyboards/handwired/hnah108/rules.mk +++ b/keyboards/handwired/hnah108/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) ENCODER_ENABLE = yes RGB_MATRIX_ENABLE = WS2812 diff --git a/keyboards/handwired/hnah40/config.h b/keyboards/handwired/hnah40/config.h index 9583c4c38e..6138d2e3ea 100644 --- a/keyboards/handwired/hnah40/config.h +++ b/keyboards/handwired/hnah40/config.h @@ -192,31 +192,3 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - diff --git a/keyboards/handwired/hnah40/rules.mk b/keyboards/handwired/hnah40/rules.mk index 0df52f7de6..39d9374de2 100644 --- a/keyboards/handwired/hnah40/rules.mk +++ b/keyboards/handwired/hnah40/rules.mk @@ -30,4 +30,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/handwired/hnah40rgb/rules.mk b/keyboards/handwired/hnah40rgb/rules.mk index 5ad9f40c30..658a74d14e 100644 --- a/keyboards/handwired/hnah40rgb/rules.mk +++ b/keyboards/handwired/hnah40rgb/rules.mk @@ -29,5 +29,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs RGB_MATRIX_ENABLE = WS2812 \ No newline at end of file diff --git a/keyboards/handwired/jn68m/rules.mk b/keyboards/handwired/jn68m/rules.mk index 80b59d628d..f07380121a 100644 --- a/keyboards/handwired/jn68m/rules.mk +++ b/keyboards/handwired/jn68m/rules.mk @@ -30,4 +30,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/handwired/jtallbean/split_65/config.h b/keyboards/handwired/jtallbean/split_65/config.h index 5c7a9d54ba..06c569f9f2 100644 --- a/keyboards/handwired/jtallbean/split_65/config.h +++ b/keyboards/handwired/jtallbean/split_65/config.h @@ -221,34 +221,6 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/jtallbean/split_65/rules.mk b/keyboards/handwired/jtallbean/split_65/rules.mk index d868f5e77f..7f96d78328 100644 --- a/keyboards/handwired/jtallbean/split_65/rules.mk +++ b/keyboards/handwired/jtallbean/split_65/rules.mk @@ -29,5 +29,4 @@ MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs SPLIT_KEYBOARD = yes # Enable split keyboard support diff --git a/keyboards/handwired/mechboards_micropad/config.h b/keyboards/handwired/mechboards_micropad/config.h index 8f237a64a1..30775ac8f6 100644 --- a/keyboards/handwired/mechboards_micropad/config.h +++ b/keyboards/handwired/mechboards_micropad/config.h @@ -212,34 +212,6 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/mechboards_micropad/rules.mk b/keyboards/handwired/mechboards_micropad/rules.mk index a61b3b3d83..01cefabcc6 100644 --- a/keyboards/handwired/mechboards_micropad/rules.mk +++ b/keyboards/handwired/mechboards_micropad/rules.mk @@ -30,4 +30,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/handwired/minorca/rules.mk b/keyboards/handwired/minorca/rules.mk index 195749ceb3..e9e9fc84ba 100644 --- a/keyboards/handwired/minorca/rules.mk +++ b/keyboards/handwired/minorca/rules.mk @@ -29,5 +29,4 @@ MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs UNICODE_ENABLE = no # Unicode diff --git a/keyboards/handwired/novem/rules.mk b/keyboards/handwired/novem/rules.mk index 3891651f3b..e7acaabf8e 100644 --- a/keyboards/handwired/novem/rules.mk +++ b/keyboards/handwired/novem/rules.mk @@ -29,4 +29,3 @@ MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/onekey/blackpill_f401/config.h b/keyboards/handwired/onekey/blackpill_f401/config.h index c6166380cf..829e84677f 100644 --- a/keyboards/handwired/onekey/blackpill_f401/config.h +++ b/keyboards/handwired/onekey/blackpill_f401/config.h @@ -23,7 +23,7 @@ #define UNUSED_PINS #define BACKLIGHT_PIN A0 -#define BACKLIGHT_PWM_DRIVER PWMD2 +#define BACKLIGHT_PWM_DRIVER PWMD5 #define BACKLIGHT_PWM_CHANNEL 1 #define RGB_DI_PIN A1 diff --git a/keyboards/handwired/onekey/blackpill_f401/halconf.h b/keyboards/handwired/onekey/blackpill_f401/halconf.h index a8db392aaa..ae08512d49 100644 --- a/keyboards/handwired/onekey/blackpill_f401/halconf.h +++ b/keyboards/handwired/onekey/blackpill_f401/halconf.h @@ -1,525 +1,21 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/** - * @file templates/halconf.h - * @brief HAL configuration header. - * @details HAL configuration file, this file allows to enable or disable the - * various device drivers from your application. You may also use - * this file in order to override the device drivers default settings. +/* Copyright 2020 Nick Brassel (tzarc) * - * @addtogroup HAL_CONF - * @{ + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ +#pragma once -#ifndef HALCONF_H -#define HALCONF_H +#define HAL_USE_I2C TRUE +#define HAL_USE_PWM TRUE -#define _CHIBIOS_HAL_CONF_ -#define _CHIBIOS_HAL_CONF_VER_7_0_ - -#include "mcuconf.h" - -/** - * @brief Enables the PAL subsystem. - */ -#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE -#endif - -/** - * @brief Enables the ADC subsystem. - */ -#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE -#endif - -/** - * @brief Enables the CAN subsystem. - */ -#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE -#endif - -/** - * @brief Enables the cryptographic subsystem. - */ -#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) -#define HAL_USE_CRY FALSE -#endif - -/** - * @brief Enables the DAC subsystem. - */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE -#endif - -/** - * @brief Enables the GPT subsystem. - */ -#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE -#endif - -/** - * @brief Enables the I2C subsystem. - */ -#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE -#endif - -/** - * @brief Enables the I2S subsystem. - */ -#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE -#endif - -/** - * @brief Enables the ICU subsystem. - */ -#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE -#endif - -/** - * @brief Enables the MAC subsystem. - */ -#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE -#endif - -/** - * @brief Enables the MMC_SPI subsystem. - */ -#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) -#define HAL_USE_MMC_SPI FALSE -#endif - -/** - * @brief Enables the PWM subsystem. - */ -#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE -#endif - -/** - * @brief Enables the RTC subsystem. - */ -#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE -#endif - -/** - * @brief Enables the SDC subsystem. - */ -#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE -#endif - -/** - * @brief Enables the SERIAL subsystem. - */ -#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE -#endif - -/** - * @brief Enables the SERIAL over USB subsystem. - */ -#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL_USB FALSE -#endif - -/** - * @brief Enables the SIO subsystem. - */ -#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) -#define HAL_USE_SIO FALSE -#endif - -/** - * @brief Enables the SPI subsystem. - */ -#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE -#endif - -/** - * @brief Enables the TRNG subsystem. - */ -#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) -#define HAL_USE_TRNG FALSE -#endif - -/** - * @brief Enables the UART subsystem. - */ -#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE -#endif - -/** - * @brief Enables the USB subsystem. - */ -#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE -#endif - -/** - * @brief Enables the WDG subsystem. - */ -#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE -#endif - -/** - * @brief Enables the WSPI subsystem. - */ -#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) -#define HAL_USE_WSPI FALSE -#endif - -/*===========================================================================*/ -/* PAL driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) -#define PAL_USE_CALLBACKS FALSE -#endif - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) -#define PAL_USE_WAIT FALSE -#endif - -/*===========================================================================*/ -/* ADC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE -#endif - -/** - * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* CAN driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Sleep mode related APIs inclusion switch. - */ -#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE -#endif - -/** - * @brief Enforces the driver to use direct callbacks rather than OSAL events. - */ -#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) -#define CAN_ENFORCE_USE_CALLBACKS FALSE -#endif - -/*===========================================================================*/ -/* CRY driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables the SW fall-back of the cryptographic driver. - * @details When enabled, this option, activates a fall-back software - * implementation for algorithms not supported by the underlying - * hardware. - * @note Fall-back implementations may not be present for all algorithms. - */ -#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) -#define HAL_CRY_USE_FALLBACK FALSE -#endif - -/** - * @brief Makes the driver forcibly use the fall-back implementations. - */ -#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) -#define HAL_CRY_ENFORCE_FALLBACK FALSE -#endif - -/*===========================================================================*/ -/* DAC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) -#define DAC_USE_WAIT TRUE -#endif - -/** - * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define DAC_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* I2C driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables the mutual exclusion APIs on the I2C bus. - */ -#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* MAC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables the zero-copy API. - */ -#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE -#endif - -/** - * @brief Enables an event sources for incoming packets. - */ -#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) -#define MAC_USE_EVENTS TRUE -#endif - -/*===========================================================================*/ -/* MMC_SPI driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Delays insertions. - * @details If enabled this options inserts delays into the MMC waiting - * routines releasing some extra CPU time for the threads with - * lower priority, this may slow down the driver a bit however. - * This option is recommended also if the SPI driver does not - * use a DMA channel and heavily loads the CPU. - */ -#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE -#endif - -/*===========================================================================*/ -/* SDC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Number of initialization attempts before rejecting the card. - * @note Attempts are performed at 10mS intervals. - */ -#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 -#endif - -/** - * @brief Include support for MMC cards. - * @note MMC support is not yet implemented so this option must be kept - * at @p FALSE. - */ -#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE -#endif - -/** - * @brief Delays insertions. - * @details If enabled this options inserts delays into the MMC waiting - * routines releasing some extra CPU time for the threads with - * lower priority, this may slow down the driver a bit however. - */ -#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE -#endif - -/** - * @brief OCR initialization constant for V20 cards. - */ -#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) -#define SDC_INIT_OCR_V20 0x50FF8000U -#endif - -/** - * @brief OCR initialization constant for non-V20 cards. - */ -#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) -#define SDC_INIT_OCR 0x80100000U -#endif - -/*===========================================================================*/ -/* SERIAL driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Default bit rate. - * @details Configuration parameter, this is the baud rate selected for the - * default configuration. - */ -#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 -#endif - -/** - * @brief Serial buffers size. - * @details Configuration parameter, you can change the depth of the queue - * buffers depending on the requirements of your application. - * @note The default is 16 bytes for both the transmission and receive - * buffers. - */ -#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 -#endif - -/*===========================================================================*/ -/* SERIAL_USB driver related setting. */ -/*===========================================================================*/ - -/** - * @brief Serial over USB buffers size. - * @details Configuration parameter, the buffer size must be a multiple of - * the USB data endpoint maximum packet size. - * @note The default is 256 bytes for both the transmission and receive - * buffers. - */ -#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 256 -#endif - -/** - * @brief Serial over USB number of buffers. - * @note The default is 2 buffers. - */ -#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_NUMBER 2 -#endif - -/*===========================================================================*/ -/* SPI driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE -#endif - -/** - * @brief Enables circular transfers APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) -#define SPI_USE_CIRCULAR FALSE -#endif - - -/** - * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define SPI_USE_MUTUAL_EXCLUSION TRUE -#endif - -/** - * @brief Handling method for SPI CS line. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) -#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD -#endif - -/*===========================================================================*/ -/* UART driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) -#define UART_USE_WAIT FALSE -#endif - -/** - * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define UART_USE_MUTUAL_EXCLUSION FALSE -#endif - -/*===========================================================================*/ -/* USB driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE -#endif - -/*===========================================================================*/ -/* WSPI driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) -#define WSPI_USE_WAIT TRUE -#endif - -/** - * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define WSPI_USE_MUTUAL_EXCLUSION TRUE -#endif - -#endif /* HALCONF_H */ - -/** @} */ +#include_next "halconf.h" diff --git a/keyboards/handwired/onekey/blackpill_f401/mcuconf.h b/keyboards/handwired/onekey/blackpill_f401/mcuconf.h index ba6e934fe7..034a022db4 100644 --- a/keyboards/handwired/onekey/blackpill_f401/mcuconf.h +++ b/keyboards/handwired/onekey/blackpill_f401/mcuconf.h @@ -1,253 +1,24 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef MCUCONF_H -#define MCUCONF_H - -/* - * STM32F4xx drivers configuration. - * The following settings override the default settings present in - * the various device driver implementation headers. - * Note that the settings for each driver only have effect if the whole - * driver is enabled in halconf.h. +/* Copyright 2020 Nick Brassel (tzarc) * - * IRQ priorities: - * 15...0 Lowest...Highest. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * DMA priorities: - * 0...3 Lowest...Highest. + * 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 . */ +#pragma once -#define STM32F4xx_MCUCONF +#include_next "mcuconf.h" -/* - * HAL driver system settings. - */ -#define STM32_NO_INIT FALSE -#define STM32_HSI_ENABLED TRUE -#define STM32_LSI_ENABLED TRUE -#define STM32_HSE_ENABLED TRUE -#define STM32_LSE_ENABLED FALSE -#define STM32_CLOCK48_REQUIRED TRUE -#define STM32_SW STM32_SW_PLL -#define STM32_PLLSRC STM32_PLLSRC_HSE -#define STM32_PLLM_VALUE 25 -#define STM32_PLLN_VALUE 336 -#define STM32_PLLP_VALUE 4 -#define STM32_PLLQ_VALUE 7 -#define STM32_HPRE STM32_HPRE_DIV1 -#define STM32_PPRE1 STM32_PPRE1_DIV4 -#define STM32_PPRE2 STM32_PPRE2_DIV2 -#define STM32_RTCSEL STM32_RTCSEL_LSI -#define STM32_RTCPRE_VALUE 8 -#define STM32_MCO1SEL STM32_MCO1SEL_HSI -#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 -#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK -#define STM32_MCO2PRE STM32_MCO2PRE_DIV5 -#define STM32_I2SSRC STM32_I2SSRC_CKIN -#define STM32_PLLI2SN_VALUE 192 -#define STM32_PLLI2SR_VALUE 5 -#define STM32_PVD_ENABLE FALSE -#define STM32_PLS STM32_PLS_LEV0 -#define STM32_BKPRAM_ENABLE FALSE +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE -/* - * IRQ system settings. - */ -#define STM32_IRQ_EXTI0_PRIORITY 6 -#define STM32_IRQ_EXTI1_PRIORITY 6 -#define STM32_IRQ_EXTI2_PRIORITY 6 -#define STM32_IRQ_EXTI3_PRIORITY 6 -#define STM32_IRQ_EXTI4_PRIORITY 6 -#define STM32_IRQ_EXTI5_9_PRIORITY 6 -#define STM32_IRQ_EXTI10_15_PRIORITY 6 -#define STM32_IRQ_EXTI16_PRIORITY 6 -#define STM32_IRQ_EXTI17_PRIORITY 15 -#define STM32_IRQ_EXTI18_PRIORITY 6 -#define STM32_IRQ_EXTI19_PRIORITY 6 -#define STM32_IRQ_EXTI20_PRIORITY 6 -#define STM32_IRQ_EXTI21_PRIORITY 15 -#define STM32_IRQ_EXTI22_PRIORITY 15 - -/* - * ADC driver system settings. - */ -#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 -#define STM32_ADC_USE_ADC1 FALSE -#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) -#define STM32_ADC_ADC1_DMA_PRIORITY 2 -#define STM32_ADC_IRQ_PRIORITY 6 -#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 - -/* - * GPT driver system settings. - */ -#define STM32_GPT_USE_TIM1 FALSE -#define STM32_GPT_USE_TIM2 FALSE -#define STM32_GPT_USE_TIM3 FALSE -#define STM32_GPT_USE_TIM4 FALSE -#define STM32_GPT_USE_TIM5 FALSE -#define STM32_GPT_USE_TIM9 FALSE -#define STM32_GPT_USE_TIM11 FALSE -#define STM32_GPT_TIM1_IRQ_PRIORITY 7 -#define STM32_GPT_TIM2_IRQ_PRIORITY 7 -#define STM32_GPT_TIM3_IRQ_PRIORITY 7 -#define STM32_GPT_TIM4_IRQ_PRIORITY 7 -#define STM32_GPT_TIM5_IRQ_PRIORITY 7 -#define STM32_GPT_TIM9_IRQ_PRIORITY 7 -#define STM32_GPT_TIM11_IRQ_PRIORITY 7 - -/* - * I2C driver system settings. - */ -#define STM32_I2C_USE_I2C1 FALSE -#define STM32_I2C_USE_I2C2 FALSE -#define STM32_I2C_USE_I2C3 FALSE -#define STM32_I2C_BUSY_TIMEOUT 50 -#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) -#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) -#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) -#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) -#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_I2C_I2C1_IRQ_PRIORITY 5 -#define STM32_I2C_I2C2_IRQ_PRIORITY 5 -#define STM32_I2C_I2C3_IRQ_PRIORITY 5 -#define STM32_I2C_I2C1_DMA_PRIORITY 3 -#define STM32_I2C_I2C2_DMA_PRIORITY 3 -#define STM32_I2C_I2C3_DMA_PRIORITY 3 -#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") - -/* - * I2S driver system settings. - */ -#define STM32_I2S_USE_SPI2 FALSE -#define STM32_I2S_USE_SPI3 FALSE -#define STM32_I2S_SPI2_IRQ_PRIORITY 10 -#define STM32_I2S_SPI3_IRQ_PRIORITY 10 -#define STM32_I2S_SPI2_DMA_PRIORITY 1 -#define STM32_I2S_SPI3_DMA_PRIORITY 1 -#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) -#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) -#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_I2S_DMA_ERROR_HOOK(i2sp) osalSysHalt("DMA failure") - -/* - * ICU driver system settings. - */ -#define STM32_ICU_USE_TIM1 FALSE -#define STM32_ICU_USE_TIM2 FALSE -#define STM32_ICU_USE_TIM3 FALSE -#define STM32_ICU_USE_TIM4 FALSE -#define STM32_ICU_USE_TIM5 FALSE -#define STM32_ICU_USE_TIM9 FALSE -#define STM32_ICU_TIM1_IRQ_PRIORITY 7 -#define STM32_ICU_TIM2_IRQ_PRIORITY 7 -#define STM32_ICU_TIM3_IRQ_PRIORITY 7 -#define STM32_ICU_TIM4_IRQ_PRIORITY 7 -#define STM32_ICU_TIM5_IRQ_PRIORITY 7 -#define STM32_ICU_TIM9_IRQ_PRIORITY 7 - -/* - * PWM driver system settings. - */ -#define STM32_PWM_USE_ADVANCED FALSE -#define STM32_PWM_USE_TIM1 FALSE -#define STM32_PWM_USE_TIM2 FALSE -#define STM32_PWM_USE_TIM3 FALSE -#define STM32_PWM_USE_TIM4 FALSE -#define STM32_PWM_USE_TIM5 FALSE -#define STM32_PWM_USE_TIM9 FALSE -#define STM32_PWM_TIM1_IRQ_PRIORITY 7 -#define STM32_PWM_TIM2_IRQ_PRIORITY 7 -#define STM32_PWM_TIM3_IRQ_PRIORITY 7 -#define STM32_PWM_TIM4_IRQ_PRIORITY 7 -#define STM32_PWM_TIM5_IRQ_PRIORITY 7 -#define STM32_PWM_TIM9_IRQ_PRIORITY 7 - -/* - * SERIAL driver system settings. - */ -#define STM32_SERIAL_USE_USART1 FALSE -#define STM32_SERIAL_USE_USART2 FALSE -#define STM32_SERIAL_USE_USART6 FALSE -#define STM32_SERIAL_USART1_PRIORITY 12 -#define STM32_SERIAL_USART2_PRIORITY 12 -#define STM32_SERIAL_USART6_PRIORITY 12 - -/* - * SPI driver system settings. - */ -#define STM32_SPI_USE_SPI1 FALSE -#define STM32_SPI_USE_SPI2 FALSE -#define STM32_SPI_USE_SPI3 FALSE -#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) -#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) -#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) -#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) -#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_SPI_SPI1_DMA_PRIORITY 1 -#define STM32_SPI_SPI2_DMA_PRIORITY 1 -#define STM32_SPI_SPI3_DMA_PRIORITY 1 -#define STM32_SPI_SPI1_IRQ_PRIORITY 10 -#define STM32_SPI_SPI2_IRQ_PRIORITY 10 -#define STM32_SPI_SPI3_IRQ_PRIORITY 10 -#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") - -/* - * ST driver system settings. - */ -#define STM32_ST_IRQ_PRIORITY 8 -#define STM32_ST_USE_TIMER 2 - -/* - * UART driver system settings. - */ -#define STM32_UART_USE_USART1 FALSE -#define STM32_UART_USE_USART2 FALSE -#define STM32_UART_USE_USART6 FALSE -#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) -#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) -#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) -#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) -#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_UART_USART1_IRQ_PRIORITY 12 -#define STM32_UART_USART2_IRQ_PRIORITY 12 -#define STM32_UART_USART6_IRQ_PRIORITY 12 -#define STM32_UART_USART1_DMA_PRIORITY 0 -#define STM32_UART_USART2_DMA_PRIORITY 0 -#define STM32_UART_USART6_DMA_PRIORITY 0 -#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") - -/* - * USB driver system settings. - */ -#define STM32_USB_USE_OTG1 TRUE -#define STM32_USB_OTG1_IRQ_PRIORITY 14 -#define STM32_USB_OTG1_RX_FIFO_SIZE 512 -#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1 -#define STM32_USB_OTG_THREAD_STACK_SIZE 128 -#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 - -/* - * WDG driver system settings. - */ -#define STM32_WDG_USE_IWDG FALSE - -#endif /* MCUCONF_H */ +#undef STM32_PWM_USE_TIM5 +#define STM32_PWM_USE_TIM5 TRUE diff --git a/keyboards/handwired/onekey/blackpill_f401/rules.mk b/keyboards/handwired/onekey/blackpill_f401/rules.mk index 609262049c..6eb37a581d 100644 --- a/keyboards/handwired/onekey/blackpill_f401/rules.mk +++ b/keyboards/handwired/onekey/blackpill_f401/rules.mk @@ -1,30 +1,8 @@ -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F401xC -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = BLACKPILL_STM32_F401 -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m4 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -USE_FPU = yes -# Address of the booloader in system memory -STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 +# MCU name +MCU = STM32F401 -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -v 0483 -p df11 +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 # Build Options # change yes to no to disable diff --git a/keyboards/handwired/onekey/blackpill_f411/config.h b/keyboards/handwired/onekey/blackpill_f411/config.h index c6166380cf..829e84677f 100644 --- a/keyboards/handwired/onekey/blackpill_f411/config.h +++ b/keyboards/handwired/onekey/blackpill_f411/config.h @@ -23,7 +23,7 @@ #define UNUSED_PINS #define BACKLIGHT_PIN A0 -#define BACKLIGHT_PWM_DRIVER PWMD2 +#define BACKLIGHT_PWM_DRIVER PWMD5 #define BACKLIGHT_PWM_CHANNEL 1 #define RGB_DI_PIN A1 diff --git a/keyboards/handwired/onekey/blackpill_f411/halconf.h b/keyboards/handwired/onekey/blackpill_f411/halconf.h index a8db392aaa..ae08512d49 100644 --- a/keyboards/handwired/onekey/blackpill_f411/halconf.h +++ b/keyboards/handwired/onekey/blackpill_f411/halconf.h @@ -1,525 +1,21 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/** - * @file templates/halconf.h - * @brief HAL configuration header. - * @details HAL configuration file, this file allows to enable or disable the - * various device drivers from your application. You may also use - * this file in order to override the device drivers default settings. +/* Copyright 2020 Nick Brassel (tzarc) * - * @addtogroup HAL_CONF - * @{ + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ +#pragma once -#ifndef HALCONF_H -#define HALCONF_H +#define HAL_USE_I2C TRUE +#define HAL_USE_PWM TRUE -#define _CHIBIOS_HAL_CONF_ -#define _CHIBIOS_HAL_CONF_VER_7_0_ - -#include "mcuconf.h" - -/** - * @brief Enables the PAL subsystem. - */ -#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE -#endif - -/** - * @brief Enables the ADC subsystem. - */ -#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE -#endif - -/** - * @brief Enables the CAN subsystem. - */ -#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE -#endif - -/** - * @brief Enables the cryptographic subsystem. - */ -#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) -#define HAL_USE_CRY FALSE -#endif - -/** - * @brief Enables the DAC subsystem. - */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE -#endif - -/** - * @brief Enables the GPT subsystem. - */ -#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE -#endif - -/** - * @brief Enables the I2C subsystem. - */ -#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE -#endif - -/** - * @brief Enables the I2S subsystem. - */ -#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE -#endif - -/** - * @brief Enables the ICU subsystem. - */ -#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE -#endif - -/** - * @brief Enables the MAC subsystem. - */ -#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE -#endif - -/** - * @brief Enables the MMC_SPI subsystem. - */ -#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) -#define HAL_USE_MMC_SPI FALSE -#endif - -/** - * @brief Enables the PWM subsystem. - */ -#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE -#endif - -/** - * @brief Enables the RTC subsystem. - */ -#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE -#endif - -/** - * @brief Enables the SDC subsystem. - */ -#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE -#endif - -/** - * @brief Enables the SERIAL subsystem. - */ -#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE -#endif - -/** - * @brief Enables the SERIAL over USB subsystem. - */ -#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL_USB FALSE -#endif - -/** - * @brief Enables the SIO subsystem. - */ -#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) -#define HAL_USE_SIO FALSE -#endif - -/** - * @brief Enables the SPI subsystem. - */ -#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE -#endif - -/** - * @brief Enables the TRNG subsystem. - */ -#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) -#define HAL_USE_TRNG FALSE -#endif - -/** - * @brief Enables the UART subsystem. - */ -#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE -#endif - -/** - * @brief Enables the USB subsystem. - */ -#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE -#endif - -/** - * @brief Enables the WDG subsystem. - */ -#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE -#endif - -/** - * @brief Enables the WSPI subsystem. - */ -#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) -#define HAL_USE_WSPI FALSE -#endif - -/*===========================================================================*/ -/* PAL driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) -#define PAL_USE_CALLBACKS FALSE -#endif - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) -#define PAL_USE_WAIT FALSE -#endif - -/*===========================================================================*/ -/* ADC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE -#endif - -/** - * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* CAN driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Sleep mode related APIs inclusion switch. - */ -#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE -#endif - -/** - * @brief Enforces the driver to use direct callbacks rather than OSAL events. - */ -#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) -#define CAN_ENFORCE_USE_CALLBACKS FALSE -#endif - -/*===========================================================================*/ -/* CRY driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables the SW fall-back of the cryptographic driver. - * @details When enabled, this option, activates a fall-back software - * implementation for algorithms not supported by the underlying - * hardware. - * @note Fall-back implementations may not be present for all algorithms. - */ -#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) -#define HAL_CRY_USE_FALLBACK FALSE -#endif - -/** - * @brief Makes the driver forcibly use the fall-back implementations. - */ -#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) -#define HAL_CRY_ENFORCE_FALLBACK FALSE -#endif - -/*===========================================================================*/ -/* DAC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) -#define DAC_USE_WAIT TRUE -#endif - -/** - * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define DAC_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* I2C driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables the mutual exclusion APIs on the I2C bus. - */ -#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* MAC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables the zero-copy API. - */ -#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE -#endif - -/** - * @brief Enables an event sources for incoming packets. - */ -#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) -#define MAC_USE_EVENTS TRUE -#endif - -/*===========================================================================*/ -/* MMC_SPI driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Delays insertions. - * @details If enabled this options inserts delays into the MMC waiting - * routines releasing some extra CPU time for the threads with - * lower priority, this may slow down the driver a bit however. - * This option is recommended also if the SPI driver does not - * use a DMA channel and heavily loads the CPU. - */ -#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE -#endif - -/*===========================================================================*/ -/* SDC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Number of initialization attempts before rejecting the card. - * @note Attempts are performed at 10mS intervals. - */ -#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 -#endif - -/** - * @brief Include support for MMC cards. - * @note MMC support is not yet implemented so this option must be kept - * at @p FALSE. - */ -#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE -#endif - -/** - * @brief Delays insertions. - * @details If enabled this options inserts delays into the MMC waiting - * routines releasing some extra CPU time for the threads with - * lower priority, this may slow down the driver a bit however. - */ -#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE -#endif - -/** - * @brief OCR initialization constant for V20 cards. - */ -#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) -#define SDC_INIT_OCR_V20 0x50FF8000U -#endif - -/** - * @brief OCR initialization constant for non-V20 cards. - */ -#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) -#define SDC_INIT_OCR 0x80100000U -#endif - -/*===========================================================================*/ -/* SERIAL driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Default bit rate. - * @details Configuration parameter, this is the baud rate selected for the - * default configuration. - */ -#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 -#endif - -/** - * @brief Serial buffers size. - * @details Configuration parameter, you can change the depth of the queue - * buffers depending on the requirements of your application. - * @note The default is 16 bytes for both the transmission and receive - * buffers. - */ -#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 -#endif - -/*===========================================================================*/ -/* SERIAL_USB driver related setting. */ -/*===========================================================================*/ - -/** - * @brief Serial over USB buffers size. - * @details Configuration parameter, the buffer size must be a multiple of - * the USB data endpoint maximum packet size. - * @note The default is 256 bytes for both the transmission and receive - * buffers. - */ -#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 256 -#endif - -/** - * @brief Serial over USB number of buffers. - * @note The default is 2 buffers. - */ -#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_NUMBER 2 -#endif - -/*===========================================================================*/ -/* SPI driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE -#endif - -/** - * @brief Enables circular transfers APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) -#define SPI_USE_CIRCULAR FALSE -#endif - - -/** - * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define SPI_USE_MUTUAL_EXCLUSION TRUE -#endif - -/** - * @brief Handling method for SPI CS line. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) -#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD -#endif - -/*===========================================================================*/ -/* UART driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) -#define UART_USE_WAIT FALSE -#endif - -/** - * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define UART_USE_MUTUAL_EXCLUSION FALSE -#endif - -/*===========================================================================*/ -/* USB driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE -#endif - -/*===========================================================================*/ -/* WSPI driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) -#define WSPI_USE_WAIT TRUE -#endif - -/** - * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define WSPI_USE_MUTUAL_EXCLUSION TRUE -#endif - -#endif /* HALCONF_H */ - -/** @} */ +#include_next "halconf.h" diff --git a/keyboards/handwired/onekey/blackpill_f411/mcuconf.h b/keyboards/handwired/onekey/blackpill_f411/mcuconf.h index 0394ff56bb..034a022db4 100644 --- a/keyboards/handwired/onekey/blackpill_f411/mcuconf.h +++ b/keyboards/handwired/onekey/blackpill_f411/mcuconf.h @@ -1,253 +1,24 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef MCUCONF_H -#define MCUCONF_H - -/* - * STM32F4xx drivers configuration. - * The following settings override the default settings present in - * the various device driver implementation headers. - * Note that the settings for each driver only have effect if the whole - * driver is enabled in halconf.h. +/* Copyright 2020 Nick Brassel (tzarc) * - * IRQ priorities: - * 15...0 Lowest...Highest. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * DMA priorities: - * 0...3 Lowest...Highest. + * 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 . */ +#pragma once -#define STM32F4xx_MCUCONF +#include_next "mcuconf.h" -/* - * HAL driver system settings. - */ -#define STM32_NO_INIT FALSE -#define STM32_HSI_ENABLED TRUE -#define STM32_LSI_ENABLED TRUE -#define STM32_HSE_ENABLED TRUE -#define STM32_LSE_ENABLED FALSE -#define STM32_CLOCK48_REQUIRED TRUE -#define STM32_SW STM32_SW_PLL -#define STM32_PLLSRC STM32_PLLSRC_HSE -#define STM32_PLLM_VALUE 25 -#define STM32_PLLN_VALUE 384 -#define STM32_PLLP_VALUE 4 -#define STM32_PLLQ_VALUE 8 -#define STM32_HPRE STM32_HPRE_DIV1 -#define STM32_PPRE1 STM32_PPRE1_DIV4 -#define STM32_PPRE2 STM32_PPRE2_DIV2 -#define STM32_RTCSEL STM32_RTCSEL_LSI -#define STM32_RTCPRE_VALUE 8 -#define STM32_MCO1SEL STM32_MCO1SEL_HSI -#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 -#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK -#define STM32_MCO2PRE STM32_MCO2PRE_DIV5 -#define STM32_I2SSRC STM32_I2SSRC_CKIN -#define STM32_PLLI2SN_VALUE 192 -#define STM32_PLLI2SR_VALUE 5 -#define STM32_PVD_ENABLE FALSE -#define STM32_PLS STM32_PLS_LEV0 -#define STM32_BKPRAM_ENABLE FALSE +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE -/* - * IRQ system settings. - */ -#define STM32_IRQ_EXTI0_PRIORITY 6 -#define STM32_IRQ_EXTI1_PRIORITY 6 -#define STM32_IRQ_EXTI2_PRIORITY 6 -#define STM32_IRQ_EXTI3_PRIORITY 6 -#define STM32_IRQ_EXTI4_PRIORITY 6 -#define STM32_IRQ_EXTI5_9_PRIORITY 6 -#define STM32_IRQ_EXTI10_15_PRIORITY 6 -#define STM32_IRQ_EXTI16_PRIORITY 6 -#define STM32_IRQ_EXTI17_PRIORITY 15 -#define STM32_IRQ_EXTI18_PRIORITY 6 -#define STM32_IRQ_EXTI19_PRIORITY 6 -#define STM32_IRQ_EXTI20_PRIORITY 6 -#define STM32_IRQ_EXTI21_PRIORITY 15 -#define STM32_IRQ_EXTI22_PRIORITY 15 - -/* - * ADC driver system settings. - */ -#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 -#define STM32_ADC_USE_ADC1 FALSE -#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) -#define STM32_ADC_ADC1_DMA_PRIORITY 2 -#define STM32_ADC_IRQ_PRIORITY 6 -#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 - -/* - * GPT driver system settings. - */ -#define STM32_GPT_USE_TIM1 FALSE -#define STM32_GPT_USE_TIM2 FALSE -#define STM32_GPT_USE_TIM3 FALSE -#define STM32_GPT_USE_TIM4 FALSE -#define STM32_GPT_USE_TIM5 FALSE -#define STM32_GPT_USE_TIM9 FALSE -#define STM32_GPT_USE_TIM11 FALSE -#define STM32_GPT_TIM1_IRQ_PRIORITY 7 -#define STM32_GPT_TIM2_IRQ_PRIORITY 7 -#define STM32_GPT_TIM3_IRQ_PRIORITY 7 -#define STM32_GPT_TIM4_IRQ_PRIORITY 7 -#define STM32_GPT_TIM5_IRQ_PRIORITY 7 -#define STM32_GPT_TIM9_IRQ_PRIORITY 7 -#define STM32_GPT_TIM11_IRQ_PRIORITY 7 - -/* - * I2C driver system settings. - */ -#define STM32_I2C_USE_I2C1 FALSE -#define STM32_I2C_USE_I2C2 FALSE -#define STM32_I2C_USE_I2C3 FALSE -#define STM32_I2C_BUSY_TIMEOUT 50 -#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) -#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) -#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) -#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) -#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_I2C_I2C1_IRQ_PRIORITY 5 -#define STM32_I2C_I2C2_IRQ_PRIORITY 5 -#define STM32_I2C_I2C3_IRQ_PRIORITY 5 -#define STM32_I2C_I2C1_DMA_PRIORITY 3 -#define STM32_I2C_I2C2_DMA_PRIORITY 3 -#define STM32_I2C_I2C3_DMA_PRIORITY 3 -#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") - -/* - * I2S driver system settings. - */ -#define STM32_I2S_USE_SPI2 FALSE -#define STM32_I2S_USE_SPI3 FALSE -#define STM32_I2S_SPI2_IRQ_PRIORITY 10 -#define STM32_I2S_SPI3_IRQ_PRIORITY 10 -#define STM32_I2S_SPI2_DMA_PRIORITY 1 -#define STM32_I2S_SPI3_DMA_PRIORITY 1 -#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) -#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) -#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_I2S_DMA_ERROR_HOOK(i2sp) osalSysHalt("DMA failure") - -/* - * ICU driver system settings. - */ -#define STM32_ICU_USE_TIM1 FALSE -#define STM32_ICU_USE_TIM2 FALSE -#define STM32_ICU_USE_TIM3 FALSE -#define STM32_ICU_USE_TIM4 FALSE -#define STM32_ICU_USE_TIM5 FALSE -#define STM32_ICU_USE_TIM9 FALSE -#define STM32_ICU_TIM1_IRQ_PRIORITY 7 -#define STM32_ICU_TIM2_IRQ_PRIORITY 7 -#define STM32_ICU_TIM3_IRQ_PRIORITY 7 -#define STM32_ICU_TIM4_IRQ_PRIORITY 7 -#define STM32_ICU_TIM5_IRQ_PRIORITY 7 -#define STM32_ICU_TIM9_IRQ_PRIORITY 7 - -/* - * PWM driver system settings. - */ -#define STM32_PWM_USE_ADVANCED FALSE -#define STM32_PWM_USE_TIM1 FALSE -#define STM32_PWM_USE_TIM2 FALSE -#define STM32_PWM_USE_TIM3 FALSE -#define STM32_PWM_USE_TIM4 FALSE -#define STM32_PWM_USE_TIM5 FALSE -#define STM32_PWM_USE_TIM9 FALSE -#define STM32_PWM_TIM1_IRQ_PRIORITY 7 -#define STM32_PWM_TIM2_IRQ_PRIORITY 7 -#define STM32_PWM_TIM3_IRQ_PRIORITY 7 -#define STM32_PWM_TIM4_IRQ_PRIORITY 7 -#define STM32_PWM_TIM5_IRQ_PRIORITY 7 -#define STM32_PWM_TIM9_IRQ_PRIORITY 7 - -/* - * SERIAL driver system settings. - */ -#define STM32_SERIAL_USE_USART1 FALSE -#define STM32_SERIAL_USE_USART2 FALSE -#define STM32_SERIAL_USE_USART6 FALSE -#define STM32_SERIAL_USART1_PRIORITY 12 -#define STM32_SERIAL_USART2_PRIORITY 12 -#define STM32_SERIAL_USART6_PRIORITY 12 - -/* - * SPI driver system settings. - */ -#define STM32_SPI_USE_SPI1 FALSE -#define STM32_SPI_USE_SPI2 FALSE -#define STM32_SPI_USE_SPI3 FALSE -#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) -#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) -#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) -#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) -#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_SPI_SPI1_DMA_PRIORITY 1 -#define STM32_SPI_SPI2_DMA_PRIORITY 1 -#define STM32_SPI_SPI3_DMA_PRIORITY 1 -#define STM32_SPI_SPI1_IRQ_PRIORITY 10 -#define STM32_SPI_SPI2_IRQ_PRIORITY 10 -#define STM32_SPI_SPI3_IRQ_PRIORITY 10 -#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") - -/* - * ST driver system settings. - */ -#define STM32_ST_IRQ_PRIORITY 8 -#define STM32_ST_USE_TIMER 2 - -/* - * UART driver system settings. - */ -#define STM32_UART_USE_USART1 FALSE -#define STM32_UART_USE_USART2 FALSE -#define STM32_UART_USE_USART6 FALSE -#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) -#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) -#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) -#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) -#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_UART_USART1_IRQ_PRIORITY 12 -#define STM32_UART_USART2_IRQ_PRIORITY 12 -#define STM32_UART_USART6_IRQ_PRIORITY 12 -#define STM32_UART_USART1_DMA_PRIORITY 0 -#define STM32_UART_USART2_DMA_PRIORITY 0 -#define STM32_UART_USART6_DMA_PRIORITY 0 -#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") - -/* - * USB driver system settings. - */ -#define STM32_USB_USE_OTG1 TRUE -#define STM32_USB_OTG1_IRQ_PRIORITY 14 -#define STM32_USB_OTG1_RX_FIFO_SIZE 512 -#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1 -#define STM32_USB_OTG_THREAD_STACK_SIZE 128 -#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 - -/* - * WDG driver system settings. - */ -#define STM32_WDG_USE_IWDG FALSE - -#endif /* MCUCONF_H */ +#undef STM32_PWM_USE_TIM5 +#define STM32_PWM_USE_TIM5 TRUE diff --git a/keyboards/handwired/onekey/blackpill_f411/rules.mk b/keyboards/handwired/onekey/blackpill_f411/rules.mk index f2e0f2b4f9..7cf886431f 100644 --- a/keyboards/handwired/onekey/blackpill_f411/rules.mk +++ b/keyboards/handwired/onekey/blackpill_f411/rules.mk @@ -1,30 +1,8 @@ -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F411xE -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = BLACKPILL_STM32_F411 -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m4 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -USE_FPU = yes -# Address of the booloader in system memory -STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 +# MCU name +MCU = STM32F411 -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -v 0483 -p df11 +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 # Build Options # change yes to no to disable diff --git a/keyboards/handwired/onekey/bluepill/rules.mk b/keyboards/handwired/onekey/bluepill/rules.mk index 83a81a56b1..66ce517445 100644 --- a/keyboards/handwired/onekey/bluepill/rules.mk +++ b/keyboards/handwired/onekey/bluepill/rules.mk @@ -2,7 +2,6 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader -OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = STM32_F103_STM32DUINO diff --git a/keyboards/handwired/onekey/keymaps/joystick/config.h b/keyboards/handwired/onekey/keymaps/joystick/config.h new file mode 100644 index 0000000000..a3b5858ad2 --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/joystick/config.h @@ -0,0 +1,4 @@ +#pragma once + +#define JOYSTICK_AXES_COUNT 2 +#define JOYSTICK_BUTTON_COUNT 1 diff --git a/keyboards/handwired/onekey/keymaps/joystick/keymap.c b/keyboards/handwired/onekey/keymaps/joystick/keymap.c new file mode 100644 index 0000000000..f427b9d77d --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/joystick/keymap.c @@ -0,0 +1,26 @@ +#include QMK_KEYBOARD_H + +#include "joystick.h" + +#ifndef ADC_PIN +# define ADC_PIN F6 +#endif + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT_ortho_1x1(JS_BUTTON0) +}; + +void matrix_scan_user() { + int16_t val = (((uint32_t)timer_read() % 5000 - 2500) * 255) / 5000; + + if (val != joystick_status.axes[1]) { + joystick_status.axes[1] = val; + joystick_status.status |= JS_UPDATED; + } +} + +// Joystick config +joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT] = { + [0] = JOYSTICK_AXIS_IN(ADC_PIN, 0, 512, 1023), + [1] = JOYSTICK_AXIS_VIRTUAL +}; diff --git a/keyboards/handwired/onekey/keymaps/joystick/rules.mk b/keyboards/handwired/onekey/keymaps/joystick/rules.mk new file mode 100644 index 0000000000..b910bdbe6c --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/joystick/rules.mk @@ -0,0 +1 @@ +JOYSTICK_ENABLE = analog diff --git a/keyboards/handwired/onekey/keymaps/oled/keymap.c b/keyboards/handwired/onekey/keymaps/oled/keymap.c new file mode 100644 index 0000000000..b6e66ace74 --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/oled/keymap.c @@ -0,0 +1,452 @@ +/* Copyright 2020 Sergey Vlasov + * + * 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 QMK_KEYBOARD_H + +enum tap_dances { + TD_OLED, +}; + +enum oled_test_modes { + // Modes between TEST_FIRST and TEST_LAST (inclusive) can be switched with a keypress. + TEST_FIRST, + TEST_LOGO = TEST_FIRST, + TEST_CHARACTERS, + TEST_SLOW_UPDATE, + TEST_ALL_ON, + TEST_FRAME, + TEST_ALL_OFF, + TEST_FILL_HORZ_0, + TEST_FILL_HORZ_1, + TEST_FILL_VERT_0, + TEST_FILL_VERT_1, + TEST_FILL_CHECKERBOARD_1, + TEST_FILL_CHECKERBOARD_2, + TEST_FILL_CHECKERBOARD_4, + TEST_LAST = TEST_FILL_CHECKERBOARD_4, + + // Special modes which are not reachable normally. + TEST_DRAW_ALWAYS_ON, + TEST_DRAW_ALWAYS_OFF, +}; + +static enum oled_test_modes test_mode = TEST_FIRST; + +static oled_rotation_t rotation = OLED_ROTATION_0; + +static bool scrolling; +static uint8_t scrolling_speed; +static bool need_update = true; +static bool draw_always; +static bool update_speed_test; +static uint32_t update_speed_start_timer; +static uint16_t update_speed_count; +static bool restart_test; + +static void stop_scrolling(void) { + if (scrolling) { + oled_scroll_off(); + scrolling = false; + } +} + +static void dance_oled_finished(qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + if (state->pressed) { + // single hold - step through rotations + switch (rotation) { + case OLED_ROTATION_0: + rotation = OLED_ROTATION_90; + break; + case OLED_ROTATION_90: + rotation = OLED_ROTATION_180; + break; + case OLED_ROTATION_180: + rotation = OLED_ROTATION_270; + break; + default: + rotation = OLED_ROTATION_0; + break; + } + stop_scrolling(); + oled_init(rotation); + } else { + // single tap - step through test modes + if (test_mode < TEST_LAST) { + ++test_mode; + } else { + test_mode = TEST_FIRST; + } + stop_scrolling(); + oled_clear(); + } + restart_test = true; + need_update = true; + break; + + case 2: + if (state->pressed) { + // tap + hold - change scrolling speed + scrolling_speed = (scrolling_speed + 1) % 8; + stop_scrolling(); + oled_scroll_set_speed(scrolling_speed); + // Cannot reactivate scrolling here, because oled_scroll_off() + // marks the whole display as dirty, and oled_scroll_left() + // silently does nothing if either the display is dirty or + // scrolling is already active. + } else { + // double tap - toggle scrolling + if (!scrolling) { + scrolling = true; + oled_scroll_left(); + } else { + scrolling = false; + oled_scroll_off(); + } + } + need_update = true; + break; + + case 3: + if (state->pressed) { + // double tap + hold - toggle `draw_always` + draw_always = !draw_always; + if (draw_always) { + test_mode = TEST_DRAW_ALWAYS_ON; + } else { + test_mode = TEST_DRAW_ALWAYS_OFF; + } + stop_scrolling(); + oled_clear(); + restart_test = true; + need_update = true; + } else { + // triple tap - toggle update speed test + update_speed_test = !update_speed_test; + if (update_speed_test) { + stop_scrolling(); + update_speed_start_timer = timer_read32(); + update_speed_count = 0; + } + } + break; + default: + break; + } +} + +qk_tap_dance_action_t tap_dance_actions[] = {[TD_OLED] = ACTION_TAP_DANCE_FN(dance_oled_finished)}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {LAYOUT_ortho_1x1(TD(TD_OLED))}; + +// `bool oled_is_dirty(void)` does not exist at the moment +extern OLED_BLOCK_TYPE oled_dirty; + +static inline uint8_t pixel_width(void) { + if (!(rotation & OLED_ROTATION_90)) { + return OLED_DISPLAY_WIDTH; + } + return OLED_DISPLAY_HEIGHT; +} + +static inline uint8_t pixel_height(void) { + if (!(rotation & OLED_ROTATION_90)) { + return OLED_DISPLAY_HEIGHT; + } + return OLED_DISPLAY_WIDTH; +} + +// Draw the QMK logo at the top left corner, clipping if it does not fit. +static void test_logo(void) { + uint8_t lines = oled_max_lines(); + if (lines > 3) { + lines = 3; + } + uint8_t chars = oled_max_chars(); + if (chars > 21) { + chars = 21; + } + for (uint8_t row = 0; row < lines; ++row) { + oled_set_cursor(0, row); + for (uint8_t col = 0; col < chars; ++col) { + oled_write_char(0x80 + 0x20 * row + col, false); + } + } +} + +static const PROGMEM char fill_ff[OLED_MATRIX_SIZE] = {[0 ... OLED_MATRIX_SIZE - 1] = 0xff}; + +// Fill the whole screen with a pattern made from two bytes alternating after the specified number of repeats. +static void test_fill(uint8_t byte0, uint8_t byte1, uint8_t repeats) { + uint8_t width = pixel_width(); + uint8_t lines = oled_max_lines(); + uint16_t index = 0; + for (uint8_t row = 0; row < lines; ++row) { + for (uint8_t col = 0; col < width; ++col) { + uint8_t byte = ((col / repeats) % 2) ? byte1 : byte0; + oled_write_raw_byte(byte, index++); + } + } +} + +// Draw a frame at the edges of the OLED screen. +static void test_frame(void) { + uint8_t width = pixel_width(); + uint8_t height = pixel_height(); + for (uint8_t x = 0; x < width; ++x) { + oled_write_pixel(x, 0, true); + oled_write_pixel(x, height - 1, true); + } + for (uint8_t y = 1; y < height - 1; ++y) { + oled_write_pixel(0, y, true); + oled_write_pixel(width - 1, y, true); + } +} + +// Use all 94 visible ASCII characters for testing. +#define TEST_CHAR_COUNT ('~' - '!' + 1) + +static char get_test_char(uint8_t char_index) { return char_index + '!'; } + +// Fill the whole screen with distinct characters (if the display is large enough to show more than 94 characters +// at once, the sequence is repeated the second time with inverted characters). +static void test_characters(void) { + uint8_t cols = oled_max_chars(); + uint8_t rows = oled_max_lines(); + bool invert = false; + uint8_t char_index = 0; + for (uint8_t row = 0; row < rows; ++row) { + for (uint8_t col = 0; col < cols; ++col) { + oled_write_char(get_test_char(char_index), invert); + if (++char_index >= TEST_CHAR_COUNT) { + char_index = 0; + invert = !invert; + } + } + } +} + +// Test screen updating after drawing a single character or pixel. +void test_slow_update(void) { + static uint8_t phase, x, y, char_index, first_char; + static uint16_t timer; + static uint16_t delay = 500; + + if (restart_test) { + // Initialize all state variables before starting the test. + restart_test = false; + phase = 0; + x = 0; + y = 0; + char_index = 0; + first_char = 0; + delay = 500; + } else { + // Wait for the specified time between steps. + if (timer_elapsed(timer) < delay) { + return; + } + } + + timer = timer_read(); + switch (phase) { + case 0: + // Phase 0: fill the whole screen with mostly distinct characters, one character at a time. Here the + // inversion trick is not used, so that the frame which is drawn in subsequent phases would not be + // overlapped by the inverted character background. + oled_set_cursor(x, y); + oled_write_char(get_test_char(char_index), false); + if (++char_index >= TEST_CHAR_COUNT) { + char_index = 0; + } + if (++x >= oled_max_chars()) { + x = 0; + if (++y >= oled_max_lines()) { + // The whole screen was filled - start the next phase. + ++phase; + x = y = 0; + } + } + delay = 250; + break; + + case 1: + // Phase 1: draw a line along the left edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (y < pixel_height() - 1) { + ++y; + } else { + // The bottom left corner is reached - start the next phase. + ++phase; + ++x; + } + delay = 50; + break; + + case 2: + // Phase 2: draw a line along the bottom edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (x < pixel_width() - 1) { + ++x; + } else { + // The bottom right corner was reached - start the next phase. + ++phase; + --y; + } + delay = 50; + break; + + case 3: + // Phase 3: draw a line along the right edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (y > 0) { + --y; + } else { + // The top right corner was reached - start the next phase. + ++phase; + --x; + } + delay = 50; + break; + + case 4: + // Phase 4: draw a line along the top edge of the screen, one pixel at a time. + oled_write_pixel(x, y, true); + if (x > 0) { + --x; + } else { + // The top left corner was reached - start the next phase. + ++phase; + } + delay = 50; + break; + + default: + // Restart from phase 0, but change the first character of the sequence to make screen updates visible. + if (++first_char >= TEST_CHAR_COUNT) { + first_char = 0; + } + phase = 0; + x = 0; + y = 0; + char_index = first_char; + delay = 500; + break; + } +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + oled_scroll_set_area(0, 0); + oled_scroll_set_speed(scrolling_speed); + return rotation; +} + +void oled_task_user(void) { + if (update_speed_test) { + // Speed test mode - wait for screen update completion. + if (!oled_dirty) { + // Update statistics and send the measurement result to the console. + update_speed_count++; + if (update_speed_count % 256 == 0) { + uprintf("OLED: %u updates, %lu ms\n", update_speed_count, timer_elapsed32(update_speed_start_timer)); + } + + // Toggle between the "all on" and "all off" states and trigger the screen update again. + if (test_mode == TEST_ALL_ON) { + test_mode = TEST_ALL_OFF; + } else { + test_mode = TEST_ALL_ON; + } + need_update = true; + } + } + + // The sample implementation of oled_task_user() in the documentation redraws the image after every call, relying on + // the fact that drawing functions check whether the output actually changes anything in the image, and set dirty + // bits only when something has actually changed. However, redrawing the image only when some of the underlying + // data has changed is more efficient. Make it possible to test both modes here. + if (!draw_always || update_speed_test) { + // Draw the image only when the `need_update` flag is set, except for the "slow update" test. + // This mode is also forced when the screen update speed test is performed. + if (!need_update) { + if (test_mode != TEST_SLOW_UPDATE) { + return; + } + } + need_update = false; + } + + switch (test_mode) { + case TEST_LOGO: + test_logo(); + break; + case TEST_CHARACTERS: + test_characters(); + break; + case TEST_SLOW_UPDATE: + test_slow_update(); + break; + case TEST_ALL_ON: + oled_write_raw_P(fill_ff, sizeof(fill_ff)); + break; + case TEST_FRAME: + test_frame(); + break; + case TEST_ALL_OFF: + // `oled_clear()` is faster, but cannot be used with `draw_always`, because it does not check the previous + // content of the buffer and always marks the whole buffer as dirty. + if (update_speed_test) { + oled_clear(); + } else { + test_fill(0x00, 0x00, 1); + } + break; + case TEST_FILL_HORZ_0: + test_fill(0x55, 0x55, 1); + break; + case TEST_FILL_HORZ_1: + test_fill(0xaa, 0xaa, 1); + break; + case TEST_FILL_VERT_0: + test_fill(0xff, 0x00, 1); + break; + case TEST_FILL_VERT_1: + test_fill(0x00, 0xff, 1); + break; + case TEST_FILL_CHECKERBOARD_1: + test_fill(0x55, 0xaa, 1); + break; + case TEST_FILL_CHECKERBOARD_2: + test_fill(0x33, 0xcc, 2); + break; + case TEST_FILL_CHECKERBOARD_4: + test_fill(0x0f, 0xf0, 4); + break; + + case TEST_DRAW_ALWAYS_ON: + oled_write_P(PSTR("Draw Always"), false); + break; + case TEST_DRAW_ALWAYS_OFF: + oled_write_P(PSTR("Draw Once"), false); + break; + } +} + +void keyboard_post_init_user(void) { + // Console messages are used for update speed test results + debug_enable = true; +} diff --git a/keyboards/handwired/onekey/keymaps/oled/readme.md b/keyboards/handwired/onekey/keymaps/oled/readme.md new file mode 100644 index 0000000000..380b3eb522 --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/oled/readme.md @@ -0,0 +1,23 @@ +# OLED tester + +Available commands using a single key: +- Single tap: Switch to the next test pattern. +- Single hold: Switch to the next orientation (note that 90° and 270° orientations may not work correctly with some displays). +- Double tap: Toggle horizontal scrolling of the top row. Note that this scrolling is implemented by the controller and has major limitations: it works only with SSD1306-based displays, blocks all display updates, may not work correctly if the display width is less than 128 pixels, and does not handle 90°/270° rotation properly. +- Tap and hold: Change scrolling speed (because of controller limitations, scrolling needs to be started again manually using a double tap). +- Triple tap: Start or stop the update speed test. This test repeatedly fills the display with all-on and all-off pixels, measures the time required for updating the display, and prints the measured values to the HID console every 256th refresh. +- Double tap and hold: Switch between the “draw once” (default) and “draw always” modes. The “draw always” mode means that `oled_task_user()` redraws the whole picture completely every time it is called; the example code in the OLED feature documentation is written in this style. Testing the “draw always” mode can uncover bugs in the implementation of drawing functions (they must not set the dirty mark if the buffer content is not actually changed). + +Available test patterns: +- QMK logo (clipped to fit on the display). +- Fill the whole screen with as much unique characters as possible (all 94 printable ASCII characters are used, and if the display has more character positions available, the same characters are printed again, but inverted). +- “Slow update” test — instead of updating the whole screen at once, draw things piece by piece to uncover display update bugs. The drawing sequence used by this test: + - Fill the whole screen with printable ASCII characters (similar to the previous test, but characters are drawn one by one with 250 ms intervals between them, and inverted characters are not used to avoid obscuring the next phases). + - Draw a frame along the screen edges, starting from the top left corner and going down along the left edge, then along the bottom, right and top edges, with 50 ms delay after every pixel. + - Repeat the same sequence again, but with the character sequence shifted by 1 character (so that the updates would be visible). +- All pixels on. +- Pixels at the edges of the screen on. +- All pixels off. +- Horizontal on/off 1px lines (two variants - starting from on or off state). +- Vertical on/off 1px lines (two variants - starting from on or off state). +- Checkerboard pattern (three variants - 1×1, 2×2, 4×4 pixels). diff --git a/keyboards/handwired/onekey/keymaps/oled/rules.mk b/keyboards/handwired/onekey/keymaps/oled/rules.mk new file mode 100644 index 0000000000..2ef0a8d04f --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/oled/rules.mk @@ -0,0 +1,2 @@ +OLED_DRIVER_ENABLE = yes +TAP_DANCE_ENABLE = yes diff --git a/keyboards/handwired/onekey/rules.mk b/keyboards/handwired/onekey/rules.mk index 8ed2557683..ac343e1663 100644 --- a/keyboards/handwired/onekey/rules.mk +++ b/keyboards/handwired/onekey/rules.mk @@ -5,7 +5,7 @@ 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 = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration +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 = yes # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work @@ -17,7 +17,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) DEFAULT_FOLDER = handwired/onekey/promicro LAYOUTS = ortho_1x1 diff --git a/keyboards/handwired/owlet60/config.h b/keyboards/handwired/owlet60/config.h index 29fd0b1e57..0bcc8f20e2 100644 --- a/keyboards/handwired/owlet60/config.h +++ b/keyboards/handwired/owlet60/config.h @@ -217,34 +217,6 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/owlet60/rules.mk b/keyboards/handwired/owlet60/rules.mk index 6c81dad09c..c3c94c91da 100644 --- a/keyboards/handwired/owlet60/rules.mk +++ b/keyboards/handwired/owlet60/rules.mk @@ -30,7 +30,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) CUSTOM_MATRIX = yes OLED_DRIVER_ENABLE = no diff --git a/keyboards/handwired/p1800fl/rules.mk b/keyboards/handwired/p1800fl/rules.mk index b8601f0f10..60ec4f699c 100644 --- a/keyboards/handwired/p1800fl/rules.mk +++ b/keyboards/handwired/p1800fl/rules.mk @@ -29,4 +29,3 @@ MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/p65rgb/rules.mk b/keyboards/handwired/p65rgb/rules.mk index 297aa1cd77..5eeaf976c3 100644 --- a/keyboards/handwired/p65rgb/rules.mk +++ b/keyboards/handwired/p65rgb/rules.mk @@ -30,4 +30,3 @@ MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/postageboard/mini/rules.mk b/keyboards/handwired/postageboard/mini/rules.mk index 96e8e574cf..bd7866ecf1 100644 --- a/keyboards/handwired/postageboard/mini/rules.mk +++ b/keyboards/handwired/postageboard/mini/rules.mk @@ -26,4 +26,3 @@ MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/postageboard/r1/rules.mk b/keyboards/handwired/postageboard/r1/rules.mk index 96e8e574cf..bd7866ecf1 100644 --- a/keyboards/handwired/postageboard/r1/rules.mk +++ b/keyboards/handwired/postageboard/r1/rules.mk @@ -26,4 +26,3 @@ MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/prime_exl/rules.mk b/keyboards/handwired/prime_exl/rules.mk index d7aca43dfc..a535e2e8c4 100644 --- a/keyboards/handwired/prime_exl/rules.mk +++ b/keyboards/handwired/prime_exl/rules.mk @@ -30,4 +30,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/handwired/prime_exl_plus/rules.mk b/keyboards/handwired/prime_exl_plus/rules.mk index c0493d993c..53e9616cc8 100644 --- a/keyboards/handwired/prime_exl_plus/rules.mk +++ b/keyboards/handwired/prime_exl_plus/rules.mk @@ -30,4 +30,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index f9560206b4..20c5e6a855 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -150,7 +150,6 @@ along with this program. If not, see . //#define NO_ACTION_FUNCTION #define PS2_MOUSE_INIT_DELAY 2000 -#define BATTERY_PIN 9 #define BATTERY_POLL 30000 #define MAX_VOLTAGE 4.2 #define MIN_VOLTAGE 3.2 diff --git a/keyboards/handwired/promethium/promethium.c b/keyboards/handwired/promethium/promethium.c index 3cc0f5a8c8..96bcf3ce14 100644 --- a/keyboards/handwired/promethium/promethium.c +++ b/keyboards/handwired/promethium/promethium.c @@ -3,6 +3,7 @@ #include "timer.h" #include "matrix.h" #include "musical_notes.h" +#include "adafruit_ble.h" float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_A4, 0.0625); float fauxclicky_released_note[2] = MUSICAL_NOTE(_A4, 0.0625); @@ -11,7 +12,7 @@ float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C6, 0.25); // cubic fit {3.3, 0}, {3.5, 2.9}, {3.6, 5}, {3.7, 8.6}, {3.8, 36}, {3.9, 62}, {4.0, 73}, {4.05, 83}, {4.1, 89}, {4.15, 94}, {4.2, 100} uint8_t battery_level(void) { - float voltage = analogRead(BATTERY_PIN) * 2 * 3.3 / 1024; + float voltage = adafruit_ble_read_battery_voltage() * 2 * 3.3 / 1024; if (voltage < MIN_VOLTAGE) return 0; if (voltage > MAX_VOLTAGE) return 255; return (voltage - MIN_VOLTAGE) / (MAX_VOLTAGE - MIN_VOLTAGE) * 255; diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk index 19d20ee03f..4b96e2f691 100644 --- a/keyboards/handwired/promethium/rules.mk +++ b/keyboards/handwired/promethium/rules.mk @@ -45,4 +45,4 @@ SRC += rgbsps.c SRC += analog.c SRC += matrix.c -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/handwired/pteron38/config.h b/keyboards/handwired/pteron38/config.h new file mode 100644 index 0000000000..967872aaa9 --- /dev/null +++ b/keyboards/handwired/pteron38/config.h @@ -0,0 +1,41 @@ +/* Copyright 2020 Fidel Coria + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER QMK Community +#define PRODUCT Pteron38 Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 10 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { E6, B4, B5, B6 } +#define MATRIX_COL_PINS { F6, F5, F7, B1, B3, C6, D4, D0, D1, D2 } +#define UNUSED_PINS { D7, F4, D3 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 /* 5 is default */ diff --git a/keyboards/handwired/pteron38/info.json b/keyboards/handwired/pteron38/info.json new file mode 100644 index 0000000000..58b46da7e8 --- /dev/null +++ b/keyboards/handwired/pteron38/info.json @@ -0,0 +1,58 @@ +{ + "keyboard_name": "pteron38", + "url": "", + "maintainer": "fidelcoria", + "width": 17, + "height": 5.95, + "layouts": { + "LAYOUT_split_3x5_4": { + "layout": [ + {"label":"K101", "x":1, "y":1.75}, + {"label":"K102", "x":2, "y":1.25}, + {"label":"K103", "x":3, "y":1}, + {"label":"K104", "x":4, "y":1.35}, + {"label":"K105", "x":5, "y":1.45}, + + {"label":"K106", "x":11, "y":1.45}, + {"label":"K107", "x":12, "y":1.35}, + {"label":"K108", "x":13, "y":1}, + {"label":"K109", "x":14, "y":1.25}, + {"label":"K110", "x":15, "y":1.75}, + + {"label":"K201", "x":1, "y":2.75}, + {"label":"K202", "x":2, "y":2.25}, + {"label":"K203", "x":3, "y":2}, + {"label":"K204", "x":4, "y":2.35}, + {"label":"K205", "x":5, "y":2.45}, + + {"label":"K206", "x":11, "y":2.45}, + {"label":"K207", "x":12, "y":2.35}, + {"label":"K208", "x":13, "y":2}, + {"label":"K209", "x":14, "y":2.25}, + {"label":"K210", "x":15, "y":2.75}, + + {"label":"K301", "x":1, "y":3.75}, + {"label":"K302", "x":2, "y":3.25}, + {"label":"K303", "x":3, "y":3}, + {"label":"K304", "x":4, "y":3.35}, + {"label":"K305", "x":5, "y":3.45}, + + {"label":"K306", "x":11, "y":3.45}, + {"label":"K307", "x":12, "y":3.35}, + {"label":"K308", "x":13, "y":3}, + {"label":"K309", "x":14, "y":3.25}, + {"label":"K310", "x":15, "y":3.75}, + + {"label":"K402", "x":4, "y":4.35}, + {"label":"K403", "x":5, "y":4.45}, + {"label":"K404", "x":6, "y":4.65}, + {"label":"K405", "x":7, "y":4.95}, + + {"label":"K406", "x":9, "y":4.95}, + {"label":"K407", "x":10, "y":4.65}, + {"label":"K408", "x":11, "y":4.45}, + {"label":"K409", "x":12, "y":4.35} + ] + } + } +} diff --git a/keyboards/handwired/pteron38/keymaps/default/keymap.c b/keyboards/handwired/pteron38/keymaps/default/keymap.c new file mode 100644 index 0000000000..df8028876b --- /dev/null +++ b/keyboards/handwired/pteron38/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2020 Fidel Coria + * + * 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 QMK_KEYBOARD_H + +#define SFT_Z LSFT_T(KC_Z) +#define SFT_FSL RSFT_T(KC_SLSH) + +#define UNLOCK LCA(KC_DEL) +#define LOCK RGUI(KC_L) +#define CTL_S RCTL(KC_RSFT) // used with arrow keys for word highlight +#define G_SHFT RGUI(KC_RSFT) // plus arrow to switch window to other screen + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_split_3x5_4( + 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, + SFT_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, SFT_FSL, + MO(1), KC_BSPC,MO(2), KC_LCTL, KC_RSFT,KC_ENT, KC_SPC, KC_RALT + ), + + [1] = LAYOUT_split_3x5_4( + KC_TAB, KC_HOME,KC_UP, KC_END, UNLOCK, KC_GRV, KC_LPRN,KC_RPRN,KC_MINS,KC_EQL, + KC_ESC, KC_LEFT,KC_DOWN,KC_RGHT,LOCK, KC_QUOT,KC_LCBR,KC_RCBR,KC_RGUI,KC_QUOT, + _______,KC_DEL, KC_ENT, KC_SPC, KC_CAPS, CTL_S, KC_LBRC,KC_RBRC,G_SHFT, KC_BSLS, + _______,_______,_______,_______, _______,_______,KC_RCTL,KC_RALT + ), + + [2] = LAYOUT_split_3x5_4( + 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_INS, _______,RESET, _______,_______, + _______,_______,_______,_______, _______,_______,KC_RCTL,KC_RALT + ) +}; diff --git a/keyboards/handwired/pteron38/pteron38.c b/keyboards/handwired/pteron38/pteron38.c new file mode 100644 index 0000000000..62d09ffa55 --- /dev/null +++ b/keyboards/handwired/pteron38/pteron38.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Fidel Coria + * + * 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 "pteron38.h" diff --git a/keyboards/handwired/pteron38/pteron38.h b/keyboards/handwired/pteron38/pteron38.h new file mode 100644 index 0000000000..7b9e734cfb --- /dev/null +++ b/keyboards/handwired/pteron38/pteron38.h @@ -0,0 +1,31 @@ +/* Copyright 2020 Fidel Coria + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_split_3x5_4( \ + K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, \ + K402, K403, K404, K405, K406, K407, K408, K409 \ +) { \ + { K101, K102, K103, K104, K105, K106, K107, K108, K109, K110 }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310 }, \ + { KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, KC_NO } \ +} diff --git a/keyboards/handwired/pteron38/readme.md b/keyboards/handwired/pteron38/readme.md new file mode 100644 index 0000000000..3ebdfecf4b --- /dev/null +++ b/keyboards/handwired/pteron38/readme.md @@ -0,0 +1,15 @@ +# Pteron38 + +![Pteron38](https://i.imgur.com/75030bal.jpg) + +An ergonomic keyboard heavily inspired by the [Atreus](https://github.com/technomancy/atreus), [Iris](https://github.com/keebio/iris-case) and [Atreis](https://github.com/dekonnection/atreis) keyboards. More info and files for laser cutting plates and case are in the [Pteron repository](https://github.com/FSund/pteron-keyboard). + +* Keyboard Maintainer: [Fidel Coria](https://github.com/fidelcoria) +* Hardware Supported: Elite C +* Hardware Availability: Handwired, no PCB's available (for now) + +Make example for this keyboard (after setting up your build environment): + + make handwired/pteron38:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/pteron38/rules.mk b/keyboards/handwired/pteron38/rules.mk new file mode 100644 index 0000000000..12c8a60059 --- /dev/null +++ b/keyboards/handwired/pteron38/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/handwired/riblee_f401/config.h b/keyboards/handwired/riblee_f401/config.h index d8e7e7d621..6e5c079799 100644 --- a/keyboards/handwired/riblee_f401/config.h +++ b/keyboards/handwired/riblee_f401/config.h @@ -27,10 +27,6 @@ #define MATRIX_ROWS 5 #define MATRIX_COLS 12 -// Testing with onekey -// #define MATRIX_ROW_PINS { A7 } -// #define MATRIX_COL_PINS { B0 } - #define MATRIX_ROW_PINS { A6, A5, A4, A3, A2 } #define MATRIX_COL_PINS { B10, B1, B0, B15, A8, B3, B4, B5, B6, B7, B8, B9 } #define UNUSED_PINS @@ -39,3 +35,7 @@ #define BACKLIGHT_PIN A0 #define BACKLIGHT_LEVELS 5 + +#define MOUSEKEY_INTERVAL 32 + +#define TAPPING_TERM 175 \ No newline at end of file diff --git a/keyboards/handwired/riblee_f401/keymaps/default/keymap.c b/keyboards/handwired/riblee_f401/keymaps/default/keymap.c index 40f64e1899..4bb18634eb 100644 --- a/keyboards/handwired/riblee_f401/keymaps/default/keymap.c +++ b/keyboards/handwired/riblee_f401/keymaps/default/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -48,15 +48,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Left | Down | Up |Right | + * | Brite| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = LAYOUT_ortho_5x12( - 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_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_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_BSPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Colemak @@ -111,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | + * | | | | | | BTN1 | BTN2 | | MS_L | MS_D | MS_U | MS_R | * `-----------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_ortho_5x12( @@ -119,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_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 + _______, _______, _______, _______, _______, KC_BTN1, KC_BTN2, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R ), /* Raise @@ -147,24 +147,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Reset| | | | | | | | | | Del | + * | |Reset |Debug | | | | | | | | | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * | | |Mu mod|Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * | | | | | | | NKRO | Swap |Un swp| | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_ortho_5x12( - 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, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, - _______, _______, 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, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + 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, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, LCG_SWP, LCG_NRM, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) - }; layer_state_t layer_state_set_user(layer_state_t state) { @@ -193,12 +192,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; case BACKLIT: if (record->event.pressed) { - register_code(KC_RSFT); + register_code(keycode_config(KC_LGUI)); #ifdef BACKLIGHT_ENABLE backlight_step(); #endif } else { - unregister_code(KC_RSFT); + unregister_code(keycode_config(KC_LGUI)); } return false; break; diff --git a/keyboards/handwired/riblee_f401/riblee_f401.h b/keyboards/handwired/riblee_f401/riblee_f401.h index 306565a310..a1b326aae4 100644 --- a/keyboards/handwired/riblee_f401/riblee_f401.h +++ b/keyboards/handwired/riblee_f401/riblee_f401.h @@ -1,5 +1,5 @@ /* -Copyright 2020 QMK Community, Daniel Reibl +Copyright 2020 QMK Community, Janos Daniel Reibl @riblee 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 diff --git a/keyboards/handwired/riblee_f401/rules.mk b/keyboards/handwired/riblee_f401/rules.mk index eab426a375..efe2522ee2 100644 --- a/keyboards/handwired/riblee_f401/rules.mk +++ b/keyboards/handwired/riblee_f401/rules.mk @@ -1,35 +1,13 @@ -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F401xC -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = BLACKPILL_STM32_F401 -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m4 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -USE_FPU = yes -# Address of the booloader in system memory -STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 +# MCU name +MCU = STM32F401 -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -v 0483 -p df11 +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control KEYBOARD_SHARED_EP = yes @@ -38,9 +16,11 @@ COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover +NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BACKLIGHT_DRIVER = software RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth -AUDIO_ENABLE = no # Audio output \ No newline at end of file +AUDIO_ENABLE = no # Audio output + +LAYOUTS = ortho_5x12 \ No newline at end of file diff --git a/keyboards/handwired/sick68/config.h b/keyboards/handwired/sick68/config.h index 9f050c361e..c61eb7eafd 100644 --- a/keyboards/handwired/sick68/config.h +++ b/keyboards/handwired/sick68/config.h @@ -220,34 +220,6 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/sick68/rules.mk b/keyboards/handwired/sick68/rules.mk index f90c4cf21e..fa2740ae65 100644 --- a/keyboards/handwired/sick68/rules.mk +++ b/keyboards/handwired/sick68/rules.mk @@ -29,6 +29,5 @@ MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs LAYOUTS = 65_ansi diff --git a/keyboards/handwired/sick_pad/config.h b/keyboards/handwired/sick_pad/config.h new file mode 100644 index 0000000000..f431daf38e --- /dev/null +++ b/keyboards/handwired/sick_pad/config.h @@ -0,0 +1,47 @@ +/* Copyright 2020 Joel Schneider + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xDA20 +#define DEVICE_VER 0x0001 +#define MANUFACTURER FedorSosnin +#define PRODUCT SiCK-PAD + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } +#define MATRIX_COL_PINS { B9, B15, B14, B13 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/handwired/sick_pad/info.json b/keyboards/handwired/sick_pad/info.json new file mode 100644 index 0000000000..68ff6b40e8 --- /dev/null +++ b/keyboards/handwired/sick_pad/info.json @@ -0,0 +1,34 @@ +{ + "keyboard_name": "sick_pad", + "url": "https://www.thingiverse.com/thing:3682168", + "maintainer": "jmschneider", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT_numpad_5x4": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":1, "h":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + + {"x":0, "y":4, "w":2}, + {"x":2, "y":4}, + {"x":3, "y":3, "h":2} + ] + } + } +} diff --git a/keyboards/handwired/sick_pad/keymaps/default/keymap.c b/keyboards/handwired/sick_pad/keymaps/default/keymap.c new file mode 100644 index 0000000000..62e599faa3 --- /dev/null +++ b/keyboards/handwired/sick_pad/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2020 Joel Schneider + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_numpad_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT + ) +}; diff --git a/keyboards/handwired/sick_pad/readme.md b/keyboards/handwired/sick_pad/readme.md new file mode 100644 index 0000000000..5d3879c405 --- /dev/null +++ b/keyboards/handwired/sick_pad/readme.md @@ -0,0 +1,15 @@ +# SiCK-PAD + +![SiCK-PAD](https://cdn.thingiverse.com/assets/79/f6/22/c5/93/IMG_7816.JPG) + +The SiCK-PAD is a custom 3D printed mechanical numpad built from scratch without the price tag often associated with one. + +- Keyboard Maintainer: [jmschneider](https://github.com/jmschneider) +- Hardware Supported: QMK Proton C +- Hardware Availability: [files to print and documentation](https://www.thingiverse.com/thing:3682168) + +Make example for this keyboard (after setting up your build environment): + + make handwired/sick_pad:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/sick_pad/rules.mk b/keyboards/handwired/sick_pad/rules.mk new file mode 100644 index 0000000000..bfe731ecce --- /dev/null +++ b/keyboards/handwired/sick_pad/rules.mk @@ -0,0 +1,20 @@ +# MCU name +MCU = STM32F303 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +LAYOUTS = numpad_5x4 diff --git a/keyboards/handwired/sick_pad/sick_pad.c b/keyboards/handwired/sick_pad/sick_pad.c new file mode 100644 index 0000000000..3464545fef --- /dev/null +++ b/keyboards/handwired/sick_pad/sick_pad.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Joel Schneider + * + * 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 "sick_pad.h" diff --git a/keyboards/handwired/sick_pad/sick_pad.h b/keyboards/handwired/sick_pad/sick_pad.h new file mode 100644 index 0000000000..2fe82388de --- /dev/null +++ b/keyboards/handwired/sick_pad/sick_pad.h @@ -0,0 +1,33 @@ +/* Copyright 2020 Joel Schneider + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_numpad_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K23, \ + K30, K31, K32, \ + K41, K42, K43 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, KC_NO }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, KC_NO }, \ + { KC_NO, K41, K42, K43 } \ +} diff --git a/keyboards/handwired/slash/rules.mk b/keyboards/handwired/slash/rules.mk index 092115db12..5c2cc5d979 100644 --- a/keyboards/handwired/slash/rules.mk +++ b/keyboards/handwired/slash/rules.mk @@ -34,4 +34,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH = AdafruitBLE AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/sticc14/config.h b/keyboards/handwired/sticc14/config.h index 22011f0788..30516477d6 100644 --- a/keyboards/handwired/sticc14/config.h +++ b/keyboards/handwired/sticc14/config.h @@ -216,34 +216,6 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/sticc14/rules.mk b/keyboards/handwired/sticc14/rules.mk index 7b326cc319..99931790ce 100644 --- a/keyboards/handwired/sticc14/rules.mk +++ b/keyboards/handwired/sticc14/rules.mk @@ -29,4 +29,3 @@ MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/swiftrax/astro65/astro65.c b/keyboards/handwired/swiftrax/astro65/astro65.c new file mode 100644 index 0000000000..57586550bb --- /dev/null +++ b/keyboards/handwired/swiftrax/astro65/astro65.c @@ -0,0 +1,17 @@ +/* +Copyright 2020 Swiftrax + +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 "astro65.h" diff --git a/keyboards/handwired/swiftrax/astro65/astro65.h b/keyboards/handwired/swiftrax/astro65/astro65.h new file mode 100644 index 0000000000..291a71aa44 --- /dev/null +++ b/keyboards/handwired/swiftrax/astro65/astro65.h @@ -0,0 +1,36 @@ +/* +Copyright 2020 Swiftrax + +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 . +*/ +#pragma once + +#include "quantum.h" + +// readability +#define XXXX KC_NO + +#define LAYOUT_65_ansi_blocker_split_bs( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015,\ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115,\ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K215,\ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315,\ + K400, K401, K402, K406, K410, K411, K412, K414, K415 \ +) { \ + {K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015},\ + {K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, XXXX, K115},\ + {K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, XXXX, XXXX, K215},\ + {K300, XXXX, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, XXXX, K314, K315},\ + {K400, K401, K402, XXXX, XXXX, XXXX, K406, XXXX, XXXX, XXXX, K410, K411, K412, XXXX, K414, K415} \ +} diff --git a/keyboards/handwired/swiftrax/astro65/config.h b/keyboards/handwired/swiftrax/astro65/config.h new file mode 100644 index 0000000000..84cc9b53c5 --- /dev/null +++ b/keyboards/handwired/swiftrax/astro65/config.h @@ -0,0 +1,44 @@ +/* +Copyright 2020 Swiftrax + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEAEF +#define DEVICE_VER 0x0001 +#define MANUFACTURER Swiftrax +#define PRODUCT Astro65 +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { B0, B3, F7, B1, B2 } +#define MATRIX_COL_PINS { E6, D5, C7, C6, B6, B5, B4, D7, D6, D4, F0, F1, F4, F5, F6 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 diff --git a/keyboards/handwired/swiftrax/astro65/info.json b/keyboards/handwired/swiftrax/astro65/info.json new file mode 100644 index 0000000000..767ec70a22 --- /dev/null +++ b/keyboards/handwired/swiftrax/astro65/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Astro65", + "url": "https://github.com/swiftrax", + "maintainer": "Swiftrax", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_blocker_split_bs": { + "layout": [{"label":"0,0", "x":0, "y":0}, {"label":"0,1", "x":1, "y":0}, {"label":"0,2", "x":2, "y":0}, {"label":"0,3", "x":3, "y":0}, {"label":"0,4", "x":4, "y":0}, {"label":"0,5", "x":5, "y":0}, {"label":"0,6", "x":6, "y":0}, {"label":"0,7", "x":7, "y":0}, {"label":"0,8", "x":8, "y":0}, {"label":"0,9", "x":9, "y":0}, {"label":"0,10", "x":10, "y":0}, {"label":"0,11", "x":11, "y":0}, {"label":"0,12", "x":12, "y":0}, {"label":"0,13", "x":13, "y":0}, {"label":"0,14", "x":14, "y":0}, {"label":"0,15", "x":15, "y":0}, {"label":"1,0", "x":0, "y":1, "w":1.5}, {"label":"1,1", "x":1.5, "y":1}, {"label":"1,2", "x":2.5, "y":1}, {"label":"1,3", "x":3.5, "y":1}, {"label":"1,4", "x":4.5, "y":1}, {"label":"1,5", "x":5.5, "y":1}, {"label":"1,6", "x":6.5, "y":1}, {"label":"1,7", "x":7.5, "y":1}, {"label":"1,8", "x":8.5, "y":1}, {"label":"1,9", "x":9.5, "y":1}, {"label":"1,10", "x":10.5, "y":1}, {"label":"1,11", "x":11.5, "y":1}, {"label":"1,12", "x":12.5, "y":1}, {"label":"1,13", "x":13.5, "y":1, "w":1.5}, {"label":"1,15", "x":15, "y":1}, {"label":"2,0", "x":0, "y":2, "w":1.75}, {"label":"2,1", "x":1.75, "y":2}, {"label":"2,2", "x":2.75, "y":2}, {"label":"2,3", "x":3.75, "y":2}, {"label":"2,4", "x":4.75, "y":2}, {"label":"2,5", "x":5.75, "y":2}, {"label":"2,6", "x":6.75, "y":2}, {"label":"2,7", "x":7.75, "y":2}, {"label":"2,8", "x":8.75, "y":2}, {"label":"2,9", "x":9.75, "y":2}, {"label":"2,10", "x":10.75, "y":2}, {"label":"2,11", "x":11.75, "y":2}, {"label":"2,12", "x":12.75, "y":2, "w":2.25}, {"label":"2,15", "x":15, "y":2}, {"label":"3,0", "x":0, "y":3, "w":2.25}, {"label":"3,2", "x":2.25, "y":3}, {"label":"3,3", "x":3.25, "y":3}, {"label":"3,4", "x":4.25, "y":3}, {"label":"3,5", "x":5.25, "y":3}, {"label":"3,6", "x":6.25, "y":3}, {"label":"3,7", "x":7.25, "y":3}, {"label":"3,8", "x":8.25, "y":3}, {"label":"3,9", "x":9.25, "y":3}, {"label":"3,10", "x":10.25, "y":3}, {"label":"3,11", "x":11.25, "y":3}, {"label":"3,12", "x":12.25, "y":3, "w":1.75}, {"label":"3,14", "x":14, "y":3}, {"label":"3,15", "x":15, "y":3}, {"label":"4,0", "x":0, "y":4, "w":1.25}, {"label":"4,1", "x":1.25, "y":4, "w":1.25}, {"label":"4,2", "x":2.5, "y":4, "w":1.25}, {"label":"4,6", "x":3.75, "y":4, "w":6.25}, {"label":"4,10", "x":10, "y":4, "w":1.25}, {"label":"4,11", "x":11.25, "y":4, "w":1.25}, {"label":"4,12", "x":13, "y":4}, {"label":"4,14", "x":14, "y":4}, {"label":"4,15", "x":15, "y":4}] + } + } +} diff --git a/keyboards/handwired/swiftrax/astro65/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/astro65/keymaps/default/keymap.c new file mode 100644 index 0000000000..d9fab28c2a --- /dev/null +++ b/keyboards/handwired/swiftrax/astro65/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* +Copyright 2020 Swiftrax + +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 QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_65_ansi_blocker_split_bs( + 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_BSLS, KC_HOME, + 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_END , + 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_65_ansi_blocker_split_bs( + 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, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______, _______, _______, _______, _______,_______,_______), +}; diff --git a/keyboards/handwired/swiftrax/astro65/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/astro65/keymaps/via/keymap.c new file mode 100644 index 0000000000..839992fc3f --- /dev/null +++ b/keyboards/handwired/swiftrax/astro65/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 Swiftrax + +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 QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_65_ansi_blocker_split_bs( + 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_BSLS, KC_HOME, + 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_END , + 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_65_ansi_blocker_split_bs( + 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, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______, _______, _______, _______, _______,_______,_______), + +[2] = LAYOUT_65_ansi_blocker_split_bs( + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______, _______, _______, _______, _______,_______,_______), + +[3] = LAYOUT_65_ansi_blocker_split_bs( + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, + _______, _______,_______, _______, _______, _______, _______,_______,_______), +}; diff --git a/keyboards/handwired/swiftrax/astro65/keymaps/via/rules.mk b/keyboards/handwired/swiftrax/astro65/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/handwired/swiftrax/astro65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/astro65/readme.md b/keyboards/handwired/swiftrax/astro65/readme.md new file mode 100644 index 0000000000..b5bf429aec --- /dev/null +++ b/keyboards/handwired/swiftrax/astro65/readme.md @@ -0,0 +1,13 @@ +# Astro65 + +A 65% that uses Ai03's unified daughter board + +* Keyboard Maintainer: Swiftrax +* Hardware Supported: Astro65 +* Hardware Availability: https://github.com/swiftrax + +Make example for this keyboard (after setting up your build environment): + + make handwired/swiftrax/astro65:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/swiftrax/astro65/rules.mk b/keyboards/handwired/swiftrax/astro65/rules.mk new file mode 100644 index 0000000000..1a5f11e31a --- /dev/null +++ b/keyboards/handwired/swiftrax/astro65/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 65_ansi_blocker_split_bs diff --git a/keyboards/handwired/swiftrax/pandamic/config.h b/keyboards/handwired/swiftrax/pandamic/config.h new file mode 100644 index 0000000000..0916bbf1c7 --- /dev/null +++ b/keyboards/handwired/swiftrax/pandamic/config.h @@ -0,0 +1,52 @@ +/* +Copyright 2020 Swiftrax + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEB0E +#define DEVICE_VER 0x0001 +#define MANUFACTURER Swiftrax +#define PRODUCT Pandamic + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 10 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { D1, D2, B5, B7, D3, D5, D6, D4, D7, B4 } +#define MATRIX_COL_PINS { B6, C6, C7, F7, F6, F5, F4, F1, F0, D0 } + +#define ENCODERS_PAD_A { E6 } +#define ENCODERS_PAD_B { B0 } + + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/*EEPROM for via*/ +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/handwired/swiftrax/pandamic/info.json b/keyboards/handwired/swiftrax/pandamic/info.json new file mode 100644 index 0000000000..4446a041dd --- /dev/null +++ b/keyboards/handwired/swiftrax/pandamic/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Pandamic", + "url": "https://github.com/swiftrax", + "maintainer": "swiftrax", + "width": 20.75, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4.25, "y":0}, {"x":5.25, "y":0}, {"x":6.25, "y":0}, {"x":7.25, "y":0}, {"x":8.25, "y":0}, {"x":9.25, "y":0}, {"x":10.25, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":18.25, "y":0}, {"x":19.75, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1, "h":2}, {"x":4.25, "y":1, "w":1.5}, {"x":5.75, "y":1}, {"x":6.75, "y":1}, {"x":7.75, "y":1}, {"x":8.75, "y":1}, {"x":9.75, "y":1}, {"x":10.75, "y":1}, {"x":11.75, "y":1}, {"x":12.75, "y":1}, {"x":13.75, "y":1}, {"x":14.75, "y":1}, {"x":15.75, "y":1}, {"x":16.75, "y":1}, {"x":17.75, "y":1, "w":1.5}, {"x":19.75, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":4.25, "y":2, "w":1.75}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2, "w":2.25}, {"x":19.75, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3, "h":2}, {"x":4.25, "y":3, "w":1.25}, {"x":5.5, "y":3}, {"x":6.5, "y":3}, {"x":7.5, "y":3}, {"x":8.5, "y":3}, {"x":9.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3}, {"x":16.5, "y":3, "w":1.75}, {"x":18.5, "y":3.25}, {"x":19.75, "y":3}, {"x":0, "y":4, "w":2}, {"x":2, "y":4}, {"x":4.25, "y":4, "w":1.25}, {"x":5.5, "y":4, "w":1.25}, {"x":6.75, "y":4, "w":1.25}, {"x":8, "y":4, "w":6.25}, {"x":14.25, "y":4}, {"x":15.25, "y":4}, {"x":16.25, "y":4}, {"x":17.5, "y":4.25}, {"x":18.5, "y":4.25}, {"x":19.5, "y":4.25}] + } + } +} diff --git a/keyboards/handwired/swiftrax/pandamic/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/pandamic/keymaps/default/keymap.c new file mode 100644 index 0000000000..11e770921e --- /dev/null +++ b/keyboards/handwired/swiftrax/pandamic/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2020 swiftrax + * + * 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 QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum _layer { + _MA, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = LAYOUT( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_DEL, KC_MUTE, + KC_P7, KC_P8, KC_P9, KC_PPLS, 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_P4, KC_P5, KC_P6, 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_END, + KC_P1, KC_P2, KC_P3, KC_PENT, KC_LSFT, MO(_FN), 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_HOME, + KC_P0, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), +[_FN] = LAYOUT( + _______, _______, _______, _______, KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/pandamic/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/pandamic/keymaps/via/keymap.c new file mode 100644 index 0000000000..38e455becb --- /dev/null +++ b/keyboards/handwired/swiftrax/pandamic/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2020 swiftrax + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_DEL, KC_MUTE, + KC_P7, KC_P8, KC_P9, KC_PPLS, 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_P4, KC_P5, KC_P6, 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_END, + KC_P1, KC_P2, KC_P3, KC_PENT, KC_LSFT, MO(1), 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_HOME, + KC_P0, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), +[1] = 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_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +[2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/pandamic/keymaps/via/rules.mk b/keyboards/handwired/swiftrax/pandamic/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/handwired/swiftrax/pandamic/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/pandamic/pandamic.c b/keyboards/handwired/swiftrax/pandamic/pandamic.c new file mode 100644 index 0000000000..c718a33734 --- /dev/null +++ b/keyboards/handwired/swiftrax/pandamic/pandamic.c @@ -0,0 +1,16 @@ +/* Copyright 2020 swiftrax + * + * 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 "pandamic.h" diff --git a/keyboards/handwired/swiftrax/pandamic/pandamic.h b/keyboards/handwired/swiftrax/pandamic/pandamic.h new file mode 100644 index 0000000000..9fbb78427e --- /dev/null +++ b/keyboards/handwired/swiftrax/pandamic/pandamic.h @@ -0,0 +1,40 @@ +/* Copyright 2020 swiftrax + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +// readability +#define XXX KC_NO + +#define LAYOUT( \ + K000, K100, K001, K101, K002, K102, K003, K103, K004, K104, K005, K105, K006, K106, K007, K107, K008, K108, K009, K109,\ + K200, K300, K201, K301, K202, K302, K203, K303, K204, K304, K205, K305, K206, K306, K207, K307, K208, K308, K309,\ + K400, K500, K401, K402, K502, K403, K503, K404, K504, K405, K505, K406, K506, K407, K507, K508, K509,\ + K600, K700, K601, K701, K602, K702, K603, K703, K604, K704, K605, K705, K606, K706, K607, K707, K608, K609, K709,\ + K800, K801, K802, K902, K803, K805, K807, K907, K808, K908, K809, K909 \ +) { \ + {K000, K001, K002, K003, K004, K005, K006, K007, K008, K009},\ + {K100, K101, K102, K103, K104, K105, K106, K107, K108, K109},\ + {K200, K201, K202, K203, K204, K205, K206, K207, K208, XXX},\ + {K300, K301, K302, K303, K304, K305, K306, K307, K308, K309},\ + {K400, K401, K402, K403, K404, K405, K406, K407, XXX, XXX},\ + {K500, XXX, K502, K503, K504, K505, K506, K507, K508, K509},\ + {K600, K601, K602, K603, K604, K605, K606, K607, K608, K609},\ + {K700, K701, K702, K703, K704, K705, K706, K707, XXX, K709},\ + {K800, K801, K802, K803, XXX, K805, XXX, K807, K808, K809},\ + { XXX, XXX, K902, XXX, XXX, XXX, XXX, K907, K908, K909} \ +} diff --git a/keyboards/handwired/swiftrax/pandamic/readme.md b/keyboards/handwired/swiftrax/pandamic/readme.md new file mode 100644 index 0000000000..227c2ebe11 --- /dev/null +++ b/keyboards/handwired/swiftrax/pandamic/readme.md @@ -0,0 +1,13 @@ +# Pandamic + +A southpaw 65% mechanical keyboard with rotary encoder support + +* Keyboard Maintainer: [Swiftrax](https://github.com/swiftrax) +* Hardware Supported: Pandamic +* Hardware Availability: [GitHub.com](https://github.com/swiftrax/Pandamic) + +Make example for this keyboard (after setting up your build environment): + + make handwired/swiftrax/pandamic:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/swiftrax/pandamic/rules.mk b/keyboards/handwired/swiftrax/pandamic/rules.mk new file mode 100644 index 0000000000..f83e0a1fd1 --- /dev/null +++ b/keyboards/handwired/swiftrax/pandamic/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes # Rotary Encoder diff --git a/keyboards/handwired/swiftrax/retropad/config.h b/keyboards/handwired/swiftrax/retropad/config.h new file mode 100644 index 0000000000..e604eda419 --- /dev/null +++ b/keyboards/handwired/swiftrax/retropad/config.h @@ -0,0 +1,64 @@ +/* +Copyright 2020 Swiftrax + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEB0C +#define DEVICE_VER 0x0001 +#define MANUFACTURER Swiftrax +#define PRODUCT Retropad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 2 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { C7, C6, B5 } +#define MATRIX_COL_PINS { B4, D2 } + +#define ENCODERS_PAD_A { D0 } +#define ENCODERS_PAD_B { D1 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN B7 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 6 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/*EEPROM for via*/ +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 + +/* bootmagic row col assignment */ +#define BOOTMAGIC_LITE_ROW 1 +#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/swiftrax/retropad/info.json b/keyboards/handwired/swiftrax/retropad/info.json new file mode 100644 index 0000000000..9637c7b3f7 --- /dev/null +++ b/keyboards/handwired/swiftrax/retropad/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Retropad", + "url": "https://github.com/swiftrax", + "maintainer": "swiftrax", + "width": 2, + "height": 3.5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"0,1", "x":0.5, "y":0}, {"label":"1,0", "x":0, "y":1.5}, {"label":"1,1", "x":1, "y":1.5}, {"label":"2,0", "x":0, "y":2.5}, {"label":"2,1", "x":1, "y":2.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/retropad/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/retropad/keymaps/default/keymap.c new file mode 100644 index 0000000000..8b9992e1d7 --- /dev/null +++ b/keyboards/handwired/swiftrax/retropad/keymaps/default/keymap.c @@ -0,0 +1,69 @@ + /* Copyright 2020 swiftrax + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT( + TO(1), //windows + KC_MSTP, KC_MPLY, + KC_MPRV, KC_MNXT), + +[1] = LAYOUT( //macOS + TO(2), + KC_MSTP, KC_MPLY, + KC_MRWD, KC_MFFD), + +[2] = LAYOUT( + TO(0), + KC_HOME, KC_PGUP, + KC_END, KC_PGDN), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if(IS_LAYER_ON(2)){ + if (clockwise) + tap_code(KC_LEFT); + else + tap_code(KC_RGHT); + } + else{ + if(clockwise) + tap_code(KC_VOLU); + else + tap_code(KC_VOLD); + } +} + +void matrix_init_user(void) { + // set top LED to output and off (active low) + setPinOutput(D5); + writePinHigh(D5); + // set middle LED to output and off (active low) + setPinOutput(D4); + writePinHigh(D4); + // set bottom LED to output and off (active low) + setPinOutput(D3); + writePinHigh(D3); +} + +// write to above indicators in a binary fashion based on current layer +layer_state_t layer_state_set_user(layer_state_t state) { + writePin(D5, get_highest_layer(state)); + writePin(D4, !layer_state_cmp(state, 1)); + writePin(D3, !layer_state_cmp(state, 2)); + return state; +} \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/retropad/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/retropad/keymaps/via/keymap.c new file mode 100644 index 0000000000..8b9992e1d7 --- /dev/null +++ b/keyboards/handwired/swiftrax/retropad/keymaps/via/keymap.c @@ -0,0 +1,69 @@ + /* Copyright 2020 swiftrax + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT( + TO(1), //windows + KC_MSTP, KC_MPLY, + KC_MPRV, KC_MNXT), + +[1] = LAYOUT( //macOS + TO(2), + KC_MSTP, KC_MPLY, + KC_MRWD, KC_MFFD), + +[2] = LAYOUT( + TO(0), + KC_HOME, KC_PGUP, + KC_END, KC_PGDN), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if(IS_LAYER_ON(2)){ + if (clockwise) + tap_code(KC_LEFT); + else + tap_code(KC_RGHT); + } + else{ + if(clockwise) + tap_code(KC_VOLU); + else + tap_code(KC_VOLD); + } +} + +void matrix_init_user(void) { + // set top LED to output and off (active low) + setPinOutput(D5); + writePinHigh(D5); + // set middle LED to output and off (active low) + setPinOutput(D4); + writePinHigh(D4); + // set bottom LED to output and off (active low) + setPinOutput(D3); + writePinHigh(D3); +} + +// write to above indicators in a binary fashion based on current layer +layer_state_t layer_state_set_user(layer_state_t state) { + writePin(D5, get_highest_layer(state)); + writePin(D4, !layer_state_cmp(state, 1)); + writePin(D3, !layer_state_cmp(state, 2)); + return state; +} \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/retropad/keymaps/via/rules.mk b/keyboards/handwired/swiftrax/retropad/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/handwired/swiftrax/retropad/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/retropad/readme.md b/keyboards/handwired/swiftrax/retropad/readme.md new file mode 100644 index 0000000000..5dd2e2dff5 --- /dev/null +++ b/keyboards/handwired/swiftrax/retropad/readme.md @@ -0,0 +1,13 @@ +# Retropad + +2x2 macro pad with a rotary encoder + +* Keyboard Maintainer: Swiftrax +* Hardware Supported: Retropad PCB +* Hardware Availability: https://github.com/swiftrax + +Make example for this keyboard (after setting up your build environment): + + make handwired/swiftrax/retropad:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/swiftrax/retropad/retropad.c b/keyboards/handwired/swiftrax/retropad/retropad.c new file mode 100644 index 0000000000..3ffe29528f --- /dev/null +++ b/keyboards/handwired/swiftrax/retropad/retropad.c @@ -0,0 +1,16 @@ +/* Copyright 2020 swiftrax + * + * 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 "retropad.h" \ No newline at end of file diff --git a/keyboards/handwired/swiftrax/retropad/retropad.h b/keyboards/handwired/swiftrax/retropad/retropad.h new file mode 100644 index 0000000000..e7527d5c00 --- /dev/null +++ b/keyboards/handwired/swiftrax/retropad/retropad.h @@ -0,0 +1,31 @@ +/* Copyright 2020 swiftrax + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +// readability +#define XXX KC_NO + +#define LAYOUT( \ + K001, \ + K100, K101, \ + K200, K201 \ +) { \ + { XXX, K001, }, \ + { K100, K101, }, \ + { K200, K201, } \ +} diff --git a/keyboards/handwired/swiftrax/retropad/rules.mk b/keyboards/handwired/swiftrax/retropad/rules.mk new file mode 100644 index 0000000000..8771c701de --- /dev/null +++ b/keyboards/handwired/swiftrax/retropad/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes diff --git a/keyboards/handwired/symmetry60/rules.mk b/keyboards/handwired/symmetry60/rules.mk index 6830cc6905..c7ec2f8d0f 100644 --- a/keyboards/handwired/symmetry60/rules.mk +++ b/keyboards/handwired/symmetry60/rules.mk @@ -30,7 +30,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs LTO_ENABLE = yes # Use link time optimization LAYOUTS = ortho_5x14 diff --git a/keyboards/handwired/t111/chconf.h b/keyboards/handwired/t111/chconf.h new file mode 100644 index 0000000000..f5e471640c --- /dev/null +++ b/keyboards/handwired/t111/chconf.h @@ -0,0 +1,714 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file rt/templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 0 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/handwired/t111/config.h b/keyboards/handwired/t111/config.h new file mode 100644 index 0000000000..e459e7659e --- /dev/null +++ b/keyboards/handwired/t111/config.h @@ -0,0 +1,92 @@ +/* +Copyright 2020 DmNosachev + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6FAA +#define DEVICE_VER 0x0001 +#define MANUFACTURER FUJITSU +#define PRODUCT T111 + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 14 + +#define MATRIX_ROW_PINS { A15, B6, B5, B4, B3, B9, B8, B7 } +/* 0 1 2 3 4 5 6 7*/ +#define MATRIX_COL_PINS { B15, B11, B10, B1, B0, A10, A9, A7, A6, A5, A4, A8, B13, B14 } +/* 0 1 2 3 4 5 6 7 8 9 A B C D*/ + +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/t111/halconf.h b/keyboards/handwired/t111/halconf.h new file mode 100644 index 0000000000..ff5ae7e8a5 --- /dev/null +++ b/keyboards/handwired/t111/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the zero-copy API. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#endif + + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/keyboards/handwired/t111/info.json b/keyboards/handwired/t111/info.json new file mode 100644 index 0000000000..b31fed5163 --- /dev/null +++ b/keyboards/handwired/t111/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "t111", + "url": "", + "maintainer": "DmNosachev", + "width": 21.75, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Break", "x":0, "y":0}, {"label":"PF1", "x":2, "y":0}, {"label":"PF2", "x":3, "y":0}, {"label":"PF3", "x":4, "y":0}, {"label":"PF4", "x":5, "y":0}, {"label":"PF5", "x":6, "y":0}, {"label":"PF6", "x":7, "y":0}, {"label":"PF7", "x":8, "y":0}, {"label":"PF8", "x":9, "y":0}, {"label":"PF9", "x":10, "y":0}, {"label":"PF10", "x":11, "y":0}, {"label":"PF11", "x":12, "y":0}, {"label":"PF12", "x":13, "y":0}, {"label":"PF13", "x":14, "y":0}, {"label":"PF14", "x":15, "y":0}, {"label":"PF15", "x":16, "y":0}, {"label":"PF16", "x":17, "y":0}, {"label":"Esc", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"~", "x":13, "y":1.5}, {"label":"bkspc", "x":14, "y":1.5, "w":1.25}, {"label":"Ins", "x":15.5, "y":1.5}, {"label":"Cls", "x":16.5, "y":1.5}, {"label":"*", "x":17.75, "y":1.5}, {"label":"/", "x":18.75, "y":1.5}, {"label":"+", "x":19.75, "y":1.5}, {"label":"-", "x":20.75, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"El", "x":15.5, "y":2.5}, {"label":"Dup", "x":16.5, "y":2.5}, {"label":"7", "x":17.75, "y":2.5}, {"label":"8", "x":18.75, "y":2.5}, {"label":"9", "x":19.75, "y":2.5}, {"label":"=", "x":20.75, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"|", "x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":2.5, "w":1.5, "h":2}, {"label":"Del", "x":15.5, "y":3.5}, {"label":"Home", "x":16.5, "y":3.5}, {"label":"4", "x":17.75, "y":3.5}, {"label":"5", "x":18.75, "y":3.5}, {"label":"6", "x":19.75, "y":3.5}, {"label":",", "x":20.75, "y":3.5}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"x":12.25, "y":4.5}, {"label":"Shift", "x":13.25, "y":4.5, "w":2}, {"label":"\u0432\u2020\u2018", "x":15.5, "y":4.5}, {"label":"\u0432\u2020\u201c", "x":16.5, "y":4.5}, {"label":"1", "x":17.75, "y":4.5}, {"label":"2", "x":18.75, "y":4.5}, {"label":"3", "x":19.75, "y":4.5}, {"label":"Enter", "x":20.75, "y":4.5, "h":2}, {"label":"Caps", "x":1.75, "y":5.5}, {"label":"Graph", "x":2.75, "y":5.5, "w":1.5}, {"x":4.25, "y":5.5, "w":8}, {"label":"Alt", "x":12.25, "y":5.5, "w":1.5}, {"label":"\u0432\u2020\u0452", "x":15.5, "y":5.5}, {"label":"\u0432\u2020\u2019", "x":16.5, "y":5.5}, {"label":"0", "x":17.75, "y":5.5, "w":2}, {"label":".", "x":19.75, "y":5.5}] + } + } +} diff --git a/keyboards/handwired/t111/keymaps/default/keymap.c b/keyboards/handwired/t111/keymaps/default/keymap.c new file mode 100644 index 0000000000..e76a837db2 --- /dev/null +++ b/keyboards/handwired/t111/keymaps/default/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 DmNosachev + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * ,-------------------------------------------------------------------------------------------------------------------------------------. + * | xxx | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | xxx |PrnSc| ScLk|Pause| | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ~ |backspc| | ins | del | |NumLk| / | * | - | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | enter | PgUp| PgDn| | 7 | 8 | 9 | += | + * |-------------------------------------------------------------------------------- |--------------------------------------| + * | ctrl | A | S | D | F | G | H | J | K | L | ;: | '" | |\ | | home| end | | 4 | 5 | 6 | + | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | shift | Z | X | C | V | B | N | M | , | . | /? | ctrl| shift | up | down| | 1 | 2 | 3 |enter| + * |-------------------------------------------------------------------------------------------------------------------------------| | + * | | gui | alt | Space | alt | | left|right| | 0 | . | | + * `-------------------------------------------------------------------------------------------------------------------------------------' +*/ + [0] = LAYOUT( + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, + 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_GRV, KC_BSPC, KC_INS, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_EQL, + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_HOME, KC_END, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RCTRL, KC_RSFT, KC_UP, KC_DOWN, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_RGHT, KC_P0, KC_PDOT + ) +}; + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} diff --git a/keyboards/handwired/t111/keymaps/oleg/config.h b/keyboards/handwired/t111/keymaps/oleg/config.h new file mode 100644 index 0000000000..22ae5bcf4c --- /dev/null +++ b/keyboards/handwired/t111/keymaps/oleg/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2020 DmNosachev + +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 . +*/ + +#pragma once + +#define UNICODE_SELECTED_MODES UC_WIN, UC_WINC \ No newline at end of file diff --git a/keyboards/handwired/t111/keymaps/oleg/keymap.c b/keyboards/handwired/t111/keymaps/oleg/keymap.c new file mode 100644 index 0000000000..63342af79f --- /dev/null +++ b/keyboards/handwired/t111/keymaps/oleg/keymap.c @@ -0,0 +1,145 @@ +/* Copyright 2020 DmNosachev + * + * 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 QMK_KEYBOARD_H +#include "debug.h" +#include "version.h" + +enum custom_keycodes { + VRSN = SAFE_RANGE, + MC1 +}; + +enum unicode_names { + USCT, + ULSB, + URSB, + USCO, + UAPO, + UCOM, + UDOT, + USLS, + ULCB, + URCB, + UCLN, + UQOT, + ULTH, + UGTH, + UQUE, + UGRV, + UTLD, + UAT, + UHSH, + UDLR, + UPCT, + UCFX, + UAMP, + UAST +}; + +const uint32_t PROGMEM unicode_map[] = { + [USCT] = 0x00A7, // § + [ULSB] = 0x005B, // [ + [URSB] = 0x005D, // ] + [USCO] = 0x003B, // ; + [UAPO] = 0x0027, // ' + [UCOM] = 0x002C, // , + [UDOT] = 0x002E, // . + [USLS] = 0x002F, // slash + [ULCB] = 0x007B, // { + [URCB] = 0x007D, // } + [UCLN] = 0x003A, // : + [UQOT] = 0x0022, // " + [ULTH] = 0x003C, // < + [UGTH] = 0x003E, // > + [UQUE] = 0x003F, // ? + [UGRV] = 0x0060, // ` + [UTLD] = 0x007E, // ~ + [UAT] = 0x0040, // at + [UHSH] = 0x0023, // hash + [UDLR] = 0x0024, // dollar + [UPCT] = 0x0025, // percent + [UCFX] = 0x005E, // ^ + [UAMP] = 0x0026, // & + [UAST] = 0x002A, // asterisk +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * ,-------------------------------------------------------------------------------------------------------------------------------------. + * | gui | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Vol-| Vol+| Mute|Pause| | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ~ |backspc| | PgUp| Home| |NumLk| / | * | - | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | enter | PgDn| End| | 7 | 8 | 9 | += | + * |-------------------------------------------------------------------------------- |--------------------------------------| + * | ctrl | A | S | D | F | G | H | J | K | L | ;: | '" | |\ | | Del |NumLk| | 4 | 5 | 6 | + | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | shift | Z | X | C | V | B | N | M | , | . | /? | [] | shift | up | down| | 1 | 2 | 3 |enter| + * |-------------------------------------------------------------------------------------------------------------------------------| | + * | | caps | alt | Space | Fn | | left|right| | 0 | . | | + * `-------------------------------------------------------------------------------------------------------------------------------------' +*/ + [0] = LAYOUT( + KC_LGUI, 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_VOLD, KC_VOLU, KC_MUTE, KC_PSCR, + 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_GRV, KC_BSPC, KC_PGUP, KC_HOME, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, KC_PGDN, KC_END, KC_P7, KC_P8, KC_P9, KC_EQL, + KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_DEL, KC_NLCK, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MC1, KC_RSFT, KC_UP, KC_DOWN, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_CAPS, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_RGHT, KC_P0, KC_PDOT + ), +/* + * ,-------------------------------------------------------------------------------------------------------------------------------------. + * | VRSN| |Sleep| |Umode| | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | | | @ | # | $ | § | ^ | & | * | | | | | | | | | | |Calc | | | | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | | mb1 | m↑ | mb2 | mb3 | | | |SysRq|ScrLk|Pause| | | | | | | | | | | + * |-------------------------------------------------------------------------------- |--------------------------------------| + * | | m← | m↓ | m→ | mb5 | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------------------------------------------------------------| + * | | | | mb4 | | | | | | | | | | | | | | | | | + * |-------------------------------------------------------------------------------------------------------------------------------| | + * | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------------------------------------------' +*/ + [1] = LAYOUT( + VRSN, KC_SLEP, _______, UC_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, X(UAT), X(UHSH), X(UDLR), X(USCT), X(UCFX), X(UAMP), X(UAST), _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, _______, _______, _______, + _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, _______, _______, _______, KC_SYSREQ, KC_SLCK, KC_PAUS, XP(ULSB, ULCB), XP(URSB, URCB), _______, _______, _______, _______, _______, _______, _______, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN5, _______, _______, _______, _______, _______, XP(USCO, UCLN), XP(UAPO, UQOT), _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_BTN4, _______, _______, _______, _______, XP(UCOM, ULTH), XP(UDOT, UGTH), XP(USLS, UQUE), KC_APP, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + + case MC1: + if (record->event.pressed) { + send_unicode_string("[]"); + } + return false; + break; + } + return true; +} diff --git a/keyboards/handwired/t111/keymaps/oleg/rules.mk b/keyboards/handwired/t111/keymaps/oleg/rules.mk new file mode 100644 index 0000000000..0517619ed1 --- /dev/null +++ b/keyboards/handwired/t111/keymaps/oleg/rules.mk @@ -0,0 +1 @@ +UNICODEMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/t111/mcuconf.h b/keyboards/handwired/t111/mcuconf.h new file mode 100644 index 0000000000..60d9931c35 --- /dev/null +++ b/keyboards/handwired/t111/mcuconf.h @@ -0,0 +1,209 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +#define STM32F103_MCUCONF + +/* + * STM32F103 drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED FALSE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_RTCSEL STM32_RTCSEL_HSEDIV +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC1_IRQ_PRIORITY 6 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM8 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 TRUE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * RTC driver system settings. + */ +#define STM32_RTC_IRQ_PRIORITY 15 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +#endif /* _MCUCONF_H_ */ \ No newline at end of file diff --git a/keyboards/handwired/t111/readme.md b/keyboards/handwired/t111/readme.md new file mode 100644 index 0000000000..31bbc2a728 --- /dev/null +++ b/keyboards/handwired/t111/readme.md @@ -0,0 +1,45 @@ +# QMK-based firmware for Fujitsu N860-2500-T111 keyboard + +![Fujitsu T111](https://i.imgur.com/aGtg7FMl.jpg) + +Fujitsu N860-2500-T111 keyboard conversion project: direct connection of Black Pill to the matrix. + +* Keyboard Maintainer: [DmNosachev](https://github.com/DmNosachev) +* Hardware Supported: [Fujitsu N860-2500-T111](https://deskthority.net/viewtopic.php?t=17087), Black Pill STM32F103C8T6 MCU board. Alternatively you can use any MCU which is supported by QMK and has 22 or more IO pins: Arduino Micro, Teensy 2.0, Teensy 2.0++, Blue Pill, etc. +* Thanks to Deskthority user *OldIsNew* for the matrix decoding. + +Make example for this keyboard (after setting up your build environment): + + make handwired/t111:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +# Modding + +## Matrix + +Fujitsu N860-2500-T111 has 14x8 matrix. It's ghost-free thanks to the diodes. + +Rows (0-7) and columns (0-D): +![T111 rows and columns](https://i.imgur.com/37MxQG8h.jpg) + +## Black Pill +Suggested mount position for the Black Pill (view from the top side of the PCB): + +``` + C1 C2 C3 C4 C7 C8 C9 CA R5 R6 +,--------------------------------------------------------------------, +|B11 B10 B1 B0 A7 A6 A5 A4 A3 A2 A1 A0 RST C13 B9 B8 GND |---, +| |USB| +|B12 B13 B14 B15 A8 A9 A10 A11 A12 A15 B3 B4 B5 B6 B7 3V3 GND |---' +'--------------------------------------------------------------------' + CC CD C0 CB C6 C5 R0 R4 R3 R2 R1 R7 +``` + +![Black Pill](https://i.imgur.com/lJfdAQTh.jpg) + +1. Desolder all ICs, capacitors and resistors. +1. Solder 4-pin SWD header to Black Pill. +2. Burn [STM32duino bootloader](https://github.com/rogerclarkmelbourne/STM32duino-bootloader/blob/master/bootloader_only_binaries/generic_boot20_pb12.bin) to Black Pill. +3. Compile and flash the firmware: `make handwired/t111:default:flash` +4. Connect rows and columns to the corresponding pins of the Black Pill. diff --git a/keyboards/handwired/t111/rules.mk b/keyboards/handwired/t111/rules.mk new file mode 100644 index 0000000000..e6776a643c --- /dev/null +++ b/keyboards/handwired/t111/rules.mk @@ -0,0 +1,29 @@ +MCU = STM32F103 + +# GENERIC STM32F103C8T6 board - stm32duino bootloader +MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader +BOARD = STM32_F103_STM32DUINO +STM32_BOOTLOADER_ADDRESS = 0x80000000 + +DFU_ARGS = -d 1EAF:0003 -a2 -R +DFU_SUFFIX_ARGS = -v 1EAF -p 0003 + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/handwired/t111/t111.c b/keyboards/handwired/t111/t111.c new file mode 100644 index 0000000000..f61e34240e --- /dev/null +++ b/keyboards/handwired/t111/t111.c @@ -0,0 +1,17 @@ +/* Copyright 2020 DmNosachev + * + * 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 "t111.h" diff --git a/keyboards/handwired/t111/t111.h b/keyboards/handwired/t111/t111.h new file mode 100644 index 0000000000..35651f635d --- /dev/null +++ b/keyboards/handwired/t111/t111.h @@ -0,0 +1,57 @@ +/* Copyright 2020 DmNosachev + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +/* +,-------------------------------------------------------------------------------------------------------------------------------------. +|break| | PF1 | PF2 | PF3 | PF4 | PF5 | PF6 | PF7 | PF8 | PF9 | PF10| PF11| PF12| PF13| PF14| PF15| PF16| | +|-------------------------------------------------------------------------------------------------------------------------------------| +| esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ~ |backspc| | ins | cls | | * | / | + | - | +|-------------------------------------------------------------------------------------------------------------------------------------| +| tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | enter | el | dup | | 7 | 8 | 9 | = | +|-------------------------------------------------------------------------------- |--------------------------------------| +| ctrl | A | S | D | F | G | H | J | K | L | ;: | '" | |\ | | del | home| | 4 | 5 | 6 | , | +|-------------------------------------------------------------------------------------------------------------------------------------| +| shift | Z | X | C | V | B | N | M | , | . | /? |blank| shift | up | down| | 1 | 2 | 3 |enter| +|-------------------------------------------------------------------------------------------------------------------------------| | +| | caps| graph | Space | alt | | left|right| | 0 | . | | +`-------------------------------------------------------------------------------------------------------------------------------------' +*/ + +#define LAYOUT( \ + K30, K40, K11, K21, K31, K41, K51, K61, K71, K01, K12, K22, K32, K42, K52, K62, K72, \ + K20, K13, K23, K33, K43, K53, K63, K73, K03, K14, K24, K34, K44, K54, K58, K64, K74, K15, K06, K76, K66, \ + K10, K17, K27, K37, K47, K57, K67, K77, K07, K18, K28, K38, K48, K68, K78, K1B, K00, K70, K60, \ + K0A, K19, K29, K39, K49, K59, K69, K79, K09, K1A, K2A, K3A, K4A, K5A, K6A, K7A, K2B, K3B, K4B, K5B, \ + K0D, K1C, K2C, K3C, K4C, K5C, K6C, K7C, K0C, K1D, K2D, K3D, K04, K6D, K7D, K25, K35, K45, K55, \ + K08, K0B, K50, K05, K6B, K7B, K65, K75 \ +) \ +{ \ +/* 0 */ { K00, K01, XXX, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ +/* 1 */ { K10, K11, K12, K13, K14, K15, XXX, K17, K18, K19, K1A, K1B, K1C, K1D }, \ +/* 2 */ { K20, K21, K22, K23, K24, K25, XXX, K27, K28, K29, K2A, K2B, K2C, K2D }, \ +/* 3 */ { K30, K31, K32, K33, K34, K35, XXX, K37, K38, K39, K3A, K3B, K3C, K3D }, \ +/* 4 */ { K40, K41, K42, K43, K44, K45, XXX, K47, K48, K49, K4A, K4B, K4C, XXX }, \ +/* 5 */ { K50, K51, K52, K53, K54, K55, XXX, K57, K58, K59, K5A, K5B, K5C, XXX }, \ +/* 6 */ { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C, K6D }, \ +/* 7 */ { K70, K71, K72, K73, K74, K75, K76, K77, K78, K79, K7A, K7B, K7C, K7D } \ +} +/* 0 1 2 3 4 5 6 7 8 9 A B C D */ diff --git a/keyboards/handwired/tennie/config.h b/keyboards/handwired/tennie/config.h index d26cb4c616..ca92c8e8c8 100644 --- a/keyboards/handwired/tennie/config.h +++ b/keyboards/handwired/tennie/config.h @@ -207,34 +207,6 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - /* Bootmagic Lite key configuration */ //#define BOOTMAGIC_LITE_ROW 0 //#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/tennie/rules.mk b/keyboards/handwired/tennie/rules.mk index b41b736a71..a404294f13 100644 --- a/keyboards/handwired/tennie/rules.mk +++ b/keyboards/handwired/tennie/rules.mk @@ -30,4 +30,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/handwired/twadlee/tp69/config.h b/keyboards/handwired/twadlee/tp69/config.h index 4da7d25603..d6f28bdc1e 100644 --- a/keyboards/handwired/twadlee/tp69/config.h +++ b/keyboards/handwired/twadlee/tp69/config.h @@ -220,34 +220,6 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/twadlee/tp69/rules.mk b/keyboards/handwired/twadlee/tp69/rules.mk index 967060802b..ec1da36328 100644 --- a/keyboards/handwired/twadlee/tp69/rules.mk +++ b/keyboards/handwired/twadlee/tp69/rules.mk @@ -19,7 +19,6 @@ MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs PS2_MOUSE_ENABLE = no USE_CHIBIOS_CONTRIB = yes diff --git a/keyboards/handwired/videowriter/rules.mk b/keyboards/handwired/videowriter/rules.mk index 7b326cc319..99931790ce 100644 --- a/keyboards/handwired/videowriter/rules.mk +++ b/keyboards/handwired/videowriter/rules.mk @@ -29,4 +29,3 @@ MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/handwired/wulkan/rules.mk b/keyboards/handwired/wulkan/rules.mk index f432c7d673..25bb402698 100644 --- a/keyboards/handwired/wulkan/rules.mk +++ b/keyboards/handwired/wulkan/rules.mk @@ -18,6 +18,5 @@ 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 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) NO_SUSPEND_POWER_DOWN = yes UNICODEMAP_ENABLE = no diff --git a/keyboards/handwired/z150/rules.mk b/keyboards/handwired/z150/rules.mk index 08bd7908eb..fd1d382033 100644 --- a/keyboards/handwired/z150/rules.mk +++ b/keyboards/handwired/z150/rules.mk @@ -1,7 +1,6 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader -OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = STM32_F103_STM32DUINO STM32_BOOTLOADER_ADDRESS = 0x80000000 diff --git a/keyboards/handwired/zergo/info.json b/keyboards/handwired/zergo/info.json index 0bbb867ad8..f5b1ff38c8 100644 --- a/keyboards/handwired/zergo/info.json +++ b/keyboards/handwired/zergo/info.json @@ -1,13 +1,13 @@ { "keyboard_name": "zergo", - "url": "", + "url": "https://github.com/qmk/qmk_firmware/tree/master/keyboards/handwired/zergo", "maintainer": "greenjack", "width": 15, "height": 6.25, "layouts": { "LAYOUT": { "layout": [ - {"label":"Esc", "x":0, "y":0}, + {"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, @@ -20,28 +20,28 @@ {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, - {"label":"Home", "x":0, "y":1.25}, - {"label":"~", "x":1, "y":1.25}, - {"label":"!", "x":2, "y":1.25}, - {"label":"@", "x":3, "y":1.25}, - {"label":"#", "x":4, "y":1.25}, - {"label":"$", "x":5, "y":1.25}, - {"label":"%", "x":6, "y":1.25}, - {"label":"^", "x":7, "y":1.25}, - {"label":"&", "x":8, "y":1.25}, - {"label":"*", "x":9, "y":1.25}, - {"label":"(", "x":10, "y":1.25}, - {"label":")", "x":11, "y":1.25}, - {"label":"_", "x":12, "y":1.25}, - {"label":"+", "x":13, "y":1.25}, - {"label":"PgUp", "x":14, "y":1.25}, + {"label":"Del", "x":0, "y":1.25}, + {"label":"`", "x":1, "y":1.25}, + {"label":"1", "x":2, "y":1.25}, + {"label":"2", "x":3, "y":1.25}, + {"label":"3", "x":4, "y":1.25}, + {"label":"4", "x":5, "y":1.25}, + {"label":"5", "x":6, "y":1.25}, + {"label":"6", "x":7, "y":1.25}, + {"label":"7", "x":8, "y":1.25}, + {"label":"8", "x":9, "y":1.25}, + {"label":"9", "x":10, "y":1.25}, + {"label":"0", "x":11, "y":1.25}, + {"label":"-", "x":12, "y":1.25}, + {"label":"=", "x":13, "y":1.25}, + {"label":"Backspace", "x":14, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, - {"label":"}", "x":6.5, "y":2.25}, + {"label":"modifier", "x":6.5, "y":2.25}, {"label":"Y", "x":7.5, "y":2.25}, {"label":"U", "x":8.5, "y":2.25}, {"label":"I", "x":9.5, "y":2.25}, @@ -49,7 +49,7 @@ {"label":"P", "x":11.5, "y":2.25}, {"label":"{", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, - {"label":"Ctrl", "x":0, "y":3.25, "w":1.25}, + {"label":"modifier", "x":0, "y":3.25, "w":1.25}, {"label":"A", "x":1.25, "y":3.25}, {"label":"S", "x":2.25, "y":3.25}, {"label":"D", "x":3.25, "y":3.25}, @@ -61,32 +61,32 @@ {"label":"L", "x":10.75, "y":3.25}, {"label":":", "x":11.75, "y":3.25}, {"label":"\"", "x":12.75, "y":3.25}, - {"label":"Ctrl", "x":13.75, "y":3.25, "w":1.25}, - {"label":"End", "x":0, "y":4.25}, - {"label":"\u2191", "x":1, "y":4.25}, - {"label":"Z", "x":2, "y":4.25}, - {"label":"X", "x":3, "y":4.25}, - {"label":"C", "x":4, "y":4.25}, - {"label":"V", "x":5, "y":4.25}, - {"label":"Enter", "x":6, "y":4.25, "w":2}, - {"label":"B", "x":8, "y":4.25}, - {"label":"N", "x":9, "y":4.25}, - {"label":"M", "x":10, "y":4.25}, - {"label":"<", "x":11, "y":4.25}, - {"label":">", "x":12, "y":4.25}, - {"label":"?", "x":13, "y":4.25}, - {"label":"PgDn", "x":14, "y":4.25}, - {"label":"\u2190", "x":0, "y":5.25}, - {"label":"\u2193", "x":1, "y":5.25}, - {"label":"\u2192", "x":2, "y":5.25}, - {"label":"Alt", "x":3, "y":5.25, "w":1.25}, + {"label":"modifier", "x":13.75, "y":3.25, "w":1.25}, + {"label":"LShift", "x":0, "y":4.25}, + {"label":"Z", "x":1, "y":4.25}, + {"label":"X", "x":2, "y":4.25}, + {"label":"C", "x":3, "y":4.25}, + {"label":"V", "x":4, "y":4.25}, + {"label":"B", "x":5, "y":4.25}, + {"label":"Backspace", "x":6, "y":4.25, "w":2}, + {"label":"N", "x":8, "y":4.25}, + {"label":"M", "x":9, "y":4.25}, + {"label":"<", "x":10, "y":4.25}, + {"label":">", "x":11, "y":4.25}, + {"label":"?", "x":12, "y":4.25}, + {"label":"}", "x":13, "y":4.25}, + {"label":"Rshift", "x":14, "y":4.25}, + {"label":"LControl", "x":0, "y":5.25}, + {"label":"free-1", "x":1, "y":5.25}, + {"label":"free-2", "x":2, "y":5.25}, + {"label":"LAlt", "x":3, "y":5.25, "w":1.25}, {"label":"Space", "x":4.25, "y":5.25, "w":2.25}, - {"label":"Bsp", "x":6.5, "y":5.25}, + {"label":"Enter", "x":6.5, "y":5.25}, {"label":"Space", "x":7.5, "y":5.25, "w":2.75}, - {"label":"Alt", "x":10.25, "y":5.25, "w":1.25}, + {"label":"RAlt", "x":10.25, "y":5.25, "w":1.25}, {"label":"Win", "x":11.5, "y":5.25, "w":1.25}, {"label":"Menu", "x":12.75, "y":5.25, "w":1.25}, - {"label":"Fn", "x":14, "y":5.25} + {"label":"RControl", "x":14, "y":5.25} ] } } diff --git a/keyboards/handwired/zergo/keymaps/default/keymap.c b/keyboards/handwired/zergo/keymaps/default/keymap.c index d0f7b750ec..a9dcc82aea 100644 --- a/keyboards/handwired/zergo/keymaps/default/keymap.c +++ b/keyboards/handwired/zergo/keymaps/default/keymap.c @@ -20,17 +20,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - KC_HOME, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_PGUP, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_5, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_BSLS, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LCTL, - MT(MOD_LSFT, KC_END), KC_UP, KC_Z, KC_X, KC_C, KC_V, KC_ENT, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_LSFT, KC_PGDN), - KC_LEFT, KC_DOWN, KC_RGHT, KC_LALT, KC_SPC, KC_BSPC, KC_SPC, KC_RALT, KC_LGUI, KC_RGUI, LT(1, KC_NO)), + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, 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_RCTL, + MT(MOD_LSFT, KC_HOME), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RBRC, MT(MOD_RSFT, KC_PGUP), + MT(MOD_LCTL, KC_END), KC_DOWN, KC_RGHT, KC_LALT, KC_SPC, KC_ENT, KC_SPC, KC_RALT, KC_LGUI, KC_MENU, MT(MOD_RCTL, KC_PGDN)), LAYOUT( - TG(1), 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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, KC_UP, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), diff --git a/keyboards/handwired/zergo/zergo.h b/keyboards/handwired/zergo/zergo.h index b4daeff765..5b7695868f 100644 --- a/keyboards/handwired/zergo/zergo.h +++ b/keyboards/handwired/zergo/zergo.h @@ -19,10 +19,10 @@ #include "quantum.h" #define LAYOUT( \ - K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K206, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K306, K207, K208, K209, K210, K211, K212, K213, \ + K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311, K312, K313, \ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, \ K500, K501, K502, K503, K505, K506, K507, K509, K511, K512, K513 \ ) { \ diff --git a/keyboards/hecomi/alpha/config.h b/keyboards/hecomi/alpha/config.h index 3600eb717d..741fdd5cad 100644 --- a/keyboards/hecomi/alpha/config.h +++ b/keyboards/hecomi/alpha/config.h @@ -207,34 +207,6 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/hecomi/alpha/rules.mk b/keyboards/hecomi/alpha/rules.mk index 0f0b632b1d..12b5a001b3 100644 --- a/keyboards/hecomi/alpha/rules.mk +++ b/keyboards/hecomi/alpha/rules.mk @@ -30,5 +30,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs SPLIT_KEYBOARD = yes diff --git a/keyboards/hecomi/rules.mk b/keyboards/hecomi/rules.mk index ad2178e9eb..c23c51a599 100644 --- a/keyboards/hecomi/rules.mk +++ b/keyboards/hecomi/rules.mk @@ -30,7 +30,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs SPLIT_KEYBOARD = yes DEFAULT_FOLDER = hecomi/alpha diff --git a/keyboards/helix/local_drivers/ssd1306.c b/keyboards/helix/local_drivers/ssd1306.c index dd3290ba0c..c6fc4b7854 100644 --- a/keyboards/helix/local_drivers/ssd1306.c +++ b/keyboards/helix/local_drivers/ssd1306.c @@ -10,15 +10,14 @@ #else #include #endif -#ifdef ADAFRUIT_BLE_ENABLE -#include "adafruit_ble.h" -#endif #ifdef PROTOCOL_LUFA #include "lufa.h" #endif #include "sendchar.h" #include "timer.h" +struct CharacterMatrix display; + // 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 diff --git a/keyboards/helix/local_drivers/ssd1306.h b/keyboards/helix/local_drivers/ssd1306.h index f9f91c6fed..bcb30f8859 100644 --- a/keyboards/helix/local_drivers/ssd1306.h +++ b/keyboards/helix/local_drivers/ssd1306.h @@ -66,7 +66,7 @@ struct CharacterMatrix { bool dirty; }; -struct CharacterMatrix display; +extern struct CharacterMatrix display; bool iota_gfx_init(bool rotate); void iota_gfx_task(void); diff --git a/keyboards/helix/pico/keymaps/biacco/rules.mk b/keyboards/helix/pico/keymaps/biacco/rules.mk index 0c60c40f64..37e49977c5 100644 --- a/keyboards/helix/pico/keymaps/biacco/rules.mk +++ b/keyboards/helix/pico/keymaps/biacco/rules.mk @@ -7,7 +7,7 @@ # EXTRAKEY_ENABLE = yes # Audio control and System control(+450) AUDIO_ENABLE = yes # Audio output on port B5 -LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = no # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 6 Variables diff --git a/keyboards/helix/pico/keymaps/default/rules.mk b/keyboards/helix/pico/keymaps/default/rules.mk index c084457321..8f198e3803 100644 --- a/keyboards/helix/pico/keymaps/default/rules.mk +++ b/keyboards/helix/pico/keymaps/default/rules.mk @@ -7,7 +7,7 @@ # EXTRAKEY_ENABLE = yes # Audio control and System control AUDIO_ENABLE = yes # Audio output on port B5 -LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = no # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 6 Variables diff --git a/keyboards/helix/pico/keymaps/mtei/rules.mk b/keyboards/helix/pico/keymaps/mtei/rules.mk index 764b073007..165233f5fe 100644 --- a/keyboards/helix/pico/keymaps/mtei/rules.mk +++ b/keyboards/helix/pico/keymaps/mtei/rules.mk @@ -7,7 +7,7 @@ # EXTRAKEY_ENABLE = yes # Audio control and System control(+450) AUDIO_ENABLE = yes # Audio output on port B5 -LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = no # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 6 Variables diff --git a/keyboards/helix/pico/local_features.mk b/keyboards/helix/pico/local_features.mk index 0277a3d227..a984446868 100644 --- a/keyboards/helix/pico/local_features.mk +++ b/keyboards/helix/pico/local_features.mk @@ -106,10 +106,10 @@ endif ifeq ($(strip $(AUDIO_ENABLE)),yes) ifeq ($(strip $(RGBLIGHT_ENABLE)),yes) - LINK_TIME_OPTIMIZATION_ENABLE = yes + LTO_ENABLE = yes endif ifeq ($(strip $(OLED_ENABLE)),yes) - LINK_TIME_OPTIMIZATION_ENABLE = yes + LTO_ENABLE = yes endif endif @@ -120,7 +120,7 @@ ifneq ($(strip $(SHOW_HELIX_OPTIONS)),) $(info -- OLED_DRIVER_ENABLE = $(OLED_DRIVER_ENABLE)) $(info -- CONSOLE_ENABLE = $(CONSOLE_ENABLE)) $(info -- OPT_DEFS = $(OPT_DEFS)) - $(info -- LINK_TIME_OPTIMIZATION_ENABLE = $(LINK_TIME_OPTIMIZATION_ENABLE)) + $(info -- LTO_ENABLE = $(LTO_ENABLE)) $(info ) endif endif diff --git a/keyboards/helix/rev2/keymaps/default/rules.mk b/keyboards/helix/rev2/keymaps/default/rules.mk index 6a42fcf73f..9801648dec 100644 --- a/keyboards/helix/rev2/keymaps/default/rules.mk +++ b/keyboards/helix/rev2/keymaps/default/rules.mk @@ -5,7 +5,7 @@ # See TOP/keyboards/helix/rules.mk for a list of options that can be set. # See TOP/docs/config_options.md for more information. # -LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = no # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 7 Variables diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk b/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk index e30690029b..18bef6bf71 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk +++ b/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk @@ -5,7 +5,7 @@ # See TOP/keyboards/helix/rules.mk for a list of options that can be set. # See TOP/docs/config_options.md for more information. # -LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = no # if firmware size over limit, try this option TAP_DANCE_ENABLE = yes # Helix Spacific Build Options diff --git a/keyboards/helix/rev2/keymaps/five_rows/rules.mk b/keyboards/helix/rev2/keymaps/five_rows/rules.mk index fb564b6e04..8c4239deb9 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows/rules.mk @@ -11,7 +11,7 @@ # yes, no +1500 # yes, yes +3200 # no, yes +400 -LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = no # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 7 Variables diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk b/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk index 6c2057cfd6..d44382f86a 100644 --- a/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk @@ -5,7 +5,7 @@ # See TOP/keyboards/helix/rules.mk for a list of options that can be set. # See TOP/docs/config_options.md for more information. # -LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = no # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 7 Variables diff --git a/keyboards/helix/rev2/keymaps/froggy/rules.mk b/keyboards/helix/rev2/keymaps/froggy/rules.mk index bea059ca16..5a0fd9a2b1 100644 --- a/keyboards/helix/rev2/keymaps/froggy/rules.mk +++ b/keyboards/helix/rev2/keymaps/froggy/rules.mk @@ -5,7 +5,7 @@ # See TOP/keyboards/helix/rules.mk for a list of options that can be set. # See TOP/docs/config_options.md for more information. # -LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = no # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 7 Variables diff --git a/keyboards/helix/rev2/keymaps/froggy_106/rules.mk b/keyboards/helix/rev2/keymaps/froggy_106/rules.mk index bea059ca16..5a0fd9a2b1 100644 --- a/keyboards/helix/rev2/keymaps/froggy_106/rules.mk +++ b/keyboards/helix/rev2/keymaps/froggy_106/rules.mk @@ -5,7 +5,7 @@ # See TOP/keyboards/helix/rules.mk for a list of options that can be set. # See TOP/docs/config_options.md for more information. # -LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = no # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 7 Variables diff --git a/keyboards/helix/rev2/keymaps/led_test/rules.mk b/keyboards/helix/rev2/keymaps/led_test/rules.mk index fb0b5a5476..013ef1482d 100644 --- a/keyboards/helix/rev2/keymaps/led_test/rules.mk +++ b/keyboards/helix/rev2/keymaps/led_test/rules.mk @@ -5,7 +5,7 @@ # See TOP/keyboards/helix/rules.mk for a list of options that can be set. # See TOP/docs/config_options.md for more information. # -LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = no # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 7 Variables diff --git a/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk b/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk index 13d8099317..83dcc9b3b8 100644 --- a/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk +++ b/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk @@ -5,7 +5,7 @@ # See TOP/keyboards/helix/rules.mk for a list of options that can be set. # See TOP/docs/config_options.md for more information. # -LINK_TIME_OPTIMIZATION_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = no # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 7 Variables diff --git a/keyboards/helix/rev2/local_features.mk b/keyboards/helix/rev2/local_features.mk index 4b120936de..3f8a7216f9 100644 --- a/keyboards/helix/rev2/local_features.mk +++ b/keyboards/helix/rev2/local_features.mk @@ -119,7 +119,7 @@ ifneq ($(strip $(SHOW_HELIX_OPTIONS)),) $(info -- OLED_DRIVER_ENABLE = $(OLED_DRIVER_ENABLE)) $(info -- CONSOLE_ENABLE = $(CONSOLE_ENABLE)) $(info -- OPT_DEFS = $(OPT_DEFS)) - $(info -- LINK_TIME_OPTIMIZATION_ENABLE = $(LINK_TIME_OPTIMIZATION_ENABLE)) + $(info -- LTO_ENABLE = $(LTO_ENABLE)) $(info ) endif endif diff --git a/keyboards/hineybush/h10/h10.c b/keyboards/hineybush/h10/h10.c index fbaca7f38e..8c149c1451 100644 --- a/keyboards/hineybush/h10/h10.c +++ b/keyboards/hineybush/h10/h10.c @@ -20,10 +20,15 @@ // You can leave any or all of these undefined. // These are only required if you want to perform custom actions. -/* -bool led_update_kb(led_t led_state) { - // placeholder for LED indicator added to next revision - - return led_update_user(led_state); +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(F7); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(F7, !led_state.num_lock); + } + return true; } -*/ diff --git a/keyboards/hineybush/h75_singa/config.h b/keyboards/hineybush/h75_singa/config.h index 82222e29c3..187fc791f0 100644 --- a/keyboards/hineybush/h75_singa/config.h +++ b/keyboards/hineybush/h75_singa/config.h @@ -212,34 +212,6 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/hineybush/h75_singa/rules.mk b/keyboards/hineybush/h75_singa/rules.mk index 92ad960cb9..d676e0f708 100644 --- a/keyboards/hineybush/h75_singa/rules.mk +++ b/keyboards/hineybush/h75_singa/rules.mk @@ -29,4 +29,3 @@ MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/hineybush/h88/h88.c b/keyboards/hineybush/h88/h88.c index 1f702e9e9d..adfb64bef1 100644 --- a/keyboards/hineybush/h88/h88.c +++ b/keyboards/hineybush/h88/h88.c @@ -18,7 +18,8 @@ void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up - + setPinOutput(D5); + setPinOutput(E6); matrix_init_user(); } @@ -42,26 +43,19 @@ void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } -void led_init_ports(void) { - setPinOutput(D5); - setPinOutput(E6); +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(D5, !led_state.caps_lock); + writePin(E6, !led_state.scroll_lock); + } + return true; } -void led_set_user(uint8_t usb_led) { - - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - setPinOutput(D5); - writePinLow(D5); - } else { - setPinInput(D5); - } - - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - setPinOutput(E6); - writePinLow(E6); - } else { - setPinInput(E6); - } +void eeconfig_init_kb(void) { // EEPROM is getting reset! + rgblight_enable(); // Enable RGB by default + rgblight_sethsv(0, 255, 128); // Set default HSV - red hue, full saturation, medium brightness + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default + eeconfig_update_kb(0); + eeconfig_init_user(); } - diff --git a/keyboards/hineybush/h88/rules.mk b/keyboards/hineybush/h88/rules.mk index f395375460..3d7de2731d 100644 --- a/keyboards/hineybush/h88/rules.mk +++ b/keyboards/hineybush/h88/rules.mk @@ -30,4 +30,4 @@ 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 -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/hineybush/hbcp/rules.mk b/keyboards/hineybush/hbcp/rules.mk index 1e973bc858..e186b39cfa 100644 --- a/keyboards/hineybush/hbcp/rules.mk +++ b/keyboards/hineybush/hbcp/rules.mk @@ -30,6 +30,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs CUSTOM_MATRIX = lite SRC += matrix.c diff --git a/keyboards/hineybush/hineyg80/rules.mk b/keyboards/hineybush/hineyg80/rules.mk index 1aa3379312..77d0f1ec16 100644 --- a/keyboards/hineybush/hineyg80/rules.mk +++ b/keyboards/hineybush/hineyg80/rules.mk @@ -30,4 +30,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/hineybush/physix/config.h b/keyboards/hineybush/physix/config.h index ccdb18fd21..d705efefa4 100644 --- a/keyboards/hineybush/physix/config.h +++ b/keyboards/hineybush/physix/config.h @@ -218,34 +218,6 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/hineybush/physix/rules.mk b/keyboards/hineybush/physix/rules.mk index 010cb024d0..20b1e9e5d1 100644 --- a/keyboards/hineybush/physix/rules.mk +++ b/keyboards/hineybush/physix/rules.mk @@ -29,4 +29,3 @@ MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/hineybush/sm68/config.h b/keyboards/hineybush/sm68/config.h index f41f5bc2d5..cdb22aee7b 100644 --- a/keyboards/hineybush/sm68/config.h +++ b/keyboards/hineybush/sm68/config.h @@ -208,34 +208,6 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/hineybush/sm68/rules.mk b/keyboards/hineybush/sm68/rules.mk index 28e24020af..a7e841a7c1 100644 --- a/keyboards/hineybush/sm68/rules.mk +++ b/keyboards/hineybush/sm68/rules.mk @@ -29,4 +29,3 @@ MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/hotdox/keymaps/ninjonas/rules.mk b/keyboards/hotdox/keymaps/ninjonas/rules.mk index 3ec5fb0628..4da205a168 100644 --- a/keyboards/hotdox/keymaps/ninjonas/rules.mk +++ b/keyboards/hotdox/keymaps/ninjonas/rules.mk @@ -1 +1 @@ -LINK_TIME_OPTIMIZATION_ENABLE = yes \ No newline at end of file +LTO_ENABLE = yes diff --git a/keyboards/hub16/keymaps/ahk_companion/ahk_companion.ahk b/keyboards/hub16/keymaps/ahk_companion/ahk_companion.ahk new file mode 100644 index 0000000000..becab49e5c --- /dev/null +++ b/keyboards/hub16/keymaps/ahk_companion/ahk_companion.ahk @@ -0,0 +1,104 @@ +#Persistent +#SingleInstance force + +;================================================================= +; Macro Pad Shortcuts ; +;================================================================= + +;================================================================= +; Layer 0 +;;================================================================= +;Row 1 + +F13::Send a +F14::Send b +F15::Send c +F16::Send d + +;Row 2 + +F17::Send e +F18::Send f +F19::Send g +F20::Send h + +;Row 3 + +F21::Send i +F22::Send j +F23::Send k +F24::Send l + + +;================================================================= +; Layer 1 +;;================================================================= +;Row 1 + +!F13::Send m +!F14::Send n +!F15::Send o +!F16::Send p + +;Row 2 + +!F17::Send q +!F18::Send r +!F19::Send s +!F20::Send t + +;Row 3 + +!F21::Send u +!F22::Send v +!F23::Send w +!F24::Send x + + +;================================================================= +; Layer 2 +;;================================================================= +;Row 1 + ++F13::Send y ++F14::Send z ++F15::Send A ++F16::Send B + +;Row 2 + ++F17::Send C ++F18::Send D ++F19::Send E ++F20::Send F + +;Row 3 + ++F21::Send G ++F22::Send H ++F23::Send I ++F24::Send J + +;================================================================= +; Layer 3 +;;================================================================= +;Row 1 + +^F13::Send K +^F14::Send L +^F15::Send M +^F16::Send N + +;Row 2 + +^F17::Send O +^F18::Send P +^F19::Send Q +^F20::Send R + +;Row 3 + +^F21::Send S +^F22::Send T +^F23::Send U +^F24::Send V diff --git a/keyboards/hub16/keymaps/ahk_companion/config.h b/keyboards/hub16/keymaps/ahk_companion/config.h new file mode 100644 index 0000000000..aa9e081c75 --- /dev/null +++ b/keyboards/hub16/keymaps/ahk_companion/config.h @@ -0,0 +1,57 @@ +/* +Copyright 2019 Josh Johnson + +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 . +*/ + +#pragma once + +#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 20 + +// Time out one shot layers after 3 seconds +#define ONESHOT_TIMEOUT 3000 + +// Undef and redefine default brightness to half of 255 +#undef RGBLIGHT_LIMIT_VAL +#define RGBLIGHT_LIMIT_VAL 255 + +//Define a preview timeout for RGB reviews +#define PREVIEW_TIMEOUT 5000 + +// Enable Light Layers implementation +#define RGBLIGHT_LAYERS +// Allow Light Layers to override RGB off configuration +#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF diff --git a/keyboards/hub16/keymaps/ahk_companion/keymap.c b/keyboards/hub16/keymaps/ahk_companion/keymap.c new file mode 100644 index 0000000000..bbc2ac09a1 --- /dev/null +++ b/keyboards/hub16/keymaps/ahk_companion/keymap.c @@ -0,0 +1,168 @@ +/* +Copyright 2019 Josh Johnson + +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 QMK_KEYBOARD_H + +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_LAYERS) +static uint32_t rgb_preview_timer = 0; +#endif + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + //Layer 0 - Base Layer (F13 to F24, and One Shot Layer 1,2,3 or Toggle Layer 4) + [0] = LAYOUT( + KC_MPLY, KC_MUTE, + KC_F13, KC_F14, KC_F15, KC_F16, + KC_F17, KC_F18, KC_F19, KC_F20, + KC_F21, KC_F22, KC_F23, KC_F24, + OSL(1), OSL(2), OSL(3), TG(4) //Transparent to let you go between layers + ), + + [1] = LAYOUT( + KC_MPLY, KC_MUTE, + LALT(KC_F13), LALT(KC_F14), LALT(KC_F15), LALT(KC_F16), + LALT(KC_F17), LALT(KC_F18), LALT(KC_F19), LALT(KC_F20), + LALT(KC_F21), LALT(KC_F22), LALT(KC_F23), LALT(KC_F24), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS //Transparent to let you go between layers + ), + + //Layer 2 - Shift + Function Key Layer + [2] = LAYOUT( + KC_MPLY, KC_MUTE, + LSFT(KC_F13), LSFT(KC_F14), LSFT(KC_F15), LSFT(KC_F16), + LSFT(KC_F17), LSFT(KC_F18), LSFT(KC_F19), LSFT(KC_F20), + LSFT(KC_F21), LSFT(KC_F22), LSFT(KC_F23), LSFT(KC_F24), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS //Transparent to let you go between layers + ), + + //Layer 3 - Control + Function Key + [3] = LAYOUT( + KC_MPLY, KC_MUTE, + LCTL(KC_F13), LCTL(KC_F14), LCTL(KC_F15), LCTL(KC_F16), + LCTL(KC_F17), LCTL(KC_F18), LCTL(KC_F19), LCTL(KC_F20), + LCTL(KC_F21), LCTL(KC_F22), LCTL(KC_F23), LCTL(KC_F24), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS //Transparent to let you go between layers + ), + + //Layer 4 - Multimedia + [4] = LAYOUT( + KC_MPLY, KC_MUTE, + KC_MPRV, KC_MPLY, KC_U, KC_K, + KC_NO, KC_NO, KC_ENT, KC_X, + KC_NO, RESET, LSFT(KC_HASH), KC_J, + TG(5), KC_TRNS, KC_TRNS, KC_TRNS //Transparent to let you go between layers + ), + + //Layer 5 - Keyboard Lights, Programming and Special Functions + [5] = LAYOUT( + KC_MPLY, KC_MUTE, + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, + RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, + RGB_TOG, EEP_RST, RESET, KC_LSHIFT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS //Transparent to let you go between layers + ), +}; + +const rgblight_segment_t PROGMEM my_layer0_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0,16,HSV_ORANGE} + ); +const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0,16,HSV_GREEN} + ); +const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0,16,HSV_RED} + ); +const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0,16,HSV_BLUE} + ); +const rgblight_segment_t PROGMEM my_layer4_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0,16,HSV_WHITE} + ); +const rgblight_segment_t PROGMEM my_layer5_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0,16,HSV_TEAL} + ); +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + my_layer0_layer, + my_layer1_layer, + my_layer2_layer, + my_layer3_layer, + my_layer4_layer, + my_layer5_layer + ); + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* Left Encoder */ + if (clockwise) { + tap_code(KC_MPRV); + } else { + tap_code(KC_MNXT); + } + } else if (index == 1) { /* Right Encoder */ + if (clockwise) { + tap_code(KC_VOLD); + } else { + tap_code(KC_VOLU); + } + } +} +void post_process_record_user(uint16_t keycode, keyrecord_t *record) { + // Allow for a preview of changes when modifying RGB +# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_LAYERS) + switch (keycode) { + case RGB_TOG ... VLK_TOG: + for (uint8_t i = 0; i < RGBLIGHT_MAX_LAYERS; i++) { + rgblight_set_layer_state(i, false); + } + rgb_preview_timer = timer_read32(); + break; + } +# endif + return; +} + +//Set the appropriate layer color +layer_state_t layer_state_set_user(layer_state_t state) { + rgblight_set_layer_state(1, layer_state_cmp(state, 1)); + rgblight_set_layer_state(2, layer_state_cmp(state, 2)); + rgblight_set_layer_state(3, layer_state_cmp(state, 3)); + rgblight_set_layer_state(4, layer_state_cmp(state, 4)); + rgblight_set_layer_state(5, layer_state_cmp(state, 5)); + return state; +} + +void keyboard_post_init_user(void) { + //Enable the LED layers + rgblight_layers = my_rgb_layers; + layer_state_set_user(layer_state); +} + +void matrix_scan_user(void) { +# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_LAYERS) + // Allow preview for + if (rgb_preview_timer && TIMER_DIFF_32(timer_read32(), rgb_preview_timer) > PREVIEW_TIMEOUT) { + rgb_preview_timer = 0; + default_layer_state_set_user(default_layer_state); + layer_state_set_user(layer_state); + led_update_user((led_t) host_keyboard_leds()); + } +# endif +} + +//EEPROM Reset Function +void eeconfig_init_user(void) { + rgblight_enable(); // Enable RGB by default + rgblight_sethsv_orange(); // Set it to orange by default +} diff --git a/keyboards/hub16/keymaps/ahk_companion/readme.md b/keyboards/hub16/keymaps/ahk_companion/readme.md new file mode 100644 index 0000000000..6e8f9f2d2a --- /dev/null +++ b/keyboards/hub16/keymaps/ahk_companion/readme.md @@ -0,0 +1,71 @@ +# AutoHotKey Companion + +## Overview +AutoHotKey Companion Keymap for Hub16 macropad is designed be a quick and easy way to get started with AutoHotKey and to provide a foundation for customizing your own macropad. I upgraded to the Super16 from a Super16 because it kept the RGB underglow lights for an easy way (RGB) to identify what layer I was on with a quick glance or peripheral vision and added 2 rotary encoders and a USB 2.0 hub with USB-C ports. The F13 to F24 keys were selected as they are rarely used so you won't run into conflicts with existing application shortcuts and AutoHotKey recognizes them without any issues. *Note:* MacOS does not support/recognize F21 to F24 so these would need to be remapped for Mac users. + +Same functionality can be accomplished with other similar applications on the host system like Keyboard Maestro, AutoIt, etc. + +* AutoHotKey(Windows) +* AutoIT (Windows) +* Keyboard Maestro(Mac) +* AutoKey(Linux) + +This keymap allows for a total of 48 Function/Macro keys that are accessible within 2 sequential key presses (or more when extended with your own code and additional layers) + +## Encoders +Encoder functionality was made based on my needs but it can be remapped as desired by changing the keycodes. + +Left Encoder: + * Counter clockwise: Previous Multimedia + * Clockwise: Next Multimedia + * Click: Play/Pause + + Right Encoder: + * Counter clockwise: Volume Down + * Clockwise: Volume Up + * Click: Mute/Unmute + +## Alternate Implementations +I chose to use QMK OSL (One Shot Layer) functionality to avoid having to hold a key while selecting the next key and to have my layers always go back to the default layer as the starting point. This also helps me avoid having to cognitively remember what layer I am on. + +If persistent behavior is prefered, OSL can be swapped for TG which will toggle the layer on/off with a key press instead of clearing the layer once the Function key is pressed. This is useful if a layer contains several keys that need to be used in sequence. I also added a OSL timeout of 3 seconds, so that if the key is not pressed within 3 seconds the layer will go back to default. This can be adjusted in the config.h file by increasing 3000 to a desired value: `#define ONESHOT_TIMEOUT 3000` + + + + +## Layers + +While the first 5 layers are accessible with only 1 key press at most, the 5th (less frequently used) layer is accessed by first going to the 4th layer, which makes the TG(5) button available on the bottom left. Space for additional 2 more layer toggles is available on the 2 middle buttons on the bottom row. Please refer to the layer diagrams. + + +* Layer 0 (Base Layer) - the default layer and functions like sending the F13 to F24 keys along with the bottom row to activate another 4 layers. + + ![Image of Base Layer ](https://i.imgur.com/0LhityX.png) + +* Layer 1 (Alt Layer) - Equivalent to Alt+Fxx key being pressed + + ![Image of Layer 1 ](https://i.imgur.com/ZblqLZt.png) + +* Layer 2 (Shift Layer) - Equivalent to Shift+Fxx key being pressed + + ![Image of Layer 2 ](https://i.imgur.com/ZQHwLC0.png) + +* Layer 3 (Control Layer) - Equivalent to Ctrl+Fxx key being pressed + + ![Image of Layer 3 ](https://i.imgur.com/JkM8bqV.png) + +* Layer 4 (Config Layer) - Layer for multimedia. You can replace the KC_TRNS on this layer in keymap.c to TG(x) to enable additional layers. + + ![Image of Layer 4 ](https://i.imgur.com/srDp5Lv.png) + +* Layer 5 (RGB Control/QMK) - RGB control layer and Quantum functions (Reset, EEPROM Reset, ) + + ![Image of Layer 5 ](https://i.imgur.com/Os3n8dx.png) + +## Host Configuration + +Once the keymap has been flashed to the Super16, you can download the accompanying AutoHotKey file or create your own and have it start automatically either via a Windows Task or another way. Using AutoHotKey allows adjustment of functionality of the buttons without the need to change your map and reflash the macropad every time. +Starting the AHK file can be done either by: +* Creating a Windows Task +* Adding the AHK to the startup folder +* Launch manually diff --git a/keyboards/hub16/keymaps/ahk_companion/rules.mk b/keyboards/hub16/keymaps/ahk_companion/rules.mk new file mode 100755 index 0000000000..022a3eeeed --- /dev/null +++ b/keyboards/hub16/keymaps/ahk_companion/rules.mk @@ -0,0 +1,3 @@ +TAP_DANCE_ENABLE = no # Support for tap dancing + + diff --git a/keyboards/hub16/rules.mk b/keyboards/hub16/rules.mk index ad1e238604..b050dcf421 100755 --- a/keyboards/hub16/rules.mk +++ b/keyboards/hub16/rules.mk @@ -31,7 +31,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs ENCODER_ENABLE = yes # Rotary Encoder support TAP_DANCE_ENABLE = yes # Support for tap dancing diff --git a/keyboards/id80/keymaps/via/rules.mk b/keyboards/id80/keymaps/via/rules.mk index ea9a831e17..ca9fed0e6b 100644 --- a/keyboards/id80/keymaps/via/rules.mk +++ b/keyboards/id80/keymaps/via/rules.mk @@ -1,2 +1,2 @@ -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes VIA_ENABLE = yes diff --git a/keyboards/inett_studio/sqx/hotswap/config.h b/keyboards/inett_studio/sqx/hotswap/config.h new file mode 100644 index 0000000000..a59ad3e7e3 --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/config.h @@ -0,0 +1,72 @@ +/** + * config.h + * + Copyright 2020 astro + + 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 . + */ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x694E //'iN' +#define PRODUCT_ID 0x5336 //'S6' +#define DEVICE_VER 0x0001 +#define MANUFACTURER iNETT Studio +#define PRODUCT SQUARE.X + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 +#define MATRIX_ROW_PINS { F0, F1, F4, B7, D6} +#define MATRIX_COL_PINS { C7, C6, B6, B5, B4, F7, F6, F5, E6, B0, D2, D4, D5, D3 } +#define UNUSED_PINS +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + + +//rgb light setting +#define RGBLIGHT_LIMIT_VAL 128 +#define RGBLED_NUM 18 +#define RGB_DI_PIN D7 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +//rgb matrix setting +#define DRIVER_1_LED_TOTAL 33 +#define DRIVER_2_LED_TOTAL 31 +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110111 +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) + +#if defined(RGB_MATRIX_ENABLE) && defined(RGBLIGHT_ENABLE) + #define RGB_MATRIX_DISABLE_KEYCODES +#endif diff --git a/keyboards/inett_studio/sqx/hotswap/hotswap.c b/keyboards/inett_studio/sqx/hotswap/hotswap.c new file mode 100644 index 0000000000..773b0b0b0a --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/hotswap.c @@ -0,0 +1,191 @@ +/** + * @file hotswap.c + * + Copyright 2020 astro + + 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 "hotswap.h" + +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ +// left CA + {0, C1_1, C3_2, C4_2}, + {0, C1_2, C2_2, C4_3}, + {0, C1_3, C2_3, C3_3}, + {0, C1_4, C2_4, C3_4}, + {0, C1_5, C2_5, C3_5}, + {0, C1_6, C2_6, C3_6}, + {0, C1_7, C2_7, C3_7}, + {0, C1_8, C2_8, C3_8}, + + //{0, C5_1, C4_1, C6_1}, + //{0, C5_8, C4_8, C6_8}, + + {0, C9_1, C8_1, C7_1}, + {0, C9_2, C8_2, C7_2}, + //{0, C9_3, C8_3, C7_3}, + {0, C9_4, C8_4, C7_4}, + {0, C9_5, C8_5, C7_5}, + {0, C9_6, C8_6, C7_6}, + {0, C9_7, C8_7, C6_6}, + {0, C9_8, C7_7, C6_7}, +// left CB + {0, C1_9, C3_10, C4_10}, + {0, C1_10, C2_10, C4_11}, + {0, C1_11, C2_11, C3_11}, + {0, C1_12, C2_12, C3_12}, + {0, C1_13, C2_13, C3_13}, + {0, C1_14, C2_14, C3_14}, + {0, C1_15, C2_15, C3_15}, + {0, C1_16, C2_16, C3_16}, + + {0, C5_9, C4_9, C6_9}, + {0, C5_16, C4_16, C6_16}, + + {0, C9_9, C8_9, C7_9}, + {0, C9_10, C8_10, C7_10}, + {0, C9_11, C8_11, C7_11}, + {0, C9_12, C8_12, C7_12}, + {0, C9_13, C8_13, C7_13}, + {0, C9_14, C8_14, C7_14}, + {0, C9_15, C8_15, C6_14}, + {0, C9_16, C7_15, C6_15}, + +// right CA + {1, C1_1, C3_2, C4_2}, + {1, C1_2, C2_2, C4_3}, + {1, C1_3, C2_3, C3_3}, + {1, C1_4, C2_4, C3_4}, + {1, C1_5, C2_5, C3_5}, + {1, C1_6, C2_6, C3_6}, + {1, C1_7, C2_7, C3_7}, + {1, C1_8, C2_8, C3_8}, + + //{1, C5_1, C4_1, C6_1}, + //{1, C5_8, C4_8, C6_8}, + + {1, C9_1, C8_1, C7_1}, + {1, C9_2, C8_2, C7_2}, + {1, C9_3, C8_3, C7_3}, + {1, C9_4, C8_4, C7_4}, + {1, C9_5, C8_5, C7_5}, + {1, C9_6, C8_6, C7_6}, + {1, C9_7, C8_7, C6_6}, + {1, C9_8, C7_7, C6_7}, +// right CB + {1, C1_9, C3_10, C4_10}, + {1, C1_10, C2_10, C4_11}, + {1, C1_11, C2_11, C3_11}, + {1, C1_12, C2_12, C3_12}, + {1, C1_13, C2_13, C3_13}, + //{1, C1_14, C2_14, C3_14}, + {1, C1_15, C2_15, C3_15}, + {1, C1_16, C2_16, C3_16}, + + //{1, C5_9, C4_9, C6_9}, + //{1, C5_16, C4_16, C6_16}, + + {1, C9_9, C8_9, C7_9}, + {1, C9_10, C8_10, C7_10}, + {1, C9_11, C8_11, C7_11}, + {1, C9_12, C8_12, C7_12}, + {1, C9_13, C8_13, C7_13}, + {1, C9_14, C8_14, C7_14}, + {1, C9_15, C8_15, C6_14}, + {1, C9_16, C7_15, C6_15}, +}; + +led_config_t g_led_config = { + { + { 18, 19, 20, 21, 22, 23, 24, 16, 17, 36, 37, 38, 39, 40}, + { 26, 27, 28, 29, 30, 31, 25, 48, 41, 42, 43, 44, 45, 46}, + { 8, 7, 0, 32, 33, 34, 35, 49, 50, 51, 52, 53, NO_LED, 47}, + { 9, NO_LED, 10, 1, 2, 3, 4, 5, 56, 55, 57, 58, 59, 54}, + { 14, 13, 12, 11, NO_LED, NO_LED, 6, 15, NO_LED, NO_LED, 60, 61, 62, 63}, + }, + { + { 48, 32},{ 48, 48},{ 64, 48},{ 80, 48},{ 96, 48},{112, 48},{112, 64},{ 32, 32}, + { 16, 32},{ 16, 48}, { 32, 48},{ 64, 64},{ 40, 64},{ 20, 64},{ 0, 64}, + + { 0, 0},{ 16, 0},{ 32, 0},{ 48, 0},{ 64, 0},{ 80, 0},{ 96, 0},{ 96, 16}, + { 0, 16},{ 16, 16}, + { 32, 16},{ 48, 16},{ 64, 16},{ 80, 16},{ 64, 32},{ 80, 32},{ 96, 32},{112, 32}, + + {112, 0},{128, 0},{144, 0},{160, 0},{176, 0},{192, 0},{208, 0},{224, 0}, + {128, 16},{144, 16},{160, 16},{176, 16},{192, 16},{216, 16},{216, 32},{112, 16}, + + {128, 32},{144, 32},{160, 32},{176, 32},{192, 32}, {224, 48},{144, 48}, + {128, 48},{160, 48},{176, 48},{192, 48},{160, 64},{180, 64},{200, 64},{224, 64} + }, + { + 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 4, 1, 1, 1, 1, + + 1, 4, 4, 4, 4, 4, 4, 4, + 1, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + + 4, 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 1, 1, 4, + + 4, 4, 4, 4, 4, 1, 4, + 4, 4, 4, 1, 1, 1, 1, 1, + } +}; + +#endif //RGB_MATRIX_ENABLE + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { +#if defined(RGB_MATRIX_DISABLE_KEYCODES) + case RGB_MATRIX_TOGGLE: // toggle rgb matrix + rgb_matrix_toggle(); + return false; + case RGB_MATRIX_STEP: + rgb_matrix_step(); + return false; + case RGB_MATRIX_INC_HUE: + rgb_matrix_increase_hue(); + return false; + case RGB_MATRIX_DEC_HUE: + rgb_matrix_decrease_hue(); + return false; + case RGB_MATRIX_INC_SAT: + rgb_matrix_increase_sat(); + return false; + case RGB_MATRIX_DEC_SAT: + rgb_matrix_decrease_sat(); + return false; + case RGB_MATRIX_INC_VAL: + rgb_matrix_increase_val(); + return false; + case RGB_MATRIX_DEC_VAL: + rgb_matrix_decrease_val(); + return false; +#endif + default: + break; + } + } + return true; +} diff --git a/keyboards/inett_studio/sqx/hotswap/hotswap.h b/keyboards/inett_studio/sqx/hotswap/hotswap.h new file mode 100644 index 0000000000..b879f7aaaf --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/hotswap.h @@ -0,0 +1,66 @@ +/** + * @file hotswap.h + * + Copyright 2020 astro + + 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 . + */ +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguements +// The second converts the arguments into a two-dimensional array +#define LAYOUT_60_tsangan_hhkb( \ + 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, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k42, k43, k47, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \ +} + +#if defined(RGB_MATRIX_DISABLE_KEYCODES) +# ifndef RGB_MATRIX_TOGGLE +# define RGB_MATRIX_TOGGLE KC_F16 +# endif +# ifndef RGB_MATRIX_STEP +# define RGB_MATRIX_STEP KC_F17 +# endif +# ifndef RGB_MATRIX_INC_HUE +# define RGB_MATRIX_INC_HUE KC_F18 +# endif +# ifndef RGB_MATRIX_DEC_HUE +# define RGB_MATRIX_DEC_HUE KC_F19 +# endif +# ifndef RGB_MATRIX_INC_SAT +# define RGB_MATRIX_INC_SAT KC_F20 +# endif +# ifndef RGB_MATRIX_DEC_SAT +# define RGB_MATRIX_DEC_SAT KC_F21 +# endif +# ifndef RGB_MATRIX_INC_VAL +# define RGB_MATRIX_INC_VAL KC_F22 +# endif +# ifndef RGB_MATRIX_DEC_VAL +# define RGB_MATRIX_DEC_VAL KC_F23 +# endif +#endif diff --git a/keyboards/inett_studio/sqx/hotswap/info.json b/keyboards/inett_studio/sqx/hotswap/info.json new file mode 100644 index 0000000000..7180422c3d --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "sqx", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_tsangan_hhkb": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.5}] + } + } + } diff --git a/keyboards/inett_studio/sqx/hotswap/keymaps/default/keymap.c b/keyboards/inett_studio/sqx/hotswap/keymaps/default/keymap.c new file mode 100644 index 0000000000..0e814cc98c --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* +Copyright 2020 astro + +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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_tsangan_hhkb( + 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_DEL, 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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1),KC_RCTL), + + [1] = LAYOUT_60_tsangan_hhkb( + _______, 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, + RESET, RGB_TOG,RGB_MOD,_______, KC_F16, KC_F17,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME, KC_END,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,_______,_______), +}; diff --git a/keyboards/inett_studio/sqx/hotswap/keymaps/via/keymap.c b/keyboards/inett_studio/sqx/hotswap/keymaps/via/keymap.c new file mode 100644 index 0000000000..d9258169fa --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* +Copyright 2020 astro + +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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_tsangan_hhkb( + 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_DEL, 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, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, TG(1),KC_RCTL), + + [1] = LAYOUT_60_tsangan_hhkb( + _______, 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, + RESET, RGB_TOG,RGB_MOD,_______, KC_F16, KC_F17,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME, KC_END,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______, TG(0),_______), + + [2] = LAYOUT_60_tsangan_hhkb( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______, TG(0),_______), + + [3] = LAYOUT_60_tsangan_hhkb( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______, TG(0),_______), +}; diff --git a/keyboards/inett_studio/sqx/hotswap/keymaps/via/rules.mk b/keyboards/inett_studio/sqx/hotswap/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/inett_studio/sqx/hotswap/readme.md b/keyboards/inett_studio/sqx/hotswap/readme.md new file mode 100644 index 0000000000..faf5cc6a6e --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/readme.md @@ -0,0 +1,13 @@ +# iNETT Studio SQUARE.X hotswap + +A 60% keyboard from the iNETT Studio's SQUARE series. + +* Keyboard Maintainer: [astro](https://github.com/yulei) +* Hardware Supported: SQUARE.X hotswap +* Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=107062.0) + +Make example for this keyboard (after setting up your build environment): + + make inett_studio/sqx/hotswap:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/inett_studio/sqx/hotswap/rules.mk b/keyboards/inett_studio/sqx/hotswap/rules.mk new file mode 100644 index 0000000000..80968787d5 --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGB_MATRIX_ENABLE = yes # Use RGB per key light +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LTO_ENABLE = yes # Reducing firmware size + +LAYOUTS = 60_tsangan_hhkb diff --git a/keyboards/inett_studio/sqx/universal/config.h b/keyboards/inett_studio/sqx/universal/config.h new file mode 100644 index 0000000000..a4a5b42c4d --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/config.h @@ -0,0 +1,72 @@ +/** + * config.h + * + Copyright 2020 astro + + 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 . + */ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x694E //'iN' +#define PRODUCT_ID 0x5336 //'S6' +#define DEVICE_VER 0x0001 +#define MANUFACTURER iNETT Studio +#define PRODUCT SQUARE.X + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 +#define MATRIX_ROW_PINS { F0, F1, F4, B7, D6} +#define MATRIX_COL_PINS { C7, C6, B6, B5, B4, F7, F6, F5, E6, B0, D2, D4, D5, D3 } +#define UNUSED_PINS +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + + +//rgb light setting +#define RGBLIGHT_LIMIT_VAL 128 +#define RGBLED_NUM 18 +#define RGB_DI_PIN D7 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +//rgb matrix setting +#define DRIVER_1_LED_TOTAL 36 +#define DRIVER_2_LED_TOTAL 36 +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110111 +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) + +#if defined(RGB_MATRIX_ENABLE) && defined(RGBLIGHT_ENABLE) +# define RGB_MATRIX_DISABLE_KEYCODES +#endif diff --git a/keyboards/inett_studio/sqx/universal/info.json b/keyboards/inett_studio/sqx/universal/info.json new file mode 100644 index 0000000000..d0956b6802 --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/info.json @@ -0,0 +1,27 @@ +{ + "keyboard_name": "sqx", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi_tsangan_split_rshift": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, + "LAYOUT_60_ansi": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_hhkb": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}] + }, + "LAYOUT_60_iso": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_ansi_split_bs_rshift": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_tsangan_hhkb": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.5}] + } + } + } diff --git a/keyboards/inett_studio/sqx/universal/keymaps/default/keymap.c b/keyboards/inett_studio/sqx/universal/keymaps/default/keymap.c new file mode 100644 index 0000000000..bd2869e247 --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* +Copyright 2020 astro + +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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi_split_bs_rshift( + 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_DEL, 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, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT,KC_RGUI, TG(1),KC_RCTL), + + [1] = LAYOUT_60_ansi_split_bs_rshift( + _______, 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, + RESET, RGB_TOG,RGB_MOD,_______, KC_F16, KC_F17,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME, KC_END,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,_______,TG(0),_______), +}; diff --git a/keyboards/inett_studio/sqx/universal/keymaps/via/keymap.c b/keyboards/inett_studio/sqx/universal/keymaps/via/keymap.c new file mode 100644 index 0000000000..c58090d9d7 --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* +Copyright 2020 astro + +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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi_split_bs_rshift( + 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_DEL, 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, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT,KC_RGUI, TG(1),KC_RCTL), + + [1] = LAYOUT_60_ansi_split_bs_rshift( + _______, 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, + RESET, RGB_TOG,RGB_MOD,_______, KC_F16, KC_F17,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME, KC_END,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,_______, TG(0),_______), + + [2] = LAYOUT_60_ansi_split_bs_rshift( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,_______, TG(0),_______), + + [3] = LAYOUT_60_ansi_split_bs_rshift( + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______, _______, _______,_______, TG(0),_______), +}; diff --git a/keyboards/inett_studio/sqx/universal/keymaps/via/rules.mk b/keyboards/inett_studio/sqx/universal/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/inett_studio/sqx/universal/readme.md b/keyboards/inett_studio/sqx/universal/readme.md new file mode 100644 index 0000000000..0a09b9c7dd --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/readme.md @@ -0,0 +1,13 @@ +# iNETT Studio SQUARE.X universal + +A 60% keyboard from the iNETT Studio's SQUARE series. + +* Keyboard Maintainer: [astro](https://github.com/yulei) +* Hardware Supported: SQUARE.X universal +* Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=107062.0) + +Make example for this keyboard (after setting up your build environment): + + make inett_studio/sqx/universal:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/inett_studio/sqx/universal/rules.mk b/keyboards/inett_studio/sqx/universal/rules.mk new file mode 100644 index 0000000000..cf3a64ba9f --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGB_MATRIX_ENABLE = yes # Use RGB per key light + +LTO_ENABLE = yes # Reducing firmware size + +LAYOUTS = 60_ansi 60_hhkb 60_iso 60_ansi_split_bs_rshift 60_tsangan_hhkb diff --git a/keyboards/inett_studio/sqx/universal/universal.c b/keyboards/inett_studio/sqx/universal/universal.c new file mode 100644 index 0000000000..f0f7f88f7a --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/universal.c @@ -0,0 +1,194 @@ +/** + * @file universal.c + * + Copyright 2020 astro + + 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 "universal.h" + +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ +// left CA + {0, C1_1, C3_2, C4_2}, + {0, C1_2, C2_2, C4_3}, + {0, C1_3, C2_3, C3_3}, + {0, C1_4, C2_4, C3_4}, + {0, C1_5, C2_5, C3_5}, + {0, C1_6, C2_6, C3_6}, + {0, C1_7, C2_7, C3_7}, + {0, C1_8, C2_8, C3_8}, + + {0, C5_1, C4_1, C6_1}, + {0, C5_8, C4_8, C6_8}, + + {0, C9_1, C8_1, C7_1}, + {0, C9_2, C8_2, C7_2}, + {0, C9_3, C8_3, C7_3}, + {0, C9_4, C8_4, C7_4}, + {0, C9_5, C8_5, C7_5}, + {0, C9_6, C8_6, C7_6}, + {0, C9_7, C8_7, C6_6}, + {0, C9_8, C7_7, C6_7}, +// left CB + {0, C1_9, C3_10, C4_10}, + {0, C1_10, C2_10, C4_11}, + {0, C1_11, C2_11, C3_11}, + {0, C1_12, C2_12, C3_12}, + {0, C1_13, C2_13, C3_13}, + {0, C1_14, C2_14, C3_14}, + {0, C1_15, C2_15, C3_15}, + {0, C1_16, C2_16, C3_16}, + + {0, C5_9, C4_9, C6_9}, + {0, C5_16, C4_16, C6_16}, + + {0, C9_9, C8_9, C7_9}, + {0, C9_10, C8_10, C7_10}, + {0, C9_11, C8_11, C7_11}, + {0, C9_12, C8_12, C7_12}, + {0, C9_13, C8_13, C7_13}, + {0, C9_14, C8_14, C7_14}, + {0, C9_15, C8_15, C6_14}, + {0, C9_16, C7_15, C6_15}, + +// right CA + {1, C1_1, C3_2, C4_2}, + {1, C1_2, C2_2, C4_3}, + {1, C1_3, C2_3, C3_3}, + {1, C1_4, C2_4, C3_4}, + {1, C1_5, C2_5, C3_5}, + {1, C1_6, C2_6, C3_6}, + {1, C1_7, C2_7, C3_7}, + {1, C1_8, C2_8, C3_8}, + + {1, C5_1, C4_1, C6_1}, + {1, C5_8, C4_8, C6_8}, + + {1, C9_1, C8_1, C7_1}, + {1, C9_2, C8_2, C7_2}, + {1, C9_3, C8_3, C7_3}, + {1, C9_4, C8_4, C7_4}, + {1, C9_5, C8_5, C7_5}, + {1, C9_6, C8_6, C7_6}, + {1, C9_7, C8_7, C6_6}, + {1, C9_8, C7_7, C6_7}, +// right CB + {1, C1_9, C3_10, C4_10}, + {1, C1_10, C2_10, C4_11}, + {1, C1_11, C2_11, C3_11}, + {1, C1_12, C2_12, C3_12}, + {1, C1_13, C2_13, C3_13}, + {1, C1_14, C2_14, C3_14}, + {1, C1_15, C2_15, C3_15}, + {1, C1_16, C2_16, C3_16}, + + {1, C5_9, C4_9, C6_9}, + {1, C5_16, C4_16, C6_16}, + + {1, C9_9, C8_9, C7_9}, + {1, C9_10, C8_10, C7_10}, + {1, C9_11, C8_11, C7_11}, + {1, C9_12, C8_12, C7_12}, + {1, C9_13, C8_13, C7_13}, + {1, C9_14, C8_14, C7_14}, + {1, C9_15, C8_15, C6_14}, + {1, C9_16, C7_15, C6_15}, +}; + +led_config_t g_led_config = { + { + { 0, 1, 2, 3, 4, 5, 6, 36, 37, 38, 39, 40, 41, 42}, + { 8, 9, 10, 11, 12, 13, 7, 45, 46, 47, 48, 49, 50, 51}, + { 26,27, 18, 14, 15, 16, 17, 54, 55, 56, 57, 58, 59, 53}, + { 29,30, 31, 19, 20, 21, 22, 23, 62, 63, 64, 65, 66, 61}, + { 35,34, 33, NO_LED, NO_LED, NO_LED, 24, 44, NO_LED, NO_LED, 68, 69, 70, 71}, + }, + { + { 32, 32},{ 48, 48},{ 64, 48},{ 80, 48},{ 96, 48},{112, 48},{ 96, 64},{ 96, 64}, + { 0, 32},{ 16, 32}, + { 0, 48},{ 0, 48},{ 16, 48},{ 32, 48},{ 64, 64},{ 32, 64},{ 16, 64},{ 0, 64}, + { 0, 0},{ 16, 0},{ 32, 0},{ 48, 0},{ 64, 0},{ 80, 0},{ 96, 0},{ 96, 16}, + { 0, 16},{ 16, 16}, + { 32, 16},{ 48, 16},{ 64, 16},{ 80, 16},{ 48, 32},{ 64, 32},{ 80, 32},{ 96, 32}, + + {128, 0},{144, 0},{160, 0},{176, 0},{192, 0},{208, 0},{216, 0},{224, 0}, + {112, 0},{128, 16}, + {144, 16},{160, 16},{176, 16},{192, 16},{208, 16},{224, 16},{224, 32},{216, 32}, + {128, 32},{144, 32},{160, 32},{176, 32},{192, 32},{208, 32},{208, 48},{224, 48}, + {128, 48},{144, 48}, + {160, 48},{176, 48},{192, 48},{142, 64},{160, 64},{176, 64},{208, 64},{224, 64} + }, + { + 4, 4, 4, 4, 4, 4, 4, 4, + 1, 4, + 4, 4, 1, 1, 1, 4, 4, 4, + + 1, 4, 4, 4, 4, 4, 4, 4, + 1, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + + 4, 4, 4, 4, 4, 4, 1, 1, + 4, 4, + 4, 4, 4, 4, 4, 1, 1, 1, + + 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, + 4, 4, 4, 4, 1, 1, 1, 1, + } +}; +#endif //RGB_MATRIX_ENABLE + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { +#if defined(RGB_MATRIX_DISABLE_KEYCODES) + case RGB_MATRIX_TOGGLE: // toggle rgb matrix + rgb_matrix_toggle(); + return false; + case RGB_MATRIX_STEP: + rgb_matrix_step(); + return false; + case RGB_MATRIX_INC_HUE: + rgb_matrix_increase_hue(); + return false; + case RGB_MATRIX_DEC_HUE: + rgb_matrix_decrease_hue(); + return false; + case RGB_MATRIX_INC_SAT: + rgb_matrix_increase_sat(); + return false; + case RGB_MATRIX_DEC_SAT: + rgb_matrix_decrease_sat(); + return false; + case RGB_MATRIX_INC_VAL: + rgb_matrix_increase_val(); + return false; + case RGB_MATRIX_DEC_VAL: + rgb_matrix_decrease_val(); + return false; +#endif + default: + break; + } + } + return true; +} diff --git a/keyboards/inett_studio/sqx/universal/universal.h b/keyboards/inett_studio/sqx/universal/universal.h new file mode 100644 index 0000000000..b2df37ecc4 --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/universal.h @@ -0,0 +1,141 @@ +/** + * @file universal.h + * + Copyright 2020 astro + + 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 . + */ +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguements +// The second converts the arguments into a two-dimensional array +#define LAYOUT_60_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k42, k43, k47, k48, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, KC_NO, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, k48, k49, k4a, k4b} \ +} + +#define LAYOUT_60_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ + k20, 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, \ + k40, k42, k43, k47, k48, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, KC_NO, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO}, \ + {k20, 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, KC_NO}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, k48, k49, k4a, k4b} \ +} + +#define LAYOUT_60_ansi_tsangan_split_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k42, k43, k47, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, KC_NO, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \ +} + +#define LAYOUT_60_hhkb( \ + 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, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k42, k43, k47, k49, k4a \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ + {KC_NO, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, KC_NO, k49, k4a, KC_NO} \ +} +#define LAYOUT_60_tsangan_hhkb( \ + 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, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k42, k43, k47, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \ +} + +#define LAYOUT_60_ansi_split_bs_rshift( \ + 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, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k42, k43, k47, k48, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ + {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, k48, k49, k4a, k4b} \ +} + + +#if defined(RGB_MATRIX_DISABLE_KEYCODES) +# ifndef RGB_MATRIX_TOGGLE +# define RGB_MATRIX_TOGGLE KC_F16 +# endif +# ifndef RGB_MATRIX_STEP +# define RGB_MATRIX_STEP KC_F17 +# endif +# ifndef RGB_MATRIX_INC_HUE +# define RGB_MATRIX_INC_HUE KC_F18 +# endif +# ifndef RGB_MATRIX_DEC_HUE +# define RGB_MATRIX_DEC_HUE KC_F19 +# endif +# ifndef RGB_MATRIX_INC_SAT +# define RGB_MATRIX_INC_SAT KC_F20 +# endif +# ifndef RGB_MATRIX_DEC_SAT +# define RGB_MATRIX_DEC_SAT KC_F21 +# endif +# ifndef RGB_MATRIX_INC_VAL +# define RGB_MATRIX_INC_VAL KC_F22 +# endif +# ifndef RGB_MATRIX_DEC_VAL +# define RGB_MATRIX_DEC_VAL KC_F23 +# endif +#endif diff --git a/keyboards/infinity60/bootloader_defs.h b/keyboards/infinity60/bootloader_defs.h deleted file mode 100644 index c67153be60..0000000000 --- a/keyboards/infinity60/bootloader_defs.h +++ /dev/null @@ -1 +0,0 @@ -#define KIIBOHD_BOOTLOADER diff --git a/keyboards/infinity60/rules.mk b/keyboards/infinity60/rules.mk index 579eab0f3f..dce10b5717 100644 --- a/keyboards/infinity60/rules.mk +++ b/keyboards/infinity60/rules.mk @@ -1,16 +1,8 @@ # MCU name MCU = MK20DX128 -# Linker script to use -# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -# - NOTE: a custom ld script is needed for EEPROM on Teensy LC -# - LDSCRIPT = -# - MKL26Z64 for Teensy LC -# - MK20DX128 for Teensy 3.0 -# - MK20DX256 for Teensy 3.1 and 3.2 -# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader -MCU_LDSCRIPT = MK20DX128BLDR4 +# Bootloader selection +BOOTLOADER = kiibohd # Board: it should exist either in /os/hal/boards/ # or /boards @@ -21,20 +13,9 @@ MCU_LDSCRIPT = MK20DX128BLDR4 # - MCHCK_K20 for Infinity KB BOARD = MCHCK_K20 -# Vector table for application -# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ -# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB -OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000 - -BOOTLOADER = dfu - # Build Options # comment out to disable the options. # - -DFU_ARGS = -d 1c11:b007 -DFU_SUFFIX_ARGS = -p b007 -v 1c11 - BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) MOUSEKEY_ENABLE = yes # Mouse keys diff --git a/keyboards/jj40/config.h b/keyboards/jj40/config.h index 9a1eadb784..0d168f2c01 100644 --- a/keyboards/jj40/config.h +++ b/keyboards/jj40/config.h @@ -16,8 +16,8 @@ along with this program. If not, see . #include "config_common.h" -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D +#define VENDOR_ID 0x4B50 // "KP" +#define PRODUCT_ID 0x0040 #define DEVICE_VER 0x0200 #define MANUFACTURER KPrepublic #define PRODUCT JJ40 diff --git a/keyboards/jj40/keymaps/via/keymap.c b/keyboards/jj40/keymaps/via/keymap.c new file mode 100644 index 0000000000..0e0e469abc --- /dev/null +++ b/keyboards/jj40/keymaps/via/keymap.c @@ -0,0 +1,93 @@ +/* Copyright 2019 + * + * 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 QMK_KEYBOARD_H + +#define LOWER FN_MO13 +#define RAISE FN_MO23 + +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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[0] = LAYOUT_planck_mit( + 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 , + _______, KC_LCTL, KC_LALT, KC_LGUI, LOWER, 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 | + * `-----------------------------------------------------------------------------------' + */ +[1] = LAYOUT_planck_mit( + 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 | + * `-----------------------------------------------------------------------------------' + */ +[2] = LAYOUT_planck_mit( + 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 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[3] = LAYOUT_planck_mit( + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) +}; diff --git a/keyboards/jj40/keymaps/via/rules.mk b/keyboards/jj40/keymaps/via/rules.mk new file mode 100755 index 0000000000..58ecfdf5c2 --- /dev/null +++ b/keyboards/jj40/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes + +RGBLIGHT_ENABLE = yes diff --git a/keyboards/k_type/bootloader_defs.h b/keyboards/k_type/bootloader_defs.h deleted file mode 100644 index c67153be60..0000000000 --- a/keyboards/k_type/bootloader_defs.h +++ /dev/null @@ -1 +0,0 @@ -#define KIIBOHD_BOOTLOADER diff --git a/keyboards/k_type/config.h b/keyboards/k_type/config.h index 86b08769d1..82f641c533 100644 --- a/keyboards/k_type/config.h +++ b/keyboards/k_type/config.h @@ -15,30 +15,73 @@ 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 +#pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0x1c11 -#define PRODUCT_ID 0xb04d -#define DEVICE_VER 0x0001 -#define MANUFACTURER Input Club -#define PRODUCT K-Type/QMK +#define VENDOR_ID 0x1C11 +#define PRODUCT_ID 0xB04D +#define DEVICE_VER 0x0001 +#define MANUFACTURER Input:Club +#define PRODUCT K-Type (QMK) + /* key matrix size */ #define MATRIX_ROWS 10 #define MATRIX_COLS 10 -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { D5, D6, D7, C1, C2, C3, C4, C5, C6, C7 } +#define MATRIX_COL_PINS { B2, B3, B18, B19, C0, C8, C9, D0, D1, D4 } +#define UNUSED_PINS -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ //#define LOCKING_RESYNC_ENABLE +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + /* * Feature disable options * These options are also useful to firmware size reduction. @@ -54,7 +97,11 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION -#endif +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/k_type/info.json b/keyboards/k_type/info.json index 9d3e10568b..fd4c952748 100644 --- a/keyboards/k_type/info.json +++ b/keyboards/k_type/info.json @@ -1,12 +1,110 @@ { - "keyboard_name": "K-Type", - "url": "", - "maintainer": "qmk", - "width": 18.25, - "height": 6.5, - "layouts": { - "KEYMAP": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] - } - } + "keyboard_name": "K-Type", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_tkl_ansi": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6.5, "y": 0}, + {"x": 7.5, "y": 0}, + {"x": 8.5, "y": 0}, + {"x": 9.5, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + + {"x": 15.25, "y": 0}, + {"x": 16.25, "y": 0}, + {"x": 17.25, "y": 0}, + + {"x": 0, "y": 1.5}, + {"x": 1, "y": 1.5}, + {"x": 2, "y": 1.5}, + {"x": 3, "y": 1.5}, + {"x": 4, "y": 1.5}, + {"x": 5, "y": 1.5}, + {"x": 6, "y": 1.5}, + {"x": 7, "y": 1.5}, + {"x": 8, "y": 1.5}, + {"x": 9, "y": 1.5}, + {"x": 10, "y": 1.5}, + {"x": 11, "y": 1.5}, + {"x": 12, "y": 1.5}, + {"x": 13, "y": 1.5, "w": 2}, + + {"x": 15.25, "y": 1.5}, + {"x": 16.25, "y": 1.5}, + {"x": 17.25, "y": 1.5}, + + {"x": 0, "y": 2.5, "w": 1.5}, + {"x": 1.5, "y": 2.5}, + {"x": 2.5, "y": 2.5}, + {"x": 3.5, "y": 2.5}, + {"x": 4.5, "y": 2.5}, + {"x": 5.5, "y": 2.5}, + {"x": 6.5, "y": 2.5}, + {"x": 7.5, "y": 2.5}, + {"x": 8.5, "y": 2.5}, + {"x": 9.5, "y": 2.5}, + {"x": 10.5, "y": 2.5}, + {"x": 11.5, "y": 2.5}, + {"x": 12.5, "y": 2.5}, + {"x": 13.5, "y": 2.5, "w": 1.5}, + + {"x": 15.25, "y": 2.5}, + {"x": 16.25, "y": 2.5}, + {"x": 17.25, "y": 2.5}, + + {"x": 0, "y": 3.5, "w": 1.75}, + {"x": 1.75, "y": 3.5}, + {"x": 2.75, "y": 3.5}, + {"x": 3.75, "y": 3.5}, + {"x": 4.75, "y": 3.5}, + {"x": 5.75, "y": 3.5}, + {"x": 6.75, "y": 3.5}, + {"x": 7.75, "y": 3.5}, + {"x": 8.75, "y": 3.5}, + {"x": 9.75, "y": 3.5}, + {"x": 10.75, "y": 3.5}, + {"x": 11.75, "y": 3.5}, + {"x": 12.75, "y": 3.5, "w": 2.25}, + + {"x": 0, "y": 4.5, "w": 2.25}, + {"x": 2.25, "y": 4.5}, + {"x": 3.25, "y": 4.5}, + {"x": 4.25, "y": 4.5}, + {"x": 5.25, "y": 4.5}, + {"x": 6.25, "y": 4.5}, + {"x": 7.25, "y": 4.5}, + {"x": 8.25, "y": 4.5}, + {"x": 9.25, "y": 4.5}, + {"x": 10.25, "y": 4.5}, + {"x": 11.25, "y": 4.5}, + {"x": 12.25, "y": 4.5, "w": 2.75}, + + {"x": 16.25, "y": 4.5}, + + {"x": 0, "y": 5.5, "w": 1.25}, + {"x": 1.25, "y": 5.5, "w": 1.25}, + {"x": 2.5, "y": 5.5, "w": 1.25}, + {"x": 3.75, "y": 5.5, "w": 6.25}, + {"x": 10, "y": 5.5, "w": 1.25}, + {"x": 11.25, "y": 5.5, "w": 1.25}, + {"x": 12.5, "y": 5.5, "w": 1.25}, + {"x": 13.75, "y": 5.5, "w": 1.25}, + + {"x": 15.25, "y": 5.5}, + {"x": 16.25, "y": 5.5}, + {"x": 17.25, "y": 5.5} + ] + } + } } diff --git a/keyboards/k_type/k_type.c b/keyboards/k_type/k_type.c index 0cffbedfd6..ae62f0e723 100644 --- a/keyboards/k_type/k_type.c +++ b/keyboards/k_type/k_type.c @@ -14,20 +14,171 @@ 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 "k_type.h" -__attribute__ ((weak)) -void matrix_init_user(void) { -} +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + { 0, B_1, A_1, C_1 }, + { 0, B_2, A_2, C_2 }, + { 0, B_3, A_3, C_3 }, + { 0, B_4, A_4, C_4 }, + { 0, B_5, A_5, C_5 }, + { 0, B_6, A_6, C_6 }, + { 0, B_7, A_7, C_7 }, + { 0, B_8, A_8, C_8 }, + { 0, B_9, A_9, C_9 }, + { 0, B_10, A_10, C_10 }, + { 0, B_11, A_11, C_11 }, + { 0, B_12, A_12, C_12 }, + { 0, B_13, A_13, C_13 }, + { 0, B_14, A_14, C_14 }, + { 0, B_15, A_15, C_15 }, + { 0, B_16, A_16, C_16 }, -__attribute__ ((weak)) -void matrix_scan_user(void) { -} + { 0, E_1, D_1, F_1 }, + { 0, E_2, D_2, F_2 }, + { 0, E_3, D_3, F_3 }, + { 0, E_4, D_4, F_4 }, + { 0, E_5, D_5, F_5 }, + { 0, E_6, D_6, F_6 }, + { 0, E_7, D_7, F_7 }, + { 0, E_8, D_8, F_8 }, + { 0, E_9, D_9, F_9 }, + { 0, E_10, D_1, F_10 }, + { 0, E_11, D_1, F_11 }, + { 0, E_12, D_1, F_12 }, + { 0, E_13, D_1, F_13 }, + { 0, E_14, D_1, F_14 }, + { 0, E_15, D_15, F_15 }, + { 0, E_16, D_16, F_16 }, -void matrix_init_kb(void) { - matrix_init_user(); + { 0, H_1, G_1, I_1 }, + { 0, H_2, G_2, I_2 }, + { 0, H_3, G_3, I_3 }, + { 0, H_4, G_4, I_4 }, + { 0, H_5, G_5, I_5 }, + { 0, H_6, G_6, I_6 }, + { 0, H_7, G_7, I_7 }, + { 0, H_8, G_8, I_8 }, + { 0, H_9, G_9, I_9 }, + { 0, H_10, G_1, I_10 }, + { 0, H_11, G_1, I_11 }, + { 0, H_12, G_1, I_12 }, + { 0, H_13, G_1, I_13 }, + { 0, H_14, G_1, I_14 }, + { 0, H_15, G_15, I_15 }, + { 0, H_16, G_16, I_16 }, + + { 0, K_1, J_1, L_1 }, + { 0, K_2, J_2, L_2 }, + { 0, K_3, J_3, L_3 }, + { 0, K_4, J_4, L_4 }, + { 0, K_5, J_5, L_5 }, + { 0, K_6, J_6, L_6 }, + { 0, K_7, J_7, L_7 }, + { 0, K_8, J_8, L_8 }, + { 0, K_9, J_9, L_9 }, + { 0, K_10, J_1, L_10 }, + { 0, K_11, J_1, L_11 }, + { 0, K_12, J_1, L_12 }, + { 0, K_13, J_1, L_13 }, + { 0, K_14, J_1, L_14 }, + { 0, K_15, J_15, L_15 }, + { 0, K_16, J_16, L_16 }, + + // Driver 2 is on I2C2 - currently not usable with i2c_master + //{ 1, B_1, A_1, C_1 }, + //{ 1, B_2, A_2, C_2 }, + //{ 1, B_3, A_3, C_3 }, + //{ 1, B_4, A_4, C_4 }, + //{ 1, B_5, A_5, C_5 }, + //{ 1, B_6, A_6, C_6 }, + //{ 1, B_7, A_7, C_7 }, + //{ 1, B_8, A_8, C_8 }, + //{ 1, B_9, A_9, C_9 }, + //{ 1, B_10, A_10, C_10 }, + //{ 1, B_11, A_11, C_11 }, + //{ 1, B_12, A_12, C_12 }, + //{ 1, B_13, A_13, C_13 }, + //{ 1, B_14, A_14, C_14 }, + //{ 1, B_15, A_15, C_15 }, + //{ 1, B_16, A_16, C_16 }, + + //{ 1, E_1, D_1, F_1 }, + //{ 1, E_2, D_2, F_2 }, + //{ 1, E_3, D_3, F_3 }, + //{ 1, E_4, D_4, F_4 }, + //{ 1, E_5, D_5, F_5 }, + //{ 1, E_6, D_6, F_6 }, + //{ 1, E_7, D_7, F_7 }, + //{ 1, E_8, D_8, F_8 }, + //{ 1, E_9, D_9, F_9 }, + //{ 1, E_10, D_1, F_10 }, + //{ 1, E_11, D_1, F_11 }, + //{ 1, E_12, D_1, F_12 }, + //{ 1, E_13, D_1, F_13 }, + //{ 1, E_14, D_1, F_14 }, + //{ 1, E_15, D_15, F_15 }, + //{ 1, E_16, D_16, F_16 }, + + //{ 1, H_1, G_1, I_1 }, + //{ 1, H_2, G_2, I_2 }, + //{ 1, H_3, G_3, I_3 }, + //{ 1, H_4, G_4, I_4 }, + //{ 1, H_5, G_5, I_5 }, + //{ 1, H_6, G_6, I_6 }, + //{ 1, H_7, G_7, I_7 }, + //{ 1, H_8, G_8, I_8 }, + //{ 1, H_9, G_9, I_9 }, + //{ 1, H_10, G_1, I_10 }, + //{ 1, H_11, G_1, I_11 }, + //{ 1, H_12, G_1, I_12 }, + //{ 1, H_13, G_1, I_13 }, + //{ 1, H_14, G_1, I_14 }, + //{ 1, H_15, G_15, I_15 }, + //{ 1, H_16, G_16, I_16 }, + + //{ 1, K_1, J_1, L_1 }, + //{ 1, K_2, J_2, L_2 }, + //{ 1, K_3, J_3, L_3 }, + //{ 1, K_4, J_4, L_4 }, + //{ 1, K_5, J_5, L_5 }, + //{ 1, K_6, J_6, L_6 }, + //{ 1, K_7, J_7, L_7 } }; -void matrix_scan_kb(void) { - matrix_scan_user(); +led_config_t g_led_config = { + { + // Key Matrix to LED Index + { 0, 10, 20, 29, 38, 47, 57, NO_LED, NO_LED, NO_LED }, + { 1, 11, 21, NO_LED, 39, 48, 58, NO_LED, NO_LED, NO_LED }, + { 2, 12, 22, 30, 40, 49, 59, NO_LED, NO_LED, NO_LED }, + { 3, 13, 23, 31, 41, 50, 60, NO_LED, NO_LED, NO_LED }, + { 4, 14, 24, 32, 42, 51, 61, NO_LED, NO_LED, NO_LED }, + { 5, 15, 25, 33, 43, 52, NO_LED, NO_LED, NO_LED, NO_LED }, + { 6, 16, 26, 34, 44, 53, 62, NO_LED, NO_LED, NO_LED }, + { 7, 17, 27, 35, 45, 54, NO_LED, NO_LED, NO_LED, NO_LED }, + { 8, 18, 28, 36, 46, 55, 63, NO_LED, NO_LED, NO_LED }, + { 9, 19, NO_LED, 37, NO_LED, 56, NO_LED, NO_LED, NO_LED, NO_LED } + }, { + // LED Index to Physical Position + { 0, 0 }, { 26.35, 0 }, { 39.53, 0 }, { 52.71, 0 }, { 65.88, 0 }, { 79.06, 0 }, { 92.24, 0 }, { 105.41, 0 }, { 118.59, 0 }, { 131.77, 0 }, { 144.94, 0 }, { 158.12, 0 }, { 171.29, 0 }, { 197.65, 0 }, { 210.82, 0 }, { 224, 0 }, + + { 0, 21.33 }, { 13.18, 21.33 }, { 26.35, 21.33 }, { 39.53, 21.33 }, { 52.71, 21.33 }, { 65.88, 21.33 }, { 79.06, 21.33 }, { 92.24, 21.33 }, { 105.41, 21.33 }, { 118.59, 21.33 }, { 131.77, 21.33 }, { 144.94, 21.33 }, { 158.12, 21.33 }, { 171.29, 21.33 }, { 197.65, 21.33 }, { 210.82, 21.33 }, { 224, 21.33 }, + { 0, 32 }, { 13.18, 32 }, { 26.35, 32 }, { 39.53, 32 }, { 52.71, 32 }, { 65.88, 32 }, { 79.06, 32 }, { 92.24, 32 }, { 105.41, 32 }, { 118.59, 32 }, { 131.77, 32 }, { 144.94, 32 }, { 158.12, 32 }, { 171.29, 32 }, { 197.65, 32 }, { 210.82, 32 }, { 224, 32 }, + { 0, 42.67 }, { 13.18, 42.67 }, { 26.35, 42.67 }, { 39.53, 42.67 }, { 52.71, 42.67 }, { 65.88, 42.67 }, { 79.06, 42.67 }, { 92.24, 42.67 }, { 105.41, 42.67 }, { 118.59, 42.67 }, { 131.77, 42.67 }, { 144.94, 42.67 }, { 171.29, 42.67 }, + { 0, 53.33 }, //{ 26.35, 53.33 }, { 39.53, 53.33 }, { 52.71, 53.33 }, { 65.88, 53.33 }, { 79.06, 53.33 }, { 92.24, 53.33 }, { 105.41, 53.33 }, { 118.59, 53.33 }, { 131.77, 53.33 }, { 144.94, 53.33 }, { 171.29, 53.33 }, { 210.82, 53.33 }, + //{ 0, 64 }, { 13.18, 64 }, { 26.35, 64 }, { 79.06, 64 }, { 131.77, 64 }, { 144.94, 64 }, { 158.12, 64 }, { 171.29, 64 }, { 197.65, 64 }, { 210.82, 64 }, { 224, 64 } + }, { + // LED Index to Flag + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, //4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + //1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1 + } }; +#endif diff --git a/keyboards/k_type/k_type.h b/keyboards/k_type/k_type.h index b0c1f2d652..077c013066 100644 --- a/keyboards/k_type/k_type.h +++ b/keyboards/k_type/k_type.h @@ -14,29 +14,29 @@ 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 K_TYPE_H -#define K_TYPE_H + +#pragma once #include "quantum.h" -#define KEYMAP( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, K15, K16, \ - K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, \ - K34, K35, K36, K37, K38, K39, K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K50, \ - K51, K52, K53, K54, K55, K56, K57, K58, K59, K60, K61, K62, K63, \ - K64, K65, K66, K67, K68, K69, K70, K71, K72, K73, K74, K75, K76, \ - K77, K78, K79, K80, K81, K82, K83, K84, K85, K86, K87 \ -) { \ - { K01, K11, K21, K30, K39, K48, K58, K65, KC_NO, K83, }, \ - { K02, K12, K22, KC_NO, K40, K49, K59, K66, K75, K84, }, \ - { K03, K13, K23, K31, K41, K50, K60, K67, KC_NO, K85, }, \ - { K04, K14, K24, K32, K42, K51, K61, K68, K76, K86, }, \ - { K05, K15, K25, K33, K43, K52, K62, K69, K77, K87, }, \ - { K06, K16, K26, K34, K44, K53, KC_NO, K70, K78, KC_NO, }, \ - { K07, K17, K27, K35, K45, K54, K63, K71, K79, KC_NO, }, \ - { K08, K18, K28, K36, K46, K55, KC_NO, K72, K80, KC_NO, }, \ - { K09, K19, K29, K37, K47, K56, K64, K73, K81, KC_NO, }, \ - { K10, K20, KC_NO, K38, KC_NO, K57, KC_NO, K74, K82, KC_NO, }, \ -} +#define XXX KC_NO -#endif +#define LAYOUT_tkl_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, k15, \ + k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k30, k32, k33, k34, \ + k35, k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47, k48, k50, k51, k52, \ + k53, k54, k55, k56, k57, k58, k59, k60, k61, k62, k63, k64, k66, \ + k68, k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k81, k83, \ + k84, k85, k86, k87, k88, k89, k90, k91, k92, k93, k94 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, XXX }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59 }, \ + { k60, k61, k62, k63, k64, XXX, k66, XXX, k68, XXX }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79 }, \ + { XXX, k81, XXX, k83, k84, k85, k86, k87, k88, k89 }, \ + { k90, k91, k92, k93, k94, XXX, XXX, XXX, XXX, XXX } \ +} diff --git a/keyboards/k_type/keymaps/belak/keymap.c b/keyboards/k_type/keymaps/belak/keymap.c index ed9392a2a5..e920579317 100644 --- a/keyboards/k_type/keymaps/belak/keymap.c +++ b/keyboards/k_type/keymaps/belak/keymap.c @@ -1,31 +1,27 @@ -#include "k_type.h" +#include QMK_KEYBOARD_H -#define _QW 0 -#define _L1 1 +enum layer_names { + _QW, + _L1 +}; const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QW] = KEYMAP( - 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, \ - MO(_L1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_L1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - [_L1] = KEYMAP( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_VOLU, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSTP, KC_MPRV, KC_VOLD, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), -}; - -// 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) { - + [_QW] = LAYOUT_tkl_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_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, + MO(_L1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_L1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_L1] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSTP, KC_MPRV, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) }; diff --git a/keyboards/k_type/keymaps/default/keymap.c b/keyboards/k_type/keymaps/default/keymap.c index 4f304b0120..b8df4df5ee 100644 --- a/keyboards/k_type/keymaps/default/keymap.c +++ b/keyboards/k_type/keymaps/default/keymap.c @@ -1,11 +1,13 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + [0] = LAYOUT_tkl_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ) }; diff --git a/keyboards/k_type/keymaps/rgb/config.h b/keyboards/k_type/keymaps/rgb/config.h new file mode 100644 index 0000000000..206b76f2b6 --- /dev/null +++ b/keyboards/k_type/keymaps/rgb/config.h @@ -0,0 +1,23 @@ +#pragma once + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_KEYPRESSES +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL + +// i2c_master defines +# define I2C1_SCL 0 // A2 on pinout = B0 +# define I2C1_SDA 1 // A2 on pinout = B1 +# define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 +# define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 +//# define I2C2_SCL 10 // A2 on pinout = C10 +//# define I2C2_SDA 11 // A2 on pinout = C11 +//# define I2C2_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 +//# define I2C2_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 + +# define DRIVER_ADDR_1 0b1010000 +# define DRIVER_ADDR_2 0b1010001 +# define DRIVER_COUNT 2 +# define DRIVER_1_LED_TOTAL 64 +//# define DRIVER_2_LED_TOTAL 55 +# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#endif diff --git a/keyboards/k_type/keymaps/rgb/keymap.c b/keyboards/k_type/keymaps/rgb/keymap.c new file mode 100644 index 0000000000..4ed15e5d66 --- /dev/null +++ b/keyboards/k_type/keymaps/rgb/keymap.c @@ -0,0 +1,30 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +#ifdef RGB_MATRIX_ENABLE +// Turn off SDB +void keyboard_pre_init_user() { + palSetPadMode(GPIOB, 16, PAL_MODE_OUTPUT_PUSHPULL); + palSetPad(GPIOB, 16); +} +#endif diff --git a/keyboards/k_type/keymaps/rgb/readme.md b/keyboards/k_type/keymaps/rgb/readme.md new file mode 100644 index 0000000000..794052c57a --- /dev/null +++ b/keyboards/k_type/keymaps/rgb/readme.md @@ -0,0 +1,5 @@ +# K-Type RGB Matrix Keymap + +This is an experimental keymap adding support for RGB Matrix on the K-Type. + +The board has two IS31FL3733 LED controllers, but they are each on different I2C buses, which QMK's `i2c_master` implementation currently does not support. As a result, all the keys after the left shift will not be lit. diff --git a/keyboards/k_type/keymaps/rgb/rules.mk b/keyboards/k_type/keymaps/rgb/rules.mk new file mode 100644 index 0000000000..a4206a1ad7 --- /dev/null +++ b/keyboards/k_type/keymaps/rgb/rules.mk @@ -0,0 +1 @@ +RGB_MATRIX_ENABLE = IS31FL3733 diff --git a/keyboards/k_type/matrix.c b/keyboards/k_type/matrix.c deleted file mode 100644 index d919bb8809..0000000000 --- a/keyboards/k_type/matrix.c +++ /dev/null @@ -1,138 +0,0 @@ -//#include -//#include -#include -#include "hal.h" -#include "timer.h" -#include "wait.h" -#include "print.h" -#include "matrix.h" -#include "debug.h" - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; -static bool debouncing = false; -static uint16_t debouncing_time = 0; - -void matrix_init(void) -{ - debug_matrix = true; - - /* Column(sense) */ - palSetPadMode(GPIOD, 5, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOD, 6, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOD, 7, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOC, 1, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOC, 2, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOC, 3, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOC, 4, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOC, 5, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOC, 6, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOC, 7, PAL_MODE_INPUT_PULLDOWN); - - /* Row(strobe) */ - palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 3, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 18, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 19, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 0, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 8, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 9, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOD, 1, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOD, 4, PAL_MODE_OUTPUT_PUSHPULL); - - memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); - memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t)); - - matrix_init_quantum(); -} - -uint8_t matrix_scan(void) -{ - for (int row = 0; row < MATRIX_ROWS; row++) { - matrix_row_t data = 0; - // strobe row - switch (row) { - case 0: palSetPad(GPIOB, 2); break; - case 1: palSetPad(GPIOB, 3); break; - case 2: palSetPad(GPIOB, 18); break; - case 3: palSetPad(GPIOB, 19); break; - case 4: palSetPad(GPIOC, 0); break; - case 5: palSetPad(GPIOC, 8); break; - case 6: palSetPad(GPIOC, 9); break; - case 7: palSetPad(GPIOD, 0); break; - case 8: palSetPad(GPIOD, 1); break; - case 9: palSetPad(GPIOD, 4); break; - } - - // need wait to settle pin state - // if you wait too short, or have a too high update rate - // the keyboard might freeze, or there might not be enough - // processing power to update the LCD screen properly. - // 20us, or two ticks at 100000Hz seems to be OK - wait_us(20); - - // read col data: { PTD5, PTD6, PTD7, PTC1, PTC2, PTC3, PTC4, PTC5, PTC6, PTC7 } - data = ((palReadPort(GPIOC) & 0xFEUL) << 2) | - ((palReadPort(GPIOD) & 0xE0UL) >> 5); - - // un-strobe row - switch (row) { - case 0: palClearPad(GPIOB, 2); break; - case 1: palClearPad(GPIOB, 3); break; - case 2: palClearPad(GPIOB, 18); break; - case 3: palClearPad(GPIOB, 19); break; - case 4: palClearPad(GPIOC, 0); break; - case 5: palClearPad(GPIOC, 8); break; - case 6: palClearPad(GPIOC, 9); break; - case 7: palClearPad(GPIOD, 0); break; - case 8: palClearPad(GPIOD, 1); break; - case 9: palClearPad(GPIOD, 4); break; - } - - if (matrix_debouncing[row] != data) { - matrix_debouncing[row] = data; - debouncing = true; - debouncing_time = timer_read(); - } - } - - if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { - for (int row = 0; row < MATRIX_ROWS; row++) { - matrix[row] = matrix_debouncing[row]; - } - debouncing = false; - } - - matrix_scan_quantum(); - return 1; -} - -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & (1 << col)); -} - -matrix_row_t matrix_get_row(uint8_t row) -{ - return matrix[row]; -} - -void matrix_print(void) -{ - xprintf("\nr/c 01234567\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - xprintf("%02X: ", row); - matrix_row_t data = matrix_get_row(row); - for (int col = 0; col < MATRIX_COLS; col++) { - if (data & (1</os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -# - NOTE: a custom ld script is needed for EEPROM on Teensy LC -# - LDSCRIPT = -# - MKL26Z64 for Teensy LC -# - MK20DX128 for Teensy 3.0 -# - MK20DX256 for Teensy 3.1 and 3.2 -# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader -# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader -MCU_LDSCRIPT = MK20DX256BLDR8 +# Bootloader selection +BOOTLOADER = kiibohd # Board: it should exist either in /os/hal/boards/ # or /boards @@ -19,27 +10,24 @@ MCU_LDSCRIPT = MK20DX256BLDR8 # hack to ensure the watchdog has started before trying to disable it. BOARD = IC_TEENSY_3_1 -DFU_ARGS = -d 1c11:b007 -DFU_SUFFIX_ARGS = -p b007 -v 1c11 - -BOOTLOADER = dfu - # Build Options -# comment out to disable the options. +# change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover -CUSTOM_MATRIX = yes # Custom matrix file -DEBUG_ENABLE = yes +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output -# project specific files -SRC = matrix.c +LAYOUTS = tkl_ansi # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/katana60/info.json b/keyboards/katana60/info.json deleted file mode 100644 index bbb8681034..0000000000 --- a/keyboards/katana60/info.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "keyboard_name": "Katana60", - "url": "", - "maintainer": "qmk", - "width": 15, - "height": 5, - "layouts": { - "LAYOUT": { - "key_count": 70, - "layout": [{"label":"k40", "x":0, "y":0}, {"label":"k41", "x":1, "y":0}, {"label":"k42", "x":2, "y":0}, {"label":"k43", "x":3, "y":0}, {"label":"k44", "x":4, "y":0}, {"label":"k45", "x":5, "y":0}, {"label":"k46", "x":6, "y":0}, {"label":"k47", "x":7, "y":0}, {"label":"k48", "x":8, "y":0}, {"label":"k49", "x":9, "y":0}, {"label":"k4a", "x":10, "y":0}, {"label":"k4b", "x":11, "y":0}, {"label":"k4c", "x":12, "y":0}, {"label":"k4d", "x":13, "y":0}, {"label":"k4e", "x":14, "y":0}, {"label":"k30", "x":0, "y":1, "w":1.5}, {"label":"k31", "x":1.5, "y":1}, {"label":"k32", "x":2.5, "y":1}, {"label":"k33", "x":3.5, "y":1}, {"label":"k34", "x":4.5, "y":1}, {"label":"k35", "x":5.5, "y":1}, {"label":"k36", "x":6.5, "y":1}, {"label":"k37", "x":7.5, "y":1}, {"label":"k38", "x":8.5, "y":1}, {"label":"k39", "x":9.5, "y":1}, {"label":"k3a", "x":10.5, "y":1}, {"label":"k3b", "x":11.5, "y":1}, {"label":"k3c", "x":12.5, "y":1}, {"label":"k3d", "x":13.5, "y":1, "w":1.5}, {"label":"k20", "x":0, "y":2, "w":1.25}, {"label":"k21", "x":1.25, "y":2}, {"label":"k22", "x":2.25, "y":2}, {"label":"k23", "x":3.25, "y":2}, {"label":"k24", "x":4.25, "y":2}, {"label":"k25", "x":5.25, "y":2}, {"label":"k26", "x":6.25, "y":2}, {"label":"k27", "x":7.75, "y":2}, {"label":"k28", "x":8.75, "y":2}, {"label":"k29", "x":9.75, "y":2}, {"label":"k2a", "x":10.75, "y":2}, {"label":"k2b", "x":11.75, "y":2}, {"label":"k2c", "x":12.75, "y":2}, {"label":"k2d", "x":13.75, "y":2, "w":1.25}, {"label":"k10", "x":0, "y":3}, {"label":"k11", "x":1, "y":3}, {"label":"k12", "x":2, "y":3}, {"label":"k13", "x":3, "y":3}, {"label":"k14", "x":4, "y":3}, {"label":"k15", "x":5, "y":3}, {"label":"k16", "x":6, "y":3}, {"label":"k17", "x":7, "y":3}, {"label":"k18", "x":8, "y":3}, {"label":"k19", "x":9, "y":3}, {"label":"k1a", "x":10, "y":3}, {"label":"k1b", "x":11, "y":3}, {"label":"k1c", "x":12, "y":3}, {"label":"k1d", "x":13, "y":3}, {"label":"k1e", "x":14, "y":3}, {"label":"k00", "x":0, "y":4}, {"label":"k01", "x":1, "y":4, "w":1.25}, {"label":"k02", "x":2.25, "y":4, "w":1.25}, {"label":"k03", "x":3.5, "y":4, "w":1.25}, {"label":"k04", "x":4.75, "y":4, "w":2.25}, {"label":"k05", "x":7, "y":4}, {"label":"k06", "x":8, "y":4, "w":2}, {"label":"k09", "x":10, "y":4}, {"label":"k0a", "x":11, "y":4}, {"label":"k0b", "x":12, "y":4}, {"label":"k0c", "x":13, "y":4}, {"label":"k0d", "x":14, "y":4}] - } - } -} diff --git a/keyboards/katana60/readme.md b/keyboards/katana60/readme.md deleted file mode 100644 index 5e1c7d3906..0000000000 --- a/keyboards/katana60/readme.md +++ /dev/null @@ -1,17 +0,0 @@ -# Katana60 - -![Katana60](https://i.imgur.com/xVkODOu.jpg) - -A 60% keyboard with a symmetrical staggered layout, sold by CandyKeys.com. - -Keyboard Maintainer: [Baris Tosun](https://github.com/rominronin) -Hardware Supported: Katana60 PCB v1, Teensy 2.0 -Hardware Availability: [CandyKeys.com](https://CandyKeys.com) - -Make example for this keyboard (after setting up your build environment): - - make katana60:default - -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. - -There is also ongoing discussion for the extend layer, at the [Colemak Forum](https://forum.colemak.com/topic/2327-developing-an-extend-layer-for-the-katana60/) \ No newline at end of file diff --git a/keyboards/kbdfans/bella/soldered/config.h b/keyboards/kbdfans/bella/soldered/config.h new file mode 100755 index 0000000000..0d729bebe8 --- /dev/null +++ b/keyboards/kbdfans/bella/soldered/config.h @@ -0,0 +1,42 @@ +/* Copyright 2020 dztech + * + * 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 . + */ +#pragma once +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4B42 +#define PRODUCT_ID 0x0007 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KBDFANS +#define PRODUCT BELLA SOLDERED +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, D1, B6 } +#define MATRIX_COL_PINS { C6, C7, F7, F6, F5, F4, F1, F0, D2, D3, D5, D4, D6, D7, B4, B5 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +#define DEBOUNCE 5 +#define LOCKING_SUPPORT_ENABLE +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/kbdfans/bella/soldered/info.json b/keyboards/kbdfans/bella/soldered/info.json new file mode 100644 index 0000000000..c031c117d8 --- /dev/null +++ b/keyboards/kbdfans/bella/soldered/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "bella_soldered", + "url": "", + "maintainer": "kbdfans", + "width": 16.25, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"x":15.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"x":13, "y":1.5}, {"label":"Backspace", "x":14, "y":1.5}, {"x":15.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"x":15.25, "y":3.5}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, {"label":"\u2191", "x":14.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Alt", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.5}, {"label":"Win", "x":11.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":13.25, "y":5.5}, {"label":"\u2193", "x":14.25, "y":5.5}, {"label":"\u2192", "x":15.25, "y":5.5}] + } + } +} diff --git a/keyboards/kbdfans/bella/soldered/keymaps/default/keymap.c b/keyboards/kbdfans/bella/soldered/keymaps/default/keymap.c new file mode 100755 index 0000000000..fc93b5ded1 --- /dev/null +++ b/keyboards/kbdfans/bella/soldered/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2020 dztech + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_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_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_ENT, KC_PGDN, + KC_LSFT, KC_BSLS, 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_LALT, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + +}; diff --git a/keyboards/kbdfans/bella/soldered/keymaps/via/keymap.c b/keyboards/kbdfans/bella/soldered/keymaps/via/keymap.c new file mode 100755 index 0000000000..b9c77ce911 --- /dev/null +++ b/keyboards/kbdfans/bella/soldered/keymaps/via/keymap.c @@ -0,0 +1,51 @@ +/* Copyright 2020 dztech + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_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_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_ENT, KC_PGDN, + KC_LSFT, KC_BSLS, 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_LALT, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; diff --git a/keyboards/kbdfans/bella/soldered/keymaps/via/rules.mk b/keyboards/kbdfans/bella/soldered/keymaps/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/kbdfans/bella/soldered/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/kbdfans/bella/soldered/rules.mk b/keyboards/kbdfans/bella/soldered/rules.mk new file mode 100755 index 0000000000..b0ed9e41e5 --- /dev/null +++ b/keyboards/kbdfans/bella/soldered/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/kbdfans/bella/soldered/soldered.c b/keyboards/kbdfans/bella/soldered/soldered.c new file mode 100755 index 0000000000..602543af2b --- /dev/null +++ b/keyboards/kbdfans/bella/soldered/soldered.c @@ -0,0 +1,28 @@ +/* Copyright 2020 dztech + * + * 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 "soldered.h" +void matrix_init_kb(void) { + setPinOutput(E6); + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(E6, !led_state.caps_lock); + } + return res; +} diff --git a/keyboards/kbdfans/bella/soldered/soldered.h b/keyboards/kbdfans/bella/soldered/soldered.h new file mode 100755 index 0000000000..cebfc1bc61 --- /dev/null +++ b/keyboards/kbdfans/bella/soldered/soldered.h @@ -0,0 +1,34 @@ +/* Copyright 2020 dztech + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, \ + K500, K501, K502, K506, K510, K511, K513, K514, K515 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, KC_NO, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO, K315 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO, K414, KC_NO }, \ + { K500, K501, K502, KC_NO, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, KC_NO, K513, K514, K515 } \ +} diff --git a/keyboards/kbdfans/kbd19x/config.h b/keyboards/kbdfans/kbd19x/config.h index 3fcda998c2..1146afa628 100644 --- a/keyboards/kbdfans/kbd19x/config.h +++ b/keyboards/kbdfans/kbd19x/config.h @@ -20,8 +20,8 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define VENDOR_ID 0x4B42 +#define PRODUCT_ID 0x0191 #define DEVICE_VER 0x0001 #define MANUFACTURER KBDFans #define PRODUCT kbd19x diff --git a/keyboards/kbdfans/kbd19x/kbd19x.h b/keyboards/kbdfans/kbd19x/kbd19x.h index 73f3cbe16c..28ad831589 100644 --- a/keyboards/kbdfans/kbd19x/kbd19x.h +++ b/keyboards/kbdfans/kbd19x/kbd19x.h @@ -41,61 +41,62 @@ inline void kbd19x_nmlk_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } * represents the switch matrix. */ -// 2u backspace: XXX, k1e -// split backspace: k1d, k1e +// 2u backspace: XXX, k71 +// split backspace: k70, k71 -// 2u numpad +: k2i, XXX -// split numpad +: k2i, k3i +// 2u numpad +: k2c, XXX +// split numpad +: k2c, k3c -// 2u numpad enter: k4i, XXX -// split numpad enter: k4i, k5i +// 2u numpad enter: k4c, XXX +// split numpad enter: k4c, k5c // 2.25u lshift: k40, XXX // split (1.25u, 1u) lshift: k40, k41 -// ANSI enter or ISO enter: k3e -// backslash or NUHS: k2e +// ANSI enter or ISO enter: k38 +// Key next to ISO enter: k72 +// backslash or NUHS: k73 // left winkey: k50, k51, k52 // left WKL: k50, XXX, k52 -// right winkey: k59, k5a, k5b -// right WKL: k59, XXX, k5b +// right winkey: k55, k56, k57 +// right WKL: k55, XXX, k57 #define LAYOUT_all( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0f, k0g, k0h, k0i, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, k1i, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k2f, k2g, k2h, k2i, \ - k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, k3f, k3g, k3h, k3i, \ - k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4e, k4f, k4g, k4h, k4i, \ - k50, k51, k52, k56, k59, k5a, k5b, k5d, k5e, k5f, k5g, k5h, k5i \ + k00, k01, k02, k03, k04, k60, k61, k62, k63, k05, k06, k07, k08, k72, k09, k0a, k0b, k0c, \ + k10, k11, k12, k13, k14, k64, k65, k66, k67, k15, k16, k17, k18, k70, k71, k19, k1a, k1b, k1c, \ + k20, k21, k22, k23, k24, k68, k69, k6a, k6b, k25, k26, k27, k28, k73, k29, k2a, k2b, k2c, \ + k30, k31, k32, k33, k34, k6c, k75, k76, k77, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k43, k44, k78, k79, k7a, k7b, k45, k46, k47, k48, k74, k49, k4a, k4b, k4c, \ + k50, k51, k52, k59, k55, k56, k57, k58, k53, k54, k5a, k5b, k5c \ )\ {\ - {k00, k01, k02, k03, k04, k09, k0a, k0b, k0c, k0f, k0g, k0h, k0i},\ - {k10, k11, k12, k13, k14, k19, k1a, k1b, k1c, k1f, k1g, k1h, k1i},\ - {k20, k21, k22, k23, k24, k29, k2a, k2b, k2c, k2f, k2g, k2h, k2i},\ - {k30, k32, k33, k34, k35, k3a, k3b, k3c, k3e, k3f, k3g, k3h, k3i},\ - {k40, k41, k42, k43, k44, k49, k4a, k4b, k4c, k4f, k4g, k4h, k4i},\ - {k50, k51, k52, k5e, k5f, k59, k5a, k5b, k5d, k56, k5g, k5h, k5i},\ - {k05, k06, k07, k08, k15, k16, k17, k18, k25, k26, k27, k28, k36},\ - {k1d, k1e, k0e, k2e, k4e, k37, k38, k39, k45, k46, k47, k48, XXX},\ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c},\ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c},\ + {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, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c},\ + {k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c},\ + {k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6a, k6b, k6c},\ + {k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7a, k7b, XXX},\ } #define LAYOUT_ansi( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0f, k0g, k0h, k0i, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, k1f, k1g, k1h, k1i, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k2f, k2g, k2h, k2i, \ - k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, k3f, k3g, k3h, \ - k40, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4e, k4f, k4g, k4h, k4i, \ - k50, k51, k52, k56, k59, k5a, k5b, k5d, k5e, k5f, k5g, k5h \ + k00, k01, k02, k03, k04, k60, k61, k62, k63, k05, k06, k07, k08, k72, k09, k0a, k0b, k0c, \ + k10, k11, k12, k13, k14, k64, k65, k66, k67, k15, k16, k17, k18, k71, k19, k1a, k1b, k1c, \ + k20, k21, k22, k23, k24, k68, k69, k6a, k6b, k25, k26, k27, k28, k73, k29, k2a, k2b, k2c, \ + k30, k31, k32, k33, k34, k6c, k75, k76, k77, k35, k36, k37, k38, k39, k3a, k3b, \ + k40, k42, k43, k44, k78, k79, k7a, k7b, k45, k46, k47, k48, k74, k49, k4a, k4b, k4c, \ + k50, k51, k52, k59, k55, k56, k57, k58, k53, k54, k5a, k5b \ )\ {\ - {k00, k01, k02, k03, k04, k09, k0a, k0b, k0c, k0f, k0g, k0h, k0i},\ - {k10, k11, k12, k13, k14, k19, k1a, k1b, k1c, k1f, k1g, k1h, k1i},\ - {k20, k21, k22, k23, k24, k29, k2a, k2b, k2c, k2f, k2g, k2h, k2i},\ - {k30, k32, k33, k34, k35, k3a, k3b, k3c, k3e, k3f, k3g, k3h, XXX},\ - {k40, XXX, k42, k43, k44, k49, k4a, k4b, k4c, k4f, k4g, k4h, k4i},\ - {k50, k51, k52, k5e, k5f, k59, k5a, k5b, k5d, k56, k5g, k5h, XXX},\ - {k05, k06, k07, k08, k15, k16, k17, k18, k25, k26, k27, k28, k36},\ - {XXX, k1e, k0e, k2e, k4e, k37, k38, k39, k45, k46, k47, k48, XXX},\ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c},\ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c},\ + {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, XXX},\ + {k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c},\ + {k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, XXX},\ + {k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6a, k6b, k6c},\ + {XXX, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7a, k7b, XXX},\ } diff --git a/keyboards/kbdfans/kbd19x/keymaps/via/keymap.c b/keyboards/kbdfans/kbd19x/keymaps/via/keymap.c new file mode 100644 index 0000000000..138fe97f1b --- /dev/null +++ b/keyboards/kbdfans/kbd19x/keymaps/via/keymap.c @@ -0,0 +1,56 @@ +/* +Copyright 2020 MechMerlin + +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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ansi( /* Base */ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, BL_STEP, KC_PSCR, KC_SLCK, KC_PAUS, KC_PGDN, \ + 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT \ + ), + [1] = LAYOUT_ansi( /* Func */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, \ + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [2] = LAYOUT_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [3] = LAYOUT_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; + + diff --git a/keyboards/kbdfans/kbd19x/keymaps/via/rules.mk b/keyboards/kbdfans/kbd19x/keymaps/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/kbdfans/kbd19x/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/kbdfans/kbd19x/readme.md b/keyboards/kbdfans/kbd19x/readme.md index 50adfb77f0..da37474adc 100644 --- a/keyboards/kbdfans/kbd19x/readme.md +++ b/keyboards/kbdfans/kbd19x/readme.md @@ -10,9 +10,9 @@ The KBD19x is a compact-1800 keyboard kit produced by KBDfans, offering a number **Reset Sequence:** Using this firmware sets `BOOTLOADER_ENABLE` to `lite`. While plugging in, hold the top left key, commonly programmed as `Esc` to put your board into bootloader mode. -Keyboard Maintainer: [jshuf](https://github.com/jshuf) -Hardware Supported: KBD19x PCB -Hardware Availability: [KBDfans](https://kbdfans.cn) +* Keyboard Maintainer: [jshuf](https://github.com/jshuf), [MechMerlin](https://github.com/mechmerlin) +* Hardware Supported: KBD19x PCB +* Hardware Availability: [KBDfans](https://kbdfans.cn) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/info.json b/keyboards/kbdfans/kbd67/mkii_soldered/info.json index 72c851e35a..cb012517aa 100644 --- a/keyboards/kbdfans/kbd67/mkii_soldered/info.json +++ b/keyboards/kbdfans/kbd67/mkii_soldered/info.json @@ -290,6 +290,78 @@ {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4} ] + }, + "LAYOUT_65_iso_blocker_split_bs": { + "layout": [{"label":"Esc", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"|", "x":13, "y":0}, + {"label":"Del", "x":14, "y":0}, + {"label":"Home", "x":15, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"End", "x":15, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"~", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"PgUp", "x":15, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"|", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":14, "y":3}, + {"label":"PgDn", "x":15, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Ctrl", "x":11.25, "y":4, "w":1.25}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} + ] } } } diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/king/keymap.c b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/king/keymap.c new file mode 100644 index 0000000000..70e2237d3a --- /dev/null +++ b/keyboards/kbdfans/kbd67/mkii_soldered/keymaps/king/keymap.c @@ -0,0 +1,65 @@ + /* Copyright 2020 King Wang Wong + * + * 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 QMK_KEYBOARD_H + + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* 0: _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_GRV│ KC_INS│ KC_DEL │ + * ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──┴───────┼─────────┤ + * │ KC_TAB │ KC_Q │ KC_W │ KC_E │ KC_R │ KC_T │ KC_Y │ KC_U │ KC_I │ KC_O │ KC_P │ KC_LBRC │ KC_RBRC │ KC_BSLS │ KC_PGUP │ + * ├──────────────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴──────────┼─────────┤ + * │ CTRL │ KC_A │ KC_S │ KC_D │ KC_F │ KC_G │ KC_H │ KC_J │ KC_K │ KC_L │ KC_SCLN │ KC_QUOT │ KC_ENT │ KC_PGDN │ + * ├────────────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────────┬─────────┼─────────┤ + * │ KC_LSFT │ KC_Z │ KC_X │ KC_C │ KC_V │ KC_B │ KC_N │ KC_M │ KC_COMM │ KC_DOT │ KC_SLSH │ KC_RSFT │ KC_UP │ MO(1) │ + * ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴───────┬─┴─────────┼─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───┬─────────┼─────────┼─────────┤ + * │ KC_LCTL │ KC_LGUI │ KC_LALT │ KC_SPC │ MO(1) │ KC_BSPC │ KC_RALT │ KC_RCTL │ │ KC_LEFT │ KC_DOWN │ KC_RGHT │ + * └───────────┴───────────┴───────────┴───────────────────────┴───────────┴───────────────────────────┴─────────┴─────────┴─────┴─────────┴─────────┴─────────┘ + */ + [0] = LAYOUT_all( + 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_GRV, KC_INS, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_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_PGDN, + KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_BSPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* 1: _FN1 + * ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬───────┬───────┬─────────┐ + * │ GRAVE │ KC_F1 │ KC_F2 │ KC_F3 │ KC_F4 │ KC_F5 │ KC_F6 │ KC_F7 │ KC_F8 │ KC_F9 │ KC_F10 │ KC_F11 │ KC_F12 │ ____│__ (2) │ RESET │ + * ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──┴───────┼─────────┤ + * │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ KC_VOLU │ + * ├──────────────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴─┬───────┴──────────┼─────────┤ + * │ CAPS │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ KC_VOLD │ + * ├────────────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────────┬─────────┼─────────┤ + * │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ + * ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───┬─────────┼─────────┼─────────┤ + * │ _______ │ _______ │ _______ │ _______ │ _______ │ _______ │ │ _______ │ _______ │ _______ │ + * └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────┴─────────┴─────────┴─────────┘ + */ + [1] = LAYOUT_all( + 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_MUTE, + _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + KC_CAPS, _______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; \ No newline at end of file diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h b/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h index 6b80aa20b6..48268d0be7 100644 --- a/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h +++ b/keyboards/kbdfans/kbd67/mkii_soldered/mkii_soldered.h @@ -74,14 +74,29 @@ #define LAYOUT_65_iso_blocker( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K113, K213, K214, \ K300, K404, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ K400, K401, K402, K405, K409, K410, K411, K413, K414 \ ) \ { \ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, K214 }, \ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ { K400, K401, K402, KC_NO, K404, K405, KC_NO, KC_NO, KC_NO, K409, K410, K411, KC_NO, K413, K414 } \ } + +#define LAYOUT_65_iso_blocker_split_bs( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K113, K213, K214, \ + K300, K404, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K402, K405, K409, K410, K411, K413, K414 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { K400, K401, K402, KC_NO, K404, K405, KC_NO, KC_NO, KC_NO, K409, K410, K411, KC_NO, K413, K414 } \ +} diff --git a/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.c b/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.c index 526949e6fe..323cb23848 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.c +++ b/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.c @@ -95,17 +95,7 @@ led_config_t g_led_config = { { 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1 } }; -#endif -void matrix_init_kb(void) { - matrix_init_user(); -} -void matrix_scan_kb(void) { - matrix_scan_user(); -} -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - return process_record_user(keycode, record); -} void suspend_power_down_kb(void) { rgb_matrix_set_suspend_state(true); @@ -126,6 +116,4 @@ void rgb_matrix_indicators_user(void) rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } } - - - +#endif diff --git a/keyboards/kbdfans/kbd75/keymaps/ethan605/keymap.c b/keyboards/kbdfans/kbd75/keymaps/ethan605/keymap.c new file mode 100644 index 0000000000..4a987b9a90 --- /dev/null +++ b/keyboards/kbdfans/kbd75/keymaps/ethan605/keymap.c @@ -0,0 +1,67 @@ +/* Copyright 2020 @ethan605 + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: Qwerty layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ ESC │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ INS │ DEL │ FN │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ BSPC │HOME │ + * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬────────┼─────┤ + * │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ BSLS │END │ + * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤ + * │ LCTRL │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ ENTER │PGUP │ + * ├─────────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤ + * │ LSHFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ RSHFT │ UP │PGDN │ + * ├──────┬─────┴─┬───┴──┬──┴─────┴─────┴─────┴─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤ + * │ CAPS │ LALT │ LCMD │ SPC │RCMD │RALT │RCTL │LEFT │DOWN │RIGHT│ + * └──────┴───────┴──────┴─────────────────────────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, MO(1), + 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_BSPC, KC_HOME, + 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_END, + 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_PGUP, + KC_LSFT, MO(1), 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_CAPS, KC_LALT, KC_LCMD, KC_SPC, KC_SPC, KC_SPC, KC_RCMD, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* 1: Function layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ FN │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┴─────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ RESET │ │ + * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬────────┼─────┤ + * │ │ TOG │ MOD │ HU+ │ HU- │ SA+ │ SA- │ VA+ │ VA- │ │ │ │ │ │ │ // RGB controls + * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤ + * │ │ │ │ │ DEC │ TOG │ INC │STEP │ │ │ │ │ │ │ // Backlight controls + * ├──────┬─────┴─┬───┴──┬──┴─────┴─────┴─────┴─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └──────┴───────┴──────┴─────────────────────────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/kbdfans/maja_soldered/config.h b/keyboards/kbdfans/maja_soldered/config.h new file mode 100755 index 0000000000..bc284893d5 --- /dev/null +++ b/keyboards/kbdfans/maja_soldered/config.h @@ -0,0 +1,44 @@ +/* Copyright 2020 dztech kbdfans + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0x4B42 +#define PRODUCT_ID 0x6069 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KBDFANS +#define PRODUCT MAJA_SOLDERED + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 +#define MATRIX_ROW_PINS { F0, B6, D6, B4, D7 } +#define MATRIX_COL_PINS { C6, C7, F7, F6, F5, F4, F1, B0, B1, B2, B3, B7, D2, D3, D5 } +#define DIODE_DIRECTION COL2ROW + +#define DEBOUNCE 3 + +/* number of backlight levels */ +#define BACKLIGHT_PIN B5 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* 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 diff --git a/keyboards/kbdfans/maja_soldered/info.json b/keyboards/kbdfans/maja_soldered/info.json new file mode 100644 index 0000000000..b583282a9a --- /dev/null +++ b/keyboards/kbdfans/maja_soldered/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "MAJA_SOLDERED", + "url": "", + "maintainer": "DZTECH", + "width": 18.75, + "height": 5.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0.75, "y": 0.25}, + {"x": 1.75, "y": 0.25}, + {"x": 2.75, "y": 0}, + {"x": 3.75, "y": 0.25}, + {"x": 4.75, "y": 0.25}, + {"x": 5.75, "y": 0.25}, + {"x": 6.75, "y": 0.25}, + {"x": 8.75, "y": 0.25}, + {"x": 9.75, "y": 0.25}, + {"x": 10.75, "y": 0.25}, + {"x": 11.75, "y": 0.25}, + {"x": 12.75, "y": 0}, + {"x": 13.75, "y": 0.25}, + {"x": 14.75, "y": 0.25}, + {"x": 15.75, "y": 0.25}, + {"x": 17.75, "y": 0.25}, + {"x": 0.5, "y": 1.25, "w": 1.5}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + {"x": 4, "y": 1.25}, + {"x": 5, "y": 1.25}, + {"x": 6, "y": 1.25}, + {"x": 8.5, "y": 1.25}, + {"x": 9.5, "y": 1.25}, + {"x": 10.5, "y": 1.25}, + {"x": 11.5, "y": 1.25}, + {"x": 12.5, "y": 1.25}, + {"x": 13.5, "y": 1.25}, + {"x": 14.5, "y": 1.25}, + {"x": 15.5, "y": 1.25, "w": 1.5}, + {"x": 17.75, "y": 1.25}, + {"x": 0.25, "y": 2.25, "w": 1.75}, + {"x": 2, "y": 2.25}, + {"x": 3, "y": 2.25}, + {"x": 4, "y": 2.25}, + {"x": 5, "y": 2.25}, + {"x": 6, "y": 2.25}, + {"x": 9, "y": 2.25}, + {"x": 10, "y": 2.25}, + {"x": 11, "y": 2.25}, + {"x": 12, "y": 2.25}, + {"x": 13, "y": 2.25}, + {"x": 14, "y": 2.25}, + {"x": 15, "y": 2.25, "w": 2.25}, + {"x": 17.75, "y": 2.25}, + {"x": 0, "y": 3.25, "w": 2.25}, + {"x": 2.25, "y": 3.25}, + {"x": 3.25, "y": 3.25}, + {"x": 4.25, "y": 3.25}, + {"x": 5.25, "y": 3.25}, + {"x": 6.25, "y": 3.25}, + {"x": 8.25, "y": 3.25}, + {"x": 9.25, "y": 3.25}, + {"x": 10.25, "y": 3.25}, + {"x": 11.25, "y": 3.25}, + {"x": 12.25, "y": 3.25}, + {"x": 13.25, "y": 3.25}, + {"x": 14.25, "y": 3.25, "w": 2.25}, + {"x": 16.75, "y": 3.5}, + {"x": 0, "y": 4.25, "w": 1.5}, + {"x": 3, "y": 4.25, "w": 1.5}, + {"x": 4.5, "y": 4.25, "w": 2}, + {"x": 6.5, "y": 4.25, "w": 1.25}, + {"x": 8.25, "y": 4.25, "w": 2.75}, + {"x": 11, "y": 4.25, "w": 1.5}, + {"x": 15.75, "y": 4.5}, + {"x": 16.75, "y": 4.5}, + {"x": 17.75, "y": 4.5} + ] + } + } +} diff --git a/keyboards/kbdfans/maja_soldered/keymaps/default/keymap.c b/keyboards/kbdfans/maja_soldered/keymaps/default/keymap.c new file mode 100755 index 0000000000..a86004ef72 --- /dev/null +++ b/keyboards/kbdfans/maja_soldered/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2020 dztech kbdfans + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + 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_DEL, KC_HOME, + 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_BSLASH, KC_PGUP, + CTL_T(KC_CAPS),KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(1), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + [1] = LAYOUT( /* FN */ + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RESET,KC_TRNS,KC_HOME, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_PGUP, + CTL_T(KC_CAPS),RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, KC_PGDN, + KC_LSFT, 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_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), + [2] = LAYOUT( /* FN */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [3] = LAYOUT( /* FN */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + }; diff --git a/keyboards/kbdfans/maja_soldered/keymaps/via/keymap.c b/keyboards/kbdfans/maja_soldered/keymaps/via/keymap.c new file mode 100755 index 0000000000..cf64bec4c8 --- /dev/null +++ b/keyboards/kbdfans/maja_soldered/keymaps/via/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2020 dztech kbdfans + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + 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_DEL, KC_HOME, + 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_BSLASH, KC_PGUP, + CTL_T(KC_CAPS),KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(1), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + [1] = LAYOUT( /* FN */ + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RESET,KC_TRNS,KC_HOME, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_PGUP, + CTL_T(KC_CAPS),RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, KC_PGDN, + KC_LSFT, 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_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), + [2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [3] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + }; diff --git a/keyboards/kbdfans/maja_soldered/keymaps/via/rules.mk b/keyboards/kbdfans/maja_soldered/keymaps/via/rules.mk new file mode 100755 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/kbdfans/maja_soldered/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/kbdfans/maja_soldered/maja_soldered.c b/keyboards/kbdfans/maja_soldered/maja_soldered.c new file mode 100755 index 0000000000..1f0f48c4cd --- /dev/null +++ b/keyboards/kbdfans/maja_soldered/maja_soldered.c @@ -0,0 +1,29 @@ +/* Copyright 2020 dztech kbdfans + * + * 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 "maja_soldered.h" + +void matrix_init_kb(void) { + setPinOutput(D4); + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(D4, !led_state.caps_lock); + } + return res; +} diff --git a/keyboards/kbdfans/maja_soldered/maja_soldered.h b/keyboards/kbdfans/maja_soldered/maja_soldered.h new file mode 100755 index 0000000000..4834c2b74f --- /dev/null +++ b/keyboards/kbdfans/maja_soldered/maja_soldered.h @@ -0,0 +1,19 @@ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K3E, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K42, K43, K45, K47, K49, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, XXX, K42, K43, XXX, K45, XXX, K47, XXX, K49, XXX, XXX, K4C, K4D, K4E } \ +} diff --git a/keyboards/kbdfans/maja_soldered/readme.md b/keyboards/kbdfans/maja_soldered/readme.md new file mode 100755 index 0000000000..f19c1d7403 --- /dev/null +++ b/keyboards/kbdfans/maja_soldered/readme.md @@ -0,0 +1,14 @@ +# MAJA_SOLDERED + +![MAJA_SOLDERED](https://i.ibb.co/4Kq0wfp/20200816100310.png) +![MAJA_SOLDERED](https://i.ibb.co/3vJM805/20200816100345.png) + +* Keyboard Maintainer: [DZTECH](https://github.com/moyi4681) +* Hardware Supported: MAJA_SOLDERED +* Hardware Availability: [KBDFans](https://kbdfans.cn/) + +Make example for this keyboard (after setting up your build environment): + + make kbdfans/maja_soldered:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kbdfans/maja_soldered/rules.mk b/keyboards/kbdfans/maja_soldered/rules.mk new file mode 100755 index 0000000000..6cd4d92603 --- /dev/null +++ b/keyboards/kbdfans/maja_soldered/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in diff --git a/keyboards/kc60/keymaps/noroadsleft/rules.mk b/keyboards/kc60/keymaps/noroadsleft/rules.mk index c9805878d2..2eab7943dd 100644 --- a/keyboards/kc60/keymaps/noroadsleft/rules.mk +++ b/keyboards/kc60/keymaps/noroadsleft/rules.mk @@ -1,6 +1,6 @@ # https://github.com/qmk/qmk_firmware/issues/3448#issuecomment-406636125 # EXTRAFLAGS += -flto -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes MOUSEKEY_ENABLE = no # Mouse keys # COMMAND_ENABLE = no # Commands for debug and configuration diff --git a/keyboards/keebio/bdn9/keymaps/ghostseven/config.h b/keyboards/keebio/bdn9/keymaps/ghostseven/config.h new file mode 100644 index 0000000000..6df867d575 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/ghostseven/config.h @@ -0,0 +1,20 @@ +/* Copyright 2020 GhostSeven + * + * 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 . + */ +#pragma once + +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_KEYPRESSES +#endif diff --git a/keyboards/keebio/bdn9/keymaps/ghostseven/keymap.c b/keyboards/keebio/bdn9/keymaps/ghostseven/keymap.c new file mode 100644 index 0000000000..445e6e896a --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/ghostseven/keymap.c @@ -0,0 +1,70 @@ +/* Copyright 2020 GhostSeven + * + * 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 QMK_KEYBOARD_H + +enum encoder_names { + _LEFT, + _RIGHT, + _MIDDLE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + | Knob 1: Vol Dn/Up | | Knob 2: Page Dn/Up | + | Press: Mute | Home | Press: Play/Pause | + | Hold: Layer 2 | Up | Enter | + | Left | Down | Right | + */ + [0] = LAYOUT( + KC_MUTE, KC_HOME, KC_MPLY, + MO(1) , KC_UP , KC_ENT, + KC_LEFT, KC_DOWN, KC_RGHT + ), + /* + | RESET | Shift+CMD+B (Build VS Code) | Media Stop | + | Held: Layer 2 | Home | RGB Mode | + | Media Previous | End | Media Next | + */ + [1] = LAYOUT( + RESET , S(G(KC_B)), KC_STOP, + _______, KC_HOME, RGB_MOD, + KC_MPRV, KC_END , KC_MNXT + ), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == _LEFT) { + if (clockwise) { + tap_code(KC_VOLD); + } else { + tap_code(KC_VOLU); + } + } + else if (index == _MIDDLE) { + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } + else if (index == _RIGHT) { + if (clockwise) { + tap_code(KC_PGUP); + } else { + tap_code(KC_PGDN); + } + } +} diff --git a/keyboards/keebio/bdn9/keymaps/via/rules.mk b/keyboards/keebio/bdn9/keymaps/via/rules.mk index aa554ae294..d96967a608 100644 --- a/keyboards/keebio/bdn9/keymaps/via/rules.mk +++ b/keyboards/keebio/bdn9/keymaps/via/rules.mk @@ -1,5 +1,5 @@ VIA_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes MOUSEKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = no diff --git a/keyboards/keebio/bfo9000/config.h b/keyboards/keebio/bfo9000/config.h index 0b279bc343..671575536e 100644 --- a/keyboards/keebio/bfo9000/config.h +++ b/keyboards/keebio/bfo9000/config.h @@ -53,6 +53,7 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN B4 #define RGBLED_NUM 20 // Number of LEDs +#define RGBLED_SPLIT { 10, 10 } /* * Feature disable options diff --git a/keyboards/keebio/fourier/config.h b/keyboards/keebio/fourier/config.h index a0e85a3b1e..b9db50aac5 100644 --- a/keyboards/keebio/fourier/config.h +++ b/keyboards/keebio/fourier/config.h @@ -65,6 +65,7 @@ along with this program. If not, see . #define RGB_DI_PIN D3 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 14 // Number of LEDs +#define RGBLED_SPLIT { 7, 7 } /* * Feature disable options diff --git a/keyboards/keebio/iris/keymaps/333fred/config.h b/keyboards/keebio/iris/keymaps/333fred/config.h index c3997b0f47..3c8ba4cb25 100644 --- a/keyboards/keebio/iris/keymaps/333fred/config.h +++ b/keyboards/keebio/iris/keymaps/333fred/config.h @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #pragma once #define USE_SERIAL diff --git a/keyboards/keebio/iris/keymaps/333fred/keymap.c b/keyboards/keebio/iris/keymaps/333fred/keymap.c index b8a65d7d29..1141e6b009 100644 --- a/keyboards/keebio/iris/keymaps/333fred/keymap.c +++ b/keyboards/keebio/iris/keymaps/333fred/keymap.c @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include QMK_KEYBOARD_H #include "333fred.h" diff --git a/keyboards/keebio/iris/keymaps/dcompact/keymap.c b/keyboards/keebio/iris/keymaps/dcompact/keymap.c index ec1ffac8c1..90e48c9c92 100644 --- a/keyboards/keebio/iris/keymaps/dcompact/keymap.c +++ b/keyboards/keebio/iris/keymaps/dcompact/keymap.c @@ -9,6 +9,19 @@ #define WKSP_U LALT(LCTL(KC_UP)) #define WKSP_R LALT(LCTL(KC_RGHT)) +#define AM_CYC A(S(KC_SPC)) +#define AM_SHR A(S(KC_COMM)) +#define AM_GRW A(S(KC_DOT)) +#define AM_REL A(S(KC_Z)) +#define AM_LFT A(S(KC_H)) +#define AM_RGH A(S(KC_L)) +#define AM_CW A(S(KC_K)) +#define AM_CCW A(S(KC_J)) +#define AM_TLL A(S(KC_1)) +#define AM_TLW A(S(KC_2)) +#define AM_BSP A(S(KC_3)) +#define AM_FUL A(S(KC_4)) + enum custom_layers { _BASE, _LOWER, @@ -52,11 +65,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, + XXXXXXX, AM_CYC, AM_SHR, AM_GRW, AM_REL, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX, KC_PSCR, KC_MENU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, + XXXXXXX, AM_LFT, AM_CCW, AM_CW, AM_RGH, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX, KC_CAPS, KC_LNUM, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, WKSP_L, WKSP_D, WKSP_U, WKSP_R, XXXXXXX, + XXXXXXX, AM_TLL, AM_TLW, AM_BSP, AM_FUL, XXXXXXX, XXXXXXX, WKSP_L, WKSP_D, WKSP_U, WKSP_R, XXXXXXX, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ @@ -138,7 +151,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, _______, _______, _______, BL_STEP, RGB_TOG, RGB_HUI, RGB_SAI, RGB_SAI, _______, _______, + _______, _______, _______, _______, _______, BL_STEP, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ _______, _______, _______, _______, _______, BL_BRTG, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ diff --git a/keyboards/keebio/iris/keymaps/pvinis/rules.mk b/keyboards/keebio/iris/keymaps/pvinis/rules.mk index deeb312036..1e7e2d417a 100644 --- a/keyboards/keebio/iris/keymaps/pvinis/rules.mk +++ b/keyboards/keebio/iris/keymaps/pvinis/rules.mk @@ -4,6 +4,6 @@ RGBLIGHT_ENABLE = yes # rgb leds underlight ENCODER_ENABLE = yes # rotary knob # Some extra stuff to make firmware smaller. -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes CONSOLE_ENABLE = no COMMAND_ENABLE = no diff --git a/keyboards/keebio/iris/keymaps/via/rules.mk b/keyboards/keebio/iris/keymaps/via/rules.mk index 92f9671eeb..36b7ba9cbc 100644 --- a/keyboards/keebio/iris/keymaps/via/rules.mk +++ b/keyboards/keebio/iris/keymaps/via/rules.mk @@ -1,2 +1,2 @@ VIA_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/keebio/iris/rev2/config.h b/keyboards/keebio/iris/rev2/config.h index 4ead367d3c..c3da1321c3 100644 --- a/keyboards/keebio/iris/rev2/config.h +++ b/keyboards/keebio/iris/rev2/config.h @@ -60,4 +60,5 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLED_NUM 12 // Number of LEDs +#define RGBLED_SPLIT { 6, 6 } #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/keebio/levinson/rev1/config.h b/keyboards/keebio/levinson/rev1/config.h index 5b23f18c1d..a8854b1357 100644 --- a/keyboards/keebio/levinson/rev1/config.h +++ b/keyboards/keebio/levinson/rev1/config.h @@ -51,8 +51,8 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 - #define RGBLED_NUM 12 // Number of LEDs +#define RGBLED_SPLIT { 6, 6 } /* Backlight LEDs */ #define BACKLIGHT_PIN C6 diff --git a/keyboards/keebio/levinson/rev2/config.h b/keyboards/keebio/levinson/rev2/config.h index e8e7294dd8..5b1ae6fe1e 100644 --- a/keyboards/keebio/levinson/rev2/config.h +++ b/keyboards/keebio/levinson/rev2/config.h @@ -51,8 +51,8 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 - #define RGBLED_NUM 12 // Number of LEDs +#define RGBLED_SPLIT { 6, 6 } /* Backlight LEDs */ #define BACKLIGHT_PIN B5 diff --git a/keyboards/keebio/nyquist/keymaps/winternebs/config.h b/keyboards/keebio/nyquist/keymaps/winternebs/config.h new file mode 100755 index 0000000000..263af1de91 --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/winternebs/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +// #define USE_I2C + +/* Select hand configuration */ +// #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 + +#define MOUSEKEY_DELAY 80 +#define MOUSEKEY_INTERVAL 16 +#define MOUSEKEY_MAXSPEED 6 +#define MOUSEKEY_TIME_TO_MAX 10 +#define MOUSEKEY_WHEEL_MAX_SPEED 4 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 10 + +#ifndef FORCE_NKRO +# define FORCE_NKRO +#endif diff --git a/keyboards/keebio/nyquist/keymaps/winternebs/keymap.c b/keyboards/keebio/nyquist/keymaps/winternebs/keymap.c new file mode 100755 index 0000000000..bb1ab6ca4d --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/winternebs/keymap.c @@ -0,0 +1,143 @@ +/* Copyright 2020 winterNebs + * + * 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 QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layers { + _QWERTY, + _WORKMAN, + _LOWER, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + WORKMAN, +}; + +#define LOWER MO(_LOWER) +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | | Alt |Lower |Space | Bksp |Adjust| | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + 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, KC_ENT , + KC_LCTL, KC_LGUI, _______, KC_LALT, LOWER, KC_SPC, KC_BSPC, ADJUST, z, KC_LEFT, KC_DOWN, KC_RGHT +), +/* Workman + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | Q | D | R | W | B | J | F | U | P | ; | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | H | T | G | Y | N | E | O | I | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | M | C | V | K | L | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | | Alt |Lower |Space | Bksp |Adjust| | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_WORKMAN] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_ESC, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_DEL, + KC_TAB, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + KC_LCTL, KC_LGUI, _______, KC_LALT, LOWER, KC_SPC, KC_BSPC, ADJUST, _______, KC_LEFT, KC_DOWN, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | |Pg Up | UP |Pg Dn | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |PrScr | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( + KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + 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_PGUP, KC_UP, KC_PGDN, + _______, _______, KC_PSCR, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn| | | | | ScrL | ScrR | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Sat Up|Sat Dn|Val Up|Val Dn|AGnorm|AGswap| Home | M1 | ^ | M2 |ScrUp | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Qwerty|WORKMN| | End | < | v | > |Scrdn | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | Left | Down | Up |Right | Vol+ |Pause | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | NKRO | | | | | | | | Last | Vol- | Next | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( + RESET, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, _______, _______, _______, _______, KC_WH_L, KC_WH_R, _______, + RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, AG_NORM, AG_SWAP, KC_HOME, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, + _______, _______, _______, QWERTY, WORKMAN, _______, KC_END, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLU, KC_MPLY, + MAGIC_TOGGLE_NKRO, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT +) + + +}; + + +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 WORKMAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_WORKMAN); + } + return false; + break; + } + return true; +} diff --git a/keyboards/keebio/nyquist/keymaps/winternebs/rules.mk b/keyboards/keebio/nyquist/keymaps/winternebs/rules.mk new file mode 100755 index 0000000000..bcb6ddebdd --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/winternebs/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes diff --git a/keyboards/keebio/nyquist/rev1/config.h b/keyboards/keebio/nyquist/rev1/config.h index 75fa43b587..0822f91ad9 100644 --- a/keyboards/keebio/nyquist/rev1/config.h +++ b/keyboards/keebio/nyquist/rev1/config.h @@ -56,8 +56,8 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 - -#define RGBLED_NUM 16 // Number of LEDs +#define RGBLED_NUM 12 +#define RGBLED_SPLIT { 6, 6 } /* * Feature disable options diff --git a/keyboards/keebio/nyquist/rev2/config.h b/keyboards/keebio/nyquist/rev2/config.h index 9775113c63..2810bde7a2 100644 --- a/keyboards/keebio/nyquist/rev2/config.h +++ b/keyboards/keebio/nyquist/rev2/config.h @@ -53,8 +53,8 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 - -#define RGBLED_NUM 16 // Number of LEDs +#define RGBLED_NUM 12 +#define RGBLED_SPLIT { 6, 6 } /* Backlight LEDs */ #define BACKLIGHT_PIN B6 diff --git a/keyboards/keebio/quefrency/keymaps/drashna_ms/config.h b/keyboards/keebio/quefrency/keymaps/drashna_ms/config.h index ec2a2ea164..089c8cf79e 100644 --- a/keyboards/keebio/quefrency/keymaps/drashna_ms/config.h +++ b/keyboards/keebio/quefrency/keymaps/drashna_ms/config.h @@ -29,6 +29,7 @@ along with this program. If not, see . #define RGBLIGHT_SPLIT #undef RGBLED_NUM #define RGBLED_NUM 17 + #undef RGBLED_SPLIT #define RGBLED_SPLIT { 9, 8 } #define RGBLIGHT_SLEEP #endif diff --git a/keyboards/keebio/quefrency/keymaps/drashna_ms/rules.mk b/keyboards/keebio/quefrency/keymaps/drashna_ms/rules.mk index 1b8b582abc..fb7f940c93 100644 --- a/keyboards/keebio/quefrency/keymaps/drashna_ms/rules.mk +++ b/keyboards/keebio/quefrency/keymaps/drashna_ms/rules.mk @@ -1,4 +1,4 @@ -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes RGBLIGHT_ENABLE = yes EXTRAKEY_ENABLE = yes AUDIO_ENABLE = yes diff --git a/keyboards/keebio/quefrency/keymaps/joestrong/README.md b/keyboards/keebio/quefrency/keymaps/joestrong/README.md new file mode 100644 index 0000000000..717b9ecd54 --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/joestrong/README.md @@ -0,0 +1,17 @@ +# JoeStrong's Quefrency layout - 60% ISO + +* Standard UK ISO qwerty layout +* Function key in place of Caps Lock +* Function layer provides vim-like arrows and various function keys + +## Default layer + +![Default layer layout](https://i.imgur.com/HXeKSGN.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/f606625fbc4b84a0e9f82fff308aad29)) + +## Function layer + +![Function layer layout](https://i.imgur.com/cVKl9tB.png) + +([KLE](http://www.keyboard-layout-editor.com/#/gists/b75402b2838f36e319f1c0a7fef07dd6)) diff --git a/keyboards/keebio/quefrency/keymaps/joestrong/config.h b/keyboards/keebio/quefrency/keymaps/joestrong/config.h new file mode 100644 index 0000000000..f9efe78c5b --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/joestrong/config.h @@ -0,0 +1,27 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2018 Danny Nguyen + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C diff --git a/keyboards/keebio/quefrency/keymaps/joestrong/keymap.c b/keyboards/keebio/quefrency/keymaps/joestrong/keymap.c new file mode 100644 index 0000000000..ead47592cc --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/joestrong/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2020 Joseph Strong + * + * 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 QMK_KEYBOARD_H +#include "keymap_uk.h" + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN1 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_60_iso( + 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, + MO(_FN1),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, UK_BSLS, 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, MO(_FN1), KC_LALT, KC_SPC, _______, KC_SPC, KC_RALT, MO(_FN1), _______, KC_LGUI, KC_RCTL + ), + + [_FN1] = LAYOUT_60_iso( + 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, _______, _______, + RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, + _______, _______, KC__VOLDOWN, KC__VOLUP, KC__MUTE, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/keebio/quefrency/keymaps/via/rules.mk b/keyboards/keebio/quefrency/keymaps/via/rules.mk index 540fc2ac3f..4b1bcabda8 100644 --- a/keyboards/keebio/quefrency/keymaps/via/rules.mk +++ b/keyboards/keebio/quefrency/keymaps/via/rules.mk @@ -1,3 +1,3 @@ VIA_ENABLE = yes CONSOLE_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/keebio/quefrency/rev1/config.h b/keyboards/keebio/quefrency/rev1/config.h index e9379ab2ff..b675071874 100644 --- a/keyboards/keebio/quefrency/rev1/config.h +++ b/keyboards/keebio/quefrency/rev1/config.h @@ -55,6 +55,7 @@ along with this program. If not, see . #define RGB_DI_PIN D3 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 16 // Number of LEDs +#define RGBLED_SPLIT { 8, 8 } // Set 65% column (option 1) and Macro (option 2) on by default #define VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT 0x60 diff --git a/keyboards/keebio/viterbi/keymaps/via/keymap.c b/keyboards/keebio/viterbi/keymaps/via/keymap.c new file mode 100644 index 0000000000..6360202ee0 --- /dev/null +++ b/keyboards/keebio/viterbi/keymaps/via/keymap.c @@ -0,0 +1,38 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + + LAYOUT_ortho_5x14( + KC_INS, 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_MINS, 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_EQL, 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_PGUP, KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_HOME, KC_END , + KC_PGDN, MO(3) , KC_LCTL, KC_LALT, KC_LGUI, MO(1) , KC_SPC , KC_SPC , MO(2) , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_BSLS + ), + + LAYOUT_ortho_5x14( + _______, KC_TILD, 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_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, + KC_PLUS, _______, 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE + ), + + LAYOUT_ortho_5x14( + _______, KC_TILD, 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_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_LCBR, KC_RCBR, + KC_PLUS, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_MINS, KC_EQL , KC_LBRC, KC_RBRC, _______, _______, + _______, _______, KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_NUHS, KC_NUBS, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE + ), + + LAYOUT_ortho_5x14( + _______, 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_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, _______, + _______, _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/keebio/viterbi/keymaps/via/rules.mk b/keyboards/keebio/viterbi/keymaps/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/keebio/viterbi/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/keebio/viterbi/rev1/config.h b/keyboards/keebio/viterbi/rev1/config.h index 12a61448d1..131bf8fbc6 100644 --- a/keyboards/keebio/viterbi/rev1/config.h +++ b/keyboards/keebio/viterbi/rev1/config.h @@ -51,3 +51,4 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLED_NUM 14 +#define RGBLED_SPLIT { 7, 7 } diff --git a/keyboards/keebio/viterbi/rev2/config.h b/keyboards/keebio/viterbi/rev2/config.h index 0b78604d8f..7775151922 100644 --- a/keyboards/keebio/viterbi/rev2/config.h +++ b/keyboards/keebio/viterbi/rev2/config.h @@ -19,7 +19,7 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0xCB10 -#define PRODUCT_ID 0x1157 +#define PRODUCT_ID 0x2157 #define DEVICE_VER 0x0200 #define MANUFACTURER Keebio #define PRODUCT The Viterbi Keyboard @@ -50,6 +50,7 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLED_NUM 14 +#define RGBLED_SPLIT { 7, 7 } /* Backlight LEDs */ #define BACKLIGHT_PIN B6 diff --git a/keyboards/keebzdotnet/wazowski/config.h b/keyboards/keebzdotnet/wazowski/config.h index 56f05515af..26c7ccd5e1 100644 --- a/keyboards/keebzdotnet/wazowski/config.h +++ b/keyboards/keebzdotnet/wazowski/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0x4B5A // "KZ" #define PRODUCT_ID 0x53FC #define DEVICE_VER 0x0001 #define MANUFACTURER keebzdotnet diff --git a/keyboards/keebzdotnet/wazowski/keymaps/via/keymap.c b/keyboards/keebzdotnet/wazowski/keymaps/via/keymap.c new file mode 100644 index 0000000000..9421429067 --- /dev/null +++ b/keyboards/keebzdotnet/wazowski/keymaps/via/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2020 keebzdotnet + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [0] = LAYOUT( + 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 + ), + [1] = LAYOUT( + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______ + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______ + ), + [3] = LAYOUT( + _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, _______ + ), +}; diff --git a/keyboards/keebzdotnet/wazowski/keymaps/via/rules.mk b/keyboards/keebzdotnet/wazowski/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/keebzdotnet/wazowski/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/keebzdotnet/wazowski/rules.mk b/keyboards/keebzdotnet/wazowski/rules.mk index b8ce67b680..e82d793bcc 100644 --- a/keyboards/keebzdotnet/wazowski/rules.mk +++ b/keyboards/keebzdotnet/wazowski/rules.mk @@ -14,11 +14,11 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/keycapsss/plaid_pad/config.h b/keyboards/keycapsss/plaid_pad/config.h index f456bf8441..d52a51ccdc 100644 --- a/keyboards/keycapsss/plaid_pad/config.h +++ b/keyboards/keycapsss/plaid_pad/config.h @@ -1,14 +1,27 @@ +/* Copyright 2020 Ben Roesner (keycapsss.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #pragma once #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0xAF12 -#define DEVICE_VER 0x0001 +#define VENDOR_ID 0x7983 +#define PRODUCT_ID 0x5050 // "PP" #define MANUFACTURER Keycapsss -#define PRODUCT Plaid-Pad -#define DESCRIPTION 4x4 numpad with through hole components /* key matrix size */ #define MATRIX_ROWS 4 @@ -16,11 +29,6 @@ #define MATRIX_ROW_PINS { C0, C1, C2, C3 } #define MATRIX_COL_PINS { B0, D7, D6, D5 } -#define UNUSED_PINS { B3, B4, B5, D4} - -#define ENCODERS_PAD_A { D1, B2 } -#define ENCODERS_PAD_B { D0, B1 } - #define ENCODER_RESOLUTION 4 diff --git a/keyboards/keycapsss/plaid_pad/keymaps/default/config.h b/keyboards/keycapsss/plaid_pad/keymaps/default/config.h index 271f48d001..fb4c0f5e25 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/default/config.h +++ b/keyboards/keycapsss/plaid_pad/keymaps/default/config.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Ben Roesner (keycapsss.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #pragma once // place overrides here diff --git a/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c index 7de3be5bd3..59031c91d2 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c +++ b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c @@ -28,17 +28,46 @@ void keyboard_post_init_user(void) { } void encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { // First encoder - top left +/* +Rev1.1 Rev1 +,-----------------------, ,-----------------------, +| E1 | E2 | E3 | E4 | | E1 | | | E2 | +|-----+-----+-----+-----| |-----+-----+-----+-----| +| | | | E3 | | | | | | +|-----+-----+-----+-----| |-----+-----+-----+-----| +| | | | E2 | | | | | | +|-----+-----+-----+-----| |-----+-----+-----+-----| +| | | | E1 | | | | | | +`-----------------------' `-----------------------' + */ + + // First encoder (E1) + if (index == 0) { if (clockwise) { - tap_code(KC_RIGHT); + tap_code(KC_F17); } else { - tap_code(KC_LEFT); + tap_code(KC_F18); } - } else if (index == 1) { // Second encoder - top right + // Second encoder (E2) + } else if (index == 1) { if (clockwise) { - tap_code(KC_UP); + tap_code(KC_F19); } else { - tap_code(KC_DOWN); + tap_code(KC_F20); + } + // Third encoder (E3) + } else if (index == 2) { + if (clockwise) { + tap_code(KC_F21); + } else { + tap_code(KC_F22); + } + // Forth encoder (E4) + } else if (index == 3) { + if (clockwise) { + tap_code(KC_F23); + } else { + tap_code(KC_F24); } } } diff --git a/keyboards/keycapsss/plaid_pad/keymaps/default/readme.md b/keyboards/keycapsss/plaid_pad/keymaps/default/readme.md deleted file mode 100644 index ccbea5f865..0000000000 --- a/keyboards/keycapsss/plaid_pad/keymaps/default/readme.md +++ /dev/null @@ -1,13 +0,0 @@ - - - -# Default Plaid-Pad Layout - -This is the default layout for the plaid pad. -The upper left (7) and right (/) switch, can be replaced by a rotary encoder. -Encoders with built-in switch are supported and map to the original keys (7) and (/). - -The upper left encoder performs a tap on "Right Arrow" (KC_RIGHT) and "Left Arrow" (KC_LEFT) when rotated clockwise and counter-clockwise in the respective direction for each step of the encoder. - -The upper right encoder performs a tap on "Up Arrow" (KC_UP) and "Down Arrow" (KC_DOWN) when rotated clockwise and counter-clockwise in the respective direction for each step of the encoder. - diff --git a/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c new file mode 100644 index 0000000000..1b1d59e3e9 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c @@ -0,0 +1,100 @@ +/* Copyright 2020 Ben Roesner (keycapsss.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * ,-----------------------, + * | 7 | 8 | 9 | / | + * |-----+-----+-----+-----| + * | 4 | 5 | 6 | * | + * |-----+-----+-----+-----| + * | 1 | 2 | 3 | - | + * |-----+-----+-----+-----| + * | 0 | . | = | + | + * `-----------------------' + */ + [0] = LAYOUT_ortho_4x4( + KC_P7, KC_P8, KC_P9, KC_PSLS, + KC_P4, KC_P5, KC_P6, KC_PAST, + KC_P1, KC_P2, KC_P3, KC_PMNS, + KC_P0, KC_PDOT, KC_PEQL, KC_PPLS ), + [1] = LAYOUT_ortho_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + [2] = LAYOUT_ortho_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + [3] = LAYOUT_ortho_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), +}; + +// Set LED1 state during powerup +void keyboard_post_init_user(void) { + writePinHigh(LED_RED); +} + +void encoder_update_user(uint8_t index, bool clockwise) { +/* +Rev1.1 Rev1 +,-----------------------, ,-----------------------, +| E1 | E2 | E3 | E4 | | E1 | | | E2 | +|-----+-----+-----+-----| |-----+-----+-----+-----| +| | | | E3 | | | | | | +|-----+-----+-----+-----| |-----+-----+-----+-----| +| | | | E2 | | | | | | +|-----+-----+-----+-----| |-----+-----+-----+-----| +| | | | E1 | | | | | | +`-----------------------' `-----------------------' + */ + + // First encoder (E1) + if (index == 0) { + if (clockwise) { + tap_code(KC_F17); + } else { + tap_code(KC_F18); + } + // Second encoder (E2) + } else if (index == 1) { + if (clockwise) { + tap_code(KC_F19); + } else { + tap_code(KC_F20); + } + // Third encoder (E3) + } else if (index == 2) { + if (clockwise) { + tap_code(KC_F21); + } else { + tap_code(KC_F22); + } + // Forth encoder (E4) + } else if (index == 3) { + if (clockwise) { + tap_code(KC_F23); + } else { + tap_code(KC_F24); + } + } +} diff --git a/keyboards/keycapsss/plaid_pad/keymaps/via/rules.mk b/keyboards/keycapsss/plaid_pad/keymaps/via/rules.mk new file mode 100644 index 0000000000..00c11acccd --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes +EXTRAKEY_ENABLE = no +MOUSEKEY_ENABLE = no diff --git a/keyboards/keycapsss/plaid_pad/plaid_pad.c b/keyboards/keycapsss/plaid_pad/plaid_pad.c index befddf42a9..127b80a5f9 100644 --- a/keyboards/keycapsss/plaid_pad/plaid_pad.c +++ b/keyboards/keycapsss/plaid_pad/plaid_pad.c @@ -1 +1,17 @@ +/* Copyright 2020 Ben Roesner (keycapsss.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "plaid_pad.h" diff --git a/keyboards/keycapsss/plaid_pad/plaid_pad.h b/keyboards/keycapsss/plaid_pad/plaid_pad.h index fae9b132a8..4ac26bf45c 100644 --- a/keyboards/keycapsss/plaid_pad/plaid_pad.h +++ b/keyboards/keycapsss/plaid_pad/plaid_pad.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Ben Roesner (keycapsss.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #pragma once #include "quantum.h" diff --git a/keyboards/keycapsss/plaid_pad/readme.md b/keyboards/keycapsss/plaid_pad/readme.md index 76b4fa8e8e..e8a8044a2a 100644 --- a/keyboards/keycapsss/plaid_pad/readme.md +++ b/keyboards/keycapsss/plaid_pad/readme.md @@ -2,24 +2,66 @@ -A 4x4 numpad with only through hole components. -It's a great companion to the Plaid keyboard by [hsgw](https://github.com/hsgw/) and heavily inspired by it. +A 4x4 numpad/macro pad with only through hole components. It supports up to 4 rotary encoder. The positions for the encoder are interchangeable with keyboard switches. +Below you can see the possible positions for the 4 rotary encoder (Rev1 only 2). +*If you place a encoder in the top left corner (E1), you can't use another encoder in the lower right corner.* +``` +Rev1.1 Rev1 +,-----------------------, ,-----------------------, +| E1 | E2 | E3 | E4 | | E1 | | | E2 | +|-----+-----+-----+-----| |-----+-----+-----+-----| +| | | | E3 | | | | | | +|-----+-----+-----+-----| |-----+-----+-----+-----| +| | | | E2 | | | | | | +|-----+-----+-----+-----| |-----+-----+-----+-----| +| | | | E1 | | | | | | +`-----------------------' `-----------------------' +``` + +- Encoder E1 performs a tap on `KC_F17` and `KC_F18`. +- Encoder E2 performs a tap on `KC_F19` and `KC_F20`. +- Encoder E3 performs a tap on `KC_F21` and `KC_F22`. +- Encoder E4 performs a tap on `KC_F23` and `KC_F24`. + +*The F17-F24 keys are intended to be customized via [Karabiner-Elements (OSX)](https://github.com/pqrs-org/Karabiner-Elements), or [AutoHotkey](https://github.com/Lexikos/AutoHotkey_L) (WIN)* + +It's a great companion to the Plaid keyboard by [hsgw](https://github.com/hsgw/) and heavily inspired by it. * Keyboard Maintainer: BenRoe [GitHub](https://github.com/BenRoe) / [Twitter](https://twitter.com/keycapsss) * Hardware Supported: ATmega328P with VUSB ([see Bootloader section](#Bootloader)) * Hardware Availability: [Keycapsss.com](https://keycapsss.com) -Make example for this keyboard (after setting up your build environment): +## QMK Firmware +_Bootloader and Firmware ([default keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/keycapsss/plaid_pad)) are already on the ATmega328P chip._ + +Make example for this keyboard (after [setting up your build environment](https://docs.qmk.fm/#/getting_started_build_tools)): make keycapsss/plaid_pad:default + // or + qmk compile -kb keycapsss/plaid_pad -km default Flashing example for this keyboard: make keycapsss/plaid_pad:default:flash - -## Bootloader -- same usbasploader as Plaid ([Instruction](https://github.com/hsgw/plaid/blob/master/doc/en/bootloader.md), [Repository](https://github.com/hsgw/USBaspLoader/tree/plaid)) - ---- + // or + qmk flash -kb keycapsss/plaid_pad -km default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader +- same `usbasploader` as used for Plaid ([Instructions](https://github.com/hsgw/plaid/blob/master/doc/en/bootloader.md), [Repository](https://github.com/hsgw/USBaspLoader/tree/plaid)) + +### Enter bootloader mode (to flash a new firmware) +- Plug in the USB cable +- Push and hold RESET switch +- Push and hold BOOT switch +- Release RESET switch +- Release BOOT switch + +or an alternative method: +- Unplug the USB cable +- Hold down the BOOT switch +- Plug in the USB cable +- Release the BOOT switch + +If you succeed to enter bootloader mode, you can see usbasp in device manager, or `*** USBAsp device connected` in [QMK Toolbox](https://github.com/qmk/qmk_toolbox). diff --git a/keyboards/keycapsss/plaid_pad/rev1/config.h b/keyboards/keycapsss/plaid_pad/rev1/config.h new file mode 100644 index 0000000000..eeb56503af --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/rev1/config.h @@ -0,0 +1,25 @@ +/* Copyright 2020 Ben Roesner (keycapsss.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define PRODUCT Plaid-Pad Rev1 +#define DEVICE_VER 0x0001 + +#define UNUSED_PINS { B3, B4, B5, D4} + +#define ENCODERS_PAD_A { D1, B2 } +#define ENCODERS_PAD_B { D0, B1 } diff --git a/keyboards/keycapsss/plaid_pad/rev1/rev1.c b/keyboards/keycapsss/plaid_pad/rev1/rev1.c new file mode 100644 index 0000000000..7d21ede286 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/rev1/rev1.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Ben Roesner (keycapsss.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "rev1.h" diff --git a/keyboards/keycapsss/plaid_pad/rev1/rev1.h b/keyboards/keycapsss/plaid_pad/rev1/rev1.h new file mode 100644 index 0000000000..4a42622ba5 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/rev1/rev1.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Ben Roesner (keycapsss.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "plaid_pad.h" diff --git a/keyboards/keycapsss/plaid_pad/rev1/rules.mk b/keyboards/keycapsss/plaid_pad/rev1/rules.mk new file mode 100644 index 0000000000..5af1ba8536 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/rev1/rules.mk @@ -0,0 +1 @@ +ENCODER_ENABLE = yes diff --git a/keyboards/keycapsss/plaid_pad/rev2/config.h b/keyboards/keycapsss/plaid_pad/rev2/config.h new file mode 100644 index 0000000000..1f12777119 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/rev2/config.h @@ -0,0 +1,25 @@ +/* Copyright 2020 Ben Roesner (keycapsss.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define PRODUCT Plaid-Pad Rev2 +#define DEVICE_VER 0x0002 + +#define UNUSED_PINS { } + +#define ENCODERS_PAD_A { D1, B2, B4, D4 } +#define ENCODERS_PAD_B { D0, B1, B3, B5 } diff --git a/keyboards/keycapsss/plaid_pad/rev2/rev2.c b/keyboards/keycapsss/plaid_pad/rev2/rev2.c new file mode 100644 index 0000000000..7a830676be --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/rev2/rev2.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Ben Roesner (keycapsss.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "rev2.h" diff --git a/keyboards/keycapsss/plaid_pad/rev2/rev2.h b/keyboards/keycapsss/plaid_pad/rev2/rev2.h new file mode 100644 index 0000000000..4a42622ba5 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/rev2/rev2.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Ben Roesner (keycapsss.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "plaid_pad.h" diff --git a/keyboards/keycapsss/plaid_pad/rev2/rules.mk b/keyboards/keycapsss/plaid_pad/rev2/rules.mk new file mode 100644 index 0000000000..5af1ba8536 --- /dev/null +++ b/keyboards/keycapsss/plaid_pad/rev2/rules.mk @@ -0,0 +1 @@ +ENCODER_ENABLE = yes diff --git a/keyboards/keycapsss/plaid_pad/rules.mk b/keyboards/keycapsss/plaid_pad/rules.mk index 08ad3555d6..d4485d939f 100644 --- a/keyboards/keycapsss/plaid_pad/rules.mk +++ b/keyboards/keycapsss/plaid_pad/rules.mk @@ -2,19 +2,12 @@ MCU = atmega328p # Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -23,15 +16,11 @@ COMMAND_ENABLE = no # Commands for debug and configuration 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 = no # Enable keyboard backlight functionality on B7 by default +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs -ENCODER_ENABLE = yes +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output LAYOUTS = ortho_4x4 -LAYOUTS_HAS_RGB = no + +DEFAULT_FOLDER = keycapsss/plaid_pad/rev1 diff --git a/keyboards/kingly_keys/romac/keymaps/boss566y/config.h b/keyboards/kingly_keys/romac/keymaps/boss566y/config.h new file mode 100755 index 0000000000..8b098b6c0c --- /dev/null +++ b/keyboards/kingly_keys/romac/keymaps/boss566y/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2020 boss566y + +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 . +*/ + +#pragma once + +#define DYNAMIC_KEYMAP_LAYER_COUNT 8 diff --git a/keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c b/keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c new file mode 100755 index 0000000000..a636bb4761 --- /dev/null +++ b/keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c @@ -0,0 +1,90 @@ +/* Copyright 2018 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 QMK_KEYBOARD_H + +char oled_layer[20]; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_KP_7, KC_KP_8, KC_KP_9, + KC_KP_4, KC_KP_5, KC_KP_6, + KC_KP_1, KC_KP_2, KC_KP_3, + MO(1), KC_KP_0, KC_KP_DOT + ), + [1] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + [4] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + [5] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + [6] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + [7] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + + + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_270; +} + +void oled_task_user(void) { + // Host Keyboard Layer Status + sprintf(oled_layer,"Layer\nL: %d\n",get_highest_layer(layer_state)); + oled_write(oled_layer,false); + + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NLCK ") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAPS ") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCRLK") : PSTR(" "), false); +} +#endif diff --git a/keyboards/kingly_keys/romac/keymaps/boss566y/rules.mk b/keyboards/kingly_keys/romac/keymaps/boss566y/rules.mk new file mode 100755 index 0000000000..73fd595ab8 --- /dev/null +++ b/keyboards/kingly_keys/romac/keymaps/boss566y/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +BOOTLOADER = qmk-dfu +OLED_DRIVER_ENABLE = yes # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C \ No newline at end of file diff --git a/keyboards/kingly_keys/romac_plus/config.h b/keyboards/kingly_keys/romac_plus/config.h index 503a463f51..5ea8321de2 100644 --- a/keyboards/kingly_keys/romac_plus/config.h +++ b/keyboards/kingly_keys/romac_plus/config.h @@ -3,8 +3,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define VENDOR_ID 0x4B4B +#define PRODUCT_ID 0x0002 #define DEVICE_VER 0x0001 #define MANUFACTURER TheRoyalSweatshirt #define PRODUCT RoMac+ diff --git a/keyboards/kiwikeebs/macro/config.h b/keyboards/kiwikeebs/macro/config.h new file mode 100644 index 0000000000..5753b52a0b --- /dev/null +++ b/keyboards/kiwikeebs/macro/config.h @@ -0,0 +1,108 @@ +/* +Copyright 2020 KiwiKeebs + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x4712 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KiwiKeebs +#define PRODUCT MacroBoard v.1.0 + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 4 + +/* + * 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 { E6, D7 } +#define MATRIX_COL_PINS { F7, B1, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define ENCODERS_PAD_A { D1 } +#define ENCODERS_PAD_B { D0 } + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/kiwikeebs/macro/info.json b/keyboards/kiwikeebs/macro/info.json new file mode 100644 index 0000000000..00726a02f4 --- /dev/null +++ b/keyboards/kiwikeebs/macro/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "KiwiKeebs MacroBoard v.10", + "url": "https://www.reddit.com/r/mechmarket/comments/ibijrd/ic_kiwikeebs_6key_macroboard_rotary_encoder_diy/", + "maintainer": "KiwiKeebs", + "width": 5, + "height": 2, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "k00", "x": 0, "y": 0 }, + { "label": "k01", "x": 1, "y": 0 }, + { "label": "k02", "x": 2, "y": 0 }, + + { "label": "k03", "x": 0, "y": 1 }, + { "label": "k04", "x": 1, "y": 1 }, + { "label": "k05", "x": 2, "y": 1 }, + { "label": "k06", "x": 3, "y": 0, "h":2, "w":2 } + ] + } + } +} diff --git a/keyboards/kiwikeebs/macro/keymaps/default/keymap.c b/keyboards/kiwikeebs/macro/keymaps/default/keymap.c new file mode 100644 index 0000000000..7d1acce308 --- /dev/null +++ b/keyboards/kiwikeebs/macro/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 KiwiKeebs + * + * 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 QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + KC_DEL, KC_HOME, LT(_FN,KC_END), + KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE + ), + [_FN] = LAYOUT( + KC_1, KC_UP, _______, + KC_LEFT, KC_DOWN, KC_RGHT, _______ + ) +}; diff --git a/keyboards/kiwikeebs/macro/macro.c b/keyboards/kiwikeebs/macro/macro.c new file mode 100644 index 0000000000..3d5ab16617 --- /dev/null +++ b/keyboards/kiwikeebs/macro/macro.c @@ -0,0 +1,27 @@ +/* Copyright 2020 KiwiKeebs + * + * 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 "macro.h" + +void encoder_update_kb(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_AUDIO_VOL_UP); + } else { + tap_code(KC_AUDIO_VOL_DOWN); + } + } +} \ No newline at end of file diff --git a/keyboards/kiwikeebs/macro/macro.h b/keyboards/kiwikeebs/macro/macro.h new file mode 100644 index 0000000000..ee7c6bd47d --- /dev/null +++ b/keyboards/kiwikeebs/macro/macro.h @@ -0,0 +1,35 @@ +/* Copyright 2020 KiwiKeebs + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, \ + k03, k04, k05, k06 \ +) { \ + { k00, k01, k02, KC_NO }, \ + { k03, k04, k05, k06 } \ +} diff --git a/keyboards/kiwikeebs/macro/rules.mk b/keyboards/kiwikeebs/macro/rules.mk new file mode 100644 index 0000000000..0c3a849c4f --- /dev/null +++ b/keyboards/kiwikeebs/macro/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes \ No newline at end of file diff --git a/keyboards/kiwikeebs/readme.md b/keyboards/kiwikeebs/readme.md new file mode 100644 index 0000000000..61a1441bd7 --- /dev/null +++ b/keyboards/kiwikeebs/readme.md @@ -0,0 +1,19 @@ +# KiwiKeebs MacroBoard V1.0 + +![KiwiKeebs](https://i.imgur.com/h5i9jBl.png) + +A 6 Key PCB with Rotary Encoder Knob + Button made from solid CNC aluminium. + +* Keyboard Maintainer: [AKiwi92](https://github.com/akiwi92) +* Hardware Supported: KiwiKeebs MacroBoard V1.0 +* Hardware Availability: [reddit.com](https://www.reddit.com/r/mechmarket/comments/ibijrd/ic_kiwikeebs_6key_macroboard_rotary_encoder_diy/) + +Make example for this keyboard (after setting up your build environment): + + make kiwikeebsmacro:default + +Flashing example for this keyboard: + + make kiwikeebsmacro:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kyria/keymaps/ninjonas/rules.mk b/keyboards/kyria/keymaps/ninjonas/rules.mk index e7e4726bac..94c06b80eb 100644 --- a/keyboards/kyria/keymaps/ninjonas/rules.mk +++ b/keyboards/kyria/keymaps/ninjonas/rules.mk @@ -1,6 +1,6 @@ OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays ENCODER_ENABLE = yes # Enables the use of one or more encoders RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes -SRC += oled.c \ No newline at end of file +SRC += oled.c diff --git a/keyboards/kyria/keymaps/winternebs/config.h b/keyboards/kyria/keymaps/winternebs/config.h new file mode 100755 index 0000000000..db14011d11 --- /dev/null +++ b/keyboards/kyria/keymaps/winternebs/config.h @@ -0,0 +1,31 @@ +/* Copyright 2019 Thomas Baart + * + * 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 . + */ +#pragma once + +#define OLED_FONT_H "keyboards/kyria/keymaps/winternebs/glcdfont.c" +#define OLED_FONT_END 127 +#ifdef OLED_DRIVER_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#define FORCE_NKRO +#define ENCODER_RESOLUTION 4 + +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION +#define NO_ACTION_ONESHOT +#define TAPPING_FORCE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/kyria/keymaps/winternebs/glcdfont.c b/keyboards/kyria/keymaps/winternebs/glcdfont.c new file mode 100755 index 0000000000..7303c6afff --- /dev/null +++ b/keyboards/kyria/keymaps/winternebs/glcdfont.c @@ -0,0 +1,55 @@ +#include "progmem.h" + +// Helidox 8x6 font with QMK Firmware Logo +// Online editor: http://teripom.x0.com/ + +static const unsigned char font[] PROGMEM = {// 'download (1)', 192x32px +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x5b, 0x4f, 0x5b, 0x3e, 0x00, 0x3e, 0x6b, 0x4f, 0x6b, +0x3e, 0x00, 0x1c, 0x3e, 0x7c, 0x3e, 0x1c, 0x00, 0x18, 0x3c, 0x7e, 0x3c, 0x18, 0x00, 0x1c, 0x57, +0x7d, 0x57, 0x1c, 0x00, 0x1c, 0x5e, 0x7f, 0x5e, 0x1c, 0x00, 0x00, 0x18, 0x3c, 0x18, 0x00, 0x00, +0xff, 0xe7, 0xc3, 0xe7, 0xff, 0x00, 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, 0xff, 0xe7, 0xdb, 0xe7, +0xff, 0x00, 0x30, 0x48, 0x3a, 0x06, 0x0e, 0x00, 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, 0x40, 0x7f, +0x05, 0x05, 0x07, 0x00, 0x40, 0x7f, 0x05, 0x25, 0x3f, 0x00, 0x5a, 0x3c, 0xe7, 0x3c, 0x5a, 0x00, +0x7f, 0x3e, 0x1c, 0x1c, 0x08, 0x00, 0x08, 0x1c, 0x1c, 0x3e, 0x7f, 0x00, 0x14, 0x22, 0x7f, 0x22, +0x14, 0x00, 0x5f, 0x5f, 0x00, 0x5f, 0x5f, 0x00, 0x06, 0x09, 0x7f, 0x01, 0x7f, 0x00, 0x00, 0x66, +0x89, 0x95, 0x6a, 0x00, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, 0x94, 0xa2, 0xff, 0xa2, 0x94, 0x00, +0x08, 0x04, 0x7e, 0x04, 0x08, 0x00, 0x10, 0x20, 0x7e, 0x20, 0x10, 0x00, 0x08, 0x08, 0x2a, 0x1c, +0x08, 0x00, 0x08, 0x1c, 0x2a, 0x08, 0x08, 0x00, 0x1e, 0x10, 0x10, 0x10, 0x10, 0x00, 0x0c, 0x1e, +0x0c, 0x1e, 0x0c, 0x00, 0x30, 0x38, 0x3e, 0x38, 0x30, 0x00, 0x06, 0x0e, 0x3e, 0x0e, 0x06, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, +0x00, 0x00, 0x14, 0x7f, 0x14, 0x7f, 0x14, 0x00, 0x24, 0x2a, 0x7f, 0x2a, 0x12, 0x00, 0x23, 0x13, +0x08, 0x64, 0x62, 0x00, 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, +0x00, 0x1c, 0x22, 0x41, 0x00, 0x00, 0x00, 0x41, 0x22, 0x1c, 0x00, 0x00, 0x2a, 0x1c, 0x7f, 0x1c, +0x2a, 0x00, 0x08, 0x08, 0x3e, 0x08, 0x08, 0x00, 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, 0x08, 0x08, +0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, +0x3e, 0x51, 0x49, 0x45, 0x3e, 0x00, 0x00, 0x42, 0x7f, 0x40, 0x00, 0x00, 0x72, 0x49, 0x49, 0x49, +0x46, 0x00, 0x21, 0x41, 0x49, 0x4d, 0x33, 0x00, 0x18, 0x14, 0x12, 0x7f, 0x10, 0x00, 0x27, 0x45, +0x45, 0x45, 0x39, 0x00, 0x3c, 0x4a, 0x49, 0x49, 0x31, 0x00, 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, +0x36, 0x49, 0x49, 0x49, 0x36, 0x00, 0x46, 0x49, 0x49, 0x29, 0x1e, 0x00, 0x00, 0x00, 0x14, 0x00, +0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, 0x14, 0x14, +0x14, 0x14, 0x14, 0x00, 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, +0x3e, 0x41, 0x5d, 0x59, 0x4e, 0x00, 0x7c, 0x12, 0x11, 0x12, 0x7c, 0x00, 0x7f, 0x49, 0x49, 0x49, +0x36, 0x00, 0x3e, 0x41, 0x41, 0x41, 0x22, 0x00, 0x7f, 0x41, 0x41, 0x41, 0x3e, 0x00, 0x7f, 0x49, +0x49, 0x49, 0x41, 0x00, 0x7f, 0x09, 0x09, 0x09, 0x01, 0x00, 0x3e, 0x41, 0x41, 0x51, 0x73, 0x00, +0x7f, 0x08, 0x08, 0x08, 0x7f, 0x00, 0x00, 0x41, 0x7f, 0x41, 0x00, 0x00, 0x20, 0x40, 0x41, 0x3f, +0x01, 0x00, 0x7f, 0x08, 0x14, 0x22, 0x41, 0x00, 0x7f, 0x40, 0x40, 0x40, 0x40, 0x00, 0x7f, 0x02, +0x1c, 0x02, 0x7f, 0x00, 0x7f, 0x04, 0x08, 0x10, 0x7f, 0x00, 0x3e, 0x41, 0x41, 0x41, 0x3e, 0x00, +0x7f, 0x09, 0x09, 0x09, 0x06, 0x00, 0x3e, 0x41, 0x51, 0x21, 0x5e, 0x00, 0x7f, 0x09, 0x19, 0x29, +0x46, 0x00, 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, 0x03, 0x01, 0x7f, 0x01, 0x03, 0x00, 0x3f, 0x40, +0x40, 0x40, 0x3f, 0x00, 0x1f, 0x20, 0x40, 0x20, 0x1f, 0x00, 0x3f, 0x40, 0x38, 0x40, 0x3f, 0x00, +0x63, 0x14, 0x08, 0x14, 0x63, 0x00, 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, 0x61, 0x59, 0x49, 0x4d, +0x43, 0x00, 0x00, 0x7f, 0x41, 0x41, 0x41, 0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x41, +0x41, 0x41, 0x7f, 0x00, 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, +0x00, 0x03, 0x07, 0x08, 0x00, 0x00, 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, 0x7f, 0x28, 0x44, 0x44, +0x38, 0x00, 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, 0x38, 0x44, 0x44, 0x28, 0x7f, 0x00, 0x38, 0x54, +0x54, 0x54, 0x18, 0x00, 0x00, 0x08, 0x7e, 0x09, 0x02, 0x00, 0x18, 0xa4, 0xa4, 0x9c, 0x78, 0x00, +0x7f, 0x08, 0x04, 0x04, 0x78, 0x00, 0x00, 0x44, 0x7d, 0x40, 0x00, 0x00, 0x20, 0x40, 0x40, 0x3d, +0x00, 0x00, 0x7f, 0x10, 0x28, 0x44, 0x00, 0x00, 0x00, 0x41, 0x7f, 0x40, 0x00, 0x00, 0x7c, 0x04, +0x78, 0x04, 0x78, 0x00, 0x7c, 0x08, 0x04, 0x04, 0x78, 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, +0xfc, 0x18, 0x24, 0x24, 0x18, 0x00, 0x18, 0x24, 0x24, 0x18, 0xfc, 0x00, 0x7c, 0x08, 0x04, 0x04, +0x08, 0x00, 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, 0x04, 0x04, 0x3f, 0x44, 0x24, 0x00, 0x3c, 0x40, +0x40, 0x20, 0x7c, 0x00, 0x1c, 0x20, 0x40, 0x20, 0x1c, 0x00, 0x3c, 0x40, 0x30, 0x40, 0x3c, 0x00, +0x44, 0x28, 0x10, 0x28, 0x44, 0x00, 0x4c, 0x90, 0x90, 0x90, 0x7c, 0x00, 0x44, 0x64, 0x54, 0x4c, +0x44, 0x00, 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x41, +0x36, 0x08, 0x00, 0x00, 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, 0x3c, 0x26, 0x23, 0x26, 0x3c, 0x00 +}; \ No newline at end of file diff --git a/keyboards/kyria/keymaps/winternebs/keymap.c b/keyboards/kyria/keymaps/winternebs/keymap.c new file mode 100755 index 0000000000..60b3464ab3 --- /dev/null +++ b/keyboards/kyria/keymaps/winternebs/keymap.c @@ -0,0 +1,725 @@ +/* Copyright 2019 Thomas Baart + * + * 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 QMK_KEYBOARD_H + +#ifdef CONSOLE_ENABLE + #include +#endif +enum custom_keycodes { + QWERTY = SAFE_RANGE, + WORKMAN, + ADJUST, + SBKSP, + ENDW +}; + +enum layers { + _QWERTY = 0, + _WORKMAN, + _LOWER, + _RAISE, + _ADJUST +}; +#define RAISE LT(_RAISE, KC_ENT) +#define LOWER MO(_LOWER) +#define HOME_A KC_A +#define HOME_S KC_S +#define HOME_H CTL_T(KC_H) +#define HOME_T SFT_T(KC_T) +#define HOME_N SFT_T(KC_N) +#define HOME_E CTL_T(KC_E) +#define HOME_O KC_O +#define HOME_I KC_I +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY + * + * ,-------------------------------------------. ,-------------------------------------------. + * | ESC | Q | W | E | R | T | | Y | U | I | O | P | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | CTRL | Z | X | C | V | B | | | | | | N | M | , | . | / | ENTER | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | GUI | ALT | LOWER| Space| | | SHIFT| Bksp | RAISE| | | + * `----------------------------------' `----------------------------------' + */ + [_QWERTY] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, _______, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, _______, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LGUI, KC_LALT, LOWER, KC_SPC, _______, KC_LSFT, KC_BSPC, RAISE, _______, _______ + ), + /* + * Workman Layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | ESC | Q | D | R | W | B | | J | F | U | P | ; | Bksp | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | TAB | A | S | H | T | G | | Y | N | E | O | I | ' | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | Z | X | M | C | V | SHIFT| Space| | | ENTER| K | L | , | . | / | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | GUI | ESC | LOWER| Space| SWAP | | SWAP | Bksp | RAISE| | | + * `----------------------------------' `----------------------------------' + */ + [_WORKMAN] = LAYOUT( + KC_ESC, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC, + KC_TAB, HOME_A, HOME_S, HOME_H, HOME_T, KC_G, KC_Y, HOME_N, HOME_E, HOME_O, HOME_I, KC_QUOT, + XXXXXXX, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_LSFT, KC_SPC, SH_MON, KC_ENT, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, + KC_LGUI, KC_LALT, LOWER, KC_SPC, SH_MON, SH_MON, KC_BSPC, RAISE, XXXXXXX, _______ + ), +/* + * Lower Layer: NUM/symb + * + * ,-------------------------------------------. ,-------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | DEL | $ | + | ( | ) | @ | | | | - | = | _ | * | \ | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | ! | # | { | } | ~ | | | | | | & | [ | ] | % | ^ | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * |prints| | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_LOWER] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_DEL, KC_DLR, KC_PLUS, KC_LPRN, KC_RPRN, KC_AT, KC_PIPE, KC_MINS, KC_EQL, KC_UNDS, KC_ASTR, KC_BSLS, + _______, KC_EXLM, KC_HASH, KC_LCBR, KC_RCBR, KC_TILD, _______, _______, _______, _______, KC_AMPR, KC_LBRC, KC_RBRC, KC_PERC, KC_CIRC, _______, + KC_PSCR, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______ + ), + /* + * Raise Layer: VIM Movement + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | PgDn | | Word | Back | | Down | | PgUp | | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | Left | | | | | | End | | | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | | | | | | | | Up | Right| | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_RAISE] = LAYOUT( + _______, _______, KC_PGDN, _______, C(KC_RGHT), C(KC_LEFT), KC_DOWN, _______, KC_PGUP, _______, _______, _______, + _______, _______, _______, KC_LEFT, _______, _______, _______, _______, ENDW, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, KC_RGHT, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + /* + * Layer template + * + * ,-------------------------------------------. ,-------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | |QWERTY|WRKMAN| | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_ADJUST] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, QWERTY, WORKMAN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +// /* +// * Layer template +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ +// [_LAYERINDEX] = LAYOUT( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; + + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + // Volume control + if (clockwise) { + tap_code(KC_RGHT); + } else { + tap_code(KC_LEFT); + } + } + else if (index == 1) { + // Page up/Page down + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } +} +#endif +#ifdef OLED_DRIVER_ENABLE +bool left = false; +bool right = false; +bool lastl = false; +bool lastr = false; +#endif +bool bksp = false; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + #ifdef CONSOLE_ENABLE + uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u, total: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.key.col + 10 * record->event.key.row); + #endif + #ifdef OLED_DRIVER_ENABLE + if(record->event.pressed){ + uint8_t n = record->event.key.col + 10 * record->event.key.row; + if (n<40) { + left = true; + } + else { + right = true; + } + } + #endif + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case WORKMAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_WORKMAN); + } + return false; + break; + case SBKSP: + if (record->event.pressed) { + register_code(KC_LSFT); + bksp = true; + } + else { + unregister_code(KC_LSFT); + if (bksp) { + tap_code(KC_BSPC); + } + } + return false; + break; + case ENDW: + if (record->event.pressed) { + register_code(KC_LCTL); + tap_code(KC_RGHT); + unregister_code(KC_LCTL); + tap_code(KC_LEFT); + } + } + bksp = false; + return true; + +} + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + + + +char wpm_str[10]; +// WPM-responsive animation stuff here +#define IDLE_FRAMES 2 +#define IDLE_SPEED 10 // below this wpm value your animation will idle + + +#define TAP_FRAMES 3 + +#define ANIM_FRAME_DURATION 400 // how long each frame lasts in ms +// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing +#define ANIM_SIZE 896 // number of bytes in array, minimize for adequate firmware size, max is 1024 + +uint32_t anim_timer = 0; +uint32_t anim_sleep = 0; +uint8_t current_idle_frame = 0; +// uint8_t current_prep_frame = 0; // uncomment if PREP_FRAMES >1 +uint8_t current_tap_frame = 0; +// Credit to obosob for initial animation approach. +static void render_anim(void) { + static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { + { +// 'bongo0', 128x56px +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10, +0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14, +0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24, +0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30, +0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, +0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x03, 0x82, 0xe2, 0x39, 0x09, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39, +0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x18, 0x20, 0x40, 0x80, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, +0x06, 0x38, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30, +0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, +0x02, 0x04, 0x08, 0x08, 0x10, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10, +0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18, +0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, +0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, +0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, +0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10, +0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, +0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { +// 'bongo1', 128x56px +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x40, +0x60, 0x20, 0x20, 0x20, 0x20, 0x00, 0x10, 0x10, 0x10, 0x90, 0x90, 0x90, 0x90, 0x90, 0xa0, 0xa0, +0xa0, 0xa0, 0xa0, 0xc0, 0xc0, 0xc1, 0x80, 0x80, 0x81, 0x81, 0x02, 0x06, 0x84, 0x7c, 0x5f, 0x58, +0x4c, 0x46, 0x42, 0x42, 0x42, 0x43, 0x61, 0x23, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xa0, 0x20, 0x20, +0x30, 0x10, 0x10, 0x18, 0x08, 0x08, 0x0c, 0x04, 0x06, 0x02, 0x03, 0x01, 0x08, 0x18, 0x18, 0x28, +0x68, 0x44, 0x84, 0x84, 0x86, 0x02, 0x02, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x09, 0x07, 0x01, 0x01, 0x03, +0x06, 0x06, 0x10, 0x3c, 0x4c, 0xc8, 0x88, 0x08, 0x08, 0x18, 0x10, 0x30, 0x60, 0xc0, 0x80, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, +0x01, 0x01, 0x81, 0xc1, 0x21, 0x31, 0x11, 0x0d, 0x05, 0x01, 0x03, 0x02, 0x06, 0x0e, 0xc6, 0xe4, +0x04, 0x04, 0x04, 0x06, 0x02, 0x03, 0x01, 0x03, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, +0x81, 0x01, 0x01, 0x01, 0x00, 0x00, 0x07, 0x0c, 0x30, 0x40, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x1e, 0x30, 0x40, 0x80, 0x00, 0x00, 0x00, 0x01, 0x07, +0x1c, 0x70, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30, +0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, +0x00, 0x00, 0x00, 0x02, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x02, 0x02, +0x06, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x0c, 0x04, 0x0c, 0x3c, 0x15, 0xd3, 0x72, 0x10, 0x20, +0x20, 0x20, 0x21, 0x23, 0x26, 0x24, 0x2c, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18, +0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, +0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, +0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, +0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10, +0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, +0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }; + static const char PROGMEM prep[][ANIM_SIZE] = { + { +// 'bongo2', 128x56px +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10, +0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14, +0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24, +0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30, +0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, +0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x08, 0x0c, 0x04, 0x04, +0x04, 0x07, 0x0a, 0x92, 0xf9, 0xc9, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39, +0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x46, 0x78, 0x20, 0x20, 0x20, 0x20, 0x40, +0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, +0x06, 0x38, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1e, 0x64, 0xc4, 0x04, 0x04, +0x00, 0x02, 0x03, 0x01, 0x00, 0x01, 0x03, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x60, 0x20, +0x30, 0x19, 0x0e, 0x38, 0xcc, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10, +0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x05, 0x07, 0x0e, +0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, +0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, +0x40, 0x40, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x83, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x38, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, +0x01, 0x01, 0x03, 0x02, 0x02, 0x02, 0x03, 0x03, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, +0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + + } + }; + static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = { + { + // 'bongo3', 128x56px +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10, +0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14, +0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24, +0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30, +0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, +0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x03, 0x82, 0xe2, 0x39, 0x09, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39, +0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x46, 0x78, 0x20, 0x20, 0x20, 0x20, 0x40, +0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, +0x06, 0x38, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0xe0, 0xf8, 0xf8, 0xf0, +0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x01, 0x03, 0x1f, 0x0f, 0x07, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30, +0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x60, 0x20, +0x30, 0x19, 0x0e, 0x38, 0xcc, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10, +0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x3f, 0x3f, 0x3f, +0x1f, 0x1f, 0x0f, 0x07, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18, +0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, +0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, +0x40, 0x40, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x83, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x38, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0xf8, 0xf9, 0xe1, 0x81, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, +0x01, 0x01, 0x03, 0x02, 0x02, 0x02, 0x03, 0x03, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, +0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x08, 0x1c, 0x1f, 0x1f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + // 'bongo4', 128x56px +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10, +0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14, +0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24, +0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30, +0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, +0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x08, 0x0c, 0x04, 0x04, +0x04, 0x07, 0x0a, 0x92, 0xf9, 0xc9, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39, +0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x18, 0x20, 0x40, 0x80, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, +0x06, 0x38, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1e, 0x64, 0xc4, 0x04, 0x04, +0x00, 0x02, 0x03, 0x01, 0x00, 0x01, 0x03, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, +0x02, 0x04, 0x08, 0x08, 0x10, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10, +0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x05, 0x07, 0x0e, +0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, +0x10, 0x10, 0x10, 0x10, 0x20, 0xa0, 0xa0, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, +0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x7c, 0x7f, 0x7f, 0x7f, 0x3f, 0x3f, 0x3e, 0x1e, 0x1e, 0x1c, 0x0c, 0x00, 0xf8, +0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10, +0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, +0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x30, 0x38, 0x38, 0x78, 0x7c, 0x7e, 0xff, 0xff, 0xff, 0xfc, +0xf1, 0xe1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x06, 0x0e, +0x1e, 0x3e, 0x3e, 0x7e, 0x7e, 0x1e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { +// 'bongo5', 128x56px +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10, +0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14, +0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24, +0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30, +0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, +0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x03, 0x82, 0xe2, 0x39, 0x09, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39, +0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x18, 0x20, 0x40, 0x80, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, +0x06, 0x38, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0xe0, 0xf8, 0xf8, 0xf0, +0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x01, 0x03, 0x1f, 0x0f, 0x07, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30, +0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, +0x02, 0x04, 0x08, 0x08, 0x10, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10, +0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x3f, 0x3f, 0x3f, +0x1f, 0x1f, 0x0f, 0x07, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18, +0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, +0x10, 0x10, 0x10, 0x10, 0x20, 0xa0, 0xa0, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, +0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0xf8, 0xf9, 0xe1, 0x81, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x7c, 0x7f, 0x7f, 0x7f, 0x3f, 0x3f, 0x3e, 0x1e, 0x1e, 0x1c, 0x0c, 0x00, 0xf8, +0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10, +0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, +0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x08, 0x1c, 0x1f, 0x1f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x30, 0x38, 0x38, 0x78, 0x7c, 0x7e, 0xff, 0xff, 0xff, 0xfc, +0xf1, 0xe1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x06, 0x0e, +0x1e, 0x3e, 0x3e, 0x7e, 0x7e, 0x1e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }; + + //assumes 1 frame prep stage + void animation_phase(void) { + if(get_current_wpm() <= IDLE_SPEED){ + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE); + } + else { + // if is true 2 frames in a row make it false; + if(left && !lastl && right && !lastr) { + oled_write_raw_P(tap[2], ANIM_SIZE); + } + else if (left && !lastl) { + oled_write_raw_P(tap[0], ANIM_SIZE); + } + else if (right && !lastr) { + oled_write_raw_P(tap[1], ANIM_SIZE); + } + else { + oled_write_raw_P(prep[0], ANIM_SIZE); + left = false; + right = false; + } + lastl = left; + lastr = right; + left = false; + right = false; + } + } + if(get_current_wpm() != 000) { + oled_on(); // not essential but turns on animation OLED with any alpha keypress + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + anim_sleep = timer_read32(); + } else { + if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { + oled_off(); + } else { + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + } + } +} +bool wpm_keycode_user(uint16_t keycode) { + return true; +} +static void render_logo(void) { + oled_set_cursor(0,0); + oled_write_P(PSTR(" play asc "), false); + oled_set_cursor(3,3); + oled_write_P(PSTR(" play asc "), false); + oled_set_cursor(6,6); + oled_write_P(PSTR(" play asc "), false); +} +void oled_task_user(void) { + if (is_keyboard_master()) { + render_anim(); + oled_set_cursor(0,7); + sprintf(wpm_str, "APM: %03d ", get_current_wpm()); + oled_write(wpm_str, false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("base"), false); + break; + case _LOWER: + oled_write_ln_P(PSTR("LOWER"), false); + break; + case _RAISE: + oled_write_ln_P(PSTR("RAISE"), false); + break; + case _ADJUST: + oled_write_ln_P(PSTR("ADJUST"), false); + break; + default: + oled_write_ln_P(PSTR("Undefined"), false); + } + } else { + render_logo(); + oled_scroll_left(); + + } +} +#endif diff --git a/keyboards/kyria/keymaps/winternebs/rules.mk b/keyboards/kyria/keymaps/winternebs/rules.mk new file mode 100755 index 0000000000..5831e23cba --- /dev/null +++ b/keyboards/kyria/keymaps/winternebs/rules.mk @@ -0,0 +1,12 @@ +OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more +NKRO_ENABLE = yes +WPM_ENABLE = yes +CONSOLE_ENABLE = no # Console for debug +AUDIO_ENABLE = no # Audio output +SPACE_CADET_ENABLE = no +EXTRAKEY_ENABLE = no +MOUSEKEY_ENABLE = no +BOOTMAGIC_ENABLE = no +SWAP_HANDS_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/kyria/kyria.c b/keyboards/kyria/kyria.c index 21ed5e84c8..1692093fb2 100644 --- a/keyboards/kyria/kyria.c +++ b/keyboards/kyria/kyria.c @@ -14,3 +14,4 @@ * along with this program. If not, see . */ #include "kyria.h" + diff --git a/keyboards/kyria/rev1/rev1.c b/keyboards/kyria/rev1/rev1.c index 9aedcc130a..970a359e71 100644 --- a/keyboards/kyria/rev1/rev1.c +++ b/keyboards/kyria/rev1/rev1.c @@ -1 +1,17 @@ -#include "rev1.h" \ No newline at end of file +#include "rev1.h" + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) + +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}, {6, 4}, {7, 4}}, + {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}, {6, 5}, {7, 5}}, + {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}, {6, 6}, {7, 6}}, + {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}, {6, 7}, {7, 7}}, + {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}, {7, 0}}, + {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1}, {7, 1}}, + {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}, {6, 2}, {7, 2}}, + {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}, {6, 3}, {7, 3}} +}; + +#endif diff --git a/keyboards/kyria/rules.mk b/keyboards/kyria/rules.mk index 57fbf76cfb..96f76241d1 100644 --- a/keyboards/kyria/rules.mk +++ b/keyboards/kyria/rules.mk @@ -31,6 +31,6 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs SPLIT_KEYBOARD = yes # Split common -LINK_TIME_OPTIMIZATION_ENABLE =yes +LTO_ENABLE = yes DEFAULT_FOLDER = kyria/rev1 diff --git a/keyboards/launchpad/keymaps/via/rules.mk b/keyboards/launchpad/keymaps/via/rules.mk index 87843cb0d6..37484844f5 100644 --- a/keyboards/launchpad/keymaps/via/rules.mk +++ b/keyboards/launchpad/keymaps/via/rules.mk @@ -1,3 +1,3 @@ VIA_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes RGBLIGHT_ENABLE = yes diff --git a/keyboards/lazydesigners/bolt/via/keymap.c b/keyboards/lazydesigners/bolt/via/keymap.c new file mode 100644 index 0000000000..a977f9c38f --- /dev/null +++ b/keyboards/lazydesigners/bolt/via/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2020 LAZYDESIGNERS + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_GESC, 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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, MO(2), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, + KC_INS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + 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_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO + ), + [2] = LAYOUT( + RESET, KC_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 + ), + [3] = LAYOUT( + KC_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 + ), +}; diff --git a/keyboards/lazydesigners/bolt/via/rules.mk b/keyboards/lazydesigners/bolt/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/lazydesigners/bolt/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/lazydesigners/the30/keymaps/via/keymap.c b/keyboards/lazydesigners/the30/keymaps/via/keymap.c new file mode 100644 index 0000000000..1a1b10fd51 --- /dev/null +++ b/keyboards/lazydesigners/the30/keymaps/via/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2020 LAZYDESIGNERS + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_3x10( + 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_ENT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MO(1) + ), + [1] = LAYOUT_ortho_3x10( + RESET, KC_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 + ), + [2] = LAYOUT_ortho_3x10( + KC_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 + ), + [3] = LAYOUT_ortho_3x10( + KC_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 + ), +}; diff --git a/keyboards/lazydesigners/the30/keymaps/via/rules.mk b/keyboards/lazydesigners/the30/keymaps/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/lazydesigners/the30/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/lets_split/keymaps/geripgeri/config.h b/keyboards/lets_split/keymaps/geripgeri/config.h index 6e71ea2b93..1091789bf1 100644 --- a/keyboards/lets_split/keymaps/geripgeri/config.h +++ b/keyboards/lets_split/keymaps/geripgeri/config.h @@ -21,9 +21,6 @@ along with this program. If not, see . #pragma once -#define AUTO_SHIFT_TIMEOUT 200 -#define NO_AUTO_SHIFT_NUMERIC - // RGB lighting #define RGBLIGHT_SLEEP #undef RGBLED_NUM diff --git a/keyboards/lets_split/keymaps/geripgeri/keymap.c b/keyboards/lets_split/keymaps/geripgeri/keymap.c index b268fb90c2..62e3570468 100644 --- a/keyboards/lets_split/keymaps/geripgeri/keymap.c +++ b/keyboards/lets_split/keymaps/geripgeri/keymap.c @@ -5,7 +5,6 @@ enum layer_names { _LOWER, _RAISE, _NUMPAD, - _GAMING, _ADJUST }; @@ -118,14 +117,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | TGLAS| | | | | | | | | | | |GAMING| + * | | | | | | | | | | | | | | * `-----------------------------------------' `-----------------------------------------' */ [_ADJUST] = LAYOUT_ortho_4x12( RESET, EEP_RST, _______, RALT(KC_SCLN), _______, _______, _______, TD(U), RALT(KC_Z), TD(O), _______, _______, _______, RALT(KC_QUOT), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_ASTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(_GAMING) + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Numpad @@ -144,27 +143,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, RGB_VAI, RGB_SAI, RGB_HUI, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_TOG, KC_CALC, KC_0, KC_PPLS, _______, _______, _______ -), - -/* Gaming - * ,-----------------------------------------. ,-----------------------------------------. - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | RAISE| | | | LOWER| | | | | - * `-----------------------------------------' `-----------------------------------------' - */ -[_GAMING] = LAYOUT_ortho_4x12( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, RAISE, _______, _______, LOWER, _______, _______, _______, _______ )}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch(keycode) { case RGB_VAI: @@ -288,14 +268,9 @@ layer_state_t layer_state_set_user(layer_state_t state) { rgblight_setrgb_at(0,255,0, 0); rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); break; - case _GAMING: - rgb_mode = RGBLIGHT_MODE_RAINBOW_SWIRL + 5; - autoshift_disable(); - break; - default: + default: rgb_mode = RGBLIGHT_MODE_BREATHING + 1; rgblight_mode_noeeprom(rgb_mode); - autoshift_enable(); break; } return state; diff --git a/keyboards/lets_split/keymaps/geripgeri/rules.mk b/keyboards/lets_split/keymaps/geripgeri/rules.mk index 5cefc00177..d2259fe9d5 100644 --- a/keyboards/lets_split/keymaps/geripgeri/rules.mk +++ b/keyboards/lets_split/keymaps/geripgeri/rules.mk @@ -1,5 +1,3 @@ -AUTO_SHIFT_ENABLE = yes -AUTO_SHIFT_MODIFIERS = no RGBLIGHT_ENABLE = yes TAP_DANCE_ENABLE = yes diff --git a/keyboards/lfkeyboards/TWIlib.c b/keyboards/lfkeyboards/TWIlib.c index abb12cc87a..dc4fbf016b 100644 --- a/keyboards/lfkeyboards/TWIlib.c +++ b/keyboards/lfkeyboards/TWIlib.c @@ -11,6 +11,19 @@ #include "util/delay.h" #include "print.h" +// Global transmit buffer +volatile uint8_t *TWITransmitBuffer; +// Global receive buffer +volatile uint8_t TWIReceiveBuffer[RXMAXBUFLEN]; +// Buffer indexes +volatile int TXBuffIndex; // Index of the transmit buffer. Is volatile, can change at any time. +int RXBuffIndex; // Current index in the receive buffer +// Buffer lengths +int TXBuffLen; // The total length of the transmit buffer +int RXBuffLen; // The total number of bytes to read (should be less than RXMAXBUFFLEN) + +TWIInfoStruct TWIInfo; + void TWIInit() { TWIInfo.mode = Ready; diff --git a/keyboards/lfkeyboards/TWIlib.h b/keyboards/lfkeyboards/TWIlib.h index 6db3cc9513..8ba261c6e5 100644 --- a/keyboards/lfkeyboards/TWIlib.h +++ b/keyboards/lfkeyboards/TWIlib.h @@ -16,16 +16,6 @@ #define TXMAXBUFLEN 20 // Receive buffer length #define RXMAXBUFLEN 20 -// Global transmit buffer -volatile uint8_t *TWITransmitBuffer; -// Global receive buffer -volatile uint8_t TWIReceiveBuffer[RXMAXBUFLEN]; -// Buffer indexes -volatile int TXBuffIndex; // Index of the transmit buffer. Is volatile, can change at any time. -int RXBuffIndex; // Current index in the receive buffer -// Buffer lengths -int TXBuffLen; // The total length of the transmit buffer -int RXBuffLen; // The total number of bytes to read (should be less than RXMAXBUFFLEN) typedef enum { Ready, @@ -42,8 +32,8 @@ typedef enum { uint8_t errorCode; uint8_t repStart; }TWIInfoStruct; -TWIInfoStruct TWIInfo; +extern TWIInfoStruct TWIInfo; // TWI Status Codes #define TWI_START_SENT 0x08 // Start sent diff --git a/keyboards/lily58/keymaps/bcat/keymap.c b/keyboards/lily58/keymaps/bcat/keymap.c index 294f9e6c5a..69864cd085 100644 --- a/keyboards/lily58/keymaps/bcat/keymap.c +++ b/keyboards/lily58/keymaps/bcat/keymap.c @@ -13,9 +13,9 @@ enum layer { #define LY_RSE MO(LAYER_RAISE) #define KY_CSPC LCTL(KC_SPC) -#define KY_LOCK LGUI(KC_L) -#define KY_WINL LGUI(KC_LEFT) -#define KY_WINR LGUI(KC_RGHT) +#define KY_ZMIN LCTL(KC_EQL) +#define KY_ZMOUT LCTL(KC_MINS) +#define KY_ZMRST LCTL(KC_0) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default layer: http://www.keyboard-layout-editor.com/#/gists/e0eb3af65961e9fd612dcff3ddd88e4f */ @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LAYER_LOWER] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MC_ALTT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - KY_CSPC, KY_WINL, KY_WINR, KY_LOCK, KC_WBAK, KC_WFWD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, + KY_CSPC, KY_ZMRST, KY_ZMOUT, KY_ZMIN, KC_WBAK, KC_WFWD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_TILD, _______, KC_APP, KC_PSCR, KC_SLCK, KC_PAUS, KC_LGUI, _______, _______, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______ ), diff --git a/keyboards/lily58/keymaps/bcat/readme.md b/keyboards/lily58/keymaps/bcat/readme.md index 6235ff13fc..84c2fc335f 100644 --- a/keyboards/lily58/keymaps/bcat/readme.md +++ b/keyboards/lily58/keymaps/bcat/readme.md @@ -22,7 +22,7 @@ browser back/forward navigation keys. ## Lower layer -![Lower layer layout](https://i.imgur.com/JVF1p1Q.png) +![Lower layer layout](https://i.imgur.com/sNKWpUC.png) ([KLE](http://www.keyboard-layout-editor.com/#/gists/19ad0d3b5d745fbb2818db09740f5a11)) diff --git a/keyboards/lily58/keymaps/default/config.h b/keyboards/lily58/keymaps/default/config.h index 6b9e52c05e..4f155d3af8 100644 --- a/keyboards/lily58/keymaps/default/config.h +++ b/keyboards/lily58/keymaps/default/config.h @@ -28,6 +28,8 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS +// #define SSD1306OLED + #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD diff --git a/keyboards/lily58/keymaps/default/keymap.c b/keyboards/lily58/keymaps/default/keymap.c index f0fbaa8b0d..52d401c5c5 100644 --- a/keyboards/lily58/keymaps/default/keymap.c +++ b/keyboards/lily58/keymaps/default/keymap.c @@ -8,26 +8,15 @@ #include "ssd1306.h" #endif -#ifdef RGBLIGHT_ENABLE -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; -#endif - extern uint8_t is_master; -#define _QWERTY 0 -#define _LOWER 1 -#define _RAISE 2 -#define _ADJUST 3 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, - ADJUST, +enum layer_number { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, }; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY @@ -50,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \ KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LALT, KC_LGUI,LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC, KC_RGUI \ + KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_ENT, MO(_RAISE), KC_BSPC, KC_RGUI \ ), /* LOWER * ,-----------------------------------------. ,-----------------------------------------. @@ -112,14 +101,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT( \ 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, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD,\ + 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,\ _______, _______, _______, _______, _______, _______, _______, _______ \ ) }; -int RGB_current_mode; - // Setting ADJUST layer RGB back to default void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { @@ -129,12 +116,6 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { } } -void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif -} - //SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk #ifdef OLED_DRIVER_ENABLE @@ -178,42 +159,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif // set_timelog(); } - - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer_RGB(_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/lily58/keymaps/default/rules.mk b/keyboards/lily58/keymaps/default/rules.mk index a5b6303a1e..ea94a9708e 100644 --- a/keyboards/lily58/keymaps/default/rules.mk +++ b/keyboards/lily58/keymaps/default/rules.mk @@ -13,7 +13,7 @@ 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. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing OLED_DRIVER_ENABLE= yes # OLED display diff --git a/keyboards/lily58/keymaps/drasbeck/config.h b/keyboards/lily58/keymaps/drasbeck/config.h new file mode 100644 index 0000000000..ffaf5f4bc3 --- /dev/null +++ b/keyboards/lily58/keymaps/drasbeck/config.h @@ -0,0 +1,46 @@ +/* +Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck + * + * You are free to: + * + * Share — copy and redistribute the material in any medium or format + * Adapt — remix, transform, and build upon the material + * for any purpose, even commercially. + * + * The licensor cannot revoke these freedoms as long as you follow the license terms. +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + +#define ENCODERS_PAD_A { F4 } +#define ENCODERS_PAD_B { F5 } +#define ENCODER_RESOLUTION 4 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 180 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 27 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +// Underglow +/* +#undef RGBLED_NUM +#define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_SLEEP +*/ diff --git a/keyboards/lily58/keymaps/drasbeck/keymap.c b/keyboards/lily58/keymaps/drasbeck/keymap.c new file mode 100644 index 0000000000..0fc1bfb794 --- /dev/null +++ b/keyboards/lily58/keymaps/drasbeck/keymap.c @@ -0,0 +1,166 @@ +/* Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck + * + * You are free to: + * + * Share — copy and redistribute the material in any medium or format + * Adapt — remix, transform, and build upon the material + * for any purpose, even commercially. + * + * The licensor cannot revoke these freedoms as long as you follow the license terms. + */ + +#include QMK_KEYBOARD_H + +extern uint8_t is_master; + +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + 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_NO, KC_MUTE, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, + KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_NUBS, KC_LCTL + ), + + [_LOWER] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_MINS, KC_EQL, KC_RBRC, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_HOME, KC_PGDN, KC_END, KC_NO, KC_NUHS, + 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_RO, KC_ENT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_RAISE] = LAYOUT( + KC_TRNS, RALT(KC_1), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_5), RALT(KC_6), RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), KC_DEL, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UP, KC_MINS, KC_EQL, KC_RBRC, + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NUHS, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, KC_RO, KC_SFTENT, + KC_RALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RALT(KC_NUBS), KC_TRNS + ), + + [_ADJUST] = LAYOUT( + 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, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +int RGB_current_mode; + +void matrix_init_user(void) { +#ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; +#endif +} + +//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk +#ifdef OLED_DRIVER_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_keyboard_master()) + return OLED_ROTATION_180; // flips the display 180 degrees if offhand + return rotation; +} + +// When you add source files to SRC in rules.mk, you can use functions. +const char *read_layer_state(void); +const char *read_logo(void); +void set_keylog(uint16_t keycode, keyrecord_t *record); +//const char *read_keylog(void); +//const char *read_keylogs(void); + +// const char *read_mode_icon(bool swap); +// const char *read_host_led_state(void); +// void set_timelog(void); +// const char *read_timelog(void); + +void oled_task_user(void) { + if (is_keyboard_master()) { + // If you want to change the display of OLED, you need to change here + oled_write_ln(read_layer_state(), false); + //oled_write_ln(read_keylog(), false); + //oled_write_ln(read_keylogs(), false); + //oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false); + //oled_write_ln(read_host_led_state(), false); + //oled_write_ln(read_timelog(), false); + } else { + oled_write(read_logo(), false); + } +} +#endif // OLED_DRIVER_ENABLE + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef OLED_DRIVER_ENABLE + set_keylog(keycode, record); +#endif + // set_timelog(); + } + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + update_tri_layer(_LOWER, _RAISE, _ADJUST); + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + } 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; +} + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + // index 1 == minion side + if (index == 1) { + if (clockwise) { + tap_code(KC_VOLD); + } else { + tap_code(KC_VOLU); + } + } +} +#endif diff --git a/keyboards/lily58/keymaps/drasbeck/readme.md b/keyboards/lily58/keymaps/drasbeck/readme.md new file mode 100644 index 0000000000..51d0991072 --- /dev/null +++ b/keyboards/lily58/keymaps/drasbeck/readme.md @@ -0,0 +1,14 @@ +## Danish (Dansk) layout for the Lily58 Pro +Keyboard: Lily58 Pro +Keys: Lily58 Pro is 6×4+5keys column-staggered split keyboard, optinal with a rotary encoder. +Flash instructions: Flash each side of the keyboard, minding whether the side uses a Pro Micro or Elite-C controller. + +### Layout +Danish special characters on main layer, moving other characters to mainly raised layer. + +Layer 0 = default +Layer 1 = lower +Layer 2 = raise + +![keymap](https://drasbeck.dk/public/keymap_lily58pro_danskish.png) + diff --git a/keyboards/lily58/keymaps/drasbeck/rules.mk b/keyboards/lily58/keymaps/drasbeck/rules.mk new file mode 100644 index 0000000000..ff8b816e3f --- /dev/null +++ b/keyboards/lily58/keymaps/drasbeck/rules.mk @@ -0,0 +1,28 @@ +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +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 +AUDIO_ENABLE = no # Audio output +BLUETOOTH_ENABLE = no # Enable Bluetooth +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +SWAP_HANDS_ENABLE = no # Enable one-hand typing +OLED_DRIVER_ENABLE = yes # OLED display +ENCODER_ENABLE = yes # Enable encoder + +# 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 you want to change the display of OLED, you need to change here +SRC += ./lib/rgb_state_reader.c \ + ./lib/layer_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/keylogger.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ + # ./lib/timelogger.c \ diff --git a/keyboards/lily58/keymaps/muuko/config.h b/keyboards/lily58/keymaps/muuko/config.h new file mode 100644 index 0000000000..e963355bd5 --- /dev/null +++ b/keyboards/lily58/keymaps/muuko/config.h @@ -0,0 +1,42 @@ +/* +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 . +*/ + +#pragma once + +#define EE_HANDS +#define USE_SERIAL_PD2 + +#define OLED_TIMEOUT 300000 + +#define NO_MUSIC_MODE + +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT + +#ifdef TAPPING_TERM +#undef TAPPING_TERM +#endif +#define TAPPING_TERM 120 + +#ifdef COMBO_COUNT +#undef COMBO_COUNT +#endif +#define COMBO_COUNT 2 +#define COMBO_TERM 20 diff --git a/keyboards/lily58/keymaps/muuko/keymap.c b/keyboards/lily58/keymaps/muuko/keymap.c new file mode 100644 index 0000000000..b8afa0aa4c --- /dev/null +++ b/keyboards/lily58/keymaps/muuko/keymap.c @@ -0,0 +1,184 @@ +/* Copyright 2020 @muuko + * + * 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 QMK_KEYBOARD_H +#include +#include + +#define IDLE_FRAMES 5 +#define IDLE_SPEED 20 +#define TAP_FRAMES 2 +#define TAP_SPEED 40 +#define ANIM_FRAME_DURATION 200 +#define ANIM_SIZE 512 + +char wpm[16]; +uint32_t anim_timer = 0; +uint32_t anim_sleep = 0; +uint8_t current_idle_frame = 0; +uint8_t current_tap_frame = 0; + +static long int oled_timeout = 300000; + +enum combos { ESCAPE_COMBO, DELETE_COMBO }; +const uint16_t PROGMEM escape_combo[] = { KC_GRV, KC_1, COMBO_END }; +const uint16_t PROGMEM delete_combo[] = { KC_DOT, KC_SLSH, COMBO_END }; +combo_t key_combos[COMBO_COUNT] = { + [ESCAPE_COMBO] = COMBO(escape_combo, KC_ESC), + [DELETE_COMBO] = COMBO(delete_combo, KC_DEL) +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LCA_T(KC_MINS), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, RGUI_T(KC_EQL), + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, RCTL_T(KC_QUOT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_BSLS), + KC_LGUI, KC_LALT, LT(1, KC_DEL), KC_SPC, KC_ENT, KC_BSPC, MO(1), TG(1) + ), + [1] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TAB, KC_MNXT, KC_HOME, KC_UP, KC_PGUP, KC_VOLU, KC_PMNS, KC_P7, KC_P8, KC_P9, KC_PSLS, LCTL(KC_RGUI), + KC_LCTL, KC_MPLY, KC_LEFT, KC_DOWN, KC_RGHT, KC_VOLD, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_PAST, RCTL_T(KC_PEQL), + KC_LSFT, KC_MPRV, KC_END, KC_DEL, KC_PGDN, KC_MUTE, KC_LPRN, KC_RPRN, KC_P0, KC_P1, KC_P2, KC_P3, C_S_T(KC_PDOT), KC_RSFT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_keyboard_master()) return OLED_ROTATION_180; + else return rotation; +} + +static void render_status(void) { + oled_write_P(PSTR(" layer "), false); + + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR(" 0"), false); + break; + case 1: + oled_write_P(PSTR(" 1"), false); + break; + default: + oled_write_P(PSTR(" ?"), false); + break; + } + + oled_write_P(PSTR("\n\n "), false); + sprintf(wpm, "%03d", get_current_wpm()); + oled_write(wpm, false); + oled_write_P(PSTR(" wpm"), false); +} + +static void render_anim(void) { + static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,16,8,8,4,4,4,8,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,100,130,2,2,2,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64, + 64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,56,4,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + }, + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,16,8,8,4,4,4,8,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,100,130,2,2,2,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64, + 64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,56,4,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8, + 7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + }, + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,64,64,64,64,32,32,32,32,16,8,4,2,2,4,24,96,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,194,1,1,2,2,4,4,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,96,0,129,130,130,132,8,16,32,64,128,0,0,0,0,128,128,128,128,64,64,64,64,32, + 32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,25,6,0,0,0,0,0,0,0,24,24,24,27,3,0,64,160,34,36,20,18,18,18,11,8,8,8,8,5,5,9,9,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + }, + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64, + 64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8, + 7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + }, + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,8,4,2,2,2,4,56,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,226,1,1,2,2,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,192,193,193,194,4,8,16,32,64,128,0,0,0,128,128,128,128,64,64,64,64, + 32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,0,0,0,0,0,12,12,12,13,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,2,2,4,4,8,8,8,8,8,7,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + } + }; + static const char PROGMEM prep[][ANIM_SIZE] = { + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,129,128,128,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,0,1,225,26,6,9,49,53,1,138,124,0,0,128,128,128,128,64,64, + 64,64,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,24,6,5,152,153,132,195,124,65,65,64,64,32,33,34,18,17,17,17,9,8,8,8,8,4,4,4,4,4,4,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + } + }; + static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = { + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,248,248,248,248,0,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,129,128,128,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,0,1,1,2,4,8,16,32,67,135,7,1,0,184,188,190,159, + 95,95,79,76,32,32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,24,6,5,152,153,132,67,124,65,65,64,64,32,33,34,18,17,17,17,9,8,8,8,8,4,4,8,8,16,16,16,16,16,17,15,1,61,124,252,252,252,252,252,60,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,2,2,1,1,1, + 1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + }, + { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,128,64,64,32,32,32,32,16,16,16,16,8,4,2,1,1,2,12,48,64,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,225,0,0,1,1,2,2,1,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,128,0,48,48,0,0,1,225,26,6,9,49,53,1,138,124,0,0,128,128,128,128,64,64,64,64,32, + 32,32,32,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,112,12,3,0,0,0,0,0,0,0,0,0,0,1,1,0,64,160,33,34,18,17,17,17,9,8,8,8,8,4,4,4,4,4,4,2,2,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,32,32,32,32,32,16,16,16,16,16,8,8,8,8,8,4,4,4,4,4,2,3,122,122,121,121,121,121,57,49,2,2,4,4,8,8,8,136,136,135,128, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + } + }; + + void animation_phase(void) { + if (get_current_wpm() <= IDLE_SPEED) { + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + + oled_write_raw_P(idle[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); + } + + if (get_current_wpm() > IDLE_SPEED && get_current_wpm() < TAP_SPEED) { + oled_write_raw_P(prep[0], ANIM_SIZE); + } + + if (get_current_wpm() >= TAP_SPEED) { + current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; + + oled_write_raw_P(tap[abs((TAP_FRAMES - 1) - current_tap_frame)], ANIM_SIZE); + } + } + + sprintf(wpm, "%03d", get_current_wpm()); + + if (strcmp(wpm, "000") != 0) { + anim_sleep = timer_read32(); + } else { + if (timer_elapsed32(anim_sleep) > oled_timeout) { + anim_sleep = 0; + } + } + + if (timer_elapsed32(anim_sleep) > oled_timeout) { + oled_off(); + } else { + oled_on(); + + if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + + animation_phase(); + } + } +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); + } else { + render_anim(); + } +} +#endif diff --git a/keyboards/lily58/keymaps/muuko/rules.mk b/keyboards/lily58/keymaps/muuko/rules.mk new file mode 100644 index 0000000000..3f958dff35 --- /dev/null +++ b/keyboards/lily58/keymaps/muuko/rules.mk @@ -0,0 +1,4 @@ +OLED_DRIVER_ENABLE = yes +WPM_ENABLE = yes +EXTRAKEY_ENABLE = yes +COMBO_ENABLE = yes diff --git a/keyboards/lily58/keymaps/ninjonas/rules.mk b/keyboards/lily58/keymaps/ninjonas/rules.mk index dc3fe55bca..2cccbd077d 100644 --- a/keyboards/lily58/keymaps/ninjonas/rules.mk +++ b/keyboards/lily58/keymaps/ninjonas/rules.mk @@ -1,2 +1,2 @@ OLED_DRIVER_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes \ No newline at end of file +LTO_ENABLE = yes diff --git a/keyboards/lily58/keymaps/yuchi/config.h b/keyboards/lily58/keymaps/yuchi/config.h index 58bbdc5e9d..130b5642e1 100644 --- a/keyboards/lily58/keymaps/yuchi/config.h +++ b/keyboards/lily58/keymaps/yuchi/config.h @@ -28,25 +28,9 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS -#define SSD1306OLED +//#define OLED_DRIVER #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD -#define TAPPING_TERM 100 - -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 27 -#define RGBLIGHT_LIMIT_VAL 120 -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -// Underglow -/* -#undef RGBLED_NUM -#define RGBLED_NUM 14 // Number of LEDs -#define RGBLIGHT_ANIMATIONS -#define RGBLIGHT_SLEEP -*/ \ No newline at end of file +#define TAPPING_TERM 100 \ No newline at end of file diff --git a/keyboards/lily58/keymaps/yuchi/keymap.c b/keyboards/lily58/keymaps/yuchi/keymap.c index d258fbcbc0..37230696fc 100644 --- a/keyboards/lily58/keymaps/yuchi/keymap.c +++ b/keyboards/lily58/keymaps/yuchi/keymap.c @@ -8,26 +8,13 @@ #include "ssd1306.h" #endif - -extern keymap_config_t keymap_config; - -#ifdef RGBLIGHT_ENABLE -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; -#endif - extern uint8_t is_master; -#define _QWERTY 0 -#define _LOWER 1 -#define _RAISE 2 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, - ADJUST, +enum layer_number { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, }; @@ -53,17 +40,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \ KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - LOWER,KC_LGUI, KC_LALT, KC_SPC, KC_ENT, KC_BSPC, KC_RGUI, RAISE \ + MO(_LOWER),KC_LGUI, KC_LALT, LT(_LOWER,KC_SPC), LT(_RAISE,KC_ENT), KC_BSPC, KC_RGUI, MO(_RAISE) \ ), /* LOWER * ,-----------------------------------------. ,-----------------------------------------. * | | | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | - | + * | | 1 | 2 | 3 | 4 | 5 |-------. ,-------| 6 | 7 | 8 | 9 | 0 | | * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| - * | | | | | | |-------| |-------| | _ | + | { | } | | | + * | | | | | | |-------| |-------| | | ` | + | { | } | | * `-----------------------------------------/ / \ \-----------------------------------------' * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | * | | | |/ / \ \ | | | | @@ -71,20 +58,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LOWER] = LAYOUT( \ _______, _______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______,\ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TILD, \ - _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_GRAVE, KC_PLUS, KC_LCBR, KC_RCBR, _______, \ _______, _______, _______, _______, _______, _______, _______, _______\ ), /* RAISE * ,-----------------------------------------. ,-----------------------------------------. * | | | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | F1 | F2 | F3 | F4 | F5 | F6 |-------. ,-------| | Left | Down | Up |Right | | + * | | | | | | |-------. ,-------| | Left | Down | Up |Right | | * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| - * | F7 | F8 | F9 | F10 | F11 | F12 |-------| |-------| + | - | = | [ | ] | \ | + * | | | | | | |-------| |-------| + | = | [ | ] | \ | | * `-----------------------------------------/ / \ \-----------------------------------------' * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | * | | | |/ / \ \ | | | | @@ -93,9 +80,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = LAYOUT( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - KC_GRV, 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, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, \ - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PLUS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, _______, _______, _______, _______, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_PLUS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, \ _______, _______, _______, _______, _______, _______, _______, _______ \ ), @@ -105,9 +92,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | |-------. ,-------| | |RGB ON| HUE+ | SAT+ | VAL+ | + * | | | | | | |-------. ,-------| | | | | | | * |------+------+------+------+------+------| | | |------+------+------+------+------+------| - * | | | | | | |-------| |-------| | | MODE | HUE- | SAT- | VAL- | + * | | | | | | |-------| |-------| | | | | | | * `-----------------------------------------/ / \ \-----------------------------------------' * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | * | | | |/ / \ \ | | | | @@ -116,13 +103,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT( \ 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, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD,\ + 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,\ _______, _______, _______, _______, _______, _______, _______, _______ \ ) }; -int RGB_current_mode; // Setting ADJUST layer RGB back to default void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { @@ -133,12 +119,6 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { } } -void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif -} - //SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk #ifdef OLED_DRIVER_ENABLE @@ -148,7 +128,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -// When add source files to SRC in rules.mk, you can use functions. +// When you add source files to SRC in rules.mk, you can use functions. const char *read_layer_state(void); const char *read_logo(void); void set_keylog(uint16_t keycode, keyrecord_t *record); @@ -160,12 +140,8 @@ const char *read_keylogs(void); // void set_timelog(void); // const char *read_timelog(void); -void matrix_scan_user(void) { - iota_gfx_task(); -} - -void matrix_render_user(struct CharacterMatrix *matrix) { - if (is_master) { +void oled_task_user(void) { + if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here oled_write_ln(read_layer_state(), false); oled_write_ln(read_keylog(), false); @@ -177,8 +153,7 @@ void matrix_render_user(struct CharacterMatrix *matrix) { oled_write(read_logo(), false); } } - -#endif//SSD1306OLED +#endif // OLED_DRIVER_ENABLE bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { @@ -187,42 +162,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif // set_timelog(); } - - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer_RGB(_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/lily58/keymaps/yuchi/rules.mk b/keyboards/lily58/keymaps/yuchi/rules.mk index 0db9ac50fa..45bf4cfc3a 100644 --- a/keyboards/lily58/keymaps/yuchi/rules.mk +++ b/keyboards/lily58/keymaps/yuchi/rules.mk @@ -13,8 +13,9 @@ 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. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing +OLED_DRIVER_ENABLE= yes # OLED display # 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/lily58/readme.md b/keyboards/lily58/readme.md index cbf0c1eeb0..1aedab6e17 100644 --- a/keyboards/lily58/readme.md +++ b/keyboards/lily58/readme.md @@ -10,6 +10,6 @@ Hardware Availability: [PCB & Case Data](https://github.com/kata0510/Lily58) Make example for this keyboard (after setting up your build environment): - sudo make lily58:default + make lily58:default -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/lily58/rev1/config.h b/keyboards/lily58/rev1/config.h index adcf11b52b..4443f03c4c 100644 --- a/keyboards/lily58/rev1/config.h +++ b/keyboards/lily58/rev1/config.h @@ -20,10 +20,10 @@ along with this program. If not, see . #pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFC51 -#define PRODUCT_ID 0x0058 +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEB2D #define DEVICE_VER 0x0100 -#define MANUFACTURER F_YUUCHI +#define MANUFACTURER liliums #define PRODUCT Lily58 #define DESCRIPTION Lily58 is 6×4+5keys column-staggered split keyboard. diff --git a/keyboards/lily58/rev1/info.json b/keyboards/lily58/rev1/info.json index 4a3568c3e2..dcafc96fa2 100644 --- a/keyboards/lily58/rev1/info.json +++ b/keyboards/lily58/rev1/info.json @@ -1,7 +1,7 @@ { "keyboard_name": "Lily58", "url": "", - "maintainer": "F_YUUCHI", + "maintainer": "liliums", "width": 16.5, "height": 5.25, "layouts": { diff --git a/keyboards/longnald/corin/config.h b/keyboards/longnald/corin/config.h new file mode 100644 index 0000000000..12be8ba27b --- /dev/null +++ b/keyboards/longnald/corin/config.h @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2020 Longnald + * Copyright (C) 2020 Seaton Jiang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5633 +#define PRODUCT_ID 0x1024 +#define DEVICE_VER 0x0004 +#define MANUFACTURER Longnald +#define PRODUCT Corin + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* Keyboard Matrix Assignments */ +#define MATRIX_ROW_PINS { F4, F0, B2, B3, D5 } +#define MATRIX_COL_PINS { F7, F6, F1, F5, B1, E6, D4, B7, D1, D2, D0, B4, B6, C6, C7 } + +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 64 +# define RGBLIGHT_HUE_STEP 20 +# define RGBLIGHT_SAT_STEP 20 +# define RGBLIGHT_VAL_STEP 40 +# define RGBLIGHT_LIMIT_VAL 200 +# define RGBLIGHT_SLEEP +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +# define RGBLIGHT_EFFECT_SNAKE +# define RGBLIGHT_EFFECT_STATIC_GRADIENT +#endif diff --git a/keyboards/longnald/corin/corin.c b/keyboards/longnald/corin/corin.c new file mode 100644 index 0000000000..fabe3686d8 --- /dev/null +++ b/keyboards/longnald/corin/corin.c @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2020 Longnald + * Copyright (C) 2020 Seaton Jiang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "corin.h" \ No newline at end of file diff --git a/keyboards/longnald/corin/corin.h b/keyboards/longnald/corin/corin.h new file mode 100644 index 0000000000..fa727c3c78 --- /dev/null +++ b/keyboards/longnald/corin/corin.h @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2020 Longnald + * Copyright (C) 2020 Seaton Jiang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_64_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, \ + K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K43, K46, K4A, K4B, K4C, K4D, K4E \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \ + { KC_NO, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E } \ +} diff --git a/keyboards/longnald/corin/info.json b/keyboards/longnald/corin/info.json new file mode 100644 index 0000000000..e0faf22090 --- /dev/null +++ b/keyboards/longnald/corin/info.json @@ -0,0 +1,77 @@ +{ + "keyboard_name": "Corin", + "url": "https://github.com/longnald/corin", + "maintainer": "Seaton Jiang ", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_64_ansi": { + "layout": [ + { "label": "K00 (F4,F7)", "x": 0, "y": 0 }, + { "label": "K01 (F4,F6)", "x": 1, "y": 0 }, + { "label": "K02 (F4,F1)", "x": 2, "y": 0 }, + { "label": "K03 (F4,F5)", "x": 3, "y": 0 }, + { "label": "K04 (F4,B1)", "x": 4, "y": 0 }, + { "label": "K05 (F4,E6)", "x": 5, "y": 0 }, + { "label": "K06 (F4,D6)", "x": 6, "y": 0 }, + { "label": "K07 (F4,B7)", "x": 7, "y": 0 }, + { "label": "K08 (F4,D1)", "x": 8, "y": 0 }, + { "label": "K09 (F4,D2)", "x": 9, "y": 0 }, + { "label": "K0A (F4,D0)", "x": 10, "y": 0 }, + { "label": "K0B (F4,B4)", "x": 11, "y": 0 }, + { "label": "K0C (F4,B6)", "x": 12, "y": 0 }, + { "label": "K0E (F4,C7)", "x": 13, "y": 0, "w": 2 }, + { "label": "K10 (F0,F7)", "x": 0, "y": 1, "w": 1.5 }, + { "label": "K12 (F0,F1)", "x": 1.5, "y": 1 }, + { "label": "K13 (F0,F5)", "x": 2.5, "y": 1 }, + { "label": "K14 (F0,B1)", "x": 3.5, "y": 1 }, + { "label": "K15 (F0,E6)", "x": 4.5, "y": 1 }, + { "label": "K16 (F0,D6)", "x": 5.5, "y": 1 }, + { "label": "K17 (F0,B7)", "x": 6.5, "y": 1 }, + { "label": "K18 (F0,D1)", "x": 7.5, "y": 1 }, + { "label": "K19 (F0,D2)", "x": 8.5, "y": 1 }, + { "label": "K1A (F0,D0)", "x": 9.5, "y": 1 }, + { "label": "K1B (F0,B4)", "x": 10.5, "y": 1 }, + { "label": "K1C (F0,B6)", "x": 11.5, "y": 1 }, + { "label": "K1D (F0,C6)", "x": 12.5, "y": 1 }, + { "label": "K1E (F0,C7)", "x": 13.5, "y": 1, "w": 1.5 }, + { "label": "K20 (B2,F7)", "x": 0, "y": 2, "w": 1.75 }, + { "label": "K22 (B2,F1)", "x": 1.75, "y": 2 }, + { "label": "K23 (B2,F5)", "x": 2.75, "y": 2 }, + { "label": "K24 (B2,B1)", "x": 3.75, "y": 2 }, + { "label": "K25 (B2,E6)", "x": 4.75, "y": 2 }, + { "label": "K26 (B2,D6)", "x": 5.75, "y": 2 }, + { "label": "K27 (B2,B7)", "x": 6.75, "y": 2 }, + { "label": "K28 (B2,D1)", "x": 7.75, "y": 2 }, + { "label": "K29 (B2,D2)", "x": 8.75, "y": 2 }, + { "label": "K2A (B2,D0)", "x": 9.75, "y": 2 }, + { "label": "K2B (B2,B4)", "x": 10.75, "y": 2 }, + { "label": "K2C (B2,B6)", "x": 11.75, "y": 2 }, + { "label": "K2D (B2,C6)", "x": 12.75, "y": 2, "w": 2.25 }, + { "label": "K31 (B3,F6)", "x": 0, "y": 3, "w": 2 }, + { "label": "K32 (B3,F1)", "x": 2, "y": 3 }, + { "label": "K33 (B3,F5)", "x": 3, "y": 3 }, + { "label": "K34 (B3,B1)", "x": 4, "y": 3 }, + { "label": "K35 (B3,E6)", "x": 5, "y": 3 }, + { "label": "K36 (B3,D6)", "x": 6, "y": 3 }, + { "label": "K37 (B3,B7)", "x": 7, "y": 3 }, + { "label": "K38 (B3,D1)", "x": 8, "y": 3 }, + { "label": "K39 (B3,D2)", "x": 9, "y": 3 }, + { "label": "K3A (B3,D0)", "x": 10, "y": 3 }, + { "label": "K3B (B3,B4)", "x": 11, "y": 3 }, + { "label": "K3C (B3,B6)", "x": 12, "y": 3 }, + { "label": "K3D (B3,C6)", "x": 13, "y": 3 }, + { "label": "K3E (B3,C7)", "x": 14, "y": 3 }, + { "label": "K40 (D5,F7)", "x": 0, "y": 4, "w": 1.25 }, + { "label": "K41 (D5,F6)", "x": 1.25, "y": 4, "w": 1.25 }, + { "label": "K43 (D5,F5)", "x": 2.5, "y": 4, "w": 1.25 }, + { "label": "K46 (D5,D6)", "x": 3.75, "y": 4, "w": 6.25 }, + { "label": "K4A (D5,D0)", "x": 10, "y": 4 }, + { "label": "K4B (D5,B4)", "x": 11, "y": 4 }, + { "label": "K4C (D5,B6)", "x": 12, "y": 4 }, + { "label": "K4D (D5,C6)", "x": 13, "y": 4 }, + { "label": "K4E (D5,C7)", "x": 14, "y": 4 } + ] + } + } +} diff --git a/keyboards/longnald/corin/keymaps/default/keymap.c b/keyboards/longnald/corin/keymaps/default/keymap.c new file mode 100644 index 0000000000..c8906efc59 --- /dev/null +++ b/keyboards/longnald/corin/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2020 Longnald + * Copyright (C) 2020 Seaton Jiang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_64_ansi( + 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_HOME, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(2), MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_64_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, KC_DEL, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_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_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_NO, KC_PGDN, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + [2] = LAYOUT_64_ansi( + KC_NO, RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_G, RGB_M_SW, RGB_M_SN, KC_NO, KC_NO, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, KC_NO, + KC_NO, KC_NO, LAG_NRM, KC_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, LAG_SWP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + MO(3), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + [3] = LAYOUT_64_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, RESET, KC_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 + ), +}; diff --git a/keyboards/longnald/corin/readme.md b/keyboards/longnald/corin/readme.md new file mode 100644 index 0000000000..116baa7d28 --- /dev/null +++ b/keyboards/longnald/corin/readme.md @@ -0,0 +1,15 @@ +# Corin + +![Corin view](https://github.com/longnald/corin/raw/master/view/view-1.jpg) + +Corin is a 64-key keyboard that adds 4 more arrow keys than a regular 60% keyboard made and sold by Seaton Jiang. + +- Keyboard Maintainer: [Longnald](https://github.com/longnald) & [Seaton Jiang](https://github.com/seatonjiang) +- Hardware Supported: [Corin PCB (uses 32U4)](https://github.com/longnald/corin) +- Hardware Availability: [wwww.longnald.com](https://wwww.longnald.com/) + +Make example for this keyboard (after setting up your build environment): + + make longnald/corin:default + +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/longnald/corin/rules.mk b/keyboards/longnald/corin/rules.mk new file mode 100644 index 0000000000..965087c1a6 --- /dev/null +++ b/keyboards/longnald/corin/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/m0lly/keymaps/via/config.h b/keyboards/m0lly/keymaps/via/config.h deleted file mode 100644 index 579212d4a3..0000000000 --- a/keyboards/m0lly/keymaps/via/config.h +++ /dev/null @@ -1 +0,0 @@ -#define DYNAMIC_KEYMAP_LAYER_COUNT 2 diff --git a/keyboards/maartenwut/solheim68/config.h b/keyboards/maartenwut/solheim68/config.h new file mode 100644 index 0000000000..cb2070e872 --- /dev/null +++ b/keyboards/maartenwut/solheim68/config.h @@ -0,0 +1,143 @@ +/* Copyright 2020 Dekkers + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4705 +#define PRODUCT_ID 0x7BFF +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT Solheim68 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* + * 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 {E6,B0,B1,B2,B3} +#define MATRIX_COL_PINS {F0,F1,F4,F5,F6,F7,C7,C6,B6,B5,B4,D7,D6,D4,D5,D3} +#define UNUSED_PINS {B7,D0,D1,D2} + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * 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 + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/maartenwut/solheim68/info.json b/keyboards/maartenwut/solheim68/info.json new file mode 100644 index 0000000000..14a4a36f5a --- /dev/null +++ b/keyboards/maartenwut/solheim68/info.json @@ -0,0 +1,397 @@ +{ + "keyboard_name": "Solheim68", + "url": "https://github.com/Maartenwut/solheim68", + "maintainer": "maartenwut", + "width": 17.25, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15.25, "y":1}, + {"x":16.25, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + {"x":13.75, "y":2, "w":1.25}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15.25, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":14.25, "y":4}, + {"x":15.25, "y":4}, + {"x":16.25, "y":4} + ] + }, + "LAYOUT_68_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15.25, "y":1}, + {"x":16.25, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":2.75}, + {"x":15.25, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":14.25, "y":4}, + {"x":15.25, "y":4}, + {"x":16.25, "y":4} + ] + }, + "LAYOUT_68_iso": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":15.25, "y":1}, + {"x":16.25, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":2.75}, + {"x":15.25, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":14.25, "y":4}, + {"x":15.25, "y":4}, + {"x":16.25, "y":4} + ] + }, + "LAYOUT_68_ansi_split_rshift": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15.25, "y":1}, + {"x":16.25, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15.25, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":14.25, "y":4}, + {"x":15.25, "y":4}, + {"x":16.25, "y":4} + ] + }, + "LAYOUT_68_iso_split_rshift": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":15.25, "y":1}, + {"x":16.25, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15.25, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":14.25, "y":4}, + {"x":15.25, "y":4}, + {"x":16.25, "y":4} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/maartenwut/solheim68/keymaps/default/keymap.c b/keyboards/maartenwut/solheim68/keymaps/default/keymap.c new file mode 100644 index 0000000000..728e8019a2 --- /dev/null +++ b/keyboards/maartenwut/solheim68/keymaps/default/keymap.c @@ -0,0 +1,31 @@ +/* Copyright 2020 Dekkers + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + 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_MPLY, KC_HOME, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, 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, MO(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + [1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_PSCR, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/keyboards/maartenwut/solheim68/keymaps/default/readme.md b/keyboards/maartenwut/solheim68/keymaps/default/readme.md new file mode 100644 index 0000000000..6e9745403b --- /dev/null +++ b/keyboards/maartenwut/solheim68/keymaps/default/readme.md @@ -0,0 +1 @@ +This is the default keymap for the Solheim68. \ No newline at end of file diff --git a/keyboards/maartenwut/solheim68/readme.md b/keyboards/maartenwut/solheim68/readme.md new file mode 100644 index 0000000000..1cf0ee9463 --- /dev/null +++ b/keyboards/maartenwut/solheim68/readme.md @@ -0,0 +1,17 @@ +# Solheim68 + +A replacement PCB for the VA68M (v2) with Mini-USB. + +* Keyboard Maintainer: [Maartenwut](https://github.com/Maartenwut) +* Hardware Supported: Solheim68 PCB +* Hardware Availability: [Open source on GitHub](https://github.com/Maartenwut/solheim68) + +Make example for this keyboard (after setting up your build environment): + + make maartenwut/solheim68:default + +Flashing example for this keyboard: + + make maartenwut/solheim68:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/maartenwut/solheim68/rules.mk b/keyboards/maartenwut/solheim68/rules.mk new file mode 100644 index 0000000000..a90eef1fc6 --- /dev/null +++ b/keyboards/maartenwut/solheim68/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/maartenwut/solheim68/solheim68.c b/keyboards/maartenwut/solheim68/solheim68.c new file mode 100644 index 0000000000..27f90f4e87 --- /dev/null +++ b/keyboards/maartenwut/solheim68/solheim68.c @@ -0,0 +1,16 @@ +/* Copyright 2020 Dekkers + * + * 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 "solheim68.h" diff --git a/keyboards/maartenwut/solheim68/solheim68.h b/keyboards/maartenwut/solheim68/solheim68.h new file mode 100644 index 0000000000..2f6339bd10 --- /dev/null +++ b/keyboards/maartenwut/solheim68/solheim68.h @@ -0,0 +1,102 @@ +/* Copyright 2020 Dekkers + * + * 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 . + */ +#pragma once + +#include "quantum.h" +#define XXX KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k2e, k0d, k0e, k0f, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, \ + 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, k3e, \ + k40, k41, k42, k46, k4a, k4b, k4c, k4d, k4e, k4f \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, k4e, k4f } \ +} + +#define LAYOUT_68_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, \ + k40, k41, k42, k46, k4a, k4b, k4c, k4d, k4e, k4f \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, k3e, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, k4e, k4f } \ +} + +#define LAYOUT_68_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, k1f, \ + 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, k3e, \ + k40, k41, k42, k46, k4a, k4b, k4c, k4d, k4e, k4f \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, XXX, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, k3e, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, k4e, k4f } \ +} + +#define LAYOUT_68_ansi_split_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k46, k4a, k4b, k4c, k4d, k4e, k4f \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, k4e, k4f } \ +} + +#define LAYOUT_68_iso_split_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, k1f, \ + 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, k3e, \ + k40, k41, k42, k46, k4a, k4b, k4c, k4d, k4e, k4f \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, XXX, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, k4e, k4f } \ +} diff --git a/keyboards/majistic/config.h b/keyboards/majistic/config.h new file mode 100644 index 0000000000..4ced5dd890 --- /dev/null +++ b/keyboards/majistic/config.h @@ -0,0 +1,57 @@ + +/* +Copyright 2020 yossiyossy + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6E55 +#define DEVICE_VER 0x0001 +#define MANUFACTURER yossiyossy +#define PRODUCT maJIStic + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +#define MATRIX_ROW_PINS { F6, F7, B1, B3, B2 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5, F4, F5 } // F4, F5 is dummy +#define MATRIX_ROW_PINS_RIGHT { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS_RIGHT { B6, B2, B3, B1, F7, F6, F5, F4 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/majistic/info.json b/keyboards/majistic/info.json new file mode 100644 index 0000000000..2ae9267882 --- /dev/null +++ b/keyboards/majistic/info.json @@ -0,0 +1,78 @@ +{ + "keyboard_name": "maJIStic", + "url": "https://github.com/yossiyossy/maJIStic", + "maintainer": "yossiyossy", + "width": 15.5, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"1", "x":0, "y":0, "w":1.5}, + {"label":"2", "x":1.5, "y":0}, + {"label":"3", "x":2.5, "y":0}, + {"label":"4", "x":3.5, "y":0}, + {"label":"5", "x":4.5, "y":0}, + {"label":"6", "x":5.5, "y":0}, + {"label":"7", "x":7.5, "y":0}, + {"label":"8", "x":8.5, "y":0}, + {"label":"9", "x":9.5, "y":0}, + {"label":"0", "x":10.5, "y":0}, + {"label":"-", "x":11.5, "y":0}, + {"label":"^", "x":12.5, "y":0}, + {"label":"\\", "x":13.5, "y":0}, + {"label":"BS", "x":14.5, "y":0}, + {"label":"Tab", "x":0, "y":1}, + {"label":"Q", "x":1, "y":1}, + {"label":"W", "x":2, "y":1}, + {"label":"E", "x":3, "y":1}, + {"label":"R", "x":4, "y":1}, + {"label":"T", "x":5, "y":1}, + {"label":"Y", "x":7, "y":1}, + {"label":"U", "x":8, "y":1}, + {"label":"I", "x":9, "y":1}, + {"label":"O", "x":10, "y":1}, + {"label":"P", "x":11, "y":1}, + {"label":"@", "x":12, "y":1}, + {"label":"[", "x":13, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.25}, + {"label":"A", "x":1.25, "y":2}, + {"label":"S", "x":2.25, "y":2}, + {"label":"D", "x":3.25, "y":2}, + {"label":"F", "x":4.25, "y":2}, + {"label":"G", "x":5.25, "y":2}, + {"label":"H", "x":7.25, "y":2}, + {"label":"J", "x":8.25, "y":2}, + {"label":"K", "x":9.25, "y":2}, + {"label":"L", "x":10.25, "y":2}, + {"label":";", "x":11.25, "y":2}, + {"label":":", "x":12.25, "y":2}, + {"label":"]", "x":13.25, "y":2}, + {"label":"Enter", "x":14.25, "y":1, "w":1.25, "h":2}, + {"label":"Shift", "x":0, "y":3, "w":1.75}, + {"label":"Z", "x":1.75, "y":3}, + {"label":"X", "x":2.75, "y":3}, + {"label":"C", "x":3.75, "y":3}, + {"label":"V", "x":4.75, "y":3}, + {"label":"B", "x":5.75, "y":3}, + {"label":"N", "x":7.75, "y":3}, + {"label":"M", "x":8.75, "y":3}, + {"label":",", "x":9.75, "y":3}, + {"label":".", "x":10.75, "y":3}, + {"label":"/", "x":11.75, "y":3}, + {"label":"up", "x":12.75, "y":3}, + {"label":"Shift", "x":13.75, "y":3, "w":1.75}, + {"label":"Ctrl", "x":0, "y":4}, + {"label":"Alt", "x":1, "y":4}, + {"label":"command", "x":2, "y":4, "w":1.25}, + {"label":"EISU", "x":3.25, "y":4, "w":1.25}, + {"label":"", "x":4.5, "y":4, "w":1.75}, + {"label":"", "x":7.25, "y":4, "w":1.5}, + {"label":"KANA", "x":8.75, "y":4, "w":1.5}, + {"label":"command", "x":10.25, "y":4, "w":1.5}, + {"label":"left", "x":11.75, "y":4}, + {"label":"down", "x":12.75, "y":4}, + {"label":"right", "x":13.75, "y":4} + ] + } + } +} diff --git a/keyboards/majistic/keymaps/default/config.h b/keyboards/majistic/keymaps/default/config.h new file mode 100644 index 0000000000..4db5715cba --- /dev/null +++ b/keyboards/majistic/keymaps/default/config.h @@ -0,0 +1,17 @@ +/* Copyright 2020 yossiyossy + * + * 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 . + */ + +#pragma once diff --git a/keyboards/majistic/keymaps/default/keymap.c b/keyboards/majistic/keymaps/default/keymap.c new file mode 100644 index 0000000000..e26a631d71 --- /dev/null +++ b/keyboards/majistic/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +/* Copyright 2020 yossiyossy + * + * 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 QMK_KEYBOARD_H +#include "keymap_jp.h" + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _LOWER, +}; + +enum custom_keycodes { + L_SPC = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + JP_1, JP_2, JP_3, JP_4, JP_5, JP_6, JP_7, JP_8, JP_9, JP_0, JP_MINS, JP_CIRC, JP_YEN, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_SCLN, JP_COLN, JP_RBRC, KC_ENT , \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, KC_UP, KC_RSFT, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_LANG2, LT(_LOWER, KC_SPC), LT(_LOWER, KC_SPC), KC_LANG1, KC_RGUI, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), + [_LOWER] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \ + KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, JP_UNDS, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMU, KC_VOLU, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_BRMD, KC_VOLD, _______ \ + ), +}; diff --git a/keyboards/majistic/keymaps/default/readme.md b/keyboards/majistic/keymaps/default/readme.md new file mode 100644 index 0000000000..65ee11cd79 --- /dev/null +++ b/keyboards/majistic/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for maJIStic diff --git a/keyboards/majistic/majistic.c b/keyboards/majistic/majistic.c new file mode 100644 index 0000000000..7ceba7cf28 --- /dev/null +++ b/keyboards/majistic/majistic.c @@ -0,0 +1,17 @@ +/* Copyright 2020 yossiyossy + * + * 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 "majistic.h" diff --git a/keyboards/majistic/majistic.h b/keyboards/majistic/majistic.h new file mode 100644 index 0000000000..77c4a49121 --- /dev/null +++ b/keyboards/majistic/majistic.h @@ -0,0 +1,47 @@ +/* Copyright 2020 yossiyossy + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT(\ + l00, l01, l02, l03, l04, l05, r00, r01, r02, r03, r04, r05, r06, r07, \ + l10, l11, l12, l13, l14, l15, r10, r11, r12, r13, r14, r15, r16, \ + l20, l21, l22, l23, l24, l25, r20, r21, r22, r23, r24, r25, r26, r17, \ + l30, l31, l32, l33, l34, l35, r30, r31, r32, r33, r34, r35, r36, \ + l40, l41, l42, l43, l44, r40, r41, r42, r43, r44, r45 \ +) {\ + { l00, l01, l02, l03, l04, l05, KC_NO, KC_NO }, \ + { l10, l11, l12, l13, l14, l15, KC_NO, KC_NO }, \ + { l20, l21, l22, l23, l24, l25, KC_NO, KC_NO}, \ + { l30, l31, l32, l33, l34, l35, KC_NO, KC_NO}, \ + { l40, l41, l42, l43, l44, KC_NO, KC_NO, KC_NO}, \ + { r00, r01, r02, r03, r04, r05, r06, r07 }, \ + { r10, r11, r12, r13, r14, r15, r16, r17 }, \ + { r20, r21, r22, r23, r24, r25, r26, KC_NO }, \ + { r30, r31, r32, r33, r34, r35, r36, KC_NO }, \ + { r40, r41, r42, r43, r44, r45, KC_NO, KC_NO } \ +} diff --git a/keyboards/majistic/readme.md b/keyboards/majistic/readme.md new file mode 100644 index 0000000000..05916af4e5 --- /dev/null +++ b/keyboards/majistic/readme.md @@ -0,0 +1,15 @@ +# maJIStic + +![maJIStic](https://raw.githubusercontent.com/yossiyossy/maJIStic/master/images/main_image.jpg) + +maJIStic is a split, JIS, magic keyboard like, hot-swappable keybaord! + +* Keyboard Maintainer: [yossiyossy](https://github.com/yossiyossy) +* Hardware Supported: [pcb](https://github.com/yossiyossy/maJIStic/tree/master/pcb), [case](https://github.com/yossiyossy/maJIStic/tree/master/case/dxf) +* Hardware Availability: [booth](https://yossiyossy.booth.pm/items/2325429) + +Make example for this keyboard (after setting up your build environment): + + make majistic:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/katana60/rules.mk b/keyboards/majistic/rules.mk similarity index 56% rename from keyboards/katana60/rules.mk rename to keyboards/majistic/rules.mk index e41c168c4f..2440fc903d 100644 --- a/keyboards/katana60/rules.mk +++ b/keyboards/majistic/rules.mk @@ -2,19 +2,12 @@ MCU = atmega32u4 # Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -23,9 +16,9 @@ COMMAND_ENABLE = yes # Commands for debug and configuration 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 = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +SPLIT_KEYBOARD = yes diff --git a/keyboards/marksard/leftover30/config.h b/keyboards/marksard/leftover30/config.h new file mode 100644 index 0000000000..42c6c62872 --- /dev/null +++ b/keyboards/marksard/leftover30/config.h @@ -0,0 +1,138 @@ +/* +Copyright 2020 marksard + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xDFA8 +#define DEVICE_VER 0x0001 +#define MANUFACTURER marksard +#define PRODUCT leftover30 + +/* Encoder */ +#define ENCODERS_PAD_A { F4 } +#define ENCODERS_PAD_B { F5 } +// #define ENCODER_DIRECTION_FLIP + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 5 + +/* + * 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 { B6, B2, F7, F6, B3, B1, D4, D0 } +#define MATRIX_COL_PINS { B5, B4, E6, D7, C6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 6 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +/*== customize breathing effect ==*/ + /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ + #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 + /*==== use exp() and sin() ====*/ + #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 + #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/marksard/leftover30/info.json b/keyboards/marksard/leftover30/info.json new file mode 100644 index 0000000000..4321527c16 --- /dev/null +++ b/keyboards/marksard/leftover30/info.json @@ -0,0 +1,198 @@ +{ + "keyboard_name": "Leftover30", + "url": "https://github.com/marksard/Keyboards", + "maintainer": "marksard", + "width": 11.5, + "height": 4, + "layouts": { + "LAYOUT_all": { + "layout": [ + { + "label": "Q", + "x": 0.5, + "y": 0 + }, + { + "label": "W", + "x": 1.5, + "y": 0 + }, + { + "label": "E", + "x": 2.5, + "y": 0 + }, + { + "label": "R", + "x": 3.5, + "y": 0 + }, + { + "label": "T", + "x": 4.5, + "y": 0 + }, + { + "label": "Y", + "x": 5.5, + "y": 0 + }, + { + "label": "U", + "x": 6.5, + "y": 0 + }, + { + "label": "I", + "x": 7.5, + "y": 0 + }, + { + "label": "O", + "x": 8.5, + "y": 0 + }, + { + "label": "P", + "x": 9.5, + "y": 0 + }, + { + "label": "BS", + "x": 10.5, + "y": 0 + }, + { + "label": "A", + "x": 0.75, + "y": 1 + }, + { + "label": "S", + "x": 1.75, + "y": 1 + }, + { + "label": "D", + "x": 2.75, + "y": 1 + }, + { + "label": "F", + "x": 3.75, + "y": 1 + }, + { + "label": "G", + "x": 4.75, + "y": 1 + }, + { + "label": "H", + "x": 5.75, + "y": 1 + }, + { + "label": "J", + "x": 6.75, + "y": 1 + }, + { + "label": "K", + "x": 7.75, + "y": 1 + }, + { + "label": "L", + "x": 8.75, + "y": 1 + }, + { + "label": "Enter", + "x": 9.75, + "y": 1, + "w": 1.75 + }, + { + "label": "Z", + "x": 1.25, + "y": 2 + }, + { + "label": "X", + "x": 2.25, + "y": 2 + }, + { + "label": "C", + "x": 3.25, + "y": 2 + }, + { + "label": "V", + "x": 4.25, + "y": 2 + }, + { + "label": "B", + "x": 5.25, + "y": 2 + }, + { + "label": "N", + "x": 6.25, + "y": 2 + }, + { + "label": "M", + "x": 7.25, + "y": 2 + }, + { + "label": "<", + "x": 8.25, + "y": 2 + }, + { + "label": ">", + "x": 9.25, + "y": 2 + }, + { + "label": "?", + "x": 10.25, + "y": 2, + "w": 1.25 + }, + { + "label": "", + "x": 0, + "y": 3 + }, + { + "label": "Alt", + "x": 1.5, + "y": 3, + "w": 1.25 + }, + { + "label": "", + "x": 2.75, + "y": 3, + "w": 6.25 + }, + { + "label": "Fn1", + "x": 9, + "y": 3 + }, + { + "label": "Ctrl", + "x": 10, + "y": 3, + "w": 1.5 + } + ] + } + } +} diff --git a/keyboards/marksard/leftover30/keymaps/default/config.h b/keyboards/marksard/leftover30/keymaps/default/config.h new file mode 100644 index 0000000000..8bffbbb3b5 --- /dev/null +++ b/keyboards/marksard/leftover30/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2020 marksard + * + * 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 . + */ + +#pragma once + +// place overrides here +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT + +#define TAPPING_LAYER_TERM 150 // Custom LT Tapping term +#define TAPPING_TERM_PER_KEY diff --git a/keyboards/marksard/leftover30/keymaps/default/keymap.c b/keyboards/marksard/leftover30/keymaps/default/keymap.c new file mode 100644 index 0000000000..60751cd1ca --- /dev/null +++ b/keyboards/marksard/leftover30/keymaps/default/keymap.c @@ -0,0 +1,162 @@ +/* Copyright 2020 marksard + * + * 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 QMK_KEYBOARD_H + +enum layer_number { + _BASE, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGBRST = SAFE_RANGE, + LOWER, + RAISE, + KANJI, +}; + +// #define KC_ESAD LT(_ADJUST, KC_ESC) +// #define KC_BSLO LT(_LOWER, KC_BSPC) +#define KC_LOWR MO(_LOWER) +#define KC_SPRA LT(_RAISE, KC_SPC) +#define KC_AJST MO(_ADJUST) + +#define KC_Q_AL LALT_T(KC_Q) +#define KC_A_CT LCTL_T(KC_A) +#define KC_Z_SF LSFT_T(KC_Z) +#define KC_X_AL LALT_T(KC_X) +#define KC_ENSF RSFT_T(KC_ENT) +#define KC_SLSF RSFT_T(KC_SLSH) + +#define KC_F1AL LALT_T(KC_F1) +#define KC_F6CT LCTL_T(KC_F6) +#define KC_11SF LSFT_T(KC_F11) +#define KC_12AL LALT_T(KC_F12) +#define KC_QUSF RCTL_T(KC_QUOT) +#define KC_ROSF RSFT_T(KC_RO) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( + //,-----------------------------------------------------------------------------------------------------------. + KC_Q_AL, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + KC_A_CT, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + KC_Z_SF, KC_X_AL, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSF, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_LGUI, KC_SPRA, KC_LOWR, KC_RCTL + //`-----------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT_all( + //,-----------------------------------------------------------------------------------------------------------. + KC_F1AL, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, KC_BSLS, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + KC_F6CT, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUSF, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + KC_11SF, KC_12AL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_GRV, KC_RO, KC_SLSH, KC_ROSF, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + _______, _______, KC_AJST, _______, _______ + //`-----------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT_all( + //,-----------------------------------------------------------------------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, KC_ESC, KC_TAB, KANJI, KC_DEL, KC_COMM, KC_DOT, KC_BSLS, KC_ROSF, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + _______, _______, _______, KC_AJST, _______ + //`-----------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT_all( + //,-----------------------------------------------------------------------------------------------------------. + RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_INS, KC_PSCR, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_NLCK, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, KC_CAPS, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, KC_CAPS + //`-----------------------------------------------------------------------------------------------------------' + ) +}; + +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case KC_SPRA: + return TAPPING_LAYER_TERM; + default: + return TAPPING_TERM; + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case KANJI: + if (record->event.pressed) { + register_code16(keymap_config.swap_lalt_lgui ? A(KC_GRV) : KC_LANG2); + } else { + unregister_code16(keymap_config.swap_lalt_lgui ? A(KC_GRV) : KC_LANG2); + } + break; +#ifdef RGBLIGHT_ENABLE + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } + break; +#endif + default: + result = true; + break; + } + + return result; +} + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (IS_LAYER_ON(_ADJUST)) { + if (clockwise) { + rgblight_increase_hue_noeeprom(); + } else { + rgblight_decrease_hue_noeeprom(); + } + } else if (IS_LAYER_ON(_LOWER)) { + tap_code16((clockwise == true) ? LCTL(KC_Y) : LCTL(KC_Z)); + } else if (IS_LAYER_ON(_RAISE)) { + tap_code16((clockwise == true) ? S(KC_DOWN) : S(KC_UP)); + } else { + tap_code((clockwise == true) ? KC_WH_D : KC_WH_U); + } + + } +} + +// for exsample customize of LED inducator +// bool led_update_user(led_t led_state) { +// writePin(D2, IS_LAYER_ON(_LOWER)); +// writePin(D1, IS_LAYER_ON(_RAISE)); +// return false; +// } diff --git a/keyboards/marksard/leftover30/keymaps/default/readme.md b/keyboards/marksard/leftover30/keymaps/default/readme.md new file mode 100644 index 0000000000..05dcdc3d14 --- /dev/null +++ b/keyboards/marksard/leftover30/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for leftover30 diff --git a/keyboards/marksard/leftover30/keymaps/default/rules.mk b/keyboards/marksard/leftover30/keymaps/default/rules.mk new file mode 100644 index 0000000000..5af1ba8536 --- /dev/null +++ b/keyboards/marksard/leftover30/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_ENABLE = yes diff --git a/keyboards/marksard/leftover30/leftover30.c b/keyboards/marksard/leftover30/leftover30.c new file mode 100644 index 0000000000..df8152144b --- /dev/null +++ b/keyboards/marksard/leftover30/leftover30.c @@ -0,0 +1,37 @@ +/* Copyright 2020 marksard + * + * 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 "leftover30.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +void keyboard_pre_init_user(void) { + /* Set CAPSLOCK indicator pin as output */ + setPinOutput(D1); + /* Set NUMLOCK indicator pin as output */ + setPinOutput(D2); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(D2, led_state.num_lock); + writePin(D1, led_state.caps_lock); + } + return res; +} diff --git a/keyboards/marksard/leftover30/leftover30.h b/keyboards/marksard/leftover30/leftover30.h new file mode 100644 index 0000000000..901b9b570a --- /dev/null +++ b/keyboards/marksard/leftover30/leftover30.h @@ -0,0 +1,45 @@ +/* Copyright 2020 marksard + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a,\ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19,\ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29,\ + k30, k31, k32, k33, k34\ +) \ +{ \ + { k09, k08, k07, k06, k05 }, \ + { k19, k18, k17, k16, k15 }, \ + { k29, k28, k27, k26, k25 }, \ + { k0a, k34, k33, k32, k31 }, \ +\ + { k04, k03, k02, k01, k00 }, \ + { k14, k13, k12, k11, k10 }, \ + { k24, k23, k22, k21, k20 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, k30 } \ +} diff --git a/keyboards/marksard/leftover30/readme.md b/keyboards/marksard/leftover30/readme.md new file mode 100644 index 0000000000..6fefb057f2 --- /dev/null +++ b/keyboards/marksard/leftover30/readme.md @@ -0,0 +1,17 @@ +# leftover30 + +![leftover30](https://raw.githubusercontent.com/marksard/Keyboards/master/_image/_leftover30.jpg) + +A 30% mini keyboard. + +* Keyboard Maintainer: [marksard](https://github.com/marksard) +* Hardware Supported: LEFTOVER30 PCB (with Pro Micro) +* Hardware Availability: [Mark's Garage](https://marksard.booth.pm/) + +Make example for this keyboard (after setting up your build environment): + + make marksard/leftover30:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +[Build guide](https://github.com/marksard/Keyboards/blob/master/leftover30/documents/leftover30_buildguide.md) diff --git a/keyboards/marksard/leftover30/rules.mk b/keyboards/marksard/leftover30/rules.mk new file mode 100644 index 0000000000..dd52fe113e --- /dev/null +++ b/keyboards/marksard/leftover30/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/marksard/rhymestone/common/glcdfont.c b/keyboards/marksard/rhymestone/common/glcdfont.c new file mode 100644 index 0000000000..d9438aa5a7 --- /dev/null +++ b/keyboards/marksard/rhymestone/common/glcdfont.c @@ -0,0 +1,233 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#include "progmem.h" + +// Standard ASCII 5x7 font + +static const unsigned char font[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, + 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, + 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, + 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, + 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, + 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, + 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, + 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, + 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, + 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, + 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, + 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, + 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, + 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, + 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, + 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, + 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, + 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, + 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, + 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, + 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, + 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, + 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, + 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, + 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, + 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, + 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, + 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, + 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, + 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, + 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, + 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, + 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, + 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, + 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, + 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, + 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, + 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, + 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, + 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, + 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, + 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, + 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, + 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, + 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, + 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, + 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, + 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, + 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, + 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, + 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, + 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, + 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, + 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, + 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, + 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, + 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, + 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, + 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, + 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, + 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, + 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, + 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, + 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, + 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, + 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, + 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, + 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, + 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, + 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, + 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, + 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, + 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, + 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, + 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, + 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, + 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, + 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, + 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, + 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, + 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, + 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, + 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, + 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, + 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, + 0x4C, 0x10, 0x10, 0x10, 0x7C, 0x00, + 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, + 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, + 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, + 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, + 0x00, 0x00, 0xD8, 0xDE, 0xDE, 0xDE, + 0x1E, 0x1E, 0x1E, 0x1E, 0xFE, 0xFE, + 0xFE, 0xFE, 0x00, 0xF0, 0xFF, 0xFF, + 0xFF, 0xE3, 0xE0, 0xE0, 0xE0, 0xE0, + 0xE0, 0xE0, 0x00, 0x80, 0xE0, 0xE0, + 0xE0, 0x00, 0x00, 0x00, 0x00, 0xE0, + 0xE0, 0xE0, 0xE0, 0x00, 0xE0, 0xE0, + 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, + 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, + 0xE0, 0xE0, 0xE0, 0x00, 0xC0, 0xE0, + 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, + 0xE0, 0xE0, 0xE0, 0x00, 0x80, 0xE0, + 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, + 0xE0, 0xE0, 0xE0, 0xE0, 0x00, 0xFC, + 0xFC, 0xFC, 0xFC, 0xE0, 0xE0, 0x80, + 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, + 0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x00, + 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, + 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0x80, + 0x00, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, + 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0xFE, 0xFF, 0xFF, 0x7F, 0x0F, + 0x0E, 0x0E, 0xCE, 0xFF, 0xFF, 0xFF, + 0x7F, 0x80, 0xFE, 0xFF, 0xFF, 0x3F, + 0x01, 0x01, 0x01, 0x81, 0xFF, 0xFF, + 0xFF, 0x3F, 0xE0, 0xFF, 0xFF, 0xFF, + 0x8F, 0x80, 0x80, 0x80, 0xF8, 0xFF, + 0xFF, 0x7F, 0xC1, 0xFE, 0xFF, 0xFF, + 0x1F, 0x01, 0x01, 0xE1, 0xFF, 0xFF, + 0xFF, 0x0F, 0x01, 0x01, 0xF1, 0xFF, + 0xFF, 0xFF, 0x07, 0xFC, 0xFF, 0xFF, + 0xFF, 0x9D, 0x9D, 0x9D, 0x9D, 0x9F, + 0x9F, 0x9F, 0x1F, 0x80, 0x9F, 0x9F, + 0x9F, 0x9F, 0x9D, 0x9D, 0xDD, 0xFD, + 0xFD, 0xFD, 0x39, 0xC0, 0xFF, 0xFF, + 0xFF, 0x9F, 0x81, 0x01, 0xF1, 0xFF, + 0xFF, 0xFF, 0x87, 0x81, 0x81, 0x81, + 0xF9, 0xFF, 0xFF, 0xFF, 0x03, 0xFC, + 0xFF, 0xFF, 0x3F, 0x01, 0x01, 0x01, + 0x01, 0xFF, 0xFF, 0xFF, 0x7F, 0xC0, + 0xFF, 0xFF, 0xFF, 0x9F, 0x9D, 0x9D, + 0x9D, 0x9D, 0x9F, 0x9F, 0x1F, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x07, 0x07, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, + 0x00, 0x07, 0x07, 0x07, 0x07, 0x00, + 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, + 0x07, 0x60, 0x73, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x77, 0x7F, 0x7F, 0x7F, + 0x1F, 0x00, 0x07, 0x07, 0x07, 0x07, + 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, + 0x03, 0x00, 0x00, 0x00, 0x07, 0x07, + 0x07, 0x01, 0x00, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x00, 0x00, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x03, 0x00, 0x03, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x00, 0x03, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x03, 0x00, 0x07, 0x07, + 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x07, 0x07, 0x07, 0x00, 0x03, + 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0x07, 0x07, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; diff --git a/keyboards/marksard/rhymestone/common/oled_helper.c b/keyboards/marksard/rhymestone/common/oled_helper.c new file mode 100644 index 0000000000..537650025c --- /dev/null +++ b/keyboards/marksard/rhymestone/common/oled_helper.c @@ -0,0 +1,87 @@ +#ifdef OLED_DRIVER_ENABLE +#include QMK_KEYBOARD_H +#include +#include + +void render_logo(void) { + + static const char PROGMEM logo_buf[]={ + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, + 0}; + + oled_write_P(logo_buf, false); +} + +void render_lock_status(void) { + + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + + oled_write_P(PSTR("Lock:"), false); + if (led_state.num_lock) { + oled_write_P(PSTR("Num "), false); + } + if (led_state.caps_lock) { + oled_write_P(PSTR("Caps "), false); + } + if (led_state.scroll_lock) { + oled_write_P(PSTR("Scrl"), false); + } + + oled_write_P(PSTR("\n"), false); +} + +static char keylog_buf[24] = "Key state ready.\n"; +const char code_to_name[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', ' ', '-', ' ', '@', ' ', ' ', + ' ', ';', ':', ' ', ',', '.', '/', ' ', ' ', ' '}; + +void update_key_status(uint16_t keycode, keyrecord_t *record) { + + if (!record->event.pressed) return; + + char name = (keycode < 60) ? code_to_name[keycode] : ' '; + snprintf(keylog_buf, sizeof(keylog_buf) - 1, "Key:%dx%d %2x %c\n", + record->event.key.row, record->event.key.col, + (uint16_t)keycode, name); +} + +void render_key_status(void) { + + oled_write(keylog_buf, false); +} + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +static char led_buf[24] = "LED state ready.\n"; +rgblight_config_t rgblight_config_bak; +void update_led_status(void) { + + if (rgblight_config_bak.enable != rgblight_config.enable || + rgblight_config_bak.mode != rgblight_config.mode || + rgblight_config_bak.hue != rgblight_config.hue || + rgblight_config_bak.sat != rgblight_config.sat || + rgblight_config_bak.val != rgblight_config.val + ) { + snprintf(led_buf, sizeof(led_buf) - 1, "LED%c:%2d hsv:%2d %2d %2d\n", + rgblight_config.enable ? '*' : '.', (uint8_t)rgblight_config.mode, + (uint8_t)(rgblight_config.hue / RGBLIGHT_HUE_STEP), + (uint8_t)(rgblight_config.sat / RGBLIGHT_SAT_STEP), + (uint8_t)(rgblight_config.val / RGBLIGHT_VAL_STEP)); + rgblight_config_bak = rgblight_config; + } +} + +void render_led_status(void) { + + oled_write(led_buf, false); +} +#endif +#endif diff --git a/keyboards/marksard/rhymestone/common/oled_helper.h b/keyboards/marksard/rhymestone/common/oled_helper.h new file mode 100644 index 0000000000..02f7b94fa5 --- /dev/null +++ b/keyboards/marksard/rhymestone/common/oled_helper.h @@ -0,0 +1,32 @@ +#ifdef OLED_DRIVER_ENABLE + +void render_logo(void); +void render_lock_status(void); +void update_key_status(uint16_t keycode, keyrecord_t *record); +void render_key_status(void); + +#define RENDER_LOGO() render_logo() +#define RENDER_LOCK_STATUS() render_lock_status() +#define UPDATE_KEY_STATUS(a, b) update_key_status(a, b) +#define RENDER_KEY_STATUS() render_key_status() + +#ifdef RGBLIGHT_ENABLE + void update_led_status(void); + void render_led_status(void); + #define UPDATE_LED_STATUS() update_led_status() + #define RENDER_LED_STATUS() render_led_status() +#else + #define UPDATE_LED_STATUS() + #define RENDER_LED_STATUS() +#endif + +#else + +#define RENDER_LOGO() +#define RENDER_LOCK_STATUS() +#define UPDATE_KEY_STATUS(a, b) +#define RENDER_KEY_STATUS() +#define UPDATE_LED_STATUS() +#define RENDER_LED_STATUS() + +#endif diff --git a/keyboards/marksard/rhymestone/info.json b/keyboards/marksard/rhymestone/info.json new file mode 100644 index 0000000000..2c1ba9b37c --- /dev/null +++ b/keyboards/marksard/rhymestone/info.json @@ -0,0 +1,213 @@ +{ + "keyboard_name": "Rhymestone", + "url": "https://github.com/marksard/Keyboards", + "maintainer": "marksard", + "width": 11, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x10": { + "layout": [ + { + "label": "Q", + "x": 0, + "y": 0 + }, + { + "label": "W", + "x": 1, + "y": 0 + }, + { + "label": "E", + "x": 2, + "y": 0 + }, + { + "label": "R", + "x": 3, + "y": 0 + }, + { + "label": "T", + "x": 4, + "y": 0 + }, + { + "label": "Y", + "x": 6, + "y": 0 + }, + { + "label": "U", + "x": 7, + "y": 0 + }, + { + "label": "I", + "x": 8, + "y": 0 + }, + { + "label": "O", + "x": 9, + "y": 0 + }, + { + "label": "P", + "x": 10, + "y": 0 + }, + { + "label": "A", + "x": 0, + "y": 1 + }, + { + "label": "S", + "x": 1, + "y": 1 + }, + { + "label": "D", + "x": 2, + "y": 1 + }, + { + "label": "F", + "x": 3, + "y": 1 + }, + { + "label": "G", + "x": 4, + "y": 1 + }, + { + "label": "H", + "x": 6, + "y": 1 + }, + { + "label": "J", + "x": 7, + "y": 1 + }, + { + "label": "K", + "x": 8, + "y": 1 + }, + { + "label": "L", + "x": 9, + "y": 1 + }, + { + "label": "Enter", + "x": 10, + "y": 1 + }, + { + "label": "Z", + "x": 0, + "y": 2 + }, + { + "label": "X", + "x": 1, + "y": 2 + }, + { + "label": "C", + "x": 2, + "y": 2 + }, + { + "label": "V", + "x": 3, + "y": 2 + }, + { + "label": "B", + "x": 4, + "y": 2 + }, + { + "label": "N", + "x": 6, + "y": 2 + }, + { + "label": "M", + "x": 7, + "y": 2 + }, + { + "label": ",", + "x": 8, + "y": 2 + }, + { + "label": ".", + "x": 9, + "y": 2 + }, + { + "label": "/", + "x": 10, + "y": 2 + }, + { + "label": "Ctrl", + "x": 0, + "y": 3 + }, + { + "label": "Win", + "x": 1, + "y": 3 + }, + { + "label": "Alt", + "x": 2, + "y": 3 + }, + { + "label": "Lower", + "x": 3, + "y": 3 + }, + { + "label": "backspace", + "x": 4, + "y": 3 + }, + { + "label": "space", + "x": 6, + "y": 3 + }, + { + "label": "Upper", + "x": 7, + "y": 3 + }, + { + "label": "Alt", + "x": 8, + "y": 3 + }, + { + "label": "App", + "x": 9, + "y": 3 + }, + { + "label": "Ctrl", + "x": 10, + "y": 3 + } + ] + } + } +} diff --git a/keyboards/marksard/rhymestone/keymaps/default/config.h b/keyboards/marksard/rhymestone/keymaps/default/config.h new file mode 100644 index 0000000000..95f2d039b2 --- /dev/null +++ b/keyboards/marksard/rhymestone/keymaps/default/config.h @@ -0,0 +1,27 @@ +/* Copyright 2020 marksard + * + * 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 . + */ + +#pragma once + +// place overrides here + +// If you use the HashTwenty(alpha), please enable USE_HASHTWENTY +// #define USE_HASHTWENTY + +// If you plug in the USB on the right side, please enable MASTER_RIGHT +// #define MASTER_RIGHT + +#define OLED_FONT_H "keyboards/rhymestone/common/glcdfont.c" diff --git a/keyboards/marksard/rhymestone/keymaps/default/keymap.c b/keyboards/marksard/rhymestone/keymaps/default/keymap.c new file mode 100644 index 0000000000..2d695f76b1 --- /dev/null +++ b/keyboards/marksard/rhymestone/keymaps/default/keymap.c @@ -0,0 +1,226 @@ +/* Copyright 2020 marksard + * + * 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 QMK_KEYBOARD_H +#include "./common/oled_helper.h" + +enum layer_number { + _BASE, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + LOWER = SAFE_RANGE, + RAISE, + ADJUST, + KANJI, + RGBRST +}; + +// Base layer mod tap +#define KC_Z_SF LSFT_T(KC_Z) +#define KC_SLSF RSFT_T(KC_SLSH) + +// Lower layer mod tap +#define KC_11SF LSFT_T(KC_F11) +#define KC_GRSF RSFT_T(KC_GRV) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_ortho_4x10( + //,---------------------------------------------------------------------------------------------------. + 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_ENT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_Z_SF, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSF, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_RGUI, KC_APP, KC_RCTL + //,---------------------------------------------------------------------------------------------------. + ), + + [_LOWER] = LAYOUT_ortho_4x10( + //,---------------------------------------------------------------------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_11SF, KC_F12, KC_ESC, KC_TAB, KANJI, KC_DEL, XXXXXXX, XXXXXXX, KC_RO, KC_GRSF, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______ + //,---------------------------------------------------------------------------------------------------. + ), + + [_RAISE] = LAYOUT_ortho_4x10( + //,---------------------------------------------------------------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RSFT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_SLSF, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //,---------------------------------------------------------------------------------------------------. + ), + + [_ADJUST] = LAYOUT_ortho_4x10( + //,---------------------------------------------------------------------------------------------------. + RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_PSCR, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_NLCK, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + //,---------------------------------------------------------------------------------------------------. + ) +}; + +#define L_BASE _BASE +#define L_LOWER (1<<_LOWER) +#define L_RAISE (1<<_RAISE) +#define L_ADJUST (1<<_ADJUST) +#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) + +#ifdef OLED_DRIVER_ENABLE +#include +#include + +typedef struct { + uint8_t state; + char name[8]; +}LAYER_DISPLAY_NAME; + +#define LAYER_DISPLAY_MAX 5 +const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = { + {L_BASE, "Base"}, + {L_BASE + 1, "Base"}, + {L_LOWER, "Lower"}, + {L_RAISE, "Raise"}, + {L_ADJUST_TRI, "Adjust"} +}; + +static inline const char* get_leyer_status(void) { + + for (uint8_t i = 0; i < LAYER_DISPLAY_MAX; ++i) { + if (layer_state == 0 && layer_display_name[i].state == default_layer_state) { + + return layer_display_name[i].name; + } else if (layer_state != 0 && layer_display_name[i].state == layer_state) { + + return layer_display_name[i].name; + } + } + + return "?"; +} + +static char layer_status_buf[24] = "Layer state ready.\n"; +static inline void update_keymap_status(void) { + + snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "OS:%s Layer:%s\n", + keymap_config.swap_lalt_lgui? "win" : "mac", get_leyer_status()); +} + +static inline void render_keymap_status(void) { + + oled_write(layer_status_buf, false); +} + +#define UPDATE_KEYMAP_STATUS() update_keymap_status() + +static inline void render_status(void) { + + UPDATE_LED_STATUS(); + RENDER_LED_STATUS(); + render_keymap_status(); + RENDER_LOCK_STATUS(); + RENDER_KEY_STATUS(); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + + if (is_keyboard_master()) + return OLED_ROTATION_180; // flips the display 180 degrees if offhand + return rotation; +} + +void oled_task_user(void) { + + if (is_keyboard_master()) { + render_status(); + } else { + render_logo(); + } +} + +#else + +#define UPDATE_KEYMAP_STATUS() + +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + UPDATE_KEY_STATUS(keycode, record); + + bool result = false; + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + + update_tri_layer(_LOWER, _RAISE, _ADJUST); + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + } else { + layer_off(_RAISE); + } + + update_tri_layer(_LOWER, _RAISE, _ADJUST); + break; + case KANJI: + if (record->event.pressed) { + if (keymap_config.swap_lalt_lgui == false) { + register_code(KC_LANG2); + } else { + register_code16(A(KC_GRV)); + } + } else { + unregister_code(KC_LANG2); + } + break; + #ifdef RGBLIGHT_ENABLE + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } + break; + #endif + default: + result = true; + break; + } + + UPDATE_KEYMAP_STATUS(); + return result; +} diff --git a/keyboards/marksard/rhymestone/keymaps/default/rules.mk b/keyboards/marksard/rhymestone/keymaps/default/rules.mk new file mode 100644 index 0000000000..c86cab8cce --- /dev/null +++ b/keyboards/marksard/rhymestone/keymaps/default/rules.mk @@ -0,0 +1,9 @@ +MOUSEKEY_ENABLE = yes # Mouse keys +TAP_DANCE_ENABLE = no + +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +OLED_DRIVER_ENABLE = no +LTO_ENABLE = yes + +# If you want to change the display of OLED, you need to change here +SRC += ./common/oled_helper.c \ diff --git a/keyboards/marksard/rhymestone/keymaps/switch_tester/keymap.c b/keyboards/marksard/rhymestone/keymaps/switch_tester/keymap.c new file mode 100644 index 0000000000..1d4e78af80 --- /dev/null +++ b/keyboards/marksard/rhymestone/keymaps/switch_tester/keymap.c @@ -0,0 +1,76 @@ +/* Copyright 2020 marksard + * + * 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 QMK_KEYBOARD_H + +enum layer_number { + _BASE, + _ADJUST, +}; + +enum custom_keycodes { + LOWER = SAFE_RANGE, + ADJUST, + RGBRST +}; + +// Layer Mode aliases +#define KC_LTAD LT(_ADJUST, KC_NO) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_ortho_4x10( + //,---------------------------------------------------------------------------------------------------. + 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, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + KC_LTAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + //,---------------------------------------------------------------------------------------------------. + ), + + [_ADJUST] = LAYOUT_ortho_4x10( + //,---------------------------------------------------------------------------------------------------. + RESET, RGBRST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + //,---------------------------------------------------------------------------------------------------. + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + #ifdef RGBLIGHT_ENABLE + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } + break; + #endif + default: + result = true; + break; + } + + return result; +} diff --git a/keyboards/marksard/rhymestone/keymaps/switch_tester/readme.md b/keyboards/marksard/rhymestone/keymaps/switch_tester/readme.md new file mode 100644 index 0000000000..f85906a83b --- /dev/null +++ b/keyboards/marksard/rhymestone/keymaps/switch_tester/readme.md @@ -0,0 +1,3 @@ +# The switch tester keymap for Rhymestone + +This keymap is Switch Tester and RGB_MATRIX Light demo. diff --git a/keyboards/marksard/rhymestone/keymaps/switch_tester/rules.mk b/keyboards/marksard/rhymestone/keymaps/switch_tester/rules.mk new file mode 100644 index 0000000000..78824da304 --- /dev/null +++ b/keyboards/marksard/rhymestone/keymaps/switch_tester/rules.mk @@ -0,0 +1,7 @@ +MOUSEKEY_ENABLE = no # Mouse keys +TAP_DANCE_ENABLE = no + +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +OLED_DRIVER_ENABLE = no +LTO_ENABLE = yes +RGB_MATRIX_ENABLE = WS2812 diff --git a/keyboards/marksard/rhymestone/readme.md b/keyboards/marksard/rhymestone/readme.md new file mode 100644 index 0000000000..721e8beb35 --- /dev/null +++ b/keyboards/marksard/rhymestone/readme.md @@ -0,0 +1,18 @@ +# Rhymestone + +![Rhymestone](https://github.com/marksard/Keyboards/blob/7950099e0679a6626dc9f77a70b8c6616d7030cf/_image/_rhymestone.jpg) + +This is 40 keys split Ortholinear keyboard. + +* Keyboard Maintainer: [marksard](https://github.com/marksard) +* Hardware Supported: Rhymestone PCB (with Pro Micro) +* Hardware Availability: [marksard keyboards](https://github.com/marksard/Keyboards/blob/master/rhymestone/) + +Make example for this keyboard (after setting up your build environment): + + make marksard/rhymestone:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +[Build guide](https://github.com/marksard/Keyboards/blob/master/rhymestone/documents/rhymestone_buildguide.md) +[Firmware](https://github.com/marksard/qmk_firmware/tree/my_customize/keyboards/rhymestone) diff --git a/keyboards/marksard/rhymestone/rev1/config.h b/keyboards/marksard/rhymestone/rev1/config.h new file mode 100644 index 0000000000..9a1bf0a1d8 --- /dev/null +++ b/keyboards/marksard/rhymestone/rev1/config.h @@ -0,0 +1,152 @@ +/* +Copyright 2020 marksard + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xDFA1 +#define DEVICE_VER 0x0020 +#define MANUFACTURER marksard +#define PRODUCT Rhymestone + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 5 + +/* + * 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 { F4, F5, F6, F7 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 + +#ifdef RGBLIGHT_ENABLE +// #ifdef RGB_DI_PIN + #define RGBLED_NUM 40 + #define RGBLED_SPLIT {20, 20} + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +/*== customize breathing effect ==*/ + /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ + #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 + /*==== use exp() and sin() ====*/ + #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 + #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +#ifdef RGB_MATRIX_ENABLE + #define RGBLED_NUM 40 // Number of LEDs + #define DRIVER_LED_TOTAL RGBLED_NUM + #define RGB_MATRIX_KEYPRESSES // reacts to keypresses + // #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) + // #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects + #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended + // #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) + // #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 + #define RGB_MATRIX_HUE_STEP 8 + #define RGB_MATRIX_SAT_STEP 8 + #define RGB_MATRIX_VAL_STEP 8 + #define RGB_MATRIX_SPD_STEP 10 + +// #define DISABLE_RGB_MATRIX_ALPHAS_MODS +// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// #define DISABLE_RGB_MATRIX_BREATHING +// #define DISABLE_RGB_MATRIX_BAND_SAT +// #define DISABLE_RGB_MATRIX_BAND_VAL +// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL +// #define DISABLE_RGB_MATRIX_CYCLE_ALL +// #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +// #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN +// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +// #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +// #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL +// #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL +// #define DISABLE_RGB_MATRIX_DUAL_BEACON +// #define DISABLE_RGB_MATRIX_RAINBOW_BEACON +// #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// #define DISABLE_RGB_MATRIX_RAINDROPS +// #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + + #define RGB_MATRIX_FRAMEBUFFER_EFFECTS +// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP +// #define DISABLE_RGB_MATRIX_DIGITAL_RAIN + +// #define RGB_MATRIX_KEYPRESSES // reacts to keypresses + +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS + +// #define DISABLE_RGB_MATRIX_SPLASH +// #define DISABLE_RGB_MATRIX_MULTISPLASH +// #define DISABLE_RGB_MATRIX_SOLID_SPLASH +// #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH + + #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_TYPING_HEATMAP +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 diff --git a/keyboards/marksard/rhymestone/rev1/rev1.c b/keyboards/marksard/rhymestone/rev1/rev1.c new file mode 100644 index 0000000000..a4dadd55cb --- /dev/null +++ b/keyboards/marksard/rhymestone/rev1/rev1.c @@ -0,0 +1,108 @@ +/* Copyright 2020 marksard + * + * 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 "rev1.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + { 10, 11, 12, 13, 0 }, + { 9, 18, 19, 14, 1 }, + { 8, 17, 16, 15, 2 }, + { 7, 6, 5, 4, 3 }, + { 30, 31, 32, 33, 20 }, + { 29, 38, 39, 34, 21 }, + { 28, 37, 36, 35, 22 }, + { 27, 26, 25, 24, 23 } +}, { + { 100, 0 }, { 100, 21 }, { 100, 43 }, { 100, 64 }, + { 75, 64 }, { 50, 64 }, { 25, 64 }, { 0, 64 }, + { 0, 43 }, { 0, 21 }, { 0, 0 }, + { 25, 0 }, { 50, 0 }, { 75, 0 }, + { 75, 21 }, { 75, 43 }, + { 50, 43 }, { 25, 43 }, + { 25, 21 }, { 50, 21 }, + { 125, 0 }, { 125, 21 }, { 125, 43 }, { 125, 64 }, + { 150, 64 }, { 175, 64 }, { 200, 64 }, { 225, 64 }, + { 225, 43 }, { 225, 21 }, { 225, 0 }, + { 200, 0 }, { 175, 0 }, { 150, 0 }, + { 150, 21 }, { 150, 43 }, + { 175, 43 }, { 200, 43 }, + { 200, 21 }, { 150, 21 } +}, { + 4, 4, 4, 1, + 1, 1, 1, 1, + 4, 4, 4, 4, + 4, 4, 4, 4, + 4, 4, 4, 4, + 4, 4, 4, 1, + 1, 1, 1, 1, + 4, 4, 4, 4, + 4, 4, 4, 4, + 4, 4, 4, 4 +} }; +#endif + +__attribute__((weak)) +void matrix_init_user(void) {} + +void matrix_init_kb(void) { + +#ifdef RGB_MATRIX_ENABLE + // if (!is_keyboard_master()) { + // g_led_config = (led_config_t){ { + // { 30, 31, 32, 33, 20 }, + // { 29, 38, 39, 34, 21 }, + // { 28, 37, 36, 35, 22 }, + // { 27, 26, 25, 24, 23 }, + // { 10, 11, 12, 13, 0 }, + // { 9, 18, 19, 14, 1 }, + // { 8, 17, 16, 15, 2 }, + // { 7, 6, 5, 4, 3 } + // }, { + // { 125, 0 }, { 125, 21 }, { 125, 43 }, { 125, 64 }, + // { 150, 64 }, { 175, 64 }, { 200, 64 }, { 225, 64 }, + // { 225, 43 }, { 225, 21 }, { 225, 0 }, + // { 200, 0 }, { 175, 0 }, { 150, 0 }, + // { 150, 21 }, { 150, 43 }, + // { 175, 43 }, { 200, 43 }, + // { 200, 21 }, { 150, 21 }, + // { 100, 0 }, { 100, 21 }, { 100, 43 }, { 100, 64 }, + // { 75, 64 }, { 50, 64 }, { 25, 64 }, { 0, 64 }, + // { 0, 43 }, { 0, 21 }, { 0, 0 }, + // { 25, 0 }, { 50, 0 }, { 75, 0 }, + // { 75, 21 }, { 75, 43 }, + // { 50, 43 }, { 25, 43 }, + // { 25, 21 }, { 50, 21 } + // }, { + // 4, 4, 4, 1, + // 1, 1, 1, 1, + // 4, 4, 4, 4, + // 4, 4, 4, 4, + // 4, 4, 4, 4, + // 4, 4, 4, 1, + // 1, 1, 1, 1, + // 4, 4, 4, 4, + // 4, 4, 4, 4, + // 4, 4, 4, 4 + // } }; + // } +#endif + matrix_init_user(); +} diff --git a/keyboards/marksard/rhymestone/rev1/rev1.h b/keyboards/marksard/rhymestone/rev1/rev1.h new file mode 100644 index 0000000000..855e288df3 --- /dev/null +++ b/keyboards/marksard/rhymestone/rev1/rev1.h @@ -0,0 +1,89 @@ +/* Copyright 2020 marksard + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#ifndef FLIP_HALF +// Standard Keymap +// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) +#define LAYOUT_ortho_4x10( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L30, L31, L32, L33, L34, R30, R31, R32, R33, R34 \ + ) \ + { \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { L30, L31, L32, L33, L34 }, \ + { R04, R03, R02, R01, R00 }, \ + { R14, R13, R12, R11, R10 }, \ + { R24, R23, R22, R21, R20 }, \ + { R34, R33, R32, R31, R30 }, \ + } +#else +// Keymap with right side flipped +// (TRRS jack on both halves are to the right) +#define LAYOUT_ortho_4x10( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L30, L31, L32, L33, L34, R30, R31, R32, R33, R34 \ + ) \ + { \ + { L04, L03, L02, L01, L00 }, \ + { L14, L13, L12, L11, L10 }, \ + { L24, L23, L22, L21, L20 }, \ + { L34, L33, L32, L31, L30 }, \ + { R04, R03, R02, R01, R00 }, \ + { R14, R13, R12, R11, R10 }, \ + { R24, R23, R22, R21, R20 }, \ + { R34, R33, R32, R31, R30 }, \ + } +#endif + +#ifdef USE_HASHTWENTY // The HashTwenty is Alpha version of The Rhymestone +#undef LAYOUT_ortho_4x10 +// HashTwenty layout +#define LAYOUT_ortho_4x10( \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L30, L31, L32, L33, L34, R30, R31, R32, R33, R34 \ + ) \ + { \ + { L04, L03, L02, L01, L00 }, \ + { L14, L13, L12, L11, L10 }, \ + { L24, L23, L22, L21, L20 }, \ + { L34, L33, L32, L31, L30 }, \ + { R00, R01, R02, R03, R04 }, \ + { R10, R11, R12, R13, R14 }, \ + { R20, R21, R22, R23, R24 }, \ + { R30, R31, R32, R33, R34 }, \ + } +#endif diff --git a/keyboards/marksard/rhymestone/rev1/rules.mk b/keyboards/marksard/rhymestone/rev1/rules.mk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/keyboards/marksard/rhymestone/rules.mk b/keyboards/marksard/rhymestone/rules.mk new file mode 100644 index 0000000000..1f58665efc --- /dev/null +++ b/keyboards/marksard/rhymestone/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = marksard/rhymestone/rev1 + +LAYOUTS = ortho_4x10 diff --git a/keyboards/massdrop/alt/keymaps/default/keymap.c b/keyboards/massdrop/alt/keymaps/default/keymap.c index 52fd35b454..0d3e7ccb7a 100644 --- a/keyboards/massdrop/alt/keymaps/default/keymap.c +++ b/keyboards/massdrop/alt/keymaps/default/keymap.c @@ -10,8 +10,6 @@ enum alt_keycodes { MD_BOOT, //Restart into bootloader after hold timeout }; -keymap_config_t keymap_config; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_65_ansi_blocker( 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_DEL, \ @@ -38,14 +36,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -// 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) { -}; - #define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) #define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) #define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) diff --git a/keyboards/massdrop/alt/keymaps/default_md/keymap.c b/keyboards/massdrop/alt/keymaps/default_md/keymap.c index 6523790f6d..9894caf48e 100644 --- a/keyboards/massdrop/alt/keymaps/default_md/keymap.c +++ b/keyboards/massdrop/alt/keymaps/default_md/keymap.c @@ -21,8 +21,6 @@ enum alt_keycodes { MD_BOOT //Restart into bootloader after hold timeout //Working }; -keymap_config_t keymap_config; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \ @@ -49,14 +47,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -// 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) { -}; - #define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) #define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) #define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) @@ -186,7 +176,7 @@ led_instruction_t led_instructions[] = { //Flags can be found in tmk_core/protocol/arm_atsam/led_matrix.h (prefixed with LED_FLAG_) //LED IDs can be found in config_led.h in the keyboard's directory //Examples are below - + //All LEDs use the user's selected pattern (this is the factory default) { .flags = LED_FLAG_USE_ROTATE_PATTERN }, @@ -195,7 +185,7 @@ led_instruction_t led_instructions[] = { //Specific LEDs use specified RGB values while all others are off // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFF, .id1 = 0x00FF, .id2 = 0x0000FF00, .id3 = 0xFF000000, .r = 75, .g = 150, .b = 225 }, - + //All LEDs use the user's selected pattern //On layer 1, all key LEDs (except the top row which keeps active pattern) are red while all edge LEDs are green //When layer 1 is active, key LEDs use red (id0 32 - 16: 1111 1111 1111 1111 1000 0000 0000 0000 = 0xFFFF8000) (except top row 15 - 1) diff --git a/keyboards/massdrop/alt/keymaps/mac/keymap.c b/keyboards/massdrop/alt/keymaps/mac/keymap.c index 9f575b4f12..70ce6198b4 100644 --- a/keyboards/massdrop/alt/keymaps/mac/keymap.c +++ b/keyboards/massdrop/alt/keymaps/mac/keymap.c @@ -10,8 +10,6 @@ enum alt_keycodes { MD_BOOT, //Restart into bootloader after hold timeout }; -keymap_config_t keymap_config; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \ @@ -38,14 +36,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -// 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) { -}; - #define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) #define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) #define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) diff --git a/keyboards/massdrop/alt/keymaps/mac_md/keymap.c b/keyboards/massdrop/alt/keymaps/mac_md/keymap.c index 439e793997..b3626c1b61 100644 --- a/keyboards/massdrop/alt/keymaps/mac_md/keymap.c +++ b/keyboards/massdrop/alt/keymaps/mac_md/keymap.c @@ -21,8 +21,6 @@ enum alt_keycodes { MD_BOOT //Restart into bootloader after hold timeout //Working }; -keymap_config_t keymap_config; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \ @@ -49,14 +47,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -// 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) { -}; - #define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) #define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) #define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) diff --git a/keyboards/masterworks/classy_tkl/info.json b/keyboards/masterworks/classy_tkl/info.json new file mode 100644 index 0000000000..5cf93dfbd9 --- /dev/null +++ b/keyboards/masterworks/classy_tkl/info.json @@ -0,0 +1,279 @@ +{ + "keyboard_name": "Classy TKL", + "url": "https://geekhack.org/index.php?topic=105933", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "label": "Pause", "x": 17.25, "y": 0 }, + { "label": "~", "x": 0, "y": 1.5 }, + { "label": "!", "x": 1, "y": 1.5 }, + { "label": "@", "x": 2, "y": 1.5 }, + { "label": "#", "x": 3, "y": 1.5 }, + { "label": "$", "x": 4, "y": 1.5 }, + { "label": "%", "x": 5, "y": 1.5 }, + { "label": "^", "x": 6, "y": 1.5 }, + { "label": "&", "x": 7, "y": 1.5 }, + { "label": "*", "x": 8, "y": 1.5 }, + { "label": "(", "x": 9, "y": 1.5 }, + { "label": ")", "x": 10, "y": 1.5 }, + { "label": "_", "x": 11, "y": 1.5 }, + { "label": "+", "x": 12, "y": 1.5 }, + { "label": "Backspace", "x": 13, "y": 1.5 }, + { "label": "Backspace2", "x": 14, "y": 1.5 }, + { "label": "Insert", "x": 15.25, "y": 1.5 }, + { "label": "Home", "x": 16.25, "y": 1.5 }, + { "label": "PgUp", "x": 17.25, "y": 1.5 }, + { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.5 }, + { "label": "W", "x": 2.5, "y": 2.5 }, + { "label": "E", "x": 3.5, "y": 2.5 }, + { "label": "R", "x": 4.5, "y": 2.5 }, + { "label": "T", "x": 5.5, "y": 2.5 }, + { "label": "Y", "x": 6.5, "y": 2.5 }, + { "label": "U", "x": 7.5, "y": 2.5 }, + { "label": "I", "x": 8.5, "y": 2.5 }, + { "label": "O", "x": 9.5, "y": 2.5 }, + { "label": "P", "x": 10.5, "y": 2.5 }, + { "label": "{", "x": 11.5, "y": 2.5 }, + { "label": "}", "x": 12.5, "y": 2.5 }, + { "label": "|", "x": 13.5, "y": 2.5, "w": 1.5 }, + { "label": "Delete", "x": 15.25, "y": 2.5 }, + { "label": "End", "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "x": 17.25, "y": 2.5 }, + { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.5 }, + { "label": "S", "x": 2.75, "y": 3.5 }, + { "label": "D", "x": 3.75, "y": 3.5 }, + { "label": "F", "x": 4.75, "y": 3.5 }, + { "label": "G", "x": 5.75, "y": 3.5 }, + { "label": "H", "x": 6.75, "y": 3.5 }, + { "label": "J", "x": 7.75, "y": 3.5 }, + { "label": "K", "x": 8.75, "y": 3.5 }, + { "label": "L", "x": 9.75, "y": 3.5 }, + { "label": ":", "x": 10.75, "y": 3.5 }, + { "label": "\"", "x": 11.75, "y": 3.5 }, + { "label": "Enter", "x": 12.75, "y": 3.5, "w": 2.25 }, + { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 }, + { "label": "|", "x": 1.25, "y": 4.5 }, + { "label": "Z", "x": 2.25, "y": 4.5 }, + { "label": "X", "x": 3.25, "y": 4.5 }, + { "label": "C", "x": 4.25, "y": 4.5 }, + { "label": "V", "x": 5.25, "y": 4.5 }, + { "label": "B", "x": 6.25, "y": 4.5 }, + { "label": "N", "x": 7.25, "y": 4.5 }, + { "label": "M", "x": 8.25, "y": 4.5 }, + { "label": "<", "x": 9.25, "y": 4.5 }, + { "label": ">", "x": 10.25, "y": 4.5 }, + { "label": "?", "x": 11.25, "y": 4.5 }, + { "label": "Shift", "x": 12.25, "y": 4.5, "w": 1.75 }, + { "label": "Shift2", "x": 14, "y": 4.5, "w": 1 }, + { "label": "Up", "x": 16.25, "y": 4.5 }, + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.5 }, + { "label": "Win", "x": 1.5, "y": 5.5, "w": 1 }, + { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.5 }, + { "label": "Space", "x": 4, "y": 5.5, "w": 7 }, + { "label": "Alt", "x": 11, "y": 5.5, "w": 1.5 }, + { "label": "Win", "x": 12.5, "y": 5.5, "w": 1 }, + { "label": "Ctrl", "x": 13.5, "y": 5.5, "w": 1.5 }, + { "label": "Left", "x": 15.25, "y": 5.5 }, + { "label": "Down", "x": 16.25, "y": 5.5 }, + { "label": "Right", "x": 17.25, "y": 5.5 } + ] + }, + "LAYOUT_tkl_ansi_wkl": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "label": "Pause", "x": 17.25, "y": 0 }, + { "label": "~", "x": 0, "y": 1.5 }, + { "label": "!", "x": 1, "y": 1.5 }, + { "label": "@", "x": 2, "y": 1.5 }, + { "label": "#", "x": 3, "y": 1.5 }, + { "label": "$", "x": 4, "y": 1.5 }, + { "label": "%", "x": 5, "y": 1.5 }, + { "label": "^", "x": 6, "y": 1.5 }, + { "label": "&", "x": 7, "y": 1.5 }, + { "label": "*", "x": 8, "y": 1.5 }, + { "label": "(", "x": 9, "y": 1.5 }, + { "label": ")", "x": 10, "y": 1.5 }, + { "label": "_", "x": 11, "y": 1.5 }, + { "label": "+", "x": 12, "y": 1.5 }, + { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 }, + { "label": "Insert", "x": 15.25, "y": 1.5 }, + { "label": "Home", "x": 16.25, "y": 1.5 }, + { "label": "PgUp", "x": 17.25, "y": 1.5 }, + { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.5 }, + { "label": "W", "x": 2.5, "y": 2.5 }, + { "label": "E", "x": 3.5, "y": 2.5 }, + { "label": "R", "x": 4.5, "y": 2.5 }, + { "label": "T", "x": 5.5, "y": 2.5 }, + { "label": "Y", "x": 6.5, "y": 2.5 }, + { "label": "U", "x": 7.5, "y": 2.5 }, + { "label": "I", "x": 8.5, "y": 2.5 }, + { "label": "O", "x": 9.5, "y": 2.5 }, + { "label": "P", "x": 10.5, "y": 2.5 }, + { "label": "{", "x": 11.5, "y": 2.5 }, + { "label": "}", "x": 12.5, "y": 2.5 }, + { "label": "|", "x": 13.5, "y": 2.5, "w": 1.5 }, + { "label": "Delete", "x": 15.25, "y": 2.5 }, + { "label": "End", "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "x": 17.25, "y": 2.5 }, + { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.5 }, + { "label": "S", "x": 2.75, "y": 3.5 }, + { "label": "D", "x": 3.75, "y": 3.5 }, + { "label": "F", "x": 4.75, "y": 3.5 }, + { "label": "G", "x": 5.75, "y": 3.5 }, + { "label": "H", "x": 6.75, "y": 3.5 }, + { "label": "J", "x": 7.75, "y": 3.5 }, + { "label": "K", "x": 8.75, "y": 3.5 }, + { "label": "L", "x": 9.75, "y": 3.5 }, + { "label": ":", "x": 10.75, "y": 3.5 }, + { "label": "\"", "x": 11.75, "y": 3.5 }, + { "label": "Enter", "x": 12.75, "y": 3.5, "w": 2.25 }, + { "label": "Shift", "x": 0, "y": 4.5, "w": 2.25 }, + { "label": "Z", "x": 2.25, "y": 4.5 }, + { "label": "X", "x": 3.25, "y": 4.5 }, + { "label": "C", "x": 4.25, "y": 4.5 }, + { "label": "V", "x": 5.25, "y": 4.5 }, + { "label": "B", "x": 6.25, "y": 4.5 }, + { "label": "N", "x": 7.25, "y": 4.5 }, + { "label": "M", "x": 8.25, "y": 4.5 }, + { "label": "<", "x": 9.25, "y": 4.5 }, + { "label": ">", "x": 10.25, "y": 4.5 }, + { "label": "?", "x": 11.25, "y": 4.5 }, + { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, + { "label": "Up", "x": 16.25, "y": 4.5 }, + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.5 }, + { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.5 }, + { "label": "Space", "x": 4, "y": 5.5, "w": 7 }, + { "label": "Alt", "x": 11, "y": 5.5, "w": 1.5 }, + { "label": "Ctrl", "x": 13.5, "y": 5.5, "w": 1.5 }, + { "label": "Left", "x": 15.25, "y": 5.5 }, + { "label": "Down", "x": 16.25, "y": 5.5 }, + { "label": "Right", "x": 17.25, "y": 5.5 } + ] + }, + "LAYOUT_tkl_iso_wkl": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "label": "Pause", "x": 17.25, "y": 0 }, + { "label": "\u00ac", "x": 0, "y": 1.5 }, + { "label": "!", "x": 1, "y": 1.5 }, + { "label": "\"", "x": 2, "y": 1.5 }, + { "label": "\u00a3", "x": 3, "y": 1.5 }, + { "label": "$", "x": 4, "y": 1.5 }, + { "label": "%", "x": 5, "y": 1.5 }, + { "label": "^", "x": 6, "y": 1.5 }, + { "label": "&", "x": 7, "y": 1.5 }, + { "label": "*", "x": 8, "y": 1.5 }, + { "label": "(", "x": 9, "y": 1.5 }, + { "label": ")", "x": 10, "y": 1.5 }, + { "label": "_", "x": 11, "y": 1.5 }, + { "label": "+", "x": 12, "y": 1.5 }, + { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 }, + { "label": "Insert", "x": 15.25, "y": 1.5 }, + { "label": "Home", "x": 16.25, "y": 1.5 }, + { "label": "PgUp", "x": 17.25, "y": 1.5 }, + { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.5 }, + { "label": "W", "x": 2.5, "y": 2.5 }, + { "label": "E", "x": 3.5, "y": 2.5 }, + { "label": "R", "x": 4.5, "y": 2.5 }, + { "label": "T", "x": 5.5, "y": 2.5 }, + { "label": "Y", "x": 6.5, "y": 2.5 }, + { "label": "U", "x": 7.5, "y": 2.5 }, + { "label": "I", "x": 8.5, "y": 2.5 }, + { "label": "O", "x": 9.5, "y": 2.5 }, + { "label": "P", "x": 10.5, "y": 2.5 }, + { "label": "{", "x": 11.5, "y": 2.5 }, + { "label": "}", "x": 12.5, "y": 2.5 }, + { "label": "Delete", "x": 15.25, "y": 2.5 }, + { "label": "End", "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "x": 17.25, "y": 2.5 }, + { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.5 }, + { "label": "S", "x": 2.75, "y": 3.5 }, + { "label": "D", "x": 3.75, "y": 3.5 }, + { "label": "F", "x": 4.75, "y": 3.5 }, + { "label": "G", "x": 5.75, "y": 3.5 }, + { "label": "H", "x": 6.75, "y": 3.5 }, + { "label": "J", "x": 7.75, "y": 3.5 }, + { "label": "K", "x": 8.75, "y": 3.5 }, + { "label": "L", "x": 9.75, "y": 3.5 }, + { "label": ":", "x": 10.75, "y": 3.5 }, + { "label": "@", "x": 11.75, "y": 3.5 }, + { "label": "~", "x": 12.75, "y": 3.5 }, + { "label": "Enter", "x": 13.75, "y": 2.5, "w": 1.25, "h": 2 }, + { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 }, + { "label": "|", "x": 1.25, "y": 4.5 }, + { "label": "Z", "x": 2.25, "y": 4.5 }, + { "label": "X", "x": 3.25, "y": 4.5 }, + { "label": "C", "x": 4.25, "y": 4.5 }, + { "label": "V", "x": 5.25, "y": 4.5 }, + { "label": "B", "x": 6.25, "y": 4.5 }, + { "label": "N", "x": 7.25, "y": 4.5 }, + { "label": "M", "x": 8.25, "y": 4.5 }, + { "label": "<", "x": 9.25, "y": 4.5 }, + { "label": ">", "x": 10.25, "y": 4.5 }, + { "label": "?", "x": 11.25, "y": 4.5 }, + { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, + { "label": "Up", "x": 16.25, "y": 4.5 }, + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.5 }, + { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.5 }, + { "label": "Space", "x": 4, "y": 5.5, "w": 7 }, + { "label": "AltGr", "x": 11, "y": 5.5, "w": 1.5 }, + { "label": "Ctrl", "x": 13.5, "y": 5.5, "w": 1.5 }, + { "label": "Left", "x": 15.25, "y": 5.5 }, + { "label": "Down", "x": 16.25, "y": 5.5 }, + { "label": "Right", "x": 17.25, "y": 5.5 } + ] + } + } +} diff --git a/keyboards/masterworks/classy_tkl/keymaps/default/config.h b/keyboards/masterworks/classy_tkl/keymaps/default/config.h new file mode 100644 index 0000000000..e328e5a3b0 --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Mathias Andersson + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/masterworks/classy_tkl/keymaps/default/keymap.c b/keyboards/masterworks/classy_tkl/keymaps/default/keymap.c new file mode 100644 index 0000000000..a87656059c --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +/* +Copyright 2020 Mathias Andersson + +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 QMK_KEYBOARD_H + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_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_NO, KC_BSPC, KC_INS , KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, KC_UP, + KC_LCTL, KC_NO, KC_LALT, KC_SPC, KC_RALT, KC_NO, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT) +}; +// clang-format on diff --git a/keyboards/masterworks/classy_tkl/keymaps/default/readme.md b/keyboards/masterworks/classy_tkl/keymaps/default/readme.md new file mode 100644 index 0000000000..72b4eb54a0 --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default winkeyless ANSI keymap for the Classy TKL diff --git a/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/config.h b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/config.h new file mode 100644 index 0000000000..e328e5a3b0 --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Mathias Andersson + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/keymap.c b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/keymap.c new file mode 100644 index 0000000000..bb7b256fda --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/keymap.c @@ -0,0 +1,29 @@ +/* +Copyright 2020 Mathias Andersson + +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 QMK_KEYBOARD_H + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_ansi_wkl( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS , KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT) +}; +// clang-format on diff --git a/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/readme.md b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/readme.md new file mode 100644 index 0000000000..72b4eb54a0 --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_ansi_wkl/readme.md @@ -0,0 +1 @@ +# The default winkeyless ANSI keymap for the Classy TKL diff --git a/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/config.h b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/config.h new file mode 100644 index 0000000000..e328e5a3b0 --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Mathias Andersson + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/keymap.c b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/keymap.c new file mode 100644 index 0000000000..1456ee02a2 --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/keymap.c @@ -0,0 +1,29 @@ +/* +Copyright 2020 Mathias Andersson + +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 QMK_KEYBOARD_H + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_iso_wkl( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS , KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL , KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_BSLS, 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_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT) +}; +// clang-format on diff --git a/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/readme.md b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/readme.md new file mode 100644 index 0000000000..a4b8c86b1d --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/default_tkl_iso_wkl/readme.md @@ -0,0 +1 @@ +# The default winkeyless ISO keymap for the Classy TKL diff --git a/keyboards/masterworks/classy_tkl/keymaps/via/keymap.c b/keyboards/masterworks/classy_tkl/keymaps/via/keymap.c new file mode 100644 index 0000000000..c26f147eac --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* +Copyright 2020 Mathias Andersson + +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 QMK_KEYBOARD_H + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_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_NO, KC_BSPC, KC_INS , KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, KC_UP, + KC_LCTL, KC_NO, KC_LALT, KC_SPC, KC_RALT, KC_NO, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; +// clang-format on diff --git a/keyboards/masterworks/classy_tkl/keymaps/via/rules.mk b/keyboards/masterworks/classy_tkl/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/masterworks/classy_tkl/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/masterworks/classy_tkl/readme.md b/keyboards/masterworks/classy_tkl/readme.md new file mode 100644 index 0000000000..0557ed7f4c --- /dev/null +++ b/keyboards/masterworks/classy_tkl/readme.md @@ -0,0 +1,15 @@ +# Classy TKL + +![Classy TKL](https://i.imgur.com/p1dxfYKl.jpg) + +A short description of the keyboard/project + +* Keyboard Maintainer: [Mathias Andersson](https://github.com/wraul) +* Hardware Supported: [Classy TKL PCB](https://github.com/4pplet/classyTKL) +* Hardware Availability: https://geekhack.org/index.php?topic=105933 + +Make example for this keyboard (after setting up your build environment): + + make masterworks/classy_tkl:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/masterworks/classy_tkl/rev_a/config.h b/keyboards/masterworks/classy_tkl/rev_a/config.h new file mode 100644 index 0000000000..0821b1dfce --- /dev/null +++ b/keyboards/masterworks/classy_tkl/rev_a/config.h @@ -0,0 +1,58 @@ +/* +Copyright 2020 Mathias Andersson + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4D57 // "MW" = Masterworks +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Masterworks +#define PRODUCT Classy TKL + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 17 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS \ + { C7, F0, F1, F4, F5, F6 } +#define MATRIX_COL_PINS \ + { B4, D7, D6, D4, C6, D5, D3, D2, D1, D0, B7, B3, B2, B1, B0, E6, F7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/masterworks/classy_tkl/rev_a/rev_a.c b/keyboards/masterworks/classy_tkl/rev_a/rev_a.c new file mode 100644 index 0000000000..58c0393db7 --- /dev/null +++ b/keyboards/masterworks/classy_tkl/rev_a/rev_a.c @@ -0,0 +1,42 @@ +/* Copyright 2020 Mathias Andersson + * + * 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 "rev_a.h" + +#define CAPS_PIN B5 +#define SCROLL_PIN B6 + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + setPinOutput(CAPS_PIN); + setPinOutput(SCROLL_PIN); + + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(CAPS_PIN, led_state.caps_lock); + writePin(SCROLL_PIN, led_state.scroll_lock); + } + return res; +} diff --git a/keyboards/masterworks/classy_tkl/rev_a/rev_a.h b/keyboards/masterworks/classy_tkl/rev_a/rev_a.h new file mode 100644 index 0000000000..73e68b598d --- /dev/null +++ b/keyboards/masterworks/classy_tkl/rev_a/rev_a.h @@ -0,0 +1,79 @@ +/* Copyright 2020 Mathias Andersson + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +// clang-format off +#define LAYOUT_all( \ + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k3D, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, \ + k50, k52, k53, k57, k5B, k5C, k5D, k5E, k5F, k5G \ +) \ +{ \ + { k00, KC_NO, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO, KC_NO, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, KC_NO, k4F, KC_NO }, \ + { k50, KC_NO, k52, k53, KC_NO, KC_NO, KC_NO, k57, KC_NO, KC_NO, KC_NO, k5B, k5C, k5D, k5E, k5F, k5G }, \ +} + +#define LAYOUT_tkl_ansi_wkl( \ + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k3D, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4F, \ + k50, k53, k57, k5B, k5D, k5E, k5F, k5G \ +) \ +{ \ + { k00, KC_NO, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, KC_NO, k1E, k1F, k1G }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO, KC_NO, KC_NO }, \ + { k40, KC_NO, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO, KC_NO, k4F, KC_NO }, \ + { k50, KC_NO, KC_NO, k53, KC_NO, KC_NO, KC_NO, k57, KC_NO, KC_NO, KC_NO, k5B, KC_NO, k5D, k5E, k5F, k5G }, \ +} + +#define LAYOUT_tkl_iso_wkl( \ + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k3D, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, k2F, k2G, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k2D, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4F, \ + k50, k53, k57, k5B, k5D, k5E, k5F, k5G \ +) \ +{ \ + { k00, KC_NO, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, KC_NO, k1E, k1F, k1G }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO, KC_NO, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO, KC_NO, k4F, KC_NO }, \ + { k50, KC_NO, KC_NO, k53, KC_NO, KC_NO, KC_NO, k57, KC_NO, KC_NO, KC_NO, k5B, KC_NO, k5D, k5E, k5F, k5G }, \ +} +// clang-format on diff --git a/keyboards/masterworks/classy_tkl/rev_a/rules.mk b/keyboards/masterworks/classy_tkl/rev_a/rules.mk new file mode 100644 index 0000000000..34bcd87a4a --- /dev/null +++ b/keyboards/masterworks/classy_tkl/rev_a/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +# Supported layouts +LAYOUTS = tkl_ansi_wkl tkl_iso_wkl diff --git a/keyboards/matrix/cain_re/cain_re.c b/keyboards/matrix/cain_re/cain_re.c new file mode 100644 index 0000000000..e8d0a2b803 --- /dev/null +++ b/keyboards/matrix/cain_re/cain_re.c @@ -0,0 +1,40 @@ +/** + * cain_re.c + * + Copyright 2020 astro + + 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 "cain_re.h" + +void matrix_init_kb(void) +{ + setPinOutput(NUM_PIN); + setPinOutput(CAPS_PIN); + setPinOutput(SCROLL_PIN); + + matrix_init_user(); +} + +bool led_update_kb(led_t led_state) +{ + bool res = led_update_user(led_state); + if (res) { + writePin(NUM_PIN, led_state.num_lock); + writePin(CAPS_PIN, led_state.caps_lock); + writePin(SCROLL_PIN, led_state.scroll_lock); + } + return res; +} diff --git a/keyboards/matrix/cain_re/cain_re.h b/keyboards/matrix/cain_re/cain_re.h new file mode 100644 index 0000000000..0228177e11 --- /dev/null +++ b/keyboards/matrix/cain_re/cain_re.h @@ -0,0 +1,40 @@ +/** + * cain_re.h + * + Copyright 2020 astro + + 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, k115, k116, k117, k118, k119, k120, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, k214, k215, k216, k217, k218, k219, k220, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314, k315, k316, \ + k400, k401, k402, k403, k404, k405, k406, k407, k408, k409, k410, k411, k412, k413, k414, k415, k416, \ + k500, k501, k502, k503, k504, k505, k506, k507, k508, k509, k510, k511, k512, k513 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011}, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111}, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211}, \ + { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311}, \ + { k400, k401, k402, k403, k404, k405, k406, k407, k408, k409, k410, k411}, \ + { k012, k113, k112, k212, k213, k312, k412, k413, k414, k415, k316, k315}, \ + { k114, k115, k116, k117, k217, k216, k215, k214, k313, k314, k416, KC_NO}, \ + { k013, k014, k015, k120, k119, k118, k218, k219, k220, k511, k512, k513}, \ + { k500, k501, k502, k503, k504, k505, k506, k507, k508, k509, k510, KC_NO} \ +} diff --git a/keyboards/matrix/cain_re/config.h b/keyboards/matrix/cain_re/config.h new file mode 100644 index 0000000000..6bacf1c949 --- /dev/null +++ b/keyboards/matrix/cain_re/config.h @@ -0,0 +1,58 @@ +/** + * config.h + * + Copyright 2020 astro + + 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4D58 // MX +#define PRODUCT_ID 0x0106 // cain +#define DEVICE_VER 0x0001 +#define MANUFACTURER Matrix LAB +#define PRODUCT Matrix Cain Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 9 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F0, C7, C6, D5, D2, D4, D7, B7, D1 } +#define MATRIX_COL_PINS { F1, F4, F5, F6, B5, B6, B3, B2, B1, D0, B4, D6} +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN E6 + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS + +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_SLEEP +#define RGBLIGHT_LED_MAP { 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, 1, 2, 3 } +#endif + +#define CAPS_PIN D3 +#define NUM_PIN F7 +#define SCROLL_PIN B0 diff --git a/keyboards/matrix/cain_re/info.json b/keyboards/matrix/cain_re/info.json new file mode 100644 index 0000000000..3f65b7de77 --- /dev/null +++ b/keyboards/matrix/cain_re/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Matrix Cain Keyboard", + "url": "", + "maintainer": "qmk", + "width": 23, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":20, "y":0}, {"label":"Scroll Lock", "x":21, "y":0}, {"label":"Pause", "x":22, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Num Lock", "x":15.5, "y":1.5}, {"label":"/", "x":16.5, "y":1.5}, {"label":"*", "x":17.5, "y":1.5}, {"label":"-", "x":18.5, "y":1.5}, {"label":"Insert", "x":20, "y":1.5}, {"label":"Home", "x":21, "y":1.5}, {"label":"PgUp", "x":22, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"7", "x":15.5, "y":2.5}, {"label":"8", "x":16.5, "y":2.5}, {"label":"9", "x":17.5, "y":2.5}, {"label":"+", "x":18.5, "y":2.5}, {"label":"Delete", "x":20, "y":2.5}, {"label":"End", "x":21, "y":2.5}, {"label":"PgDn", "x":22, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"4", "x":15.5, "y":3.5}, {"label":"5", "x":16.5, "y":3.5}, {"label":"6", "x":17.5, "y":3.5}, {"label":"+", "x":18.5, "y":3.5}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"1", "x":15.5, "y":4.5}, {"label":"2", "x":16.5, "y":4.5}, {"label":"3", "x":17.5, "y":4.5}, {"label":"Enter", "x":18.5, "y":4.5}, {"label":"\u2191", "x":21, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Win", "x":1.5, "y":5.5}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"label":"Alt", "x":11, "y":5.5, "w":1.5}, {"label":"Win", "x":12.5, "y":5.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, {"label":"0", "x":15.5, "y":5.5}, {"label":"0", "x":16.5, "y":5.5}, {"label":".", "x":17.5, "y":5.5}, {"label":"Enter", "x":18.5, "y":5.5}, {"label":"\u2190", "x":20, "y":5.5}, {"label":"\u2193", "x":21, "y":5.5}, {"label":"\u2192", "x":22, "y":5.5}] + } + } +} diff --git a/keyboards/matrix/cain_re/keymaps/default/keymap.c b/keyboards/matrix/cain_re/keymaps/default/keymap.c new file mode 100644 index 0000000000..1f2d3b4e25 --- /dev/null +++ b/keyboards/matrix/cain_re/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/** + * keymap.c + * + Copyright 2020 astro + + 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0]=LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, LT(1,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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_P7, KC_P8, KC_P9, KC_PPLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_P1, KC_P2, KC_P3, KC_PENT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_LEFT, KC_DOWN, KC_RGHT), + + [1]=LAYOUT_all( + KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______, _______, _______, + KC_NLCK, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______,_______,_______,_______,_______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______,_______, KC_VOLU, + _______, _______, _______, KC_MPLY, _______, _______, _______, _______,_______,_______,_______, KC_MPRV, KC_VOLD, KC_MNXT), +}; diff --git a/keyboards/matrix/cain_re/readme.md b/keyboards/matrix/cain_re/readme.md new file mode 100644 index 0000000000..13c86ea54a --- /dev/null +++ b/keyboards/matrix/cain_re/readme.md @@ -0,0 +1,15 @@ +# Matrix Cain replacement PCB + +This was the replacement PCB for the Matrix Cain keyboard. + +This firmware **DOES NOT** support the original PCB shipped with the Cain keyboard. + +* Keyboard Maintainer: [astro](https://github.com/yulei) +* Hardware Supported: Matrix Cain keyboard +* Hardware Availability: Matrix Lab + +Make example for this keyboard (after setting up your build environment): + + make matrix/cain_re:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/matrix/cain_re/rules.mk b/keyboards/matrix/cain_re/rules.mk new file mode 100644 index 0000000000..9bbb324e7c --- /dev/null +++ b/keyboards/matrix/cain_re/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/matrix/m20add/rules.mk b/keyboards/matrix/m20add/rules.mk index 6dba153932..fb97c1d3c8 100644 --- a/keyboards/matrix/m20add/rules.mk +++ b/keyboards/matrix/m20add/rules.mk @@ -1,38 +1,15 @@ -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx +# MCU name +MCU = STM32F411 # Linker script to use # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ # or /ld/ MCU_LDSCRIPT = m20add_boot -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx - # Board: it should exist either in /os/hal/boards/ # or /boards BOARD = m20add_bd -# Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# Vector table for application -# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ -OPT_DEFS = - -# Options to pass to dfu-util when flashing -#DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -#DFU_SUFFIX_ARGS = -p DF11 -v 0483 - # Build Options # comment out to disable the options. # diff --git a/keyboards/matrix/noah/info.json b/keyboards/matrix/noah/info.json index f35bbd5808..69fc0fccfc 100644 --- a/keyboards/matrix/noah/info.json +++ b/keyboards/matrix/noah/info.json @@ -1426,6 +1426,9 @@ "y": 4 } ] + }, + "LAYOUT_65_iso_blocker": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] } } } diff --git a/keyboards/matrix/noah/keymaps/rys/keymap.c b/keyboards/matrix/noah/keymaps/rys/keymap.c new file mode 100644 index 0000000000..73ee8e1fec --- /dev/null +++ b/keyboards/matrix/noah/keymaps/rys/keymap.c @@ -0,0 +1,59 @@ +/* Copyright 2020 Rys Sommefeldt + * + * 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 i s 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_iso_blocker( + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ ` │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │     │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent├───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │    │PUp│ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │PDn│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │LCtl│LGUI│LAlt│      Spaaaaaaace       │RAlt│ L1 │ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, + KC_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_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_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_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_iso_blocker( + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │RST│ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│       │   │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ TOG │PLN│MOD│HU+│HU-│SA+│SA-│VA+│VA-│   │   │   │   │     │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    ├───┤ + * │      │   │   │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │    │   │   │   │   │   │   │   │   │   │   │   │      │ │   │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │    │    │    │                        │    │    │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + 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, _______, _______, + RGB_TOG, RGB_M_P, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/matrix/noah/noah.h b/keyboards/matrix/noah/noah.h index 5d0da798db..15810c7063 100644 --- a/keyboards/matrix/noah/noah.h +++ b/keyboards/matrix/noah/noah.h @@ -48,6 +48,20 @@ {k40, k41, k42,KC_NO,k43,KC_NO,KC_NO, k45, k46, k47, k48, k1e, k2e, k3e, k0f} \ } +#define LAYOUT_65_iso_blocker( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0f, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48 \ +) { \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c,KC_NO, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c,KC_NO, KC_NO}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO}, \ + {k40, k41, k42,KC_NO,k43,KC_NO,k44, k45, k46, k47, k48, k1e, k2e, k3e, k0f} \ +} + #define LAYOUT_default_splitspace( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ diff --git a/keyboards/matrix/noah/rules.mk b/keyboards/matrix/noah/rules.mk index 80854e67e1..19e432d2a0 100644 --- a/keyboards/matrix/noah/rules.mk +++ b/keyboards/matrix/noah/rules.mk @@ -1,38 +1,15 @@ -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx +# MCU name +MCU = STM32F411 # Linker script to use # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ # or /ld/ MCU_LDSCRIPT = noah_boot -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx - # Board: it should exist either in /os/hal/boards/ # or /boards BOARD = noah_bd -# Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# Vector table for application -# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ -OPT_DEFS = - -# Options to pass to dfu-util when flashing -#DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -#DFU_SUFFIX_ARGS = -p DF11 -v 0483 - # Build Options # comment out to disable the options. # @@ -52,3 +29,5 @@ RGBLIGHT_CUSTOM_DRIVER = yes CUSTOM_MATRIX = yes # project specific files SRC += ws2812.c matrix.c + +LAYOUTS = 65_iso_blocker diff --git a/keyboards/maxr1998/pulse4k/pulse4k.c b/keyboards/maxr1998/pulse4k/pulse4k.c index 61a18af743..37c558db72 100644 --- a/keyboards/maxr1998/pulse4k/pulse4k.c +++ b/keyboards/maxr1998/pulse4k/pulse4k.c @@ -30,7 +30,7 @@ combo_t key_combos[COMBO_COUNT] = { bool led_adjust_active = false; -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { if (combo_index == LED_ADJUST) { led_adjust_active = pressed; } diff --git a/keyboards/mechlovin/delphine/config.h b/keyboards/mechlovin/delphine/config.h new file mode 100644 index 0000000000..b3a084f67e --- /dev/null +++ b/keyboards/mechlovin/delphine/config.h @@ -0,0 +1,44 @@ +/* +Copyright 2020 Team Mechlovin' + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4D4C +#define MANUFACTURER Mechlovin +#define PRODUCT Mechlovin Delphine + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 4 + +/* + * 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 { F0, F1, F4, F5, F6, D3 } +#define MATRIX_COL_PINS { F7, D7, D6, D2 } + +#define DIODE_DIRECTION COL2ROW \ No newline at end of file diff --git a/keyboards/mechlovin/delphine/delphine.c b/keyboards/mechlovin/delphine/delphine.c new file mode 100644 index 0000000000..52292b3c92 --- /dev/null +++ b/keyboards/mechlovin/delphine/delphine.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Team Mechlovin' + * + * 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 "delphine.h" + +void matrix_init_kb(void) { + matrix_init_user(); + led_init_ports(); +} + +void led_init_ports(void) { + setPinOutput(B5); + writePinLow(B5); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B5, led_state.num_lock); + } + + return true; +} diff --git a/keyboards/mechlovin/delphine/delphine.h b/keyboards/mechlovin/delphine/delphine.h new file mode 100644 index 0000000000..1112fc27ff --- /dev/null +++ b/keyboards/mechlovin/delphine/delphine.h @@ -0,0 +1,35 @@ +/* Copyright 2020 Team Mechlovin' + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_6x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33, \ + K40, K41, K42, K43, \ + K50, K51, K52, K53 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 }, \ + { K40, K41, K42, K43 }, \ + { K50, K51, K52, K53 }, \ +} diff --git a/keyboards/mechlovin/delphine/info.json b/keyboards/mechlovin/delphine/info.json new file mode 100644 index 0000000000..6356f4a3d6 --- /dev/null +++ b/keyboards/mechlovin/delphine/info.json @@ -0,0 +1,38 @@ +{ + "keyboard_name": "Delphine", + "url": "", + "maintainer": "Team Mechlovin'", + "width": 4, + "height": 6.25, + "layouts": { + "LAYOUT_ortho_6x4": { + "layout": [ + {"label":"K00 (F0,F7)", "x":0, "y":0}, + {"label":"K01 (F0,D7)", "x":1, "y":0}, + {"label":"K02 (F0,D6)", "x":2, "y":0}, + {"label":"K03 (F0,D2)", "x":3, "y":0}, + {"label":"K10 (F1,F7)", "x":0, "y":1.25}, + {"label":"K11 (F1,D7)", "x":1, "y":1.25}, + {"label":"K12 (F1,D6)", "x":2, "y":1.25}, + {"label":"K13 (F1,D2)", "x":3, "y":1.25}, + {"label":"K20 (F4,F7)", "x":0, "y":2.25}, + {"label":"K21 (F4,D7)", "x":1, "y":2.25}, + {"label":"K22 (F4,D6)", "x":2, "y":2.25}, + {"label":"K23 (F4,D2)", "x":3, "y":2.25}, + {"label":"K30 (F5,F7)", "x":0, "y":3.25}, + {"label":"K31 (F5,D7)", "x":1, "y":3.25}, + {"label":"K32 (F5,D6)", "x":2, "y":3.25}, + {"label":"K33 (F5,D2)", "x":3, "y":3.25}, + {"label":"K40 (F6,F7)", "x":0, "y":4.25}, + {"label":"K41 (F6,D7)", "x":1, "y":4.25}, + {"label":"K42 (F6,D6)", "x":2, "y":4.25}, + {"label":"K43 (F6,D2)", "x":3, "y":4.25}, + {"label":"K50 (D3,F7)", "x":0, "y":5.25}, + {"label":"K51 (D3,D7)", "x":1, "y":5.25}, + {"label":"K52 (D3,D6)", "x":2, "y":5.25}, + {"label":"K53 (D3,D2)", "x":3, "y":5.25} + ] + } + } + ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" +} diff --git a/keyboards/mechlovin/delphine/keymaps/default/keymap.c b/keyboards/mechlovin/delphine/keymaps/default/keymap.c new file mode 100644 index 0000000000..584d0b223a --- /dev/null +++ b/keyboards/mechlovin/delphine/keymaps/default/keymap.c @@ -0,0 +1,28 @@ +/* Copyright 2020 Team Mechlovin' + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_6x4( + KC_ESC, BL_STEP, RGB_TOG, RGB_MOD, + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PEQL, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_P0, KC_PDOT, KC_BSPC + ), + +}; \ No newline at end of file diff --git a/keyboards/mechlovin/delphine/keymaps/default/readme.md b/keyboards/mechlovin/delphine/keymaps/default/readme.md new file mode 100644 index 0000000000..67504a70dd --- /dev/null +++ b/keyboards/mechlovin/delphine/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for delphine diff --git a/keyboards/mechlovin/delphine/keymaps/via/keymap.c b/keyboards/mechlovin/delphine/keymaps/via/keymap.c new file mode 100644 index 0000000000..18c30fdba0 --- /dev/null +++ b/keyboards/mechlovin/delphine/keymaps/via/keymap.c @@ -0,0 +1,52 @@ +/* Copyright 2020 Team Mechlovin' + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_6x4( + KC_ESC, BL_STEP, RGB_TOG, RGB_MOD, + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PEQL, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_P0, KC_PDOT, KC_BSPC + ), + [1] = LAYOUT_ortho_6x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_ortho_6x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_ortho_6x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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/mechlovin/delphine/keymaps/via/readme.md b/keyboards/mechlovin/delphine/keymaps/via/readme.md new file mode 100644 index 0000000000..b97ae1f262 --- /dev/null +++ b/keyboards/mechlovin/delphine/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for delphine diff --git a/keyboards/mechlovin/delphine/keymaps/via/rules.mk b/keyboards/mechlovin/delphine/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/mechlovin/delphine/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/mechlovin/delphine/mono_led/config.h b/keyboards/mechlovin/delphine/mono_led/config.h new file mode 100644 index 0000000000..ead627937c --- /dev/null +++ b/keyboards/mechlovin/delphine/mono_led/config.h @@ -0,0 +1,34 @@ + +#pragma once + +#define PRODUCT_ID 0xDEF1 +#define DEVICE_VER 0x0001 + + +#ifdef BACKLIGHT_ENABLE +#define BACKLIGHT_PIN B6 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 +#endif + +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN E2 +#define RGBLED_NUM 13 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +#define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif \ No newline at end of file diff --git a/keyboards/mechlovin/delphine/mono_led/rules.mk b/keyboards/mechlovin/delphine/mono_led/rules.mk new file mode 100644 index 0000000000..ed572b0bbf --- /dev/null +++ b/keyboards/mechlovin/delphine/mono_led/rules.mk @@ -0,0 +1,2 @@ +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow \ No newline at end of file diff --git a/keyboards/mechlovin/delphine/readme.md b/keyboards/mechlovin/delphine/readme.md new file mode 100644 index 0000000000..9a5389a5f3 --- /dev/null +++ b/keyboards/mechlovin/delphine/readme.md @@ -0,0 +1,15 @@ +# delphine + +![delphine](imgur.com image replace me!) + +A Number-Pad PCB, Mono backlight and RGB backlight version, Dolpad compatible. + +* Keyboard Maintainer: [Mechlovin'](https://github.com/mechlovin) +* Hardware Supported: Delphine PCB +* Hardware Availability: [Team Mechlovin'](https://mechlove.com) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/delphine:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mechlovin/delphine/rgb_led/config.h b/keyboards/mechlovin/delphine/rgb_led/config.h new file mode 100644 index 0000000000..4d5c853d0c --- /dev/null +++ b/keyboards/mechlovin/delphine/rgb_led/config.h @@ -0,0 +1,47 @@ +#pragma once + +#define PRODUCT_ID 0xDEF2 +#define DEVICE_VER 0x0001 + +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN E2 +#define RGBLED_NUM 13 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +#define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +//rgb matrix setting// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// The address will vary depending on your wiring: +// 0b1110100 AD <-> GND +// 0b1110111 AD <-> VCC +// 0b1110101 AD <-> SCL +// 0b1110110 AD <-> SDA +#define DRIVER_ADDR_1 0b1110110 +#define DRIVER_ADDR_2 0b1110100 +#define DRIVER_COUNT 1 +#define DRIVER_1_LED_TOTAL 25 +#define DRIVER_2_LED_TOTAL 0 +#define DRIVER_LED_TOTAL 25 +#define RGB_MATRIX_KEYPRESSES // reacts to keypresses +#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set diff --git a/keyboards/mechlovin/delphine/rgb_led/rgb_led.c b/keyboards/mechlovin/delphine/rgb_led/rgb_led.c new file mode 100644 index 0000000000..6f3e3ec731 --- /dev/null +++ b/keyboards/mechlovin/delphine/rgb_led/rgb_led.c @@ -0,0 +1,160 @@ +/* Copyright 2020 Team Mechlovin' + * + * 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 "rgb_led.h" + + +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +// left CA + {0, C5_2, C6_2, C7_2}, //D2-0 + {0, C1_1, C3_2, C4_2}, //D20-1 + {0, C5_1, C6_1, C7_1}, //D36-2 + {0, C2_1, C3_1, C4_1}, //D46-3 + {0, C5_4, C6_4, C7_4}, //D65-4 + {0, C1_3, C2_3, C3_3}, //D26-5 + {0, C5_3, C6_3, C7_3}, //D37-6 + {0, C1_2, C2_2, C4_3}, //D47-7 + {0, C4_5, C5_5, C7_6}, //D11-8 + {0, C1_5, C2_5, C3_5}, //D27-9 + {0, C4_4, C6_5, C7_5}, //D38-10 + {0, C1_4, C2_4, C3_4}, //D48-11 + +// left CB + {0, C2_9, C3_9, C4_9}, //D17-12 + {0, C5_9, C6_9, C7_9}, //D28-13 + {0, C1_9, C3_10, C4_10}, //D39-14 + {0, C5_10, C6_10, C7_10}, //D49-15 + {0, C1_10, C2_10, C4_11}, //D18-16 + {0, C5_11, C6_11, C7_11}, //D29-17 + {0, C1_11, C2_11, C3_11}, //D40-18 + {0, C5_12, C6_12, C7_12}, //D50-19 + {0, C1_12, C2_12, C3_12}, //D19-20 + {0, C1_13, C2_13, C3_13}, //D61-21 + {0, C4_13, C5_13, C7_14}, //D35-22 + {0, C1_14, C2_14, C3_14}, //D41-23 + {0, C4_14, C5_14, C6_14}, //D51-24 +}; + +led_config_t g_led_config = { { + // Key Matrix to LED Index + {0, 1, 2, 3}, + {4, 5, 6, 7}, + {8, 9, 10, 11}, + {12, 13, 14, 15}, + {16, 17, 18, 19}, + {20, 22, 23, 24} + }, + { + //LED Index to Physical Positon + { 0, 0}, { 75, 0}, {149, 0}, {224, 0}, + { 0, 13}, { 75, 13}, {149, 13}, {224, 13}, + { 0, 25}, { 75, 25}, {149, 25}, {224, 25}, + { 0, 38}, { 75, 38}, {149, 38}, {224, 38}, + { 0, 51}, { 75, 51}, {149, 51}, {224, 51}, + { 0, 64}, { 37, 64}, { 75, 64}, {149, 64}, {224, 64}, +}, { + 4, 4, 4, 4, + 4, 1, 1, 4, + 4, 1, 1, 4, + 4, 1, 1, 4, + 4, 1, 1, 4, + 4, 0, 1, 1, 4, +} }; + +void rgb_matrix_indicators_kb(void) { + if (host_keyboard_led_state().num_lock) { + rgb_matrix_set_color(4, 255, 255, 255); + } +} + +__attribute__((weak)) +layer_state_t layer_state_set_user(layer_state_t state) { + // if on layer 1, turn on L1 LED, otherwise off. + if (get_highest_layer(state) == 0) { + rgb_matrix_set_color(1, 255, 0, 0); + } else { + rgb_matrix_set_color(1, 0, 0, 0); + } + // if on layer 2, turn on L2 LED, otherwise off. + if (get_highest_layer(state) == 1) { + rgb_matrix_set_color(0, 255, 0, 0); + } else { + rgb_matrix_set_color(0, 0, 0, 0); + } + + // if on layer 3, turn on L3 LED, otherwise off. + if (get_highest_layer(state) == 2) { + rgb_matrix_set_color(3, 255, 0, 0); + } else { + rgb_matrix_set_color(3, 0, 0, 0); + } + + // if on layer 4, turn on L4 LED, otherwise off. + if (get_highest_layer(state) == 3) { + rgb_matrix_set_color(2, 255, 0, 0); + } else { + rgb_matrix_set_color(2, 0, 0, 0); + } + + return state; +} + +#endif + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { return false; } + + if (record->event.pressed) { + switch(keycode) { + #ifdef RGB_MATRIX_ENABLE + case KC_F13: // toggle rgb matrix + rgb_matrix_toggle(); + return false; + case KC_F14: + rgb_matrix_step(); + return false; + case KC_F15: + rgb_matrix_increase_speed(); + return false; + case KC_F16: + rgb_matrix_decrease_speed(); + return false; + case KC_F17: + rgb_matrix_increase_hue(); + return false; + case KC_F18: + rgb_matrix_decrease_hue(); + return false; + case KC_F19: + rgb_matrix_increase_sat(); + return false; + case KC_F20: + rgb_matrix_decrease_sat(); + return false; + case KC_F21: + rgb_matrix_increase_val(); + return false; + case KC_F22: + rgb_matrix_decrease_val(); + return false; + #endif + default: + break; + } + } + return true; +} diff --git a/keyboards/mechlovin/delphine/rgb_led/rgb_led.h b/keyboards/mechlovin/delphine/rgb_led/rgb_led.h new file mode 100644 index 0000000000..60d5817344 --- /dev/null +++ b/keyboards/mechlovin/delphine/rgb_led/rgb_led.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Team Mechlovin' + * + * 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 . + */ + +#pragma once + +#include "quantum.h" diff --git a/keyboards/mechlovin/delphine/rgb_led/rules.mk b/keyboards/mechlovin/delphine/rgb_led/rules.mk new file mode 100644 index 0000000000..853f740ce9 --- /dev/null +++ b/keyboards/mechlovin/delphine/rgb_led/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +RGB_MATRIX_ENABLE = IS31FL3731 # Use RGB matrix diff --git a/keyboards/mechlovin/delphine/rules.mk b/keyboards/mechlovin/delphine/rules.mk new file mode 100644 index 0000000000..217bb758b2 --- /dev/null +++ b/keyboards/mechlovin/delphine/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = ortho_6x4 +DEFAULT_FOLDER = mechlovin/delphine/mono_led \ No newline at end of file diff --git a/keyboards/mechlovin/hannah60rgb/config.h b/keyboards/mechlovin/hannah60rgb/config.h index 5ad16084f1..6acfa5d401 100644 --- a/keyboards/mechlovin/hannah60rgb/config.h +++ b/keyboards/mechlovin/hannah60rgb/config.h @@ -21,11 +21,7 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0x4D4C // ML-Mechlovin -#define PRODUCT_ID 0x6001 -#define DEVICE_VER 0x0001 #define MANUFACTURER Team.Mechlovin -#define PRODUCT Hannah60 RGB -#define DESCRIPTION Team.Mechlovin Hannah60 RGB /* key matrix size */ #define MATRIX_ROWS 5 @@ -44,15 +40,4 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { A4, A5, A3, A2, A1 } #define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, A6, A0, C15, B4, B5, B3, C13, C14 } -#define DIODE_DIRECTION COL2ROW - -#define RGB_DI_PIN A15 -#define DRIVER_LED_TOTAL 72 -#define RGB_MATRIX_KEYPRESSES // reacts to keypresses -#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended -#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 -#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set \ No newline at end of file +#define DIODE_DIRECTION COL2ROW \ No newline at end of file diff --git a/keyboards/mechlovin/hannah60rgb/hannah60rgb.h b/keyboards/mechlovin/hannah60rgb/hannah60rgb.h index 8fd1c67979..9944b12284 100644 --- a/keyboards/mechlovin/hannah60rgb/hannah60rgb.h +++ b/keyboards/mechlovin/hannah60rgb/hannah60rgb.h @@ -1,63 +1,24 @@ -/* -Copyright 2020 Mechlovin' - -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 . -*/ +/* Copyright 2019 Mechlovin + * + * 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 . + */ #pragma once #include "quantum.h" -#define LAYOUT_all( \ -K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, \ -K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \ -K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ -K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ -K40, K41, K42, K44, K46, K48, K4A, K4B, K4C, K4D \ -) { \ - { 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, KC_NO, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D }, \ -} -#define LAYOUT_60_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D \ -) { \ - { 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, KC_NO }, \ - { 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, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D }, \ -} -#define LAYOUT_60_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, \ - 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, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D \ -) { \ - { 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, KC_NO }, \ - { 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, KC_NO }, \ - { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D }, \ -} - - -// generated by KBFirmware JSON to QMK Parser -// https://noroadsleft.github.io/kbf_qmk_converter/ +#if defined(KEYBOARD_mechlovin_hannah60rgb_rev1) + #include "rev1.h" +#elif defined(KEYBOARD_mechlovin_hannah60rgb_rev2) + #include "rev2.h" +#endif diff --git a/keyboards/mechlovin/hannah60rgb/info.json b/keyboards/mechlovin/hannah60rgb/info.json index 97d7b84922..e6d052b49a 100644 --- a/keyboards/mechlovin/hannah60rgb/info.json +++ b/keyboards/mechlovin/hannah60rgb/info.json @@ -1,12 +1,11 @@ { "keyboard_name": "hannah60rgb", "url": "", - "maintainer": "qmk", + "maintainer": "Team Mechlovin'", "width": 15, "height": 5, "layouts": { "LAYOUT_all": { - "key_count": 66, "layout": [ {"label":"K00 (B0,B5)", "x":2.75, "y":0}, {"label":"K01 (B0,B6)", "x":3.75, "y":0}, diff --git a/keyboards/mechlovin/hannah60rgb/keymaps/default/readme.md b/keyboards/mechlovin/hannah60rgb/keymaps/default/readme.md deleted file mode 100644 index 9a101f5ace..0000000000 --- a/keyboards/mechlovin/hannah60rgb/keymaps/default/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for hannah60rgb diff --git a/keyboards/mechlovin/hannah60rgb/keymaps/via/readme.md b/keyboards/mechlovin/hannah60rgb/keymaps/via/readme.md deleted file mode 100644 index 794a57963c..0000000000 --- a/keyboards/mechlovin/hannah60rgb/keymaps/via/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The VIA keymap for hannah60rgb diff --git a/keyboards/mechlovin/hannah60rgb/readme.md b/keyboards/mechlovin/hannah60rgb/readme.md index 777be816a0..e827bda5a3 100644 --- a/keyboards/mechlovin/hannah60rgb/readme.md +++ b/keyboards/mechlovin/hannah60rgb/readme.md @@ -10,6 +10,6 @@ A 60% PCB with per-key RGB, compatible with Poker and Unikorn cases. Make example for this keyboard (after setting up your build environment): - make mechlovin/hannah60rgb:default + make mechlovin/hannah60rgb/rev1:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mechlovin/hannah60rgb/rev1/config.h b/keyboards/mechlovin/hannah60rgb/rev1/config.h new file mode 100644 index 0000000000..20873e7161 --- /dev/null +++ b/keyboards/mechlovin/hannah60rgb/rev1/config.h @@ -0,0 +1,18 @@ +#pragma once + +#define PRODUCT_ID 0x6001 +#define DEVICE_VER 0x0001 +#define PRODUCT Hannah60 RGB + +#define RGB_DI_PIN A15 +#ifdef RGB_MATRIX_ENABLE +# define DRIVER_LED_TOTAL 72 +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +# define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +# define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +# define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set +#endif \ No newline at end of file diff --git a/keyboards/mechlovin/hannah60rgb/rev1/keymaps/default/keymap.c b/keyboards/mechlovin/hannah60rgb/rev1/keymaps/default/keymap.c new file mode 100644 index 0000000000..d3e8d7e646 --- /dev/null +++ b/keyboards/mechlovin/hannah60rgb/rev1/keymaps/default/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2020 Mechlovin' + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + 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_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + LT(2,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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ), + +}; diff --git a/keyboards/mechlovin/hannah60rgb/keymaps/via/keymap.c b/keyboards/mechlovin/hannah60rgb/rev1/keymaps/via/keymap.c similarity index 95% rename from keyboards/mechlovin/hannah60rgb/keymaps/via/keymap.c rename to keyboards/mechlovin/hannah60rgb/rev1/keymaps/via/keymap.c index 0e22b84f06..2d72dbd5aa 100644 --- a/keyboards/mechlovin/hannah60rgb/keymaps/via/keymap.c +++ b/keyboards/mechlovin/hannah60rgb/rev1/keymaps/via/keymap.c @@ -19,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_all( 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_DEL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, - LT(2,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, + LT(2,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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(1), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ), [1] = LAYOUT_all( diff --git a/keyboards/mechlovin/hannah60rgb/rev1/keymaps/via/rules.mk b/keyboards/mechlovin/hannah60rgb/rev1/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/mechlovin/hannah60rgb/rev1/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/mechlovin/hannah60rgb/hannah60rgb.c b/keyboards/mechlovin/hannah60rgb/rev1/rev1.c similarity index 100% rename from keyboards/mechlovin/hannah60rgb/hannah60rgb.c rename to keyboards/mechlovin/hannah60rgb/rev1/rev1.c diff --git a/keyboards/mechlovin/hannah60rgb/rev1/rev1.h b/keyboards/mechlovin/hannah60rgb/rev1/rev1.h new file mode 100644 index 0000000000..8fd1c67979 --- /dev/null +++ b/keyboards/mechlovin/hannah60rgb/rev1/rev1.h @@ -0,0 +1,63 @@ +/* +Copyright 2020 Mechlovin' + +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 . +*/ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ +K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, \ +K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \ +K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ +K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ +K40, K41, K42, K44, K46, K48, K4A, K4B, K4C, K4D \ +) { \ + { 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, KC_NO, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D }, \ +} +#define LAYOUT_60_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D \ +) { \ + { 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, KC_NO }, \ + { 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, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D }, \ +} +#define LAYOUT_60_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, \ + 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, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D \ +) { \ + { 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, KC_NO }, \ + { 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, KC_NO }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D }, \ +} + + +// generated by KBFirmware JSON to QMK Parser +// https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/mechlovin/hannah60rgb/rev1/rules.mk b/keyboards/mechlovin/hannah60rgb/rev1/rules.mk new file mode 100644 index 0000000000..20256e2086 --- /dev/null +++ b/keyboards/mechlovin/hannah60rgb/rev1/rules.mk @@ -0,0 +1 @@ +RGB_MATRIX_ENABLE = WS2812 diff --git a/keyboards/mechlovin/hannah60rgb/rev2/config.h b/keyboards/mechlovin/hannah60rgb/rev2/config.h new file mode 100644 index 0000000000..2bcffbc856 --- /dev/null +++ b/keyboards/mechlovin/hannah60rgb/rev2/config.h @@ -0,0 +1,40 @@ +#pragma once + +#define PRODUCT_ID 0x6002 +#define DEVICE_VER 0x0001 +#define PRODUCT Hannah60 RGB Rev.2 + +#ifdef RGBLIGHT_ENABLE +# define RGB_DI_PIN A15 +# define RGBLED_NUM 18 +# define RGBLIGHT_ANIMATIONS +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +#endif + +//rgb matrix setting// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// The address will vary depending on your wiring: +// 0b1110100 AD <-> GND +// 0b1110111 AD <-> VCC +// 0b1110101 AD <-> SCL +// 0b1110110 AD <-> SDA +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110110 +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 44 +#define DRIVER_2_LED_TOTAL 34 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_KEYPRESSES // reacts to keypresses +#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set + +#if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) +# define RGB_MATRIX_DISABLE_KEYCODES +#endif \ No newline at end of file diff --git a/keyboards/mechlovin/hannah60rgb/keymaps/default/keymap.c b/keyboards/mechlovin/hannah60rgb/rev2/keymaps/default/keymap.c similarity index 91% rename from keyboards/mechlovin/hannah60rgb/keymaps/default/keymap.c rename to keyboards/mechlovin/hannah60rgb/rev2/keymaps/default/keymap.c index 5edcdd0997..fd55a31850 100644 --- a/keyboards/mechlovin/hannah60rgb/keymaps/default/keymap.c +++ b/keyboards/mechlovin/hannah60rgb/rev2/keymaps/default/keymap.c @@ -21,6 +21,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(1), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ), }; diff --git a/keyboards/mechlovin/hannah60rgb/rev2/keymaps/via/keymap.c b/keyboards/mechlovin/hannah60rgb/rev2/keymaps/via/keymap.c new file mode 100644 index 0000000000..c3c7c1559c --- /dev/null +++ b/keyboards/mechlovin/hannah60rgb/rev2/keymaps/via/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2020 Mechlovin' + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + 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_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + LT(2,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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ), + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + +}; diff --git a/keyboards/mechlovin/hannah60rgb/rev2/keymaps/via/rules.mk b/keyboards/mechlovin/hannah60rgb/rev2/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/mechlovin/hannah60rgb/rev2/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/mechlovin/hannah60rgb/rev2/rev2.c b/keyboards/mechlovin/hannah60rgb/rev2/rev2.c new file mode 100644 index 0000000000..05469a1bbe --- /dev/null +++ b/keyboards/mechlovin/hannah60rgb/rev2/rev2.c @@ -0,0 +1,247 @@ +/* Copyright 2020 Mechlovin' + * + * 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 "rev2.h" + +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ +// left CA + {0, C1_1, C3_2, C4_2}, //D9-0-0 + {0, C5_2, C6_2, C7_2}, //D59-1-1 + {0, C2_1, C3_1, C4_1}, //D68-2-2 + {0, C5_1, C6_1, C7_1}, //D76-3-3 + {0, C1_2, C2_2, C4_3}, //D10-15-4 + {0, C5_3, C6_3, C7_3}, //D60-16-5 + {0, C1_3, C2_3, C3_3}, //D72-17-6 + {0, C5_4, C6_4, C7_4}, //D77-18-7 + {0, C1_4, C2_4, C3_4}, //D46-30-8 + {0, C4_4, C6_5, C7_5}, //D61-31-9 + {0, C1_5, C2_5, C3_5}, //D73-32-10 + {0, C4_5, C5_5, C7_6}, //D78-33-11 + {0, C1_6, C2_6, C3_6}, //D126-44-12 + {0, C4_6, C5_6, C6_6}, //D51-45-13 + {0, C1_7, C2_7, C3_7}, //D63-46-14 + {0, C4_7, C5_7, C6_7}, //D74-47-15 + {0, C1_8, C2_8, C3_8}, //D56-60-16 + {0, C4_8, C5_8, C6_8}, //D67-61-17 + +// left CB + {0, C2_9, C3_9, C4_9}, //D80-4-18 + {0, C5_9, C6_9, C7_9}, //D84-5-19 + {0, C1_9, C3_10, C4_10}, //D89-6-20 + {0, C5_10, C6_10, C7_10}, //D94-7-21 + {0, C1_10, C2_10, C4_11}, //D81-19-22 + {0, C5_11, C6_11, C7_11}, //D85-20-23 + {0, C1_11, C2_11, C3_11}, //D90-21-24 + {0, C5_12, C6_12, C7_12}, //D95-22-25 + {0, C1_12, C2_12, C3_12}, //D82-34-26 + {0, C4_12, C6_13, C7_13}, //D86-35-27 + {0, C1_13, C2_13, C3_13}, //D91-36-28 + {0, C4_13, C5_13, C7_14}, //D96-37-29 + {0, C1_14, C2_14, C3_14}, //D79-48-30 + {0, C4_14, C5_14, C6_14}, //D83-49-31 + {0, C1_15, C2_15, C3_15}, //D87-50-32 + {0, C4_15, C5_15, C6_15}, //D92-51-33 + {0, C1_16, C2_16, C3_16}, //D75-62-34 + {0, C4_16, C5_16, C6_16}, //D93-63-35 + +// right CA + {1, C2_1, C3_1, C4_1}, //D98-8-36 + {1, C5_1, C6_1, C7_1}, //D102-9-37 + {1, C1_1, C3_2, C4_2}, //D106-10-38 + {1, C5_2, C6_2, C7_2}, //D111-11-39 + {1, C2_9, C3_9, C4_9}, //D116-12-40 + {1, C5_9, C6_9, C7_9}, //D130-13-41 + {1, C1_13, C2_13, C3_13}, //D121-14-42 + {1, C1_2, C2_2, C4_3}, //D99-23-43 + {1, C5_3, C6_3, C7_3}, //D103-24-44 + {1, C1_3, C2_3, C3_3}, //D107-25-45 + {1, C5_4, C6_4, C7_4}, //D112-26-46 + {1, C1_9, C3_10, C4_10}, //D117-27-47 + {1, C5_10, C6_10, C7_10}, //D129-28-48 + {1, C4_13, C5_13, C7_14}, //D122-29-49 + {1, C1_4, C2_4, C3_4}, //D100-38-50 + {1, C4_4, C6_5, C7_5}, //D104-39-51 + {1, C1_5, C2_5, C3_5}, //D108-40-52 + {1, C4_5, C5_5, C7_6}, //D113-41-53 +// right CB + {1, C1_10, C2_10, C4_11}, //D118-42-54 + {1, C5_11, C6_11, C7_11}, //D123-43-55 + {1, C1_6, C2_6, C3_6}, //D97-52-56 + {1, C4_6, C5_6, C6_6}, //D101-53-57 + {1, C1_7, C2_7, C3_7}, //D105-54-58 + {1, C4_7, C5_7, C6_7}, //D109-55-59 + {1, C1_11, C2_11, C3_11}, //D114-56-60 + {1, C5_12, C6_12, C7_12}, //D128-57-61 + {1, C1_14, C2_14, C3_14}, //D119-58-62 + {1, C4_14, C5_14, C6_14}, //D124-59-63 + {1, C1_8, C2_8, C3_8}, //D127-64-64 + {1, C4_8, C5_8, C6_8}, //D110-65-65 + {1, C1_12, C2_12, C3_12}, //D115-66-66 + {1, C4_12, C6_13, C7_13}, //D120-67-67 + {1, C1_15, C2_15, C3_15}, //D125-68-68 + {1, C4_15, C5_15, C6_15}, //D140-69-69 + {0, C8_7, C7_7, C7_8}, //INDICATOR LED-70 + {0, C8_8, C8_1, C8_2}, //INDICATOR LED-71 + {0, C9_7, C8_6, C9_6}, //INDICATOR LED-72 + {0, C9_8, C8_4, C8_5},//INDICATOR LED-73 + {0, C8_15, C9_1, C9_2},//INDICATOR LED-74 + {0, C8_16, C8_3, C9_3},//INDICATOR LED-75 + {0, C9_15, C9_9, C9_10},//INDICATOR LED-76 + {0, C9_16, C9_11, C7_12},//INDICATOR LED-77 +}; + +led_config_t g_led_config = { { + // Key Matrix to LED Index + {0, 1, 2, 3, 18, 19, 20, 21, 36, 37, 38, 39, 40, 41}, + {4, 5, 6, 7, 22, 23, 24, 25, 43, 44, 45, 46, 47, 69}, + {8, 9, 10, 11, 26, 27, 28, 29, 50, 51, 52, 53, 54, 55}, + {13, 14, 15, 30, 31, 32, 33, 56, 57, 58, 59, 60, 62, 63}, + {16, 17, 34, NO_LED, NO_LED, NO_LED, 35, NO_LED, NO_LED, NO_LED, 65, 66, 67, 68}, + }, + { + //LED Index to Physical Positon + { 0, 0}, { 16, 0}, { 32, 0 }, { 48, 0}, //9-59-68-76 + { 0, 16}, { 16, 16}, { 32, 16}, { 48, 16}, //10-60-72-77 + { 0, 32}, { 16, 32}, { 32, 32}, { 48, 32}, //46-61-73-78 + { 0, 48}, { 0, 48}, { 12, 48}, { 16, 48}, //126-51-63-74 + { 0, 64}, { 16, 64}, //56-67 + { 64, 0}, { 80, 0}, { 96, 0}, { 112, 0}, //80-84-89-94 + { 64, 16}, { 80, 16}, { 96,16}, { 112,16}, //81-85-90-95 + { 64, 32}, { 80, 32}, { 96,32}, { 112,32}, //82-86-91-96 + { 32, 48}, { 48, 48}, { 64,48}, { 80,48}, //79-83-87-92 + { 32, 64}, { 80, 64}, //75-93 + { 128, 0}, { 144, 0}, { 160, 0}, { 176, 0}, {192, 0}, {220, 0}, {210, 0}, //98-102-106-111-116-121-130 + { 128,16}, {144,16}, {160,16}, {176, 16}, {192, 16}, {220, 16}, {220,16}, //99-103-107-112-117-129-122 + { 128,32}, { 144,32}, { 160,32}, { 176,32}, {192, 32}, {220, 32}, //100-104-108-113-118-123 + { 96,48}, {112,48}, {128, 48}, {144, 48}, {160, 48}, {200, 48}, {220,48}, {220,48}, //97-101-105-109-114-119-128-124 + { 96,64}, {144,64}, {160,64}, {176,64}, {220, 64}, //127-110-115-120-125 + { 220, 0}, //140 +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +} }; + +__attribute__((weak)) void rgb_matrix_indicators_user(void) { + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(8, 255, 255, 255); + rgb_matrix_set_color(70, 255, 0, 0); + } else { + rgb_matrix_set_color(70, 0, 0, 0); + } + if (host_keyboard_led_state().num_lock) { + rgb_matrix_set_color(71, 255, 0, 0); + } else { + rgb_matrix_set_color(71, 0, 0, 0); + } + if (host_keyboard_led_state().scroll_lock) { + rgb_matrix_set_color(72, 255, 0, 0); + } else { + rgb_matrix_set_color(72, 0, 0, 0); + } +} + +__attribute__((weak)) +layer_state_t layer_state_set_user(layer_state_t state) { + // if on layer 1, turn on L1 LED, otherwise off. + if (get_highest_layer(state) == 0) { + rgb_matrix_set_color(73, 255, 0, 0); + } else { + rgb_matrix_set_color(73, 0, 0, 0); + } + // if on layer 2, turn on L2 LED, otherwise off. + if (get_highest_layer(state) == 1) { + rgb_matrix_set_color(74, 255, 0, 0); + } else { + rgb_matrix_set_color(74, 0, 0, 0); + } + + // if on layer 3, turn on L3 LED, otherwise off. + if (get_highest_layer(state) == 2) { + rgb_matrix_set_color(75, 255, 0, 0); + } else { + rgb_matrix_set_color(75, 0, 0, 0); + } + + // if on layer 4, turn on L4 LED, otherwise off. + if (get_highest_layer(state) == 3) { + rgb_matrix_set_color(76, 255, 0, 0); + } else { + rgb_matrix_set_color(76, 0, 0, 0); + } + + // if on layer 5, turn on L5 LED, otherwise off. + if (get_highest_layer(state) == 4) { + rgb_matrix_set_color(77, 255, 0, 0); + } else { + rgb_matrix_set_color(77, 0, 0, 0); + } + + return state; +} + +#endif + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + #ifdef RGB_MATRIX_DISABLE_KEYCODES + case KC_F13: // toggle rgb matrix + rgb_matrix_toggle(); + return false; + case KC_F14: + rgb_matrix_step(); + return false; + case KC_F15: + rgb_matrix_increase_speed(); + return false; + case KC_F16: + rgb_matrix_decrease_speed(); + return false; + case KC_F17: + rgb_matrix_increase_hue(); + return false; + case KC_F18: + rgb_matrix_decrease_hue(); + return false; + case KC_F19: + rgb_matrix_increase_sat(); + return false; + case KC_F20: + rgb_matrix_decrease_sat(); + return false; + case KC_F21: + rgb_matrix_increase_val(); + return false; + case KC_F22: + rgb_matrix_decrease_val(); + return false; + #endif + default: + break; + } + } + return true; +} diff --git a/keyboards/mechlovin/hannah60rgb/rev2/rev2.h b/keyboards/mechlovin/hannah60rgb/rev2/rev2.h new file mode 100644 index 0000000000..3382941e49 --- /dev/null +++ b/keyboards/mechlovin/hannah60rgb/rev2/rev2.h @@ -0,0 +1,33 @@ +/* +Copyright 2020 Mechlovin' + +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 . +*/ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ +K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, \ +K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \ +K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ +K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ +K40, K41, K42, K46, K4A, K4B, K4C, K4D \ +) { \ + { 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, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D }, \ +} diff --git a/keyboards/mechlovin/hannah60rgb/rev2/rules.mk b/keyboards/mechlovin/hannah60rgb/rev2/rules.mk new file mode 100644 index 0000000000..1114e69522 --- /dev/null +++ b/keyboards/mechlovin/hannah60rgb/rev2/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGB_MATRIX_ENABLE = IS31FL3731 \ No newline at end of file diff --git a/keyboards/mechlovin/hannah60rgb/rules.mk b/keyboards/mechlovin/hannah60rgb/rules.mk index 1a5441fc70..7023e65ca4 100644 --- a/keyboards/mechlovin/hannah60rgb/rules.mk +++ b/keyboards/mechlovin/hannah60rgb/rules.mk @@ -14,14 +14,9 @@ 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 = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs -RGB_MATRIX_ENABLE = WS2812 - # generated by KBFirmware JSON to QMK Parser # https://noroadsleft.github.io/kbf_qmk_converter/ + +DEFAULT_FOLDER = mechlovin/hannah60rgb/rev1 diff --git a/keyboards/mechlovin/hannah65/config.h b/keyboards/mechlovin/hannah65/config.h new file mode 100644 index 0000000000..6801c30a3d --- /dev/null +++ b/keyboards/mechlovin/hannah65/config.h @@ -0,0 +1,49 @@ +/* +Copyright 2020 Team Mechlovin + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4D4C +#define MANUFACTURER Team Mechlovin + +#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 { A4, A5, A3, A2, A1 } +#define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, A6, A0, C15, B4, B5, B3, C13, C14, A13 } + +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B8 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 3 + +#define BACKLIGHT_LEVELS 3 diff --git a/keyboards/mechlovin/hannah65/hannah65.c b/keyboards/mechlovin/hannah65/hannah65.c new file mode 100644 index 0000000000..4f937d8a2a --- /dev/null +++ b/keyboards/mechlovin/hannah65/hannah65.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 "hannah65.h" + +void matrix_init_kb(void) { + matrix_init_user(); + led_init_ports(); +} + +void led_init_ports(void) { + setPinOutput(B9); + writePinLow(B9); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B9, led_state.caps_lock); + } + + return true; +} diff --git a/keyboards/mechlovin/hannah65/hannah65.h b/keyboards/mechlovin/hannah65/hannah65.h new file mode 100644 index 0000000000..576a78510d --- /dev/null +++ b/keyboards/mechlovin/hannah65/hannah65.h @@ -0,0 +1,25 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#if defined(KEYBOARD_mechlovin_hannah65_rev1) +# include "rev1.h" +#elif defined(KEYBOARD_mechlovin_hannah65_mechlovin9) +# include "mechlovin9.h" +#endif \ No newline at end of file diff --git a/keyboards/mechlovin/hannah65/mechlovin9/config.h b/keyboards/mechlovin/hannah65/mechlovin9/config.h new file mode 100644 index 0000000000..df917e3d10 --- /dev/null +++ b/keyboards/mechlovin/hannah65/mechlovin9/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define PRODUCT_ID 0x6501 +#define DEVICE_VER 0x0001 +#define PRODUCTION Mechlovin9 \ No newline at end of file diff --git a/keyboards/mechlovin/hannah65/mechlovin9/info.json b/keyboards/mechlovin/hannah65/mechlovin9/info.json new file mode 100644 index 0000000000..24585920a2 --- /dev/null +++ b/keyboards/mechlovin/hannah65/mechlovin9/info.json @@ -0,0 +1,80 @@ +{ + "keyboard_name": "mechlovin9", + "url": "", + "maintainer": "Team Mechlovin", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"K00 (B0,B5)", "x":0, "y":0}, + {"label":"K01 (B0,B6)", "x":1, "y":0}, + {"label":"K02 (B0,B7)", "x":2, "y":0}, + {"label":"K03 (B0,C0)", "x":3, "y":0}, + {"label":"K04 (B0,C1)", "x":4, "y":0}, + {"label":"K05 (B0,C2)", "x":5, "y":0}, + {"label":"K06 (B0,C3)", "x":6, "y":0}, + {"label":"K07 (B0,C4)", "x":7, "y":0}, + {"label":"K08 (B0,C5)", "x":8, "y":0}, + {"label":"K09 (B0,C6)", "x":9, "y":0}, + {"label":"K0A (B0,C7)", "x":10, "y":0}, + {"label":"K0B (B0,D0)", "x":11, "y":0}, + {"label":"K0C (B0,D1)", "x":12, "y":0}, + {"label":"K0D (B0,D2)", "x":13, "y":0}, + {"label":"K1D (B1,D2)", "x":14, "y":0}, + {"label":"K0E (B0,D3)", "x":15, "y":0}, + {"label":"K10 (B1,B5)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,B6)", "x":1.5, "y":1}, + {"label":"K12 (B1,B7)", "x":2.5, "y":1}, + {"label":"K13 (B1,C0)", "x":3.5, "y":1}, + {"label":"K14 (B1,C1)", "x":4.5, "y":1}, + {"label":"K15 (B1,C2)", "x":5.5, "y":1}, + {"label":"K16 (B1,C3)", "x":6.5, "y":1}, + {"label":"K17 (B1,C4)", "x":7.5, "y":1}, + {"label":"K18 (B1,C5)", "x":8.5, "y":1}, + {"label":"K19 (B1,C6)", "x":9.5, "y":1}, + {"label":"K1A (B1,C7)", "x":10.5, "y":1}, + {"label":"K1B (B1,D0)", "x":11.5, "y":1}, + {"label":"K1C (B1,D1)", "x":12.5, "y":1}, + {"label":"K2C (B2,D1)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1E (B1,D3)", "x":15, "y":1}, + {"label":"K20 (B2,B5)", "x":0, "y":2, "w":1.75}, + {"label":"K21 (B2,B6)", "x":1.75, "y":2}, + {"label":"K22 (B2,B7)", "x":2.75, "y":2}, + {"label":"K23 (B2,C0)", "x":3.75, "y":2}, + {"label":"K24 (B2,C1)", "x":4.75, "y":2}, + {"label":"K25 (B2,C2)", "x":5.75, "y":2}, + {"label":"K26 (B2,C3)", "x":6.75, "y":2}, + {"label":"K27 (B2,C4)", "x":7.75, "y":2}, + {"label":"K28 (B2,C5)", "x":8.75, "y":2}, + {"label":"K29 (B2,C6)", "x":9.75, "y":2}, + {"label":"K2A (B2,C7)", "x":10.75, "y":2}, + {"label":"K2B (B2,D0)", "x":11.75, "y":2}, + {"label":"K2D (B2,D2)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2E (B2,D3)", "x":15, "y":2}, + {"label":"K30 (B3,B5)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (B3,B7)", "x":2.25, "y":3}, + {"label":"K33 (B3,C0)", "x":3.25, "y":3}, + {"label":"K34 (B3,C1)", "x":4.25, "y":3}, + {"label":"K35 (B3,C2)", "x":5.25, "y":3}, + {"label":"K36 (B3,C3)", "x":6.25, "y":3}, + {"label":"K37 (B3,C4)", "x":7.25, "y":3}, + {"label":"K38 (B3,C5)", "x":8.25, "y":3}, + {"label":"K39 (B3,C6)", "x":9.25, "y":3}, + {"label":"K3A (B3,C7)", "x":10.25, "y":3}, + {"label":"K3B (B3,D0)", "x":11.25, "y":3}, + {"label":"K3C (B3,D1)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D (B3,D2)", "x":14, "y":3}, + {"label":"K3E (B3,D3)", "x":15, "y":3}, + {"label":"K40 (B4,B5)", "x":0, "y":4, "w":1.5}, + {"label":"K41 (B4,B6)", "x":1.5, "y":4}, + {"label":"K42 (B4,B7)", "x":2.5, "y":4, "w":1.5}, + {"label":"K46 (B4,C3)", "x":4, "y":4, "w":7}, + {"label":"K4B (B4,D0)", "x":11, "y":4, "w":1.5}, + {"label":"K4C (B4,D1)", "x":13, "y":4}, + {"label":"K4D (B4,D2)", "x":14, "y":4}, + {"label":"K4E (B4,D3)", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/keymap.c b/keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/keymap.c new file mode 100644 index 0000000000..97a2c80723 --- /dev/null +++ b/keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + 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_DEL, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + +}; + diff --git a/keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/readme.md b/keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/readme.md new file mode 100644 index 0000000000..324467b059 --- /dev/null +++ b/keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for mechlovin9 diff --git a/keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/keymap.c b/keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/keymap.c new file mode 100644 index 0000000000..0fae908c24 --- /dev/null +++ b/keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + 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_DEL, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + +}; + diff --git a/keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/rules.mk b/keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/mechlovin/hannah65/mechlovin9/mechlovin9.h b/keyboards/mechlovin/hannah65/mechlovin9/mechlovin9.h new file mode 100644 index 0000000000..4aebaad0f3 --- /dev/null +++ b/keyboards/mechlovin/hannah65/mechlovin9/mechlovin9.h @@ -0,0 +1,33 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K4B, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, KC_NO, K4B, K4C, K4D, K4E }, \ +} diff --git a/keyboards/mechlovin/hannah65/mechlovin9/readme.md b/keyboards/mechlovin/hannah65/mechlovin9/readme.md new file mode 100644 index 0000000000..aa6bdc1cad --- /dev/null +++ b/keyboards/mechlovin/hannah65/mechlovin9/readme.md @@ -0,0 +1,15 @@ +# mechlovin9 + +![mechlovin9](https://i.imgur.com/T5Lm6OYl.png) + +A 65% PCB, compatible with Kyuu. + +* Keyboard Maintainer: [Team Mechlovin](https://github.com/mechlovin) +* Hardware Supported: Kyuu Keyboard. +* Hardware Availability: [Reddit GB](https://www.reddit.com/r/mechmarket/comments/i61par/gb_mechlovin_9_a_kyuu_65_keyboard_compatible_pcb/) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/hannah65/mechlovin9:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mechlovin/hannah65/mechlovin9/rules.mk b/keyboards/mechlovin/hannah65/mechlovin9/rules.mk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/keyboards/mechlovin/hannah65/readme.md b/keyboards/mechlovin/hannah65/readme.md new file mode 100644 index 0000000000..25fcd18d8d --- /dev/null +++ b/keyboards/mechlovin/hannah65/readme.md @@ -0,0 +1,15 @@ +# hannah65 + +![hannah65](https://i.imgur.com/qf0BYI2l.png) + +A 65% PCB, compatible with E6.5, Kyuu,... + +* Keyboard Maintainer: [Team Mechlovin](https://github.com/mechlovin) +* Hardware Supported: Hannah65, STM32F303 +* Hardware Availability: [Mechlovin Store](https://mechlove.com/) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/hannah65/rev1:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mechlovin/hannah65/rev1/config.h b/keyboards/mechlovin/hannah65/rev1/config.h new file mode 100644 index 0000000000..8d90908c20 --- /dev/null +++ b/keyboards/mechlovin/hannah65/rev1/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define PRODUCT_ID 0x6500 +#define DEVICE_VER 0x0001 +#define PRODUCTION Hannah65 \ No newline at end of file diff --git a/keyboards/mechlovin/hannah65/rev1/info.json b/keyboards/mechlovin/hannah65/rev1/info.json new file mode 100644 index 0000000000..ceb7aceb38 --- /dev/null +++ b/keyboards/mechlovin/hannah65/rev1/info.json @@ -0,0 +1,225 @@ +{ + "keyboard_name": "hannah65-rev1", + "url": "", + "maintainer": "Team Mechlovin", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"K00 (B0,B5)", "x":0, "y":0}, + {"label":"K01 (B0,B6)", "x":1, "y":0}, + {"label":"K02 (B0,B7)", "x":2, "y":0}, + {"label":"K03 (B0,C0)", "x":3, "y":0}, + {"label":"K04 (B0,C1)", "x":4, "y":0}, + {"label":"K05 (B0,C2)", "x":5, "y":0}, + {"label":"K06 (B0,C3)", "x":6, "y":0}, + {"label":"K07 (B0,C4)", "x":7, "y":0}, + {"label":"K08 (B0,C5)", "x":8, "y":0}, + {"label":"K09 (B0,C6)", "x":9, "y":0}, + {"label":"K0A (B0,C7)", "x":10, "y":0}, + {"label":"K0B (B0,D0)", "x":11, "y":0}, + {"label":"K0C (B0,D1)", "x":12, "y":0}, + {"label":"K0D (B0,D2)", "x":13, "y":0}, + {"label":"K1D (B1,D2)", "x":14, "y":0}, + {"label":"K0E (B0,D3)", "x":15, "y":0}, + {"label":"K10 (B1,B5)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,B6)", "x":1.5, "y":1}, + {"label":"K12 (B1,B7)", "x":2.5, "y":1}, + {"label":"K13 (B1,C0)", "x":3.5, "y":1}, + {"label":"K14 (B1,C1)", "x":4.5, "y":1}, + {"label":"K15 (B1,C2)", "x":5.5, "y":1}, + {"label":"K16 (B1,C3)", "x":6.5, "y":1}, + {"label":"K17 (B1,C4)", "x":7.5, "y":1}, + {"label":"K18 (B1,C5)", "x":8.5, "y":1}, + {"label":"K19 (B1,C6)", "x":9.5, "y":1}, + {"label":"K1A (B1,C7)", "x":10.5, "y":1}, + {"label":"K1B (B1,D0)", "x":11.5, "y":1}, + {"label":"K1C (B1,D1)", "x":12.5, "y":1}, + {"label":"K2C (B2,D1)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1E (B1,D3)", "x":15, "y":1}, + {"label":"K20 (B2,B5)", "x":0, "y":2, "w":1.75}, + {"label":"K21 (B2,B6)", "x":1.75, "y":2}, + {"label":"K22 (B2,B7)", "x":2.75, "y":2}, + {"label":"K23 (B2,C0)", "x":3.75, "y":2}, + {"label":"K24 (B2,C1)", "x":4.75, "y":2}, + {"label":"K25 (B2,C2)", "x":5.75, "y":2}, + {"label":"K26 (B2,C3)", "x":6.75, "y":2}, + {"label":"K27 (B2,C4)", "x":7.75, "y":2}, + {"label":"K28 (B2,C5)", "x":8.75, "y":2}, + {"label":"K29 (B2,C6)", "x":9.75, "y":2}, + {"label":"K2A (B2,C7)", "x":10.75, "y":2}, + {"label":"K2B (B2,D0)", "x":11.75, "y":2}, + {"label":"K2D (B2,D2)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2E (B2,D3)", "x":15, "y":2}, + {"label":"K30 (B3,B5)", "x":0, "y":3, "w":1.25}, + {"label":"K31 (B3,B6)", "x":1.25, "y":3}, + {"label":"K32 (B3,B7)", "x":2.25, "y":3}, + {"label":"K33 (B3,C0)", "x":3.25, "y":3}, + {"label":"K34 (B3,C1)", "x":4.25, "y":3}, + {"label":"K35 (B3,C2)", "x":5.25, "y":3}, + {"label":"K36 (B3,C3)", "x":6.25, "y":3}, + {"label":"K37 (B3,C4)", "x":7.25, "y":3}, + {"label":"K38 (B3,C5)", "x":8.25, "y":3}, + {"label":"K39 (B3,C6)", "x":9.25, "y":3}, + {"label":"K3A (B3,C7)", "x":10.25, "y":3}, + {"label":"K3B (B3,D0)", "x":11.25, "y":3}, + {"label":"K3C (B3,D1)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D (B3,D2)", "x":14, "y":3}, + {"label":"K3E (B3,D3)", "x":15, "y":3}, + {"label":"K40 (B4,B5)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (B4,B6)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (B4,B7)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (B4,C3)", "x":3.75, "y":4, "w":6.25}, + {"label":"K4A (B4,C7)", "x":10, "y":4, "w":1.25}, + {"label":"K4B (B4,D0)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4C (B4,D1)", "x":13, "y":4}, + {"label":"K4D (B4,D2)", "x":14, "y":4}, + {"label":"K4E (B4,D3)", "x":15, "y":4} + ] + }, + "LAYOUT_65_ansi_blocker": { + "layout": [ + {"label":"K00 (B0,B5)", "x":0, "y":0}, + {"label":"K01 (B0,B6)", "x":1, "y":0}, + {"label":"K02 (B0,B7)", "x":2, "y":0}, + {"label":"K03 (B0,C0)", "x":3, "y":0}, + {"label":"K04 (B0,C1)", "x":4, "y":0}, + {"label":"K05 (B0,C2)", "x":5, "y":0}, + {"label":"K06 (B0,C3)", "x":6, "y":0}, + {"label":"K07 (B0,C4)", "x":7, "y":0}, + {"label":"K08 (B0,C5)", "x":8, "y":0}, + {"label":"K09 (B0,C6)", "x":9, "y":0}, + {"label":"K0A (B0,C7)", "x":10, "y":0}, + {"label":"K0B (B0,D0)", "x":11, "y":0}, + {"label":"K0C (B0,D1)", "x":12, "y":0}, + {"label":"K0D (B0,D2)", "x":13, "y":0, "w":2}, + {"label":"K0E (B0,D3)", "x":15, "y":0}, + {"label":"K10 (B1,B5)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,B6)", "x":1.5, "y":1}, + {"label":"K12 (B1,B7)", "x":2.5, "y":1}, + {"label":"K13 (B1,C0)", "x":3.5, "y":1}, + {"label":"K14 (B1,C1)", "x":4.5, "y":1}, + {"label":"K15 (B1,C2)", "x":5.5, "y":1}, + {"label":"K16 (B1,C3)", "x":6.5, "y":1}, + {"label":"K17 (B1,C4)", "x":7.5, "y":1}, + {"label":"K18 (B1,C5)", "x":8.5, "y":1}, + {"label":"K19 (B1,C6)", "x":9.5, "y":1}, + {"label":"K1A (B1,C7)", "x":10.5, "y":1}, + {"label":"K1B (B1,D0)", "x":11.5, "y":1}, + {"label":"K1C (B1,D1)", "x":12.5, "y":1}, + {"label":"K2C (B2,D1)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1E (B1,D3)", "x":15, "y":1}, + {"label":"K20 (B2,B5)", "x":0, "y":2, "w":1.75}, + {"label":"K21 (B2,B6)", "x":1.75, "y":2}, + {"label":"K22 (B2,B7)", "x":2.75, "y":2}, + {"label":"K23 (B2,C0)", "x":3.75, "y":2}, + {"label":"K24 (B2,C1)", "x":4.75, "y":2}, + {"label":"K25 (B2,C2)", "x":5.75, "y":2}, + {"label":"K26 (B2,C3)", "x":6.75, "y":2}, + {"label":"K27 (B2,C4)", "x":7.75, "y":2}, + {"label":"K28 (B2,C5)", "x":8.75, "y":2}, + {"label":"K29 (B2,C6)", "x":9.75, "y":2}, + {"label":"K2A (B2,C7)", "x":10.75, "y":2}, + {"label":"K2B (B2,D0)", "x":11.75, "y":2}, + {"label":"K2D (B2,D2)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2E (B2,D3)", "x":15, "y":2}, + {"label":"K30 (B3,B5)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (B3,B7)", "x":2.25, "y":3}, + {"label":"K33 (B3,C0)", "x":3.25, "y":3}, + {"label":"K34 (B3,C1)", "x":4.25, "y":3}, + {"label":"K35 (B3,C2)", "x":5.25, "y":3}, + {"label":"K36 (B3,C3)", "x":6.25, "y":3}, + {"label":"K37 (B3,C4)", "x":7.25, "y":3}, + {"label":"K38 (B3,C5)", "x":8.25, "y":3}, + {"label":"K39 (B3,C6)", "x":9.25, "y":3}, + {"label":"K3A (B3,C7)", "x":10.25, "y":3}, + {"label":"K3B (B3,D0)", "x":11.25, "y":3}, + {"label":"K3C (B3,D1)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D (B3,D2)", "x":14, "y":3}, + {"label":"K3E (B3,D3)", "x":15, "y":3}, + {"label":"K40 (B4,B5)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (B4,B6)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (B4,B7)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (B4,C3)", "x":3.75, "y":4, "w":6.25}, + {"label":"K4A (B4,C7)", "x":10, "y":4, "w":1.25}, + {"label":"K4B (B4,D0)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4C (B4,D1)", "x":13, "y":4}, + {"label":"K4D (B4,D2)", "x":14, "y":4}, + {"label":"K4E (B4,D3)", "x":15, "y":4} + ] + }, + "LAYOUT_65_iso_blocker": { + "layout": [ + {"label":"K00 (B0,B5)", "x":0, "y":0}, + {"label":"K01 (B0,B6)", "x":1, "y":0}, + {"label":"K02 (B0,B7)", "x":2, "y":0}, + {"label":"K03 (B0,C0)", "x":3, "y":0}, + {"label":"K04 (B0,C1)", "x":4, "y":0}, + {"label":"K05 (B0,C2)", "x":5, "y":0}, + {"label":"K06 (B0,C3)", "x":6, "y":0}, + {"label":"K07 (B0,C4)", "x":7, "y":0}, + {"label":"K08 (B0,C5)", "x":8, "y":0}, + {"label":"K09 (B0,C6)", "x":9, "y":0}, + {"label":"K0A (B0,C7)", "x":10, "y":0}, + {"label":"K0B (B0,D0)", "x":11, "y":0}, + {"label":"K0C (B0,D1)", "x":12, "y":0}, + {"label":"K0D (B0,D2)", "x":13, "y":0, "w":2}, + {"label":"K0E (B0,D3)", "x":15, "y":0}, + {"label":"K10 (B1,B5)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,B6)", "x":1.5, "y":1}, + {"label":"K12 (B1,B7)", "x":2.5, "y":1}, + {"label":"K13 (B1,C0)", "x":3.5, "y":1}, + {"label":"K14 (B1,C1)", "x":4.5, "y":1}, + {"label":"K15 (B1,C2)", "x":5.5, "y":1}, + {"label":"K16 (B1,C3)", "x":6.5, "y":1}, + {"label":"K17 (B1,C4)", "x":7.5, "y":1}, + {"label":"K18 (B1,C5)", "x":8.5, "y":1}, + {"label":"K19 (B1,C6)", "x":9.5, "y":1}, + {"label":"K1A (B1,C7)", "x":10.5, "y":1}, + {"label":"K1B (B1,D0)", "x":11.5, "y":1}, + {"label":"K1C (B1,D1)", "x":12.5, "y":1}, + {"label":"K2D (B2,D2)", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"K1E (B1,D3)", "x":15, "y":1}, + {"label":"K20 (B2,B5)", "x":0, "y":2, "w":1.75}, + {"label":"K21 (B2,B6)", "x":1.75, "y":2}, + {"label":"K22 (B2,B7)", "x":2.75, "y":2}, + {"label":"K23 (B2,C0)", "x":3.75, "y":2}, + {"label":"K24 (B2,C1)", "x":4.75, "y":2}, + {"label":"K25 (B2,C2)", "x":5.75, "y":2}, + {"label":"K26 (B2,C3)", "x":6.75, "y":2}, + {"label":"K27 (B2,C4)", "x":7.75, "y":2}, + {"label":"K28 (B2,C5)", "x":8.75, "y":2}, + {"label":"K29 (B2,C6)", "x":9.75, "y":2}, + {"label":"K2A (B2,C7)", "x":10.75, "y":2}, + {"label":"K2B (B2,D0)", "x":11.75, "y":2}, + {"label":"K2C (B2,D1)", "x":12.75, "y":2}, + {"label":"K2E (B2,D3)", "x":15, "y":2}, + {"label":"K30 (B3,B5)", "x":0, "y":3, "w":1.25}, + {"label":"K31 (B3,B6)", "x":1.25, "y":3}, + {"label":"K32 (B3,B7)", "x":2.25, "y":3}, + {"label":"K33 (B3,C0)", "x":3.25, "y":3}, + {"label":"K34 (B3,C1)", "x":4.25, "y":3}, + {"label":"K35 (B3,C2)", "x":5.25, "y":3}, + {"label":"K36 (B3,C3)", "x":6.25, "y":3}, + {"label":"K37 (B3,C4)", "x":7.25, "y":3}, + {"label":"K38 (B3,C5)", "x":8.25, "y":3}, + {"label":"K39 (B3,C6)", "x":9.25, "y":3}, + {"label":"K3A (B3,C7)", "x":10.25, "y":3}, + {"label":"K3B (B3,D0)", "x":11.25, "y":3}, + {"label":"K3C (B3,D1)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D (B3,D2)", "x":14, "y":3}, + {"label":"K3E (B3,D3)", "x":15, "y":3}, + {"label":"K40 (B4,B5)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (B4,B6)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (B4,B7)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (B4,C3)", "x":3.75, "y":4, "w":6.25}, + {"label":"K4A (B4,C7)", "x":10, "y":4, "w":1.25}, + {"label":"K4B (B4,D0)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4C (B4,D1)", "x":13, "y":4}, + {"label":"K4D (B4,D2)", "x":14, "y":4}, + {"label":"K4E (B4,D3)", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/mechlovin/hannah65/rev1/keymaps/default/keymap.c b/keyboards/mechlovin/hannah65/rev1/keymaps/default/keymap.c new file mode 100644 index 0000000000..e4960b54f9 --- /dev/null +++ b/keyboards/mechlovin/hannah65/rev1/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + 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_DEL, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + +}; + diff --git a/keyboards/mechlovin/hannah65/rev1/keymaps/default/readme.md b/keyboards/mechlovin/hannah65/rev1/keymaps/default/readme.md new file mode 100644 index 0000000000..1e8f0ec1fa --- /dev/null +++ b/keyboards/mechlovin/hannah65/rev1/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for hannah65 diff --git a/keyboards/mechlovin/hannah65/rev1/keymaps/via/keymap.c b/keyboards/mechlovin/hannah65/rev1/keymaps/via/keymap.c new file mode 100644 index 0000000000..34a9cf8264 --- /dev/null +++ b/keyboards/mechlovin/hannah65/rev1/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + 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_DEL, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + +}; + diff --git a/keyboards/mechlovin/hannah65/rev1/keymaps/via/rules.mk b/keyboards/mechlovin/hannah65/rev1/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/mechlovin/hannah65/rev1/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/mechlovin/hannah65/rev1/rev1.h b/keyboards/mechlovin/hannah65/rev1/rev1.h new file mode 100644 index 0000000000..0b6b863d56 --- /dev/null +++ b/keyboards/mechlovin/hannah65/rev1/rev1.h @@ -0,0 +1,61 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ +} + +#define LAYOUT_65_ansi_blocker( \ + 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, K2C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ +} + +#define LAYOUT_65_iso_blocker( \ + 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, K2D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO, 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, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ +} diff --git a/keyboards/mechlovin/hannah65/rev1/rules.mk b/keyboards/mechlovin/hannah65/rev1/rules.mk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/keyboards/mechlovin/hannah65/rules.mk b/keyboards/mechlovin/hannah65/rules.mk new file mode 100644 index 0000000000..74157ae715 --- /dev/null +++ b/keyboards/mechlovin/hannah65/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = STM32F303 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +DEFAULT_FOLDER = mechlovin/hannah65/rev1 \ No newline at end of file diff --git a/keyboards/mechmini/v2/config.h b/keyboards/mechmini/v2/config.h index 9da3e5f0ad..f20540b941 100755 --- a/keyboards/mechmini/v2/config.h +++ b/keyboards/mechmini/v2/config.h @@ -18,7 +18,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED +#define VENDOR_ID 0xAF99 #define PRODUCT_ID 0xCA40 #define DEVICE_VER 0x0002 #define MANUFACTURER MECHKEYS diff --git a/keyboards/mechmini/v2/keymaps/via/keymap.c b/keyboards/mechmini/v2/keymaps/via/keymap.c new file mode 100644 index 0000000000..7c7c2103c0 --- /dev/null +++ b/keyboards/mechmini/v2/keymaps/via/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_ortho( + KC_GESC, 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, KC_ENT, + KC_CAPS, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + + [1] = LAYOUT_ortho( + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, M(1), M(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY), + + [2] = LAYOUT_ortho( + KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS, BL_TOGG, BL_STEP, BL_INC, BL_DEC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_HOME, KC_END, KC_TRNS, + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_PGDN, KC_PGUP, KC_MPLY), + + [3] = LAYOUT_ortho( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; diff --git a/keyboards/mechmini/v2/keymaps/via/rules.mk b/keyboards/mechmini/v2/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/mechmini/v2/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/meira/TWIlib.c b/keyboards/meira/TWIlib.c index 8e0c974381..4091429b4e 100755 --- a/keyboards/meira/TWIlib.c +++ b/keyboards/meira/TWIlib.c @@ -11,6 +11,19 @@ #include "util/delay.h" #include "print.h" +// Global transmit buffer +volatile uint8_t *TWITransmitBuffer; +// Global receive buffer +volatile uint8_t TWIReceiveBuffer[RXMAXBUFLEN]; +// Buffer indexes +volatile int TXBuffIndex; // Index of the transmit buffer. Is volatile, can change at any time. +int RXBuffIndex; // Current index in the receive buffer +// Buffer lengths +int TXBuffLen; // The total length of the transmit buffer +int RXBuffLen; // The total number of bytes to read (should be less than RXMAXBUFFLEN) + +TWIInfoStruct TWIInfo; + void TWIInit() { TWIInfo.mode = Ready; diff --git a/keyboards/meira/TWIlib.h b/keyboards/meira/TWIlib.h index 6db3cc9513..8ba261c6e5 100755 --- a/keyboards/meira/TWIlib.h +++ b/keyboards/meira/TWIlib.h @@ -16,16 +16,6 @@ #define TXMAXBUFLEN 20 // Receive buffer length #define RXMAXBUFLEN 20 -// Global transmit buffer -volatile uint8_t *TWITransmitBuffer; -// Global receive buffer -volatile uint8_t TWIReceiveBuffer[RXMAXBUFLEN]; -// Buffer indexes -volatile int TXBuffIndex; // Index of the transmit buffer. Is volatile, can change at any time. -int RXBuffIndex; // Current index in the receive buffer -// Buffer lengths -int TXBuffLen; // The total length of the transmit buffer -int RXBuffLen; // The total number of bytes to read (should be less than RXMAXBUFFLEN) typedef enum { Ready, @@ -42,8 +32,8 @@ typedef enum { uint8_t errorCode; uint8_t repStart; }TWIInfoStruct; -TWIInfoStruct TWIInfo; +extern TWIInfoStruct TWIInfo; // TWI Status Codes #define TWI_START_SENT 0x08 // Start sent diff --git a/keyboards/melgeek/mj61/config.h b/keyboards/melgeek/mj61/config.h new file mode 100644 index 0000000000..452b1c8728 --- /dev/null +++ b/keyboards/melgeek/mj61/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 MelGeek + * + * 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 . + */ + +#pragma once + +#include "config_common.h" diff --git a/keyboards/melgeek/mj61/info.json b/keyboards/melgeek/mj61/info.json new file mode 100644 index 0000000000..460858474c --- /dev/null +++ b/keyboards/melgeek/mj61/info.json @@ -0,0 +1,78 @@ +{ + "keyboard_name": "MJ61", + "url": "", + "maintainer": "melgeek001365", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":2.75}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}, + {"x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/keyboards/melgeek/mj61/keymaps/default/keymap.c b/keyboards/melgeek/mj61/keymaps/default/keymap.c new file mode 100644 index 0000000000..2237851fbe --- /dev/null +++ b/keyboards/melgeek/mj61/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2020 MelGeek + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi( + 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, + 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_SPC, KC_RALT, MO(1), MO(2), KC_RCTL + ), + [1] = LAYOUT_60_ansi( + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + _______, _______, KC_UP, _______, _______, _______, KC_CALC, _______, KC_INS, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, EEP_RST, + KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, NK_TOGG, _______, _______, KC_END, KC_PGDN, KC_MNXT, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + diff --git a/keyboards/melgeek/mj61/keymaps/via/keymap.c b/keyboards/melgeek/mj61/keymaps/via/keymap.c new file mode 100644 index 0000000000..409a37c9b1 --- /dev/null +++ b/keyboards/melgeek/mj61/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2020 MelGeek + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi( + 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, + 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_SPC, KC_RALT, MO(1), MO(2), KC_RCTL + ), + [1] = LAYOUT_60_ansi( + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + _______, _______, KC_UP, _______, _______, _______, KC_CALC, _______, KC_INS, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, EEP_RST, + KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, NK_TOGG, _______, _______, KC_END, KC_PGDN, KC_MNXT, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + diff --git a/keyboards/melgeek/mj61/keymaps/via/rules.mk b/keyboards/melgeek/mj61/keymaps/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/melgeek/mj61/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/melgeek/mj61/mj61.c b/keyboards/melgeek/mj61/mj61.c new file mode 100644 index 0000000000..21853019f0 --- /dev/null +++ b/keyboards/melgeek/mj61/mj61.c @@ -0,0 +1,124 @@ +/* Copyright 2020 MelGeek + * + * 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 "mj61.h" + +#ifdef RGB_MATRIX_ENABLE +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, CS12_SW1, CS11_SW1, CS10_SW1}, /* RGB1 */ + {0, CS12_SW2, CS11_SW2, CS10_SW2}, /* RGB2 */ + {0, CS12_SW3, CS11_SW3, CS10_SW3}, /* RGB3 */ + {0, CS12_SW4, CS11_SW4, CS10_SW4}, /* RGB4 */ + {0, CS12_SW5, CS11_SW5, CS10_SW5}, /* RGB5 */ + {0, CS12_SW6, CS11_SW6, CS10_SW6}, /* RGB6 */ + {0, CS12_SW7, CS11_SW7, CS10_SW7}, /* RGB7 */ + {0, CS12_SW8, CS11_SW8, CS10_SW8}, /* RGB8 */ + {0, CS12_SW9, CS11_SW9, CS10_SW9}, /* RGB9 */ + {0, CS15_SW1, CS14_SW1, CS13_SW1}, /* RGB10 */ + {0, CS15_SW2, CS14_SW2, CS13_SW2}, /* RGB11 */ + {0, CS15_SW3, CS14_SW3, CS13_SW3}, /* RGB12 */ + {0, CS15_SW4, CS14_SW4, CS13_SW4}, /* RGB13 */ + {0, CS15_SW5, CS14_SW5, CS13_SW5}, /* RGB14 */ + {0, CS15_SW6, CS14_SW6, CS13_SW6}, /* RGB15 */ + {0, CS15_SW7, CS14_SW7, CS13_SW7}, /* RGB16 */ + {0, CS15_SW8, CS14_SW8, CS13_SW8}, /* RGB17 */ + {0, CS15_SW9, CS14_SW9, CS13_SW9}, /* RGB18 */ + {0, CS18_SW1, CS17_SW1, CS16_SW1}, /* RGB19 */ + {0, CS18_SW2, CS17_SW2, CS16_SW2}, /* RGB20 */ + {0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB21 */ + {0, CS18_SW4, CS17_SW4, CS16_SW4}, /* RGB22 */ + {0, CS18_SW5, CS17_SW5, CS16_SW5}, /* RGB23 */ + {0, CS18_SW6, CS17_SW6, CS16_SW6}, /* RGB24 */ + {0, CS18_SW7, CS17_SW7, CS16_SW7}, /* RGB25 */ + {0, CS18_SW8, CS17_SW8, CS16_SW8}, /* RGB26 */ + {0, CS18_SW9, CS17_SW9, CS16_SW9}, /* RGB27 */ + {0, CS21_SW1, CS20_SW1, CS19_SW1}, /* RGB28 */ + {0, CS21_SW2, CS20_SW2, CS19_SW2}, /* RGB29 */ + {0, CS21_SW3, CS20_SW3, CS19_SW3}, /* RGB30 */ + {0, CS21_SW4, CS20_SW4, CS19_SW4}, /* RGB31 */ + {0, CS21_SW5, CS20_SW5, CS19_SW5}, /* RGB32 */ + {0, CS21_SW6, CS20_SW6, CS19_SW6}, /* RGB33 */ + {0, CS21_SW7, CS20_SW7, CS19_SW7}, /* RGB34 */ + {0, CS21_SW8, CS20_SW8, CS19_SW8}, /* RGB35 */ + {0, CS21_SW9, CS20_SW9, CS19_SW9}, /* RGB36 */ + {0, CS24_SW1, CS23_SW1, CS22_SW1}, /* RGB37 */ + {0, CS24_SW2, CS23_SW2, CS22_SW2}, /* RGB38 */ + {0, CS24_SW3, CS23_SW3, CS22_SW3}, /* RGB39 */ + {0, CS24_SW4, CS23_SW4, CS22_SW4}, /* RGB40 */ + {0, CS24_SW5, CS23_SW5, CS22_SW5}, /* RGB41 */ + {0, CS24_SW6, CS23_SW6, CS22_SW6}, /* RGB42 */ + {0, CS24_SW7, CS23_SW7, CS22_SW7}, /* RGB43 */ + {0, CS24_SW8, CS23_SW8, CS22_SW8}, /* RGB44 */ + {0, CS24_SW9, CS23_SW9, CS22_SW9}, /* RGB45 */ + {0, CS27_SW1, CS26_SW1, CS25_SW1}, /* RGB46 */ + {0, CS27_SW2, CS26_SW2, CS25_SW2}, /* RGB47 */ + {0, CS27_SW3, CS26_SW3, CS25_SW3}, /* RGB48 */ + {0, CS27_SW4, CS26_SW4, CS25_SW4}, /* RGB49 */ + {0, CS27_SW5, CS26_SW5, CS25_SW5}, /* RGB50 */ + {0, CS27_SW6, CS26_SW6, CS25_SW6}, /* RGB51 */ + {0, CS27_SW7, CS26_SW7, CS25_SW7}, /* RGB52 */ + {0, CS27_SW8, CS26_SW8, CS25_SW8}, /* RGB53 */ + {0, CS27_SW9, CS26_SW9, CS25_SW9}, /* RGB54 */ + {0, CS30_SW1, CS29_SW1, CS28_SW1}, /* RGB55 */ + {0, CS30_SW2, CS29_SW2, CS28_SW2}, /* RGB56 */ + {0, CS30_SW3, CS29_SW3, CS28_SW3}, /* RGB57 */ + {0, CS30_SW4, CS29_SW4, CS28_SW4}, /* RGB58 */ + {0, CS30_SW5, CS29_SW5, CS28_SW5}, /* RGB59 */ + {0, CS30_SW6, CS29_SW6, CS28_SW6}, /* RGB60 */ + {0, CS30_SW7, CS29_SW7, CS28_SW7}, /* RGB61 */ + {0, CS30_SW8, CS29_SW8, CS28_SW8}, /* RGB62 */ + {0, CS30_SW9, CS29_SW9, CS28_SW9}, /* RGB63 */ +}; + +led_config_t g_led_config = { + { + /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 */ + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, /* R0 */ + { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, /* R1 */ + { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, NO_LED,}, /* R2 */ + { 52, NO_LED, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED }, /* R3 */ + { 53, 54, NO_LED, 55, 61, 56, 62, NO_LED, NO_LED, 57, 58, 59, 60, NO_LED }, /* R4 */ + }, { + {0, 0}, {16, 0}, {32, 0}, {48, 0}, {64, 0}, {80, 0}, {96, 0}, {112, 0}, {128, 0}, {144, 0}, {160, 0}, {176, 0}, {192, 0}, {208, 0}, + {0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, + {0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, + {0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, + {0, 64}, {16, 64}, {32, 64}, {48, 64}, {64, 64}, {80, 64}, {96, 64}, {112, 64}, {128, 64}, {144, 64}, + }, { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + } +}; + +void suspend_power_down_kb(void) { + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) { + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} + +void keyboard_pre_init_kb(void) { + setPinOutput(A2); + writePinHigh(A2); + keyboard_pre_init_user(); +} +#endif diff --git a/keyboards/melgeek/mj61/mj61.h b/keyboards/melgeek/mj61/mj61.h new file mode 100644 index 0000000000..1881196dba --- /dev/null +++ b/keyboards/melgeek/mj61/mj61.h @@ -0,0 +1,35 @@ +/* Copyright 2020 MelGeek + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +#define LAYOUT_60_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K43, K45, K49, K4A, K4B, K4D \ +) { \ + { 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, XXX }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, XXX }, \ + { K40, K41, XXX, K43, XXX, K45, XXX, XXX, XXX, K49, K4A, K4B, XXX, K4D } \ +} diff --git a/keyboards/melgeek/mj61/readme.md b/keyboards/melgeek/mj61/readme.md new file mode 100644 index 0000000000..2db0e71b6f --- /dev/null +++ b/keyboards/melgeek/mj61/readme.md @@ -0,0 +1,15 @@ +# MelGeek MJ61 + +![MJ61](https://cdn.shopifycdn.net/s/files/1/0078/2863/5712/products/a0ebad495be43c4c42403878b4af4ac2_1024x1024@2x.jpg?v=1600672895) + +A hotswap 60% RGB Custom Mechanical keyboard. + +* Keyboard Maintainer: [melgeek](https://github.com/melgeek001365) +* Hardware Supported: MJ61 V1.1.2 20200612 +* Hardware Availability: [MelGeek](https://www.melgeek.com/) + +Make example for this keyboard (after setting up your build environment): + + make melgeek/mj61/rev1:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/melgeek/mj61/rev1/config.h b/keyboards/melgeek/mj61/rev1/config.h new file mode 100644 index 0000000000..a0ba953b0e --- /dev/null +++ b/keyboards/melgeek/mj61/rev1/config.h @@ -0,0 +1,70 @@ +/* Copyright 2020 MelGeek + * + * 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 . + */ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xED61 +#define DEVICE_VER 0x0001 +#define MANUFACTURER MelGeek +#define PRODUCT MJ61 + +/* 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 { B12, B11, B10, B1, A3 } +#define MATRIX_COL_PINS { B15, A8, A10, A15, B3, B4, B5, B8, B9, C13, C14, C15, A0, A1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 3 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_LED_PROCESS_LIMIT 4 +#define RGB_MATRIX_LED_FLUSH_LIMIT 26 +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_MULTISPLASH +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL +#define DRIVER_ADDR_1 0b0110000 +#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. +#define DRIVER_COUNT 1 +#define DRIVER_1_LED_TOTAL 63 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/melgeek/mj61/rev1/rules.mk b/keyboards/melgeek/mj61/rev1/rules.mk new file mode 100644 index 0000000000..ba7f9eac25 --- /dev/null +++ b/keyboards/melgeek/mj61/rev1/rules.mk @@ -0,0 +1,20 @@ +# MCU name +MCU = STM32F303 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +RGB_MATRIX_ENABLE = IS31FL3741 # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in diff --git a/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c b/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c index 0e4f99442d..7d66af49bc 100644 --- a/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/a_ansi/keymap.c @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______, _______,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c b/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c index 91d3831628..78a77d0f83 100644 --- a/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/a_iso/keymap.c @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______, _______,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c b/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c index 0b33e2e480..9f435715d5 100644 --- a/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/b_ansi/keymap.c @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c b/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c index 137fa4a507..85217a940b 100644 --- a/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/b_iso/keymap.c @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/default/keymap.c b/keyboards/metamechs/timberwolf/keymaps/default/keymap.c index 4870eaa3f5..85b79f168c 100644 --- a/keyboards/metamechs/timberwolf/keymaps/default/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/default/keymap.c @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c b/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c index 89c1db021d..4a49bdf0ad 100644 --- a/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/prime_ansi/keymap.c @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______ ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ ,_______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c b/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c index 5716cdacc7..1818ea4a3b 100644 --- a/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/prime_iso/keymap.c @@ -33,12 +33,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, MO(1) ,_______,_______,_______ ,_______ ,_______,_______,_______ ,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/keymaps/via/keymap.c b/keyboards/metamechs/timberwolf/keymaps/via/keymap.c index e19d3bbae7..6246ffd2e2 100644 --- a/keyboards/metamechs/timberwolf/keymaps/via/keymap.c +++ b/keyboards/metamechs/timberwolf/keymaps/via/keymap.c @@ -49,12 +49,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,_______ ) -}; - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} \ No newline at end of file +}; \ No newline at end of file diff --git a/keyboards/metamechs/timberwolf/timberwolf.c b/keyboards/metamechs/timberwolf/timberwolf.c index c9a750f45c..af6d42a54e 100644 --- a/keyboards/metamechs/timberwolf/timberwolf.c +++ b/keyboards/metamechs/timberwolf/timberwolf.c @@ -27,3 +27,12 @@ bool led_update_kb(led_t led_state) { } return runDefault; } + +__attribute__((weak)) +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} diff --git a/keyboards/minidox/keymaps/rsthd_combos/keymap.c b/keyboards/minidox/keymaps/rsthd_combos/keymap.c index a3ba423c69..d80febecaf 100644 --- a/keyboards/minidox/keymaps/rsthd_combos/keymap.c +++ b/keyboards/minidox/keymaps/rsthd_combos/keymap.c @@ -45,7 +45,7 @@ combo_t key_combos[COMBO_COUNT] = { [BOT_CTR] = COMBO_ACTION(bx_combo), }; - void process_combo_event(uint8_t combo_index, bool pressed) { + void process_combo_event(uint16_t combo_index, bool pressed) { switch(combo_index) { case MID_R: if (pressed) { diff --git a/keyboards/minimacro5/config.h b/keyboards/minimacro5/config.h new file mode 100644 index 0000000000..b48b5df21e --- /dev/null +++ b/keyboards/minimacro5/config.h @@ -0,0 +1,62 @@ +/* +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCEEB +#define PRODUCT_ID 0x0007 +#define DEVICE_VER 0x0001 +#define MANUFACTURER leafcutterlabs +#define PRODUCT miniMACRO5 + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 5 + +/* + * 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) + * NO_DIODE = switches are directly connected to AVR pins + * +*/ +// #define MATRIX_ROW_PINS { D0, D5 } +// #define MATRIX_COL_PINS { F1, F0, B0 } +#define DIRECT_PINS { \ + { F4, B6, B2, D7, B4 } \ +} +//speed for double tap +#define TAPPING_TERM 200 + +#define UNUSED_PINS + +/* rotary encoder 1,2,3 closest to usb port is 0*/ +#define ENCODERS_PAD_B { D3, F6, F7, D4, C6} +#define ENCODERS_PAD_A { F5, D2, D1, D0, E6} +#define ENCODER_RESOLUTION 2 //default/suggested + +/* ws2812 RGB LED */ +#define RGB_DI_PIN B5 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 5 // Number of LEDs diff --git a/keyboards/minimacro5/info.json b/keyboards/minimacro5/info.json new file mode 100644 index 0000000000..1cc2a2e41c --- /dev/null +++ b/keyboards/minimacro5/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "minimacro5", + "url": "", + "maintainer": "qmk", + "width": 5, + "height": 1, + "layouts": { + "LAYOUT_ortho_1x5": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":5, "y":0}] + } + } +} diff --git a/keyboards/minimacro5/keymaps/default/keymap.c b/keyboards/minimacro5/keymaps/default/keymap.c new file mode 100644 index 0000000000..acd7f32831 --- /dev/null +++ b/keyboards/minimacro5/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +#include QMK_KEYBOARD_H + +enum layers { + _MAIN, +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder*/ + if (clockwise) { + tap_code(KC_1); + } else { + tap_code(KC_2); + } + } else if (index == 1) { /* Second encoder*/ + if (clockwise) { + tap_code(KC_3); + } else { + tap_code(KC_4); + } + } else if (index == 2) { /* Third encoder*/ + if (clockwise) { + tap_code(KC_5); + } else { + tap_code(KC_6); + } + } else if (index == 3) { /* Fourth encoder*/ + if (clockwise) { + tap_code(KC_7); + } else { + tap_code(KC_8); + } + } else if (index == 4) { /* Fifth encoder*/ + if (clockwise) { + tap_code(KC_9); + } else { + tap_code(KC_0); + } + } +} + +// +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //buttion closest to usb is first + [_MAIN] = LAYOUT_ortho_1x5( + KC_A, KC_B, KC_C, KC_D, KC_E + ) +}; diff --git a/keyboards/minimacro5/keymaps/media/keymap.c b/keyboards/minimacro5/keymaps/media/keymap.c new file mode 100644 index 0000000000..f36954b074 --- /dev/null +++ b/keyboards/minimacro5/keymaps/media/keymap.c @@ -0,0 +1,43 @@ +#include QMK_KEYBOARD_H + +#define _MAIN 0 + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder*/ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { /* Second encoder*/ + if (clockwise) { + tap_code(KC_3); + } else { + tap_code(KC_4); + } + } else if (index == 2) { /* Third encoder*/ + if (clockwise) { + tap_code(KC_5); + } else { + tap_code(KC_6); + } + } else if (index == 3) { /* Fourth encoder*/ + if (clockwise) { + tap_code(KC_7); + } else { + tap_code(KC_8); + } + } else if (index == 4) { /* Fifth encoder*/ + if (clockwise) { + tap_code(KC_9); + } else { + tap_code(KC_0); + } + } +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //buttion closest to usb is first + [_MAIN] = LAYOUT_ortho_1x5( + KC_MUTE, KC_MEDIA_PREV_TRACK, KC_MEDIA_NEXT_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_STOP + ) +}; diff --git a/keyboards/minimacro5/minimacro5.c b/keyboards/minimacro5/minimacro5.c new file mode 100644 index 0000000000..7f9c5af1c7 --- /dev/null +++ b/keyboards/minimacro5/minimacro5.c @@ -0,0 +1 @@ +#include "minimacro5.h" diff --git a/keyboards/minimacro5/minimacro5.h b/keyboards/minimacro5/minimacro5.h new file mode 100644 index 0000000000..2d61ed893b --- /dev/null +++ b/keyboards/minimacro5/minimacro5.h @@ -0,0 +1,9 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_1x5( \ + k01, k02, k03, k04, k05\ + ) { \ + { k01, k02, k03, k04, k05 } \ +} diff --git a/keyboards/minimacro5/readme.md b/keyboards/minimacro5/readme.md new file mode 100644 index 0000000000..6266d2ba35 --- /dev/null +++ b/keyboards/minimacro5/readme.md @@ -0,0 +1,15 @@ +# miniMACRO5 + +A 5 key Macropad based on Arduino Pro Micro with support for a combination of rotary encoders and mechanical switches. + +![](https://i.imgur.com/lxA8DSCl.jpg) + +* Keyboard Maintainer: [LeafCutterLabs](https://github.com/LeafCutterLabs) +* Hardware Supported: Pro Micro 5V/16MHz and compatible. +* Hardware availability: PCB Files are available [here](https://github.com/LeafCutterLabs/miniMACRO5), which you can get produced. + +Make example for this keyboard (after setting up your build environment): + + make minimacro5:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/minimacro5/rules.mk b/keyboards/minimacro5/rules.mk new file mode 100644 index 0000000000..dd66c4fbd8 --- /dev/null +++ b/keyboards/minimacro5/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes #enable rotary encoders diff --git a/keyboards/candybar/chconf.h b/keyboards/misterknife/knife66/chconf.h similarity index 100% rename from keyboards/candybar/chconf.h rename to keyboards/misterknife/knife66/chconf.h diff --git a/keyboards/misterknife/knife66/config.h b/keyboards/misterknife/knife66/config.h new file mode 100644 index 0000000000..0dd85dfdfc --- /dev/null +++ b/keyboards/misterknife/knife66/config.h @@ -0,0 +1,55 @@ +/* +Copyright 2015 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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xAC11 +#define PRODUCT_ID 0x4172 +#define DEVICE_VER 0x0001 +#define MANUFACTURER MisterKnife +#define PRODUCT Knife66 + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { B2, B1, B0, A7, A6, A5, A4, B9, B8, B7, B6, B5, B4, B3, A15 } +#define MATRIX_ROW_PINS { B15, A8, A3, A2, A1 } +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN A9 + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_SLEEP +#define RGBLED_NUM 6 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 200 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define WS2812_PWM_DRIVER PWMD1 // default: PWMD1 +#define WS2812_PWM_CHANNEL 2 // default: 2 +#define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 +#define WS2812_DMA_STREAM STM32_DMA1_STREAM5 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_DMA_CHANNEL 5 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. diff --git a/keyboards/misterknife/knife66/halconf.h b/keyboards/misterknife/knife66/halconf.h new file mode 100644 index 0000000000..adb1a90715 --- /dev/null +++ b/keyboards/misterknife/knife66/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the zero-copy API. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#endif + + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/keyboards/misterknife/knife66/info.json b/keyboards/misterknife/knife66/info.json new file mode 100644 index 0000000000..3f61398c63 --- /dev/null +++ b/keyboards/misterknife/knife66/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Knife66", + "url": "", + "maintainer": "qmk", + "width": 16.5, + "height": 5.25, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.5, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15.5, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15.5, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14.25, "y":3.25}, {"x":15.5, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":2.25, "y":4}, {"x":3.25, "y":4, "w":1.25}, {"x":4.5, "y":4, "w":2.25}, {"x":6.75, "y":4, "w":2.75}, {"x":9.5, "y":4, "w":1.25}, {"x":10.75, "y":4}, {"x":11.75, "y":4, "w":1.25}, {"x":13.25, "y":4.25}, {"x":14.25, "y":4.25}, {"x":15.25, "y":4.25}] + } + } +} diff --git a/keyboards/misterknife/knife66/keymaps/default/keymap.c b/keyboards/misterknife/knife66/keymaps/default/keymap.c new file mode 100644 index 0000000000..831efca177 --- /dev/null +++ b/keyboards/misterknife/knife66/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +/* +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 . +*/ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( + 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_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_BSPC, 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_ENT, KC_HOME, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + MO(1), KC_LALT, KC_LGUI, KC_LGUI, LT(1, KC_SPC), KC_LGUI, MO(1), KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT ), + + [_FN] = LAYOUT_all( + 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_DEL, RGB_TOG, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, RGB_MOD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_TRNS, KC_TRNS, KC_INS, RGB_SPI, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, RGB_SPD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_TRNS ), +}; diff --git a/keyboards/misterknife/knife66/knife66.c b/keyboards/misterknife/knife66/knife66.c new file mode 100644 index 0000000000..0e261b3a81 --- /dev/null +++ b/keyboards/misterknife/knife66/knife66.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Thierry Kleist + * + * 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 "knife66.h" diff --git a/keyboards/misterknife/knife66/knife66.h b/keyboards/misterknife/knife66/knife66.h new file mode 100644 index 0000000000..8868aa3aef --- /dev/null +++ b/keyboards/misterknife/knife66/knife66.h @@ -0,0 +1,35 @@ +/* Copyright 2020 Thierry Kleist + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define ____ KC_NO + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K114, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K214, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K314, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K414, \ + K400, K401, K402, K404, K405, K407, K408, K409, K410, K412, K413 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, ____, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, K314 }, \ + { K400, K401, K402, ____, K404, K405, ____, K407, K408, K409, K410, ____, K412, K413, K414 } \ +} diff --git a/keyboards/misterknife/knife66/mcuconf.h b/keyboards/misterknife/knife66/mcuconf.h new file mode 100644 index 0000000000..00292cab1f --- /dev/null +++ b/keyboards/misterknife/knife66/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 TRUE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/misterknife/knife66/readme.md b/keyboards/misterknife/knife66/readme.md new file mode 100644 index 0000000000..3ced6adafd --- /dev/null +++ b/keyboards/misterknife/knife66/readme.md @@ -0,0 +1,18 @@ +# Knife66 + +![Knife66](https://i.imgur.com/p7G2g81l.png) + +This is a replacement board for the CA66 keyboard + +* Keyboard Maintainer: [afewyards](https://github.com/afewyards) +* Hardware Availability: [Geekhack](https://geekhack.org/index.php?topic=107331.0) + +Make example for this keyboard (after setting up your build environment): + + make misterknife/knife66:default + +Flashing example for this keyboard: + + make misterknife/knife66:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/misterknife/knife66/rules.mk b/keyboards/misterknife/knife66/rules.mk new file mode 100644 index 0000000000..540a423f2e --- /dev/null +++ b/keyboards/misterknife/knife66/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = STM32F072 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE +WS2812_DRIVER = pwm diff --git a/keyboards/miuni32/keymaps/cassdelacruzmunoz/config.h b/keyboards/miuni32/keymaps/cassdelacruzmunoz/config.h new file mode 100644 index 0000000000..1e64b6353f --- /dev/null +++ b/keyboards/miuni32/keymaps/cassdelacruzmunoz/config.h @@ -0,0 +1,23 @@ +/* Copyright 2020 Cassandra de la Cruz-Munoz cassandra.delacruzmunoz@gmaill.com @cassdelacruzmunoz +* +* 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 +*/ + +#pragma once + +// place overrides here +#define RGBLIGHT_ANIMATIONS_OFF +#define RGBLIGHT_LAYERS +#define RGBLIGHT_SLEEP +#define MIDI_ADVANCED diff --git a/keyboards/miuni32/keymaps/cassdelacruzmunoz/keymap.c b/keyboards/miuni32/keymaps/cassdelacruzmunoz/keymap.c new file mode 100644 index 0000000000..d7979bc464 --- /dev/null +++ b/keyboards/miuni32/keymaps/cassdelacruzmunoz/keymap.c @@ -0,0 +1,173 @@ +/* Copyright 2020 Cassandra de la Cruz-Munoz cassandra.delacruzmunoz@gmaill.com @cassdelacruzmunoz +* +* 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Level 0: Default Layer + * ,---------------------------------------------------------------------------------------. + * | Q | W | E | R | T | Y | U | I | O | P | BSP | + * |---------------------------------------------------------------------------------------| + * | A | S | D | F | G | H | J | K | L | ENT |LT(1|,)| + * |---------------------------------------------------------------------------------------| + * | Z | X | C | V | SPC | B | N | M | RSFT | . | + * |---------------------------------------------------------------------------------------| + */ + [0] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, LT(1, KC_COMMA), + KC_Z, KC_X, KC_C, KC_V, KC_SPC, KC_B, KC_N, KC_M, KC_RSFT, KC_DOT + ), + /* Level 1: Layers Layer + * ,---------------------------------------------------------------------------------------. + * | TO(2) | TO(3) | TO(4) | TO(5) | TO(6) | TO(7) | TO(8) | TO(9) | TO(10)| TO(11)| TO(12)| + * |---------------------------------------------------------------------------------------| + * | TO(13)| TO(14)| TO(15)| TO(16)| TO(17)| TO(18)| TO(19)| TO(20)| TO(21)| TO(22)| TRNS | + * |---------------------------------------------------------------------------------------| + * | TO(23)| TO(24)| TO(25)| TO(26)| | TO(27)| TO(28)| TO(29)| TO(30)| TO(31)| + * |---------------------------------------------------------------------------------------| + */ + [1] = LAYOUT( + TO(2), TO(3), TO(4), TO(5), TO(6),//TO(7), TO(8), TO(9), TO(10), TO(11), TO(12), + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + //TO(13), TO(14), TO(15), TO(16), TO(17), TO(18), TO(19), TO(20), TO(21), TO(22), _______, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, _______, + //TO(23), TO(24), TO(25), TO(26), KC_NO, TO(27), TO(28), TO(29), TO(30), TO(31) + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + /* Level 2: Numbers Layer + * ,---------------------------------------------------------------------------------------. + * | ESC | 7 | 8 | 9 | / | * | . | , | ( | ) | DEL | + * |---------------------------------------------------------------------------------------| + * | TAB | 4 | 5 | 6 | - | + | HOME | UP | END | PGUP | TG(2) | + * |---------------------------------------------------------------------------------------| + * | LALT | 1 | 2 | 3 | 0 | LEFT | DOWN | RGHT | PGDN | RSHFT | + * |---------------------------------------------------------------------------------------| + */ + [2] = LAYOUT( + KC_ESC, KC_7, KC_8, KC_9, KC_SLSH, KC_ASTR, KC_DOT, KC_COMM, KC_LPRN, KC_RPRN, KC_DEL, + KC_TAB, KC_4, KC_5, KC_6, KC_MINS, KC_PLUS, KC_HOME, KC_UP, KC_END, KC_PGUP, TG(2), + KC_LALT, KC_1, KC_2, KC_3, KC_0, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_RSFT + ), + /* Level 3: Symbols Layer + * ,---------------------------------------------------------------------------------------. + * | ! | @ | # | $ | % | ^ | & | * | - | + | = | + * |---------------------------------------------------------------------------------------| + * | { | } | [ | ] | ' | | \ | ; | : | ` | TG(3) | + * |---------------------------------------------------------------------------------------| + * | LSFT | LCTL | | | TAB | | | | RCTL | ? | + * |---------------------------------------------------------------------------------------| + */ + [3] = LAYOUT( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_PLUS, KC_EQL, + KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_QUOT, KC_NO, KC_BSLS, KC_SCLN, KC_COLN, KC_GRV, TG(3), + KC_LSFT, KC_LCTL, KC_NO, KC_NO, KC_TAB, KC_NO, KC_NO, KC_NO, KC_RCTL, KC_QUES + ), + /* Level 4: F-keys and Media Layer + * ,---------------------------------------------------------------------------------------. + * | RESET | MUTE | VOLU | MPLY | TRNS | F1 | F2 | F3 | F4 | F5 | F6 | + * |---------------------------------------------------------------------------------------| + * | LGUI | MPRV | VOLD | MNXT | TRNS | TRNS | TRNS | TRNS | TRNS | TRNS | TG(4) | + * |---------------------------------------------------------------------------------------| + * | TRNS | TRNS | TRNS | TRNS | F7 | F8 | F9 | F10 | F11 | F12 | + * |---------------------------------------------------------------------------------------| + */ + [4] = LAYOUT( + RESET, KC_MUTE, KC_VOLU, KC_MPLY, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_LGUI, KC_MPRV, KC_VOLD, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TG(4), + KC_NO, KC_NO, KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 + ), + /* Level 5: Commands Layer + * ,---------------------------------------------------------------------------------------. + * | CUT | PSCR | BRIU | PWR | | | | | | | | + * |---------------------------------------------------------------------------------------| + * | COPY | FIND | BRID | SLEP | | | | | | | TG(5) | + * |---------------------------------------------------------------------------------------| + * | PSTE | | | WAKE | | | | | | | + * |---------------------------------------------------------------------------------------| + */ + [5] = LAYOUT( + KC_CUT, KC_PSCR, KC_BRIU, KC_PWR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_COPY, KC_FIND, KC_BRID, KC_SLEP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TG(5), + KC_PSTE, KC_NO, KC_NO, KC_WAKE, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + /* Level 6: MIDI Layer + * ,---------------------------------------------------------------------------------------. + * | C1 | E1 | G1 | B1 | D2 | F2 | A2 | C3 | E3 | G3 | | + * |---------------------------------------------------------------------------------------| + * | D1 | F1 | A1 | C2 | E2 | G2 | B2 | D3 | F3 | A3 | TG(6) | + * |---------------------------------------------------------------------------------------| + * | OCTD | OCTU | TRNSD | TRNSU | | | | | | | + * |---------------------------------------------------------------------------------------| + */ + [6] = LAYOUT( + MI_C_1, MI_E_1, MI_G_1, MI_B_1, MI_D_2, MI_F_2, MI_A_2, MI_C_3, MI_E_3, MI_G_3, KC_NO, + MI_D_1, MI_F_1, MI_A_1, MI_C_2, MI_E_2, MI_G_2, MI_B_2, MI_D_3, MI_F_3, MI_A_3, TG(6), + MI_OCTD, MI_OCTU, MI_TRNSD, MI_TRNSU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ) +}; + +// Light LEDs 0 through 16 in white when keyboard layer 0 is active +const rgblight_segment_t PROGMEM my_layer0_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 17, HSV_WHITE} +); +// Light LEDs 0 through 16 in blue when keyboard layer 1 is active +const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 17, HSV_BLUE} +); +// Light LEDs 0 through 16 in green when keyboard layer 2 is active +const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 17, HSV_GREEN} +); +// Light LEDs 0 through 16 in yellow when keyboard layer 3 is active +const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 17, HSV_YELLOW} +); +// Light LEDs 0 through 16 in red when keyboard layer 4 is active +const rgblight_segment_t PROGMEM my_layer4_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 17, HSV_RED} +); +// Light LEDs 0 through 16 in cyan when keyboard layer 5 is active +const rgblight_segment_t PROGMEM my_layer5_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 17, HSV_CYAN} +); +// Light LEDs 0 through 16 in orange when keyboard layer 6 is active +const rgblight_segment_t PROGMEM my_layer6_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 17, HSV_ORANGE} +); + +// Now define the array of layers. Later layers take precedence +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + my_layer0_layer, + my_layer1_layer, + my_layer2_layer, + my_layer3_layer, + my_layer4_layer, + my_layer5_layer, + my_layer6_layer +); + +void keyboard_post_init_user(void) { + // Enable the LED layers + rgblight_layers = my_rgb_layers; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + for (int i = 0; i < 7; i++) { + rgblight_set_layer_state(i, layer_state_cmp(state, i)); + } + return state; +} diff --git a/keyboards/miuni32/keymaps/cassdelacruzmunoz/readme.md b/keyboards/miuni32/keymaps/cassdelacruzmunoz/readme.md new file mode 100644 index 0000000000..b9e42964cf --- /dev/null +++ b/keyboards/miuni32/keymaps/cassdelacruzmunoz/readme.md @@ -0,0 +1,19 @@ +# Cass de la Cruz-Munoz's keymap for Miuni32 + +7 layers: + +* QUERTY +* Layer access +* Numberpad, navigation keys +* Symbols +* Function and media keys +* Assorted command keys +* MIDI keys + +![QUERTY](https://imgur.com/0B3Xl2D.png) +![Layers](https://imgur.com/Rb9KRgL.png) +![Numberpad & Navigation](https://imgur.com/psq5U5o.png) +![Symbols](https://imgur.com/nbxOjCG.png) +![Function & Media](https://imgur.com/AZe6Vib.png) +![Commands](https://imgur.com/Pl0NYbw.png) +![MIDI](https://imgur.com/c6BcDe2.png) diff --git a/keyboards/mschwingen/modelm/README.md b/keyboards/mschwingen/modelm/README.md new file mode 100644 index 0000000000..f4cb360625 --- /dev/null +++ b/keyboards/mschwingen/modelm/README.md @@ -0,0 +1,25 @@ +# atmega32U4 board for IBM Model M + +![modelm](https://raw.githubusercontent.com/mschwingen/hardware/master/modelm-usb/images/PCB.jpg) + +This is a configuration of QMK intended to be used with the [Model M USB PCB](https://github.com/mschwingen/hardware/tree/master/modelm-usb). + +* Keyboard Maintainer: [Michael Schwingen](https://github.com/mschwingen/) +* Hardware Supported: [Model M USB PCB](https://github.com/mschwingen/hardware/tree/master/modelm-usb) +* Hardware Availability: need to build your own. + +Make example for this keyboard (after setting up your build environment), run one of: + + make mschwingen/modelm/led_wired:default + make mschwingen/modelm/led_ffc:default + make mschwingen/modelm/led_ws2812:default + +flash: + + make mschwingen/modelm/led_wired:default:flash + make mschwingen/modelm/led_ffc:default:flash + make mschwingen/modelm/led_ws2812:default:flash + +Bootloader: do not use the QMK bootloader, use the bootloader from [here](https://github.com/mschwingen/modelm-lufa-bootloader) + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mschwingen/modelm/config.h b/keyboards/mschwingen/modelm/config.h new file mode 100644 index 0000000000..07881cd211 --- /dev/null +++ b/keyboards/mschwingen/modelm/config.h @@ -0,0 +1,91 @@ +/* + * Copyright 2020 Michael Schwingen + + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x558E +#define DEVICE_VER 0x0001 +#define MANUFACTURER mschwingen +#define PRODUCT IBM Model M 101/102 + +/* key matrix size */ +#define MATRIX_ROWS 16 +#define MATRIX_COLS 8 + +/* pins for external shift registers */ +#define SR_LOAD_PIN B0 +#define SR_CLK_PIN B1 +#define SR_DIN_PIN B3 +#define SR_DOUT_PIN B2 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed (5 is default) */ +#define DEBOUNCE 5 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT +#define NORMAL_PRINT +//#define USER_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 +#define DYNAMIC_MACRO_NO_NESTING + +#define QMK_LED E6 + +#define MODELM_LED1 B5 +#define MODELM_LED2 B6 +#define MODELM_LED3 D0 + +#if defined(KEYBOARD_mschwingen_modelm_led_wired) +# define MODELM_LED_CAPSLOCK MODELM_LED1 +# define MODELM_LED_SCROLLOCK MODELM_LED2 +# define MODELM_LED_NUMLOCK MODELM_LED3 +#elif defined(KEYBOARD_mschwingen_modelm_led_ffc) +# define MODELM_LED_CAPSLOCK MODELM_LED2 +# define MODELM_LED_SCROLLOCK MODELM_LED3 +# define MODELM_LED_NUMLOCK MODELM_LED1 +#elif defined(KEYBOARD_mschwingen_modelm_led_ws2812) +#else +# error one of MODELM_LEDS_FFC, MODELM_LEDS_WIRED or MODELM_LEDS_WS2812 must be set! +#endif + +// 3* WS2812 LEDs instead of singlecolor GPIO LEDs +#define RGB_DI_PIN B6 +#define RGBLED_NUM 3 + +// disabled, needs PCB patch. +//#define C6_AUDIO +//#define NO_MUSIC_MODE diff --git a/keyboards/mschwingen/modelm/keymaps/default/keymap.c b/keyboards/mschwingen/modelm/keymaps/default/keymap.c new file mode 100644 index 0000000000..7f43746db9 --- /dev/null +++ b/keyboards/mschwingen/modelm/keymaps/default/keymap.c @@ -0,0 +1,86 @@ +/* Copyright 2019 ashpil + * + * 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 QMK_KEYBOARD_H + +enum layers { + _BL0, + _BL1, + _FL, + _MS +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL0] = LAYOUT( /* Base layer - Windows key instead of CapsLock, hold ESC for special functions */ + LT(_FL,KC_ESC), KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10, KC_F11 , KC_F12 , KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV , KC_1, KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_INS , KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB , KC_Q, KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , KC_END , KC_PGDN, KC_P7, KC_P8 , KC_P9 , KC_PPLS, + KC_LWIN, 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_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_P1, KC_P2 , KC_P3 , KC_PENT, + KC_LCTL, KC_LALT, KC_SPC , KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + + [_BL1] = LAYOUT( /* Base layer - standard layout without any special functions */ + KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC, KC_INS , KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , KC_END , KC_PGDN, KC_P7, KC_P8 , KC_P9 , KC_PPLS, + 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_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_P1, KC_P2 , KC_P3 , KC_PENT, + KC_LCTL, KC_LALT, KC_SPC , KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + + [_FL] = LAYOUT( /* special functions layer */ + // F1: dyn. macro 1 play + // F2: dyn. macro 2 play + // F3: dyn. macro 1 record + // F4: dyn. macro 2 record + // F5: dyn. macro record stop + // Capslock: CapsLock (really!) + // ~: Key Lock + // Cursor: Media Pref / Next / Volume Up / Volume Down + // Space: Media Play / Pause + // m: enter mouse layer + _______, DM_PLY1, DM_PLY2, DM_REC1, DM_REC2, DM_RSTP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LOCK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, TG(_MS), _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______, + _______, _______, KC_MPLY, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______ + ), + + [_MS] = LAYOUT( /* mouse key layer */ + // Cursor: mouse, INS/HOME/PgUp: Mouse Accel, Del, End, PageDn: mouse buttons + TG(_MS), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_U, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______ + ) +}; + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + //debug_enable=true; + //debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // If console is enabled, it will print the matrix position and status of each key pressed + dprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); + return true; +} diff --git a/keyboards/mschwingen/modelm/led_ffc/rules.mk b/keyboards/mschwingen/modelm/led_ffc/rules.mk new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/keyboards/mschwingen/modelm/led_ffc/rules.mk @@ -0,0 +1 @@ + diff --git a/keyboards/mschwingen/modelm/led_wired/rules.mk b/keyboards/mschwingen/modelm/led_wired/rules.mk new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/keyboards/mschwingen/modelm/led_wired/rules.mk @@ -0,0 +1 @@ + diff --git a/keyboards/mschwingen/modelm/led_ws2812/rules.mk b/keyboards/mschwingen/modelm/led_ws2812/rules.mk new file mode 100644 index 0000000000..424388fd8f --- /dev/null +++ b/keyboards/mschwingen/modelm/led_ws2812/rules.mk @@ -0,0 +1,2 @@ +# variant for WS2812 LEDs +SRC += ws2812.c diff --git a/keyboards/mschwingen/modelm/matrix.c b/keyboards/mschwingen/modelm/matrix.c new file mode 100644 index 0000000000..ef725a61eb --- /dev/null +++ b/keyboards/mschwingen/modelm/matrix.c @@ -0,0 +1,117 @@ +/* + * Copyright 2020 Michael Schwingen + + * 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 +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" +#include "spi_master.h" +#include "print.h" +#include "modelm.h" + +#define DEBUG 0 + +#define SPI_TIMEOUT 100 + +/* Keyboard Matrix Assignments */ +static uint16_t row_bits[MATRIX_ROWS] = { + 0x4000, 0x8000, 0x2000, 0x1000, 0x0800, 0x0400, 0x0100, 0x0200, + 0x0040, 0x0080, 0x0020, 0x0010, 0x0008, 0x0004, 0x0001, 0x0002}; + +static const pin_t col_pins[MATRIX_COLS] = {D1, D4, D7, B4, F7, F6, F5, F4}; + +static void select_col(uint8_t col) { + setPinOutput(col_pins[col]); + writePinLow(col_pins[col]); +} + +static void unselect_col(uint8_t col) { setPinInputHigh(col_pins[col]); } + +static void unselect_cols(void) { + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { + uint16_t row_data; + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + matrix_io_delay(); + + writePinLow(SR_LOAD_PIN); + writePinHigh(SR_LOAD_PIN); + + row_data = spi_read() << 8; + row_data |= spi_read(); + +#if DEBUG + phex(~row_data); + uprint(" "); +#endif + // For each row... + for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row_index]; + matrix_row_t current_row_value = last_row_value; + + // Check row pin state + if ((row_data & row_bits[row_index]) == 0) { + // Pin LO, set col bit + current_row_value |= (MATRIX_ROW_SHIFTER << current_col); + } else { + // Pin HI, clear col bit + current_row_value &= ~(MATRIX_ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_row_value)) { + matrix_changed = true; + current_matrix[row_index] = current_row_value; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +void matrix_init_custom(void) { + unselect_cols(); + + // set 4MHz SPI clock + SPSR = 0; + SPCR = _BV(SPE) | _BV(MSTR) | _BV(CPOL); +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool changed = false; + +#if DEBUG + uprint("\r\nScan: "); +#endif + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { + changed |= read_rows_on_col(current_matrix, current_col); + } + update_layer_leds(); + return changed; +} diff --git a/keyboards/mschwingen/modelm/modelm.c b/keyboards/mschwingen/modelm/modelm.c new file mode 100644 index 0000000000..5756a95170 --- /dev/null +++ b/keyboards/mschwingen/modelm/modelm.c @@ -0,0 +1,214 @@ +/* + * Copyright 2020 Michael Schwingen + + * 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 "modelm.h" +#include "uart.h" +#include "print.h" +#include "sendchar.h" +#include "ws2812.h" +#include "modelm.h" +#include "sleep_led.h" + +#ifdef UART_DEBUG +# undef sendchar +static int8_t capture_sendchar(uint8_t c) { + // sendchar(c); + uart_putchar(c); + return 0; +} +#endif + +static uint16_t blink_cycle_timer; +static bool blink_state = false; +static uint8_t isRecording = 0; + +#ifdef KEYBOARD_mschwingen_modelm_led_ws2812 +# if RGBLED_NUM < 3 +# error we need at least 3 RGB LEDs! +# endif +static cRGB led[RGBLED_NUM] = {{255, 255, 255}, {255, 255, 255}, {255, 255, 255}}; + +# define BRIGHT 32 +# define DIM 6 + +static const cRGB black = {.r = 0, .g = 0, .b = 0}; + +static const cRGB green = {.r = 0, .g = BRIGHT, .b = 0}; +static const cRGB lgreen = {.r = 0, .g = DIM, .b = 0}; + +static const cRGB red = {.r = BRIGHT, .g = 0, .b = 0}; +static const cRGB lred = {.r = DIM, .g = 0, .b = 0}; + +static const cRGB blue = {.r = 0, .g = 0, .b = BRIGHT}; +static const cRGB lblue = {.r = 0, .g = 0, .b = DIM}; + +static const cRGB turq = {.r = 0, .g = BRIGHT, .b = BRIGHT}; +static const cRGB lturq = {.r = 0, .g = DIM, .b = DIM}; + +static const cRGB white = {.r = BRIGHT, .g = BRIGHT, .b = BRIGHT}; + +static led_t led_state; +static uint8_t layer; +static uint8_t default_layer; +#endif + +// we need our own sleep_led_* implementation to get callbacks on USB +// suspend/resume in order to completely turn off WS2812 LEDs +static bool suspend_active = false; +void sleep_led_init(void) {} + +void sleep_led_toggle(void) {} + +void sleep_led_disable(void) { + suspend_active = false; + writePinHigh(QMK_LED); +} + +void sleep_led_enable(void) { + suspend_active = true; + writePinLow(QMK_LED); +#ifdef KEYBOARD_mschwingen_modelm_led_ws2812 + led[0] = black; + led[1] = black; + led[2] = black; + ws2812_setleds(led, RGBLED_NUM); +#endif +} + +void keyboard_pre_init_kb(void) { +#ifdef KEYBOARD_mschwingen_modelm_led_ws2812 + ws2812_setleds(led, RGBLED_NUM); +#else + /* Set status LEDs pins to output and Low (on) */ + setPinOutput(MODELM_LED_CAPSLOCK); + setPinOutput(MODELM_LED_SCROLLOCK); + setPinOutput(MODELM_LED_NUMLOCK); + writePinLow(MODELM_LED_CAPSLOCK); + writePinLow(MODELM_LED_SCROLLOCK); + writePinLow(MODELM_LED_NUMLOCK); +#endif + setPinOutput(QMK_LED); + writePinHigh(QMK_LED); + _delay_ms(50); +#ifdef UART_DEBUG + uart_init(115200); + print_set_sendchar(capture_sendchar); + uprintf("\r\nHello world!\r\n"); +#endif + + setPinOutput(SR_LOAD_PIN); + setPinOutput(SR_CLK_PIN); + setPinOutput(SR_DOUT_PIN); // MOSI - unused + writePinLow(SR_CLK_PIN); +} + +#ifdef KEYBOARD_mschwingen_modelm_led_ws2812 +static void led_update_rgb(void) { + if (isRecording && blink_state) { + led[0] = white; + } else { + switch (default_layer) { + case 0: + led[0] = led_state.num_lock ? blue : lblue; + break; + case 1: + led[0] = led_state.num_lock ? green : black; + break; + } + } + + led[1] = led_state.caps_lock ? green : black; + + switch (layer) { + case 0: + case 1: + default: + led[2] = led_state.scroll_lock ? green : black; + break; + case 2: + led[2] = led_state.scroll_lock ? red : lred; + break; + case 3: + led[2] = led_state.scroll_lock ? turq : lturq; + break; + } + if (!suspend_active) { + ws2812_setleds(led, RGBLED_NUM); + } +} + +bool led_update_kb(led_t state) { + dprintf("LED Update: %d %d %d", led_state.num_lock, led_state.caps_lock, led_state.scroll_lock); + led_state = state; + led_update_rgb(); + + return true; +} + +void update_layer_leds(void) { + static uint8_t old_layer = 255; + static uint8_t old_default_layer = 255; + + layer = biton32(layer_state); + default_layer = biton32(default_layer_state); + + if (isRecording && timer_elapsed(blink_cycle_timer) > 150) { + blink_state = !blink_state; + blink_cycle_timer = timer_read(); + old_layer = 255; // fallthrough next check + } + + if (layer == old_layer && default_layer == old_default_layer) { + return; + } + old_layer = layer; + old_default_layer = default_layer; + dprintf("Layer change: %d %d", default_layer, layer); + led_update_rgb(); +} + +/*****************************************************************************/ +#else // classic LEDs on GPIO +bool led_update_kb(led_t led_state) { + dprintf("LED Update: %d %d %d", led_state.num_lock, led_state.caps_lock, led_state.scroll_lock); + + if (led_update_user(led_state)) { + if (!isRecording) writePin(MODELM_LED_NUMLOCK, !led_state.num_lock); + writePin(MODELM_LED_CAPSLOCK, !led_state.caps_lock); + writePin(MODELM_LED_SCROLLOCK, !led_state.scroll_lock); + } + return true; +} + +void update_layer_leds(void) { + if (isRecording && timer_elapsed(blink_cycle_timer) > 150) { + blink_state = !blink_state; + blink_cycle_timer = timer_read(); + writePin(MODELM_LED_NUMLOCK, blink_state); + } +} + +#endif + +void dynamic_macro_record_start_user(void) { + isRecording++; + blink_cycle_timer = timer_read(); +} + +void dynamic_macro_record_end_user(int8_t direction) { + if (isRecording) isRecording--; +} diff --git a/keyboards/mschwingen/modelm/modelm.h b/keyboards/mschwingen/modelm/modelm.h new file mode 100644 index 0000000000..04b6b61125 --- /dev/null +++ b/keyboards/mschwingen/modelm/modelm.h @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Michael Schwingen + + * 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 . + */ + +#pragma once + +extern void update_layer_leds(void); + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * The first section contains "names" for physical keys of the keyboard + * and defines their position on the board. + * The second section defines position of the keys on the switch matrix + * (where COLUMNS and ROWS crosses). */ + +/* universla layout for both 101 and 102-key versions */ +#define LAYOUT( \ + K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, \ + \ + K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P, K4Q, K4R, K4S, K4T, K4U, \ + K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3O, K3P, K3Q, K3R, K3S, K3T, K3U, \ + K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, K2O, K2P, K2Q, \ + K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1N, K1O, K1P, K1Q, K1R, \ + K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I, K0J \ +) \ + {/* COL0 ............ COL7 */ \ + { K0D , KC_NO, KC_NO, K5O , K5N , KC_NO, KC_NO, K0B }, /* ROW0 */ \ + { K0F , K5P , K1R , K3U , K3P , K4P , KC_NO, K1N }, \ + { K4U , K4T , K1Q , K3T , K3Q , K4Q , K2Q , K0J }, \ + { K0H , K4S , K1P , K3S , K5M , K4O , K2P , K0I }, \ + { K0G , K4R , K1O , K3R , K5L , K3O , K2O , KC_NO }, \ + { K1L , K2M , K2K , K3K , K4K , K4L , K3L , K2L }, \ + { KC_NO, K1K , K2J , K3J , K4J , K5I , K5H , KC_NO }, \ + { KC_NO, K1J , K2I , K3I , K4I , K4M , K3M , K5G }, \ + { K1H , K1I , K2H , K3H , K4H , K4G , K3G , K2G }, \ + { K0C , K2N , K3N , KC_NO, K5K , K5J , K4N , K5F }, \ + { K1G , K1F , K2E , K3E , K4E , K4F , K3F , K2F }, \ + { KC_NO, K1E , K2D , K3D , K4D , K5C , K5D , K5E }, \ + { KC_NO, K1D , K2C , K3C , K4C , K5B , K2A , K1B }, \ + { KC_NO, K1C , K2B , K3B , K4B , K4A , K3A , K5A }, \ + { KC_NO, K1M , KC_NO, KC_NO, KC_NO, KC_NO, K1A , KC_NO }, \ + { KC_NO, K0E , KC_NO, KC_NO, KC_NO, K0A , KC_NO, KC_NO }, /* ROW15 */ \ +} + diff --git a/keyboards/mschwingen/modelm/rules.mk b/keyboards/mschwingen/modelm/rules.mk new file mode 100644 index 0000000000..f3af26eeeb --- /dev/null +++ b/keyboards/mschwingen/modelm/rules.mk @@ -0,0 +1,43 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = lufa-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +CUSTOM_MATRIX = lite +KEY_LOCK_ENABLE = yes + +DYNAMIC_MACRO_ENABLE = yes + +UART_DEBUG = no + +SRC += matrix.c +QUANTUM_LIB_SRC += $(COMMON_DIR)/uart.c \ + spi_master.c + +OPT_DEFS += -DSLEEP_LED_ENABLE # we need our own sleep callbacks to turn of WS2812 LEDs + +LTO_ENABLE = yes + +ifeq ($(strip $(UART_DEBUG)), yes) + OPT_DEFS += -DUART_DEBUG +endif + +DEFAULT_FOLDER = mschwingen/modelm/led_wired diff --git a/keyboards/mxss/rgblight.c b/keyboards/mxss/rgblight.c index ec4d70e17c..130945857f 100644 --- a/keyboards/mxss/rgblight.c +++ b/keyboards/mxss/rgblight.c @@ -110,9 +110,9 @@ extern LED_TYPE fleds[2]; hs_set fled_hs[2]; void copyrgb(LED_TYPE *src, LED_TYPE *dst) { - (*dst).r = (*src).r; - (*dst).g = (*src).g; - (*dst).b = (*src).b; + dst->r = src->r; + dst->g = src->g; + dst->b = src->b; } void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds) { @@ -145,11 +145,11 @@ void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { sethsv_raw(hue, sat, val > RGBLIGHT_LIMIT_VAL ? RGBLIGHT_LIMIT_VAL : val, led1); } void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) { - (*led1).r = r; - (*led1).g = g; - (*led1).b = b; + led1->r = r; + led1->g = g; + led1->b = b; #ifdef RGBW - (*led1).w = 0; + led1->w = 0; #endif } diff --git a/keyboards/mysticworks/wyvern/config.h b/keyboards/mysticworks/wyvern/config.h new file mode 100644 index 0000000000..82b4939fcf --- /dev/null +++ b/keyboards/mysticworks/wyvern/config.h @@ -0,0 +1,46 @@ +/* Copyright 2020 Albert Dong + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device Descriptor Parameter */ +#define VENDOR_ID 0x4D59 // "MY" - Mystic Works +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Mystic Works +#define PRODUCT Wyvern + +/* Key Matrix Size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 10 + +/* Keyboard Matrix Assignments */ +#define MATRIX_ROW_PINS {D0,D1,D5,D3,F7,F6,F5,F4,F1,F0} +#define MATRIX_COL_PINS {E6,B0,D4,D6,D7,B4,B5,B6,C6,C7} +#define UNUSED_PINS {B7,D2} + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/mysticworks/wyvern/info.json b/keyboards/mysticworks/wyvern/info.json new file mode 100644 index 0000000000..ccf2e6d6e6 --- /dev/null +++ b/keyboards/mysticworks/wyvern/info.json @@ -0,0 +1,477 @@ +{ + "keyboard_name": "Wyvern", + "url": "https://mysticworks.xyz", + "maintainer": "mysticworks", + "width": 20.75, + "height": 5.25, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4.25, "y":0}, + {"x":5.25, "y":0}, + {"x":6.25, "y":0}, + {"x":7.25, "y":0}, + {"x":8.25, "y":0}, + {"x":9.25, "y":0}, + {"x":10.25, "y":0}, + {"x":11.25, "y":0}, + {"x":12.25, "y":0}, + {"x":13.25, "y":0}, + {"x":14.25, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0}, + {"x":18.25, "y":0}, + {"x":19.75, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4.25, "y":1, "w":1.5}, + {"x":5.75, "y":1}, + {"x":6.75, "y":1}, + {"x":7.75, "y":1}, + {"x":8.75, "y":1}, + {"x":9.75, "y":1}, + {"x":10.75, "y":1}, + {"x":11.75, "y":1}, + {"x":12.75, "y":1}, + {"x":13.75, "y":1}, + {"x":14.75, "y":1}, + {"x":15.75, "y":1}, + {"x":16.75, "y":1}, + {"x":17.75, "y":1, "w":1.5}, + {"x":19.75, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":4.25, "y":2, "w":1.75}, + {"x":6, "y":2}, + {"x":7, "y":2}, + {"x":8, "y":2}, + {"x":9, "y":2}, + {"x":10, "y":2}, + {"x":11, "y":2}, + {"x":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "y":2}, + {"x":15, "y":2}, + {"x":16, "y":2}, + {"x":17, "y":2}, + {"x":18, "y":2, "w":1.25}, + {"x":19.75, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4.25, "y":3, "w":1.25}, + {"x":5.5, "y":3}, + {"x":6.5, "y":3}, + {"x":7.5, "y":3}, + {"x":8.5, "y":3}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3}, + {"x":11.5, "y":3}, + {"x":12.5, "y":3}, + {"x":13.5, "y":3}, + {"x":14.5, "y":3}, + {"x":15.5, "y":3}, + {"x":16.5, "y":3, "w":1.75}, + {"x":18.5, "y":3.25}, + {"x":19.75, "y":3}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4}, + {"x":4.25, "y":4, "w":1.25}, + {"x":5.5, "y":4, "w":1.25}, + {"x":6.75, "y":4, "w":1.25}, + {"x":8, "y":4, "w":6.25}, + {"x":14.25, "y":4, "w":1.5}, + {"x":15.75, "y":4, "w":1.5}, + {"x":17.5, "y":4.25}, + {"x":18.5, "y":4.25}, + {"x":19.5, "y":4.25} + ] + }, + "LAYOUT_ansi_numpad_right": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4.25, "y":0}, + {"x":5.25, "y":0}, + {"x":6.25, "y":0}, + {"x":7.25, "y":0}, + {"x":8.25, "y":0}, + {"x":9.25, "y":0}, + {"x":10.25, "y":0}, + {"x":11.25, "y":0}, + {"x":12.25, "y":0}, + {"x":13.25, "y":0}, + {"x":14.25, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0, "w":2}, + {"x":19.75, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1, "h":2}, + {"x":4.25, "y":1, "w":1.5}, + {"x":5.75, "y":1}, + {"x":6.75, "y":1}, + {"x":7.75, "y":1}, + {"x":8.75, "y":1}, + {"x":9.75, "y":1}, + {"x":10.75, "y":1}, + {"x":11.75, "y":1}, + {"x":12.75, "y":1}, + {"x":13.75, "y":1}, + {"x":14.75, "y":1}, + {"x":15.75, "y":1}, + {"x":16.75, "y":1}, + {"x":17.75, "y":1, "w":1.5}, + {"x":19.75, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":4.25, "y":2, "w":1.75}, + {"x":6, "y":2}, + {"x":7, "y":2}, + {"x":8, "y":2}, + {"x":9, "y":2}, + {"x":10, "y":2}, + {"x":11, "y":2}, + {"x":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "y":2}, + {"x":15, "y":2}, + {"x":16, "y":2}, + {"x":17, "y":2, "w":2.25}, + {"x":19.75, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3, "h":2}, + {"x":4.25, "y":3, "w":2.25}, + {"x":6.5, "y":3}, + {"x":7.5, "y":3}, + {"x":8.5, "y":3}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3}, + {"x":11.5, "y":3}, + {"x":12.5, "y":3}, + {"x":13.5, "y":3}, + {"x":14.5, "y":3}, + {"x":15.5, "y":3}, + {"x":16.5, "y":3, "w":1.75}, + {"x":18.5, "y":3.25}, + {"x":19.75, "y":3}, + + {"x":0, "y":4, "w":2}, + {"x":2, "y":4}, + {"x":4.25, "y":4, "w":1.25}, + {"x":5.5, "y":4, "w":1.25}, + {"x":6.75, "y":4, "w":1.25}, + {"x":8, "y":4, "w":6.25}, + {"x":14.25, "y":4, "w":1.5}, + {"x":15.75, "y":4, "w":1.5}, + {"x":17.5, "y":4.25}, + {"x":18.5, "y":4.25}, + {"x":19.5, "y":4.25} + ] + }, + "LAYOUT_ansi_numpad_left": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4.25, "y":0}, + {"x":5.25, "y":0}, + {"x":6.25, "y":0}, + {"x":7.25, "y":0}, + {"x":8.25, "y":0}, + {"x":9.25, "y":0}, + {"x":10.25, "y":0}, + {"x":11.25, "y":0}, + {"x":12.25, "y":0}, + {"x":13.25, "y":0}, + {"x":14.25, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0, "w":2}, + {"x":19.75, "y":0}, + + {"x":0, "y":1, "h":2}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4.25, "y":1, "w":1.5}, + {"x":5.75, "y":1}, + {"x":6.75, "y":1}, + {"x":7.75, "y":1}, + {"x":8.75, "y":1}, + {"x":9.75, "y":1}, + {"x":10.75, "y":1}, + {"x":11.75, "y":1}, + {"x":12.75, "y":1}, + {"x":13.75, "y":1}, + {"x":14.75, "y":1}, + {"x":15.75, "y":1}, + {"x":16.75, "y":1}, + {"x":17.75, "y":1, "w":1.5}, + {"x":19.75, "y":1}, + + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":4.25, "y":2, "w":1.75}, + {"x":6, "y":2}, + {"x":7, "y":2}, + {"x":8, "y":2}, + {"x":9, "y":2}, + {"x":10, "y":2}, + {"x":11, "y":2}, + {"x":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "y":2}, + {"x":15, "y":2}, + {"x":16, "y":2}, + {"x":17, "y":2, "w":2.25}, + {"x":19.75, "y":2}, + + {"x":0, "y":3, "h":2}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4.25, "y":3, "w":2.25}, + {"x":6.5, "y":3}, + {"x":7.5, "y":3}, + {"x":8.5, "y":3}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3}, + {"x":11.5, "y":3}, + {"x":12.5, "y":3}, + {"x":13.5, "y":3}, + {"x":14.5, "y":3}, + {"x":15.5, "y":3}, + {"x":16.5, "y":3, "w":1.75}, + {"x":18.5, "y":3.25}, + {"x":19.75, "y":3}, + + {"x":1, "y":4}, + {"x":2, "y":4, "w":2}, + {"x":4.25, "y":4, "w":1.25}, + {"x":5.5, "y":4, "w":1.25}, + {"x":6.75, "y":4, "w":1.25}, + {"x":8, "y":4, "w":6.25}, + {"x":14.25, "y":4, "w":1.5}, + {"x":15.75, "y":4, "w":1.5}, + {"x":17.5, "y":4.25}, + {"x":18.5, "y":4.25}, + {"x":19.5, "y":4.25} + ] + }, + "LAYOUT_iso_numpad_right": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4.25, "y":0}, + {"x":5.25, "y":0}, + {"x":6.25, "y":0}, + {"x":7.25, "y":0}, + {"x":8.25, "y":0}, + {"x":9.25, "y":0}, + {"x":10.25, "y":0}, + {"x":11.25, "y":0}, + {"x":12.25, "y":0}, + {"x":13.25, "y":0}, + {"x":14.25, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0, "w":2}, + {"x":19.75, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1, "h":2}, + {"x":4.25, "y":1, "w":1.5}, + {"x":5.75, "y":1}, + {"x":6.75, "y":1}, + {"x":7.75, "y":1}, + {"x":8.75, "y":1}, + {"x":9.75, "y":1}, + {"x":10.75, "y":1}, + {"x":11.75, "y":1}, + {"x":12.75, "y":1}, + {"x":13.75, "y":1}, + {"x":14.75, "y":1}, + {"x":15.75, "y":1}, + {"x":16.75, "y":1}, + {"x":19.75, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":4.25, "y":2, "w":1.75}, + {"x":6, "y":2}, + {"x":7, "y":2}, + {"x":8, "y":2}, + {"x":9, "y":2}, + {"x":10, "y":2}, + {"x":11, "y":2}, + {"x":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "y":2}, + {"x":15, "y":2}, + {"x":16, "y":2}, + {"x":17, "y":2}, + {"x":18, "y":1, "w":1.25, "h":2}, + {"x":19.75, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3, "h":2}, + {"x":4.25, "y":3, "w":1.25}, + {"x":5.5, "y":3}, + {"x":6.5, "y":3}, + {"x":7.5, "y":3}, + {"x":8.5, "y":3}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3}, + {"x":11.5, "y":3}, + {"x":12.5, "y":3}, + {"x":13.5, "y":3}, + {"x":14.5, "y":3}, + {"x":15.5, "y":3}, + {"x":16.5, "y":3, "w":1.75}, + {"x":18.5, "y":3.25}, + {"x":19.75, "y":3}, + + {"x":0, "y":4, "w":2}, + {"x":2, "y":4}, + {"x":4.25, "y":4, "w":1.25}, + {"x":5.5, "y":4, "w":1.25}, + {"x":6.75, "y":4, "w":1.25}, + {"x":8, "y":4, "w":6.25}, + {"x":14.25, "y":4, "w":1.5}, + {"x":15.75, "y":4, "w":1.5}, + {"x":17.5, "y":4.25}, + {"x":18.5, "y":4.25}, + {"x":19.5, "y":4.25} + ] + }, + "LAYOUT_iso_numpad_left": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4.25, "y":0}, + {"x":5.25, "y":0}, + {"x":6.25, "y":0}, + {"x":7.25, "y":0}, + {"x":8.25, "y":0}, + {"x":9.25, "y":0}, + {"x":10.25, "y":0}, + {"x":11.25, "y":0}, + {"x":12.25, "y":0}, + {"x":13.25, "y":0}, + {"x":14.25, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0, "w":2}, + {"x":19.75, "y":0}, + + {"x":0, "y":1, "h":2}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4.25, "y":1, "w":1.5}, + {"x":5.75, "y":1}, + {"x":6.75, "y":1}, + {"x":7.75, "y":1}, + {"x":8.75, "y":1}, + {"x":9.75, "y":1}, + {"x":10.75, "y":1}, + {"x":11.75, "y":1}, + {"x":12.75, "y":1}, + {"x":13.75, "y":1}, + {"x":14.75, "y":1}, + {"x":15.75, "y":1}, + {"x":16.75, "y":1}, + {"x":19.75, "y":1}, + + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":4.25, "y":2, "w":1.75}, + {"x":6, "y":2}, + {"x":7, "y":2}, + {"x":8, "y":2}, + {"x":9, "y":2}, + {"x":10, "y":2}, + {"x":11, "y":2}, + {"x":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "y":2}, + {"x":15, "y":2}, + {"x":16, "y":2}, + {"x":17, "y":2}, + {"x":18, "y":1, "w":1.25, "h":2}, + {"x":19.75, "y":2}, + + {"x":0, "y":3, "h":2}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4.25, "y":3, "w":1.25}, + {"x":5.5, "y":3}, + {"x":6.5, "y":3}, + {"x":7.5, "y":3}, + {"x":8.5, "y":3}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3}, + {"x":11.5, "y":3}, + {"x":12.5, "y":3}, + {"x":13.5, "y":3}, + {"x":14.5, "y":3}, + {"x":15.5, "y":3}, + {"x":16.5, "y":3, "w":1.75}, + {"x":18.5, "y":3.25}, + {"x":19.75, "y":3}, + + {"x":1, "y":4}, + {"x":2, "y":4, "w":2}, + {"x":4.25, "y":4, "w":1.25}, + {"x":5.5, "y":4, "w":1.25}, + {"x":6.75, "y":4, "w":1.25}, + {"x":8, "y":4, "w":6.25}, + {"x":14.25, "y":4, "w":1.5}, + {"x":15.75, "y":4, "w":1.5}, + {"x":17.5, "y":4.25}, + {"x":18.5, "y":4.25}, + {"x":19.5, "y":4.25} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/mysticworks/wyvern/keymaps/default/keymap.c b/keyboards/mysticworks/wyvern/keymaps/default/keymap.c new file mode 100644 index 0000000000..9c927e7f2a --- /dev/null +++ b/keyboards/mysticworks/wyvern/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 Albert Dong + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_DEL, + KC_P7, KC_P8, KC_P9, KC_PPLS, 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_P4, KC_P5, KC_P6, KC_PPLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUBS, KC_ENT, KC_PGDN, + KC_P1, KC_P2, KC_P3, KC_PENT, KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), + KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + _______, _______, _______, _______, 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, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; \ No newline at end of file diff --git a/keyboards/mysticworks/wyvern/keymaps/default/readme.md b/keyboards/mysticworks/wyvern/keymaps/default/readme.md new file mode 100644 index 0000000000..1d4604ba5d --- /dev/null +++ b/keyboards/mysticworks/wyvern/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# Wyvern Default Keymap + +Default keymap for Wyvern- Normal numpad, ANSI layout with 6.25u. F-keys on second layer. diff --git a/keyboards/mysticworks/wyvern/keymaps/via/keymap.c b/keyboards/mysticworks/wyvern/keymaps/via/keymap.c new file mode 100644 index 0000000000..d92fb562e2 --- /dev/null +++ b/keyboards/mysticworks/wyvern/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2020 Albert Dong + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_DEL, + KC_P7, KC_P8, KC_P9, KC_PPLS, 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_P4, KC_P5, KC_P6, KC_PPLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUBS, KC_ENT, KC_PGDN, + KC_P1, KC_P2, KC_P3, KC_PENT, KC_LSFT, KC_NUHS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), + KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + _______, _______, _______, _______, 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, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; \ No newline at end of file diff --git a/keyboards/mysticworks/wyvern/keymaps/via/readme.md b/keyboards/mysticworks/wyvern/keymaps/via/readme.md new file mode 100644 index 0000000000..02b3ae2a6e --- /dev/null +++ b/keyboards/mysticworks/wyvern/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# Wyvern VIA Keymap + +Keymap for VIA Configurator usage- supports all layouts possible. diff --git a/keyboards/mysticworks/wyvern/keymaps/via/rules.mk b/keyboards/mysticworks/wyvern/keymaps/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/mysticworks/wyvern/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/mysticworks/wyvern/readme.md b/keyboards/mysticworks/wyvern/readme.md new file mode 100644 index 0000000000..6587d72bfd --- /dev/null +++ b/keyboards/mysticworks/wyvern/readme.md @@ -0,0 +1,18 @@ +# Wyvern + +A 65% + Southpaw Numpad designed and sold by [Mystic Works](https://mysticworks.xyz). + +## Support +* Keyboard Maintainer: [mysticworks](https://github.com/mysticworks) +* Hardware Supported: Wyvern +* Hardware Availability: Will be posted [here](https://mysticworks.xyz/) + +Make example for this keyboard (after setting up your build environment): + + make mysticworks/wyvern:default + +Flashing example for this keyboard: + + make mysticworks/wyvern:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mysticworks/wyvern/rules.mk b/keyboards/mysticworks/wyvern/rules.mk new file mode 100644 index 0000000000..6bd8b89327 --- /dev/null +++ b/keyboards/mysticworks/wyvern/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = qmk-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/mysticworks/wyvern/wyvern.c b/keyboards/mysticworks/wyvern/wyvern.c new file mode 100644 index 0000000000..015fb5ff05 --- /dev/null +++ b/keyboards/mysticworks/wyvern/wyvern.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Albert Dong + * + * 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 "wyvern.h" + diff --git a/keyboards/mysticworks/wyvern/wyvern.h b/keyboards/mysticworks/wyvern/wyvern.h new file mode 100644 index 0000000000..ea5b4b305e --- /dev/null +++ b/keyboards/mysticworks/wyvern/wyvern.h @@ -0,0 +1,129 @@ +/* Copyright 2020 Albert Dong + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define XXX KC_NO + +#define LAYOUT_all( \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k08, k18, k09, k19, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, k28, k29, k39, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, k58, k49, k59, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77, k68, k69, k79, \ + k80, k90, k81, k91, k82, k92, k83, k85, k87, k97, k98, k89, k99 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, XXX, k39 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, XXX, k49 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, XXX, k79 }, \ + { k80, k81, k82, k83, XXX, k85, XXX, k87, XXX, k89 }, \ + { k90, k91, k92, XXX, XXX, XXX, XXX, k97, k98, k99 } \ +} + +#define LAYOUT_ansi_numpad_right( \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k08, k09, k19, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, k28, k29, k39, \ + k40, k50, k41, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, k49, k59, \ + k60, k70, k61, k71, k62, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77, k68, k69, k79, \ + k80, k81, k82, k92, k83, k85, k87, k97, k98, k89, k99 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, XXX, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, XXX, k39 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, XXX, k49 }, \ + { k50, XXX, k52, k53, k54, k55, k56, k57, XXX, k59 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, XXX, k79 }, \ + { k80, k81, k82, k83, XXX, k85, XXX, k87, XXX, k89 }, \ + { XXX, XXX, k92, XXX, XXX, XXX, XXX, k97, k98, k99 } \ +} + +#define LAYOUT_ansi_numpad_left( \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k08, k09, k19, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, k28, k29, k39, \ + k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, k49, k59, \ + k60, k70, k61, k71, k62, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77, k68, k69, k79, \ + k90, k91, k82, k92, k83, k85, k87, k97, k98, k89, k99 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, XXX, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, XXX, k39 }, \ + { XXX, k41, k42, k43, k44, k45, k46, k47, XXX, k49 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, XXX, k59 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ + { k70, k71, XXX, k73, k74, k75, k76, k77, XXX, k79 }, \ + { XXX, XXX, k82, k83, XXX, k85, XXX, k87, XXX, k89 }, \ + { k90, k91, k92, XXX, XXX, XXX, XXX, k97, k98, k99 } \ +} + +#define LAYOUT_iso_numpad_right( \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k08, k09, k19, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, k28, k39, \ + k40, k50, k41, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, k58, k49, k59, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77, k68, k69, k79, \ + k80, k81, k82, k92, k83, k85, k87, k97, k98, k89, k99 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, XXX, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, XXX, k39 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, XXX, k49 }, \ + { k50, XXX, k52, k53, k54, k55, k56, k57, k58, k59 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, XXX, k79 }, \ + { k80, k81, k82, k83, XXX, k85, XXX, k87, XXX, k89 }, \ + { XXX, XXX, k92, XXX, XXX, XXX, XXX, k97, k98, k99 } \ +} + +#define LAYOUT_iso_numpad_left( \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, k08, k09, k19, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, k28, k39, \ + k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, k58, k49, k59, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77, k68, k69, k79, \ + k90, k91, k82, k92, k83, k85, k87, k97, k98, k89, k99 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, XXX, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, XXX, k39 }, \ + { XXX, k41, k42, k43, k44, k45, k46, k47, XXX, k49 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, XXX, k79 }, \ + { XXX, XXX, k82, k83, XXX, k85, XXX, k87, XXX, k89 }, \ + { k90, k91, k92, XXX, XXX, XXX, XXX, k97, k98, k99 } \ +} diff --git a/keyboards/naked60/keymaps/333fred/keymap.c b/keyboards/naked60/keymaps/333fred/keymap.c index 3331dee9b1..7185ec78b7 100644 --- a/keyboards/naked60/keymaps/333fred/keymap.c +++ b/keyboards/naked60/keymaps/333fred/keymap.c @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include QMK_KEYBOARD_H #include "333fred.h" diff --git a/keyboards/nebula65/chconf.h b/keyboards/nebula68/chconf.h similarity index 100% rename from keyboards/nebula65/chconf.h rename to keyboards/nebula68/chconf.h diff --git a/keyboards/nebula65/config.h b/keyboards/nebula68/config.h similarity index 97% rename from keyboards/nebula65/config.h rename to keyboards/nebula68/config.h index efd4133287..1d6cb5e918 100755 --- a/keyboards/nebula65/config.h +++ b/keyboards/nebula68/config.h @@ -24,8 +24,7 @@ along with this program. If not, see . #define PRODUCT_ID 0x5336 #define DEVICE_VER 0x0001 #define MANUFACTURER Yiancar-Designs -#define PRODUCT NEBULA65 -#define DESCRIPTION "A 65-percent, tool-free RGB keyboard" +#define PRODUCT NEBULA68 /* key matrix size */ #define MATRIX_ROWS 5 @@ -106,7 +105,7 @@ along with this program. If not, see . #define RGB_BACKLIGHT_ENABLED 1 -#define RGB_BACKLIGHT_NEBULA65 +#define RGB_BACKLIGHT_NEBULA68 // they aren't really used if RGB_BACKLIGHT_NEBULA65 defined #define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 diff --git a/keyboards/nebula65/halconf.h b/keyboards/nebula68/halconf.h similarity index 100% rename from keyboards/nebula65/halconf.h rename to keyboards/nebula68/halconf.h diff --git a/keyboards/nebula65/info.json b/keyboards/nebula68/info.json similarity index 98% rename from keyboards/nebula65/info.json rename to keyboards/nebula68/info.json index c68e11ddad..2cabbd616f 100755 --- a/keyboards/nebula65/info.json +++ b/keyboards/nebula68/info.json @@ -1,5 +1,5 @@ { - "keyboard_name": "NEBULA65", + "keyboard_name": "NEBULA68", "url": "", "maintainer": "yiancar", "width": 17.25, diff --git a/keyboards/nebula65/keymaps/default/keymap.c b/keyboards/nebula68/keymaps/default/keymap.c similarity index 100% rename from keyboards/nebula65/keymaps/default/keymap.c rename to keyboards/nebula68/keymaps/default/keymap.c diff --git a/keyboards/nebula65/keymaps/default/readme.md b/keyboards/nebula68/keymaps/default/readme.md similarity index 50% rename from keyboards/nebula65/keymaps/default/readme.md rename to keyboards/nebula68/keymaps/default/readme.md index 324676b64e..a8ae2ac8c7 100755 --- a/keyboards/nebula65/keymaps/default/readme.md +++ b/keyboards/nebula68/keymaps/default/readme.md @@ -1,7 +1,7 @@ -# The default keymap for Nebula65. VIA support disabled. +# The default keymap for Nebula68. VIA support disabled. ![Layer 0](https://i.imgur.com/dXyRwb1.png) ![Layer 1](https://i.imgur.com/4izTAFa.png) -Default layer is normal ANSI 65% +Default layer is normal ANSI 68% diff --git a/keyboards/nebula65/keymaps/via/keymap.c b/keyboards/nebula68/keymaps/via/keymap.c similarity index 100% rename from keyboards/nebula65/keymaps/via/keymap.c rename to keyboards/nebula68/keymaps/via/keymap.c diff --git a/keyboards/nebula65/keymaps/via/readme.md b/keyboards/nebula68/keymaps/via/readme.md similarity index 50% rename from keyboards/nebula65/keymaps/via/readme.md rename to keyboards/nebula68/keymaps/via/readme.md index d15266ea7c..e45ec36bb4 100755 --- a/keyboards/nebula65/keymaps/via/readme.md +++ b/keyboards/nebula68/keymaps/via/readme.md @@ -1,7 +1,7 @@ -# The default keymap for Nebula65. VIA support enabled. +# The default keymap for Nebula68. VIA support enabled. ![Layer 0](https://i.imgur.com/dXyRwb1.png) ![Layer 1](https://i.imgur.com/4izTAFa.png) -Default layer is normal ANSI 65% +Default layer is normal ANSI 68% diff --git a/keyboards/nebula68/keymaps/via/rules.mk b/keyboards/nebula68/keymaps/via/rules.mk new file mode 100755 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/nebula68/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/nebula65/mcuconf.h b/keyboards/nebula68/mcuconf.h similarity index 100% rename from keyboards/nebula65/mcuconf.h rename to keyboards/nebula68/mcuconf.h diff --git a/keyboards/nebula65/nebula65.c b/keyboards/nebula68/nebula68.c similarity index 85% rename from keyboards/nebula65/nebula65.c rename to keyboards/nebula68/nebula68.c index b3e7cc6639..054a269bf6 100755 --- a/keyboards/nebula65/nebula65.c +++ b/keyboards/nebula68/nebula68.c @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef RGB_BACKLIGHT_NEBULA65 -#error RGB_BACKLIGHT_NEBULA65 not defined, recheck config.h +#ifndef RGB_BACKLIGHT_NEBULA68 +#error RGB_BACKLIGHT_NEBULA68 not defined, recheck config.h #endif -#include "nebula65.h" +#include "nebula68.h" diff --git a/keyboards/nebula65/nebula65.h b/keyboards/nebula68/nebula68.h similarity index 100% rename from keyboards/nebula65/nebula65.h rename to keyboards/nebula68/nebula68.h diff --git a/keyboards/nebula65/readme.md b/keyboards/nebula68/readme.md similarity index 83% rename from keyboards/nebula65/readme.md rename to keyboards/nebula68/readme.md index 5189c049c3..b990ed20dc 100755 --- a/keyboards/nebula65/readme.md +++ b/keyboards/nebula68/readme.md @@ -1,9 +1,9 @@ -# Nebula65 +# Nebula68 -This is a standard fixed layout 65% PCB. It supports VIA, full per-key RGB and underglow RGB. +This is a standard fixed layout 68% PCB. It supports VIA, full per-key RGB and underglow RGB. * Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) -* Hardware Supported: A 65% keyboard with STM32F303CC +* Hardware Supported: A 68% keyboard with STM32F303CC * Hardware Availability: https://spaceholdings.net/ ## Instructions @@ -12,7 +12,7 @@ This is a standard fixed layout 65% PCB. It supports VIA, full per-key RGB and u Make example for this keyboard (after setting up your build environment): - make nebula65:via + make nebula68:via See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/nebula65/rules.mk b/keyboards/nebula68/rules.mk similarity index 100% rename from keyboards/nebula65/rules.mk rename to keyboards/nebula68/rules.mk diff --git a/keyboards/pabile/p18/config.h b/keyboards/pabile/p18/config.h index f7c258a565..d8d5a95f2d 100644 --- a/keyboards/pabile/p18/config.h +++ b/keyboards/pabile/p18/config.h @@ -1,3 +1,21 @@ +/* +Copyright 2020 Pabile + +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 . +*/ + + #pragma once #include "config_common.h" diff --git a/keyboards/pabile/p20/config.h b/keyboards/pabile/p20/config.h deleted file mode 100644 index 8a52c1bf1c..0000000000 --- a/keyboards/pabile/p20/config.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x6666 -#define PRODUCT_ID 0x6667 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Pabile -#define PRODUCT P20 -#define DESCRIPTION 5x4 Macropad - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 4 - -/* pin-out */ -#define MATRIX_ROW_PINS { B3, B4, B5, D7, E6 } -#define MATRIX_COL_PINS { D0, B2, D4, B6 } -#define UNUSED_PINS - -#define ENCODERS_PAD_A { F5, F7 } -#define ENCODERS_PAD_B { F6, B1 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pabile/p20/p20.c b/keyboards/pabile/p20/p20.c deleted file mode 100644 index c17efac9b1..0000000000 --- a/keyboards/pabile/p20/p20.c +++ /dev/null @@ -1 +0,0 @@ -#include "p20.h" diff --git a/keyboards/pabile/p20/p20.h b/keyboards/pabile/p20/p20.h deleted file mode 100644 index b7467dc150..0000000000 --- a/keyboards/pabile/p20/p20.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include "quantum.h" - -#define LAYOUT_ortho_5x4( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, k23, \ - k30, k31, k32, k33, \ - k40, k41, k42, k43 \ -) \ -{ \ - {k00, k01, k02, k03}, \ - {k10, k11, k12, k13}, \ - {k20, k21, k22, k23}, \ - {k30, k31, k32, k33}, \ - {k40, k41, k42, k43} \ -} diff --git a/keyboards/pabile/p20/readme.md b/keyboards/pabile/p20/readme.md index 256a4772ec..e94005b0d4 100644 --- a/keyboards/pabile/p20/readme.md +++ b/keyboards/pabile/p20/readme.md @@ -1,16 +1,16 @@ # P20 ![Linear grid](https://github.com/pabile/Pabile20/blob/master/_bak/layout-grid.jpg) -![Numeric pad](https://github.com/pabile/Pabile20/blob/master/_bak/layout-numpad.jpg) -A 5x4 grid keyboard with 2 rotary encoders. +A 5x4 grid macro numeric pad with up to 3 optional rotary encoders. * Keyboard Maintainer: [pabile](https://github.com/pabile) -* Hardware Supported: Pabile P20 PCB, Pro Micro -* Hardware Availability: [Info at pabileonline.blogspot.com](https://pabileonline.blogspot.com/search/label/pabile20) +* Hardware Supported: Pabile P20 PCB, Pro Micro, Rotary Encoders, Alps/MX Switches +* Hardware Availability: [pabileonline.blogspot.com](https://pabileonline.blogspot.com/search/label/p20) Make example for this keyboard (after setting up your build environment): - make pabile/p20:default + make pabile/p20/ver1:default # for ver1 + make pabile/p20/ver2:default # for ver2 See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/pabile/p20/ver1/config.h b/keyboards/pabile/p20/ver1/config.h new file mode 100644 index 0000000000..94c600106b --- /dev/null +++ b/keyboards/pabile/p20/ver1/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2020 Pabile + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6666 +#define PRODUCT_ID 0x6667 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Pabile +#define PRODUCT P20 ver1 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* pin-out */ +#define MATRIX_ROW_PINS { B3, B4, B5, D7, E6 } +#define MATRIX_COL_PINS { D0, B2, D4, B6 } +#define UNUSED_PINS + +#define ENCODERS_PAD_A { F5, F7 } +#define ENCODERS_PAD_B { F6, B1 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW \ No newline at end of file diff --git a/keyboards/pabile/p20/keymaps/default/keymap.c b/keyboards/pabile/p20/ver1/keymaps/default/keymap.c similarity index 100% rename from keyboards/pabile/p20/keymaps/default/keymap.c rename to keyboards/pabile/p20/ver1/keymaps/default/keymap.c diff --git a/keyboards/pabile/p20/rules.mk b/keyboards/pabile/p20/ver1/rules.mk similarity index 64% rename from keyboards/pabile/p20/rules.mk rename to keyboards/pabile/p20/ver1/rules.mk index d4fa25323a..d8e01b847f 100644 --- a/keyboards/pabile/p20/rules.mk +++ b/keyboards/pabile/p20/ver1/rules.mk @@ -2,13 +2,6 @@ MCU = atmega32u4 # Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp BOOTLOADER = caterina # Build Options @@ -25,13 +18,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + UNICODE_ENABLE = yes # Unicode IOS_DEVICE_ENABLE = no # connect to IOS Device ENCODER_ENABLE = yes -LAYOUTS = ortho_5x4 +LAYOUTS = ortho_5x4 numpad_5x4 diff --git a/keyboards/pabile/p20/ver1/ver1.c b/keyboards/pabile/p20/ver1/ver1.c new file mode 100644 index 0000000000..65e11630bc --- /dev/null +++ b/keyboards/pabile/p20/ver1/ver1.c @@ -0,0 +1,18 @@ +/* +Copyright 2020 Pabile + +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 "ver1.h" diff --git a/keyboards/pabile/p20/ver1/ver1.h b/keyboards/pabile/p20/ver1/ver1.h new file mode 100644 index 0000000000..36ec781fa1 --- /dev/null +++ b/keyboards/pabile/p20/ver1/ver1.h @@ -0,0 +1,50 @@ +/* +Copyright 2020 Pabile + +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 . +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, k33}, \ + {k40, k41, k42, k43} \ +} + +#define LAYOUT_numpad_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, \ + k20, k21, k22, k23, \ + k30, k31, k32, \ + k40, k42, k43 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, KC_NO}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, KC_NO}, \ + {k40, KC_NO, k42, k43} \ +} diff --git a/keyboards/pabile/p20/ver2/config.h b/keyboards/pabile/p20/ver2/config.h new file mode 100644 index 0000000000..0997001836 --- /dev/null +++ b/keyboards/pabile/p20/ver2/config.h @@ -0,0 +1,39 @@ +/* +Copyright 2020 Pabile + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6666 +#define PRODUCT_ID 0x6667 +#define DEVICE_VER 0x0002 +#define MANUFACTURER Pabile +#define PRODUCT P20 ver2 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* pin-out */ +#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { D1, D0, D4, B2 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pabile/p20/ver2/keymaps/default/keymap.c b/keyboards/pabile/p20/ver2/keymaps/default/keymap.c new file mode 100644 index 0000000000..2c2af0da8a --- /dev/null +++ b/keyboards/pabile/p20/ver2/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +/* +Copyright 2020 Pabile + +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 QMK_KEYBOARD_H + +enum custom_keycodes { + DBLZERO = SAFE_RANGE, +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DBLZERO: + if (record->event.pressed) { + tap_code(KC_P0); + tap_code(KC_P0); + } + break; + } + return true; +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_TAB, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_DEL, + KC_P0, DBLZERO, KC_PDOT, KC_PENT) +}; diff --git a/keyboards/pabile/p20/ver2/rules.mk b/keyboards/pabile/p20/ver2/rules.mk new file mode 100644 index 0000000000..da59201fca --- /dev/null +++ b/keyboards/pabile/p20/ver2/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +UNICODE_ENABLE = yes # Unicode +IOS_DEVICE_ENABLE = no # connect to IOS Device +ENCODER_ENABLE = no + +LAYOUTS = ortho_5x4 numpad_5x4 diff --git a/keyboards/pabile/p20/ver2/ver2.c b/keyboards/pabile/p20/ver2/ver2.c new file mode 100644 index 0000000000..fa7e1f2e39 --- /dev/null +++ b/keyboards/pabile/p20/ver2/ver2.c @@ -0,0 +1,18 @@ +/* +Copyright 2020 Pabile + +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 "ver2.h" diff --git a/keyboards/pabile/p20/ver2/ver2.h b/keyboards/pabile/p20/ver2/ver2.h new file mode 100644 index 0000000000..36ec781fa1 --- /dev/null +++ b/keyboards/pabile/p20/ver2/ver2.h @@ -0,0 +1,50 @@ +/* +Copyright 2020 Pabile + +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 . +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, k33}, \ + {k40, k41, k42, k43} \ +} + +#define LAYOUT_numpad_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, \ + k20, k21, k22, k23, \ + k30, k31, k32, \ + k40, k42, k43 \ +) \ +{ \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, KC_NO}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, KC_NO}, \ + {k40, KC_NO, k42, k43} \ +} diff --git a/keyboards/pabile/p40/config.h b/keyboards/pabile/p40/config.h index f4252f7ab0..02ebb67e6b 100644 --- a/keyboards/pabile/p40/config.h +++ b/keyboards/pabile/p40/config.h @@ -1,3 +1,20 @@ +/* +Copyright 2020 Pabile + +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 . +*/ + #pragma once #include "config_common.h" diff --git a/keyboards/pabile/p40/info.json b/keyboards/pabile/p40/info.json index 42f9b4823e..d05d773282 100644 --- a/keyboards/pabile/p40/info.json +++ b/keyboards/pabile/p40/info.json @@ -7,46 +7,46 @@ "layouts": { "LAYOUT_ortho_4x10": { "layout": [ - {"x":0, "y":0}, - {"x":1, "y":0}, - {"x":2, "y":0}, - {"x":3, "y":0}, - {"x":4, "y":0}, - {"x":5, "y":0}, - {"x":6, "y":0}, - {"x":7, "y":0}, - {"x":8, "y":0}, - {"x":9, "y":0}, - {"x":0.25, "y":1}, - {"x":1.25, "y":1}, - {"x":2.25, "y":1}, - {"x":3.25, "y":1}, - {"x":4.25, "y":1}, - {"x":5.25, "y":1}, - {"x":6.25, "y":1}, - {"x":7.25, "y":1}, - {"x":8.25, "y":1}, - {"x":9.25, "y":1}, - {"x":0.5, "y":2}, - {"x":1.5, "y":2}, - {"x":2.5, "y":2}, - {"x":3.5, "y":2}, - {"x":4.5, "y":2}, - {"x":5.5, "y":2}, - {"x":6.5, "y":2}, - {"x":7.5, "y":2}, - {"x":8.5, "y":2}, - {"x":9.5, "y":2}, - {"x":0.75, "y":3}, - {"x":1.75, "y":3}, - {"x":2.75, "y":3}, - {"x":3.75, "y":3}, - {"x":4.75, "y":3}, - {"x":5.75, "y":3}, - {"x":6.75, "y":3}, - {"x":7.75, "y":3}, - {"x":8.75, "y":3}, - {"x":9.75, "y":3}] + {"w":1, "x":0, "y":0}, + {"w":1, "x":1, "y":0}, + {"w":1, "x":2, "y":0}, + {"w":1, "x":3, "y":0}, + {"w":1, "x":4, "y":0}, + {"w":1, "x":5, "y":0}, + {"w":1, "x":6, "y":0}, + {"w":1, "x":7, "y":0}, + {"w":1, "x":8, "y":0}, + {"w":1, "x":9, "y":0}, + {"w":1, "x":0.25, "y":1}, + {"w":1, "x":1.25, "y":1}, + {"w":1, "x":2.25, "y":1}, + {"w":1, "x":3.25, "y":1}, + {"w":1, "x":4.25, "y":1}, + {"w":1, "x":5.25, "y":1}, + {"w":1, "x":6.25, "y":1}, + {"w":1, "x":7.25, "y":1}, + {"w":1, "x":8.25, "y":1}, + {"w":1, "x":9.25, "y":1}, + {"w":1, "x":0.5, "y":2}, + {"w":1, "x":1.5, "y":2}, + {"w":1, "x":2.5, "y":2}, + {"w":1, "x":3.5, "y":2}, + {"w":1, "x":4.5, "y":2}, + {"w":1, "x":5.5, "y":2}, + {"w":1, "x":6.5, "y":2}, + {"w":1, "x":7.5, "y":2}, + {"w":1, "x":8.5, "y":2}, + {"w":1, "x":9.5, "y":2}, + {"w":1, "x":0.75, "y":3}, + {"w":1, "x":1.75, "y":3}, + {"w":1, "x":2.75, "y":3}, + {"w":1, "x":3.75, "y":3}, + {"w":1, "x":4.75, "y":3}, + {"w":1, "x":5.75, "y":3}, + {"w":1, "x":6.75, "y":3}, + {"w":1, "x":7.75, "y":3}, + {"w":1, "x":8.75, "y":3}, + {"w":1, "x":9.75, "y":3}] } } } diff --git a/keyboards/pabile/p40/readme.md b/keyboards/pabile/p40/readme.md index 33a657f384..14673d75a2 100644 --- a/keyboards/pabile/p40/readme.md +++ b/keyboards/pabile/p40/readme.md @@ -6,10 +6,11 @@ A compact 4x10 (40%) staggered DIY keyboard kit. * Keyboard Maintainer: [pabile](https://github.com/pabile) * Hardware Supported: Pabile P40 PCB, Pro Micro -* Hardware Availability: [Info at pabileonline.blogspot.com](https://pabileonline.blogspot.com/search/label/pabile40) +* Hardware Availability: [Info at pabileonline.blogspot.com](https://pabileonline.blogspot.com/search/label/p40) Make example for this keyboard (after setting up your build environment): make pabile/p40:default + See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/pabile/p40_ortho/config.h b/keyboards/pabile/p40_ortho/config.h new file mode 100644 index 0000000000..4fd8e7a533 --- /dev/null +++ b/keyboards/pabile/p40_ortho/config.h @@ -0,0 +1,40 @@ +/* +Copyright 2020 Pabile + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6666 +#define PRODUCT_ID 0x6669 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Pabile +#define PRODUCT P40 Ortho Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 10 + +/* pin-out */ +#define MATRIX_ROW_PINS { D1, D0, F4, F5 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B2, B3, B1, F7, F6 } + +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pabile/p40_ortho/info.json b/keyboards/pabile/p40_ortho/info.json new file mode 100644 index 0000000000..a4d757be92 --- /dev/null +++ b/keyboards/pabile/p40_ortho/info.json @@ -0,0 +1,52 @@ +{ + "keyboard_name": "", + "url": "", + "maintainer": "qmk", + "width": 10, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x10": { + "layout": [ + {"label":"Q", "x":0, "y":0}, + {"label":"W", "x":1, "y":0}, + {"label":"E", "x":2, "y":0}, + {"label":"R", "x":3, "y":0}, + {"label":"T", "x":4, "y":0}, + {"label":"Y", "x":5, "y":0}, + {"label":"U", "x":6, "y":0}, + {"label":"I", "x":7, "y":0}, + {"label":"O", "x":8, "y":0}, + {"label":"P", "x":9, "y":0}, + {"label":"A", "x":0, "y":1}, + {"label":"S", "x":1, "y":1}, + {"label":"D", "x":2, "y":1}, + {"label":"F", "x":3, "y":1}, + {"label":"G", "x":4, "y":1}, + {"label":"H", "x":5, "y":1}, + {"label":"J", "x":6, "y":1}, + {"label":"K", "x":7, "y":1}, + {"label":"L", "x":8, "y":1}, + {"label":"-", "x":9, "y":1}, + {"label":"Z", "x":0, "y":2}, + {"label":"X", "x":1, "y":2}, + {"label":"C", "x":2, "y":2}, + {"label":"V", "x":3, "y":2}, + {"label":"B", "x":4, "y":2}, + {"label":"N", "x":5, "y":2}, + {"label":"M", "x":6, "y":2}, + {"label":",", "x":7, "y":2}, + {"label":".", "x":8, "y":2}, + {"label":"?", "x":9, "y":2}, + {"label":"Ctrl", "x":0, "y":3}, + {"label":"Win", "x":1, "y":3}, + {"label":"Alt", "x":2, "y":3}, + {"label":"Shift", "x":3, "y":3}, + {"label":"←", "x":4, "y":3}, + {"x":5, "y":3}, + {"label":"Enter", "x":6, "y":3}, + {"label":"Alt", "x":7, "y":3}, + {"label":"Super", "x":8, "y":3}, + {"label":"Ctrl", "x":9, "y":3}] + } + } +} diff --git a/keyboards/pabile/p40_ortho/keymaps/default/keymap.c b/keyboards/pabile/p40_ortho/keymaps/default/keymap.c new file mode 100644 index 0000000000..ac41acf2da --- /dev/null +++ b/keyboards/pabile/p40_ortho/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* +Copyright 2020 Pabile + +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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_4x10( + 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, LT(3,KC_MINS), + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(4,KC_SLSH), + KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, LT(2,KC_BSPC), LT(1,KC_SPC), KC_ENT, KC_APP, KC_DEL, KC_ESC), + [1] = LAYOUT_ortho_4x10( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_TAB, KC_NO, KC_NO, KC_GRV, KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_QUOT, KC_MINS, + KC_NO, KC_NO, KC_NO, KC_NO, KC_EQL, KC_MINS, KC_NO, 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), + [2] = LAYOUT_ortho_4x10( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_TAB, KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_CAPS, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NLCK, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + [3] = LAYOUT_ortho_4x10( + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, KC_PGUP, KC_UP, KC_PGDN, KC_DEL, + KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + [4] = LAYOUT_ortho_4x10( + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, KC_DEL, + KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_D, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO) +}; diff --git a/keyboards/pabile/p40_ortho/p40_ortho.c b/keyboards/pabile/p40_ortho/p40_ortho.c new file mode 100644 index 0000000000..b6573bd802 --- /dev/null +++ b/keyboards/pabile/p40_ortho/p40_ortho.c @@ -0,0 +1,18 @@ +/* +Copyright 2020 Pabile + +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 "p40_ortho.h" diff --git a/keyboards/pabile/p40_ortho/p40_ortho.h b/keyboards/pabile/p40_ortho/p40_ortho.h new file mode 100644 index 0000000000..dd2c899daa --- /dev/null +++ b/keyboards/pabile/p40_ortho/p40_ortho.h @@ -0,0 +1,45 @@ +/* +Copyright 2020 Pabile + +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 . +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_4x10( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39} \ +} +#define LAYOUT_ortho_4x10_1x2u_c( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + k30, k31, k32, k33, k34, k36, k37, k38, k39 \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29}, \ + {k30, k31, k32, k33, k34, KC_NO, k36, k37, k38, k39} \ +} diff --git a/keyboards/pabile/p40_ortho/readme.md b/keyboards/pabile/p40_ortho/readme.md new file mode 100644 index 0000000000..736c5b497f --- /dev/null +++ b/keyboards/pabile/p40_ortho/readme.md @@ -0,0 +1,15 @@ +# P40 Ortho + +![prototype photo1](https://github.com/pabile/p40_ortho/blob/master/files/p40-ortho-003.jpg) + +A compact 4x10 (40%) ortho-linear DIY keyboard kit. + +* Keyboard Maintainer: [pabile](https://github.com/pabile) +* Hardware Supported: Pabile P40 PCB, Pro Micro, ALPS / MX Switches +* Hardware Availability: [pabileonline.blogspot.com](https://pabileonline.blogspot.com/search/label/pabile40) + +Make example for this keyboard (after setting up your build environment): + + make pabile/p40_ortho:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/pabile/p40_ortho/rules.mk b/keyboards/pabile/p40_ortho/rules.mk new file mode 100644 index 0000000000..ba0ad23c8a --- /dev/null +++ b/keyboards/pabile/p40_ortho/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +UNICODE_ENABLE = yes # Unicode +IOS_DEVICE_ENABLE = no # connect to IOS Device diff --git a/keyboards/pabile/p42/config.h b/keyboards/pabile/p42/config.h new file mode 100644 index 0000000000..2f7c5ce30a --- /dev/null +++ b/keyboards/pabile/p42/config.h @@ -0,0 +1,45 @@ +/* +Copyright 2020 Pabile + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6666 +#define PRODUCT_ID 0x6670 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Pabile +#define PRODUCT P42 Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 11 + +/* pin-out for PROMICRO */ +#define MATRIX_ROW_PINS { D1, D0, D4, C6 } +#define MATRIX_COL_PINS { D7, E6, B4, B5, D2, D3, F7, B1, B3, B2, B6 } + +/* pin-out for BLUEFRUIT +#define MATRIX_ROW_PINS { F7, F6, F5, F4 } +#define MATRIX_COL_PINS { F1, F0, B1, B2, B3, D2, C7, D6, B7, B6, B5 } +*/ + +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pabile/p42/info.json b/keyboards/pabile/p42/info.json new file mode 100644 index 0000000000..77bce4bab2 --- /dev/null +++ b/keyboards/pabile/p42/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "P42", + "url": "https://pabileonline.blogspot.com/", + "maintainer": "Pabile", + "width": 11.25, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"label":",", "x":7, "y":2}, {"label":".", "x":8, "y":2}, {"x":9, "y":2}, {"x":10.25, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10.25, "y":3}] + } + } +} diff --git a/keyboards/pabile/p42/keymaps/default/keymap.c b/keyboards/pabile/p42/keymaps/default/keymap.c new file mode 100644 index 0000000000..39c9e639e4 --- /dev/null +++ b/keyboards/pabile/p42/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + 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, LT(3,KC_MINS), + 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_LSFT, LT(2,KC_BSPC), LT(1,KC_SPC), LT(4,KC_ENT), KC_DEL, KC_RALT, KC_RCTL, KC_ESC), + [1] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_TAB, KC_NO, KC_NO, KC_GRV, KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_QUOT, KC_MINS, + KC_NO, KC_NO, KC_NO, KC_NO, KC_EQL, KC_MINS, KC_NO, 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), + [2] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_TAB, KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_CAPS, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NLCK, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS), + [3] = LAYOUT( + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, KC_PGUP, KC_UP, KC_PGDN, KC_DEL, + KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS), + [4] = LAYOUT( + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, KC_DEL, + KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_D, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS) +}; diff --git a/keyboards/pabile/p42/p42.c b/keyboards/pabile/p42/p42.c new file mode 100644 index 0000000000..63bf51bd58 --- /dev/null +++ b/keyboards/pabile/p42/p42.c @@ -0,0 +1 @@ +#include "p42.h" diff --git a/keyboards/pabile/p42/p42.h b/keyboards/pabile/p42/p42.h new file mode 100644 index 0000000000..41aed042a2 --- /dev/null +++ b/keyboards/pabile/p42/p42.h @@ -0,0 +1,33 @@ +/* +Copyright 2020 Pabile + +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 . +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210,\ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310 \ +) \ +{ \ + {k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, KC_NO}, \ + {k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, KC_NO}, \ + {k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210}, \ + {k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310} \ +} diff --git a/keyboards/pabile/p42/readme.md b/keyboards/pabile/p42/readme.md new file mode 100644 index 0000000000..5ad0036bff --- /dev/null +++ b/keyboards/pabile/p42/readme.md @@ -0,0 +1,15 @@ +# P42 + +![prototype photo1](https://github.com/pabile/P42/blob/master/docs/p42-001-small.jpg) + +42-key Ortho-linear keyboard + +* Keyboard Maintainer: [pabile](https://github.com/pabile) +* Hardware Supported: Pabile P42 PCB, Pro Micro, Bluefruit LE, Hotswap Sockets +* Hardware Availability: [pabileonline.blogspot.com](https://pabileonline.blogspot.com/) + +Make example for this keyboard (after setting up your build environment): + + make pabile/p42:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/pabile/p42/rules.mk b/keyboards/pabile/p42/rules.mk new file mode 100644 index 0000000000..ba0ad23c8a --- /dev/null +++ b/keyboards/pabile/p42/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +UNICODE_ENABLE = yes # Unicode +IOS_DEVICE_ENABLE = no # connect to IOS Device diff --git a/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c b/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c deleted file mode 100644 index 754dc5c4dd..0000000000 --- a/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c +++ /dev/null @@ -1,268 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * This file has been automatically generated using ChibiStudio board - * generator plugin. Do not edit manually. - */ - -#include "hal.h" -#include "stm32_gpio.h" - -/*===========================================================================*/ -/* Driver local definitions. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver exported variables. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver local variables and types. */ -/*===========================================================================*/ - -/** - * @brief Type of STM32 GPIO port setup. - */ -typedef struct { - uint32_t moder; - uint32_t otyper; - uint32_t ospeedr; - uint32_t pupdr; - uint32_t odr; - uint32_t afrl; - uint32_t afrh; -} gpio_setup_t; - -/** - * @brief Type of STM32 GPIO initialization data. - */ -typedef struct { -#if STM32_HAS_GPIOA || defined(__DOXYGEN__) - gpio_setup_t PAData; -#endif -#if STM32_HAS_GPIOB || defined(__DOXYGEN__) - gpio_setup_t PBData; -#endif -#if STM32_HAS_GPIOC || defined(__DOXYGEN__) - gpio_setup_t PCData; -#endif -#if STM32_HAS_GPIOD || defined(__DOXYGEN__) - gpio_setup_t PDData; -#endif -#if STM32_HAS_GPIOE || defined(__DOXYGEN__) - gpio_setup_t PEData; -#endif -#if STM32_HAS_GPIOF || defined(__DOXYGEN__) - gpio_setup_t PFData; -#endif -#if STM32_HAS_GPIOG || defined(__DOXYGEN__) - gpio_setup_t PGData; -#endif -#if STM32_HAS_GPIOH || defined(__DOXYGEN__) - gpio_setup_t PHData; -#endif -#if STM32_HAS_GPIOI || defined(__DOXYGEN__) - gpio_setup_t PIData; -#endif -#if STM32_HAS_GPIOJ || defined(__DOXYGEN__) - gpio_setup_t PJData; -#endif -#if STM32_HAS_GPIOK || defined(__DOXYGEN__) - gpio_setup_t PKData; -#endif -} gpio_config_t; - -/** - * @brief STM32 GPIO static initialization data. - */ -static const gpio_config_t gpio_default_config = { -#if STM32_HAS_GPIOA - {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, - VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, -#endif -#if STM32_HAS_GPIOB - {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, - VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, -#endif -#if STM32_HAS_GPIOC - {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, - VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, -#endif -#if STM32_HAS_GPIOD - {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, - VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, -#endif -#if STM32_HAS_GPIOE - {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, - VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, -#endif -#if STM32_HAS_GPIOF - {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, - VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, -#endif -#if STM32_HAS_GPIOG - {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, - VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, -#endif -#if STM32_HAS_GPIOH - {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, - VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, -#endif -#if STM32_HAS_GPIOI - {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, - VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}, -#endif -#if STM32_HAS_GPIOJ - {VAL_GPIOJ_MODER, VAL_GPIOJ_OTYPER, VAL_GPIOJ_OSPEEDR, VAL_GPIOJ_PUPDR, - VAL_GPIOJ_ODR, VAL_GPIOJ_AFRL, VAL_GPIOJ_AFRH}, -#endif -#if STM32_HAS_GPIOK - {VAL_GPIOK_MODER, VAL_GPIOK_OTYPER, VAL_GPIOK_OSPEEDR, VAL_GPIOK_PUPDR, - VAL_GPIOK_ODR, VAL_GPIOK_AFRL, VAL_GPIOK_AFRH} -#endif -}; - -/*===========================================================================*/ -/* Driver local functions. */ -/*===========================================================================*/ - -static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) { - - gpiop->OTYPER = config->otyper; - gpiop->OSPEEDR = config->ospeedr; - gpiop->PUPDR = config->pupdr; - gpiop->ODR = config->odr; - gpiop->AFRL = config->afrl; - gpiop->AFRH = config->afrh; - gpiop->MODER = config->moder; -} - -static void stm32_gpio_init(void) { - - /* Enabling GPIO-related clocks, the mask comes from the - registry header file.*/ - rccResetAHB(STM32_GPIO_EN_MASK); - rccEnableAHB(STM32_GPIO_EN_MASK, true); - - /* Initializing all the defined GPIO ports.*/ -#if STM32_HAS_GPIOA - gpio_init(GPIOA, &gpio_default_config.PAData); -#endif -#if STM32_HAS_GPIOB - gpio_init(GPIOB, &gpio_default_config.PBData); -#endif -#if STM32_HAS_GPIOC - gpio_init(GPIOC, &gpio_default_config.PCData); -#endif -#if STM32_HAS_GPIOD - gpio_init(GPIOD, &gpio_default_config.PDData); -#endif -#if STM32_HAS_GPIOE - gpio_init(GPIOE, &gpio_default_config.PEData); -#endif -#if STM32_HAS_GPIOF - gpio_init(GPIOF, &gpio_default_config.PFData); -#endif -#if STM32_HAS_GPIOG - gpio_init(GPIOG, &gpio_default_config.PGData); -#endif -#if STM32_HAS_GPIOH - gpio_init(GPIOH, &gpio_default_config.PHData); -#endif -#if STM32_HAS_GPIOI - gpio_init(GPIOI, &gpio_default_config.PIData); -#endif -#if STM32_HAS_GPIOJ - gpio_init(GPIOJ, &gpio_default_config.PJData); -#endif -#if STM32_HAS_GPIOK - gpio_init(GPIOK, &gpio_default_config.PKData); -#endif -} - -/*===========================================================================*/ -/* Driver interrupt handlers. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver exported functions. */ -/*===========================================================================*/ - -/** - * @brief Early initialization code. - * @details GPIO ports and system clocks are initialized before everything - * else. - */ -void __early_init(void) { - extern void enter_bootloader_mode_if_requested(void); - enter_bootloader_mode_if_requested(); - - stm32_gpio_init(); - stm32_clock_init(); -} - -#if HAL_USE_SDC || defined(__DOXYGEN__) -/** - * @brief SDC card detection. - */ -bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { - - (void)sdcp; - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief SDC card write protection detection. - */ -bool sdc_lld_is_write_protected(SDCDriver *sdcp) { - - (void)sdcp; - /* TODO: Fill the implementation.*/ - return false; -} -#endif /* HAL_USE_SDC */ - -#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) -/** - * @brief MMC_SPI card detection. - */ -bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { - - (void)mmcp; - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief MMC_SPI card write protection detection. - */ -bool mmc_lld_is_write_protected(MMCDriver *mmcp) { - - (void)mmcp; - /* TODO: Fill the implementation.*/ - return false; -} -#endif - -/** - * @brief Board-specific initialization code. - * @todo Add your board-specific code, if any. - */ -void boardInit(void) { - -} diff --git a/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.mk b/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.mk deleted file mode 100644 index bbeb5bbff7..0000000000 --- a/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F042X6/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F042X6 diff --git a/keyboards/percent/canoe_gen2/canoe_gen2.c b/keyboards/percent/canoe_gen2/canoe_gen2.c new file mode 100644 index 0000000000..47ade5dd4f --- /dev/null +++ b/keyboards/percent/canoe_gen2/canoe_gen2.c @@ -0,0 +1,141 @@ +/* +Copyright 2020 Evy Dekkers + +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 "canoe_gen2.h" + +void keyboard_pre_init_kb(void) { + setPinOutput(E6); + writePinHigh(E6); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(E6, !led_state.caps_lock); + } + + return true; +} + +#ifdef RGB_MATRIX_ENABLE +void suspend_power_down_kb(void) { + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) { + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} + +led_config_t g_led_config = { { + // Key Matrix to LED Index + // 15, 44, 46, 48, + // 74, 75, 76 + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16 }, + { 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 13, 31 }, + { 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 30, 45, 47 }, + { 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63 }, + { 64, 65, 66, NO_LED, NO_LED, NO_LED, 67, NO_LED, NO_LED, 69, 70, NO_LED, 71, 72, 73 } +}, { + // LED Index to Physical Position + { 7, 8 }, // Esc + { 22, 8 }, // 1 + { 37, 8 }, // 2 + { 52, 8 }, // 3 + { 67, 8 }, // 4 + { 82, 8 }, // 5 + { 97, 8 }, // 6 + { 112, 8 }, // 7 + { 127, 8 }, // 8 + { 142, 8 }, // 9 + { 157, 8 }, // 0 + { 172, 8 }, // - + { 187, 8 }, // = + { 202, 8 }, // split bs + { 209, 8 }, // bs + { 217, 8 }, // split bs + { 231, 8 }, // ins + { 11, 24 }, // tab + { 30, 24 }, // q + { 45, 24 }, // w + { 60, 24 }, // e + { 75, 24 }, // r + { 90, 24 }, // t + { 104, 24 }, // y + { 119, 24 }, // u + { 134, 24 }, // i + { 149, 24 }, // o + { 164, 24 }, // p + { 179, 24 }, // [ + { 194, 24 }, // ] + { 212, 24 }, // backslash + { 231, 24 }, // del + { 11, 40 }, // caps + { 34, 40 }, // a + { 49, 40 }, // s + { 64, 40 }, // d + { 79, 40 }, // f + { 94, 40 }, // g + { 108, 40 }, // h + { 123, 40 }, // j + { 138, 40 }, // k + { 153, 40 }, // l + { 168, 40 }, // ; + { 183, 40 }, // ' + { 198, 40 }, // iso hash + { 200, 40 }, // ansi enter + { 215, 32 }, // iso enter + { 231, 40 }, // pgup + { 9, 56 }, // iso shift + { 17, 56 }, // ansi shift + { 26, 56 }, // iso nubs + { 41, 56 }, // z + { 56, 56 }, // x + { 71, 56 }, // c + { 86, 56 }, // v + { 101, 56 }, // b + { 116, 56 }, // n + { 131, 56 }, // m + { 146, 56 }, // , + { 161, 56 }, // . + { 175, 56 }, // ? + { 196, 56 }, // shift + { 217, 56 }, // up + { 231, 56 }, // pgdn + { 10, 72 }, // ctrl + { 29, 72 }, // win + { 48, 72 }, // alt + { 103, 72 }, // space + { 112, 72 }, // space + { 161, 72 }, // alt + { 176, 72 }, // fn + { 202, 72 }, // left + { 217, 72 }, // down + { 231, 72 }, // right + { 7, 40 }, // top 1 + { 119, 40 }, // top 2 + { 231, 40 } // top 3 +}, { + // LED Index to Flag + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + 1, 1, 1, 4, 4, 1, 1, 1, 1, 1, + 2, 2, 2 +} }; +#endif diff --git a/keyboards/percent/canoe_gen2/canoe_gen2.h b/keyboards/percent/canoe_gen2/canoe_gen2.h new file mode 100644 index 0000000000..d4582eef25 --- /dev/null +++ b/keyboards/percent/canoe_gen2/canoe_gen2.h @@ -0,0 +1,54 @@ +/* +Copyright 2020 Evy Dekkers + +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 . +*/ + +#pragma once +#include "quantum.h" + +// readability +#define ___ KC_NO + +#define LAYOUT_all LAYOUT_65_iso_blocker_split_bs + +#define LAYOUT_65_ansi_blocker_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k1d, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k2c, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k46, k49, k4a, k4c, k4d, k4e \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e}, \ + {k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ + {k40, k41, k42, ___, ___, ___, k46, ___, ___, k49, k4a, ___, k4c, k4d, k4e} \ +} + +#define LAYOUT_65_iso_blocker_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k1d, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k42, k46, k49, k4a, k4c, k4d, k4e \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ + {k40, k41, k42, ___, ___, ___, k46, ___, ___, k49, k4a, ___, k4c, k4d, k4e} \ +} diff --git a/keyboards/percent/canoe_gen2/config.h b/keyboards/percent/canoe_gen2/config.h new file mode 100644 index 0000000000..bac5ebb3f3 --- /dev/null +++ b/keyboards/percent/canoe_gen2/config.h @@ -0,0 +1,67 @@ +/* +Copyright 2020 Evy Dekkers + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x9C12 +#define PRODUCT_ID 0x89F0 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Percent Studio +#define PRODUCT Canoe Gen2 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS {B1,B3,B2,F5,F4} +#define MATRIX_COL_PINS {B0,D0,C6,B6,B5,B4,D7,D6,D4,D5,D3,D2,D1,F6,F7} +#define UNUSED_PINS + +/* Uncomment if your encoder doesn't react to every turn or skips */ +//#define ENCODER_RESOLUTION 2 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* Backlight configuration + */ +#define RGB_DI_PIN B7 +#define DRIVER_LED_TOTAL 77 +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 + +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT +#define RGB_MATRIX_STARTUP_HUE 0 +#define RGB_MATRIX_STARTUP_SAT 255 +#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS +#define RGB_MATRIX_STARTUP_SPD 127 +#define RGB_DISABLE_WHEN_USB_SUSPENDED true diff --git a/keyboards/percent/canoe_gen2/info.json b/keyboards/percent/canoe_gen2/info.json new file mode 100644 index 0000000000..fc8ba3e0f9 --- /dev/null +++ b/keyboards/percent/canoe_gen2/info.json @@ -0,0 +1,162 @@ +{ + "keyboard_name": "Canoe Gen2", + "url": "", + "maintainer": "evyd13", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_blocker_split_bs": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + }, + "LAYOUT_65_iso_blocker_split_bs": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + {"x":15, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":15, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/percent/canoe_gen2/keymaps/default/keymap.c b/keyboards/percent/canoe_gen2/keymaps/default/keymap.c new file mode 100644 index 0000000000..bd30836d36 --- /dev/null +++ b/keyboards/percent/canoe_gen2/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +/* +Copyright 2020 Evy Dekkers + +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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_65_ansi_blocker_split_bs( + 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_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_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, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_65_ansi_blocker_split_bs( + KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, + _______, _______, _______, _______, RGB_MOD, _______, _______, _______, _______), + +}; diff --git a/keyboards/percent/canoe_gen2/keymaps/via/keymap.c b/keyboards/percent/canoe_gen2/keymaps/via/keymap.c new file mode 100644 index 0000000000..20fcddd5e2 --- /dev/null +++ b/keyboards/percent/canoe_gen2/keymaps/via/keymap.c @@ -0,0 +1,50 @@ +/* +Copyright 2020 Evy Dekkers + +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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_all( + 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_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_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_BSLS, 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_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_all( + KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______), + +[2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______), + +[3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______), + +}; diff --git a/keyboards/percent/canoe_gen2/keymaps/via/rules.mk b/keyboards/percent/canoe_gen2/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/percent/canoe_gen2/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/percent/canoe_gen2/readme.md b/keyboards/percent/canoe_gen2/readme.md new file mode 100644 index 0000000000..ae8bf7f182 --- /dev/null +++ b/keyboards/percent/canoe_gen2/readme.md @@ -0,0 +1,17 @@ +# Canoe Gen2 + +Canoe Gen2 is a 65% from Percent with per key RGB and an adjustable foot angle. The PCB can be put into reset mode by pressing the button on the back. + +* Keyboard Maintainer: [Evyd13](https://github.com/evyd13) +* Hardware Supported: (Black) Canoe Gen2 PCB +* Hardware Availability: https://percent.studio/products/canoe-gen2 + +Make example for this keyboard (after setting up your build environment): + + make percent/canoe_gen2:default + +Flashing example for this keyboard: + + make percent/canoe_gen2:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/percent/canoe_gen2/rgb_matrix_kb.inc b/keyboards/percent/canoe_gen2/rgb_matrix_kb.inc new file mode 100644 index 0000000000..7a49edd3b3 --- /dev/null +++ b/keyboards/percent/canoe_gen2/rgb_matrix_kb.inc @@ -0,0 +1,65 @@ +/* +Copyright 2020 Evy Dekkers + +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 . +*/ + +RGB_MATRIX_EFFECT(indicator_gradient) +RGB_MATRIX_EFFECT(indicator_cycle_all) +RGB_MATRIX_EFFECT(indicator_static) + +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static bool indicator_static(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + for (uint8_t i = led_min ; i < 74; i++) { + rgb_matrix_set_color(i, 0x00, 0x00, 0x00); + } + for (uint8_t i = 74 ; i < led_max; i++) { + rgb_matrix_set_color(i, 0xff, 0xff, 0xff); + } + return led_max < DRIVER_LED_TOTAL; +} + +bool effect_runner_indicator(effect_params_t* params, i_f effect_func) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + uint8_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 16); + for (uint8_t i = led_min; i < led_max; i++) { + if (i < 74) { + rgb_matrix_set_color(i, 0x00, 0x00, 0x00); + } else { + RGB_MATRIX_TEST_LED_FLAGS(); + RGB rgb = hsv_to_rgb(effect_func(rgb_matrix_config.hsv, (i - 74), time)); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + } + return led_max < DRIVER_LED_TOTAL; +} + +static HSV indicator_gradient_math(HSV hsv, uint8_t i, uint8_t time) { + hsv.h = g_led_config.point[i].x - time; + return hsv; +} + +bool indicator_gradient(effect_params_t* params) { return effect_runner_indicator(params, &indicator_gradient_math); } + +static HSV indicator_cycle_all_math(HSV hsv, uint8_t i, uint8_t time) { + hsv.h = time; + return hsv; +} + +bool indicator_cycle_all(effect_params_t* params) { return effect_runner_indicator(params, &indicator_cycle_all_math); } + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/keyboards/percent/canoe_gen2/rules.mk b/keyboards/percent/canoe_gen2/rules.mk new file mode 100644 index 0000000000..bde9a08fe1 --- /dev/null +++ b/keyboards/percent/canoe_gen2/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = WS2812 + +LAYOUTS = 65_ansi_blocker_split_bs 65_iso_blocker_split_bs +RGB_MATRIX_CUSTOM_KB = yes diff --git a/keyboards/handwired/onekey/blackpill_f401/chconf.h b/keyboards/phoenix/chconf.h similarity index 100% rename from keyboards/handwired/onekey/blackpill_f401/chconf.h rename to keyboards/phoenix/chconf.h diff --git a/keyboards/phoenix/config.h b/keyboards/phoenix/config.h new file mode 100644 index 0000000000..81fc3677ff --- /dev/null +++ b/keyboards/phoenix/config.h @@ -0,0 +1,50 @@ + +/* Copyright 2019 + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x456B +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ErgoKB +#define PRODUCT Phoenix + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 7 + +#define MOUSEKEY_INTERVAL 10 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 + +#define DIODE_DIRECTION ROW2COL + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define MATRIX_ROW_PINS { B1, B0, A7, A6, A5, B7 } +#define MATRIX_COL_PINS { B10, B12, B13, B14, B15, A8, A10 } + +#define HAL_USE_SERIAL TRUE +#define SPLIT_HAND_PIN B9 +#define SOFT_SERIAL_PIN A9 +#define SERIAL_USART_DRIVER SD1 +#define SERIAL_USART_TX_PAL_MODE 7 diff --git a/keyboards/phoenix/halconf.h b/keyboards/phoenix/halconf.h new file mode 100644 index 0000000000..a8db392aaa --- /dev/null +++ b/keyboards/phoenix/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the zero-copy API. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 256 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#endif + + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/keyboards/phoenix/info.json b/keyboards/phoenix/info.json new file mode 100644 index 0000000000..f1275b9de6 --- /dev/null +++ b/keyboards/phoenix/info.json @@ -0,0 +1,58 @@ +{ + "keyboard_name": "Phoenix", + "url": "ergokb.tw", + "maintainer": "ErgoKB via lschyi", + "manufacturer": "ErgoKB", + "width": 17, + "height": 8, + + "layouts": { + "LAYOUT_ergodox": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + + {"x":6, "y":5}, {"x":7, "y":5}, + {"x":7, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, + + + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + + {"x":9, "y":5}, {"x":10, "y":5}, + {"x":9, "y":6}, + {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] + }, + "LAYOUT_ergodox_pretty": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, + {"x":7, "y":6}, {"x":9, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] + } + } +} diff --git a/keyboards/phoenix/keymaps/default/keymap.c b/keyboards/phoenix/keymaps/default/keymap.c new file mode 100644 index 0000000000..909e1dbb60 --- /dev/null +++ b/keyboards/phoenix/keymaps/default/keymap.c @@ -0,0 +1,129 @@ +#include QMK_KEYBOARD_H + +enum layers { + BASE, // default layer + ARROW, // arrows + MOUSE, // mouse keys +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | ~ | | EQL | 6 | 7 | 8 | 9 | 0 | DEL | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | Q | W | E | R | T | LCTL | | EQL | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LCTL | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| LSFT | | MIN |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | MUTE |TG(2) | LSFT | LCTL | LALT | | EQL | MIN | [ | ] | TG(1) | + * `----------------------------------' `----------------------------------' + * ,-------------. ,---------------. + * | VOLD | VOL_U| | F10 | F12 | + * ,------|------|------| |------+--------+------. + * | | | LCTL | | F11 | | | + * | Space| LGUI |------| |------| MO(1) |Enter | + * | | | LSFT | | ESC | | | + * `--------------------' `----------------------' + */ +[BASE] = LAYOUT_ergodox( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LCTL, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LSFT, + KC_MUTE, TG(2), KC_LSFT, KC_LCTL, KC_LALT, + KC_VOLD, KC_VOLU, + KC_LCTL, + KC_SPC, KC_LGUI, KC_LSFT, + + KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_MINS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, TG(1), + KC_F10, KC_F12, + KC_F11, + KC_ESC, MO(1), KC_ENT), + +/* Keymap 1: Arrow layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | PgDn | PgUp | | [ | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | ~ | |------| |------| LEFT | DOWN | UP |RIGHT |Backsp| ] | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,---------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `----------------------' + */ +[ARROW] = LAYOUT_ergodox( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TILD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + + 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_LBRC, KC_TRNS, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BSPC, KC_RBRC, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS), + +/* Keymap 2: Mouse layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | WH_U | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | WH_L | WH_D | WH_R | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,---------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | BTN1 | |------| |------| | | + * | | | | | | | | + * `--------------------' `----------------------' + */ +[MOUSE] = LAYOUT_ergodox( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_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_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/phoenix/mcuconf.h b/keyboards/phoenix/mcuconf.h new file mode 100644 index 0000000000..7758cf4768 --- /dev/null +++ b/keyboards/phoenix/mcuconf.h @@ -0,0 +1,253 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F4xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F4xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_CLOCK48_REQUIRED TRUE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLM_VALUE 25 +#define STM32_PLLN_VALUE 336 +#define STM32_PLLP_VALUE 4 +#define STM32_PLLQ_VALUE 7 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV4 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_RTCPRE_VALUE 8 +#define STM32_MCO1SEL STM32_MCO1SEL_HSI +#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 +#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK +#define STM32_MCO2PRE STM32_MCO2PRE_DIV5 +#define STM32_I2SSRC STM32_I2SSRC_CKIN +#define STM32_PLLI2SN_VALUE 192 +#define STM32_PLLI2SR_VALUE 5 +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_BKPRAM_ENABLE FALSE + +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI16_PRIORITY 6 +#define STM32_IRQ_EXTI17_PRIORITY 15 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 6 +#define STM32_IRQ_EXTI20_PRIORITY 6 +#define STM32_IRQ_EXTI21_PRIORITY 15 +#define STM32_IRQ_EXTI22_PRIORITY 15 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 6 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM9 FALSE +#define STM32_GPT_USE_TIM11 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM9_IRQ_PRIORITY 7 +#define STM32_GPT_TIM11_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_USE_I2C3 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C3_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_I2C3_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * I2S driver system settings. + */ +#define STM32_I2S_USE_SPI2 FALSE +#define STM32_I2S_USE_SPI3 FALSE +#define STM32_I2S_SPI2_IRQ_PRIORITY 10 +#define STM32_I2S_SPI3_IRQ_PRIORITY 10 +#define STM32_I2S_SPI2_DMA_PRIORITY 1 +#define STM32_I2S_SPI3_DMA_PRIORITY 1 +#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2S_DMA_ERROR_HOOK(i2sp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM9 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM9_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM9 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM9_IRQ_PRIORITY 7 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 TRUE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART6 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART6_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART6 FALSE +#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART6_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART6_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_OTG1 TRUE +#define STM32_USB_OTG1_IRQ_PRIORITY 14 +#define STM32_USB_OTG1_RX_FIFO_SIZE 512 +#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1 +#define STM32_USB_OTG_THREAD_STACK_SIZE 128 +#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/keyboards/phoenix/phoenix.c b/keyboards/phoenix/phoenix.c new file mode 100644 index 0000000000..e79b35b159 --- /dev/null +++ b/keyboards/phoenix/phoenix.c @@ -0,0 +1,85 @@ +#include "hal.h" +#include "usb_main.h" +#include "phoenix.h" + +void bootmagic_lite(void) { + matrix_scan(); + wait_ms(5); + matrix_scan(); + + if ((matrix_get_row(0) & 1) || (matrix_get_row(6) & 1)) { + palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 5, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 6, PAL_MODE_OUTPUT_PUSHPULL); + led1_off(); + led2_off(); + led3_off(); + + led3_on(); + wait_ms(50); + led2_on(); + wait_ms(50); + led1_on(); + wait_ms(50); + + led3_off(); + wait_ms(50); + led2_off(); + wait_ms(50); + led1_off(); + wait_ms(50); + + bootloader_jump(); + } +} + +void keyboard_pre_init_kb(void) { + palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 5, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 6, PAL_MODE_OUTPUT_PUSHPULL); + led1_off(); + led2_off(); + led3_off(); + + keyboard_pre_init_user(); +} + +void keyboard_post_init_kb(void) { + led1_on(); + wait_ms(50); + led2_on(); + wait_ms(50); + led3_on(); + wait_ms(50); + + led1_off(); + wait_ms(50); + led2_off(); + wait_ms(50); + led3_off(); + wait_ms(50); + + keyboard_post_init_user(); +} + +void manipulate_led(uint32_t led, bool on) { + switch (led) { + case 1: + on ? led1_on() : led1_off(); + case 2: + on ? led2_on() : led2_off(); + case 3: + on ? led3_on() : led3_off(); + } +} + + +layer_state_t layer_state_set_kb(uint32_t state) { + state = layer_state_set_user(state); + + uint8_t layer = get_highest_layer(state); + manipulate_led(1, layer & 1); + manipulate_led(2, layer >> 1 & 1); + manipulate_led(3, layer >> 2 & 1); + return state; +} diff --git a/keyboards/phoenix/phoenix.h b/keyboards/phoenix/phoenix.h new file mode 100644 index 0000000000..bd8e4a30ab --- /dev/null +++ b/keyboards/phoenix/phoenix.h @@ -0,0 +1,94 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +inline void led_pin_on(uint8_t pin) { palSetPad(GPIOB, pin); }; +inline void led_pin_off(uint8_t pin) { palClearPad(GPIOB, pin); }; + +inline void led1_on(void) { led_pin_on(8); }; +inline void led2_on(void) { led_pin_on(5); }; +inline void led3_on(void) { led_pin_on(6); }; + +inline void led1_off(void) { led_pin_off(8); }; +inline void led2_off(void) { led_pin_off(5); }; +inline void led3_off(void) { led_pin_off(6); }; + +#define LAYOUT_ergodox( \ + 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, \ + \ + 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 }, \ + { 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 }, \ + { k53, k52, k51, k55, k56, k54 }, \ + \ + { k0D, k0C, k0B, k0A, k09, k08, k07 }, \ + { k1D, k1C, k1B, k1A, k19, k18, k17 }, \ + { k2D, k2C, k2B, k2A, k29, k28 }, \ + { k3D, k3C, k3B, k3A, k39, k38, k37 }, \ + { k4D, k4C, k4B, k4A, k49 }, \ + { k5A, k5B, k5C, k58, k57, k59 }, \ + } + +/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ +#define LAYOUT_ergodox_pretty( \ + L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06, \ + L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \ + L20,L21,L22,L23,L24,L25, R21,R22,R23,R24,R25,R26, \ + L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36, \ + L40,L41,L42,L43,L44, R42,R43,R44,R45,R46, \ + L55,L56, R50,R51, \ + L54, R52, \ + L53,L52,L51, R55,R54,R53 ) \ + \ + /* matrix positions */ \ + { \ + { L00, L10, L02, L03, L04, L05, L06 },\ + { L10, L11, L12, L13, L14, L15, L16 },\ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35, L36 },\ + { L40, L41, L42, L43, L44 }, \ + { L53, L52, L51, L55, L56, L54 }, \ + \ + { R00, R01, R02, R03, R04, R05, R06 },\ + { R10, R11, R12, R13, R14, R15, R16 },\ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35, R36 },\ + { R40, R41, R42, R43, R44 }, \ + { R53, R54, R55, R51, R50, R52 }, \ + } diff --git a/keyboards/phoenix/readme.md b/keyboards/phoenix/readme.md new file mode 100644 index 0000000000..a39f52359b --- /dev/null +++ b/keyboards/phoenix/readme.md @@ -0,0 +1,15 @@ +# Phoenix + +![Phoenix](https://imgur.com/adJiuMHl.jpg) + +A reborn version of Ergodox with several improved features. [More info on ErgoKB](https://www.ergokb.tw/) + +* Keyboard Maintainer: [lschyi](https://github.com/lschyi) +* Hardware Supported: Phoenix Mechanical Keyboard PCB +* Hardware Availability: [ErgoKB](https://www.ergokb.tw/products/phoenix/) + +Make example for this keyboard (after setting up your build environment): + + make phoenix:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/phoenix/rules.mk b/keyboards/phoenix/rules.mk new file mode 100644 index 0000000000..968c6548c0 --- /dev/null +++ b/keyboards/phoenix/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = STM32F401 + +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend, do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +NKRO_ENABLE = yes # USB Nkey Rollover, if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +STENO_ENABLE = no +SPLIT_KEYBOARD = yes +SERIAL_DRIVER = usart +KEYBOARD_SHARED_EP = yes + +OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE diff --git a/keyboards/pinky/3/keymaps/ninjonas/rules.mk b/keyboards/pinky/3/keymaps/ninjonas/rules.mk index 155f56ef9f..8d32e22486 100644 --- a/keyboards/pinky/3/keymaps/ninjonas/rules.mk +++ b/keyboards/pinky/3/keymaps/ninjonas/rules.mk @@ -1,2 +1,2 @@ MOUSEKEY_ENABLE = no -LINK_TIME_OPTIMIZATION_ENABLE = yes \ No newline at end of file +LTO_ENABLE = yes diff --git a/keyboards/planck/keymaps/badger/keymap.c b/keyboards/planck/keymaps/badger/keymap.c new file mode 100644 index 0000000000..3321425190 --- /dev/null +++ b/keyboards/planck/keymaps/badger/keymap.c @@ -0,0 +1,60 @@ +/* +Copyright 2020 Dan White + +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 "ortho.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY_MAC_ORTHO] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \ + MOMAC, 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, \ + KC_LCTL, KC_LALT, KC_LGUI, RAISE, P_ADJ, KC_SPC, LOWER, KC_NO, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC), + + [_MOVE_MAC_ORTHO] = LAYOUT_ortho_4x12( + KC_BACK, IJ_STEP, IJ_INTO, IJ_OUT, IJ_RUN, IJ_STOP, _______, WD_BACK, KC_HOME, KC_END, WD_FRWD, KC_NEXT, \ + _______, MM_LH, MM_MAX, MM_RH, IJ_FIND, IJ_IMPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CM_RIGHT, CM_DOWN, \ + _______, MM_UH, MM_BH, MAC_CPY, MAC_PST, IJ_IMPH, _______, IJ_REN, IJ_IMPL, IJ_DECL, IJ_USAG, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_QWERTY_LINUX_ORTHO] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \ + MOLNX, 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, \ + KC_LCTL, KC_LALT, KC_LGUI, RAISE, P_ADJ, KC_SPC, LOWER, KC_NO, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC), + + [_MOVE_LINUX_ORTHO] = LAYOUT_ortho_4x12( + _______, WM_VD1, WM_UH, WM_VD2, KC_MAC1, KC_MSTP, KC_MPLY, KC_PGUP, KC_HOME, KC_END, KC_PGDN, KC_INS, \ + _______, WM_LH, WM_MAX, WM_RH, KC_MAC2, KC_PSCR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CS_RIGHT, CS_DOWN, \ + _______, WM_VD3, WM_BH, OS_COPY, OS_PAST, KC_MPRV, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, KC_WSCH, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_RAISE] = LAYOUT_ortho_4x12( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DQUO, \ + _______, KC_UNDO, KC_CUT, OS_COPY, OS_PAST, KC_MPRV, KC_MNXT, KC_MUTE, KC_LT, KC_GT, KC_QUES, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_LOWER] = LAYOUT_ortho_4x12( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + _______, KC_4, KC_5, KC_6, KC_PMNS, KC_PSCR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, KC_QUOT, \ + _______, KC_1, KC_2, KC_3, KC_PPLS, KC_NO, KC_NO, KC_WHOM, KC_WBAK, KC_WFWD, KC_WSCH, _______, \ + _______, KC_0, KC_DOT, KC_ENT, _______, _______, _______, _______, _______, _______, _______, _______), + + [_ADJUST] = LAYOUT_ortho_4x12( + _______, NK_ON, NK_OFF, EEP_RST, RESET, KC_MSTP, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_BTN2, KC_INS, \ + _______, GE_SWAP, GE_NORM, DEBUG, AG_SWAP, AG_NORM, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, _______, \ + _______, KC_LYRC, KC_FIRST, KC_CAPS, KC_NO, KC_MPRV, KC_MNXT, KC_MUTE, KC_ACL0, KC_ACL1, KC_ACL2, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c deleted file mode 100644 index 50c0122a90..0000000000 --- a/keyboards/planck/keymaps/callum/keymap.c +++ /dev/null @@ -1,260 +0,0 @@ -#include "planck.h" -#include "action_layer.h" - -#define a KC_A -#define b KC_B -#define c KC_C -#define d KC_D -#define e KC_E -#define f KC_F -#define g KC_G -#define h KC_H -#define i KC_I -#define j KC_J -#define k KC_K -#define l KC_L -#define m KC_M -#define n KC_N -#define o KC_O -#define p KC_P -#define q KC_Q -#define r KC_R -#define s KC_S -#define t KC_T -#define u KC_U -#define v KC_V -#define w KC_W -#define x KC_X -#define y KC_Y -#define z KC_Z - -#define lalt KC_LALT -#define lctl KC_LCTL -#define lsft KC_LSFT -#define ralt KC_RALT -#define rctl KC_RCTL -#define rsft KC_RSFT - -#define n0 KC_0 -#define n1 KC_1 -#define n2 KC_2 -#define n3 KC_3 -#define n4 KC_4 -#define n5 KC_5 -#define n6 KC_6 -#define n7 KC_7 -#define n8 KC_8 -#define n9 KC_9 - -#define ampr KC_AMPR -#define astr KC_ASTR -#define at KC_AT -#define bsls KC_BSLS -#define bspc KC_BSPC -#define caps KC_CAPS -#define circ KC_CIRC -#define comm KC_COMM -#define dash A(KC_MINS) // en-dash (–); or with shift: em-dash (—) -#define del KC_DEL -#define dlr KC_DLR -#define dot KC_DOT -#define ent KC_ENT -#define eql KC_EQL -#define esc KC_ESC -#define exlm KC_EXLM -#define grv KC_GRV -#define hash KC_HASH -#define lbrc KC_LBRC -#define lcbr KC_LCBR -#define lprn KC_LPRN -#define mins KC_MINS -#define perc KC_PERC -#define pipe KC_PIPE -#define plus KC_PLUS -#define quot KC_QUOT -#define rbrc KC_RBRC -#define rcbr KC_RCBR -#define rprn KC_RPRN -#define scln KC_SCLN -#define slsh KC_SLSH -#define spc KC_SPC -#define tab KC_TAB -#define tild KC_TILD - -#define down KC_DOWN -#define home G(KC_LEFT) -#define end G(KC_RGHT) -#define up KC_UP -#define pgdn KC_PGDN -#define pgup KC_PGUP -#define left KC_LEFT -#define rght KC_RGHT - -#define tabl G(S(KC_LBRC)) -#define tabr G(S(KC_RBRC)) -#define fwd G(KC_RBRC) -#define back G(KC_LBRC) -#define slup S(A(KC_UP)) // Previous unread in Slack -#define sldn S(A(KC_DOWN)) // Next unread in Slack - -#define ctl1 C(KC_1) // Desktop 1 (6 with shift) -#define ctl2 C(KC_2) // Desktop 2 (7 with shift) -#define ctl3 C(KC_3) // Desktop 3 (8 with shift) -#define ctl4 C(KC_4) // Desktop 4 (9 with shift) -#define ctl5 C(KC_5) // Desktop 5 (10 with shift) -#define ctl6 C(KC_6) // Screenshot -#define ctl7 C(KC_7) // Brightness up -#define ctl8 C(KC_8) // Brightness down - -#define f1 KC_F1 -#define f2 KC_F2 -#define f3 KC_F3 -#define f4 KC_F4 -#define f5 KC_F5 -#define f6 KC_F6 -#define f7 KC_F7 -#define f8 KC_F8 -#define f9 KC_F9 -#define f10 KC_F10 -#define f11 KC_F11 -#define f12 KC_F12 -#define f13 KC_F13 -#define f14 KC_F14 -#define f15 KC_F15 -#define f16 KC_F16 -#define f17 KC_F17 -#define f18 KC_F18 -#define f19 KC_F19 -#define f20 KC_F20 - -#define mute KC_MUTE -#define next KC_MNXT -#define play KC_MPLY -#define prev KC_MPRV -#define vold KC_VOLD -#define volu KC_VOLU - -#define symb MO(SYMB) -#define move MO(MOVE) -#define func MO(FUNC) - -#define rset RESET -#define powr KC_POWER - -#define ____ KC_TRNS -#define xxxx KC_NO - -extern keymap_config_t keymap_config; - -enum planck_layers { - BASE, - SYMB, - MOVE, - FUNC, -}; - -enum planck_keycodes { - // Curly quotes - lcqt = SAFE_RANGE, - rcqt, - - // "Smart" mods - cmd, -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [BASE] = LAYOUT_planck_grid( - tab, q, w, f, p, g, j, l, u, y, scln, mins, - bspc, a, r, s, t, d, h, n, e, i, o, quot, - lsft, z, x, c, v, b, k, m, comm, dot, slsh, rsft, - func, lctl, lalt, cmd, move, ent, spc, symb, cmd, ralt, rctl, func - ), - - [SYMB] = LAYOUT_planck_grid( - esc, n7, n5, n3, n1, n9, n8, n0, n2, n4, n6, dash, - lcqt, at, dlr, eql, lprn, lbrc, rbrc, rprn, astr, hash, plus, rcqt, - ____, grv, pipe, bsls, lcbr, tild, circ, rcbr, ampr, exlm, perc, ____, - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ - ), - - [MOVE] = LAYOUT_planck_grid( - esc, ctl1, ctl2, ctl3, ctl4, ctl5, ctl6, home, up, end, xxxx, xxxx, - del, play, volu, tabl, tabr, slup, ctl7, left, down, rght, caps, xxxx, - ____, mute, vold, back, fwd, sldn, ctl8, pgdn, pgup, xxxx, xxxx, ____, - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ - ), - - [FUNC] = LAYOUT_planck_grid( - rset, f7, f5, f3, f1, f9, f8, f10, f2, f4, f6, xxxx, - xxxx, f17, f15, f13, f11, f19, f18, f20, f12, f14, f16, xxxx, - ____, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, ____, - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____ - ), -}; - -bool send_string_if_keydown( - keyrecord_t *record, - const char *unshifted, - const char *shifted) { - if (record->event.pressed) { - if (shifted) { - uint8_t shifts = get_mods() & MOD_MASK_SHIFT; - if (shifts) { - del_mods(shifts); - send_string(shifted); - add_mods(shifts); - } else { - send_string(unshifted); - } - } else { - send_string(unshifted); - } - } - return true; -} - -// Holding both cmd keys will instead register as cmd + ctl -bool smart_cmd(keyrecord_t *record) { - static int cmd_keys_down = 0; - - if (record->event.pressed) { - if (cmd_keys_down == 0) { - register_code(KC_LCMD); - } else { - register_code(KC_LCTL); - } - cmd_keys_down++; - } else { - if (cmd_keys_down == 1) { - unregister_code(KC_LCMD); - } else { - unregister_code(KC_LCTL); - } - cmd_keys_down--; - } - return true; -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - // The macOS shortcuts for curly quotes are horrible, so this rebinds - // them so that shift toggles single–double instead of left–right, and - // then both varieties of left quote can share one key, and both - // varieties of right quote share another. - case lcqt: - return send_string_if_keydown( - record, - SS_LALT("]"), // left single quote (‘) - SS_LALT("[")); // left double quote (“) - case rcqt: - return send_string_if_keydown( - record, - SS_LALT(SS_LSFT("]")), // right single quote (’) - SS_LALT(SS_LSFT("["))); // right double quote (”) - - // cmd + cmd -> cmd + ctl - case cmd: - return smart_cmd(record); - } - return true; -} diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md deleted file mode 100644 index 471de2b741..0000000000 --- a/keyboards/planck/keymaps/callum/readme.md +++ /dev/null @@ -1,30 +0,0 @@ -# callum’s planck layout - -This is a layout for the grid planck, built with a few ideals in mind: - -- Consistent and minimal response times should be maintained. Keys that react - differently depending on whether they are tapped or held, keys that react - differently if they are double tapped, etc. should be avoided – they - inevitably send their keycode later than a normal key – interrupting the - immediate feedback from the screen. Therefore we restrict ourselves to - chording as our only means of getting more than one symbol out of a single - physical key. - -- The hands should never need to leave the home position. The usual culprit for - this is the arrow cluster, so the arrow cluster should be as close to home as - possible. - -- There should be two of every modifier (one on each side), otherwise certain - long key combinations become hard to make. - -- It should be possible to do things you might want to do while using the mouse - with only the left hand (e.g. change tabs, navigate back or forwards in - browser history). - -- Symbols should be arranged so that the most frequently used are easiest to - reach. This includes numbers, and lower numbers are more commonly used than - higher ones. (number arrangement borrowed from [dustypomeleau’s minidox - layout][]). - -[dustypomeleau’s minidox layout]: https://github.com/qmk/qmk_firmware/tree/master/keyboards/minidox/keymaps/dustypomerleau -[keymap.c]: keymap.c diff --git a/keyboards/planck/keymaps/callum/rules.mk b/keyboards/planck/keymaps/callum/rules.mk deleted file mode 100644 index 9615222d1b..0000000000 --- a/keyboards/planck/keymaps/callum/rules.mk +++ /dev/null @@ -1,7 +0,0 @@ -BOOTMAGIC_ENABLE = no -MOUSEKEY_ENABLE = no -CONSOLE_ENABLE = no -COMMAND_ENABLE = yes -MIDI_ENABLE = no -AUDIO_ENABLE = yes -RGBLIGHT_ENABLE = no diff --git a/keyboards/planck/keymaps/dcompact/keymap.c b/keyboards/planck/keymaps/dcompact/keymap.c index cb4cd3f5b9..0b48f30ac4 100644 --- a/keyboards/planck/keymaps/dcompact/keymap.c +++ b/keyboards/planck/keymaps/dcompact/keymap.c @@ -26,6 +26,20 @@ #define WKSP_U LALT(LCTL(KC_UP)) #define WKSP_R LALT(LCTL(KC_RGHT)) +#define AM_CYC A(S(KC_SPC)) +#define AM_SHR A(S(KC_COMM)) +#define AM_GRW A(S(KC_DOT)) +#define AM_REL A(S(KC_Z)) +#define AM_LFT A(S(KC_H)) +#define AM_RGH A(S(KC_L)) +#define AM_CW A(S(KC_K)) +#define AM_CCW A(S(KC_J)) +#define AM_TLL A(S(KC_1)) +#define AM_TLW A(S(KC_2)) +#define AM_BSP A(S(KC_3)) +#define AM_FUL A(S(KC_4)) + + extern keymap_config_t keymap_config; enum planck_layers { @@ -78,19 +92,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Lower * ,-----------------------------------------------------------------------------------. - * | | | | | | | | Home |PgDwn | PgUp | End | | + * | |AmCycl|AmShrk|AmGrow|AmReld| | | Home |PgDwn | PgUp | End | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | |PrScr | Menu | | | | | Left | Down | Up |Right | | + * | |AmLeft|AmCcw |AmCw |AmRght| | | Left | Down | Up |Right | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |CapsLk|NumLck| Ins | | | |WkLeft|WkDown| WkUp |WkRigh| | + * | |AmTall|AmTllW|AmBsp |AmFull| | |WkLeft|WkDown| WkUp |WkRigh| | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | |Raise | | | | | * `-----------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_planck_grid( - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, - XXXXXXX, KC_PSCR, KC_MENU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, - XXXXXXX, KC_CAPS, KC_LNUM, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, WKSP_L, WKSP_D, WKSP_U, WKSP_R, XXXXXXX, + XXXXXXX, AM_CYC, AM_SHR, AM_GRW, AM_REL, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, + XXXXXXX, AM_LFT, AM_CCW, AM_CW, AM_RGH, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, + XXXXXXX, AM_TLL, AM_TLW, AM_BSP, AM_FUL, XXXXXXX, XXXXXXX, WKSP_L, WKSP_D, WKSP_U, WKSP_R, XXXXXXX, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), diff --git a/keyboards/planck/keymaps/gitdrik/config.h b/keyboards/planck/keymaps/gitdrik/config.h new file mode 100644 index 0000000000..0acf06dc54 --- /dev/null +++ b/keyboards/planck/keymaps/gitdrik/config.h @@ -0,0 +1,56 @@ +/* Original code probably 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 . + */ + +/* Passed along from planck default to Finnish SFS 5966 by gitdrik, 2020. */ + +#pragma once + +#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 + +/* + * 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 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 diff --git a/keyboards/planck/keymaps/gitdrik/keymap.c b/keyboards/planck/keymaps/gitdrik/keymap.c new file mode 100644 index 0000000000..bdaef20763 --- /dev/null +++ b/keyboards/planck/keymaps/gitdrik/keymap.c @@ -0,0 +1,231 @@ +/* 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 . + */ + +/* Modified from planck default to Finnish SFS 5966 by gitdrik, 2020. */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +enum planck_layers { + _BASE, + _LEFT, + _RIGHT, + _LEFTER, + _RIGHTER +}; + +#define LEFT TT(_LEFT) +#define RIGHT MO(_RIGHT) +#define LEFTER MO(_LEFTER) +#define RIGHTER MO(_RIGHTER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Base + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Å | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | Ö | Ä | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Shift| X | C | V | B | N | M | , | . | Shift| Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Z | GUI | Alt |Left2 | Left |BkSpc | Spc |Right |Rghter| < | - | / | + * `-----------------------------------------------------------------------------------' + */ +[_BASE] = LAYOUT_planck_grid( + 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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LCTL, KC_LSFT, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_ENT , + KC_Z, KC_LGUI, KC_LALT, LEFTER, LEFT, KC_BSPC, KC_SPC, RIGHT, RIGHTER, KC_NUBS, KC_SLSH, LSFT(KC_7) +), + +/* Left + * ,-----------------------------------------------------------------------------------. + * | Tab | F10 | F9 | F8 | F7 | { | } | 7 | 8 | 9 | ^ | = | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | F11 | F6 | F5 | F4 | ( | ) | 4 | 5 | 6 | + | * | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | RCtrl| Shift| F3 | F2 | F1 | [ | ] | 1 | 2 | 3 | Shift| Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | F12 | GUI | Alt |Lefter| Left |BkSpc | Spc |Right | 0 | , | - | / | + * `-----------------------------------------------------------------------------------' + */ +[_LEFT] = LAYOUT_planck_grid( + KC_TRNS, KC_F10, KC_F9, KC_F8, KC_F7, RALT(KC_7), RALT(KC_0), KC_7, KC_8, KC_9, LSFT(KC_RBRC), LSFT(KC_0), + KC_TRNS, KC_F11, KC_F6, KC_F5, KC_F4, LSFT(KC_8), LSFT(KC_9), KC_4, KC_5, KC_6, KC_PPLS, KC_PAST, + KC_RCTL, KC_TRNS, KC_F3, KC_F2, KC_F1, RALT(KC_8), RALT(KC_9), KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS, + KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_COMM, KC_PMNS, KC_PSLS +), + +/* Right + * ,-----------------------------------------------------------------------------------. + * | Tab | ◌̄ | ◌̈ | ◌́ | ◌̀ | ◌̃ | ◌̆ | Home | Up | End | Ins | PgUp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | @ | $ | ° | & | # | % | Left | Down | Right| Del | PgDn | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | RCtrl| Shift| ” | « | » | ‚ „ | ‰ |PlayPs| << | >> | Shift| Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | “ | GUI | Alt |Lefter| |BkSpc | Spc |Right |Rghter| Vol- | Vol+ | Mute | + * `-----------------------------------------------------------------------------------' + */ + [_RIGHT] = LAYOUT_planck_grid( + KC_TRNS, RALT(LSFT(KC_RBRC)), KC_RBRC, KC_EQL , LSFT(KC_EQL), RALT(KC_RBRC), RALT(KC_NUHS), KC_HOME, KC_UP, KC_END , KC_INS , KC_PGUP, + KC_TRNS, RALT(KC_2), RALT(KC_4), RALT(LSFT(KC_0)), LSFT(KC_6), LSFT(KC_3), LSFT(KC_5), KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_PGDN, + KC_RCTRL, KC_TRNS, RALT(LSFT(KC_2)), RALT(LSFT(KC_4)), RALT(LSFT(KC_3)), RALT(KC_6), RALT(KC_5), KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + RALT(LSFT(KC_5)), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE +), + +/* Lefter + * ,-----------------------------------------------------------------------------------. + * | Tab | § ½ | " | € | | þ Þ | ¡ | ! | ı | œ Œ | ◌̛ ◌̉ | ◌̋ ◌̊ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | ə Ə | ß ẞ | ð Ð | ' | | | | ĸ | ◌̵ | ø Ø | æ Æ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Shift| × · | ◌̧ ◌̨ | | \ | ŋ Ŋ | µ — | ’ ‘ | ◌̣ ◌̇ | Shift| Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ʒ Ʒ | GUI | Alt |Lefter| | BkSpc| NbSp | |Rghter| | | – ◌̦ | ? | + * `-----------------------------------------------------------------------------------' + */ + [_LEFTER] = LAYOUT_planck_grid( + KC_TRNS, KC_GRV, LSFT(KC_2), RALT(KC_E), RALT(KC_R), RALT(KC_T), RALT(LSFT(KC_1)), LSFT(KC_1), RALT(KC_I), RALT(KC_O), RALT(KC_P), RALT(KC_LBRC), + KC_TRNS, RALT(KC_A),RALT(KC_S), RALT(KC_D), KC_NUHS, RALT(KC_G), RALT(KC_H), RALT(KC_J), RALT(KC_K), RALT(KC_L), RALT(KC_SCLN), RALT(KC_QUOT), + KC_TRNS, KC_TRNS, RALT(KC_X), RALT(KC_EQL), RALT(KC_V), RALT(KC_MINS), RALT(KC_N), RALT(KC_M), RALT(KC_COMM), RALT(KC_DOT), KC_TRNS, KC_TRNS, + RALT(KC_Z),KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RALT(KC_BSPC), RALT(KC_SPC), KC_TRNS, KC_TRNS, RALT(KC_NUBS), RALT(KC_SLSH), LSFT(KC_MINS) +), + +/* Righter + * ,-----------------------------------------------------------------------------------. + * | | Reset| Debug| | | | |WheLft| MUp |WheRgt| MBt2 | WheUp| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | MBt4 | MBt3 | MBt2 | MBt1 | | | MLeft| MDown|MRight| MBt1 | WheDn| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |MUSmod|Mus on|Musoff| | | MBt1 | MBt2 | MBt3 | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | |Rghter|Light-|Light+| | + * `-----------------------------------------------------------------------------------' + */ + [_RIGHTER] = LAYOUT_planck_grid( + KC_TRNS, RESET, DEBUG, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_L, KC_MS_U, KC_WH_R, KC_BTN2, KC_WH_U, + KC_TRNS, KC_BTN4, KC_BTN3, KC_BTN2, KC_BTN1, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, KC_WH_D, + KC_TRNS, KC_TRNS, MU_MOD, MU_ON, MU_OFF, KC_NO, KC_NO, KC_BTN1, KC_BTN2, KC_BTN3, KC_TRNS, KC_TRNS, + KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_BRID, KC_BRIU, KC_NO +), + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update(bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RIGHT)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_DOWN); + #else + tap_code(KC_PGDN); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_UP); + #else + tap_code(KC_PGUP); + #endif + } + } +} + +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: { +#ifdef AUDIO_ENABLE + static bool play_sound = false; +#endif + if (active) { +#ifdef AUDIO_ENABLE + if (play_sound) { PLAY_SONG(plover_song); } +#endif + layer_on(_LEFTER); + } else { +#ifdef AUDIO_ENABLE + if (play_sound) { PLAY_SONG(plover_gb_song); } +#endif + layer_off(_LEFTER); + } +#ifdef AUDIO_ENABLE + play_sound = true; +#endif + break; + } + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } +} + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case _LEFTER: + return false; + default: + return true; + } +} diff --git a/keyboards/planck/keymaps/gitdrik/readme.md b/keyboards/planck/keymaps/gitdrik/readme.md new file mode 100644 index 0000000000..f064565182 --- /dev/null +++ b/keyboards/planck/keymaps/gitdrik/readme.md @@ -0,0 +1 @@ +# Finnish SFS 5966 layout by gitdrik 2020. diff --git a/keyboards/planck/keymaps/gitdrik/rules.mk b/keyboards/planck/keymaps/gitdrik/rules.mk new file mode 100644 index 0000000000..67528de9c8 --- /dev/null +++ b/keyboards/planck/keymaps/gitdrik/rules.mk @@ -0,0 +1,3 @@ +SRC += muse.c +MOUSEKEY_ENABLE = yes +AUDIO_ENABLE = yes diff --git a/keyboards/planck/keymaps/narze/keymap.c b/keyboards/planck/keymaps/narze/keymap.c index c878cf9e44..81cb68ecc9 100644 --- a/keyboards/planck/keymaps/narze/keymap.c +++ b/keyboards/planck/keymaps/narze/keymap.c @@ -330,12 +330,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // 1. Hold for LGUI, tap for Underscore case GUI_UNDS: - perform_space_cadet(record, KC_LGUI, KC_LSFT, KC_MINS); + perform_space_cadet(record, keycode, KC_LGUI, KC_LSFT, KC_MINS); return false; // 2. Hold for LSHIFT, tap for Parens open case LSFT_LPRN: - perform_space_cadet(record, KC_LSFT, KC_LSFT, KC_9); + perform_space_cadet(record, keycode, KC_LSFT, KC_LSFT, KC_9); return false; default: @@ -357,7 +357,7 @@ void matrix_setup(void) { void matrix_scan_user(void) { } -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { if (pressed) { switch(combo_index) { case CB_SUPERDUPER: diff --git a/keyboards/planck/keymaps/oryx/rules.mk b/keyboards/planck/keymaps/oryx/rules.mk index fb44d6b95e..7657a30434 100644 --- a/keyboards/planck/keymaps/oryx/rules.mk +++ b/keyboards/planck/keymaps/oryx/rules.mk @@ -1,6 +1,6 @@ SRC += muse.c # Set any rules.mk overrides for your specific keymap here. # See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes COMMAND_ENABLE = no MOUSEKEY_ENABLE = no diff --git a/keyboards/planck/keymaps/pevecyan/keymap.c b/keyboards/planck/keymaps/pevecyan/keymap.c index 57f9f0e7f9..d2a0c85159 100644 --- a/keyboards/planck/keymaps/pevecyan/keymap.c +++ b/keyboards/planck/keymaps/pevecyan/keymap.c @@ -44,7 +44,7 @@ enum planck_keycodes { #define CAPS MO(_CAPS) #define ALTGR MO(_ALTGR) #define MEMA MO(_MEMA) -#define CARON LT(_CARON, SI_QOT) +#define CARON LT(_CARON, SI_QUOT) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -52,56 +52,57 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | E | R | T | Z | U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | CAPS | A | S | D | F | G | H | J | K | L | ; | " | + * | CAPS | A | S | D | F | G | H | J | K | L |CARON |Enter | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Y | X | C | V | B | N | M | , | . | / |Enter | + * | Shift| Y | X | C | V | B | N | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | Ctrl | GUI | Alt | GUI |LOWER | Space |RAISE | ALTGR| MEMA | F12 | F5 | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = LAYOUT_planck_grid( KC_TAB, SI_Q, SI_W, SI_E, SI_R, SI_T, SI_Z, SI_U, SI_I, SI_O, SI_P, KC_BSPC, CAPS, SI_A, SI_S, SI_D, SI_F, SI_G, SI_H, SI_J, SI_K, SI_L, CARON, KC_ENT, - KC_LSFT, SI_Y, SI_X, SI_C, SI_V, SI_B, SI_N, SI_M, SI_COMM, SI_DOT, SI_MINS, KC_RSFT , - KC_LCTL, KC_LALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, ALTGR, MEMA, KC_F12, KC_F5 + KC_LSFT, SI_Y, SI_X, SI_C, SI_V, SI_B, SI_N, SI_M, SI_COMM, SI_DOT, SI_MINS, KC_RSFT, + KC_LCTL, KC_LALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, ALTGR, MEMA, KC_F12, KC_F5 ), /* Lower * ,-----------------------------------------------------------------------------------. * | ~ | ! | " | # | $ | % | & | / | ( | ) | = | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * | | F1 | F2 | F3 | F4 | F5 | F6 | ? | * | ` | + | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * | | F7 | F8 | F9 | F10 | F11 | F12 | | < | > | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | + * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_planck_grid( - SI_TILD, SI_EXLM, SI_DQOT, KC_HASH, SI_DLR, SI_PERC, SI_AMPR, SI_SLSH, SI_LPRN, SI_RPRN, SI_EQL, _______, - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_MINS, KC_PPLS, KC_ENT, - _______, 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 -), + SI_TILD, SI_EXLM, SI_DQUO, KC_HASH, SI_DLR, SI_PERC, SI_AMPR, SI_SLSH, SI_LPRN, SI_RPRN, SI_EQL, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, SI_QUES, SI_ASTR, SI_GRV, SI_PLUS, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, SI_LABK, SI_RABK, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* Raise * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * | Del | | | | | | | - | = | [ | ] | \ | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * | | | | | | | |ISO # |ISO / |Pg Up |Pg Dn | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ [_RAISE] = LAYOUT_planck_grid( - 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 + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), + /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. * | | Reset| | | | | | | | | | Del | @@ -120,18 +121,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -[_ALTGR] = LAYOUT_planck_grid( - _______, ALTG(KC_Q), ALTG(KC_W), ALTG(KC_E), _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, ALTG(KC_F), ALTG(KC_G), _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, ALTG(KC_V), ALTG(KC_B), ALTG(KC_N), _______, ALTG(KC_COMM), ALTG(KC_DOT), _______, _______ , - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* Altgr <> + * ,-----------------------------------------------------------------------------------. + * | | \ | | | € | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | [ | ] | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | @ | { | } | | < | > | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ALTGR] = LAYOUT_planck_grid(k + _______, SI_BSLS, SI_PIPE, SI_EURO, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, SI_LBRC, SI_RBRC, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, SI_AT, SI_LCBR, SI_RCBR, _______, SI_LABK, SI_RABK, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [_CAPS] = LAYOUT_planck_grid( - KC_ESC , KC_BSPC, KC_UP , KC_DEL , _______, _______, _______, _______, _______, _______, _______, KC_DEL , - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + KC_ESC , KC_BSPC, KC_UP , KC_DEL , _______, _______, _______, _______, _______, KC_HOME, KC_END, KC_DEL , + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, LCTL(KC_LEFT), LCTL(KC_RIGHT), _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [_MEMA] = LAYOUT_planck_grid( @@ -142,9 +154,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_CARON] = LAYOUT_planck_grid( - _______, _______, _______, _______, _______, _______, SI_ZV , _______, _______, _______, _______, _______, - _______, _______, SI_SV, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, SI_CV, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, SI_ZCAR , _______, _______, _______, _______, _______, + _______, _______, SI_SCAR, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, SI_CCAR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), diff --git a/keyboards/planck/keymaps/sascha/rules.mk b/keyboards/planck/keymaps/sascha/rules.mk index 57e5e2643e..ac69f9dbcb 100644 --- a/keyboards/planck/keymaps/sascha/rules.mk +++ b/keyboards/planck/keymaps/sascha/rules.mk @@ -1,7 +1,7 @@ AUTO_SHIFT_ENABLE = yes AUTO_SHIFT_MODIFIERS = yes UNICODE_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes ifeq ($(strip $(KEYBOARD)), planck/rev5) BACKLIGHT_ENABLE = yes diff --git a/keyboards/planck/keymaps/tylerwince/rules.mk b/keyboards/planck/keymaps/tylerwince/rules.mk index a4f1a0b84f..2c1585883f 100644 --- a/keyboards/planck/keymaps/tylerwince/rules.mk +++ b/keyboards/planck/keymaps/tylerwince/rules.mk @@ -1,7 +1,7 @@ SRC += muse.c # Set any rules.mk overrides for your specific keymap here. # See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes COMMAND_ENABLE = no MOUSEKEY_ENABLE = no TAP_DANCE_ENABLE=yes diff --git a/keyboards/planck/keymaps/winternebs/config.h b/keyboards/planck/keymaps/winternebs/config.h new file mode 100755 index 0000000000..eec8a93762 --- /dev/null +++ b/keyboards/planck/keymaps/winternebs/config.h @@ -0,0 +1,61 @@ +/* Copyright 2020 winterNebs + * + * 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 . + */ + +#pragma once +/* +#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 +*/ +/* + * 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 + +// Most tactile encoders have detents every 4 stages +//#define ENCODER_RESOLUTION 4 + +//Mouse stuff +#define MOUSEKEY_DELAY 60 +#define MOUSEKEY_INTERVAL 8 +#define MOUSEKEY_MAX_SPEED 3 +#define MOUSEKEY_TIME_TO_MAX 0 +#define FORCE_NKRO diff --git a/keyboards/planck/keymaps/winternebs/keymap.c b/keyboards/planck/keymaps/winternebs/keymap.c new file mode 100755 index 0000000000..259603faf5 --- /dev/null +++ b/keyboards/planck/keymaps/winternebs/keymap.c @@ -0,0 +1,162 @@ +/* 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 QMK_KEYBOARD_H + + +enum planck_layers { + _QWERTY, + _WORKMAN, + _LOWER, + _ADJUST, +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + WORKMAN, + LOWER, +}; + +#define ADJUST MO(_ADJUST) +//#define LOWER MO(_LOWER) + +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 |Lower |Space |Space |Adjust| | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_grid( + 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, KC_ENT , + KC_LCTL, KC_LGUI, _______, KC_LALT, LOWER, KC_SPC, KC_SPC, ADJUST, _______, KC_LEFT, KC_DOWN, KC_RGHT +), +/* Workman + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | D | R | W | B | J | F | U | P | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | H | T | G | Y | N | E | O | I | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | M | C | V | K | L | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | | Alt |Lower |Space | Bksp |Adjust| | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_WORKMAN] = LAYOUT_planck_grid( + KC_ESC, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + KC_LCTL, KC_LGUI, _______, KC_LALT, LOWER, KC_SPC, KC_BSPC, ADJUST, _______, KC_LEFT, KC_DOWN, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | |Pg Up | UP |Pg Dn | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |PrScr | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_grid( + 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_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_PGUP, KC_UP, KC_PGDN, + _______, _______, KC_PSCR, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Adjust (Lower + Raise) + * ,----------------------------------------------------------------------------------- + * |RESET |DEBUG| |Aud on|Audoff| | | | | | |Reset | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | |QWERTY|WORKMAN| | | Help | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Home | End | VOL+ | Play | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | NKRO | | | | | | | | Prev | VOL- | Next | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + RESET, DEBUG, _______, _______, AU_ON, AU_OFF, _______, _______, _______, _______, _______, _______ , + _______, _______, _______, QWERTY, WORKMAN , _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, KC_VOLU, KC_MPLY, + MAGIC_TOGGLE_NKRO, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT +) +}; + + + + +bool held[7][6] = {{false}}; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if(record->event.key.row != 3 && record->event.key.row != 7 ){ + held[record->event.key.row][record->event.key.col] = record->event.pressed; + } + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case WORKMAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_WORKMAN); + } + return false; + break; + case LOWER: + if(record->event.pressed){ + print("registered\n"); + for(int i = 0; i < 7; i++){ + for(int j = 0; j < 6; j++){ + if(held[i][j]){ + tap_code(pgm_read_word(&keymaps[_LOWER][i][j])); + } + } + } + layer_on(_LOWER); + return false; + } + + layer_off(_LOWER); + return false; + break; + } + return true; +} + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + } +} diff --git a/keyboards/planck/keymaps/winternebs/readme.md b/keyboards/planck/keymaps/winternebs/readme.md new file mode 100755 index 0000000000..d2040854ce --- /dev/null +++ b/keyboards/planck/keymaps/winternebs/readme.md @@ -0,0 +1 @@ +# winterNebs' Planck keymap diff --git a/keyboards/planck/keymaps/winternebs/rules.mk b/keyboards/planck/keymaps/winternebs/rules.mk new file mode 100755 index 0000000000..dcf16bef39 --- /dev/null +++ b/keyboards/planck/keymaps/winternebs/rules.mk @@ -0,0 +1 @@ +SRC += muse.c diff --git a/keyboards/ploopyco/mouse/config.h b/keyboards/ploopyco/mouse/config.h new file mode 100644 index 0000000000..787eb9a85e --- /dev/null +++ b/keyboards/ploopyco/mouse/config.h @@ -0,0 +1,73 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5043 +#define PRODUCT_ID 0x4D6F +#define DEVICE_VER 0x0001 +#define MANUFACTURER Ploopyco +#define PRODUCT Mouse + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 8 + +/* + * 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 DIRECT_PINS \ + { \ + { D4, D2, E6, B6, D7, C6, C7, B7 } \ + } + +// These pins are not broken out, and cannot be used normally. +// They are set as output and pulled high, by default +#define UNUSED_PINS \ + { B4, D6, F1, F5, F6, F7 } + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Much more so than a keyboard, speed matters for a mouse. So we'll go for as high + a polling rate as possible. */ +#define USB_POLLING_INTERVAL_MS 1 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 3 diff --git a/keyboards/ploopyco/mouse/info.json b/keyboards/ploopyco/mouse/info.json new file mode 100644 index 0000000000..6763838dcf --- /dev/null +++ b/keyboards/ploopyco/mouse/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "PloopyCo Mouse", + "url": "", + "maintainer": "drashna", + "width": 8, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":1, "y":0, "h":2}, + {"x":2, "y":0, "h":2}, + {"x":3, "y":0.25, "h":1.25}, + {"x":4, "y":0, "h":2}, + {"x":5, "y":0, "h":2}, + {"x":0, "y":0}, + {"x":0, "y":1}, + {"x":3, "y":1.5} + ] + } + } +} diff --git a/keyboards/ploopyco/mouse/keymaps/default/keymap.c b/keyboards/ploopyco/mouse/keymaps/default/keymap.c new file mode 100644 index 0000000000..c02d23d2ab --- /dev/null +++ b/keyboards/ploopyco/mouse/keymaps/default/keymap.c @@ -0,0 +1,23 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(/* Base */ + C(KC_C), KC_BTN1, KC_BTN3, KC_BTN2, C(KC_C), KC_BTN4, KC_BTN5, C(KC_Z)), +}; diff --git a/keyboards/ploopyco/mouse/keymaps/default/readme.md b/keyboards/ploopyco/mouse/keymaps/default/readme.md new file mode 100644 index 0000000000..f965ef3c32 --- /dev/null +++ b/keyboards/ploopyco/mouse/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Ploopyco Trackball diff --git a/keyboards/ploopyco/mouse/keymaps/via/keymap.c b/keyboards/ploopyco/mouse/keymaps/via/keymap.c new file mode 100644 index 0000000000..27a0384381 --- /dev/null +++ b/keyboards/ploopyco/mouse/keymaps/via/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(/* Base */ + C(KC_C), KC_BTN1, KC_BTN3, KC_BTN2, C(KC_C), KC_BTN4, KC_BTN5, C(KC_Z)), + [1] = LAYOUT(_______, _______, _______, _______, _______, _______, _______, _______), + [2] = LAYOUT(_______, _______, _______, _______, _______, _______, _______, _______), + [3] = LAYOUT(_______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/keyboards/ploopyco/mouse/keymaps/via/rules.mk b/keyboards/ploopyco/mouse/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/ploopyco/mouse/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/ploopyco/mouse/mouse.c b/keyboards/ploopyco/mouse/mouse.c new file mode 100644 index 0000000000..6a9bffbffe --- /dev/null +++ b/keyboards/ploopyco/mouse/mouse.c @@ -0,0 +1,237 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 QMK_KEYBOARD_H + +#ifndef OPT_DEBOUNCE +# define OPT_DEBOUNCE 5 // (ms) Time between scroll events +#endif +#ifndef SCROLL_BUTT_DEBOUNCE +# define SCROLL_BUTT_DEBOUNCE 100 // (ms) Time between scroll events +#endif +#ifndef OPT_THRES +# define OPT_THRES 150 // (0-1024) Threshold for actication +#endif +#ifndef OPT_SCALE +# define OPT_SCALE 1 // Multiplier for wheel +#endif + +// TODO: Implement libinput profiles +// https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html +// Compile time accel selection +// Valid options are ACC_NONE, ACC_LINEAR, ACC_CUSTOM, ACC_QUADRATIC + +// Trackball State +bool is_scroll_clicked = false; +bool BurstState = false; // init burst state for Trackball module +uint16_t MotionStart = 0; // Timer for accel, 0 is resting state +uint16_t lastScroll = 0; // Previous confirmed wheel event +uint16_t lastMidClick = 0; // Stops scrollwheel from being read if it was pressed +uint8_t OptLowPin = OPT_ENC1; +bool debug_encoder = false; + +__attribute__((weak)) void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v) { + mouse_report->h = h; + mouse_report->v = v; +} + +__attribute__((weak)) void process_wheel(report_mouse_t* mouse_report) { + // TODO: Replace this with interrupt driven code, polling is S L O W + // Lovingly ripped from the Ploopy Source + + // If the mouse wheel was just released, do not scroll. + if (timer_elapsed(lastMidClick) < SCROLL_BUTT_DEBOUNCE) { + return; + } + + // Limit the number of scrolls per unit time. + if (timer_elapsed(lastScroll) < OPT_DEBOUNCE) { + return; + } + + // Don't scroll if the middle button is depressed. + if (is_scroll_clicked) { +#ifndef IGNORE_SCROLL_CLICK + return; +#endif + } + + lastScroll = timer_read(); + uint16_t p1 = adc_read(OPT_ENC1_MUX); + uint16_t p2 = adc_read(OPT_ENC2_MUX); + if (debug_encoder) dprintf("OPT1: %d, OPT2: %d\n", p1, p2); + + uint8_t dir = opt_encoder_handler(p1, p2); + + if (dir == 0) return; + process_wheel_user(mouse_report, mouse_report->h, (int)(mouse_report->v + (dir * OPT_SCALE))); +} + +__attribute__((weak)) void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { + mouse_report->x = x; + mouse_report->y = y; +} + +__attribute__((weak)) void process_mouse(report_mouse_t* mouse_report) { + report_pmw_t data = pmw_read_burst(); + if (data.isOnSurface && data.isMotion) { + // Reset timer if stopped moving + if (!data.isMotion) { + if (MotionStart != 0) MotionStart = 0; + return; + } + + // Set timer if new motion + if ((MotionStart == 0) && data.isMotion) { + if (debug_mouse) dprintf("Starting motion.\n"); + MotionStart = timer_read(); + } + + if (debug_mouse) { + dprintf("Delt] d: %d t: %u\n", abs(data.dx) + abs(data.dy), MotionStart); + } + if (debug_mouse) { + dprintf("Pre ] X: %d, Y: %d\n", data.dx, data.dy); + } +#if defined(PROFILE_LINEAR) + float scale = float(timer_elaspsed(MotionStart)) / 1000.0; + data.dx *= scale; + data.dy *= scale; +#elif defined(PROFILE_INVERSE) + // TODO +#else + // no post processing +#endif + // apply multiplier + // data.dx *= mouse_multiplier; + // data.dy *= mouse_multiplier; + + // Wrap to HID size + data.dx = constrain(data.dx, -127, 127); + data.dy = constrain(data.dy, -127, 127); + if (debug_mouse) dprintf("Cons] X: %d, Y: %d\n", data.dx, data.dy); + // dprintf("Elapsed:%u, X: %f Y: %\n", i, pgm_read_byte(firmware_data+i)); + + process_mouse_user(mouse_report, data.dx, data.dy); + } +} + +bool process_record_kb(uint16_t keycode, keyrecord_t* record) { + if (debug_mouse) { + dprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); + } + + // Update Timer to prevent accidental scrolls + if ((record->event.key.col == 2) && (record->event.key.row == 0)) { + lastMidClick = timer_read(); + is_scroll_clicked = record->event.pressed; + } + +/* If Mousekeys is disabled, then use handle the mouse button + * keycodes. This makes things simpler, and allows usage of + * the keycodes in a consistent manner. But only do this if + * Mousekeys is not enable, so it's not handled twice. + */ +#ifndef MOUSEKEY_ENABLE + if (IS_MOUSEKEY_BUTTON(keycode)) { + report_mouse_t currentReport = pointing_device_get_report(); + if (record->event.pressed) { + if (keycode == KC_MS_BTN1) + currentReport.buttons |= MOUSE_BTN1; + else if (keycode == KC_MS_BTN2) + currentReport.buttons |= MOUSE_BTN2; + else if (keycode == KC_MS_BTN3) + currentReport.buttons |= MOUSE_BTN3; + else if (keycode == KC_MS_BTN4) + currentReport.buttons |= MOUSE_BTN4; + else if (keycode == KC_MS_BTN5) + currentReport.buttons |= MOUSE_BTN5; + } else { + if (keycode == KC_MS_BTN1) + currentReport.buttons &= ~MOUSE_BTN1; + else if (keycode == KC_MS_BTN2) + currentReport.buttons &= ~MOUSE_BTN2; + else if (keycode == KC_MS_BTN3) + currentReport.buttons &= ~MOUSE_BTN3; + else if (keycode == KC_MS_BTN4) + currentReport.buttons &= ~MOUSE_BTN4; + else if (keycode == KC_MS_BTN5) + currentReport.buttons &= ~MOUSE_BTN5; + } + pointing_device_set_report(currentReport); + } +#endif + + return process_record_user(keycode, record); +} + +// Hardware Setup +void keyboard_pre_init_kb(void) { + // debug_enable = true; + // debug_matrix = true; + // debug_mouse = true; + // debug_encoder = true; + + setPinInput(OPT_ENC1); + setPinInput(OPT_ENC2); + + // This is the debug LED. + setPinOutput(F7); + writePin(F7, debug_enable); + + /* Ground all output pins connected to ground. This provides additional + * pathways to ground. If you're messing with this, know this: driving ANY + * of these pins high will cause a short. On the MCU. Ka-blooey. + */ +#ifdef UNUSED_PINS + const pin_t unused_pins[] = UNUSED_PINS; + + for (uint8_t i = 0; i < (sizeof(unused_pins) / sizeof(pin_t)); i++) { + setPinOutput(unused_pins[i]); + writePinLow(unused_pins[i]); + } +#endif + keyboard_pre_init_user(); +} + +void pointing_device_init(void) { + // initialize ball sensor + pmw_spi_init(); + // initialize the scroll wheel's optical encoder + opt_encoder_init(); +} + +bool has_report_changed (report_mouse_t first, report_mouse_t second) { + return !( + (!first.buttons && first.buttons == second.buttons) && + (!first.x && first.x == second.x) && + (!first.y && first.y == second.y) && + (!first.h && first.h == second.h) && + (!first.v && first.v == second.v) ); +} + +void pointing_device_task(void) { + report_mouse_t mouse_report = pointing_device_get_report(); + process_wheel(&mouse_report); + process_mouse(&mouse_report); + + pointing_device_set_report(mouse_report); + if (has_report_changed(mouse_report, pointing_device_get_report())) { + pointing_device_send(); + } +} diff --git a/keyboards/ploopyco/mouse/mouse.h b/keyboards/ploopyco/mouse/mouse.h new file mode 100644 index 0000000000..3c89d64d8c --- /dev/null +++ b/keyboards/ploopyco/mouse/mouse.h @@ -0,0 +1,40 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 . + */ + +#pragma once + +#include "quantum.h" +#include "spi_master.h" +#include "pmw3600.h" +#include "analog.h" +#include "opt_encoder.h" +#include "pointing_device.h" + +// Sensor defs +#define OPT_ENC1 F0 +#define OPT_ENC2 F4 +#define OPT_ENC1_MUX 0 +#define OPT_ENC2_MUX 4 + +void process_mouse(report_mouse_t* mouse_report); +void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y); +void process_wheel(report_mouse_t* mouse_report); +void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v); + +#define LAYOUT(BLL, BL, BM, BR, BRR, BF, BB, BDPI) \ + { {BL, BM, BR, BF, BB, BRR, BLL, BDPI}, } diff --git a/keyboards/ploopyco/mouse/readme.md b/keyboards/ploopyco/mouse/readme.md new file mode 100644 index 0000000000..abfa643a44 --- /dev/null +++ b/keyboards/ploopyco/mouse/readme.md @@ -0,0 +1,68 @@ +# Ploopyco Mouse + +![Ploopyco Mouse](https://i.redd.it/bf7bkzqzeti51.jpg) + +It's a DIY, QMK Powered Trackball!!!! + +Everything works. However the scroll wheel has some issues and acts very odd. + +* Keyboard Maintainer: [PloopyCo](https://github.com/ploopyco), [Drashna Jael're](https://github.com/drashna/), [Germ](https://github.com/germ/) +* Hardware Supported: ATMega32u4 8MHz(3.3v) +* Hardware Availability: [Store](https://ploopy.co), [GitHub](https://github.com/ploopyco) + +Make example for this keyboard (after setting up your build environment): + + make ploopyco/mouse:default:flash + +To jump to the bootloader, hold down "Button 4" (immediate right of the Mouse) + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +# Customzing your PloopyCo Trackball + +While the defaults are designed so that it can be plugged in and used right away, there are a number of things that you may want to change. Such as adding DPI control, or to use the ball to scroll while holding a button. To allow for this sort of control, there is a callback for both the scroll wheel and the mouse censor. + +The default behavior for this is: + +```c +void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v) { + mouse_report->h = h; + mouse_report->v = v; +} + +void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { + mouse_report->x = x; + mouse_report->y = y; +} +``` + +This should allow you to more heavily customize the behavior. + +Alternatively, the `process_wheel` and `process_mouse` functions can both be replaced too, to allow for even more functionality. + +Additionally, you can change the DPI/CPI or speed of the Mouse by calling `pmw_set_cpi` at any time. And tThe default can be changed by adding a define to the keymap's `config.h` file: + + #define PMW_CPI 1600 + +# Programming QMK-DFU onto the PloopyCo Mouse + +If you would rather have DFU on this board, you can use the QMK-DFU bootloader on the device. To do so, you want to run: + + make ploopyco/trackball:default:production + +Once you have that, you'll need to [ISP Flash](https://docs.qmk.fm/#/isp_flashing_guide) the chip with the new bootloader hex file created (or the production hex), and set the fuses: + + +| Fuse | Setting | +|----------|------------------| +| Low | `0xDF` | +| High | `0xD8` or `0x98` | +| Extended | `0xCB` | + +Original (Caterina) settings: + +| Fuse | Setting | +|----------|------------------| +| Low | `0xFF` | +| High | `0xD8` | +| Extended | `0xFE` | diff --git a/keyboards/ploopyco/mouse/rules.mk b/keyboards/ploopyco/mouse/rules.mk new file mode 100644 index 0000000000..d77431b676 --- /dev/null +++ b/keyboards/ploopyco/mouse/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +POINTING_DEVICE_ENABLE = yes +MOUSEKEY_ENABLE = no # Mouse keys + +QUANTUM_LIB_SRC += analog.c spi_master.c +SRC += pmw3600.c opt_encoder.c diff --git a/keyboards/ploopyco/opt_encoder.c b/keyboards/ploopyco/opt_encoder.c new file mode 100644 index 0000000000..44bcd5eb88 --- /dev/null +++ b/keyboards/ploopyco/opt_encoder.c @@ -0,0 +1,211 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2020 Ploopy Corporation + * + * 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 "opt_encoder.h" + +/* Setup function for the scroll wheel. Initializes + the relevant variables. */ +void opt_encoder_init(void) { + state = HIHI; + lohif = false; + hilof = false; + lowA = 1023; + highA = 0; + cLowA = false; + cHighA = false; + lowIndexA = 0; + highIndexA = 0; + lowOverflowA = false; + highOverflowA = false; + lowB = 1023; + highB = 0; + cLowB = false; + cHighB = false; + lowIndexB = 0; + highIndexB = 0; + lowOverflowB = false; + highOverflowB = false; + scrollThresholdA = 0; + scrollThresholdB = 0; +} + +int opt_encoder_handler(int curA, int curB) { + if (lowOverflowA == false || highOverflowA == false) calculateThresholdA(curA); + if (lowOverflowB == false || highOverflowB == false) calculateThresholdB(curB); + + bool LO = false; + bool HI = true; + bool sA, sB; + int ret = 0; + + if (curA < scrollThresholdA) + sA = LO; + else + sA = HI; + + if (curB < scrollThresholdB) + sB = LO; + else + sB = HI; + + if (state == HIHI) { + if (sA == LO && sB == HI) { + state = LOHI; + if (hilof) { + ret = 1; + hilof = false; + } + } else if (sA == HI && sB == LO) { + state = HILO; + if (lohif) { + ret = -1; + lohif = false; + } + } + } + + else if (state == HILO) { + if (sA == HI && sB == HI) { + state = HIHI; + hilof = true; + lohif = false; + } else if (sA == LO && sB == LO) { + state = LOLO; + hilof = true; + lohif = false; + } + } + + else if (state == LOLO) { + if (sA == HI && sB == LO) { + state = HILO; + if (lohif) { + ret = 1; + lohif = false; + } + } else if (sA == LO && sB == HI) { + state = LOHI; + if (hilof) { + ret = -1; + hilof = false; + } + } + } + + else { // state must be LOHI + if (sA == HI && sB == HI) { + state = HIHI; + lohif = true; + hilof = false; + } else if (sA == LO && sB == LO) { + state = LOLO; + lohif = true; + hilof = false; + } + } + + return ret; +} + +void calculateThresholdA(int curA) { scrollThresholdA = calculateThreshold(curA, &lowA, &highA, &cLowA, &cHighA, arLowA, arHighA, &lowIndexA, &highIndexA, &lowOverflowA, &highOverflowA); } + +void calculateThresholdB(int curB) { scrollThresholdB = calculateThreshold(curB, &lowB, &highB, &cLowB, &cHighB, arLowB, arHighB, &lowIndexB, &highIndexB, &lowOverflowB, &highOverflowB); } + +int calculateThreshold(int cur, int* low, int* high, bool* cLow, bool* cHigh, int arLow[], int arHigh[], int* lowIndex, int* highIndex, bool* lowOverflow, bool* highOverflow) { + if (cur < *low) *low = cur; + if (cur > *high) *high = cur; + + int curThresh = thresholdEquation(*low, *high); + int range = *high - *low; + + // The range is enforced to be over a certain limit because noise + // can cause erroneous readings, making these calculations unstable. + if (range >= SCROLL_THRESH_RANGE_LIM) { + if (cur < curThresh) { + if (*cHigh == true) { + // We were just high, and now we crossed to low. + // high reflects a sample of a high reading. + arHigh[*highIndex] = *high; + incrementIndex(highIndex, highOverflow); + int midpoint = ((*high - *low) / 2) + *low; + *low = midpoint; + *high = midpoint; + *cLow = false; + *cHigh = false; + } else { + *cLow = true; + } + } + if (cur > curThresh) { + if (*cLow == true) { + // We were just low, and now we crossed to high. + // low reflects a sample of a low reading. + arLow[*lowIndex] = *low; + incrementIndex(lowIndex, lowOverflow); + int midpoint = ((*high - *low) / 2) + *low; + *low = midpoint; + *high = midpoint; + *cLow = false; + *cHigh = false; + } else { + *cHigh = true; + } + } + } + + int calcHigh = 0; + if (*highOverflow == true) { + for (int i = 0; i < SCROLLER_AR_SIZE; i++) { + calcHigh += arHigh[i]; + } + calcHigh = calcHigh / SCROLLER_AR_SIZE; + } else if (*highIndex != 0) { + for (int i = 0; i < *highIndex; i++) { + calcHigh += arHigh[i]; + } + calcHigh = calcHigh / *highIndex; + } else { + calcHigh = *high; + } + + int calcLow = 0; + if (*lowOverflow == true) { + for (int i = 0; i < SCROLLER_AR_SIZE; i++) { + calcLow += arLow[i]; + } + calcLow = calcLow / SCROLLER_AR_SIZE; + } else if (*lowIndex != 0) { + for (int i = 0; i < *lowIndex; i++) { + calcLow += arLow[i]; + } + calcLow = calcLow / *lowIndex; + } else { + calcLow = *low; + } + + return thresholdEquation(calcLow, calcHigh); +} + +int thresholdEquation(int lo, int hi) { return ((hi - lo) / 3) + lo; } + +void incrementIndex(int* index, bool* ovflw) { + if (*index < SCROLLER_AR_SIZE - 1) + (*index)++; + else { + *index = 0; + *ovflw = true; + } +} diff --git a/keyboards/ploopyco/opt_encoder.h b/keyboards/ploopyco/opt_encoder.h new file mode 100644 index 0000000000..23a170d59f --- /dev/null +++ b/keyboards/ploopyco/opt_encoder.h @@ -0,0 +1,66 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2020 Ploopy Corporation + * + * 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 . + */ +#pragma once + +#include + +#ifndef SCROLLER_AR_SIZE +# define SCROLLER_AR_SIZE 31 +#endif + +#ifndef SCROLL_THRESH_RANGE_LIM +# define SCROLL_THRESH_RANGE_LIM 10 +#endif + +enum State { HIHI, HILO, LOLO, LOHI }; + +enum State state; + +/* Variables used for scroll wheel functionality. */ +bool lohif; +bool hilof; +int lowA; +int highA; +bool cLowA; +bool cHighA; +int lowIndexA; +int highIndexA; +bool lowOverflowA; +bool highOverflowA; +int lowB; +int highB; +bool cLowB; +bool cHighB; +int lowIndexB; +int highIndexB; +bool lowOverflowB; +bool highOverflowB; +int scrollThresholdA; +int scrollThresholdB; +int arLowA[SCROLLER_AR_SIZE]; +int arHighA[SCROLLER_AR_SIZE]; +int arLowB[SCROLLER_AR_SIZE]; +int arHighB[SCROLLER_AR_SIZE]; + +void calculateThresholdA(int curA); +void calculateThresholdB(int curB); +int calculateThreshold(int cur, int* low, int* high, bool* cLow, bool* cHigh, int arLow[], int arHigh[], int* lowIndex, int* highIndex, bool* lowOverflow, bool* highOverflow); +int thresholdEquation(int lo, int hi); +void incrementIndex(int* index, bool* ovflw); + +void opt_encoder_init(void); +int opt_encoder_handler(int curA, int curB); diff --git a/keyboards/ploopyco/pmw3600.c b/keyboards/ploopyco/pmw3600.c new file mode 100644 index 0000000000..93b47078ac --- /dev/null +++ b/keyboards/ploopyco/pmw3600.c @@ -0,0 +1,222 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 "pmw3600.h" +#include "pmw3600_firmware.h" +#ifdef CONSOLE_ENABLE +# include "print.h" +#endif +bool _inBurst = false; + +#ifndef PMW_CPI +# define PMW_CPI 1600 +#endif +#ifndef SPI_DIVISOR +# define SPI_DIVISOR 2 +#endif + +static const int8_t ROTATIONAL_TRANSFORM_ANGLE = 20; + +#ifdef CONSOLE_ENABLE +void print_byte(uint8_t byte) { dprintf("%c%c%c%c%c%c%c%c|", (byte & 0x80 ? '1' : '0'), (byte & 0x40 ? '1' : '0'), (byte & 0x20 ? '1' : '0'), (byte & 0x10 ? '1' : '0'), (byte & 0x08 ? '1' : '0'), (byte & 0x04 ? '1' : '0'), (byte & 0x02 ? '1' : '0'), (byte & 0x01 ? '1' : '0')); } +#endif + + +bool spi_start_adv(void) { + bool status = spi_start(SPI_SS_PIN, false, 3, SPI_DIVISOR); + wait_us(1); + return status; +} + +void spi_stop_adv(void) { + wait_us(1); + spi_stop(); +} + +spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data) { + if (reg_addr != REG_Motion_Burst) { + _inBurst = false; + } + + spi_start_adv(); + // send address of the register, with MSBit = 1 to indicate it's a write + spi_status_t status = spi_write(reg_addr | 0x80); + status = spi_write(data); + + // tSCLK-NCS for write operation + wait_us(20); + + // tSWW/tSWR (=120us) minus tSCLK-NCS. Could be shortened, but is looks like a safe lower bound + wait_us(100); + spi_stop(); + return status; +} + +uint8_t spi_read_adv(uint8_t reg_addr) { + spi_start_adv(); + // send adress of the register, with MSBit = 0 to indicate it's a read + spi_write(reg_addr & 0x7f); + + uint8_t data = spi_read(); + + // tSCLK-NCS for read operation is 120ns + wait_us(1); + + // tSRW/tSRR (=20us) minus tSCLK-NCS + wait_us(19); + + spi_stop(); + return data; +} + +void pmw_set_cpi(uint16_t cpi) { + int cpival = constrain((cpi / 100) - 1, 0, 0x77); // limits to 0--119 + + spi_start_adv(); + spi_write_adv(REG_Config1, cpival); + spi_stop(); +} + +bool pmw_spi_init(void) { + spi_init(); + _inBurst = false; + + spi_stop(); + spi_start_adv(); + spi_stop(); + + spi_write_adv(REG_Shutdown, 0xb6); // Shutdown first + wait_ms(300); + + spi_start_adv(); + wait_us(40); + spi_stop_adv(); + wait_us(40); + + spi_write_adv(REG_Power_Up_Reset, 0x5a); + wait_ms(50); + + spi_read_adv(REG_Motion); + spi_read_adv(REG_Delta_X_L); + spi_read_adv(REG_Delta_X_H); + spi_read_adv(REG_Delta_Y_L); + spi_read_adv(REG_Delta_Y_H); + + pmw_upload_firmware(); + + spi_write_adv(REG_Angle_Tune, constrain(ROTATIONAL_TRANSFORM_ANGLE, -30, 30)); + spi_stop_adv(); + + wait_ms(10); + pmw_set_cpi(PMW_CPI); + + wait_ms(1); + + return pmw_check_signature(); +} + +void pmw_upload_firmware(void) { + spi_write_adv(REG_Config2, 0x00); + + spi_write_adv(REG_SROM_Enable, 0x1d); + + wait_ms(10); + + spi_write_adv(REG_SROM_Enable, 0x18); + + spi_start_adv(); + spi_write(REG_SROM_Load_Burst | 0x80); + wait_us(15); + + unsigned char c; + for (int i = 0; i < firmware_length; i++) { + c = (unsigned char)pgm_read_byte(firmware_data + i); + spi_write(c); + wait_us(15); + } + wait_us(200); + + spi_read_adv(REG_SROM_ID); + + spi_write_adv(REG_Config2, 0x00); + + spi_stop(); + wait_ms(10); +} + +bool pmw_check_signature(void) { + uint8_t pid = spi_read_adv(REG_Product_ID); + uint8_t iv_pid = spi_read_adv(REG_Inverse_Product_ID); + uint8_t SROM_ver = spi_read_adv(REG_SROM_ID); + return (pid == 0x42 && iv_pid == 0xBD && SROM_ver == 0x04); // signature for SROM 0x04 +} + +report_pmw_t pmw_read_burst(void) { + if (!_inBurst) { +#ifdef CONSOLE_ENABLE + dprintf("burst on"); +#endif + spi_write_adv(REG_Motion_Burst, 0x00); + _inBurst = true; + } + + spi_start_adv(); + spi_write(REG_Motion_Burst); + wait_us(35); // waits for tSRAD + + report_pmw_t data; + data.motion = 0; + data.dx = 0; + data.mdx = 0; + data.dy = 0; + data.mdx = 0; + + data.motion = spi_read(); + spi_write(0x00); // skip Observation + data.dx = spi_read(); + data.mdx = spi_read(); + data.dy = spi_read(); + data.mdy = spi_read(); + + spi_stop(); + +#ifdef CONSOLE_ENABLE + print_byte(data.motion); + print_byte(data.dx); + print_byte(data.mdx); + print_byte(data.dy); + print_byte(data.mdy); + dprintf("\n"); +#endif + + data.isMotion = (data.motion & 0x80) != 0; + data.isOnSurface = (data.motion & 0x08) == 0; + data.dx |= (data.mdx << 8); + data.dx = data.dx * -1; + data.dy |= (data.mdy << 8); + // data.dy = data.dy * -1; + + spi_stop(); + + if (data.motion & 0b111) { // panic recovery, sometimes burst mode works weird. + _inBurst = false; + } + + return data; +} diff --git a/keyboards/ploopyco/pmw3600.h b/keyboards/ploopyco/pmw3600.h new file mode 100644 index 0000000000..c1d5e3badb --- /dev/null +++ b/keyboards/ploopyco/pmw3600.h @@ -0,0 +1,103 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 . + */ + +#pragma once + +#include "spi_master.h" + +// Registers +#define REG_Product_ID 0x00 +#define REG_Revision_ID 0x01 +#define REG_Motion 0x02 +#define REG_Delta_X_L 0x03 +#define REG_Delta_X_H 0x04 +#define REG_Delta_Y_L 0x05 +#define REG_Delta_Y_H 0x06 +#define REG_SQUAL 0x07 +#define REG_Raw_Data_Sum 0x08 +#define REG_Maximum_Raw_data 0x09 +#define REG_Minimum_Raw_data 0x0A +#define REG_Shutter_Lower 0x0B +#define REG_Shutter_Upper 0x0C +#define REG_Control 0x0D +#define REG_Config1 0x0F +#define REG_Config2 0x10 +#define REG_Angle_Tune 0x11 +#define REG_Frame_Capture 0x12 +#define REG_SROM_Enable 0x13 +#define REG_Run_Downshift 0x14 +#define REG_Rest1_Rate_Lower 0x15 +#define REG_Rest1_Rate_Upper 0x16 +#define REG_Rest1_Downshift 0x17 +#define REG_Rest2_Rate_Lower 0x18 +#define REG_Rest2_Rate_Upper 0x19 +#define REG_Rest2_Downshift 0x1A +#define REG_Rest3_Rate_Lower 0x1B +#define REG_Rest3_Rate_Upper 0x1C +#define REG_Observation 0x24 +#define REG_Data_Out_Lower 0x25 +#define REG_Data_Out_Upper 0x26 +#define REG_Raw_Data_Dump 0x29 +#define REG_SROM_ID 0x2A +#define REG_Min_SQ_Run 0x2B +#define REG_Raw_Data_Threshold 0x2C +#define REG_Config5 0x2F +#define REG_Power_Up_Reset 0x3A +#define REG_Shutdown 0x3B +#define REG_Inverse_Product_ID 0x3F +#define REG_LiftCutoff_Tune3 0x41 +#define REG_Angle_Snap 0x42 +#define REG_LiftCutoff_Tune1 0x4A +#define REG_Motion_Burst 0x50 +#define REG_LiftCutoff_Tune_Timeout 0x58 +#define REG_LiftCutoff_Tune_Min_Length 0x5A +#define REG_SROM_Load_Burst 0x62 +#define REG_Lift_Config 0x63 +#define REG_Raw_Data_Burst 0x64 +#define REG_LiftCutoff_Tune2 0x65 + +#ifdef CONSOLE_ENABLE +void print_byte(uint8_t byte); +#endif + +typedef struct { + int8_t motion; + bool isMotion; // True if a motion is detected. + bool isOnSurface; // True when a chip is on a surface + int16_t dx; // displacement on x directions. Unit: Count. (CPI * Count = Inch value) + int8_t mdx; + int16_t dy; // displacement on y directions. + int8_t mdy; +} report_pmw_t; + + + +bool spi_start_adv(void); +void spi_stop_adv(void); +spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data); +uint8_t spi_read_adv(uint8_t reg_addr); +bool pmw_spi_init(void); +void pmw_set_cpi(uint16_t cpi); +void pmw_upload_firmware(void); +bool pmw_check_signature(void); +report_pmw_t pmw_read_burst(void); + + +#define degToRad(angleInDegrees) ((angleInDegrees)*M_PI / 180.0) +#define radToDeg(angleInRadians) ((angleInRadians)*180.0 / M_PI) +#define constrain(amt, low, high) ((amt) < (low) ? (low) : ((amt) > (high) ? (high) : (amt))) diff --git a/keyboards/ploopyco/pmw3600_firmware.h b/keyboards/ploopyco/pmw3600_firmware.h new file mode 100644 index 0000000000..cca5a6a4d8 --- /dev/null +++ b/keyboards/ploopyco/pmw3600_firmware.h @@ -0,0 +1,300 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 . + */ + +#pragma once + +// clang-format off +// Firmware Blob foor PMW3360 +const uint16_t firmware_length = 4094; +// clang-format off +const uint8_t firmware_data[] PROGMEM = { // SROM 0x04 +0x01, 0x04, 0x8e, 0x96, 0x6e, 0x77, 0x3e, 0xfe, 0x7e, 0x5f, 0x1d, 0xb8, 0xf2, 0x66, 0x4e, +0xff, 0x5d, 0x19, 0xb0, 0xc2, 0x04, 0x69, 0x54, 0x2a, 0xd6, 0x2e, 0xbf, 0xdd, 0x19, 0xb0, +0xc3, 0xe5, 0x29, 0xb1, 0xe0, 0x23, 0xa5, 0xa9, 0xb1, 0xc1, 0x00, 0x82, 0x67, 0x4c, 0x1a, +0x97, 0x8d, 0x79, 0x51, 0x20, 0xc7, 0x06, 0x8e, 0x7c, 0x7c, 0x7a, 0x76, 0x4f, 0xfd, 0x59, +0x30, 0xe2, 0x46, 0x0e, 0x9e, 0xbe, 0xdf, 0x1d, 0x99, 0x91, 0xa0, 0xa5, 0xa1, 0xa9, 0xd0, +0x22, 0xc6, 0xef, 0x5c, 0x1b, 0x95, 0x89, 0x90, 0xa2, 0xa7, 0xcc, 0xfb, 0x55, 0x28, 0xb3, +0xe4, 0x4a, 0xf7, 0x6c, 0x3b, 0xf4, 0x6a, 0x56, 0x2e, 0xde, 0x1f, 0x9d, 0xb8, 0xd3, 0x05, +0x88, 0x92, 0xa6, 0xce, 0x1e, 0xbe, 0xdf, 0x1d, 0x99, 0xb0, 0xe2, 0x46, 0xef, 0x5c, 0x07, +0x11, 0x5d, 0x98, 0x0b, 0x9d, 0x94, 0x97, 0xee, 0x4e, 0x45, 0x33, 0x6b, 0x44, 0xc7, 0x29, +0x56, 0x27, 0x30, 0xc6, 0xa7, 0xd5, 0xf2, 0x56, 0xdf, 0xb4, 0x38, 0x62, 0xcb, 0xa0, 0xb6, +0xe3, 0x0f, 0x84, 0x06, 0x24, 0x05, 0x65, 0x6f, 0x76, 0x89, 0xb5, 0x77, 0x41, 0x27, 0x82, +0x66, 0x65, 0x82, 0xcc, 0xd5, 0xe6, 0x20, 0xd5, 0x27, 0x17, 0xc5, 0xf8, 0x03, 0x23, 0x7c, +0x5f, 0x64, 0xa5, 0x1d, 0xc1, 0xd6, 0x36, 0xcb, 0x4c, 0xd4, 0xdb, 0x66, 0xd7, 0x8b, 0xb1, +0x99, 0x7e, 0x6f, 0x4c, 0x36, 0x40, 0x06, 0xd6, 0xeb, 0xd7, 0xa2, 0xe4, 0xf4, 0x95, 0x51, +0x5a, 0x54, 0x96, 0xd5, 0x53, 0x44, 0xd7, 0x8c, 0xe0, 0xb9, 0x40, 0x68, 0xd2, 0x18, 0xe9, +0xdd, 0x9a, 0x23, 0x92, 0x48, 0xee, 0x7f, 0x43, 0xaf, 0xea, 0x77, 0x38, 0x84, 0x8c, 0x0a, +0x72, 0xaf, 0x69, 0xf8, 0xdd, 0xf1, 0x24, 0x83, 0xa3, 0xf8, 0x4a, 0xbf, 0xf5, 0x94, 0x13, +0xdb, 0xbb, 0xd8, 0xb4, 0xb3, 0xa0, 0xfb, 0x45, 0x50, 0x60, 0x30, 0x59, 0x12, 0x31, 0x71, +0xa2, 0xd3, 0x13, 0xe7, 0xfa, 0xe7, 0xce, 0x0f, 0x63, 0x15, 0x0b, 0x6b, 0x94, 0xbb, 0x37, +0x83, 0x26, 0x05, 0x9d, 0xfb, 0x46, 0x92, 0xfc, 0x0a, 0x15, 0xd1, 0x0d, 0x73, 0x92, 0xd6, +0x8c, 0x1b, 0x8c, 0xb8, 0x55, 0x8a, 0xce, 0xbd, 0xfe, 0x8e, 0xfc, 0xed, 0x09, 0x12, 0x83, +0x91, 0x82, 0x51, 0x31, 0x23, 0xfb, 0xb4, 0x0c, 0x76, 0xad, 0x7c, 0xd9, 0xb4, 0x4b, 0xb2, +0x67, 0x14, 0x09, 0x9c, 0x7f, 0x0c, 0x18, 0xba, 0x3b, 0xd6, 0x8e, 0x14, 0x2a, 0xe4, 0x1b, +0x52, 0x9f, 0x2b, 0x7d, 0xe1, 0xfb, 0x6a, 0x33, 0x02, 0xfa, 0xac, 0x5a, 0xf2, 0x3e, 0x88, +0x7e, 0xae, 0xd1, 0xf3, 0x78, 0xe8, 0x05, 0xd1, 0xe3, 0xdc, 0x21, 0xf6, 0xe1, 0x9a, 0xbd, +0x17, 0x0e, 0xd9, 0x46, 0x9b, 0x88, 0x03, 0xea, 0xf6, 0x66, 0xbe, 0x0e, 0x1b, 0x50, 0x49, +0x96, 0x40, 0x97, 0xf1, 0xf1, 0xe4, 0x80, 0xa6, 0x6e, 0xe8, 0x77, 0x34, 0xbf, 0x29, 0x40, +0x44, 0xc2, 0xff, 0x4e, 0x98, 0xd3, 0x9c, 0xa3, 0x32, 0x2b, 0x76, 0x51, 0x04, 0x09, 0xe7, +0xa9, 0xd1, 0xa6, 0x32, 0xb1, 0x23, 0x53, 0xe2, 0x47, 0xab, 0xd6, 0xf5, 0x69, 0x5c, 0x3e, +0x5f, 0xfa, 0xae, 0x45, 0x20, 0xe5, 0xd2, 0x44, 0xff, 0x39, 0x32, 0x6d, 0xfd, 0x27, 0x57, +0x5c, 0xfd, 0xf0, 0xde, 0xc1, 0xb5, 0x99, 0xe5, 0xf5, 0x1c, 0x77, 0x01, 0x75, 0xc5, 0x6d, +0x58, 0x92, 0xf2, 0xb2, 0x47, 0x00, 0x01, 0x26, 0x96, 0x7a, 0x30, 0xff, 0xb7, 0xf0, 0xef, +0x77, 0xc1, 0x8a, 0x5d, 0xdc, 0xc0, 0xd1, 0x29, 0x30, 0x1e, 0x77, 0x38, 0x7a, 0x94, 0xf1, +0xb8, 0x7a, 0x7e, 0xef, 0xa4, 0xd1, 0xac, 0x31, 0x4a, 0xf2, 0x5d, 0x64, 0x3d, 0xb2, 0xe2, +0xf0, 0x08, 0x99, 0xfc, 0x70, 0xee, 0x24, 0xa7, 0x7e, 0xee, 0x1e, 0x20, 0x69, 0x7d, 0x44, +0xbf, 0x87, 0x42, 0xdf, 0x88, 0x3b, 0x0c, 0xda, 0x42, 0xc9, 0x04, 0xf9, 0x45, 0x50, 0xfc, +0x83, 0x8f, 0x11, 0x6a, 0x72, 0xbc, 0x99, 0x95, 0xf0, 0xac, 0x3d, 0xa7, 0x3b, 0xcd, 0x1c, +0xe2, 0x88, 0x79, 0x37, 0x11, 0x5f, 0x39, 0x89, 0x95, 0x0a, 0x16, 0x84, 0x7a, 0xf6, 0x8a, +0xa4, 0x28, 0xe4, 0xed, 0x83, 0x80, 0x3b, 0xb1, 0x23, 0xa5, 0x03, 0x10, 0xf4, 0x66, 0xea, +0xbb, 0x0c, 0x0f, 0xc5, 0xec, 0x6c, 0x69, 0xc5, 0xd3, 0x24, 0xab, 0xd4, 0x2a, 0xb7, 0x99, +0x88, 0x76, 0x08, 0xa0, 0xa8, 0x95, 0x7c, 0xd8, 0x38, 0x6d, 0xcd, 0x59, 0x02, 0x51, 0x4b, +0xf1, 0xb5, 0x2b, 0x50, 0xe3, 0xb6, 0xbd, 0xd0, 0x72, 0xcf, 0x9e, 0xfd, 0x6e, 0xbb, 0x44, +0xc8, 0x24, 0x8a, 0x77, 0x18, 0x8a, 0x13, 0x06, 0xef, 0x97, 0x7d, 0xfa, 0x81, 0xf0, 0x31, +0xe6, 0xfa, 0x77, 0xed, 0x31, 0x06, 0x31, 0x5b, 0x54, 0x8a, 0x9f, 0x30, 0x68, 0xdb, 0xe2, +0x40, 0xf8, 0x4e, 0x73, 0xfa, 0xab, 0x74, 0x8b, 0x10, 0x58, 0x13, 0xdc, 0xd2, 0xe6, 0x78, +0xd1, 0x32, 0x2e, 0x8a, 0x9f, 0x2c, 0x58, 0x06, 0x48, 0x27, 0xc5, 0xa9, 0x5e, 0x81, 0x47, +0x89, 0x46, 0x21, 0x91, 0x03, 0x70, 0xa4, 0x3e, 0x88, 0x9c, 0xda, 0x33, 0x0a, 0xce, 0xbc, +0x8b, 0x8e, 0xcf, 0x9f, 0xd3, 0x71, 0x80, 0x43, 0xcf, 0x6b, 0xa9, 0x51, 0x83, 0x76, 0x30, +0x82, 0xc5, 0x6a, 0x85, 0x39, 0x11, 0x50, 0x1a, 0x82, 0xdc, 0x1e, 0x1c, 0xd5, 0x7d, 0xa9, +0x71, 0x99, 0x33, 0x47, 0x19, 0x97, 0xb3, 0x5a, 0xb1, 0xdf, 0xed, 0xa4, 0xf2, 0xe6, 0x26, +0x84, 0xa2, 0x28, 0x9a, 0x9e, 0xdf, 0xa6, 0x6a, 0xf4, 0xd6, 0xfc, 0x2e, 0x5b, 0x9d, 0x1a, +0x2a, 0x27, 0x68, 0xfb, 0xc1, 0x83, 0x21, 0x4b, 0x90, 0xe0, 0x36, 0xdd, 0x5b, 0x31, 0x42, +0x55, 0xa0, 0x13, 0xf7, 0xd0, 0x89, 0x53, 0x71, 0x99, 0x57, 0x09, 0x29, 0xc5, 0xf3, 0x21, +0xf8, 0x37, 0x2f, 0x40, 0xf3, 0xd4, 0xaf, 0x16, 0x08, 0x36, 0x02, 0xfc, 0x77, 0xc5, 0x8b, +0x04, 0x90, 0x56, 0xb9, 0xc9, 0x67, 0x9a, 0x99, 0xe8, 0x00, 0xd3, 0x86, 0xff, 0x97, 0x2d, +0x08, 0xe9, 0xb7, 0xb3, 0x91, 0xbc, 0xdf, 0x45, 0xc6, 0xed, 0x0f, 0x8c, 0x4c, 0x1e, 0xe6, +0x5b, 0x6e, 0x38, 0x30, 0xe4, 0xaa, 0xe3, 0x95, 0xde, 0xb9, 0xe4, 0x9a, 0xf5, 0xb2, 0x55, +0x9a, 0x87, 0x9b, 0xf6, 0x6a, 0xb2, 0xf2, 0x77, 0x9a, 0x31, 0xf4, 0x7a, 0x31, 0xd1, 0x1d, +0x04, 0xc0, 0x7c, 0x32, 0xa2, 0x9e, 0x9a, 0xf5, 0x62, 0xf8, 0x27, 0x8d, 0xbf, 0x51, 0xff, +0xd3, 0xdf, 0x64, 0x37, 0x3f, 0x2a, 0x6f, 0x76, 0x3a, 0x7d, 0x77, 0x06, 0x9e, 0x77, 0x7f, +0x5e, 0xeb, 0x32, 0x51, 0xf9, 0x16, 0x66, 0x9a, 0x09, 0xf3, 0xb0, 0x08, 0xa4, 0x70, 0x96, +0x46, 0x30, 0xff, 0xda, 0x4f, 0xe9, 0x1b, 0xed, 0x8d, 0xf8, 0x74, 0x1f, 0x31, 0x92, 0xb3, +0x73, 0x17, 0x36, 0xdb, 0x91, 0x30, 0xd6, 0x88, 0x55, 0x6b, 0x34, 0x77, 0x87, 0x7a, 0xe7, +0xee, 0x06, 0xc6, 0x1c, 0x8c, 0x19, 0x0c, 0x48, 0x46, 0x23, 0x5e, 0x9c, 0x07, 0x5c, 0xbf, +0xb4, 0x7e, 0xd6, 0x4f, 0x74, 0x9c, 0xe2, 0xc5, 0x50, 0x8b, 0xc5, 0x8b, 0x15, 0x90, 0x60, +0x62, 0x57, 0x29, 0xd0, 0x13, 0x43, 0xa1, 0x80, 0x88, 0x91, 0x00, 0x44, 0xc7, 0x4d, 0x19, +0x86, 0xcc, 0x2f, 0x2a, 0x75, 0x5a, 0xfc, 0xeb, 0x97, 0x2a, 0x70, 0xe3, 0x78, 0xd8, 0x91, +0xb0, 0x4f, 0x99, 0x07, 0xa3, 0x95, 0xea, 0x24, 0x21, 0xd5, 0xde, 0x51, 0x20, 0x93, 0x27, +0x0a, 0x30, 0x73, 0xa8, 0xff, 0x8a, 0x97, 0xe9, 0xa7, 0x6a, 0x8e, 0x0d, 0xe8, 0xf0, 0xdf, +0xec, 0xea, 0xb4, 0x6c, 0x1d, 0x39, 0x2a, 0x62, 0x2d, 0x3d, 0x5a, 0x8b, 0x65, 0xf8, 0x90, +0x05, 0x2e, 0x7e, 0x91, 0x2c, 0x78, 0xef, 0x8e, 0x7a, 0xc1, 0x2f, 0xac, 0x78, 0xee, 0xaf, +0x28, 0x45, 0x06, 0x4c, 0x26, 0xaf, 0x3b, 0xa2, 0xdb, 0xa3, 0x93, 0x06, 0xb5, 0x3c, 0xa5, +0xd8, 0xee, 0x8f, 0xaf, 0x25, 0xcc, 0x3f, 0x85, 0x68, 0x48, 0xa9, 0x62, 0xcc, 0x97, 0x8f, +0x7f, 0x2a, 0xea, 0xe0, 0x15, 0x0a, 0xad, 0x62, 0x07, 0xbd, 0x45, 0xf8, 0x41, 0xd8, 0x36, +0xcb, 0x4c, 0xdb, 0x6e, 0xe6, 0x3a, 0xe7, 0xda, 0x15, 0xe9, 0x29, 0x1e, 0x12, 0x10, 0xa0, +0x14, 0x2c, 0x0e, 0x3d, 0xf4, 0xbf, 0x39, 0x41, 0x92, 0x75, 0x0b, 0x25, 0x7b, 0xa3, 0xce, +0x39, 0x9c, 0x15, 0x64, 0xc8, 0xfa, 0x3d, 0xef, 0x73, 0x27, 0xfe, 0x26, 0x2e, 0xce, 0xda, +0x6e, 0xfd, 0x71, 0x8e, 0xdd, 0xfe, 0x76, 0xee, 0xdc, 0x12, 0x5c, 0x02, 0xc5, 0x3a, 0x4e, +0x4e, 0x4f, 0xbf, 0xca, 0x40, 0x15, 0xc7, 0x6e, 0x8d, 0x41, 0xf1, 0x10, 0xe0, 0x4f, 0x7e, +0x97, 0x7f, 0x1c, 0xae, 0x47, 0x8e, 0x6b, 0xb1, 0x25, 0x31, 0xb0, 0x73, 0xc7, 0x1b, 0x97, +0x79, 0xf9, 0x80, 0xd3, 0x66, 0x22, 0x30, 0x07, 0x74, 0x1e, 0xe4, 0xd0, 0x80, 0x21, 0xd6, +0xee, 0x6b, 0x6c, 0x4f, 0xbf, 0xf5, 0xb7, 0xd9, 0x09, 0x87, 0x2f, 0xa9, 0x14, 0xbe, 0x27, +0xd9, 0x72, 0x50, 0x01, 0xd4, 0x13, 0x73, 0xa6, 0xa7, 0x51, 0x02, 0x75, 0x25, 0xe1, 0xb3, +0x45, 0x34, 0x7d, 0xa8, 0x8e, 0xeb, 0xf3, 0x16, 0x49, 0xcb, 0x4f, 0x8c, 0xa1, 0xb9, 0x36, +0x85, 0x39, 0x75, 0x5d, 0x08, 0x00, 0xae, 0xeb, 0xf6, 0xea, 0xd7, 0x13, 0x3a, 0x21, 0x5a, +0x5f, 0x30, 0x84, 0x52, 0x26, 0x95, 0xc9, 0x14, 0xf2, 0x57, 0x55, 0x6b, 0xb1, 0x10, 0xc2, +0xe1, 0xbd, 0x3b, 0x51, 0xc0, 0xb7, 0x55, 0x4c, 0x71, 0x12, 0x26, 0xc7, 0x0d, 0xf9, 0x51, +0xa4, 0x38, 0x02, 0x05, 0x7f, 0xb8, 0xf1, 0x72, 0x4b, 0xbf, 0x71, 0x89, 0x14, 0xf3, 0x77, +0x38, 0xd9, 0x71, 0x24, 0xf3, 0x00, 0x11, 0xa1, 0xd8, 0xd4, 0x69, 0x27, 0x08, 0x37, 0x35, +0xc9, 0x11, 0x9d, 0x90, 0x1c, 0x0e, 0xe7, 0x1c, 0xff, 0x2d, 0x1e, 0xe8, 0x92, 0xe1, 0x18, +0x10, 0x95, 0x7c, 0xe0, 0x80, 0xf4, 0x96, 0x43, 0x21, 0xf9, 0x75, 0x21, 0x64, 0x38, 0xdd, +0x9f, 0x1e, 0x95, 0x16, 0xda, 0x56, 0x1d, 0x4f, 0x9a, 0x53, 0xb2, 0xe2, 0xe4, 0x18, 0xcb, +0x6b, 0x1a, 0x65, 0xeb, 0x56, 0xc6, 0x3b, 0xe5, 0xfe, 0xd8, 0x26, 0x3f, 0x3a, 0x84, 0x59, +0x72, 0x66, 0xa2, 0xf3, 0x75, 0xff, 0xfb, 0x60, 0xb3, 0x22, 0xad, 0x3f, 0x2d, 0x6b, 0xf9, +0xeb, 0xea, 0x05, 0x7c, 0xd8, 0x8f, 0x6d, 0x2c, 0x98, 0x9e, 0x2b, 0x93, 0xf1, 0x5e, 0x46, +0xf0, 0x87, 0x49, 0x29, 0x73, 0x68, 0xd7, 0x7f, 0xf9, 0xf0, 0xe5, 0x7d, 0xdb, 0x1d, 0x75, +0x19, 0xf3, 0xc4, 0x58, 0x9b, 0x17, 0x88, 0xa8, 0x92, 0xe0, 0xbe, 0xbd, 0x8b, 0x1d, 0x8d, +0x9f, 0x56, 0x76, 0xad, 0xaf, 0x29, 0xe2, 0xd9, 0xd5, 0x52, 0xf6, 0xb5, 0x56, 0x35, 0x57, +0x3a, 0xc8, 0xe1, 0x56, 0x43, 0x19, 0x94, 0xd3, 0x04, 0x9b, 0x6d, 0x35, 0xd8, 0x0b, 0x5f, +0x4d, 0x19, 0x8e, 0xec, 0xfa, 0x64, 0x91, 0x0a, 0x72, 0x20, 0x2b, 0xbc, 0x1a, 0x4a, 0xfe, +0x8b, 0xfd, 0xbb, 0xed, 0x1b, 0x23, 0xea, 0xad, 0x72, 0x82, 0xa1, 0x29, 0x99, 0x71, 0xbd, +0xf0, 0x95, 0xc1, 0x03, 0xdd, 0x7b, 0xc2, 0xb2, 0x3c, 0x28, 0x54, 0xd3, 0x68, 0xa4, 0x72, +0xc8, 0x66, 0x96, 0xe0, 0xd1, 0xd8, 0x7f, 0xf8, 0xd1, 0x26, 0x2b, 0xf7, 0xad, 0xba, 0x55, +0xca, 0x15, 0xb9, 0x32, 0xc3, 0xe5, 0x88, 0x97, 0x8e, 0x5c, 0xfb, 0x92, 0x25, 0x8b, 0xbf, +0xa2, 0x45, 0x55, 0x7a, 0xa7, 0x6f, 0x8b, 0x57, 0x5b, 0xcf, 0x0e, 0xcb, 0x1d, 0xfb, 0x20, +0x82, 0x77, 0xa8, 0x8c, 0xcc, 0x16, 0xce, 0x1d, 0xfa, 0xde, 0xcc, 0x0b, 0x62, 0xfe, 0xcc, +0xe1, 0xb7, 0xf0, 0xc3, 0x81, 0x64, 0x73, 0x40, 0xa0, 0xc2, 0x4d, 0x89, 0x11, 0x75, 0x33, +0x55, 0x33, 0x8d, 0xe8, 0x4a, 0xfd, 0xea, 0x6e, 0x30, 0x0b, 0xd7, 0x31, 0x2c, 0xde, 0x47, +0xe3, 0xbf, 0xf8, 0x55, 0x42, 0xe2, 0x7f, 0x59, 0xe5, 0x17, 0xef, 0x99, 0x34, 0x69, 0x91, +0xb1, 0x23, 0x8e, 0x20, 0x87, 0x2d, 0xa8, 0xfe, 0xd5, 0x8a, 0xf3, 0x84, 0x3a, 0xf0, 0x37, +0xe4, 0x09, 0x00, 0x54, 0xee, 0x67, 0x49, 0x93, 0xe4, 0x81, 0x70, 0xe3, 0x90, 0x4d, 0xef, +0xfe, 0x41, 0xb7, 0x99, 0x7b, 0xc1, 0x83, 0xba, 0x62, 0x12, 0x6f, 0x7d, 0xde, 0x6b, 0xaf, +0xda, 0x16, 0xf9, 0x55, 0x51, 0xee, 0xa6, 0x0c, 0x2b, 0x02, 0xa3, 0xfd, 0x8d, 0xfb, 0x30, +0x17, 0xe4, 0x6f, 0xdf, 0x36, 0x71, 0xc4, 0xca, 0x87, 0x25, 0x48, 0xb0, 0x47, 0xec, 0xea, +0xb4, 0xbf, 0xa5, 0x4d, 0x9b, 0x9f, 0x02, 0x93, 0xc4, 0xe3, 0xe4, 0xe8, 0x42, 0x2d, 0x68, +0x81, 0x15, 0x0a, 0xeb, 0x84, 0x5b, 0xd6, 0xa8, 0x74, 0xfb, 0x7d, 0x1d, 0xcb, 0x2c, 0xda, +0x46, 0x2a, 0x76, 0x62, 0xce, 0xbc, 0x5c, 0x9e, 0x8b, 0xe7, 0xcf, 0xbe, 0x78, 0xf5, 0x7c, +0xeb, 0xb3, 0x3a, 0x9c, 0xaa, 0x6f, 0xcc, 0x72, 0xd1, 0x59, 0xf2, 0x11, 0x23, 0xd6, 0x3f, +0x48, 0xd1, 0xb7, 0xce, 0xb0, 0xbf, 0xcb, 0xea, 0x80, 0xde, 0x57, 0xd4, 0x5e, 0x97, 0x2f, +0x75, 0xd1, 0x50, 0x8e, 0x80, 0x2c, 0x66, 0x79, 0xbf, 0x72, 0x4b, 0xbd, 0x8a, 0x81, 0x6c, +0xd3, 0xe1, 0x01, 0xdc, 0xd2, 0x15, 0x26, 0xc5, 0x36, 0xda, 0x2c, 0x1a, 0xc0, 0x27, 0x94, +0xed, 0xb7, 0x9b, 0x85, 0x0b, 0x5e, 0x80, 0x97, 0xc5, 0xec, 0x4f, 0xec, 0x88, 0x5d, 0x50, +0x07, 0x35, 0x47, 0xdc, 0x0b, 0x3b, 0x3d, 0xdd, 0x60, 0xaf, 0xa8, 0x5d, 0x81, 0x38, 0x24, +0x25, 0x5d, 0x5c, 0x15, 0xd1, 0xde, 0xb3, 0xab, 0xec, 0x05, 0x69, 0xef, 0x83, 0xed, 0x57, +0x54, 0xb8, 0x64, 0x64, 0x11, 0x16, 0x32, 0x69, 0xda, 0x9f, 0x2d, 0x7f, 0x36, 0xbb, 0x44, +0x5a, 0x34, 0xe8, 0x7f, 0xbf, 0x03, 0xeb, 0x00, 0x7f, 0x59, 0x68, 0x22, 0x79, 0xcf, 0x73, +0x6c, 0x2c, 0x29, 0xa7, 0xa1, 0x5f, 0x38, 0xa1, 0x1d, 0xf0, 0x20, 0x53, 0xe0, 0x1a, 0x63, +0x14, 0x58, 0x71, 0x10, 0xaa, 0x08, 0x0c, 0x3e, 0x16, 0x1a, 0x60, 0x22, 0x82, 0x7f, 0xba, +0xa4, 0x43, 0xa0, 0xd0, 0xac, 0x1b, 0xd5, 0x6b, 0x64, 0xb5, 0x14, 0x93, 0x31, 0x9e, 0x53, +0x50, 0xd0, 0x57, 0x66, 0xee, 0x5a, 0x4f, 0xfb, 0x03, 0x2a, 0x69, 0x58, 0x76, 0xf1, 0x83, +0xf7, 0x4e, 0xba, 0x8c, 0x42, 0x06, 0x60, 0x5d, 0x6d, 0xce, 0x60, 0x88, 0xae, 0xa4, 0xc3, +0xf1, 0x03, 0xa5, 0x4b, 0x98, 0xa1, 0xff, 0x67, 0xe1, 0xac, 0xa2, 0xb8, 0x62, 0xd7, 0x6f, +0xa0, 0x31, 0xb4, 0xd2, 0x77, 0xaf, 0x21, 0x10, 0x06, 0xc6, 0x9a, 0xff, 0x1d, 0x09, 0x17, +0x0e, 0x5f, 0xf1, 0xaa, 0x54, 0x34, 0x4b, 0x45, 0x8a, 0x87, 0x63, 0xa6, 0xdc, 0xf9, 0x24, +0x30, 0x67, 0xc6, 0xb2, 0xd6, 0x61, 0x33, 0x69, 0xee, 0x50, 0x61, 0x57, 0x28, 0xe7, 0x7e, +0xee, 0xec, 0x3a, 0x5a, 0x73, 0x4e, 0xa8, 0x8d, 0xe4, 0x18, 0xea, 0xec, 0x41, 0x64, 0xc8, +0xe2, 0xe8, 0x66, 0xb6, 0x2d, 0xb6, 0xfb, 0x6a, 0x6c, 0x16, 0xb3, 0xdd, 0x46, 0x43, 0xb9, +0x73, 0x00, 0x6a, 0x71, 0xed, 0x4e, 0x9d, 0x25, 0x1a, 0xc3, 0x3c, 0x4a, 0x95, 0x15, 0x99, +0x35, 0x81, 0x14, 0x02, 0xd6, 0x98, 0x9b, 0xec, 0xd8, 0x23, 0x3b, 0x84, 0x29, 0xaf, 0x0c, +0x99, 0x83, 0xa6, 0x9a, 0x34, 0x4f, 0xfa, 0xe8, 0xd0, 0x3c, 0x4b, 0xd0, 0xfb, 0xb6, 0x68, +0xb8, 0x9e, 0x8f, 0xcd, 0xf7, 0x60, 0x2d, 0x7a, 0x22, 0xe5, 0x7d, 0xab, 0x65, 0x1b, 0x95, +0xa7, 0xa8, 0x7f, 0xb6, 0x77, 0x47, 0x7b, 0x5f, 0x8b, 0x12, 0x72, 0xd0, 0xd4, 0x91, 0xef, +0xde, 0x19, 0x50, 0x3c, 0xa7, 0x8b, 0xc4, 0xa9, 0xb3, 0x23, 0xcb, 0x76, 0xe6, 0x81, 0xf0, +0xc1, 0x04, 0x8f, 0xa3, 0xb8, 0x54, 0x5b, 0x97, 0xac, 0x19, 0xff, 0x3f, 0x55, 0x27, 0x2f, +0xe0, 0x1d, 0x42, 0x9b, 0x57, 0xfc, 0x4b, 0x4e, 0x0f, 0xce, 0x98, 0xa9, 0x43, 0x57, 0x03, +0xbd, 0xe7, 0xc8, 0x94, 0xdf, 0x6e, 0x36, 0x73, 0x32, 0xb4, 0xef, 0x2e, 0x85, 0x7a, 0x6e, +0xfc, 0x6c, 0x18, 0x82, 0x75, 0x35, 0x90, 0x07, 0xf3, 0xe4, 0x9f, 0x3e, 0xdc, 0x68, 0xf3, +0xb5, 0xf3, 0x19, 0x80, 0x92, 0x06, 0x99, 0xa2, 0xe8, 0x6f, 0xff, 0x2e, 0x7f, 0xae, 0x42, +0xa4, 0x5f, 0xfb, 0xd4, 0x0e, 0x81, 0x2b, 0xc3, 0x04, 0xff, 0x2b, 0xb3, 0x74, 0x4e, 0x36, +0x5b, 0x9c, 0x15, 0x00, 0xc6, 0x47, 0x2b, 0xe8, 0x8b, 0x3d, 0xf1, 0x9c, 0x03, 0x9a, 0x58, +0x7f, 0x9b, 0x9c, 0xbf, 0x85, 0x49, 0x79, 0x35, 0x2e, 0x56, 0x7b, 0x41, 0x14, 0x39, 0x47, +0x83, 0x26, 0xaa, 0x07, 0x89, 0x98, 0x11, 0x1b, 0x86, 0xe7, 0x73, 0x7a, 0xd8, 0x7d, 0x78, +0x61, 0x53, 0xe9, 0x79, 0xf5, 0x36, 0x8d, 0x44, 0x92, 0x84, 0xf9, 0x13, 0x50, 0x58, 0x3b, +0xa4, 0x6a, 0x36, 0x65, 0x49, 0x8e, 0x3c, 0x0e, 0xf1, 0x6f, 0xd2, 0x84, 0xc4, 0x7e, 0x8e, +0x3f, 0x39, 0xae, 0x7c, 0x84, 0xf1, 0x63, 0x37, 0x8e, 0x3c, 0xcc, 0x3e, 0x44, 0x81, 0x45, +0xf1, 0x4b, 0xb9, 0xed, 0x6b, 0x36, 0x5d, 0xbb, 0x20, 0x60, 0x1a, 0x0f, 0xa3, 0xaa, 0x55, +0x77, 0x3a, 0xa9, 0xae, 0x37, 0x4d, 0xba, 0xb8, 0x86, 0x6b, 0xbc, 0x08, 0x50, 0xf6, 0xcc, +0xa4, 0xbd, 0x1d, 0x40, 0x72, 0xa5, 0x86, 0xfa, 0xe2, 0x10, 0xae, 0x3d, 0x58, 0x4b, 0x97, +0xf3, 0x43, 0x74, 0xa9, 0x9e, 0xeb, 0x21, 0xb7, 0x01, 0xa4, 0x86, 0x93, 0x97, 0xee, 0x2f, +0x4f, 0x3b, 0x86, 0xa1, 0x41, 0x6f, 0x41, 0x26, 0x90, 0x78, 0x5c, 0x7f, 0x30, 0x38, 0x4b, +0x3f, 0xaa, 0xec, 0xed, 0x5c, 0x6f, 0x0e, 0xad, 0x43, 0x87, 0xfd, 0x93, 0x35, 0xe6, 0x01, +0xef, 0x41, 0x26, 0x90, 0x99, 0x9e, 0xfb, 0x19, 0x5b, 0xad, 0xd2, 0x91, 0x8a, 0xe0, 0x46, +0xaf, 0x65, 0xfa, 0x4f, 0x84, 0xc1, 0xa1, 0x2d, 0xcf, 0x45, 0x8b, 0xd3, 0x85, 0x50, 0x55, +0x7c, 0xf9, 0x67, 0x88, 0xd4, 0x4e, 0xe9, 0xd7, 0x6b, 0x61, 0x54, 0xa1, 0xa4, 0xa6, 0xa2, +0xc2, 0xbf, 0x30, 0x9c, 0x40, 0x9f, 0x5f, 0xd7, 0x69, 0x2b, 0x24, 0x82, 0x5e, 0xd9, 0xd6, +0xa7, 0x12, 0x54, 0x1a, 0xf7, 0x55, 0x9f, 0x76, 0x50, 0xa9, 0x95, 0x84, 0xe6, 0x6b, 0x6d, +0xb5, 0x96, 0x54, 0xd6, 0xcd, 0xb3, 0xa1, 0x9b, 0x46, 0xa7, 0x94, 0x4d, 0xc4, 0x94, 0xb4, +0x98, 0xe3, 0xe1, 0xe2, 0x34, 0xd5, 0x33, 0x16, 0x07, 0x54, 0xcd, 0xb7, 0x77, 0x53, 0xdb, +0x4f, 0x4d, 0x46, 0x9d, 0xe9, 0xd4, 0x9c, 0x8a, 0x36, 0xb6, 0xb8, 0x38, 0x26, 0x6c, 0x0e, +0xff, 0x9c, 0x1b, 0x43, 0x8b, 0x80, 0xcc, 0xb9, 0x3d, 0xda, 0xc7, 0xf1, 0x8a, 0xf2, 0x6d, +0xb8, 0xd7, 0x74, 0x2f, 0x7e, 0x1e, 0xb7, 0xd3, 0x4a, 0xb4, 0xac, 0xfc, 0x79, 0x48, 0x6c, +0xbc, 0x96, 0xb6, 0x94, 0x46, 0x57, 0x2d, 0xb0, 0xa3, 0xfc, 0x1e, 0xb9, 0x52, 0x60, 0x85, +0x2d, 0x41, 0xd0, 0x43, 0x01, 0x1e, 0x1c, 0xd5, 0x7d, 0xfc, 0xf3, 0x96, 0x0d, 0xc7, 0xcb, +0x2a, 0x29, 0x9a, 0x93, 0xdd, 0x88, 0x2d, 0x37, 0x5d, 0xaa, 0xfb, 0x49, 0x68, 0xa0, 0x9c, +0x50, 0x86, 0x7f, 0x68, 0x56, 0x57, 0xf9, 0x79, 0x18, 0x39, 0xd4, 0xe0, 0x01, 0x84, 0x33, +0x61, 0xca, 0xa5, 0xd2, 0xd6, 0xe4, 0xc9, 0x8a, 0x4a, 0x23, 0x44, 0x4e, 0xbc, 0xf0, 0xdc, +0x24, 0xa1, 0xa0, 0xc4, 0xe2, 0x07, 0x3c, 0x10, 0xc4, 0xb5, 0x25, 0x4b, 0x65, 0x63, 0xf4, +0x80, 0xe7, 0xcf, 0x61, 0xb1, 0x71, 0x82, 0x21, 0x87, 0x2c, 0xf5, 0x91, 0x00, 0x32, 0x0c, +0xec, 0xa9, 0xb5, 0x9a, 0x74, 0x85, 0xe3, 0x36, 0x8f, 0x76, 0x4f, 0x9c, 0x6d, 0xce, 0xbc, +0xad, 0x0a, 0x4b, 0xed, 0x76, 0x04, 0xcb, 0xc3, 0xb9, 0x33, 0x9e, 0x01, 0x93, 0x96, 0x69, +0x7d, 0xc5, 0xa2, 0x45, 0x79, 0x9b, 0x04, 0x5c, 0x84, 0x09, 0xed, 0x88, 0x43, 0xc7, 0xab, +0x93, 0x14, 0x26, 0xa1, 0x40, 0xb5, 0xce, 0x4e, 0xbf, 0x2a, 0x42, 0x85, 0x3e, 0x2c, 0x3b, +0x54, 0xe8, 0x12, 0x1f, 0x0e, 0x97, 0x59, 0xb2, 0x27, 0x89, 0xfa, 0xf2, 0xdf, 0x8e, 0x68, +0x59, 0xdc, 0x06, 0xbc, 0xb6, 0x85, 0x0d, 0x06, 0x22, 0xec, 0xb1, 0xcb, 0xe5, 0x04, 0xe6, +0x3d, 0xb3, 0xb0, 0x41, 0x73, 0x08, 0x3f, 0x3c, 0x58, 0x86, 0x63, 0xeb, 0x50, 0xee, 0x1d, +0x2c, 0x37, 0x74, 0xa9, 0xd3, 0x18, 0xa3, 0x47, 0x6e, 0x93, 0x54, 0xad, 0x0a, 0x5d, 0xb8, +0x2a, 0x55, 0x5d, 0x78, 0xf6, 0xee, 0xbe, 0x8e, 0x3c, 0x76, 0x69, 0xb9, 0x40, 0xc2, 0x34, +0xec, 0x2a, 0xb9, 0xed, 0x7e, 0x20, 0xe4, 0x8d, 0x00, 0x38, 0xc7, 0xe6, 0x8f, 0x44, 0xa8, +0x86, 0xce, 0xeb, 0x2a, 0xe9, 0x90, 0xf1, 0x4c, 0xdf, 0x32, 0xfb, 0x73, 0x1b, 0x6d, 0x92, +0x1e, 0x95, 0xfe, 0xb4, 0xdb, 0x65, 0xdf, 0x4d, 0x23, 0x54, 0x89, 0x48, 0xbf, 0x4a, 0x2e, +0x70, 0xd6, 0xd7, 0x62, 0xb4, 0x33, 0x29, 0xb1, 0x3a, 0x33, 0x4c, 0x23, 0x6d, 0xa6, 0x76, +0xa5, 0x21, 0x63, 0x48, 0xe6, 0x90, 0x5d, 0xed, 0x90, 0x95, 0x0b, 0x7a, 0x84, 0xbe, 0xb8, +0x0d, 0x5e, 0x63, 0x0c, 0x62, 0x26, 0x4c, 0x14, 0x5a, 0xb3, 0xac, 0x23, 0xa4, 0x74, 0xa7, +0x6f, 0x33, 0x30, 0x05, 0x60, 0x01, 0x42, 0xa0, 0x28, 0xb7, 0xee, 0x19, 0x38, 0xf1, 0x64, +0x80, 0x82, 0x43, 0xe1, 0x41, 0x27, 0x1f, 0x1f, 0x90, 0x54, 0x7a, 0xd5, 0x23, 0x2e, 0xd1, +0x3d, 0xcb, 0x28, 0xba, 0x58, 0x7f, 0xdc, 0x7c, 0x91, 0x24, 0xe9, 0x28, 0x51, 0x83, 0x6e, +0xc5, 0x56, 0x21, 0x42, 0xed, 0xa0, 0x56, 0x22, 0xa1, 0x40, 0x80, 0x6b, 0xa8, 0xf7, 0x94, +0xca, 0x13, 0x6b, 0x0c, 0x39, 0xd9, 0xfd, 0xe9, 0xf3, 0x6f, 0xa6, 0x9e, 0xfc, 0x70, 0x8a, +0xb3, 0xbc, 0x59, 0x3c, 0x1e, 0x1d, 0x6c, 0xf9, 0x7c, 0xaf, 0xf9, 0x88, 0x71, 0x95, 0xeb, +0x57, 0x00, 0xbd, 0x9f, 0x8c, 0x4f, 0xe1, 0x24, 0x83, 0xc5, 0x22, 0xea, 0xfd, 0xd3, 0x0c, +0xe2, 0x17, 0x18, 0x7c, 0x6a, 0x4c, 0xde, 0x77, 0xb4, 0x53, 0x9b, 0x4c, 0x81, 0xcd, 0x23, +0x60, 0xaa, 0x0e, 0x25, 0x73, 0x9c, 0x02, 0x79, 0x32, 0x30, 0xdf, 0x74, 0xdf, 0x75, 0x19, +0xf4, 0xa5, 0x14, 0x5c, 0xf7, 0x7a, 0xa8, 0xa5, 0x91, 0x84, 0x7c, 0x60, 0x03, 0x06, 0x3b, +0xcd, 0x50, 0xb6, 0x27, 0x9c, 0xfe, 0xb1, 0xdd, 0xcc, 0xd3, 0xb0, 0x59, 0x24, 0xb2, 0xca, +0xe2, 0x1c, 0x81, 0x22, 0x9d, 0x07, 0x8f, 0x8e, 0xb9, 0xbe, 0x4e, 0xfa, 0xfc, 0x39, 0x65, +0xba, 0xbf, 0x9d, 0x12, 0x37, 0x5e, 0x97, 0x7e, 0xf3, 0x89, 0xf5, 0x5d, 0xf5, 0xe3, 0x09, +0x8c, 0x62, 0xb5, 0x20, 0x9d, 0x0c, 0x53, 0x8a, 0x68, 0x1b, 0xd2, 0x8f, 0x75, 0x17, 0x5d, +0xd4, 0xe5, 0xda, 0x75, 0x62, 0x19, 0x14, 0x6a, 0x26, 0x2d, 0xeb, 0xf8, 0xaf, 0x37, 0xf0, +0x6c, 0xa4, 0x55, 0xb1, 0xbc, 0xe2, 0x33, 0xc0, 0x9a, 0xca, 0xb0, 0x11, 0x49, 0x4f, 0x68, +0x9b, 0x3b, 0x6b, 0x3c, 0xcc, 0x13, 0xf6, 0xc7, 0x85, 0x61, 0x68, 0x42, 0xae, 0xbb, 0xdd, +0xcd, 0x45, 0x16, 0x29, 0x1d, 0xea, 0xdb, 0xc8, 0x03, 0x94, 0x3c, 0xee, 0x4f, 0x82, 0x11, +0xc3, 0xec, 0x28, 0xbd, 0x97, 0x05, 0x99, 0xde, 0xd7, 0xbb, 0x5e, 0x22, 0x1f, 0xd4, 0xeb, +0x64, 0xd9, 0x92, 0xd9, 0x85, 0xb7, 0x6a, 0x05, 0x6a, 0xe4, 0x24, 0x41, 0xf1, 0xcd, 0xf0, +0xd8, 0x3f, 0xf8, 0x9e, 0x0e, 0xcd, 0x0b, 0x7a, 0x70, 0x6b, 0x5a, 0x75, 0x0a, 0x6a, 0x33, +0x88, 0xec, 0x17, 0x75, 0x08, 0x70, 0x10, 0x2f, 0x24, 0xcf, 0xc4, 0xe9, 0x42, 0x00, 0x61, +0x94, 0xca, 0x1f, 0x3a, 0x76, 0x06, 0xfa, 0xd2, 0x48, 0x81, 0xf0, 0x77, 0x60, 0x03, 0x45, +0xd9, 0x61, 0xf4, 0xa4, 0x6f, 0x3d, 0xd9, 0x30, 0xc3, 0x04, 0x6b, 0x54, 0x2a, 0xb7, 0xec, +0x3b, 0xf4, 0x4b, 0xf5, 0x68, 0x52, 0x26, 0xce, 0xff, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xa5, +0xa9, 0xb1, 0xe0, 0x23, 0xc4, 0x0a, 0x77, 0x4d, 0xf9, 0x51, 0x20, 0xa3, 0xa5, 0xa9, 0xb1, +0xc1, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xc4, 0xeb, 0x54, 0x0b, +0x75, 0x68, 0x52, 0x07, 0x8c, 0x9a, 0x97, 0x8d, 0x79, 0x70, 0x62, 0x46, 0xef, 0x5c, 0x1b, +0x95, 0x89, 0x71, 0x41, 0xe1, 0x21, 0xa1, 0xa1, 0xa1, 0xc0, 0x02, 0x67, 0x4c, 0x1a, 0xb6, +0xcf, 0xfd, 0x78, 0x53, 0x24, 0xab, 0xb5, 0xc9, 0xf1, 0x60, 0x23, 0xa5, 0xc8, 0x12, 0x87, +0x6d, 0x58, 0x13, 0x85, 0x88, 0x92, 0x87, 0x6d, 0x58, 0x32, 0xc7, 0x0c, 0x9a, 0x97, 0xac, +0xda, 0x36, 0xee, 0x5e, 0x3e, 0xdf, 0x1d, 0xb8, 0xf2, 0x66, 0x2f, 0xbd, 0xf8, 0x72, 0x47, +0xed, 0x58, 0x13, 0x85, 0x88, 0x92, 0x87, 0x8c, 0x7b, 0x55, 0x09, 0x90, 0xa2, 0xc6, 0xef, +0x3d, 0xf8, 0x53, 0x24, 0xab, 0xd4, 0x2a, 0xb7, 0xec, 0x5a, 0x36, 0xee, 0x5e, 0x3e, 0xdf, +0x3c, 0xfa, 0x76, 0x4f, 0xfd, 0x59, 0x30, 0xe2, 0x46, 0xef, 0x3d, 0xf8, 0x53, 0x05, 0x69, +0x31, 0xc1, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, 0x19, 0xb0, 0xe2, 0x27, 0xcc, 0xfb, 0x74, +0x4b, 0x14, 0x8b, 0x94, 0x8b, 0x75, 0x68, 0x33, 0xc5, 0x08, 0x92, 0x87, 0x8c, 0x9a, 0xb6, +0xcf, 0x1c, 0xba, 0xd7, 0x0d, 0x98, 0xb2, 0xe6, 0x2f, 0xdc, 0x1b, 0x95, 0x89, 0x71, 0x60, +0x23, 0xc4, 0x0a, 0x96, 0x8f, 0x9c, 0xba, 0xf6, 0x6e, 0x3f, 0xfc, 0x5b, 0x15, 0xa8, 0xd2, +0x26, 0xaf, 0xbd, 0xf8, 0x72, 0x66, 0x2f, 0xdc, 0x1b, 0xb4, 0xcb, 0x14, 0x8b, 0x94, 0xaa, +0xb7, 0xcd, 0xf9, 0x51, 0x01, 0x80, 0x82, 0x86, 0x6f, 0x3d, 0xd9, 0x30, 0xe2, 0x27, 0xcc, +0xfb, 0x74, 0x4b, 0x14, 0xaa, 0xb7, 0xcd, 0xf9, 0x70, 0x43, 0x04, 0x6b, 0x35, 0xc9, 0xf1, +0x60, 0x23, 0xa5, 0xc8, 0xf3, 0x45, 0x08, 0x92, 0x87, 0x6d, 0x58, 0x32, 0xe6, 0x2f, 0xbd, +0xf8, 0x72, 0x66, 0x4e, 0x1e, 0xbe, 0xfe, 0x7e, 0x7e, 0x7e, 0x5f, 0x1d, 0x99, 0x91, 0xa0, +0xa3, 0xc4, 0x0a, 0x77, 0x4d, 0x18, 0x93, 0xa4, 0xab, 0xd4, 0x0b, 0x75, 0x49, 0x10, 0xa2, +0xc6, 0xef, 0x3d, 0xf8, 0x53, 0x24, 0xab, 0xb5, 0xe8, 0x33, 0xe4, 0x4a, 0x16, 0xae, 0xde, +0x1f, 0xbc, 0xdb, 0x15, 0xa8, 0xb3, 0xc5, 0x08, 0x73, 0x45, 0xe9, 0x31, 0xc1, 0xe1, 0x21, +0xa1, 0xa1, 0xa1, 0xc0, 0x02, 0x86, 0x6f, 0x5c, 0x3a, 0xd7, 0x0d, 0x98, 0x93, 0xa4, 0xca, +0x16, 0xae, 0xde, 0x1f, 0x9d, 0x99, 0xb0, 0xe2, 0x46, 0xef, 0x3d, 0xf8, 0x72, 0x47, 0x0c, +0x9a, 0xb6, 0xcf, 0xfd, 0x59, 0x11, 0xa0, 0xa3, 0xa5, 0xc8, 0xf3, 0x45, 0x08, 0x92, 0x87, +0x6d, 0x39, 0xf0, 0x43, 0x04, 0x8a, 0x96, 0xae, 0xde, 0x3e, 0xdf, 0x1d, 0x99, 0x91, 0xa0, +0xc2, 0x06, 0x6f, 0x3d, 0xf8, 0x72, 0x47, 0x0c, 0x9a, 0x97, 0x8d, 0x98, 0x93, 0x85, 0x88, +0x73, 0x45, 0xe9, 0x31, 0xe0, 0x23, 0xa5, 0xa9, 0xd0, 0x03, 0x84, 0x8a, 0x96, 0xae, 0xde, +0x1f, 0xbc, 0xdb, 0x15, 0xa8, 0xd2, 0x26, 0xce, 0xff, 0x5d, 0x19, 0x91, 0x81, 0x80, 0x82, +0x67, 0x2d, 0xd8, 0x13, 0xa4, 0xab, 0xd4, 0x0b, 0x94, 0xaa, 0xb7, 0xcd, 0xf9, 0x51, 0x20, +0xa3, 0xa5, 0xc8, 0xf3, 0x45, 0xe9, 0x50, 0x22, 0xc6, 0xef, 0x5c, 0x3a, 0xd7, 0x0d, 0x98, +0x93, 0x85, 0x88, 0x73, 0x64, 0x4a, 0xf7, 0x4d, 0xf9, 0x51, 0x20, 0xa3, 0xc4, 0x0a, 0x96, +0xae, 0xde, 0x3e, 0xfe, 0x7e, 0x7e, 0x7e, 0x5f, 0x3c, 0xfa, 0x76, 0x4f, 0xfd, 0x78, 0x72, +0x66, 0x2f, 0xbd, 0xd9, 0x30, 0xc3, 0xe5, 0x48, 0x12, 0x87, 0x8c, 0x7b, 0x55, 0x28, 0xd2, +0x07, 0x8c, 0x9a, 0x97, 0xac, 0xda, 0x17, 0x8d, 0x79, 0x51, 0x20, 0xa3, 0xc4, 0xeb, 0x54, +0x0b, 0x94, 0x8b, 0x94, 0xaa, 0xd6, 0x2e, 0xbf, 0xfc, 0x5b, 0x15, 0xa8, 0xd2, 0x26, 0xaf, +0xdc, 0x1b, 0xb4, 0xea, 0x37, 0xec, 0x3b, 0xf4, 0x6a, 0x37, 0xcd, 0x18, 0x93, 0x85, 0x69, +0x31, 0xc1, 0xe1, 0x40, 0xe3, 0x25, 0xc8, 0x12, 0x87, 0x8c, 0x9a, 0xb6, 0xcf, 0xfd, 0x59, +0x11, 0xa0, 0xc2, 0x06, 0x8e, 0x7f, 0x5d, 0x38, 0xf2, 0x47, 0x0c, 0x7b, 0x74, 0x6a, 0x37, +0xec, 0x5a, 0x36, 0xee, 0x3f, 0xfc, 0x7a, 0x76, 0x4f, 0x1c, 0x9b, 0x95, 0x89, 0x71, 0x41, +0x00, 0x63, 0x44, 0xeb, 0x54, 0x2a, 0xd6, 0x0f, 0x9c, 0xba, 0xd7, 0x0d, 0x98, 0x93, 0x85, +0x69, 0x31, 0xc1, 0x00, 0x82, 0x86, 0x8e, 0x9e, 0xbe, 0xdf, 0x3c, 0xfa, 0x57, 0x2c, 0xda, +0x36, 0xee, 0x3f, 0xfc, 0x5b, 0x15, 0x89, 0x71, 0x41, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, +0x38, 0xf2, 0x47, 0xed, 0x58, 0x13, 0xa4, 0xca, 0xf7, 0x4d, 0xf9, 0x51, 0x01, 0x80, 0x63, +0x44, 0xeb, 0x54, 0x2a, 0xd6, 0x2e, 0xbf, 0xdd, 0x19, 0x91, 0xa0, 0xa3, 0xa5, 0xa9, 0xb1, +0xe0, 0x42, 0x06, 0x8e, 0x7f, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xc4, 0x0a, 0x96, 0x8f, 0x7d, +0x78, 0x72, 0x47, 0x0c, 0x7b, 0x74, 0x6a, 0x56, 0x2e, 0xde, 0x1f, 0xbc, 0xfa, 0x57, 0x0d, +0x79, 0x51, 0x01, 0x61, 0x21, 0xa1, 0xc0, 0xe3, 0x25, 0xa9, 0xb1, 0xc1, 0xe1, 0x40, 0x02, +0x67, 0x4c, 0x1a, 0x97, 0x8d, 0x98, 0x93, 0xa4, 0xab, 0xd4, 0x2a, 0xd6, 0x0f, 0x9c, 0x9b, +0xb4, 0xcb, 0x14, 0xaa, 0xb7, 0xcd, 0xf9, 0x51, 0x20, 0xa3, 0xc4, 0xeb, 0x35, 0xc9, 0xf1, +0x60, 0x42, 0x06, 0x8e, 0x7f, 0x7c, 0x7a, 0x76, 0x6e, 0x3f, 0xfc, 0x7a, 0x76, 0x6e, 0x5e, +0x3e, 0xfe, 0x7e, 0x5f, 0x3c, 0xdb, 0x15, 0x89, 0x71, 0x41, 0xe1, 0x21, 0xc0, 0xe3, 0x44, +0xeb, 0x54, 0x2a, 0xb7, 0xcd, 0xf9, 0x70, 0x62, 0x27, 0xad, 0xd8, 0x32, 0xc7, 0x0c, 0x7b, +0x74, 0x4b, 0x14, 0xaa, 0xb7, 0xec, 0x3b, 0xd5, 0x28, 0xd2, 0x07, 0x6d, 0x39, 0xd1, 0x20, +0xc2, 0xe7, 0x4c, 0x1a, 0x97, 0x8d, 0x98, 0xb2, 0xc7, 0x0c, 0x59, 0x28, 0xf3, 0x9b }; + +// clang-format off diff --git a/keyboards/ploopyco/trackball/config.h b/keyboards/ploopyco/trackball/config.h new file mode 100644 index 0000000000..57113d965b --- /dev/null +++ b/keyboards/ploopyco/trackball/config.h @@ -0,0 +1,69 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5043 +#define PRODUCT_ID 0x5442 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Ploopyco +#define PRODUCT Trackball + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 5 + +/* + * 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 DIRECT_PINS { { D4, D2, E6, B5, D7 } } + +// These pins are not broken out, and cannot be used normally. +// They are set as output and pulled high, by default +#define UNUSED_PINS { D1, D3, B4, B6, B7, D6, C7, F6, F5, F3 } + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Much more so than a keyboard, speed matters for a mouse. So we'll go for as high + a polling rate as possible. */ +#define USB_POLLING_INTERVAL_MS 1 + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 3 diff --git a/keyboards/ploopyco/trackball/info.json b/keyboards/ploopyco/trackball/info.json new file mode 100644 index 0000000000..84d512d8dd --- /dev/null +++ b/keyboards/ploopyco/trackball/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "PloopyCo Trackball", + "url": "", + "maintainer": "drashna", + "width": 8, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0, "h":2}, + {"x":1, "y":0.25, "h":1.5}, + {"x":2, "y":0, "h":2}, + {"x":3.5, "y":0, "h":2}, + {"x":4.5, "y":0, "h":2} + ] + } + } +} diff --git a/keyboards/ploopyco/trackball/keymaps/default/keymap.c b/keyboards/ploopyco/trackball/keymaps/default/keymap.c new file mode 100644 index 0000000000..dc1ad1439f --- /dev/null +++ b/keyboards/ploopyco/trackball/keymaps/default/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_BTN1, KC_BTN3, KC_BTN2, + KC_BTN4, KC_BTN5 + ), +}; diff --git a/keyboards/ploopyco/trackball/keymaps/default/readme.md b/keyboards/ploopyco/trackball/keymaps/default/readme.md new file mode 100644 index 0000000000..f965ef3c32 --- /dev/null +++ b/keyboards/ploopyco/trackball/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Ploopyco Trackball diff --git a/keyboards/ploopyco/trackball/keymaps/via/keymap.c b/keyboards/ploopyco/trackball/keymaps/via/keymap.c new file mode 100644 index 0000000000..dc1ad1439f --- /dev/null +++ b/keyboards/ploopyco/trackball/keymaps/via/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_BTN1, KC_BTN3, KC_BTN2, + KC_BTN4, KC_BTN5 + ), +}; diff --git a/keyboards/ploopyco/trackball/keymaps/via/rules.mk b/keyboards/ploopyco/trackball/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/ploopyco/trackball/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/ploopyco/trackball/readme.md b/keyboards/ploopyco/trackball/readme.md new file mode 100644 index 0000000000..76b9d6a762 --- /dev/null +++ b/keyboards/ploopyco/trackball/readme.md @@ -0,0 +1,68 @@ +# Ploopyco Trackball + +![Ploopyco Trackball](https://i.redd.it/j7z0y83txps31.jpg) + +It's a DIY, QMK Powered Trackball!!!! + +Everything works. However the scroll wheel has some issues and acts very odd. + +* Keyboard Maintainer: [PloopyCo](https://github.com/ploopyco), [Drashna Jael're](https://github.com/drashna/), [Germ](https://github.com/germ/) +* Hardware Supported: ATMega32u4 8MHz(3.3v) +* Hardware Availability: [Store](https://ploopy.co), [GitHub](https://github.com/ploopyco) + +Make example for this keyboard (after setting up your build environment): + + make ploopyco/trackball:default:flash + +To jump to the bootloader, hold down "Button 4" (immediate right of the trackball) + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +# Customzing your PloopyCo Trackball + +While the defaults are designed so that it can be plugged in and used right away, there are a number of things that you may want to change. Such as adding DPI control, or to use the ball to scroll while holding a button. To allow for this sort of control, there is a callback for both the scroll wheel and the mouse censor. + +The default behavior for this is: + +```c +void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v) { + mouse_report->h = h; + mouse_report->v = v; +} + +void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { + mouse_report->x = x; + mouse_report->y = y; +} +``` + +This should allow you to more heavily customize the behavior. + +Alternatively, the `process_wheel` and `process_mouse` functions can both be replaced too, to allow for even more functionality. + +Additionally, you can change the DPI/CPI or speed of the trackball by calling `pmw_set_cpi` at any time. And tThe default can be changed by adding a define to the keymap's `config.h` file: + + #define PMW_CPI 1600 + +# Programming QMK-DFU onto the PloopyCo Trackball + +If you would rather have DFU on this board, you can use the QMK-DFU bootloader on the device. To do so, you want to run: + + make ploopyco/trackball:default:production + +Once you have that, you'll need to [ISP Flash](https://docs.qmk.fm/#/isp_flashing_guide) the chip with the new bootloader hex file created (or the production hex), and set the fuses: + + +| Fuse | Setting | +|----------|------------------| +| Low | `0xDF` | +| High | `0xD8` or `0x98` | +| Extended | `0xCB` | + +Original (Caterina) settings: + +| Fuse | Setting | +|----------|------------------| +| Low | `0xFF` | +| High | `0xD8` | +| Extended | `0xFE` | diff --git a/keyboards/ploopyco/trackball/rules.mk b/keyboards/ploopyco/trackball/rules.mk new file mode 100644 index 0000000000..d77431b676 --- /dev/null +++ b/keyboards/ploopyco/trackball/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +POINTING_DEVICE_ENABLE = yes +MOUSEKEY_ENABLE = no # Mouse keys + +QUANTUM_LIB_SRC += analog.c spi_master.c +SRC += pmw3600.c opt_encoder.c diff --git a/keyboards/ploopyco/trackball/trackball.c b/keyboards/ploopyco/trackball/trackball.c new file mode 100644 index 0000000000..6a9bffbffe --- /dev/null +++ b/keyboards/ploopyco/trackball/trackball.c @@ -0,0 +1,237 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 QMK_KEYBOARD_H + +#ifndef OPT_DEBOUNCE +# define OPT_DEBOUNCE 5 // (ms) Time between scroll events +#endif +#ifndef SCROLL_BUTT_DEBOUNCE +# define SCROLL_BUTT_DEBOUNCE 100 // (ms) Time between scroll events +#endif +#ifndef OPT_THRES +# define OPT_THRES 150 // (0-1024) Threshold for actication +#endif +#ifndef OPT_SCALE +# define OPT_SCALE 1 // Multiplier for wheel +#endif + +// TODO: Implement libinput profiles +// https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html +// Compile time accel selection +// Valid options are ACC_NONE, ACC_LINEAR, ACC_CUSTOM, ACC_QUADRATIC + +// Trackball State +bool is_scroll_clicked = false; +bool BurstState = false; // init burst state for Trackball module +uint16_t MotionStart = 0; // Timer for accel, 0 is resting state +uint16_t lastScroll = 0; // Previous confirmed wheel event +uint16_t lastMidClick = 0; // Stops scrollwheel from being read if it was pressed +uint8_t OptLowPin = OPT_ENC1; +bool debug_encoder = false; + +__attribute__((weak)) void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v) { + mouse_report->h = h; + mouse_report->v = v; +} + +__attribute__((weak)) void process_wheel(report_mouse_t* mouse_report) { + // TODO: Replace this with interrupt driven code, polling is S L O W + // Lovingly ripped from the Ploopy Source + + // If the mouse wheel was just released, do not scroll. + if (timer_elapsed(lastMidClick) < SCROLL_BUTT_DEBOUNCE) { + return; + } + + // Limit the number of scrolls per unit time. + if (timer_elapsed(lastScroll) < OPT_DEBOUNCE) { + return; + } + + // Don't scroll if the middle button is depressed. + if (is_scroll_clicked) { +#ifndef IGNORE_SCROLL_CLICK + return; +#endif + } + + lastScroll = timer_read(); + uint16_t p1 = adc_read(OPT_ENC1_MUX); + uint16_t p2 = adc_read(OPT_ENC2_MUX); + if (debug_encoder) dprintf("OPT1: %d, OPT2: %d\n", p1, p2); + + uint8_t dir = opt_encoder_handler(p1, p2); + + if (dir == 0) return; + process_wheel_user(mouse_report, mouse_report->h, (int)(mouse_report->v + (dir * OPT_SCALE))); +} + +__attribute__((weak)) void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { + mouse_report->x = x; + mouse_report->y = y; +} + +__attribute__((weak)) void process_mouse(report_mouse_t* mouse_report) { + report_pmw_t data = pmw_read_burst(); + if (data.isOnSurface && data.isMotion) { + // Reset timer if stopped moving + if (!data.isMotion) { + if (MotionStart != 0) MotionStart = 0; + return; + } + + // Set timer if new motion + if ((MotionStart == 0) && data.isMotion) { + if (debug_mouse) dprintf("Starting motion.\n"); + MotionStart = timer_read(); + } + + if (debug_mouse) { + dprintf("Delt] d: %d t: %u\n", abs(data.dx) + abs(data.dy), MotionStart); + } + if (debug_mouse) { + dprintf("Pre ] X: %d, Y: %d\n", data.dx, data.dy); + } +#if defined(PROFILE_LINEAR) + float scale = float(timer_elaspsed(MotionStart)) / 1000.0; + data.dx *= scale; + data.dy *= scale; +#elif defined(PROFILE_INVERSE) + // TODO +#else + // no post processing +#endif + // apply multiplier + // data.dx *= mouse_multiplier; + // data.dy *= mouse_multiplier; + + // Wrap to HID size + data.dx = constrain(data.dx, -127, 127); + data.dy = constrain(data.dy, -127, 127); + if (debug_mouse) dprintf("Cons] X: %d, Y: %d\n", data.dx, data.dy); + // dprintf("Elapsed:%u, X: %f Y: %\n", i, pgm_read_byte(firmware_data+i)); + + process_mouse_user(mouse_report, data.dx, data.dy); + } +} + +bool process_record_kb(uint16_t keycode, keyrecord_t* record) { + if (debug_mouse) { + dprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); + } + + // Update Timer to prevent accidental scrolls + if ((record->event.key.col == 2) && (record->event.key.row == 0)) { + lastMidClick = timer_read(); + is_scroll_clicked = record->event.pressed; + } + +/* If Mousekeys is disabled, then use handle the mouse button + * keycodes. This makes things simpler, and allows usage of + * the keycodes in a consistent manner. But only do this if + * Mousekeys is not enable, so it's not handled twice. + */ +#ifndef MOUSEKEY_ENABLE + if (IS_MOUSEKEY_BUTTON(keycode)) { + report_mouse_t currentReport = pointing_device_get_report(); + if (record->event.pressed) { + if (keycode == KC_MS_BTN1) + currentReport.buttons |= MOUSE_BTN1; + else if (keycode == KC_MS_BTN2) + currentReport.buttons |= MOUSE_BTN2; + else if (keycode == KC_MS_BTN3) + currentReport.buttons |= MOUSE_BTN3; + else if (keycode == KC_MS_BTN4) + currentReport.buttons |= MOUSE_BTN4; + else if (keycode == KC_MS_BTN5) + currentReport.buttons |= MOUSE_BTN5; + } else { + if (keycode == KC_MS_BTN1) + currentReport.buttons &= ~MOUSE_BTN1; + else if (keycode == KC_MS_BTN2) + currentReport.buttons &= ~MOUSE_BTN2; + else if (keycode == KC_MS_BTN3) + currentReport.buttons &= ~MOUSE_BTN3; + else if (keycode == KC_MS_BTN4) + currentReport.buttons &= ~MOUSE_BTN4; + else if (keycode == KC_MS_BTN5) + currentReport.buttons &= ~MOUSE_BTN5; + } + pointing_device_set_report(currentReport); + } +#endif + + return process_record_user(keycode, record); +} + +// Hardware Setup +void keyboard_pre_init_kb(void) { + // debug_enable = true; + // debug_matrix = true; + // debug_mouse = true; + // debug_encoder = true; + + setPinInput(OPT_ENC1); + setPinInput(OPT_ENC2); + + // This is the debug LED. + setPinOutput(F7); + writePin(F7, debug_enable); + + /* Ground all output pins connected to ground. This provides additional + * pathways to ground. If you're messing with this, know this: driving ANY + * of these pins high will cause a short. On the MCU. Ka-blooey. + */ +#ifdef UNUSED_PINS + const pin_t unused_pins[] = UNUSED_PINS; + + for (uint8_t i = 0; i < (sizeof(unused_pins) / sizeof(pin_t)); i++) { + setPinOutput(unused_pins[i]); + writePinLow(unused_pins[i]); + } +#endif + keyboard_pre_init_user(); +} + +void pointing_device_init(void) { + // initialize ball sensor + pmw_spi_init(); + // initialize the scroll wheel's optical encoder + opt_encoder_init(); +} + +bool has_report_changed (report_mouse_t first, report_mouse_t second) { + return !( + (!first.buttons && first.buttons == second.buttons) && + (!first.x && first.x == second.x) && + (!first.y && first.y == second.y) && + (!first.h && first.h == second.h) && + (!first.v && first.v == second.v) ); +} + +void pointing_device_task(void) { + report_mouse_t mouse_report = pointing_device_get_report(); + process_wheel(&mouse_report); + process_mouse(&mouse_report); + + pointing_device_set_report(mouse_report); + if (has_report_changed(mouse_report, pointing_device_get_report())) { + pointing_device_send(); + } +} diff --git a/keyboards/ploopyco/trackball/trackball.h b/keyboards/ploopyco/trackball/trackball.h new file mode 100644 index 0000000000..959305a07e --- /dev/null +++ b/keyboards/ploopyco/trackball/trackball.h @@ -0,0 +1,40 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 . + */ + +#pragma once + +#include "quantum.h" +#include "spi_master.h" +#include "pmw3600.h" +#include "analog.h" +#include "opt_encoder.h" +#include "pointing_device.h" + +// Sensor defs +#define OPT_ENC1 F0 +#define OPT_ENC2 F4 +#define OPT_ENC1_MUX 0 +#define OPT_ENC2_MUX 4 + +void process_mouse(report_mouse_t* mouse_report); +void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y); +void process_wheel(report_mouse_t* mouse_report); +void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v); + +#define LAYOUT(BL, BM, BR, BF, BB) \ + { {BL, BM, BR, BF, BB}, } diff --git a/keyboards/plume/plume65/config.h b/keyboards/plume/plume65/config.h new file mode 100644 index 0000000000..2cd05e180a --- /dev/null +++ b/keyboards/plume/plume65/config.h @@ -0,0 +1,137 @@ +/* Copyright 2020 Dekkers + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5D66 +#define PRODUCT_ID 0x22CF +#define DEVICE_VER 0x0001 +#define MANUFACTURER Plume Keyboards LLC +#define PRODUCT Plume65 + +/* 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 { D2, D5, E6, D0, D1 } +#define MATRIX_COL_PINS { B7, F7, C7, C6, B6, F0, B5, F1, B4, F4, D7, F5, D6, F6, D4 } +#define UNUSED_PINS { } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + #define RGB_DI_PIN B0 +// #ifdef RGB_DI_PIN + #define RGBLED_NUM 10 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * 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 + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 + +#define QMK_ESC_OUTPUT B7 // usually COL +#define QMK_ESC_INPUT D2 // usually ROW diff --git a/keyboards/plume/plume65/info.json b/keyboards/plume/plume65/info.json new file mode 100644 index 0000000000..941d911f39 --- /dev/null +++ b/keyboards/plume/plume65/info.json @@ -0,0 +1,376 @@ +{ + "keyboard_name": "Plume65", + "url": "", + "maintainer": "maartenwut", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_iso": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":15, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.5}, + {"x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"x":11, "y":4, "w":1.5}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + }, + "LAYOUT_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.5}, + {"x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"x":11, "y":4, "w":1.5}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + }, + "LAYOUT_iso_split_bs": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":15, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.5}, + {"x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"x":11, "y":4, "w":1.5}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + }, + "LAYOUT_ansi_split_bs": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.5}, + {"x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"x":11, "y":4, "w":1.5}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + }, + "LAYOUT_all": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + {"x":15, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + {"x":13.75, "y":2, "w":1.25}, + {"x":15, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"x":15, "y":3}, + + {"x":0, "y":4, "w":1.5}, + {"x":2.5, "y":4, "w":1.5}, + {"x":4, "y":4, "w":7}, + {"x":11, "y":4, "w":1.5}, + {"x":13, "y":4}, + {"x":14, "y":4}, + {"x":15, "y":4} + ] + } + } +} diff --git a/keyboards/plume/plume65/keymaps/default/keymap.c b/keyboards/plume/plume65/keymaps/default/keymap.c new file mode 100644 index 0000000000..343c3b4f79 --- /dev/null +++ b/keyboards/plume/plume65/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2020 Dekkers + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_ansi( + 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_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_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_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), +[1] = LAYOUT_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______) + +}; diff --git a/keyboards/plume/plume65/keymaps/default/readme.md b/keyboards/plume/plume65/keymaps/default/readme.md new file mode 100644 index 0000000000..33c50283a0 --- /dev/null +++ b/keyboards/plume/plume65/keymaps/default/readme.md @@ -0,0 +1 @@ +This is the default keymap for the Plume65. diff --git a/keyboards/plume/plume65/keymaps/via/keymap.c b/keyboards/plume/plume65/keymaps/via/keymap.c new file mode 100644 index 0000000000..ed8e921c72 --- /dev/null +++ b/keyboards/plume/plume65/keymaps/via/keymap.c @@ -0,0 +1,45 @@ +/* Copyright 2020 Dekkers + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_all( + 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_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_BSLS, 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_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), +[1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______), +[2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______), +[3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______), + +}; diff --git a/keyboards/plume/plume65/keymaps/via/rules.mk b/keyboards/plume/plume65/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/plume/plume65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/plume/plume65/plume65.c b/keyboards/plume/plume65/plume65.c new file mode 100644 index 0000000000..d59f2289ea --- /dev/null +++ b/keyboards/plume/plume65/plume65.c @@ -0,0 +1,16 @@ +/* Copyright 2020 Dekkers + * + * 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 "plume65.h" diff --git a/keyboards/plume/plume65/plume65.h b/keyboards/plume/plume65/plume65.h new file mode 100644 index 0000000000..fa169a8bc3 --- /dev/null +++ b/keyboards/plume/plume65/plume65.h @@ -0,0 +1,103 @@ +/* Copyright 2020 Dekkers + * + * 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 . + */ +#pragma once + +#include "quantum.h" +#define XXX KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT_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, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k42, k46, k4b, k4c, k4d, k4e \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, XXX }, \ + { 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, XXX, k2d, k2e }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e }, \ + { k40, XXX, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4b, k4c, k4d, k4e } \ +} + +#define LAYOUT_ansi_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0d, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k42, k46, k4b, k4c, k4d, k4e \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, k2e }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e }, \ + { k40, XXX, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4b, k4c, k4d, k4e } \ +} + +#define LAYOUT_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, 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, k42, k46, k4b, k4c, k4d, k4e \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, XXX, 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, XXX, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4b, k4c, k4d, k4e } \ +} + +#define LAYOUT_iso_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0d, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k42, k46, k4b, k4c, k4d, k4e \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, XXX, 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, XXX, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4b, k4c, k4d, k4e } \ +} + +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0d, \ + 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, k42, k46, k4b, k4c, k4d, k4e \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e }, \ + { k40, XXX, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4b, k4c, k4d, k4e } \ +} diff --git a/keyboards/plume/plume65/readme.md b/keyboards/plume/plume65/readme.md new file mode 100644 index 0000000000..828477eaf0 --- /dev/null +++ b/keyboards/plume/plume65/readme.md @@ -0,0 +1,16 @@ +# Plume65 + +## Support +* Keyboard Maintainer: [maartenwut](https://github.com/maartenwut) +* Hardware Supported: Plume65 +* Hardware Availability: N/A + +Make example for this keyboard (after setting up your build environment): + + make plume/plume65:default + +Flashing example for this keyboard: + + make plume/plume65:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/plume/plume65/rules.mk b/keyboards/plume/plume65/rules.mk new file mode 100644 index 0000000000..dded09bb87 --- /dev/null +++ b/keyboards/plume/plume65/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = qmk-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/preonic/keymaps/badger/keymap.c b/keyboards/preonic/keymaps/badger/keymap.c new file mode 100644 index 0000000000..495cf28c45 --- /dev/null +++ b/keyboards/preonic/keymaps/badger/keymap.c @@ -0,0 +1,74 @@ +/* +Copyright 2020 Dan White + +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 not REV3, just compile the default keymaps +#ifndef REV3_CONFIG_H +#include "../default/keymap.c" +#else + +#include "ortho.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY_MAC_ORTHO] = LAYOUT_preonic_2x2u( + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \ + MOMAC, 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, \ + KC_LCTL, KC_LALT, KC_LGUI, RAISE, P_ADJ, KC_SPC, LOWER, KC_RGUI, KC_RALT, MAC_POP), + + [_MOVE_MAC_ORTHO] = LAYOUT_preonic_2x2u( + MAC_FRC, MM_LEFT, MM_RGHT, IJ_TOP, IJ_BOTT, _______, _______, IJ_UP, IJ_DOWN, IJ_BACK, IJ_FWD, KC_BSPC, \ + KC_BACK, IJ_STEP, IJ_INTO, IJ_OUT, IJ_RUN, IJ_STOP, _______, WD_BACK, KC_HOME, KC_END, WD_FRWD, KC_NEXT, \ + _______, MM_LH, MM_MAX, MM_RH, IJ_FIND, IJ_IMPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CM_RIGHT, CM_DOWN, \ + _______, MM_UH, MM_BH, MAC_CPY, MAC_PST, IJ_IMPH, _______, IJ_REN, IJ_IMPL, IJ_DECL, IJ_USAG, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_QWERTY_LINUX_ORTHO] = LAYOUT_preonic_2x2u( + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \ + MOLNX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, RAISE, P_ADJ, KC_SPC, LOWER, KC_RALT, KC_RGUI, OS_POP), + + [_MOVE_LINUX_ORTHO] = LAYOUT_preonic_2x2u( + KC_ESC, VD_1, VD_2, VD_3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, \ + _______, WM_VD1, WM_UH, WM_VD2, KC_MAC1, KC_MSTP, KC_MPLY, KC_PGUP, KC_HOME, KC_END, KC_PGDN, KC_INS, \ + _______, WM_LH, WM_MAX, WM_RH, KC_MAC2, KC_PSCR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CS_RIGHT, CS_DOWN, \ + _______, WM_VD3, WM_BH, OS_COPY, OS_PAST, KC_MPRV, KC_MNXT, KC_MUTE, KC_WBAK, KC_WFWD, KC_WSCH, _______, \ + _______, KC_LCTL, KC_LALT, KC_LGUI, _______, _______, _______, _______, _______, _______), + + [_RAISE] = LAYOUT_preonic_2x2u( + KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, \ + _______, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_AGIN, KC_STOP, KC_MENU, KC_FIND, KC_MPLY, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_COLN, KC_DQUO, \ + _______, KC_UNDO, KC_CUT, OS_COPY, OS_PAST, KC_MPRV, KC_MNXT, KC_MUTE, KC_LT, KC_GT, KC_QUES, KC_TRNS, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [_LOWER] = LAYOUT_preonic_2x2u( + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ + _______, KC_7, KC_8, KC_9, KC_PMNS, KC_VOLD, KC_VOLU, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_4, KC_5, KC_6, KC_PPLS, KC_PSCR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, KC_QUOT, \ + _______, KC_1, KC_2, KC_3, KC_PAST, KC_NO, KC_NO, KC_WHOM, KC_WBAK, KC_WFWD, KC_WSCH, _______, \ + _______, KC_0, KC_DOT, KC_ENT, _______, _______, _______, _______, _______, _______), + + [_ADJUST_ORTHO] = LAYOUT_preonic_2x2u( + KC_ESC, AU_ON, AU_OFF, CK_TOGG, CK_UP, CK_DOWN, CK_RST, MU_ON, MU_OFF, MU_TOG, MU_MOD, KC_DEL, \ + _______, NK_ON, NK_OFF, EEP_RST, RESET, KC_MSTP, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_BTN2, KC_INS, \ + _______, GE_SWAP, GE_NORM, DEBUG, AG_SWAP, AG_NORM, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, _______, \ + _______, KC_LYRC, KC_FIRST, KC_CAPS, KC_NO, KC_MPRV, KC_MNXT, KC_MUTE, KC_ACL0, KC_ACL1, KC_ACL2, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) +}; + +#endif diff --git a/keyboards/preonic/keymaps/badger/readme.md b/keyboards/preonic/keymaps/badger/readme.md new file mode 100644 index 0000000000..5e16979605 --- /dev/null +++ b/keyboards/preonic/keymaps/badger/readme.md @@ -0,0 +1,21 @@ +# A QWERTY-centric preonic layout by [BlueTufa](https://github.com/BlueTufa) + +## Layouts + +### QWERTY +Standard QWERTY layer, but ESC maps to MOVE layer when held down. Dedicated modifier for Adjust layer and a dedicated OS action key. +### RAISE layer +Access to function keys and shifted characters not on Preonic layout. Effort is taken to keep Function keys aligned with corresponding number. Some OS action keys are available in this layer. + +### LOWER layer +Numpad behavior and access to characters not present on Preonic layout. + +### MOVE layer +OS-specific convenience shortcuts. Macros are used to make it easier to adapt these to other operating systems. +Window move and resize, and option to move to a specific virtual desktop. + +### ADJUST layer +The first row is focused on audio config. +Take advantage of the mouse movement keys, as well as toggling common keyboard config settings. +Flash settings are accessed here as well. + diff --git a/keyboards/preonic/keymaps/codecoffeecode/keymap.c b/keyboards/preonic/keymaps/codecoffeecode/keymap.c new file mode 100644 index 0000000000..9264927ecb --- /dev/null +++ b/keyboards/preonic/keymaps/codecoffeecode/keymap.c @@ -0,0 +1,81 @@ +/* Copyright 2020 codecoffeecode + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Main Layer + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[0] = LAYOUT_preonic_1x2uC( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LCTL, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | - | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[1] = LAYOUT_preonic_1x2uC( + KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | - | = | [ | ] | \ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[2] = LAYOUT_preonic_1x2uC( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +)}; diff --git a/keyboards/preonic/keymaps/codecoffeecode/readme.md b/keyboards/preonic/keymaps/codecoffeecode/readme.md new file mode 100644 index 0000000000..9ec7e95490 --- /dev/null +++ b/keyboards/preonic/keymaps/codecoffeecode/readme.md @@ -0,0 +1 @@ +# This layout is largely based on codecoffeecode's niu_mini layout \ No newline at end of file diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c index d8bb2d5f75..7ee985ea18 100644 --- a/keyboards/preonic/keymaps/default/keymap.c +++ b/keyboards/preonic/keymaps/default/keymap.c @@ -50,12 +50,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = LAYOUT_preonic_grid( \ - 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, 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_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 \ +[_QWERTY] = LAYOUT_preonic_grid( + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, 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_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 @@ -71,12 +71,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = LAYOUT_preonic_grid( \ - 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_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, 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_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 \ +[_COLEMAK] = LAYOUT_preonic_grid( + 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_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, 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_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 @@ -92,12 +92,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = LAYOUT_preonic_grid( \ - 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_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, 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_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 \ +[_DVORAK] = LAYOUT_preonic_grid( + 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_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, 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_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 @@ -113,12 +113,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = LAYOUT_preonic_grid( \ - 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_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 \ +[_LOWER] = LAYOUT_preonic_grid( + 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_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 @@ -134,12 +134,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = LAYOUT_preonic_grid( \ - 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_PGUP, KC_PGDN, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +[_RAISE] = LAYOUT_preonic_grid( + 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_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), /* Adjust (Lower + Raise) @@ -155,12 +155,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = LAYOUT_preonic_grid( \ - 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, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \ - _______, _______, 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, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +[_ADJUST] = LAYOUT_preonic_grid( + 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, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, _______, 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, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) diff --git a/keyboards/preonic/keymaps/drasbeck/config.h b/keyboards/preonic/keymaps/drasbeck/config.h new file mode 100644 index 0000000000..042096f164 --- /dev/null +++ b/keyboards/preonic/keymaps/drasbeck/config.h @@ -0,0 +1,49 @@ +/* +Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck + * + * You are free to: + * + * Share — copy and redistribute the material in any medium or format + * Adapt — remix, transform, and build upon the material + * for any purpose, even commercially. + * + * The licensor cannot revoke these freedoms as long as you follow the license terms. +*/ + +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_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 diff --git a/keyboards/preonic/keymaps/drasbeck/keymap.c b/keyboards/preonic/keymaps/drasbeck/keymap.c new file mode 100644 index 0000000000..d2d30ffa15 --- /dev/null +++ b/keyboards/preonic/keymaps/drasbeck/keymap.c @@ -0,0 +1,240 @@ +/* Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck + * + * You are free to: + * + * Share — copy and redistribute the material in any medium or format + * Adapt — remix, transform, and build upon the material + * for any purpose, even commercially. + * + * The licensor cannot revoke these freedoms as long as you follow the license terms. + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +enum preonic_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + BACKLIT +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT_preonic_grid( + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + 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_SFTENT, + KC_LCTL, KC_NO, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_NUBS, KC_LCTL, KC_NO, KC_NO +), + +[_COLEMAK] = LAYOUT_preonic_grid( + 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_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, 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_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] = LAYOUT_preonic_grid( + 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_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, 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_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] = LAYOUT_preonic_grid( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO , KC_PGUP, KC_MINS, KC_EQL, KC_RBRC, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_HOME, KC_PGDN, KC_END, KC_NO, KC_NUHS, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, KC_RO, KC_ENT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MPLY +), + +[_RAISE] = LAYOUT_preonic_grid( + KC_TRNS, RALT(KC_1), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_5), RALT(KC_6), RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), KC_DEL, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UP, KC_MINS, KC_EQL, KC_RBRC, + KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NUHS, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE, KC_RO, KC_SFTENT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_RALT, KC_TRNS, KC_TRNS, KC_TRNS, RALT(KC_NUBS), KC_TRNS, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_grid( + 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, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, _______, 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, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +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 + #ifdef __AVR__ + writePinLow(E6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef __AVR__ + writePinHigh(E6); + #endif + } + return false; + break; + } + return true; +}; + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + register_code(KC_PGDN); + unregister_code(KC_PGDN); + } else { + register_code(KC_PGUP); + unregister_code(KC_PGUP); + } + } +} + +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } +} + + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/preonic/keymaps/drasbeck/readme.md b/keyboards/preonic/keymaps/drasbeck/readme.md new file mode 100644 index 0000000000..4975ae8b70 --- /dev/null +++ b/keyboards/preonic/keymaps/drasbeck/readme.md @@ -0,0 +1,17 @@ +# drasbeck's Preonic keymap +Danish layout with Danish characters on default layer. + +``` +Default +,-----------------------------------------------------------------------------------. +|KC_GRV| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BSPC | +|------+------+------+------+------+------+------+------+------+------+------+------| +| TAB | q | w | e | r | t | y | u | i | o | p | å | +|------+------+------+------+------+-------------+------+------+------+------+------| +| ESC | a | s | d | f | g | h | j | k | l | æ | ø | +|------+------+------+------+------+------|------+------+------+------+------+------| +|L SHFT| z | x | c | v | b | n | m | , | . | - |SFTENT| +|------+------+------+------+------+------+------+------+------+------+------+------| +|L CTRL| | L ALT| L GUI| LOWER| SPACE | RAISE| NUBS | L CTL| | | +`-----------------------------------------------------------------------------------' +``` diff --git a/keyboards/preonic/keymaps/drasbeck/rules.mk b/keyboards/preonic/keymaps/drasbeck/rules.mk new file mode 100644 index 0000000000..dcf16bef39 --- /dev/null +++ b/keyboards/preonic/keymaps/drasbeck/rules.mk @@ -0,0 +1 @@ +SRC += muse.c diff --git a/keyboards/preonic/keymaps/pezhore/config.h b/keyboards/preonic/keymaps/pezhore/config.h new file mode 100644 index 0000000000..8b541544b1 --- /dev/null +++ b/keyboards/preonic/keymaps/pezhore/config.h @@ -0,0 +1,53 @@ +/* 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 . + */ + +#pragma once +#define UNICODE_SELECTED_MODES UC_WINC, UC_LNX, UC_MAC +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_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 diff --git a/keyboards/preonic/keymaps/pezhore/keymap.c b/keyboards/preonic/keymaps/pezhore/keymap.c new file mode 100644 index 0000000000..39b045d6d3 --- /dev/null +++ b/keyboards/preonic/keymaps/pezhore/keymap.c @@ -0,0 +1,307 @@ +/* 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 QMK_KEYBOARD_H +#include "muse.h" + +enum preonic_layers { + _QWERTY, + _FN, + _NUMPAD, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + LOWER = SAFE_RANGE, + RAISE, + SHRUG, // ¯\_(ツ)_/¯ + TFLIP, // (╯°□°)╯︵ ┻━┻ + POOP, // 💩 + DPOINT, // (ಠ_ಠ) + STRUT // ᕕ( ᐛ )ᕗ +}; + +#define TG_NUMP TG(_NUMPAD) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | FN | Ctrl | GUI | ALT |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid( + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + MO(_FN), KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* FN + * ,-----------------------------------------------------------------------------------. + * |RGBTgl|Brigt-|Brigt+| | | | | | | | | POOP | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | RGB+ | Hue- | Hue+ | | | | | | | |PrtScr|UC_MOD| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | RGB- | Sat- | Sat+ | | | | | | | | |UC_Wnc| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Effct-|Effct+| | | | | | | | |UC_Lin| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |SHRUG |TFLIP |DPOINT|STRUT | | | | |TgNmpd| |UC_Mac| + * `-----------------------------------------------------------------------------------' + */ +[_FN] = LAYOUT_preonic_grid( + RGB_TOG, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, POOP, + RGB_MOD, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, UC_MOD, + RGB_RMOD, RGB_SAD, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, UC_M_WC, + _______, RGB_SPD, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, _______, UC_M_LN, + _______, SHRUG, TFLIP, DPOINT, STRUT, _______, _______, _______, _______, TG_NUMP, _______, UC_M_MA +), + +/* Numpad + * ,-----------------------------------------------------------------------------------. + * | | | | | | |NumLk | 7 | 8 | 9 | / | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | | | | | | | 4 | 5 | 6 | * | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | | | | | | | 1 | 2 | 3 | - | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | 0 | . | = | + |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_preonic_grid( + _______, _______, _______, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, KC_BSPC, + KC_ESC, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_DEL, + KC_TAB, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PEQL, KC_PPLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | |Raise | Home | PgDn | PgUp | End | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, + 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_HOME, KC_PGDN, KC_PGUP, KC_END +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | |Lower | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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_MPRV, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap| | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_grid( + 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, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF, _______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +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 SHRUG: + if (record->event.pressed) { + send_unicode_string("¯\\_(ツ)_/¯"); + } + return false; + break; + case TFLIP: + if (record->event.pressed) { + send_unicode_string("(╯°□°)╯︵ ┻━┻"); + } + return false; + break; + case POOP: + if (record->event.pressed) { + send_unicode_string("💩"); + } + return false; + break; + case DPOINT: + if (record->event.pressed) { + send_unicode_string("(ಠ_ಠ)"); + } + return false; + break; + case STRUT: + if (record->event.pressed) { + send_unicode_string("ᕕ( ᐛ )ᕗ"); + } + return false; + break; + } + return true; +}; + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} + +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } +} + + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/preonic/keymaps/pezhore/readme.md b/keyboards/preonic/keymaps/pezhore/readme.md new file mode 100644 index 0000000000..e911968dd9 --- /dev/null +++ b/keyboards/preonic/keymaps/pezhore/readme.md @@ -0,0 +1 @@ +# The default Preonic layout - largely based on the Planck's \ No newline at end of file diff --git a/keyboards/preonic/keymaps/pezhore/rules.mk b/keyboards/preonic/keymaps/pezhore/rules.mk new file mode 100644 index 0000000000..23198218b4 --- /dev/null +++ b/keyboards/preonic/keymaps/pezhore/rules.mk @@ -0,0 +1,3 @@ +SRC += muse.c +#UNICODEMAP_ENABLE = yes +UNICODE_ENABLE = yes \ No newline at end of file diff --git a/keyboards/preonic/rev1/rules.mk b/keyboards/preonic/rev1/rules.mk index 45edfa0b0f..dea2bbbca9 100644 --- a/keyboards/preonic/rev1/rules.mk +++ b/keyboards/preonic/rev1/rules.mk @@ -34,4 +34,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend LAYOUTS = ortho_5x12 -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/preonic/rev2/rules.mk b/keyboards/preonic/rev2/rules.mk index f24c6a49b7..1b72a622a2 100644 --- a/keyboards/preonic/rev2/rules.mk +++ b/keyboards/preonic/rev2/rules.mk @@ -34,4 +34,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend LAYOUTS = ortho_5x12 -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/primekb/meridian/chconf.h b/keyboards/primekb/meridian/chconf.h new file mode 100644 index 0000000000..03f63da36a --- /dev/null +++ b/keyboards/primekb/meridian/chconf.h @@ -0,0 +1,714 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file rt/templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/primekb/meridian/config.h b/keyboards/primekb/meridian/config.h new file mode 100644 index 0000000000..9194023abb --- /dev/null +++ b/keyboards/primekb/meridian/config.h @@ -0,0 +1,46 @@ +/* +Copyright 2020 Holten Campbell + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5052 +#define PRODUCT_ID 0x004D +#define DEVICE_VER 0x0001 +#define MANUFACTURER Prime Keyboards +#define PRODUCT Meridian + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, B9, B8, B7, B6, B5, B4, B3, A15 } +#define MATRIX_ROW_PINS { A6, A5, A4, A3, A2 } +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN B15 +#define RGBLED_NUM 3 +#define WS2812_SPI SPID2 +#define WS2812_SPI_MOSI_PAL_MODE 0 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/primekb/meridian/halconf.h b/keyboards/primekb/meridian/halconf.h new file mode 100644 index 0000000000..adb1a90715 --- /dev/null +++ b/keyboards/primekb/meridian/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the zero-copy API. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#endif + + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/keyboards/primekb/meridian/info.json b/keyboards/primekb/meridian/info.json new file mode 100644 index 0000000000..3397ae500a --- /dev/null +++ b/keyboards/primekb/meridian/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Meridian", + "url": "https://www.primekb.com", + "maintainer": "holtenc", + "width": 16.5, + "height": 5, + "layouts": { + "LAYOUT_unified_bs_rshift": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":8.5, "y":0}, {"label":"*", "x":9.5, "y":0}, {"label":"(", "x":10.5, "y":0}, {"label":")", "x":11.5, "y":0}, {"label":"_", "x":12.5, "y":0}, {"label":"+", "x":13.5, "y":0}, {"label":"Backspace", "x":14.5, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":8, "y":1}, {"label":"U", "x":9, "y":1}, {"label":"I", "x":10, "y":1}, {"label":"O", "x":11, "y":1}, {"label":"P", "x":12, "y":1}, {"label":"{", "x":13, "y":1}, {"label":"}", "x":14, "y":1}, {"label":"|", "x":15, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":8.25, "y":2}, {"label":"J", "x":9.25, "y":2}, {"label":"K", "x":10.25, "y":2}, {"label":"L", "x":11.25, "y":2}, {"label":":", "x":12.25, "y":2}, {"label":"\"", "x":13.25, "y":2}, {"label":"Enter", "x":14.25, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"B", "x":7.75, "y":3}, {"label":"N", "x":8.75, "y":3}, {"label":"M", "x":9.75, "y":3}, {"label":"<", "x":10.75, "y":3}, {"label":">", "x":11.75, "y":3}, {"label":"?", "x":12.75, "y":3}, {"label":"Shift", "x":13.75, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":2.25}, {"x":7.75, "y":4, "w":2.75}, {"label":"Alt", "x":10.5, "y":4, "w":1.25}, {"label":"Win", "x":12.75, "y":4, "w":1.25}, {"label":"Menu", "x":14, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.25, "y":4, "w":1.25}] + }, + "LAYOUT_split_bs_rshift": { + "layout":[{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":8.5, "y":0}, {"label":"*", "x":9.5, "y":0}, {"label":"(", "x":10.5, "y":0}, {"label":")", "x":11.5, "y":0}, {"label":"_", "x":12.5, "y":0}, {"label":"+", "x":13.5, "y":0}, {"label":"Del", "x":14.5, "y":0}, {"label":"Backspace", "x":15.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":8, "y":1}, {"label":"U", "x":9, "y":1}, {"label":"I", "x":10, "y":1}, {"label":"O", "x":11, "y":1}, {"label":"P", "x":12, "y":1}, {"label":"{", "x":13, "y":1}, {"label":"}", "x":14, "y":1}, {"label":"|", "x":15, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":8.25, "y":2}, {"label":"J", "x":9.25, "y":2}, {"label":"K", "x":10.25, "y":2}, {"label":"L", "x":11.25, "y":2}, {"label":":", "x":12.25, "y":2}, {"label":"\"", "x":13.25, "y":2}, {"label":"Enter", "x":14.25, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"B", "x":7.75, "y":3}, {"label":"N", "x":8.75, "y":3}, {"label":"M", "x":9.75, "y":3}, {"label":"<", "x":10.75, "y":3}, {"label":">", "x":11.75, "y":3}, {"label":"?", "x":12.75, "y":3}, {"label":"Shift", "x":13.75, "y":3, "w":1.75}, {"label":"Fn", "x":15.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":2.25}, {"x":7.75, "y":4, "w":2.75}, {"label":"Alt", "x":10.5, "y":4, "w":1.25}, {"label":"Win", "x":12.75, "y":4, "w":1.25}, {"label":"Menu", "x":14, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.25, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/primekb/meridian/keymaps/default/keymap.c b/keyboards/primekb/meridian/keymaps/default/keymap.c new file mode 100644 index 0000000000..2ea91eeb13 --- /dev/null +++ b/keyboards/primekb/meridian/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* +Copyright 2020 Holten Campbell + +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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_split_bs_rshift( + 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_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL + ), + [1] = LAYOUT_split_bs_rshift( + 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_DEL, KC_BSPC, + _______, _______, KC_PGUP, _______, _______, _______, _______, _______, KC_UP, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, + _______, KC_HOME, KC_PGDN, KC_END, _______, KC_VOLD, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/primekb/meridian/keymaps/via/keymap.c b/keyboards/primekb/meridian/keymaps/via/keymap.c new file mode 100644 index 0000000000..9c314d657c --- /dev/null +++ b/keyboards/primekb/meridian/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 Holten Campbell + +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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_split_bs_rshift( + 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_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL + ), + [1] = LAYOUT_split_bs_rshift( + 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_DEL, KC_BSPC, + _______, _______, KC_PGUP, _______, _______, _______, _______, _______, KC_UP, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, + _______, KC_HOME, KC_PGDN, KC_END, _______, KC_VOLD, KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_split_bs_rshift( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_split_bs_rshift( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/primekb/meridian/keymaps/via/rules.mk b/keyboards/primekb/meridian/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/primekb/meridian/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/primekb/meridian/mcuconf.h b/keyboards/primekb/meridian/mcuconf.h new file mode 100644 index 0000000000..048eb4df65 --- /dev/null +++ b/keyboards/primekb/meridian/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/primekb/meridian/meridian.c b/keyboards/primekb/meridian/meridian.c new file mode 100644 index 0000000000..8d94faf9ea --- /dev/null +++ b/keyboards/primekb/meridian/meridian.c @@ -0,0 +1,68 @@ +/* +Copyright 2020 Holten Campbell + +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 "meridian.h" + +//Initialize B12 for in-switch caps lock +void keyboard_pre_init_kb(void){ + setPinOutput(B12); + keyboard_pre_init_user(); +} + +//Initialize all RGB indicators to 'off' +__attribute__((weak)) +void keyboard_post_init_user(void) { + rgblight_setrgb_at(0, 0, 0, 0); // [..., 0] = top LED + rgblight_setrgb_at(0, 0, 0, 1); // [..., 1] = middle LED + rgblight_setrgb_at(0, 0, 0, 2); // [..., 2] = bottom LED +} + +//Indicator light function +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { + // writePin(B12, !led_state.caps_lock); //Un-comment this line to enable in-switch capslock indicator + if (led_state.caps_lock) { + rgblight_setrgb_at(0, 255, 0, 0); //green + } else { + rgblight_setrgb_at(0, 0, 0, 0); + } + if (led_state.num_lock) { + rgblight_setrgb_at(0, 0, 255, 1); //blue + } else { + rgblight_setrgb_at(0, 0, 0, 1); + } + if (led_state.scroll_lock) { + rgblight_setrgb_at(255, 0, 0, 2); //red + } else { + rgblight_setrgb_at(0, 0, 0, 2); + } +} + return res; +} + +//Below is an exmaple of layer indication using one of the RGB indicatiors. As configured, uses the bottom indicator (2) to light up red when layer 1 is in use. +/* +layer_state_t layer_state_set_kb(layer_state_t state) { + if (get_highest_layer(state) == 1) { + rgblight_setrgb_at(255, 0, 0, 2); + } else { + rgblight_setrgb_at(0, 0, 0, 2); + } + return state; +} +*/ diff --git a/keyboards/primekb/meridian/meridian.h b/keyboards/primekb/meridian/meridian.h new file mode 100644 index 0000000000..e6a155ddec --- /dev/null +++ b/keyboards/primekb/meridian/meridian.h @@ -0,0 +1,52 @@ +/* +Copyright 2020 Holten Campbell + +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 . +*/ + +#pragma once + +#include "quantum.h" + +#define K_NO KC_NO + +#define LAYOUT_unified_bs_rshift( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ + K400, K401, K402, K404, K407, K409, K411, K412, K413 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K_NO, K213 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K_NO}, \ + { K400, K401, K402, K_NO, K404, K_NO, K_NO, K407, K_NO, K409, K_NO, K411, K412, K413 } \ +} + +#define LAYOUT_split_bs_rshift( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K404, K407, K409, K411, K412, K413 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \ + { K400, K401, K402, K_NO, K404, K_NO, K_NO, K407, K_NO, K409, K_NO, K411, K412, K413 } \ +} diff --git a/keyboards/primekb/meridian/readme.md b/keyboards/primekb/meridian/readme.md new file mode 100644 index 0000000000..0e3339a597 --- /dev/null +++ b/keyboards/primekb/meridian/readme.md @@ -0,0 +1,12 @@ +# ai03 x PrimeKB Meridian + +![Meridian](https://i.imgur.com/c90ZTJJl.jpg) + +* Keyboard Maintainer: [Holten Campbell](https://github.com/holtenc) +* Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make primekb/meridian:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/primekb/meridian/rules.mk b/keyboards/primekb/meridian/rules.mk new file mode 100644 index 0000000000..9e2f958bee --- /dev/null +++ b/keyboards/primekb/meridian/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = STM32F072 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +WS2812_DRIVER = spi + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/rabbit_capture_plan/config.h b/keyboards/rabbit_capture_plan/config.h new file mode 100644 index 0000000000..b622d33c1a --- /dev/null +++ b/keyboards/rabbit_capture_plan/config.h @@ -0,0 +1,148 @@ +/* +Copyright 2020 kakunpc + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter + VID & PID are lisenced from microchip sublisence program, Don't use other project! */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEB59 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT rabbit_capture_plan + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +/* + * 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 { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6 + +//#define BACKLIGHT_PIN B7 +//#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_BREATHING + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN +#define RGBLED_SPLIT {32, 37} +# define RGBLED_NUM 69 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_LIMIT_VAL 200 /* The maximum brightness level */ +# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +# define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +//# define RGBLIGHT_EFFECT_BREATHING +//# define RGBLIGHT_EFFECT_RAINBOW_MOOD +//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +//# define RGBLIGHT_EFFECT_SNAKE +//# define RGBLIGHT_EFFECT_KNIGHT +//# define RGBLIGHT_EFFECT_CHRISTMAS +//# define RGBLIGHT_EFFECT_STATIC_GRADIENT +//# define RGBLIGHT_EFFECT_RGB_TEST +//# define RGBLIGHT_EFFECT_ALTERNATING +/*== customize breathing effect ==*/ +/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +/*==== use exp() and sin() ====*/ +//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/rabbit_capture_plan/info.json b/keyboards/rabbit_capture_plan/info.json new file mode 100644 index 0000000000..6cf5953ac1 --- /dev/null +++ b/keyboards/rabbit_capture_plan/info.json @@ -0,0 +1,310 @@ +{ + "keyboard_name": "rabbit_capture_plan", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "width": 20.25, + "height": 5.25, + "layouts": { + "LAYOUT_all": { + "layout": [ + { + "x": 0.66, + "y": 0 + }, + { + "x": 1.6600000000000001, + "y": 0 + }, + { + "x": 2.97, + "y": 0 + }, + { + "x": 3.97, + "y": 0 + }, + { + "x": 4.97, + "y": 0 + }, + { + "x": 5.97, + "y": 0 + }, + { + "x": 6.97, + "y": 0 + }, + { + "x": 9.87, + "y": 0 + }, + { + "x": 10.87, + "y": 0 + }, + { + "x": 11.87, + "y": 0 + }, + { + "x": 12.87, + "y": 0 + }, + { + "x": 14.32, + "y": 0 + }, + { + "x": 15.32, + "y": 0 + }, + { + "x": 16.32, + "y": 0 + }, + { + "x": 17.32, + "y": 0 + }, + + + + { + "x": 0.53, + "y": 1, + "w": 1.5 + }, + { + "x": 2.03, + "y": 1 + }, + { + "x": 3.47, + "y": 1 + }, + { + "x": 4.47, + "y": 1 + }, + { + "x": 5.47, + "y": 1 + }, + { + "x": 6.47, + "y": 1 + }, + { + "x": 7.47, + "y": 1 + }, + { + "x": 9.37, + "y": 1 + }, + { + "x": 10.37, + "y": 1 + }, + { + "x": 11.37, + "y": 1 + }, + { + "x": 12.37, + "y": 1 + }, + { + "x": 13.97, + "y": 1 + }, + { + "x": 14.97, + "y": 1 + }, + { + "x": 15.97, + "y": 1 + }, + { + "x": 16.97, + "y": 1, + "w": 1.5 + }, + + + + { + "x": 0.39, + "y": 2, + "w": 1.75 + }, + { + "x": 2.14, + "y": 2 + }, + { + "x": 3.72, + "y": 2 + }, + { + "x": 4.72, + "y": 2 + }, + { + "x": 5.72, + "y": 2 + }, + { + "x": 6.72, + "y": 2 + }, + { + "x": 7.72, + "y": 2 + }, + { + "x": 9.62, + "y": 2 + }, + { + "x": 10.62, + "y": 2 + }, + { + "x": 11.62, + "y": 2 + }, + { + "x": 12.62, + "y": 2 + }, + { + "x": 14.34, + "y": 2 + }, + { + "x": 15.34, + "y": 2 + }, + { + "x": 16.34, + "y": 2, + "w": 2.25 + }, + + + + { + "x": 0.25, + "y": 3, + "w": 2.25 + }, + { + "x": 2.5, + "y": 3 + }, + { + "x": 4.22, + "y": 3 + }, + { + "x": 5.22, + "y": 3 + }, + { + "x": 6.22, + "y": 3 + }, + { + "x": 7.22, + "y": 3 + }, + { + "x": 9.12, + "y": 3 + }, + { + "x": 10.12, + "y": 3 + }, + { + "x": 11.12, + "y": 3 + }, + { + "x": 12.12, + "y": 3 + }, + { + "x": 13.97, + "y": 3 + }, + { + "x": 14.97, + "y": 3 + }, + { + "x": 15.97, + "y": 3 + }, + { + "x": 16.97, + "y": 3 + }, + { + "x": 18.25, + "y": 3.25 + }, + + + + { + "x": 0.5, + "y": 4, + "w": 1.25 + }, + { + "x": 1.75, + "y": 4, + "w": 1.25 + }, + { + "x": 4.72, + "y": 4 + }, + { + "x": 5.72, + "y": 4, + "w": 2 + }, + { + "x": 7.72, + "y": 4 + }, + { + "x": 9.6, + "y": 4, + "w": 2.75 + }, + { + "x": 12.35, + "y": 4 + }, + { + "x": 17.25, + "y": 4.25 + }, + { + "x": 18.25, + "y": 4.25 + }, + { + "x": 19.25, + "y": 4.25 + } + ] + } + } +} \ No newline at end of file diff --git a/keyboards/rabbit_capture_plan/keymaps/default/keymap.c b/keyboards/rabbit_capture_plan/keymaps/default/keymap.c new file mode 100644 index 0000000000..cbfb6b1410 --- /dev/null +++ b/keyboards/rabbit_capture_plan/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2020 kakunpc + * + * 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 QMK_KEYBOARD_H + +enum layers{ + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT_all( + KC_ESC, 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, 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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, KC_UP, + KC_LCTRL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RIGHT + ), + [_FN] = LAYOUT_all( + 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_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/rabbit_capture_plan/keymaps/default/readme.md b/keyboards/rabbit_capture_plan/keymaps/default/readme.md new file mode 100644 index 0000000000..2ececc3fc2 --- /dev/null +++ b/keyboards/rabbit_capture_plan/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for rabbit_capture_plan diff --git a/keyboards/rabbit_capture_plan/keymaps/via/keymap.c b/keyboards/rabbit_capture_plan/keymaps/via/keymap.c new file mode 100644 index 0000000000..f8109f4f08 --- /dev/null +++ b/keyboards/rabbit_capture_plan/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2020 kakunpc + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [0] = LAYOUT_all( + KC_ESC, 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, 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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, KC_UP, + KC_LCTRL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RIGHT + ), + [1] = LAYOUT_all( + 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_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/rabbit_capture_plan/keymaps/via/readme.md b/keyboards/rabbit_capture_plan/keymaps/via/readme.md new file mode 100644 index 0000000000..928cdb8b77 --- /dev/null +++ b/keyboards/rabbit_capture_plan/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for rabbit_capture_plan diff --git a/keyboards/rabbit_capture_plan/keymaps/via/rules.mk b/keyboards/rabbit_capture_plan/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/rabbit_capture_plan/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/rabbit_capture_plan/rabbit_capture_plan.c b/keyboards/rabbit_capture_plan/rabbit_capture_plan.c new file mode 100644 index 0000000000..7a45e61f35 --- /dev/null +++ b/keyboards/rabbit_capture_plan/rabbit_capture_plan.c @@ -0,0 +1,17 @@ +/* Copyright 2020 kakunpc + * + * 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 "rabbit_capture_plan.h" diff --git a/keyboards/rabbit_capture_plan/rabbit_capture_plan.h b/keyboards/rabbit_capture_plan/rabbit_capture_plan.h new file mode 100644 index 0000000000..8065fdfeb9 --- /dev/null +++ b/keyboards/rabbit_capture_plan/rabbit_capture_plan.h @@ -0,0 +1,47 @@ +/* Copyright 2020 kakunpc + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, R07, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, R17, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, R36, R37, R38, \ + L40, L41, L42, L43, L44, R40, R41, R42, R43, R44 \ +) \ +{ \ + { L00, L01, L02, L03, L04, L05, L06, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, L16, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, KC_NO, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, KC_NO, KC_NO }, \ + { L40, L41, L42, L43, L44, L26, KC_NO, KC_NO }, \ + { R00, R01, R02, R03, R04, R05, R06, R07 }, \ + { R10, R11, R12, R13, R14, R15, R16, R17 }, \ + { R20, R21, R22, R23, R24, R25, R26, KC_NO }, \ + { R30, R31, R32, R33, R34, R35, R36, R37 }, \ + { R38, R40, R41, R42, R43, R44, KC_NO, KC_NO } \ +} diff --git a/keyboards/rabbit_capture_plan/readme.md b/keyboards/rabbit_capture_plan/readme.md new file mode 100644 index 0000000000..bc6f9d5dea --- /dev/null +++ b/keyboards/rabbit_capture_plan/readme.md @@ -0,0 +1,19 @@ +# rabbit_capture_plan + +![rabbit_capture_plan](https://i.gyazo.com/eb25048b17906f897253e8be18db001c.jpg) + +This is 70 keys split keyboard with trackball. + +* Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +* Hardware Supported: rabbit capture plan pcb +* Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make rabbit_capture_plan:default + +Flashing example for this keyboard: + + make rabbit_capture_plan:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/rabbit_capture_plan/rules.mk b/keyboards/rabbit_capture_plan/rules.mk new file mode 100644 index 0000000000..df27d2eb14 --- /dev/null +++ b/keyboards/rabbit_capture_plan/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +SPLIT_KEYBOARD = yes +OLED_DRIVER_ENABLE = no diff --git a/keyboards/ramonimbao/squishy65/chconf.h b/keyboards/ramonimbao/squishy65/chconf.h new file mode 100644 index 0000000000..03f63da36a --- /dev/null +++ b/keyboards/ramonimbao/squishy65/chconf.h @@ -0,0 +1,714 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file rt/templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/ramonimbao/squishy65/config.h b/keyboards/ramonimbao/squishy65/config.h new file mode 100644 index 0000000000..9aa3c8d82d --- /dev/null +++ b/keyboards/ramonimbao/squishy65/config.h @@ -0,0 +1,68 @@ +/* +Copyright 2015 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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xB16B +#define PRODUCT_ID 0x10B5 +#define DEVICE_VER 0x0065 +#define MANUFACTURER Ramon Imbao +#define PRODUCT Squishy65 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +#define MATRIX_COL_PINS { A9, B9, B7, B6, B5, B4, B2, B1, B0, A7, A6, A5, A4, A10, A3, A2 } +#define MATRIX_ROW_PINS { A15, B3, A0, B10, B11 } +#define DIODE_DIRECTION COL2ROW + +// RGB B4 +#define RGB_DI_PIN B15 +#define RGBLED_NUM 18 +#define RGBLIGHT_ANIMATIONS + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* + * 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 diff --git a/keyboards/ramonimbao/squishy65/halconf.h b/keyboards/ramonimbao/squishy65/halconf.h new file mode 100644 index 0000000000..ff5ae7e8a5 --- /dev/null +++ b/keyboards/ramonimbao/squishy65/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the zero-copy API. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#endif + + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/keyboards/ramonimbao/squishy65/info.json b/keyboards/ramonimbao/squishy65/info.json new file mode 100644 index 0000000000..40ba15f6f1 --- /dev/null +++ b/keyboards/ramonimbao/squishy65/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "Squishy65", + "url": "", + "maintainer": "Ramon Imbao", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_ansi": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"|", "x":14, "y":0}, {"label":"Home", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"PgUp", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"PgDn", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"label":"", "x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + }, + "LAYOUT_iso": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Home", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"PgUp", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"PgDn", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"label":"", "x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Ctrl", "x":11.25, "y":4, "w":1.25}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + }, + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"~", "x":13, "y":0}, {"label":"|", "x":14, "y":0}, {"label":"Home", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"PgUp", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"PgDn", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"<", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"label":"", "x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Menu", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + } + } +} diff --git a/keyboards/ramonimbao/squishy65/keymaps/default/keymap.c b/keyboards/ramonimbao/squishy65/keymaps/default/keymap.c new file mode 100644 index 0000000000..c46d573323 --- /dev/null +++ b/keyboards/ramonimbao/squishy65/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* +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 . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ansi( + 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_GRV, KC_BSLS, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_ansi( + 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, _______, _______, RGB_SAI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, RGB_HUI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAD, + _______, _______, _______, RGB_TOG, _______, _______, RGB_MOD, RGB_VAD, RGB_RMOD + ) +}; diff --git a/keyboards/ramonimbao/squishy65/keymaps/iso/keymap.c b/keyboards/ramonimbao/squishy65/keymaps/iso/keymap.c new file mode 100644 index 0000000000..ee1907d3e5 --- /dev/null +++ b/keyboards/ramonimbao/squishy65/keymaps/iso/keymap.c @@ -0,0 +1,35 @@ +/* +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 . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_iso( + 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_HOME, + 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_ENT, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_PGDN, + 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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_iso( + 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_DEL, RGB_SAI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAD, + _______, _______, _______, RGB_TOG, _______, _______, RGB_MOD, RGB_VAD, RGB_RMOD + ) +}; diff --git a/keyboards/ramonimbao/squishy65/keymaps/via/config.h b/keyboards/ramonimbao/squishy65/keymaps/via/config.h new file mode 100644 index 0000000000..4dadf6a169 --- /dev/null +++ b/keyboards/ramonimbao/squishy65/keymaps/via/config.h @@ -0,0 +1 @@ +#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 2047 diff --git a/keyboards/ramonimbao/squishy65/keymaps/via/keymap.c b/keyboards/ramonimbao/squishy65/keymaps/via/keymap.c new file mode 100644 index 0000000000..d9177a622e --- /dev/null +++ b/keyboards/ramonimbao/squishy65/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* +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 . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + 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_GRV, KC_BSLS, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_NO, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + 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, _______, _______, RGB_SAI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, RGB_HUI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAD, + _______, _______, _______, RGB_TOG, _______, _______, _______, RGB_MOD, RGB_VAD, RGB_RMOD + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/ramonimbao/squishy65/keymaps/via/rules.mk b/keyboards/ramonimbao/squishy65/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/ramonimbao/squishy65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/ramonimbao/squishy65/mcuconf.h b/keyboards/ramonimbao/squishy65/mcuconf.h new file mode 100644 index 0000000000..ad12562d17 --- /dev/null +++ b/keyboards/ramonimbao/squishy65/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_NOCLOCK + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/ramonimbao/squishy65/readme.md b/keyboards/ramonimbao/squishy65/readme.md new file mode 100644 index 0000000000..95dd1edfaf --- /dev/null +++ b/keyboards/ramonimbao/squishy65/readme.md @@ -0,0 +1,14 @@ +# Squishy65 + +![Squishy65](https://i.imgur.com/dZsllxQ.png) + +A gasket mount stacked acrylic 65% keyboard. + +* Keyboard Maintainer: [Ramon Imbao](https://github.com/ramonimbao) +* Hardware Supported: STM32F072CBU6 + +Make example for this keyboard (after setting up your build environment): + + make ramonimbao/squishy65:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/ramonimbao/squishy65/rules.mk b/keyboards/ramonimbao/squishy65/rules.mk new file mode 100644 index 0000000000..000e0d34f8 --- /dev/null +++ b/keyboards/ramonimbao/squishy65/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = STM32F072 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/ramonimbao/squishy65/squishy65.c b/keyboards/ramonimbao/squishy65/squishy65.c new file mode 100644 index 0000000000..6d9fb24196 --- /dev/null +++ b/keyboards/ramonimbao/squishy65/squishy65.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Ramon Imbao + * + * 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 "squishy65.h" diff --git a/keyboards/ramonimbao/squishy65/squishy65.h b/keyboards/ramonimbao/squishy65/squishy65.h new file mode 100644 index 0000000000..25480c8748 --- /dev/null +++ b/keyboards/ramonimbao/squishy65/squishy65.h @@ -0,0 +1,73 @@ +/* Copyright 2020 Ramon Imbao + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + + +// ANSI +// split backspace +// 2x right mods +#define LAYOUT_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, k1f, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2e, k2f, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, k3f, \ + k40, k41, k42, k46, k49, k4a, k4b, k4e, k4f \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, XXX, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, XXX, k2e, k2f }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, k3e, k3f }, \ + { k40, k4a, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, k4a, k4b, XXX, XXX, k4e, k4f }, \ +} + +// ISO +// 2u backspace +// 2x right mods +#define LAYOUT_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0f, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, k1f, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2e, k2f, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, k3f, \ + k40, k41, k42, k46, k49, k4a, k4b, k4e, k4f \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, XXX, k0f }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, XXX, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, XXX, k2e, k2f }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, k3e, k3f }, \ + { k40, k4a, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, k4a, k4b, XXX, XXX, k4e, k4f }, \ +} + +// Exposed +// split backspace +// 3x right mods +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, k1f, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2e, k2f, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, k3f, \ + k40, k41, k42, k46, k49, k4a, k4b, k4c, k4e, k4f \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, XXX, k1e, k1f }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, XXX, k2e, k2f }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, k3e, k3f }, \ + { k40, k4a, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, k4a, k4b, k4c, XXX, k4e, k4f }, \ +} diff --git a/keyboards/redox_w/keymaps/danielo515/keymap.c b/keyboards/redox_w/keymaps/danielo515/keymap.c index 2b37a4be33..c174c7cf39 100644 --- a/keyboards/redox_w/keymaps/danielo515/keymap.c +++ b/keyboards/redox_w/keymaps/danielo515/keymap.c @@ -22,56 +22,59 @@ # define GUI OSM(MOD_LGUI) # define ENT_SYM LT(_SYMB, KC_ENT) # define __S LT(_S,KC_S) +# define OSX_BACK LGUI(KC_GRV) +// Which key do you use to enter a layer +# define ENTRY _______ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - KC_NAGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_DQUO , + KC_EQL ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_DQUO , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,TD_PASTE, ALT_TAB ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,SFT_MINS, + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,TD_PASTE, KC_INS ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,CMD_MINS, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - SHIFT ,KC_A ,__S ,FN_D ,FN_F ,KC_G ,COPY_CUT, KC_UNDS ,HYPR_H ,ALT_J ,CTL_K ,KC_L ,TD_CLN ,CMD_QUOT, + KC_PIPE ,KC_A ,__S ,FN_D ,FN_F ,KC_G ,COPY_CUT, KC_UNDS ,HYPR_H ,ALT_J ,CTL_K ,KC_L ,TD_CLN ,SFT_QUOT, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_BSLS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_DEL ,KC_PGDN , ALT_TAB ,AD_ESC ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_ASTR , + KC_BSLS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_DEL ,KC_PLUS , ALT_TAB ,AD_ESC ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_ASTR , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ CTL ,ALT ,KC_LEFT ,KC_RIGHT, GUI , SHIFT ,KC_BSPC , KC_LEAD ,NAV_SPC , ENT_SYM, KC_LBRC ,KC_RBRC ,KC_DOWN ,KC_UP //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), [_SYMB] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - _______ ,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_DLR ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,KC_PSLS ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PERC ,KC_PMNS , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,KC_AT ,KC_DLR , KC_LPRN, KC_RPRN,KC_GRV ,_______ , _______ ,KC_PAST ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PPLS ,KC_BSPC , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,_______ ,_______ , _______ ,_______ ,KC_COLN ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PENT ,XXXXXXX , - //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_P0 , KC_P0 ,KC_PDOT ,KC_PENT ,XXXXXXX - //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F12 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_EXLM ,KC_DLR ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,KC_PSLS ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PERC ,KC_BSPC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_AT ,KC_DLR , KC_LPRN, KC_RPRN,KC_GRV ,_______ , _______ ,KC_PENT ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PPLS ,KC_PMNS , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,_______ ,_______ , _______ ,_______ ,KC_COLN ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PSLS ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , ENTRY , KC_P0 ,KC_PDOT ,KC_PAST ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), [_NAV] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,KC_MS_U ,XXXXXXX ,KC_WH_U ,XXXXXXX ,_______ , _______ ,XXXXXXX,SFT_LEFT,SFT_RIGHT,XXXXXXX ,XXXXXXX ,XXXXXXX , + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , _______ ,SFT_LEFT_END,SFT_LEFT,SFT_RIGHT,SFT_RIGHT_END ,XXXXXXX ,KC_F12 , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_WH_D ,XXXXXXX ,_______ , _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RIGHT,XXXXXXX ,XXXXXXX , + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RIGHT,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,KC_HOME ,CTL_LEFT,CTL_RIGHT,XXXXXXX,XXXXXXX ,XXXXXXX , + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,KC_HOME ,CTL_LEFT,CTL_RIGHT,KC_END,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,_______ , _______ ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,WIN_LEFT,WIN_RIGHT + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , _______ , _______ ,_______ , _______ , ENTRY , KC_MUTE , KC_VOLD ,KC_VOLU ,WIN_LEFT,WIN_RIGHT //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), [_ADJUST] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,RESET ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,KC_F12 , + XXXXXXX ,RESET ,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 , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ @@ -84,26 +87,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,ALL_WIN ,EXPOSE ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + XXXXXXX ,XXXXXXX ,ALL_WIN ,EXPOSE ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,KC_F4 ,KC_F5 ,KC_F6 ,XXXXXXX ,KC_F12 , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + XXXXXXX ,XXXXXXX ,SAVE ,OSX_BACK ,ENTRY ,XXXXXXX ,XXXXXXX , XXXXXXX ,KC_PSCR ,KC_F1 ,KC_F2 ,KC_F3 ,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + XXXXXXX ,UNDO ,REDO ,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 , KC_PGUP ,KC_PGDOWN , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), [_D] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F12 , + XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_A ,KC_B ,KC_C ,KC_D ,KC_E ,KC_F , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , _______ ,KC_PSLS ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PERC ,KC_PMNS , + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , _______ ,KC_LBRACKET ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PERC ,KC_KP_MINUS , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX , _______ ,KC_PAST ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PPLS ,KC_BSPC , + XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,KC_F5 ,KC_F2 ,XXXXXXX , _______ ,KC_RBRACKET ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PPLS ,KC_PAST , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , _______ ,_______ ,KC_COLN ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PENT ,XXXXXXX , + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , _______ ,_______ ,KC_COLN ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PSLS ,XXXXXXX , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,_______ , _______ ,_______ , KC_P0 , KC_P0 ,KC_PDOT ,KC_PENT ,XXXXXXX + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,_______ , _______ ,_______ , KC_P0 , KC_COMMA ,KC_PDOT ,KC_PAST ,XXXXXXX //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), [_S] = LAYOUT( @@ -114,9 +117,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ XXXXXXX ,XXXXXXX ,_______ ,KC_EQL ,F_ARROW ,KC_GRAVE,XXXXXXX , XXXXXXX ,KC_AMPR ,KC_LPRN ,KC_RPRN ,CLN_EQ ,KC_PLUS ,KC_PIPE , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,KC_CIRC ,KC_DLR ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,KC_EXLM ,KC_TILD ,KC_CIRC ,ARROW ,KC_BSLASH,IARROW , + XXXXXXX ,XXXXXXX ,XXXXXXX ,KC_CIRC ,ARROW ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,KC_EXLM ,KC_TILD ,KC_CIRC ,ARROW ,KC_BSLASH,IARROW , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,_______ , XXXXXXX ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,_______ , XXXXXXX ,ENTRY , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ) diff --git a/keyboards/reviung33/config.h b/keyboards/reviung33/config.h new file mode 100644 index 0000000000..b65d1d7c39 --- /dev/null +++ b/keyboards/reviung33/config.h @@ -0,0 +1,137 @@ +/* +Copyright 2020 gtips + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x516D +#define DEVICE_VER 0x0001 +#define MANUFACTURER gtips +#define PRODUCT reviung33 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 10 + +/* + * 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 { F4, F5, F6, F7} +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B1, B3, B2, B6, B5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 5 +# define RGBLIGHT_HUE_STEP 16 +# define RGBLIGHT_SAT_STEP 16 +# define RGBLIGHT_VAL_STEP 16 +# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +# define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +//# define RGBLIGHT_EFFECT_BREATHING +//# define RGBLIGHT_EFFECT_RAINBOW_MOOD +//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +//# define RGBLIGHT_EFFECT_SNAKE +//# define RGBLIGHT_EFFECT_KNIGHT +//# define RGBLIGHT_EFFECT_CHRISTMAS +//# define RGBLIGHT_EFFECT_STATIC_GRADIENT +//# define RGBLIGHT_EFFECT_RGB_TEST +//# define RGBLIGHT_EFFECT_ALTERNATING +/*== customize breathing effect ==*/ +/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +/*==== use exp() and sin() ====*/ +//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/reviung33/info.json b/keyboards/reviung33/info.json new file mode 100644 index 0000000000..559c2e0145 --- /dev/null +++ b/keyboards/reviung33/info.json @@ -0,0 +1,49 @@ +{ + "keyboard_name": "reviung33", + "url": "", + "maintainer": "gtips", + "width": 3, + "height": 2, + "layouts": { + "LAYOUT_reviung33": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + {"x":5, "y":1}, + {"x":6, "y":1}, + {"x":7, "y":1}, + {"x":8, "y":1}, + {"x":9, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":4, "y":2}, + {"x":5, "y":2}, + {"x":6, "y":2}, + {"x":7, "y":2}, + {"x":8, "y":2}, + {"x":9, "y":2}, + + {"x":0, "y":3}, + {"x":2, "y":3, "w":6}, + {"x":9, "y":3} + ] + } + } +} diff --git a/keyboards/reviung33/keymaps/default/keymap.c b/keyboards/reviung33/keymaps/default/keymap.c new file mode 100644 index 0000000000..875df97601 --- /dev/null +++ b/keyboards/reviung33/keymaps/default/keymap.c @@ -0,0 +1,71 @@ +/* Copyright 2020 gtips + * + * 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 QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +#define CT_Q LCTL_T(KC_Q) +#define CT_CM RCTL_T(KC_COMM) +#define SF_Z LSFT_T(KC_Z) +#define SF_SS RSFT_T(KC_SLSH) +#define AL_X LALT_T(KC_X) +#define AL_DT RALT_T(KC_DOT) +#define TB_LO LT(LOWER, KC_TAB) +#define BS_RA LT(RAISE, KC_BSPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_reviung33( + CT_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_ENT, + SF_Z, AL_X, KC_C, KC_V, KC_B, KC_N, KC_M, CT_CM, AL_DT, SF_SS, + TB_LO, KC_SPC, BS_RA + ), + + [_LOWER] = LAYOUT_reviung33( + 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_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, + KC_LSFT, KC_ESC, KC_LGUI, KC_LALT, KC_QUOT, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_RSFT, + _______, _______, _______ + ), + + [_RAISE] = LAYOUT_reviung33( + 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_LBRC, KC_RBRC, KC_BSLS, XXXXXXX, XXXXXXX, KC_GRV, KC_TILD, KC_COLN, + KC_LSFT, KC_ESC, KC_RGUI, KC_LALT, KC_DQUO, KC_TAB, KC_RALT, KC_RCTL, KC_RALT, KC_RSFT, + _______, KC_DEL, _______ + ), + + [_ADJUST] = LAYOUT_reviung33( + RGB_VAI, RGB_SAI, RGB_HUI, RGB_MOD, RGB_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + RGB_VAD, RGB_SAD, RGB_HUD, RGB_RMOD,XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, KC_F11, KC_F12, KC_CAPS, XXXXXXX, KC_PSCR, + _______, _______, _______ + ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + diff --git a/keyboards/reviung33/keymaps/default/readme.md b/keyboards/reviung33/keymaps/default/readme.md new file mode 100644 index 0000000000..9121b14294 --- /dev/null +++ b/keyboards/reviung33/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for reviung33 diff --git a/keyboards/reviung33/keymaps/default_jp/keymap.c b/keyboards/reviung33/keymaps/default_jp/keymap.c new file mode 100644 index 0000000000..1265a301ed --- /dev/null +++ b/keyboards/reviung33/keymaps/default_jp/keymap.c @@ -0,0 +1,70 @@ +/* Copyright 2020 gtips + * + * 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 QMK_KEYBOARD_H +#include "keymap_jp.h" + +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +#define CT_Q LCTL_T(JP_Q) +#define CT_CM RCTL_T(JP_COMM) +#define SF_Z LSFT_T(JP_Z) +#define SF_SS RSFT_T(JP_SLSH) +#define AL_X LALT_T(JP_X) +#define AL_DT RALT_T(JP_DOT) +#define TB_LO LT(LOWER, KC_TAB) +#define BS_RA LT(RAISE, KC_BSPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_reviung33( + CT_Q, JP_W, JP_E, JP_R, JP_T, JP_Y, JP_U, JP_I, JP_O, JP_P, + JP_A, JP_S, JP_D, JP_F, JP_G, JP_H, JP_J, JP_K, JP_L, KC_ENT, + SF_Z, AL_X, JP_C, JP_V, JP_B, JP_N, JP_M, CT_CM, AL_DT, SF_SS, + TB_LO, KC_SPC, BS_RA + ), + + [_LOWER] = LAYOUT_reviung33( + JP_EXLM, JP_AT, JP_HASH, JP_DLR, JP_PERC, JP_CIRC, JP_AMPR, JP_ASTR, JP_LPRN, JP_RPRN, + JP_UNDS, JP_PLUS, JP_LCBR, JP_RCBR, JP_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, JP_SCLN, + KC_LSFT, KC_ESC, KC_LGUI, KC_LALT, JP_QUOT, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_RSFT, + _______, _______, _______ + ), + + [_RAISE] = LAYOUT_reviung33( + JP_1, JP_2, JP_3, JP_4, JP_5, JP_6, JP_7, JP_8, JP_9, JP_0, + JP_MINS, JP_EQL, JP_LBRC, JP_RBRC, JP_YEN, KC_RO, XXXXXXX, JP_GRV, JP_TILD, JP_COLN, + KC_LSFT, KC_ESC, KC_RGUI, KC_LALT, JP_DQUO, KC_TAB, XXXXXXX, KC_RCTL, KC_RALT, KC_RSFT, + _______, KC_DEL, _______ + ), + + [_ADJUST] = LAYOUT_reviung33( + RGB_VAI, RGB_SAI, RGB_HUI, RGB_MOD, RGB_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + RGB_VAD, RGB_SAD, RGB_HUD, RGB_RMOD,XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, KC_F11, KC_F12, KC_CAPS, XXXXXXX, KC_PSCR, + _______, _______, _______ + ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/reviung33/keymaps/default_jp/readme.md b/keyboards/reviung33/keymaps/default_jp/readme.md new file mode 100644 index 0000000000..d7739a3d86 --- /dev/null +++ b/keyboards/reviung33/keymaps/default_jp/readme.md @@ -0,0 +1 @@ +# The default_jp keymap for reviung33 diff --git a/keyboards/reviung33/readme.md b/keyboards/reviung33/readme.md new file mode 100644 index 0000000000..64ed4d57fe --- /dev/null +++ b/keyboards/reviung33/readme.md @@ -0,0 +1,15 @@ +# reviung33 + +![REVIUNG33](https://github.com/gtips/reviung/blob/master/reviung33/image/reviung33-01.jpg) + +The REVIUNG33 is 33-key ortholinear keyboard. + +* Keyboard Maintainer: [gtips](https://github.com/gtips) +* Hardware Supported: REVIUNG33 PCB. +* Hardware Availability: [PCB & Case Data](https://github.com/gtips/reviung/tree/master/reviung33) + +Make example for this keyboard (after setting up your build environment): + + make reviung33:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/reviung33/reviung33.c b/keyboards/reviung33/reviung33.c new file mode 100644 index 0000000000..7684cb72c8 --- /dev/null +++ b/keyboards/reviung33/reviung33.c @@ -0,0 +1,17 @@ +/* Copyright 2020 gtips + * + * 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 "reviung33.h" diff --git a/keyboards/reviung33/reviung33.h b/keyboards/reviung33/reviung33.h new file mode 100644 index 0000000000..ea72a4aadb --- /dev/null +++ b/keyboards/reviung33/reviung33.h @@ -0,0 +1,40 @@ +/* Copyright 2020 gtips + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_reviung33( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ + K30, K31, K32 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29 }, \ + { K30, K31, K32, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ +} diff --git a/keyboards/reviung33/rules.mk b/keyboards/reviung33/rules.mk new file mode 100644 index 0000000000..4581b001d5 --- /dev/null +++ b/keyboards/reviung33/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/rgbkb/sol/keymaps/kageurufu/rules.mk b/keyboards/rgbkb/sol/keymaps/kageurufu/rules.mk index 056959a550..f60fa5d4c9 100644 --- a/keyboards/rgbkb/sol/keymaps/kageurufu/rules.mk +++ b/keyboards/rgbkb/sol/keymaps/kageurufu/rules.mk @@ -11,11 +11,10 @@ LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on RGB_MATRIX_ENABLE = WS2812 # Enable per-key coordinate based RGB effects. Do not enable with RGBlight # Userspace implements their own LTO -LINK_TIME_OPTIMIZATION_ENABLE = no +LTO_ENABLE = no # Do not edit past here include keyboards/$(KEYBOARD)/post_rules.mk - diff --git a/keyboards/rgbkb/sol/rev2/rules.mk b/keyboards/rgbkb/sol/rev2/rules.mk index debe8fe6bb..201a7b47b2 100644 --- a/keyboards/rgbkb/sol/rev2/rules.mk +++ b/keyboards/rgbkb/sol/rev2/rules.mk @@ -29,7 +29,7 @@ IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS dev OLED_DRIVER_ENABLE = no # Enable the OLED Driver EXTRA_ENCODERS_ENABLE = no # Enables 3 encoders per side (up from 1, not compatible with OLED_DRIVER_ENABLE) SWAP_HANDS_ENABLE = no # Enable one-hand typing -LINK_TIME_OPTIMIZATION_ENABLE = yes # Enable Link Time Optimizations greatly reducing firmware size by disabling the old Macros and Functions features +LTO_ENABLE = yes # Enable Link Time Optimizations greatly reducing firmware size by disabling the old Macros and Functions features # Special RGB Matrix, OLED, & Encoder Control Menu! RGB_OLED_MENU = no # Enabled by setting this to the encoder index (0-5) you wish to use to control the menu. diff --git a/keyboards/rgbkb/zen/rev1/keymaps/333fred/config.h b/keyboards/rgbkb/zen/rev1/keymaps/333fred/config.h index 1634f368cc..38e5590d38 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/333fred/config.h +++ b/keyboards/rgbkb/zen/rev1/keymaps/333fred/config.h @@ -1,18 +1,23 @@ /* -Copyright 2018 Fredric Silberberg + Copyright (c) 2020 Fred Silberberg -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. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: -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. + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. -You should have received a copy of the GNU General Public License -along with this program. If not, see . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. */ #pragma once diff --git a/keyboards/rgbkb/zen/rev1/keymaps/333fred/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/333fred/keymap.c index 53756344fd..946ca79efd 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/333fred/keymap.c +++ b/keyboards/rgbkb/zen/rev1/keymaps/333fred/keymap.c @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include QMK_KEYBOARD_H #include "333fred.h" diff --git a/keyboards/rgbkb/zen/rev1/keymaps/samae/config.h b/keyboards/rgbkb/zen/rev1/keymaps/samae/config.h new file mode 100644 index 0000000000..d7b37d5252 --- /dev/null +++ b/keyboards/rgbkb/zen/rev1/keymaps/samae/config.h @@ -0,0 +1,41 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +#include "config_common.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 + +#undef RGBLED_NUM +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RGB_TEST +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +#define RGBLED_NUM 16 +#define RGBLIGHT_HUE_STEP 4 +#define RGBLIGHT_SAT_STEP 4 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/rgbkb/zen/rev1/keymaps/samae/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/samae/keymap.c new file mode 100644 index 0000000000..673ea4054a --- /dev/null +++ b/keyboards/rgbkb/zen/rev1/keymaps/samae/keymap.c @@ -0,0 +1,79 @@ + /* Copyright 2020 Martin J. Potier + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _NAV +}; + + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + NAV, + +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------. .-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |DELETE| A | S | D | F | G | | H | J | K | L | ; | " | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |RGBMOD| + * |------+------+------+------+------+------+------. .--------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt |RGBTOG| NAV |Space | ESC | |Enter|Space/NAV| AltGr| NAV | | - | = | + * `------------------------------------------------' '--------------------------------------------------' + */ + [_QWERTY] = LAYOUT( + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_DEL, 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, RGB_MOD, + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, MO(_NAV), KC_SPC, KC_GESC, KC_ENT, LT(_NAV, KC_SPACE), KC_RALT, MO(_NAV), _______, KC_MINS, KC_EQL + ), + + /* NAV + * ,-----------------------------------------. .-----------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | |RGBSAI|RGBVAI|RGBSAD| | [ | | ] | Pgup | Up | Pgdn |Insert| Home | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | |RGBHUD|RGBVAD|RGBHUI| | | | | Left | Down | Right|Delete| End | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | | | | | | | | | | Pause| Back | Next | + * |------+------+------+------+------+------+------. .------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt |RGBMOD| | | | | RESET| | | | Mute | VOLUP| VOLDN| + * `------------------------------------------------' '------------------------------------------------' + */ + [_NAV] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, RGB_SAI, RGB_VAI, RGB_SAD, _______, KC_LBRC, KC_RBRC, KC_PGUP, KC_UP, KC_PGDN, KC_INS, KC_HOME, + _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_END, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, + KC_LCTL, KC_LGUI, KC_LALT, RGB_MOD, _______, _______, _______, RESET, _______, _______, _______, KC_MUTE, KC_VOLU, KC_VOLD + ), + +}; diff --git a/keyboards/rgbkb/zen/rev1/keymaps/samae/rules.mk b/keyboards/rgbkb/zen/rev1/keymaps/samae/rules.mk new file mode 100644 index 0000000000..1e3cebb145 --- /dev/null +++ b/keyboards/rgbkb/zen/rev1/keymaps/samae/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/rgbkb/zygomorph/keymaps/5x6pad/rules.mk b/keyboards/rgbkb/zygomorph/keymaps/5x6pad/rules.mk index 55d52d58e5..c223cb9ebb 100644 --- a/keyboards/rgbkb/zygomorph/keymaps/5x6pad/rules.mk +++ b/keyboards/rgbkb/zygomorph/keymaps/5x6pad/rules.mk @@ -19,7 +19,7 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing ENCODER_ENABLE = yes # Enable rotary encoder OLED_DRIVER_ENABLE = no # Enable the OLED Driver IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) -LINK_TIME_OPTIMIZATION_ENABLE = no # Enable optimizations to reduce firmware size. Also disables action macros and functions. +LTO_ENABLE = no # Enable optimizations to reduce firmware size. Also disables action macros and functions. # Do not edit past here diff --git a/keyboards/rgbkb/zygomorph/keymaps/default/rules.mk b/keyboards/rgbkb/zygomorph/keymaps/default/rules.mk index 55d52d58e5..c223cb9ebb 100644 --- a/keyboards/rgbkb/zygomorph/keymaps/default/rules.mk +++ b/keyboards/rgbkb/zygomorph/keymaps/default/rules.mk @@ -19,7 +19,7 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing ENCODER_ENABLE = yes # Enable rotary encoder OLED_DRIVER_ENABLE = no # Enable the OLED Driver IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) -LINK_TIME_OPTIMIZATION_ENABLE = no # Enable optimizations to reduce firmware size. Also disables action macros and functions. +LTO_ENABLE = no # Enable optimizations to reduce firmware size. Also disables action macros and functions. # Do not edit past here diff --git a/keyboards/rgbkb/zygomorph/keymaps/default_oled/rules.mk b/keyboards/rgbkb/zygomorph/keymaps/default_oled/rules.mk index 961edb6e2d..f2c194f0d3 100644 --- a/keyboards/rgbkb/zygomorph/keymaps/default_oled/rules.mk +++ b/keyboards/rgbkb/zygomorph/keymaps/default_oled/rules.mk @@ -19,7 +19,7 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing ENCODER_ENABLE = yes # Enable rotary encoder OLED_DRIVER_ENABLE = yes # Enable the OLED Driver IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) -LINK_TIME_OPTIMIZATION_ENABLE = yes # Enable optimizations to reduce firmware size. Also disables action macros and functions. +LTO_ENABLE = yes # Enable optimizations to reduce firmware size. Also disables action macros and functions. # Do not edit past here diff --git a/keyboards/rgbkb/zygomorph/keymaps/xulkal/rules.mk b/keyboards/rgbkb/zygomorph/keymaps/xulkal/rules.mk index dc687cbbd3..78969ad7a4 100644 --- a/keyboards/rgbkb/zygomorph/keymaps/xulkal/rules.mk +++ b/keyboards/rgbkb/zygomorph/keymaps/xulkal/rules.mk @@ -19,7 +19,7 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing ENCODER_ENABLE = no # Enable rotary encoder OLED_DRIVER_ENABLE = no # Enable the OLED Driver IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) -LINK_TIME_OPTIMIZATION_ENABLE = no # Enable optimizations to reduce firmware size. Also disables action macros and functions. +LTO_ENABLE = no # Enable optimizations to reduce firmware size. Also disables action macros and functions. # Do not edit past here diff --git a/keyboards/katana60/config.h b/keyboards/rominronin/katana60/rev1/config.h similarity index 54% rename from keyboards/katana60/config.h rename to keyboards/rominronin/katana60/rev1/config.h index 3385ddb9cb..fe10d1a533 100644 --- a/keyboards/katana60/config.h +++ b/keyboards/rominronin/katana60/rev1/config.h @@ -15,18 +15,16 @@ 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 +#pragma once #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define VENDOR_ID 0x7272 // "rr" - rominronin +#define PRODUCT_ID 0x0C2C #define DEVICE_VER 0x0001 #define MANUFACTURER RominRonin CandyKeys -#define PRODUCT Katana60 -#define DESCRIPTION QMK keyboard firmware for Katana60 +#define PRODUCT Katana60 rev1 /* key matrix size */ #define MATRIX_ROWS 5 @@ -49,18 +47,12 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL -// #define BACKLIGHT_PIN B7 -// #define BACKLIGHT_BREATHING -// #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST -/* 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 */ @@ -92,56 +84,8 @@ along with this program. If not, see . */ //#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. - * - */ - #define TAPPING_TERM 200 -/* 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. @@ -159,28 +103,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * 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/rominronin/katana60/rev1/info.json b/keyboards/rominronin/katana60/rev1/info.json new file mode 100644 index 0000000000..fa0aa93d67 --- /dev/null +++ b/keyboards/rominronin/katana60/rev1/info.json @@ -0,0 +1,83 @@ +{ + "keyboard_name": "Katana60 rev1", + "url": "", + "maintainer": "rominronin", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"k40", "x":0, "y":0}, + {"label":"k41", "x":1, "y":0}, + {"label":"k42", "x":2, "y":0}, + {"label":"k43", "x":3, "y":0}, + {"label":"k44", "x":4, "y":0}, + {"label":"k45", "x":5, "y":0}, + {"label":"k46", "x":6, "y":0}, + {"label":"k47", "x":7, "y":0}, + {"label":"k48", "x":8, "y":0}, + {"label":"k49", "x":9, "y":0}, + {"label":"k4a", "x":10, "y":0}, + {"label":"k4b", "x":11, "y":0}, + {"label":"k4c", "x":12, "y":0}, + {"label":"k4d", "x":13, "y":0}, + {"label":"k4e", "x":14, "y":0}, + {"label":"k30", "x":0, "y":1, "w":1.5}, + {"label":"k31", "x":1.5, "y":1}, + {"label":"k32", "x":2.5, "y":1}, + {"label":"k33", "x":3.5, "y":1}, + {"label":"k34", "x":4.5, "y":1}, + {"label":"k35", "x":5.5, "y":1}, + {"label":"k36", "x":6.5, "y":1}, + {"label":"k37", "x":7.5, "y":1}, + {"label":"k38", "x":8.5, "y":1}, + {"label":"k39", "x":9.5, "y":1}, + {"label":"k3a", "x":10.5, "y":1}, + {"label":"k3b", "x":11.5, "y":1}, + {"label":"k3c", "x":12.5, "y":1}, + {"label":"k3d", "x":13.5, "y":1, "w":1.5}, + {"label":"k20", "x":0, "y":2, "w":1.25}, + {"label":"k21", "x":1.25, "y":2}, + {"label":"k22", "x":2.25, "y":2}, + {"label":"k23", "x":3.25, "y":2}, + {"label":"k24", "x":4.25, "y":2}, + {"label":"k25", "x":5.25, "y":2}, + {"label":"k26", "x":6.25, "y":2}, + {"label":"k27", "x":7.75, "y":2}, + {"label":"k28", "x":8.75, "y":2}, + {"label":"k29", "x":9.75, "y":2}, + {"label":"k2a", "x":10.75, "y":2}, + {"label":"k2b", "x":11.75, "y":2}, + {"label":"k2c", "x":12.75, "y":2}, + {"label":"k2d", "x":13.75, "y":2, "w":1.25}, + {"label":"k10", "x":0, "y":3}, + {"label":"k11", "x":1, "y":3}, + {"label":"k12", "x":2, "y":3}, + {"label":"k13", "x":3, "y":3}, + {"label":"k14", "x":4, "y":3}, + {"label":"k15", "x":5, "y":3}, + {"label":"k16", "x":6, "y":3}, + {"label":"k17", "x":7, "y":3}, + {"label":"k18", "x":8, "y":3}, + {"label":"k19", "x":9, "y":3}, + {"label":"k1a", "x":10, "y":3}, + {"label":"k1b", "x":11, "y":3}, + {"label":"k1c", "x":12, "y":3}, + {"label":"k1d", "x":13, "y":3}, + {"label":"k1e", "x":14, "y":3}, + {"label":"k00", "x":0, "y":4}, + {"label":"k01", "x":1, "y":4, "w":1.25}, + {"label":"k02", "x":2.25, "y":4, "w":1.25}, + {"label":"k03", "x":3.5, "y":4, "w":1.25}, + {"label":"k04", "x":4.75, "y":4, "w":2.25}, + {"label":"k05", "x":7, "y":4}, + {"label":"k06", "x":8, "y":4, "w":2}, + {"label":"k09", "x":10, "y":4}, + {"label":"k0a", "x":11, "y":4}, + {"label":"k0b", "x":12, "y":4}, + {"label":"k0c", "x":13, "y":4}, + {"label":"k0d", "x":14, "y":4} + ] + } + } +} diff --git a/keyboards/katana60/keymaps/colemak/config.h b/keyboards/rominronin/katana60/rev1/keymaps/colemak/config.h similarity index 100% rename from keyboards/katana60/keymaps/colemak/config.h rename to keyboards/rominronin/katana60/rev1/keymaps/colemak/config.h diff --git a/keyboards/katana60/keymaps/colemak/keymap.c b/keyboards/rominronin/katana60/rev1/keymaps/colemak/keymap.c similarity index 99% rename from keyboards/katana60/keymaps/colemak/keymap.c rename to keyboards/rominronin/katana60/rev1/keymaps/colemak/keymap.c index b0ed041854..91128bd5c4 100644 --- a/keyboards/katana60/keymaps/colemak/keymap.c +++ b/keyboards/rominronin/katana60/rev1/keymaps/colemak/keymap.c @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT( /* Base */ - KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_PLUS, + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, MO(3), KC_A, KC_R, KC_S, KC_T, KC_D, KC_HOME, KC_PGUP, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_DEL, KC_PGDN, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, diff --git a/keyboards/katana60/keymaps/colemak/readme.md b/keyboards/rominronin/katana60/rev1/keymaps/colemak/readme.md similarity index 100% rename from keyboards/katana60/keymaps/colemak/readme.md rename to keyboards/rominronin/katana60/rev1/keymaps/colemak/readme.md diff --git a/keyboards/katana60/keymaps/default/config.h b/keyboards/rominronin/katana60/rev1/keymaps/default/config.h similarity index 100% rename from keyboards/katana60/keymaps/default/config.h rename to keyboards/rominronin/katana60/rev1/keymaps/default/config.h diff --git a/keyboards/katana60/keymaps/default/keymap.c b/keyboards/rominronin/katana60/rev1/keymaps/default/keymap.c similarity index 100% rename from keyboards/katana60/keymaps/default/keymap.c rename to keyboards/rominronin/katana60/rev1/keymaps/default/keymap.c diff --git a/keyboards/katana60/keymaps/default/readme.md b/keyboards/rominronin/katana60/rev1/keymaps/default/readme.md similarity index 100% rename from keyboards/katana60/keymaps/default/readme.md rename to keyboards/rominronin/katana60/rev1/keymaps/default/readme.md diff --git a/keyboards/katana60/keymaps/josefadamcik/config.h b/keyboards/rominronin/katana60/rev1/keymaps/josefadamcik/config.h similarity index 100% rename from keyboards/katana60/keymaps/josefadamcik/config.h rename to keyboards/rominronin/katana60/rev1/keymaps/josefadamcik/config.h diff --git a/keyboards/katana60/keymaps/josefadamcik/keymap.c b/keyboards/rominronin/katana60/rev1/keymaps/josefadamcik/keymap.c similarity index 100% rename from keyboards/katana60/keymaps/josefadamcik/keymap.c rename to keyboards/rominronin/katana60/rev1/keymaps/josefadamcik/keymap.c diff --git a/keyboards/katana60/keymaps/josefadamcik/readme.md b/keyboards/rominronin/katana60/rev1/keymaps/josefadamcik/readme.md similarity index 100% rename from keyboards/katana60/keymaps/josefadamcik/readme.md rename to keyboards/rominronin/katana60/rev1/keymaps/josefadamcik/readme.md diff --git a/keyboards/katana60/keymaps/msiu/config.h b/keyboards/rominronin/katana60/rev1/keymaps/msiu/config.h similarity index 100% rename from keyboards/katana60/keymaps/msiu/config.h rename to keyboards/rominronin/katana60/rev1/keymaps/msiu/config.h diff --git a/keyboards/katana60/keymaps/msiu/keymap.c b/keyboards/rominronin/katana60/rev1/keymaps/msiu/keymap.c similarity index 100% rename from keyboards/katana60/keymaps/msiu/keymap.c rename to keyboards/rominronin/katana60/rev1/keymaps/msiu/keymap.c diff --git a/keyboards/katana60/keymaps/msiu/readme.md b/keyboards/rominronin/katana60/rev1/keymaps/msiu/readme.md similarity index 100% rename from keyboards/katana60/keymaps/msiu/readme.md rename to keyboards/rominronin/katana60/rev1/keymaps/msiu/readme.md diff --git a/keyboards/katana60/keymaps/rominronin/config.h b/keyboards/rominronin/katana60/rev1/keymaps/rominronin/config.h similarity index 100% rename from keyboards/katana60/keymaps/rominronin/config.h rename to keyboards/rominronin/katana60/rev1/keymaps/rominronin/config.h diff --git a/keyboards/katana60/keymaps/rominronin/keymap.c b/keyboards/rominronin/katana60/rev1/keymaps/rominronin/keymap.c similarity index 99% rename from keyboards/katana60/keymaps/rominronin/keymap.c rename to keyboards/rominronin/katana60/rev1/keymaps/rominronin/keymap.c index 754b552b24..5666dba9d5 100644 --- a/keyboards/katana60/keymaps/rominronin/keymap.c +++ b/keyboards/rominronin/katana60/rev1/keymaps/rominronin/keymap.c @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT( /* Base */ - KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_PLUS, + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_BSPC, MO(3), KC_A, KC_R, KC_S, KC_T, KC_G, KC_HOME, KC_PGUP, KC_M, KC_N, KC_E, KC_I, KC_O, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_END, KC_DEL, KC_PGDN, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, @@ -64,6 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; + void matrix_init_user(void) { } diff --git a/keyboards/katana60/keymaps/rominronin/readme.md b/keyboards/rominronin/katana60/rev1/keymaps/rominronin/readme.md similarity index 100% rename from keyboards/katana60/keymaps/rominronin/readme.md rename to keyboards/rominronin/katana60/rev1/keymaps/rominronin/readme.md diff --git a/keyboards/rominronin/katana60/rev1/readme.md b/keyboards/rominronin/katana60/rev1/readme.md new file mode 100644 index 0000000000..d41548b18d --- /dev/null +++ b/keyboards/rominronin/katana60/rev1/readme.md @@ -0,0 +1,17 @@ +# Katana60 rev1 + +![Katana60 rev1](https://i.imgur.com/xVkODOul.jpg) + +A 60% keyboard with a symmetrical staggered layout, sold by CandyKeys.com. + +Keyboard Maintainer: [Baris Tosun](https://github.com/rominronin) +Hardware Supported: Katana60 PCB rev1 +Hardware Availability: the rev1 is no longer available, the rev2 can be found at [candykeys.com](https://candykeys.com/product/katana60-pcb-V2) + +Make example for this keyboard (after setting up your build environment): + + make rominronin/katana60/rev1:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +There is also ongoing discussion for the extend layer, at the [Colemak Forum](https://forum.colemak.com/topic/2327-developing-an-extend-layer-for-the-katana60/) diff --git a/keyboards/rominronin/katana60/rev1/rev1.c b/keyboards/rominronin/katana60/rev1/rev1.c new file mode 100644 index 0000000000..e57ae2bbcb --- /dev/null +++ b/keyboards/rominronin/katana60/rev1/rev1.c @@ -0,0 +1,16 @@ +/* Copyright 2017 Baris Tosun + * + * 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 "rev1.h" diff --git a/keyboards/katana60/katana60.h b/keyboards/rominronin/katana60/rev1/rev1.h similarity index 97% rename from keyboards/katana60/katana60.h rename to keyboards/rominronin/katana60/rev1/rev1.h index 904ba56210..52926cc35e 100644 --- a/keyboards/katana60/katana60.h +++ b/keyboards/rominronin/katana60/rev1/rev1.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KATANA60_H -#define KATANA60_H +#pragma once #include "quantum.h" @@ -36,5 +35,3 @@ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e }, \ } - -#endif diff --git a/keyboards/rominronin/katana60/rev1/rules.mk b/keyboards/rominronin/katana60/rev1/rules.mk new file mode 100644 index 0000000000..7b69908b1b --- /dev/null +++ b/keyboards/rominronin/katana60/rev1/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/rominronin/katana60/rev2/config.h b/keyboards/rominronin/katana60/rev2/config.h new file mode 100644 index 0000000000..7eff68a7f4 --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/config.h @@ -0,0 +1,105 @@ +/* +Copyright 2019 rominronin + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x7272 // "rr" - rominronin +#define PRODUCT_ID 0xF03B +#define DEVICE_VER 0x0001 +#define MANUFACTURER RominRonin CandyKeys +#define PRODUCT Katana60 rev2 + +/* 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 { B0, E6, D5, B4, B5 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, D6, D4, D3, D2, D1, D0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +#define TAPPING_TERM 200 + +/* + * 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 diff --git a/keyboards/rominronin/katana60/rev2/info.json b/keyboards/rominronin/katana60/rev2/info.json new file mode 100644 index 0000000000..bc31ae6491 --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/info.json @@ -0,0 +1,579 @@ +{ + "keyboard_name": "Katana60 rev2", + "url": "https://candykeys.com/product/katana60-pcb-V2", + "maintainer": "rominronin", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_7u_a": { + "layout": [ + {"label":"k00","x":0,"y":0}, + {"label":"k01","x":1,"y":0}, + {"label":"k02","x":2,"y":0}, + {"label":"k03","x":3,"y":0}, + {"label":"k04","x":4,"y":0}, + {"label":"k05","x":5,"y":0}, + {"label":"k06","x":6,"y":0}, + {"label":"k07","x":7,"y":0}, + {"label":"k08","x":8,"y":0}, + {"label":"k09","x":9,"y":0}, + {"label":"k0a","x":10,"y":0}, + {"label":"k0b","x":11,"y":0}, + {"label":"k0c","x":12,"y":0}, + {"label":"k0d","x":13,"y":0}, + {"label":"k0e","x":14,"y":0}, + {"label":"k10","x":0,"y":1,"w":1.5}, + {"label":"k11","x":1.5,"y":1}, + {"label":"k12","x":2.5,"y":1}, + {"label":"k13","x":3.5,"y":1}, + {"label":"k14","x":4.5,"y":1}, + {"label":"k15","x":5.5,"y":1}, + {"label":"k16","x":6.5,"y":1}, + {"label":"k18","x":7.5,"y":1}, + {"label":"k19","x":8.5,"y":1}, + {"label":"k1a","x":9.5,"y":1}, + {"label":"k1b","x":10.5,"y":1}, + {"label":"k1c","x":11.5,"y":1}, + {"label":"k1d","x":12.5,"y":1}, + {"label":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"y":2}, + {"label":"k28","x":7.75,"y":2}, + {"label":"k29","x":8.75,"y":2}, + {"label":"k2a","x":9.75,"y":2}, + {"label":"k2b","x":10.75,"y":2}, + {"label":"k2c","x":11.75,"y":2}, + {"label":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"label":"k30","x":0,"y":3}, + {"label":"k31","x":1,"y":3}, + {"label":"k32","x":2,"y":3}, + {"label":"k33","x":3,"y":3}, + {"label":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k41","x":0,"y":4,"w":1.5}, + {"label":"k42","x":1.5,"y":4}, + {"label":"k43","x":2.5,"y":4,"w":1.5}, + {"label":"k47","x":4,"y":4,"w":7}, + {"label":"k4b","x":11,"y":4}, + {"label":"k4c","x":12,"y":4}, + {"label":"k4d","x":13,"y":4}, + {"label":"k4e","x":14,"y":4} + ] + }, + "LAYOUT_7u_b": { + "layout": [ + {"label":"k00","x":0,"y":0}, + {"label":"k01","x":1,"y":0}, + {"label":"k02","x":2,"y":0}, + {"label":"k03","x":3,"y":0}, + {"label":"k04","x":4,"y":0}, + {"label":"k05","x":5,"y":0}, + {"label":"k06","x":6,"y":0}, + {"label":"k07","x":7,"y":0}, + {"label":"k08","x":8,"y":0}, + {"label":"k09","x":9,"y":0}, + {"label":"k0a","x":10,"y":0}, + {"label":"k0b","x":11,"y":0}, + {"label":"k0c","x":12,"y":0}, + {"label":"k0d","x":13,"y":0}, + {"label":"k0e","x":14,"y":0}, + {"label":"k10","x":0,"y":1,"w":1.5}, + {"label":"k11","x":1.5,"y":1}, + {"label":"k12","x":2.5,"y":1}, + {"label":"k13","x":3.5,"y":1}, + {"label":"k14","x":4.5,"y":1}, + {"label":"k15","x":5.5,"y":1}, + {"label":"k16","x":6.5,"y":1}, + {"label":"k18","x":7.5,"y":1}, + {"label":"k19","x":8.5,"y":1}, + {"label":"k1a","x":9.5,"y":1}, + {"label":"k1b","x":10.5,"y":1}, + {"label":"k1c","x":11.5,"y":1}, + {"label":"k1d","x":12.5,"y":1}, + {"label":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"y":2}, + {"label":"k28","x":7.75,"y":2}, + {"label":"k29","x":8.75,"y":2}, + {"label":"k2a","x":9.75,"y":2}, + {"label":"k2b","x":10.75,"y":2}, + {"label":"k2c","x":11.75,"y":2}, + {"label":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"label":"k30","x":0,"y":3}, + {"label":"k31","x":1,"y":3}, + {"label":"k32","x":2,"y":3}, + {"label":"k33","x":3,"y":3}, + {"label":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k41","x":0,"y":4,"w":1.5}, + {"label":"k42","x":1.5,"y":4}, + {"label":"k43","x":2.5,"y":4,"w":1.5}, + {"label":"k47","x":4,"y":4,"w":7}, + {"label":"k17","x":11,"y":4,"w":1.5}, + {"label":"k27","x":12.5,"y":4}, + {"label":"k48","x":13.5,"y":4,"w":1.5} + ] + }, + "LAYOUT_1_a": { + "layout": [ + {"label":"k00","x":0,"y":0}, + {"label":"k01","x":1,"y":0}, + {"label":"k02","x":2,"y":0}, + {"label":"k03","x":3,"y":0}, + {"label":"k04","x":4,"y":0}, + {"label":"k05","x":5,"y":0}, + {"label":"k06","x":6,"y":0}, + {"label":"k07","x":7,"y":0}, + {"label":"k08","x":8,"y":0}, + {"label":"k09","x":9,"y":0}, + {"label":"k0a","x":10,"y":0}, + {"label":"k0b","x":11,"y":0}, + {"label":"k0c","x":12,"y":0}, + {"label":"k0d","x":13,"y":0}, + {"label":"k0e","x":14,"y":0}, + {"label":"k10","x":0,"y":1,"w":1.5}, + {"label":"k11","x":1.5,"y":1}, + {"label":"k12","x":2.5,"y":1}, + {"label":"k13","x":3.5,"y":1}, + {"label":"k14","x":4.5,"y":1}, + {"label":"k15","x":5.5,"y":1}, + {"label":"k16","x":6.5,"y":1}, + {"label":"k18","x":7.5,"y":1}, + {"label":"k19","x":8.5,"y":1}, + {"label":"k1a","x":9.5,"y":1}, + {"label":"k1b","x":10.5,"y":1}, + {"label":"k1c","x":11.5,"y":1}, + {"label":"k1d","x":12.5,"y":1}, + {"label":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"y":2}, + {"label":"k28","x":7.75,"y":2}, + {"label":"k29","x":8.75,"y":2}, + {"label":"k2a","x":9.75,"y":2}, + {"label":"k2b","x":10.75,"y":2}, + {"label":"k2c","x":11.75,"y":2}, + {"label":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"label":"k30","x":0,"y":3}, + {"label":"k31","x":1,"y":3}, + {"label":"k32","x":2,"y":3}, + {"label":"k33","x":3,"y":3}, + {"label":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k40","x":0,"y":4}, + {"label":"k41","x":1,"y":4,"w":1.25}, + {"label":"k42","x":2.25,"y":4,"w":1.25}, + {"label":"k43","x":3.5,"y":4,"w":1.25}, + {"label":"k44","x":4.75,"y":4,"w":2.25}, + {"label":"k47","x":7,"y":4}, + {"label":"k49","x":8,"y":4,"w":2}, + {"label":"k4a","x":10,"y":4}, + {"label":"k4b","x":11,"y":4}, + {"label":"k4c","x":12,"y":4}, + {"label":"k4d","x":13,"y":4}, + {"label":"k4e","x":14,"y":4} + ] + }, + "LAYOUT_1_b": { + "layout": [ + {"label":"k00","x":0,"y":0}, + {"label":"k01","x":1,"y":0}, + {"label":"k02","x":2,"y":0}, + {"label":"k03","x":3,"y":0}, + {"label":"k04","x":4,"y":0}, + {"label":"k05","x":5,"y":0}, + {"label":"k06","x":6,"y":0}, + {"label":"k07","x":7,"y":0}, + {"label":"k08","x":8,"y":0}, + {"label":"k09","x":9,"y":0}, + {"label":"k0a","x":10,"y":0}, + {"label":"k0b","x":11,"y":0}, + {"label":"k0c","x":12,"y":0}, + {"label":"k0d","x":13,"y":0}, + {"label":"k0e","x":14,"y":0}, + {"label":"k10","x":0,"y":1,"w":1.5}, + {"label":"k11","x":1.5,"y":1}, + {"label":"k12","x":2.5,"y":1}, + {"label":"k13","x":3.5,"y":1}, + {"label":"k14","x":4.5,"y":1}, + {"label":"k15","x":5.5,"y":1}, + {"label":"k16","x":6.5,"y":1}, + {"label":"k18","x":7.5,"y":1}, + {"label":"k19","x":8.5,"y":1}, + {"label":"k1a","x":9.5,"y":1}, + {"label":"k1b","x":10.5,"y":1}, + {"label":"k1c","x":11.5,"y":1}, + {"label":"k1d","x":12.5,"y":1}, + {"label":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"y":2}, + {"label":"k28","x":7.75,"y":2}, + {"label":"k29","x":8.75,"y":2}, + {"label":"k2a","x":9.75,"y":2}, + {"label":"k2b","x":10.75,"y":2}, + {"label":"k2c","x":11.75,"y":2}, + {"label":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"label":"k30","x":0,"y":3}, + {"label":"k31","x":1,"y":3}, + {"label":"k32","x":2,"y":3}, + {"label":"k33","x":3,"y":3}, + {"label":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k40","x":0,"y":4}, + {"label":"k41","x":1,"y":4,"w":1.25}, + {"label":"k42","x":2.25,"y":4,"w":1.25}, + {"label":"k43","x":3.5,"y":4,"w":1.25}, + {"label":"k44","x":4.75,"y":4,"w":2.25}, + {"label":"k47","x":7,"y":4}, + {"label":"k49","x":8,"y":4,"w":2.75}, + {"label":"k17","x":10.75,"y":4,"w":2}, + {"label":"k48","x":12.75,"y":4,"w":2.25} + ] + }, + "LAYOUT_1_c": { + "layout": [ + {"label":"k00","x":0,"y":0}, + {"label":"k01","x":1,"y":0}, + {"label":"k02","x":2,"y":0}, + {"label":"k03","x":3,"y":0}, + {"label":"k04","x":4,"y":0}, + {"label":"k05","x":5,"y":0}, + {"label":"k06","x":6,"y":0}, + {"label":"k07","x":7,"y":0}, + {"label":"k08","x":8,"y":0}, + {"label":"k09","x":9,"y":0}, + {"label":"k0a","x":10,"y":0}, + {"label":"k0b","x":11,"y":0}, + {"label":"k0c","x":12,"y":0}, + {"label":"k0d","x":13,"y":0}, + {"label":"k0e","x":14,"y":0}, + {"label":"k10","x":0,"y":1,"w":1.5}, + {"label":"k11","x":1.5,"y":1}, + {"label":"k12","x":2.5,"y":1}, + {"label":"k13","x":3.5,"y":1}, + {"label":"k14","x":4.5,"y":1}, + {"label":"k15","x":5.5,"y":1}, + {"label":"k16","x":6.5,"y":1}, + {"label":"k18","x":7.5,"y":1}, + {"label":"k19","x":8.5,"y":1}, + {"label":"k1a","x":9.5,"y":1}, + {"label":"k1b","x":10.5,"y":1}, + {"label":"k1c","x":11.5,"y":1}, + {"label":"k1d","x":12.5,"y":1}, + {"label":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"y":2}, + {"label":"k28","x":7.75,"y":2}, + {"label":"k29","x":8.75,"y":2}, + {"label":"k2a","x":9.75,"y":2}, + {"label":"k2b","x":10.75,"y":2}, + {"label":"k2c","x":11.75,"y":2}, + {"label":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"label":"k30","x":0,"y":3}, + {"label":"k31","x":1,"y":3}, + {"label":"k32","x":2,"y":3}, + {"label":"k33","x":3,"y":3}, + {"label":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k40","x":0,"y":4}, + {"label":"k41","x":1,"y":4,"w":1.25}, + {"label":"k42","x":2.25,"y":4,"w":1.25}, + {"label":"k43","x":3.5,"y":4,"w":1.25}, + {"label":"k44","x":4.75,"y":4,"w":2.25}, + {"label":"k47","x":7,"y":4}, + {"label":"k49","x":8,"y":4,"w":2}, + {"label":"k45","x":10,"y":4,"w":1.5}, + {"label":"k27","x":11.5,"y":4,"w":1.25}, + {"label":"k48","x":12.75,"y":4,"w":2.25} + ] + }, + "LAYOUT_2_a": { + "layout": [ + {"label":"k00","x":0,"y":0}, + {"label":"k01","x":1,"y":0}, + {"label":"k02","x":2,"y":0}, + {"label":"k03","x":3,"y":0}, + {"label":"k04","x":4,"y":0}, + {"label":"k05","x":5,"y":0}, + {"label":"k06","x":6,"y":0}, + {"label":"k07","x":7,"y":0}, + {"label":"k08","x":8,"y":0}, + {"label":"k09","x":9,"y":0}, + {"label":"k0a","x":10,"y":0}, + {"label":"k0b","x":11,"y":0}, + {"label":"k0c","x":12,"y":0}, + {"label":"k0d","x":13,"y":0}, + {"label":"k0e","x":14,"y":0}, + {"label":"k10","x":0,"y":1,"w":1.5}, + {"label":"k11","x":1.5,"y":1}, + {"label":"k12","x":2.5,"y":1}, + {"label":"k13","x":3.5,"y":1}, + {"label":"k14","x":4.5,"y":1}, + {"label":"k15","x":5.5,"y":1}, + {"label":"k16","x":6.5,"y":1}, + {"label":"k18","x":7.5,"y":1}, + {"label":"k19","x":8.5,"y":1}, + {"label":"k1a","x":9.5,"y":1}, + {"label":"k1b","x":10.5,"y":1}, + {"label":"k1c","x":11.5,"y":1}, + {"label":"k1d","x":12.5,"y":1}, + {"label":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"y":2}, + {"label":"k28","x":7.75,"y":2}, + {"label":"k29","x":8.75,"y":2}, + {"label":"k2a","x":9.75,"y":2}, + {"label":"k2b","x":10.75,"y":2}, + {"label":"k2c","x":11.75,"y":2}, + {"label":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"label":"k30","x":0,"y":3}, + {"label":"k31","x":1,"y":3}, + {"label":"k32","x":2,"y":3}, + {"label":"k33","x":3,"y":3}, + {"label":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k41","x":0,"y":4,"w":1.5}, + {"label":"k42","x":1.5,"y":4,"w":1.25}, + {"label":"k43","x":2.75,"y":4,"w":1.5}, + {"label":"k44","x":4.25,"y":4,"w":2.75}, + {"label":"k47","x":7,"y":4}, + {"label":"k49","x":8,"y":4,"w":2}, + {"label":"k4a","x":10,"y":4}, + {"label":"k4b","x":11,"y":4}, + {"label":"k4c","x":12,"y":4}, + {"label":"k4d","x":13,"y":4}, + {"label":"k4e","x":14,"y":4} + ] + }, + "LAYOUT_2_b": { + "layout": [ + {"label":"k00","x":0,"y":0}, + {"label":"k01","x":1,"y":0}, + {"label":"k02","x":2,"y":0}, + {"label":"k03","x":3,"y":0}, + {"label":"k04","x":4,"y":0}, + {"label":"k05","x":5,"y":0}, + {"label":"k06","x":6,"y":0}, + {"label":"k07","x":7,"y":0}, + {"label":"k08","x":8,"y":0}, + {"label":"k09","x":9,"y":0}, + {"label":"k0a","x":10,"y":0}, + {"label":"k0b","x":11,"y":0}, + {"label":"k0c","x":12,"y":0}, + {"label":"k0d","x":13,"y":0}, + {"label":"k0e","x":14,"y":0}, + {"label":"k10","x":0,"y":1,"w":1.5}, + {"label":"k11","x":1.5,"y":1}, + {"label":"k12","x":2.5,"y":1}, + {"label":"k13","x":3.5,"y":1}, + {"label":"k14","x":4.5,"y":1}, + {"label":"k15","x":5.5,"y":1}, + {"label":"k16","x":6.5,"y":1}, + {"label":"k18","x":7.5,"y":1}, + {"label":"k19","x":8.5,"y":1}, + {"label":"k1a","x":9.5,"y":1}, + {"label":"k1b","x":10.5,"y":1}, + {"label":"k1c","x":11.5,"y":1}, + {"label":"k1d","x":12.5,"y":1}, + {"label":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"y":2}, + {"label":"k28","x":7.75,"y":2}, + {"label":"k29","x":8.75,"y":2}, + {"label":"k2a","x":9.75,"y":2}, + {"label":"k2b","x":10.75,"y":2}, + {"label":"k2c","x":11.75,"y":2}, + {"label":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"label":"k30","x":0,"y":3}, + {"label":"k31","x":1,"y":3}, + {"label":"k32","x":2,"y":3}, + {"label":"k33","x":3,"y":3}, + {"label":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k41","x":0,"y":4,"w":1.5}, + {"label":"k42","x":1.5,"y":4,"w":1.25}, + {"label":"k43","x":2.75,"y":4,"w":1.5}, + {"label":"k44","x":4.25,"y":4,"w":2.75}, + {"label":"k47","x":7,"y":4}, + {"label":"k49","x":8,"y":4,"w":2.75}, + {"label":"k17","x":10.75,"y":4,"w":2}, + {"label":"k48","x":12.75,"y":4,"w":2.25} + ] + }, + "LAYOUT_2_c": { + "layout": [ + {"label":"k00","x":0,"y":0}, + {"label":"k01","x":1,"y":0}, + {"label":"k02","x":2,"y":0}, + {"label":"k03","x":3,"y":0}, + {"label":"k04","x":4,"y":0}, + {"label":"k05","x":5,"y":0}, + {"label":"k06","x":6,"y":0}, + {"label":"k07","x":7,"y":0}, + {"label":"k08","x":8,"y":0}, + {"label":"k09","x":9,"y":0}, + {"label":"k0a","x":10,"y":0}, + {"label":"k0b","x":11,"y":0}, + {"label":"k0c","x":12,"y":0}, + {"label":"k0d","x":13,"y":0}, + {"label":"k0e","x":14,"y":0}, + {"label":"k10","x":0,"y":1,"w":1.5}, + {"label":"k11","x":1.5,"y":1}, + {"label":"k12","x":2.5,"y":1}, + {"label":"k13","x":3.5,"y":1}, + {"label":"k14","x":4.5,"y":1}, + {"label":"k15","x":5.5,"y":1}, + {"label":"k16","x":6.5,"y":1}, + {"label":"k18","x":7.5,"y":1}, + {"label":"k19","x":8.5,"y":1}, + {"label":"k1a","x":9.5,"y":1}, + {"label":"k1b","x":10.5,"y":1}, + {"label":"k1c","x":11.5,"y":1}, + {"label":"k1d","x":12.5,"y":1}, + {"label":"k1e","x":13.5,"y":1,"w":1.5}, + {"label":"k20","x":0,"y":2,"w":1.25}, + {"label":"k21","x":1.25,"y":2}, + {"label":"k22","x":2.25,"y":2}, + {"label":"k23","x":3.25,"y":2}, + {"label":"k24","x":4.25,"y":2}, + {"label":"k25","x":5.25,"y":2}, + {"label":"k26","x":6.25,"y":2}, + {"label":"k28","x":7.75,"y":2}, + {"label":"k29","x":8.75,"y":2}, + {"label":"k2a","x":9.75,"y":2}, + {"label":"k2b","x":10.75,"y":2}, + {"label":"k2c","x":11.75,"y":2}, + {"label":"k2d","x":12.75,"y":2}, + {"label":"k2e","x":13.75,"y":2,"w":1.25}, + {"label":"k30","x":0,"y":3}, + {"label":"k31","x":1,"y":3}, + {"label":"k32","x":2,"y":3}, + {"label":"k33","x":3,"y":3}, + {"label":"k34","x":4,"y":3}, + {"label":"k35","x":5,"y":3}, + {"label":"k36","x":6,"y":3}, + {"label":"k37","x":7,"y":3}, + {"label":"k38","x":8,"y":3}, + {"label":"k39","x":9,"y":3}, + {"label":"k3a","x":10,"y":3}, + {"label":"k3b","x":11,"y":3}, + {"label":"k3c","x":12,"y":3}, + {"label":"k3d","x":13,"y":3}, + {"label":"k3e","x":14,"y":3}, + {"label":"k41","x":0,"y":4,"w":1.5}, + {"label":"k42","x":1.5,"y":4,"w":1.25}, + {"label":"k43","x":2.75,"y":4,"w":1.5}, + {"label":"k44","x":4.25,"y":4,"w":2.75}, + {"label":"k47","x":7,"y":4}, + {"label":"k49","x":8,"y":4,"w":2}, + {"label":"k45","x":10,"y":4,"w":1.5}, + {"label":"k27","x":11.5,"y":4,"w":1.25}, + {"label":"k48","x":12.75,"y":4,"w":2.25} + ] + } + } +} diff --git a/keyboards/rominronin/katana60/rev2/keymaps/default/config.h b/keyboards/rominronin/katana60/rev2/keymaps/default/config.h new file mode 100644 index 0000000000..0689676402 --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 rominronin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/rominronin/katana60/rev2/keymaps/default/keymap.c b/keyboards/rominronin/katana60/rev2/keymaps/default/keymap.c new file mode 100644 index 0000000000..d9c9b6d4ed --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/keymaps/default/keymap.c @@ -0,0 +1,71 @@ +/* Copyright 2019 rominronin + * + * 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 QMK_KEYBOARD_H + +// MacOS based definitions. +#define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer +#define K_PRVWD LALT(KC_LEFT) // Previous word +#define K_NXTWD LALT(KC_RIGHT) // Next word +#define K_LSTRT LGUI(KC_LEFT) // Start of line +#define K_LEND LGUI(KC_RIGHT) // End of line +#define UNDO LGUI(KC_Z) // UNDO +#define CUT LGUI(KC_X) // CUT +#define COPY LGUI(KC_C) // COPY +#define PASTE LGUI(KC_V) // PASTE + +enum layer_names { + BASE, + NUMB, + SYMB, + CURS, +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_1_a(/* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(3), KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_DEL, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(2), KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_ENT, K_SPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + [NUMB] = LAYOUT_1_a( + _______, _______, _______, _______, _______, _______, _______, DF(0), _______, _______, KC_PEQL, KC_PSLS, KC_PAST, _______, _______, + _______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, + _______, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, + _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, + _______, _______, _______, _______, _______, KC_P0, _______, _______, KC_PDOT, KC_PENT, _______, _______ + ), + [SYMB] = LAYOUT_1_a( + 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______ + ), + [CURS] = LAYOUT_1_a( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, K_PRVWD, KC_UP, K_NXTWD, _______, _______, + _______, _______, KC_LCTL, KC_LALT, KC_LSFT, _______, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______, + _______, UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, _______, K_LSTRT, _______, K_LEND, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/rominronin/katana60/rev2/keymaps/default/readme.md b/keyboards/rominronin/katana60/rev2/keymaps/default/readme.md new file mode 100644 index 0000000000..6d0bbe8b2d --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for katana60_rev2 diff --git a/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/config.h b/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/config.h new file mode 100644 index 0000000000..0689676402 --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 rominronin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/keymap.c b/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/keymap.c new file mode 100644 index 0000000000..5450892123 --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/keymap.c @@ -0,0 +1,79 @@ +/* Copyright 2019 rominronin + * + * 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 QMK_KEYBOARD_H + +// MacOS based definitions. +#define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer +#define K_PRVWD LALT(KC_LEFT) // Previous word +#define K_NXTWD LALT(KC_RIGHT) // Next word +#define K_LSTRT LGUI(KC_LEFT) // Start of line +#define K_LEND LGUI(KC_RIGHT) // End of line +#define UNDO LGUI(KC_Z) // UNDO +#define CUT LGUI(KC_X) // CUT +#define COPY LGUI(KC_C) // COPY +#define PASTE LGUI(KC_V) // PASTE + +enum layer_names { + BASE, + NUMB, + SYMB, + CURS, + BASE2, +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_7u_a(/* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(4), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_BSPC, + MO(3), KC_A, KC_R, KC_S, KC_T, KC_G, KC_HOME, KC_PGUP, KC_M, KC_N, KC_E, KC_I, KC_O, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_END, KC_DEL, KC_PGDN, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, K_SPCFN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + [NUMB] = LAYOUT_7u_a( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PEQL, KC_PSLS, KC_PAST, _______, _______, + _______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, + DF(0), KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, + _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, + _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, _______, _______ + ), + [SYMB] = LAYOUT_7u_a( + 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, KC_DEL, _______, _______, _______, _______ + ), + [CURS] = LAYOUT_7u_a( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, K_PRVWD, KC_UP, K_NXTWD, _______, _______, + _______, _______, KC_LCTL, KC_LALT, KC_LSFT, _______, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______, + _______, UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, _______, K_LSTRT, _______, K_LEND, _______, _______, + _______, _______, _______, DF(1), _______, _______, _______, _______ + ), + [BASE2] = LAYOUT_7u_a(/* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(0), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_BSPC, + KC_CAPS, KC_A, KC_R, KC_S, KC_T, KC_G, KC_HOME, KC_PGUP, KC_M, KC_N, KC_E, KC_I, KC_O, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_END, KC_DEL, KC_PGDN, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPACE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ) +}; diff --git a/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/readme.md b/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/readme.md new file mode 100644 index 0000000000..6d0bbe8b2d --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/keymaps/rominronin_7u/readme.md @@ -0,0 +1 @@ +# The default keymap for katana60_rev2 diff --git a/keyboards/rominronin/katana60/rev2/keymaps/via/keymap.c b/keyboards/rominronin/katana60/rev2/keymaps/via/keymap.c new file mode 100644 index 0000000000..3661e245ec --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2019 rominronin + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_1_a(/* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(3), KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_DEL, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + MO(2), KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_ENT, KC_SPACE, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + [1] = LAYOUT_1_a( + _______, _______, _______, _______, _______, _______, _______, DF(0), _______, _______, KC_PEQL, KC_PSLS, KC_PAST, _______, _______, + _______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, + _______, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, + _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, + _______, _______, _______, _______, _______, KC_P0, _______, _______, KC_PDOT, KC_PENT, _______, _______ + ), + [2] = LAYOUT_1_a( + 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_1_a( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, KC_LCTL, KC_LALT, KC_LSFT, _______, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, _______, KC_END, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/rominronin/katana60/rev2/keymaps/via/rules.mk b/keyboards/rominronin/katana60/rev2/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/rominronin/katana60/rev2/readme.md b/keyboards/rominronin/katana60/rev2/readme.md new file mode 100644 index 0000000000..2f2abad709 --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/readme.md @@ -0,0 +1,17 @@ +# Katana60 rev2 + +![Katana60 rev2](https://i.imgur.com/3hBsSvBl.jpg) + +A 60% keyboard with a symmetrical staggered layout, sold by CandyKeys.com. + +Keyboard Maintainer: [Baris Tosun](https://github.com/rominronin) +Hardware Supported: Katana60 PCB rev2 +Hardware Availability: [candykeys.com](https://candykeys.com/product/katana60-pcb-V2) + +Make example for this keyboard (after setting up your build environment): + + make rominronin/katana60/rev2:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +There is also ongoing discussion for the extend layer, at the [Colemak Forum](https://forum.colemak.com/topic/2327-developing-an-extend-layer-for-the-katana60/) diff --git a/keyboards/rominronin/katana60/rev2/rev2.c b/keyboards/rominronin/katana60/rev2/rev2.c new file mode 100644 index 0000000000..3336fd0dc7 --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/rev2.c @@ -0,0 +1,16 @@ +/* Copyright 2019 rominronin + * + * 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 "rev2.h" diff --git a/keyboards/rominronin/katana60/rev2/rev2.h b/keyboards/rominronin/katana60/rev2/rev2.h new file mode 100644 index 0000000000..35a45b438a --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/rev2.h @@ -0,0 +1,238 @@ +/* Copyright 2019 rominronin + * + * 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 . + */ +#pragma once + +#include "quantum.h" +#define XXX KC_NO + +/* LAYOUT_7u_a + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │28 │29 │2A │2B │2C │2D │2E │ + * ├───┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴─┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├───┴─┬─┴─┬─┴───┼───┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┤ + * │41 │42 │43 │ 47 │4B │4C │4D │4E │ + * └─────┴───┴─────┴───────────────────────────┴───┴───┴───┴───┘ + */ +#define LAYOUT_7u_a( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q41, Q42, Q43, Q47, Q4B, Q4C, Q4D, Q4E \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, XXX, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, XXX, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { XXX, Q41, Q42, Q43, XXX, XXX, XXX, Q47, XXX, XXX, XXX, Q4B, Q4C, Q4D, Q4E } \ +} + +/* LAYOUT_7u_b + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │28 │29 │2A │2B │2C │2D │2E │ + * ├───┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴─┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├───┴─┬─┴─┬─┴───┼───┴───┴───┴───┴───┴───┴───┼───┴─┬─┴─┬─┴───┤ + * │41 │42 │43 │ 47 │17 │27 │48 │ + * └─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ + */ +#define LAYOUT_7u_b( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q41, Q42, Q43, Q47, Q17, Q27, Q48 \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q17, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q27, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { XXX, Q41, Q42, Q43, XXX, XXX, XXX, Q47, Q48, XXX, XXX, XXX, XXX, XXX, XXX } \ +} + +/* LAYOUT_1_a + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │28 │29 │2A │2B │2C │2D │2E │ + * ├───┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴─┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├───┼───┴┬──┴─┬─┴──┬┴───┴───┼───┼───┴───┼───┼───┼───┼───┼───┤ + * │40 │41 │42 │43 │ 44 │47 │ 49 │4A │4B │4C │4D │4E │ + * └───┴────┴────┴────┴────────┴───┴───────┴───┴───┴───┴───┴───┘ + */ +#define LAYOUT_1_a( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q40, Q41, Q42, Q43, Q44, Q47, Q49, Q4A, Q4B, Q4C, Q4D, Q4E \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, XXX, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, XXX, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { Q40, Q41, Q42, Q43, Q44, XXX, XXX, Q47, XXX, Q49, Q4A, Q4B, Q4C, Q4D, Q4E } \ +} + +/* LAYOUT_1_b + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │28 │29 │2A │2B │2C │2D │2E │ + * ├───┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴─┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├───┼───┴┬──┴─┬─┴──┬┴───┴───┼───┼───┴───┴──┬┴───┴──┬┴───┴───┤ + * │40 │41 │42 │43 │ 44 │47 │ 49 │17 │48 │ + * └───┴────┴────┴────┴────────┴───┴──────────┴───────┴────────┘ + */ +#define LAYOUT_1_b( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q40, Q41, Q42, Q43, Q44, Q47, Q49, Q17, Q48 \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q17, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, XXX, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { Q40, Q41, Q42, Q43, Q44, XXX, XXX, Q47, Q48, Q49, XXX, XXX, XXX, XXX, XXX } \ +} + +/* LAYOUT_1_c + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │28 │29 │2A │2B │2C │2D │2E │ + * ├───┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴─┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├───┼───┴┬──┴─┬─┴──┬┴───┴───┼───┼───┴───┼───┴─┬─┴──┬┴───┴───┤ + * │40 │41 │42 │43 │ 44 │47 │ 49 │45 │27 │48 │ + * └───┴────┴────┴────┴────────┴───┴───────┴─────┴────┴────────┘ + */ +#define LAYOUT_1_c( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q40, Q41, Q42, Q43, Q44, Q47, Q49, Q45, Q27, Q48 \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, XXX, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q27, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { Q40, Q41, Q42, Q43, Q44, Q45, XXX, Q47, Q48, Q49, XXX, XXX, XXX, XXX, XXX } \ +} + + +/* LAYOUT_2_a + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │28 │29 │2A │2B │2C │2D │2E │ + * ├───┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴─┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├───┴─┬─┴──┬┴───┴┬──┴───┴───┼───┼───┴───┼───┼───┼───┼───┼───┤ + * │41 │42 │43 │ 44 │47 │ 49 │4A │4B │4C │4D │4E │ + * └─────┴────┴─────┴──────────┴───┴───────┴───┴───┴───┴───┴───┘ + */ +#define LAYOUT_2_a( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q41, Q42, Q43, Q44, Q47, Q49, Q4A, Q4B, Q4C, Q4D, Q4E \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, XXX, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, XXX, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { XXX, Q41, Q42, Q43, Q44, XXX, XXX, Q47, XXX, Q49, Q4A, Q4B, Q4C, Q4D, Q4E } \ +} + + + +/* LAYOUT_2_b + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │28 │29 │2A │2B │2C │2D │2E │ + * ├───┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴─┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├───┴─┬─┴──┬┴───┴┬──┴───┴───┼───┼───┴───┴──┬┴───┴──┬┴───┴───┤ + * │41 │42 │43 │ 44 │47 │ 49 │17 │48 │ + * └─────┴────┴─────┴──────────┴───┴──────────┴───────┴────────┘ + */ +#define LAYOUT_2_b( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q41, Q42, Q43, Q44, Q47, Q49, Q17, Q48 \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q17, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, XXX, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { XXX, Q41, Q42, Q43, Q44, XXX, XXX, Q47, Q48, Q49, XXX, XXX, XXX, XXX, XXX } \ +} + +/* LAYOUT_2_c + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │11 │12 │13 │14 │15 │16 │18 │19 │1A │1B │1C │1D │1E │ + * ├────┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬────┤ + * │20 │21 │22 │23 │24 │25 │26 │ │28 │29 │2A │2B │2C │2D │2E │ + * ├───┬┴──┬┴──┬┴──┬┴──┬┴──┬┴──┬┴─┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├───┼───┴┬──┴─┬─┴──┬┴───┴───┼───┼───┴───┼───┴─┬─┴──┬┴───┴───┤ + * │40 │41 │42 │43 │ 44 │47 │ 49 │45 │27 │48 │ + * └───┴────┴────┴────┴────────┴───┴───────┴─────┴────┴────────┘ + */ +#define LAYOUT_2_c( \ + Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E, \ + Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E, \ + Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E, \ + Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E, \ + Q41, Q42, Q43, Q44, Q47, Q49, Q45, Q27, Q48 \ +) { \ + { Q00, Q01, Q02, Q03, Q04, Q05, Q06, Q07, Q08, Q09, Q0A, Q0B, Q0C, Q0D, Q0E }, \ + { Q10, Q11, Q12, Q13, Q14, Q15, Q16, XXX, Q18, Q19, Q1A, Q1B, Q1C, Q1D, Q1E }, \ + { Q20, Q21, Q22, Q23, Q24, Q25, Q26, Q27, Q28, Q29, Q2A, Q2B, Q2C, Q2D, Q2E }, \ + { Q30, Q31, Q32, Q33, Q34, Q35, Q36, Q37, Q38, Q39, Q3A, Q3B, Q3C, Q3D, Q3E }, \ + { XXX, Q41, Q42, Q43, Q44, Q45, XXX, Q47, Q48, Q49, XXX, XXX, XXX, XXX, XXX } \ +} diff --git a/keyboards/rominronin/katana60/rev2/rules.mk b/keyboards/rominronin/katana60/rev2/rules.mk new file mode 100644 index 0000000000..000f55911a --- /dev/null +++ b/keyboards/rominronin/katana60/rev2/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/setta21/keymaps/salicylic/rules.mk b/keyboards/setta21/keymaps/salicylic/rules.mk index be8d10c9a6..6e59dde1c1 100644 --- a/keyboards/setta21/keymaps/salicylic/rules.mk +++ b/keyboards/setta21/keymaps/salicylic/rules.mk @@ -1,3 +1,3 @@ RGBLIGHT_ENABLE = no RGB_MATRIX_ENABLE = WS2812 - +OLED_DRIVER_ENABLE = yes diff --git a/keyboards/setta21/rules.mk b/keyboards/setta21/rules.mk index f9c4106343..8eae05c616 100644 --- a/keyboards/setta21/rules.mk +++ b/keyboards/setta21/rules.mk @@ -27,7 +27,7 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. TAP_DANCE_ENABLE = no -OLED_DRIVER_ENABLE = yes +OLED_DRIVER_ENABLE = no 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 diff --git a/keyboards/sixkeyboard/keymaps/via/keymap.c b/keyboards/sixkeyboard/keymaps/via/keymap.c new file mode 100644 index 0000000000..fed341595c --- /dev/null +++ b/keyboards/sixkeyboard/keymaps/via/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2020 + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_A, KC_B, KC_C, + KC_D, KC_E, KC_F + ), + + [1] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/sixkeyboard/keymaps/via/rules.mk b/keyboards/sixkeyboard/keymaps/via/rules.mk new file mode 100644 index 0000000000..43061db1dd --- /dev/null +++ b/keyboards/sixkeyboard/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/sneakbox/aliceclone/aliceclone.c b/keyboards/sneakbox/aliceclone/aliceclone.c new file mode 100644 index 0000000000..9457c641df --- /dev/null +++ b/keyboards/sneakbox/aliceclone/aliceclone.c @@ -0,0 +1,36 @@ +/* +Copyright 2020 Bryan Ong + +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 "aliceclone.h" + +void keyboard_pre_init_kb() { + setPinOutput(D7); + setPinOutput(D6); + setPinOutput(D4); + + keyboard_pre_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(D7, led_state.num_lock); + writePin(D6, led_state.caps_lock); + writePin(D4, led_state.scroll_lock); + } + return res; +} diff --git a/keyboards/sneakbox/aliceclone/aliceclone.h b/keyboards/sneakbox/aliceclone/aliceclone.h new file mode 100644 index 0000000000..67ae7ce784 --- /dev/null +++ b/keyboards/sneakbox/aliceclone/aliceclone.h @@ -0,0 +1,39 @@ +/* +Copyright 2020 Bryan Ong + +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 . +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K020, K000, K001, K002, K003, K004, K005, K006, K010, K011, K012, K013, K014, K015, K016, K017, \ + K040, K021, K022, K023, K024, K025, K026, K030, K031, K032, K033, K034, K035, K036, K037, \ + K060, K041, K042, K043, K044, K045, K046, K050, K051, K052, K053, K054, K055, K056, \ + K061, K062, K063, K064, K065, K066, K070, K071, K072, K073, K074, K075, K076, K077, \ + K081, K083, K085, K086, K091, K093, K097 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, KC_NO }, \ + { K010, K011, K012, K013, K014, K015, K016, K017 }, \ + { K020, K021, K022, K023, K024, K025, K026, KC_NO }, \ + { K030, K031, K032, K033, K034, K035, K036, K037 }, \ + { K040, K041, K042, K043, K044, K045, K046, KC_NO }, \ + { K050, K051, K052, K053, K054, K055, K056, KC_NO }, \ + { K060, K061, K062, K063, K064, K065, K066, KC_NO }, \ + { K070, K071, K072, K073, K074, K075, K076, K077 }, \ + { KC_NO, K081, KC_NO, K083, KC_NO, K085, K086, KC_NO }, \ + { KC_NO, K091, KC_NO, K093, KC_NO, KC_NO, KC_NO, K097 } \ +} diff --git a/keyboards/sneakbox/aliceclone/config.h b/keyboards/sneakbox/aliceclone/config.h new file mode 100644 index 0000000000..492c5680b8 --- /dev/null +++ b/keyboards/sneakbox/aliceclone/config.h @@ -0,0 +1,68 @@ +/* +Copyright 2020 Bryan Ong + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5342 +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Sneakbox +#define PRODUCT AliceClone + +/*Bootmagic boot button, set to topmost, leftmost key */ +#define BOOTMAGIC_LITE_ROW 2 +#define BOOTMAGIC_LITE_COLUMN 0 + +/* encoder */ +/* #define NUMBER_OF_ENCODERS 1 */ +#define ENCODERS_PAD_A { D3 } +#define ENCODERS_PAD_B { D2 } +#define ENCODER_RESOLUTION 1 + + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F1, E6, F4, B1, F5, B2, F6, B3, F7, B7 } +#define MATRIX_COL_PINS { F0, D0, C7, C6, B6, B5, B4, D1 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/sneakbox/aliceclone/info.json b/keyboards/sneakbox/aliceclone/info.json new file mode 100644 index 0000000000..332404b56d --- /dev/null +++ b/keyboards/sneakbox/aliceclone/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "Alice Clone", + "url": "https://sneakbox.design", + "maintainer": "mujimanic", + "width": 18.25, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"x":0, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.25, "y":0}, {"x":6.25, "y":0}, {"x":7.25, "y":0}, {"x":10.25, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, + {"x":0, "y":1}, {"x":1.25, "y":1, "w":1.5}, {"x":2.75, "y":1}, {"x":3.75, "y":1}, {"x":4.75, "y":1}, {"x":5.75, "y":1}, {"x":6.75, "y":1}, {"x":9.75, "y":1}, {"x":10.75, "y":1}, {"x":11.75, "y":1}, {"x":12.75, "y":1}, {"x":13.75, "y":1}, {"x":14.75, "y":1}, {"x":15.75, "y":1}, {"x":16.75, "y":1, "w":1.5}, + {"x":0, "y":2}, {"x":1.25, "y":2, "w":1.75}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2, "w":2.25}, + {"x":1.25, "y":3, "w":2.25}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":6.5, "y":3}, {"x":7.5, "y":3}, {"x":9.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3, "w":1.75}, {"x":17.25, "y":3}, + {"x":1.25, "y":4, "w":1.5}, {"x":4, "y":4, "w":1.5}, {"x":5.5, "y":4, "w":2.25}, {"x":7.75, "y":4}, {"x":9.75, "y":4, "w":2.75}, {"x":12.5, "y":4, "w":1.5}, {"x":16.75, "y":4, "w":1.5} + ] + } + } +} diff --git a/keyboards/sneakbox/aliceclone/keymaps/default/keymap.c b/keyboards/sneakbox/aliceclone/keymaps/default/keymap.c new file mode 100644 index 0000000000..39eb44bc9a --- /dev/null +++ b/keyboards/sneakbox/aliceclone/keymaps/default/keymap.c @@ -0,0 +1,55 @@ +/* +Copyright 2020 Bryan Ong + +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 QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( + KC_ESC, 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_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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LGUI, + KC_LCTL, KC_LALT, KC_SPC, LT(_FN, KC_SPC), KC_SPC, KC_RALT, KC_RCTL), + [_FN] = LAYOUT_all( + KC_TRNS, KC_TRNS, 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_UP, 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_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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 encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } +} diff --git a/keyboards/sneakbox/aliceclone/keymaps/via/keymap.c b/keyboards/sneakbox/aliceclone/keymaps/via/keymap.c new file mode 100644 index 0000000000..333b8a2162 --- /dev/null +++ b/keyboards/sneakbox/aliceclone/keymaps/via/keymap.c @@ -0,0 +1,70 @@ +/* +Copyright 2020 Bryan Ong + +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 QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN, + _L3, + _L4 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_all( + KC_ESC, 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_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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LGUI, + KC_LCTL, KC_LALT, KC_SPC, LT(_FN, KC_SPC), KC_SPC, KC_RALT, KC_RCTL), + [_FN] = LAYOUT_all( + KC_TRNS, KC_TRNS, 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_UP, 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_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [_L3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [_L4] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } +} diff --git a/keyboards/sneakbox/aliceclone/keymaps/via/rules.mk b/keyboards/sneakbox/aliceclone/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/sneakbox/aliceclone/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/sneakbox/aliceclone/readme.md b/keyboards/sneakbox/aliceclone/readme.md new file mode 100644 index 0000000000..86ffbd9303 --- /dev/null +++ b/keyboards/sneakbox/aliceclone/readme.md @@ -0,0 +1,15 @@ +# Sneakbox Alice Clone PCB + +![Sneakbox Alice Clone PCB](https://i.imgur.com/pMZNqLXl.jpg) + +An Alice-compatible PCB with hotswap, and pushbutton rotary encoder socket placed at the top left key position. Firmware covers all USB-connector variants of the Sneakbox Alice Clone PCB (Top USB-C, Bottom USB-C) + +* Keyboard Maintainer: [mujimanic](https://github.com/mujimanic) +* Hardware Supported: Any Alice-layout case. +* Hardware Availability: [sneakbox.design](https://sneakbox.design/products/sneakbox-alice-hotswap-pcbs) + +Make example for this keyboard (after setting up your build environment): + + make sneakbox/aliceclone:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/sneakbox/aliceclone/rules.mk b/keyboards/sneakbox/aliceclone/rules.mk new file mode 100644 index 0000000000..fb12719ce8 --- /dev/null +++ b/keyboards/sneakbox/aliceclone/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes diff --git a/keyboards/sofle/keymaps/via/config.h b/keyboards/sofle/keymaps/via/config.h new file mode 100644 index 0000000000..32139d8b1c --- /dev/null +++ b/keyboards/sofle/keymaps/via/config.h @@ -0,0 +1,29 @@ + /* Copyright 2020 Josef Adamcik + * Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang + * + * 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 . + */ + +#pragma once + +/* The way how "handedness" is decided (which half is which), +see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness +for more options. +*/ + +//Add RGB underglow +#define RGB_DI_PIN D3 +#define RGBLED_NUM 14 +#define RGBLED_SPLIT {7,7} +#define RGBLIGHT_ANIMATIONS \ No newline at end of file diff --git a/keyboards/sofle/keymaps/via/encoder.c b/keyboards/sofle/keymaps/via/encoder.c new file mode 100644 index 0000000000..8126d077a2 --- /dev/null +++ b/keyboards/sofle/keymaps/via/encoder.c @@ -0,0 +1,38 @@ + /* Copyright 2020 Josef Adamcik + * Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang + * + * 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 . + */ + +//Setting up what encoder rotation does. If your encoder can be pressed as a button, that function can be set in Via. + +#ifdef ENCODER_ENABLE + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { + if (clockwise) { + tap_code(KC_PGDOWN); + } else { + tap_code(KC_PGUP); + } + } +} + +#endif \ No newline at end of file diff --git a/keyboards/sofle/keymaps/via/keymap.c b/keyboards/sofle/keymaps/via/keymap.c new file mode 100644 index 0000000000..2f917f42dc --- /dev/null +++ b/keyboards/sofle/keymaps/via/keymap.c @@ -0,0 +1,113 @@ + /* Copyright 2020 Josef Adamcik + * Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang + * + * 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 QMK_KEYBOARD_H +#include "oled.c" +#include "encoder.c" + +//Default keymap. This can be changed in Via. Use oled.c and encoder.c to change beavior that Via cannot change. + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | Q | W | E | R | T | | Y | U | I | O | P | Bspc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ + +[0] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + 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_MUTE, XXXXXXX,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI,KC_LALT,KC_LCTRL, MO(2), KC_ENT, KC_SPC, MO(3), KC_RCTRL, KC_RALT, KC_RGUI +), +/* + * COLEMAK + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | Q | W | F | P | G | | J | L | U | Y | ; | Bspc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | TAB | A | R | S | T | D |-------. ,-------| H | N | E | I | O | ' | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| K | M | , | . | / |RShift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ + +[1] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_TAB, 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_MUTE, XXXXXXX,KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI,KC_LALT,KC_LCTRL,KC_TRNS, KC_ENT, KC_SPC, KC_TRNS, KC_RCTRL, KC_RALT, KC_RGUI +), +/* LOWER + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | | | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * | Shift| = | - | + | { | } |-------| |-------| [ | ] | ; | : | \ | Shift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ +[2] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, + _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +/* RAISE + * ,----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | Ins | Pscr | Menu | | | | | PWrd | Up | NWrd | DLine| Bspc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | LAt | LCtl |LShift| | Caps |-------. ,-------| | Left | Down | Rigth| Del | Bspc | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * |Shift | Undo | Cut | Copy | Paste| |-------| |-------| | LStr | | LEnd | | Shift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ +[3] = LAYOUT( + _______, _______ , _______ , _______ , _______ , _______, _______, _______ , _______, _______ , _______ ,_______, + _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, _______, KC_UP, _______,_______, KC_BSPC, + _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, + _______,KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, XXXXXXX, _______, _______, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) +}; diff --git a/keyboards/sofle/keymaps/via/oled.c b/keyboards/sofle/keymaps/via/oled.c new file mode 100644 index 0000000000..06839da170 --- /dev/null +++ b/keyboards/sofle/keymaps/via/oled.c @@ -0,0 +1,84 @@ + /* Copyright 2020 Josef Adamcik + * Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang + * + * 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 . + */ + +//Sets up what the OLED screens display. + +#ifdef OLED_DRIVER_ENABLE + +static void render_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0 + }; + + oled_write_P(qmk_logo, false); +} + +static void print_status_narrow(void) { + // Print current mode + oled_write_P(PSTR("\n\n"), false); + + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_ln_P(PSTR("Qwrt"), false); + break; + case 1: + oled_write_ln_P(PSTR("Clmk"), false); + break; + default: + oled_write_P(PSTR("Mod\n"), false); + break; + } + oled_write_P(PSTR("\n\n"), false); + // Print current layer + oled_write_ln_P(PSTR("LAYER"), false); + switch (get_highest_layer(layer_state)) { + case 0: + case 1: + oled_write_P(PSTR("Base\n"), false); + break; + case 2: + oled_write_P(PSTR("Raise"), false); + break; + case 3: + oled_write_P(PSTR("Lower"), false); + break; + default: + oled_write_ln_P(PSTR("Undef"), false); + } + oled_write_P(PSTR("\n\n"), false); + led_t led_usb_state = host_keyboard_led_state(); + oled_write_ln_P(PSTR("CPSLK"), led_usb_state.caps_lock); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) { + return OLED_ROTATION_270; + } + return rotation; +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + print_status_narrow(); + } else { + render_logo(); + } +} + +#endif \ No newline at end of file diff --git a/keyboards/sofle/keymaps/via/readme.md b/keyboards/sofle/keymaps/via/readme.md new file mode 100644 index 0000000000..8470c69bcf --- /dev/null +++ b/keyboards/sofle/keymaps/via/readme.md @@ -0,0 +1,14 @@ +# VIA keymap for Sofle + +Layout in [Keyboard Layout Editor](http://www.keyboard-layout-editor.com/#/gists/76efb423a46cbbea75465cb468eef7ff) and [adjust layer](http://www.keyboard-layout-editor.com/#/gists/4bcf66f922cfd54da20ba04905d56bd4) + + +Features: + +- Symmetric modifiers (CMD/Super, Alt/Opt, Ctrl, Shift) +- Modes for Qwerty and Colemak support +- The OLED on master half shows selected mode and caps lock state and is rotated. +- Left encoder controls volume up/down/mute. Right encoder PGUP/PGDOWN. +- Via support +- RGB underglow support + diff --git a/keyboards/sofle/keymaps/via/rules.mk b/keyboards/sofle/keymaps/via/rules.mk new file mode 100644 index 0000000000..f482499d4b --- /dev/null +++ b/keyboards/sofle/keymaps/via/rules.mk @@ -0,0 +1,7 @@ +OLED_DRIVER_ENABLE = yes +ENCODER_ENABLE = yes +CONSOLE_ENABLE = no +EXTRAKEY_ENABLE = yes +VIA_ENABLE = yes +LTO_ENABLE = yes +RGBLIGHT_ENABLE = yes \ No newline at end of file diff --git a/keyboards/soy20/config.h b/keyboards/soy20/config.h new file mode 100644 index 0000000000..932b129f84 --- /dev/null +++ b/keyboards/soy20/config.h @@ -0,0 +1,55 @@ +/* Soy20 PCB}} +Copyright (C) {{ 2020 }} {{ Drewkeys }} + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see .*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4452 // "DR" short for DrewKeys +#define PRODUCT_ID 0x534f // "SO" short for Soy +#define DEVICE_VER 0x0001 +#define MANUFACTURER drewkeys +#define PRODUCT soy20 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } +#define MATRIX_COL_PINS { B5, B6, B7, C7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/soy20/info.json b/keyboards/soy20/info.json new file mode 100644 index 0000000000..ea1ab2e7f9 --- /dev/null +++ b/keyboards/soy20/info.json @@ -0,0 +1,33 @@ +{ + "keyboard_name": "Soy20", + "url": "", + "maintainer": "twholt", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x4": { + "layout": [ + {"label":"K00 (B0,B5)", "x":0, "y":0}, + {"label":"K01 (B0,B6)", "x":1, "y":0}, + {"label":"K02 (B0,B7)", "x":2, "y":0}, + {"label":"K03 (B0,C7)", "x":3, "y":0}, + {"label":"K10 (B1,B5)", "x":0, "y":1}, + {"label":"K11 (B1,B6)", "x":1, "y":1}, + {"label":"K12 (B1,B7)", "x":2, "y":1}, + {"label":"K13 (B1,C7)", "x":3, "y":1}, + {"label":"K20 (B2,B5)", "x":0, "y":2}, + {"label":"K21 (B2,B6)", "x":1, "y":2}, + {"label":"K22 (B2,B7)", "x":2, "y":2}, + {"label":"K23 (B2,C7)", "x":3, "y":2}, + {"label":"K30 (B3,B5)", "x":0, "y":3}, + {"label":"K31 (B3,B6)", "x":1, "y":3}, + {"label":"K32 (B3,B7)", "x":2, "y":3}, + {"label":"K33 (B3,C7)", "x":3, "y":3}, + {"label":"K40 (B4,B5)", "x":0, "y":4}, + {"label":"K41 (B4,B6)", "x":1, "y":4}, + {"label":"K42 (B4,B7)", "x":2, "y":4}, + {"label":"K43 (B4,C7)", "x":3, "y":4} + ] + } + } +} diff --git a/keyboards/soy20/keymaps/default/keymap.c b/keyboards/soy20/keymaps/default/keymap.c new file mode 100644 index 0000000000..0ab505eeb8 --- /dev/null +++ b/keyboards/soy20/keymaps/default/keymap.c @@ -0,0 +1,19 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_ortho_5x4( + KC_PMNS, KC_PAST, KC_PSLS, MO(1), + KC_PPLS, KC_P9, KC_P8, KC_P7, + KC_TAB, KC_P5, KC_P6, KC_P4, + KC_PENT, KC_P3, KC_P2, KC_P1, + KC_DEL, KC_SCLN, KC_PDOT, KC_P0), + + [1] = LAYOUT_ortho_5x4( + KC_NLCK, 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, RESET), + +}; diff --git a/keyboards/soy20/keymaps/via/keymap.c b/keyboards/soy20/keymaps/via/keymap.c new file mode 100644 index 0000000000..fde63da13a --- /dev/null +++ b/keyboards/soy20/keymaps/via/keymap.c @@ -0,0 +1,33 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_ortho_5x4( + KC_PMNS, KC_PAST, KC_PSLS, MO(1), + KC_PPLS, KC_P9, KC_P8, KC_P7, + KC_TAB, KC_P5, KC_P6, KC_P4, + KC_PENT, KC_P3, KC_P2, KC_P1, + KC_DEL, KC_SCLN, KC_PDOT, KC_P0), + + [1] = LAYOUT_ortho_5x4( + KC_NLCK, 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, RESET), + + [2] = LAYOUT_ortho_5x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [3] = LAYOUT_ortho_5x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; diff --git a/keyboards/soy20/keymaps/via/rules.mk b/keyboards/soy20/keymaps/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/soy20/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/soy20/readme.md b/keyboards/soy20/readme.md new file mode 100644 index 0000000000..1ac310f799 --- /dev/null +++ b/keyboards/soy20/readme.md @@ -0,0 +1,13 @@ +# Soy20 + +A 4x5 keypad created by drewkeys + +* Keyboard Maintainer: [Friend-Or-F0H](https://github.com/Friend-Or-F0H) +* Hardware Supported: drewkeys Soy20 PCB +* Hardware Availability: Limited GB + +Make example for this keyboard (after setting up your build environment): + + make soy20:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/soy20/rules.mk b/keyboards/soy20/rules.mk new file mode 100644 index 0000000000..06f81dad8c --- /dev/null +++ b/keyboards/soy20/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = ortho_5x4 diff --git a/keyboards/soy20/soy20.c b/keyboards/soy20/soy20.c new file mode 100644 index 0000000000..1b259e8d88 --- /dev/null +++ b/keyboards/soy20/soy20.c @@ -0,0 +1,18 @@ +/* Soy20 PCB}} +Copyright (C) {{ 2020 }} {{ Drewkeys }} + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see .*/ + + +#include "soy20.h" diff --git a/keyboards/soy20/soy20.h b/keyboards/soy20/soy20.h new file mode 100644 index 0000000000..c29b04f93d --- /dev/null +++ b/keyboards/soy20/soy20.h @@ -0,0 +1,33 @@ +/* Soy20 PCB}} +Copyright (C) {{ 2020 }} {{ Drewkeys }} + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see .*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33, \ + K40, K41, K42, K43 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 }, \ + { K40, K41, K42, K43 } \ +} diff --git a/keyboards/sp111/config.h b/keyboards/sp111/config.h new file mode 100644 index 0000000000..ee765dc8fb --- /dev/null +++ b/keyboards/sp111/config.h @@ -0,0 +1,83 @@ +/* Copyright 2020 blindassassin111 + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x544B //TK +#define PRODUCT_ID 0x5111 +#define DEVICE_VER 0x0001 +#define MANUFACTURER The Key Company +#define PRODUCT SP111 + +/* key matrix size */ +#define MATRIX_ROWS 6*2 +#define MATRIX_COLS 11 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/sp111/info.json b/keyboards/sp111/info.json new file mode 100644 index 0000000000..e478a32208 --- /dev/null +++ b/keyboards/sp111/info.json @@ -0,0 +1,19 @@ +{ + "keyboard_name": "SP-111", + "url": "https://thekey.company/products/sp-111", + "maintainer": "blindassassin111", + "width": 22.5, + "height": 6.75, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"F13", "x":0, "y":0}, {"label":"F14", "x":1, "y":0}, {"label":"F15", "x":2, "y":0}, {"label":"F16", "x":3, "y":0}, {"label":"Esc", "x":4.5, "y":0}, {"label":"F1", "x":5.75, "y":0}, {"label":"F2", "x":6.75, "y":0}, {"label":"F3", "x":7.75, "y":0}, {"label":"F4", "x":8.75, "y":0}, {"label":"F5", "x":10, "y":0}, {"label":"F6", "x":11, "y":0}, {"label":"F7", "x":12.75, "y":0}, {"label":"F8", "x":13.75, "y":0}, {"label":"F9", "x":15, "y":0}, {"label":"F10", "x":16, "y":0}, {"label":"F11", "x":17, "y":0}, {"label":"F12", "x":18, "y":0}, {"label":"Prt Scn", "x":19.25, "y":0}, {"label":"Scl Lck", "x":20.5, "y":0}, {"label":"Pause", "x":21.5, "y":0}, + {"label":"Num Lock", "x":0, "y":1.5}, {"label":"/", "x":1, "y":1.5}, {"label":"*", "x":2, "y":1.5}, {"label":"-", "x":3, "y":1.5}, {"label":"~", "x":4.5, "y":1.5}, {"label":"!", "x":5.5, "y":1.5}, {"label":"@", "x":6.5, "y":1.5}, {"label":"#", "x":7.5, "y":1.5}, {"label":"$", "x":8.5, "y":1.5}, {"label":"%", "x":9.5, "y":1.5}, {"label":"^", "x":10.5, "y":1.5}, {"label":"&", "x":12.25, "y":1.5}, {"label":"*", "x":13.25, "y":1.5}, {"label":"(", "x":14.25, "y":1.5}, {"label":")", "x":15.25, "y":1.5}, {"label":"_", "x":16.25, "y":1.5}, {"label":"+", "x":17.25, "y":1.5}, {"label":"Backspace", "x":18.25, "y":1.5}, {"label":"Backspace2", "x":19.25, "y":1.5}, {"label":"Home", "x":20.5, "y":1.5}, {"label":"Insert", "x":21.5, "y":1.5}, + {"label":"7", "x":0, "y":2.5}, {"label":"8", "x":1, "y":2.5}, {"label":"9", "x":2, "y":2.5}, {"label":"+", "x":3, "y":2.5}, {"label":"Tab", "x":4.5, "y":2.5, "w":1.5}, {"label":"Q", "x":6, "y":2.5}, {"label":"W", "x":7, "y":2.5}, {"label":"E", "x":8, "y":2.5}, {"label":"R", "x":9, "y":2.5}, {"label":"T", "x":10, "y":2.5}, {"label":"Y", "x":11.75, "y":2.5}, {"label":"U", "x":12.75, "y":2.5}, {"label":"I", "x":13.75, "y":2.5}, {"label":"O", "x":14.75, "y":2.5}, {"label":"P", "x":15.75, "y":2.5}, {"label":"{", "x":16.75, "y":2.5}, {"label":"}", "x":17.75, "y":2.5}, {"label":"|", "x":18.75, "y":2.5, "w":1.5}, {"label":"End", "x":20.5, "y":2.5}, {"label":"Delete", "x":21.5, "y":2.5}, + {"label":"4", "x":0, "y":3.5}, {"label":"5", "x":1, "y":3.5}, {"label":"6", "x":2, "y":3.5}, {"label":"=", "x":3, "y":3.5}, {"label":"Caps Lock", "x":4.5, "y":3.5, "w":1.75}, {"label":"A", "x":6.25, "y":3.5}, {"label":"S", "x":7.25, "y":3.5}, {"label":"D", "x":8.25, "y":3.5}, {"label":"F", "x":9.25, "y":3.5}, {"label":"G", "x":10.25, "y":3.5}, {"label":"H", "x":12, "y":3.5}, {"label":"J", "x":13, "y":3.5}, {"label":"K", "x":14, "y":3.5}, {"label":"L", "x":15, "y":3.5}, {"label":":", "x":16, "y":3.5}, {"label":"\"", "x":17, "y":3.5}, {"label":"Enter", "x":18, "y":3.5, "w":2.25}, {"label":"PgUp", "x":20.5, "y":3.5}, {"label":"PgDn", "x":21.5, "y":3.5}, + {"label":"1", "x":0, "y":4.5}, {"label":"2", "x":1, "y":4.5}, {"label":"3", "x":2, "y":4.5}, {"label":"Enter", "x":3, "y":4.5}, {"label":"Shift", "x":4.5, "y":4.5, "w":1.25}, {"label":"numbs", "x":5.75, "y":4.5, "w":1}, {"label":"Z", "x":6.75, "y":4.5}, {"label":"X", "x":7.75, "y":4.5}, {"label":"C", "x":8.75, "y":4.5}, {"label":"V", "x":9.75, "y":4.5}, {"label":"B", "x":10.75, "y":4.5}, {"label":"N", "x":12.5, "y":4.5}, {"label":"M", "x":13.5, "y":4.5}, {"label":"<", "x":14.5, "y":4.5}, {"label":">", "x":15.5, "y":4.5}, {"label":"?", "x":16.5, "y":4.5}, {"label":"Shift", "x":17.5, "y":4.5, "w":1.75}, {"label":"Fn", "x":19.25, "y":4.5}, {"label":"\u2191", "x":20.5, "y":4.75}, + {"label":"0", "x":0, "y":5.5}, {"label":"00", "x":1, "y":5.5}, {"label":".", "x":2, "y":5.5}, {"label":"..", "x":3, "y":5.5}, {"label":"Ctrl", "x":4.5, "y":5.5, "w":1.25}, {"label":"Code", "x":5.75, "y":5.5, "w":1.25}, {"label":"Alt", "x":7, "y":5.5, "w":1.25}, {"label":"Fn", "x":8.25, "y":5.5, "w":1}, {"label":"", "x":9.25, "y":5.5, "w":2.25}, {"label":"", "x":12.25, "y":5.5, "w":2.25}, {"label":"", "x":14.5, "y":5.5, "w":1}, {"label":"Alt", "x":15.5, "y":5.5, "w":1.25}, {"label":"Code", "x":16.75, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":18, "y":5.5, "w":1.25}, {"label":"\u2190", "x":19.5, "y":5.75}, {"label":"\u2193", "x":20.5, "y":5.75}, {"label":"\u2192", "x":21.5, "y":5.75} + ] + } + } +} diff --git a/keyboards/sp111/keymaps/default/keymap.c b/keyboards/sp111/keymaps/default/keymap.c new file mode 100644 index 0000000000..0cb29f42a0 --- /dev/null +++ b/keyboards/sp111/keymaps/default/keymap.c @@ -0,0 +1,57 @@ +/* Copyright 2020 blindassassin111 + * + * 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 QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + KC_P00 = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( + KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_HOME, KC_INS, + KC_P7, KC_P8, KC_P9, KC_PPLS, 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_END, KC_DEL, + KC_P4, KC_P5, KC_P6, 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_ENT, KC_PGUP, KC_PGDN, + KC_P1, KC_P2, KC_P3, KC_PENT, 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, MO(_FN), KC_UP, + KC_P0, KC_P0, KC_P00, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_MUTE, KC_SPC, KC_SPC, KC_APP, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [_FN] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case KC_P00: + tap_code(KC_P0); + tap_code(KC_P0); + return false; + } + } + return true; +} diff --git a/keyboards/sp111/keymaps/via/config.h b/keyboards/sp111/keymaps/via/config.h new file mode 100644 index 0000000000..e16379c5d9 --- /dev/null +++ b/keyboards/sp111/keymaps/via/config.h @@ -0,0 +1,18 @@ +/* Copyright 2020 blindassassin111 + * + * 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 . + */ +#pragma once + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/sp111/keymaps/via/keymap.c b/keyboards/sp111/keymaps/via/keymap.c new file mode 100644 index 0000000000..1cb4380dd5 --- /dev/null +++ b/keyboards/sp111/keymaps/via/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2020 blindassassin111 + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_HOME, KC_INS, + KC_P7, KC_P8, KC_P9, KC_PPLS, 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_END, KC_DEL, + KC_P4, KC_P5, KC_P6, 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_ENT, KC_PGUP, KC_PGDN, + KC_P1, KC_P2, KC_P3, KC_PENT, 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, MO(1), KC_UP, + KC_P0, KC_P0, KC_P0, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_MUTE, KC_SPC, KC_SPC, KC_APP, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + + [1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/keyboards/sp111/keymaps/via/rules.mk b/keyboards/sp111/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/sp111/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/sp111/matrix.c b/keyboards/sp111/matrix.c new file mode 100644 index 0000000000..33b232dca7 --- /dev/null +++ b/keyboards/sp111/matrix.c @@ -0,0 +1,178 @@ +/* Copyright 2020 zvecr + * + * 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 "mcp23018.h" +#include "quantum.h" + +// Optimize scanning code for speed as a slight mitigation for the port expander +#pragma GCC push_options +#pragma GCC optimize("-O3") + +#define I2C_ADDR 0x20 + +static uint16_t mcp23018_reset_loop = 0; +static uint8_t mcp23018_errors = 0; + +static const pin_t row_pins[MATRIX_ROWS / 2] = {B1, D5, D4, D6, D7, B4}; +static const pin_t col_pins[MATRIX_COLS] = {F5, F6, F7, C7, C6, B6, B5, D3, D2, B3, B2}; + +//_____REGULAR funcs____________________________________________________________ + +static void select_row(uint8_t row) { + setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); +} + +static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); } + +static void unselect_rows(void) { + for (uint8_t x = 0; x < MATRIX_ROWS / 2; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static void init_pins(void) { + unselect_rows(); + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + matrix_row_t current_row_value = 0; + + // Select row and wait for row selection to stabilize + select_row(current_row); + wait_us(5); + + // 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_state = readPin(col_pins[col_index]); + + // Populate the matrix row with the state of the col pin + current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + if (last_row_value == current_row_value) { + return false; + } + + current_matrix[current_row] = current_row_value; + return true; +} + +//_____MCP23018 funcs___________________________________________________________ + +static void init_pins_MCP23018(void) { + mcp23018_errors += !mcp23018_set_config(I2C_ADDR, mcp23018_PORTA, 0b11111111); + mcp23018_errors += !mcp23018_set_config(I2C_ADDR, mcp23018_PORTB, 0b01100000); +} + +static void select_row_MCP23018(uint8_t row) { + uint8_t mask = 0; + + switch (row) { + case 6: + mask = 0b10000000; + break; + case 7: + mask = 0b00000001; + break; + case 8: + mask = 0b00000010; + break; + case 9: + mask = 0b00000100; + break; + case 10: + mask = 0b00001000; + break; + case 11: + mask = 0b00010000; + break; + } + + mcp23018_errors += !mcp23018_set_output(I2C_ADDR, mcp23018_PORTB, ~mask); +} + +static uint16_t read_cols_MCP23018(void) { + uint16_t tmp = 0xFFFF; + mcp23018_errors += !mcp23018_readPins_all(I2C_ADDR, &tmp); + + uint16_t state = ((tmp & 0b11111111) << 2) | ((tmp & 0b0110000000000000) >> 13); + return (~state) & 0b1111111111; +} + +static bool read_cols_on_row_MCP23018(matrix_row_t current_matrix[], uint8_t current_row) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // No need to Clear data in matrix row as we just replace in one go + + // Select row and wait for row selection to stabilize + select_row_MCP23018(current_row); + + matrix_row_t current_row_value = read_cols_MCP23018(); + + // No need to Unselect row as the next `select_row` will blank everything + + if (last_row_value == current_row_value) { + return false; + } + + current_matrix[current_row] = current_row_value; + return true; +} + +//_____CUSTOM MATRIX IMPLEMENTATION____________________________________________________ + +void matrix_init_custom(void) { + mcp23018_init(I2C_ADDR); + + init_pins(); + init_pins_MCP23018(); +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool changed = false; + for (uint8_t current_row = 0; current_row < MATRIX_ROWS / 2; current_row++) { + changed |= read_cols_on_row(current_matrix, current_row); + } + + if (mcp23018_errors) { + if (++mcp23018_reset_loop > 0x7FFF) { + // tuned to about 5s given the current scan rate + print("trying to reset mcp23018\n"); + mcp23018_reset_loop = 0; + mcp23018_errors = 0; + init_pins_MCP23018(); + } + return changed; + } + + for (uint8_t current_row = MATRIX_ROWS / 2; current_row < MATRIX_ROWS; current_row++) { + changed |= read_cols_on_row_MCP23018(current_matrix, current_row); + } + return changed; +} +#pragma GCC pop_options diff --git a/keyboards/sp111/mcp23018.c b/keyboards/sp111/mcp23018.c new file mode 100644 index 0000000000..f1d8e568d2 --- /dev/null +++ b/keyboards/sp111/mcp23018.c @@ -0,0 +1,120 @@ +/* Copyright 2020 zvecr + * + * 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 "mcp23018.h" +#include "i2c_master.h" +#include "wait.h" +#include "debug.h" + +#define SLAVE_TO_ADDR(n) (n << 1) +#define TIMEOUT 100 + +enum { + CMD_IODIRA = 0x00, // i/o direction register + CMD_IODIRB = 0x01, + CMD_GPPUA = 0x0C, // GPIO pull-up resistor register + CMD_GPPUB = 0x0D, + CMD_GPIOA = 0x12, // general purpose i/o port register (write modifies OLAT) + CMD_GPIOB = 0x13, +}; + +void mcp23018_init(uint8_t addr) { + static uint8_t s_init = 0; + if (!s_init) { + i2c_init(); + wait_ms(1000); + + s_init = 1; + } +} + +bool mcp23018_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmdDirection = port ? CMD_IODIRB : CMD_IODIRA; + uint8_t cmdPullup = port ? CMD_GPPUB : CMD_GPPUA; + + i2c_status_t ret = i2c_writeReg(addr, cmdDirection, &conf, sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + dprintf("mcp23018_set_config::directionFAILED::%u\n", ret); + return false; + } + + ret = i2c_writeReg(addr, cmdPullup, &conf, sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + dprintf("mcp23018_set_config::pullupFAILED::%u\n", ret); + return false; + } + + return true; +} + +bool mcp23018_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_GPIOB : CMD_GPIOA; + + i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + dprintf("mcp23018_set_output::FAILED::%u\n", ret); + return false; + } + + return true; +} + +bool mcp23018_set_output_all(uint8_t slave_addr, uint8_t confA, uint8_t confB) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t conf[2] = {confA, confB}; + + i2c_status_t ret = i2c_writeReg(addr, CMD_GPIOA, &conf[0], sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + dprintf("mcp23018_set_output::FAILED::%u\n", ret); + return false; + } + + return true; +} + +bool mcp23018_readPins(uint8_t slave_addr, uint8_t port, uint8_t* out) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_GPIOB : CMD_GPIOA; + + i2c_status_t ret = i2c_readReg(addr, cmd, out, sizeof(uint8_t), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + dprintf("mcp23018_readPins::FAILED::%u\n", ret); + return false; + } + + return true; +} + +bool mcp23018_readPins_all(uint8_t slave_addr, uint16_t* out) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + + typedef union { + uint8_t u8[2]; + uint16_t u16; + } data16; + + data16 data = {.u16 = 0}; + + i2c_status_t ret = i2c_readReg(addr, CMD_GPIOA, &data.u8[0], sizeof(data), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + dprintf("mcp23018_readPins::FAILED::%u\n", ret); + return false; + } + + *out = data.u16; + return true; +} diff --git a/keyboards/sp111/mcp23018.h b/keyboards/sp111/mcp23018.h new file mode 100644 index 0000000000..dc2251b72f --- /dev/null +++ b/keyboards/sp111/mcp23018.h @@ -0,0 +1,34 @@ +/* Copyright 2020 zvecr + * + * 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 . + */ +#pragma once + +#include +#include + +#define mcp23018_PORTA 0 +#define mcp23018_PORTB 1 + +#define ALL_OUTPUT 0 +#define ALL_INPUT 0xFF +#define ALL_LOW 0 +#define ALL_HIGH 0xFF + +void mcp23018_init(uint8_t addr); +bool mcp23018_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf); +bool mcp23018_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf); +bool mcp23018_set_output_all(uint8_t slave_addr, uint8_t confA, uint8_t confB); +bool mcp23018_readPins(uint8_t slave_addraddr, uint8_t port, uint8_t* ret); +bool mcp23018_readPins_all(uint8_t slave_addr, uint16_t* ret); diff --git a/keyboards/sp111/readme.md b/keyboards/sp111/readme.md new file mode 100644 index 0000000000..b9f8f02e07 --- /dev/null +++ b/keyboards/sp111/readme.md @@ -0,0 +1,21 @@ +# SP-111 + +![SP-111](https://i.imgur.com/RPFv9KKl.jpg) + +Southpaw (left sided numpad) allows you to use the numpad and mouse at the same time. +Split allows placement in a comfortable manner for long sessions. +Right side layout to maintain the functionality of a full size board in a much more compact manner. + +* Keyboard Maintainer: [zvecr](https://github.com/zvecr), blindassassin111 +* Hardware Supported: SP-111 +* Hardware Availability: + +Make example for this keyboard (after setting up your build environment): + + make sp111:default + +Flashing example for this keyboard: + + make sp111:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/sp111/rules.mk b/keyboards/sp111/rules.mk new file mode 100644 index 0000000000..6aab680742 --- /dev/null +++ b/keyboards/sp111/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +LTO_ENABLE = yes # Smaller (and slightly faster) firmware + + +# custom matrix setup +CUSTOM_MATRIX = lite + +SRC += mcp23018.c matrix.c +QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/katana60/katana60.c b/keyboards/sp111/sp111.c similarity index 52% rename from keyboards/katana60/katana60.c rename to keyboards/sp111/sp111.c index e8d4fef193..737334998d 100644 --- a/keyboards/katana60/katana60.c +++ b/keyboards/sp111/sp111.c @@ -1,4 +1,4 @@ -/* Copyright 2017 Baris Tosun +/* Copyright 2020 blindassassin111 * * 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 @@ -13,31 +13,30 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "katana60.h" +#include "sp111.h" + +void keyboard_pre_init_kb(void) { + // enable built in pullups to avoid timeouts when right hand not connected + setPinInputHigh(D0); + setPinInputHigh(D1); + + keyboard_pre_init_user(); +} void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up + setPinOutput(F0); + setPinOutput(F1); + setPinOutput(F4); - matrix_init_user(); + 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); +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { + writePin(F0, led_state.num_lock); + writePin(F1, led_state.caps_lock); + writePin(F4, led_state.scroll_lock); + } + return res; } diff --git a/keyboards/sp111/sp111.h b/keyboards/sp111/sp111.h new file mode 100644 index 0000000000..fb7e3394ac --- /dev/null +++ b/keyboards/sp111/sp111.h @@ -0,0 +1,41 @@ +/* Copyright 2020 blindassassin111 + * + * 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 . + */ +#pragma once + +#include "quantum.h" +#define ___ KC_NO + +#define LAYOUT_all( \ + L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A, R01, R02, R03, R04, R05, R06, R07, R08, R09, \ + L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L0B, R10, R11, R12, R13, R14, R15, R16, R17, R18, R19, \ + L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, R20, R21, R22, R23, R24, R25, R26, R27, R28, R29, \ + L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, R30, R31, R32, R33, R34, R35, R36, R37, R38, R39, \ + L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, R41, R42, R43, R44, R45, R46, R47, R48, \ + L50, L51, L52, L53, L54, L55, L56, L57, L58, R52, R53, R54, R55, R56, R57, R49, R59 \ +) { \ + { L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, L0A }, \ + { L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L0B }, \ + { L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, ___ }, \ + { L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, ___ }, \ + { L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, ___ }, \ + { L50, L51, L52, L53, L54, L55, L56, L57, L58, ___, ___ }, \ + { ___, R01, R02, R03, R04, R05, R06, R07, R08, R09, ___ }, \ + { R10, R11, R12, R13, R14, R15, R16, R17, R18, R19, ___ }, \ + { R20, R21, R22, R23, R24, R25, R26, R27, R28, R29, ___ }, \ + { R30, R31, R32, R33, R34, R35, R36, R37, R38, R39, ___ }, \ + { ___, R41, R42, R43, R44, R45, R46, R47, R48, ___, ___ }, \ + { ___, ___, R52, R53, R54, R55, R56, R57, R49, R59, ___ } \ +} diff --git a/keyboards/spaceman/2_milk/keymaps/via/rules.mk b/keyboards/spaceman/2_milk/keymaps/via/rules.mk index 43061db1dd..36b7ba9cbc 100644 --- a/keyboards/spaceman/2_milk/keymaps/via/rules.mk +++ b/keyboards/spaceman/2_milk/keymaps/via/rules.mk @@ -1,2 +1,2 @@ VIA_ENABLE = yes -LTO_ENABLE = yes \ No newline at end of file +LTO_ENABLE = yes diff --git a/keyboards/spaceman/2_milk/rules.mk b/keyboards/spaceman/2_milk/rules.mk index 4e6c5f7039..b93e8d3a48 100644 --- a/keyboards/spaceman/2_milk/rules.mk +++ b/keyboards/spaceman/2_milk/rules.mk @@ -16,7 +16,7 @@ BOOTLOADER = caterina # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = no # Audio control and System control +EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/spiderisland/split78/config.h b/keyboards/spiderisland/split78/config.h new file mode 100644 index 0000000000..a7ec160faf --- /dev/null +++ b/keyboards/spiderisland/split78/config.h @@ -0,0 +1,35 @@ +/* +Copyright 2020 unrelenting.technology + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xF4E4 +#define DEVICE_VER 0x0001 +#define MANUFACTURER SpiderIsland +#define PRODUCT Split 78-key + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 14 + +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_BREATHING diff --git a/keyboards/spiderisland/split78/info.json b/keyboards/spiderisland/split78/info.json new file mode 100644 index 0000000000..7a96efe762 --- /dev/null +++ b/keyboards/spiderisland/split78/info.json @@ -0,0 +1,94 @@ +{ + "keyboard_name": "Spider Island 78-key split", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 6.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6.5, "y": 0}, + {"x": 8.5, "y": 0}, + {"x": 9.5, "y": 0}, + {"x": 10.5, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + {"x": 15, "y": 0}, + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + {"x": 4, "y": 1.25}, + {"x": 5, "y": 1.25}, + {"x": 6, "y": 1.25}, + {"x": 8, "y": 1.25}, + {"x": 9, "y": 1.25}, + {"x": 10, "y": 1.25}, + {"x": 11, "y": 1.25}, + {"x": 12, "y": 1.25}, + {"x": 13, "y": 1.25}, + {"x": 14, "y": 1.25, "w": 2}, + {"x": 0, "y": 2.25, "w": 1.5}, + {"x": 1.5, "y": 2.25}, + {"x": 2.5, "y": 2.25}, + {"x": 3.5, "y": 2.25}, + {"x": 4.5, "y": 2.25}, + {"x": 5.5, "y": 2.25}, + {"x": 7.5, "y": 2.25}, + {"x": 8.5, "y": 2.25}, + {"x": 9.5, "y": 2.25}, + {"x": 10.5, "y": 2.25}, + {"x": 11.5, "y": 2.25}, + {"x": 12.5, "y": 2.25}, + {"x": 13.5, "y": 2.25}, + {"x": 14.5, "y": 2.25, "w": 1.5}, + + {"x": 0, "y": 3.25, "w": 1.75}, + {"x": 1.75, "y": 3.25}, + {"x": 2.75, "y": 3.25}, + {"x": 3.75, "y": 3.25}, + {"x": 4.75, "y": 3.25}, + {"x": 5.75, "y": 3.25}, + {"x": 7.75, "y": 3.25}, + {"x": 8.75, "y": 3.25}, + {"x": 9.75, "y": 3.25}, + {"x": 10.75, "y": 3.25}, + {"x": 11.75, "y": 3.25}, + {"x": 12.75, "y": 3.25}, + {"x": 13.75, "y": 3.25, "w": 2.25}, + + {"x": 0, "y": 4.25, "w": 2.25}, + {"x": 2.25, "y": 4.25}, + {"x": 3.25, "y": 4.25}, + {"x": 4.25, "y": 4.25}, + {"x": 5.25, "y": 4.25}, + {"x": 6.25, "y": 4.25}, + {"x": 8.25, "y": 4.25}, + {"x": 9.25, "y": 4.25}, + {"x": 10.25, "y": 4.25}, + {"x": 11.25, "y": 4.25}, + {"x": 12.25, "y": 4.25, "w": 1.75}, + {"x": 14, "y": 4.25}, + {"x": 15, "y": 4.25}, + + {"x": 0, "y": 5.25, "w": 1.25}, + {"x": 1.25, "y": 5.25, "w": 1.25}, + {"x": 2.5, "y": 5.25, "w": 1.25}, + {"x": 3.75, "y": 5.25, "w": 1.25}, + {"x": 5, "y": 5.25, "w": 2.25}, + {"x": 8.25, "y": 5.25, "w": 2.25}, + {"x": 10.5, "y": 5.25, "w": 1.25}, + {"x": 11.75, "y": 5.25, "w": 1.25}, + {"x": 13, "y": 5.25}, + {"x": 14, "y": 5.25}, + {"x": 15, "y": 5.25} + ] + } + } +} diff --git a/keyboards/spiderisland/split78/keymaps/default/keymap.c b/keyboards/spiderisland/split78/keymaps/default/keymap.c new file mode 100644 index 0000000000..761648d958 --- /dev/null +++ b/keyboards/spiderisland/split78/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2020 unrelenting.technology + * + * 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 QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_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_QUOT, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, TT(_FN), KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT( + RESET, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, KC_DEL, + KC_NLCK, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + BL_TOGG, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, XXXXXXX, KC_SLSH, KC_PGUP, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P0, KC_PDOT, KC_PENT, KC_HOME, KC_PGDN, KC_END + ) +}; diff --git a/keyboards/spiderisland/split78/matrix.c b/keyboards/spiderisland/split78/matrix.c new file mode 100644 index 0000000000..b5c7028fdf --- /dev/null +++ b/keyboards/spiderisland/split78/matrix.c @@ -0,0 +1,155 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 +#include "quantum.h" +#include "i2c_master.h" +#include "split78.h" + +#define RIGHT_HALF + + +void matrix_set_row_status(uint8_t row); + + +#if defined(RIGHT_HALF) +#define I2C_TIMEOUT 10 +#define MCP23018_TWI_ADDRESS 0b0100000 +#define TW_READ 1 +#define TW_WRITE 0 +#define TWI_ADDR_WRITE ( (MCP23018_TWI_ADDRESS<<1) | TW_WRITE ) +#define TWI_ADDR_READ ( (MCP23018_TWI_ADDRESS<<1) | TW_READ ) +#define IODIRA 0x00 // i/o direction register +#define IODIRB 0x01 +#define IODIRA 0x00 // i/o direction register +#define IODIRB 0x01 +#define GPPUA 0x0C // GPIO pull-up resistor register +#define GPPUB 0x0D +#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT) +#define GPIOB 0x13 +#define OLATA 0x14 // output latch register +#define OLATB 0x15 +#define MCP_ROWS_START 8 + +static uint8_t mcp23018_init(void) { + uint8_t ret; + uint8_t data[3]; + // set pin direction + // - unused : input : 1 + // - input : input : 1 + // - driving : output : 0 + data[0] = IODIRA; + data[1] = 0b00000000; // IODIRA + data[2] = (0b11111111); // IODIRB + + ret = i2c_transmit(TWI_ADDR_WRITE, (uint8_t *)data, 3, I2C_TIMEOUT); + if (ret) goto out; // make sure we got an ACK + + // set pull-up + // - unused : on : 1 + // - input : on : 1 + // - driving : off : 0 + data[0] = GPPUA; + data[1] = 0b00000000; // IODIRA + data[2] = (0b11111111); // IODIRB + + ret = i2c_transmit(TWI_ADDR_WRITE, (uint8_t *)data, 3, I2C_TIMEOUT); + if (ret) goto out; // make sure we got an ACK + + // set logical value (doesn't matter on inputs) + // - unused : hi-Z : 1 + // - input : hi-Z : 1 + // - driving : hi-Z : 1 + data[0] = OLATA; + data[1] = 0b11111111; // IODIRA + data[2] = (0b11111111); // IODIRB + + ret = i2c_transmit(TWI_ADDR_WRITE, (uint8_t *)data, 3, I2C_TIMEOUT); + +out: + return ret; +} +#endif + +void matrix_init_custom(void) { + // Set rows as output starting high + DDRB = 0xFF; + PORTB = 0xFF; + + // Set columns as inputs with pull-up enabled + DDRA = 0x00; + PORTA = 0xFF; + + // Initialize i2c communication + i2c_init(); + +#if defined(RIGHT_HALF) + // Initialize the chip on the other half + mcp23018_init(); +#endif + +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool matrix_has_changed = false; + + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row]; + + matrix_row_t cols = 0; + // Select the row to scan + matrix_set_row_status(row); + + matrix_io_delay(); + //Set the local row + +#if defined(RIGHT_HALF) + // Initialize to 0x7F in case I2C read fails, + // as 0x75 would be no keys pressed + uint8_t data = 0x7F; + // Receive the columns from right half + i2c_receive(TWI_ADDR_WRITE, &data, 1, I2C_TIMEOUT); +#endif + + cols |= ((~(PINA | 0x80)) & 0x7F); +#if defined(RIGHT_HALF) + cols |= (((~(data | 0x80)) & 0x7F) << 7); +#endif + + current_matrix[row] = cols; + matrix_has_changed |= (last_row_value != current_matrix[row]); + } + + return matrix_has_changed; +} + +void matrix_set_row_status(uint8_t row) { +#if defined(RIGHT_HALF) + uint8_t txdata[3]; + + //Set the remote row on port A + txdata[0] = (GPIOA); + txdata[1] = ( 0xFF & ~(1<. + */ + +#include "split78.h" diff --git a/keyboards/spiderisland/split78/split78.h b/keyboards/spiderisland/split78/split78.h new file mode 100644 index 0000000000..2f6252f0c9 --- /dev/null +++ b/keyboards/spiderisland/split78/split78.h @@ -0,0 +1,36 @@ +/* Copyright 2020 unrelenting.technology + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + l00, l01, l02, l03, l04, l05, r00, r01, r02, r03, r04, r05, r06, \ + l06, l07, l08, l09, l10, l11, l12, r07, r08, r09, r10, r11, r12, r13, \ + l13, l14, l15, l16, l17, l18, r14, r15, r16, r17, r18, r19, r20, r21, \ + l19, l20, l21, l22, l23, l24, r22, r23, r24, r25, r26, r27, r28, \ + l25, l26, l27, l28, l29, l30, r29, r30, r31, r32, r33, r34, r35, \ + l31, l32, l33, l34, l35, r36, r37, r38, r39, r40, r41 \ +) { \ + { l00, l06, l13, l19, l25, l31, KC_NO, r00, r07, r14, r22, r29, r21 }, \ + { l01, l07, l14, l20, l26, l32, KC_NO, r01, r08, r15, r23, r30, r36 }, \ + { l02, l08, l15, l21, l27, l33, KC_NO, r02, r09, r16, r24, r31, r37 }, \ + { l03, l09, l16, l22, l28, l34, KC_NO, r03, r10, r17, r25, r32, r38 }, \ + { l04, l10, l17, l23, l29, l35, KC_NO, r04, r11, r18, r27, r33, r39 }, \ + { l05, l11, l18, l24, l30, l12, KC_NO, r05, r12, r19, r26, r34, r40 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, r06, r13, r20, r28, r35, r41 }, \ +} diff --git a/keyboards/switchplate/southpaw_fullsize/keymaps/via/keymap.c b/keyboards/switchplate/southpaw_fullsize/keymaps/via/keymap.c new file mode 100644 index 0000000000..f8f8a1ce92 --- /dev/null +++ b/keyboards/switchplate/southpaw_fullsize/keymaps/via/keymap.c @@ -0,0 +1,60 @@ +/* Copyright 2020 Ryota Goto + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN1, + _FN2, + _FN3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT_all ( + BL_STEP, BL_TOGG, MO(1) , 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_INS, KC_HOME, KC_PGUP, + KC_P7, KC_P8, KC_P9, KC_PPLS, 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_P4, KC_P5, KC_P6, KC_PPLS, 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_ENT, + KC_P1, KC_P2, KC_P3, KC_PENT, KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_LSFT, KC_UP, + KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN1] = LAYOUT_all ( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_FN2] = LAYOUT_all ( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_FN3] = LAYOUT_all ( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/switchplate/southpaw_fullsize/keymaps/via/readme.md b/keyboards/switchplate/southpaw_fullsize/keymaps/via/readme.md new file mode 100644 index 0000000000..1335b773c5 --- /dev/null +++ b/keyboards/switchplate/southpaw_fullsize/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# The via keymap for southpaw fullsize + +For use with VIA configurator \ No newline at end of file diff --git a/keyboards/switchplate/southpaw_fullsize/keymaps/via/rules.mk b/keyboards/switchplate/southpaw_fullsize/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/switchplate/southpaw_fullsize/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/tg4x/rules.mk b/keyboards/tg4x/rules.mk index 41988177d3..4a86998cb9 100644 --- a/keyboards/tg4x/rules.mk +++ b/keyboards/tg4x/rules.mk @@ -31,4 +31,4 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs -LINK_TIME_OPTIMIZATION_ENABLE = yes \ No newline at end of file +LTO_ENABLE = yes diff --git a/keyboards/tgr/910ce/910ce.h b/keyboards/tgr/910ce/910ce.h index f1592b0289..2d8f113e21 100644 --- a/keyboards/tgr/910ce/910ce.h +++ b/keyboards/tgr/910ce/910ce.h @@ -32,7 +32,7 @@ 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, k44, k45, k47, k49, k48, k4c, k4d, k4e \ + k40, k41, k42, k44, k45, k47, k48, k49, k4c, k4d, k4e \ ){ \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ @@ -47,7 +47,7 @@ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, k2e, \ k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ - k40, k41, k42, k45, k49, k48, k4c, k4d, k4e \ + k40, k41, k42, k45, k48, k49, k4c, k4d, k4e \ ) { \ { 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, k1e }, \ @@ -62,7 +62,7 @@ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ - k40, k41, k42, k45, k49, k48, k4c, k4d, k4e \ + k40, k41, k42, k45, k48, k49, k4c, k4d, k4e \ ) { \ { 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, ___, k1e }, \ diff --git a/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c index bcfbad2e0b..032aaf5c73 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c @@ -1,3 +1,19 @@ + /* Copyright 2020 King Wang Wong + * + * 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 QMK_KEYBOARD_H @@ -17,17 +33,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────────┐ * │ ESC │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │BKSPC │ * ├─────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────────┤ - * │ TAB │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │' │ + * │ TAB │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ENTER │ * ├──────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬─────┤ - * │ LSHFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ENTER│ + * │ LSHFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │' │ * ├────────┬┴─────┴─┬───┴─┬───┴─────┴──┬──┴─────┴─────┴─┬───┴─┬───┴─┬───┴─────┤ - * │LCTRL │ LGUI │ LALT│SPACE(_NL) │MO(_NL) │MO SL│ │MO(RL │ + * │LCTRL │ LGUI │ LALT│SPACE(_NL) │MO(_NL) │MO_SL│ │MO(RL │ * └────────┴────────┴─────┴────────────┴────────────────┴─────┴─────┴─────────┘ */ [_ML] = LAYOUT( KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - 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, KC_ENT, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, KC_LCTL, KC_LGUI, KC_LALT, SPC_FUN, MO(_NL), MO(_SL), XXXXXXX, MO(_RL) ), @@ -36,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────────┐ * │ │ │HOME │ UP │END │PGUP │ │ F1 │ F2 │ F3 │ F4 │ │ * ├─────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────────┤ - * │ CAPS │ │LEFT │DOWN │RIGHT│PGDN │ │ F5 │ F6 │ F7 │ F8 │ │ + * │ CAPS │ │LEFT │DOWN │RIGHT│PGDN │ │ F5 │ F6 │ F7 │ F8 │ QUOT │ * ├──────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬─────┤ * │ │ │ │ DEL │ INS │ │ │ F9 │ F10 │ F11 │ F12 │ │ * ├────────┬┴─────┴─┬───┴─┬───┴─────┴──┬──┴─────┴─────┴─┬───┴─┬───┴─┬───┴─────┤ @@ -45,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_FL] = LAYOUT( _______, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, _______, - KC_CAPS, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, _______, + KC_CAPS, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_QUOT, _______, XXXXXXX, XXXXXXX, KC_DEL, KC_INS, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), diff --git a/keyboards/candybar/bootloader_defs.h b/keyboards/tkc/candybar/bootloader_defs.h similarity index 100% rename from keyboards/candybar/bootloader_defs.h rename to keyboards/tkc/candybar/bootloader_defs.h diff --git a/keyboards/tkc/candybar/chconf.h b/keyboards/tkc/candybar/chconf.h new file mode 100644 index 0000000000..03f63da36a --- /dev/null +++ b/keyboards/tkc/candybar/chconf.h @@ -0,0 +1,714 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file rt/templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/candybar/halconf.h b/keyboards/tkc/candybar/halconf.h similarity index 100% rename from keyboards/candybar/halconf.h rename to keyboards/tkc/candybar/halconf.h diff --git a/keyboards/candybar/lefty/config.h b/keyboards/tkc/candybar/lefty/config.h similarity index 100% rename from keyboards/candybar/lefty/config.h rename to keyboards/tkc/candybar/lefty/config.h diff --git a/keyboards/candybar/lefty/info.json b/keyboards/tkc/candybar/lefty/info.json similarity index 100% rename from keyboards/candybar/lefty/info.json rename to keyboards/tkc/candybar/lefty/info.json diff --git a/keyboards/candybar/lefty/keymaps/default/keymap.c b/keyboards/tkc/candybar/lefty/keymaps/default/keymap.c similarity index 100% rename from keyboards/candybar/lefty/keymaps/default/keymap.c rename to keyboards/tkc/candybar/lefty/keymaps/default/keymap.c diff --git a/keyboards/candybar/lefty/keymaps/via/keymap.c b/keyboards/tkc/candybar/lefty/keymaps/via/keymap.c similarity index 62% rename from keyboards/candybar/lefty/keymaps/via/keymap.c rename to keyboards/tkc/candybar/lefty/keymaps/via/keymap.c index 153fd99c50..fd927195b2 100644 --- a/keyboards/candybar/lefty/keymaps/via/keymap.c +++ b/keyboards/tkc/candybar/lefty/keymaps/via/keymap.c @@ -18,6 +18,8 @@ #define _BL 0 #define _FL 1 +#define _AL 2 +#define _LL 3 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) @@ -35,4 +37,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_P4 , KC_P5, KC_P6 , KC_VOLD, KC_TAB , KC_A , KC_SLCK, KC_D, KC_F , KC_G , KC_H, KC_J , KC_K , KC_L , KC_QUOT, KC_BSLS , \ KC_P1 , KC_P2, KC_P3 , KC_PEQL, KC_LSFT, KC_Z , KC_X, KC_CAPS, KC_V , KC_B, KC_NLCK, KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_PGUP , \ KC_END, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC , KC_BSPC, KC_APP , MO(_FL), KC_HOME, KC_PGDN), + + [_AL] = LAYOUT( + KC_P7 , KC_P8, KC_P9 , KC_VOLU, RESET , KC_Q , KC_W , KC_E, KC_R , KC_T , KC_Y, KC_U , KC_I , KC_LBRC, KC_RBRC, KC_INS , KC_BSPC , \ + KC_P4 , KC_P5, KC_P6 , KC_VOLD, KC_TAB , KC_A , KC_SLCK, KC_D, KC_F , KC_G , KC_H, KC_J , KC_K , KC_L , KC_QUOT, KC_BSLS , \ + KC_P1 , KC_P2, KC_P3 , KC_PEQL, KC_LSFT, KC_Z , KC_X, KC_CAPS, KC_V , KC_B, KC_NLCK, KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_PGUP , \ + KC_END, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC , KC_BSPC, KC_APP , MO(_FL), KC_HOME, KC_PGDN), + + [_LL] = LAYOUT( + KC_P7 , KC_P8, KC_P9 , KC_VOLU, RESET , KC_Q , KC_W , KC_E, KC_R , KC_T , KC_Y, KC_U , KC_I , KC_LBRC, KC_RBRC, KC_INS , KC_BSPC , \ + KC_P4 , KC_P5, KC_P6 , KC_VOLD, KC_TAB , KC_A , KC_SLCK, KC_D, KC_F , KC_G , KC_H, KC_J , KC_K , KC_L , KC_QUOT, KC_BSLS , \ + KC_P1 , KC_P2, KC_P3 , KC_PEQL, KC_LSFT, KC_Z , KC_X, KC_CAPS, KC_V , KC_B, KC_NLCK, KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_PGUP , \ + KC_END, KC_P0, KC_PDOT, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC , KC_BSPC, KC_APP , MO(_FL), KC_HOME, KC_PGDN), }; diff --git a/keyboards/tkc/candybar/lefty/keymaps/via/rules.mk b/keyboards/tkc/candybar/lefty/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/tkc/candybar/lefty/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/candybar/lefty/lefty.c b/keyboards/tkc/candybar/lefty/lefty.c similarity index 100% rename from keyboards/candybar/lefty/lefty.c rename to keyboards/tkc/candybar/lefty/lefty.c diff --git a/keyboards/candybar/lefty/lefty.h b/keyboards/tkc/candybar/lefty/lefty.h similarity index 100% rename from keyboards/candybar/lefty/lefty.h rename to keyboards/tkc/candybar/lefty/lefty.h diff --git a/keyboards/candybar/lefty/readme.md b/keyboards/tkc/candybar/lefty/readme.md similarity index 94% rename from keyboards/candybar/lefty/readme.md rename to keyboards/tkc/candybar/lefty/readme.md index 5954720679..75ca1cbd80 100644 --- a/keyboards/candybar/lefty/readme.md +++ b/keyboards/tkc/candybar/lefty/readme.md @@ -10,6 +10,6 @@ The Key Company Candybar is a staggered 40% board with a numpad utilizing the ST Make example for this keyboard (after setting up your build environment): - make candybar/lefty:default:dfu-util + make tkc/candybar/lefty:default:dfu-util See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/candybar/lefty/rules.mk b/keyboards/tkc/candybar/lefty/rules.mk similarity index 95% rename from keyboards/candybar/lefty/rules.mk rename to keyboards/tkc/candybar/lefty/rules.mk index 52ef91c47f..1edad08350 100644 --- a/keyboards/candybar/lefty/rules.mk +++ b/keyboards/tkc/candybar/lefty/rules.mk @@ -5,7 +5,7 @@ MCU = STM32F072 # comment out to disable the options. # # EXTRAFLAGS+=-flto -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes BACKLIGHT_ENABLE = no BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) diff --git a/keyboards/candybar/mcuconf.h b/keyboards/tkc/candybar/mcuconf.h similarity index 100% rename from keyboards/candybar/mcuconf.h rename to keyboards/tkc/candybar/mcuconf.h diff --git a/keyboards/candybar/righty/config.h b/keyboards/tkc/candybar/righty/config.h similarity index 100% rename from keyboards/candybar/righty/config.h rename to keyboards/tkc/candybar/righty/config.h diff --git a/keyboards/candybar/righty/info.json b/keyboards/tkc/candybar/righty/info.json similarity index 100% rename from keyboards/candybar/righty/info.json rename to keyboards/tkc/candybar/righty/info.json diff --git a/keyboards/candybar/righty/keymaps/default/keymap.c b/keyboards/tkc/candybar/righty/keymaps/default/keymap.c similarity index 100% rename from keyboards/candybar/righty/keymaps/default/keymap.c rename to keyboards/tkc/candybar/righty/keymaps/default/keymap.c diff --git a/keyboards/candybar/righty/keymaps/via/keymap.c b/keyboards/tkc/candybar/righty/keymaps/via/keymap.c similarity index 65% rename from keyboards/candybar/righty/keymaps/via/keymap.c rename to keyboards/tkc/candybar/righty/keymaps/via/keymap.c index 8f4cc08c74..fb8ac93d46 100644 --- a/keyboards/candybar/righty/keymaps/via/keymap.c +++ b/keyboards/tkc/candybar/righty/keymaps/via/keymap.c @@ -18,6 +18,8 @@ #define _BL 0 #define _FL 1 +#define _AL 2 +#define _LL 3 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) @@ -35,4 +37,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB,KC_A,KC_SLCK,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_QUOT,KC_BSLS,KC_P4,KC_P5,KC_P6,KC_VOLD, \ KC_LSFT,KC_Z,KC_X,KC_CAPS,KC_V,KC_B,KC_NLCK,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_PGUP,KC_P1,KC_P2,KC_P3,KC_PEQL, \ KC_LCTL,KC_LGUI,KC_LALT,KC_SPC,KC_SPC,KC_BSPC,KC_APP,MO(_FL),KC_HOME,KC_PGDN,KC_END,KC_P0,KC_PDOT,KC_PENT), + + [_AL] = LAYOUT( + RESET,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_LBRC,KC_RBRC,KC_INS,KC_BSPC,KC_P7,KC_P8,KC_P9,KC_VOLU, \ + KC_TAB,KC_A,KC_SLCK,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_QUOT,KC_BSLS,KC_P4,KC_P5,KC_P6,KC_VOLD, \ + KC_LSFT,KC_Z,KC_X,KC_CAPS,KC_V,KC_B,KC_NLCK,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_PGUP,KC_P1,KC_P2,KC_P3,KC_PEQL, \ + KC_LCTL,KC_LGUI,KC_LALT,KC_SPC,KC_SPC,KC_BSPC,KC_APP,MO(_FL),KC_HOME,KC_PGDN,KC_END,KC_P0,KC_PDOT,KC_PENT), + + [_LL] = LAYOUT( + RESET,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_LBRC,KC_RBRC,KC_INS,KC_BSPC,KC_P7,KC_P8,KC_P9,KC_VOLU, \ + KC_TAB,KC_A,KC_SLCK,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_QUOT,KC_BSLS,KC_P4,KC_P5,KC_P6,KC_VOLD, \ + KC_LSFT,KC_Z,KC_X,KC_CAPS,KC_V,KC_B,KC_NLCK,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_PGUP,KC_P1,KC_P2,KC_P3,KC_PEQL, \ + KC_LCTL,KC_LGUI,KC_LALT,KC_SPC,KC_SPC,KC_BSPC,KC_APP,MO(_FL),KC_HOME,KC_PGDN,KC_END,KC_P0,KC_PDOT,KC_PENT), }; diff --git a/keyboards/tkc/candybar/righty/keymaps/via/rules.mk b/keyboards/tkc/candybar/righty/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/tkc/candybar/righty/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/candybar/righty/readme.md b/keyboards/tkc/candybar/righty/readme.md similarity index 94% rename from keyboards/candybar/righty/readme.md rename to keyboards/tkc/candybar/righty/readme.md index d3aa867303..4e2a0f8474 100644 --- a/keyboards/candybar/righty/readme.md +++ b/keyboards/tkc/candybar/righty/readme.md @@ -10,6 +10,6 @@ The Key Company Candybar is a staggered 40% board with a numpad utilizing the ST Make example for this keyboard (after setting up your build environment): - make candybar/righty:default:dfu-util + make tkc/candybar/righty:default:dfu-util See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/candybar/righty/righty.c b/keyboards/tkc/candybar/righty/righty.c similarity index 100% rename from keyboards/candybar/righty/righty.c rename to keyboards/tkc/candybar/righty/righty.c diff --git a/keyboards/candybar/righty/righty.h b/keyboards/tkc/candybar/righty/righty.h similarity index 100% rename from keyboards/candybar/righty/righty.h rename to keyboards/tkc/candybar/righty/righty.h diff --git a/keyboards/candybar/righty/rules.mk b/keyboards/tkc/candybar/righty/rules.mk similarity index 95% rename from keyboards/candybar/righty/rules.mk rename to keyboards/tkc/candybar/righty/rules.mk index 52ef91c47f..1edad08350 100644 --- a/keyboards/candybar/righty/rules.mk +++ b/keyboards/tkc/candybar/righty/rules.mk @@ -5,7 +5,7 @@ MCU = STM32F072 # comment out to disable the options. # # EXTRAFLAGS+=-flto -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes BACKLIGHT_ENABLE = no BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) diff --git a/keyboards/m0lly/README.md b/keyboards/tkc/m0lly/README.md similarity index 96% rename from keyboards/m0lly/README.md rename to keyboards/tkc/m0lly/README.md index e0c8b45d95..9af80c7e98 100644 --- a/keyboards/m0lly/README.md +++ b/keyboards/tkc/m0lly/README.md @@ -12,6 +12,6 @@ Hardware Availability: [TheKey.Company](https://thekey.company) Make example for this keyboard (after setting up your build environment): - make m0lly:default + make tkc/m0lly:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/m0lly/config.h b/keyboards/tkc/m0lly/config.h similarity index 100% rename from keyboards/m0lly/config.h rename to keyboards/tkc/m0lly/config.h diff --git a/keyboards/m0lly/info.json b/keyboards/tkc/m0lly/info.json similarity index 100% rename from keyboards/m0lly/info.json rename to keyboards/tkc/m0lly/info.json diff --git a/keyboards/m0lly/keymaps/default/keymap.c b/keyboards/tkc/m0lly/keymaps/default/keymap.c similarity index 100% rename from keyboards/m0lly/keymaps/default/keymap.c rename to keyboards/tkc/m0lly/keymaps/default/keymap.c diff --git a/keyboards/m0lly/keymaps/via/keymap.c b/keyboards/tkc/m0lly/keymaps/via/keymap.c similarity index 73% rename from keyboards/m0lly/keymaps/via/keymap.c rename to keyboards/tkc/m0lly/keymaps/via/keymap.c index 2e5900f166..b72b8f035b 100644 --- a/keyboards/m0lly/keymaps/via/keymap.c +++ b/keyboards/tkc/m0lly/keymaps/via/keymap.c @@ -21,6 +21,8 @@ enum { BASE = 0, FUNCTION, + ALTERNATE, + LAST, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -66,6 +68,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, MO(FUNCTION), _______, _______, XXXXXXX, _______, _______ ), + [ALTERNATE] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, + _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, + _______, _______, _______, _______, _______, _______, MO(FUNCTION), _______, _______, XXXXXXX, _______, _______ + ), + [LAST] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, + _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, + _______, _______, _______, _______, _______, _______, MO(FUNCTION), _______, _______, XXXXXXX, _______, _______ + ), }; #ifdef OLED_DRIVER_ENABLE @@ -80,6 +96,12 @@ void oled_task_user(void) { break; case FUNCTION: oled_write_P(PSTR("Function\n"), false); + break; + case ALTERNATE: + oled_write_P(PSTR("Alternate\n"), false); + break; + case LAST: + oled_write_P(PSTR("Last\n"), false); break; default: // Or use the write_ln shortcut over adding '\n' to the end of your string diff --git a/keyboards/tkc/m0lly/keymaps/via/rules.mk b/keyboards/tkc/m0lly/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/tkc/m0lly/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/m0lly/m0lly.c b/keyboards/tkc/m0lly/m0lly.c similarity index 100% rename from keyboards/m0lly/m0lly.c rename to keyboards/tkc/m0lly/m0lly.c diff --git a/keyboards/m0lly/m0lly.h b/keyboards/tkc/m0lly/m0lly.h similarity index 100% rename from keyboards/m0lly/m0lly.h rename to keyboards/tkc/m0lly/m0lly.h diff --git a/keyboards/m0lly/rules.mk b/keyboards/tkc/m0lly/rules.mk similarity index 100% rename from keyboards/m0lly/rules.mk rename to keyboards/tkc/m0lly/rules.mk diff --git a/keyboards/tkc1800/README.md b/keyboards/tkc/tkc1800/README.md similarity index 96% rename from keyboards/tkc1800/README.md rename to keyboards/tkc/tkc1800/README.md index e154770d72..5382b91b3c 100644 --- a/keyboards/tkc1800/README.md +++ b/keyboards/tkc/tkc1800/README.md @@ -12,6 +12,6 @@ Hardware Availability: [TheKey.Company](https://thekey.company/collections/tkc-1 Make example for this keyboard (after setting up your build environment): - make tkc1800:default + make tkc/tkc1800:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/tkc1800/config.h b/keyboards/tkc/tkc1800/config.h similarity index 100% rename from keyboards/tkc1800/config.h rename to keyboards/tkc/tkc1800/config.h diff --git a/keyboards/tkc1800/info.json b/keyboards/tkc/tkc1800/info.json similarity index 100% rename from keyboards/tkc1800/info.json rename to keyboards/tkc/tkc1800/info.json diff --git a/keyboards/tkc1800/keymaps/default/keymap.c b/keyboards/tkc/tkc1800/keymaps/default/keymap.c similarity index 100% rename from keyboards/tkc1800/keymaps/default/keymap.c rename to keyboards/tkc/tkc1800/keymaps/default/keymap.c diff --git a/keyboards/tkc1800/keymaps/smt/keymap.c b/keyboards/tkc/tkc1800/keymaps/smt/keymap.c similarity index 100% rename from keyboards/tkc1800/keymaps/smt/keymap.c rename to keyboards/tkc/tkc1800/keymaps/smt/keymap.c diff --git a/keyboards/tkc1800/keymaps/via/keymap.c b/keyboards/tkc/tkc1800/keymaps/via/keymap.c similarity index 71% rename from keyboards/tkc1800/keymaps/via/keymap.c rename to keyboards/tkc/tkc1800/keymaps/via/keymap.c index 76fdf05406..55c2874c62 100644 --- a/keyboards/tkc1800/keymaps/via/keymap.c +++ b/keyboards/tkc/tkc1800/keymaps/via/keymap.c @@ -20,6 +20,8 @@ enum { BASE = 0, FUNCTION, + ALTERNATE, + LAST, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -75,6 +77,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), + [ALTERNATE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ + _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + [LAST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ + _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), }; #ifdef OLED_DRIVER_ENABLE @@ -89,6 +109,12 @@ void oled_task_user(void) { break; case FUNCTION: oled_write_P(PSTR("Function\n"), false); + break; + case ALTERNATE: + oled_write_P(PSTR("Alternate\n"), false); + break; + case LAST: + oled_write_P(PSTR("Last\n"), false); break; default: // Or use the write_ln shortcut over adding '\n' to the end of your string diff --git a/keyboards/tkc/tkc1800/keymaps/via/rules.mk b/keyboards/tkc/tkc1800/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/tkc/tkc1800/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/tkc1800/keymaps/wkl/keymap.c b/keyboards/tkc/tkc1800/keymaps/wkl/keymap.c similarity index 100% rename from keyboards/tkc1800/keymaps/wkl/keymap.c rename to keyboards/tkc/tkc1800/keymaps/wkl/keymap.c diff --git a/keyboards/tkc1800/keymaps/yanfali/keymap.c b/keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c similarity index 100% rename from keyboards/tkc1800/keymaps/yanfali/keymap.c rename to keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c diff --git a/keyboards/tkc1800/keymaps/yanfali/rules.mk b/keyboards/tkc/tkc1800/keymaps/yanfali/rules.mk similarity index 100% rename from keyboards/tkc1800/keymaps/yanfali/rules.mk rename to keyboards/tkc/tkc1800/keymaps/yanfali/rules.mk diff --git a/keyboards/tkc1800/rules.mk b/keyboards/tkc/tkc1800/rules.mk similarity index 100% rename from keyboards/tkc1800/rules.mk rename to keyboards/tkc/tkc1800/rules.mk diff --git a/keyboards/tkc1800/tkc1800.c b/keyboards/tkc/tkc1800/tkc1800.c similarity index 100% rename from keyboards/tkc1800/tkc1800.c rename to keyboards/tkc/tkc1800/tkc1800.c diff --git a/keyboards/tkc1800/tkc1800.h b/keyboards/tkc/tkc1800/tkc1800.h similarity index 100% rename from keyboards/tkc1800/tkc1800.h rename to keyboards/tkc/tkc1800/tkc1800.h diff --git a/keyboards/tkc1800/keymaps/via/config.h b/keyboards/tkc1800/keymaps/via/config.h deleted file mode 100644 index 579212d4a3..0000000000 --- a/keyboards/tkc1800/keymaps/via/config.h +++ /dev/null @@ -1 +0,0 @@ -#define DYNAMIC_KEYMAP_LAYER_COUNT 2 diff --git a/keyboards/stoutgat/config.h b/keyboards/tkw/stoutgat/v1/config.h similarity index 100% rename from keyboards/stoutgat/config.h rename to keyboards/tkw/stoutgat/v1/config.h diff --git a/keyboards/stoutgat/info.json b/keyboards/tkw/stoutgat/v1/info.json similarity index 100% rename from keyboards/stoutgat/info.json rename to keyboards/tkw/stoutgat/v1/info.json diff --git a/keyboards/stoutgat/keymaps/default/keymap.c b/keyboards/tkw/stoutgat/v1/keymaps/default/keymap.c similarity index 100% rename from keyboards/stoutgat/keymaps/default/keymap.c rename to keyboards/tkw/stoutgat/v1/keymaps/default/keymap.c diff --git a/keyboards/stoutgat/keymaps/default/readme.md b/keyboards/tkw/stoutgat/v1/keymaps/default/readme.md similarity index 100% rename from keyboards/stoutgat/keymaps/default/readme.md rename to keyboards/tkw/stoutgat/v1/keymaps/default/readme.md diff --git a/keyboards/stoutgat/readme.md b/keyboards/tkw/stoutgat/v1/readme.md similarity index 95% rename from keyboards/stoutgat/readme.md rename to keyboards/tkw/stoutgat/v1/readme.md index 13953e2319..0904b51271 100644 --- a/keyboards/stoutgat/readme.md +++ b/keyboards/tkw/stoutgat/v1/readme.md @@ -11,6 +11,6 @@ Inspired by the cftkb Discipline. Make example for this keyboard (after setting up your build environment): - make stoutgat:default + make tkw/stoutgat/v1:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/stoutgat/rules.mk b/keyboards/tkw/stoutgat/v1/rules.mk similarity index 100% rename from keyboards/stoutgat/rules.mk rename to keyboards/tkw/stoutgat/v1/rules.mk diff --git a/keyboards/stoutgat/stoutgat.c b/keyboards/tkw/stoutgat/v1/v1.c similarity index 100% rename from keyboards/stoutgat/stoutgat.c rename to keyboards/tkw/stoutgat/v1/v1.c diff --git a/keyboards/stoutgat/stoutgat.h b/keyboards/tkw/stoutgat/v1/v1.h similarity index 100% rename from keyboards/stoutgat/stoutgat.h rename to keyboards/tkw/stoutgat/v1/v1.h diff --git a/keyboards/tkw/stoutgat/v2/config.h b/keyboards/tkw/stoutgat/v2/config.h new file mode 100644 index 0000000000..1c0a66f3c6 --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/config.h @@ -0,0 +1,69 @@ +/* Copyright 2020 Thys de Wet + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x7811 +#define DEVICE_VER 0x0002 +#define MANUFACTURER TKW +#define PRODUCT Stoutgat v2 65% + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + + + +#define MATRIX_COL_PINS { B0, A7, A6, A5, A4, A3, A1, A0, C15, C14, C13, A15, B3, B4, B5} +#define MATRIX_ROW_PINS { B6, A2, B7, B9, B8 } +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define MATRIX_IO_DELAY 5 +#define TAP_CODE_DELAY 10 + +#define ENCODERS_PAD_A { B14, B12} +#define ENCODERS_PAD_B { B15, B13 } + +#define RGB_DI_PIN B1 +#define RGBLED_NUM 13 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_ANIMATIONS + +#define WS2812_PWM_DRIVER PWMD3 +#define WS2812_PWM_CHANNEL 4 +#define WS2812_PWM_PAL_MODE 2 +#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 +#define WS2812_DMA_CHANNEL 5 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/tkw/stoutgat/v2/f411/chconf.h b/keyboards/tkw/stoutgat/v2/f411/chconf.h new file mode 100644 index 0000000000..0b8b69b0e0 --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/f411/chconf.h @@ -0,0 +1,714 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file rt/templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM TRUE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/tkw/stoutgat/v2/f411/halconf.h b/keyboards/tkw/stoutgat/v2/f411/halconf.h new file mode 100644 index 0000000000..1f8df5dbbd --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/f411/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL TRUE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the zero-copy API. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 256 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#endif + + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/keyboards/tkw/stoutgat/v2/f411/mcuconf.h b/keyboards/tkw/stoutgat/v2/f411/mcuconf.h new file mode 100644 index 0000000000..f3a017731c --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/f411/mcuconf.h @@ -0,0 +1,253 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F4xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F4xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_CLOCK48_REQUIRED TRUE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLM_VALUE 25 +#define STM32_PLLN_VALUE 384 +#define STM32_PLLP_VALUE 4 +#define STM32_PLLQ_VALUE 8 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV4 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_RTCPRE_VALUE 8 +#define STM32_MCO1SEL STM32_MCO1SEL_HSI +#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 +#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK +#define STM32_MCO2PRE STM32_MCO2PRE_DIV5 +#define STM32_I2SSRC STM32_I2SSRC_CKIN +#define STM32_PLLI2SN_VALUE 192 +#define STM32_PLLI2SR_VALUE 5 +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_BKPRAM_ENABLE FALSE + +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI16_PRIORITY 6 +#define STM32_IRQ_EXTI17_PRIORITY 15 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 6 +#define STM32_IRQ_EXTI20_PRIORITY 6 +#define STM32_IRQ_EXTI21_PRIORITY 15 +#define STM32_IRQ_EXTI22_PRIORITY 15 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 6 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM9 FALSE +#define STM32_GPT_USE_TIM11 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM9_IRQ_PRIORITY 7 +#define STM32_GPT_TIM11_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_USE_I2C3 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C3_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_I2C3_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * I2S driver system settings. + */ +#define STM32_I2S_USE_SPI2 FALSE +#define STM32_I2S_USE_SPI3 FALSE +#define STM32_I2S_SPI2_IRQ_PRIORITY 10 +#define STM32_I2S_SPI3_IRQ_PRIORITY 10 +#define STM32_I2S_SPI2_DMA_PRIORITY 1 +#define STM32_I2S_SPI3_DMA_PRIORITY 1 +#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2S_DMA_ERROR_HOOK(i2sp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM9 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM9_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM9 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM9_IRQ_PRIORITY 7 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 TRUE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART6 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART6_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART6 FALSE +#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART6_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART6_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_OTG1 TRUE +#define STM32_USB_OTG1_IRQ_PRIORITY 14 +#define STM32_USB_OTG1_RX_FIFO_SIZE 512 +#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1 +#define STM32_USB_OTG_THREAD_STACK_SIZE 128 +#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/keyboards/tkw/stoutgat/v2/f411/rules.mk b/keyboards/tkw/stoutgat/v2/f411/rules.mk new file mode 100644 index 0000000000..4f7f52e62b --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/f411/rules.mk @@ -0,0 +1,5 @@ +# MCU name +MCU = STM32F411 + +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 diff --git a/keyboards/tkw/stoutgat/v2/info.json b/keyboards/tkw/stoutgat/v2/info.json new file mode 100644 index 0000000000..48288096b1 --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/info.json @@ -0,0 +1,89 @@ +{ + "keyboard_name": "stoutgat/v2", + "url": "https://github.com/vattern/stoutgatv2", + "maintainer": "vattern", + "manufacturer": "tkw", + "width": 17.25, + "height": 5, + "layouts": { + "LAYOUT_encoder": { + "layout": [ + {"x": 1.25, "y": 0}, + {"x": 2.25, "y": 0}, + {"x": 3.25, "y": 0}, + {"x": 4.25, "y": 0}, + {"x": 5.25, "y": 0}, + {"x": 6.25, "y": 0}, + {"x": 7.25, "y": 0}, + {"x": 8.25, "y": 0}, + {"x": 9.25, "y": 0}, + {"x": 10.25, "y": 0}, + {"x": 11.25, "y": 0}, + {"x": 12.25, "y": 0}, + {"x": 13.25, "y": 0}, + {"x": 14.25, "y": 0, "w": 2}, + {"x": 16.25, "y": 0}, + + {"x": 1.25, "y": 1, "w": 1.5}, + {"x": 2.75, "y": 1}, + {"x": 3.75, "y": 1}, + {"x": 4.75, "y": 1}, + {"x": 5.75, "y": 1}, + {"x": 6.75, "y": 1}, + {"x": 7.75, "y": 1}, + {"x": 8.75, "y": 1}, + {"x": 9.75, "y": 1}, + {"x": 10.75, "y": 1}, + {"x": 11.75, "y": 1}, + {"x": 12.75, "y": 1}, + {"x": 13.75, "y": 1}, + {"x": 16.25, "y": 1}, + + {"x": 1.25, "y": 2, "w": 1.75}, + {"x": 3.0, "y": 2}, + {"x": 4.0, "y": 2}, + {"x": 5.0, "y": 2}, + {"x": 6.0, "y": 2}, + {"x": 7.0, "y": 2}, + {"x": 8.0, "y": 2}, + {"x": 9.0, "y": 2}, + {"x": 10.0, "y": 2}, + {"x": 11.0, "y": 2}, + {"x": 12.0, "y": 2}, + {"x": 13.0, "y": 2}, + {"x": 14.0, "y": 2}, + {"x": 15.0, "y": 1, "w": 1.25, "h": 2}, + {"x": 16.25, "y": 2}, + + {"x": 0, "y": 3}, + + {"x": 1.25, "y": 3, "w": 1.25}, + {"x": 2.5, "y": 3}, + {"x": 3.5, "y": 3}, + {"x": 4.5, "y": 3}, + {"x": 5.5, "y": 3}, + {"x": 6.5, "y": 3}, + {"x": 7.5, "y": 3}, + {"x": 8.5, "y": 3}, + {"x": 9.5, "y": 3}, + {"x": 10.5, "y": 3}, + {"x": 11.5, "y": 3}, + {"x": 12.5, "y": 3}, + {"x": 13.5, "y": 3, "w": 1.75}, + {"x": 15.25, "y": 3}, + {"x": 16.25, "y": 3}, + + {"x": 1.25, "y": 4, "w": 1.25}, + {"x": 2.5, "y": 4, "w": 1.25}, + {"x": 3.75, "y": 4, "w": 1.25}, + {"x": 5.0, "y": 4, "w": 6.25}, + {"x": 11.25, "y": 4}, + {"x": 12.25, "y": 4}, + {"x": 13.25, "y": 4}, + {"x": 14.25, "y": 4}, + {"x": 15.25, "y": 4}, + {"x": 16.25, "y": 4} + ] + } + } +} diff --git a/keyboards/tkw/stoutgat/v2/keymaps/ansi/keymap.c b/keyboards/tkw/stoutgat/v2/keymaps/ansi/keymap.c new file mode 100644 index 0000000000..618d336cdb --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/keymaps/ansi/keymap.c @@ -0,0 +1,72 @@ +#include QMK_KEYBOARD_H + +enum layers { + _BL, + _FL, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_ansi_blocker( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_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_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, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), + + [1] = LAYOUT_65_ansi_blocker( + /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc `~ */ + 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, RESET, + /* tab Q W E R T Y U I O P [ ] \ delete*/ + RGB_MOD, RGB_VAI, RGB_SAI, RGB_HUI, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, KC_TRNS, + /* caps A S D F G H J K L ; ' enter pg up*/ + RGB_TOG, RGB_VAD, RGB_SAD, RGB_HUD, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, + /* shift Z X C V B N M , . / shift up pg dn*/ + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_VOLU, KC_END, + /* ctrl win alt space alt fn ctrl left down right*/ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS) +}; + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise){ + + if (index == 0) { + switch (get_highest_layer(layer_state)) { + case _BL: + // Move whole words. Hold shift to select while moving. + if (clockwise) { + tap_code16(C(KC_RGHT)); + } else { + tap_code16(C(KC_LEFT)); + } + break; + default: + // History scrubbing. For Adobe products, hold shift while moving + // backward to go forward instead. + if (clockwise) { + tap_code16(C(KC_Z)); + } else { + tap_code16(C(KC_Y)); + } + break; + } + } else if (index == 1) { + switch (get_highest_layer(layer_state)) { + case _BL: + // Scrolling with PageUp and PgDn. + if (clockwise) { + tap_code16(KC_PGDN); + } else { + tap_code16(KC_PGUP); + } + break; + default: + if (clockwise) { + tap_code16(A(KC_TAB)); + } else { + tap_code16(A(S(KC_TAB))); + } + break; + } + } +} +#endif diff --git a/keyboards/tkw/stoutgat/v2/keymaps/default/keymap.c b/keyboards/tkw/stoutgat/v2/keymaps/default/keymap.c new file mode 100644 index 0000000000..c794c9c643 --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/keymaps/default/keymap.c @@ -0,0 +1,79 @@ +#include QMK_KEYBOARD_H + +enum layers { + _BL, + _FL, +}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_encoder( + 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_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_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_PGUP, + KC_MPLY, 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_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_encoder( + /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc `~ */ + 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, RESET, + /* tab Q W E R T Y U I O P [ ] delete */ + RGB_MOD, RGB_VAI, RGB_SAI, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_TRNS, + /* caps A S D F G H J K L ; ' # enter pg up */ + RGB_TOG, RGB_VAD, RGB_SAD, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_HOME, + /* shift \ Z X C V B N M , . / shift up pg dn */ + KC_MPLY, KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, KC_VOLU, KC_END, + /* ctrl win alt space alt fn ctrl left down right */ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_RCTL, KC_TRNS, KC_VOLD, KC_TRNS + ) +}; + + + + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise){ + + if (index == 0) { + switch (get_highest_layer(layer_state)) { + case _BL: + // Move whole words. Hold shift to select while moving. + if (clockwise) { + tap_code16(C(KC_RGHT)); + } else { + tap_code16(C(KC_LEFT)); + } + break; + default: + // History scrubbing. For Adobe products, hold shift while moving + // backward to go forward instead. + if (clockwise) { + tap_code16(C(KC_Z)); + } else { + tap_code16(C(KC_Y)); + } + break; + } + } else if (index == 1) { + switch (get_highest_layer(layer_state)) { + case _BL: + // Scrolling with PageUp and PgDn. + if (clockwise) { + tap_code16(KC_PGDN); + } else { + tap_code16(KC_PGUP); + } + break; + default: + if (clockwise) { + tap_code16(A(KC_TAB)); + } else { + tap_code16(A(S(KC_TAB))); + } + break; + } + } +} +#endif diff --git a/keyboards/tkw/stoutgat/v2/readme.md b/keyboards/tkw/stoutgat/v2/readme.md new file mode 100644 index 0000000000..192fca3d16 --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/readme.md @@ -0,0 +1,15 @@ +# stoutgat v2 + +![stoutgatv2](https://i.imgur.com/CCiP2Ffl.jpg) + +ARM 65% mechanical keyboard with RGB underglow and dual encoders. + +* Keyboard Maintainer: [vattern](https://github.com/vattern) +* Hardware Supported: f411 blackpill +* Hardware Availability: [stoutgatv2](https://github.com/vattern/stoutgatv2) + +Make example for this keyboard (after setting up your build environment): + + qmk flash -kb tkw/stoutgat/v2 -km default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/tkw/stoutgat/v2/rules.mk b/keyboards/tkw/stoutgat/v2/rules.mk new file mode 100644 index 0000000000..587a17780a --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/rules.mk @@ -0,0 +1,24 @@ +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +ENCODER_ENABLE = yes # Enable rotary encoder support +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +WS2812_DRIVER = pwm +OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE + +DEFAULT_FOLDER = tkw/stoutgat/v2/f411 +LAYOUTS = 65_iso 65_ansi diff --git a/keyboards/tkw/stoutgat/v2/v2.c b/keyboards/tkw/stoutgat/v2/v2.c new file mode 100644 index 0000000000..030f056abf --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/v2.c @@ -0,0 +1,16 @@ +/* Copyright 2020 Thys de Wet + * + * 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 "v2.h" diff --git a/keyboards/tkw/stoutgat/v2/v2.h b/keyboards/tkw/stoutgat/v2/v2.h new file mode 100644 index 0000000000..ff44742ff5 --- /dev/null +++ b/keyboards/tkw/stoutgat/v2/v2.h @@ -0,0 +1,75 @@ +/* Copyright 2020 Thys de Wet + * + * 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 . + */ +#pragma once + +#define _x_ KC_NO + +#include "quantum.h" + +#define LAYOUT_encoder( \ + 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, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K1D, K2E, \ + K44, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K49, K4A, K4B, K4C, K4D, K4E \ +) { \ +{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ +{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, _x_, K2E }, \ +{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, K41, K42, _x_, K44, _x_, K46, _x_, _x_, K49, K4A, K4B, K4C, K4D, K4E } \ +} +#define LAYOUT_65_iso( \ + 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, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K1D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K49, K4A, K4B, K4C, K4D, K4E \ +) { \ +{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ +{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, _x_, K2E }, \ +{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, K4B, K4C, K4D, K4E } \ +} + +#define LAYOUT_65_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K49, K4A, K4B, K4C, K4D, K4E \ +) { \ +{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ +{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, _x_, K2D, K2E }, \ +{ K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, K4A, K4B, K4C, K4D, K4E} \ +} + +#define LAYOUT_65_ansi_blocker( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K49, K4B, K4C, K4D, K4E \ +) { \ +{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ +{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, _x_, K2E }, \ +{ K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, K49, _x_, K4B, K4C, K4D, K4E} \ +} diff --git a/keyboards/tmo50/tmo50.c b/keyboards/tmo50/tmo50.c index 4f6288133d..bad4319f11 100644 --- a/keyboards/tmo50/tmo50.c +++ b/keyboards/tmo50/tmo50.c @@ -51,34 +51,51 @@ void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } -uint32_t layer_state_set_user(uint32_t state) +layer_state_t layer_state_set_kb(layer_state_t state) { - // if on layer 0, turn on B0 LED, otherwise off. - if (biton32(state) == 0) { + state = layer_state_set_user(state); + process_indicator_led_kb(state); + + return state; +} + +__attribute__((weak)) +bool process_indicator_led_user(layer_state_t state){ + return true; +} + +bool process_indicator_led_kb(layer_state_t state) +{ + if(process_indicator_led_user(state)) + { + // if on layer 0, turn on B0 LED, otherwise off. + if (get_highest_layer(state) == 0) { PORTB &= ~(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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +/* VID & PID from vusb project, see tmk_core/protocol/vusb/USB-IDs-for-free.txt"*/ +#define VENDOR_ID 0x7274 +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0000 +#define MANUFACTURER richard.titmuss +#define PRODUCT Torn + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * 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 \ + { D4, D1, D0, D5 } +#define MATRIX_COL_PINS \ + { B3, B4, B5, B0, D7, D6 } +#define UNUSED_PINS + +#define SECONDARY_ROW_PINS \ + { (1 << 5), (1 << 6), (1 << 7), (1 << 4) } +#define SECONDARY_COL_PINS \ + { (1 << 3), (1 << 2), (1 << 1), (1 << 0), (1 << 15), (1 << 14) } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define ENCODERS_PAD_A \ + { B2 } +#define ENCODERS_PAD_B \ + { B1 } + +#define USB_MAX_POWER_CONSUMPTION 100 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +#define OLED_TIMEOUT 60000 diff --git a/keyboards/torn/info.json b/keyboards/torn/info.json new file mode 100644 index 0000000000..340eb73597 --- /dev/null +++ b/keyboards/torn/info.json @@ -0,0 +1,57 @@ +{ + "keyboard_name": "Torn / Split Through Hole", + "url": "https://github.com/rtitmuss/torn", + "maintainer": "rtitmuss", + "width": 15, + "height": 4.55, + "layouts": { + "LAYOUT_split_3x6_4": { + "layout": [ + {"label":"SW1", "x":0, "y":0.375}, + {"label":"SW2", "x":1, "y":0.375}, + {"label":"SW3", "x":2, "y":0.125}, + {"label":"SW4", "x":3, "y":0}, + {"label":"SW5", "x":4, "y":0.125}, + {"label":"SW6", "x":5, "y":0.25}, + {"label":"SW23", "x":9, "y":0.25}, + {"label":"SW24", "x":10, "y":0.125}, + {"label":"SW25", "x":11, "y":0}, + {"label":"SW26", "x":12, "y":0.125}, + {"label":"SW27", "x":13, "y":0.375}, + {"label":"SW28", "x":14, "y":0.375}, + {"label":"SW7", "x":0, "y":1.375}, + {"label":"SW8", "x":1, "y":1.375}, + {"label":"SW9", "x":2, "y":1.125}, + {"label":"SW10", "x":3, "y":1}, + {"label":"SW11", "x":4, "y":1.125}, + {"label":"SW12", "x":5, "y":1.25}, + {"label":"SW29", "x":9, "y":1.25}, + {"label":"SW30", "x":10, "y":1.125}, + {"label":"SW31", "x":11, "y":1}, + {"label":"SW32", "x":12, "y":1.125}, + {"label":"SW33", "x":13, "y":1.375}, + {"label":"SW34", "x":14, "y":1.375}, + {"label":"SW13", "x":0, "y":2.375}, + {"label":"SW14", "x":1, "y":2.375}, + {"label":"SW15", "x":2, "y":2.125}, + {"label":"SW16", "x":3, "y":2}, + {"label":"SW17", "x":4, "y":2.125}, + {"label":"SW18", "x":5, "y":2.25}, + {"label":"SW35", "x":9, "y":2.25}, + {"label":"SW36", "x":10, "y":2.125}, + {"label":"SW37", "x":11, "y":2}, + {"label":"SW38", "x":12, "y":2.125}, + {"label":"SW39", "x":13, "y":2.375}, + {"label":"SW40", "x":14, "y":2.375}, + {"label":"SW19", "x":3, "y":3.1}, + {"label":"SW20", "x":4, "y":3.25}, + {"label":"SW21", "x":5, "y":3.40}, + {"label":"SW22", "x":6, "y":3.55}, + {"label":"SW41", "x":8, "y":3.55}, + {"label":"SW42", "x":9, "y":3.40}, + {"label":"SW43", "x":10, "y":3.25}, + {"label":"SW44", "x":11, "y":3.1} + ] + } + } +} diff --git a/keyboards/torn/keymaps/default/keymap.c b/keyboards/torn/keymaps/default/keymap.c new file mode 100644 index 0000000000..7c91325bdc --- /dev/null +++ b/keyboards/torn/keymaps/default/keymap.c @@ -0,0 +1,119 @@ +/* Copyright 2020 Richard Titmuss (richard.titmuss@gmail.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +enum torn_layers { _QWERTY, _LOWER, _RAISE, _ADJUST }; + +#define S_BSPC LSFT_T(KC_BSPC) +#define R_DEL LT(_RAISE, KC_DEL) +#define G_ENT LGUI_T(KC_ENT) +#define L_SPC LT(_LOWER, KC_SPC) + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | 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 | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_QWERTY] = LAYOUT_split_3x6_4( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_GRV, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_LBRC, + KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RBRC , + _______, KC_LCTL, S_BSPC, R_DEL, G_ENT, L_SPC, KC_RALT, _______ +), + +/* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | Esc | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | _ | | | | | | | | | , | . | / | + | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_LOWER] = LAYOUT_split_3x6_4( + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PMNS, + KC_UNDS, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, KC_SLSH, KC_PPLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +/* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F6 | F7 | F8 | F9 | F10 | | Home | Left | Down | Right| End | PgUp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F11 | F12 | | | | | | | | | | PgDn | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_RAISE] = LAYOUT_split_3x6_4( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, S(A(KC_LEFT)), KC_UP, S(A(KC_RGHT)), _______, _______, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PGUP, + _______, KC_F11, KC_F12, _______, _______, _______, A(KC_BSPC), A(KC_LEFT), S(KC_DOWN), A(KC_RGHT), _______, KC_PGDN , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_ADJUST] = LAYOUT_split_3x6_4( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +) + +}; + +const uint16_t PROGMEM encoder_keymaps[][2][2] = { + [_QWERTY] = { { C(S(KC_TAB)), C(KC_TAB) }, { KC_PGDN, KC_PGUP } }, + [_LOWER] = { { C(KC_LEFT), C(KC_RGHT) }, { KC__VOLDOWN, KC__VOLUP } }, + [_RAISE] = { { KC_TRNS, KC_TRNS }, { G(KC_TAB), G(S(KC_TAB)) } }, + [_ADJUST] = { { KC_TRNS, KC_TRNS }, { KC_TRNS, KC_TRNS } }, +}; +// clang-format on + +layer_state_t layer_state_set_user(layer_state_t state) { + torn_set_led(0, IS_LAYER_ON_STATE(state, _RAISE)); + torn_set_led(1, IS_LAYER_ON_STATE(state, _LOWER)); + return state; +} diff --git a/keyboards/torn/keymaps/via/keymap.c b/keyboards/torn/keymaps/via/keymap.c new file mode 100644 index 0000000000..7c91325bdc --- /dev/null +++ b/keyboards/torn/keymaps/via/keymap.c @@ -0,0 +1,119 @@ +/* Copyright 2020 Richard Titmuss (richard.titmuss@gmail.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +enum torn_layers { _QWERTY, _LOWER, _RAISE, _ADJUST }; + +#define S_BSPC LSFT_T(KC_BSPC) +#define R_DEL LT(_RAISE, KC_DEL) +#define G_ENT LGUI_T(KC_ENT) +#define L_SPC LT(_LOWER, KC_SPC) + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | 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 | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_QWERTY] = LAYOUT_split_3x6_4( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_GRV, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_LBRC, + KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RBRC , + _______, KC_LCTL, S_BSPC, R_DEL, G_ENT, L_SPC, KC_RALT, _______ +), + +/* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | Esc | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | _ | | | | | | | | | , | . | / | + | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_LOWER] = LAYOUT_split_3x6_4( + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PMNS, + KC_UNDS, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, KC_SLSH, KC_PPLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +/* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F6 | F7 | F8 | F9 | F10 | | Home | Left | Down | Right| End | PgUp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F11 | F12 | | | | | | | | | | PgDn | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_RAISE] = LAYOUT_split_3x6_4( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, S(A(KC_LEFT)), KC_UP, S(A(KC_RGHT)), _______, _______, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PGUP, + _______, KC_F11, KC_F12, _______, _______, _______, A(KC_BSPC), A(KC_LEFT), S(KC_DOWN), A(KC_RGHT), _______, KC_PGDN , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ____ | Ctrl | Bksp | Del | |Enter |Space | Alt | ____ | + * | | |Shift |Raise | | Gui |Lower | | | + * `---------------------------' `---------------------------' + */ +[_ADJUST] = LAYOUT_split_3x6_4( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +) + +}; + +const uint16_t PROGMEM encoder_keymaps[][2][2] = { + [_QWERTY] = { { C(S(KC_TAB)), C(KC_TAB) }, { KC_PGDN, KC_PGUP } }, + [_LOWER] = { { C(KC_LEFT), C(KC_RGHT) }, { KC__VOLDOWN, KC__VOLUP } }, + [_RAISE] = { { KC_TRNS, KC_TRNS }, { G(KC_TAB), G(S(KC_TAB)) } }, + [_ADJUST] = { { KC_TRNS, KC_TRNS }, { KC_TRNS, KC_TRNS } }, +}; +// clang-format on + +layer_state_t layer_state_set_user(layer_state_t state) { + torn_set_led(0, IS_LAYER_ON_STATE(state, _RAISE)); + torn_set_led(1, IS_LAYER_ON_STATE(state, _LOWER)); + return state; +} diff --git a/keyboards/torn/keymaps/via/rules.mk b/keyboards/torn/keymaps/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/torn/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/torn/matrix.c b/keyboards/torn/matrix.c new file mode 100644 index 0000000000..dd7fa1e2e1 --- /dev/null +++ b/keyboards/torn/matrix.c @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Richard Titmuss (richard.titmuss@gmail.com) + * Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar + * + * 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 QMK_KEYBOARD_H +#include "mcp23018.h" + +#define SPLIT_MATRIX_COLS (MATRIX_COLS / 2) +#define SECONDARY_ROW_OFFSET (MATRIX_ROWS / 2) + +typedef uint16_t mcp23018_pin_t; + +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[SPLIT_MATRIX_COLS] = MATRIX_COL_PINS; +static const mcp23018_pin_t secondary_row_pins[MATRIX_ROWS] = SECONDARY_ROW_PINS; +static const mcp23018_pin_t secondary_col_pins[SPLIT_MATRIX_COLS] = SECONDARY_COL_PINS; + +static void select_row(uint8_t row) { + setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); +} + +static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); } + +static void unselect_rows(void) { + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static void select_secondary_row(uint8_t row) { + uint8_t gpioa = 0xFF & ~secondary_row_pins[row]; + mcp23018_writeReg(GPIOA, &gpioa, 1); +} + +static void init_pins(void) { + unselect_rows(); + for (uint8_t x = 0; x < SPLIT_MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static matrix_row_t read_cols(void) { + matrix_row_t state = 0; + + // For each col... + for (uint8_t col_index = 0; col_index < SPLIT_MATRIX_COLS; col_index++) { + // Select the col pin to read (active low) + uint8_t pin_state = readPin(col_pins[col_index]); + + // Populate the matrix row with the state of the col pin + state |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + + return state; +} + +static matrix_row_t read_secondary_cols(void) { + matrix_row_t state = 0; + + uint8_t mcp23018_pin_state[2]; + if (mcp23018_readReg(GPIOA, mcp23018_pin_state, 2)) { + return 0; + } + + uint16_t pins = mcp23018_pin_state[0] | (mcp23018_pin_state[1] << 8); + + for (uint8_t col_index = 0; col_index < SPLIT_MATRIX_COLS; col_index++) { + uint16_t pin_state = pins & (secondary_col_pins[col_index]); + state |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + + return state; +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + matrix_row_t last_row_value = current_matrix[current_row]; + + select_row(current_row); + select_secondary_row(current_row); + + current_matrix[current_row] = read_cols() | (read_secondary_cols() << 6); + + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +void matrix_init_custom(void) { init_pins(); } + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool changed = false; + + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + changed |= read_cols_on_row(current_matrix, current_row); + } + + return changed; +} diff --git a/keyboards/torn/mcp23018.c b/keyboards/torn/mcp23018.c new file mode 100644 index 0000000000..c180f1dae5 --- /dev/null +++ b/keyboards/torn/mcp23018.c @@ -0,0 +1,63 @@ +/* + * Copyright 2020 Richard Titmuss (richard.titmuss@gmail.com) + * Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar + * + * 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 QMK_KEYBOARD_H +#include "i2c_master.h" +#include "mcp23018.h" + +#define MCP23018_ADDR 0b0100000 + +#define MCP23018_TIMEOUT 100 + +static i2c_status_t mcp23018_status = I2C_STATUS_ERROR; + +void msp23018_init(void) { + mcp23018_status = I2C_STATUS_SUCCESS; + + // Set pin direction + uint8_t iodir[] = {0b00001111, 0b11111111}; + mcp23018_writeReg(IODIRA, iodir, 2); + + // Set pull-up + uint8_t gppu[] = {0b00001111, 0b11111000}; + mcp23018_writeReg(GPPUA, gppu, 2); + + // LEDs output high + uint8_t gpio[] = {0b00000000, 0b00000111}; + mcp23018_writeReg(GPIOA, gpio, 2); +} + +bool mcp23018_reset_required(void) { return mcp23018_status != I2C_STATUS_SUCCESS; } + +i2c_status_t mcp23018_writeReg(uint8_t regaddr, const uint8_t* data, uint16_t length) { + if (mcp23018_status) { + return mcp23018_status; + } + + mcp23018_status = i2c_writeReg((MCP23018_ADDR << 1), regaddr, data, length, MCP23018_TIMEOUT); + return mcp23018_status; +} + +i2c_status_t mcp23018_readReg(uint8_t regaddr, uint8_t* data, uint16_t length) { + if (mcp23018_status) { + return mcp23018_status; + } + + mcp23018_status = i2c_readReg((MCP23018_ADDR << 1), regaddr, data, length, MCP23018_TIMEOUT); + return mcp23018_status; +} diff --git a/keyboards/torn/mcp23018.h b/keyboards/torn/mcp23018.h new file mode 100644 index 0000000000..17ecaa5a7c --- /dev/null +++ b/keyboards/torn/mcp23018.h @@ -0,0 +1,32 @@ +/* + * Copyright 2020 Richard Titmuss (richard.titmuss@gmail.com) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define IODIRA 0x00 +#define IODIRB 0x01 +#define GPPUA 0x0C +#define GPPUB 0x0D +#define GPIOA 0x12 +#define GPIOB 0x13 + +typedef int16_t mcp23018_status_t; + +void msp23018_init(void); +bool mcp23018_reset_required(void); +mcp23018_status_t mcp23018_writeReg(uint8_t regaddr, const uint8_t* data, uint16_t length); +mcp23018_status_t mcp23018_readReg(uint8_t regaddr, uint8_t* data, uint16_t length); diff --git a/keyboards/torn/readme.md b/keyboards/torn/readme.md new file mode 100644 index 0000000000..ffe9a2d9c2 --- /dev/null +++ b/keyboards/torn/readme.md @@ -0,0 +1,21 @@ +# TORN// Split Through Hole + +![torn](https://raw.githubusercontent.com/rtitmuss/torn/master/doc/img/torn.jpg) + +The split keyboard kit made by through hole components only. + +The design has been inspired by the Corne, Plaid and Discipline keyboards. + +* Keyboard Maintainer: [rtitmuss](https://github.com/rtitmuss) +* Hardware Supported: TORN, atmega328p +* Hardware Availability: [GitHub](https://github.com/rtitmuss/torn) + +Make example for this keyboard (after setting up your build environment): + + make torn:default + +Flashing example for this keyboard: + + make torn:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/torn/rules.mk b/keyboards/torn/rules.mk new file mode 100644 index 0000000000..caf544d137 --- /dev/null +++ b/keyboards/torn/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega328p + +# Bootloader selection +BOOTLOADER = USBasp + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +ENCODER_ENABLE = yes # Enable rotary encoder +OLED_DRIVER_ENABLE = yes +CUSTOM_MATRIX = lite + +SRC += matrix.c \ + mcp23018.c \ + torn_encoder.c \ + torn_oled.c +QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/torn/torn.c b/keyboards/torn/torn.c new file mode 100644 index 0000000000..ef5060e602 --- /dev/null +++ b/keyboards/torn/torn.c @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Richard Titmuss + * + * 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 "torn.h" +#include "i2c_master.h" +#include "mcp23018.h" + +static uint8_t led_state[3] = {1, 1, 1}; + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + i2c_init(); + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + if (mcp23018_reset_required()) { + msp23018_init(); + secondary_encoder_init(); + // torn_set_led(2, 1); + } + + matrix_scan_user(); + secondary_encoder_read(); +} + +void torn_set_led(uint8_t led, bool state) { + led_state[led] = !state; + + // toggle leds by setting the pin direction + uint8_t iodir = 0b11111000 | led_state[0] << 2 | led_state[1] << 1 | led_state[2]; + mcp23018_writeReg(IODIRB, &iodir, 1); +} diff --git a/keyboards/torn/torn.h b/keyboards/torn/torn.h new file mode 100644 index 0000000000..c25b5c2a0c --- /dev/null +++ b/keyboards/torn/torn.h @@ -0,0 +1,41 @@ +/* + * Copyright 2020 Richard Titmuss + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +// clang-format off +#define LAYOUT_split_3x6_4( \ + 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, \ + k32, k33, k34, k35, k36, k37, k38, k39 \ +) { \ + { 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 }, \ + { ___, ___, k32, k33, k34, k35, k36, k37, k38, k39, ___, ___ } \ +} +// clang-format on + +void torn_set_led(uint8_t led, bool on); + +void secondary_encoder_read(void); +void secondary_encoder_init(void); diff --git a/keyboards/torn/torn_encoder.c b/keyboards/torn/torn_encoder.c new file mode 100644 index 0000000000..ef9b0873fb --- /dev/null +++ b/keyboards/torn/torn_encoder.c @@ -0,0 +1,86 @@ +/* + * Copyright 2020 Richard Titmuss + * Copyright 2018 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 "torn.h" +#include "mcp23018.h" + +#ifndef ENCODER_RESOLUTION +# define ENCODER_RESOLUTION 4 +#endif + +#define ENCODER_CLOCKWISE true +#define ENCODER_COUNTER_CLOCKWISE false + +static int8_t encoder_LUT[] = {0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0}; + +static uint8_t encoder_state = 0; +static int8_t encoder_pulses = 0; + +extern const uint16_t PROGMEM encoder_keymaps[][2][2]; + +/** + * Tap on encoder updates using the encoder keymap + */ +void encoder_update_kb(uint8_t index, bool clockwise) { + int layer = get_highest_layer(layer_state); + + uint16_t code; + do { + code = pgm_read_word(&encoder_keymaps[layer--][index][clockwise]); + } while (code == KC_TRNS); + + tap_code16(code); +} + +static bool encoder_read_state(uint8_t *state) { + uint8_t mcp23018_pin_state; + mcp23018_status_t status = mcp23018_readReg(GPIOB, &mcp23018_pin_state, 1); + if (status == 0) { + *state = (mcp23018_pin_state & 0b110000) >> 4; + return true; + } + return false; +} + +static void encoder_update(int8_t index, uint8_t state) { + encoder_pulses += encoder_LUT[state & 0xF]; + if (encoder_pulses >= ENCODER_RESOLUTION) { + encoder_update_kb(index, ENCODER_CLOCKWISE); + } + if (encoder_pulses <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise + encoder_update_kb(index, ENCODER_COUNTER_CLOCKWISE); + } + encoder_pulses %= ENCODER_RESOLUTION; +} + +/** + * Read the secondary encoder over i2c + */ +void secondary_encoder_read(void) { + uint8_t state; + if (encoder_read_state(&state)) { + encoder_state <<= 2; + encoder_state |= state; + encoder_update(1, encoder_state); + } +} + +/** + * Initialize the secondary encoder over i2c + */ +void secondary_encoder_init(void) { encoder_read_state(&encoder_state); } diff --git a/keyboards/torn/torn_oled.c b/keyboards/torn/torn_oled.c new file mode 100644 index 0000000000..834abf96ce --- /dev/null +++ b/keyboards/torn/torn_oled.c @@ -0,0 +1,63 @@ +/* + * Copyright 2020 Richard Titmuss + * + * 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 QMK_KEYBOARD_H + +#ifdef OLED_DRIVER_ENABLE + +// clang-format off +__attribute__((weak)) +void oled_task_user(void) { + static const char PROGMEM torn_logo[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf8, 0x98, 0x98, 0x98, 0x98, 0x98, 0x18, 0x18, 0x98, + 0x98, 0x98, 0x98, 0x98, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0xc0, 0x60, 0x30, 0x30, 0x18, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, + 0x18, 0x30, 0x30, 0x60, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf8, 0x18, 0x18, 0x98, 0x98, 0x98, 0x98, 0x98, 0x98, 0x18, 0x38, + 0x70, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf8, 0xf8, 0x38, 0x70, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf8, 0xf8, 0x18, 0x18, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff, 0xff, 0x00, 0x00, 0xff, + 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf8, 0xfe, 0x07, 0x01, 0xf0, 0xfc, 0x0e, 0x03, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x03, 0x03, 0x0e, 0xfc, 0xf0, 0x01, 0x07, 0xfe, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xc1, 0xc1, 0xc1, 0x63, 0x3f, 0x1c, + 0xc0, 0xe1, 0x7f, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x00, 0xf8, 0xf1, 0xe3, 0xc7, 0x8e, 0x1c, 0x38, 0x70, 0xe0, 0xc0, 0x80, 0x00, + 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, + 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0f, 0x3f, 0x70, 0xc0, 0x87, 0x1f, 0x38, 0x60, 0x60, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, + 0x60, 0x60, 0x38, 0x1f, 0x87, 0xc0, 0xf0, 0x7f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xfe, 0xfe, 0x0e, 0x3c, 0x78, 0xe2, 0xc7, 0x1f, + 0x39, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x01, 0x03, 0x07, 0x0e, 0x1c, 0x38, 0x71, 0xe3, 0xc7, + 0x8f, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0c, 0x0c, 0x0f, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x06, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, + 0x0c, 0x06, 0x06, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x0c, 0x0c, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x01, 0x07, 0x0f, + 0x0c, 0x0c, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0f, 0x0f, 0x0c, 0x0c, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x03, 0x07, 0x0e, 0x0c, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + oled_write_raw_P(torn_logo, sizeof(torn_logo)); +} +// clang-format on + +#endif diff --git a/keyboards/treadstone48/rev1/rev1.h b/keyboards/treadstone48/rev1/rev1.h index 9a66d855d8..7534796422 100644 --- a/keyboards/treadstone48/rev1/rev1.h +++ b/keyboards/treadstone48/rev1/rev1.h @@ -66,26 +66,24 @@ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75 \ ) \ - LAYOUT_full( \ - L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ - L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ - L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ - L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N \ - ) - -// Used to create a keymap using only KC_ prefixed keys -#define LAYOUT_base_kc( \ - L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \ - L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, \ - L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \ - L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75 \ - ) \ - LAYOUT_base( \ - KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, \ - KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, \ - KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, \ - KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75 \ - ) + { \ + { L45, L44, L43, L42, L41, L40 }, \ + { L55, L54, L53, L52, L51, L50 }, \ + { L65, L64, L63, L62, L61, L60 }, \ + { L75, L74, L73, L72, L71, L70 }, \ + { L05, L04, L03, L02, L01, L00 }, \ + { L15, L14, L13, L12, L11, L10 }, \ + { L25, L24, L23, L22, L21, L20 }, \ + { L35, L34, L33, L32, L31, L30 }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + } ////////////////////////////////////////////////////////////////////////////// @@ -99,12 +97,24 @@ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, R70, R71, R72, R73, R74, L75 \ ) \ - LAYOUT_full( \ - L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R44, R43, R42, R41, R40, \ - L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R54, R53, R52, R51, R50, \ - L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R64, R63, R62, R61, R60, \ - L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R74, R73, R72, R71, R70 \ - ) + { \ + { L45, L44, L43, L42, L41, L40 }, \ + { L55, L54, L53, L52, L51, L50 }, \ + { L65, L64, L63, L62, L61, L60 }, \ + { L75, L74, L73, L72, L71, L70 }, \ + { L05, L04, L03, L02, L01, L00 }, \ + { L15, L14, L13, L12, L11, L10 }, \ + { L25, L24, L23, L22, L21, L20 }, \ + { L35, L34, L33, L32, L31, L30 }, \ + { R40, R41, R42, R43, R44, K_N }, \ + { R50, R51, R52, R53, R54, K_N }, \ + { R60, R61, R62, R63, R64, K_N }, \ + { R70, R71, R72, R73, R74, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + } // When use right hand side of the Rhymestone. #ifdef RHYMESTONE_RIGHTHAND @@ -115,27 +125,25 @@ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \ L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, R70, R71, R72, R73, R74, L75 \ ) \ - LAYOUT_full( \ - L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R40, R41, R42, R43, R44, \ - L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R50, R51, R52, R53, R54, \ - L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R60, R61, R62, R63, R64, \ - L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R70, R71, R72, R73, R74 \ - ) + { \ + { L45, L44, L43, L42, L41, L40 }, \ + { L55, L54, L53, L52, L51, L50 }, \ + { L65, L64, L63, L62, L61, L60 }, \ + { L75, L74, L73, L72, L71, L70 }, \ + { L05, L04, L03, L02, L01, L00 }, \ + { L15, L14, L13, L12, L11, L10 }, \ + { L25, L24, L23, L22, L21, L20 }, \ + { L35, L34, L33, L32, L31, L30 }, \ + { R44, R43, R42, R41, R40, K_N }, \ + { R54, R53, R52, R51, R50, K_N }, \ + { R64, R63, R62, R61, R60, K_N }, \ + { R74, R73, R72, R71, R70, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + } #endif - -// Used to create a keymap using only KC_ prefixed keys -#define LAYOUT_rs_kc( \ - L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \ - L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \ - L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \ - L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R70, R71, R72, R73, R74 \ - ) \ - LAYOUT_rs( \ - KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, \ - KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, KC_##R50, KC_##R51, KC_##R52, KC_##R53, KC_##R54, \ - KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, KC_##R60, KC_##R61, KC_##R62, KC_##R63, KC_##R64, \ - KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75, KC_##R70, KC_##R71, KC_##R72, KC_##R73, KC_##R74 \ - ) ////////////////////////////////////////////////////////////////////////////// @@ -146,9 +154,7 @@ ////////////////////////////////////////////////////////////////////////////// #ifdef ANGELINA_KEYMAP #undef LAYOUT_base -#undef LAYOUT_base_kc #undef LAYOUT_rs -#undef LAYOUT_rs_kc #define LAYOUT_base( \ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \ @@ -156,26 +162,25 @@ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \ L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, L30 \ ) \ - LAYOUT_full( \ - L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ - L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ - L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ - L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N \ - ) + { \ + { L45, L44, L43, L42, L41, L40 }, \ + { L55, L54, L53, L52, L51, L50 }, \ + { L65, L64, L63, L62, L61, L60 }, \ + { L75, L74, L73, L72, L71, L70 }, \ + { L05, L04, L03, L02, L01, L00 }, \ + { L15, L14, L13, L12, L11, L10 }, \ + { L25, L24, L23, L22, L21, L20 }, \ + { L35, L34, L33, L32, L31, L30 }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + } -// Used to create a keymap using only KC_ prefixed keys -#define LAYOUT_base_kc( \ - L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \ - L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, \ - L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \ - L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75 \ - ) \ - LAYOUT_base( \ - KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, \ - KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, \ - KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, \ - KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75 \ - ) #define LAYOUT_rs( \ L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \ @@ -183,26 +188,23 @@ L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \ L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R70, R71, R72, R73, R74, L30 \ ) \ - LAYOUT_full( \ - L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R44, R43, R42, R41, R40, \ - L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R54, R53, R52, R51, R50, \ - L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R64, R63, R62, R61, R60, \ - L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R74, R73, R72, R71, R70 \ - ) - -// Used to create a keymap using only KC_ prefixed keys -#define LAYOUT_rs_kc( \ - L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \ - L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \ - L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \ - L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R70, R71, R72, R73, R74 \ - ) \ - LAYOUT_rs( \ - KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, \ - KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, KC_##R50, KC_##R51, KC_##R52, KC_##R53, KC_##R54, \ - KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, KC_##R60, KC_##R61, KC_##R62, KC_##R63, KC_##R64, \ - KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75, KC_##R70, KC_##R71, KC_##R72, KC_##R73, KC_##R74 \ - ) - + { \ + { L45, L44, L43, L42, L41, L40 }, \ + { L55, L54, L53, L52, L51, L50 }, \ + { L65, L64, L63, L62, L61, L60 }, \ + { L75, L74, L73, L72, L71, L70 }, \ + { L05, L04, L03, L02, L01, L00 }, \ + { L15, L14, L13, L12, L11, L10 }, \ + { L25, L24, L23, L22, L21, L20 }, \ + { L35, L34, L33, L32, L31, L30 }, \ + { R40, R41, R42, R43, R44, K_N }, \ + { R50, R51, R52, R53, R54, K_N }, \ + { R60, R61, R62, R63, R64, K_N }, \ + { R70, R71, R72, R73, R74, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + { K_N, K_N, K_N, K_N, K_N, K_N }, \ + } #endif ////////////////////////////////////////////////////////////////////////////// diff --git a/keyboards/treadstone48/rev2/info.json b/keyboards/treadstone48/rev2/info.json index df9e7591b5..991a830199 100644 --- a/keyboards/treadstone48/rev2/info.json +++ b/keyboards/treadstone48/rev2/info.json @@ -1,261 +1,263 @@ { - "keyboard_name": "Treadstone48", - "url": "https://github.com/marksard/Keyboards", - "maintainer": "marksard", - "width": 14.75, - "height": 4, - "layouts": { - "LAYOUT_base": { - "layout": [ - { - "label": "Esc", - "x": 1, - "y": 0 - }, - { - "label": "Q", - "x": 2.25, - "y": 0 - }, - { - "label": "W", - "x": 3.25, - "y": 0 - }, - { - "label": "E", - "x": 4.25, - "y": 0 - }, - { - "label": "R", - "x": 5.25, - "y": 0 - }, - { - "label": "T", - "x": 6.25, - "y": 0 - }, - { - "label": "Y", - "x": 7.75, - "y": 0 - }, - { - "label": "U", - "x": 8.75, - "y": 0 - }, - { - "label": "I", - "x": 9.75, - "y": 0 - }, - { - "label": "O", - "x": 10.75, - "y": 0 - }, - { - "label": "P", - "x": 11.75, - "y": 0 - }, - { - "label": "-", - "x": 13.75, - "y": 0 - }, - { - "label": "Tab", - "x": 1, - "y": 1, - "w": 1.5 - }, - { - "label": "A", - "x": 2.5, - "y": 1 - }, - { - "label": "S", - "x": 3.5, - "y": 1 - }, - { - "label": "D", - "x": 4.5, - "y": 1 - }, - { - "label": "F", - "x": 5.5, - "y": 1 - }, - { - "label": "G", - "x": 6.5, - "y": 1 - }, - { - "label": "H", - "x": 7.5, - "y": 1 - }, - { - "label": "J", - "x": 8.5, - "y": 1 - }, - { - "label": "K", - "x": 9.5, - "y": 1 - }, - { - "label": "L", - "x": 10.5, - "y": 1 - }, - { - "label": ":", - "x": 11.5, - "y": 1 - }, - { - "label": "Enter", - "x": 12.5, - "y": 1, - "w": 2.25 - }, - { - "label": "Shift", - "x": 0, - "y": 2, - "w": 2.25 - }, - { - "label": "Z", - "x": 2.25, - "y": 2 - }, - { - "label": "X", - "x": 3.25, - "y": 2 - }, - { - "label": "C", - "x": 4.25, - "y": 2 - }, - { - "label": "V", - "x": 5.25, - "y": 2 - }, - { - "label": "B", - "x": 6.25, - "y": 2 - }, - { - "label": "N", - "x": 7.75, - "y": 2 - }, - { - "label": "M", - "x": 8.75, - "y": 2 - }, - { - "label": "<", - "x": 9.75, - "y": 2 - }, - { - "label": ">", - "x": 10.75, - "y": 2 - }, - { - "label": "?", - "x": 11.75, - "y": 2 - }, - { - "label": "\u2191", - "x": 12.75, - "y": 2 - }, - { - "label": "Ctrl", - "x": 0.75, - "y": 3, - "w": 1.25 - }, - { - "label": "Win", - "x": 2, - "y": 3, - "w": 1.25 - }, - { - "label": "Alt", - "x": 3.25, - "y": 3, - "w": 1.25 - }, - { - "label": "Lower", - "x": 4.5, - "y": 3 - }, - { - "label": "BackSpace", - "x": 5.5, - "y": 3, - "w": 2 - }, - { - "x": 7.5, - "y": 3, - "w": 2 - }, - { - "label": "Raise", - "x": 9.5, - "y": 3 - }, - { - "label": "Menu", - "x": 10.5, - "y": 3, - "w": 1.25 - }, - { - "label": "\u2190", - "x": 11.75, - "y": 3 - }, - { - "label": "\u2193", - "x": 12.75, - "y": 3 - }, - { - "label": "\u2192", - "x": 13.75, - "y": 3 - }, - { - "label": "_", - "x": 12.75, - "y": 0 + "keyboard_name": "Treadstone48", + "url": "https://github.com/marksard/Keyboards", + "maintainer": "marksard", + "width": 14.75, + "height": 4, + "layouts": { + "LAYOUT_base": { + "layout": [ + { + "label": "Esc", + "x": 1, + "y": 0 + }, + { + "label": "Q", + "x": 2.25, + "y": 0 + }, + { + "label": "W", + "x": 3.25, + "y": 0 + }, + { + "label": "E", + "x": 4.25, + "y": 0 + }, + { + "label": "R", + "x": 5.25, + "y": 0 + }, + { + "label": "T", + "x": 6.25, + "y": 0 + }, + { + "label": "Y", + "x": 7.75, + "y": 0 + }, + { + "label": "U", + "x": 8.75, + "y": 0 + }, + { + "label": "I", + "x": 9.75, + "y": 0 + }, + { + "label": "O", + "x": 10.75, + "y": 0 + }, + { + "label": "P", + "x": 11.75, + "y": 0 + }, + { + "label": "Backspace", + "x": 12.75, + "y": 0, + "w": 2 + }, + { + "label": "Tab", + "x": 1, + "y": 1, + "w": 1.5 + }, + { + "label": "A", + "x": 2.5, + "y": 1 + }, + { + "label": "S", + "x": 3.5, + "y": 1 + }, + { + "label": "D", + "x": 4.5, + "y": 1 + }, + { + "label": "F", + "x": 5.5, + "y": 1 + }, + { + "label": "G", + "x": 6.5, + "y": 1 + }, + { + "label": "H", + "x": 7.5, + "y": 1 + }, + { + "label": "J", + "x": 8.5, + "y": 1 + }, + { + "label": "K", + "x": 9.5, + "y": 1 + }, + { + "label": "L", + "x": 10.5, + "y": 1 + }, + { + "label": ":", + "x": 11.5, + "y": 1 + }, + { + "label": "Enter", + "x": 12.5, + "y": 1, + "w": 2.25 + }, + { + "label": "Shift", + "x": 0, + "y": 2, + "w": 2.25 + }, + { + "label": "Z", + "x": 2.25, + "y": 2 + }, + { + "label": "X", + "x": 3.25, + "y": 2 + }, + { + "label": "C", + "x": 4.25, + "y": 2 + }, + { + "label": "V", + "x": 5.25, + "y": 2 + }, + { + "label": "B", + "x": 6.25, + "y": 2 + }, + { + "label": "N", + "x": 7.75, + "y": 2 + }, + { + "label": "M", + "x": 8.75, + "y": 2 + }, + { + "label": "<", + "x": 9.75, + "y": 2 + }, + { + "label": ">", + "x": 10.75, + "y": 2 + }, + { + "label": "?", + "x": 11.75, + "y": 2 + }, + { + "label": "\u2191", + "x": 12.75, + "y": 2 + }, + { + "label": "Ctrl", + "x": 0.75, + "y": 3, + "w": 1.25 + }, + { + "label": "Win", + "x": 2, + "y": 3, + "w": 1.25 + }, + { + "label": "Alt", + "x": 3.25, + "y": 3, + "w": 1.25 + }, + { + "label": "Lower", + "x": 4.5, + "y": 3 + }, + { + "label": "Backspace", + "x": 5.5, + "y": 3, + "w": 2 + }, + { + "label": "Space", + "x": 7.5, + "y": 3, + "w": 2 + }, + { + "label": "Raise", + "x": 9.5, + "y": 3 + }, + { + "label": "Menu", + "x": 10.5, + "y": 3, + "w": 1.25 + }, + { + "label": "\u2190", + "x": 11.75, + "y": 3 + }, + { + "label": "\u2193", + "x": 12.75, + "y": 3 + }, + { + "label": "\u2192", + "x": 13.75, + "y": 3 + }, + { + "label": "Shift", + "x": 13.75, + "y": 2 + } + ] } - ] } - } } diff --git a/keyboards/underscore33/keymaps/default/readme.md b/keyboards/underscore33/keymaps/default/readme.md deleted file mode 100644 index 7ef72915ed..0000000000 --- a/keyboards/underscore33/keymaps/default/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -![_33 layout Image](https://i.imgur.com/1vxmk0F.png) - -# Default _33 Layout - -This is the recommended default layout. It is not a fully functional layout without backspace, tab, esc and so on. It is recommended to use combos to access the additional modifiers when using the large spacebar layout option, however combos are not enabled in the default firmware. diff --git a/keyboards/underscore33/readme.md b/keyboards/underscore33/readme.md index 153329d84e..7cc2f9f411 100644 --- a/keyboards/underscore33/readme.md +++ b/keyboards/underscore33/readme.md @@ -2,14 +2,18 @@ ![_33](https://i.imgur.com/0Wuf8aT.png) -A little bitty 30% (10x4) ortholinear keyboard designed by tominabox1. The board supports an RGB LED strip with DI on port B6. There is an error on the initial 25 PCBs that incorrectly indicates PF0 for the RGB. The appropriate port is commented out in config.h for proper LED support. +A little bitty 30% (10x4) ortholinear keyboard designed by tominabox1. The R1 version of the board supports an RGB LED strip with DI on port B6. There is an error on the initial 25 PCBs that incorrectly indicates PF0 for the RGB. The R2 version is correctly labeled for RGB on D6. The appropriate port is commented out in config.h for proper LED support. * Keyboard Maintainer: [TJ Campie](https://github.com/tominabox1) -* Hardware Supported: _33 PCB and Plate limited buy (Open source available ca. Apirl 2020) +* Hardware Supported: [_33 r1 and r2 PCBs](https://github.com/tominabox1/_33-Keyboard) * Hardware Availability: [3D printed open sourced](https://github.com/tominabox1/_33-Keyboard) Make example for this keyboard (after setting up your build environment): - make underscore33:default + make underscore33/rev2:default + +Flashing example for this keyboard: + + make underscore33/rev2:default:flash See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/underscore33/config.h b/keyboards/underscore33/rev1/config.h similarity index 60% rename from keyboards/underscore33/config.h rename to keyboards/underscore33/rev1/config.h index 5733f30d00..8bdb802bde 100644 --- a/keyboards/underscore33/config.h +++ b/keyboards/underscore33/rev1/config.h @@ -1,10 +1,25 @@ +/* Copyright 2020 tominabox1 + * + * 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 . + */ #pragma once #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6A50 +#define VENDOR_ID 0x7431 +#define PRODUCT_ID 0x3301 // _33 rev1 #define DEVICE_VER 0x0001 #define MANUFACTURER tominabox1 #define PRODUCT underscore33 diff --git a/keyboards/underscore33/rev1/info.json b/keyboards/underscore33/rev1/info.json new file mode 100644 index 0000000000..5418340dc0 --- /dev/null +++ b/keyboards/underscore33/rev1/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "underscore33", + "url": "", + "maintainer": "tominabox1", + "width": 10, + "height": 4, + "layouts": { + "LAYOUT_33_big_space": { + "layout": [{"label":"Q", "x":0, "y":0}, {"label":"W", "x":1, "y":0}, {"label":"E", "x":2, "y":0}, {"label":"R", "x":3, "y":0}, {"label":"T", "x":4, "y":0}, {"label":"Y", "x":5, "y":0}, {"label":"U", "x":6, "y":0}, {"label":"I", "x":7, "y":0}, {"label":"O", "x":8, "y":0}, {"label":"P", "x":9, "y":0},{"label":"A", "x":0, "y":1}, {"label":"S", "x":1, "y":1}, {"label":"D", "x":2, "y":1}, {"label":"F", "x":3, "y":1}, {"label":"G", "x":4, "y":1}, {"label":"H", "x":5, "y":1}, {"label":"J", "x":6, "y":1}, {"label":"K", "x":7, "y":1}, {"label":"L", "x":8, "y":1}, {"label":";", "x":9, "y":1}, {"label":"Z", "x":0, "y":2}, {"label":"X", "x":1, "y":2}, {"label":"C", "x":2, "y":2}, {"label":"V", "x":3, "y":2}, {"label":"B", "x":4, "y":2}, {"label":"N", "x":5, "y":2}, {"label":"M", "x":6, "y":2}, {"label":"<", "x":7, "y":2}, {"label":">", "x":8, "y":2}, {"label":"?", "x":9, "y":2}, {"label":"", "x":0.65, "y":3, "w":1.25}, {"label":"", "x":1.9, "y":3, "w":6.25}, {"label":"", "x":8.15, "y":3, "w":1.25}] + }, + + "LAYOUT_33_split_space": { + "layout": [{"label":"Q", "x":0, "y":0}, {"label":"W", "x":1, "y":0}, {"label":"E", "x":2, "y":0}, {"label":"R", "x":3, "y":0}, {"label":"T", "x":4, "y":0}, {"label":"Y", "x":5, "y":0}, {"label":"U", "x":6, "y":0}, {"label":"I", "x":7, "y":0}, {"label":"O", "x":8, "y":0}, {"label":"P", "x":9, "y":0}, {"label":"A", "x":0, "y":1}, {"label":"S", "x":1, "y":1}, {"label":"D", "x":2, "y":1}, {"label":"F", "x":3, "y":1}, {"label":"G", "x":4, "y":1}, {"label":"H", "x":5, "y":1}, {"label":"J", "x":6, "y":1}, {"label":"K", "x":7, "y":1}, {"label":"L", "x":8, "y":1}, {"label":";", "x":9, "y":1}, {"label":"Z", "x":0, "y":2}, {"label":"X", "x":1, "y":2}, {"label":"C", "x":2, "y":2}, {"label":"V", "x":3, "y":2}, {"label":"B", "x":4, "y":2}, {"label":"N", "x":5, "y":2}, {"label":"M", "x":6, "y":2}, {"label":"<", "x":7, "y":2}, {"label":">", "x":8, "y":2}, {"label":"?", "x":9, "y":2}, {"label":"", "x":0.65, "y":3, "w":1.25}, {"label":"", "x":1.9, "y":3, "w":2.25}, {"label":"", "x":4.15, "y":3, "w":1.75}, {"label":"", "x":5.9, "y":3, "w":2.25}, {"label":"", "x":8.15, "y":3, "w":1.25}] + } + } +} diff --git a/keyboards/underscore33/rev1/keymaps/default/config.h b/keyboards/underscore33/rev1/keymaps/default/config.h new file mode 100644 index 0000000000..5708a439ac --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/default/config.h @@ -0,0 +1,5 @@ +#pragma once + +/* Combos */ +#define COMBO_COUNT 5 +#define COMBO_TERM 50 diff --git a/keyboards/underscore33/rev1/keymaps/default/keymap.c b/keyboards/underscore33/rev1/keymaps/default/keymap.c new file mode 100644 index 0000000000..148e840fa5 --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/default/keymap.c @@ -0,0 +1,86 @@ +/* Copyright 2020 tominabox1 + * + * 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 QMK_KEYBOARD_H + +enum layers{ + _BASE, + _NUM_SYM, + _NAV +}; + +enum custom_keycodes{ + RGBRST = SAFE_RANGE, +}; + +#define KC_NUM_SPC LT(_NUM_SYM, KC_SPC) +#define KC_NAV_ENT LT(_NAV, KC_ENT) +#define KC_GA LGUI_T(KC_A) +#define KC_AS LALT_T(KC_S) +#define KC_CD LCTL_T(KC_D) +#define KC_SF LSFT_T(KC_F) +#define KC_SJ RSFT_T(KC_J) +#define KC_CK RCTL_T(KC_K) +#define KC_AL RALT_T(KC_L) +#define KC_GSCLN RGUI_T(KC_SCLN) + +enum combo_events { + COMBO_BSPC, + COMBO_NUMBAK, + COMBO_TAB, + COMBO_ESC, + COMBO_DEL, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_33_split_space( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_GA, KC_AS, KC_CD, KC_SF, KC_G, KC_H, KC_SJ, KC_CK, KC_AL, KC_GSCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LCTL, KC_NAV_ENT, KC_RGUI, KC_NUM_SPC, KC_RCTL + ), + + [_NUM_SYM] = LAYOUT_33_split_space( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, + KC_BSLS, KC_LCBR, KC_LBRC, KC_LPRN, KC_UNDS, KC_RPRN, KC_RBRC, KC_RCBR, KC_DOT, KC_GRV, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [_NAV] = LAYOUT_33_split_space( + RESET, RGBRST, AG_NORM, AG_SWAP, DEBUG, KC_GRV, KC_PGDN, KC_UP, KC_PGUP, KC_SCLN, + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_BSLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + + +#ifdef COMBO_ENABLE +const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END}; +const uint16_t PROGMEM combo_numbak[] = {KC_0, KC_9, COMBO_END}; +const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; +const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; +const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), + [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), + [COMBO_TAB] = COMBO(combo_tab,KC_TAB), + [COMBO_ESC] = COMBO(combo_esc,KC_ESC), + [COMBO_DEL] = COMBO(combo_del,KC_DEL), + +}; +#endif diff --git a/keyboards/underscore33/rev1/keymaps/default/readme.md b/keyboards/underscore33/rev1/keymaps/default/readme.md new file mode 100644 index 0000000000..908b3e04ab --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# Default _33 Rev1 Layout + +This is the recommended default layout. diff --git a/keyboards/underscore33/rev1/keymaps/default/rules.mk b/keyboards/underscore33/rev1/keymaps/default/rules.mk new file mode 100644 index 0000000000..ab1e438182 --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/default/rules.mk @@ -0,0 +1 @@ +COMBO_ENABLE = yes diff --git a/keyboards/underscore33/rev1/keymaps/via/keymap.c b/keyboards/underscore33/rev1/keymaps/via/keymap.c new file mode 100644 index 0000000000..03e209fd15 --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2020 tominabox1 + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_33_split_space( + 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_ENT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LCTL, KC_LALT, KC_SPACE, KC_RGUI, KC_RALT + ), + + [1] = LAYOUT_33_split_space( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT_33_split_space( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_33_split_space( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + +}; diff --git a/keyboards/underscore33/rev1/keymaps/via/readme.md b/keyboards/underscore33/rev1/keymaps/via/readme.md new file mode 100644 index 0000000000..a63a8342e8 --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/via/readme.md @@ -0,0 +1 @@ +# VIA _33 Rev1 Layout diff --git a/keyboards/underscore33/rev1/keymaps/via/rules.mk b/keyboards/underscore33/rev1/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/underscore33/rev1/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/underscore33/rev1/rev1.c b/keyboards/underscore33/rev1/rev1.c new file mode 100644 index 0000000000..4f763dbb49 --- /dev/null +++ b/keyboards/underscore33/rev1/rev1.c @@ -0,0 +1,16 @@ +/* Copyright 2020 tominabox1 + * + * 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 "rev1.h" diff --git a/keyboards/underscore33/underscore33.h b/keyboards/underscore33/rev1/rev1.h similarity index 60% rename from keyboards/underscore33/underscore33.h rename to keyboards/underscore33/rev1/rev1.h index 5c774cfa85..12cc7d9fd8 100644 --- a/keyboards/underscore33/underscore33.h +++ b/keyboards/underscore33/rev1/rev1.h @@ -1,3 +1,18 @@ +/* Copyright 2020 tominabox1 + * + * 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 . + */ #pragma once #include "quantum.h" diff --git a/keyboards/underscore33/rev1/rules.mk b/keyboards/underscore33/rev1/rules.mk new file mode 100644 index 0000000000..32981133b2 --- /dev/null +++ b/keyboards/underscore33/rev1/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/underscore33/rev2/config.h b/keyboards/underscore33/rev2/config.h new file mode 100644 index 0000000000..0e965de231 --- /dev/null +++ b/keyboards/underscore33/rev2/config.h @@ -0,0 +1,62 @@ +/* Copyright 2020 tominabox1 + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x7431 +#define PRODUCT_ID 0x3302 // _33 rev2 +#define DEVICE_VER 0x0002 +#define MANUFACTURER tominabox1 +#define PRODUCT underscore33 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 10 + +/* + * 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 { C4, B0, B1, B2 } +#define MATRIX_COL_PINS { C5, C6, C7, B7, B6, B5, B4, B3, C2, D0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN D6 + #define RGBLED_NUM 12 + #define RGBLIGHT_ANIMATIONS +#endif + diff --git a/keyboards/underscore33/info.json b/keyboards/underscore33/rev2/info.json similarity index 90% rename from keyboards/underscore33/info.json rename to keyboards/underscore33/rev2/info.json index 4e97a63802..567270ec72 100644 --- a/keyboards/underscore33/info.json +++ b/keyboards/underscore33/rev2/info.json @@ -10,7 +10,7 @@ }, "LAYOUT_33_split_space": { - "layout": [{"label":"Q", "x":0, "y":0}, {"label":"W", "x":1, "y":0}, {"label":"E", "x":2, "y":0}, {"label":"R", "x":3, "y":0}, {"label":"T", "x":4, "y":0}, {"label":"Y", "x":5, "y":0}, {"label":"U", "x":6, "y":0}, {"label":"I", "x":7, "y":0}, {"label":"O", "x":8, "y":0}, {"label":"P", "x":9, "y":0},{"label":"A", "x":0, "y":1}, {"label":"S", "x":1, "y":1}, {"label":"D", "x":2, "y":1}, {"label":"F", "x":3, "y":1}, {"label":"G", "x":4, "y":1}, {"label":"H", "x":5, "y":1}, {"label":"J", "x":6, "y":1}, {"label":"K", "x":7, "y":1}, {"label":"L", "x":8, "y":1}, {"label":";", "x":9, "y":1}, {"label":"Z", "x":0, "y":2}, {"label":"X", "x":1, "y":2}, {"label":"C", "x":2, "y":2}, {"label":"V", "x":3, "y":2}, {"label":"B", "x":4, "y":2}, {"label":"N", "x":5, "y":2}, {"label":"M", "x":6, "y":2}, {"label":"<", "x":7, "y":2}, {"label":">", "x":8, "y":2}, {"label":"?", "x":9, "y":2}, {"label":"", "x":0.65, "y":3, "w":1.25}, {"label":"", "x":1.9, "y":3, "w":2.25}, {"label":"", "x":4.15, "y":3, "w":1.75}, {"label":"", "x":5.9, "y":3, "w":2.25}, {"label":"", "x":8.15, "y":3, "w":1.25}] + "layout": [{"label":"Q", "x":0, "y":0}, {"label":"W", "x":1, "y":0}, {"label":"E", "x":2, "y":0}, {"label":"R", "x":3, "y":0}, {"label":"T", "x":4, "y":0}, {"label":"Y", "x":5, "y":0}, {"label":"U", "x":6, "y":0}, {"label":"I", "x":7, "y":0}, {"label":"O", "x":8, "y":0}, {"label":"P", "x":9, "y":0},{"label":"A", "x":0, "y":1}, {"label":"S", "x":1, "y":1}, {"label":"D", "x":2, "y":1}, {"label":"F", "x":3, "y":1}, {"label":"G", "x":4, "y":1}, {"label":"H", "x":5, "y":1}, {"label":"J", "x":6, "y":1}, {"label":"K", "x":7, "y":1}, {"label":"L", "x":8, "y":1}, {"label":";", "x":9, "y":1}, {"label":"Z", "x":0, "y":2}, {"label":"X", "x":1, "y":2}, {"label":"C", "x":2, "y":2}, {"label":"V", "x":3, "y":2}, {"label":"B", "x":4, "y":2}, {"label":"N", "x":5, "y":2}, {"label":"M", "x":6, "y":2}, {"label":"<", "x":7, "y":2}, {"label":">", "x":8, "y":2}, {"label":"?", "x":9, "y":2}, {"label":"", "x":0.65, "y":3, "w":1}, {"label":"", "x":1.65, "y":3, "w":1.25}, {"label":"", "x":2.9, "y":3, "w":2.25}, {"label":"", "x":5.15, "y":3, "w":2}, {"label":"", "x":7.15, "y":3, "w":1.25}, {"label":"", "x":8.4, "y":3, "w":1}] } } } diff --git a/keyboards/underscore33/rev2/keymaps/default/config.h b/keyboards/underscore33/rev2/keymaps/default/config.h new file mode 100644 index 0000000000..5708a439ac --- /dev/null +++ b/keyboards/underscore33/rev2/keymaps/default/config.h @@ -0,0 +1,5 @@ +#pragma once + +/* Combos */ +#define COMBO_COUNT 5 +#define COMBO_TERM 50 diff --git a/keyboards/underscore33/keymaps/default/keymap.c b/keyboards/underscore33/rev2/keymaps/default/keymap.c similarity index 50% rename from keyboards/underscore33/keymaps/default/keymap.c rename to keyboards/underscore33/rev2/keymaps/default/keymap.c index 8fab8623a2..32a6f48639 100644 --- a/keyboards/underscore33/keymaps/default/keymap.c +++ b/keyboards/underscore33/rev2/keymaps/default/keymap.c @@ -1,3 +1,18 @@ +/* Copyright 2020 tominabox1 + * + * 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 QMK_KEYBOARD_H enum layers{ @@ -11,6 +26,7 @@ enum custom_keycodes{ }; #define KC_NUM_SPC LT(_NUM_SYM, KC_SPC) +#define KC_NAV_ENT LT(_NAV, KC_ENT) #define KC_GA LGUI_T(KC_A) #define KC_AS LALT_T(KC_S) #define KC_CD LCTL_T(KC_D) @@ -20,25 +36,51 @@ enum custom_keycodes{ #define KC_AL RALT_T(KC_L) #define KC_GSCLN RGUI_T(KC_SCLN) +enum combo_events { + COMBO_BSPC, + COMBO_NUMBAK, + COMBO_TAB, + COMBO_ESC, + COMBO_DEL, +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_33_split_space( KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_GA, KC_AS, KC_CD, KC_SF, KC_G, KC_H, KC_SJ, KC_CK, KC_AL, KC_GSCLN, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, - KC_LCTL, KC_LALT, KC_NUM_SPC, MO(_NAV), KC_RGUI + KC_LCTL, KC_LALT, KC_NAV_ENT, KC_NUM_SPC, KC_RGUI, KC_RCTL ), [_NUM_SYM] = LAYOUT_33_split_space( KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS, KC_BSLS, KC_LCBR, KC_LBRC, KC_LPRN, KC_UNDS, KC_RPRN, KC_RBRC, KC_RCBR, KC_DOT, KC_GRV, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [_NAV] = LAYOUT_33_split_space( RESET, RGBRST, AG_NORM, AG_SWAP, DEBUG, KC_GRV, KC_PGDN, KC_UP, KC_PGUP, KC_SCLN, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_BSLS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), }; + + +#ifdef COMBO_ENABLE +const uint16_t PROGMEM combo_bspc[] = {KC_O, KC_P, COMBO_END}; +const uint16_t PROGMEM combo_numbak[] = {KC_0, KC_9, COMBO_END}; +const uint16_t PROGMEM combo_tab[] = {KC_Q, KC_W, COMBO_END}; +const uint16_t PROGMEM combo_esc[] = {KC_E, KC_W, COMBO_END}; +const uint16_t PROGMEM combo_del[] = {KC_MINS, KC_EQL, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [COMBO_BSPC] = COMBO(combo_bspc,KC_BSPC), + [COMBO_NUMBAK] = COMBO(combo_numbak,KC_BSPC), + [COMBO_TAB] = COMBO(combo_tab,KC_TAB), + [COMBO_ESC] = COMBO(combo_esc,KC_ESC), + [COMBO_DEL] = COMBO(combo_del,KC_DEL), + +}; +#endif diff --git a/keyboards/underscore33/rev2/keymaps/default/readme.md b/keyboards/underscore33/rev2/keymaps/default/readme.md new file mode 100644 index 0000000000..fb48598891 --- /dev/null +++ b/keyboards/underscore33/rev2/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# Default _33 Rev2 Layout + +This is the recommended default layout. diff --git a/keyboards/underscore33/rev2/keymaps/default/rules.mk b/keyboards/underscore33/rev2/keymaps/default/rules.mk new file mode 100644 index 0000000000..ab1e438182 --- /dev/null +++ b/keyboards/underscore33/rev2/keymaps/default/rules.mk @@ -0,0 +1 @@ +COMBO_ENABLE = yes diff --git a/keyboards/underscore33/rev2/keymaps/via/keymap.c b/keyboards/underscore33/rev2/keymaps/via/keymap.c new file mode 100644 index 0000000000..9464b0cdb8 --- /dev/null +++ b/keyboards/underscore33/rev2/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2020 tominabox1 + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_33_split_space( + 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_ENT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LCTL, KC_LALT, KC_SPACE, KC_SPACE, KC_RGUI, KC_RALT + ), + + [1] = LAYOUT_33_split_space( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT_33_split_space( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_33_split_space( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + +}; diff --git a/keyboards/underscore33/rev2/keymaps/via/readme.md b/keyboards/underscore33/rev2/keymaps/via/readme.md new file mode 100644 index 0000000000..7a6d4cf2f7 --- /dev/null +++ b/keyboards/underscore33/rev2/keymaps/via/readme.md @@ -0,0 +1 @@ +# VIA Layout diff --git a/keyboards/underscore33/rev2/keymaps/via/rules.mk b/keyboards/underscore33/rev2/keymaps/via/rules.mk new file mode 100644 index 0000000000..16d33cd89f --- /dev/null +++ b/keyboards/underscore33/rev2/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes + diff --git a/keyboards/underscore33/rev2/rev2.c b/keyboards/underscore33/rev2/rev2.c new file mode 100644 index 0000000000..e89b2938f9 --- /dev/null +++ b/keyboards/underscore33/rev2/rev2.c @@ -0,0 +1,16 @@ +/* Copyright 2020 tominabox1 + * + * 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 "rev2.h" diff --git a/keyboards/underscore33/rev2/rev2.h b/keyboards/underscore33/rev2/rev2.h new file mode 100644 index 0000000000..34e6e6b7a9 --- /dev/null +++ b/keyboards/underscore33/rev2/rev2.h @@ -0,0 +1,46 @@ +/* Copyright 2020 tominabox1 + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +#define LAYOUT_33_big_space( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ + K31, K34, K38 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29 }, \ + { XXX, K31, XXX, XXX, K34, XXX, XXX, XXX, K38, XXX } \ +} + +#define LAYOUT_33_split_space( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ + K31, K32, K33, K35, K37, K38 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29 }, \ + { XXX, K31, K32, K33, XXX, K35, XXX, K37, K38, XXX } \ +} diff --git a/keyboards/underscore33/rev2/rules.mk b/keyboards/underscore33/rev2/rules.mk new file mode 100644 index 0000000000..d226af58ed --- /dev/null +++ b/keyboards/underscore33/rev2/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + diff --git a/keyboards/underscore33/rules.mk b/keyboards/underscore33/rules.mk index a5c12fdadb..b86f18e114 100644 --- a/keyboards/underscore33/rules.mk +++ b/keyboards/underscore33/rules.mk @@ -1,25 +1 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu - -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# 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 = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -TAP_DANCE_ENABLE = no +DEFAULT_FOLDER = underscore33/rev1 diff --git a/keyboards/underscore33/underscore33.c b/keyboards/underscore33/underscore33.c deleted file mode 100644 index 9d690be9ab..0000000000 --- a/keyboards/underscore33/underscore33.c +++ /dev/null @@ -1 +0,0 @@ -#include "underscore33.h" diff --git a/keyboards/v60_type_r/rules.mk b/keyboards/v60_type_r/rules.mk index 94205df11f..16ecb7df47 100644 --- a/keyboards/v60_type_r/rules.mk +++ b/keyboards/v60_type_r/rules.mk @@ -32,6 +32,6 @@ 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 -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes LAYOUTS = 60_ansi 60_iso diff --git a/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.h b/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.h deleted file mode 100644 index 241d566afa..0000000000 --- a/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.h +++ /dev/null @@ -1,896 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -#ifndef _BOARD_H -#define _BOARD_H - -/* - * Setup for STMicroelectronics STM32 Nucleo32-F042K6 board. - */ - -/* - * Board identifier. - */ -#define BOARD_GENERIC_STM32_F042X6 -#define BOARD_NAME "Vinta PCB" - -/* - * Board oscillators-related settings. - * NOTE: LSE not fitted. - * NOTE: HSE not fitted. - */ -#if !defined(STM32_LSECLK) -#define STM32_LSECLK 0U -#endif - -#define STM32_LSEDRV (3U << 3U) - -#if !defined(STM32_HSECLK) -#define STM32_HSECLK 0U -#endif - -/* - * MCU type as defined in the ST header. - */ -#define STM32F042x6 - -/* - * IO pins assignments. - */ -#define GPIOA_PIN0 0U -#define GPIOA_PIN1 1U -#define GPIOA_PIN2 2U -#define GPIOA_PIN3 3U -#define GPIOA_PIN4 4U -#define GPIOA_PIN5 5U -#define GPIOA_PIN6 6U -#define GPIOA_PIN7 7U -#define GPIOA_PIN8 8U -#define GPIOA_PIN9 9U -#define GPIOA_PIN10 10U -#define GPIOA_PIN11 11U -#define GPIOA_PIN12 12U -#define GPIOA_PIN13 13U -#define GPIOA_PIN14 14U -#define GPIOA_PIN15 15U - -#define GPIOB_PIN0 0U -#define GPIOB_PIN1 1U -#define GPIOB_PIN2 2U -#define GPIOB_PIN3 3U -#define GPIOB_PIN4 4U -#define GPIOB_PIN5 5U -#define GPIOB_PIN6 6U -#define GPIOB_PIN7 7U -#define GPIOB_PIN8 8U -#define GPIOB_PIN9 9U -#define GPIOB_PIN10 10U -#define GPIOB_PIN11 11U -#define GPIOB_PIN12 12U -#define GPIOB_PIN13 13U -#define GPIOB_PIN14 14U -#define GPIOB_PIN15 15U - -#define GPIOC_PIN0 0U -#define GPIOC_PIN1 1U -#define GPIOC_PIN2 2U -#define GPIOC_PIN3 3U -#define GPIOC_PIN4 4U -#define GPIOC_PIN5 5U -#define GPIOC_PIN6 6U -#define GPIOC_PIN7 7U -#define GPIOC_PIN8 8U -#define GPIOC_PIN9 9U -#define GPIOC_PIN10 10U -#define GPIOC_PIN11 11U -#define GPIOC_PIN12 12U -#define GPIOC_PIN13 13U -#define GPIOC_PIN14 14U -#define GPIOC_PIN15 15U - -#define GPIOD_PIN0 0U -#define GPIOD_PIN1 1U -#define GPIOD_PIN2 2U -#define GPIOD_PIN3 3U -#define GPIOD_PIN4 4U -#define GPIOD_PIN5 5U -#define GPIOD_PIN6 6U -#define GPIOD_PIN7 7U -#define GPIOD_PIN8 8U -#define GPIOD_PIN9 9U -#define GPIOD_PIN10 10U -#define GPIOD_PIN11 11U -#define GPIOD_PIN12 12U -#define GPIOD_PIN13 13U -#define GPIOD_PIN14 14U -#define GPIOD_PIN15 15U - -#define GPIOE_PIN0 0U -#define GPIOE_PIN1 1U -#define GPIOE_PIN2 2U -#define GPIOE_PIN3 3U -#define GPIOE_PIN4 4U -#define GPIOE_PIN5 5U -#define GPIOE_PIN6 6U -#define GPIOE_PIN7 7U -#define GPIOE_PIN8 8U -#define GPIOE_PIN9 9U -#define GPIOE_PIN10 10U -#define GPIOE_PIN11 11U -#define GPIOE_PIN12 12U -#define GPIOE_PIN13 13U -#define GPIOE_PIN14 14U -#define GPIOE_PIN15 15U - -#define GPIOF_PIN0 0U -#define GPIOF_PIN1 1U -#define GPIOF_PIN2 2U -#define GPIOF_PIN3 3U -#define GPIOF_PIN4 4U -#define GPIOF_PIN5 5U -#define GPIOF_PIN6 6U -#define GPIOF_PIN7 7U -#define GPIOF_PIN8 8U -#define GPIOF_PIN9 9U -#define GPIOF_PIN10 10U -#define GPIOF_PIN11 11U -#define GPIOF_PIN12 12U -#define GPIOF_PIN13 13U -#define GPIOF_PIN14 14U -#define GPIOF_PIN15 15U - -/* - * IO lines assignments. - */ - -#define LINE_BOOT0 PAL_LINE(GPIOB, 8U) -#define LINE_SWCLK PAL_LINE(GPIOA, 14U) -#define LINE_SWDIO PAL_LINE(GPIOA, 13U) - -/* - * I/O ports initial setup, this configuration is established soon after reset - * in the initialization code. - * Please refer to the STM32 Reference Manual for details. - */ -#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) -#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) -#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) -#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) -#define PIN_ODR_LOW(n) (0U << (n)) -#define PIN_ODR_HIGH(n) (1U << (n)) -#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) -#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) -#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) -#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) -#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) -#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) -#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) -#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) -#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) -#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) - -/* - * GPIOA setup: - * - * PA0 - COL5 - * PA1 - COL4 - * PA2 - COL3 - * PA3 - COL2 - * PA4 - COL1 - * PA5 - COL0 - * PA6 - ROW4 - * PA7 - ROW3 - * PA8 - NC - * PA9 - ROW1 - * PA10 - ROW0 - * PA11 - USB_DM - * PA12 - USB_DP - * PA13 - COL15/SWDIO (for now, COL15) - * PA14 - COL14/SWCLK (for now, COL14) - * PA15 - COL13 - */ -#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | \ - PIN_MODE_INPUT(GPIOA_PIN1) | \ - PIN_MODE_INPUT(GPIOA_PIN2) | \ - PIN_MODE_INPUT(GPIOA_PIN3) | \ - PIN_MODE_INPUT(GPIOA_PIN4) | \ - PIN_MODE_INPUT(GPIOA_PIN5) | \ - PIN_MODE_INPUT(GPIOA_PIN6) | \ - PIN_MODE_INPUT(GPIOA_PIN7) | \ - PIN_MODE_INPUT(GPIOA_PIN8) | \ - PIN_MODE_INPUT(GPIOA_PIN9) | \ - PIN_MODE_INPUT(GPIOA_PIN10) | \ - PIN_MODE_INPUT(GPIOA_PIN11) | \ - PIN_MODE_INPUT(GPIOA_PIN12) | \ - PIN_MODE_INPUT(GPIOA_PIN13) | \ - PIN_MODE_INPUT(GPIOA_PIN14) | \ - PIN_MODE_INPUT(GPIOA_PIN15)) -#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) -#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ - PIN_OSPEED_HIGH(GPIOA_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN15)) -#define VAL_GPIOA_PUPDR (PIN_PUPDR_PULLUP(GPIOA_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ - PIN_PUPDR_FLOATING(GPIOA_PIN11) | \ - PIN_PUPDR_FLOATING(GPIOA_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN15)) -#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_PIN0) | \ - PIN_ODR_HIGH(GPIOA_PIN1) | \ - PIN_ODR_HIGH(GPIOA_PIN2) | \ - PIN_ODR_HIGH(GPIOA_PIN3) | \ - PIN_ODR_HIGH(GPIOA_PIN4) | \ - PIN_ODR_HIGH(GPIOA_PIN5) | \ - PIN_ODR_HIGH(GPIOA_PIN6) | \ - PIN_ODR_HIGH(GPIOA_PIN7) | \ - PIN_ODR_HIGH(GPIOA_PIN8) | \ - PIN_ODR_HIGH(GPIOA_PIN9) | \ - PIN_ODR_HIGH(GPIOA_PIN10) | \ - PIN_ODR_HIGH(GPIOA_PIN11) | \ - PIN_ODR_HIGH(GPIOA_PIN12) | \ - PIN_ODR_HIGH(GPIOA_PIN13) | \ - PIN_ODR_HIGH(GPIOA_PIN14) | \ - PIN_ODR_HIGH(GPIOA_PIN15)) -#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_PIN0, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN7, 0U)) -#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOA_PIN15, 0U)) - -/* - * GPIOB setup: - * - * PB0 - ROW2 - * PB1 - RGB_D - * PB2 - PIN2 (input pullup). - * PB3 - COL12 - * PB4 - COL11 - * PB5 - COL10 - * PB6 - COL9 - * PB7 - COL8 - * PB8 - BOOT0 (set as output for STM32F042) - * PB9 - PIN9 (input pullup). - * PB10 - PIN10 (input pullup). - * PB11 - PIN11 (input pullup). - * PB12 - PIN12 (input pullup). - * PB13 - PIN13 (input pullup). - * PB14 - PIN14 (input pullup). - * PB15 - PIN15 (input pullup). - */ -#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ - PIN_MODE_OUTPUT(GPIOB_PIN1) | \ - PIN_MODE_INPUT(GPIOB_PIN2) | \ - PIN_MODE_INPUT(GPIOB_PIN3) | \ - PIN_MODE_INPUT(GPIOB_PIN4) | \ - PIN_MODE_INPUT(GPIOB_PIN5) | \ - PIN_MODE_INPUT(GPIOB_PIN6) | \ - PIN_MODE_INPUT(GPIOB_PIN7) | \ - PIN_MODE_OUTPUT(GPIOB_PIN8) | \ - PIN_MODE_INPUT(GPIOB_PIN9) | \ - PIN_MODE_INPUT(GPIOB_PIN10) | \ - PIN_MODE_INPUT(GPIOB_PIN11) | \ - PIN_MODE_INPUT(GPIOB_PIN12) | \ - PIN_MODE_INPUT(GPIOB_PIN13) | \ - PIN_MODE_INPUT(GPIOB_PIN14) | \ - PIN_MODE_INPUT(GPIOB_PIN15)) -#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) -#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ - PIN_OSPEED_HIGH(GPIOB_PIN1) | \ - PIN_OSPEED_HIGH(GPIOB_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ - PIN_OSPEED_HIGH(GPIOB_PIN9) | \ - PIN_OSPEED_HIGH(GPIOB_PIN10) | \ - PIN_OSPEED_HIGH(GPIOB_PIN11) | \ - PIN_OSPEED_HIGH(GPIOB_PIN12) | \ - PIN_OSPEED_HIGH(GPIOB_PIN13) | \ - PIN_OSPEED_HIGH(GPIOB_PIN14) | \ - PIN_OSPEED_HIGH(GPIOB_PIN15)) -#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ - PIN_PUPDR_FLOATING(GPIOB_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ - PIN_PUPDR_PULLDOWN(GPIOB_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN15)) -#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ - PIN_ODR_HIGH(GPIOB_PIN1) | \ - PIN_ODR_HIGH(GPIOB_PIN2) | \ - PIN_ODR_HIGH(GPIOB_PIN3) | \ - PIN_ODR_HIGH(GPIOB_PIN4) | \ - PIN_ODR_HIGH(GPIOB_PIN5) | \ - PIN_ODR_HIGH(GPIOB_PIN6) | \ - PIN_ODR_HIGH(GPIOB_PIN7) | \ - PIN_ODR_HIGH(GPIOB_PIN8) | \ - PIN_ODR_HIGH(GPIOB_PIN9) | \ - PIN_ODR_HIGH(GPIOB_PIN10) | \ - PIN_ODR_HIGH(GPIOB_PIN11) | \ - PIN_ODR_HIGH(GPIOB_PIN12) | \ - PIN_ODR_HIGH(GPIOB_PIN13) | \ - PIN_ODR_HIGH(GPIOB_PIN14) | \ - PIN_ODR_HIGH(GPIOB_PIN15)) -#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN7, 0U)) -#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOB_PIN15, 0U)) - -/* - * GPIOC setup: - * - * PC0 - PIN0 (input pullup). - * PC1 - PIN1 (input pullup). - * PC2 - PIN2 (input pullup). - * PC3 - PIN3 (input pullup). - * PC4 - PIN4 (input pullup). - * PC5 - PIN5 (input pullup). - * PC6 - PIN6 (input pullup). - * PC7 - PIN7 (input pullup). - * PC8 - PIN8 (input pullup). - * PC9 - PIN9 (input pullup). - * PC10 - PIN10 (input pullup). - * PC11 - PIN11 (input pullup). - * PC12 - PIN12 (input pullup). - * PC13 - PIN13 (input pullup). - * PC14 - PIN14 (input pullup). - * PC15 - PIN15 (input pullup). - */ -#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | \ - PIN_MODE_INPUT(GPIOC_PIN1) | \ - PIN_MODE_INPUT(GPIOC_PIN2) | \ - PIN_MODE_INPUT(GPIOC_PIN3) | \ - PIN_MODE_INPUT(GPIOC_PIN4) | \ - PIN_MODE_INPUT(GPIOC_PIN5) | \ - PIN_MODE_INPUT(GPIOC_PIN6) | \ - PIN_MODE_INPUT(GPIOC_PIN7) | \ - PIN_MODE_INPUT(GPIOC_PIN8) | \ - PIN_MODE_INPUT(GPIOC_PIN9) | \ - PIN_MODE_INPUT(GPIOC_PIN10) | \ - PIN_MODE_INPUT(GPIOC_PIN11) | \ - PIN_MODE_INPUT(GPIOC_PIN12) | \ - PIN_MODE_INPUT(GPIOC_PIN13) | \ - PIN_MODE_INPUT(GPIOC_PIN14) | \ - PIN_MODE_INPUT(GPIOC_PIN15)) -#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) -#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_PIN0) | \ - PIN_OSPEED_HIGH(GPIOC_PIN1) | \ - PIN_OSPEED_HIGH(GPIOC_PIN2) | \ - PIN_OSPEED_HIGH(GPIOC_PIN3) | \ - PIN_OSPEED_HIGH(GPIOC_PIN4) | \ - PIN_OSPEED_HIGH(GPIOC_PIN5) | \ - PIN_OSPEED_HIGH(GPIOC_PIN6) | \ - PIN_OSPEED_HIGH(GPIOC_PIN7) | \ - PIN_OSPEED_HIGH(GPIOC_PIN8) | \ - PIN_OSPEED_HIGH(GPIOC_PIN9) | \ - PIN_OSPEED_HIGH(GPIOC_PIN10) | \ - PIN_OSPEED_HIGH(GPIOC_PIN11) | \ - PIN_OSPEED_HIGH(GPIOC_PIN12) | \ - PIN_OSPEED_HIGH(GPIOC_PIN13) | \ - PIN_OSPEED_HIGH(GPIOC_PIN14) | \ - PIN_OSPEED_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN15)) -#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | \ - PIN_ODR_HIGH(GPIOC_PIN1) | \ - PIN_ODR_HIGH(GPIOC_PIN2) | \ - PIN_ODR_HIGH(GPIOC_PIN3) | \ - PIN_ODR_HIGH(GPIOC_PIN4) | \ - PIN_ODR_HIGH(GPIOC_PIN5) | \ - PIN_ODR_HIGH(GPIOC_PIN6) | \ - PIN_ODR_HIGH(GPIOC_PIN7) | \ - PIN_ODR_HIGH(GPIOC_PIN8) | \ - PIN_ODR_HIGH(GPIOC_PIN9) | \ - PIN_ODR_HIGH(GPIOC_PIN10) | \ - PIN_ODR_HIGH(GPIOC_PIN11) | \ - PIN_ODR_HIGH(GPIOC_PIN12) | \ - PIN_ODR_HIGH(GPIOC_PIN13) | \ - PIN_ODR_HIGH(GPIOC_PIN14) | \ - PIN_ODR_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN7, 0U)) -#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOC_PIN15, 0U)) - -/* - * GPIOD setup: - * - * PD0 - PIN0 (input pullup). - * PD1 - PIN1 (input pullup). - * PD2 - PIN2 (input pullup). - * PD3 - PIN3 (input pullup). - * PD4 - PIN4 (input pullup). - * PD5 - PIN5 (input pullup). - * PD6 - PIN6 (input pullup). - * PD7 - PIN7 (input pullup). - * PD8 - PIN8 (input pullup). - * PD9 - PIN9 (input pullup). - * PD10 - PIN10 (input pullup). - * PD11 - PIN11 (input pullup). - * PD12 - PIN12 (input pullup). - * PD13 - PIN13 (input pullup). - * PD14 - PIN14 (input pullup). - * PD15 - PIN15 (input pullup). - */ -#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ - PIN_MODE_INPUT(GPIOD_PIN1) | \ - PIN_MODE_INPUT(GPIOD_PIN2) | \ - PIN_MODE_INPUT(GPIOD_PIN3) | \ - PIN_MODE_INPUT(GPIOD_PIN4) | \ - PIN_MODE_INPUT(GPIOD_PIN5) | \ - PIN_MODE_INPUT(GPIOD_PIN6) | \ - PIN_MODE_INPUT(GPIOD_PIN7) | \ - PIN_MODE_INPUT(GPIOD_PIN8) | \ - PIN_MODE_INPUT(GPIOD_PIN9) | \ - PIN_MODE_INPUT(GPIOD_PIN10) | \ - PIN_MODE_INPUT(GPIOD_PIN11) | \ - PIN_MODE_INPUT(GPIOD_PIN12) | \ - PIN_MODE_INPUT(GPIOD_PIN13) | \ - PIN_MODE_INPUT(GPIOD_PIN14) | \ - PIN_MODE_INPUT(GPIOD_PIN15)) -#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) -#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_HIGH(GPIOD_PIN0) | \ - PIN_OSPEED_HIGH(GPIOD_PIN1) | \ - PIN_OSPEED_HIGH(GPIOD_PIN2) | \ - PIN_OSPEED_HIGH(GPIOD_PIN3) | \ - PIN_OSPEED_HIGH(GPIOD_PIN4) | \ - PIN_OSPEED_HIGH(GPIOD_PIN5) | \ - PIN_OSPEED_HIGH(GPIOD_PIN6) | \ - PIN_OSPEED_HIGH(GPIOD_PIN7) | \ - PIN_OSPEED_HIGH(GPIOD_PIN8) | \ - PIN_OSPEED_HIGH(GPIOD_PIN9) | \ - PIN_OSPEED_HIGH(GPIOD_PIN10) | \ - PIN_OSPEED_HIGH(GPIOD_PIN11) | \ - PIN_OSPEED_HIGH(GPIOD_PIN12) | \ - PIN_OSPEED_HIGH(GPIOD_PIN13) | \ - PIN_OSPEED_HIGH(GPIOD_PIN14) | \ - PIN_OSPEED_HIGH(GPIOD_PIN15)) -#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOD_PIN15)) -#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ - PIN_ODR_HIGH(GPIOD_PIN1) | \ - PIN_ODR_HIGH(GPIOD_PIN2) | \ - PIN_ODR_HIGH(GPIOD_PIN3) | \ - PIN_ODR_HIGH(GPIOD_PIN4) | \ - PIN_ODR_HIGH(GPIOD_PIN5) | \ - PIN_ODR_HIGH(GPIOD_PIN6) | \ - PIN_ODR_HIGH(GPIOD_PIN7) | \ - PIN_ODR_HIGH(GPIOD_PIN8) | \ - PIN_ODR_HIGH(GPIOD_PIN9) | \ - PIN_ODR_HIGH(GPIOD_PIN10) | \ - PIN_ODR_HIGH(GPIOD_PIN11) | \ - PIN_ODR_HIGH(GPIOD_PIN12) | \ - PIN_ODR_HIGH(GPIOD_PIN13) | \ - PIN_ODR_HIGH(GPIOD_PIN14) | \ - PIN_ODR_HIGH(GPIOD_PIN15)) -#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN7, 0U)) -#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOD_PIN15, 0U)) - -/* - * GPIOE setup: - * - * PE0 - PIN0 (input pullup). - * PE1 - PIN1 (input pullup). - * PE2 - PIN2 (input pullup). - * PE3 - PIN3 (input pullup). - * PE4 - PIN4 (input pullup). - * PE5 - PIN5 (input pullup). - * PE6 - PIN6 (input pullup). - * PE7 - PIN7 (input pullup). - * PE8 - PIN8 (input pullup). - * PE9 - PIN9 (input pullup). - * PE10 - PIN10 (input pullup). - * PE11 - PIN11 (input pullup). - * PE12 - PIN12 (input pullup). - * PE13 - PIN13 (input pullup). - * PE14 - PIN14 (input pullup). - * PE15 - PIN15 (input pullup). - */ -#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ - PIN_MODE_INPUT(GPIOE_PIN1) | \ - PIN_MODE_INPUT(GPIOE_PIN2) | \ - PIN_MODE_INPUT(GPIOE_PIN3) | \ - PIN_MODE_INPUT(GPIOE_PIN4) | \ - PIN_MODE_INPUT(GPIOE_PIN5) | \ - PIN_MODE_INPUT(GPIOE_PIN6) | \ - PIN_MODE_INPUT(GPIOE_PIN7) | \ - PIN_MODE_INPUT(GPIOE_PIN8) | \ - PIN_MODE_INPUT(GPIOE_PIN9) | \ - PIN_MODE_INPUT(GPIOE_PIN10) | \ - PIN_MODE_INPUT(GPIOE_PIN11) | \ - PIN_MODE_INPUT(GPIOE_PIN12) | \ - PIN_MODE_INPUT(GPIOE_PIN13) | \ - PIN_MODE_INPUT(GPIOE_PIN14) | \ - PIN_MODE_INPUT(GPIOE_PIN15)) -#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) -#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_HIGH(GPIOE_PIN0) | \ - PIN_OSPEED_HIGH(GPIOE_PIN1) | \ - PIN_OSPEED_HIGH(GPIOE_PIN2) | \ - PIN_OSPEED_HIGH(GPIOE_PIN3) | \ - PIN_OSPEED_HIGH(GPIOE_PIN4) | \ - PIN_OSPEED_HIGH(GPIOE_PIN5) | \ - PIN_OSPEED_HIGH(GPIOE_PIN6) | \ - PIN_OSPEED_HIGH(GPIOE_PIN7) | \ - PIN_OSPEED_HIGH(GPIOE_PIN8) | \ - PIN_OSPEED_HIGH(GPIOE_PIN9) | \ - PIN_OSPEED_HIGH(GPIOE_PIN10) | \ - PIN_OSPEED_HIGH(GPIOE_PIN11) | \ - PIN_OSPEED_HIGH(GPIOE_PIN12) | \ - PIN_OSPEED_HIGH(GPIOE_PIN13) | \ - PIN_OSPEED_HIGH(GPIOE_PIN14) | \ - PIN_OSPEED_HIGH(GPIOE_PIN15)) -#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN15)) -#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ - PIN_ODR_HIGH(GPIOE_PIN1) | \ - PIN_ODR_HIGH(GPIOE_PIN2) | \ - PIN_ODR_HIGH(GPIOE_PIN3) | \ - PIN_ODR_HIGH(GPIOE_PIN4) | \ - PIN_ODR_HIGH(GPIOE_PIN5) | \ - PIN_ODR_HIGH(GPIOE_PIN6) | \ - PIN_ODR_HIGH(GPIOE_PIN7) | \ - PIN_ODR_HIGH(GPIOE_PIN8) | \ - PIN_ODR_HIGH(GPIOE_PIN9) | \ - PIN_ODR_HIGH(GPIOE_PIN10) | \ - PIN_ODR_HIGH(GPIOE_PIN11) | \ - PIN_ODR_HIGH(GPIOE_PIN12) | \ - PIN_ODR_HIGH(GPIOE_PIN13) | \ - PIN_ODR_HIGH(GPIOE_PIN14) | \ - PIN_ODR_HIGH(GPIOE_PIN15)) -#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN7, 0U)) -#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOE_PIN15, 0U)) - -/* - * GPIOF setup: - * - * PF0 - COL7 - * PF1 - COL6 - * PF2 - PIN2 (input pullup). - * PF3 - PIN3 (input pullup). - * PF4 - PIN4 (input pullup). - * PF5 - PIN5 (input pullup). - * PF6 - PIN6 (input pullup). - * PF7 - PIN7 (input pullup). - * PF8 - PIN8 (input pullup). - * PF9 - PIN9 (input pullup). - * PF10 - PIN10 (input pullup). - * PF11 - PIN11 (input pullup). - * PF12 - PIN12 (input pullup). - * PF13 - PIN13 (input pullup). - * PF14 - PIN14 (input pullup). - * PF15 - PIN15 (input pullup). - */ -#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_PIN0) | \ - PIN_MODE_INPUT(GPIOF_PIN1) | \ - PIN_MODE_INPUT(GPIOF_PIN2) | \ - PIN_MODE_INPUT(GPIOF_PIN3) | \ - PIN_MODE_INPUT(GPIOF_PIN4) | \ - PIN_MODE_INPUT(GPIOF_PIN5) | \ - PIN_MODE_INPUT(GPIOF_PIN6) | \ - PIN_MODE_INPUT(GPIOF_PIN7) | \ - PIN_MODE_INPUT(GPIOF_PIN8) | \ - PIN_MODE_INPUT(GPIOF_PIN9) | \ - PIN_MODE_INPUT(GPIOF_PIN10) | \ - PIN_MODE_INPUT(GPIOF_PIN11) | \ - PIN_MODE_INPUT(GPIOF_PIN12) | \ - PIN_MODE_INPUT(GPIOF_PIN13) | \ - PIN_MODE_INPUT(GPIOF_PIN14) | \ - PIN_MODE_INPUT(GPIOF_PIN15)) -#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) -#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOF_PIN1) | \ - PIN_OSPEED_HIGH(GPIOF_PIN2) | \ - PIN_OSPEED_HIGH(GPIOF_PIN3) | \ - PIN_OSPEED_HIGH(GPIOF_PIN4) | \ - PIN_OSPEED_HIGH(GPIOF_PIN5) | \ - PIN_OSPEED_HIGH(GPIOF_PIN6) | \ - PIN_OSPEED_HIGH(GPIOF_PIN7) | \ - PIN_OSPEED_HIGH(GPIOF_PIN8) | \ - PIN_OSPEED_HIGH(GPIOF_PIN9) | \ - PIN_OSPEED_HIGH(GPIOF_PIN10) | \ - PIN_OSPEED_HIGH(GPIOF_PIN11) | \ - PIN_OSPEED_HIGH(GPIOF_PIN12) | \ - PIN_OSPEED_HIGH(GPIOF_PIN13) | \ - PIN_OSPEED_HIGH(GPIOF_PIN14) | \ - PIN_OSPEED_HIGH(GPIOF_PIN15)) -#define VAL_GPIOF_PUPDR (PIN_PUPDR_PULLUP(GPIOF_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOF_PIN15)) -#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_PIN0) | \ - PIN_ODR_HIGH(GPIOF_PIN1) | \ - PIN_ODR_HIGH(GPIOF_PIN2) | \ - PIN_ODR_HIGH(GPIOF_PIN3) | \ - PIN_ODR_HIGH(GPIOF_PIN4) | \ - PIN_ODR_HIGH(GPIOF_PIN5) | \ - PIN_ODR_HIGH(GPIOF_PIN6) | \ - PIN_ODR_HIGH(GPIOF_PIN7) | \ - PIN_ODR_HIGH(GPIOF_PIN8) | \ - PIN_ODR_HIGH(GPIOF_PIN9) | \ - PIN_ODR_HIGH(GPIOF_PIN10) | \ - PIN_ODR_HIGH(GPIOF_PIN11) | \ - PIN_ODR_HIGH(GPIOF_PIN12) | \ - PIN_ODR_HIGH(GPIOF_PIN13) | \ - PIN_ODR_HIGH(GPIOF_PIN14) | \ - PIN_ODR_HIGH(GPIOF_PIN15)) -#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_PIN0, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN1, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN7, 0U)) -#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ - PIN_AFIO_AF(GPIOF_PIN15, 0U)) - -#if !defined(_FROM_ASM_) -#ifdef __cplusplus -extern "C" { -#endif - void boardInit(void); -#ifdef __cplusplus -} -#endif -#endif /* _FROM_ASM_ */ - -#endif /* _BOARD_H */ diff --git a/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.mk b/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.mk deleted file mode 100644 index bbeb5bbff7..0000000000 --- a/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F042X6/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F042X6 diff --git a/keyboards/vinta/bootloader_defs.h b/keyboards/vinta/bootloader_defs.h deleted file mode 100644 index 4994be9c24..0000000000 --- a/keyboards/vinta/bootloader_defs.h +++ /dev/null @@ -1,7 +0,0 @@ -/* Address for jumping to bootloader on STM32 chips. */ -/* It is chip dependent, the correct number can be looked up here: - * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - * This also requires a patch to chibios: - * /tmk_core/tool/chibios/ch-bootloader-jump.patch - */ -#define STM32_BOOTLOADER_ADDRESS 0x1FFFC400 \ No newline at end of file diff --git a/keyboards/vitamins_included/rules.mk b/keyboards/vitamins_included/rules.mk index 3eb3a1c306..c95ae27ecf 100644 --- a/keyboards/vitamins_included/rules.mk +++ b/keyboards/vitamins_included/rules.mk @@ -25,4 +25,4 @@ LAYOUTS = ortho_4x12 DEFAULT_FOLDER = vitamins_included/rev2 -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/whitefox/bootloader_defs.h b/keyboards/whitefox/bootloader_defs.h deleted file mode 100644 index c67153be60..0000000000 --- a/keyboards/whitefox/bootloader_defs.h +++ /dev/null @@ -1 +0,0 @@ -#define KIIBOHD_BOOTLOADER diff --git a/keyboards/whitefox/rules.mk b/keyboards/whitefox/rules.mk index 14507e9dd2..c3621ebd1d 100644 --- a/keyboards/whitefox/rules.mk +++ b/keyboards/whitefox/rules.mk @@ -1,17 +1,8 @@ # MCU name MCU = MK20DX256 -# Linker script to use -# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -# - NOTE: a custom ld script is needed for EEPROM on Teensy LC -# - LDSCRIPT = -# - MKL26Z64 for Teensy LC -# - MK20DX128 for Teensy 3.0 -# - MK20DX256 for Teensy 3.1 and 3.2 -# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader -# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader -MCU_LDSCRIPT = MK20DX256BLDR8 +# Bootloader selection +BOOTLOADER = kiibohd # Board: it should exist either in /os/hal/boards/ # or /boards @@ -22,11 +13,6 @@ MCU_LDSCRIPT = MK20DX256BLDR8 # - MCHCK_K20 for Infinity KB BOARD = IC_TEENSY_3_1 -DFU_ARGS = -d 1c11:b007 -DFU_SUFFIX_ARGS = -p b007 -v 1c11 - -BOOTLOADER = dfu - # Build Options # comment out to disable the options. # diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index 30c9c4c56d..cd3fdd200f 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -26,7 +26,7 @@ defined(RGB_BACKLIGHT_NK65) || \ defined(RGB_BACKLIGHT_NK87) || \ defined(RGB_BACKLIGHT_NEBULA12) || \ - defined(RGB_BACKLIGHT_NEBULA65) || \ + defined(RGB_BACKLIGHT_NEBULA68) || \ defined(RGB_BACKLIGHT_U80_A) || \ defined(RGB_BACKLIGHT_DAWN60) || \ defined(RGB_BACKLIGHT_WT60_B) || \ @@ -50,7 +50,7 @@ #include "wt_rgb_backlight_api.h" #include "wt_rgb_backlight_keycodes.h" -#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NK87) && !defined(RGB_BACKLIGHT_NEBULA65) && !defined(RGB_BACKLIGHT_NEBULA12) +#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NK87) && !defined(RGB_BACKLIGHT_NEBULA68) && !defined(RGB_BACKLIGHT_NEBULA12) #include #include "drivers/avr/i2c_master.h" #else @@ -81,7 +81,7 @@ LED_TYPE g_ws2812_leds[WS2812_LED_TOTAL]; #elif defined(RGB_BACKLIGHT_HS60) #include "drivers/issi/is31fl3733.h" #define BACKLIGHT_LED_COUNT 64 -#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) #include "drivers/issi/is31fl3733.h" #define BACKLIGHT_LED_COUNT 69 #elif defined(RGB_BACKLIGHT_NK87) @@ -227,7 +227,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, K_16, J_16, L_16}, //LA64 }; -#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) || defined(RGB_BACKLIGHT_NK87) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_NK87) // This is a 7-bit address, that gets left-shifted and bit 0 // set to 0 for write, 1 for read (as per I2C protocol) @@ -1061,7 +1061,7 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { {255,255}, {255,255}, {255,255}, {255,255}, {200,196}, {192,192}, {184,196}, {213,74} }; -#elif defined(RGB_BACKLIGHT_NEBULA65) +#elif defined(RGB_BACKLIGHT_NEBULA68) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { // LA1..LA60 {0,0}, {4,16}, {6,31}, {10,47}, {16,0}, {24,16}, {27,31}, {35,47}, {31,0}, {39,16}, {43,31}, {51,47}, @@ -1158,7 +1158,7 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { #elif defined(RGB_BACKLIGHT_M50_A) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { // LA0..LA17 - {255,255}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {255,255}, {255,255}, + {255,255}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {255,255}, {255,255}, {104,0}, {88,0}, {72,0}, {56,0}, {40,0}, {24,0}, {0,0}, {0,16}, {255,255}, // LB0..LB17 {255,255}, {120,0}, {136,0}, {152,0}, {168,0}, {184,0}, {200,0}, {255,255}, {255,255}, @@ -1197,7 +1197,7 @@ void map_led_to_point( uint8_t index, Point *point ) point->x = pgm_read_byte(addr); point->y = pgm_read_byte(addr+1); -#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_M10_C) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NK87) || defined(RGB_BACKLIGHT_NEBULA65) || defined(RGB_BACKLIGHT_NEBULA12) +#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_M10_C) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NK87) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_NEBULA12) return; #endif @@ -1400,7 +1400,7 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { { 4-1, 48-1, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 255, 52-1 }, { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 62-1, 63-1, 64-1, 56-1 } }; -#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) // // LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, LB1, // LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, LB2, @@ -1504,7 +1504,7 @@ void backlight_update_pwm_buffers(void) #elif defined(RGB_BACKLIGHT_HS60) IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, 0 ); IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); -#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) || defined(RGB_BACKLIGHT_NK87) +#elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_NK87) IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, 0 ); IS31FL3733_update_pwm_buffers( ISSI_ADDR_2, 1 ); IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); @@ -1542,7 +1542,7 @@ void backlight_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) { #if defined(RGB_BACKLIGHT_M6_B) IS31FL3218_set_color( index, red, green, blue ); -#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) +#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) IS31FL3733_set_color( index, red, green, blue ); #elif defined(RGB_BACKLIGHT_NK87) // This is done to avoid indicator LEDs being set @@ -1567,7 +1567,7 @@ void backlight_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) { #if defined(RGB_BACKLIGHT_M6_B) IS31FL3218_set_color_all( red, green, blue ); -#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA65) +#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) // This is done to avoid indicator LEDs being set for (int i = 0; i < BACKLIGHT_LED_COUNT; i++) { IS31FL3733_set_color(i, red, green, blue); @@ -1601,7 +1601,7 @@ void backlight_set_key_hit(uint8_t row, uint8_t column) g_any_key_hit = 0; } -#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA65) && !defined(RGB_BACKLIGHT_NEBULA12) && !defined(RGB_BACKLIGHT_NK87) +#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA68) && !defined(RGB_BACKLIGHT_NEBULA12) && !defined(RGB_BACKLIGHT_NK87) // This is (F_CPU/1024) / 20 Hz // = 15625 Hz / 20 Hz // = 781 @@ -1681,7 +1681,7 @@ void backlight_timer_disable(void) { gptStopTimer(&GPTD4); } -#endif //!defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA65) && !defined(RGB_BACKLIGHT_NEBULA12) && !defined(RGB_BACKLIGHT_NK87) +#endif //!defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NEBULA68) && !defined(RGB_BACKLIGHT_NEBULA12) && !defined(RGB_BACKLIGHT_NK87) void backlight_set_suspend_state(bool state) { @@ -1927,7 +1927,7 @@ void backlight_effect_cycle_all(void) for ( int i=0; i + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5753 // "WS" - Worldspawn00 +#define PRODUCT_ID 0x56D9 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Worldspawn00 +#define PRODUCT G4M3Ralpha + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 10 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D4, B4, B5, D1 } +#define MATRIX_COL_PINS { D7, E6, C6, B6, B2, B3, B1, F7, F6, F5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGB_DI_PIN F4 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 5 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/wsk/g4m3ralpha/g4m3ralpha.c b/keyboards/wsk/g4m3ralpha/g4m3ralpha.c new file mode 100644 index 0000000000..66652e3ddc --- /dev/null +++ b/keyboards/wsk/g4m3ralpha/g4m3ralpha.c @@ -0,0 +1,39 @@ +/* Copyright 2020 Worldspawn + * + * 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 "g4m3ralpha.h" + + +void matrix_init_kb(void) { + setPinOutput(D3); + writePinLow(D3); + setPinOutput(D2); + writePinLow(D2); + setPinOutput(D0); + writePinLow(D0); + + matrix_init_user(); +}; + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(D3, led_state.num_lock); + writePin(D0, led_state.caps_lock); + writePin(D2, led_state.scroll_lock); + } + return res; +} diff --git a/keyboards/wsk/g4m3ralpha/g4m3ralpha.h b/keyboards/wsk/g4m3ralpha/g4m3ralpha.h new file mode 100644 index 0000000000..53da90f9e5 --- /dev/null +++ b/keyboards/wsk/g4m3ralpha/g4m3ralpha.h @@ -0,0 +1,32 @@ +/* Copyright 2020 Worldspawn + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ + K30, K31, K32, K33, K35, K37, K38, K39 \ +) { \ + { K00, K01, K02, K03, K04, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29 }, \ + { K30, K31, K32, K33, KC_NO, K35, KC_NO, K37, K38, K39 } \ +} + diff --git a/keyboards/wsk/g4m3ralpha/info.json b/keyboards/wsk/g4m3ralpha/info.json new file mode 100644 index 0000000000..c55bc02262 --- /dev/null +++ b/keyboards/wsk/g4m3ralpha/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "G4M3R Alpha", + "url": "", + "maintainer": "Worldspawn00", + "width": 10, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"label":"!", "x":0.5, "y":0}, {"label":"@", "x":1.5, "y":0}, {"label":"#", "x":2.5, "y":0}, {"label":"$", "x":3.5, "y":0}, {"label":"%", "x":4.5, "y":0}, {"label":"Q", "x":0, "y":1}, {"label":"W", "x":1, "y":1}, {"label":"E", "x":2, "y":1}, {"label":"R", "x":3, "y":1}, {"label":"T", "x":4, "y":1}, {"label":"Y", "x":5, "y":1}, {"label":"U", "x":6, "y":1}, {"label":"I", "x":7, "y":1}, {"label":"O", "x":8, "y":1}, {"label":"P", "x":9, "y":1}, {"label":"A", "x":0, "y":2}, {"label":"S", "x":1, "y":2}, {"label":"D", "x":2, "y":2}, {"label":"F", "x":3, "y":2}, {"label":"G", "x":4, "y":2}, {"label":"H", "x":5, "y":2}, {"label":"J", "x":6, "y":2}, {"label":"K", "x":7, "y":2}, {"label":"L", "x":8, "y":2}, {"label":"Enter", "x":9, "y":2}, {"label":"Z", "x":0.5, "y":3}, {"label":"X", "x":1.5, "y":3}, {"label":"C", "x":2.5, "y":3}, {"label":"V", "x":3.5, "y":3}, {"x":4.5, "y":3, "w":2}, {"label":"B", "x":6.5, "y":3}, {"label":"N", "x":7.5, "y":3}, {"label":"M", "x":8.5, "y":3}] + } + } +} diff --git a/keyboards/wsk/g4m3ralpha/keymaps/default/keymap.c b/keyboards/wsk/g4m3ralpha/keymaps/default/keymap.c new file mode 100644 index 0000000000..54ff0f9df5 --- /dev/null +++ b/keyboards/wsk/g4m3ralpha/keymaps/default/keymap.c @@ -0,0 +1,81 @@ +/* Copyright 2020 Worldspawn + * + * 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 QMK_KEYBOARD_H + +enum g4m3ralpha_layers { + _HOME, + _FN, + _FNCHAR, + _FKEYS, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_HOME] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, + 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_ENT, + LCTL_T(KC_Z), LALT_T(KC_X), LT(_FN, KC_C), LT(_FNCHAR, KC_V), LSFT_T(KC_SPC), RGUI_T(KC_B), RALT_T(KC_N), RCTL_T(KC_M) + ), + + [_FN] = LAYOUT( + KC_6, KC_7, KC_8, KC_9, KC_0, + KC_ESC, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO, + KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BSPC, + KC_LCTL, KC_LALT, KC_TRNS, MO(_FKEYS), LSFT_T(KC_SPC), KC_RGUI, KC_RALT, KC_RCTL + ), + + [_FNCHAR] = LAYOUT( + RGB_TOG, RGB_VAD, RGB_VAI, RGB_MOD, RGB_SPD, + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_GRV, KC_NO, KC_MINS, KC_EQL, KC_BSLS, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, KC_BSPC, + KC_LCTL, KC_LALT, MO(_FKEYS), KC_TRNS, LSFT_T(KC_SPC), KC_COMM, KC_DOT, KC_SLSH + ), + + [_FKEYS] = LAYOUT( + RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_SPI, + 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_NO, KC_NO, KC_NO, KC_NO, KC_DEL, + KC_LCTL, KC_LALT, KC_TRNS, KC_TRNS, LSFT_T(KC_SPC), KC_RGUI, KC_RALT, KC_RCTL + ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case _FN: + writePinHigh(D3); + writePinLow(D2); + break; + case _FNCHAR: + writePinLow(D3); + writePinHigh(D2); + break; + case _FKEYS: + writePinHigh(D3); + writePinHigh(D2); + break; + default: // for any other layers, or the default layer + writePinLow(D3); + writePinLow(D2); + break; + } + return state; +} + +bool led_update_user(led_t led_state) { + writePin(D0, led_state.caps_lock); + return false; +} diff --git a/keyboards/wsk/g4m3ralpha/readme.md b/keyboards/wsk/g4m3ralpha/readme.md new file mode 100644 index 0000000000..ae4f0655f8 --- /dev/null +++ b/keyboards/wsk/g4m3ralpha/readme.md @@ -0,0 +1,19 @@ +# G4M3R Alpha + +![Alpha](https://i.imgur.com/kETSyyg.png) + +A modification based on the 28-key, semi-ortho keyboard designed by PyroL. + +* Keyboard Maintainer: [Worldspawn00](https://www.github.com/Worldspawn00) +* Hardware Supported: G4M3R Alpha PCB, Pro Micro +* Hardware Availability: https://www.etsy.com/shop/WorldspawnsKeebs + +Make example for this keyboard (after setting up your build environment): + + make wsk/g4m3ralpha:default + +Flashing example for this keyboard: + + make wsk/g4m3ralpha:default:flash + +See [build environment setup](https://docs.qmk.fm/install-build-tools) then the [make instructions](https://docs.qmk.fm/faq/build-compile-qmk) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/wsk/g4m3ralpha/rules.mk b/keyboards/wsk/g4m3ralpha/rules.mk new file mode 100644 index 0000000000..676a400f7d --- /dev/null +++ b/keyboards/wsk/g4m3ralpha/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/wsk/sl40/config.h b/keyboards/wsk/sl40/config.h index 523e82b478..0eb6a625ff 100644 --- a/keyboards/wsk/sl40/config.h +++ b/keyboards/wsk/sl40/config.h @@ -1,3 +1,19 @@ +/* Copyright 2020 Worldspawn + * + * 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 . + */ + #pragma once #include "config_common.h" diff --git a/keyboards/wsk/sl40/info.json b/keyboards/wsk/sl40/info.json index 98fd353d75..15b2822b64 100644 --- a/keyboards/wsk/sl40/info.json +++ b/keyboards/wsk/sl40/info.json @@ -7,6 +7,10 @@ "layouts": { "LAYOUT": { "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1}, {"x":12.25, "y":1, "w":1.75}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2, "w":1.25}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3, "w":1.25}, {"x":2.5, "y":3, "w":1.25}, {"x":3.75, "y":3, "w":6.25}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}, {"x":13, "y":3}] + }, + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":1}, {"label":"Q", "x":1, "y":1}, {"label":"W", "x":2, "y":1}, {"label":"E", "x":3, "y":1}, {"label":"R", "x":4, "y":1},{"label":"T", "x":5, "y":1}, {"label":"Y", "x":6, "y":1}, {"label":"U", "x":7, "y":1}, {"label":"I", "x":8, "y":1}, {"label":"O", "x":9, "y":1}, {"label":"P", "x":10, "y":1}, {"label":"{", "x":11, "y":1}, {"label":"}", "x":12, "y":1}, {"label":"BS", "x":13, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.25}, {"label":"A", "x":1.25, "y":2}, {"label":"S", "x":2.25, "y":2}, {"label":"D", "x":3.25, "y":2}, {"label":"F", "x":4.25, "y":2}, {"label":"G", "x":5.25, "y":2}, {"label":"H", "x":6.25, "y":2}, {"label":"J", "x":7.25, "y":2}, {"label":"K", "x":8.25, "y":2}, {"label":"L", "x":9.25, "y":2}, {"label":":", "x":10.25, "y":2}, {"label":"\"", "x":11.25, "y":2}, {"label":"Enter", "x":12.25, "y":2, "w":1.75}, {"label":"Shift", "x":0, "y":3, "w":1.75}, {"label":"Z", "x":1.75, "y":3}, {"label":"X", "x":2.75, "y":3}, {"label":"C", "x":3.75, "y":3}, {"label":"V", "x":4.75, "y":3}, {"label":"B", "x":5.75, "y":3}, {"label":"N", "x":6.75, "y":3}, {"label":"M", "x":7.75, "y":3}, {"label":"<", "x":8.75, "y":3}, {"label":">", "x":9.75, "y":3}, {"label":"?", "x":10.75, "y":3}, {"x":11.75, "y":3}, {"label":"Shift", "x":12.75, "y":3, "w":1.25}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4}, {"x":4.75, "y":4, "w":2.25}, {"x":7, "y":4, "w":2}, {"x":9, "y":4}, {"label":"Alt", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"label":"Menu", "x":12, "y":4}, {"label":"Ctrl", "x":13, "y":4}] } } } + diff --git a/keyboards/wsk/sl40/keymaps/default/keymap.c b/keyboards/wsk/sl40/keymaps/default/keymap.c index 97bf627622..8055d7fd9d 100644 --- a/keyboards/wsk/sl40/keymaps/default/keymap.c +++ b/keyboards/wsk/sl40/keymaps/default/keymap.c @@ -1,19 +1,42 @@ +/* Copyright 2020 Worldspawn + * + * 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 QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_ESC, 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_TAB, 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_UP, MO(1), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + [0] = LAYOUT_all( + KC_ESC, 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_TAB, 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_UP, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_BSPC, MO(2), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), - [1] = LAYOUT( - 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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, RESET, KC_VOLU, KC_VOLD, KC_MPRV, KC_MNXT, KC_TRNS, - KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPLY, KC_MSTP, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END) + [1] = LAYOUT_all( + 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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, RESET, KC_VOLU, KC_VOLD, KC_MPRV, KC_MNXT, KC_TRNS, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPLY, KC_MSTP, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) }; - diff --git a/keyboards/wsk/sl40/keymaps/prototype/keymap.c b/keyboards/wsk/sl40/keymaps/prototype/keymap.c new file mode 100644 index 0000000000..cc5a2eb8a1 --- /dev/null +++ b/keyboards/wsk/sl40/keymaps/prototype/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Worldspawn + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, 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_TAB, 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_UP, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + 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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, RESET, KC_VOLU, KC_VOLD, KC_MPRV, KC_MNXT, KC_TRNS, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPLY, KC_MSTP, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ) +}; + diff --git a/keyboards/wsk/sl40/readme.md b/keyboards/wsk/sl40/readme.md index 5c74b7c2d4..86fab353d3 100644 --- a/keyboards/wsk/sl40/readme.md +++ b/keyboards/wsk/sl40/readme.md @@ -1,6 +1,6 @@ # SL40 -![SL40](https://i.imgur.com/HeeUwVj.png) +![SL40](https://i.imgur.com/DX5Znfd.png) The SL40 is a 14 column staggered 40% keyboard. @@ -12,5 +12,9 @@ Make example for this keyboard (after setting up your build environment): make wsk/sl40:default +Flashing example for this keyboard (after setting up your build environment): + + make wsk/sl40:default:flash + See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/wsk/sl40/sl40.c b/keyboards/wsk/sl40/sl40.c index 22b3bd41ab..6367367afb 100644 --- a/keyboards/wsk/sl40/sl40.c +++ b/keyboards/wsk/sl40/sl40.c @@ -1 +1,17 @@ +/* Copyright 2020 Worldspawn + * + * 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 "sl40.h" diff --git a/keyboards/wsk/sl40/sl40.h b/keyboards/wsk/sl40/sl40.h index 94543c1f64..e0c28629a1 100644 --- a/keyboards/wsk/sl40/sl40.h +++ b/keyboards/wsk/sl40/sl40.h @@ -1,16 +1,45 @@ +/* Copyright 2020 Worldspawn + * + * 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 . + */ + #pragma once #include "quantum.h" #define LAYOUT( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K113, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ - K300, K301, K302, K306, K310, K311, K312, K313 \ + 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, K1d, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, \ + K30, K31, K32, K36, K3a, K3b, K3c, K3d \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, KC_NO, K113 }, \ - { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ - { K300, K301, K302, KC_NO, KC_NO, KC_NO, K306, KC_NO, KC_NO, KC_NO, K310, K311, K312, K313 } \ + { 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, KC_NO, K1d }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d }, \ + { K30, K31, K32, KC_NO, KC_NO, KC_NO, K36, KC_NO, KC_NO, KC_NO, K3a, K3b, K3c, K3d } \ +} + +#define LAYOUT_all( \ + 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, K1d, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, \ + K30, K31, K32, K34, K36, K38, K39, K3a, K3b, K3c, K3d \ +) \ +{ \ + { 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, KC_NO, K1d }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d }, \ + { K30, K31, K32, KC_NO, K34, KC_NO, K36, KC_NO, K38, K39, K3a, K3b, K3c, K3d } \ } diff --git a/keyboards/xd004/v1/config.h b/keyboards/xd004/v1/config.h index f7a262d4c0..b90e10b898 100644 --- a/keyboards/xd004/v1/config.h +++ b/keyboards/xd004/v1/config.h @@ -75,6 +75,6 @@ further optimizations can be done on that side. /* disable action features */ // #define NO_ACTION_ONESHOT // 462 bytes <- this needs to be un-commented out if Link Time Optimization is disabled, otherwise file is too large -// The two below are implicit since we use LINK_TIME_OPTIMIZATION_ENABLE (in rules.mk) +// The two below are implicit since we use LTO_ENABLE (in rules.mk) // #define NO_ACTION_MACRO // #define NO_ACTION_FUNCTION diff --git a/keyboards/xd004/v1/rules.mk b/keyboards/xd004/v1/rules.mk index 18f7d8041c..e9afff93cf 100644 --- a/keyboards/xd004/v1/rules.mk +++ b/keyboards/xd004/v1/rules.mk @@ -27,6 +27,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPACE_CADET_ENABLE = no # Saves about 5% of space: -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes #LAYOUTS = ortho_1x4 diff --git a/keyboards/xd60/info.json b/keyboards/xd60/info.json index c69e8a7887..dbe9a79880 100644 --- a/keyboards/xd60/info.json +++ b/keyboards/xd60/info.json @@ -1,8 +1,8 @@ { - "keyboard_name": "XD60", - "maintainer": "qmk", - "width": 15, - "height": 5, + "keyboard_name": "XD60", + "maintainer": "qmk", + "width": 15, + "height": 5, "layouts": { "LAYOUT_all": { "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"label":"Menu", "x":12, "y":4}, {"label":"Ctrl", "x":13, "y":4}, {"x":14, "y":4}] @@ -12,8 +12,153 @@ "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] }, + "LAYOUT_60_ansi_split_bs_rshift": { + "layout": [ + {"label":"~", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"BS", "x":13, "y":0, "w":1}, + {"label":"BS", "x":14, "y":0, "w":1}, + + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"FN", "x":14, "y":3, "w":1}, + + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Win", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] + }, + "LAYOUT_60_iso": { "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"GUI", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"label":"Space", "x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"GUI", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_iso_split_bs_rshift": { + "layout": [ + {"label":"\u00ac", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"\"", "x":2, "y":0}, + {"label":"\u00a3", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"BS", "x":13, "y":0, "w":1}, + {"label":"BS", "x":14, "y":0, "w":1}, + + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"@", "x":11.75, "y":2}, + {"label":"~", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"|", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"FN", "x":14, "y":3, "w":1}, + + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"AltGr", "x":10, "y":4, "w":1.25}, + {"label":"GUI", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] } } } diff --git a/keyboards/xd60/rev2/rules.mk b/keyboards/xd60/rev2/rules.mk index 1c96804e77..56a01b3c52 100644 --- a/keyboards/xd60/rev2/rules.mk +++ b/keyboards/xd60/rev2/rules.mk @@ -23,7 +23,7 @@ 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. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -LAYOUTS = 60_ansi 60_iso +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_iso_split_bs_rshift diff --git a/keyboards/xd60/rev3/rules.mk b/keyboards/xd60/rev3/rules.mk index 3c7c967124..56a01b3c52 100644 --- a/keyboards/xd60/rev3/rules.mk +++ b/keyboards/xd60/rev3/rules.mk @@ -26,4 +26,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -LAYOUTS = 60_ansi 60_iso +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_iso_split_bs_rshift diff --git a/keyboards/xd60/xd60.h b/keyboards/xd60/xd60.h index 3946138c38..dc6a1080f9 100644 --- a/keyboards/xd60/xd60.h +++ b/keyboards/xd60/xd60.h @@ -46,6 +46,20 @@ inline void xd60_bl_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ } +#define LAYOUT_60_ansi_split_bs_rshift( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \ + 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, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ +) { \ + { 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, KC_NO, K2D }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D } \ +} + #define LAYOUT_60_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, \ @@ -59,3 +73,17 @@ inline void xd60_bl_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D }, \ { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ } + +#define LAYOUT_60_iso_split_bs_rshift( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ + 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, K3D, K3C, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ +) { \ + { 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, KC_NO }, \ + { 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, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D } \ +} diff --git a/keyboards/xd75/info.json b/keyboards/xd75/info.json new file mode 100644 index 0000000000..66b18c500f --- /dev/null +++ b/keyboards/xd75/info.json @@ -0,0 +1,92 @@ +{ + "keyboard_name": "XD75", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x15": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + {"x":5, "y":1}, + {"x":6, "y":1}, + {"x":7, "y":1}, + {"x":8, "y":1}, + {"x":9, "y":1}, + {"x":10, "y":1}, + {"x":11, "y":1}, + {"x":12, "y":1}, + {"x":13, "y":1}, + {"x":14, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":4, "y":2}, + {"x":5, "y":2}, + {"x":6, "y":2}, + {"x":7, "y":2}, + {"x":8, "y":2}, + {"x":9, "y":2}, + {"x":10, "y":2}, + {"x":11, "y":2}, + {"x":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + {"x":5, "y":3}, + {"x":6, "y":3}, + {"x":7, "y":3}, + {"x":8, "y":3}, + {"x":9, "y":3}, + {"x":10, "y":3}, + {"x":11, "y":3}, + {"x":12, "y":3}, + {"x":13, "y":3}, + {"x":14, "y":3}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4}, + {"x":4, "y":4}, + {"x":5, "y":4}, + {"x":6, "y":4}, + {"x":7, "y":4}, + {"x":8, "y":4}, + {"x":9, "y":4}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4} + ] + } + } +} diff --git a/keyboards/xd75/keymaps/4sstylz/keymap.c b/keyboards/xd75/keymaps/4sstylz/keymap.c index d722da9c58..497ca40a98 100644 --- a/keyboards/xd75/keymaps/4sstylz/keymap.c +++ b/keyboards/xd75/keymaps/4sstylz/keymap.c @@ -129,7 +129,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { switch(combo_index) { case SCR_LCK: if (pressed) { diff --git a/keyboards/xd75/keymaps/tomswartz07/keymap.c b/keyboards/xd75/keymaps/tomswartz07/keymap.c new file mode 100644 index 0000000000..175ddb53b2 --- /dev/null +++ b/keyboards/xd75/keymaps/tomswartz07/keymap.c @@ -0,0 +1,125 @@ +/* Copyright 2017 Wunder + * + * 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 QMK_KEYBOARD_H + +enum preonic_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | `~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | - | = | \ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | Del | [ | ] | HOME | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | ESC | A | S | D | F | G | H | J | K | L | ; | ENTER | | | END | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | ' | | | PG UP | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | LGUI | LALT | LOWER | BKSP | ENTER | SPACE | RAISE | LEFT | DOWN | UP | RIGHT | | | PG DN | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_QWERTY] = LAYOUT_ortho_5x15( /* QWERTY */ + 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_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_DEL, KC_LBRC, KC_RBRC, KC_HOME, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, KC_NO, KC_NO, KC_END, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, KC_NO, KC_NO, KC_PGUP, + KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_BSPC, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_RALT, KC_NO, KC_PGDN + ), + +/* LOWER + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | ~ | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | DEL | | | | | | | _ | + | { | } | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | Home | End | | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | Vol - | VOL + | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_LOWER] = LAYOUT_ortho_5x15( /* LOWER */ + KC_TILD, 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_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______, _______ + ), + +/* RAISE + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | `~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | `~ | | | | | | | | | | | Del | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | DEL | | | | | | | - | = | [ | ] | \ | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_RAISE] = LAYOUT_ortho_5x15( /* RAISE */ + 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_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* ADJUST + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | RGB HD | RGB HI | | | | | | | PR SCR | SCR LK | INSERT | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | PREV | PLAY | NEXT | | RGB SD | RGB SI | LEFT | DOWN | UP | RIGHT | | RESET | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | VOL- | MUTE | VOL+ |RGB RMD | RGB VD | RGB VI | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | RGB TG | RGB MD | | | | | | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_ADJUST] = LAYOUT_ortho_5x15( /* ADJUST */ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NLCK, KC_SLSH, + _______, RESET, _______, _______, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_INS, + KC_MPRV, KC_MPLY, KC_MNXT, _______, RGB_SAD, RGB_SAI, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,_______, RESET, _______, _______, _______, + KC_VOLD, KC_MUTE, KC_VOLU, RGB_RMOD,RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/xd84/rules.mk b/keyboards/xd84/rules.mk index cf4e643612..590038622f 100644 --- a/keyboards/xd84/rules.mk +++ b/keyboards/xd84/rules.mk @@ -31,7 +31,7 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes # custom matrix setup CUSTOM_MATRIX = lite diff --git a/keyboards/xd96/rules.mk b/keyboards/xd96/rules.mk index 0c56a5ac00..3ede910c3e 100644 --- a/keyboards/xd96/rules.mk +++ b/keyboards/xd96/rules.mk @@ -31,7 +31,7 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes # custom matrix setup CUSTOM_MATRIX = lite diff --git a/keyboards/yd60mq/config.h b/keyboards/yd60mq/config.h index 26c39a5b02..54aed0c968 100644 --- a/keyboards/yd60mq/config.h +++ b/keyboards/yd60mq/config.h @@ -3,8 +3,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define VENDOR_ID 0x594D // "YM" +#define PRODUCT_ID 0x604D // 60 "M" #define MANUFACTURER YMDK #define PRODUCT YD60MQ #define DESCRIPTION Keyboard diff --git a/keyboards/yd60mq/keymaps/via/keymap.c b/keyboards/yd60mq/keymaps/via/keymap.c new file mode 100644 index 0000000000..ab503ee277 --- /dev/null +++ b/keyboards/yd60mq/keymaps/via/keymap.c @@ -0,0 +1,53 @@ +/* Copyright 2020 rbange https://github.com/rbange + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( + 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_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_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_all( + 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_TRNS, KC_DEL, + KC_TRNS, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + +}; diff --git a/keyboards/yd60mq/keymaps/via/rules.mk b/keyboards/yd60mq/keymaps/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/yd60mq/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/yd60mq/rules.mk b/keyboards/yd60mq/rules.mk index 3e4d8eaa0f..615e4865a9 100644 --- a/keyboards/yd60mq/rules.mk +++ b/keyboards/yd60mq/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ymd75/README.md b/keyboards/ymd75/README.md index 7c4779c9f5..cb2bcbdd51 100644 --- a/keyboards/ymd75/README.md +++ b/keyboards/ymd75/README.md @@ -3,7 +3,10 @@ 75% keyboard from YMDK. YMDK sell the board and name it "YMD75", however revision 1 of the PCB has "MT84" printed on both sides. * Keyboard Maintainer: [Wayne K Jones](github.com/WarmCatUK) -* Hardware Supported: YMD75/MT84 (rev1 and rev2) with the ATmega32a chip. +* Hardware Supported: + - rev1 (ATmega32a) + - rev2 (ATmega32a) + - rev3 (ATmega32u4) * Hardware Availability: Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/ymd75/config.h b/keyboards/ymd75/config.h index 0ea23bc463..69102014fd 100644 --- a/keyboards/ymd75/config.h +++ b/keyboards/ymd75/config.h @@ -23,12 +23,9 @@ along with this program. If not, see . #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D -#define DEVICE_VER 0x0200 #define MANUFACTURER YMDK #define PRODUCT YMD75 / MT84 -#define DESCRIPTION 75% Keyboard - #define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 12 diff --git a/keyboards/ymd75/info.json b/keyboards/ymd75/info.json index a0610afa3f..fe27c0c535 100644 --- a/keyboards/ymd75/info.json +++ b/keyboards/ymd75/info.json @@ -6,7 +6,269 @@ "height": 6, "layouts": { "LAYOUT": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Del", "x":14, "y":0}, {"label":"Fn", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"End", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Page Up", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"Page Down", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"GUI", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1, "y":0}, + {"label":"F2", "x":2, "y":0}, + {"label":"F3", "x":3, "y":0}, + {"label":"F4", "x":4, "y":0}, + {"label":"F5", "x":5, "y":0}, + {"label":"F6", "x":6, "y":0}, + {"label":"F7", "x":7, "y":0}, + {"label":"F8", "x":8, "y":0}, + {"label":"F9", "x":9, "y":0}, + {"label":"F10", "x":10, "y":0}, + {"label":"F11", "x":11, "y":0}, + {"label":"F12", "x":12, "y":0}, + {"label":"PrtSc", "x":13, "y":0}, + {"label":"Del", "x":14, "y":0}, + {"label":"Fn", "x":15, "y":0}, + {"label":"~", "x":0, "y":1}, + {"label":"!", "x":1, "y":1}, + {"label":"@", "x":2, "y":1}, + {"label":"#", "x":3, "y":1}, + {"label":"$", "x":4, "y":1}, + {"label":"%", "x":5, "y":1}, + {"label":"^", "x":6, "y":1}, + {"label":"&", "x":7, "y":1}, + {"label":"*", "x":8, "y":1}, + {"label":"(", "x":9, "y":1}, + {"label":")", "x":10, "y":1}, + {"label":"_", "x":11, "y":1}, + {"label":"+", "x":12, "y":1}, + {"label":"Backspace", "x":13, "y":1, "w":2}, + {"label":"Home", "x":15, "y":1}, + {"label":"Tab", "x":0, "y":2, "w":1.5}, + {"label":"Q", "x":1.5, "y":2}, + {"label":"W", "x":2.5, "y":2}, + {"label":"E", "x":3.5, "y":2}, + {"label":"R", "x":4.5, "y":2}, + {"label":"T", "x":5.5, "y":2}, + {"label":"Y", "x":6.5, "y":2}, + {"label":"U", "x":7.5, "y":2}, + {"label":"I", "x":8.5, "y":2}, + {"label":"O", "x":9.5, "y":2}, + {"label":"P", "x":10.5, "y":2}, + {"label":"{", "x":11.5, "y":2}, + {"label":"}", "x":12.5, "y":2}, + {"label":"|", "x":13.5, "y":2, "w":1.5}, + {"label":"End", "x":15, "y":2}, + {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, + {"label":"A", "x":1.75, "y":3}, + {"label":"S", "x":2.75, "y":3}, + {"label":"D", "x":3.75, "y":3}, + {"label":"F", "x":4.75, "y":3}, + {"label":"G", "x":5.75, "y":3}, + {"label":"H", "x":6.75, "y":3}, + {"label":"J", "x":7.75, "y":3}, + {"label":"K", "x":8.75, "y":3}, + {"label":"L", "x":9.75, "y":3}, + {"label":":", "x":10.75, "y":3}, + {"label":"\"", "x":11.75, "y":3}, + {"label":"Enter", "x":12.75, "y":3, "w":2.25}, + {"label":"Page Up", "x":15, "y":3}, + {"label":"Shift", "x":0, "y":4, "w":2.25}, + {"label":"Z", "x":2.25, "y":4}, + {"label":"X", "x":3.25, "y":4}, + {"label":"C", "x":4.25, "y":4}, + {"label":"V", "x":5.25, "y":4}, + {"label":"B", "x":6.25, "y":4}, + {"label":"N", "x":7.25, "y":4}, + {"label":"M", "x":8.25, "y":4}, + {"label":"<", "x":9.25, "y":4}, + {"label":">", "x":10.25, "y":4}, + {"label":"?", "x":11.25, "y":4}, + {"label":"Shift", "x":12.25, "y":4, "w":1.75}, + {"label":"\u2191", "x":14, "y":4}, + {"label":"Page Down", "x":15, "y":4}, + {"label":"Ctrl", "x":0, "y":5, "w":1.25}, + {"label":"GUI", "x":1.25, "y":5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5, "w":1.25}, + {"x":3.75, "y":5, "w":6.25}, + {"label":"Alt", "x":10, "y":5}, + {"label":"Fn", "x":11, "y":5}, + {"label":"Ctrl", "x":12, "y":5}, + {"label":"\u2190", "x":13, "y":5}, + {"label":"\u2193", "x":14, "y":5}, + {"label":"\u2192", "x":15, "y":5} + ] + }, + "LAYOUT_75_iso": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1, "y":0}, + {"label":"F2", "x":2, "y":0}, + {"label":"F3", "x":3, "y":0}, + {"label":"F4", "x":4, "y":0}, + {"label":"F5", "x":5, "y":0}, + {"label":"F6", "x":6, "y":0}, + {"label":"F7", "x":7, "y":0}, + {"label":"F8", "x":8, "y":0}, + {"label":"F9", "x":9, "y":0}, + {"label":"F10", "x":10, "y":0}, + {"label":"F11", "x":11, "y":0}, + {"label":"F12", "x":12, "y":0}, + {"label":"PrtSc", "x":13, "y":0}, + {"label":"Pause", "x":14, "y":0}, + {"label":"Delete", "x":15, "y":0}, + {"label":"~", "x":0, "y":1}, + {"label":"1", "x":1, "y":1}, + {"label":"2", "x":2, "y":1}, + {"label":"3", "x":3, "y":1}, + {"label":"4", "x":4, "y":1}, + {"label":"5", "x":5, "y":1}, + {"label":"6", "x":6, "y":1}, + {"label":"7", "x":7, "y":1}, + {"label":"8", "x":8, "y":1}, + {"label":"9", "x":9, "y":1}, + {"label":"0", "x":10, "y":1}, + {"label":"_", "x":11, "y":1}, + {"label":"+", "x":12, "y":1}, + {"label":"Backspace", "x":13, "y":1, "w":2}, + {"label":"Home", "x":15, "y":1}, + {"label":"Tab", "x":0, "y":2, "w":1.5}, + {"label":"Q", "x":1.5, "y":2}, + {"label":"W", "x":2.5, "y":2}, + {"label":"E", "x":3.5, "y":2}, + {"label":"R", "x":4.5, "y":2}, + {"label":"T", "x":5.5, "y":2}, + {"label":"Y", "x":6.5, "y":2}, + {"label":"U", "x":7.5, "y":2}, + {"label":"I", "x":8.5, "y":2}, + {"label":"O", "x":9.5, "y":2}, + {"label":"P", "x":10.5, "y":2}, + {"label":"{", "x":11.5, "y":2}, + {"label":"}", "x":12.5, "y":2}, + {"label":"Page Up", "x":15, "y":2}, + {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, + {"label":"A", "x":1.75, "y":3}, + {"label":"S", "x":2.75, "y":3}, + {"label":"D", "x":3.75, "y":3}, + {"label":"F", "x":4.75, "y":3}, + {"label":"G", "x":5.75, "y":3}, + {"label":"H", "x":6.75, "y":3}, + {"label":"J", "x":7.75, "y":3}, + {"label":"K", "x":8.75, "y":3}, + {"label":"L", "x":9.75, "y":3}, + {"label":":", "x":10.75, "y":3}, + {"label":"@", "x":11.75, "y":3}, + {"label":"~", "x":12.75, "y":3}, + {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, + {"label":"Page Down", "x":15, "y":3}, + {"label":"Shift", "x":0, "y":4, "w":1.25}, + {"label":"|", "x":1.25, "y":4}, + {"label":"Z", "x":2.25, "y":4}, + {"label":"X", "x":3.25, "y":4}, + {"label":"C", "x":4.25, "y":4}, + {"label":"V", "x":5.25, "y":4}, + {"label":"B", "x":6.25, "y":4}, + {"label":"N", "x":7.25, "y":4}, + {"label":"M", "x":8.25, "y":4}, + {"label":"<", "x":9.25, "y":4}, + {"label":">", "x":10.25, "y":4}, + {"label":"?", "x":11.25, "y":4}, + {"label":"Shift", "x":12.25, "y":4, "w":1.75}, + {"label":"Up", "x":14, "y":4}, + {"label":"End", "x":15, "y":4}, + {"label":"Ctrl", "x":0, "y":5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5, "w":1.25}, + {"label":"Space", "x":3.75, "y":5, "w":6.25}, + {"label":"AltGr", "x":10, "y":5}, + {"label":"Menu", "x":11, "y":5}, + {"label":"Ctrl", "x":12, "y":5}, + {"label":"Left", "x":13, "y":5}, + {"label":"Down", "x":14, "y":5}, + {"label":"Right", "x":15, "y":5} + ] + }, + "LAYOUT_75_iso_rwkl": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1, "y":0}, + {"label":"F2", "x":2, "y":0}, + {"label":"F3", "x":3, "y":0}, + {"label":"F4", "x":4, "y":0}, + {"label":"F5", "x":5, "y":0}, + {"label":"F6", "x":6, "y":0}, + {"label":"F7", "x":7, "y":0}, + {"label":"F8", "x":8, "y":0}, + {"label":"F9", "x":9, "y":0}, + {"label":"F10", "x":10, "y":0}, + {"label":"F11", "x":11, "y":0}, + {"label":"F12", "x":12, "y":0}, + {"label":"PrtSc", "x":13, "y":0}, + {"label":"Pause", "x":14, "y":0}, + {"label":"Delete", "x":15, "y":0}, + {"label":"~", "x":0, "y":1}, + {"label":"1", "x":1, "y":1}, + {"label":"2", "x":2, "y":1}, + {"label":"3", "x":3, "y":1}, + {"label":"4", "x":4, "y":1}, + {"label":"5", "x":5, "y":1}, + {"label":"6", "x":6, "y":1}, + {"label":"7", "x":7, "y":1}, + {"label":"8", "x":8, "y":1}, + {"label":"9", "x":9, "y":1}, + {"label":"0", "x":10, "y":1}, + {"label":"_", "x":11, "y":1}, + {"label":"+", "x":12, "y":1}, + {"label":"Backspace", "x":13, "y":1, "w":2}, + {"label":"Home", "x":15, "y":1}, + {"label":"Tab", "x":0, "y":2, "w":1.5}, + {"label":"Q", "x":1.5, "y":2}, + {"label":"W", "x":2.5, "y":2}, + {"label":"E", "x":3.5, "y":2}, + {"label":"R", "x":4.5, "y":2}, + {"label":"T", "x":5.5, "y":2}, + {"label":"Y", "x":6.5, "y":2}, + {"label":"U", "x":7.5, "y":2}, + {"label":"I", "x":8.5, "y":2}, + {"label":"O", "x":9.5, "y":2}, + {"label":"P", "x":10.5, "y":2}, + {"label":"{", "x":11.5, "y":2}, + {"label":"}", "x":12.5, "y":2}, + {"label":"Page Up", "x":15, "y":2}, + {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, + {"label":"A", "x":1.75, "y":3}, + {"label":"S", "x":2.75, "y":3}, + {"label":"D", "x":3.75, "y":3}, + {"label":"F", "x":4.75, "y":3}, + {"label":"G", "x":5.75, "y":3}, + {"label":"H", "x":6.75, "y":3}, + {"label":"J", "x":7.75, "y":3}, + {"label":"K", "x":8.75, "y":3}, + {"label":"L", "x":9.75, "y":3}, + {"label":":", "x":10.75, "y":3}, + {"label":"@", "x":11.75, "y":3}, + {"label":"~", "x":12.75, "y":3}, + {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, + {"label":"Page Down", "x":15, "y":3}, + {"label":"Shift", "x":0, "y":4, "w":1.25}, + {"label":"|", "x":1.25, "y":4}, + {"label":"Z", "x":2.25, "y":4}, + {"label":"X", "x":3.25, "y":4}, + {"label":"C", "x":4.25, "y":4}, + {"label":"V", "x":5.25, "y":4}, + {"label":"B", "x":6.25, "y":4}, + {"label":"N", "x":7.25, "y":4}, + {"label":"M", "x":8.25, "y":4}, + {"label":"<", "x":9.25, "y":4}, + {"label":">", "x":10.25, "y":4}, + {"label":"?", "x":11.25, "y":4}, + {"label":"Shift", "x":12.25, "y":4, "w":1.75}, + {"label":"Up", "x":14, "y":4}, + {"label":"End", "x":15, "y":4}, + {"label":"Ctrl", "x":0, "y":5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5, "w":1.25}, + {"label":"Space", "x":3.75, "y":5, "w":6.25}, + {"label":"AltGr", "x":10, "y":5, "w":1.5}, + {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, + {"label":"Left", "x":13, "y":5}, + {"label":"Down", "x":14, "y":5}, + {"label":"Right", "x":15, "y":5} + ] } } } diff --git a/keyboards/ymd75/keymaps/default_iso/keymap.c b/keyboards/ymd75/keymaps/default_iso/keymap.c new file mode 100644 index 0000000000..2008dddf8c --- /dev/null +++ b/keyboards/ymd75/keymaps/default_iso/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_75_iso( + /* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + 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_PAUS, 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_HOME, + /* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ + 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_END, + /* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ├─────────┤ */ + 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_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_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + /* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), + + [1] = LAYOUT_75_iso( + /* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, + /* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + /* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ + RGB_MOD, RGB_TOG, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_VOLD, + /* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ├─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + /* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┤ */ + _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, + /* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + /* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ) +}; diff --git a/keyboards/ymd75/keymaps/default_iso_rwkl/keymap.c b/keyboards/ymd75/keymaps/default_iso_rwkl/keymap.c new file mode 100644 index 0000000000..0db1c8d288 --- /dev/null +++ b/keyboards/ymd75/keymaps/default_iso_rwkl/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_75_iso_rwkl( + /* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + 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_DEL, KC_HOME, + /* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ + 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_END, + /* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ + 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_PGUP, + /* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ├─────────┤ */ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN, + /* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┤ */ + 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, MO(1), + /* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴─────────┴──┬──────┴───────┬─────────┼─────────┼─────────┤ */ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + /* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴──────────────┴──────────────┴─────────┴─────────┴─────────┘ */ + ), + + [1] = LAYOUT_75_iso_rwkl( + /* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, + /* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + /* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + /* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ├─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, + /* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + /* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴─────────┴──┬──────┴───────┬─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______ + /* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴──────────────┴──────────────┴─────────┴─────────┴─────────┘ */ + ) +}; diff --git a/keyboards/ymd75/rev1/config.h b/keyboards/ymd75/rev1/config.h index e9009ee0eb..d9796d9d72 100644 --- a/keyboards/ymd75/rev1/config.h +++ b/keyboards/ymd75/rev1/config.h @@ -25,3 +25,4 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } #define DIODE_DIRECTION COL2ROW +#define DEVICE_VER 0x0100 diff --git a/keyboards/ymd75/rev1/rev1.h b/keyboards/ymd75/rev1/rev1.h index 0a426ffa57..d88e8fb802 100644 --- a/keyboards/ymd75/rev1/rev1.h +++ b/keyboards/ymd75/rev1/rev1.h @@ -21,19 +21,55 @@ along with this program. If not, see . #include "quantum.h" #define LAYOUT( \ -K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ -K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ -K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ -K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \ -K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \ -K00, K10, K20, K56, K57, KB0, KC0, K96, K76, K66 \ + K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ + K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ + K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ + K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \ + K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \ + K00, K10, K20, K56, K57, KB0, KC0, K96, K76, K66 \ ){ \ -{ K00, K10, K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB0, KC0, KD0, KC_NO }, \ -{ K01, K11, K21, K31, K41, K51, KC_NO, KC_NO, KC_NO, KC_NO, KA1, KB1, KC_NO, KD1, KE1 }, \ -{ K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, KC_NO, KC_NO, KA2, KB2, KC_NO, KD2, KE2 }, \ -{ K03, K13, K23, K33, K43, K53, KC_NO, KC_NO, KC_NO, KC_NO, KA3, KB3, KC3, KD3, KC_NO }, \ -{ K04, K14, K24, K34, K44, K54, KC_NO, KC_NO, KC_NO, KC_NO, KA4, KB4, KC4, KC_NO, KE4 }, \ -{ K05, KC_NO, K25, K35, K45, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KC5, KD5, KE5 }, \ -{ K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \ -{ K07, K17, K27, K37, K47, K57, K67, K77, KE0, KC_NO, KA7, KB7, KC7, KD7, KE7 } \ + { K00, K10, K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB0, KC0, KD0, KC_NO }, \ + { K01, K11, K21, K31, K41, K51, KC_NO, KC_NO, KC_NO, KC_NO, KA1, KB1, KC_NO, KD1, KE1 }, \ + { K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, KC_NO, KC_NO, KA2, KB2, KC_NO, KD2, KE2 }, \ + { K03, K13, K23, K33, K43, K53, KC_NO, KC_NO, KC_NO, KC_NO, KA3, KB3, KC3, KD3, KC_NO }, \ + { K04, K14, K24, K34, K44, K54, KC_NO, KC_NO, KC_NO, KC_NO, KA4, KB4, KC4, KC_NO, KE4 }, \ + { K05, KC_NO, K25, K35, K45, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KC5, KD5, KE5 }, \ + { K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \ + { K07, K17, K27, K37, K47, K57, K67, K77, KE0, KC_NO, KA7, KB7, KC7, KD7, KE7 } \ +} + +#define LAYOUT_75_iso( \ + K50, K52, K53, K54, K55, K60, K6A, K7A, K70, K5B, K5C, K5D, K5E, K1D, K1E, K2E, \ + K40, K41, K42, K43, K44, K45, K61, K6B, K7B, K71, K4A, K4B, K4C, K4E, K0D, \ + K30, K31, K32, K33, K34, K35, K62, K6C, K7C, K72, K3A, K3B, K3C, K76, \ + K20, K21, K22, K23, K24, K25, K63, K6D, K7D, K73, K2A, K2B, K2C, K2D, K0E, \ + K10, K03, K11, K12, K13, K14, K15, K64, K6E, K7E, K74, K1A, K1B, K68, K77, \ + K00, K01, K02, K65, K75, K0B, K0C, K69, K67, K66 \ +){ \ + { K00, K01, K02, K03, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, KC_NO, KC_NO, KC_NO, KC_NO, K1A, K1B, KC_NO, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, KC_NO, KC_NO, KC_NO, KC_NO, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, KC_NO, KC_NO, KC_NO, KC_NO, K3A, K3B, K3C, KC_NO, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, KC_NO, K4E }, \ + { K50, KC_NO, K52, K53, K54, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K5B, K5C, K5D, K5E }, \ + { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C, K6D, K6E }, \ + { K70, K71, K72, K73, K74, K75, K76, K77, K0E, KC_NO, K7A, K7B, K7C, K7D, K7E } \ +} + +#define LAYOUT_75_iso_rwkl( \ + K50, K52, K53, K54, K55, K60, K6A, K7A, K70, K5B, K5C, K5D, K5E, K1D, K1E, K2E, \ + K40, K41, K42, K43, K44, K45, K61, K6B, K7B, K71, K4A, K4B, K4C, K4E, K0D, \ + K30, K31, K32, K33, K34, K35, K62, K6C, K7C, K72, K3A, K3B, K3C, K76, \ + K20, K21, K22, K23, K24, K25, K63, K6D, K7D, K73, K2A, K2B, K2C, K2D, K0E, \ + K10, K03, K11, K12, K13, K14, K15, K64, K6E, K7E, K74, K1A, K1B, K68, K77, \ + K00, K01, K02, K65, K75, K0C, K69, K67, K66 \ +){ \ + { K00, K01, K02, K03, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, KC_NO, KC_NO, KC_NO, KC_NO, K1A, K1B, KC_NO, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, KC_NO, KC_NO, KC_NO, KC_NO, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, KC_NO, KC_NO, KC_NO, KC_NO, K3A, K3B, K3C, KC_NO, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, KC_NO, K4E }, \ + { K50, KC_NO, K52, K53, K54, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K5B, K5C, K5D, K5E }, \ + { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C, K6D, K6E }, \ + { K70, K71, K72, K73, K74, K75, K76, K77, K0E, KC_NO, K7A, K7B, K7C, K7D, K7E } \ } diff --git a/keyboards/ymd75/rev2/config.h b/keyboards/ymd75/rev2/config.h index 9718b19dd1..a9578d720d 100644 --- a/keyboards/ymd75/rev2/config.h +++ b/keyboards/ymd75/rev2/config.h @@ -6,3 +6,4 @@ #define MATRIX_ROW_PINS { B7, B6, B5, B4, B3, B0 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } #define DIODE_DIRECTION COL2ROW +#define DEVICE_VER 0x0200 diff --git a/keyboards/ymd75/rev2/rev2.h b/keyboards/ymd75/rev2/rev2.h index b2dd7b8e1c..952858382b 100644 --- a/keyboards/ymd75/rev2/rev2.h +++ b/keyboards/ymd75/rev2/rev2.h @@ -16,3 +16,35 @@ { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414 }, \ { K500, K501, K502, KC_NO, KC_NO, K505, K506, K507, K508, K509, K510, K511, KC_NO, K513, K514 } \ } + +#define LAYOUT_75_iso( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K514, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K513, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, \ + K500, K501, K502, K505, K506, K507, K508, K509, K510, K511 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414 }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, K506, K507, K508, K509, K510, K511, KC_NO, K513, K514 } \ +} + +#define LAYOUT_75_iso_rwkl( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K514, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K513, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, \ + K500, K501, K502, K505, K506, K508, K509, K510, K511 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414 }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, K506, KC_NO, K508, K509, K510, K511, KC_NO, K513, K514 } \ +} diff --git a/keyboards/ymd75/rev3/config.h b/keyboards/ymd75/rev3/config.h new file mode 100644 index 0000000000..6118b96b8b --- /dev/null +++ b/keyboards/ymd75/rev3/config.h @@ -0,0 +1,9 @@ +#pragma once + +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 +#define MATRIX_ROW_PINS { B7, B3, B2, B1, B0, E6, F0, F1, F4, F5, F6, F7 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 } +#define DIODE_DIRECTION ROW2COL +#define DEVICE_VER 0x0300 +#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 4 diff --git a/keyboards/ymd75/rev3/rev3.c b/keyboards/ymd75/rev3/rev3.c new file mode 100644 index 0000000000..96e1a47549 --- /dev/null +++ b/keyboards/ymd75/rev3/rev3.c @@ -0,0 +1,32 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 "ymd75.h" + +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); +} + +void led_init_ports(void) { setPinOutput(D1); } + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(D1, led_state.caps_lock); + } + return true; +} diff --git a/keyboards/ymd75/rev3/rev3.h b/keyboards/ymd75/rev3/rev3.h new file mode 100644 index 0000000000..d25579eabb --- /dev/null +++ b/keyboards/ymd75/rev3/rev3.h @@ -0,0 +1,117 @@ +#pragma once +#include "quantum.h" + + +/* LAYOUT + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Psc│Pse│Del│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │0 │ - │ = │BckSpc │Hm │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │End│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │PgD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │Ctrl│Sup │Alt │ Space │Alt│Sup│Ctl│ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ + +#define LAYOUT( \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, KB8, KB7, KB5, KB4, KB3, KB6, KB2, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, KA6, KA2, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K94, K84, K96, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K93, K86, \ + K10, K12, K13, K14, K15, K16, K17, K18, K78, K77, K75, K74, K73, K76, \ + K00, K01, K02, K06, K08, K07, K05, K04, K03, K66 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K66, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, K73, K74, K75, K76, K77, K78 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K84, K85, K86, K87, K88 }, \ + { KC_NO, KC_NO, KC_NO, K93, K94, K95, K96, K97, K98 }, \ + { KC_NO, KC_NO, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \ + { KC_NO, KC_NO, KB2, KB3, KB4, KB5, KB6, KB7, KB8 }, \ +} + +/* LAYOUT_75_iso + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Psc│Pse│Del│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │0 │ - │ = │BckSpc │Hm │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │End│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐Ent ├───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │PgU│ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Shift │ ↑ │PgD│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │Ctrl│Sup │Alt │ Space │Alt│Mo │Ctl│ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ + +#define LAYOUT_75_iso( \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, KB8, KB7, KB5, KB4, KB3, KB6, KB2, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, KA6, KA2, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K94, K96, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K93, K84, K86, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K77, K75, K74, K73, K76, \ + K00, K01, K02, K06, K08, K07, K05, K04, K03, K66 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K66, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, K73, K74, K75, K76, K77, K78 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K93, K85, K86, K87, K88 }, \ + { KC_NO, KC_NO, KC_NO, K84, K94, K95, K96, K97, K98 }, \ + { KC_NO, KC_NO, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \ + { KC_NO, KC_NO, KB2, KB3, KB4, KB5, KB6, KB7, KB8 }, \ +} + +/* LAYOUT_75_iso_rwkl + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Psc│Pse│Del│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │0 │ - │ = │BckSpc │Hm │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │End│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐Ent ├───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │PgU│ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │Shift │ ↑ │PgD│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┤ + * │Ctrl│Sup │Alt │ Space │ Alt │ Ctl │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┘ + */ + +#define LAYOUT_75_iso_rwkl( \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, KB8, KB7, KB5, KB4, KB3, KB6, KB2, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, KA6, KA2, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K94, K96, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K93, K84, K86, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K77, K75, K74, K73, K76, \ + K00, K01, K02, K06, K08, K05, K04, K03, K66 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO, K08 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K66, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, K73, K74, K75, K76, K77, K78 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K93, K85, K86, K87, K88 }, \ + { KC_NO, KC_NO, KC_NO, K84, K94, K95, K96, K97, K98 }, \ + { KC_NO, KC_NO, KA2, KC_NO, KA4, KA5, KA6, KA7, KA8 }, \ + { KC_NO, KC_NO, KB2, KB3, KB4, KB5, KB6, KB7, KB8 }, \ +} diff --git a/keyboards/ymd75/rev3/rules.mk b/keyboards/ymd75/rev3/rules.mk new file mode 100644 index 0000000000..9506e636d2 --- /dev/null +++ b/keyboards/ymd75/rev3/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +KEY_LOCK_ENABLE = yes # Enable KC_LOCK support diff --git a/keyboards/ymd75/ymd75.h b/keyboards/ymd75/ymd75.h index afeb095670..134f08060f 100644 --- a/keyboards/ymd75/ymd75.h +++ b/keyboards/ymd75/ymd75.h @@ -6,4 +6,6 @@ #include "rev1.h" #elif defined(KEYBOARD_ymd75_rev2) #include "rev2.h" +#elif defined(KEYBOARD_ymd75_rev3) + #include "rev3.h" #endif diff --git a/keyboards/ymdk_np21/config.h b/keyboards/ymdk_np21/config.h index 3796634316..1ea6fb0ce3 100644 --- a/keyboards/ymdk_np21/config.h +++ b/keyboards/ymdk_np21/config.h @@ -19,32 +19,121 @@ along with this program. If not, see . #include "config_common.h" -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D -#define DEVICE_VER 0x0200 -#define MANUFACTURER YMDK -#define PRODUCT NP21 +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x594D // "YM" +#define PRODUCT_ID 0x5021 // "P" 21 +#define DEVICE_VER 0x0200 +#define MANUFACTURER YMDK +#define PRODUCT NP21 -/* matrix size */ +/* key matrix size */ #define MATRIX_ROWS 4 #define MATRIX_COLS 6 + +/* + * 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 { B0, B1, B2, B3 } #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5 } -/* COL2ROW or ROW2COL */ +/* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 12 #define BACKLIGHT_BREATHING -#define TAPPING_TOGGLE 3 +#define RGBLED_NUM 5 +//#define RGBLIGHT_HUE_STEP 8 +//#define RGBLIGHT_SAT_STEP 8 +//#define RGBLIGHT_VAL_STEP 8 +//#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +//#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +#define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +//#define RGBLIGHT_EFFECT_BREATHING +//#define RGBLIGHT_EFFECT_RAINBOW_MOOD +//#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +//#define RGBLIGHT_EFFECT_SNAKE +//#define RGBLIGHT_EFFECT_KNIGHT +//#define RGBLIGHT_EFFECT_CHRISTMAS +//#define RGBLIGHT_EFFECT_STATIC_GRADIENT +//#define RGBLIGHT_EFFECT_RGB_TEST +//#define RGBLIGHT_EFFECT_ALTERNATING +/*== customize breathing effect ==*/ +/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +//#define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +/*==== use exp() and sin() ====*/ +//#define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +//#define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 #define USB_MAX_POWER_CONSUMPTION 100 - -/* RGB underglow */ -// The RGB_DI_PIN value seems to be shared between all PS2AVRGB boards. -// The same pin is used on the JJ40, at least. -#define RGBLED_NUM 5 -#define RGB_DI_PIN E2 // NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0. -#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/ymdk_np21/info.json b/keyboards/ymdk_np21/info.json index b17059a1cd..bc5b101c9a 100644 --- a/keyboards/ymdk_np21/info.json +++ b/keyboards/ymdk_np21/info.json @@ -6,63 +6,101 @@ "LAYOUT_ortho_6x4": { "width": 4, "height": 6.25, - "key_count": 24, "layout": [ - {"label":"K06", "x":0, "y":0}, - {"label":"K16", "x":1, "y":0}, - {"label":"K26", "x":2, "y":0}, - {"label":"K36", "x":3, "y":0}, - {"label":"K05", "x":0, "y":1.25}, - {"label":"K15", "x":1, "y":1.25}, - {"label":"K25", "x":2, "y":1.25}, - {"label":"K35", "x":3, "y":1.25}, - {"label":"K04", "x":0, "y":2.25}, - {"label":"K14", "x":1, "y":2.25}, - {"label":"K24", "x":2, "y":2.25}, - {"label":"K34", "x":3, "y":2.25}, - {"label":"K03", "x":0, "y":3.25}, - {"label":"K13", "x":1, "y":3.25}, - {"label":"K23", "x":2, "y":3.25}, - {"label":"K33", "x":3, "y":3.25}, - {"label":"K02", "x":0, "y":4.25}, - {"label":"K12", "x":1, "y":4.25}, - {"label":"K22", "x":2, "y":4.25}, - {"label":"K32", "x":3, "y":4.25}, - {"label":"K01", "x":0, "y":5.25}, - {"label":"K11", "x":1, "y":5.25}, - {"label":"K21", "x":2, "y":5.25}, - {"label":"K31", "x":3, "y":5.25} + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + + {"x": 0, "y": 2.25}, + {"x": 1, "y": 2.25}, + {"x": 2, "y": 2.25}, + {"x": 3, "y": 2.25}, + + {"x": 0, "y": 3.25}, + {"x": 1, "y": 3.25}, + {"x": 2, "y": 3.25}, + {"x": 3, "y": 3.25}, + + {"x": 0, "y": 4.25}, + {"x": 1, "y": 4.25}, + {"x": 2, "y": 4.25}, + {"x": 3, "y": 4.25}, + + {"x": 0, "y": 5.25}, + {"x": 1, "y": 5.25}, + {"x": 2, "y": 5.25}, + {"x": 3, "y": 5.25} ] }, - "LAYOUT": { + "LAYOUT_ortho_4x6": { "width": 6.25, "height": 4, - "key_count": 24, "layout": [ - {"label":"K01", "x":0, "y":0}, - {"label":"K02", "x":1, "y":0}, - {"label":"K03", "x":2, "y":0}, - {"label":"K04", "x":3, "y":0}, - {"label":"K05", "x":4, "y":0}, - {"label":"K06", "x":5.25, "y":0}, - {"label":"K11", "x":0, "y":1}, - {"label":"K12", "x":1, "y":1}, - {"label":"K13", "x":2, "y":1}, - {"label":"K14", "x":3, "y":1}, - {"label":"K15", "x":4, "y":1}, - {"label":"K16", "x":5.25, "y":1}, - {"label":"K21", "x":0, "y":2}, - {"label":"K22", "x":1, "y":2}, - {"label":"K23", "x":2, "y":2}, - {"label":"K24", "x":3, "y":2}, - {"label":"K25", "x":4, "y":2}, - {"label":"K26", "x":5.25, "y":2}, - {"label":"K31", "x":0, "y":3}, - {"label":"K32", "x":1, "y":3}, - {"label":"K33", "x":2, "y":3}, - {"label":"K34", "x":3, "y":3}, - {"label":"K35", "x":4, "y":3}, - {"label":"K36", "x":5.25, "y":3} + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5.25, "y": 0}, + + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5.25, "y": 1}, + + {"x": 0, "y": 2}, + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + {"x": 4, "y": 2}, + {"x": 5.25, "y": 2}, + + {"x": 0, "y": 3}, + {"x": 1, "y": 3}, + {"x": 2, "y": 3}, + {"x": 3, "y": 3}, + {"x": 4, "y": 3}, + {"x": 5.25, "y": 3} + ] + }, + "LAYOUT_numpad_6x4": { + "width": 4, + "height": 6.25, + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + + {"x": 0, "y": 1.25}, + {"x": 1, "y": 1.25}, + {"x": 2, "y": 1.25}, + {"x": 3, "y": 1.25}, + + {"x": 0, "y": 2.25}, + {"x": 1, "y": 2.25}, + {"x": 2, "y": 2.25}, + + {"x": 0, "y": 3.25}, + {"x": 1, "y": 3.25}, + {"x": 2, "y": 3.25}, + {"x": 3, "y": 2.25, "h": 2}, + + {"x": 0, "y": 4.25}, + {"x": 1, "y": 4.25}, + {"x": 2, "y": 4.25}, + + {"x": 0, "y": 5.25, "w": 2}, + {"x": 2, "y": 5.25}, + {"x": 3, "y": 4.25, "h": 2} ] } } diff --git a/keyboards/ymdk_np21/keymaps/default/keymap.c b/keyboards/ymdk_np21/keymaps/default/keymap.c index 143f4f61bb..e15fb1d6eb 100644 --- a/keyboards/ymdk_np21/keymaps/default/keymap.c +++ b/keyboards/ymdk_np21/keymaps/default/keymap.c @@ -1,32 +1,26 @@ #include QMK_KEYBOARD_H -#define _NP 0 -#define _BL 1 - -enum custom_keycodes { - NP = SAFE_RANGE, - BL +enum layer_names { + _NP, + _BL }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Qwerty */ - - [_NP] = LAYOUT_ortho_6x4( - KC_ESC, KC_TAB, KC_BSPC, MO(_BL), - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_P7, KC_P8, KC_P9, KC_PPLS, - KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_P1, KC_P2, KC_P3, KC_PENT, - KC_P0, KC_DOT, KC_PDOT, KC_PENT - ), - - [_BL] = LAYOUT_ortho_6x4( - _______, _______, _______, _______, - _______, _______, _______, _______, - _______, BL_ON, _______, BL_INC, - _______, BL_TOGG, _______, BL_INC, - _______, BL_OFF, _______, BL_DEC, - BL_BRTG, _______, _______, BL_DEC - ) + [_NP] = LAYOUT_ortho_6x4( + KC_ESC, KC_TAB, KC_BSPC, MO(_BL), + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_DOT, KC_PDOT, KC_PENT + ), + [_BL] = LAYOUT_ortho_6x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, BL_ON, _______, BL_INC, + _______, BL_TOGG, _______, BL_INC, + _______, BL_OFF, _______, BL_DEC, + BL_BRTG, _______, _______, BL_DEC + ) }; diff --git a/keyboards/ymdk_np21/keymaps/default/readme.md b/keyboards/ymdk_np21/keymaps/default/readme.md index aca4c0caba..3a4730f7e6 100644 --- a/keyboards/ymdk_np21/keymaps/default/readme.md +++ b/keyboards/ymdk_np21/keymaps/default/readme.md @@ -1,26 +1,26 @@ -# default +# The default keymap for the YMDK NP21 keypad -The default keymap for the YMDK NP21 keypad. - - Base Layer Function Layer - .-----. .-----. - | USB | | USB | - ,-------------------------------. ,-------------------------------. - | Esc | Tab | Back | Fn | | | | |▒▒▒▒▒▒▒| - | | | Space | | | | | |▒▒▒▒▒▒▒| - |-------+-------+-------+-------| |-------+-------+-------+-------| - | Num | / | * | - | | | | | | - | Lock | | | | | | | | | - |-------+-------+-------+-------| |-------+-------+-------+-------| - | 7 | 8 | 9 | + | | | BL | | BL | - | Home | Up | PgUp | | | | On | | Inc | - |-------+-------+-------+-------| |-------+-------+-------+-------| - | 4 | 5 | 6 | + | | | BL | | BL | - | Left | | Right | | | | Togg | | Inc | - |-------+-------+-------+-------| |-------+-------+-------+-------| - | 1 | 2 | 3 | Ent | | | BL | | BL | - | End | Down | PgDn | | | | Off | | Dec | - |-------+-------+-------+-------| |-------+-------+-------+-------| - | 0 | . | . | Ent | | BL | | | BL | - | Ins | | Del | | | Brthg | | | Dec | - `-------------------------------' `-------------------------------' +``` +Base Layer Function Layer + .-----. .-----. + | USB | | USB | +,-------------------------------. ,-------------------------------. +| Esc | Tab | Back | Fn | | | | |▒▒▒▒▒▒▒| +| | | Space | | | | | |▒▒▒▒▒▒▒| +|-------+-------+-------+-------| |-------+-------+-------+-------| +| Num | / | * | - | | | | | | +| Lock | | | | | | | | | +|-------+-------+-------+-------| |-------+-------+-------+-------| +| 7 | 8 | 9 | + | | | BL | | BL | +| Home | Up | PgUp | | | | On | | Inc | +|-------+-------+-------+-------| |-------+-------+-------+-------| +| 4 | 5 | 6 | + | | | BL | | BL | +| Left | | Right | | | | Togg | | Inc | +|-------+-------+-------+-------| |-------+-------+-------+-------| +| 1 | 2 | 3 | Ent | | | BL | | BL | +| End | Down | PgDn | | | | Off | | Dec | +|-------+-------+-------+-------| |-------+-------+-------+-------| +| 0 | . | . | Ent | | BL | | | BL | +| Ins | | Del | | | Brthg | | | Dec | +`-------------------------------' `-------------------------------' +``` diff --git a/keyboards/ymdk_np21/README.md b/keyboards/ymdk_np21/readme.md similarity index 100% rename from keyboards/ymdk_np21/README.md rename to keyboards/ymdk_np21/readme.md diff --git a/keyboards/ymdk_np21/rules.mk b/keyboards/ymdk_np21/rules.mk index c370c616a5..ed7d082f0d 100644 --- a/keyboards/ymdk_np21/rules.mk +++ b/keyboards/ymdk_np21/rules.mk @@ -2,28 +2,20 @@ MCU = atmega32a # Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp BOOTLOADER = bootloadHID -# build options -BOOTMAGIC_ENABLE = no -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = no -COMMAND_ENABLE = yes - -BACKLIGHT_ENABLE = yes - -RGBLIGHT_ENABLE = yes +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow WS2812_DRIVER = i2c -KEY_LOCK_ENABLE = 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 +LAYOUTS = ortho_6x4 numpad_6x4 diff --git a/keyboards/ymdk_np21/ymdk_np21.h b/keyboards/ymdk_np21/ymdk_np21.h index afd3d38c7d..bdc37231ee 100644 --- a/keyboards/ymdk_np21/ymdk_np21.h +++ b/keyboards/ymdk_np21/ymdk_np21.h @@ -19,31 +19,46 @@ along with this program. If not, see . #include "quantum.h" +#define XXX KC_NO + #define LAYOUT_ortho_6x4( \ - K06, K16, K26, K36, \ - K05, K15, K25, K35, \ - K04, K14, K24, K34, \ - K03, K13, K23, K33, \ - K02, K12, K22, K32, \ - K01, K11, K21, K31 \ -) \ -{ \ - { K06, K05, K04, K03, K02, K01 }, \ - { K16, K15, K14, K13, K12, K11 }, \ - { K26, K25, K24, K23, K22, K21 }, \ - { K36, K35, K34, K33, K32, K31 } \ + k00, k10, k20, k30, \ + k01, k11, k21, k31, \ + k02, k12, k22, k32, \ + k03, k13, k23, k33, \ + k04, k14, k24, k34, \ + k05, k15, k25, k35 \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 } \ } -#define LAYOUT( \ - K01, K02, K03, K04, K05, K06, \ - K11, K12, K13, K14, K15, K16, \ - K21, K22, K23, K24, K25, K26, \ - K31, K32, K33, K34, K35, K36 \ -) LAYOUT_ortho_6x4( \ - K06, K16, K26, K36, \ - K05, K15, K25, K35, \ - K04, K14, K24, K34, \ - K03, K13, K23, K33, \ - K02, K12, K22, K32, \ - K01, K11, K21, K31 \ -) +#define LAYOUT_ortho_4x6( \ + k05, k04, k03, k02, k01, k00, \ + k15, k14, k13, k12, k11, k10, \ + k25, k24, k23, k22, k21, k20, \ + k35, k34, k33, k32, k31, k30 \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 } \ +} + +#define LAYOUT_numpad_6x4( \ + k00, k10, k20, k30, \ + k01, k11, k21, k31, \ + k02, k12, k22,\ + k03, k13, k23, k33, \ + k04, k14, k24, \ + k05, k25, k35 \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, XXX }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, XXX, k33, XXX, k35 } \ +} + +#define LAYOUT LAYOUT_ortho_4x6 diff --git a/keyboards/yosino58/ssd1306.c b/keyboards/yosino58/ssd1306.c index 3353f615f5..abd9de2f7a 100644 --- a/keyboards/yosino58/ssd1306.c +++ b/keyboards/yosino58/ssd1306.c @@ -4,15 +4,14 @@ #include "i2c.h" #include #include "print.h" -#ifdef ADAFRUIT_BLE_ENABLE -#include "adafruit_ble.h" -#endif #ifdef PROTOCOL_LUFA #include "lufa.h" #endif #include "sendchar.h" #include "timer.h" +struct CharacterMatrix display; + extern const unsigned char font[] PROGMEM; // Set this to 1 to help diagnose early startup problems diff --git a/keyboards/yosino58/ssd1306.h b/keyboards/yosino58/ssd1306.h index acaf6217ef..35e4c144cc 100644 --- a/keyboards/yosino58/ssd1306.h +++ b/keyboards/yosino58/ssd1306.h @@ -70,7 +70,7 @@ struct CharacterMatrix { bool dirty; }; -struct CharacterMatrix display; +extern struct CharacterMatrix display; bool iota_gfx_init(bool rotate); void iota_gfx_task(void); diff --git a/keyboards/yugo_m/model_m_101/config.h b/keyboards/yugo_m/model_m_101/config.h new file mode 100644 index 0000000000..76580a60e4 --- /dev/null +++ b/keyboards/yugo_m/model_m_101/config.h @@ -0,0 +1,100 @@ +/* +Copyright 2020 Nidzo Tomic + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x8E81 // Yugo-M +#define DEVICE_VER 0x0001 +#define MANUFACTURER IBM +#define PRODUCT Yugo-M (Model M replacement controller) +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 16 + +/* + * 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 { B8, B7, B6, B5, B4, B3, A15, A14 } +#define MATRIX_COL_PINS { A9, A8, B15, B14, B13, B12, B11, B10, B2, B1, B0, A7, A6, A5, A4, A3 } +#define UNUSED_PINS { A0, A1, A2, A10, A13, B9, C13, C14, C15 } + + + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +/* define if matrix has ghost */ +#define MATRIX_HAS_GHOST + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed (5 is default) */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +// #define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +// #define LOCKING_RESYNC_ENABLE + + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/yugo_m/model_m_101/info.json b/keyboards/yugo_m/model_m_101/info.json new file mode 100644 index 0000000000..ec0c0f2801 --- /dev/null +++ b/keyboards/yugo_m/model_m_101/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "IBM Model M 101/102", + "url": "https://github.com/tomic1785/qmk_firmware/tree/stm32_model_m/keyboards/yugo_m/model_m_101", + "maintainer": "Nidzo Tomic", + "width": 22.5, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Num Lock", "x":18.5, "y":1.5}, {"label":"/", "x":19.5, "y":1.5}, {"label":"*", "x":20.5, "y":1.5}, {"label":"-", "x":21.5, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"7", "x":18.5, "y":2.5}, {"label":"8", "x":19.5, "y":2.5}, {"label":"9", "x":20.5, "y":2.5}, {"label":"+", "x":21.5, "y":2.5, "h":2}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.5}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"~", "x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":3.5, "w":1.25}, {"label":"4", "x":18.5, "y":3.5}, {"label":"5", "x":19.5, "y":3.5}, {"label":"6", "x":20.5, "y":3.5}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"|", "x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"1", "x":18.5, "y":4.5}, {"label":"2", "x":19.5, "y":4.5}, {"label":"3", "x":20.5, "y":4.5}, {"label":"Enter", "x":21.5, "y":4.5, "h":2}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"label":"Alt", "x":11, "y":5.5, "w":1.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}, {"label":"0", "x":18.5, "y":5.5, "w":2}, {"label":".", "x":20.5, "y":5.5}] + } + } +} diff --git a/keyboards/yugo_m/model_m_101/keymaps/default/keymap.c b/keyboards/yugo_m/model_m_101/keymaps/default/keymap.c new file mode 100644 index 0000000000..52f79457e2 --- /dev/null +++ b/keyboards/yugo_m/model_m_101/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +/* Copyright 2020 Nidzo Tomic + * + * 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 QMK_KEYBOARD_H + +enum keyboard_layers { + _BL, // Base Layer +}; + +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| |PSc|ScL| Ps| | + * | | + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BSp| |Ins|Hom|PgU| |Num| /| *| -| + * |-----------------------------------------------------------| |-----------| |---------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| | 7| 8| 9| | + * |-----------------------------------------------------------| |-----------| | + * |CapsLk| A| S| D| F| G| H| J| K| L| ;| '| #|Ent | | 4| 5| 6| +| + * |-----------------------------------------------------------| |---------------| + * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | | Up| | 1| 2| 3| | + * |-----------------------------------------------------------| |---| |-----------| | + * |Ctrl | |Alt | Space |Alt Gr| |Ctrl | | Lt| Dn| Rt| | 0| ,|Ent| + * `-------------------------------------------------------------------------------------------------' + */ + [_BL] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + 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_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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT), +}; diff --git a/keyboards/yugo_m/model_m_101/keymaps/default/readme.md b/keyboards/yugo_m/model_m_101/keymaps/default/readme.md new file mode 100644 index 0000000000..ba8b91239e --- /dev/null +++ b/keyboards/yugo_m/model_m_101/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for 101/102 key keyboards. diff --git a/keyboards/yugo_m/model_m_101/model_m_101.c b/keyboards/yugo_m/model_m_101/model_m_101.c new file mode 100644 index 0000000000..34755cf4bc --- /dev/null +++ b/keyboards/yugo_m/model_m_101/model_m_101.c @@ -0,0 +1,35 @@ +/* Copyright 2020 Nidzo Tomic + * + * 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 "model_m_101.h" + +void keyboard_pre_init_kb(void) { + // Set our LED pins as output + setPinOutput(A2); + setPinOutput(A1); + setPinOutput(A0); + + keyboard_pre_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(A2, !led_state.num_lock); + writePin(A1, !led_state.caps_lock); + writePin(A0, !led_state.scroll_lock); + } + return res; +} diff --git a/keyboards/yugo_m/model_m_101/model_m_101.h b/keyboards/yugo_m/model_m_101/model_m_101.h new file mode 100644 index 0000000000..7ee44f367b --- /dev/null +++ b/keyboards/yugo_m/model_m_101/model_m_101.h @@ -0,0 +1,45 @@ +/* Copyright 2020 Nidzo Tomic + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * The first section contains "names" for physical keys of the keyboard + * and defines their position on the board. + * The second section defines position of the keys on the switch matrix + * (where COLUMNS and ROWS crosses). */ + +#define LAYOUT_all( \ + K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, \ + \ + K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P, K4Q, K4R, K4S, K4T, K4U, \ + K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3O, K3P, K3Q, K3R, K3S, K3T, K3U, \ + K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, K2O, K2P, K2Q, \ + K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1N, K1O, K1P, K1Q, K1R, \ + K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I, K0J \ +) \ +{ \ +/* 00 */ { KC_NO, KC_NO, K5A, K1B, K5E, K2F, K5F, K2G, K5G, KC_NO, K2L, KC_NO, K0I, K0J, K1N, K0B }, \ +/* 01 */ { KC_NO, K1A, K3A, K2A, K5D, K3F, K4N, K3G, K3M, K5H, K3L, K2O, K2P, K2Q, KC_NO, KC_NO }, \ +/* 02 */ { K0A, KC_NO, K4A, K5B, K5C, K4F, K5J, K4G, K4M, K5I, K4L, K3O, K4O, K4Q, K4P, KC_NO }, \ +/* 03 */ { KC_NO, KC_NO, K4B, K4C, K4D, K4E, K5K, K4H, K4I, K4J, K4K, K5L, K5M, K3Q, K3P, K5N }, \ +/* 04 */ { KC_NO, KC_NO, K3B, K3C, K3D, K3E, KC_NO, K3H, K3I, K3J, K3K, K3R, K3S, K3T, K3U, K5O }, \ +/* 05 */ { KC_NO, KC_NO, K2B, K2C, K2D, K2E, K3N, K2H, K2I, K2J, K2K, K1O, K1P, K1Q, K1R, KC_NO }, \ +/* 06 */ { K0E, K1M, K1C, K1D, K1E, K1F, K2N, K1I, K1J, K1K, K2M, K4R, K4S, K4T, K5P, KC_NO }, \ +/* 07 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K1G, K0C, K1H, KC_NO, KC_NO, K1L, K0G, K0H, K4U, K0F, K0D }, \ +} +/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ diff --git a/keyboards/yugo_m/model_m_101/readme.md b/keyboards/yugo_m/model_m_101/readme.md new file mode 100644 index 0000000000..598f0fa79d --- /dev/null +++ b/keyboards/yugo_m/model_m_101/readme.md @@ -0,0 +1,17 @@ +# Yugo-M + +![Yugo-M](https://raw.githubusercontent.com/tomic1785/Yugo-M-controller-project/master/Pictures/rev_09b.jpg) + +A drop-in replacement controller PCB for IBM Model M keyboards, based on the STM32 MCU. [More info on the Yugo-M project repository](https://github.com/tomic1785/Yugo-M-controller-project) + +* Keyboard Maintainer: [Nidzo Tomic](https://github.com/tomic1785) +* Hardware Supported: Yugo-M PCB + * Rev 0.9b + * Rev 1.1b +* Hardware Availability: [Check out the project repository](https://github.com/tomic1785/Yugo-M-controller-project) + +Make example for this keyboard (after setting up your build environment): + + make yugo_m/model_m_101:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/yugo_m/model_m_101/rules.mk b/keyboards/yugo_m/model_m_101/rules.mk new file mode 100644 index 0000000000..6d1c531231 --- /dev/null +++ b/keyboards/yugo_m/model_m_101/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = STM32F303 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/yugo_m/readme.md b/keyboards/yugo_m/readme.md new file mode 100644 index 0000000000..557c4262d5 --- /dev/null +++ b/keyboards/yugo_m/readme.md @@ -0,0 +1,11 @@ +# Yugo-M - An STM32-based IBM Model M controller + +A drop-in replacement controller PCB for IBM Model M keyboards. +Currently available only for 101/102 key keyboards. + +* Keyboard Maintainer: [Nidzo Tomic](https://github.com/tomic1785) +* Hardware Supported: Yugo-M PCB + * Rev 0.9b + * Rev 1.1b + +For more info visit the project repository: [Yugo-M-controller-project](https://github.com/tomic1785/Yugo-M-controller-project) diff --git a/keyboards/yushakobo/quick7/config.h b/keyboards/yushakobo/quick7/config.h index 4fb8ba6d96..b9abd137b8 100644 --- a/keyboards/yushakobo/quick7/config.h +++ b/keyboards/yushakobo/quick7/config.h @@ -192,7 +192,7 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE +#ifndef LTO_ENABLE #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION #endif diff --git a/keyboards/yushakobo/quick7/keymaps/tester/config.h b/keyboards/yushakobo/quick7/keymaps/tester/config.h new file mode 100644 index 0000000000..b9a075bfec --- /dev/null +++ b/keyboards/yushakobo/quick7/keymaps/tester/config.h @@ -0,0 +1,27 @@ +/* +Copyright 2020 yushakobo + +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 . +*/ + +#undef RGBLIGHT_LIMIT_VAL +#define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level */ +#define RGBLIGHT_LAYERS +#define RGBLIGHT_MAX_LAYERS 4 +#define RGBLIGHT_LED_MAP {\ + 0, 1, 2,\ + 5, 4, 3,\ + 6, 7, 8,\ + 9, 10, 11, 12\ +} diff --git a/keyboards/yushakobo/quick7/keymaps/tester/keymap.c b/keyboards/yushakobo/quick7/keymaps/tester/keymap.c new file mode 100644 index 0000000000..57e4a28f30 --- /dev/null +++ b/keyboards/yushakobo/quick7/keymaps/tester/keymap.c @@ -0,0 +1,157 @@ +/* Copyright 2020 yushakobo + * + * 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 QMK_KEYBOARD_H + +#define FAVORITE_COLOR HSV_CYAN + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + YUSHAURL = SAFE_RANGE, + KEY_00, + KEY_01, + KEY_02, + KEY_10, + KEY_11, + KEY_12, + KEY_20, + KEY_21, + KEY_22 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + KEY_00, KEY_01, KEY_02, + KEY_10, KEY_11, KEY_12, + KEY_20, KEY_21, KEY_22 + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KEY_00: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 0); + } else { + rgblight_sethsv_at(HSV_WHITE, 0); + } + break; + case KEY_01: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 1); + } else { + rgblight_sethsv_at(HSV_WHITE, 1); + } + break; + case KEY_02: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 2); + } else { + rgblight_sethsv_at(HSV_WHITE, 2); + } + break; + case KEY_10: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 3); + } else { + rgblight_sethsv_at(HSV_WHITE, 3); + } + break; + case KEY_11: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 4); + } else { + rgblight_sethsv_at(HSV_WHITE, 4); + } + break; + case KEY_12: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 5); + } else { + rgblight_sethsv_at(HSV_WHITE, 5); + } + break; + case KEY_20: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 6); + } else { + rgblight_sethsv_at(HSV_WHITE, 6); + } + break; + case KEY_21: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 7); + } else { + rgblight_sethsv_at(HSV_WHITE, 7); + } + break; + case KEY_22: + if (record->event.pressed) { + rgblight_sethsv_at(FAVORITE_COLOR, 8); + } else { + rgblight_sethsv_at(HSV_WHITE, 8); + } + break; + } + return true; +} + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { // Left encoder + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { // Right encoder + if (clockwise) { + rgblight_decrease_hue_noeeprom(); + } else { + rgblight_increase_hue_noeeprom(); + } + } +} + +const rgblight_segment_t PROGMEM quick7_capslock[] = RGBLIGHT_LAYER_SEGMENTS( + {9,1,FAVORITE_COLOR}, + {12,1,FAVORITE_COLOR} +); +const rgblight_segment_t PROGMEM quick7_numlock[] = RGBLIGHT_LAYER_SEGMENTS( + {10,1,FAVORITE_COLOR}, + {11,1,FAVORITE_COLOR} +); + +const rgblight_segment_t* const PROGMEM quick7_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + quick7_capslock, + quick7_numlock +); + +void keyboard_post_init_user(void){ + rgblight_layers = quick7_rgb_layers; + rgblight_sethsv(HSV_WHITE); +} + +bool led_update_user(led_t led_state){ + rgblight_set_layer_state(0, led_state.caps_lock); + rgblight_set_layer_state(1, led_state.num_lock); + return true; +} \ No newline at end of file diff --git a/keyboards/yushakobo/quick7/keymaps/tester/readme.md b/keyboards/yushakobo/quick7/keymaps/tester/readme.md new file mode 100644 index 0000000000..41ba72ffc0 --- /dev/null +++ b/keyboards/yushakobo/quick7/keymaps/tester/readme.md @@ -0,0 +1,12 @@ +# The default keymap for quick7 + +### Base Layer + +|Left/Right|Clockwise|Counter Clockwise| +|---|---|---| +|Left|Vol+|Vol-| +|Right|RGB HUE-|RGB HUE+| + +No input at all. You can just test how deep the key's actuation point is, and when does the key releases. + +4 underglow LEDs indicates the status of CapsLock and NumLock. diff --git a/keyboards/yushakobo/quick7/keymaps/via/keymap.c b/keyboards/yushakobo/quick7/keymaps/via/keymap.c new file mode 100644 index 0000000000..9c64042bc5 --- /dev/null +++ b/keyboards/yushakobo/quick7/keymaps/via/keymap.c @@ -0,0 +1,84 @@ +/* Copyright 2020 yushakobo + * + * 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 QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FUNC1, + _VIA1, + _VIA2 +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + YUSHAURL = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + KC_MUTE, MO(_FUNC1), RGB_MOD, + S(KC_TAB), KC_UP, KC_TAB, + KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FUNC1] = LAYOUT( + RESET, KC_TRNS, RGB_TOG, + KC_HOME, KC_VOLU, KC_END, + KC_MPRV, KC_VOLD, KC_MNXT + ), + [_VIA1] = LAYOUT( + YUSHAURL,XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX + ), + [_VIA2] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case YUSHAURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://yushakobo.jp/\n"); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { // Left encoder + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { // Right encoder + if (clockwise) { + rgblight_decrease_hue_noeeprom(); + } else { + rgblight_increase_hue_noeeprom(); + } + } +} diff --git a/keyboards/yushakobo/quick7/keymaps/via/readme.md b/keyboards/yushakobo/quick7/keymaps/via/readme.md new file mode 100644 index 0000000000..ff0978780e --- /dev/null +++ b/keyboards/yushakobo/quick7/keymaps/via/readme.md @@ -0,0 +1,27 @@ +# The default VIA keymap for quick7 + +#### Rotary Encoder is not configurable through VIA + +### Base Layer +``` +Left Encoder(CW: Vol+, CCW: Vol-) +Right Encoder(CW: RGB HUE-, CCW: RGB HUE+) +,----------- --------- ------------, +| MUTE | Func1 | RGB MODE | + ----------- --------- ------------ +| Shift+Tab | UP | TAB | + ----------- --------- ------------ +| LEFT | DOWN | RIGHT | +`----------- --------- ------------' +``` + +### Func1 Layer +``` +,----------- --------- ------------, +| RESET | Func1 | RGB TOGGLE | + ----------- --------- ------------ +| HOME | VOL+ | END | + ----------- --------- ------------ +| MEDIA << | VOL- | MEDIA >> | +`----------- --------- ------------' +``` \ No newline at end of file diff --git a/keyboards/yushakobo/quick7/keymaps/via/rules.mk b/keyboards/yushakobo/quick7/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/yushakobo/quick7/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/yushakobo/quick7/readme.md b/keyboards/yushakobo/quick7/readme.md index 5e9f85c248..3c65d46c7f 100644 --- a/keyboards/yushakobo/quick7/readme.md +++ b/keyboards/yushakobo/quick7/readme.md @@ -5,8 +5,11 @@ A simple macropad for the beginners. * Keyboard Maintainer: [yushakobo](https://github.com/yushakobo) -* Hardware Supported: quick7, Pro Micro (ATmega32U4) -* Hardware Availability: (Under Preparation) +* Hardware Supported: quick7 PCB, Pro Micro (ATmega32U4) +* Hardware Availability: [yushakobo Shop](https://yushakobo.jp/shop/quick7/) + +## How to build +* Build guide available [here](https://github.com/yushakobo/build-documents/blob/master/Quick7/Buildguide-en.md). (Japanese build guide is [here](https://github.com/yushakobo/build-documents/blob/master/Quick7/BuildGuide.md).) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/zvecr/split_blackpill/rules.mk b/keyboards/zvecr/split_blackpill/rules.mk index 95d901ee06..6feec7dd97 100644 --- a/keyboards/zvecr/split_blackpill/rules.mk +++ b/keyboards/zvecr/split_blackpill/rules.mk @@ -2,7 +2,6 @@ MCU = STM32F103 # GENERIC STM32F103C8T6 board - stm32duino bootloader -OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader BOARD = STM32_F103_STM32DUINO STM32_BOOTLOADER_ADDRESS = 0x80000000 @@ -32,6 +31,5 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches SPLIT_KEYBOARD = yes SERIAL_DRIVER = usart WS2812_DRIVER = pwm -OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE LAYOUTS = ortho_4x12 diff --git a/keyboards/zvecr/zv48/f401/rules.mk b/keyboards/zvecr/zv48/f401/rules.mk index e41d5ef7a2..950442af96 100644 --- a/keyboards/zvecr/zv48/f401/rules.mk +++ b/keyboards/zvecr/zv48/f401/rules.mk @@ -1,27 +1,5 @@ -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F401xC -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = BLACKPILL_STM32_F401 -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m4 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -USE_FPU = yes -# Address of the booloader in system memory -STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 +# MCU name +MCU = STM32F401 -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -v 0483 -p df11 +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 diff --git a/keyboards/zvecr/zv48/f411/rules.mk b/keyboards/zvecr/zv48/f411/rules.mk index 61add3aed5..4f7f52e62b 100644 --- a/keyboards/zvecr/zv48/f411/rules.mk +++ b/keyboards/zvecr/zv48/f411/rules.mk @@ -1,27 +1,5 @@ -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F4xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F411xE -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f4xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = BLACKPILL_STM32_F411 -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m4 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -USE_FPU = yes -# Address of the booloader in system memory -STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 +# MCU name +MCU = STM32F411 -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -v 0483 -p df11 +# Address of the bootloader in system memory +STM32_BOOTLOADER_ADDRESS = 0x1FFF0000 diff --git a/keyboards/zvecr/zv48/rules.mk b/keyboards/zvecr/zv48/rules.mk index 41ec506e6c..d725f9cb11 100644 --- a/keyboards/zvecr/zv48/rules.mk +++ b/keyboards/zvecr/zv48/rules.mk @@ -22,7 +22,6 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches SPLIT_KEYBOARD = yes SERIAL_DRIVER = usart WS2812_DRIVER = pwm -OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE DEFAULT_FOLDER = zvecr/zv48/f401 diff --git a/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c b/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c index 4b0b33e2c8..0f6bef4e48 100644 --- a/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c +++ b/layouts/community/60_ansi_arrow/mrsendyyk/keymap.c @@ -1,115 +1,105 @@ +/* + * Copyright (C) 2020 Sendy YK . + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* + * 60% ANSI Arrow Keyboard Layout and Keymap + * with RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator + * by Sendy YK . + */ + #include QMK_KEYBOARD_H +enum layer_names { + _BASE, // Default Layer + _FN, // Fn Layer 1 + _SETTINGS // Fn Layer 2 +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* - * Default Layer [0] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [0] = LAYOUT_60_ansi_arrow(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, - 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_RSFT, KC_UP, KC_SLSH, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT - ), - - /* - * Fn Layer [1] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [1] = LAYOUT_60_ansi_arrow(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_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, - KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, - KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, - KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT - ), - - /* - * Fn Layer [2] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │ │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [2] = LAYOUT_60_ansi_arrow(KC_TRNS, KC_TRNS, KC_TRNS, 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_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ) + // Default Layer + [_BASE] = LAYOUT_60_ansi_arrow( + 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, + 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_RSFT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT + ), + // Fn Layer 1 + [_FN] = LAYOUT_60_ansi_arrow( + 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_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, + KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, + KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, + KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT + ), + // Fn Layer 2 + [_SETTINGS] = LAYOUT_60_ansi_arrow( + KC_TRNS, KC_TRNS, KC_TRNS, 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_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) }; void keyboard_post_init_user(void) { - rgblight_enable_noeeprom(); - rgblight_sethsv_noeeprom(0, 0, 0); + rgblight_enable_noeeprom(); + rgblight_sethsv_noeeprom(0, 0, 0); } -/* RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer indicator */ - void update_led(void) { - /* Num Lock Indicator */ - if (host_keyboard_led_state().num_lock) { - rgblight_setrgb(225, 8, 0); - } - /* Scroll Lock Indicator */ - if (host_keyboard_led_state().scroll_lock) { - rgblight_setrgb(0, 100, 255); - } - } +// RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator +void update_led(void) { + // Num Lock Indicator + if (host_keyboard_led_state().num_lock) { + rgblight_setrgb(225, 8, 0); + } + // Scroll Lock Indicator + if (host_keyboard_led_state().scroll_lock) { + rgblight_setrgb(255, 110, 0); + } +} - void led_set_user(uint8_t usb_led) { - /* Caps Lock Indicator */ - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinLow(B2); - rgblight_setrgb(100, 255, 100); +void led_set_user(uint8_t usb_led) { + // Caps Lock Indicator + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B2); + rgblight_setrgb(100, 255, 100); + } + // Layer Indicator + else { + switch (get_highest_layer(layer_state)) { + // Fn Layer 1 Indicator + case _FN: + rgblight_setrgb(100, 255, 100); + break; + // Fn Layer 2 Indicator + case _SETTINGS: + rgblight_setrgb(100, 255, 100); + break; + // Default Layer Indicator + case _BASE: + rgblight_setrgb(0, 0, 0); + break; } - /* Layer Indicator */ - else { - switch (get_highest_layer(layer_state)) { - /* Fn Layer [1] Indicator */ - case 1: - rgblight_setrgb(255, 110, 0); - break; - /* Fn Layer [2] Indicator */ - case 2: - rgblight_setrgb(255, 110, 0); - break; - /* Default Layer [0] Indicator */ - default: - rgblight_setrgb(0, 0, 0); - break; - } - update_led(); - } - } + update_led(); + } +} layer_state_t layer_state_set_user(layer_state_t state) { - update_led(); - return state; + update_led(); + return state; } diff --git a/layouts/community/60_ansi_arrow/mrsendyyk/readme.md b/layouts/community/60_ansi_arrow/mrsendyyk/readme.md index 4ddd6703d7..a6985cfb9c 100644 --- a/layouts/community/60_ansi_arrow/mrsendyyk/readme.md +++ b/layouts/community/60_ansi_arrow/mrsendyyk/readme.md @@ -1,50 +1,88 @@ -# [Sendy YK](https://mr.sendyyk.com)'s 60_ansi_arrow Keymap -`LAYOUT_60_ansi_arrow` with RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer indicator. +# Sendy YK's 60% ANSI Arrow Layout and Keymap -### Default Layer [0] +60% ANSI Arrow keyboard layout and keymap with RGB lighting/LED/underglow as Caps Lock, Num Lock, Scroll Lock, and layer indicator by [Sendy YK](https://mr.sendyyk.com). -``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ -``` +## 60% ANSI Arrow Layout -### Fn Layer [1] -Press and hold *right* **Ctl** key. -``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ -``` +![LAYOUT_60_ansi_arrow](https://raw.githubusercontent.com/mrsendyyk/files/public/qmk/firmware/layouts/community/60_ansi_arrow/mrsendyyk/images/layout-60-ansi-arrow.png) + +## Keymap + +### Default Layer + +![_BASE](https://raw.githubusercontent.com/mrsendyyk/files/public/qmk/firmware/layouts/community/60_ansi_arrow/mrsendyyk/images/layout-60-ansi-arrow-keymap---layer-0.png) + +### Fn Layer 1 + +Press and hold *right* **Ctrl** key. + +![_FN](https://raw.githubusercontent.com/mrsendyyk/files/public/qmk/firmware/layouts/community/60_ansi_arrow/mrsendyyk/images/layout-60-ansi-arrow-keymap---layer-1.png) + +### Fn Layer 2 -### Fn Layer [2] Press and hold *right* **Alt** key. + +![_SETTINGS](https://raw.githubusercontent.com/mrsendyyk/files/public/qmk/firmware/layouts/community/60_ansi_arrow/mrsendyyk/images/layout-60-ansi-arrow-keymap---layer-2.png) + +### RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator + +#### Caps Lock Indicator + +```c + // Caps Lock Indicator + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B2); + rgblight_setrgb(100, 255, 100); + } ``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│ │ │ │ │ │ │ │ │ │ │ │ │ │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│ │ │ │ │ │ │ │ │ │ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + +#### Num Lock Indicator + +```c + // Num Lock Indicator + if (host_keyboard_led_state().num_lock) { + rgblight_setrgb(225, 8, 0); + } ``` + +#### Scroll Lock Indicator +```c + // Scroll Lock Indicator + if (host_keyboard_led_state().scroll_lock) { + rgblight_setrgb(255, 110, 0); + } +``` + +#### Layer Indicator + +```c + // Layer Indicator + else { + switch (get_highest_layer(layer_state)) { + // Fn Layer 1 Indicator + case _FN: + rgblight_setrgb(100, 255, 100); + break; + // Fn Layer 2 Indicator + case _SETTINGS: + rgblight_setrgb(100, 255, 100); + break; + // Default Layer Indicator + case _BASE: + rgblight_setrgb(0, 0, 0); + break; + } + update_led(); + } +``` + +## Build The Firmware + +Make example for keyboard (after setting up your build environment): + + make :mrsendyyk + +More information: +* [Setting Up Your QMK Environment](https://docs.qmk.fm/#/getting_started_build_tools) +* [More Detailed make Instructions](https://docs.qmk.fm/#/getting_started_make_guide) +* [The Complete Newbs Guide To QMK](https://docs.qmk.fm/#/newbs) diff --git a/layouts/community/60_ansi_arrow/mrsendyyk/rules.mk b/layouts/community/60_ansi_arrow/mrsendyyk/rules.mk index 479eb15e24..5c3115dc33 100644 --- a/layouts/community/60_ansi_arrow/mrsendyyk/rules.mk +++ b/layouts/community/60_ansi_arrow/mrsendyyk/rules.mk @@ -1 +1 @@ -USER_NAME := mrsendyyk \ No newline at end of file +USER_NAME := mrsendyyk diff --git a/layouts/community/60_ansi_arrow/readme.md b/layouts/community/60_ansi_arrow/readme.md deleted file mode 100644 index 358740f30e..0000000000 --- a/layouts/community/60_ansi_arrow/readme.md +++ /dev/null @@ -1,114 +0,0 @@ -# 60_ansi_arrow -This is the 60% ANSI Arrow keyboard layout. - -## Requirements - -### 1. Layout Defined -A keyboard's `.h` file needs to have `LAYOUT_60_ansi_arrow` defined -```c -/* - * LAYOUT_60_ansi_arrow - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0e │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │1e │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │2d │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │30 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3c │3d │3e │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │40 │41 │43 │46 │4a │4b │4c │4d │4e │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ -#define LAYOUT_60_ansi_arrow( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ - k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ - k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ - k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3c, k3d, k3e, \ - k40, k41, k43, k46, k4a, k4b, k4c, k4d, k4e \ -) { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO, k0e }, \ - { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ - { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ - { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, KC_NO, k3c, k3d, k3e }, \ - { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, k4b, k4c, k4d, k4e } \ -} -``` - -### 2. Configuring rules.mk -`rules.mk` needs to have the following line: - - LAYOUTS = 60_ansi_arrow - -### 3. Defining a Keymap -A keymap must be defined at - - qmk_firmware/layouts/community/60_ansi_arrow/yourfoldername/keymap.c -This keymap must have a `LAYOUT_60_ansi_arrow` layout defined. -```c -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* - * Default Layer [0] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [0] = LAYOUT_60_ansi_arrow(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, - 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_RSFT, KC_UP, KC_SLSH, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT - ), - - /* - * Fn Layer [1] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [1] = LAYOUT_60_ansi_arrow(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_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, - KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, - KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, - KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT - ), - - /* - * Fn Layer [2] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │ │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [2] = LAYOUT_60_ansi_arrow(KC_TRNS, KC_TRNS, KC_TRNS, 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_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ) -}; -``` diff --git a/layouts/community/ergodox/333fred/config.h b/layouts/community/ergodox/333fred/config.h index 5a91ea3aa4..0509ddbbb9 100644 --- a/layouts/community/ergodox/333fred/config.h +++ b/layouts/community/ergodox/333fred/config.h @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #pragma once #include QMK_KEYBOARD_CONFIG_H diff --git a/layouts/community/ergodox/333fred/keymap.c b/layouts/community/ergodox/333fred/keymap.c index 1345927660..b9aefd9293 100644 --- a/layouts/community/ergodox/333fred/keymap.c +++ b/layouts/community/ergodox/333fred/keymap.c @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" diff --git a/layouts/community/numpad_5x4/mrsendyyk/keymap.c b/layouts/community/numpad_5x4/mrsendyyk/keymap.c new file mode 100644 index 0000000000..7854b12b45 --- /dev/null +++ b/layouts/community/numpad_5x4/mrsendyyk/keymap.c @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2020 Sendy YK . + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Number Pad 5x4 Layout and Keymap by Sendy YK . + +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_numpad_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT + ) +}; diff --git a/layouts/community/numpad_5x4/mrsendyyk/readme.md b/layouts/community/numpad_5x4/mrsendyyk/readme.md new file mode 100644 index 0000000000..a3c8a75283 --- /dev/null +++ b/layouts/community/numpad_5x4/mrsendyyk/readme.md @@ -0,0 +1,22 @@ +# Sendy YK's Numpad 5x4 Layout and Keymap + +Number Pad 5x4 layout and keymap by [Sendy YK](https://mr.sendyyk.com). + +## Numpad 5x4 Layout + +![LAYOUT_numpad_5x4](https://raw.githubusercontent.com/mrsendyyk/files/public/qmk/firmware/layouts/community/numpad_5x4/mrsendyyk/images/layout-numpad-5x4.png) + +## Keymap + +![_BASE](https://raw.githubusercontent.com/mrsendyyk/files/public/qmk/firmware/layouts/community/numpad_5x4/mrsendyyk/images/layout-numpad-5x4-keymap.png) + +## Build The Firmware + +Make example for keyboard (after setting up your build environment): + + make :mrsendyyk + +More information: +* [Setting Up Your QMK Environment](https://docs.qmk.fm/#/getting_started_build_tools) +* [More Detailed make Instructions](https://docs.qmk.fm/#/getting_started_make_guide) +* [The Complete Newbs Guide To QMK](https://docs.qmk.fm/#/newbs) diff --git a/layouts/community/numpad_5x4/mrsendyyk/rules.mk b/layouts/community/numpad_5x4/mrsendyyk/rules.mk new file mode 100644 index 0000000000..5c3115dc33 --- /dev/null +++ b/layouts/community/numpad_5x4/mrsendyyk/rules.mk @@ -0,0 +1 @@ +USER_NAME := mrsendyyk diff --git a/layouts/community/ortho_4x12/callum/config.h b/layouts/community/ortho_4x12/callum/config.h new file mode 100644 index 0000000000..8034fe51b6 --- /dev/null +++ b/layouts/community/ortho_4x12/callum/config.h @@ -0,0 +1,14 @@ +#pragma once + +#define LAYOUT_callum( \ + KEY00, KEY01, KEY02, KEY03, KEY04, KEY05, KEY06, KEY07, KEY08, KEY09, \ + KEY10, KEY11, KEY12, KEY13, KEY14, KEY15, KEY16, KEY17, KEY18, KEY19, \ + KEY20, KEY21, KEY22, KEY23, KEY24, KEY25, KEY26, KEY27, KEY28, KEY29, \ + KEY30, KEY31, KEY32, KEY33 \ +) \ +LAYOUT_ortho_4x12( \ + KEY00, KEY01, KEY02, KEY03, KEY04, KC_NO, KC_NO, KEY05, KEY06, KEY07, KEY08, KEY09, \ + KEY10, KEY11, KEY12, KEY13, KEY14, KC_NO, KC_NO, KEY15, KEY16, KEY17, KEY18, KEY19, \ + KEY20, KEY21, KEY22, KEY23, KEY24, KC_NO, KC_NO, KEY25, KEY26, KEY27, KEY28, KEY29, \ + KC_NO, KC_NO, KC_NO, KEY30, KEY31, KC_NO, KC_NO, KEY32, KEY33, KC_NO, KC_NO, KC_NO \ +) diff --git a/layouts/community/ortho_4x12/callum/keymap.c b/layouts/community/ortho_4x12/callum/keymap.c new file mode 100644 index 0000000000..acff75905d --- /dev/null +++ b/layouts/community/ortho_4x12/callum/keymap.c @@ -0,0 +1 @@ +// Intentionally empty. See /users/callum/readme.md. diff --git a/layouts/community/ortho_4x12/ddeklerk/keymap.c b/layouts/community/ortho_4x12/ddeklerk/keymap.c new file mode 100644 index 0000000000..ec36a50616 --- /dev/null +++ b/layouts/community/ortho_4x12/ddeklerk/keymap.c @@ -0,0 +1,78 @@ +/* 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 QMK_KEYBOARD_H + +enum layers { + _BASE, + _GAME, + _FN1, + _FN2, + _FN3, + _ADJUST +}; + +#define BASE DF(_BASE) +#define GAME DF(_GAME) +#define FN1 LT(_FN1, KC_BSPC) +#define FN2 LT(_FN2, KC_ENT) +#define FN3SPC LT(_FN3, KC_SPC) + +#define CTRLESC MT(MOD_LCTL, KC_ESC) +#define CTRLMIN MT(MOD_RCTL, KC_MINS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_ortho_4x12( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, XXXXXXX, + CTRLESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, CTRLMIN, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + XXXXXXX, XXXXXXX, XXXXXXX, KC_LGUI, FN1, FN3SPC, FN3SPC, FN2, KC_RALT, XXXXXXX, XXXXXXX, XXXXXXX + ), + [_GAME] = LAYOUT_ortho_4x12( + KC_3, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_2, CTRLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_BSPC, + KC_1, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_UP, KC_ENT, + XXXXXXX, KC_LALT, XXXXXXX, XXXXXXX, _______, KC_SPC, XXXXXXX, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN1] = LAYOUT_ortho_4x12( + 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_FN2] = LAYOUT_ortho_4x12( + KC_GRV, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LCBR, KC_RCBR, KC_QUES, KC_PLUS, _______, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_LBRC, KC_RBRC, KC_SLSH, KC_EQL, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_FN3] = LAYOUT_ortho_4x12( + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_BSPC, _______, + _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, KC_APP, _______, _______, _______, _______, KC_PGDN, KC_DEL, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_ADJUST] = LAYOUT_ortho_4x12( + XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, GAME, BASE, 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 + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _FN1, _FN2, _ADJUST); +}; diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index 699f94f67f..63a0494742 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -4,59 +4,74 @@ enum layers { _QWERTY, _RAISE, _LOWER, + _FN, }; #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) +#define FN MO(_FN) +#define TGLOWER TG(LOWER) #define TGRAISE TG(_RAISE) -#define RALT_QU RALT_T(KC_QUOT) +#define RALTDEL RALT_T(KC_DEL) static bool is_ctl_pressed; -static bool is_tab_pressed; +static bool is_esc_pressed; static bool is_bspc_pressed; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_ortho_4x12 ( // ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ - 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_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,RALT_QU, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_ENT, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_ENT, + KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_UP, KC_SLSH, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - KC_LCTL,KC_LGUI,KC_LALT,KC_DEL, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT + KC_LCTL,KC_LGUI,KC_LALT,FN, LOWER, KC_SPC, KC_SPC, RAISE, RALTDEL,KC_LEFT,KC_DOWN,KC_RGHT // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), -[_RAISE] = LAYOUT_ortho_4x12 ( -// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ - _______,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_MINS,KC_EQL, KC_LBRC,KC_RBRC,KC_BSLS, -// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_GRV, _______,_______,_______,_______, -// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,_______,_______,_______,_______,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP,KC_END -// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ -), - [_LOWER] = LAYOUT_ortho_4x12 ( // ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ - _______,KC_EXLM,KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,_______, + KC_TILD,KC_EXLM,KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,_______, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,KC_VOLD,KC_MUTE,KC_VOLU,DM_REC1,DM_REC2,DM_RSTP,KC_UNDS,KC_PLUS,KC_LCBR,KC_RCBR,KC_PIPE, + _______,KC_VOLD,KC_MUTE,KC_VOLU,KC_HOME,KC_PGUP,KC_LCBR,KC_RCBR,KC_PIPE,KC_DQUO,_______,_______, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,KC_MPRV,KC_MPLY,KC_MNXT,DM_PLY1,DM_PLY2,KC_CAPS,KC_TILD,KC_WH_D,KC_BTN1,KC_BTN2,KC_WH_U, + _______,KC_MPRV,KC_MPLY,KC_MNXT,KC_END, KC_PGDN,KC_UNDS,KC_PLUS,KC_WH_U,KC_BTN1,KC_MS_U,KC_BTN2, // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ - _______,_______,_______,_______,_______,_______,TGRAISE,_______,KC_MS_L,KC_MS_D,KC_MS_U,KC_MS_R + _______,_______,_______,_______,_______,_______,_______,_______,KC_WH_D,KC_MS_L,KC_MS_D,KC_MS_R // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), +[_RAISE] = LAYOUT_ortho_4x12 ( +// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + KC_CAPS,_______,_______,_______,_______,_______,KC_LBRC,KC_RBRC,KC_BSLS,KC_QUOT,_______,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,DM_REC1,DM_REC2,DM_RSTP,DM_PLY1,DM_PLY2,KC_MINS,KC_EQL, _______,_______,_______,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ +// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ +), + +[_FN] = LAYOUT_ortho_4x12 ( +// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ + _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_PSCR,KC_INS, KC_P7, KC_P8, KC_P9, KC_PMNS,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,KC_F5, KC_F6, KC_F7, KC_F8, KC_SLCK,KC_APP, KC_P4, KC_P5, KC_P6, KC_PPLS,KC_PENT, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS,KC_NLCK,KC_P1, KC_P2, KC_P3, KC_PAST,KC_PSLS, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,_______,_______,_______,TGLOWER,_______,_______,TGRAISE,KC_P0, KC_PDOT,KC_LPRN,KC_RPRN +// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ +), }; layer_state_t layer_state_set_user(layer_state_t state) { #ifdef JOTANCK_LEDS + writePin(JOTANCK_LED1, (get_highest_layer(state) == _LOWER)); writePin(JOTANCK_LED2, (get_highest_layer(state) == _RAISE)); #endif return state; @@ -67,20 +82,16 @@ bool led_update_user(led_t led_state) { if (!led_state.num_lock) { tap_code(KC_NUMLOCK); } - #ifdef JOTANCK_LEDS - // CapsLock led - writePin(JOTANCK_LED1, led_state.caps_lock); - #endif return true; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { + switch (keycode) { case KC_LCTL: is_ctl_pressed = record->event.pressed; break; - case KC_TAB: - is_tab_pressed = record->event.pressed; + case KC_ESC: + is_esc_pressed = record->event.pressed; break; case KC_BSPC: is_bspc_pressed = record->event.pressed; @@ -90,7 +101,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void matrix_scan_user(void) { - if (is_ctl_pressed && is_tab_pressed && is_bspc_pressed) { + if (is_ctl_pressed && is_esc_pressed && is_bspc_pressed) { reset_keyboard(); } } diff --git a/layouts/community/ortho_4x12/junonum/keymap.c b/layouts/community/ortho_4x12/junonum/keymap.c index 619de0d782..e5eab8848b 100644 --- a/layouts/community/ortho_4x12/junonum/keymap.c +++ b/layouts/community/ortho_4x12/junonum/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, CTRLTAB, 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, SHIFTEN, - _______, KC_LCTL, KC_LGUI, KC_LALT, LOWER, SPACEFN, SPACEFN, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + _______, KC_LCTL, KC_LGUI, KC_LALT, LOWER, SPACEFN, SPACEFN, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT ), [_COLEMAK] = LAYOUT_ortho_4x12( @@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_RAISE] = LAYOUT_ortho_4x12( - KC_GRV, _______, _______, KC_LBRC, KC_RBRC, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, + KC_GRV, _______, _______, KC_LBRC, KC_RBRC, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, KC_LCBR, KC_RCBR, _______, _______, KC_4, KC_5, KC_6, KC_MINUS, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_EQUAL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY @@ -125,8 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float dpad_song_off[][2] = SONG(MAJOR_SOUND); #endif -// Disable LED on Rev6 -#ifdef KEYBOARD_planck_rev6 +#ifndef BACKLIGHT_ENABLE layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/layouts/community/ortho_4x12/junonum/rules.mk b/layouts/community/ortho_4x12/junonum/rules.mk index e206273f82..9f5d7e9862 100644 --- a/layouts/community/ortho_4x12/junonum/rules.mk +++ b/layouts/community/ortho_4x12/junonum/rules.mk @@ -1,9 +1,13 @@ SRC += muse.c -ifeq ($(strip $(KEYBOARD)), planck/rev6) - BACKLIGHT_ENABLE = no -else +ifeq ($(strip $(KEYBOARD)),$(filter $(strip $(KEYBOARD)), planck/rev2 planck/rev3 planck/rev4 planck/rev5)) BACKLIGHT_ENABLE = yes +else + BACKLIGHT_ENABLE = no +endif + +ifeq ($(strip $(KEYBOARD)), vitamins_included/rev1) + NKRO_ENABLE = no endif MIDI_ENABLE=no diff --git a/layouts/community/ortho_5x12/333fred/config.h b/layouts/community/ortho_5x12/333fred/config.h index 2e5dfe2e29..bdbeead547 100644 --- a/layouts/community/ortho_5x12/333fred/config.h +++ b/layouts/community/ortho_5x12/333fred/config.h @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #pragma once #define USE_SERIAL diff --git a/layouts/community/ortho_5x12/333fred/keymap.c b/layouts/community/ortho_5x12/333fred/keymap.c index a228a49d4e..e270b40893 100644 --- a/layouts/community/ortho_5x12/333fred/keymap.c +++ b/layouts/community/ortho_5x12/333fred/keymap.c @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include QMK_KEYBOARD_H #include "333fred.h" diff --git a/layouts/community/ortho_5x12/riblee/config.h b/layouts/community/ortho_5x12/riblee/config.h new file mode 100644 index 0000000000..8dbff5e10e --- /dev/null +++ b/layouts/community/ortho_5x12/riblee/config.h @@ -0,0 +1,18 @@ +/* Copyright 2020 Janos Daniel Reibl @riblee + * + * 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 . + */ + +#pragma once +#define UNICODE_SELECTED_MODES UC_MAC, UC_LNX diff --git a/layouts/community/ortho_5x12/riblee/keymap.c b/layouts/community/ortho_5x12/riblee/keymap.c new file mode 100644 index 0000000000..ba5eb07b83 --- /dev/null +++ b/layouts/community/ortho_5x12/riblee/keymap.c @@ -0,0 +1,163 @@ +/* Copyright 2020 Janos Daniel Reibl @riblee + * + * 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 "riblee.h" + + +// Tap Dance definitions +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_A] = ACTION_TAP_DANCE_FN(dance_key_a), + [TD_E] = ACTION_TAP_DANCE_FN(dance_key_e), + [TD_I] = ACTION_TAP_DANCE_FN(dance_key_i), + [TD_O] = ACTION_TAP_DANCE_FN(dance_key_o), + [TD_U] = ACTION_TAP_DANCE_FN(dance_key_u), +}; + +// Tap Dance keys +#define C_KC_A TD(TD_A) +#define C_KC_E TD(TD_E) +#define C_KC_I TD(TD_I) +#define C_KC_O TD(TD_O) +#define C_KC_U TD(TD_U) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | 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 |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_5x12( + 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_TAB, KC_Q, KC_W, C_KC_E, KC_R, KC_T, KC_Y, C_KC_U, C_KC_I, C_KC_O, KC_P, KC_DEL, + KC_ESC, C_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 + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | 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] = LAYOUT_ortho_5x12( + 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_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, 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_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 + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | 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] = LAYOUT_ortho_5x12( + 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_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, 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_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 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | BTN1 | BTN2 | | MS_L | MS_D | MS_U | MS_R | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x12( + 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_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_BTN1, KC_BTN2, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x12( + 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_LSFT, 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 +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Reset |Debug | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | |Mu mod|Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | NKRO | Swap |Un swp|UC Mod| | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_5x12( + 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, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, LCG_SWP, LCG_NRM, UC_MOD, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; \ No newline at end of file diff --git a/layouts/community/ortho_5x12/riblee/readme.md b/layouts/community/ortho_5x12/riblee/readme.md new file mode 100644 index 0000000000..231f7afd35 --- /dev/null +++ b/layouts/community/ortho_5x12/riblee/readme.md @@ -0,0 +1,85 @@ +# Riblee preonic + +This layout is modified to support accent Hungarian keys via Unicode and Tap Dance + +``` + +Qwerty +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | W | E | R | T | Y | U | I | O | P | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| 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 |Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' + +Colemak +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| 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 | +`-----------------------------------------------------------------------------------' + +Dvorak +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | " | , | . | P | Y | F | G | C | R | L | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| 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 | +`-----------------------------------------------------------------------------------' + +Lower +,-----------------------------------------------------------------------------------. +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | +|------+------+------+------+------+-------------+------+------+------+------+------| +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | BTN1 | BTN2 | | MS_L | MS_D | MS_U | MS_R | +`-----------------------------------------------------------------------------------' + +Raise +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | +|------+------+------+------+------+------+------+------+------+------+------+------| +| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' + +Adjust (Lower + Raise) +,-----------------------------------------------------------------------------------. +| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +|------+------+------+------+------+------+------+------+------+------+------+------| +| |Reset |Debug | | | | | | | | | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | |Mu mod|Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | | | | | NKRO | Swap |Un swp|UC Mod| | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | +`-----------------------------------------------------------------------------------' + +``` \ No newline at end of file diff --git a/layouts/community/ortho_5x12/riblee/rules.mk b/layouts/community/ortho_5x12/riblee/rules.mk new file mode 100644 index 0000000000..517f2700e1 --- /dev/null +++ b/layouts/community/ortho_5x12/riblee/rules.mk @@ -0,0 +1,2 @@ +UNICODE_ENABLE = yes +TAP_DANCE_ENABLE = yes \ No newline at end of file diff --git a/layouts/community/ortho_5x12/xyverz/keymap.c b/layouts/community/ortho_5x12/xyverz/keymap.c index 00fca1b48e..22147c3a0a 100644 --- a/layouts/community/ortho_5x12/xyverz/keymap.c +++ b/layouts/community/ortho_5x12/xyverz/keymap.c @@ -8,6 +8,9 @@ enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LOWER, RAISE, ADJUS #define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. #define RGB_SWR RGB_M_SW // Swirl Animation alias #define RGB_SNK RGB_M_SN // Snake Animation alias +#define MACLOCK LGUI(LCTL(KC_Q)) // Lock my MacBook! +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -18,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | - | A | S | D | F | G | H | J | K | L | ; | " | + * | ` | A | S | D | F | G | H | J | K | L | ; | " | * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -26,16 +29,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_QWERTY] = LAYOUT_ortho_5x12 ( \ - 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_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_GRV, 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_RSFT, \ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ ), /* Colemak * ,-----------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Grv | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -47,9 +50,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_COLEMAK] = LAYOUT_ortho_5x12 ( \ - 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_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, \ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, 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_BSPC, 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_RSFT, \ KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ ), @@ -60,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Tab | " | , | . | P | Y | F | G | C | R | L | / | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | - | + * | ` | A | O | E | U | I | D | H | T | N | S | - | * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -68,9 +71,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_DVORAK] = LAYOUT_ortho_5x12 ( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ 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_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_GRV, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ 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_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ ), @@ -127,7 +130,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * |RGB ON| MODE |RGB SW|RGB KN|RGB GR| HUE- | HUE+ | HUE- | SAT+ | SAT- | VAL+ | VAL- | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | + * | | | | | | | | | | |MACLCK| * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_ortho_5x12 ( \ @@ -135,7 +138,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, RGB_M_P, RGB_M_B, RGB_M_R, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ RGB_TOG, RGB_MOD, RGB_SWR, RGB_M_K, RGB_M_G, RGB_HUI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MACLOCK \ ) }; diff --git a/layouts/community/split_3x6_3/ddeklerk/keymap.c b/layouts/community/split_3x6_3/ddeklerk/keymap.c new file mode 100644 index 0000000000..6ffc5732cf --- /dev/null +++ b/layouts/community/split_3x6_3/ddeklerk/keymap.c @@ -0,0 +1,78 @@ +/* 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 QMK_KEYBOARD_H + +enum layers { + _BASE, + _GAME, + _FN1, + _FN2, + _FN3, + _ADJUST +}; + +#define BASE DF(_BASE) +#define GAME DF(_GAME) +#define FN1 LT(_FN1, KC_BSPC) +#define FN2 LT(_FN2, KC_ENT) +#define FN3SPC LT(_FN3, KC_SPC) + +#define CTRLESC MT(MOD_LCTL, KC_ESC) +#define CTRLMIN MT(MOD_RCTL, KC_MINS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_split_3x6_3( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, XXXXXXX, + CTRLESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, CTRLMIN, + 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_LGUI, FN1, FN3SPC, FN3SPC, FN2, KC_RALT + ), + [_GAME] = LAYOUT_split_3x6_3( + KC_3, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_BSPC, + KC_2, CTRLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_UP, KC_ENT, + KC_1, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_LEFT, KC_DOWN, KC_RGHT, + KC_LALT, _______, KC_SPC, _______, _______, _______ + ), + [_FN1] = LAYOUT_split_3x6_3( + 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + [_FN2] = LAYOUT_split_3x6_3( + KC_GRV, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LCBR, KC_RCBR, KC_QUES, KC_PLUS, _______, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_LBRC, KC_RBRC, KC_SLSH, KC_EQL, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + [_FN3] = LAYOUT_split_3x6_3( + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_BSPC, _______, + _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, KC_APP, _______, _______, _______, _______, KC_PGDN, KC_DEL, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + [_ADJUST] = LAYOUT_split_3x6_3( + XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, GAME, BASE, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _FN1, _FN2, _ADJUST); +}; diff --git a/layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c b/layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c index acbf16ad93..75f2f1a7cb 100644 --- a/layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c +++ b/layouts/default/60_ansi_arrow/default_60_ansi_arrow/keymap.c @@ -1,67 +1,53 @@ +/* + * Copyright (C) 2020 Sendy YK . + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Default 60% ANSI Arrow Keyboard Layout and Keymap by Sendy YK . + #include QMK_KEYBOARD_H -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* - * Default Layer [0] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [0] = LAYOUT_60_ansi_arrow(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, - 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_RSFT, KC_UP, KC_SLSH, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT - ), - - /* - * Fn Layer [1] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [1] = LAYOUT_60_ansi_arrow(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_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, - KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, - KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, - KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT - ), - - /* - * Fn Layer [2] - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ - * │ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ - * │ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ - * │ │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ - */ - [2] = LAYOUT_60_ansi_arrow(KC_TRNS, KC_TRNS, KC_TRNS, 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_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ) +enum layer_names { + _BASE, // Default Layer + _FN, // Fn Layer 1 + _SETTINGS // Fn Layer 2 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default Layer + [_BASE] = LAYOUT_60_ansi_arrow( + 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, + 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_RSFT, KC_UP, KC_SLSH, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT + ), + // Fn Layer 1 + [_FN] = LAYOUT_60_ansi_arrow( + 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_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT, + KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, + KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS, + KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT + ), + // Fn Layer 2 + [_SETTINGS] = LAYOUT_60_ansi_arrow( + KC_TRNS, KC_TRNS, KC_TRNS, 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_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) }; diff --git a/layouts/default/60_ansi_arrow/info.json b/layouts/default/60_ansi_arrow/info.json index 6bd85a6b9c..639433ea7a 100644 --- a/layouts/default/60_ansi_arrow/info.json +++ b/layouts/default/60_ansi_arrow/info.json @@ -1,7 +1,7 @@ { "keyboard_name": "60% ANSI Arrow Layout", - "url": "", - "maintainer": "qmk", + "url": "https://mr.sendyyk.com", + "maintainer": "Sendy YK ", "width": 15, "height": 5, "layouts": { diff --git a/layouts/default/60_ansi_arrow/readme.md b/layouts/default/60_ansi_arrow/readme.md index 8d6e6c4553..76c5cb4994 100644 --- a/layouts/default/60_ansi_arrow/readme.md +++ b/layouts/default/60_ansi_arrow/readme.md @@ -1,50 +1,36 @@ -# 60_ansi_arrow -`LAYOUT_60_ansi_arrow` +# 60_ansi_arrow and Keymap -### Default Layer [0] +Default 60% ANSI Arrow keyboard layout and keymap by [Sendy YK](https://mr.sendyyk.com). -``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│Esc│1 │2 │3 │4 │5 │6 │7 │8 │9 │0 │- │= │Bspc │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│Tab │Q │W │E │R │T │Y │U │I │O │P │[ │] │\ │ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│Caps L│A │S │D │F │G │H │J │K │L │; │' │Enter │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│Shift │Z │X │C │V │B │N │M │, │. │Shift │↑ │/ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│Ctl │OS │Alt │ Space │Alt│Ctl│← │↓ │→ │ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ -``` +## 60% ANSI Arrow Layout -### Fn Layer [1] -Press and hold *right* **Ctl** key. -``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│` │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Delete │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│Bri+ │ │ │End│Rst│ │ │ │Ins│ │P S│ │ │Eject│ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│Bri- │ │S L│ │ │ │Hm │ │ │ │ │ │Mute │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│Vol+ │ │ │Cal│ │ │N L│Ml │ │ │Pause │P U│ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│Vol-│Rwd │F FD│ Play │Stp│ │Prv│P D│Nxt│ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ -``` +![LAYOUT_60_ansi_arrow](https://raw.githubusercontent.com/mrsendyyk/files/public/qmk/firmware/layouts/community/60_ansi_arrow/mrsendyyk/images/layout-60-ansi-arrow.png) + +## Keymap + +### Default Layer + +![_BASE](https://raw.githubusercontent.com/mrsendyyk/files/public/qmk/firmware/layouts/community/60_ansi_arrow/mrsendyyk/images/layout-60-ansi-arrow-keymap---layer-0.png) + +### Fn Layer 1 + +Press and hold *right* **Ctrl** key. + +![_FN](https://raw.githubusercontent.com/mrsendyyk/files/public/qmk/firmware/layouts/community/60_ansi_arrow/mrsendyyk/images/layout-60-ansi-arrow-keymap---layer-1.png) + +### Fn Layer 2 -### Fn Layer [2] Press and hold *right* **Alt** key. -``` -┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ -│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ -│ │R T│R M│Hu+│Hu-│Sa+│Sa-│Br+│Br-│ │ │ │ │ │ -├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ -│ │ │ │ │ │ │ │ │ │ │ │ │ │ -├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ -│ │ │ │ │BL-│B T│BL+│B C│ │ │ │ │ │ -├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ -│ │ │ │ │ │ │ │ │ │ -└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ -``` + +![_SETTINGS](https://raw.githubusercontent.com/mrsendyyk/files/public/qmk/firmware/layouts/community/60_ansi_arrow/mrsendyyk/images/layout-60-ansi-arrow-keymap---layer-2.png) + +## Build The Firmware + +Make example for keyboard (after setting up your build environment): + + make :default_60_ansi_arrow + +More information: +* [Setting Up Your QMK Environment](https://docs.qmk.fm/#/getting_started_build_tools) +* [More Detailed make Instructions](https://docs.qmk.fm/#/getting_started_make_guide) +* [The Complete Newbs Guide To QMK](https://docs.qmk.fm/#/newbs) diff --git a/layouts/default/64_ansi/default_64_ansi/keymap.c b/layouts/default/64_ansi/default_64_ansi/keymap.c new file mode 100644 index 0000000000..ff1356e953 --- /dev/null +++ b/layouts/default/64_ansi/default_64_ansi/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2020 noroadsleft + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_64_ansi( + 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, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_64_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, KC_DEL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, MO(2), KC_HOME, KC_PGDN, KC_END + ), + [2] = LAYOUT_64_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/layouts/default/64_ansi/info.json b/layouts/default/64_ansi/info.json new file mode 100644 index 0000000000..f30a94e3c2 --- /dev/null +++ b/layouts/default/64_ansi/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "60% 64-key ANSI Layout", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_64_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + {"x":5, "y":3}, + {"x":6, "y":3}, + {"x":7, "y":3}, + {"x":8, "y":3}, + {"x":9, "y":3}, + {"x":10, "y":3}, + {"x":11, "y":3}, + {"x":12, "y":3}, + {"x":13, "y":3}, + {"x":14, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4} + ] + } + } +} diff --git a/layouts/community/60_ansi_arrow/layout.json b/layouts/default/64_ansi/layout.json similarity index 60% rename from layouts/community/60_ansi_arrow/layout.json rename to layouts/default/64_ansi/layout.json index 7fc631c3d1..6fc5bbe700 100644 --- a/layouts/community/60_ansi_arrow/layout.json +++ b/layouts/default/64_ansi/layout.json @@ -1,6 +1,5 @@ -[{a:7},"","","","","","","","","","","","","",{w:2},""], +["","","","","","","","","","","","","",{w:2},""], [{w:1.5},"","","","","","","","","","","","","",{w:1.5},""], [{w:1.75},"","","","","","","","","","","","",{w:2.25},""], -[{w:2.25},"","","","","","","","","","",{w:1.75},"","",""], +[{w:2},"","","","","","","","","","","","","",""], [{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"","","","","",""] - \ No newline at end of file diff --git a/layouts/default/64_ansi/readme.md b/layouts/default/64_ansi/readme.md new file mode 100644 index 0000000000..5fd079d499 --- /dev/null +++ b/layouts/default/64_ansi/readme.md @@ -0,0 +1,14 @@ +# 64_ansi + + LAYOUT_64_ansi + ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┬───┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├────┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┼───┤ + │ │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ diff --git a/layouts/default/64_iso/default_64_iso/keymap.c b/layouts/default/64_iso/default_64_iso/keymap.c new file mode 100644 index 0000000000..a0ac1a1511 --- /dev/null +++ b/layouts/default/64_iso/default_64_iso/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2020 noroadsleft + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_64_iso( + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_64_iso( + 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_PSCR, KC_SLCK, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, MO(2), KC_HOME, KC_PGDN, KC_END + ), + [2] = LAYOUT_64_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/layouts/default/64_iso/info.json b/layouts/default/64_iso/info.json new file mode 100644 index 0000000000..cc27984837 --- /dev/null +++ b/layouts/default/64_iso/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "60% \"64-key\" ISO Layout", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_64_iso": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + {"x":5, "y":3}, + {"x":6, "y":3}, + {"x":7, "y":3}, + {"x":8, "y":3}, + {"x":9, "y":3}, + {"x":10, "y":3}, + {"x":11, "y":3}, + {"x":12, "y":3}, + {"x":13, "y":3}, + {"x":14, "y":3}, + + {"x":0, "y":4, "w":1.25}, + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"x":10, "y":4}, + {"x":11, "y":4}, + {"x":12, "y":4}, + {"x":13, "y":4}, + {"x":14, "y":4} + ] + } + } +} diff --git a/layouts/default/64_iso/layout.json b/layouts/default/64_iso/layout.json new file mode 100644 index 0000000000..8754c4d946 --- /dev/null +++ b/layouts/default/64_iso/layout.json @@ -0,0 +1,5 @@ +["","","","","","","","","","","","","",{w:2},""], +[{w:1.5},"","","","","","","","","","","","","",{w:1.5,w2:1.25,h2:2,x2:0.25},""], +[{w:1.75},"","","","","","","","","","","","",""], +["","","","","","","","","","","","","","",""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"","","","","",""] diff --git a/layouts/default/64_iso/readme.md b/layouts/default/64_iso/readme.md new file mode 100644 index 0000000000..f487382f09 --- /dev/null +++ b/layouts/default/64_iso/readme.md @@ -0,0 +1,14 @@ +# 64_iso + + LAYOUT_64_iso + ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├───┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + ├───┴┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┼───┤ + │ │ │ │ │ │ │ │ │ │ + └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ diff --git a/layouts/default/readme.md b/layouts/default/readme.md new file mode 100644 index 0000000000..881b1ec5bd --- /dev/null +++ b/layouts/default/readme.md @@ -0,0 +1,704 @@ +# Community Layouts + +## Summary of Layouts + +### 60% Form Factor + +``` +LAYOUT_60_abnt2 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬──┴─┬────┤ +│ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ +``` + +``` +LAYOUT_60_ansi +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ +│ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ +``` + +``` +LAYOUT_60_ansi_arrow +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_60_ansi_split_bs_rshift +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤ +│ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ +``` + +``` +LAYOUT_60_ansi_tsangan +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─────┤ +│ │ │ │ │ │ │ │ +└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ +``` + +``` +LAYOUT_60_hhkb +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +└─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ + │ │ │ │ │ │ + └───┴─────┴───────────────────────────┴─────┴───┘ +``` + +``` +LAYOUT_60_iso +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ +│ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ +``` + +``` +LAYOUT_60_iso_split_bs_rshift +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤ +│ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ +``` + +``` +LAYOUT_60_iso_tsangan +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┴┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─────┤ +│ │ │ │ │ │ │ │ +└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ +``` + +``` +LAYOUT_60_tsangan_hhkb +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┤ +│ │ │ │ │ │ │ │ +└─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ +``` + +``` +LAYOUT_64_ansi +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┬───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_64_iso +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +``` + +### 65%+ Form Factor + +``` +LAYOUT_65_ansi +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_65_ansi_blocker +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ +``` + +``` +LAYOUT_65_ansi_blocker_split_bs +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ +``` + +``` +LAYOUT_65_ansi_blocker_tsangan +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬─┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ +└─────┴───┴─────┴───────────────────────────┴─────┘ └───┴───┴───┘ +``` + +``` +LAYOUT_65_iso +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_65_iso_blocker +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ +``` + +``` +LAYOUT_66_ansi +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┘ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┬─┴─┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┼───┴┬──┴───┴───┴───┴───┴───┴─┬─┴──┬┴───┼────┬───┼───┼───┐ +│ │ │ │ │ │ │ │ │ │ │ +└────┴───┴────┴────────────────────────┴────┴────┴────┴───┴───┴───┘ +``` + +``` +LAYOUT_66_iso +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ └───┘ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┬─┴─┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┼───┴┬──┴───┴───┴───┴───┴───┴─┬─┴──┬┴───┼────┬───┼───┼───┐ +│ │ │ │ │ │ │ │ │ │ │ +└────┴───┴────┴────────────────────────┴────┴────┴────┴───┴───┴───┘ +``` + +``` +LAYOUT_68_ansi +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┴───┘ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤┌───┐ +│ │ │ │ │ │ │ │ │ │ │ │ ││ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬─┬──┴┼───┼───┐ +│ │ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┘ └───┴───┴───┘ +``` + +``` +LAYOUT_68_iso +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │└───┴───┘ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤┌───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ ││ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬─┬──┴┼───┼───┐ +│ │ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┘ └───┴───┴───┘ +``` + +### 75% Form Factor + +``` +LAYOUT_75_ansi +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_75_iso +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┴───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ +``` + +### Tenkeyless Layouts + +``` +LAYOUT_tkl_ansi +┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ +``` + +``` +LAYOUT_tkl_iso +┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ └───┴───┴───┘ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ +``` + +### Fullsize Form Factor + +``` +LAYOUT_fullsize_ansi +┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐ ├───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ +``` + +``` +LAYOUT_fullsize_iso +┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │ └───┴───┴───┘ ├───┼───┼───┤ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ +``` + + +### Split Layouts + +``` +LAYOUT_ergodox +┌─────┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬─────┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┼───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┼─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├─────┼───┼───┼───┼───┼───┤ │ │ ├───┼───┼───┼───┼───┼─────┤ +│ │ │ │ │ │ ├───┤ ├───┤ │ │ │ │ │ │ +├─────┼───┼───┼───┼───┼───┤ │ │ ├───┼───┼───┼───┼───┼─────┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└─┬───┼───┼───┼───┼───┼───┴───┘ └───┴───┼───┼───┼───┼───┼───┬─┘ + │ │ │ │ │ │ ┌───┬───┐ ┌───┬───┐ │ │ │ │ │ │ + └───┴───┴───┴───┴───┘ │ │ │ │ │ │ └───┴───┴───┴───┴───┘ + ┌───┼───┼───┤ ├───┼───┼───┐ + │ │ │ │ │ │ │ │ + │ │ ├───┤ ├───┤ │ │ + │ │ │ │ │ │ │ │ + └───┴───┴───┘ └───┴───┴───┘ +``` + +``` +LAYOUT_split_3x5_3 +┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘ + ┌───┬───┬───┐ ┌───┬───┬───┐ + │ │ │ │ │ │ │ │ + └───┴───┴───┘ └───┴───┴───┘ +``` + +``` +LAYOUT_split_3x6_3 +┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┴───┘ + ┌───┬───┬───┐ ┌───┬───┬───┐ + │ │ │ │ │ │ │ │ + └───┴───┴───┘ └───┴───┴───┘ +``` + +### Numpads + +``` +LAYOUT_numpad_4x4 +┌───┬───┬───┬───┐ +│ │ │ │ │ +├───┼───┼───┤ │ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┴───┼───┤ │ +│ │ │ │ +└───────┴───┴───┘ +``` + +``` +LAYOUT_numpad_5x4 +┌───┬───┬───┬───┐ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┤ │ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┴───┼───┤ │ +│ │ │ │ +└───────┴───┴───┘ +``` + +``` +LAYOUT_numpad_5x6 +┌───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ +├───┼───┼───┼───┼───┤ │ +│ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ +├───┼───┼───┴───┼───┤ │ +│ │ │ │ │ │ +└───┴───┴───────┴───┴───┘ +``` + +``` +LAYOUT_numpad_6x4 +┌───┬───┬───┬───┐ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┤ │ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┴───┼───┤ │ +│ │ │ │ +└───────┴───┴───┘ +``` + +### Ortholinear Layouts + +``` +LAYOUT_ortho_3x10 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_4x10 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_4x12 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_4x4 +┌───┬───┬───┬───┐ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +└───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_5x12 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_5x14 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_5x15 +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_5x4 +┌───┬───┬───┬───┐ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +└───┴───┴───┴───┘ +``` + +``` +LAYOUT_ortho_6x4 +┌───┬───┬───┬───┐ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +├───┼───┼───┼───┤ +│ │ │ │ │ +└───┴───┴───┴───┘ +``` + +``` +LAYOUT_planck_mit +┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ │ +├───┼───┼───┼───┼───┼───┴───┼───┼───┼───┼───┼───┤ +│ │ │ │ │ │ │ │ │ │ │ │ +└───┴───┴───┴───┴───┴───────┴───┴───┴───┴───┴───┘ +``` diff --git a/lib/python/qmk/cli/cformat.py b/lib/python/qmk/cli/cformat.py index 600161c5c5..6bcd15a110 100644 --- a/lib/python/qmk/cli/cformat.py +++ b/lib/python/qmk/cli/cformat.py @@ -43,8 +43,8 @@ def cformat(cli): # Empty array for files files = [] # Core directories for formatting - core_dirs = ['drivers', 'quantum', 'tests', 'tmk_core'] - ignores = ['tmk_core/protocol/usb_hid', 'quantum/template'] + core_dirs = ['drivers', 'quantum', 'tests', 'tmk_core', 'platforms'] + ignores = ['tmk_core/protocol/usb_hid', 'quantum/template', 'platforms/chibios'] # Find the list of files to format if cli.args.files: files.extend(normpath(file) for file in cli.args.files) diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py index 4d7ba52181..bad864f72d 100755 --- a/lib/python/qmk/cli/doctor.py +++ b/lib/python/qmk/cli/doctor.py @@ -10,6 +10,7 @@ from pathlib import Path from milc import cli from qmk import submodules +from qmk.constants import QMK_FIRMWARE from qmk.questions import yesno from qmk.commands import run @@ -149,25 +150,58 @@ def check_udev_rules(): ok = True udev_dir = Path("/etc/udev/rules.d/") desired_rules = { - 'dfu': {_udev_rule("03eb", "2ff4"), _udev_rule("03eb", "2ffb"), _udev_rule("03eb", "2ff0")}, - 'input_club': {_udev_rule("1c11", "b007")}, - 'stm32': {_udev_rule("1eaf", "0003"), _udev_rule("0483", "df11")}, - 'bootloadhid': {_udev_rule("16c0", "05df")}, + 'atmel-dfu': { + _udev_rule("03EB", "2FEF"), # ATmega16U2 + _udev_rule("03EB", "2FF0"), # ATmega32U2 + _udev_rule("03EB", "2FF3"), # ATmega16U4 + _udev_rule("03EB", "2FF4"), # ATmega32U4 + _udev_rule("03EB", "2FF9"), # AT90USB64 + _udev_rule("03EB", "2FFB") # AT90USB128 + }, + 'kiibohd': { + _udev_rule("1C11", "B007") + }, + 'stm32': { + _udev_rule("1EAF", "0003"), # STM32duino + _udev_rule("0483", "DF11") # STM32 DFU + }, + 'bootloadhid': { + _udev_rule("16C0", "05DF") + }, + 'usbasploader': { + _udev_rule("16C0", "05DC") + }, + 'massdrop': { + _udev_rule("03EB", "6124") + }, 'caterina': { - _udev_rule("2341", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), - _udev_rule("1b4f", "9205", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), - _udev_rule("1b4f", "9203", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), - _udev_rule("2a03", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"') + # Spark Fun Electronics + _udev_rule("1B4F", "9203", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Pro Micro 3V3/8MHz + _udev_rule("1B4F", "9205", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Pro Micro 5V/16MHz + _udev_rule("1B4F", "9207", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # LilyPad 3V3/8MHz (and some Pro Micro clones) + # Pololu Electronics + _udev_rule("1FFB", "0101", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # A-Star 32U4 + # Arduino SA + _udev_rule("2341", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Leonardo + _udev_rule("2341", "0037", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Micro + # Adafruit Industries LLC + _udev_rule("239A", "000C", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Feather 32U4 + _udev_rule("239A", "000D", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # ItsyBitsy 32U4 3V3/8MHz + _udev_rule("239A", "000E", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # ItsyBitsy 32U4 5V/16MHz + # dog hunter AG + _udev_rule("2A03", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Leonardo + _udev_rule("2A03", "0037", 'ENV{ID_MM_DEVICE_IGNORE}="1"') # Micro } } # These rules are no longer recommended, only use them to check for their presence. deprecated_rules = { - 'dfu': {_deprecated_udev_rule("03eb", "2ff4"), _deprecated_udev_rule("03eb", "2ffb"), _deprecated_udev_rule("03eb", "2ff0")}, - 'input_club': {_deprecated_udev_rule("1c11")}, + 'atmel-dfu': {_deprecated_udev_rule("03eb", "2ff4"), _deprecated_udev_rule("03eb", "2ffb"), _deprecated_udev_rule("03eb", "2ff0")}, + 'kiibohd': {_deprecated_udev_rule("1c11")}, 'stm32': {_deprecated_udev_rule("1eaf", "0003"), _deprecated_udev_rule("0483", "df11")}, 'bootloadhid': {_deprecated_udev_rule("16c0", "05df")}, - 'caterina': {'ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"', 'ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"'} + 'caterina': {'ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"', 'ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"'}, + 'tmk': {_deprecated_udev_rule("feed")} } if udev_dir.exists(): @@ -193,7 +227,7 @@ def check_udev_rules(): if deprecated_rule and deprecated_rule.issubset(current_rules): cli.log.warn("{bg_yellow}Found old, deprecated udev rules for '%s' boards. The new rules on https://docs.qmk.fm/#/faq_build?id=linux-udev-rules offer better security with the same functionality.", bootloader) else: - cli.log.warn("{bg_yellow}Missing udev rules for '%s' boards. You'll need to use `sudo` in order to flash them.", bootloader) + cli.log.warn("{bg_yellow}Missing udev rules for '%s' boards. See https://docs.qmk.fm/#/faq_build?id=linux-udev-rules for more details.", bootloader) return ok @@ -291,6 +325,8 @@ def doctor(cli): cli.log.error('Unsupported OS detected: %s', platform_id) ok = False + cli.log.info('QMK home: {fg_cyan}%s', QMK_FIRMWARE) + # Make sure the basic CLI tools we need are available and can be executed. bin_ok = check_binaries() diff --git a/lib/python/qmk/cli/flash.py b/lib/python/qmk/cli/flash.py index f8497071ef..cefb9ca31a 100644 --- a/lib/python/qmk/cli/flash.py +++ b/lib/python/qmk/cli/flash.py @@ -27,6 +27,7 @@ def print_bootloader_help(): cli.echo('\tdfu-util-split-left') cli.echo('\tdfu-util-split-right') cli.echo('\tst-link-cli') + cli.echo('\tst-flash') cli.echo('For more info, visit https://docs.qmk.fm/#/flashing') diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py index 5a6e60988a..4db4667a8e 100644 --- a/lib/python/qmk/commands.py +++ b/lib/python/qmk/commands.py @@ -7,6 +7,7 @@ import subprocess import shlex import shutil +from milc import cli import qmk.keymap @@ -83,4 +84,6 @@ def run(command, *args, **kwargs): safecmd = ' '.join(safecmd) command = [os.environ['SHELL'], '-c', safecmd] + cli.log.debug('Running command: %s', command) + return subprocess.run(command, *args, **kwargs) diff --git a/lib/python/qmk/constants.py b/lib/python/qmk/constants.py index 36a20adf4b..0450724df4 100644 --- a/lib/python/qmk/constants.py +++ b/lib/python/qmk/constants.py @@ -9,7 +9,7 @@ QMK_FIRMWARE = Path.cwd() MAX_KEYBOARD_SUBFOLDERS = 5 # Supported processor types -ARM_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303' -AVR_PROCESSORS = 'at90usb1286', 'at90usb646', 'atmega16u2', 'atmega328p', 'atmega32a', 'atmega32u2', 'atmega32u4', None +ARM_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411' +AVR_PROCESSORS = 'atmega16u2', 'atmega32u2', 'atmega16u4', 'atmega32u4', 'at90usb646', 'at90usb647', 'at90usb1286', 'at90usb1287', 'atmega328p', 'atmega32a', None ALL_PROCESSORS = ARM_PROCESSORS + AVR_PROCESSORS VUSB_PROCESSORS = 'atmega328p', 'atmega32a', 'atmega328', 'attiny85' diff --git a/lib/vusb b/lib/vusb index 9a42d205eb..bdb53e4c04 160000 --- a/lib/vusb +++ b/lib/vusb @@ -1 +1 @@ -Subproject commit 9a42d205eb60faca494ff4eabce8d59f0ec0fc7f +Subproject commit bdb53e4c043d089279d9891b68bea77614cb97ee diff --git a/platforms/chibios/BLACKPILL_STM32_F401/board/board.mk b/platforms/chibios/BLACKPILL_STM32_F401/board/board.mk new file mode 100644 index 0000000000..fddf7dace4 --- /dev/null +++ b/platforms/chibios/BLACKPILL_STM32_F401/board/board.mk @@ -0,0 +1,9 @@ +# List of all the board related files. +BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_STM32F401C_DISCOVERY/board.c + +# Required include directories +BOARDINC = $(CHIBIOS)/os/hal/boards/ST_STM32F401C_DISCOVERY + +# Shared variables +ALLCSRC += $(BOARDSRC) +ALLINC += $(BOARDINC) diff --git a/platforms/chibios/BLACKPILL_STM32_F401/configs/board.h b/platforms/chibios/BLACKPILL_STM32_F401/configs/board.h new file mode 100644 index 0000000000..30af6b0c86 --- /dev/null +++ b/platforms/chibios/BLACKPILL_STM32_F401/configs/board.h @@ -0,0 +1,20 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include_next "board.h" + +#undef STM32_HSE_BYPASS diff --git a/keyboards/handwired/onekey/blackpill_f411/chconf.h b/platforms/chibios/BLACKPILL_STM32_F401/configs/chconf.h similarity index 100% rename from keyboards/handwired/onekey/blackpill_f411/chconf.h rename to platforms/chibios/BLACKPILL_STM32_F401/configs/chconf.h diff --git a/platforms/chibios/BLACKPILL_STM32_F401/configs/config.h b/platforms/chibios/BLACKPILL_STM32_F401/configs/config.h new file mode 100644 index 0000000000..eb73e72ef2 --- /dev/null +++ b/platforms/chibios/BLACKPILL_STM32_F401/configs/config.h @@ -0,0 +1,23 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#define BOARD_OTG_NOVBUSSENS 1 + +#define STM32_LSECLK 32768U +#define STM32_HSECLK 25000000U + +#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE diff --git a/platforms/chibios/BLACKPILL_STM32_F401/configs/halconf.h b/platforms/chibios/BLACKPILL_STM32_F401/configs/halconf.h new file mode 100644 index 0000000000..a8db392aaa --- /dev/null +++ b/platforms/chibios/BLACKPILL_STM32_F401/configs/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the zero-copy API. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 256 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#endif + + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/platforms/chibios/BLACKPILL_STM32_F401/configs/mcuconf.h b/platforms/chibios/BLACKPILL_STM32_F401/configs/mcuconf.h new file mode 100644 index 0000000000..ba6e934fe7 --- /dev/null +++ b/platforms/chibios/BLACKPILL_STM32_F401/configs/mcuconf.h @@ -0,0 +1,253 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F4xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F4xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_CLOCK48_REQUIRED TRUE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLM_VALUE 25 +#define STM32_PLLN_VALUE 336 +#define STM32_PLLP_VALUE 4 +#define STM32_PLLQ_VALUE 7 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV4 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_RTCPRE_VALUE 8 +#define STM32_MCO1SEL STM32_MCO1SEL_HSI +#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 +#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK +#define STM32_MCO2PRE STM32_MCO2PRE_DIV5 +#define STM32_I2SSRC STM32_I2SSRC_CKIN +#define STM32_PLLI2SN_VALUE 192 +#define STM32_PLLI2SR_VALUE 5 +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_BKPRAM_ENABLE FALSE + +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI16_PRIORITY 6 +#define STM32_IRQ_EXTI17_PRIORITY 15 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 6 +#define STM32_IRQ_EXTI20_PRIORITY 6 +#define STM32_IRQ_EXTI21_PRIORITY 15 +#define STM32_IRQ_EXTI22_PRIORITY 15 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 6 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM9 FALSE +#define STM32_GPT_USE_TIM11 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM9_IRQ_PRIORITY 7 +#define STM32_GPT_TIM11_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_USE_I2C3 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C3_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_I2C3_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * I2S driver system settings. + */ +#define STM32_I2S_USE_SPI2 FALSE +#define STM32_I2S_USE_SPI3 FALSE +#define STM32_I2S_SPI2_IRQ_PRIORITY 10 +#define STM32_I2S_SPI3_IRQ_PRIORITY 10 +#define STM32_I2S_SPI2_DMA_PRIORITY 1 +#define STM32_I2S_SPI3_DMA_PRIORITY 1 +#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2S_DMA_ERROR_HOOK(i2sp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM9 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM9_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM9 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM9_IRQ_PRIORITY 7 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART6 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART6_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART6 FALSE +#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART6_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART6_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_OTG1 TRUE +#define STM32_USB_OTG1_IRQ_PRIORITY 14 +#define STM32_USB_OTG1_RX_FIFO_SIZE 512 +#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1 +#define STM32_USB_OTG_THREAD_STACK_SIZE 128 +#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/platforms/chibios/BLACKPILL_STM32_F411/board/board.mk b/platforms/chibios/BLACKPILL_STM32_F411/board/board.mk new file mode 100644 index 0000000000..bb00b1a2b0 --- /dev/null +++ b/platforms/chibios/BLACKPILL_STM32_F411/board/board.mk @@ -0,0 +1,9 @@ +# List of all the board related files. +BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO64_F411RE/board.c + +# Required include directories +BOARDINC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO64_F411RE + +# Shared variables +ALLCSRC += $(BOARDSRC) +ALLINC += $(BOARDINC) diff --git a/platforms/chibios/BLACKPILL_STM32_F411/configs/board.h b/platforms/chibios/BLACKPILL_STM32_F411/configs/board.h new file mode 100644 index 0000000000..30af6b0c86 --- /dev/null +++ b/platforms/chibios/BLACKPILL_STM32_F411/configs/board.h @@ -0,0 +1,20 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include_next "board.h" + +#undef STM32_HSE_BYPASS diff --git a/platforms/chibios/BLACKPILL_STM32_F411/configs/chconf.h b/platforms/chibios/BLACKPILL_STM32_F411/configs/chconf.h new file mode 100644 index 0000000000..7dc4f84a8a --- /dev/null +++ b/platforms/chibios/BLACKPILL_STM32_F411/configs/chconf.h @@ -0,0 +1,714 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file rt/templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM TRUE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS TRUE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p _thread_init() function. + * + * @note It is invoked from within @p _thread_init() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/platforms/chibios/BLACKPILL_STM32_F411/configs/config.h b/platforms/chibios/BLACKPILL_STM32_F411/configs/config.h new file mode 100644 index 0000000000..eb73e72ef2 --- /dev/null +++ b/platforms/chibios/BLACKPILL_STM32_F411/configs/config.h @@ -0,0 +1,23 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#define BOARD_OTG_NOVBUSSENS 1 + +#define STM32_LSECLK 32768U +#define STM32_HSECLK 25000000U + +#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE diff --git a/platforms/chibios/BLACKPILL_STM32_F411/configs/halconf.h b/platforms/chibios/BLACKPILL_STM32_F411/configs/halconf.h new file mode 100644 index 0000000000..a8db392aaa --- /dev/null +++ b/platforms/chibios/BLACKPILL_STM32_F411/configs/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the zero-copy API. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 256 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#endif + + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/platforms/chibios/BLACKPILL_STM32_F411/configs/mcuconf.h b/platforms/chibios/BLACKPILL_STM32_F411/configs/mcuconf.h new file mode 100644 index 0000000000..0394ff56bb --- /dev/null +++ b/platforms/chibios/BLACKPILL_STM32_F411/configs/mcuconf.h @@ -0,0 +1,253 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F4xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F4xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_CLOCK48_REQUIRED TRUE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLM_VALUE 25 +#define STM32_PLLN_VALUE 384 +#define STM32_PLLP_VALUE 4 +#define STM32_PLLQ_VALUE 8 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV4 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_RTCPRE_VALUE 8 +#define STM32_MCO1SEL STM32_MCO1SEL_HSI +#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 +#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK +#define STM32_MCO2PRE STM32_MCO2PRE_DIV5 +#define STM32_I2SSRC STM32_I2SSRC_CKIN +#define STM32_PLLI2SN_VALUE 192 +#define STM32_PLLI2SR_VALUE 5 +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_BKPRAM_ENABLE FALSE + +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI16_PRIORITY 6 +#define STM32_IRQ_EXTI17_PRIORITY 15 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 6 +#define STM32_IRQ_EXTI20_PRIORITY 6 +#define STM32_IRQ_EXTI21_PRIORITY 15 +#define STM32_IRQ_EXTI22_PRIORITY 15 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 6 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM9 FALSE +#define STM32_GPT_USE_TIM11 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM9_IRQ_PRIORITY 7 +#define STM32_GPT_TIM11_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_USE_I2C3 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C3_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_I2C3_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * I2S driver system settings. + */ +#define STM32_I2S_USE_SPI2 FALSE +#define STM32_I2S_USE_SPI3 FALSE +#define STM32_I2S_SPI2_IRQ_PRIORITY 10 +#define STM32_I2S_SPI3_IRQ_PRIORITY 10 +#define STM32_I2S_SPI2_DMA_PRIORITY 1 +#define STM32_I2S_SPI3_DMA_PRIORITY 1 +#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2S_DMA_ERROR_HOOK(i2sp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM9 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM9_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM9 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM9_IRQ_PRIORITY 7 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART6 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART6_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART6 FALSE +#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART6_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART6_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_OTG1 TRUE +#define STM32_USB_OTG1_IRQ_PRIORITY 14 +#define STM32_USB_OTG1_RX_FIFO_SIZE 512 +#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1 +#define STM32_USB_OTG_THREAD_STACK_SIZE 128 +#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.c b/platforms/chibios/GENERIC_STM32_F042X6/board/board.c similarity index 99% rename from keyboards/vinta/boards/GENERIC_STM32_F042X6/board.c rename to platforms/chibios/GENERIC_STM32_F042X6/board/board.c index 754dc5c4dd..7d93b68f9c 100644 --- a/keyboards/vinta/boards/GENERIC_STM32_F042X6/board.c +++ b/platforms/chibios/GENERIC_STM32_F042X6/board/board.c @@ -202,13 +202,14 @@ static void stm32_gpio_init(void) { /* Driver exported functions. */ /*===========================================================================*/ +__attribute__((weak)) void enter_bootloader_mode_if_requested(void) {} + /** * @brief Early initialization code. * @details GPIO ports and system clocks are initialized before everything * else. */ void __early_init(void) { - extern void enter_bootloader_mode_if_requested(void); enter_bootloader_mode_if_requested(); stm32_gpio_init(); diff --git a/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.h b/platforms/chibios/GENERIC_STM32_F042X6/board/board.h similarity index 100% rename from keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.h rename to platforms/chibios/GENERIC_STM32_F042X6/board/board.h diff --git a/drivers/boards/GENERIC_STM32_F072XB/board.mk b/platforms/chibios/GENERIC_STM32_F042X6/board/board.mk similarity index 54% rename from drivers/boards/GENERIC_STM32_F072XB/board.mk rename to platforms/chibios/GENERIC_STM32_F042X6/board/board.mk index bd6f878269..842e335905 100644 --- a/drivers/boards/GENERIC_STM32_F072XB/board.mk +++ b/platforms/chibios/GENERIC_STM32_F042X6/board/board.mk @@ -1,8 +1,8 @@ # List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F072XB/board.c +BOARDSRC = $(BOARD_PATH)/board/board.c # Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F072XB +BOARDINC = $(BOARD_PATH)/board # Shared variables ALLCSRC += $(BOARDSRC) diff --git a/keyboards/peiorisboards/ixora/bootloader_defs.h b/platforms/chibios/GENERIC_STM32_F042X6/configs/bootloader_defs.h similarity index 100% rename from keyboards/peiorisboards/ixora/bootloader_defs.h rename to platforms/chibios/GENERIC_STM32_F042X6/configs/bootloader_defs.h diff --git a/drivers/boards/GENERIC_STM32_F072XB/board.c b/platforms/chibios/GENERIC_STM32_F072XB/board/board.c similarity index 100% rename from drivers/boards/GENERIC_STM32_F072XB/board.c rename to platforms/chibios/GENERIC_STM32_F072XB/board/board.c diff --git a/drivers/boards/GENERIC_STM32_F072XB/board.h b/platforms/chibios/GENERIC_STM32_F072XB/board/board.h similarity index 100% rename from drivers/boards/GENERIC_STM32_F072XB/board.h rename to platforms/chibios/GENERIC_STM32_F072XB/board/board.h diff --git a/drivers/boards/BLACKPILL_STM32_F411/board.mk b/platforms/chibios/GENERIC_STM32_F072XB/board/board.mk similarity index 54% rename from drivers/boards/BLACKPILL_STM32_F411/board.mk rename to platforms/chibios/GENERIC_STM32_F072XB/board/board.mk index 93c1e62f5d..842e335905 100644 --- a/drivers/boards/BLACKPILL_STM32_F411/board.mk +++ b/platforms/chibios/GENERIC_STM32_F072XB/board/board.mk @@ -1,8 +1,8 @@ # List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/BLACKPILL_STM32_F411/board.c +BOARDSRC = $(BOARD_PATH)/board/board.c # Required include directories -BOARDINC = $(BOARD_PATH)/boards/BLACKPILL_STM32_F411 +BOARDINC = $(BOARD_PATH)/board # Shared variables ALLCSRC += $(BOARDSRC) diff --git a/drivers/boards/GENERIC_STM32_F072XB/bootloader_defs.h b/platforms/chibios/GENERIC_STM32_F072XB/configs/bootloader_defs.h similarity index 100% rename from drivers/boards/GENERIC_STM32_F072XB/bootloader_defs.h rename to platforms/chibios/GENERIC_STM32_F072XB/configs/bootloader_defs.h diff --git a/platforms/chibios/GENERIC_STM32_F303XC/board/board.mk b/platforms/chibios/GENERIC_STM32_F303XC/board/board.mk new file mode 100644 index 0000000000..f891e65247 --- /dev/null +++ b/platforms/chibios/GENERIC_STM32_F303XC/board/board.mk @@ -0,0 +1,9 @@ +# List of all the board related files. +BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_STM32F3_DISCOVERY/board.c + +# Required include directories +BOARDINC = $(CHIBIOS)/os/hal/boards/ST_STM32F3_DISCOVERY + +# Shared variables +ALLCSRC += $(BOARDSRC) +ALLINC += $(BOARDINC) diff --git a/platforms/chibios/GENERIC_STM32_F303XC/configs/board.h b/platforms/chibios/GENERIC_STM32_F303XC/configs/board.h new file mode 100644 index 0000000000..97159964d0 --- /dev/null +++ b/platforms/chibios/GENERIC_STM32_F303XC/configs/board.h @@ -0,0 +1,37 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include_next "board.h" + +#undef STM32_HSE_BYPASS + +/* + * USB bus activation macro, required by the USB driver. + */ +#define usb_lld_connect_bus(usbp) \ + do { \ + palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_ALTERNATE(14)); \ + } while (0) + +/* + * USB bus de-activation macro, required by the USB driver. + */ +#define usb_lld_disconnect_bus(usbp) \ + do { \ + palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL); \ + palClearPad(GPIOA, GPIOA_USB_DP); \ + } while (0) diff --git a/drivers/boards/GENERIC_STM32_F303XC/bootloader_defs.h b/platforms/chibios/GENERIC_STM32_F303XC/configs/bootloader_defs.h similarity index 100% rename from drivers/boards/GENERIC_STM32_F303XC/bootloader_defs.h rename to platforms/chibios/GENERIC_STM32_F303XC/configs/bootloader_defs.h diff --git a/quantum/stm32/chconf.h b/platforms/chibios/GENERIC_STM32_F303XC/configs/chconf.h similarity index 68% rename from quantum/stm32/chconf.h rename to platforms/chibios/GENERIC_STM32_F303XC/configs/chconf.h index b6e66f9e49..aac3303705 100644 --- a/quantum/stm32/chconf.h +++ b/platforms/chibios/GENERIC_STM32_F303XC/configs/chconf.h @@ -26,10 +26,10 @@ */ #ifndef CHCONF_H -# define CHCONF_H +#define CHCONF_H -# define _CHIBIOS_RT_CONF_ -# define _CHIBIOS_RT_CONF_VER_6_0_ +#define _CHIBIOS_RT_CONF_ +#define _CHIBIOS_RT_CONF_VER_6_0_ /*===========================================================================*/ /** @@ -42,34 +42,34 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ -# if !defined(CH_CFG_ST_RESOLUTION) -# define CH_CFG_ST_RESOLUTION 32 -# endif +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif /** * @brief System tick frequency. * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ -# if !defined(CH_CFG_ST_FREQUENCY) -# define CH_CFG_ST_FREQUENCY 100000 -# endif +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 100000 +#endif /** * @brief Time intervals data size. * @note Allowed values are 16, 32 or 64 bits. */ -# if !defined(CH_CFG_INTERVALS_SIZE) -# define CH_CFG_INTERVALS_SIZE 32 -# endif +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif /** * @brief Time types data size. * @note Allowed values are 16 or 32 bits. */ -# if !defined(CH_CFG_TIME_TYPES_SIZE) -# define CH_CFG_TIME_TYPES_SIZE 32 -# endif +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif /** * @brief Time delta constant for the tick-less mode. @@ -79,9 +79,9 @@ * The value one is not valid, timeouts are rounded up to * this value. */ -# if !defined(CH_CFG_ST_TIMEDELTA) -# define CH_CFG_ST_TIMEDELTA 2 -# endif +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif /** @} */ @@ -104,9 +104,9 @@ * @note The round robin preemption is not supported in tickless mode and * must be set to zero in that case. */ -# if !defined(CH_CFG_TIME_QUANTUM) -# define CH_CFG_TIME_QUANTUM 0 -# endif +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif /** * @brief Managed RAM size. @@ -119,9 +119,9 @@ * provide the @p __heap_base__ and @p __heap_end__ symbols. * @note Requires @p CH_CFG_USE_MEMCORE. */ -# if !defined(CH_CFG_MEMCORE_SIZE) -# define CH_CFG_MEMCORE_SIZE 0 -# endif +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif /** * @brief Idle thread automatic spawn suppression. @@ -130,9 +130,9 @@ * function becomes the idle thread and must implement an * infinite loop. */ -# if !defined(CH_CFG_NO_IDLE_THREAD) -# define CH_CFG_NO_IDLE_THREAD FALSE -# endif +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif /** @} */ @@ -151,9 +151,9 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ -# if !defined(CH_CFG_OPTIMIZE_SPEED) -# define CH_CFG_OPTIMIZE_SPEED TRUE -# endif +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif /** @} */ @@ -171,9 +171,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_TM) -# define CH_CFG_USE_TM TRUE -# endif +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM TRUE +#endif /** * @brief Threads registry APIs. @@ -181,9 +181,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_REGISTRY) -# define CH_CFG_USE_REGISTRY TRUE -# endif +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif /** * @brief Threads synchronization APIs. @@ -192,9 +192,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_WAITEXIT) -# define CH_CFG_USE_WAITEXIT TRUE -# endif +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif /** * @brief Semaphores APIs. @@ -202,9 +202,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_SEMAPHORES) -# define CH_CFG_USE_SEMAPHORES TRUE -# endif +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif /** * @brief Semaphores queuing mode. @@ -215,9 +215,9 @@ * requirements. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ -# if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) -# define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE -# endif +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif /** * @brief Mutexes APIs. @@ -225,9 +225,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_MUTEXES) -# define CH_CFG_USE_MUTEXES TRUE -# endif +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif /** * @brief Enables recursive behavior on mutexes. @@ -237,9 +237,9 @@ * @note The default is @p FALSE. * @note Requires @p CH_CFG_USE_MUTEXES. */ -# if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) -# define CH_CFG_USE_MUTEXES_RECURSIVE FALSE -# endif +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif /** * @brief Conditional Variables APIs. @@ -249,9 +249,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_MUTEXES. */ -# if !defined(CH_CFG_USE_CONDVARS) -# define CH_CFG_USE_CONDVARS TRUE -# endif +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif /** * @brief Conditional Variables APIs with timeout. @@ -261,9 +261,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_CONDVARS. */ -# if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) -# define CH_CFG_USE_CONDVARS_TIMEOUT TRUE -# endif +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE +#endif /** * @brief Events Flags APIs. @@ -271,9 +271,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_EVENTS) -# define CH_CFG_USE_EVENTS TRUE -# endif +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif /** * @brief Events Flags APIs with timeout. @@ -283,9 +283,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_EVENTS. */ -# if !defined(CH_CFG_USE_EVENTS_TIMEOUT) -# define CH_CFG_USE_EVENTS_TIMEOUT TRUE -# endif +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif /** * @brief Synchronous Messages APIs. @@ -294,9 +294,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_MESSAGES) -# define CH_CFG_USE_MESSAGES TRUE -# endif +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif /** * @brief Synchronous Messages queuing mode. @@ -307,9 +307,9 @@ * requirements. * @note Requires @p CH_CFG_USE_MESSAGES. */ -# if !defined(CH_CFG_USE_MESSAGES_PRIORITY) -# define CH_CFG_USE_MESSAGES_PRIORITY TRUE -# endif +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY TRUE +#endif /** * @brief Mailboxes APIs. @@ -319,9 +319,9 @@ * @note The default is @p TRUE. * @note Requires @p CH_CFG_USE_SEMAPHORES. */ -# if !defined(CH_CFG_USE_MAILBOXES) -# define CH_CFG_USE_MAILBOXES TRUE -# endif +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif /** * @brief Core Memory Manager APIs. @@ -330,9 +330,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_MEMCORE) -# define CH_CFG_USE_MEMCORE TRUE -# endif +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif /** * @brief Heap Allocator APIs. @@ -344,9 +344,9 @@ * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ -# if !defined(CH_CFG_USE_HEAP) -# define CH_CFG_USE_HEAP TRUE -# endif +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif /** * @brief Memory Pools Allocator APIs. @@ -355,9 +355,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_MEMPOOLS) -# define CH_CFG_USE_MEMPOOLS TRUE -# endif +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS TRUE +#endif /** * @brief Objects FIFOs APIs. @@ -366,9 +366,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_OBJ_FIFOS) -# define CH_CFG_USE_OBJ_FIFOS TRUE -# endif +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS TRUE +#endif /** * @brief Pipes APIs. @@ -377,9 +377,9 @@ * * @note The default is @p TRUE. */ -# if !defined(CH_CFG_USE_PIPES) -# define CH_CFG_USE_PIPES TRUE -# endif +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES TRUE +#endif /** * @brief Dynamic Threads APIs. @@ -390,9 +390,9 @@ * @note Requires @p CH_CFG_USE_WAITEXIT. * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ -# if !defined(CH_CFG_USE_DYNAMIC) -# define CH_CFG_USE_DYNAMIC TRUE -# endif +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC TRUE +#endif /** @} */ @@ -410,60 +410,60 @@ * * @note The default is @p FALSE. */ -# if !defined(CH_CFG_USE_FACTORY) -# define CH_CFG_USE_FACTORY TRUE -# endif +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY TRUE +#endif /** * @brief Maximum length for object names. * @details If the specified length is zero then the name is stored by * pointer but this could have unintended side effects. */ -# if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) -# define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 -# endif +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif /** * @brief Enables the registry of generic objects. */ -# if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) -# define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE -# endif +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE +#endif /** * @brief Enables factory for generic buffers. */ -# if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) -# define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE -# endif +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE +#endif /** * @brief Enables factory for semaphores. */ -# if !defined(CH_CFG_FACTORY_SEMAPHORES) -# define CH_CFG_FACTORY_SEMAPHORES TRUE -# endif +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES TRUE +#endif /** * @brief Enables factory for mailboxes. */ -# if !defined(CH_CFG_FACTORY_MAILBOXES) -# define CH_CFG_FACTORY_MAILBOXES TRUE -# endif +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES TRUE +#endif /** * @brief Enables factory for objects FIFOs. */ -# if !defined(CH_CFG_FACTORY_OBJ_FIFOS) -# define CH_CFG_FACTORY_OBJ_FIFOS TRUE -# endif +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE +#endif /** * @brief Enables factory for Pipes. */ -# if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) -# define CH_CFG_FACTORY_PIPES TRUE -# endif +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES TRUE +#endif /** @} */ @@ -479,9 +479,9 @@ * * @note The default is @p FALSE. */ -# if !defined(CH_DBG_STATISTICS) -# define CH_DBG_STATISTICS FALSE -# endif +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif /** * @brief Debug option, system state check. @@ -490,9 +490,9 @@ * * @note The default is @p FALSE. */ -# if !defined(CH_DBG_SYSTEM_STATE_CHECK) -# define CH_DBG_SYSTEM_STATE_CHECK FALSE -# endif +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif /** * @brief Debug option, parameters checks. @@ -501,9 +501,9 @@ * * @note The default is @p FALSE. */ -# if !defined(CH_DBG_ENABLE_CHECKS) -# define CH_DBG_ENABLE_CHECKS FALSE -# endif +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif /** * @brief Debug option, consistency checks. @@ -513,9 +513,9 @@ * * @note The default is @p FALSE. */ -# if !defined(CH_DBG_ENABLE_ASSERTS) -# define CH_DBG_ENABLE_ASSERTS FALSE -# endif +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif /** * @brief Debug option, trace buffer. @@ -523,18 +523,18 @@ * * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ -# if !defined(CH_DBG_TRACE_MASK) -# define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED -# endif +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif /** * @brief Trace buffer entries. * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is * different from @p CH_DBG_TRACE_MASK_DISABLED. */ -# if !defined(CH_DBG_TRACE_BUFFER_SIZE) -# define CH_DBG_TRACE_BUFFER_SIZE 128 -# endif +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif /** * @brief Debug option, stack checks. @@ -546,9 +546,9 @@ * @note The default failure mode is to halt the system with the global * @p panic_msg variable set to @p NULL. */ -# if !defined(CH_DBG_ENABLE_STACK_CHECK) -# define CH_DBG_ENABLE_STACK_CHECK TRUE -# endif +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK TRUE +#endif /** * @brief Debug option, stacks initialization. @@ -558,9 +558,9 @@ * * @note The default is @p FALSE. */ -# if !defined(CH_DBG_FILL_THREADS) -# define CH_DBG_FILL_THREADS FALSE -# endif +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif /** * @brief Debug option, threads profiling. @@ -571,9 +571,9 @@ * @note This debug option is not currently compatible with the * tickless mode. */ -# if !defined(CH_DBG_THREADS_PROFILING) -# define CH_DBG_THREADS_PROFILING FALSE -# endif +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif /** @} */ @@ -588,22 +588,24 @@ * @brief System structure extension. * @details User fields added to the end of the @p ch_system_t structure. */ -# define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add threads custom fields here.*/ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ /** * @brief System initialization hook. * @details User initialization code added to the @p chSysInit() function * just before interrupts are enabled globally. */ -# define CH_CFG_SYSTEM_INIT_HOOK() \ - { /* Add threads initialization code here.*/ \ - } +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. */ -# define CH_CFG_THREAD_EXTRA_FIELDS /* Add threads custom fields here.*/ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ /** * @brief Threads initialization hook. @@ -612,39 +614,39 @@ * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. */ -# define CH_CFG_THREAD_INIT_HOOK(tp) \ - { /* Add threads initialization code here.*/ \ - } +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} /** * @brief Threads finalization hook. * @details User finalization code added to the @p chThdExit() API. */ -# define CH_CFG_THREAD_EXIT_HOOK(tp) \ - { /* Add threads finalization code here.*/ \ - } +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} /** * @brief Context switch hook. * @details This hook is invoked just before switching between threads. */ -# define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \ - { /* Context switch code here.*/ \ - } +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} /** * @brief ISR enter hook. */ -# define CH_CFG_IRQ_PROLOGUE_HOOK() \ - { /* IRQ prologue code here.*/ \ - } +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} /** * @brief ISR exit hook. */ -# define CH_CFG_IRQ_EPILOGUE_HOOK() \ - { /* IRQ epilogue code here.*/ \ - } +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} /** * @brief Idle thread enter hook. @@ -652,9 +654,9 @@ * should be invoked from here. * @note This macro can be used to activate a power saving mode. */ -# define CH_CFG_IDLE_ENTER_HOOK() \ - { /* Idle-enter code here.*/ \ - } +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} /** * @brief Idle thread leave hook. @@ -662,44 +664,44 @@ * should be invoked from here. * @note This macro can be used to deactivate a power saving mode. */ -# define CH_CFG_IDLE_LEAVE_HOOK() \ - { /* Idle-leave code here.*/ \ - } +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. */ -# define CH_CFG_IDLE_LOOP_HOOK() \ - { /* Idle loop code here.*/ \ - } +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} /** * @brief System tick event hook. * @details This hook is invoked in the system tick handler immediately * after processing the virtual timers queue. */ -# define CH_CFG_SYSTEM_TICK_HOOK() \ - { /* System tick event code here.*/ \ - } +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} /** * @brief System halt hook. * @details This hook is invoked in case to a system halting error before * the system is halted. */ -# define CH_CFG_SYSTEM_HALT_HOOK(reason) \ - { /* System halt code here.*/ \ - } +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} /** * @brief Trace hook. * @details This hook is invoked each time a new record is written in the * trace buffer. */ -# define CH_CFG_TRACE_HOOK(tep) \ - { /* Trace code here.*/ \ - } +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} /** @} */ @@ -707,6 +709,6 @@ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ -#endif /* CHCONF_H */ +#endif /* CHCONF_H */ /** @} */ diff --git a/platforms/chibios/GENERIC_STM32_F303XC/configs/config.h b/platforms/chibios/GENERIC_STM32_F303XC/configs/config.h new file mode 100644 index 0000000000..48a7a90093 --- /dev/null +++ b/platforms/chibios/GENERIC_STM32_F303XC/configs/config.h @@ -0,0 +1,18 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE diff --git a/quantum/stm32/halconf.h b/platforms/chibios/GENERIC_STM32_F303XC/configs/halconf.h similarity index 62% rename from quantum/stm32/halconf.h rename to platforms/chibios/GENERIC_STM32_F303XC/configs/halconf.h index b6c7b392ca..6b48e289f9 100644 --- a/quantum/stm32/halconf.h +++ b/platforms/chibios/GENERIC_STM32_F303XC/configs/halconf.h @@ -26,173 +26,173 @@ */ #ifndef HALCONF_H -# define HALCONF_H +#define HALCONF_H -# define _CHIBIOS_HAL_CONF_ -# define _CHIBIOS_HAL_CONF_VER_7_0_ +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ -# include "mcuconf.h" +#include "mcuconf.h" /** * @brief Enables the PAL subsystem. */ -# if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -# define HAL_USE_PAL TRUE -# endif +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif /** * @brief Enables the ADC subsystem. */ -# if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -# define HAL_USE_ADC FALSE -# endif +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif /** * @brief Enables the CAN subsystem. */ -# if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -# define HAL_USE_CAN FALSE -# endif +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif /** * @brief Enables the cryptographic subsystem. */ -# if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) -# define HAL_USE_CRY FALSE -# endif +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif /** * @brief Enables the DAC subsystem. */ -# if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -# define HAL_USE_DAC TRUE -# endif +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC TRUE +#endif /** * @brief Enables the GPT subsystem. */ -# if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -# define HAL_USE_GPT TRUE -# endif +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT TRUE +#endif /** * @brief Enables the I2C subsystem. */ -# if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -# define HAL_USE_I2C TRUE -# endif +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif /** * @brief Enables the I2S subsystem. */ -# if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -# define HAL_USE_I2S FALSE -# endif +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif /** * @brief Enables the ICU subsystem. */ -# if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -# define HAL_USE_ICU FALSE -# endif +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif /** * @brief Enables the MAC subsystem. */ -# if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -# define HAL_USE_MAC FALSE -# endif +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif /** * @brief Enables the MMC_SPI subsystem. */ -# if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) -# define HAL_USE_MMC_SPI FALSE -# endif +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif /** * @brief Enables the PWM subsystem. */ -# if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -# define HAL_USE_PWM TRUE -# endif +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif /** * @brief Enables the RTC subsystem. */ -# if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -# define HAL_USE_RTC FALSE -# endif +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif /** * @brief Enables the SDC subsystem. */ -# if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -# define HAL_USE_SDC FALSE -# endif +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif /** * @brief Enables the SERIAL subsystem. */ -# if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -# define HAL_USE_SERIAL FALSE -# endif +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif /** * @brief Enables the SERIAL over USB subsystem. */ -# if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) -# define HAL_USE_SERIAL_USB TRUE -# endif +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB TRUE +#endif /** * @brief Enables the SIO subsystem. */ -# if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) -# define HAL_USE_SIO FALSE -# endif +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif /** * @brief Enables the SPI subsystem. */ -# if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -# define HAL_USE_SPI TRUE -# endif +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif /** * @brief Enables the TRNG subsystem. */ -# if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) -# define HAL_USE_TRNG FALSE -# endif +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG FALSE +#endif /** * @brief Enables the UART subsystem. */ -# if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -# define HAL_USE_UART FALSE -# endif +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif /** * @brief Enables the USB subsystem. */ -# if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -# define HAL_USE_USB TRUE -# endif +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif /** * @brief Enables the WDG subsystem. */ -# if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -# define HAL_USE_WDG FALSE -# endif +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif /** * @brief Enables the WSPI subsystem. */ -# if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) -# define HAL_USE_WSPI FALSE -# endif +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif /*===========================================================================*/ /* PAL driver related settings. */ @@ -202,17 +202,17 @@ * @brief Enables synchronous APIs. * @note Disabling this option saves both code and data space. */ -# if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) -# define PAL_USE_CALLBACKS TRUE -# endif +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS TRUE +#endif /** * @brief Enables synchronous APIs. * @note Disabling this option saves both code and data space. */ -# if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) -# define PAL_USE_WAIT TRUE -# endif +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT TRUE +#endif /*===========================================================================*/ /* ADC driver related settings. */ @@ -222,17 +222,17 @@ * @brief Enables synchronous APIs. * @note Disabling this option saves both code and data space. */ -# if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -# define ADC_USE_WAIT TRUE -# endif +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif /** * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. * @note Disabling this option saves both code and data space. */ -# if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -# define ADC_USE_MUTUAL_EXCLUSION TRUE -# endif +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif /*===========================================================================*/ /* CAN driver related settings. */ @@ -241,16 +241,16 @@ /** * @brief Sleep mode related APIs inclusion switch. */ -# if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -# define CAN_USE_SLEEP_MODE TRUE -# endif +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif /** * @brief Enforces the driver to use direct callbacks rather than OSAL events. */ -# if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) -# define CAN_ENFORCE_USE_CALLBACKS FALSE -# endif +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif /*===========================================================================*/ /* CRY driver related settings. */ @@ -263,16 +263,16 @@ * hardware. * @note Fall-back implementations may not be present for all algorithms. */ -# if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) -# define HAL_CRY_USE_FALLBACK FALSE -# endif +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif /** * @brief Makes the driver forcibly use the fall-back implementations. */ -# if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) -# define HAL_CRY_ENFORCE_FALLBACK FALSE -# endif +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif /*===========================================================================*/ /* DAC driver related settings. */ @@ -282,17 +282,17 @@ * @brief Enables synchronous APIs. * @note Disabling this option saves both code and data space. */ -# if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) -# define DAC_USE_WAIT TRUE -# endif +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif /** * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. * @note Disabling this option saves both code and data space. */ -# if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -# define DAC_USE_MUTUAL_EXCLUSION TRUE -# endif +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION TRUE +#endif /*===========================================================================*/ /* I2C driver related settings. */ @@ -301,9 +301,9 @@ /** * @brief Enables the mutual exclusion APIs on the I2C bus. */ -# if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -# define I2C_USE_MUTUAL_EXCLUSION TRUE -# endif +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif /*===========================================================================*/ /* MAC driver related settings. */ @@ -312,16 +312,16 @@ /** * @brief Enables the zero-copy API. */ -# if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -# define MAC_USE_ZERO_COPY FALSE -# endif +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif /** * @brief Enables an event sources for incoming packets. */ -# if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) -# define MAC_USE_EVENTS TRUE -# endif +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif /*===========================================================================*/ /* MMC_SPI driver related settings. */ @@ -335,9 +335,9 @@ * This option is recommended also if the SPI driver does not * use a DMA channel and heavily loads the CPU. */ -# if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -# define MMC_NICE_WAITING TRUE -# endif +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif /*===========================================================================*/ /* SDC driver related settings. */ @@ -347,18 +347,18 @@ * @brief Number of initialization attempts before rejecting the card. * @note Attempts are performed at 10mS intervals. */ -# if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -# define SDC_INIT_RETRY 100 -# endif +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif /** * @brief Include support for MMC cards. * @note MMC support is not yet implemented so this option must be kept * at @p FALSE. */ -# if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -# define SDC_MMC_SUPPORT FALSE -# endif +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif /** * @brief Delays insertions. @@ -366,23 +366,23 @@ * routines releasing some extra CPU time for the threads with * lower priority, this may slow down the driver a bit however. */ -# if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -# define SDC_NICE_WAITING TRUE -# endif +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif /** * @brief OCR initialization constant for V20 cards. */ -# if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) -# define SDC_INIT_OCR_V20 0x50FF8000U -# endif +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif /** * @brief OCR initialization constant for non-V20 cards. */ -# if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) -# define SDC_INIT_OCR 0x80100000U -# endif +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#endif /*===========================================================================*/ /* SERIAL driver related settings. */ @@ -393,9 +393,9 @@ * @details Configuration parameter, this is the baud rate selected for the * default configuration. */ -# if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -# define SERIAL_DEFAULT_BITRATE 38400 -# endif +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif /** * @brief Serial buffers size. @@ -404,9 +404,9 @@ * @note The default is 16 bytes for both the transmission and receive * buffers. */ -# if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -# define SERIAL_BUFFERS_SIZE 16 -# endif +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif /*===========================================================================*/ /* SERIAL_USB driver related setting. */ @@ -419,17 +419,17 @@ * @note The default is 256 bytes for both the transmission and receive * buffers. */ -# if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -# define SERIAL_USB_BUFFERS_SIZE 1 -# endif +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif /** * @brief Serial over USB number of buffers. * @note The default is 2 buffers. */ -# if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) -# define SERIAL_USB_BUFFERS_NUMBER 2 -# endif +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif /*===========================================================================*/ /* SPI driver related settings. */ @@ -439,33 +439,34 @@ * @brief Enables synchronous APIs. * @note Disabling this option saves both code and data space. */ -# if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -# define SPI_USE_WAIT TRUE -# endif +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif /** * @brief Enables circular transfers APIs. * @note Disabling this option saves both code and data space. */ -# if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) -# define SPI_USE_CIRCULAR FALSE -# endif +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#endif + /** * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. * @note Disabling this option saves both code and data space. */ -# if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -# define SPI_USE_MUTUAL_EXCLUSION TRUE -# endif +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif /** * @brief Handling method for SPI CS line. * @note Disabling this option saves both code and data space. */ -# if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) -# define SPI_SELECT_MODE SPI_SELECT_MODE_PAD -# endif +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#endif /*===========================================================================*/ /* UART driver related settings. */ @@ -475,17 +476,17 @@ * @brief Enables synchronous APIs. * @note Disabling this option saves both code and data space. */ -# if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) -# define UART_USE_WAIT FALSE -# endif +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif /** * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. * @note Disabling this option saves both code and data space. */ -# if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -# define UART_USE_MUTUAL_EXCLUSION FALSE -# endif +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif /*===========================================================================*/ /* USB driver related settings. */ @@ -495,9 +496,9 @@ * @brief Enables synchronous APIs. * @note Disabling this option saves both code and data space. */ -# if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -# define USB_USE_WAIT TRUE -# endif +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif /*===========================================================================*/ /* WSPI driver related settings. */ @@ -507,17 +508,17 @@ * @brief Enables synchronous APIs. * @note Disabling this option saves both code and data space. */ -# if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) -# define WSPI_USE_WAIT TRUE -# endif +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif /** * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. * @note Disabling this option saves both code and data space. */ -# if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -# define WSPI_USE_MUTUAL_EXCLUSION TRUE -# endif +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif #endif /* HALCONF_H */ diff --git a/platforms/chibios/GENERIC_STM32_F303XC/configs/mcuconf.h b/platforms/chibios/GENERIC_STM32_F303XC/configs/mcuconf.h new file mode 100644 index 0000000000..ac2d9a1eed --- /dev/null +++ b/platforms/chibios/GENERIC_STM32_F303XC/configs/mcuconf.h @@ -0,0 +1,273 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F3xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F3xx_MCUCONF +#define STM32F303_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADC12PRES STM32_ADC12PRES_DIV1 +#define STM32_ADC34PRES STM32_ADC34PRES_DIV1 +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_USART2SW STM32_USART2SW_PCLK +#define STM32_USART3SW STM32_USART3SW_PCLK +#define STM32_UART4SW STM32_UART4SW_PCLK +#define STM32_UART5SW STM32_UART5SW_PCLK +#define STM32_I2C1SW STM32_I2C1SW_SYSCLK +#define STM32_I2C2SW STM32_I2C2SW_SYSCLK +#define STM32_TIM1SW STM32_TIM1SW_PCLK2 +#define STM32_TIM8SW STM32_TIM8SW_PCLK2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 + +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI16_PRIORITY 6 +#define STM32_IRQ_EXTI17_PRIORITY 15 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 15 +#define STM32_IRQ_EXTI20_PRIORITY 15 +#define STM32_IRQ_EXTI21_22_29_PRIORITY 6 +#define STM32_IRQ_EXTI30_32_PRIORITY 6 +#define STM32_IRQ_EXTI33_PRIORITY 6 +#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_DUAL_MODE FALSE +#define STM32_ADC_COMPACT_SAMPLES FALSE +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_USE_ADC2 FALSE +#define STM32_ADC_USE_ADC3 FALSE +#define STM32_ADC_USE_ADC4 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) +#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) +#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC2_DMA_PRIORITY 2 +#define STM32_ADC_ADC3_DMA_PRIORITY 2 +#define STM32_ADC_ADC4_DMA_PRIORITY 2 +#define STM32_ADC_ADC12_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_IRQ_PRIORITY 5 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 +#define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * DAC driver system settings. + */ +#define STM32_DAC_DUAL_MODE FALSE +#define STM32_DAC_USE_DAC1_CH1 TRUE +#define STM32_DAC_USE_DAC1_CH2 TRUE +#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 +#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM6 TRUE +#define STM32_GPT_USE_TIM7 TRUE +#define STM32_GPT_USE_TIM8 TRUE +#define STM32_GPT_USE_TIM15 TRUE +#define STM32_GPT_USE_TIM16 FALSE +#define STM32_GPT_USE_TIM17 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM6_IRQ_PRIORITY 7 +#define STM32_GPT_TIM7_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 10 +#define STM32_I2C_I2C2_IRQ_PRIORITY 10 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_USE_TIM15 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_USE_TIM4 TRUE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_USE_TIM15 FALSE +#define STM32_PWM_USE_TIM16 FALSE +#define STM32_PWM_USE_TIM17 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 TRUE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/platforms/chibios/GENERIC_STM32_F303XC/configs/proton_c.mk b/platforms/chibios/GENERIC_STM32_F303XC/configs/proton_c.mk new file mode 100644 index 0000000000..23907c810a --- /dev/null +++ b/platforms/chibios/GENERIC_STM32_F303XC/configs/proton_c.mk @@ -0,0 +1,9 @@ +# Proton C MCU settings for converting AVR projects +MCU = STM32F303 + +# These are defaults based on what has been implemented for ARM boards +AUDIO_ENABLE = yes +WS2812_DRIVER = bitbang + +# Force task driven PWM until ARM can provide automatic configuration +BACKLIGHT_DRIVER = software diff --git a/drivers/boards/IC_TEENSY_3_1/board.c b/platforms/chibios/IC_TEENSY_3_1/board/board.c similarity index 100% rename from drivers/boards/IC_TEENSY_3_1/board.c rename to platforms/chibios/IC_TEENSY_3_1/board/board.c diff --git a/drivers/boards/IC_TEENSY_3_1/board.h b/platforms/chibios/IC_TEENSY_3_1/board/board.h similarity index 100% rename from drivers/boards/IC_TEENSY_3_1/board.h rename to platforms/chibios/IC_TEENSY_3_1/board/board.h diff --git a/drivers/boards/BLACKPILL_STM32_F401/board.mk b/platforms/chibios/IC_TEENSY_3_1/board/board.mk similarity index 54% rename from drivers/boards/BLACKPILL_STM32_F401/board.mk rename to platforms/chibios/IC_TEENSY_3_1/board/board.mk index 33473ed6b1..842e335905 100644 --- a/drivers/boards/BLACKPILL_STM32_F401/board.mk +++ b/platforms/chibios/IC_TEENSY_3_1/board/board.mk @@ -1,8 +1,8 @@ # List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/BLACKPILL_STM32_F401/board.c +BOARDSRC = $(BOARD_PATH)/board/board.c # Required include directories -BOARDINC = $(BOARD_PATH)/boards/BLACKPILL_STM32_F401 +BOARDINC = $(BOARD_PATH)/board # Shared variables ALLCSRC += $(BOARDSRC) diff --git a/drivers/boards/STM32_F103_STM32DUINO/board.c b/platforms/chibios/STM32_F103_STM32DUINO/board/board.c similarity index 93% rename from drivers/boards/STM32_F103_STM32DUINO/board.c rename to platforms/chibios/STM32_F103_STM32DUINO/board/board.c index 8c5a87f35f..9135f61364 100644 --- a/drivers/boards/STM32_F103_STM32DUINO/board.c +++ b/platforms/chibios/STM32_F103_STM32DUINO/board/board.c @@ -35,12 +35,15 @@ const PALConfig pal_default_config = }; #endif +__attribute__((weak)) void enter_bootloader_mode_if_requested(void) {} + /* * Early initialization code. * This initialization must be performed just after stack setup and before * any other initialization. */ void __early_init(void) { + enter_bootloader_mode_if_requested(); stm32_clock_init(); } diff --git a/drivers/boards/STM32_F103_STM32DUINO/board.h b/platforms/chibios/STM32_F103_STM32DUINO/board/board.h similarity index 100% rename from drivers/boards/STM32_F103_STM32DUINO/board.h rename to platforms/chibios/STM32_F103_STM32DUINO/board/board.h diff --git a/platforms/chibios/STM32_F103_STM32DUINO/board/board.mk b/platforms/chibios/STM32_F103_STM32DUINO/board/board.mk new file mode 100644 index 0000000000..842e335905 --- /dev/null +++ b/platforms/chibios/STM32_F103_STM32DUINO/board/board.mk @@ -0,0 +1,9 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/board/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/board + +# Shared variables +ALLCSRC += $(BOARDSRC) +ALLINC += $(BOARDINC) diff --git a/platforms/chibios/keyboard-config-templates/board.h b/platforms/chibios/keyboard-config-templates/board.h new file mode 100644 index 0000000000..967ec13a1c --- /dev/null +++ b/platforms/chibios/keyboard-config-templates/board.h @@ -0,0 +1,20 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include_next "board.h" + +// #undef STM32_HSE_BYPASS diff --git a/platforms/chibios/keyboard-config-templates/chconf.h b/platforms/chibios/keyboard-config-templates/chconf.h new file mode 100644 index 0000000000..7c2af93f5e --- /dev/null +++ b/platforms/chibios/keyboard-config-templates/chconf.h @@ -0,0 +1,20 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +// #define CH_CFG_OPTIMIZE_SPEED TRUE + +#include_next "chconf.h" diff --git a/platforms/chibios/keyboard-config-templates/halconf.h b/platforms/chibios/keyboard-config-templates/halconf.h new file mode 100644 index 0000000000..ab5f738f97 --- /dev/null +++ b/platforms/chibios/keyboard-config-templates/halconf.h @@ -0,0 +1,20 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +// #define HAL_USE_DAC TRUE + +#include_next "halconf.h" diff --git a/platforms/chibios/keyboard-config-templates/mcuconf.h b/platforms/chibios/keyboard-config-templates/mcuconf.h new file mode 100644 index 0000000000..5b42747b95 --- /dev/null +++ b/platforms/chibios/keyboard-config-templates/mcuconf.h @@ -0,0 +1,21 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include_next "mcuconf.h" + +// #undef STM32_HSE_ENABLED +// #define STM32_HSE_ENABLED FALSE diff --git a/drivers/boards/ld/MKL26Z64.ld b/platforms/chibios/ld/MKL26Z64.ld similarity index 100% rename from drivers/boards/ld/MKL26Z64.ld rename to platforms/chibios/ld/MKL26Z64.ld diff --git a/drivers/boards/ld/STM32F103x8_stm32duino_bootloader.ld b/platforms/chibios/ld/STM32F103x8_stm32duino_bootloader.ld similarity index 97% rename from drivers/boards/ld/STM32F103x8_stm32duino_bootloader.ld rename to platforms/chibios/ld/STM32F103x8_stm32duino_bootloader.ld index d0688ef601..bb852422a3 100644 --- a/drivers/boards/ld/STM32F103x8_stm32duino_bootloader.ld +++ b/platforms/chibios/ld/STM32F103x8_stm32duino_bootloader.ld @@ -16,9 +16,6 @@ /* * ST32F103xB memory setup for use with the maplemini bootloader. - * You will have to - * #define CORTEX_VTOR_INIT 0x5000 - * in your projects chconf.h */ MEMORY { diff --git a/quantum/backlight/backlight.c b/quantum/backlight/backlight.c index 34dd8cbdb5..113beb832f 100644 --- a/quantum/backlight/backlight.c +++ b/quantum/backlight/backlight.c @@ -20,10 +20,6 @@ along with this program. If not, see . #include "eeconfig.h" #include "debug.h" -#if defined(STM32F0XX) || defined(STM32F0xx) -# pragma message("Backlight support for STMF072 has had limited testing, YMMV. If unsure, set 'BACKLIGHT_ENABLE = no' in your rules.mk") -#endif - backlight_config_t backlight_config; #ifdef BACKLIGHT_BREATHING diff --git a/quantum/backlight/backlight_timer.c b/quantum/backlight/backlight_timer.c new file mode 100644 index 0000000000..c32c35c154 --- /dev/null +++ b/quantum/backlight/backlight_timer.c @@ -0,0 +1,167 @@ +#include "quantum.h" +#include "backlight.h" +#include "backlight_driver_common.h" +#include "debug.h" + +#ifndef BACKLIGHT_GPT_DRIVER +# define BACKLIGHT_GPT_DRIVER GPTD15 +#endif + +// Platform specific implementations +static void backlight_timer_configure(bool enable); +static void backlight_timer_set_duty(uint16_t duty); +static uint16_t backlight_timer_get_duty(void); + +// See http://jared.geek.nz/2013/feb/linear-led-pwm +static uint16_t cie_lightness(uint16_t v) { + if (v <= 5243) // if below 8% of max + return v / 9; // same as dividing by 900% + else { + uint32_t y = (((uint32_t)v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare + // to get a useful result with integer division, we shift left in the expression above + // and revert what we've done again after squaring. + y = y * y * y >> 8; + if (y > 0xFFFFUL) // prevent overflow + return 0xFFFFU; + else + return (uint16_t)y; + } +} + +void backlight_init_ports(void) { + backlight_pins_init(); + + backlight_set(get_backlight_level()); + +#ifdef BACKLIGHT_BREATHING + if (is_backlight_breathing()) { + breathing_enable(); + } +#endif +} + +void backlight_set(uint8_t level) { + if (level > BACKLIGHT_LEVELS) level = BACKLIGHT_LEVELS; + + backlight_pins_off(); + + backlight_timer_set_duty(cie_lightness(0xFFFFU / BACKLIGHT_LEVELS * level)); + backlight_timer_configure(level != 0); +} + +static void backlight_timer_top(void) { +#ifdef BACKLIGHT_BREATHING + if (is_breathing()) { + breathing_task(); + } +#endif + + if (backlight_timer_get_duty() > 256) { + backlight_pins_on(); + } +} + +static void backlight_timer_cmp(void) { backlight_pins_off(); } + +void backlight_task(void) {} + +#ifdef BACKLIGHT_BREATHING +# define BREATHING_STEPS 128 + +static bool breathing = false; +static uint16_t breathing_counter = 0; + +/* To generate breathing curve in python: + * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] + */ +static const uint8_t breathing_table[BREATHING_STEPS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +// Use this before the cie_lightness function. +static inline uint16_t scale_backlight(uint16_t v) { return v / BACKLIGHT_LEVELS * get_backlight_level(); } + +void breathing_task(void) { + uint8_t breathing_period = get_breathing_period(); + uint16_t interval = (uint16_t)breathing_period * 256 / BREATHING_STEPS; + // resetting after one period to prevent ugly reset at overflow. + breathing_counter = (breathing_counter + 1) % (breathing_period * 256); + uint8_t index = breathing_counter / interval % BREATHING_STEPS; + + // printf("index:%u\n", index); + + backlight_timer_set_duty(cie_lightness(scale_backlight((uint16_t)breathing_table[index] * 256))); +} + +bool is_breathing(void) { return breathing; } + +void breathing_enable(void) { + breathing_counter = 0; + breathing = true; +} +void breathing_disable(void) { breathing = false; } + +void breathing_pulse(void) { + backlight_set(is_backlight_enabled() ? 0 : BACKLIGHT_LEVELS); + wait_ms(10); + backlight_set(is_backlight_enabled() ? get_backlight_level() : 0); +} +#endif + +#ifdef PROTOCOL_CHIBIOS +// On Platforms where timers fire every tick and have no capture/top events +// - fake event in the normal timer callback +uint16_t s_duty = 0; + +static void timerCallback(void) { + /* Software PWM + * timer:1111 1111 1111 1111 + * \______/| \_______/____ count(0-255) + * \ \______________ unused(1) + * \__________________ index of step table(0-127) + */ + + // this works for cca 65536 irqs/sec + static union { + uint16_t raw; + struct { + uint16_t count : 8; + uint8_t dummy : 1; + uint8_t index : 7; + } pwm; + } timer = {.raw = 0}; + + timer.raw++; + + if (timer.pwm.count == 0) { + // LED on + backlight_timer_top(); + } else if (timer.pwm.count == (s_duty / 256)) { + // LED off + backlight_timer_cmp(); + } +} + +static void backlight_timer_set_duty(uint16_t duty) { s_duty = duty; } +static uint16_t backlight_timer_get_duty(void) { return s_duty; } + +// ChibiOS - Map GPT timer onto Software PWM +static void gptTimerCallback(GPTDriver *gptp) { + (void)gptp; + timerCallback(); +} + +static void backlight_timer_configure(bool enable) { + static const GPTConfig gptcfg = {1000000, gptTimerCallback, 0, 0}; + + static bool s_init = false; + if (!s_init) { + gptStart(&BACKLIGHT_GPT_DRIVER, &gptcfg); + s_init = true; + } + + if (enable) { + gptStartContinuous(&BACKLIGHT_GPT_DRIVER, gptcfg.frequency / 0xFFFF); + } else { + gptStopTimer(&BACKLIGHT_GPT_DRIVER); + } +} +#endif diff --git a/quantum/color.c b/quantum/color.c index c050300627..1c5128e4a2 100644 --- a/quantum/color.c +++ b/quantum/color.c @@ -18,14 +18,20 @@ #include "led_tables.h" #include "progmem.h" -RGB hsv_to_rgb(HSV hsv) { +RGB hsv_to_rgb_impl(HSV hsv, bool use_cie) { RGB rgb; uint8_t region, remainder, p, q, t; uint16_t h, s, v; if (hsv.s == 0) { #ifdef USE_CIE1931_CURVE - rgb.r = rgb.g = rgb.b = pgm_read_byte(&CIE1931_CURVE[hsv.v]); + if (use_cie) { + rgb.r = rgb.g = rgb.b = pgm_read_byte(&CIE1931_CURVE[hsv.v]); + } else { + rgb.r = hsv.v; + rgb.g = hsv.v; + rgb.b = hsv.v; + } #else rgb.r = hsv.v; rgb.g = hsv.v; @@ -37,7 +43,11 @@ RGB hsv_to_rgb(HSV hsv) { h = hsv.h; s = hsv.s; #ifdef USE_CIE1931_CURVE - v = pgm_read_byte(&CIE1931_CURVE[hsv.v]); + if (use_cie) { + v = pgm_read_byte(&CIE1931_CURVE[hsv.v]); + } else { + v = hsv.v; + } #else v = hsv.v; #endif @@ -86,6 +96,16 @@ RGB hsv_to_rgb(HSV hsv) { return rgb; } +RGB hsv_to_rgb(HSV hsv) { +#ifdef USE_CIE1931_CURVE + return hsv_to_rgb_impl(hsv, true); +#else + return hsv_to_rgb_impl(hsv, false); +#endif +} + +RGB hsv_to_rgb_nocie(HSV hsv) { return hsv_to_rgb_impl(hsv, false); } + #ifdef RGBW # ifndef MIN # define MIN(a, b) ((a) < (b) ? (a) : (b)) diff --git a/quantum/color.h b/quantum/color.h index 58d4f0407f..5c5a0f0ebd 100644 --- a/quantum/color.h +++ b/quantum/color.h @@ -64,6 +64,7 @@ typedef struct PACKED { #endif RGB hsv_to_rgb(HSV hsv); +RGB hsv_to_rgb_nocie(HSV hsv); #ifdef RGBW void convert_rgb_to_rgbw(LED_TYPE *led); #endif diff --git a/quantum/config_common.h b/quantum/config_common.h index 9b28e8d63f..c1e6698e50 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -44,7 +44,7 @@ # define PINB_ADDRESS 0x3 # define PINC_ADDRESS 0x6 # define PIND_ADDRESS 0x9 -# elif defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) +# elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) # define ADDRESS_BASE 0x00 # define PINA_ADDRESS 0x0 # define PINB_ADDRESS 0x3 @@ -218,6 +218,8 @@ # define B15 PAL_LINE(GPIOB, 15) # define B16 PAL_LINE(GPIOB, 16) # define B17 PAL_LINE(GPIOB, 17) +# define B18 PAL_LINE(GPIOB, 18) +# define B19 PAL_LINE(GPIOB, 19) # define C0 PAL_LINE(GPIOC, 0) # define C1 PAL_LINE(GPIOC, 1) # define C2 PAL_LINE(GPIOC, 2) @@ -305,7 +307,7 @@ UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ sei(); \ } while (0) -# elif (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)) +# elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) # define SERIAL_UART_BAUD 115200 # define SERIAL_UART_DATA UDR1 /* UBRR should result in ~16 and set UCSR1A = _BV(U2X1) as per rn42 documentation. HC05 needs baudrate configured accordingly */ diff --git a/quantum/debounce/readme.md b/quantum/debounce/readme.md deleted file mode 100644 index f77f78c764..0000000000 --- a/quantum/debounce/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -Debounce algorithms belong in this folder. -Here are a few ideas - -1) Global vs Per-Key vs Per-Row - * Global - one timer for all keys. Any key change state affects global timer - * Per key - one timer per key - * Per row - one timer per row - -2) Eager vs symmetric vs asymmetric - * Eager - any key change is reported immediately. All further inputs for DEBOUNCE ms are ignored. - * Symmetric - wait for no changes for DEBOUNCE ms before reporting change - * Asymmetric - wait for different times depending on key-down/key-up. E.g. Eager key-down, DEBOUNCE ms key up. - -3) Timestamp vs cycles - * old old old code waits n cycles, decreasing count by one each matrix_scan - * newer code stores the millisecond the change occurred, and does subraction to figure out time elapsed. - * Timestamps are superior, i don't think cycles will ever be used again once upgraded. - -The default algorithm is symmetric and global. -Here are a few that could be implemented: - -sym_g.c -sym_pk.c -sym_pr.c -sym_pr_cycles.c -eager_g.c -eager_pk.c -eager_pr.c //could be used in ergo-dox! diff --git a/quantum/debounce/sym_g.c b/quantum/debounce/sym_defer_g.c similarity index 100% rename from quantum/debounce/sym_g.c rename to quantum/debounce/sym_defer_g.c diff --git a/quantum/debounce/sym_pk.c b/quantum/debounce/sym_defer_pk.c similarity index 100% rename from quantum/debounce/sym_pk.c rename to quantum/debounce/sym_defer_pk.c diff --git a/quantum/debounce/eager_pk.c b/quantum/debounce/sym_eager_pk.c similarity index 100% rename from quantum/debounce/eager_pk.c rename to quantum/debounce/sym_eager_pk.c diff --git a/quantum/debounce/eager_pr.c b/quantum/debounce/sym_eager_pr.c similarity index 100% rename from quantum/debounce/eager_pr.c rename to quantum/debounce/sym_eager_pr.c diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c index 10d8c9eb66..0608b469c0 100644 --- a/quantum/dynamic_keymap.c +++ b/quantum/dynamic_keymap.c @@ -35,7 +35,16 @@ // Explicitly override it if the keyboard uses a microcontroller with // more EEPROM *and* it makes sense to increase it. #ifndef DYNAMIC_KEYMAP_EEPROM_MAX_ADDR -# define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 1023 +# if defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) +# define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 2047 +# else +# define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 1023 +# endif +#endif + +// Due to usage of uint16_t check for max 65535 +#if DYNAMIC_KEYMAP_EEPROM_MAX_ADDR > 65535 +# error DYNAMIC_KEYMAP_EEPROM_MAX_ADDR must be less than 65536 #endif // If DYNAMIC_KEYMAP_EEPROM_ADDR not explicitly defined in config.h, diff --git a/quantum/joystick.c b/quantum/joystick.c new file mode 100644 index 0000000000..7b87201aef --- /dev/null +++ b/quantum/joystick.c @@ -0,0 +1,13 @@ +#include "joystick.h" + +joystick_t joystick_status = {.buttons = {0}, + .axes = + { +#if JOYSTICK_AXES_COUNT > 0 + 0 +#endif + }, + .status = 0}; + +// array defining the reading of analog values for each axis +__attribute__((weak)) joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT] = {}; diff --git a/quantum/joystick.h b/quantum/joystick.h new file mode 100644 index 0000000000..a95472b9fd --- /dev/null +++ b/quantum/joystick.h @@ -0,0 +1,54 @@ +#pragma once + +#ifndef JOYSTICK_BUTTON_COUNT +# define JOYSTICK_BUTTON_COUNT 8 +#endif + +#ifndef JOYSTICK_AXES_COUNT +# define JOYSTICK_AXES_COUNT 4 +#endif + +#include "quantum.h" + +#include + +// configure on input_pin of the joystick_axes array entry to JS_VIRTUAL_AXIS +// to prevent it from being read from the ADC. This allows outputing forged axis value. +// +#define JS_VIRTUAL_AXIS 0xFF + +#define JOYSTICK_AXIS_VIRTUAL \ + { JS_VIRTUAL_AXIS, JS_VIRTUAL_AXIS, JS_VIRTUAL_AXIS, 0, 1023 } +#define JOYSTICK_AXIS_IN(INPUT_PIN, LOW, REST, HIGH) \ + { JS_VIRTUAL_AXIS, INPUT_PIN, JS_VIRTUAL_AXIS, LOW, REST, HIGH } +#define JOYSTICK_AXIS_IN_OUT(INPUT_PIN, OUTPUT_PIN, LOW, REST, HIGH) \ + { OUTPUT_PIN, INPUT_PIN, JS_VIRTUAL_AXIS, LOW, REST, HIGH } +#define JOYSTICK_AXIS_IN_OUT_GROUND(INPUT_PIN, OUTPUT_PIN, GROUND_PIN, LOW, REST, HIGH) \ + { OUTPUT_PIN, INPUT_PIN, GROUND_PIN, LOW, REST, HIGH } + +typedef struct { + pin_t output_pin; + pin_t input_pin; + pin_t ground_pin; + + // the AVR ADC offers 10 bit precision, with significant bits on the higher part + uint16_t min_digit; + uint16_t mid_digit; + uint16_t max_digit; +} joystick_config_t; + +extern joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT]; + +enum joystick_status { JS_INITIALIZED = 1, JS_UPDATED = 2 }; + +typedef struct { + uint8_t buttons[JOYSTICK_BUTTON_COUNT / 8 + 1]; + + int16_t axes[JOYSTICK_AXES_COUNT]; + uint8_t status : 2; +} joystick_t; + +extern joystick_t joystick_status; + +// to be implemented in the hid protocol library +void send_joystick_packet(joystick_t *joystick); diff --git a/quantum/keymap.h b/quantum/keymap.h index 34a9c8f8c6..de3bece11e 100644 --- a/quantum/keymap.h +++ b/quantum/keymap.h @@ -40,6 +40,10 @@ along with this program. If not, see . #if defined(PROTOCOL_CHIBIOS) # define RESET QK_RESET #endif +// Gross hack, remove me and change RESET keycode to QK_BOOT +#if defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1287__) +# undef RESET +#endif #include "quantum_keycodes.h" diff --git a/quantum/keymap_extras/keymap_canadian_multilingual.h b/quantum/keymap_extras/keymap_canadian_multilingual.h index 20333fd6da..382e67ac99 100644 --- a/quantum/keymap_extras/keymap_canadian_multilingual.h +++ b/quantum/keymap_extras/keymap_canadian_multilingual.h @@ -151,8 +151,8 @@ // Row 4 #define CA_LDAQ ALGR(CA_X) // « #define CA_RDAQ ALGR(CA_C) // » -#define CA_LABK ALGR(CA_DOT) // < -#define CA_RABK ALGR(CA_COMM) // > +#define CA_LABK ALGR(CA_COMM) // < +#define CA_RABK ALGR(CA_DOT) // > /* Right Ctrl symbols * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ diff --git a/quantum/keymap_extras/keymap_czech.h b/quantum/keymap_extras/keymap_czech.h index 7e9d299f49..43ba2a14ff 100644 --- a/quantum/keymap_extras/keymap_czech.h +++ b/quantum/keymap_extras/keymap_czech.h @@ -94,7 +94,7 @@ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    │ * │      │   │   │   │   │   │   │   │   │   │ " │ ! │ ' │    │ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ - * │    │ | │   │   │   │   │   │   │   │ ; │ : │ _ │          │ + * │    │ | │   │   │   │   │   │   │   │ ? │ : │ _ │          │ * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ * │    │    │    │                        │    │    │    │    │ * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ @@ -122,7 +122,7 @@ #define CZ_QUOT S(CZ_DIAE) // ' // Row 4 #define CZ_PIPE S(CZ_BSLS) // | -#define CZ_SCLN S(CZ_COMM) // ; +#define CZ_QUES S(CZ_COMM) // ? #define CZ_COLN S(CZ_DOT) // : #define CZ_UNDS S(CZ_MINS) // _ diff --git a/quantum/keymap_extras/keymap_spanish.h b/quantum/keymap_extras/keymap_spanish.h index 26725a0c93..1465ecc81b 100644 --- a/quantum/keymap_extras/keymap_spanish.h +++ b/quantum/keymap_extras/keymap_spanish.h @@ -117,7 +117,7 @@ #define ES_CIRC S(ES_GRV) // ^ (dead) #define ES_ASTR S(ES_PLUS) // * // Row 3 -#define ES_DIAE S(ES_GRV) // ¨ (dead) +#define ES_DIAE S(ES_ACUT) // ¨ (dead) // Row 4 #define ES_RABK S(ES_LABK) // > #define ES_SCLN S(KC_COMM) // ; diff --git a/quantum/keymap_extras/sendstring_belgian.h b/quantum/keymap_extras/sendstring_belgian.h index 5e9a079a95..5e7218a2fa 100644 --- a/quantum/keymap_extras/sendstring_belgian.h +++ b/quantum/keymap_extras/sendstring_belgian.h @@ -88,7 +88,7 @@ const uint8_t ascii_to_keycode_lut[128] PROGMEM = { // P Q R S T U V W BE_P, BE_Q, BE_R, BE_S, BE_T, BE_U, BE_V, BE_W, // X Y Z [ \ ] ^ _ - BE_X, BE_Y, BE_Z, BE_CIRC, BE_LABK, BE_DLR, BE_SECT, BE_MINS, + BE_X, BE_Y, BE_Z, BE_DCIR, BE_LABK, BE_DLR, BE_SECT, BE_MINS, // ` a b c d e f g BE_MICR, BE_A, BE_B, BE_C, BE_D, BE_E, BE_F, BE_G, // h i j k l m n o diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index a1d2c5fbf6..295dfd3189 100644 --- a/quantum/mcu_selection.mk +++ b/quantum/mcu_selection.mk @@ -1,3 +1,5 @@ +MCU_ORIG := $(MCU) + ifneq ($(findstring MKL26Z64, $(MCU)),) # Cortex version MCU = cortex-m0plus @@ -80,37 +82,37 @@ ifneq ($(findstring MK20DX256, $(MCU)),) BOARD ?= PJRC_TEENSY_3_1 endif -ifneq ($(findstring STM32F303, $(MCU)),) +ifneq ($(findstring STM32F042, $(MCU)),) # Cortex version - MCU = cortex-m4 + MCU = cortex-m0 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 7 + ARMV = 6 ## chip/board settings # - the next two should match the directories in # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) MCU_FAMILY = STM32 - MCU_SERIES = STM32F3xx + MCU_SERIES = STM32F0xx # Linker script to use # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ # or /ld/ - MCU_LDSCRIPT ?= STM32F303xC + MCU_LDSCRIPT ?= STM32F042x6 # Startup code to use # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= stm32f3xx + MCU_STARTUP ?= stm32f0xx # Board: it should exist either in /os/hal/boards/, # /boards/, or drivers/boards/ - BOARD ?= GENERIC_STM32_F303XC + BOARD ?= GENERIC_STM32_F042X6 - USE_FPU ?= yes + USE_FPU ?= no # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:df11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p df11 + DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 endif ifneq ($(findstring STM32F072, $(MCU)),) @@ -142,41 +144,8 @@ ifneq ($(findstring STM32F072, $(MCU)),) USE_FPU ?= no # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:df11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p df11 -endif - -ifneq ($(findstring STM32F042, $(MCU)),) - # Cortex version - MCU = cortex-m0 - - # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 6 - - ## chip/board settings - # - the next two should match the directories in - # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) - MCU_FAMILY = STM32 - MCU_SERIES = STM32F0xx - - # Linker script to use - # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ - # or /ld/ - MCU_LDSCRIPT ?= STM32F042x6 - - # Startup code to use - # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= stm32f0xx - - # Board: it should exist either in /os/hal/boards/, - # /boards/, or drivers/boards/ - BOARD ?= GENERIC_STM32_F042X6 - - USE_FPU ?= no - - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:df11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p df11 + DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 endif ifneq ($(findstring STM32F103, $(MCU)),) @@ -208,11 +177,110 @@ ifneq ($(findstring STM32F103, $(MCU)),) USE_FPU ?= no # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:df11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p df11 + DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 endif -ifneq (,$(filter $(MCU),atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb1286)) +ifneq ($(findstring STM32F303, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32F3xx + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32F303xC + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32f3xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= GENERIC_STM32_F303XC + + USE_FPU ?= yes + + # Options to pass to dfu-util when flashing + DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 +endif + +ifneq ($(findstring STM32F401, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32F4xx + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32F401xC + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32f4xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= BLACKPILL_STM32_F401 + + USE_FPU ?= yes + + # Options to pass to dfu-util when flashing + DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 +endif + +ifneq ($(findstring STM32F411, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32F4xx + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32F411xE + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32f4xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= BLACKPILL_STM32_F411 + + USE_FPU ?= yes + + # Options to pass to dfu-util when flashing + DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 +endif + +ifneq (,$(filter $(MCU),atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287)) PROTOCOL = LUFA # Processor frequency. @@ -266,7 +334,6 @@ ifneq (,$(filter $(MCU),atmega32a)) F_CPU ?= 12000000 # unsupported features for now - NO_UART ?= yes NO_SUSPEND_POWER_DOWN ?= yes endif @@ -284,7 +351,6 @@ ifneq (,$(filter $(MCU),atmega328p)) F_CPU ?= 16000000 # unsupported features for now - NO_UART ?= yes NO_SUSPEND_POWER_DOWN ?= yes endif @@ -317,6 +383,5 @@ ifneq (,$(filter $(MCU),attiny85)) F_CPU ?= 16500000 # unsupported features for now - NO_UART ?= yes NO_SUSPEND_POWER_DOWN ?= yes endif diff --git a/quantum/process_keycode/process_auto_shift.c b/quantum/process_keycode/process_auto_shift.c index b474bda691..b1267922ce 100644 --- a/quantum/process_keycode/process_auto_shift.c +++ b/quantum/process_keycode/process_auto_shift.c @@ -25,19 +25,6 @@ static uint16_t autoshift_time = 0; static uint16_t autoshift_timeout = AUTO_SHIFT_TIMEOUT; static uint16_t autoshift_lastkey = KC_NO; -void autoshift_timer_report(void) { - char display[8]; - - snprintf(display, 8, "\n%d\n", autoshift_timeout); - - send_string((const char *)display); -} - -void autoshift_on(uint16_t keycode) { - autoshift_time = timer_read(); - autoshift_lastkey = keycode; -} - void autoshift_flush(void) { if (autoshift_lastkey != KC_NO) { uint16_t elapsed = timer_elapsed(autoshift_time); @@ -53,10 +40,9 @@ void autoshift_flush(void) { } } -void autoshift_enable(void) { autoshift_enabled = true; } -void autoshift_disable(void) { - autoshift_enabled = false; - autoshift_flush(); +void autoshift_on(uint16_t keycode) { + autoshift_time = timer_read(); + autoshift_lastkey = keycode; } void autoshift_toggle(void) { @@ -68,6 +54,22 @@ void autoshift_toggle(void) { } } +void autoshift_enable(void) { autoshift_enabled = true; } +void autoshift_disable(void) { + autoshift_enabled = false; + autoshift_flush(); +} + +# ifndef AUTO_SHIFT_NO_SETUP +void autoshift_timer_report(void) { + char display[8]; + + snprintf(display, 8, "\n%d\n", autoshift_timeout); + + send_string((const char *)display); +} +# endif + bool get_autoshift_state(void) { return autoshift_enabled; } uint16_t get_autoshift_timeout(void) { return autoshift_timeout; } @@ -77,21 +79,10 @@ void set_autoshift_timeout(uint16_t timeout) { autoshift_timeout = timeout; } bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch (keycode) { - case KC_ASUP: - autoshift_timeout += 5; - return true; - - case KC_ASDN: - autoshift_timeout -= 5; - return true; - - case KC_ASRP: - autoshift_timer_report(); - return true; - case KC_ASTG: autoshift_toggle(); return true; + case KC_ASON: autoshift_enable(); return true; @@ -99,6 +90,18 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { autoshift_disable(); return true; +# ifndef AUTO_SHIFT_NO_SETUP + case KC_ASUP: + autoshift_timeout += 5; + return true; + case KC_ASDN: + autoshift_timeout -= 5; + return true; + + case KC_ASRP: + autoshift_timer_report(); + return true; +# endif # ifndef NO_AUTO_SHIFT_ALPHA case KC_A ... KC_Z: # endif diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index c4e299958a..f38d7d47a0 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c @@ -24,10 +24,10 @@ extern combo_t key_combos[]; extern int COMBO_LEN; #endif -__attribute__((weak)) void process_combo_event(uint8_t combo_index, bool pressed) {} +__attribute__((weak)) void process_combo_event(uint16_t combo_index, bool pressed) {} static uint16_t timer = 0; -static uint8_t current_combo_index = 0; +static uint16_t current_combo_index = 0; static bool drop_buffer = false; static bool is_active = false; static bool b_combo_enable = true; // defaults to enabled @@ -82,8 +82,8 @@ static inline void dump_key_buffer(bool emit) { } while (0) static bool process_single_combo(combo_t *combo, uint16_t keycode, keyrecord_t *record) { - uint8_t count = 0; - uint8_t index = -1; + uint8_t count = 0; + uint16_t index = -1; /* Find index of keycode and number of combo keys */ for (const uint16_t *keys = combo->keys;; ++count) { uint16_t key = pgm_read_word(&keys[count]); diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h index e21ee19609..0f01aae93e 100644 --- a/quantum/process_keycode/process_combo.h +++ b/quantum/process_keycode/process_combo.h @@ -56,7 +56,7 @@ typedef struct { bool process_combo(uint16_t keycode, keyrecord_t *record); void matrix_scan_combo(void); -void process_combo_event(uint8_t combo_index, bool pressed); +void process_combo_event(uint16_t combo_index, bool pressed); void combo_enable(void); void combo_disable(void); diff --git a/quantum/process_keycode/process_joystick.c b/quantum/process_keycode/process_joystick.c new file mode 100644 index 0000000000..5778a7434c --- /dev/null +++ b/quantum/process_keycode/process_joystick.c @@ -0,0 +1,162 @@ +#include "joystick.h" +#include "process_joystick.h" + +#include "analog.h" + +#include +#include + +bool process_joystick_buttons(uint16_t keycode, keyrecord_t *record); + +bool process_joystick(uint16_t keycode, keyrecord_t *record) { + if (process_joystick_buttons(keycode, record) && (joystick_status.status & JS_UPDATED) > 0) { + send_joystick_packet(&joystick_status); + joystick_status.status &= ~JS_UPDATED; + } + + return true; +} + +__attribute__((weak)) void joystick_task(void) { + if (process_joystick_analogread() && (joystick_status.status & JS_UPDATED)) { + send_joystick_packet(&joystick_status); + joystick_status.status &= ~JS_UPDATED; + } +} + +bool process_joystick_buttons(uint16_t keycode, keyrecord_t *record) { + if (keycode < JS_BUTTON0 || keycode > JS_BUTTON_MAX) { + return true; + } else { + if (record->event.pressed) { + joystick_status.buttons[(keycode - JS_BUTTON0) / 8] |= 1 << (keycode % 8); + } else { + joystick_status.buttons[(keycode - JS_BUTTON0) / 8] &= ~(1 << (keycode % 8)); + } + + joystick_status.status |= JS_UPDATED; + } + + return true; +} + +uint16_t savePinState(pin_t pin) { +#ifdef __AVR__ + uint8_t pinNumber = pin & 0xF; + return ((PORTx_ADDRESS(pin) >> pinNumber) & 0x1) << 1 | ((DDRx_ADDRESS(pin) >> pinNumber) & 0x1); +#elif defined(PROTOCOL_CHIBIOS) + /* + The pin configuration is backed up in the following format : + bit 15 9 8 7 6 5 4 3 2 1 0 + |unused|ODR|IDR|PUPDR|OSPEEDR|OTYPER|MODER| + */ + return ((PAL_PORT(pin)->MODER >> (2 * PAL_PAD(pin))) & 0x3) | (((PAL_PORT(pin)->OTYPER >> (1 * PAL_PAD(pin))) & 0x1) << 2) | (((PAL_PORT(pin)->OSPEEDR >> (2 * PAL_PAD(pin))) & 0x3) << 3) | (((PAL_PORT(pin)->PUPDR >> (2 * PAL_PAD(pin))) & 0x3) << 5) | (((PAL_PORT(pin)->IDR >> (1 * PAL_PAD(pin))) & 0x1) << 7) | (((PAL_PORT(pin)->ODR >> (1 * PAL_PAD(pin))) & 0x1) << 8); +#else + return 0; +#endif +} + +void restorePinState(pin_t pin, uint16_t restoreState) { +#if defined(PROTOCOL_LUFA) + uint8_t pinNumber = pin & 0xF; + PORTx_ADDRESS(pin) = (PORTx_ADDRESS(pin) & ~_BV(pinNumber)) | (((restoreState >> 1) & 0x1) << pinNumber); + DDRx_ADDRESS(pin) = (DDRx_ADDRESS(pin) & ~_BV(pinNumber)) | ((restoreState & 0x1) << pinNumber); +#elif defined(PROTOCOL_CHIBIOS) + PAL_PORT(pin)->MODER = (PAL_PORT(pin)->MODER & ~(0x3 << (2 * PAL_PAD(pin)))) | (restoreState & 0x3) << (2 * PAL_PAD(pin)); + PAL_PORT(pin)->OTYPER = (PAL_PORT(pin)->OTYPER & ~(0x1 << (1 * PAL_PAD(pin)))) | ((restoreState >> 2) & 0x1) << (1 * PAL_PAD(pin)); + PAL_PORT(pin)->OSPEEDR = (PAL_PORT(pin)->OSPEEDR & ~(0x3 << (2 * PAL_PAD(pin)))) | ((restoreState >> 3) & 0x3) << (2 * PAL_PAD(pin)); + PAL_PORT(pin)->PUPDR = (PAL_PORT(pin)->PUPDR & ~(0x3 << (2 * PAL_PAD(pin)))) | ((restoreState >> 5) & 0x3) << (2 * PAL_PAD(pin)); + PAL_PORT(pin)->IDR = (PAL_PORT(pin)->IDR & ~(0x1 << (1 * PAL_PAD(pin)))) | ((restoreState >> 7) & 0x1) << (1 * PAL_PAD(pin)); + PAL_PORT(pin)->ODR = (PAL_PORT(pin)->ODR & ~(0x1 << (1 * PAL_PAD(pin)))) | ((restoreState >> 8) & 0x1) << (1 * PAL_PAD(pin)); +#else + return; +#endif +} + +__attribute__((weak)) bool process_joystick_analogread() { return process_joystick_analogread_quantum(); } + +bool process_joystick_analogread_quantum() { +#if JOYSTICK_AXES_COUNT > 0 + for (int axis_index = 0; axis_index < JOYSTICK_AXES_COUNT; ++axis_index) { + if (joystick_axes[axis_index].input_pin == JS_VIRTUAL_AXIS) { + continue; + } + + // save previous input pin status as well + uint16_t inputSavedState = savePinState(joystick_axes[axis_index].input_pin); + + // disable pull-up resistor + writePinLow(joystick_axes[axis_index].input_pin); + + // if pin was a pull-up input, we need to uncharge it by turning it low + // before making it a low input + setPinOutput(joystick_axes[axis_index].input_pin); + + wait_us(10); + + // save and apply output pin status + uint16_t outputSavedState = 0; + if (joystick_axes[axis_index].output_pin != JS_VIRTUAL_AXIS) { + // save previous output pin status + outputSavedState = savePinState(joystick_axes[axis_index].output_pin); + + setPinOutput(joystick_axes[axis_index].output_pin); + writePinHigh(joystick_axes[axis_index].output_pin); + } + + uint16_t groundSavedState = 0; + if (joystick_axes[axis_index].ground_pin != JS_VIRTUAL_AXIS) { + // save previous output pin status + groundSavedState = savePinState(joystick_axes[axis_index].ground_pin); + + setPinOutput(joystick_axes[axis_index].ground_pin); + writePinLow(joystick_axes[axis_index].ground_pin); + } + + wait_us(10); + + setPinInput(joystick_axes[axis_index].input_pin); + + wait_us(10); + +# if defined(__AVR__) || defined(PROTOCOL_CHIBIOS) + int16_t axis_val = analogReadPin(joystick_axes[axis_index].input_pin); +# else + // default to resting position + int16_t axis_val = joystick_axes[axis_index].mid_digit; +# endif + + // test the converted value against the lower range + int32_t ref = joystick_axes[axis_index].mid_digit; + int32_t range = joystick_axes[axis_index].min_digit; + int32_t ranged_val = ((axis_val - ref) * -127) / (range - ref); + + if (ranged_val > 0) { + // the value is in the higher range + range = joystick_axes[axis_index].max_digit; + ranged_val = ((axis_val - ref) * 127) / (range - ref); + } + + // clamp the result in the valid range + ranged_val = ranged_val < -127 ? -127 : ranged_val; + ranged_val = ranged_val > 127 ? 127 : ranged_val; + + if (ranged_val != joystick_status.axes[axis_index]) { + joystick_status.axes[axis_index] = ranged_val; + joystick_status.status |= JS_UPDATED; + } + + // restore output, ground and input status + if (joystick_axes[axis_index].output_pin != JS_VIRTUAL_AXIS) { + restorePinState(joystick_axes[axis_index].output_pin, outputSavedState); + } + if (joystick_axes[axis_index].ground_pin != JS_VIRTUAL_AXIS) { + restorePinState(joystick_axes[axis_index].ground_pin, groundSavedState); + } + + restorePinState(joystick_axes[axis_index].input_pin, inputSavedState); + } + +#endif + return true; +} diff --git a/quantum/process_keycode/process_joystick.h b/quantum/process_keycode/process_joystick.h new file mode 100644 index 0000000000..7a8b82913a --- /dev/null +++ b/quantum/process_keycode/process_joystick.h @@ -0,0 +1,11 @@ +#pragma once + +#include +#include "quantum.h" + +bool process_joystick(uint16_t keycode, keyrecord_t *record); + +void joystick_task(void); + +bool process_joystick_analogread(void); +bool process_joystick_analogread_quantum(void); diff --git a/quantum/process_keycode/process_midi.c b/quantum/process_keycode/process_midi.c index b2fb902eb4..e525770144 100644 --- a/quantum/process_keycode/process_midi.c +++ b/quantum/process_keycode/process_midi.c @@ -68,10 +68,12 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) { uint8_t tone = keycode - MIDI_TONE_MIN; uint8_t velocity = compute_velocity(midi_config.velocity); if (record->event.pressed) { - uint8_t note = midi_compute_note(keycode); - midi_send_noteon(&midi_device, channel, note, velocity); - dprintf("midi noteon channel:%d note:%d velocity:%d\n", channel, note, velocity); - tone_status[tone] = note; + if (tone_status[tone] == MIDI_INVALID_NOTE) { + uint8_t note = midi_compute_note(keycode); + midi_send_noteon(&midi_device, channel, note, velocity); + dprintf("midi noteon channel:%d note:%d velocity:%d\n", channel, note, velocity); + tone_status[tone] = note; + } } else { uint8_t note = tone_status[tone]; if (note != MIDI_INVALID_NOTE) { diff --git a/quantum/process_keycode/process_rgb.c b/quantum/process_keycode/process_rgb.c index a1e46e0348..e0c62465f9 100644 --- a/quantum/process_keycode/process_rgb.c +++ b/quantum/process_keycode/process_rgb.c @@ -23,6 +23,7 @@ typedef void (*rgb_func_pointer)(void); * * noinline to optimise for firmware size not speed (not in hot path) */ +#if !(defined(RGBLIGHT_DISABLE_KEYCODES) || defined(RGB_MATRIX_DISABLE_KEYCODES)) static void __attribute__((noinline)) handleKeycodeRGB(const uint8_t is_shifted, const rgb_func_pointer inc_func, const rgb_func_pointer dec_func) { if (is_shifted) { dec_func(); @@ -30,6 +31,7 @@ static void __attribute__((noinline)) handleKeycodeRGB(const uint8_t is_shifted, inc_func(); } } +#endif /** * Wrapper for animation mode @@ -56,7 +58,9 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) { // Split keyboards need to trigger on key-up for edge-case issue if (!record->event.pressed) { #endif +#if !(defined(RGBLIGHT_DISABLE_KEYCODES) || defined(RGB_MATRIX_DISABLE_KEYCODES)) uint8_t shifted = get_mods() & MOD_MASK_SHIFT; +#endif switch (keycode) { case RGB_TOG: #if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) @@ -163,7 +167,7 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) { #endif return false; case RGB_MODE_RAINBOW: -#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_RAINBOW_MOOD) +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined(RGBLIGHT_EFFECT_RAINBOW_MOOD) handleKeycodeRGBMode(RGBLIGHT_MODE_RAINBOW_MOOD, RGBLIGHT_MODE_RAINBOW_MOOD_end); #endif #if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) && !defined(DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT) @@ -171,7 +175,7 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) { #endif return false; case RGB_MODE_SWIRL: -#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_RAINBOW_SWIRL) +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined(RGBLIGHT_EFFECT_RAINBOW_SWIRL) handleKeycodeRGBMode(RGBLIGHT_MODE_RAINBOW_SWIRL, RGBLIGHT_MODE_RAINBOW_SWIRL_end); #endif #if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) && !defined(DISABLE_RGB_MATRIX_CYCLE_PINWHEEL) @@ -179,27 +183,27 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) { #endif return false; case RGB_MODE_SNAKE: -#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_SNAKE) +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined(RGBLIGHT_EFFECT_SNAKE) handleKeycodeRGBMode(RGBLIGHT_MODE_SNAKE, RGBLIGHT_MODE_SNAKE_end); #endif return false; case RGB_MODE_KNIGHT: -#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_KNIGHT) +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined(RGBLIGHT_EFFECT_KNIGHT) handleKeycodeRGBMode(RGBLIGHT_MODE_KNIGHT, RGBLIGHT_MODE_KNIGHT_end); #endif return false; case RGB_MODE_XMAS: -#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_CHRISTMAS) +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined(RGBLIGHT_EFFECT_CHRISTMAS) rgblight_mode(RGBLIGHT_MODE_CHRISTMAS); #endif return false; case RGB_MODE_GRADIENT: -#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_STATIC_GRADIENT) +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined(RGBLIGHT_EFFECT_STATIC_GRADIENT) handleKeycodeRGBMode(RGBLIGHT_MODE_STATIC_GRADIENT, RGBLIGHT_MODE_STATIC_GRADIENT_end); #endif return false; case RGB_MODE_RGBTEST: -#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined( RGBLIGHT_EFFECT_RGB_TEST) +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined(RGBLIGHT_EFFECT_RGB_TEST) rgblight_mode(RGBLIGHT_MODE_RGB_TEST); #endif return false; diff --git a/quantum/process_keycode/process_space_cadet.c b/quantum/process_keycode/process_space_cadet.c index 6833fdb9fb..bcaf62a964 100644 --- a/quantum/process_keycode/process_space_cadet.c +++ b/quantum/process_keycode/process_space_cadet.c @@ -14,9 +14,10 @@ * along with this program. If not, see . */ #include "process_space_cadet.h" +#include "action_tapping.h" -#ifndef TAPPING_TERM -# define TAPPING_TERM 200 +#ifdef NO_ACTION_TAPPING +__attribute__((weak)) uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { return TAPPING_TERM; }; #endif // ********** OBSOLETE DEFINES, STOP USING! (pls?) ********** @@ -85,7 +86,7 @@ static uint16_t sc_timer = 0; static uint8_t sc_mods = 0; #endif -void perform_space_cadet(keyrecord_t *record, uint8_t holdMod, uint8_t tapMod, uint8_t keycode) { +void perform_space_cadet(keyrecord_t *record, uint16_t sc_keycode, uint8_t holdMod, uint8_t tapMod, uint8_t keycode) { if (record->event.pressed) { sc_last = holdMod; sc_timer = timer_read(); @@ -96,7 +97,7 @@ void perform_space_cadet(keyrecord_t *record, uint8_t holdMod, uint8_t tapMod, u register_mods(MOD_BIT(holdMod)); } } else { - if (sc_last == holdMod && timer_elapsed(sc_timer) < TAPPING_TERM) { + if (sc_last == holdMod && timer_elapsed(sc_timer) < get_tapping_term(sc_keycode, record)) { if (holdMod != tapMod) { if (IS_MOD(holdMod)) { unregister_mods(MOD_BIT(holdMod)); @@ -126,31 +127,31 @@ void perform_space_cadet(keyrecord_t *record, uint8_t holdMod, uint8_t tapMod, u bool process_space_cadet(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_LSPO: { - perform_space_cadet(record, LSPO_KEYS); + perform_space_cadet(record, keycode, LSPO_KEYS); return false; } case KC_RSPC: { - perform_space_cadet(record, RSPC_KEYS); + perform_space_cadet(record, keycode, RSPC_KEYS); return false; } case KC_LCPO: { - perform_space_cadet(record, LCPO_KEYS); + perform_space_cadet(record, keycode, LCPO_KEYS); return false; } case KC_RCPC: { - perform_space_cadet(record, RCPC_KEYS); + perform_space_cadet(record, keycode, RCPC_KEYS); return false; } case KC_LAPO: { - perform_space_cadet(record, LAPO_KEYS); + perform_space_cadet(record, keycode, LAPO_KEYS); return false; } case KC_RAPC: { - perform_space_cadet(record, RAPC_KEYS); + perform_space_cadet(record, keycode, RAPC_KEYS); return false; } case KC_SFTENT: { - perform_space_cadet(record, SFTENT_KEYS); + perform_space_cadet(record, keycode, SFTENT_KEYS); return false; } default: { diff --git a/quantum/process_keycode/process_space_cadet.h b/quantum/process_keycode/process_space_cadet.h index c823143504..3ace073997 100644 --- a/quantum/process_keycode/process_space_cadet.h +++ b/quantum/process_keycode/process_space_cadet.h @@ -17,5 +17,8 @@ #include "quantum.h" -void perform_space_cadet(keyrecord_t *record, uint8_t holdMod, uint8_t tapMod, uint8_t keycode); +void perform_space_cadet(keyrecord_t *record, uint16_t sc_keycode, uint8_t holdMod, uint8_t tapMod, uint8_t keycode); bool process_space_cadet(uint16_t keycode, keyrecord_t *record); +#ifdef NO_ACTION_TAPPING +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record); +#endif diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index 16756e59c2..0c7b6353eb 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -16,10 +16,6 @@ #include "quantum.h" #include "action_tapping.h" -#ifndef TAPPING_TERM -# define TAPPING_TERM 200 -#endif - #ifndef NO_ACTION_ONESHOT uint8_t get_oneshot_mods(void); #endif @@ -171,7 +167,7 @@ void matrix_scan_tap_dance() { if (action->custom_tapping_term > 0) { tap_user_defined = action->custom_tapping_term; } else { - tap_user_defined = TAPPING_TERM; + tap_user_defined = get_tapping_term(action->state.keycode, NULL); } if (action->state.count && timer_elapsed(action->state.timer) > tap_user_defined) { process_tap_dance_action_on_dance_finished(action); diff --git a/quantum/quantum.c b/quantum/quantum.c index 044a156128..dab6c9172f 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -17,7 +17,7 @@ #include #include "quantum.h" -#ifdef PROTOCOL_LUFA +#ifdef BLUETOOTH_ENABLE # include "outputselect.h" #endif @@ -276,6 +276,9 @@ bool process_record_quantum(keyrecord_t *record) { #endif #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) process_rgb(keycode, record) && +#endif +#ifdef JOYSTICK_ENABLE + process_joystick(keycode, record) && #endif true)) { return false; @@ -618,7 +621,7 @@ void matrix_init_quantum() { #ifdef HAPTIC_ENABLE haptic_init(); #endif -#ifdef OUTPUT_AUTO_ENABLE +#if defined(BLUETOOTH_ENABLE) && defined(OUTPUT_AUTO_ENABLE) set_output(OUTPUT_AUTO); #endif diff --git a/quantum/quantum.h b/quantum/quantum.h index 51deac0cd5..a2c0ec9a28 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -142,6 +142,10 @@ extern layer_state_t layer_state; # include "process_magic.h" #endif +#ifdef JOYSTICK_ENABLE +# include "process_joystick.h" +#endif + #ifdef GRAVE_ESC_ENABLE # include "process_grave_esc.h" #endif diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 437921aeb1..a0a7bc340f 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -123,10 +123,12 @@ enum quantum_keycodes { KC_LEAD, #endif - // Auto Shift setup +// Auto Shift setup +#ifndef AUTO_SHIFT_NO_SETUP KC_ASUP, KC_ASDN, KC_ASRP, +#endif KC_ASTG, KC_ASON, KC_ASOFF, @@ -512,6 +514,41 @@ enum quantum_keycodes { DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, + JS_BUTTON0, + JS_BUTTON_MIN = JS_BUTTON0, + JS_BUTTON1, + JS_BUTTON2, + JS_BUTTON3, + JS_BUTTON4, + JS_BUTTON5, + JS_BUTTON6, + JS_BUTTON7, + JS_BUTTON8, + JS_BUTTON9, + JS_BUTTON10, + JS_BUTTON11, + JS_BUTTON12, + JS_BUTTON13, + JS_BUTTON14, + JS_BUTTON15, + JS_BUTTON16, + JS_BUTTON17, + JS_BUTTON18, + JS_BUTTON19, + JS_BUTTON20, + JS_BUTTON21, + JS_BUTTON22, + JS_BUTTON23, + JS_BUTTON24, + JS_BUTTON25, + JS_BUTTON26, + JS_BUTTON27, + JS_BUTTON28, + JS_BUTTON29, + JS_BUTTON30, + JS_BUTTON31, + JS_BUTTON_MAX = JS_BUTTON31, + // always leave at the end SAFE_RANGE }; diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index 615b4b0a7b..802c5afcee 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -155,7 +155,7 @@ void eeconfig_update_rgb_matrix_default(void) { } void eeconfig_debug_rgb_matrix(void) { - dprintf("rgb_matrix_config eprom\n"); + dprintf("rgb_matrix_config EEPROM\n"); dprintf("rgb_matrix_config.enable = %d\n", rgb_matrix_config.enable); dprintf("rgb_matrix_config.mode = %d\n", rgb_matrix_config.mode); dprintf("rgb_matrix_config.hsv.h = %d\n", rgb_matrix_config.hsv.h); @@ -462,11 +462,16 @@ void rgb_matrix_set_suspend_state(bool state) { bool rgb_matrix_get_suspend_state(void) { return g_suspend_state; } -void rgb_matrix_toggle(void) { +void rgb_matrix_toggle_eeprom_helper(bool write_to_eeprom) { rgb_matrix_config.enable ^= 1; rgb_task_state = STARTING; - eeconfig_update_rgb_matrix(); + if (write_to_eeprom) { + eeconfig_update_rgb_matrix(); + } + dprintf("rgb matrix toggle [%s]: rgb_matrix_config.enable = %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.enable); } +void rgb_matrix_toggle_noeeprom(void) { rgb_matrix_toggle_eeprom_helper(false); } +void rgb_matrix_toggle(void) { rgb_matrix_toggle_eeprom_helper(true); } void rgb_matrix_enable(void) { rgb_matrix_enable_noeeprom(); @@ -490,90 +495,106 @@ void rgb_matrix_disable_noeeprom(void) { uint8_t rgb_matrix_is_enabled(void) { return rgb_matrix_config.enable; } -void rgb_matrix_step(void) { - rgb_matrix_config.mode++; - if (rgb_matrix_config.mode >= RGB_MATRIX_EFFECT_MAX) rgb_matrix_config.mode = 1; +void rgb_matrix_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) { + if (!rgb_matrix_config.enable) { + return; + } + if (mode < 1) { + rgb_matrix_config.mode = 1; + } else if (mode >= RGB_MATRIX_EFFECT_MAX) { + rgb_matrix_config.mode = RGB_MATRIX_EFFECT_MAX - 1; + } else { + rgb_matrix_config.mode = mode; + } rgb_task_state = STARTING; - eeconfig_update_rgb_matrix(); + if (write_to_eeprom) { + eeconfig_update_rgb_matrix(); + } + dprintf("rgb matrix mode [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.mode); } - -void rgb_matrix_step_reverse(void) { - rgb_matrix_config.mode--; - if (rgb_matrix_config.mode < 1) rgb_matrix_config.mode = RGB_MATRIX_EFFECT_MAX - 1; - rgb_task_state = STARTING; - eeconfig_update_rgb_matrix(); -} - -void rgb_matrix_increase_hue(void) { - rgb_matrix_config.hsv.h += RGB_MATRIX_HUE_STEP; - eeconfig_update_rgb_matrix(); -} - -void rgb_matrix_decrease_hue(void) { - rgb_matrix_config.hsv.h -= RGB_MATRIX_HUE_STEP; - eeconfig_update_rgb_matrix(); -} - -void rgb_matrix_increase_sat(void) { - rgb_matrix_config.hsv.s = qadd8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP); - eeconfig_update_rgb_matrix(); -} - -void rgb_matrix_decrease_sat(void) { - rgb_matrix_config.hsv.s = qsub8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP); - eeconfig_update_rgb_matrix(); -} - -void rgb_matrix_increase_val(void) { - rgb_matrix_config.hsv.v = qadd8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP); - if (rgb_matrix_config.hsv.v > RGB_MATRIX_MAXIMUM_BRIGHTNESS) rgb_matrix_config.hsv.v = RGB_MATRIX_MAXIMUM_BRIGHTNESS; - eeconfig_update_rgb_matrix(); -} - -void rgb_matrix_decrease_val(void) { - rgb_matrix_config.hsv.v = qsub8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP); - eeconfig_update_rgb_matrix(); -} - -void rgb_matrix_increase_speed(void) { - rgb_matrix_config.speed = qadd8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP); - eeconfig_update_rgb_matrix(); -} - -void rgb_matrix_decrease_speed(void) { - rgb_matrix_config.speed = qsub8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP); - eeconfig_update_rgb_matrix(); -} - -uint8_t rgb_matrix_get_speed(void) { return rgb_matrix_config.speed; } - -led_flags_t rgb_matrix_get_flags(void) { return rgb_effect_params.flags; } - -void rgb_matrix_set_flags(led_flags_t flags) { rgb_effect_params.flags = flags; } - -void rgb_matrix_mode(uint8_t mode) { - rgb_matrix_config.mode = mode; - rgb_task_state = STARTING; - eeconfig_update_rgb_matrix(); -} - -void rgb_matrix_mode_noeeprom(uint8_t mode) { rgb_matrix_config.mode = mode; } +void rgb_matrix_mode_noeeprom(uint8_t mode) { rgb_matrix_mode_eeprom_helper(mode, false); } +void rgb_matrix_mode(uint8_t mode) { rgb_matrix_mode_eeprom_helper(mode, true); } uint8_t rgb_matrix_get_mode(void) { return rgb_matrix_config.mode; } -void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { - rgb_matrix_sethsv_noeeprom(hue, sat, val); - eeconfig_update_rgb_matrix(); +void rgb_matrix_step_helper(bool write_to_eeprom) { + uint8_t mode = rgb_matrix_config.mode + 1; + rgb_matrix_mode_eeprom_helper((mode < RGB_MATRIX_EFFECT_MAX) ? mode : 1, write_to_eeprom); } +void rgb_matrix_step_noeeprom(void) { rgb_matrix_step_helper(false); } +void rgb_matrix_step(void) { rgb_matrix_step_helper(true); } -void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { +void rgb_matrix_step_reverse_helper(bool write_to_eeprom) { + uint8_t mode = rgb_matrix_config.mode - 1; + rgb_matrix_mode_eeprom_helper((mode < 1) ? RGB_MATRIX_EFFECT_MAX - 1 : mode, write_to_eeprom); +} +void rgb_matrix_step_reverse_noeeprom(void) { rgb_matrix_step_reverse_helper(false); } +void rgb_matrix_step_reverse(void) { rgb_matrix_step_reverse_helper(true); } + +void rgb_matrix_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom) { + if (!rgb_matrix_config.enable) { + return; + } rgb_matrix_config.hsv.h = hue; rgb_matrix_config.hsv.s = sat; - rgb_matrix_config.hsv.v = val; - if (rgb_matrix_config.hsv.v > RGB_MATRIX_MAXIMUM_BRIGHTNESS) rgb_matrix_config.hsv.v = RGB_MATRIX_MAXIMUM_BRIGHTNESS; + rgb_matrix_config.hsv.v = (val > RGB_MATRIX_MAXIMUM_BRIGHTNESS) ? RGB_MATRIX_MAXIMUM_BRIGHTNESS : val; + if (write_to_eeprom) { + eeconfig_update_rgb_matrix(); + } + dprintf("rgb matrix set hsv [%s]: %u,%u,%u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v); } +void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { rgb_matrix_sethsv_eeprom_helper(hue, sat, val, false); } +void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { rgb_matrix_sethsv_eeprom_helper(hue, sat, val, true); } HSV rgb_matrix_get_hsv(void) { return rgb_matrix_config.hsv; } uint8_t rgb_matrix_get_hue(void) { return rgb_matrix_config.hsv.h; } uint8_t rgb_matrix_get_sat(void) { return rgb_matrix_config.hsv.s; } uint8_t rgb_matrix_get_val(void) { return rgb_matrix_config.hsv.v; } + +void rgb_matrix_increase_hue_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h + RGB_MATRIX_HUE_STEP, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, write_to_eeprom); } +void rgb_matrix_increase_hue_noeeprom(void) { rgb_matrix_increase_hue_helper(false); } +void rgb_matrix_increase_hue(void) { rgb_matrix_increase_hue_helper(true); } + +void rgb_matrix_decrease_hue_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h - RGB_MATRIX_HUE_STEP, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, write_to_eeprom); } +void rgb_matrix_decrease_hue_noeeprom(void) { rgb_matrix_decrease_hue_helper(false); } +void rgb_matrix_decrease_hue(void) { rgb_matrix_decrease_hue_helper(true); } + +void rgb_matrix_increase_sat_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, qadd8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP), rgb_matrix_config.hsv.v, write_to_eeprom); } +void rgb_matrix_increase_sat_noeeprom(void) { rgb_matrix_increase_sat_helper(false); } +void rgb_matrix_increase_sat(void) { rgb_matrix_increase_sat_helper(true); } + +void rgb_matrix_decrease_sat_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, qsub8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP), rgb_matrix_config.hsv.v, write_to_eeprom); } +void rgb_matrix_decrease_sat_noeeprom(void) { rgb_matrix_decrease_sat_helper(false); } +void rgb_matrix_decrease_sat(void) { rgb_matrix_decrease_sat_helper(true); } + +void rgb_matrix_increase_val_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, qadd8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP), write_to_eeprom); } +void rgb_matrix_increase_val_noeeprom(void) { rgb_matrix_increase_val_helper(false); } +void rgb_matrix_increase_val(void) { rgb_matrix_increase_val_helper(true); } + +void rgb_matrix_decrease_val_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, qsub8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP), write_to_eeprom); } +void rgb_matrix_decrease_val_noeeprom(void) { rgb_matrix_decrease_val_helper(false); } +void rgb_matrix_decrease_val(void) { rgb_matrix_decrease_val_helper(true); } + +void rgb_matrix_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) { + rgb_matrix_config.speed = speed; + if (write_to_eeprom) { + eeconfig_update_rgb_matrix(); + } + dprintf("rgb matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.speed); +} +void rgb_matrix_set_speed_noeeprom(uint8_t speed) { rgb_matrix_set_speed_eeprom_helper(speed, false); } +void rgb_matrix_set_speed(uint8_t speed) { rgb_matrix_set_speed_eeprom_helper(speed, true); } + +uint8_t rgb_matrix_get_speed(void) { return rgb_matrix_config.speed; } + +void rgb_matrix_increase_speed_helper(bool write_to_eeprom) { rgb_matrix_set_speed_eeprom_helper(qadd8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP), write_to_eeprom); } +void rgb_matrix_increase_speed_noeeprom(void) { rgb_matrix_increase_speed_helper(false); } +void rgb_matrix_increase_speed(void) { rgb_matrix_increase_speed_helper(true); } + +void rgb_matrix_decrease_speed_helper(bool write_to_eeprom) { rgb_matrix_set_speed_eeprom_helper(qsub8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP), write_to_eeprom); } +void rgb_matrix_decrease_speed_noeeprom(void) { rgb_matrix_decrease_speed_helper(false); } +void rgb_matrix_decrease_speed(void) { rgb_matrix_decrease_speed_helper(true); } + +led_flags_t rgb_matrix_get_flags(void) { return rgb_effect_params.flags; } + +void rgb_matrix_set_flags(led_flags_t flags) { rgb_effect_params.flags = flags; } diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h index 03e9e8572c..733333349f 100644 --- a/quantum/rgb_matrix.h +++ b/quantum/rgb_matrix.h @@ -108,54 +108,55 @@ void rgb_matrix_init(void); void rgb_matrix_set_suspend_state(bool state); bool rgb_matrix_get_suspend_state(void); void rgb_matrix_toggle(void); +void rgb_matrix_toggle_noeeprom(void); void rgb_matrix_enable(void); void rgb_matrix_enable_noeeprom(void); void rgb_matrix_disable(void); void rgb_matrix_disable_noeeprom(void); uint8_t rgb_matrix_is_enabled(void); -void rgb_matrix_step(void); -void rgb_matrix_step_reverse(void); -void rgb_matrix_increase_hue(void); -void rgb_matrix_decrease_hue(void); -void rgb_matrix_increase_sat(void); -void rgb_matrix_decrease_sat(void); -void rgb_matrix_increase_val(void); -void rgb_matrix_decrease_val(void); -void rgb_matrix_increase_speed(void); -void rgb_matrix_decrease_speed(void); -uint8_t rgb_matrix_get_speed(void); -led_flags_t rgb_matrix_get_flags(void); -void rgb_matrix_set_flags(led_flags_t flags); void rgb_matrix_mode(uint8_t mode); void rgb_matrix_mode_noeeprom(uint8_t mode); uint8_t rgb_matrix_get_mode(void); +void rgb_matrix_step(void); +void rgb_matrix_step_noeeprom(void); +void rgb_matrix_step_reverse(void); +void rgb_matrix_step_reverse_noeeprom(void); void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val); void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val); HSV rgb_matrix_get_hsv(void); uint8_t rgb_matrix_get_hue(void); uint8_t rgb_matrix_get_sat(void); uint8_t rgb_matrix_get_val(void); +void rgb_matrix_increase_hue(void); +void rgb_matrix_increase_hue_noeeprom(void); +void rgb_matrix_decrease_hue(void); +void rgb_matrix_decrease_hue_noeeprom(void); +void rgb_matrix_increase_sat(void); +void rgb_matrix_increase_sat_noeeprom(void); +void rgb_matrix_decrease_sat(void); +void rgb_matrix_decrease_sat_noeeprom(void); +void rgb_matrix_increase_val(void); +void rgb_matrix_increase_val_noeeprom(void); +void rgb_matrix_decrease_val(void); +void rgb_matrix_decrease_val_noeeprom(void); +void rgb_matrix_set_speed(uint8_t speed); +void rgb_matrix_set_speed_noeeprom(uint8_t speed); +uint8_t rgb_matrix_get_speed(void); +void rgb_matrix_increase_speed(void); +void rgb_matrix_increase_speed_noeeprom(void); +void rgb_matrix_decrease_speed(void); +void rgb_matrix_decrease_speed_noeeprom(void); +led_flags_t rgb_matrix_get_flags(void); +void rgb_matrix_set_flags(led_flags_t flags); #ifndef RGBLIGHT_ENABLE # define rgblight_toggle rgb_matrix_toggle +# define rgblight_toggle_noeeprom rgb_matrix_toggle_noeeprom # define rgblight_enable rgb_matrix_enable # define rgblight_enable_noeeprom rgb_matrix_enable_noeeprom # define rgblight_disable rgb_matrix_disable # define rgblight_disable_noeeprom rgb_matrix_disable_noeeprom # define rgblight_is_enabled rgb_matrix_is_enabled -# define rgblight_step rgb_matrix_step -# define rgblight_sethsv rgb_matrix_sethsv -# define rgblight_sethsv_noeeprom rgb_matrix_sethsv_noeeprom -# define rgblight_step_reverse rgb_matrix_step_reverse -# define rgblight_increase_hue rgb_matrix_increase_hue -# define rgblight_decrease_hue rgb_matrix_decrease_hue -# define rgblight_increase_sat rgb_matrix_increase_sat -# define rgblight_decrease_sat rgb_matrix_decrease_sat -# define rgblight_increase_val rgb_matrix_increase_val -# define rgblight_decrease_val rgb_matrix_decrease_val -# define rgblight_increase_speed rgb_matrix_increase_speed -# define rgblight_decrease_speed rgb_matrix_decrease_speed -# define rgblight_get_speed rgb_matrix_get_speed # define rgblight_mode rgb_matrix_mode # define rgblight_mode_noeeprom rgb_matrix_mode_noeeprom # define rgblight_get_mode rgb_matrix_get_mode @@ -163,6 +164,31 @@ uint8_t rgb_matrix_get_val(void); # define rgblight_get_sat rgb_matrix_get_sat # define rgblight_get_val rgb_matrix_get_val # define rgblight_get_hsv rgb_matrix_get_hsv +# define rgblight_step rgb_matrix_step +# define rgblight_step_noeeprom rgb_matrix_step_noeeprom +# define rgblight_step_reverse rgb_matrix_step_reverse +# define rgblight_step_reverse_noeeprom rgb_matrix_step_reverse_noeeprom +# define rgblight_sethsv rgb_matrix_sethsv +# define rgblight_sethsv_noeeprom rgb_matrix_sethsv_noeeprom +# define rgblight_increase_hue rgb_matrix_increase_hue +# define rgblight_increase_hue_noeeprom rgb_matrix_increase_hue_noeeprom +# define rgblight_decrease_hue rgb_matrix_decrease_hue +# define rgblight_decrease_hue_noeeprom rgb_matrix_decrease_hue_noeeprom +# define rgblight_increase_sat rgb_matrix_increase_sat +# define rgblight_increase_sat_noeeprom rgb_matrix_increase_sat_noeeprom +# define rgblight_decrease_sat rgb_matrix_decrease_sat +# define rgblight_decrease_sat_noeeprom rgb_matrix_decrease_sat_noeeprom +# define rgblight_increase_val rgb_matrix_increase_val +# define rgblight_increase_val_noeeprom rgb_matrix_increase_val_noeeprom +# define rgblight_decrease_val rgb_matrix_decrease_val +# define rgblight_decrease_val_noeeprom rgb_matrix_decrease_val_noeeprom +# define rgblight_set_speed rgb_matrix_set_speed +# define rgblight_set_speed_noeeprom rgb_matrix_set_speed_noeeprom +# define rgblight_get_speed rgb_matrix_get_speed +# define rgblight_increase_speed rgb_matrix_increase_speed +# define rgblight_increase_speed_noeeprom rgb_matrix_increase_speed_noeeprom +# define rgblight_decrease_speed rgb_matrix_decrease_speed +# define rgblight_decrease_speed_noeeprom rgb_matrix_decrease_speed_noeeprom #endif typedef struct { diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c index 6084d5685c..0685a34753 100644 --- a/quantum/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix_drivers.c @@ -31,7 +31,9 @@ static void init(void) { i2c_init(); # ifdef IS31FL3731 IS31FL3731_init(DRIVER_ADDR_1); +# ifdef DRIVER_ADDR_2 IS31FL3731_init(DRIVER_ADDR_2); +# endif # elif defined(IS31FL3733) IS31FL3733_init(DRIVER_ADDR_1, 0); # elif defined(IS31FL3737) @@ -55,7 +57,9 @@ static void init(void) { // This actually updates the LED drivers # ifdef IS31FL3731 IS31FL3731_update_led_control_registers(DRIVER_ADDR_1, 0); +# ifdef DRIVER_ADDR_2 IS31FL3731_update_led_control_registers(DRIVER_ADDR_2, 1); +# endif # elif defined(IS31FL3733) IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0); IS31FL3733_update_led_control_registers(DRIVER_ADDR_2, 1); @@ -69,7 +73,9 @@ static void init(void) { # ifdef IS31FL3731 static void flush(void) { IS31FL3731_update_pwm_buffers(DRIVER_ADDR_1, 0); +# ifdef DRIVER_ADDR_2 IS31FL3731_update_pwm_buffers(DRIVER_ADDR_2, 1); +# endif } const rgb_matrix_driver_t rgb_matrix_driver = { @@ -111,6 +117,10 @@ const rgb_matrix_driver_t rgb_matrix_driver = { # endif #elif defined(WS2812) +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_CUSTOM_DRIVER) +# pragma message "Cannot use RGBLIGHT and RGB Matrix using WS2812 at the same time." +# pragma message "You need to use a custom driver, or re-implement the WS2812 driver to use a different configuration." +# endif // LED color buffer LED_TYPE rgb_matrix_ws2812_array[DRIVER_LED_TOTAL]; diff --git a/quantum/rgblight.c b/quantum/rgblight.c index d33484ccfd..76bb6eb8cb 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -132,11 +132,11 @@ void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { sethsv_raw(hue, sat, val > RGBLIGHT_LIMIT_VAL ? RGBLIGHT_LIMIT_VAL : val, led1); } void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) { - (*led1).r = r; - (*led1).g = g; - (*led1).b = b; + led1->r = r; + led1->g = g; + led1->b = b; #ifdef RGBW - (*led1).w = 0; + led1->w = 0; #endif } @@ -406,17 +406,26 @@ void rgblight_decrease_val_helper(bool write_to_eeprom) { } void rgblight_decrease_val_noeeprom(void) { rgblight_decrease_val_helper(false); } void rgblight_decrease_val(void) { rgblight_decrease_val_helper(true); } -void rgblight_increase_speed(void) { + +void rgblight_increase_speed_helper(bool write_to_eeprom) { if (rgblight_config.speed < 3) rgblight_config.speed++; // RGBLIGHT_SPLIT_SET_CHANGE_HSVS; // NEED? - eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this + if (write_to_eeprom) { + eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this + } } +void rgblight_increase_speed(void) { rgblight_increase_speed_helper(true); } +void rgblight_increase_speed_noeeprom(void) { rgblight_increase_speed_helper(false); } -void rgblight_decrease_speed(void) { +void rgblight_decrease_speed_helper(bool write_to_eeprom) { if (rgblight_config.speed > 0) rgblight_config.speed--; // RGBLIGHT_SPLIT_SET_CHANGE_HSVS; // NEED?? - eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this + if (write_to_eeprom) { + eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this + } } +void rgblight_decrease_speed(void) { rgblight_decrease_speed_helper(true); } +void rgblight_decrease_speed_noeeprom(void) { rgblight_decrease_speed_helper(false); } void rgblight_sethsv_noeeprom_old(uint8_t hue, uint8_t sat, uint8_t val) { if (rgblight_config.enable) { @@ -1152,16 +1161,39 @@ void rgblight_effect_knight(animation_status_t *anim) { #endif #ifdef RGBLIGHT_EFFECT_CHRISTMAS -void rgblight_effect_christmas(animation_status_t *anim) { - uint8_t hue; - uint8_t i; +# define CUBED(x) ((x) * (x) * (x)) + +/** + * Christmas lights effect, with a smooth animation between red & green. + */ +void rgblight_effect_christmas(animation_status_t *anim) { + static int8_t increment = 1; + const uint8_t max_pos = 32; + const uint8_t hue_green = 85; + + uint32_t xa; + uint8_t hue, val; + uint8_t i; + + // The effect works by animating anim->pos from 0 to 32 and back to 0. + // The pos is used in a cubic bezier formula to ease-in-out between red and green, leaving the interpolated colors visible as short as possible. + xa = CUBED((uint32_t)anim->pos); + hue = ((uint32_t)hue_green) * xa / (xa + CUBED((uint32_t)(max_pos - anim->pos))); + // Additionally, these interpolated colors get shown with a slightly darker value, to make them less prominent than the main colors. + val = 255 - (3 * (hue < hue_green / 2 ? hue : hue_green - hue) / 2); - anim->current_offset = (anim->current_offset + 1) % 2; for (i = 0; i < rgblight_ranges.effect_num_leds; i++) { - hue = 0 + ((i / RGBLIGHT_EFFECT_CHRISTMAS_STEP + anim->current_offset) % 2) * 85; - sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i + rgblight_ranges.effect_start_pos]); + uint8_t local_hue = (i / RGBLIGHT_EFFECT_CHRISTMAS_STEP) % 2 ? hue : hue_green - hue; + sethsv(local_hue, rgblight_config.sat, val, (LED_TYPE *)&led[i + rgblight_ranges.effect_start_pos]); } rgblight_set(); + + if (anim->pos == 0) { + increment = 1; + } else if (anim->pos == max_pos) { + increment = -1; + } + anim->pos += increment; } #endif diff --git a/quantum/rgblight.h b/quantum/rgblight.h index c36b328a35..c3a9e94b7c 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -142,7 +142,7 @@ enum RGBLIGHT_EFFECT_MODE { # endif # ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL -# define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000 +# define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 40 # endif # ifndef RGBLIGHT_EFFECT_CHRISTMAS_STEP @@ -336,7 +336,9 @@ void rgblight_increase_val_noeeprom(void); void rgblight_decrease_val(void); void rgblight_decrease_val_noeeprom(void); void rgblight_increase_speed(void); +void rgblight_increase_speed_noeeprom(void); void rgblight_decrease_speed(void); +void rgblight_decrease_speed_noeeprom(void); void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val); void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val); diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 90735eda44..e8e944d710 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -72,7 +72,7 @@ bool usbIsActive(void) { return false; } -#elif defined(PROTOCOL_LUFA) +#elif defined(PROTOCOL_LUFA) && defined(OTGPADE) static inline bool usbIsActive(void) { USB_OTGPAD_On(); // enables VBUS pad wait_us(5); diff --git a/quantum/stm32/mcuconf.h b/quantum/stm32/mcuconf.h deleted file mode 100644 index 71994a98e0..0000000000 --- a/quantum/stm32/mcuconf.h +++ /dev/null @@ -1,273 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef MCUCONF_H -#define MCUCONF_H - -/* - * STM32F3xx drivers configuration. - * The following settings override the default settings present in - * the various device driver implementation headers. - * Note that the settings for each driver only have effect if the whole - * driver is enabled in halconf.h. - * - * IRQ priorities: - * 15...0 Lowest...Highest. - * - * DMA priorities: - * 0...3 Lowest...Highest. - */ - -#define STM32F3xx_MCUCONF -#define STM32F303_MCUCONF - -/* - * HAL driver system settings. - */ -#define STM32_NO_INIT FALSE -#define STM32_PVD_ENABLE FALSE -#define STM32_PLS STM32_PLS_LEV0 -#define STM32_HSI_ENABLED TRUE -#define STM32_LSI_ENABLED TRUE -#define STM32_HSE_ENABLED TRUE -#define STM32_LSE_ENABLED FALSE -#define STM32_SW STM32_SW_PLL -#define STM32_PLLSRC STM32_PLLSRC_HSE -#define STM32_PREDIV_VALUE 1 -#define STM32_PLLMUL_VALUE 9 -#define STM32_HPRE STM32_HPRE_DIV1 -#define STM32_PPRE1 STM32_PPRE1_DIV2 -#define STM32_PPRE2 STM32_PPRE2_DIV2 -#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK -#define STM32_ADC12PRES STM32_ADC12PRES_DIV1 -#define STM32_ADC34PRES STM32_ADC34PRES_DIV1 -#define STM32_USART1SW STM32_USART1SW_PCLK -#define STM32_USART2SW STM32_USART2SW_PCLK -#define STM32_USART3SW STM32_USART3SW_PCLK -#define STM32_UART4SW STM32_UART4SW_PCLK -#define STM32_UART5SW STM32_UART5SW_PCLK -#define STM32_I2C1SW STM32_I2C1SW_SYSCLK -#define STM32_I2C2SW STM32_I2C2SW_SYSCLK -#define STM32_TIM1SW STM32_TIM1SW_PCLK2 -#define STM32_TIM8SW STM32_TIM8SW_PCLK2 -#define STM32_RTCSEL STM32_RTCSEL_LSI -#define STM32_USB_CLOCK_REQUIRED TRUE -#define STM32_USBPRE STM32_USBPRE_DIV1P5 - -/* - * IRQ system settings. - */ -#define STM32_IRQ_EXTI0_PRIORITY 6 -#define STM32_IRQ_EXTI1_PRIORITY 6 -#define STM32_IRQ_EXTI2_PRIORITY 6 -#define STM32_IRQ_EXTI3_PRIORITY 6 -#define STM32_IRQ_EXTI4_PRIORITY 6 -#define STM32_IRQ_EXTI5_9_PRIORITY 6 -#define STM32_IRQ_EXTI10_15_PRIORITY 6 -#define STM32_IRQ_EXTI16_PRIORITY 6 -#define STM32_IRQ_EXTI17_PRIORITY 15 -#define STM32_IRQ_EXTI18_PRIORITY 6 -#define STM32_IRQ_EXTI19_PRIORITY 15 -#define STM32_IRQ_EXTI20_PRIORITY 15 -#define STM32_IRQ_EXTI21_22_29_PRIORITY 6 -#define STM32_IRQ_EXTI30_32_PRIORITY 6 -#define STM32_IRQ_EXTI33_PRIORITY 6 -#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7 -#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7 -#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7 -#define STM32_IRQ_TIM1_CC_PRIORITY 7 - -/* - * ADC driver system settings. - */ -#define STM32_ADC_DUAL_MODE FALSE -#define STM32_ADC_COMPACT_SAMPLES FALSE -#define STM32_ADC_USE_ADC1 FALSE -#define STM32_ADC_USE_ADC2 FALSE -#define STM32_ADC_USE_ADC3 FALSE -#define STM32_ADC_USE_ADC4 FALSE -#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) -#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) -#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) -#define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) -#define STM32_ADC_ADC1_DMA_PRIORITY 2 -#define STM32_ADC_ADC2_DMA_PRIORITY 2 -#define STM32_ADC_ADC3_DMA_PRIORITY 2 -#define STM32_ADC_ADC4_DMA_PRIORITY 2 -#define STM32_ADC_ADC12_IRQ_PRIORITY 5 -#define STM32_ADC_ADC3_IRQ_PRIORITY 5 -#define STM32_ADC_ADC4_IRQ_PRIORITY 5 -#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5 -#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5 -#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5 -#define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5 -#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 -#define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 - -/* - * CAN driver system settings. - */ -#define STM32_CAN_USE_CAN1 FALSE -#define STM32_CAN_CAN1_IRQ_PRIORITY 11 - -/* - * DAC driver system settings. - */ -#define STM32_DAC_DUAL_MODE FALSE -#define STM32_DAC_USE_DAC1_CH1 TRUE -#define STM32_DAC_USE_DAC1_CH2 TRUE -#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10 -#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10 -#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 -#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 - -/* - * GPT driver system settings. - */ -#define STM32_GPT_USE_TIM1 FALSE -#define STM32_GPT_USE_TIM2 FALSE -#define STM32_GPT_USE_TIM3 FALSE -#define STM32_GPT_USE_TIM4 FALSE -#define STM32_GPT_USE_TIM6 TRUE -#define STM32_GPT_USE_TIM7 TRUE -#define STM32_GPT_USE_TIM8 TRUE -#define STM32_GPT_USE_TIM15 FALSE -#define STM32_GPT_USE_TIM16 FALSE -#define STM32_GPT_USE_TIM17 FALSE -#define STM32_GPT_TIM1_IRQ_PRIORITY 7 -#define STM32_GPT_TIM2_IRQ_PRIORITY 7 -#define STM32_GPT_TIM3_IRQ_PRIORITY 7 -#define STM32_GPT_TIM4_IRQ_PRIORITY 7 -#define STM32_GPT_TIM6_IRQ_PRIORITY 7 -#define STM32_GPT_TIM7_IRQ_PRIORITY 7 -#define STM32_GPT_TIM8_IRQ_PRIORITY 7 - -/* - * I2C driver system settings. - */ -#define STM32_I2C_USE_I2C1 TRUE -#define STM32_I2C_USE_I2C2 FALSE -#define STM32_I2C_BUSY_TIMEOUT 50 -#define STM32_I2C_I2C1_IRQ_PRIORITY 10 -#define STM32_I2C_I2C2_IRQ_PRIORITY 10 -#define STM32_I2C_USE_DMA TRUE -#define STM32_I2C_I2C1_DMA_PRIORITY 1 -#define STM32_I2C_I2C2_DMA_PRIORITY 1 -#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") - -/* - * ICU driver system settings. - */ -#define STM32_ICU_USE_TIM1 FALSE -#define STM32_ICU_USE_TIM2 FALSE -#define STM32_ICU_USE_TIM3 FALSE -#define STM32_ICU_USE_TIM4 FALSE -#define STM32_ICU_USE_TIM8 FALSE -#define STM32_ICU_USE_TIM15 FALSE -#define STM32_ICU_TIM1_IRQ_PRIORITY 7 -#define STM32_ICU_TIM2_IRQ_PRIORITY 7 -#define STM32_ICU_TIM3_IRQ_PRIORITY 7 -#define STM32_ICU_TIM4_IRQ_PRIORITY 7 -#define STM32_ICU_TIM8_IRQ_PRIORITY 7 - -/* - * PWM driver system settings. - */ -#define STM32_PWM_USE_ADVANCED FALSE -#define STM32_PWM_USE_TIM1 FALSE -#define STM32_PWM_USE_TIM2 FALSE -#define STM32_PWM_USE_TIM3 TRUE -#define STM32_PWM_USE_TIM4 TRUE -#define STM32_PWM_USE_TIM8 FALSE -#define STM32_PWM_USE_TIM15 FALSE -#define STM32_PWM_USE_TIM16 FALSE -#define STM32_PWM_USE_TIM17 FALSE -#define STM32_PWM_TIM1_IRQ_PRIORITY 7 -#define STM32_PWM_TIM2_IRQ_PRIORITY 7 -#define STM32_PWM_TIM3_IRQ_PRIORITY 7 -#define STM32_PWM_TIM4_IRQ_PRIORITY 7 -#define STM32_PWM_TIM8_IRQ_PRIORITY 7 - -/* - * RTC driver system settings. - */ -#define STM32_RTC_PRESA_VALUE 32 -#define STM32_RTC_PRESS_VALUE 1024 -#define STM32_RTC_CR_INIT 0 -#define STM32_RTC_TAMPCR_INIT 0 - -/* - * SERIAL driver system settings. - */ -#define STM32_SERIAL_USE_USART1 FALSE -#define STM32_SERIAL_USE_USART2 TRUE -#define STM32_SERIAL_USE_USART3 FALSE -#define STM32_SERIAL_USE_UART4 FALSE -#define STM32_SERIAL_USE_UART5 FALSE -#define STM32_SERIAL_USART1_PRIORITY 12 -#define STM32_SERIAL_USART2_PRIORITY 12 -#define STM32_SERIAL_USART3_PRIORITY 12 -#define STM32_SERIAL_UART4_PRIORITY 12 -#define STM32_SERIAL_UART5_PRIORITY 12 - -/* - * SPI driver system settings. - */ -#define STM32_SPI_USE_SPI1 FALSE -#define STM32_SPI_USE_SPI2 TRUE -#define STM32_SPI_USE_SPI3 FALSE -#define STM32_SPI_SPI1_DMA_PRIORITY 1 -#define STM32_SPI_SPI2_DMA_PRIORITY 1 -#define STM32_SPI_SPI3_DMA_PRIORITY 1 -#define STM32_SPI_SPI1_IRQ_PRIORITY 10 -#define STM32_SPI_SPI2_IRQ_PRIORITY 10 -#define STM32_SPI_SPI3_IRQ_PRIORITY 10 -#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") - -/* - * ST driver system settings. - */ -#define STM32_ST_IRQ_PRIORITY 8 -#define STM32_ST_USE_TIMER 2 - -/* - * UART driver system settings. - */ -#define STM32_UART_USE_USART1 FALSE -#define STM32_UART_USE_USART2 FALSE -#define STM32_UART_USE_USART3 FALSE -#define STM32_UART_USART1_IRQ_PRIORITY 12 -#define STM32_UART_USART2_IRQ_PRIORITY 12 -#define STM32_UART_USART3_IRQ_PRIORITY 12 -#define STM32_UART_USART1_DMA_PRIORITY 0 -#define STM32_UART_USART2_DMA_PRIORITY 0 -#define STM32_UART_USART3_DMA_PRIORITY 0 -#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") - -/* - * USB driver system settings. - */ -#define STM32_USB_USE_USB1 TRUE -#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE -#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 -#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 - -/* - * WDG driver system settings. - */ -#define STM32_WDG_USE_IWDG FALSE - -#endif /* MCUCONF_H */ diff --git a/quantum/stm32/proton_c.mk b/quantum/stm32/proton_c.mk deleted file mode 100644 index b25b555045..0000000000 --- a/quantum/stm32/proton_c.mk +++ /dev/null @@ -1,47 +0,0 @@ -# Proton C MCU settings for converting AVR projects - -# These are defaults based on what has been implemented for ARM boards -AUDIO_ENABLE = yes -WS2812_DRIVER = bitbang - -# Force task driven PWM until ARM can provide automatic configuration -BACKLIGHT_DRIVER = software - -# The rest of these settings shouldn't change - -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F3xx - -# Linker script to use -# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F303xC - -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f3xx - -# Board: it should exist either in /os/hal/boards/ -# or /boards -BOARD = GENERIC_STM32_F303XC - -# Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# Vector table for application -# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ -# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB -# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 -OPT_DEFS = - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave -DFU_SUFFIX_ARGS = -p df11 -v 0483 diff --git a/quantum/via.c b/quantum/via.c index f2599d1d21..7c3b7f9248 100644 --- a/quantum/via.c +++ b/quantum/via.c @@ -186,7 +186,7 @@ bool process_record_via(uint16_t keycode, keyrecord_t *record) { // Keyboard level code can override this to handle custom messages from VIA. // See raw_hid_receive() implementation. -// DO NOT call raw_hid_send() in the overide function. +// DO NOT call raw_hid_send() in the override function. __attribute__((weak)) void raw_hid_receive_kb(uint8_t *data, uint8_t length) { uint8_t *command_id = &(data[0]); *command_id = id_unhandled; diff --git a/show_options.mk b/show_options.mk index 3f3243fbd0..2a57817735 100644 --- a/show_options.mk +++ b/show_options.mk @@ -82,8 +82,7 @@ OTHER_OPTION_NAMES = \ RGB_MATRIX_KEYPRESSES \ LED_MIRRORED \ RGBLIGHT_FULL_POWER \ - Link_Time_Optimization \ - LINK_TIME_OPTIMIZATION_ENABLE + LTO_ENABLE define NAME_ECHO @echo " $1 = $($1) # $(origin $1)" diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 04ae162246..336a83e9d3 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -120,15 +120,16 @@ define EXEC_DFU if $(DFU_PROGRAMMER) --version 2>&1 | $(GREP) -q 0.7 ; then\ $(DFU_PROGRAMMER) $(MCU) erase --force; \ if [ "$(1)" ]; then \ - $(DFU_PROGRAMMER) $(MCU) flash --eeprom $(QUANTUM_PATH)/split_common/$(1);\ + $(DFU_PROGRAMMER) $(MCU) flash --force --eeprom $(QUANTUM_PATH)/split_common/$(1);\ fi; \ + $(DFU_PROGRAMMER) $(MCU) flash --force $(BUILD_DIR)/$(TARGET).hex;\ else \ $(DFU_PROGRAMMER) $(MCU) erase; \ if [ "$(1)" ]; then \ $(DFU_PROGRAMMER) $(MCU) flash-eeprom $(QUANTUM_PATH)/split_common/$(1);\ fi; \ + $(DFU_PROGRAMMER) $(MCU) flash $(BUILD_DIR)/$(TARGET).hex;\ fi; \ - $(DFU_PROGRAMMER) $(MCU) flash $(BUILD_DIR)/$(TARGET).hex;\ $(DFU_PROGRAMMER) $(MCU) reset endef @@ -141,7 +142,7 @@ dfu-start: dfu-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep if $(DFU_PROGRAMMER) --version 2>&1 | $(GREP) -q 0.7 ; then\ - $(DFU_PROGRAMMER) $(MCU) flash --eeprom $(BUILD_DIR)/$(TARGET).eep;\ + $(DFU_PROGRAMMER) $(MCU) flash --force --eeprom $(BUILD_DIR)/$(TARGET).eep;\ else\ $(DFU_PROGRAMMER) $(MCU) flash-eeprom $(BUILD_DIR)/$(TARGET).eep;\ fi diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index 09aaddeef0..2bd53f0dc8 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -50,11 +50,42 @@ PLATFORM_MK = $(CHIBIOS_CONTRIB)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/$(PLAT endif include $(PLATFORM_MK) +BOARD_MK := + +ifneq ("$(wildcard $(KEYBOARD_PATH_5)/boards/$(BOARD)/board.mk)","") + BOARD_PATH = $(KEYBOARD_PATH_5) + BOARD_MK += $(KEYBOARD_PATH_5)/boards/$(BOARD)/board.mk +else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/boards/$(BOARD)/board.mk)","") + BOARD_PATH = $(KEYBOARD_PATH_4) + BOARD_MK += $(KEYBOARD_PATH_4)/boards/$(BOARD)/board.mk +else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/boards/$(BOARD)/board.mk)","") + BOARD_PATH = $(KEYBOARD_PATH_3) + BOARD_MK += $(KEYBOARD_PATH_3)/boards/$(BOARD)/board.mk +else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/boards/$(BOARD)/board.mk)","") + BOARD_PATH = $(KEYBOARD_PATH_2) + BOARD_MK += $(KEYBOARD_PATH_2)/boards/$(BOARD)/board.mk +else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/boards/$(BOARD)/board.mk)","") + BOARD_PATH = $(KEYBOARD_PATH_1) + BOARD_MK += $(KEYBOARD_PATH_1)/boards/$(BOARD)/board.mk +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/$(BOARD)/board/board.mk)","") + BOARD_PATH = $(TOP_DIR)/platforms/chibios/$(BOARD) + BOARD_MK += $(TOP_DIR)/platforms/chibios/$(BOARD)/board/board.mk + KEYBOARD_PATHS += $(BOARD_PATH)/configs +endif + +ifeq ("$(wildcard $(BOARD_MK))","") + BOARD_MK = $(CHIBIOS)/os/hal/boards/$(BOARD)/board.mk + ifeq ("$(wildcard $(BOARD_MK))","") + BOARD_MK = $(CHIBIOS_CONTRIB)/os/hal/boards/$(BOARD)/board.mk + endif +endif + # Bootloader address ifdef STM32_BOOTLOADER_ADDRESS OPT_DEFS += -DSTM32_BOOTLOADER_ADDRESS=$(STM32_BOOTLOADER_ADDRESS) endif +# Work out if we need to set up the include for the bootloader definitions ifneq ("$(wildcard $(KEYBOARD_PATH_5)/bootloader_defs.h)","") OPT_DEFS += -include $(KEYBOARD_PATH_5)/bootloader_defs.h else ifneq ("$(wildcard $(KEYBOARD_PATH_5)/boards/$(BOARD)/bootloader_defs.h)","") @@ -75,39 +106,53 @@ else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/bootloader_defs.h)","") OPT_DEFS += -include $(KEYBOARD_PATH_1)/bootloader_defs.h else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/boards/$(BOARD)/bootloader_defs.h)","") OPT_DEFS += -include $(KEYBOARD_PATH_1)/boards/$(BOARD)/bootloader_defs.h -else ifneq ("$(wildcard $(TOP_DIR)/drivers/boards/$(BOARD)/bootloader_defs.h)","") - OPT_DEFS += -include $(TOP_DIR)/drivers/boards/$(BOARD)/bootloader_defs.h +else ifneq ("$(wildcard $(BOARD_PATH)/configs/bootloader_defs.h)","") + OPT_DEFS += -include $(BOARD_PATH)/configs/bootloader_defs.h endif -BOARD_MK := - -ifneq ("$(wildcard $(KEYBOARD_PATH_5)/boards/$(BOARD)/board.mk)","") - BOARD_PATH = $(KEYBOARD_PATH_5) - BOARD_MK += $(KEYBOARD_PATH_5)/boards/$(BOARD)/board.mk -else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/boards/$(BOARD)/board.mk)","") - BOARD_PATH = $(KEYBOARD_PATH_4) - BOARD_MK += $(KEYBOARD_PATH_4)/boards/$(BOARD)/board.mk -else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/boards/$(BOARD)/board.mk)","") - BOARD_PATH = $(KEYBOARD_PATH_3) - BOARD_MK += $(KEYBOARD_PATH_3)/boards/$(BOARD)/board.mk -else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/boards/$(BOARD)/board.mk)","") - BOARD_PATH = $(KEYBOARD_PATH_2) - BOARD_MK += $(KEYBOARD_PATH_2)/boards/$(BOARD)/board.mk -else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/boards/$(BOARD)/board.mk)","") - BOARD_PATH = $(KEYBOARD_PATH_1) - BOARD_MK += $(KEYBOARD_PATH_1)/boards/$(BOARD)/board.mk -else ifneq ("$(wildcard $(TOP_DIR)/drivers/boards/$(BOARD)/board.mk)","") - BOARD_PATH = $(TOP_DIR)/drivers - BOARD_MK += $(TOP_DIR)/drivers/boards/$(BOARD)/board.mk +# Work out the config file directories +ifneq ("$(wildcard $(KEYBOARD_PATH_5)/chconf.h)","") + CHCONFDIR = $(KEYBOARD_PATH_5) +else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/chconf.h)","") + CHCONFDIR = $(KEYBOARD_PATH_4) +else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/chconf.h)","") + CHCONFDIR = $(KEYBOARD_PATH_3) +else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/chconf.h)","") + CHCONFDIR = $(KEYBOARD_PATH_2) +else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/chconf.h)","") + CHCONFDIR = $(KEYBOARD_PATH_1) +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/$(BOARD)/configs/chconf.h)","") + CHCONFDIR = $(TOP_DIR)/platforms/chibios/$(BOARD)/configs endif -ifeq ("$(wildcard $(BOARD_MK))","") - BOARD_MK = $(CHIBIOS)/os/hal/boards/$(BOARD)/board.mk - ifeq ("$(wildcard $(BOARD_MK))","") - BOARD_MK = $(CHIBIOS_CONTRIB)/os/hal/boards/$(BOARD)/board.mk - endif +ifneq ("$(wildcard $(KEYBOARD_PATH_5)/halconf.h)","") + HALCONFDIR = $(KEYBOARD_PATH_5) +else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/halconf.h)","") + HALCONFDIR = $(KEYBOARD_PATH_4) +else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/halconf.h)","") + HALCONFDIR = $(KEYBOARD_PATH_3) +else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/halconf.h)","") + HALCONFDIR = $(KEYBOARD_PATH_2) +else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/halconf.h)","") + HALCONFDIR = $(KEYBOARD_PATH_1) +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/$(BOARD)/configs/halconf.h)","") + HALCONFDIR = $(TOP_DIR)/platforms/chibios/$(BOARD)/configs endif +# HAL-OSAL files (optional). +include $(CHIBIOS)/os/hal/hal.mk + +ifeq ("$(PLATFORM_NAME)","") + PLATFORM_NAME = platform +endif + +PLATFORM_MK = $(CHIBIOS)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/$(PLATFORM_NAME).mk +ifeq ("$(wildcard $(PLATFORM_MK))","") +PLATFORM_MK = $(CHIBIOS_CONTRIB)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/$(PLATFORM_NAME).mk +endif +include $(PLATFORM_MK) + + include $(BOARD_MK) -include $(CHIBIOS)/os/hal/osal/rt/osal.mk # ChibiOS <= 19.x -include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk # ChibiOS >= 20.x @@ -138,8 +183,8 @@ else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/ld/$(MCU_LDSCRIPT).ld)","") LDSCRIPT = $(KEYBOARD_PATH_2)/ld/$(MCU_LDSCRIPT).ld else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/ld/$(MCU_LDSCRIPT).ld)","") LDSCRIPT = $(KEYBOARD_PATH_1)/ld/$(MCU_LDSCRIPT).ld -else ifneq ("$(wildcard $(TOP_DIR)/drivers/boards/ld/$(MCU_LDSCRIPT).ld)","") - LDSCRIPT = $(TOP_DIR)/drivers/boards/ld/$(MCU_LDSCRIPT).ld +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/ld/$(MCU_LDSCRIPT).ld)","") + LDSCRIPT = $(TOP_DIR)/platforms/chibios/ld/$(MCU_LDSCRIPT).ld else ifneq ("$(wildcard $(STARTUPLD_CONTRIB)/$(MCU_LDSCRIPT).ld)","") LDSCRIPT = $(STARTUPLD_CONTRIB)/$(MCU_LDSCRIPT).ld USE_CHIBIOS_CONTRIB = yes @@ -163,6 +208,7 @@ QUANTUM_LIB_SRC += $(STARTUPASM) $(PORTASM) $(OSALASM) CHIBISRC := $(patsubst $(TOP_DIR)/%,%,$(CHIBISRC)) EXTRAINCDIRS += $(CHIBIOS)/os/license $(CHIBIOS)/os/oslib/include \ + $(TOP_DIR)/platforms/chibios/$(BOARD)/configs \ $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ $(STREAMSINC) $(CHIBIOS)/os/various $(COMMON_VPATH) @@ -182,6 +228,8 @@ else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/halconf_community.h)","") USE_CHIBIOS_CONTRIB = yes else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/halconf_community.h)","") USE_CHIBIOS_CONTRIB = yes +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/$(BOARD)/configs/halconf_community.h)","") + USE_CHIBIOS_CONTRIB = yes endif ifeq ($(strip $(USE_CHIBIOS_CONTRIB)),yes) @@ -194,6 +242,15 @@ endif # Project, sources and paths ############################################################################## +############################################################################## +# Injected configs +# +ifneq ("$(wildcard $(BOARD_PATH)/configs/config.h)","") + CONFIG_H += $(BOARD_PATH)/configs/config.h +endif +ifneq ("$(wildcard $(BOARD_PATH)/configs/post_config.h)","") + POST_CONFIG_H += $(BOARD_PATH)/configs/post_config.h +endif ############################################################################## # Compiler settings @@ -261,12 +318,14 @@ ifneq ("$(SERIAL)","") endif ST_LINK_ARGS ?= +ST_FLASH_ARGS ?= # List any extra directories to look for libraries here. EXTRALIBDIRS = $(RULESPATH)/ld DFU_UTIL ?= dfu-util ST_LINK_CLI ?= st-link_cli +ST_FLASH ?= st-flash define EXEC_DFU_UTIL until $(DFU_UTIL) -l | grep -q "Found DFU"; do\ @@ -300,6 +359,9 @@ dfu-util-split-right: dfu-util st-link-cli: $(BUILD_DIR)/$(TARGET).hex sizeafter $(ST_LINK_CLI) $(ST_LINK_ARGS) -q -c SWD -p $(BUILD_DIR)/$(TARGET).hex -Rst +st-flash: $(BUILD_DIR)/$(TARGET).hex sizeafter + $(ST_FLASH) $(ST_FLASH_ARGS) --reset --format ihex write $(BUILD_DIR)/$(TARGET).hex + # Autodetect teensy loader ifndef TEENSY_LOADER_CLI @@ -324,7 +386,7 @@ bin: $(BUILD_DIR)/$(TARGET).bin sizeafter flash: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter ifneq ($(strip $(PROGRAM_CMD)),) $(PROGRAM_CMD) -else ifeq ($(strip $(BOOTLOADER)),dfu) +else ifeq ($(strip $(BOOTLOADER)),kiibohd) $(call EXEC_DFU_UTIL) else ifeq ($(strip $(MCU_FAMILY)),KINETIS) $(call EXEC_TEENSY) diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 63de7c7ede..fdf2aa0972 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -99,8 +99,16 @@ ifeq ($(strip $(COMMAND_ENABLE)), yes) endif ifeq ($(strip $(NKRO_ENABLE)), yes) - TMK_COMMON_DEFS += -DNKRO_ENABLE - SHARED_EP_ENABLE = yes + ifeq ($(PROTOCOL), VUSB) + $(info NKRO is not currently supported on V-USB, and has been disabled.) + else ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) + $(info NKRO is not currently supported with Bluetooth, and has been disabled.) + else ifneq ($(BLUETOOTH),) + $(info NKRO is not currently supported with Bluetooth, and has been disabled.) + else + TMK_COMMON_DEFS += -DNKRO_ENABLE + SHARED_EP_ENABLE = yes + endif endif ifeq ($(strip $(USB_6KRO_ENABLE)), yes) @@ -113,10 +121,6 @@ ifeq ($(strip $(SLEEP_LED_ENABLE)), yes) TMK_COMMON_DEFS += -DNO_SUSPEND_POWER_DOWN endif -ifeq ($(strip $(NO_UART)), yes) - TMK_COMMON_DEFS += -DNO_UART -endif - ifeq ($(strip $(NO_SUSPEND_POWER_DOWN)), yes) TMK_COMMON_DEFS += -DNO_SUSPEND_POWER_DOWN endif @@ -132,12 +136,6 @@ ifeq ($(strip $(BLUETOOTH)), AdafruitBLE) TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK endif -ifeq ($(strip $(BLUETOOTH)), AdafruitEZKey) - TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE - TMK_COMMON_DEFS += -DMODULE_ADAFRUIT_EZKEY - TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK -endif - ifeq ($(strip $(BLUETOOTH)), RN42) TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE TMK_COMMON_DEFS += -DMODULE_RN42 @@ -160,16 +158,15 @@ ifeq ($(strip $(SHARED_EP_ENABLE)), yes) endif ifeq ($(strip $(LTO_ENABLE)), yes) - LINK_TIME_OPTIMIZATION_ENABLE = yes -endif - -ifeq ($(strip $(LINK_TIME_OPTIMIZATION_ENABLE)), yes) ifeq ($(PLATFORM),CHIBIOS) $(info Enabling LTO on ChibiOS-targeting boards is known to have a high likelihood of failure.) - $(info If unsure, set LINK_TIME_OPTIMIZATION_ENABLE = no.) + $(info If unsure, set LTO_ENABLE = no.) endif EXTRAFLAGS += -flto - TMK_COMMON_DEFS += -DLINK_TIME_OPTIMIZATION_ENABLE + TMK_COMMON_DEFS += -DLTO_ENABLE + TMK_COMMON_DEFS += -DLINK_TIME_OPTIMIZATON_ENABLE +else ifdef LINK_TIME_OPTIMIZATION_ENABLE + $(error The LINK_TIME_OPTIMIZATION_ENABLE flag has been renamed to LTO_ENABLE.) endif # Search Path diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index c82c9c81be..345c030c94 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h @@ -29,7 +29,7 @@ extern "C" { #endif /* Disable macro and function features when LTO is enabled, since they break */ -#ifdef LINK_TIME_OPTIMIZATION_ENABLE +#ifdef LTO_ENABLE # ifndef NO_ACTION_MACRO # define NO_ACTION_MACRO # endif diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index 16922c1ff9..f9f6861120 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h @@ -82,9 +82,11 @@ void layer_on(uint8_t layer); void layer_off(uint8_t layer); void layer_invert(uint8_t layer); /* bitwise operation */ -void layer_or(layer_state_t state); -void layer_and(layer_state_t state); -void layer_xor(layer_state_t state); +void layer_or(layer_state_t state); +void layer_and(layer_state_t state); +void layer_xor(layer_state_t state); +layer_state_t layer_state_set_user(layer_state_t state); +layer_state_t layer_state_set_kb(layer_state_t state); #else # define layer_state 0 @@ -101,11 +103,10 @@ void layer_xor(layer_state_t state); # define layer_or(state) (void)state # define layer_and(state) (void)state # define layer_xor(state) (void)state +# define layer_state_set_kb(state) (void)state +# define layer_state_set_user(state) (void)state #endif -layer_state_t layer_state_set_user(layer_state_t state); -layer_state_t layer_state_set_kb(layer_state_t state); - /* pressed actions cache */ #if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE) diff --git a/tmk_core/common/bootmagic.c b/tmk_core/common/bootmagic.c index bb2aa0db8c..c1b3adf94d 100644 --- a/tmk_core/common/bootmagic.c +++ b/tmk_core/common/bootmagic.c @@ -122,6 +122,8 @@ void bootmagic(void) { default_layer = eeconfig_read_default_layer(); default_layer_set((layer_state_t)default_layer); } + /* Also initialize layer state to trigger callback functions for layer_state */ + layer_state_set_kb((layer_state_t)layer_state); /* EE_HANDS handedness */ if (bootmagic_scan_keycode(BOOTMAGIC_KEY_EE_HANDS_LEFT)) { diff --git a/tmk_core/common/chibios/bootloader.c b/tmk_core/common/chibios/bootloader.c index 4cf5dae7e6..7b2cf5c435 100644 --- a/tmk_core/common/chibios/bootloader.c +++ b/tmk_core/common/chibios/bootloader.c @@ -2,29 +2,67 @@ #include "ch.h" #include "hal.h" - -#ifdef STM32_BOOTLOADER_ADDRESS -/* STM32 */ +#include "wait.h" /* This code should be checked whether it runs correctly on platforms */ -# define SYMVAL(sym) (uint32_t)(((uint8_t *)&(sym)) - ((uint8_t *)0)) -extern uint32_t __ram0_end__; -# define BOOTLOADER_MAGIC 0xDEADBEEF -# define MAGIC_ADDR (unsigned long *)(SYMVAL(__ram0_end__) - 4) +#define SYMVAL(sym) (uint32_t)(((uint8_t *)&(sym)) - ((uint8_t *)0)) +#define BOOTLOADER_MAGIC 0xDEADBEEF +#define MAGIC_ADDR (unsigned long *)(SYMVAL(__ram0_end__) - 4) + +#ifndef STM32_BOOTLOADER_DUAL_BANK +# define STM32_BOOTLOADER_DUAL_BANK FALSE +#endif + +#if STM32_BOOTLOADER_DUAL_BANK + +// Need pin definitions +# include "config_common.h" + +# ifndef STM32_BOOTLOADER_DUAL_BANK_GPIO +# error "No STM32_BOOTLOADER_DUAL_BANK_GPIO defined, don't know which pin to toggle" +# endif + +# ifndef STM32_BOOTLOADER_DUAL_BANK_POLARITY +# define STM32_BOOTLOADER_DUAL_BANK_POLARITY 0 +# endif + +# ifndef STM32_BOOTLOADER_DUAL_BANK_DELAY +# define STM32_BOOTLOADER_DUAL_BANK_DELAY 100000 +# endif + +extern uint32_t __ram0_end__; + +void bootloader_jump(void) { + // For STM32 MCUs with dual-bank flash, and we're incapable of jumping to the bootloader. The first valid flash + // bank is executed unconditionally after a reset, so it doesn't enter DFU unless BOOT0 is high. Instead, we do + // it with hardware...in this case, we pull a GPIO high/low depending on the configuration, connects 3.3V to + // BOOT0's RC charging circuit, lets it charge the capacitor, and issue a system reset. See the QMK discord + // #hardware channel pins for an example circuit. + palSetPadMode(PAL_PORT(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_PAD(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_MODE_OUTPUT_PUSHPULL); +# if STM32_BOOTLOADER_DUAL_BANK_POLARITY + palSetPad(PAL_PORT(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_PAD(STM32_BOOTLOADER_DUAL_BANK_GPIO)); +# else + palClearPad(PAL_PORT(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_PAD(STM32_BOOTLOADER_DUAL_BANK_GPIO)); +# endif + + // Wait for a while for the capacitor to charge + wait_ms(100); + + // Issue a system reset to get the ROM bootloader to execute, with BOOT0 high + NVIC_SystemReset(); +} + +void enter_bootloader_mode_if_requested(void) {} // not needed at all, but if anybody attempts to invoke it.... + +#elif defined(STM32_BOOTLOADER_ADDRESS) // STM32_BOOTLOADER_DUAL_BANK + +extern uint32_t __ram0_end__; -/** \brief Jump to the bootloader - * - * FIXME: needs doc - */ void bootloader_jump(void) { *MAGIC_ADDR = BOOTLOADER_MAGIC; // set magic flag => reset handler will jump into boot loader NVIC_SystemReset(); } -/** \brief Enter bootloader mode if requested - * - * FIXME: needs doc - */ void enter_bootloader_mode_if_requested(void) { unsigned long *check = MAGIC_ADDR; if (*check == BOOTLOADER_MAGIC) { @@ -41,10 +79,10 @@ void enter_bootloader_mode_if_requested(void) { } } -#elif defined(KL2x) || defined(K20x) /* STM32_BOOTLOADER_ADDRESS */ +#elif defined(KL2x) || defined(K20x) // STM32_BOOTLOADER_DUAL_BANK // STM32_BOOTLOADER_ADDRESS /* Kinetis */ -# if defined(KIIBOHD_BOOTLOADER) +# if defined(BOOTLOADER_KIIBOHD) /* Kiibohd Bootloader (MCHCK and Infinity KB) */ # define SCB_AIRCR_VECTKEY_WRITEMAGIC 0x05FA0000 const uint8_t sys_reset_to_loader_magic[] = "\xff\x00\x7fRESET TO LOADER\x7f\x00\xff"; @@ -54,14 +92,14 @@ void bootloader_jump(void) { SCB->AIRCR = SCB_AIRCR_VECTKEY_WRITEMAGIC | SCB_AIRCR_SYSRESETREQ_Msk; } -# else /* defined(KIIBOHD_BOOTLOADER) */ +# else /* defined(BOOTLOADER_KIIBOHD) */ /* Default for Kinetis - expecting an ARM Teensy */ # include "wait.h" void bootloader_jump(void) { wait_ms(100); __BKPT(0); } -# endif /* defined(KIIBOHD_BOOTLOADER) */ +# endif /* defined(BOOTLOADER_KIIBOHD) */ #else /* neither STM32 nor KINETIS */ __attribute__((weak)) void bootloader_jump(void) {} diff --git a/tmk_core/common/chibios/suspend.c b/tmk_core/common/chibios/suspend.c index 8c071e7a08..64dfc05abc 100644 --- a/tmk_core/common/chibios/suspend.c +++ b/tmk_core/common/chibios/suspend.c @@ -9,6 +9,7 @@ #include "mousekey.h" #include "host.h" #include "suspend.h" +#include "led.h" #include "wait.h" #ifdef BACKLIGHT_ENABLE @@ -47,6 +48,20 @@ __attribute__((weak)) void suspend_power_down_kb(void) { suspend_power_down_user * FIXME: needs doc */ void suspend_power_down(void) { +#ifdef BACKLIGHT_ENABLE + backlight_set(0); +#endif + + // Turn off LED indicators + uint8_t leds_off = 0; +#if defined(BACKLIGHT_CAPS_LOCK) && defined(BACKLIGHT_ENABLE) + if (is_backlight_enabled()) { + // Don't try to turn off Caps Lock indicator as it is backlight and backlight is already off + leds_off |= (1 << USB_LED_CAPS_LOCK); + } +#endif + led_set(leds_off); + // TODO: figure out what to power down and how // shouldn't power down TPM/FTM if we want a breathing LED // also shouldn't power down USB @@ -119,6 +134,7 @@ void suspend_wakeup_init(void) { #ifdef BACKLIGHT_ENABLE backlight_init(); #endif /* BACKLIGHT_ENABLE */ + led_set(host_keyboard_leds()); #if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) is_suspended = false; if (rgblight_enabled) { diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index ef6a39c0fe..feeb2202e2 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c @@ -180,7 +180,7 @@ static void print_version(void) { #ifdef NKRO_ENABLE " NKRO" #endif -#ifdef LINK_TIME_OPTIMIZATION_ENABLE +#ifdef LTO_ENABLE " LTO" #endif diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 714c3d048f..a45af56dfd 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -74,6 +74,9 @@ along with this program. If not, see . #ifdef MIDI_ENABLE # include "process_midi.h" #endif +#ifdef JOYSTICK_ENABLE +# include "process_joystick.h" +#endif #ifdef HD44780_ENABLE # include "hd44780.h" #endif @@ -420,6 +423,10 @@ MATRIX_LOOP_END: } #endif +#ifdef JOYSTICK_ENABLE + joystick_task(); +#endif + // update LED if (led_status != host_keyboard_leds()) { led_status = host_keyboard_leds(); diff --git a/tmk_core/common/magic.c b/tmk_core/common/magic.c index d8ab525735..e14994164e 100644 --- a/tmk_core/common/magic.c +++ b/tmk_core/common/magic.c @@ -33,4 +33,7 @@ void magic(void) { uint8_t default_layer = 0; default_layer = eeconfig_read_default_layer(); default_layer_set((layer_state_t)default_layer); + + /* Also initialize layer state to trigger callback functions for layer_state */ + layer_state_set_kb((layer_state_t)layer_state); } diff --git a/tmk_core/common/mousekey.c b/tmk_core/common/mousekey.c index 42bf231f4c..ef18bcf1a8 100644 --- a/tmk_core/common/mousekey.c +++ b/tmk_core/common/mousekey.c @@ -33,9 +33,9 @@ inline int8_t times_inv_sqrt2(int8_t x) { static report_mouse_t mouse_report = {0}; static void mousekey_debug(void); -static uint8_t mousekey_accel = 0; -static uint8_t mousekey_repeat = 0; -static uint16_t last_timer = 0; +static uint8_t mousekey_accel = 0; +static uint8_t mousekey_repeat = 0; +static uint8_t mousekey_wheel_repeat = 0; #ifndef MK_3_SPEED @@ -94,12 +94,12 @@ static uint8_t wheel_unit(void) { unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed) / 2; } else if (mousekey_accel & (1 << 2)) { unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed); - } else if (mousekey_repeat == 0) { + } else if (mousekey_wheel_repeat == 0) { unit = MOUSEKEY_WHEEL_DELTA; - } else if (mousekey_repeat >= mk_wheel_time_to_max) { + } else if (mousekey_wheel_repeat >= mk_wheel_time_to_max) { unit = MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed; } else { - unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed * mousekey_repeat) / mk_wheel_time_to_max; + unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed * mousekey_wheel_repeat) / mk_wheel_time_to_max; } return (unit > MOUSEKEY_WHEEL_MAX ? MOUSEKEY_WHEEL_MAX : (unit == 0 ? 1 : unit)); } @@ -147,14 +147,17 @@ static uint8_t wheel_unit(void) { void mousekey_task(void) { // report cursor and scroll movement independently report_mouse_t const tmpmr = mouse_report; - if ((mouse_report.x || mouse_report.y) && timer_elapsed(last_timer_c) > (mousekey_repeat ? mk_interval : mk_delay * 10)) { + + mouse_report.x = 0; + mouse_report.y = 0; + mouse_report.v = 0; + mouse_report.h = 0; + + if ((tmpmr.x || tmpmr.y) && timer_elapsed(last_timer_c) > (mousekey_repeat ? mk_interval : mk_delay * 10)) { if (mousekey_repeat != UINT8_MAX) mousekey_repeat++; - mouse_report.v = 0; - mouse_report.h = 0; - if (mouse_report.x > 0) mouse_report.x = move_unit(); - if (mouse_report.x < 0) mouse_report.x = move_unit() * -1; - if (mouse_report.y > 0) mouse_report.y = move_unit(); - if (mouse_report.y < 0) mouse_report.y = move_unit() * -1; + if (tmpmr.x != 0) mouse_report.x = move_unit() * ((tmpmr.x > 0) ? 1 : -1); + if (tmpmr.y != 0) mouse_report.y = move_unit() * ((tmpmr.y > 0) ? 1 : -1); + /* diagonal move [1/sqrt(2)] */ if (mouse_report.x && mouse_report.y) { mouse_report.x = times_inv_sqrt2(mouse_report.x); @@ -166,18 +169,12 @@ void mousekey_task(void) { mouse_report.y = 1; } } - mousekey_send(); - last_timer_c = last_timer; - mouse_report = tmpmr; } - if ((mouse_report.v || mouse_report.h) && timer_elapsed(last_timer_w) > (mousekey_repeat ? mk_wheel_interval : mk_wheel_delay * 10)) { - if (mousekey_repeat != UINT8_MAX) mousekey_repeat++; - mouse_report.x = 0; - mouse_report.y = 0; - if (mouse_report.v > 0) mouse_report.v = wheel_unit(); - if (mouse_report.v < 0) mouse_report.v = wheel_unit() * -1; - if (mouse_report.h > 0) mouse_report.h = wheel_unit(); - if (mouse_report.h < 0) mouse_report.h = wheel_unit() * -1; + if ((tmpmr.v || tmpmr.h) && timer_elapsed(last_timer_w) > (mousekey_wheel_repeat ? mk_wheel_interval : mk_wheel_delay * 10)) { + if (mousekey_wheel_repeat != UINT8_MAX) mousekey_wheel_repeat++; + if (tmpmr.v != 0) mouse_report.v = wheel_unit() * ((tmpmr.v > 0) ? 1 : -1); + if (tmpmr.h != 0) mouse_report.h = wheel_unit() * ((tmpmr.h > 0) ? 1 : -1); + /* diagonal move [1/sqrt(2)] */ if (mouse_report.v && mouse_report.h) { mouse_report.v = times_inv_sqrt2(mouse_report.v); @@ -189,10 +186,10 @@ void mousekey_task(void) { mouse_report.h = 1; } } - mousekey_send(); - last_timer_w = last_timer; - mouse_report = tmpmr; } + + if (mouse_report.x || mouse_report.y || mouse_report.v || mouse_report.h) mousekey_send(); + mouse_report = tmpmr; } void mousekey_on(uint8_t code) { @@ -263,7 +260,8 @@ void mousekey_off(uint8_t code) { mousekey_accel &= ~(1 << 1); else if (code == KC_MS_ACCEL2) mousekey_accel &= ~(1 << 2); - if (mouse_report.x == 0 && mouse_report.y == 0 && mouse_report.v == 0 && mouse_report.h == 0) mousekey_repeat = 0; + if (mouse_report.x == 0 && mouse_report.y == 0) mousekey_repeat = 0; + if (mouse_report.v == 0 && mouse_report.h == 0) mousekey_wheel_repeat = 0; } #else /* #ifndef MK_3_SPEED */ @@ -285,20 +283,22 @@ uint16_t w_intervals[mkspd_COUNT] = {MK_W_INTERVAL_UNMOD, MK_W_INTERVAL_0 void mousekey_task(void) { // report cursor and scroll movement independently report_mouse_t const tmpmr = mouse_report; - if ((mouse_report.x || mouse_report.y) && timer_elapsed(last_timer_c) > c_intervals[mk_speed]) { - mouse_report.h = 0; - mouse_report.v = 0; - mousekey_send(); - last_timer_c = last_timer; - mouse_report = tmpmr; + mouse_report.x = 0; + mouse_report.y = 0; + mouse_report.v = 0; + mouse_report.h = 0; + + if ((tmpmr.x || tmpmr.y) && timer_elapsed(last_timer_c) > c_intervals[mk_speed]) { + mouse_report.x = tmpmr.x; + mouse_report.y = tmpmr.y; } - if ((mouse_report.h || mouse_report.v) && timer_elapsed(last_timer_w) > w_intervals[mk_speed]) { - mouse_report.x = 0; - mouse_report.y = 0; - mousekey_send(); - last_timer_w = last_timer; - mouse_report = tmpmr; + if ((tmpmr.h || tmpmr.v) && timer_elapsed(last_timer_w) > w_intervals[mk_speed]) { + mouse_report.v = tmpmr.v; + mouse_report.h = tmpmr.h; } + + if (mouse_report.x || mouse_report.y || mouse_report.v || mouse_report.h) mousekey_send(); + mouse_report = tmpmr; } void adjust_speed(void) { @@ -413,14 +413,17 @@ void mousekey_off(uint8_t code) { void mousekey_send(void) { mousekey_debug(); + uint16_t time = timer_read(); + if (mouse_report.x || mouse_report.y) last_timer_c = time; + if (mouse_report.v || mouse_report.h) last_timer_w = time; host_mouse_send(&mouse_report); - last_timer = timer_read(); } void mousekey_clear(void) { - mouse_report = (report_mouse_t){}; - mousekey_repeat = 0; - mousekey_accel = 0; + mouse_report = (report_mouse_t){}; + mousekey_repeat = 0; + mousekey_wheel_repeat = 0; + mousekey_accel = 0; } static void mousekey_debug(void) { diff --git a/tmk_core/common/progmem.h b/tmk_core/common/progmem.h index 39a918fe98..c8863d3ad2 100644 --- a/tmk_core/common/progmem.h +++ b/tmk_core/common/progmem.h @@ -4,6 +4,7 @@ # include #else # define PROGMEM +# define PGM_P const char* # define memcpy_P(dest, src, n) memcpy(dest, src, n) # define pgm_read_byte(address_short) *((uint8_t*)(address_short)) # define pgm_read_word(address_short) *((uint16_t*)(address_short)) diff --git a/tmk_core/common/report.h b/tmk_core/common/report.h index c2b1b7c710..1aa33c998d 100644 --- a/tmk_core/common/report.h +++ b/tmk_core/common/report.h @@ -29,7 +29,8 @@ enum hid_report_ids { REPORT_ID_MOUSE, REPORT_ID_SYSTEM, REPORT_ID_CONSUMER, - REPORT_ID_NKRO + REPORT_ID_NKRO, + REPORT_ID_JOYSTICK }; /* Mouse buttons */ @@ -46,8 +47,9 @@ enum mouse_buttons { * See https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf#page=75 */ enum consumer_usages { - // 15.5 Display Controls (https://www.usb.org/sites/default/files/hutrr41_0.pdf) - BRIGHTNESS_UP = 0x06F, + // 15.5 Display Controls + SNAPSHOT = 0x065, + BRIGHTNESS_UP = 0x06F, // https://www.usb.org/sites/default/files/hutrr41_0.pdf BRIGHTNESS_DOWN = 0x070, // 15.7 Transport Controls TRANSPORT_RECORD = 0x0B2, @@ -57,6 +59,7 @@ enum consumer_usages { TRANSPORT_PREV_TRACK = 0x0B6, TRANSPORT_STOP = 0x0B7, TRANSPORT_EJECT = 0x0B8, + TRANSPORT_RANDOM_PLAY = 0x0B9, TRANSPORT_STOP_EJECT = 0x0CC, TRANSPORT_PLAY_PAUSE = 0x0CD, // 15.9.1 Audio Controls - Volume @@ -71,6 +74,7 @@ enum consumer_usages { AL_LOCK = 0x19E, AL_CONTROL_PANEL = 0x19F, AL_ASSISTANT = 0x1CB, + AL_KEYBOARD_LAYOUT = 0x1AE, // 15.16 Generic GUI Application Controls AC_MINIMIZE = 0x206, AC_SEARCH = 0x221, @@ -186,6 +190,16 @@ typedef struct { int8_t h; } __attribute__((packed)) report_mouse_t; +typedef struct { +#if JOYSTICK_AXES_COUNT > 0 + int8_t axes[JOYSTICK_AXES_COUNT]; +#endif + +#if JOYSTICK_BUTTON_COUNT > 0 + uint8_t buttons[(JOYSTICK_BUTTON_COUNT - 1) / 8 + 1]; +#endif +} __attribute__((packed)) joystick_report_t; + /* keycode to system usage */ static inline uint16_t KEYCODE2SYSTEM(uint8_t key) { switch (key) { diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index 7d32c16ed8..a0d28f9afc 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c @@ -35,6 +35,7 @@ #ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP // Change this to be TRUE once we've migrated keyboards to the new init system +// Remember to change docs/platformdev_chibios_earlyinit.md as well. # define EARLY_INIT_PERFORM_BOOTLOADER_JUMP FALSE #endif diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index 65bd291bec..ae33e86a70 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -47,6 +47,10 @@ extern keymap_config_t keymap_config; #endif +#ifdef JOYSTICK_ENABLE +# include "joystick.h" +#endif + /* --------------------------------------------------------- * Global interface variables and declarations * --------------------------------------------------------- @@ -62,7 +66,7 @@ extern keymap_config_t keymap_config; uint8_t keyboard_idle __attribute__((aligned(2))) = 0; uint8_t keyboard_protocol __attribute__((aligned(2))) = 1; -uint8_t keyboard_led_stats = 0; +uint8_t keyboard_led_state = 0; volatile uint16_t keyboard_idle_count = 0; static virtual_timer_t keyboard_idle_timer; static void keyboard_idle_timer_cb(void *arg); @@ -246,6 +250,9 @@ typedef struct { #endif #ifdef VIRTSER_ENABLE usb_driver_config_t serial_driver; +#endif +#ifdef JOYSTICK_ENABLE + usb_driver_config_t joystick_driver; #endif }; usb_driver_config_t array[0]; @@ -283,6 +290,14 @@ static usb_driver_configs_t drivers = { # define CDC_OUT_MODE USB_EP_MODE_TYPE_BULK .serial_driver = QMK_USB_DRIVER_CONFIG(CDC, CDC_NOTIFICATION_EPNUM, false), #endif + +#ifdef JOYSTICK_ENABLE +# define JOYSTICK_IN_CAPACITY 4 +# define JOYSTICK_OUT_CAPACITY 4 +# define JOYSTICK_IN_MODE USB_EP_MODE_TYPE_BULK +# define JOYSTICK_OUT_MODE USB_EP_MODE_TYPE_BULK + .joystick_driver = QMK_USB_DRIVER_CONFIG(JOYSTICK, 0, false), +#endif }; #define NUM_USB_DRIVERS (sizeof(drivers) / sizeof(usb_driver_config_t)) @@ -386,10 +401,10 @@ static void set_led_transfer_cb(USBDriver *usbp) { if (usbp->setup[6] == 2) { /* LSB(wLength) */ uint8_t report_id = set_report_buf[0]; if ((report_id == REPORT_ID_KEYBOARD) || (report_id == REPORT_ID_NKRO)) { - keyboard_led_stats = set_report_buf[1]; + keyboard_led_state = set_report_buf[1]; } } else { - keyboard_led_stats = set_report_buf[0]; + keyboard_led_state = set_report_buf[0]; } } @@ -610,7 +625,7 @@ static void keyboard_idle_timer_cb(void *arg) { } /* LED status */ -uint8_t keyboard_leds(void) { return keyboard_led_stats; } +uint8_t keyboard_leds(void) { return keyboard_led_state; } /* prepare and start sending a report IN * not callable from ISR or locked state */ @@ -796,9 +811,7 @@ int8_t sendchar(uint8_t c) { } #endif /* CONSOLE_ENABLE */ -void _putchar(char character) { - sendchar(character); -} +void _putchar(char character) { sendchar(character); } #ifdef RAW_ENABLE void raw_hid_send(uint8_t *data, uint8_t length) { @@ -869,3 +882,61 @@ void virtser_task(void) { } #endif + +#ifdef JOYSTICK_ENABLE + +void send_joystick_packet(joystick_t *joystick) { + joystick_report_t rep = { +# if JOYSTICK_AXES_COUNT > 0 + .axes = + { + joystick->axes[0], + +# if JOYSTICK_AXES_COUNT >= 2 + joystick->axes[1], +# endif +# if JOYSTICK_AXES_COUNT >= 3 + joystick->axes[2], +# endif +# if JOYSTICK_AXES_COUNT >= 4 + joystick->axes[3], +# endif +# if JOYSTICK_AXES_COUNT >= 5 + joystick->axes[4], +# endif +# if JOYSTICK_AXES_COUNT >= 6 + joystick->axes[5], +# endif + }, +# endif // JOYSTICK_AXES_COUNT>0 + +# if JOYSTICK_BUTTON_COUNT > 0 + .buttons = + { + joystick->buttons[0], + +# if JOYSTICK_BUTTON_COUNT > 8 + joystick->buttons[1], +# endif +# if JOYSTICK_BUTTON_COUNT > 16 + joystick->buttons[2], +# endif +# if JOYSTICK_BUTTON_COUNT > 24 + joystick->buttons[3], +# endif + } +# endif // JOYSTICK_BUTTON_COUNT>0 + }; + + // chnWrite(&drivers.joystick_driver.driver, (uint8_t *)&rep, sizeof(rep)); + osalSysLock(); + if (usbGetDriverStateI(&USB_DRIVER) != USB_ACTIVE) { + osalSysUnlock(); + return; + } + + usbStartTransmitI(&USB_DRIVER, JOYSTICK_IN_EPNUM, (uint8_t *)&rep, sizeof(joystick_report_t)); + osalSysUnlock(); +} + +#endif diff --git a/tmk_core/protocol/iwrap.mk b/tmk_core/protocol/iwrap.mk deleted file mode 100644 index 934235bd81..0000000000 --- a/tmk_core/protocol/iwrap.mk +++ /dev/null @@ -1,32 +0,0 @@ -IWRAP_DIR = protocol/iwrap - -OPT_DEFS += -DPROTOCOL_IWRAP - -SRC += $(IWRAP_DIR)/main.c \ - $(IWRAP_DIR)/iwrap.c \ - $(IWRAP_DIR)/suart.S \ - $(COMMON_DIR)/sendchar_uart.c \ - $(COMMON_DIR)/uart.c - -# Search Path -VPATH += $(TMK_DIR)/protocol/iwrap - - -# TODO: compatible with LUFA and PJRC -# V-USB -# -VUSB_DIR = protocol/vusb - -# Path to the V-USB library -VUSB_PATH = $(LIB_PATH)/vusb - -SRC += $(VUSB_DIR)/vusb.c \ - $(VUSB_PATH)/usbdrv/usbdrv.c \ - $(VUSB_PATH)/usbdrv/usbdrvasm.S \ - $(VUSB_PATH)/usbdrv/oddebug.c - -# Search Path -VPATH += $(TMK_PATH)/$(VUSB_DIR) -VPATH += $(VUSB_PATH) - -OPT_DEFS += -DPROTOCOL_VUSB diff --git a/tmk_core/protocol/iwrap/iWRAP4.txt b/tmk_core/protocol/iwrap/iWRAP4.txt deleted file mode 100644 index 2a062d9d98..0000000000 --- a/tmk_core/protocol/iwrap/iWRAP4.txt +++ /dev/null @@ -1,376 +0,0 @@ -Bulegiga WT12 -============= -WT12 is a bluetooth module from Bluegiga. http://www.bluegiga.com/ - -iWRAP - higher layer interface for bluetooth firmware - communicate with UART - -iWRAP HID -default setting - 115200 8bit/n/1/n - - -TODO ----- -KiCAD circuit/PCB design -power saving - AVR sleep(15ms by watch dog timer) - WT12 sleep - measuring current consumption - measuring battery life of normal usage/idle/intensive usage -software reset/bootloarder -LED indicator(chaging/paring/connecting) -license confirmation of suart.c -consumer page is not working -authenticate method/SSP -SPP keyboard support -SPP debug console support -mouse wheel feature request to Bluegiga - - -Problems --------- -power consumption -no consumer page support(bug?) -no mouse wheel support -no paring management -no interactive auth method - - -UART hardware flow control --------------------------- -(iWRAP4 User Guide 9.5) -Hardware flow control is enabled by default and it should not be disabled unless mandatory, because without the hardware flow control the data transmission may not be reliable. -If the hardware flow control is enabled from PS-keys, but no flow control is used, the following steps should be implemented in the hardware design: -- CTS pin must be grounded -- RTS pin must be left floating - - -Power Saving ------------- -power consume - without opimization: 4hr to shutdown(310mAh) - 2011/08/25: 9hr(310mAh) SNIFF MASTER sleep/WDTO_120MS - -measure current consumption - HHKB keyswitch matrix board - idle - scanning - Bluegiga WT12 module - SLEEP command - deep sleep on/off in config bits - -HHKB keyswich - how to power off - I/O pin configuration when sleeping - FET switch for 5V regulator - -Bluetooth module - power off when in USB mode - power off by FET switch - -AVR configuration - unused pins - ADC - - - -SET CONTROL CONFIG ------------------- - SET CONTROL CONFIG 4810 - SET CONTROL CONFIG LIST - SET CONTROL CONFIG 0000 0000 4910 DEEP_SLEEP KLUDGE INTERACTIVE_PIN UART_LATENCY - - Bit14 UART low latency - Bit11 Interactive pairing mode - Bit04 Deep sleep - - -Reconnection ------------- -SET CONTROL AUTOCALL 1124 5000 HID - 1124 HID service class - 5000 interval ms - -HID profile ------------ -This is needed to configure only once. - SET PROFILE HID ON - RESET - -HID class ---------- - SET BT CLASS 005C0 // keyboard/mouse combined devie - -Pairing Security ----------------- -Secure Simple Pairing(SSP) - SET BT SSP 2 0 // Enables SSP for keyboard and Man-in-the-middle protection - SET BT SSP 3 0 // Enables SSP just works mode - -for keyboard with SSP - SET BT AUTH * 0000 - SET BT SSP 2 0 - SET CONTROL CONFIG 800 - RESET - -for keyboard without SSP - SET BT AUTH * 0000 - SET CONTROL CONFIG 800 - RESET - -AUTH - AUTH xx:xx:xx:xx:xx:xx? // Pairing request event - AUTH xx:xx:xx:xx:xx:xx 0000 - - SSP PASSKEY 78:dd:08:b7:e4:a2 ? - SSP PASSKEY 78:dd:08:b7:e4:a2 xxxxx - (SSP COMPLETE 78:dd:08:b7:e4:a2 HCI_ERROR_AUTH_FAIL // failed) - RING 0 78:dd:08:b7:e4:a2 11 HID - -Connecton - RING xx:xx:xx:xx:xx:xx xx HID // connection event - - KILL xx:xx:xx:xx:xx:xx - -Mode ----- -Command mode -Data mode - Raw mode - (Simple mode not for a real keyboard) - -Raw mode - Keyboard: - 0x9f, length(10), 0xa1, 0x01, mods, 0x00, key1, key2, key3, key4, key5, key6 - - Mouse: - 0x9f, length(5), 0xa1, 0x02, buttons, X, Y - - Consumer page: - 0x9f, length(5), 0xa1, 0x03, bitfield1, bitfield2, bitfield3 - - consumer page suage - Bitfield 1: - 0x01 Volume Increment - 0x02 Volume Decrement - 0x04 Mute - 0x08 Play/Pause - 0x10 Scan Next Track - 0x20 Scan Previous Track - 0x40 Stop - 0x80 Eject - Bitfield 2: - 0x01 Email Reader - 0x02 Application Control Search - 0x04 AC Bookmarks - 0x08 AC Home - 0x10 AC Back - 0x20 AC Forward - 0x40 AC Stop - 0x80 AC Refresh - Bitfield 3: - 0x01 Application Launch Generic Consumer Control - 0x02 AL Internet Browser - 0x04 AL Calculator - 0x08 AL Terminal Lock / Screensaver - 0x10 AL Local Machine Browser - 0x20 AC Minimize - 0x40 Record - 0x80 Rewind - - - - - -2011/07/13 -set -SET BT BDADDR 00:07:80:47:22:14 -SET BT NAME HHKB pro BT -SET BT CLASS 0005c0 -SET BT AUTH * 0000 -SET BT IDENT BT:47 f000 4.1.0 Bluegiga iWRAP -SET BT LAP 9e8b33 -SET BT PAGEMODE 4 2000 1 -SET BT PAIR 78:dd:08:b7:e4:a2 a191189cd7e51030ad6a07848ce879bb -SET BT POWER 3 3 3 -SET BT ROLE 0 f 7d00 -SET BT SNIFF 0 20 1 8 -SET BT SSP 2 1 -SET BT MTU 667 -SET CONTROL AUTOCALL 1124 3000 HID -SET CONTROL BAUD 38400,8n1 -SET CONTROL CD 00 0 -SET CONTROL ECHO 7 -SET CONTROL ESCAPE 43 00 1 -SET CONTROL GAIN 0 5 -SET CONTROL INIT SET CONTROL MUX 0 -SET CONTROL MSC DTE 00 00 00 00 00 00 -SET CONTROL MUX 1 -SET CONTROL PIO 00 00 -SET CONTROL READY 00 -SET PROFILE HID f HID -SET - -info config - -!!! THIS IS BETA RELEASE AND MAY BE USED FOR EVALUATION PURPOSES ONLY !!! - -WRAP THOR AI (4.1.0 build 435) -Copyright (c) 2003-2011 Bluegiga Technologies Inc. -Compiled on Jun 28 2011 17:19:51, running on WT12-A module, psr v31 - AVRCP BGIO FTP HFP HFP_AG HID HID_CONSUMER_PAGE HSP LEDS MAP OTA PBAP PIO=0x00fc SSP SUBRATE TEST VOLUME - - BOCK3 version 435 (Jun 28 2011 17:19:37) (max acl/sco 7/1) - - Bluetooth version 2.1, Power class 2 - - Loader 4279, firmware 6297 (56-bit encryption), native execution mode - - up 0 days, 06:23, 2 connections (pool 2) - - User configuration: -&028a = 0001 0000 0000 0011 0024 0000 0000 0010 0000 0080 0000 0000 0080 005f 009b 0034 00fb 0006 -&028b = 0000 0bb8 -&028d = 0001 -&0295 = 0000 0005 000b 0000 0003 0000 0000 0000 0000 0000 0000 -&0298 = a006 -&0299 = 0000 0000 -&02a3 = 0030 0030 0030 0030 -&02a4 = 009d 0000 -&02a5 = 0053 0045 0054 0020 0043 004f 004e 0054 0052 004f 004c 0020 004d 0055 0058 0020 0030 -&02a7 = 0000 05c0 -&02a8 = 4910 0000 0000 -&02aa = 0004 2000 0001 0033 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 -&02ac = 0000 0000 002b 0000 0000 0000 0000 0000 0000 0000 0002 0000 0000 0000 0010 0000 0000 0000 0000 029b 0000 0000 0000 0000 -&02ad = 4848 424b 7020 6f72 4220 0054 -&02b3 = 0005 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 -&02b7 = 000f 4948 0044 -&02bb = 8000 -READY. - - - - -2011/07/07 settings: -set -SET BT BDADDR 00:07:80:47:22:14 -SET BT NAME HHKB Pro BT -SET BT CLASS 0005c0 -SET BT AUTH * 000 -SET BT IDENT BT:47 f000 4.0.0 Bluegiga iWRAP -SET BT LAP 9e8b33 -SET BT PAGEMODE 4 2000 1 -SET BT PAIR 78:dd:08:b7:e4:a2 9e54d0aabb1b4d73cfccddb1ea4ef2d6 -SET BT POWER 3 3 3 -SET BT ROLE 0 f 7d00 -SET BT SNIFF 0 20 1 8 -SET BT SSP 3 0 -SET BT MTU 667 -SET CONTROL BAUD 38400,8n1 -SET CONTROL CD 00 0 -SET CONTROL ECHO 7 -SET CONTROL ESCAPE 255 00 1 -SET CONTROL GAIN 0 5 -SET CONTROL INIT set control mux 0 -SET CONTROL MSC DTE 00 00 00 00 00 00 -SET CONTROL PREAMP 1 1 -SET CONTROL READY 00 -SET PROFILE HID HID -SET PROFILE SPP Bluetooth Serial Port -SET - -info config -WRAP THOR AI (4.0.0 build 317) -Copyright (c) 2003-2010 Bluegiga Technologies Inc. -Compiled on Apr 20 2010 16:44:28, running on WT12-A module, psr v31 - AVRCP FTP PBAP PIO=0x00fc SSP SUBRATE VOLUME - - BOCK3 version 317 (Apr 20 2010 16:44:21) (max acl/sco 7/1) - - Bluetooth version 2.1, Power class 2 - - Loader 4279, firmware 6297 (56-bit encryption), native execution mode - - up 0 days, 00:00, 0 connections (pool 1) - - User configuration: -&028c = 0001 0020 0000 0001 0008 0000 -&028d = 0000 -&0296 = 0047 0001 f000 0400 6c42 6575 6967 6167 6920 5257 5041 -&0298 = c006 -&02a3 = 0030 0030 0030 -&02a4 = 009d 0000 -&02a5 = 0073 0065 0074 0020 0063 006f 006e 0074 0072 006f 006c 0020 006d 0075 0078 0020 0030 -&02a7 = 0000 05c0 -&02a8 = 0800 0000 0000 -&02ac = 0000 0000 00ff 0000 0000 0000 0000 0000 0000 0000 0002 0000 0000 0000 0010 0000 0000 0000 0000 029b 0000 0000 0000 0000 -&02ad = 4848 424b 5020 6f72 4220 0054 -&02b3 = 0004 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 -&02b7 = 0000 -&02bb = 6c42 6575 6f74 746f 2068 6553 6972 6c61 5020 726f 0074 -READY. - - - -2011/08/23: -SET BT BDADDR 00:07:80:47:22:14 -SET BT NAME HHKB pro BT -SET BT CLASS 0005c0 -SET BT AUTH * 0000 -SET BT IDENT BT:47 f000 4.1.0 Bluegiga iWRAP -SET BT LAP 9e8b33 -SET BT PAGEMODE 4 2000 1 -SET BT PAIRCOUNT 4 -SET BT POWER 3 3 3 -SET BT ROLE 1 f 12c0 -SET BT SNIFF 10 2 1 8 -SET BT SSP 3 0 -SET BT MTU 667 -SET CONTROL BAUD 38400,8n1 -SET CONTROL CD 00 0 -SET CONTROL ECHO 7 -SET CONTROL ESCAPE 43 00 1 -SET CONTROL GAIN 0 5 -SET CONTROL INIT SET CONTROL MUX 0 -SET CONTROL MSC DTE 00 00 00 00 00 00 -SET CONTROL MUX 1 -SET CONTROL PIO 00 00 -SET CONTROL READY 00 -SET PROFILE HID 7 HIDKeyboardMouse -SET - -SET CONTROL CONFIG 0000 0004 481e CLOCK_CACHE INTERLACED_INQ INTERLACED_PAGE DEEP_SLEEP INTERACTIVE_PIN UART_LATENCY 23D_NOKLUDGE - - - -2011/08/25: -SET BT BDADDR 00:07:80:47:22:14 -SET BT NAME HHKB pro BT -SET BT CLASS 0005c0 - -SET BT IDENT BT:47 f000 4.1.0 Bluegiga iWRAP -SET BT LAP 9e8b33 -SET BT PAGEMODE 4 2000 1 -SET BT PAIRCOUNT 4 -SET BT PAIR 78:dd:08:b7:e4:a2 0be83335a03fed8ededae42e99554e28 -SET BT POWER 3 3 3 -SET BT ROLE 1 f 12c0 -SET BT SNIFF 100 20 1 8 -SET BT SSP 3 0 -SET BT MTU 667 -SET CONTROL BAUD 38400,8n1 -SET CONTROL CD 00 0 -SET CONTROL ECHO 7 -SET CONTROL ESCAPE - 20 1 -SET CONTROL GAIN 0 5 -SET CONTROL INIT SET CONTROL MUX 0 -SET CONTROL MSC DTE 00 00 00 00 00 00 -SET CONTROL MUX 1 -SET CONTROL PIO 00 00 -SET CONTROL READY 00 -SET PROFILE HID f HIDKeyboardMouse -SET - - -SET CONTROL CONFIG 0000 0000 490e CLOCK_CACHE INTERLACED_INQ INTERLACED_PAGE KLUDGE INTERACTIVE_PIN UART_LATENCY - - -2011/09/08: -SET CONTROL CONFIG 0000 0000 410e CLOCK_CACHE INTERLACED_INQ INTERLACED_PAGE KLUDGE UART_LATENCY - - Removed INTERACTIVE_PIN to avoid interactive auth and use SET BT AUTH pin(0000). - - -EOF diff --git a/tmk_core/protocol/iwrap/iWRAP5.txt b/tmk_core/protocol/iwrap/iWRAP5.txt deleted file mode 100644 index ce3310f1bf..0000000000 --- a/tmk_core/protocol/iwrap/iWRAP5.txt +++ /dev/null @@ -1,356 +0,0 @@ -Terminology -=========== -PSM -HIDP HID Protocol -L2CAP Logical Link Control Adaptation Protocol -MTU Maximum Transmission Unit - - - -HID Protocol -============ -3 of HID_SPEC_V11.pdf - -Channel -------- -Control channel PSM=0x0011 -Interrupt channel PSM=0x0013 - -Message -------- -HANDSHAKE(0) -HID_CONTROL(1) - -GET_REPORT(4) - Host requests report(DATA payload on Control channel) from Device - Size Desc - ------------------------------------------------------------------------------ - HIDP-Hdr 1 7..4: HIDP Message TYpe(4: GET_REPORT) - 3: Size(1:2-octed buffer size, 0:size of the report) - 2: 0 - 1..0: Report Type(1:input, 2:output, 3: feature) - ReportID 1 Optional - BufferSize 2 Optional(specified when Size=1) - -SET_REPORT(5) -GET_PROTOCOL(6) -SET_PROTOCOL(7) - -DATA(A) - Input/Output Report: All DATA payloads flow on Interrupt channel. - Other: flows on Control channel. - Size Desc - ------------------------------------------------------------------------------ - HIDP-Hdr 1 7..4 0xA - 3..2 Reserved(0) - 1..0 Report Type(0:Other, 1:Input, 2:Output, 3:Feature) - Payload N Data - - - - -Boot Protocol -============= -3.3.2 -No report descriptor, fixed report descriptors defined. - -Device ReportID Size ---------------------------------- -Reserved 0 -Keyboard 1 9octets -Mouse 2 4octets -Reserved 3-255 - -Report descriptor ------------------ -Report ID is added to USB HID boot protocol descriptor. -Boot Protocol device doesn't need to supply descriptors. and can send extra data on end of boot report this data will be ignored unless host supports report descriptor. - -Report Protocol devices can have specific descriptors. Using Boot protocol descriptor followed by extra data may be useful for compatibility to Boot protocol only supported host. - -NOTE: -Bluegiga HID sample say report ID of mouse is 1 but 2? -Bluegiga HID sample say report ID of consumer page is 2 but 3? -** mouse.desc and consumer.desc were fixed. - size -keyboard.desc 67 0x43 -mouse.desc 60 0x3c -consumer.desc 82 0x52 -combo.desc 209 0xd1 - - - -SDP -=== -attributes(3.3.2) ----------- -HIDDeviceSubclass - which type is supported in Boot Protocol Mode - 7 6 - --- - 0 1 Keyboard - 1 0 Pointing device - 1 1 Combo keyboard/pointing device - -HIDBootDevice - TRUE -HIDReconnectInitiate - TRUE - - -Class of Device/Service -======================= -http://phys.sci.hokudai.ac.jp/LABS/yts/pic/GB002/Bluetooth_assigned_numbers_baseband.pdf - -0x0005C0 Keyboard and Pointing deivce(combo) - - - 23 16 15 8 7 0 - --------------------------------- - Service |Major |Minor |Format - - Format type - 1 0 - --- - 0 0 - - Minor Device Class of Peripheral Major - 7 6 - --- - 0 1 Keyboard - 1 0 Pointing device - 1 1 Combo keyboard/pointing device - - - Major device classes - 12 11 10 9 8 - -------------- - 0 0 0 0 0 Miscellaneous - 0 0 0 0 1 Computer - 0 0 0 1 0 Phone - 0 0 0 1 1 LAN /Network Access point - 0 0 1 0 0 Audio/Video (headset,speaker,stereo, video display, vcr..... - 0 0 1 0 1 *Peripheral (mouse, joystick, keyboards, ..... ) - 0 0 1 1 0 Imaging (printing, scanner, camera, display, ...) - 1 1 1 1 1 Uncategorized, specific device code not specified - X X X X X All other values reserved - - - Major service classes - bit - -------------------------------------- - 13 Limited Discoverable Mode [Ref #1] - 14 (reserved) - 15 (reserved) - 16 Positioning (Location identification) - 17 Networking (LAN, Ad hoc, ...) - 18 Rendering (Printing, Speaker, ...) - 19 Capturing (Scanner, Microphone, ...) - 20 Object Transfer (v-Inbox, v-Folder, ...) - 21 Audio (Speaker, Microphone, Headset service, ...) - 22 Telephony (Cordless telephony, Modem, Headset service, ...) - 23 Information (WEB-server, WAP-server, ...) - - - - -Authentication SSP -------------------- -SET BT SSP 2 0 PASS KEY entering -SET BT SSP 3 0 NO PASS KEY entering -SET BT SSP - : 0:display only 1:display+yes/no button 2:keyboard only 3:none -SET BT SSP 2 1 # 2:keyboard only 1:Man-in-the-middle protection is needed -SET BT SSP 2 0 # 2:keyboard only 0:Man-in-the-middle protection is not needed - - -SET BT SSP 2 1 - bond only if MITM protection is supported by host -SET BT SSP 2 0 - bond even if MITM protection is not supported by host - -On Windows 'Add device' causes SSP PASSKEY event on iWRAP - SSP PASSKEY 78:dd:08:b7:e4:a2 ? - -If device has display(0 or 1) this event occurs. User should be shown this code on the device. - SSP CONFIRM 78:dd:08:b7:e4:a2 517572 - - -SET BT SSP 3 0 - No input/output, No MITM protection. - Without procedure of authentication the divice is bond to host. - - -Connect -======= -CALL 78:dd:08:b7:e4:a2 11 HID - - -Setting -======== -Following settings need to be done before wiring into keyboard. -- UART speed: 38400bps(115200bps didn't work with software serial) -- No SSP procedure(without MITM protection) -- No Power Saving - -# clear pairing record and set default -SET BT PAIR * -SET RESET - -SET CONTROL INIT SET CONTROL MUX 0 -SET CONTROL BAUD 38400,8n1 -SET BT NAME TMK Blootooth WT12 -SET BT CLASS 0005c0 -SET BT AUTH * 0000 -SET BT SSP 3 0 -SET CONTROL CONFIG 4800 -SET PROFILE HID 0f c0 0100 00 en 0409 TMK Bluetooth keyboard(WT12) -SET PROFILE SPP - -# power saving? -SET BT SNIFF 100 20 1 8 - - -# Report Descriptor -# combo keyboard + mouse + consumer -HID SET d2 05010906a1010507850119e029e715002501750195088102950175088101950575010508850119012905910295017503910395067508150025650507190029658100c005010902a1010901a1008502050919012908150025017501950881020501093009311581257f750895028106093895018106050c0a380295018106c0c0050c0901a1018503050c1500250109e909ea09e209cd19b529b87501950881020a8a010a21020a2a021a23022a27027501950881020a83010a96010a92010a9e010a94010a060209b209b4750195088102c0 - - - -SET PROFILE HID ---------------- - SET PROFILE HID 0d c0 100 0 en 0409 HHKB pro Bluetooth keyboard - {function bit} uint8 - {subclass} uint8 - {version} uint16 - {country} uint8 - {BTlang} char[2] - {USBlang} uint16 - {name} string - - -SET BT CLASS ------------- - See Class of Device - composite device: keyboard and mouse - SET BT CLASS 005c0 - - - - - - ----------- -after setting ----------- -set -SET BT BDADDR 00:07:80:47:22:14 -SET BT NAME TMK Blootooth WT12 -SET BT CLASS 0005c0 -SET BT AUTH * 0000 -SET BT IDENT BT:47 f000 5.0.1 Bluegiga iWRAP -SET BT LAP 9e8b33 -SET BT PAGEMODE 4 2000 1 -SET BT PAIR 78:dd:08:b7:e4:a2 9e3d85c91bcae73fef8cc10bec18b42f -SET BT POWER 3 3 3 -SET BT ROLE 0 f 7d00 -SET BT SNIFF 0 20 1 8 -SET BT SSP 3 0 -SET BT MTU 667 -SET CONTROL BAUD 38400,8n1 -SET CONTROL CD 00 0 -SET CONTROL ECHO 7 -SET CONTROL ESCAPE 43 00 1 -SET CONTROL GAIN 0 5 -SET CONTROL INIT SET CONTROL MUX 0 -SET CONTROL MSC DTE 00 00 00 00 00 00 -SET CONTROL MUX 1 -SET CONTROL PIO 00 00 -SET CONTROL READY 00 -SET PROFILE HID 0f c0 0100 00 en 0409 TMK Bluetooth keyboard(WT12) -SET - -set control config list -SET CONTROL CONFIG 0000 0000 0000 4900 KLUDGE INTERACTIVE_PIN UART_LATENCY - - -info config -WRAP THOR AI (5.0.1 build 620) -Copyright (c) 2003-2012 Bluegiga Technologies Inc. -Compiled on Oct 1 2012 10:56:21, running on WT12-A module, psr v31 - BGIO FTP HFP HFP_AG HID HID_CONSUMER_PAGE HSP MAP MDP OTA PBAP PIO=0x00fc SSP SUBRATE TEST VOLUME - - BOCK4 version 620 (Oct 1 2012 10:56:03) (max acl/sco 7/1) - - Bluetooth version 3.0, Power class 2 - - Loader 8615, firmware 8825 (56-bit encryption), native execution mode - - up 0 days, 01:50, 2 connections (pool 2) - - User configuration: -&028d = 0001 -&0295 = 0000 0005 000b 0000 0003 0000 0000 0000 0000 0000 0000 -&0298 = c053 -&0299 = 0000 0000 -&02a3 = 0030 0030 0030 0030 -&02a4 = 009d 0000 -&02a5 = 0053 0045 0054 0020 0043 004f 004e 0054 0052 004f 004c 0020 004d 0055 0058 0020 0030 -&02a7 = 0000 05c0 -&02a8 = 0800 0000 0000 0000 -&02aa = 0004 2000 0001 0033 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 -&02ac = 0000 0000 002b 0000 0000 0000 0000 0000 0000 0000 0002 0000 0000 0000 0010 0000 0000 0000 0000 029b 0000 0000 0000 0000 -&02ad = 4d54 204b 6c42 6f6f 6f74 746f 2068 5457 3231 -&02b0 = fa65 b0aa 934a 077b a600 d1cc fe58 8dd5 -&02b3 = 0004 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0003 0005 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0005 -&02b7 = 000f 00c0 0100 0000 0065 006e 0409 4d54 204b 6c42 6575 6f74 746f &02bb = 8000 -READY. ----------- - - - ------ -After 5.0.1 Firmware update -Firmware: ai-5.0.1-620-25b.bc4.dfu -PSR: wt12-a.ai-5.0.1-620-25b.psrf ------ -info config -WRAP THOR AI (5.0.1 build 620) -Copyright (c) 2003-2012 Bluegiga Technologies Inc. -Compiled on Oct 1 2012 10:56:21, running on WT12-A module, psr v31 - BGIO FTP HFP HFP_AG HID HID_CONSUMER_PAGE HSP MAP MDP OTA PBAP PIO=0x00fc SSP SUBRATE TEST VOLUME - - BOCK4 version 620 (Oct 1 2012 10:56:03) (max acl/sco 7/1) - - Bluetooth version 3.0, Power class 2 - - Loader 8615, firmware 8825 (56-bit encryption), native execution mode - - up 0 days, 00:03, 0 connections (pool 1) - - User configuration: -&0295 = 0000 0005 000b 0000 0003 0000 0000 0000 0000 0000 0000 -&0299 = 0000 0000 -&02aa = 0004 2000 0001 0033 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 -&02ac = 0000 0000 002b 0000 0000 0000 0000 0000 0000 0000 0002 0000 0000 0000 0010 0000 0000 0000 0000 029b 0000 0000 0000 0000 -&02ad = 5457 3231 412d -&02b0 = fa65 b0aa 934a 077b a600 d1cc fe58 8dd5 -READY. - -set -SET BT BDADDR 00:07:80:47:22:14 -SET BT NAME WT12-A -SET BT CLASS 001f00 -SET BT IDENT BT:47 f000 5.0.1 Bluegiga iWRAP -SET BT LAP 9e8b33 -SET BT PAGEMODE 4 2000 1 -SET BT PAIR 78:dd:08:b7:e4:a2 af18f81faa107e6dd068762ef921f48b -SET BT POWER 3 3 3 -SET BT ROLE 0 f 7d00 -SET BT SNIFF 0 20 1 8 -SET BT SSP 3 0 -SET BT MTU 667 -SET CONTROL BAUD 115200,8n1 -SET CONTROL CD 00 0 -SET CONTROL ECHO 7 -SET CONTROL ESCAPE 43 00 1 -SET CONTROL GAIN 0 5 -SET CONTROL MSC DTE 00 00 00 00 00 00 -SET CONTROL PIO 00 00 -SET CONTROL READY 00 -SET PROFILE SPP Bluetooth Serial Port -SET - -set control config list -SET CONTROL CONFIG 0000 0000 0000 0100 KLUDGE ---------- diff --git a/tmk_core/protocol/iwrap/iwrap.c b/tmk_core/protocol/iwrap/iwrap.c deleted file mode 100644 index 4d0ca5756b..0000000000 --- a/tmk_core/protocol/iwrap/iwrap.c +++ /dev/null @@ -1,420 +0,0 @@ -/* -Copyright 2011 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 . -*/ - -/* host driver for Bulegiga iWRAP */ -/* Bluegiga BT12 - * Connections - * Hardware UART Software UART BlueTooth - * PC=====UART=======AVR=====SUART====iWRAP(BT12)-----------PC - * - * - Hardware UART for Debug Console to communicate iWRAP - * - Software UART for iWRAP control to send keyboard/mouse data - */ - -#include -#include -#include -#include -#include "keycode.h" -#include "suart.h" -#include "uart.h" -#include "report.h" -#include "host_driver.h" -#include "iwrap.h" -#include "print.h" - -/* iWRAP MUX mode utils. 3.10 HID raw mode(iWRAP_HID_Application_Note.pdf) */ -#define MUX_HEADER(LINK, LENGTH) \ - do { \ - xmit(0xbf); /* SOF */ \ - xmit(LINK); /* Link */ \ - xmit(0x00); /* Flags */ \ - xmit(LENGTH); /* Length */ \ - } while (0) -#define MUX_FOOTER(LINK) xmit(LINK ^ 0xff) - -static uint8_t connected = 0; -// static uint8_t channel = 1; - -/* iWRAP buffer */ -#define MUX_BUF_SIZE 64 -static char buf[MUX_BUF_SIZE]; -static uint8_t snd_pos = 0; - -#define MUX_RCV_BUF_SIZE 256 -static char rcv_buf[MUX_RCV_BUF_SIZE]; -static uint8_t rcv_head = 0; -static uint8_t rcv_tail = 0; - -/* receive buffer */ -static void rcv_enq(char c) { - uint8_t next = (rcv_head + 1) % MUX_RCV_BUF_SIZE; - if (next != rcv_tail) { - rcv_buf[rcv_head] = c; - rcv_head = next; - } -} - -static char rcv_deq(void) { - char c = 0; - if (rcv_head != rcv_tail) { - c = rcv_buf[rcv_tail++]; - rcv_tail %= MUX_RCV_BUF_SIZE; - } - return c; -} - -/* -static char rcv_peek(void) -{ - if (rcv_head == rcv_tail) - return 0; - return rcv_buf[rcv_tail]; -} -*/ - -static void rcv_clear(void) { rcv_tail = rcv_head = 0; } - -/* iWRAP response */ -ISR(PCINT1_vect, ISR_BLOCK) // recv() runs away in case of ISR_NOBLOCK -{ - if ((SUART_IN_PIN & (1 << SUART_IN_BIT))) return; - - static volatile uint8_t mux_state = 0xff; - static volatile uint8_t mux_link = 0xff; - uint8_t c = recv(); - switch (mux_state) { - case 0xff: // SOF - if (c == 0xbf) mux_state--; - break; - case 0xfe: // Link - mux_state--; - mux_link = c; - break; - case 0xfd: // Flags - mux_state--; - break; - case 0xfc: // Length - mux_state = c; - break; - case 0x00: - mux_state = 0xff; - mux_link = 0xff; - break; - default: - if (mux_state--) { - uart_putchar(c); - rcv_enq(c); - } - } -} - -/*------------------------------------------------------------------* - * iWRAP communication - *------------------------------------------------------------------*/ -void iwrap_init(void) { - // reset iWRAP if in already MUX mode after AVR software-reset - iwrap_send("RESET"); - iwrap_mux_send("RESET"); - _delay_ms(3000); - iwrap_send("\r\nSET CONTROL MUX 1\r\n"); - _delay_ms(500); - iwrap_check_connection(); -} - -void iwrap_mux_send(const char *s) { - rcv_clear(); - MUX_HEADER(0xff, strlen((char *)s)); - iwrap_send(s); - MUX_FOOTER(0xff); -} - -void iwrap_send(const char *s) { - while (*s) xmit(*s++); -} - -/* send buffer */ -void iwrap_buf_add(uint8_t c) { - // need space for '\0' - if (snd_pos < MUX_BUF_SIZE - 1) buf[snd_pos++] = c; -} - -void iwrap_buf_del(void) { - if (snd_pos) snd_pos--; -} - -void iwrap_buf_send(void) { - buf[snd_pos] = '\0'; - snd_pos = 0; - iwrap_mux_send(buf); -} - -void iwrap_call(void) { - char *p; - - iwrap_mux_send("SET BT PAIR"); - _delay_ms(500); - - p = rcv_buf + rcv_tail; - while (!strncmp(p, "SET BT PAIR", 11)) { - p += 7; - strncpy(p, "CALL", 4); - strncpy(p + 22, " 11 HID\n\0", 9); - print_S(p); - iwrap_mux_send(p); - // TODO: skip to next line - p += 57; - - DEBUG_LED_CONFIG; - DEBUG_LED_ON; - _delay_ms(500); - DEBUG_LED_OFF; - _delay_ms(500); - DEBUG_LED_ON; - _delay_ms(500); - DEBUG_LED_OFF; - _delay_ms(500); - DEBUG_LED_ON; - _delay_ms(500); - DEBUG_LED_OFF; - _delay_ms(500); - DEBUG_LED_ON; - _delay_ms(500); - DEBUG_LED_OFF; - _delay_ms(500); - DEBUG_LED_ON; - _delay_ms(500); - DEBUG_LED_OFF; - _delay_ms(500); - } - iwrap_check_connection(); -} - -void iwrap_kill(void) { - char c; - iwrap_mux_send("LIST"); - _delay_ms(500); - - while ((c = rcv_deq()) && c != '\n') - ; - if (strncmp(rcv_buf + rcv_tail, "LIST ", 5)) { - print("no connection to kill.\n"); - return; - } - // skip 10 'space' chars - for (uint8_t i = 10; i; i--) - while ((c = rcv_deq()) && c != ' ') - ; - - char *p = rcv_buf + rcv_tail - 5; - strncpy(p, "KILL ", 5); - strncpy(p + 22, "\n\0", 2); - print_S(p); - iwrap_mux_send(p); - _delay_ms(500); - - iwrap_check_connection(); -} - -void iwrap_unpair(void) { - iwrap_mux_send("SET BT PAIR"); - _delay_ms(500); - - char *p = rcv_buf + rcv_tail; - if (!strncmp(p, "SET BT PAIR", 11)) { - strncpy(p + 29, "\n\0", 2); - print_S(p); - iwrap_mux_send(p); - } -} - -void iwrap_sleep(void) { iwrap_mux_send("SLEEP"); } - -void iwrap_sniff(void) {} - -void iwrap_subrate(void) {} - -bool iwrap_failed(void) { - if (strncmp(rcv_buf, "SYNTAX ERROR", 12)) - return true; - else - return false; -} - -uint8_t iwrap_connected(void) { return connected; } - -uint8_t iwrap_check_connection(void) { - iwrap_mux_send("LIST"); - _delay_ms(100); - - if (strncmp(rcv_buf, "LIST ", 5) || !strncmp(rcv_buf, "LIST 0", 6)) - connected = 0; - else - connected = 1; - return connected; -} - -/*------------------------------------------------------------------* - * Host driver - *------------------------------------------------------------------*/ -static uint8_t keyboard_leds(void); -static void send_keyboard(report_keyboard_t *report); -static void send_mouse(report_mouse_t *report); -static void send_system(uint16_t data); -static void send_consumer(uint16_t data); - -static host_driver_t driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer}; - -host_driver_t *iwrap_driver(void) { return &driver; } - -static uint8_t keyboard_leds(void) { return 0; } - -static void send_keyboard(report_keyboard_t *report) { - if (!iwrap_connected() && !iwrap_check_connection()) return; - MUX_HEADER(0x01, 0x0c); - // HID raw mode header - xmit(0x9f); - xmit(0x0a); // Length - xmit(0xa1); // DATA(Input) - xmit(0x01); // Report ID - xmit(report->mods); - xmit(0x00); // reserved byte(always 0) - xmit(report->keys[0]); - xmit(report->keys[1]); - xmit(report->keys[2]); - xmit(report->keys[3]); - xmit(report->keys[4]); - xmit(report->keys[5]); - MUX_FOOTER(0x01); -} - -static void send_mouse(report_mouse_t *report) { -#if defined(MOUSEKEY_ENABLE) || defined(PS2_MOUSE_ENABLE) || defined(POINTING_DEVICE_ENABLE) - if (!iwrap_connected() && !iwrap_check_connection()) return; - MUX_HEADER(0x01, 0x09); - // HID raw mode header - xmit(0x9f); - xmit(0x07); // Length - xmit(0xa1); // DATA(Input) - xmit(0x02); // Report ID - xmit(report->buttons); - xmit(report->x); - xmit(report->y); - xmit(report->v); - xmit(report->h); - MUX_FOOTER(0x01); -#endif -} - -static void send_system(uint16_t data) { /* not supported */ -} - -static void send_consumer(uint16_t data) { -#ifdef EXTRAKEY_ENABLE - static uint16_t last_data = 0; - uint8_t bits1 = 0; - uint8_t bits2 = 0; - uint8_t bits3 = 0; - - if (!iwrap_connected() && !iwrap_check_connection()) return; - if (data == last_data) return; - last_data = data; - - // 3.10 HID raw mode(iWRAP_HID_Application_Note.pdf) - switch (data) { - case AUDIO_VOL_UP: - bits1 = 0x01; - break; - case AUDIO_VOL_DOWN: - bits1 = 0x02; - break; - case AUDIO_MUTE: - bits1 = 0x04; - break; - case TRANSPORT_PLAY_PAUSE: - bits1 = 0x08; - break; - case TRANSPORT_NEXT_TRACK: - bits1 = 0x10; - break; - case TRANSPORT_PREV_TRACK: - bits1 = 0x20; - break; - case TRANSPORT_STOP: - bits1 = 0x40; - break; - case TRANSPORT_EJECT: - bits1 = 0x80; - break; - case AL_EMAIL: - bits2 = 0x01; - break; - case AC_SEARCH: - bits2 = 0x02; - break; - case AC_BOOKMARKS: - bits2 = 0x04; - break; - case AC_HOME: - bits2 = 0x08; - break; - case AC_BACK: - bits2 = 0x10; - break; - case AC_FORWARD: - bits2 = 0x20; - break; - case AC_STOP: - bits2 = 0x40; - break; - case AC_REFRESH: - bits2 = 0x80; - break; - case AL_CC_CONFIG: - bits3 = 0x01; - break; - case AL_CALCULATOR: - bits3 = 0x04; - break; - case AL_LOCK: - bits3 = 0x08; - break; - case AL_LOCAL_BROWSER: - bits3 = 0x10; - break; - case AC_MINIMIZE: - bits3 = 0x20; - break; - case TRANSPORT_RECORD: - bits3 = 0x40; - break; - case TRANSPORT_REWIND: - bits3 = 0x80; - break; - } - - MUX_HEADER(0x01, 0x07); - xmit(0x9f); - xmit(0x05); // Length - xmit(0xa1); // DATA(Input) - xmit(0x03); // Report ID - xmit(bits1); - xmit(bits2); - xmit(bits3); - MUX_FOOTER(0x01); -#endif -} diff --git a/tmk_core/protocol/iwrap/main.c b/tmk_core/protocol/iwrap/main.c deleted file mode 100644 index 4048a9791d..0000000000 --- a/tmk_core/protocol/iwrap/main.c +++ /dev/null @@ -1,412 +0,0 @@ -/* -Copyright 2011 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 -#include -//#include -#include "wd.h" // in order to use watchdog in interrupt mode -#include -#include -#include -#include "keyboard.h" -#include "matrix.h" -#include "host.h" -#include "action.h" -#include "iwrap.h" -#ifdef PROTOCOL_VUSB -# include "vusb.h" -# include -#endif -#include "uart.h" -#include "suart.h" -#include "timer.h" -#include "debug.h" -#include "keycode.h" -#include "command.h" - -static void sleep(uint8_t term); -static bool console(void); -static bool console_command(uint8_t c); -static uint8_t key2asc(uint8_t key); - -/* -static void set_prr(void) -{ - power_adc_disable(); - power_spi_disable(); - power_twi_disable(); -#ifndef TIMER_H - //power_timer0_disable(); // used in timer.c -#endif - power_timer1_disable(); - power_timer2_disable(); -} -*/ - -/* -static void pullup_pins(void) -{ - // DDRs are set to 0(input) by default. -#ifdef PORTA - PORTA = 0xFF; -#endif - PORTB = 0xFF; - PORTC = 0xFF; - PORTD = 0xFF; -#ifdef PORTE - PORTE = 0xFF; -#endif -#ifdef PORTE - PORTF = 0xFF; -#endif -} -*/ - -#ifdef PROTOCOL_VUSB -static void disable_vusb(void) { - // disable interrupt & disconnect to prevent host from enumerating - USB_INTR_ENABLE &= ~(1 << USB_INTR_ENABLE_BIT); - usbDeviceDisconnect(); -} - -static void enable_vusb(void) { - USB_INTR_ENABLE |= (1 << USB_INTR_ENABLE_BIT); - usbDeviceConnect(); -} - -static void init_vusb(void) { - uint8_t i = 0; - - usbInit(); - disable_vusb(); - /* fake USB disconnect for > 250 ms */ - while (--i) { - _delay_ms(1); - } - enable_vusb(); -} -#endif - -void change_driver(host_driver_t *driver) { - /* - host_clear_keyboard_report(); - host_swap_keyboard_report(); - host_clear_keyboard_report(); - host_send_keyboard_report(); - */ - clear_keyboard(); - _delay_ms(1000); - host_set_driver(driver); -} - -static bool sleeping = false; -static bool insomniac = false; // TODO: should be false for power saving -static uint16_t last_timer = 0; - -int main(void) { - MCUSR = 0; - clock_prescale_set(clock_div_1); - WD_SET(WD_OFF); - - // power saving: the result is worse than nothing... why? - // pullup_pins(); - // set_prr(); - -#ifdef PROTOCOL_VUSB - disable_vusb(); -#endif - uart_init(115200); - keyboard_init(); - print("\nSend BREAK for UART Console Commands.\n"); - - // TODO: move to iWRAP/suart file - print("suart init\n"); - // suart init - // PC4: Tx Output IDLE(Hi) - PORTC |= (1 << 4); - DDRC |= (1 << 4); - // PC5: Rx Input(pull-up) - PORTC |= (1 << 5); - DDRC &= ~(1 << 5); - // suart receive interrut(PC5/PCINT13) - PCMSK1 = 0b00100000; - PCICR = 0b00000010; - - host_set_driver(iwrap_driver()); - - print("iwrap_init()\n"); - iwrap_init(); - iwrap_call(); - - last_timer = timer_read(); - while (true) { -#ifdef PROTOCOL_VUSB - if (host_get_driver() == vusb_driver()) usbPoll(); -#endif - keyboard_task(); -#ifdef PROTOCOL_VUSB - if (host_get_driver() == vusb_driver()) vusb_transfer_keyboard(); -#endif - // TODO: depricated - if (matrix_is_modified() || console()) { - last_timer = timer_read(); - sleeping = false; - } else if (!sleeping && timer_elapsed(last_timer) > 4000) { - sleeping = true; - iwrap_check_connection(); - } - - // TODO: suspend.h - if (host_get_driver() == iwrap_driver()) { - if (sleeping && !insomniac) { - _delay_ms(1); // wait for UART to send - iwrap_sleep(); - sleep(WDTO_60MS); - } - } - } -} - -static void sleep(uint8_t term) { - WD_SET(WD_IRQ, term); - - cli(); - set_sleep_mode(SLEEP_MODE_PWR_DOWN); - sleep_enable(); - sleep_bod_disable(); - sei(); - sleep_cpu(); - sleep_disable(); - - WD_SET(WD_OFF); -} - -static bool console(void) { - // Send to Bluetoot module WT12 - static bool breaked = false; - if (!uart_available()) - return false; - else { - uint8_t c; - c = uart_getchar(); - uart_putchar(c); - switch (c) { - case 0x00: // BREAK signal - if (!breaked) { - print("break(? for help): "); - breaked = true; - } - break; - case '\r': - uart_putchar('\n'); - iwrap_buf_send(); - break; - case '\b': - iwrap_buf_del(); - break; - default: - if (breaked) { - print("\n"); - console_command(c); - breaked = false; - } else { - iwrap_buf_add(c); - } - break; - } - return true; - } -} - -bool command_extra(uint8_t code) { return console_command(key2asc(code)); } - -static bool console_command(uint8_t c) { - switch (c) { - case 'h': - case '?': - print("\nCommands for Bluetooth(WT12/iWRAP):\n"); - print("r: reset. software reset by watchdog\n"); - print("i: insomniac. prevent KB from sleeping\n"); - print("c: iwrap_call. CALL for BT connection.\n"); -#ifdef PROTOCOL_VUSB - print("u: USB mode. switch to USB.\n"); - print("w: BT mode. switch to Bluetooth.\n"); -#endif - print("k: kill first connection.\n"); - print("Del: unpair first pairing.\n"); - print("\n"); - return 0; - case 'r': - print("reset\n"); - WD_AVR_RESET(); - return 1; - case 'i': - insomniac = !insomniac; - if (insomniac) - print("insomniac\n"); - else - print("not insomniac\n"); - return 1; - case 'c': - print("iwrap_call()\n"); - iwrap_call(); - return 1; -#ifdef PROTOCOL_VUSB - case 'u': - print("USB mode\n"); - init_vusb(); - change_driver(vusb_driver()); - // iwrap_kill(); - // iwrap_sleep(); - // disable suart receive interrut(PC5/PCINT13) - PCMSK1 &= ~(0b00100000); - PCICR &= ~(0b00000010); - return 1; - case 'w': - print("iWRAP mode\n"); - change_driver(iwrap_driver()); - disable_vusb(); - // enable suart receive interrut(PC5/PCINT13) - PCMSK1 |= 0b00100000; - PCICR |= 0b00000010; - return 1; -#endif - case 'k': - print("kill\n"); - iwrap_kill(); - return 1; - case 0x7F: // DELETE - print("unpair\n"); - iwrap_unpair(); - return 1; - } - return 0; -} - -// convert keycode into ascii charactor -static uint8_t key2asc(uint8_t key) { - switch (key) { - case KC_A: - return 'a'; - case KC_B: - return 'b'; - case KC_C: - return 'c'; - case KC_D: - return 'd'; - case KC_E: - return 'e'; - case KC_F: - return 'f'; - case KC_G: - return 'g'; - case KC_H: - return 'h'; - case KC_I: - return 'i'; - case KC_J: - return 'j'; - case KC_K: - return 'k'; - case KC_L: - return 'l'; - case KC_M: - return 'm'; - case KC_N: - return 'n'; - case KC_O: - return 'o'; - case KC_P: - return 'p'; - case KC_Q: - return 'q'; - case KC_R: - return 'r'; - case KC_S: - return 's'; - case KC_T: - return 't'; - case KC_U: - return 'u'; - case KC_V: - return 'v'; - case KC_W: - return 'w'; - case KC_X: - return 'x'; - case KC_Y: - return 'y'; - case KC_Z: - return 'z'; - case KC_1: - return '1'; - case KC_2: - return '2'; - case KC_3: - return '3'; - case KC_4: - return '4'; - case KC_5: - return '5'; - case KC_6: - return '6'; - case KC_7: - return '7'; - case KC_8: - return '8'; - case KC_9: - return '9'; - case KC_0: - return '0'; - case KC_ENTER: - return '\n'; - case KC_ESCAPE: - return 0x1B; - case KC_BSPACE: - return '\b'; - case KC_TAB: - return '\t'; - case KC_SPACE: - return ' '; - case KC_MINUS: - return '-'; - case KC_EQUAL: - return '='; - case KC_LBRACKET: - return '['; - case KC_RBRACKET: - return ']'; - case KC_BSLASH: - return '\\'; - case KC_NONUS_HASH: - return '#'; - case KC_SCOLON: - return ';'; - case KC_QUOTE: - return '\''; - case KC_GRAVE: - return '`'; - case KC_COMMA: - return ','; - case KC_DOT: - return '.'; - case KC_SLASH: - return '/'; - default: - return 0x00; - } -} diff --git a/tmk_core/protocol/iwrap/mux_exit.rb b/tmk_core/protocol/iwrap/mux_exit.rb deleted file mode 100644 index 1f6be48afd..0000000000 --- a/tmk_core/protocol/iwrap/mux_exit.rb +++ /dev/null @@ -1,7 +0,0 @@ -# -# Rescue from Bluegiga iWRAP MUX mode -# 6.75 of iWRAP5_User_Guid.pdf -# -[0xBF, 0xFF, 0x00, 0x11, 0x53, 0x45, 0x54, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x4f, 0x4c, 0x20, 0x4d, 0x55, 0x58, 0x20, 0x30, 0x00].each do |x| - print x.chr -end diff --git a/tmk_core/protocol/iwrap/suart.S b/tmk_core/protocol/iwrap/suart.S deleted file mode 100644 index a873515e10..0000000000 --- a/tmk_core/protocol/iwrap/suart.S +++ /dev/null @@ -1,156 +0,0 @@ -;---------------------------------------------------------------------------; -; Software implemented UART module ; -; (C)ChaN, 2005 (http://elm-chan.org/) ; -;---------------------------------------------------------------------------; -; Bit rate settings: -; -; 1MHz 2MHz 4MHz 6MHz 8MHz 10MHz 12MHz 16MHz 20MHz -; 2.4kbps 138 - - - - - - - - -; 4.8kbps 68 138 - - - - - - - -; 9.6kbps 33 68 138 208 - - - - - -; 19.2kbps - 33 68 102 138 173 208 - - -; 38.4kbps - - 33 50 68 85 102 138 172 -; 57.6kbps - - 21 33 44 56 68 91 114 -; 115.2kbps - - - - 21 27 33 44 56 - -.nolist -#include -.list - -#define BPS 102 /* Bit delay. (see above table) */ -#define BIDIR 0 /* 0:Separated Tx/Rx, 1:Shared Tx/Rx */ - -#define OUT_1 sbi _SFR_IO_ADDR(SUART_OUT_PORT), SUART_OUT_BIT /* Output 1 */ -#define OUT_0 cbi _SFR_IO_ADDR(SUART_OUT_PORT), SUART_OUT_BIT /* Output 0 */ -#define SKIP_IN_1 sbis _SFR_IO_ADDR(SUART_IN_PIN), SUART_IN_BIT /* Skip if 1 */ -#define SKIP_IN_0 sbic _SFR_IO_ADDR(SUART_IN_PIN), SUART_IN_BIT /* Skip if 0 */ - - - -#ifdef SPM_PAGESIZE -.macro _LPMI reg - lpm \reg, Z+ -.endm -.macro _MOVW dh,dl, sh,sl - movw \dl, \sl -.endm -#else -.macro _LPMI reg - lpm - mov \reg, r0 - adiw ZL, 1 -.endm -.macro _MOVW dh,dl, sh,sl - mov \dl, \sl - mov \dh, \sh -.endm -#endif - - - -;---------------------------------------------------------------------------; -; Transmit a byte in serial format of N81 -; -;Prototype: void xmit (uint8_t data); -;Size: 16 words - -.global xmit -.func xmit -xmit: -#if BIDIR - ldi r23, BPS-1 ;Pre-idle time for bidirectional data line -5: dec r23 ; - brne 5b ;/ -#endif - in r0, _SFR_IO_ADDR(SREG) ;Save flags - - com r24 ;C = start bit - ldi r25, 10 ;Bit counter - cli ;Start critical section - -1: ldi r23, BPS-1 ;----- Bit transferring loop -2: dec r23 ;Wait for a bit time - brne 2b ;/ - brcs 3f ;MISO = bit to be sent - OUT_1 ; -3: brcc 4f ; - OUT_0 ;/ -4: lsr r24 ;Get next bit into C - dec r25 ;All bits sent? - brne 1b ; no, coutinue - - out _SFR_IO_ADDR(SREG), r0 ;End of critical section - ret -.endfunc - - - -;---------------------------------------------------------------------------; -; Receive a byte -; -;Prototype: uint8_t rcvr (void); -;Size: 19 words - -.global rcvr -.func rcvr -rcvr: - in r0, _SFR_IO_ADDR(SREG) ;Save flags - - ldi r24, 0x80 ;Receiving shift reg - cli ;Start critical section - -1: SKIP_IN_1 ;Wait for idle - rjmp 1b -2: SKIP_IN_0 ;Wait for start bit - rjmp 2b - ldi r25, BPS/2 ;Wait for half bit time -3: dec r25 - brne 3b - -4: ldi r25, BPS ;----- Bit receiving loop -5: dec r25 ;Wait for a bit time - brne 5b ;/ - lsr r24 ;Next bit - SKIP_IN_0 ;Get a data bit into r24.7 - ori r24, 0x80 - brcc 4b ;All bits received? no, continue - - out _SFR_IO_ADDR(SREG), r0 ;End of critical section - ret -.endfunc - - -; Not wait for start bit. This should be called after detecting start bit. -.global recv -.func recv -recv: - in r0, _SFR_IO_ADDR(SREG) ;Save flags - - ldi r24, 0x80 ;Receiving shift reg - cli ;Start critical section - -;1: SKIP_IN_1 ;Wait for idle -; rjmp 1b -;2: SKIP_IN_0 ;Wait for start bit -; rjmp 2b - ldi r25, BPS/2 ;Wait for half bit time -3: dec r25 - brne 3b - -4: ldi r25, BPS ;----- Bit receiving loop -5: dec r25 ;Wait for a bit time - brne 5b ;/ - lsr r24 ;Next bit - SKIP_IN_0 ;Get a data bit into r24.7 - ori r24, 0x80 - brcc 4b ;All bits received? no, continue - - ldi r25, BPS/2 ;Wait for half bit time -6: dec r25 - brne 6b -7: SKIP_IN_1 ;Wait for stop bit - rjmp 7b - - out _SFR_IO_ADDR(SREG), r0 ;End of critical section - ret -.endfunc diff --git a/tmk_core/protocol/iwrap/suart.h b/tmk_core/protocol/iwrap/suart.h deleted file mode 100644 index c634bbc2f4..0000000000 --- a/tmk_core/protocol/iwrap/suart.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef SUART -#define SUART - -void xmit(uint8_t); -uint8_t rcvr(void); -uint8_t recv(void); - -#endif /* SUART */ diff --git a/tmk_core/protocol/iwrap/wd.h b/tmk_core/protocol/iwrap/wd.h deleted file mode 100644 index 083d6d44d6..0000000000 --- a/tmk_core/protocol/iwrap/wd.h +++ /dev/null @@ -1,161 +0,0 @@ -/* This is from http://www.mtcnet.net/~henryvm/wdt/ */ -#ifndef _AVR_WD_H_ -#define _AVR_WD_H_ - -#include - -/* -Copyright (c) 2009, Curt Van Maanen - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND 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, DIRECT, 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. - - -include usage- - #include "wd.h" //if in same directory as project - #include //if wd.h is in avr directory - -set watchdog modes and prescale - -usage- - WD_SET(mode,[timeout]); //prescale always set - -modes- - WD_OFF disabled - WD_RST normal reset mode - WD_IRQ interrupt only mode (if supported) - WD_RST_IRQ interrupt+reset mode (if supported) - -timeout- - WDTO_15MS default if no timeout provided - WDTO_30MS - WDTO_60MS - WDTO_120MS - WDTO_250MS - WDTO_500MS - WDTO_1S - WDTO_2S - WDTO_4S (if supported) - WDTO_8S (if supported) - -examples- - WD_SET(WD_RST,WDTO_1S); //reset mode, 1s timeout - WD_SET(WD_OFF); //watchdog disabled (if not fused on) - WD_SET(WD_RST); //reset mode, 15ms (default timeout) - WD_SET(WD_IRQ,WDTO_120MS); //interrupt only mode, 120ms timeout - WD_SET(WD_RST_IRQ,WDTO_2S); //interrupt+reset mode, 2S timeout - - -for enhanced watchdogs, if the watchdog is not being used WDRF should be -cleared on every power up or reset, along with disabling the watchdog- - WD_DISABLE(); //clear WDRF, then turn off watchdog - -*/ - -// reset registers to the same name (MCUCSR) -#if !defined(MCUCSR) -# define MCUCSR MCUSR -#endif - -// watchdog registers to the same name (WDTCSR) -#if !defined(WDTCSR) -# define WDTCSR WDTCR -#endif - -// if enhanced watchdog, define irq values, create disable macro -#if defined(WDIF) -# define WD_IRQ 0xC0 -# define WD_RST_IRQ 0xC8 -# define WD_DISABLE() \ - do { \ - MCUCSR &= ~(1 << WDRF); \ - WD_SET(WD_OFF); \ - } while (0) -#endif - -// all watchdogs -#define WD_RST 8 -#define WD_OFF 0 - -// prescale values -#define WDTO_15MS 0 -#define WDTO_30MS 1 -#define WDTO_60MS 2 -#define WDTO_120MS 3 -#define WDTO_250MS 4 -#define WDTO_500MS 5 -#define WDTO_1S 6 -#define WDTO_2S 7 - -// prescale values for avrs with WDP3 -#if defined(WDP3) -# define WDTO_4S 0x20 -# define WDTO_8S 0x21 -#endif - -// watchdog reset -#define WDR() __asm__ __volatile__("wdr") - -// avr reset using watchdog -#define WD_AVR_RESET() \ - do { \ - __asm__ __volatile__("cli"); \ - WD_SET_UNSAFE(WD_RST); \ - while (1) \ - ; \ - } while (0) - -/*set the watchdog- -1. save SREG -2. turn off irq's -3. reset watchdog timer -4. enable watchdog change -5. write watchdog value -6. restore SREG (restoring irq status) -*/ -#define WD_SET(val, ...) \ - __asm__ __volatile__("in __tmp_reg__,__SREG__" \ - "\n\t" \ - "cli" \ - "\n\t" \ - "wdr" \ - "\n\t" \ - "sts %[wdreg],%[wden]" \ - "\n\t" \ - "sts %[wdreg],%[wdval]" \ - "\n\t" \ - "out __SREG__,__tmp_reg__" \ - "\n\t" \ - : \ - : [ wdreg ] "M"(&WDTCSR), [ wden ] "r"((uint8_t)(0x18)), [ wdval ] "r"((uint8_t)(val | (__VA_ARGS__ + 0))) \ - : "r0") - -/*set the watchdog when I bit in SREG known to be clear- -1. reset watchdog timer -2. enable watchdog change -5. write watchdog value -*/ -#define WD_SET_UNSAFE(val, ...) \ - __asm__ __volatile__("wdr" \ - "\n\t" \ - "sts %[wdreg],%[wden]" \ - "\n\t" \ - "sts %[wdreg],%[wdval]" \ - "\n\t" \ - : \ - : [ wdreg ] "M"(&WDTCSR), [ wden ] "r"((uint8_t)(0x18)), [ wdval ] "r"((uint8_t)(val | (__VA_ARGS__ + 0)))) - -// for compatibility with avr/wdt.h -#define wdt_enable(val) WD_SET(WD_RST, val) -#define wdt_disable() WD_SET(WD_OFF) - -#endif /* _AVR_WD_H_ */ diff --git a/tmk_core/protocol/lufa.mk b/tmk_core/protocol/lufa.mk index d87802992e..1cc1fa04e5 100644 --- a/tmk_core/protocol/lufa.mk +++ b/tmk_core/protocol/lufa.mk @@ -15,33 +15,28 @@ else endif LUFA_SRC = lufa.c \ - usb_descriptor.c \ - outputselect.c \ - $(LUFA_SRC_USB) + usb_descriptor.c \ + $(LUFA_SRC_USB) ifeq ($(strip $(MIDI_ENABLE)), yes) include $(TMK_PATH)/protocol/midi.mk endif ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) - LUFA_SRC += $(LUFA_DIR)/bluetooth.c \ - $(TMK_DIR)/protocol/serial_uart.c + LUFA_SRC += outputselect.c \ + $(TMK_DIR)/protocol/serial_uart.c endif ifeq ($(strip $(BLUETOOTH)), AdafruitBLE) - LUFA_SRC += spi_master.c - LUFA_SRC += analog.c - LUFA_SRC += $(LUFA_DIR)/adafruit_ble.cpp -endif - -ifeq ($(strip $(BLUETOOTH)), AdafruitEZKey) - LUFA_SRC += $(LUFA_DIR)/bluetooth.c \ - $(TMK_DIR)/protocol/serial_uart.c + LUFA_SRC += spi_master.c \ + analog.c \ + outputselect.c \ + $(LUFA_DIR)/adafruit_ble.cpp endif ifeq ($(strip $(BLUETOOTH)), RN42) - LUFA_SRC += $(LUFA_DIR)/bluetooth.c \ - $(TMK_DIR)/protocol/serial_uart.c + LUFA_SRC += outputselect.c \ + $(TMK_DIR)/protocol/serial_uart.c endif ifeq ($(strip $(VIRTSER_ENABLE)), yes) diff --git a/tmk_core/protocol/lufa/adafruit_ble.cpp b/tmk_core/protocol/lufa/adafruit_ble.cpp index b07407f387..79b35fca31 100644 --- a/tmk_core/protocol/lufa/adafruit_ble.cpp +++ b/tmk_core/protocol/lufa/adafruit_ble.cpp @@ -38,7 +38,7 @@ #ifdef SAMPLE_BATTERY # ifndef BATTERY_LEVEL_PIN -# define BATTERY_LEVEL_PIN 7 +# define BATTERY_LEVEL_PIN B5 # endif #endif @@ -556,7 +556,7 @@ void adafruit_ble_task(void) { if (timer_elapsed(state.last_battery_update) > BatteryUpdateInterval && resp_buf.empty()) { state.last_battery_update = timer_read(); - state.vbat = analogRead(BATTERY_LEVEL_PIN); + state.vbat = analogReadPin(BATTERY_LEVEL_PIN); } #endif } diff --git a/tmk_core/protocol/lufa/adafruit_ble.h b/tmk_core/protocol/lufa/adafruit_ble.h index cef46fe9f7..9dfc9b4355 100644 --- a/tmk_core/protocol/lufa/adafruit_ble.h +++ b/tmk_core/protocol/lufa/adafruit_ble.h @@ -2,18 +2,19 @@ * Author: Wez Furlong, 2016 * Supports the Adafruit BLE board built around the nRF51822 chip. */ + #pragma once -#ifdef MODULE_ADAFRUIT_BLE -# include -# include -# include -# include "config_common.h" -# include "progmem.h" +#include +#include +#include -# ifdef __cplusplus +#include "config_common.h" +#include "progmem.h" + +#ifdef __cplusplus extern "C" { -# endif +#endif /* Instruct the module to enable HID keyboard support and reset */ extern bool adafruit_ble_enable_keyboard(void); @@ -40,12 +41,12 @@ extern bool adafruit_ble_send_keys(uint8_t hid_modifier_mask, uint8_t *keys, uin * (milliseconds) */ extern bool adafruit_ble_send_consumer_key(uint16_t keycode, int hold_duration); -# ifdef MOUSE_ENABLE +#ifdef MOUSE_ENABLE /* Send a mouse/wheel movement report. * The parameters are signed and indicate positive of negative direction * change. */ extern bool adafruit_ble_send_mouse_move(int8_t x, int8_t y, int8_t scroll, int8_t pan, uint8_t buttons); -# endif +#endif /* Compute battery voltage by reading an analog pin. * Returns the integer number of millivolts */ @@ -54,8 +55,6 @@ extern uint32_t adafruit_ble_read_battery_voltage(void); extern bool adafruit_ble_set_mode_leds(bool on); extern bool adafruit_ble_set_power_level(int8_t level); -# ifdef __cplusplus +#ifdef __cplusplus } -# endif - -#endif // MODULE_ADAFRUIT_BLE +#endif diff --git a/tmk_core/protocol/lufa/bluetooth.c b/tmk_core/protocol/lufa/bluetooth.c deleted file mode 100644 index 5eb52860b1..0000000000 --- a/tmk_core/protocol/lufa/bluetooth.c +++ /dev/null @@ -1,38 +0,0 @@ -/* -Bluefruit Protocol for TMK firmware -Author: Benjamin Gould, 2013 - Jack Humbert, 2015 -Based on code Copyright 2011 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 "report.h" -#include "print.h" -#include "debug.h" -#include "bluetooth.h" - -void bluefruit_keyboard_print_report(report_keyboard_t *report) { - if (!debug_keyboard) return; - dprintf("keys: "); - for (int i = 0; i < KEYBOARD_REPORT_KEYS; i++) { - debug_hex8(report->keys[i]); - dprintf(" "); - } - dprintf(" mods: "); - debug_hex8(report->mods); - dprintf(" reserved: "); - debug_hex8(report->reserved); - dprintf("\n"); -} - -void bluefruit_serial_send(uint8_t data) { serial_send(data); } \ No newline at end of file diff --git a/tmk_core/protocol/lufa/bluetooth.h b/tmk_core/protocol/lufa/bluetooth.h deleted file mode 100644 index 081271a4e6..0000000000 --- a/tmk_core/protocol/lufa/bluetooth.h +++ /dev/null @@ -1,48 +0,0 @@ -/* -Bluefruit Protocol for TMK firmware -Author: Benjamin Gould, 2013 - Jack Humbert, 2015 -Based on code Copyright 2011 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 BLUETOOTH_H -#define BLUETOOTH_H - -#include "../serial.h" - -void bluefruit_serial_send(uint8_t data); - -/* -+-----------------+-------------------+-------+ -| Consumer Key | Bit Map | Hex | -+-----------------+-------------------+-------+ -| Home | 00000001 00000000 | 01 00 | -| KeyboardLayout | 00000010 00000000 | 02 00 | -| Search | 00000100 00000000 | 04 00 | -| Snapshot | 00001000 00000000 | 08 00 | -| VolumeUp | 00010000 00000000 | 10 00 | -| VolumeDown | 00100000 00000000 | 20 00 | -| Play/Pause | 01000000 00000000 | 40 00 | -| Fast Forward | 10000000 00000000 | 80 00 | -| Rewind | 00000000 00000001 | 00 01 | -| Scan Next Track | 00000000 00000010 | 00 02 | -| Scan Prev Track | 00000000 00000100 | 00 04 | -| Random Play | 00000000 00001000 | 00 08 | -| Stop | 00000000 00010000 | 00 10 | -+-------------------------------------+-------+ -*/ -#define CONSUMER2BLUEFRUIT(usage) (usage == AUDIO_MUTE ? 0x0000 : (usage == AUDIO_VOL_UP ? 0x1000 : (usage == AUDIO_VOL_DOWN ? 0x2000 : (usage == TRANSPORT_NEXT_TRACK ? 0x0002 : (usage == TRANSPORT_PREV_TRACK ? 0x0004 : (usage == TRANSPORT_STOP ? 0x0010 : (usage == TRANSPORT_STOP_EJECT ? 0x0000 : (usage == TRANSPORT_PLAY_PAUSE ? 0x4000 : (usage == AL_CC_CONFIG ? 0x0000 : (usage == AL_EMAIL ? 0x0000 : (usage == AL_CALCULATOR ? 0x0000 : (usage == AL_LOCAL_BROWSER ? 0x0000 : (usage == AC_SEARCH ? 0x0400 : (usage == AC_HOME ? 0x0100 : (usage == AC_BACK ? 0x0000 : (usage == AC_FORWARD ? 0x0000 : (usage == AC_STOP ? 0x0000 : (usage == AC_REFRESH ? 0x0000 : (usage == AC_BOOKMARKS ? 0x0000 : 0))))))))))))))))))) - -#define CONSUMER2RN42(usage) (usage == AUDIO_MUTE ? 0x0040 : (usage == AUDIO_VOL_UP ? 0x0010 : (usage == AUDIO_VOL_DOWN ? 0x0020 : (usage == TRANSPORT_NEXT_TRACK ? 0x0100 : (usage == TRANSPORT_PREV_TRACK ? 0x0200 : (usage == TRANSPORT_STOP ? 0x0400 : (usage == TRANSPORT_STOP_EJECT ? 0x0800 : (usage == TRANSPORT_PLAY_PAUSE ? 0x0080 : (usage == AL_EMAIL ? 0x0200 : (usage == AL_LOCAL_BROWSER ? 0x8000 : (usage == AC_SEARCH ? 0x0400 : (usage == AC_HOME ? 0x0100 : 0)))))))))))) - -#endif diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 374add20f9..cec0044026 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -53,7 +53,6 @@ #include "lufa.h" #include "quantum.h" #include -#include "outputselect.h" #ifdef NKRO_ENABLE # include "keycode_config.h" @@ -66,10 +65,11 @@ extern keymap_config_t keymap_config; #endif #ifdef BLUETOOTH_ENABLE +# include "outputselect.h" # ifdef MODULE_ADAFRUIT_BLE # include "adafruit_ble.h" # else -# include "bluetooth.h" +# include "../serial.h" # endif #endif @@ -85,10 +85,54 @@ extern keymap_config_t keymap_config; # include "raw_hid.h" #endif +#ifdef JOYSTICK_ENABLE +# include "joystick.h" +#endif + +// https://cdn.sparkfun.com/datasheets/Wireless/Bluetooth/bluetooth_cr_UG-v1.0r.pdf#G7.663734 +static inline uint16_t CONSUMER2RN42(uint16_t usage) { + switch (usage) { + case AC_HOME: + return 0x0001; + case AL_EMAIL: + return 0x0002; + case AC_SEARCH: + return 0x0004; + case AL_KEYBOARD_LAYOUT: + return 0x0008; + case AUDIO_VOL_UP: + return 0x0010; + case AUDIO_VOL_DOWN: + return 0x0020; + case AUDIO_MUTE: + return 0x0040; + case TRANSPORT_PLAY_PAUSE: + return 0x0080; + case TRANSPORT_NEXT_TRACK: + return 0x0100; + case TRANSPORT_PREV_TRACK: + return 0x0200; + case TRANSPORT_STOP: + return 0x0400; + case TRANSPORT_EJECT: + return 0x0800; + case TRANSPORT_FAST_FORWARD: + return 0x1000; + case TRANSPORT_REWIND: + return 0x2000; + case TRANSPORT_STOP_EJECT: + return 0x4000; + case AL_LOCAL_BROWSER: + return 0x8000; + default: + return 0; + } +} + uint8_t keyboard_idle = 0; /* 0: Boot Protocol, 1: Report Protocol(default) */ uint8_t keyboard_protocol = 1; -static uint8_t keyboard_led_stats = 0; +static uint8_t keyboard_led_state = 0; static report_keyboard_t keyboard_report_sent; @@ -103,30 +147,30 @@ host_driver_t lufa_driver = { }; #ifdef VIRTSER_ENABLE +// clang-format off + USB_ClassInfo_CDC_Device_t cdc_device = { - .Config = - { - .ControlInterfaceNumber = CCI_INTERFACE, - .DataINEndpoint = - { - .Address = CDC_IN_EPADDR, - .Size = CDC_EPSIZE, - .Banks = 1, - }, - .DataOUTEndpoint = - { - .Address = CDC_OUT_EPADDR, - .Size = CDC_EPSIZE, - .Banks = 1, - }, - .NotificationEndpoint = - { - .Address = CDC_NOTIFICATION_EPADDR, - .Size = CDC_NOTIFICATION_EPSIZE, - .Banks = 1, - }, + .Config = { + .ControlInterfaceNumber = CCI_INTERFACE, + .DataINEndpoint = { + .Address = (CDC_IN_EPNUM | ENDPOINT_DIR_IN), + .Size = CDC_EPSIZE, + .Banks = 1 }, + .DataOUTEndpoint = { + .Address = (CDC_OUT_EPNUM | ENDPOINT_DIR_OUT), + .Size = CDC_EPSIZE, + .Banks = 1 + }, + .NotificationEndpoint = { + .Address = (CDC_NOTIFICATION_EPNUM | ENDPOINT_DIR_IN), + .Size = CDC_NOTIFICATION_EPSIZE, + .Banks = 1 + } + } }; + +// clang-format on #endif #ifdef RAW_ENABLE @@ -254,7 +298,7 @@ static void Console_Task(void) { // fill empty bank while (Endpoint_IsReadWriteAllowed()) Endpoint_Write_8(0); - // flash senchar packet + // flush sendchar packet if (Endpoint_IsINReady()) { Endpoint_ClearIN(); } @@ -263,6 +307,70 @@ static void Console_Task(void) { } #endif +/******************************************************************************* + * Joystick + ******************************************************************************/ +#ifdef JOYSTICK_ENABLE +void send_joystick_packet(joystick_t *joystick) { + uint8_t timeout = 255; + + joystick_report_t r = { +# if JOYSTICK_AXES_COUNT > 0 + .axes = + { + joystick->axes[0], + +# if JOYSTICK_AXES_COUNT >= 2 + joystick->axes[1], +# endif +# if JOYSTICK_AXES_COUNT >= 3 + joystick->axes[2], +# endif +# if JOYSTICK_AXES_COUNT >= 4 + joystick->axes[3], +# endif +# if JOYSTICK_AXES_COUNT >= 5 + joystick->axes[4], +# endif +# if JOYSTICK_AXES_COUNT >= 6 + joystick->axes[5], +# endif + }, +# endif // JOYSTICK_AXES_COUNT>0 + +# if JOYSTICK_BUTTON_COUNT > 0 + .buttons = + { + joystick->buttons[0], + +# if JOYSTICK_BUTTON_COUNT > 8 + joystick->buttons[1], +# endif +# if JOYSTICK_BUTTON_COUNT > 16 + joystick->buttons[2], +# endif +# if JOYSTICK_BUTTON_COUNT > 24 + joystick->buttons[3], +# endif + } +# endif // JOYSTICK_BUTTON_COUNT>0 + }; + + /* Select the Joystick Report Endpoint */ + Endpoint_SelectEndpoint(JOYSTICK_IN_EPNUM); + + /* Check if write ready for a polling interval around 10ms */ + while (timeout-- && !Endpoint_IsReadWriteAllowed()) _delay_us(40); + if (!Endpoint_IsReadWriteAllowed()) return; + + /* Write Joystick Report Data */ + Endpoint_Write_Stream_LE(&r, sizeof(joystick_report_t), NULL); + + /* Finalize the stream transfer to send the last packet */ + Endpoint_ClearIN(); +} +#endif + /******************************************************************************* * USB Events ******************************************************************************/ @@ -370,45 +478,51 @@ void EVENT_USB_Device_StartOfFrame(void) { void EVENT_USB_Device_ConfigurationChanged(void) { bool ConfigSuccess = true; - /* Setup Keyboard HID Report Endpoints */ #ifndef KEYBOARD_SHARED_EP - ConfigSuccess &= ENDPOINT_CONFIG(KEYBOARD_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, KEYBOARD_EPSIZE, ENDPOINT_BANK_SINGLE); + /* Setup keyboard report endpoint */ + ConfigSuccess &= Endpoint_ConfigureEndpoint((KEYBOARD_IN_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_INTERRUPT, KEYBOARD_EPSIZE, 1); #endif #if defined(MOUSE_ENABLE) && !defined(MOUSE_SHARED_EP) - /* Setup Mouse HID Report Endpoint */ - ConfigSuccess &= ENDPOINT_CONFIG(MOUSE_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, MOUSE_EPSIZE, ENDPOINT_BANK_SINGLE); + /* Setup mouse report endpoint */ + ConfigSuccess &= Endpoint_ConfigureEndpoint((MOUSE_IN_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_INTERRUPT, MOUSE_EPSIZE, 1); #endif #ifdef SHARED_EP_ENABLE - /* Setup Shared HID Report Endpoint */ - ConfigSuccess &= ENDPOINT_CONFIG(SHARED_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, SHARED_EPSIZE, ENDPOINT_BANK_SINGLE); + /* Setup shared report endpoint */ + ConfigSuccess &= Endpoint_ConfigureEndpoint((SHARED_IN_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_INTERRUPT, SHARED_EPSIZE, 1); #endif #ifdef RAW_ENABLE - /* Setup Raw HID Report Endpoints */ - ConfigSuccess &= ENDPOINT_CONFIG(RAW_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, RAW_EPSIZE, ENDPOINT_BANK_SINGLE); - ConfigSuccess &= ENDPOINT_CONFIG(RAW_OUT_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_OUT, RAW_EPSIZE, ENDPOINT_BANK_SINGLE); + /* Setup raw HID endpoints */ + ConfigSuccess &= Endpoint_ConfigureEndpoint((RAW_IN_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_INTERRUPT, RAW_EPSIZE, 1); + ConfigSuccess &= Endpoint_ConfigureEndpoint((RAW_OUT_EPNUM | ENDPOINT_DIR_OUT), EP_TYPE_INTERRUPT, RAW_EPSIZE, 1); #endif #ifdef CONSOLE_ENABLE - /* Setup Console HID Report Endpoints */ - ConfigSuccess &= ENDPOINT_CONFIG(CONSOLE_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, CONSOLE_EPSIZE, ENDPOINT_BANK_SINGLE); + /* Setup console endpoint */ + ConfigSuccess &= Endpoint_ConfigureEndpoint((CONSOLE_IN_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_INTERRUPT, CONSOLE_EPSIZE, 1); # if 0 - ConfigSuccess &= ENDPOINT_CONFIG(CONSOLE_OUT_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_OUT, - CONSOLE_EPSIZE, ENDPOINT_BANK_SINGLE); + ConfigSuccess &= Endpoint_ConfigureEndpoint((CONSOLE_OUT_EPNUM | ENDPOINT_DIR_OUT), EP_TYPE_INTERRUPT, CONSOLE_EPSIZE, 1); # endif #endif #ifdef MIDI_ENABLE - ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_IN_EPADDR, EP_TYPE_BULK, MIDI_STREAM_EPSIZE, ENDPOINT_BANK_SINGLE); - ConfigSuccess &= Endpoint_ConfigureEndpoint(MIDI_STREAM_OUT_EPADDR, EP_TYPE_BULK, MIDI_STREAM_EPSIZE, ENDPOINT_BANK_SINGLE); + /* Setup MIDI stream endpoints */ + ConfigSuccess &= Endpoint_ConfigureEndpoint((MIDI_STREAM_IN_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_BULK, MIDI_STREAM_EPSIZE, 1); + ConfigSuccess &= Endpoint_ConfigureEndpoint((MIDI_STREAM_OUT_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_BULK, MIDI_STREAM_EPSIZE, 1); #endif #ifdef VIRTSER_ENABLE - ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_NOTIFICATION_EPADDR, EP_TYPE_INTERRUPT, CDC_NOTIFICATION_EPSIZE, ENDPOINT_BANK_SINGLE); - ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_OUT_EPADDR, EP_TYPE_BULK, CDC_EPSIZE, ENDPOINT_BANK_SINGLE); - ConfigSuccess &= Endpoint_ConfigureEndpoint(CDC_IN_EPADDR, EP_TYPE_BULK, CDC_EPSIZE, ENDPOINT_BANK_SINGLE); + /* Setup virtual serial endpoints */ + ConfigSuccess &= Endpoint_ConfigureEndpoint((CDC_NOTIFICATION_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_INTERRUPT, CDC_NOTIFICATION_EPSIZE, 1); + ConfigSuccess &= Endpoint_ConfigureEndpoint((CDC_OUT_EPNUM | ENDPOINT_DIR_OUT), EP_TYPE_BULK, CDC_EPSIZE, 1); + ConfigSuccess &= Endpoint_ConfigureEndpoint((CDC_IN_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_BULK, CDC_EPSIZE, 1); +#endif + +#ifdef JOYSTICK_ENABLE + /* Setup joystick endpoint */ + ConfigSuccess &= Endpoint_ConfigureEndpoint((JOYSTICK_IN_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_INTERRUPT, JOYSTICK_EPSIZE, 1); #endif } @@ -472,10 +586,10 @@ void EVENT_USB_Device_ControlRequest(void) { uint8_t report_id = Endpoint_Read_8(); if (report_id == REPORT_ID_KEYBOARD || report_id == REPORT_ID_NKRO) { - keyboard_led_stats = Endpoint_Read_8(); + keyboard_led_state = Endpoint_Read_8(); } } else { - keyboard_led_stats = Endpoint_Read_8(); + keyboard_led_state = Endpoint_Read_8(); } Endpoint_ClearOUT(); @@ -545,7 +659,7 @@ void EVENT_USB_Device_ControlRequest(void) { * * FIXME: Needs doc */ -static uint8_t keyboard_leds(void) { return keyboard_led_stats; } +static uint8_t keyboard_leds(void) { return keyboard_led_state; } /** \brief Send Keyboard * @@ -553,35 +667,29 @@ static uint8_t keyboard_leds(void) { return keyboard_led_stats; } */ static void send_keyboard(report_keyboard_t *report) { uint8_t timeout = 255; - uint8_t where = where_to_send(); #ifdef BLUETOOTH_ENABLE + uint8_t where = where_to_send(); + if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { # ifdef MODULE_ADAFRUIT_BLE adafruit_ble_send_keys(report->mods, report->keys, sizeof(report->keys)); # elif MODULE_RN42 - bluefruit_serial_send(0xFD); - bluefruit_serial_send(0x09); - bluefruit_serial_send(0x01); - bluefruit_serial_send(report->mods); - bluefruit_serial_send(report->reserved); + serial_send(0xFD); + serial_send(0x09); + serial_send(0x01); + serial_send(report->mods); + serial_send(report->reserved); for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { - bluefruit_serial_send(report->keys[i]); - } -# else - bluefruit_serial_send(0xFD); - bluefruit_serial_send(report->mods); - bluefruit_serial_send(report->reserved); - for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { - bluefruit_serial_send(report->keys[i]); + serial_send(report->keys[i]); } # endif } -#endif if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { return; } +#endif /* Select the Keyboard Report Endpoint */ uint8_t ep = KEYBOARD_IN_EPNUM; @@ -617,30 +725,31 @@ static void send_keyboard(report_keyboard_t *report) { static void send_mouse(report_mouse_t *report) { #ifdef MOUSE_ENABLE uint8_t timeout = 255; - uint8_t where = where_to_send(); # ifdef BLUETOOTH_ENABLE + uint8_t where = where_to_send(); + if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { # ifdef MODULE_ADAFRUIT_BLE // FIXME: mouse buttons adafruit_ble_send_mouse_move(report->x, report->y, report->v, report->h, report->buttons); # else - bluefruit_serial_send(0xFD); - bluefruit_serial_send(0x00); - bluefruit_serial_send(0x03); - bluefruit_serial_send(report->buttons); - bluefruit_serial_send(report->x); - bluefruit_serial_send(report->y); - bluefruit_serial_send(report->v); // should try sending the wheel v here - bluefruit_serial_send(report->h); // should try sending the wheel h here - bluefruit_serial_send(0x00); + serial_send(0xFD); + serial_send(0x00); + serial_send(0x03); + serial_send(report->buttons); + serial_send(report->x); + serial_send(report->y); + serial_send(report->v); // should try sending the wheel v here + serial_send(report->h); // should try sending the wheel h here + serial_send(0x00); # endif } -# endif if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { return; } +# endif /* Select the Mouse Report Endpoint */ Endpoint_SelectEndpoint(MOUSE_IN_EPNUM); @@ -695,9 +804,9 @@ static void send_system(uint16_t data) { */ static void send_consumer(uint16_t data) { #ifdef EXTRAKEY_ENABLE +# ifdef BLUETOOTH_ENABLE uint8_t where = where_to_send(); -# ifdef BLUETOOTH_ENABLE if (where == OUTPUT_BLUETOOTH || where == OUTPUT_USB_AND_BT) { # ifdef MODULE_ADAFRUIT_BLE adafruit_ble_send_consumer_key(data, 0); @@ -706,32 +815,18 @@ static void send_consumer(uint16_t data) { if (data == last_data) return; last_data = data; uint16_t bitmap = CONSUMER2RN42(data); - bluefruit_serial_send(0xFD); - bluefruit_serial_send(0x03); - bluefruit_serial_send(0x03); - bluefruit_serial_send(bitmap & 0xFF); - bluefruit_serial_send((bitmap >> 8) & 0xFF); -# else - static uint16_t last_data = 0; - if (data == last_data) return; - last_data = data; - uint16_t bitmap = CONSUMER2BLUEFRUIT(data); - bluefruit_serial_send(0xFD); - bluefruit_serial_send(0x00); - bluefruit_serial_send(0x02); - bluefruit_serial_send((bitmap >> 8) & 0xFF); - bluefruit_serial_send(bitmap & 0xFF); - bluefruit_serial_send(0x00); - bluefruit_serial_send(0x00); - bluefruit_serial_send(0x00); - bluefruit_serial_send(0x00); + serial_send(0xFD); + serial_send(0x03); + serial_send(0x03); + serial_send(bitmap & 0xFF); + serial_send((bitmap >> 8) & 0xFF); # endif } -# endif if (where != OUTPUT_USB && where != OUTPUT_USB_AND_BT) { return; } +# endif send_extra(REPORT_ID_CONSUMER, data); #endif @@ -808,25 +903,26 @@ ERROR_EXIT: ******************************************************************************/ #ifdef MIDI_ENABLE +// clang-format off + USB_ClassInfo_MIDI_Device_t USB_MIDI_Interface = { - .Config = - { - .StreamingInterfaceNumber = AS_INTERFACE, - .DataINEndpoint = - { - .Address = MIDI_STREAM_IN_EPADDR, - .Size = MIDI_STREAM_EPSIZE, - .Banks = 1, - }, - .DataOUTEndpoint = - { - .Address = MIDI_STREAM_OUT_EPADDR, - .Size = MIDI_STREAM_EPSIZE, - .Banks = 1, - }, + .Config = { + .StreamingInterfaceNumber = AS_INTERFACE, + .DataINEndpoint = { + .Address = (MIDI_STREAM_IN_EPNUM | ENDPOINT_DIR_IN), + .Size = MIDI_STREAM_EPSIZE, + .Banks = 1 }, + .DataOUTEndpoint = { + .Address = (MIDI_STREAM_OUT_EPNUM | ENDPOINT_DIR_OUT), + .Size = MIDI_STREAM_EPSIZE, + .Banks = 1 + } + } }; +// clang-format on + void send_midi_packet(MIDI_EventPacket_t *event) { MIDI_Device_SendEventPacket(&USB_MIDI_Interface, event); } bool recv_midi_packet(MIDI_EventPacket_t *const event) { return MIDI_Device_ReceiveEventPacket(&USB_MIDI_Interface, event); } @@ -945,7 +1041,7 @@ int main(void) { setup_usb(); sei(); -#if defined(MODULE_ADAFRUIT_EZKEY) || defined(MODULE_RN42) +#if defined(MODULE_RN42) serial_init(); #endif diff --git a/tmk_core/protocol/lufa/lufa.h b/tmk_core/protocol/lufa/lufa.h index 82a5f8e05f..71fd7aad85 100644 --- a/tmk_core/protocol/lufa/lufa.h +++ b/tmk_core/protocol/lufa/lufa.h @@ -69,8 +69,4 @@ extern host_driver_t lufa_driver; # define MIDI_SYSEX_BUFFER (API_SYSEX_MAX_SIZE + API_SYSEX_MAX_SIZE / 7 + (API_SYSEX_MAX_SIZE % 7 ? 1 : 0)) #endif -#define ENDPOINT_BANK_SINGLE 1 -#define ENDPOINT_BANK_DOUBLE 2 -#define ENDPOINT_CONFIG(epnum, eptype, epdir, epsize, epbank) Endpoint_ConfigureEndpoint((epdir) | (epnum), eptype, epsize, epbank) - #endif diff --git a/tmk_core/protocol/lufa/outputselect.c b/tmk_core/protocol/lufa/outputselect.c index b115ea9691..f758c65280 100644 --- a/tmk_core/protocol/lufa/outputselect.c +++ b/tmk_core/protocol/lufa/outputselect.c @@ -12,8 +12,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "lufa.h" #include "outputselect.h" + +#if defined(PROTOCOL_LUFA) +# include "lufa.h" +#endif + #ifdef MODULE_ADAFRUIT_BLE # include "adafruit_ble.h" #endif @@ -35,12 +39,18 @@ void set_output(uint8_t output) { */ __attribute__((weak)) void set_output_user(uint8_t output) {} +static bool is_usb_configured(void) { +#if defined(PROTOCOL_LUFA) + return USB_DeviceState == DEVICE_STATE_Configured; +#endif +} + /** \brief Auto Detect Output * * FIXME: Needs doc */ uint8_t auto_detect_output(void) { - if (USB_DeviceState == DEVICE_STATE_Configured) { + if (is_usb_configured()) { return OUTPUT_USB; } diff --git a/tmk_core/protocol/lufa/outputselect.h b/tmk_core/protocol/lufa/outputselect.h index 24fe4daa24..7f7ed00b95 100644 --- a/tmk_core/protocol/lufa/outputselect.h +++ b/tmk_core/protocol/lufa/outputselect.h @@ -12,6 +12,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#pragma once + +#include + enum outputs { OUTPUT_AUTO, @@ -37,4 +41,4 @@ enum outputs { void set_output(uint8_t output); void set_output_user(uint8_t output); uint8_t auto_detect_output(void); -uint8_t where_to_send(void); \ No newline at end of file +uint8_t where_to_send(void); diff --git a/tmk_core/protocol/serial.h b/tmk_core/protocol/serial.h index 93ac998983..b70d117d7c 100644 --- a/tmk_core/protocol/serial.h +++ b/tmk_core/protocol/serial.h @@ -35,13 +35,10 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SERIAL_H -#define SERIAL_H +#pragma once /* host role */ void serial_init(void); uint8_t serial_recv(void); int16_t serial_recv2(void); void serial_send(uint8_t data); - -#endif diff --git a/tmk_core/protocol/usb_descriptor.c b/tmk_core/protocol/usb_descriptor.c index 8c71dd1dda..f5d32445de 100644 --- a/tmk_core/protocol/usb_descriptor.c +++ b/tmk_core/protocol/usb_descriptor.c @@ -279,6 +279,63 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM ConsoleReport[] = { }; #endif +#ifdef JOYSTICK_ENABLE +# if JOYSTICK_AXES_COUNT == 0 && JOYSTICK_BUTTON_COUNT == 0 +# error Need at least one axis or button for joystick +# endif +const USB_Descriptor_HIDReport_Datatype_t PROGMEM JoystickReport[] = { + HID_RI_USAGE_PAGE(8, 0x01), // Generic Desktop + HID_RI_USAGE(8, 0x04), // Joystick + HID_RI_COLLECTION(8, 0x01), // Application + HID_RI_COLLECTION(8, 0x00), // Physical + HID_RI_USAGE_PAGE(8, 0x01), // Generic Desktop +# if JOYSTICK_AXES_COUNT >= 1 + HID_RI_USAGE(8, 0x30), // X +# endif +# if JOYSTICK_AXES_COUNT >= 2 + HID_RI_USAGE(8, 0x31), // Y +# endif +# if JOYSTICK_AXES_COUNT >= 3 + HID_RI_USAGE(8, 0x32), // Z +# endif +# if JOYSTICK_AXES_COUNT >= 4 + HID_RI_USAGE(8, 0x33), // Rx +# endif +# if JOYSTICK_AXES_COUNT >= 5 + HID_RI_USAGE(8, 0x34), // Ry +# endif +# if JOYSTICK_AXES_COUNT >= 6 + HID_RI_USAGE(8, 0x35), // Rz +# endif +# if JOYSTICK_AXES_COUNT >= 1 + HID_RI_LOGICAL_MINIMUM(8, -127), + HID_RI_LOGICAL_MAXIMUM(8, 127), + HID_RI_REPORT_COUNT(8, JOYSTICK_AXES_COUNT), + HID_RI_REPORT_SIZE(8, 0x08), + HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), +# endif + +# if JOYSTICK_BUTTON_COUNT >= 1 + HID_RI_USAGE_PAGE(8, 0x09), // Button + HID_RI_USAGE_MINIMUM(8, 0x01), + HID_RI_USAGE_MAXIMUM(8, JOYSTICK_BUTTON_COUNT), + HID_RI_LOGICAL_MINIMUM(8, 0x00), + HID_RI_LOGICAL_MAXIMUM(8, 0x01), + HID_RI_REPORT_COUNT(8, JOYSTICK_BUTTON_COUNT), + HID_RI_REPORT_SIZE(8, 0x01), + HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), + +# if (JOYSTICK_BUTTON_COUNT % 8) != 0 + HID_RI_REPORT_COUNT(8, 8 - (JOYSTICK_BUTTON_COUNT % 8)), + HID_RI_REPORT_SIZE(8, 0x01), + HID_RI_INPUT(8, HID_IOF_CONSTANT), +# endif +# endif + HID_RI_END_COLLECTION(0), + HID_RI_END_COLLECTION(0) +}; +#endif + /* * Device descriptor */ @@ -288,7 +345,7 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = { .Type = DTYPE_Device }, .USBSpecification = VERSION_BCD(1, 1, 0), - + #if VIRTSER_ENABLE .Class = USB_CSCP_IADDeviceClass, .SubClass = USB_CSCP_IADDeviceSubclass, @@ -673,7 +730,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint }, - .EndpointAddress = MIDI_STREAM_OUT_EPADDR, + .EndpointAddress = (ENDPOINT_DIR_OUT | MIDI_STREAM_OUT_EPNUM), .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = MIDI_STREAM_EPSIZE, .PollingIntervalMS = 0x05 @@ -696,7 +753,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Size = sizeof(USB_Audio_Descriptor_StreamEndpoint_Std_t), .Type = DTYPE_Endpoint }, - .EndpointAddress = MIDI_STREAM_IN_EPADDR, + .EndpointAddress = (ENDPOINT_DIR_IN | MIDI_STREAM_IN_EPNUM), .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = MIDI_STREAM_EPSIZE, .PollingIntervalMS = 0x05 @@ -774,7 +831,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint }, - .EndpointAddress = CDC_NOTIFICATION_EPADDR, + .EndpointAddress = (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM), .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CDC_NOTIFICATION_EPSIZE, .PollingIntervalMS = 0xFF @@ -797,7 +854,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint }, - .EndpointAddress = CDC_OUT_EPADDR, + .EndpointAddress = (ENDPOINT_DIR_OUT | CDC_OUT_EPNUM), .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CDC_EPSIZE, .PollingIntervalMS = 0x05 @@ -807,12 +864,52 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint }, - .EndpointAddress = CDC_IN_EPADDR, + .EndpointAddress = (ENDPOINT_DIR_IN | CDC_IN_EPNUM), .Attributes = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), .EndpointSize = CDC_EPSIZE, .PollingIntervalMS = 0x05 }, #endif + + /* + * Joystick + */ +#ifdef JOYSTICK_ENABLE + .Joystick_Interface = { + .Header = { + .Size = sizeof(USB_Descriptor_Interface_t), + .Type = DTYPE_Interface + }, + .InterfaceNumber = JOYSTICK_INTERFACE, + .AlternateSetting = 0x00, + .TotalEndpoints = 1, + .Class = HID_CSCP_HIDClass, + .SubClass = HID_CSCP_NonBootSubclass, + .Protocol = HID_CSCP_NonBootProtocol, + .InterfaceStrIndex = NO_DESCRIPTOR + }, + .Joystick_HID = { + .Header = { + .Size = sizeof(USB_HID_Descriptor_HID_t), + .Type = HID_DTYPE_HID + }, + .HIDSpec = VERSION_BCD(1, 1, 1), + .CountryCode = 0x00, + .TotalReportDescriptors = 1, + .HIDReportType = HID_DTYPE_Report, + .HIDReportLength = sizeof(JoystickReport) + }, + .Joystick_INEndpoint = { + .Header = { + .Size = sizeof(USB_Descriptor_Endpoint_t), + .Type = DTYPE_Endpoint + }, + .EndpointAddress = (ENDPOINT_DIR_IN | JOYSTICK_IN_EPNUM), + .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = JOYSTICK_EPSIZE, + .PollingIntervalMS = USB_POLLING_INTERVAL_MS + } +#endif }; /* @@ -945,6 +1042,12 @@ uint16_t get_usb_descriptor(const uint16_t wValue, const uint16_t wIndex, const break; #endif +#ifdef JOYSTICK_ENABLE + case JOYSTICK_INTERFACE: + Address = &ConfigurationDescriptor.Joystick_HID; + Size = sizeof(USB_HID_Descriptor_HID_t); + break; +#endif } break; @@ -989,6 +1092,12 @@ uint16_t get_usb_descriptor(const uint16_t wValue, const uint16_t wIndex, const break; #endif +#ifdef JOYSTICK_ENABLE + case JOYSTICK_INTERFACE: + Address = &JoystickReport; + Size = sizeof(JoystickReport); + break; +#endif } break; diff --git a/tmk_core/protocol/usb_descriptor.h b/tmk_core/protocol/usb_descriptor.h index b2423fa7e6..79dd87014f 100644 --- a/tmk_core/protocol/usb_descriptor.h +++ b/tmk_core/protocol/usb_descriptor.h @@ -123,6 +123,13 @@ typedef struct { USB_Descriptor_Endpoint_t CDC_DataOutEndpoint; USB_Descriptor_Endpoint_t CDC_DataInEndpoint; #endif + +#ifdef JOYSTICK_ENABLE + // Joystick HID Interface + USB_Descriptor_Interface_t Joystick_Interface; + USB_HID_Descriptor_HID_t Joystick_HID; + USB_Descriptor_Endpoint_t Joystick_INEndpoint; +#endif } USB_Descriptor_Configuration_t; /* @@ -164,6 +171,9 @@ enum usb_interfaces { CDI_INTERFACE, #endif +#if defined(JOYSTICK_ENABLE) + JOYSTICK_INTERFACE, +#endif TOTAL_INTERFACES }; @@ -212,17 +222,16 @@ enum usb_endpoints { #ifdef MIDI_ENABLE MIDI_STREAM_IN_EPNUM = NEXT_EPNUM, MIDI_STREAM_OUT_EPNUM = NEXT_EPNUM, -# define MIDI_STREAM_IN_EPADDR (ENDPOINT_DIR_IN | MIDI_STREAM_IN_EPNUM) -# define MIDI_STREAM_OUT_EPADDR (ENDPOINT_DIR_OUT | MIDI_STREAM_OUT_EPNUM) #endif #ifdef VIRTSER_ENABLE CDC_NOTIFICATION_EPNUM = NEXT_EPNUM, CDC_IN_EPNUM = NEXT_EPNUM, CDC_OUT_EPNUM = NEXT_EPNUM, -# define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | CDC_NOTIFICATION_EPNUM) -# define CDC_IN_EPADDR (ENDPOINT_DIR_IN | CDC_IN_EPNUM) -# define CDC_OUT_EPADDR (ENDPOINT_DIR_OUT | CDC_OUT_EPNUM) +#endif +#ifdef JOYSTICK_ENABLE + JOYSTICK_IN_EPNUM = NEXT_EPNUM, + JOYSTICK_OUT_EPNUM = NEXT_EPNUM, #endif }; @@ -248,6 +257,7 @@ enum usb_endpoints { #define MIDI_STREAM_EPSIZE 64 #define CDC_NOTIFICATION_EPSIZE 8 #define CDC_EPSIZE 16 +#define JOYSTICK_EPSIZE 8 uint16_t get_usb_descriptor(const uint16_t wValue, const uint16_t wIndex, const void** const DescriptorAddress); #endif diff --git a/tmk_core/protocol/vusb.mk b/tmk_core/protocol/vusb.mk index 5e564f7480..1de6003089 100644 --- a/tmk_core/protocol/vusb.mk +++ b/tmk_core/protocol/vusb.mk @@ -9,13 +9,6 @@ SRC += $(VUSB_DIR)/main.c \ $(VUSB_PATH)/usbdrv/usbdrvasm.S \ $(VUSB_PATH)/usbdrv/oddebug.c -ifneq ($(strip $(CONSOLE_ENABLE)), yes) -ifndef NO_UART -SRC += $(COMMON_DIR)/sendchar_uart.c \ - $(COMMON_DIR)/uart.c -endif -endif - # Search Path VPATH += $(TMK_PATH)/$(VUSB_DIR) VPATH += $(VUSB_PATH) diff --git a/tmk_core/protocol/vusb/main.c b/tmk_core/protocol/vusb/main.c index b4063273da..a57df5ce06 100644 --- a/tmk_core/protocol/vusb/main.c +++ b/tmk_core/protocol/vusb/main.c @@ -7,19 +7,22 @@ * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) * This Revision: $Id: main.c 790 2010-05-30 21:00:26Z cs $ */ + #include + #include +#include #include #include -#include + #include -#include + #include "vusb.h" + #include "keyboard.h" #include "host.h" #include "timer.h" -#include "uart.h" -#include "debug.h" +#include "print.h" #include "suspend.h" #include "wait.h" #include "sendchar.h" @@ -28,8 +31,6 @@ # include "sleep_led.h" #endif -#define UART_BAUD_RATE 115200 - #ifdef CONSOLE_ENABLE void console_task(void); #endif @@ -47,7 +48,7 @@ static void initForUsbConnectivity(void) { usbDeviceDisconnect(); /* do this while interrupts are disabled */ while (--i) { /* fake USB disconnect for > 250 ms */ wdt_reset(); - _delay_ms(1); + wait_ms(1); } usbDeviceConnect(); } @@ -60,7 +61,7 @@ static void usb_remote_wakeup(void) { USBDDR = ddr_orig | USBMASK; USBOUT ^= USBMASK; - _delay_ms(25); + wait_ms(25); USBOUT ^= USBMASK; USBDDR = ddr_orig; @@ -74,7 +75,6 @@ static void usb_remote_wakeup(void) { * FIXME: Needs doc */ static void setup_usb(void) { - // debug("initForUsbConnectivity()\n"); initForUsbConnectivity(); // for Console_Task @@ -95,10 +95,7 @@ int main(void) { #ifdef CLKPR // avoid unintentional changes of clock frequency in devices that have a // clock prescaler - CLKPR = 0x80, CLKPR = 0; -#endif -#ifndef NO_UART - uart_init(UART_BAUD_RATE); + clock_prescale_set(clock_div_1); #endif keyboard_setup(); @@ -113,7 +110,6 @@ int main(void) { sleep_led_init(); #endif - debug("main loop\n"); while (1) { #if USB_COUNT_SOF if (usbSofCount != 0) { @@ -130,19 +126,6 @@ int main(void) { # ifdef SLEEP_LED_ENABLE sleep_led_enable(); # endif - /* - uart_putchar('S'); - _delay_ms(1); - cli(); - set_sleep_mode(SLEEP_MODE_PWR_DOWN); - sleep_enable(); - sleep_bod_disable(); - sei(); - sleep_cpu(); - sleep_disable(); - _delay_ms(10); - uart_putchar('W'); - */ } } #endif diff --git a/tmk_core/protocol/vusb/sendchar_usart.c b/tmk_core/protocol/vusb/sendchar_usart.c deleted file mode 100644 index a920a9a536..0000000000 --- a/tmk_core/protocol/vusb/sendchar_usart.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH - * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) - */ -#include -#include -#include "sendchar.h" - -#if DEBUG_LEVEL > 0 -/* from oddebug.c */ -int8_t sendchar(uint8_t c) { - while (!(ODDBG_USR & (1 << ODDBG_UDRE))) - ; /* wait for data register empty */ - ODDBG_UDR = c; - return 1; -} -#else -int8_t sendchar(uint8_t c) { return 1; } -#endif diff --git a/tmk_core/protocol/vusb/usbconfig.h b/tmk_core/protocol/vusb/usbconfig.h index dcef7584c4..041f7bd095 100644 --- a/tmk_core/protocol/vusb/usbconfig.h +++ b/tmk_core/protocol/vusb/usbconfig.h @@ -85,9 +85,19 @@ section at the end of this file). /* If the so-called endpoint 3 is used, it can now be configured to any other * endpoint number (except 0) with this macro. Default if undefined is 3. */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT4 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 4 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP4_NUMBER 4 +/* If the so-called endpoint 4 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 4. + */ /* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ /* The above macro defines the startup condition for data toggling on the - * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * interrupt/bulk endpoints 1, 3 and 4. Defaults to USBPID_DATA1. * Since the token is toggled BEFORE sending any data, the first packet is * sent with the oposite value of this configuration! */ @@ -100,10 +110,10 @@ section at the end of this file). #define USB_CFG_SUPPRESS_INTR_CODE 0 /* Define this to 1 if you want to declare interrupt-in endpoints, but don't * want to send any data over them. If this macro is defined to 1, functions - * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if - * you need the interrupt-in endpoints in order to comply to an interface - * (e.g. HID), but never want to send any data. This option saves a couple - * of bytes in flash memory and the transmit buffers in RAM. + * usbSetInterrupt(), usbSetInterrupt3() and usbSetInterrupt4() are omitted. + * This is useful if you need the interrupt-in endpoints in order to comply + * to an interface (e.g. HID), but never want to send any data. This option + * saves a couple of bytes in flash memory and the transmit buffers in RAM. */ #define USB_CFG_IS_SELF_POWERED 0 /* Define this to 1 if the device has its own power supply. Set it to 0 if the diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index 5feff889a1..77bbbd7bd4 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -15,10 +15,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include -#include #include + +#include + #include + #include "usbconfig.h" #include "host.h" #include "report.h" @@ -26,6 +28,7 @@ along with this program. If not, see . #include "vusb.h" #include "print.h" #include "debug.h" +#include "wait.h" #include "usb_descriptor_common.h" #ifdef RAW_ENABLE @@ -56,16 +59,20 @@ enum usb_interfaces { #ifdef CONSOLE_ENABLE CONSOLE_INTERFACE = NEXT_INTERFACE, #endif - TOTAL_INTERFACES = NEXT_INTERFACE, + TOTAL_INTERFACES = NEXT_INTERFACE }; -#define MAX_INTERFACES 2 +#define MAX_INTERFACES 3 #if (NEXT_INTERFACE - 1) > MAX_INTERFACES # error There are not enough available interfaces to support all functions. Please disable one or more of the following: Mouse Keys, Extra Keys, Raw HID, Console #endif -static uint8_t vusb_keyboard_leds = 0; +#if (defined(MOUSE_ENABLE) || defined(EXTRAKEY_ENABLE)) && CONSOLE_ENABLE +# error Mouse/Extra Keys share an endpoint with Console. Please disable one of the two. +#endif + +static uint8_t keyboard_led_state = 0; static uint8_t vusb_idle_rate = 0; /* Keyboard report send buffer */ @@ -74,13 +81,7 @@ static report_keyboard_t kbuf[KBUF_SIZE]; static uint8_t kbuf_head = 0; static uint8_t kbuf_tail = 0; -typedef struct { - uint8_t modifier; - uint8_t reserved; - uint8_t keycode[6]; -} keyboard_report_t; - -static keyboard_report_t keyboard_report; // sent to PC +static report_keyboard_t keyboard_report_sent; #define VUSB_TRANSFER_KEYBOARD_MAX_TRIES 10 @@ -92,19 +93,13 @@ void vusb_transfer_keyboard(void) { usbSetInterrupt((void *)&kbuf[kbuf_tail], sizeof(report_keyboard_t)); kbuf_tail = (kbuf_tail + 1) % KBUF_SIZE; if (debug_keyboard) { - print("V-USB: kbuf["); - pdec(kbuf_tail); - print("->"); - pdec(kbuf_head); - print("]("); - phex((kbuf_head < kbuf_tail) ? (KBUF_SIZE - kbuf_tail + kbuf_head) : (kbuf_head - kbuf_tail)); - print(")\n"); + dprintf("V-USB: kbuf[%d->%d](%02X)\n", kbuf_tail, kbuf_head, (kbuf_head < kbuf_tail) ? (KBUF_SIZE - kbuf_tail + kbuf_head) : (kbuf_head - kbuf_tail)); } } break; } usbPoll(); - _delay_ms(1); + wait_ms(1); } } @@ -125,16 +120,16 @@ void raw_hid_send(uint8_t *data, uint8_t length) { uint8_t *temp = data; for (uint8_t i = 0; i < 4; i++) { - while (!usbInterruptIsReady3()) { + while (!usbInterruptIsReady4()) { usbPoll(); } - usbSetInterrupt3(temp, 8); + usbSetInterrupt4(temp, 8); temp += 8; } - while (!usbInterruptIsReady3()) { + while (!usbInterruptIsReady4()) { usbPoll(); } - usbSetInterrupt3(0, 0); + usbSetInterrupt4(0, 0); } __attribute__((weak)) void raw_hid_receive(uint8_t *data, uint8_t length) { @@ -218,7 +213,7 @@ static host_driver_t driver = {keyboard_leds, send_keyboard, send_mouse, send_sy host_driver_t *vusb_driver(void) { return &driver; } -static uint8_t keyboard_leds(void) { return vusb_keyboard_leds; } +static uint8_t keyboard_leds(void) { return keyboard_led_state; } static void send_keyboard(report_keyboard_t *report) { uint8_t next = (kbuf_head + 1) % KBUF_SIZE; @@ -226,12 +221,13 @@ static void send_keyboard(report_keyboard_t *report) { kbuf[kbuf_head] = *report; kbuf_head = next; } else { - debug("kbuf: full\n"); + dprint("kbuf: full\n"); } // NOTE: send key strokes of Macro usbPoll(); vusb_transfer_keyboard(); + keyboard_report_sent = *report; } typedef struct { @@ -288,36 +284,35 @@ usbMsgLen_t usbFunctionSetup(uchar data[8]) { if ((rq->bmRequestType & USBRQ_TYPE_MASK) == USBRQ_TYPE_CLASS) { /* class request type */ if (rq->bRequest == USBRQ_HID_GET_REPORT) { - debug("GET_REPORT:"); - /* we only have one report type, so don't look at wValue */ - usbMsgPtr = (usbMsgPtr_t)&keyboard_report; - return sizeof(keyboard_report); + dprint("GET_REPORT:"); + if (rq->wIndex.word == KEYBOARD_INTERFACE) { + usbMsgPtr = (usbMsgPtr_t)&keyboard_report_sent; + return sizeof(keyboard_report_sent); + } } else if (rq->bRequest == USBRQ_HID_GET_IDLE) { - debug("GET_IDLE: "); - // debug_hex(vusb_idle_rate); + dprint("GET_IDLE:"); usbMsgPtr = (usbMsgPtr_t)&vusb_idle_rate; return 1; } else if (rq->bRequest == USBRQ_HID_SET_IDLE) { vusb_idle_rate = rq->wValue.bytes[1]; - debug("SET_IDLE: "); - debug_hex(vusb_idle_rate); + dprintf("SET_IDLE: %02X", vusb_idle_rate); } else if (rq->bRequest == USBRQ_HID_SET_REPORT) { - debug("SET_REPORT: "); + dprint("SET_REPORT:"); // Report Type: 0x02(Out)/ReportID: 0x00(none) && Interface: 0(keyboard) - if (rq->wValue.word == 0x0200 && rq->wIndex.word == 0) { - debug("SET_LED: "); + if (rq->wValue.word == 0x0200 && rq->wIndex.word == KEYBOARD_INTERFACE) { + dprint("SET_LED:"); last_req.kind = SET_LED; last_req.len = rq->wLength.word; } return USB_NO_MSG; // to get data in usbFunctionWrite } else { - debug("UNKNOWN:"); + dprint("UNKNOWN:"); } } else { - debug("VENDOR:"); + dprint("VENDOR:"); /* no vendor specific requests implemented */ } - debug("\n"); + dprint("\n"); return 0; /* default for not implemented requests: return no data back to host */ } @@ -327,10 +322,8 @@ uchar usbFunctionWrite(uchar *data, uchar len) { } switch (last_req.kind) { case SET_LED: - debug("SET_LED: "); - debug_hex(data[0]); - debug("\n"); - vusb_keyboard_leds = data[0]; + dprintf("SET_LED: %02X\n", data[0]); + keyboard_led_state = data[0]; last_req.len = 0; return 1; break; @@ -346,13 +339,13 @@ void usbFunctionWriteOut(uchar *data, uchar len) { #ifdef RAW_ENABLE // Data from host must be divided every 8bytes if (len != 8) { - debug("RAW: invalid length"); + dprint("RAW: invalid length\n"); raw_output_received_bytes = 0; return; } if (raw_output_received_bytes + len > RAW_BUFFER_SIZE) { - debug("RAW: buffer full"); + dprint("RAW: buffer full\n"); raw_output_received_bytes = 0; } else { for (uint8_t i = 0; i < 8; i++) { @@ -408,29 +401,6 @@ const PROGMEM uchar keyboard_hid_report[] = { 0xC0 // End Collection }; -#ifdef RAW_ENABLE -const PROGMEM uchar raw_hid_report[] = { - 0x06, RAW_USAGE_PAGE_LO, RAW_USAGE_PAGE_HI, // Usage Page (Vendor Defined) - 0x09, RAW_USAGE_ID, // Usage (Vendor Defined) - 0xA1, 0x01, // Collection (Application) - // Data to host - 0x09, 0x62, // Usage (Vendor Defined) - 0x15, 0x00, // Logical Minimum (0) - 0x26, 0xFF, 0x00, // Logical Maximum (255) - 0x95, RAW_BUFFER_SIZE, // Report Count - 0x75, 0x08, // Report Size (8) - 0x81, 0x02, // Input (Data, Variable, Absolute) - // Data from host - 0x09, 0x63, // Usage (Vendor Defined) - 0x15, 0x00, // Logical Minimum (0) - 0x26, 0xFF, 0x00, // Logical Maximum (255) - 0x95, RAW_BUFFER_SIZE, // Report Count - 0x75, 0x08, // Report Size (8) - 0x91, 0x02, // Output (Data, Variable, Absolute) - 0xC0 // End Collection -}; -#endif - #if defined(MOUSE_ENABLE) || defined(EXTRAKEY_ENABLE) const PROGMEM uchar mouse_extra_hid_report[] = { # ifdef MOUSE_ENABLE @@ -515,6 +485,29 @@ const PROGMEM uchar mouse_extra_hid_report[] = { }; #endif +#ifdef RAW_ENABLE +const PROGMEM uchar raw_hid_report[] = { + 0x06, RAW_USAGE_PAGE_LO, RAW_USAGE_PAGE_HI, // Usage Page (Vendor Defined) + 0x09, RAW_USAGE_ID, // Usage (Vendor Defined) + 0xA1, 0x01, // Collection (Application) + // Data to host + 0x09, 0x62, // Usage (Vendor Defined) + 0x15, 0x00, // Logical Minimum (0) + 0x26, 0xFF, 0x00, // Logical Maximum (255) + 0x95, RAW_BUFFER_SIZE, // Report Count + 0x75, 0x08, // Report Size (8) + 0x81, 0x02, // Input (Data, Variable, Absolute) + // Data from host + 0x09, 0x63, // Usage (Vendor Defined) + 0x15, 0x00, // Logical Minimum (0) + 0x26, 0xFF, 0x00, // Logical Maximum (255) + 0x95, RAW_BUFFER_SIZE, // Report Count + 0x75, 0x08, // Report Size (8) + 0x91, 0x02, // Output (Data, Variable, Absolute) + 0xC0 // End Collection +}; +#endif + #if defined(CONSOLE_ENABLE) const PROGMEM uchar console_hid_report[] = { 0x06, 0x31, 0xFF, // Usage Page (Vendor Defined - PJRC Teensy compatible) @@ -694,7 +687,7 @@ const PROGMEM usbConfigurationDescriptor_t usbConfigurationDescriptor = { .bLength = sizeof(usbEndpointDescriptor_t), .bDescriptorType = USBDESCR_ENDPOINT }, - .bEndpointAddress = (USBRQ_DIR_DEVICE_TO_HOST | USB_CFG_EP3_NUMBER), + .bEndpointAddress = (USBRQ_DIR_DEVICE_TO_HOST | USB_CFG_EP4_NUMBER), .bmAttributes = 0x03, .wMaxPacketSize = RAW_EPSIZE, .bInterval = USB_POLLING_INTERVAL_MS @@ -704,7 +697,7 @@ const PROGMEM usbConfigurationDescriptor_t usbConfigurationDescriptor = { .bLength = sizeof(usbEndpointDescriptor_t), .bDescriptorType = USBDESCR_ENDPOINT }, - .bEndpointAddress = (USBRQ_DIR_HOST_TO_DEVICE | USB_CFG_EP3_NUMBER), + .bEndpointAddress = (USBRQ_DIR_HOST_TO_DEVICE | USB_CFG_EP4_NUMBER), .bmAttributes = 0x03, .wMaxPacketSize = RAW_EPSIZE, .bInterval = USB_POLLING_INTERVAL_MS @@ -805,14 +798,6 @@ const PROGMEM usbConfigurationDescriptor_t usbConfigurationDescriptor = { USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq) { usbMsgLen_t len = 0; - /* - debug("usbFunctionDescriptor: "); - debug_hex(rq->bmRequestType); debug(" "); - debug_hex(rq->bRequest); debug(" "); - debug_hex16(rq->wValue.word); debug(" "); - debug_hex16(rq->wIndex.word); debug(" "); - debug_hex16(rq->wLength.word); debug("\n"); - */ switch (rq->wValue.bytes[1]) { case USBDESCR_DEVICE: usbMsgPtr = (usbMsgPtr_t)&usbDeviceDescriptor; @@ -896,6 +881,5 @@ USB_PUBLIC usbMsgLen_t usbFunctionDescriptor(struct usbRequest *rq) { } break; } - // debug("desc len: "); debug_hex(len); debug("\n"); return len; } diff --git a/tmk_core/readme.md b/tmk_core/readme.md index 5b719bca5d..a754cfee42 100644 --- a/tmk_core/readme.md +++ b/tmk_core/readme.md @@ -84,8 +84,8 @@ Architecture / /| Keys/Mouse | Protocol |d| | Action | | | Protocol | /__________/ |<-----------| LUFA |r| | Layer, Tap | | | Matrix | |.--------.| | LED | V-USB |i| |-------------| | | PS/2,IBM | __________________ - || || |----------->| iWRAP(BT)|v| | Keymap | | | ADB,M0110| Keys / /_/_/_/_/_/_/_/ /| - || Host || | Console | UART |e| | Mousekey | | | SUN/NEWS |<----------/ /_/_/_/_/_/_/_/ / / + || || |----------->| UART |v| | Keymap | | | ADB,M0110| Keys / /_/_/_/_/_/_/_/ /| + || Host || | Console | |e| | Mousekey | | | SUN/NEWS |<----------/ /_/_/_/_/_/_/_/ / / ||________||/.<-----------| |r| | Report | | | X68K/PC98| Control / /_/_/_/_/_/_/_/ / / `_========_'/| |---------------------------------------------|-------->/___ /_______/ ___/ / |_o______o_|/ | Sendchar, Print, Debug, Command, ... | |_________________|/ @@ -133,7 +133,6 @@ Files and Directories ### Keyboard Protocols * lufa/ - LUFA USB stack * vusb/ - Objective Development V-USB -* iwrap/ - Bluetooth HID for Bluegiga iWRAP * ps2.c - PS/2 protocol * adb.c - Apple Desktop Bus protocol * m0110.c - Macintosh 128K/512K/Plus keyboard protocol diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index 9bb341ecb1..a7053d185c 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -396,6 +396,12 @@ show_path: @echo SRC=$(SRC) @echo OBJ=$(OBJ) +dump_vars: ERROR_IF_EMPTY="" +dump_vars: ERROR_IF_NONBOOL="" +dump_vars: ERROR_IF_UNSET="" +dump_vars: + @$(foreach V,$(sort $(.VARIABLES)),$(if $(filter-out environment% default automatic,$(origin $V)),$(info $V=$($V)))) + objs-size: for i in $(OBJ); do echo $$i; done | sort | xargs $(SIZE) @@ -436,7 +442,7 @@ $(eval $(foreach OUTPUT,$(OUTPUTS),$(shell mkdir -p $(OUTPUT) 2>/dev/null))) # Listing of phony targets. -.PHONY : all finish sizebefore sizeafter qmkversion \ +.PHONY : all dump_vars finish sizebefore sizeafter qmkversion \ gccversion build elf hex eep lss sym coff extcoff \ clean clean_list debug gdb-config show_path \ program teensy dfu dfu-ee dfu-start \ diff --git a/users/333fred/333fred.c b/users/333fred/333fred.c index 79df8c4dea..621b9e6649 100644 --- a/users/333fred/333fred.c +++ b/users/333fred/333fred.c @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include "333fred.h" #include "quantum.h" #include "action.h" diff --git a/users/333fred/333fred.h b/users/333fred/333fred.h index 716b61a25c..0532ff2df7 100644 --- a/users/333fred/333fred.h +++ b/users/333fred/333fred.h @@ -1,16 +1,37 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #pragma once #include "quantum.h" #include "layout_macros.h" #define BASE 0 -#define CODE 1 // code layer -#define CODEFLOW 2 -#define SYMB 3 -#define MDIA 4 // media keys -#define VIM 5 -#define GAME 6 -#define GAME_ARROW 7 +#define CODEFLOW 1 +#define SYMB 2 +#define MDIA 3 // media keys +#define VIM 4 +#define GAME 5 +#define GAME_ARROW 6 // Tap dance config shared between my keyboards enum tap_dance_declarations { diff --git a/users/333fred/config.h b/users/333fred/config.h index 5974b78926..0bbaa38a99 100644 --- a/users/333fred/config.h +++ b/users/333fred/config.h @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #pragma once #define PERMISSIVE_HOLD diff --git a/users/333fred/layout_macros.h b/users/333fred/layout_macros.h index 3b163f6ce7..d46a41905e 100644 --- a/users/333fred/layout_macros.h +++ b/users/333fred/layout_macros.h @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #pragma once #define SIX_TRNS _______, _______, _______, _______, _______, _______ diff --git a/users/333fred/rgb.c b/users/333fred/rgb.c index c86cd1c77d..d287143302 100644 --- a/users/333fred/rgb.c +++ b/users/333fred/rgb.c @@ -1,3 +1,25 @@ +/* + Copyright (c) 2020 Fred Silberberg + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include "quantum.h" #include "333fred.h" diff --git a/users/333fred/rules.mk b/users/333fred/rules.mk index 191422e365..265a6c18cb 100644 --- a/users/333fred/rules.mk +++ b/users/333fred/rules.mk @@ -7,3 +7,4 @@ endif TAP_DANCE_ENABLE=yes NKRO_ENABLE = yes PERMISSIVE_HOLD = yes +LTO_ENABLE = yes diff --git a/users/badger/README.md b/users/badger/README.md new file mode 100644 index 0000000000..fca1028a59 --- /dev/null +++ b/users/badger/README.md @@ -0,0 +1,31 @@ +# A multi-OS keyboard layout with support for both Linux (KDE) and MacOS-specific QWERTY layouts for many 60-ish% keyboards ( + +## Author: [BlueTufa](https://github.com/BlueTufa) + +> Supported Keyboards: 1up RGB and HTE, Clueboard 66, dztech 60 RGB, and partial support for Preonic and Planck ortholinear keyboards. + +## Layouts + +### QWERTY +Default layer: Standard QWERTY layer with CAPS lock mapped to ESC. ESC is a Layer toggle, when held down it maps to KDE-specific MOVE layer. Dedicated Function key for ADJUST layer. I also take advantage of the AG_SWAP when using this keyboard on Linux, which swaps between ALT and GUI on both sides. + +Mac layer: Mostly the same as the default layer, except that the ESC key maps to a MacOS specific set of MOVE layer shortcuts. These leverage a piece of software called Rectangle, which makes up for some of the tiling shortcomings of MacOS. + +### MOVE layer +OS-specific convenience shortcuts. Macros are defined to make it easier to adapt these to other operating systems. The macros also help maintain the spacing that helps with the readability of the layers in source control. + +The main goal of the MOVE layer is to manage window move and resize, and jump to a specific virtual desktop. The other function is to expose VIM-style move keys as arrow keys to other applications. Some keys from ADJUST layer are also redefined here. + +Care was taken to keep the tiling and virtual desktop shortcuts as similar as possible between Linux and MacOS in this MOVE layer. The most notable difference is that I haven't found a good way to do corner tiling in Linux the way that it's supported in MacOS Rectangle. + +REMINDER: The 9-key left-hand pattern requires the installation of the MacOS rectangle app: + +```bash +brew cask install rectangle +``` + +### ADJUST layer +Access to function keys as well as media controls and keyboard settings. Some useful OS action keys are defined here as well. + +### Config layer +Access to Quantum keyboard controls as well as RGB configuration. If audio is supported it would belong in this layer as well. diff --git a/users/badger/badger.c b/users/badger/badger.c new file mode 100644 index 0000000000..4551840610 --- /dev/null +++ b/users/badger/badger.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 Dan White + +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 "badger.h" + +bool _capsLockState; + +__attribute__ ((weak)) +void keyboard_post_init_user(void) { + _capsLockState = false; +} + +__attribute__ ((weak)) +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case CS_RIGHT: + if (record->event.pressed) { + SEND_STRING(SS_LALT(SS_TAP(X_B)SS_TAP(X_ENTER))); + return false; + } + break; + case CS_DOWN: + if (record->event.pressed) { + SEND_STRING(SS_LALT(SS_TAP(X_V)SS_TAP(X_ENTER))); + return false; + } + break; + case KC_CAPS: + if (record->event.pressed) { + _capsLockState = !_capsLockState; + return true; + } + break; + default: + return true; + } + return true; +} diff --git a/users/badger/badger.h b/users/badger/badger.h new file mode 100644 index 0000000000..bb2dcd0bd3 --- /dev/null +++ b/users/badger/badger.h @@ -0,0 +1,109 @@ +/* +Copyright 2020 Dan White + +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 . +*/ +#pragma once + +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY_MAC, + _MOVE_MAC, + _QWERTY_LINUX, + _MOVE_LINUX, + _ADJUST, + _CONFIG +}; + +enum CustomKeys { + CS_RIGHT = SAFE_RANGE, + CS_DOWN +}; + +#define OS_POP LCTL(KC_F10) +#define MAC_POP LCTL(KC_UP) +#define MAC_FRC LGUI(LALT(KC_ESC)) +#define OS_COPY LSFT(LCTL(KC_C)) +#define OS_PAST LSFT(LCTL(KC_V)) +#define MAC_PST LGUI(KC_V) +#define MAC_CPY LGUI(KC_C) +#define KC_BACK LCTL(LSFT(KC_LBRC)) +#define KC_NEXT LCTL(LSFT(KC_RBRC)) + +#define MOVE LT(_MOVE_LINUX, KC_ESC) +#define MOVE_MAC LT(_MOVE_MAC, KC_ESC) +#define ADJUST MO(_ADJUST) +#define CFG_MAC LT(_CONFIG, MAC_POP) +#define CFG_LNX LT(_CONFIG, OS_POP) + +#define WD_BACK LALT(KC_LEFT) +#define WD_FRWD LALT(KC_RIGHT) + +#define VD_1 LCTL(KC_F1) +#define VD_2 LCTL(KC_F2) +#define VD_3 LCTL(KC_F3) + +#define WM_UH LGUI(KC_UP) +#define WM_BH LGUI(KC_DOWN) +#define WM_LH LGUI(KC_LEFT) +#define WM_RH LGUI(KC_RIGHT) +#define WM_MAX LGUI(KC_PGUP) + +#define CM_RIGHT LGUI(KC_D) +#define CM_DOWN LGUI(LSFT(KC_D)) + +/* THESE are not defaults in KDE and must be set manually */ +#define WM_VD1 HYPR(KC_1) +#define WM_VD2 HYPR(KC_2) +#define WM_VD3 HYPR(KC_3) + +/* IntelliJ / JetBrains shortcuts with Mac keymap */ +#define IJ_BACK LGUI(LALT(KC_LEFT)) +#define IJ_FWD LGUI(LALT(KC_RIGHT)) +#define IJ_UP LGUI(LALT(KC_UP)) +#define IJ_DOWN LGUI(LALT(KC_DOWN)) +#define IJ_IMPL LGUI(LALT(KC_B)) +#define IJ_DECL LGUI(KC_B) +#define IJ_REN LSFT(KC_F6) +#define IJ_USAG LALT(KC_F7) +#define IJ_RUN KC_F9 +#define IJ_STEP KC_F8 +#define IJ_INTO LSFT(KC_F7) +#define IJ_OUT LSFT(KC_F8) +#define IJ_STOP LGUI(KC_F2) +#define IJ_IMPS LCTL(LALT(LSFT(KC_EQUAL))) +#define IJ_IMPH LCTL(LALT(LSFT(KC_MINUS))) +#define IJ_TOP LGUI(KC_HOME) +#define IJ_BOTT LGUI(KC_END) +#define IJ_FIND LGUI(LSFT(KC_F)) + +/* MacOS virtual desktop shortcuts */ +#define M_VD1 LCTL(KC_1) +#define M_VD2 LCTL(KC_2) +#define M_VD3 LCTL(KC_3) + +/* rectangle shortcuts */ +#define MM_ULCN LCTL(LGUI(KC_LEFT)) +#define MM_URCN LCTL(LGUI(KC_RIGHT)) +#define MM_LLCN LCTL(LSFT(LGUI(KC_LEFT))) +#define MM_LRCN LCTL(LSFT(LGUI(KC_RIGHT))) +#define MM_MAX LALT(LGUI(KC_F)) +#define MM_LH HYPR(KC_LBRC) +#define MM_RH HYPR(KC_RBRC) +#define MM_UH LALT(LGUI(KC_UP)) +#define MM_BH LALT(LGUI(KC_DOWN)) +#define MM_LEFT LCTL(LALT(LGUI(KC_LEFT))) +#define MM_RGHT LCTL(LALT(LGUI(KC_RIGHT))) + +#define DF_1 DF(_QWERTY_MAC) +#define DF_2 DF(_QWERTY_LINUX) diff --git a/users/badger/ortho.c b/users/badger/ortho.c new file mode 100644 index 0000000000..ff84e1706f --- /dev/null +++ b/users/badger/ortho.c @@ -0,0 +1,151 @@ +/* +Copyright 2020 Dan White + +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 "ortho.h" +#include "badger.h" + +int _currentLayer; +bool _capsLock; + +#ifdef AUDIO_ENABLE +float capsOnSong[][2] = SONG(CAPS_ON); +float capsOffSong[][2] = SONG(CAPS_OFF); +float defaultLayerSong[][2] = SONG(QWERTY_LAYER_SONG); +float moveLayerSong[][2] = SONG(MOVE_LAYER_SONG); +float macLayerSong[][2] = SONG(MAC_LAYER_SONG); +float raiseLayerSong[][2] = SONG(RAISE_LAYER_SONG); +float lowerLayerSong[][2] = SONG(LOWER_LAYER_SONG); +float agSwapSong[][2] = SONG(LONG_AG_SWAP); +float agNormSong[][2] = SONG(LONG_AG_NORM); +#endif + +__attribute__ ((weak)) +void keyboard_post_init_user(void) { + _capsLock = false; + _currentLayer = _QWERTY_MAC_ORTHO; + layer_on(_currentLayer); +} + +__attribute__ ((weak)) +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + dprintf("Key event recorded. KEYCODE: %u , event: %u\n", keycode, record->event.pressed); + switch (keycode) { + case CS_RIGHT: + if (record->event.pressed) { + SEND_STRING(SS_LALT(SS_TAP(X_B)SS_TAP(X_ENTER))); + return false; + } + break; + case CS_DOWN: + if (record->event.pressed) { + SEND_STRING(SS_LALT(SS_TAP(X_V)SS_TAP(X_ENTER))); + return false; + } + break; + case KC_CAPS: + if (record->event.pressed) { + dprintf("CAPS_LOCK state: %u\n", _capsLock); + _capsLock = !_capsLock; + #ifdef AUDIO_ENABLE + _capsLock ? PLAY_SONG(capsOnSong) : PLAY_SONG(capsOffSong); + #endif + return true; + } + break; + case AG_SWAP: + #ifdef AUDIO_ENABLE + PLAY_SONG(agSwapSong); + #endif + return true; + break; + case AG_NORM: + #ifdef AUDIO_ENABLE + PLAY_SONG(agNormSong); + #endif + return true; + break; + case KC_MAC2: + if (record->event.pressed) { + SEND_STRING("ll\n"); + return false; + } + break; + case KC_MAC1: + if (record->event.pressed) { + SEND_STRING("open https://www.reddit.com/r/mechanicalkeyboards\n"); + return false; + } + break; + case KC_FIRST: + if (record->event.pressed) { + // don't turn off the QWERTY layer + if (_currentLayer != _QWERTY_MAC_ORTHO) { + layer_off(_currentLayer); + } + _currentLayer = _QWERTY_MAC_ORTHO; + layer_on(_currentLayer); + playSongForLayer(_currentLayer); + return false; + } + break; + case KC_LYRC: + if (record->event.pressed) { + dprintf("LYR CYCLE pressed %u, CURRENT_LAYER: %u\n", keycode, _currentLayer); + // don't turn off the QWERTY layer or the ADJUST layer + if (_currentLayer != _QWERTY_MAC_ORTHO) { + layer_off(_currentLayer); + } + // don't lock the ADJUST layer + // since this key is accessible via the ADJUST + // layer, as it will require tricky state management + if (++_currentLayer == _ADJUST_ORTHO) { + _currentLayer = _QWERTY_MAC_ORTHO; + } else { + layer_on(_currentLayer); + } + + playSongForLayer(_currentLayer); + return false; + } + break; + } + return true; +} + +void playSongForLayer(int currentLayer) { + #ifdef AUDIO_ENABLE + switch (currentLayer) { + case _QWERTY_LINUX: + PLAY_SONG(defaultLayerSong); + break; + case _MOVE_LINUX: + PLAY_SONG(moveLayerSong); + break; + case _QWERTY_MAC: + PLAY_SONG(macLayerSong); + break; + case _MOVE_MAC: + PLAY_SONG(moveLayerSong); + break; + case _RAISE: + PLAY_SONG(raiseLayerSong); + break; + case _LOWER: + PLAY_SONG(lowerLayerSong); + break; + default: + break; + } + #endif +} \ No newline at end of file diff --git a/users/badger/ortho.h b/users/badger/ortho.h new file mode 100644 index 0000000000..207f2e2822 --- /dev/null +++ b/users/badger/ortho.h @@ -0,0 +1,58 @@ +/* +Copyright 2020 Dan White + +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 . +*/ +#pragma once + +#include "badger.h" + +enum OrthoLayers { + _QWERTY_MAC_ORTHO, + _MOVE_MAC_ORTHO, + _QWERTY_LINUX_ORTHO, + _MOVE_LINUX_ORTHO, + _RAISE, + _LOWER, + _ADJUST_ORTHO +}; + +enum OrthoKeys { + KC_MAC1 = CS_DOWN + 1, + KC_MAC2, + KC_LYRC, + KC_FIRST +}; + +#define P_ADJ LT(_ADJUST_ORTHO, KC_BSPC) +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) +#define MOMAC LT(_MOVE_MAC_ORTHO, KC_ESC) +#define MOLNX LT(_MOVE_LINUX_ORTHO, KC_ESC) + +void playSongForLayer(int currentLayer); + +#ifdef AUDIO_ENABLE +#define QWERTY_LAYER_SONG H__NOTE(_G6), H__NOTE(_D6), Q__NOTE(_A5), Q__NOTE(_E5), +#define MAC_LAYER_SONG H__NOTE(_E5), H__NOTE(_A5), Q__NOTE(_D6), Q__NOTE(_G6), \ + ED_NOTE(_E7), E__NOTE(_CS7), E__NOTE(_E6), E__NOTE(_A6), M__NOTE(_CS7, 20), +#define LONG_AG_SWAP Q__NOTE(_G5), Q__NOTE(_D6), Q__NOTE(_A6), Q__NOTE(_E7), \ + SD_NOTE(_B5), SD_NOTE(_A5), SD_NOTE(_B5), SD_NOTE(_A5), +#define LONG_AG_NORM Q__NOTE(_DS4), Q__NOTE(_DS4), B__NOTE(_C5), +#define MOVE_LAYER_SONG E__NOTE(_GS6), E__NOTE(_A6), S__NOTE(_REST), ED_NOTE(_E7), \ + S__NOTE(_REST), ED_NOTE(_GS7), +#define RAISE_LAYER_SONG W__NOTE(_BF5), Q__NOTE(_A5), W__NOTE(_BF5), Q__NOTE(_A5), W__NOTE(_E6), Q__NOTE(_B5), +#define LOWER_LAYER_SONG Q__NOTE(_DS4), E__NOTE(_DS4), E__NOTE(_DS6), Q__NOTE(_DS5), \ + E__NOTE(_DS5), E__NOTE(_DS6), Q__NOTE(_E5), E__NOTE(_E5), E__NOTE(_DS6), Q__NOTE(_DS5), +#define CAPS_ON W__NOTE(_E5), Q__NOTE(_BF5), W__NOTE(_E5), Q__NOTE(_BF5), W__NOTE(_E5), Q__NOTE(_BF5), +#define CAPS_OFF W__NOTE(_E5), Q__NOTE(_BF5), +#endif diff --git a/users/badger/rules.mk b/users/badger/rules.mk new file mode 100644 index 0000000000..4f1507b8f3 --- /dev/null +++ b/users/badger/rules.mk @@ -0,0 +1,2 @@ +SRC += badger.c +SRC += ortho.c diff --git a/users/bcat/rules.mk b/users/bcat/rules.mk index a595d1f588..f87974ed96 100644 --- a/users/bcat/rules.mk +++ b/users/bcat/rules.mk @@ -14,7 +14,7 @@ EXTRAKEY_ENABLE = yes NKRO_ENABLE = yes # Enable link-time optimization to reduce binary size. -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes # Disable unused build options on all keyboards. COMMAND_ENABLE = no diff --git a/users/callum/callum.c b/users/callum/callum.c new file mode 100644 index 0000000000..4661902af5 --- /dev/null +++ b/users/callum/callum.c @@ -0,0 +1,130 @@ +#include QMK_KEYBOARD_H + +#include "oneshot.h" +#include "swapper.h" + +#define HOME G(KC_LEFT) +#define END G(KC_RGHT) +#define FWD G(KC_RBRC) +#define BACK G(KC_LBRC) +#define TABL G(S(KC_LBRC)) +#define TABR G(S(KC_RBRC)) +#define SPCL A(G(KC_LEFT)) +#define SPCR A(G(KC_RGHT)) +#define LA_SYM MO(SYM) +#define LA_NAV MO(NAV) + +enum layers { + DEF, + SYM, + NAV, + NUM, +}; + +enum keycodes { + // Custom oneshot mod implementation with no timers. + OS_SHFT = SAFE_RANGE, + OS_CTRL, + OS_ALT, + OS_CMD, + + SW_WIN, // Switch to next window (cmd-tab) + SW_LANG, // Switch to next input language (ctl-spc) +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEF] = LAYOUT_callum( + 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, + LA_NAV, KC_LSFT, KC_SPC, LA_SYM + ), + + [SYM] = LAYOUT_callum( + KC_ESC, KC_LBRC, KC_LCBR, KC_LPRN, KC_TILD, KC_CIRC, KC_RPRN, KC_RCBR, KC_RBRC, KC_GRV, + KC_MINS, KC_ASTR, KC_EQL, KC_UNDS, KC_DLR, KC_HASH, OS_CMD, OS_ALT, OS_CTRL, OS_SHFT, + KC_PLUS, KC_PIPE, KC_AT, KC_BSLS, KC_PERC, XXXXXXX, KC_AMPR, KC_SCLN, KC_COLN, KC_EXLM, + _______, _______, _______, _______ + ), + + [NAV] = LAYOUT_callum( + KC_TAB, SW_WIN, TABL, TABR, KC_VOLU, RESET, HOME, KC_UP, END, KC_DEL, + OS_SHFT, OS_CTRL, OS_ALT, OS_CMD, KC_VOLD, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, + SPCL, SPCR, BACK, FWD, KC_MPLY, XXXXXXX, KC_PGDN, KC_PGUP, SW_LANG, KC_ENT, + _______, _______, _______, _______ + ), + + [NUM] = LAYOUT_callum( + KC_7, KC_5, KC_3, KC_1, KC_9, KC_8, KC_0, KC_2, KC_4, KC_6, + OS_SHFT, OS_CTRL, OS_ALT, OS_CMD, KC_F11, KC_F10, OS_CMD, OS_ALT, OS_CTRL, OS_SHFT, + KC_F7, KC_F5, KC_F3, KC_F1, KC_F9, KC_F8, KC_F12, KC_F2, KC_F4, KC_F6, + _______, _______, _______, _______ + ), +}; + +bool is_oneshot_cancel_key(uint16_t keycode) { + switch (keycode) { + case LA_SYM: + case LA_NAV: + return true; + default: + return false; + } +} + +bool is_oneshot_ignored_key(uint16_t keycode) { + switch (keycode) { + case LA_SYM: + case LA_NAV: + case KC_LSFT: + case OS_SHFT: + case OS_CTRL: + case OS_ALT: + case OS_CMD: + return true; + default: + return false; + } +} + +bool sw_win_active = false; +bool sw_lang_active = false; + +oneshot_state os_shft_state = os_up_unqueued; +oneshot_state os_ctrl_state = os_up_unqueued; +oneshot_state os_alt_state = os_up_unqueued; +oneshot_state os_cmd_state = os_up_unqueued; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + update_swapper( + &sw_win_active, KC_LGUI, KC_TAB, SW_WIN, + keycode, record + ); + update_swapper( + &sw_lang_active, KC_LCTL, KC_SPC, SW_LANG, + keycode, record + ); + + update_oneshot( + &os_shft_state, KC_LSFT, OS_SHFT, + keycode, record + ); + update_oneshot( + &os_ctrl_state, KC_LCTL, OS_CTRL, + keycode, record + ); + update_oneshot( + &os_alt_state, KC_LALT, OS_ALT, + keycode, record + ); + update_oneshot( + &os_cmd_state, KC_LCMD, OS_CMD, + keycode, record + ); + + return true; +} + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, SYM, NAV, NUM); +} diff --git a/users/callum/oneshot.c b/users/callum/oneshot.c new file mode 100644 index 0000000000..33ec3895e2 --- /dev/null +++ b/users/callum/oneshot.c @@ -0,0 +1,57 @@ +#include "oneshot.h" + +void update_oneshot( + oneshot_state *state, + uint16_t mod, + uint16_t trigger, + uint16_t keycode, + keyrecord_t *record +) { + if (keycode == trigger) { + if (record->event.pressed) { + // Trigger keydown + if (*state == os_up_unqueued) { + register_code(mod); + } + *state = os_down_unused; + } else { + // Trigger keyup + switch (*state) { + case os_down_unused: + // If we didn't use the mod while trigger was held, queue it. + *state = os_up_queued; + break; + case os_down_used: + // If we did use the mod while trigger was held, unregister it. + *state = os_up_unqueued; + unregister_code(mod); + break; + default: + break; + } + } + } else { + if (record->event.pressed) { + if (is_oneshot_cancel_key(keycode) && *state != os_up_unqueued) { + // Cancel oneshot on designated cancel keydown. + *state = os_up_unqueued; + unregister_code(mod); + } + } else { + if (!is_oneshot_ignored_key(keycode)) { + // On non-ignored keyup, consider the oneshot used. + switch (*state) { + case os_down_unused: + *state = os_down_used; + break; + case os_up_queued: + *state = os_up_unqueued; + unregister_code(mod); + break; + default: + break; + } + } + } + } +} diff --git a/users/callum/oneshot.h b/users/callum/oneshot.h new file mode 100644 index 0000000000..a6b8e17742 --- /dev/null +++ b/users/callum/oneshot.h @@ -0,0 +1,31 @@ +#pragma once + +#include QMK_KEYBOARD_H + +// Represents the four states a oneshot key can be in +typedef enum { + os_up_unqueued, + os_up_queued, + os_down_unused, + os_down_used, +} oneshot_state; + +// Custom oneshot mod implementation that doesn't rely on timers. If a mod is +// used while it is held it will be unregistered on keyup as normal, otherwise +// it will be queued and only released after the next non-mod keyup. +void update_oneshot( + oneshot_state *state, + uint16_t mod, + uint16_t trigger, + uint16_t keycode, + keyrecord_t *record +); + +// To be implemented by the consumer. Defines keys to cancel oneshot mods. +bool is_oneshot_cancel_key(uint16_t keycode); + +// To be implemented by the consumer. Defines keys to ignore when determining +// whether a oneshot mod has been used. Setting this to modifiers and layer +// change keys allows stacking multiple oneshot modifiers, and carrying them +// between layers. +bool is_oneshot_ignored_key(uint16_t keycode); diff --git a/users/callum/readme.md b/users/callum/readme.md new file mode 100644 index 0000000000..24b71038b6 --- /dev/null +++ b/users/callum/readme.md @@ -0,0 +1,99 @@ +A keymap for 34 keys with 4 layers and no mod-tap. + +![](https://raw.githubusercontent.com/callum-oakley/keymap/master/keymap.svg) + +## Details + +- Hold `sym` to activate the symbols layer. +- Hold `nav` to activate the navigation layer. +- Hold `sym` and `nav` together to activate the numbers layer. +- The home row modifiers are oneshot so that it's possible to modify the + keys on the base layer, where there are no dedicated modifiers. +- `swap win` sends `cmd-tab` for changing focus in macOS but holds `cmd` + between consecutive presses. +- `swap lang` behaves similarly but sends `ctrl-space`, for changing input + language in macOS. + +## Oneshot modifiers + +The home row modifiers can either be held and used as normal, or if no other +keys are pressed while a modifier is down, the modifier will be queued and +applied to the next non-modifier keypress. For example to type `shift-cmd-t`, +type `sym-o-n` (or `nav-a-t`), release, then hit `t`. + +You can and should hit chords as fast as you like because there are no timers +involved. + +Cancel unused modifiers by tapping `nav` or `sym`. + +### Userspace oneshot implementation + +For my usage patterns I was hitting stuck modifiers frequently with [`OSM`][] +(maybe related to [#3963][]?). I'd like to try to help fix this in QMK proper, +but implementing oneshot mods in userspace first was: + +1. Fun. +2. A good exploration of how I think oneshot mods should work without timers. + +So in the meantime, this [userspace oneshot implementation][] is working well +for me. + +## Swapper + +`swap win` sends `cmd-tab`, but holds `cmd` between consecutive keypresses. +`cmd` is released when some other key is hit or released. For example + + nav down, swap win, swap win, nav up -> cmd down, tab, tab, cmd up + nav down, swap win, enter -> cmd down, tab, cmd up, enter + +`swap lang` sends `ctrl-space` to swap input languages in macOS and behaves +similarly. + +[Swapper implementation.][] + +## Why no mod-tap? + +[Mod-tap][] seems to be by far the most popular tool among users of tiny +keyboards to answer the question of where to put the modifiers, and in the +right hands it can clearly work brilliantly, but I've always found myself error +prone and inconsistent with it. + +With dedicated modifiers, there are three ways one might type `ctrl-c`: + + ctrl down, ctrl up, c down, c up + ctrl down, c down, ctrl up, c up + ctrl down, c down, c up, ctrl up + +Basically, you never have to worry about the keyups, as long as the keydowns +occur in the correct order. Similarly, there are three ways one might type +`ac`: + + a down, a up, c down, c up + a down, c down, a up, c up + a down, c down, c up, a up + +Replace `a` with `ctrl` and this is exactly what we had before! So if we want +to put `a` and `ctrl` on the same key we have a problem, because without +considering timing these sequences become ambiguous. So let's consider timing. + +The solution to the ambiguity that QMK employs is to configure the +`TAPPING_TERM` and consider a key held rather than tapped if it is held for +long enough. My problem with this is that it forces you to slow down to use +modifiers. By its very nature the tapping term must be longer than the longest +you would ever hold a key while typing on the slowest laziest Sunday afternoon. +I'm not typing at 100% speed at all times, but when I am, having to think about +timing and consciously slow down for certain actions never fails to trip me up. + +So alas, mod-tap is not for me -- but if it works for you, more power to you. +:) + +* * * + +[My github][] + +[`OSM`]: /docs/one_shot_keys.md +[#3963]: https://github.com/qmk/qmk_firmware/issues/3963 +[userspace oneshot implementation]: oneshot.c +[swapper implementation.]: swapper.c +[Mod-tap]: https://github.com/qmk/qmk_firmware/blob/master/docs/mod_tap.md +[My github]: https://github.com/callum-oakley diff --git a/users/callum/rules.mk b/users/callum/rules.mk new file mode 100644 index 0000000000..2d98e02c55 --- /dev/null +++ b/users/callum/rules.mk @@ -0,0 +1,3 @@ +SRC += callum.c +SRC += oneshot.c +SRC += swapper.c diff --git a/users/callum/swapper.c b/users/callum/swapper.c new file mode 100644 index 0000000000..736b2fef0c --- /dev/null +++ b/users/callum/swapper.c @@ -0,0 +1,27 @@ +#include "swapper.h" + +void update_swapper( + bool *active, + uint16_t cmdish, + uint16_t tabish, + uint16_t trigger, + uint16_t keycode, + keyrecord_t *record +) { + if (keycode == trigger) { + if (record->event.pressed) { + if (!*active) { + *active = true; + register_code(cmdish); + } + register_code(tabish); + } else { + unregister_code(tabish); + // Don't unregister cmdish until some other key is hit or released. + } + } else if (*active) { + unregister_code(cmdish); + *active = false; + } +} + diff --git a/users/callum/swapper.h b/users/callum/swapper.h new file mode 100644 index 0000000000..ad47fd96ce --- /dev/null +++ b/users/callum/swapper.h @@ -0,0 +1,20 @@ +#pragma once + +#include QMK_KEYBOARD_H + +// Implements cmd-tab like behaviour on a single key. On first tap of trigger +// cmdish is held and tabish is tapped -- cmdish then remains held until some +// other key is hit or released. For example: +// +// trigger, trigger, a -> cmd down, tab, tab, cmd up, a +// nav down, trigger, nav up -> nav down, cmd down, tab, cmd up, nav up +// +// This behaviour is useful for more than just cmd-tab, hence: cmdish, tabish. +void update_swapper( + bool *active, + uint16_t cmdish, + uint16_t tabish, + uint16_t trigger, + uint16_t keycode, + keyrecord_t *record +); diff --git a/users/danielo515/combo.c b/users/danielo515/combo.c index 1c84143772..b33cb838bc 100644 --- a/users/danielo515/combo.c +++ b/users/danielo515/combo.c @@ -6,31 +6,39 @@ enum combos { UI_COM, IO_COM, QW_COM, - COM_SLS, + DOT_SLS, COM_DOT, M_COMM, N_M, OP_COM, + M_CM_DOT, }; -const uint16_t PROGMEM ui_combo[] = {KC_U, KC_I, COMBO_END}; -const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; -const uint16_t PROGMEM yu_combo[] = {KC_Y, KC_U, COMBO_END}; -const uint16_t PROGMEM io_combo[] = {KC_I, KC_O, COMBO_END}; -const uint16_t PROGMEM qw_combo[] = {KC_Q, KC_W, COMBO_END}; -const uint16_t PROGMEM com_sls[] = {KC_COMMA, KC_SLSH, COMBO_END}; -const uint16_t PROGMEM com_dot[] = {KC_COMMA, KC_DOT, COMBO_END}; -const uint16_t PROGMEM m_comm[] = {KC_M,KC_COMMA, COMBO_END}; -const uint16_t PROGMEM n_m[] = {KC_N, KC_M,COMBO_END}; +const uint16_t PROGMEM ui_combo[] = {KC_U, KC_I, COMBO_END}; +const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; +const uint16_t PROGMEM yu_combo[] = {KC_Y, KC_U, COMBO_END}; +const uint16_t PROGMEM io_combo[] = {KC_I, KC_O, COMBO_END}; +const uint16_t PROGMEM qw_combo[] = {KC_Q, KC_W, COMBO_END}; +const uint16_t PROGMEM dot_sls[] = {KC_DOT, KC_SLSH, COMBO_END}; +const uint16_t PROGMEM com_dot[] = {KC_COMMA, KC_DOT, COMBO_END}; +const uint16_t PROGMEM m_comm[] = {KC_M, KC_COMMA, COMBO_END}; +const uint16_t PROGMEM n_m[] = {KC_N, KC_M, COMBO_END}; +const uint16_t PROGMEM o_p_combo[] = {KC_O, KC_P, COMBO_END}; +const uint16_t PROGMEM m_cm_dot_combo[] = {KC_M, KC_COMMA, KC_DOT, COMBO_END}; combo_t key_combos[COMBO_COUNT] = { - [JK_ESC] = COMBO(jk_combo, KC_ESC), - [YU_COM] = COMBO(yu_combo, KC_CIRC), - [UI_COM] = COMBO(ui_combo, KC_DLR), - [IO_COM] = COMBO(io_combo, KC_TILD), + [JK_ESC] = COMBO(jk_combo, KC_ESC), + [YU_COM] = COMBO(yu_combo, KC_AMPR), + [UI_COM] = COMBO(ui_combo, KC_CIRC), + [IO_COM] = COMBO(io_combo, KC_TILD), + [DOT_SLS] = COMBO(dot_sls, KC_EXLM), + [COM_DOT] = COMBO(com_dot, KC_QUES), + [N_M] = COMBO(n_m, KC_DLR), + [OP_COM] = COMBO(o_p_combo, KC_HASH), + // m + , = { + [M_COMM] = COMBO(m_comm, KC_LCBR), + // m + , + . = } + // [M_CM_DOT] = COMBO(m_cm_dot_combo, KC_RCBR), + // Right hand side combos [QW_COM] = COMBO(qw_combo, KC_AT), - [COM_SLS] = COMBO(com_sls, KC_QUES), - [COM_DOT] = COMBO(com_dot, KC_QUES), - [M_COMM] = COMBO(m_comm, KC_ESC), - [N_M] = COMBO(n_m, KC_DLR), }; diff --git a/users/danielo515/config.h b/users/danielo515/config.h index fb2472645c..d7efcd5367 100644 --- a/users/danielo515/config.h +++ b/users/danielo515/config.h @@ -1,8 +1,8 @@ #pragma once #if defined(COMBO_ENABLE) - #define COMBO_COUNT 9 - #define COMBO_TERM 40 +# define COMBO_COUNT 11 +# define COMBO_TERM 25 #endif // !COMBO_ENABLE // Timeout settings for leader key #undef LEADER_TIMEOUT diff --git a/users/danielo515/process_records.c b/users/danielo515/process_records.c index b1a8b92552..22a46789ad 100644 --- a/users/danielo515/process_records.c +++ b/users/danielo515/process_records.c @@ -4,11 +4,11 @@ extern bool onMac; // ======== INCREMENTAL MACROS STUFF ============= #define MAX_INCREMENTAL_MACRO 20 #define TAP_ROTATION_TIMEOUT 400 -uint16_t latest_kc = 0; +uint16_t latest_kc = 0; uint16_t latest_rotation = 0; -int key_count = 0; +int key_count = 0; -const char incremental_macros[][MAX_INCREMENTAL_MACRO] = { "String1"SS_TAP(X_HOME)"X-", "String2"SS_TAP(X_HOME) }; +const char incremental_macros[][MAX_INCREMENTAL_MACRO] = {"String1" SS_TAP(X_HOME) "X-", "String2" SS_TAP(X_HOME)}; bool process_incremental_macro(uint16_t kc) { if (kc < INC_MACROS_START || kc > INC_MACROS_END) { @@ -44,124 +44,157 @@ void refresh_incremental_macros(uint16_t kc) { } // Send control or GUI depending if we are on windows or mac bool CMD(uint16_t kc) { - if(onMac){ tap_code16(LGUI(kc)); } else { tap_code16(LCTL(kc)); } + if (onMac) { + tap_code16(LGUI(kc)); + } else { + tap_code16(LCTL(kc)); + } return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool pressed = record->event.pressed; - if(pressed){ + if (pressed) { refresh_incremental_macros(keycode); - if(process_incremental_macro(keycode)){ + if (process_incremental_macro(keycode)) { return false; } switch (keycode) { case MAC_TGL: - onMac = !onMac; - onMac ? SEND_STRING("On mac") : SEND_STRING("Not on MAC"); - return false; + onMac = !onMac; + onMac ? SEND_STRING("On mac") : SEND_STRING("Not on MAC"); + return false; } } switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - layer_on(_QWERTY); - } - return false; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - } else { - layer_off(_LOWER); - } - return false; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - } else { - layer_off(_RAISE); - } - return false; - case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - // == Macros START === - case IARROW: if (record->event.pressed) SEND_STRING("<-"); return false; - case ARROW: if (record->event.pressed) SEND_STRING("->"); return false; - case F_ARROW: if (record->event.pressed) SEND_STRING("=>"); return false; - case GREP: if (record->event.pressed) SEND_STRING(" | grep "); return false; - case CLN_EQ: if (record->event.pressed) SEND_STRING(":="); return false; - // == Macros END === - // == Multi Os START === - case KC_HOME:// make the home behave the same on OSX - if (record->event.pressed && onMac) { - SEND_STRING(SS_LCTRL("a")); - return false; - } - case KC_END:// make the end behave the same on OSX - if (record->event.pressed && onMac) { - tap_code16(C(KC_E)); - return false; - } - case AC_A:// Accent á - if (record->event.pressed) SEND_STRING(SS_LALT("e") "a"); return false; - case AC_E:// Accent é - if (record->event.pressed) SEND_STRING(SS_LALT("e") "e"); return false; - case AC_I:// Accent í - if (record->event.pressed) SEND_STRING(SS_LALT("e") "i"); return false; - case AC_O:// Accent ó - if (record->event.pressed) SEND_STRING(SS_LALT("e") "o"); return false; - case CUT: if (record->event.pressed) return CMD(KC_X); - case COPY: - if (record->event.pressed) { - onMac ? SEND_STRING(SS_LGUI("c")) : SEND_STRING(SS_LCTRL("c")); - } - return false; - case PASTE: - if (record->event.pressed) { - onMac ? SEND_STRING(SS_LGUI("v")) : SEND_STRING(SS_LCTRL("v")); - } - return false; - case SAVE: - if (record->event.pressed) { - onMac ? SEND_STRING(SS_LGUI("s")) : SEND_STRING(SS_LCTRL("s")); - } - return false; - case UNDO: - if (record->event.pressed) { - onMac ? SEND_STRING(SS_LGUI("z")) : SEND_STRING(SS_LCTRL("z")); - } - return false; - case FIND: - if (record->event.pressed) { - onMac ? SEND_STRING(SS_LGUI("f")) : SEND_STRING(SS_LCTRL("f")); - } - return false; - case CHG_LAYOUT: - if (record->event.pressed) { - onMac ? SEND_STRING(SS_LCTRL(" ")) : SEND_STRING(SS_LCTRL("f")); - } - return false; - // == Multi Os END === -#ifdef RGBLIGHT_ENABLE - case RGB_SLD: - if (record->event.pressed) { rgblight_mode(1); } - return false; - break; - //First time alt + tab, and alt stays sticky. Next press we just send tab. Any other key releases the alt + case QWERTY: + if (record->event.pressed) { +#ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); #endif - } -// =============== ALT_TAB single key handling - return process_alt_tab(keycode, record); + layer_on(_QWERTY); + } + return false; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + } else { + layer_off(_RAISE); + } + return false; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + // == Macros START === + case IARROW: + if (record->event.pressed) SEND_STRING("<-"); + return false; + case ARROW: + if (record->event.pressed) SEND_STRING("->"); + return false; + case F_ARROW: + if (record->event.pressed) SEND_STRING("=>"); + return false; + case GREP: + if (record->event.pressed) SEND_STRING(" | grep "); + return false; + case CLN_EQ: + if (record->event.pressed) SEND_STRING(":="); + return false; + // == Macros END === + // == Multi Os START === + case KC_HOME: // make the home behave the same on OSX + if (record->event.pressed && onMac) { + SEND_STRING(SS_LCTRL("a")); + return false; + } + case KC_END: // make the end behave the same on OSX + if (record->event.pressed && onMac) { + tap_code16(C(KC_E)); + return false; + } + case AC_A: // Accent á + if (record->event.pressed) SEND_STRING(SS_LALT("e") "a"); + return false; + case AC_E: // Accent é + if (record->event.pressed) SEND_STRING(SS_LALT("e") "e"); + return false; + case AC_I: // Accent í + if (record->event.pressed) SEND_STRING(SS_LALT("e") "i"); + return false; + case AC_O: // Accent ó + if (record->event.pressed) SEND_STRING(SS_LALT("e") "o"); + return false; + case CUT: + if (record->event.pressed) return CMD(KC_X); + case COPY: + if (record->event.pressed) { + onMac ? SEND_STRING(SS_LGUI("c")) : SEND_STRING(SS_LCTRL("c")); + } + return false; + case PASTE: + if (record->event.pressed) { + onMac ? SEND_STRING(SS_LGUI("v")) : SEND_STRING(SS_LCTRL("v")); + } + return false; + case SAVE: + if (record->event.pressed) { + onMac ? SEND_STRING(SS_LGUI("s")) : SEND_STRING(SS_LCTRL("s")); + } + return false; + case UNDO: + if (record->event.pressed) { + onMac ? SEND_STRING(SS_LGUI("z")) : SEND_STRING(SS_LCTRL("z")); + } + return false; + case REDO: + if (record->event.pressed) { + onMac ? SEND_STRING(SS_LGUI(SS_LSFT("z"))) : SEND_STRING(SS_LCTRL("y")); + } + return false; + case FIND: + if (record->event.pressed) { + onMac ? SEND_STRING(SS_LGUI("f")) : SEND_STRING(SS_LCTRL("f")); + } + return false; + case WIN_TO_RIGHT: + if (record->event.pressed) { + onMac ? tap_code16(SGUI(A(KC_RIGHT))) : tap_code16(G(KC_RIGHT)); + } + return false; + case WIN_TO_LEFT: + if (record->event.pressed) { + onMac ? tap_code16(SGUI(A(KC_LEFT))) : tap_code16(G(KC_LEFT)); + } + return false; + case CHG_LAYOUT: + if (record->event.pressed) { + onMac ? SEND_STRING(SS_LCTRL(" ")) : SEND_STRING(SS_LCTRL("f")); + } + return false; + // == Multi Os END === +#ifdef RGBLIGHT_ENABLE + case RGB_SLD: + if (record->event.pressed) { + rgblight_mode(1); + } + return false; + break; + // First time alt + tab, and alt stays sticky. Next press we just send tab. Any other key releases the alt +#endif + } + // =============== ALT_TAB single key handling + return process_alt_tab(keycode, record); }; - - - diff --git a/users/danielo515/process_records.h b/users/danielo515/process_records.h index c994511a5f..0efd690d40 100644 --- a/users/danielo515/process_records.h +++ b/users/danielo515/process_records.h @@ -1,35 +1,36 @@ #pragma once #include "quantum.h" -enum custom_keycodes -{ - EPRM = SAFE_RANGE, - RGB_SLD, +enum custom_keycodes { + RGB_SLD = SAFE_RANGE, ALT_TAB, QWERTY, SYM, NAV, ADJUST, -// Macros + // Macros ARROW, IARROW, CLN_EQ, F_ARROW, GREP, -// Accented characters + // Accented characters AC_A, AC_E, AC_I, AC_O, -// Custom multi-os key-codes + // Custom multi-os key-codes CUT, COPY, PASTE, SAVE, UNDO, + REDO, CHG_LAYOUT, FIND, -// OTHER OLD STUFF + WIN_TO_LEFT, + WIN_TO_RIGHT, + // OTHER OLD STUFF LOWER, RAISE, MAC_TGL, @@ -57,48 +58,49 @@ enum layers { }; //===== Function letters -# define FN_F LT(_F,KC_F) -# define FN_D LT(_D,KC_D) -# define FN_S LT(_S,KC_S) -# define FN_A LT(_A,KC_A) -# define FN_K LT(_K,KC_K) -# define FN_J LT(_J,KC_J) -# define KC_FN_D FN_D -# define KC_FN_S FN_S -# define KC_FN_F FN_F +#define FN_F LT(_F, KC_F) +#define FN_D LT(_D, KC_D) +#define FN_S LT(_S, KC_S) +#define FN_A LT(_A, KC_A) +#define FN_K LT(_K, KC_K) +#define FN_J LT(_J, KC_J) +#define KC_FN_D FN_D +#define KC_FN_S FN_S +#define KC_FN_F FN_F -# define KC_MACROS OSL(_MACROS) +#define KC_MACROS OSL(_MACROS) - -# define KC_E_COLN LSFT(KC_DOT) -# define KC_E_EQL ES_EQL -# define KC_GUI OSM(MOD_RGUI) -# define KC_R_NUB S(KC_NUBS) -# define KC_E_LT KC_NUBS -# define KC_E_GT S(KC_NUBS) -# define KC_E_TILD ES_TILD -# define KC_E_MINS ES_MINS -# define KC_E_OVRR ES_OVRR -# define KC_E_APOS ES_APOS -# define KC_E_IEXL ES_IEXL +#define KC_E_COLN LSFT(KC_DOT) +#define KC_E_EQL ES_EQL +#define KC_GUI OSM(MOD_RGUI) +#define KC_R_NUB S(KC_NUBS) +#define KC_E_LT KC_NUBS +#define KC_E_GT S(KC_NUBS) +#define KC_E_TILD ES_TILD +#define KC_E_MINS ES_MINS +#define KC_E_OVRR ES_OVRR +#define KC_E_APOS ES_APOS +#define KC_E_IEXL ES_IEXL //========== Short hand for complex key combinations -# define WIN_LEFT_HALF LALT(LGUI(KC_LEFT)) -# define WIN_RIGHT_HALF LALT(LGUI(KC_RIGHT)) -# define WIN_TO_LEFT LALT(LSFT( LGUI(KC_LEFT) )) -# define WIN_TO_RIGHT LALT(LSFT( LGUI(KC_RIGHT) )) -# define ALL_WIN LCTL(KC_DOWN) -# define EXPOSE LGUI(KC_DOWN) +#define WIN_LEFT_HALF LALT(LGUI(KC_LEFT)) +#define WIN_RIGHT_HALF LALT(LGUI(KC_RIGHT)) +#define ALL_WIN LCTL(KC_DOWN) +#define EXPOSE LGUI(KC_DOWN) // ========== Modifiers!! -# define SHIFT OSM(MOD_LSFT) +#define SHIFT OSM(MOD_LSFT) //=============== tap for key hold for mod -# define HYPR_H HYPR_T(KC_H) -# define CTL_K RCTL_T(KC_K) -# define ALT_J ALT_T(KC_J) -# define SFT_MINS LSFT_T(KC_MINS) // tap - hold shift -# define CMD_QUOT GUI_T(KC_QUOTE) // tap ' hold cmd +#define HYPR_H HYPR_T(KC_H) +#define CTL_K RCTL_T(KC_K) +#define ALT_J ALT_T(KC_J) +#define SFT_MINS LSFT_T(KC_MINS) // tap - hold shift +#define CMD_MINS GUI_T(KC_MINS) // tap - hold cmd +#define CMD_QUOT GUI_T(KC_QUOTE) // tap ' hold cmd +#define SFT_QUOT LSFT_T(KC_QUOTE) // tap ' hold shift //=============== Movement modified -# define CTL_LEFT LCTL(KC_LEFT) -# define CTL_RIGHT LCTL(KC_RIGHT) +#define CTL_LEFT LCTL(KC_LEFT) +#define CTL_RIGHT LCTL(KC_RIGHT) -# define SFT_LEFT LSFT(KC_LEFT) -# define SFT_RIGHT LSFT(KC_RIGHT) +#define SFT_LEFT LSFT(KC_LEFT) +#define SFT_RIGHT LSFT(KC_RIGHT) +#define SFT_LEFT_END LGUI(LSFT(KC_LEFT)) +#define SFT_RIGHT_END LGUI(LSFT(KC_RIGHT)) diff --git a/users/dshields/rules.mk b/users/dshields/rules.mk index abfbe5e40e..462649289b 100644 --- a/users/dshields/rules.mk +++ b/users/dshields/rules.mk @@ -10,7 +10,7 @@ SPACE_CADET_ENABLE = no LEADER_ENABLE = no DYNAMIC_MACRO_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes ifeq ($(strip $(KEYBOARD)), planck/rev3) AUDIO_ENABLE = no @@ -29,4 +29,3 @@ ifeq ($(strip $(KEYBOARD)), planck/light) BACKLIGHT_ENABLE = no RGB_MATRIX_ENABLE = yes endif - diff --git a/users/issmirnov/issmirnov.c b/users/issmirnov/issmirnov.c index 665afbcfd7..45ef7b19a7 100644 --- a/users/issmirnov/issmirnov.c +++ b/users/issmirnov/issmirnov.c @@ -26,7 +26,7 @@ combo_t key_combos[COMBO_COUNT] = { }; -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { switch(combo_index) { case XC_COPY: if (pressed) { diff --git a/users/issmirnov/rules.mk b/users/issmirnov/rules.mk index 096d7b4c0d..93ec21b01b 100644 --- a/users/issmirnov/rules.mk +++ b/users/issmirnov/rules.mk @@ -4,7 +4,7 @@ SRC += issmirnov.c # https://www.reddit.com/r/olkb/comments/bmpgjm/programming_help/ # Should shave 2000 bytes -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes # Enable debugging only when needed. CONSOLE_ENABLE = yes # +400 bytes (hid_listen support) diff --git a/users/kuchosauronad0/combo.c b/users/kuchosauronad0/combo.c index b4e8e84ae5..0a58e02770 100644 --- a/users/kuchosauronad0/combo.c +++ b/users/kuchosauronad0/combo.c @@ -1,6 +1,6 @@ #include "combo.h" -void process_combo_event(uint8_t combo_index, bool pressed){ +void process_combo_event(uint16_t combo_index, bool pressed){ switch(combo_index) { case ZV_COPY: if (pressed) { diff --git a/users/kuchosauronad0/rules.mk b/users/kuchosauronad0/rules.mk index b844d12c92..dfab85703c 100644 --- a/users/kuchosauronad0/rules.mk +++ b/users/kuchosauronad0/rules.mk @@ -1,7 +1,7 @@ SRC += kuchosauronad0.c \ process_records.c -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes SPACE_CADET_ENABLE = no ifneq ($(strip $(RGBLIGHT_ENABLE)),yes ) @@ -24,7 +24,7 @@ ifeq ($(strip $(LEADER_ENABLE)), yes) SRC += leader.c endif -ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") +ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") SRC += secrets.c endif ifeq ($(strip $(NO_SECRETS)), yes) diff --git a/users/nchristus/nchristus.c b/users/nchristus/nchristus.c new file mode 100644 index 0000000000..555cd74cef --- /dev/null +++ b/users/nchristus/nchristus.c @@ -0,0 +1,18 @@ +/* +Copyright 2020 Nick Christus @nchristus + +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 "nchristus.h" diff --git a/users/nchristus/nchristus.h b/users/nchristus/nchristus.h new file mode 100644 index 0000000000..751b5c8f52 --- /dev/null +++ b/users/nchristus/nchristus.h @@ -0,0 +1,87 @@ +/* +Copyright 2020 Nick Christus @nchristus + +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 . +*/ + +#pragma once + +#include QMK_KEYBOARD_H + +// Define layer names +enum userspace_layers { + _QWRTY = 0, + _LOWER, + _RAISE, + _ARROW, + _FNCTN, + _ADJST +}; + +// CTRL / ESC +#define CTL_ESC CTL_T(KC_ESC) + +// Force quit dialog +#define C_O_ESC LALT(LGUI(KC_ESC)) + +// Mac lock +#define MAC_LOK LCTL(LGUI(KC_Q)) + +// 1Password +#define OPW_OPN LALT(LGUI(KC_BSLS)) +#define OPW_CPY S(LGUI(KC_C)) + +// Screenshotting +#define SCR_FLL S(LGUI(KC_3)) +#define SCR_CRP S(LGUI(KC_4)) + +// FSNotes +#define FSNOTES LALT(LGUI(LSFT(LCTL(KC_0)))) + +#if (!defined(LAYOUT) && defined(KEYMAP)) + #define LAYOUT KEYMAP +#endif + +#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) +#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) + +#define ___________________BLANK___________________ _______, _______, _______, _______, _______ + +#define __________________QWERTYL1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T +#define __________________QWERTYR1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P + +#define __________________QWERTYL2_________________ KC_A, KC_S, KC_D, KC_F, KC_G +#define __________________QWERTYR2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN + +#define __________________QWERTYL3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B +#define __________________QWERTYR3_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH + +#define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define _________________FUNC_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 + +#define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 +#define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0 + +#define _________________LOWER_L1__________________ ________________NUMBER_LEFT________________ +#define _________________LOWER_L2__________________ KC_MINS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS + +#define _________________LOWER_R1__________________ ________________NUMBER_RIGHT_______________ +#define _________________LOWER_R2__________________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______ + +#define _________________RAISE_L1__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC +#define _________________RAISE_L2__________________ ___________________BLANK___________________ + +#define _________________RAISE_R1__________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN +#define _________________RAISE_R2__________________ KC_UNDS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE diff --git a/users/nchristus/rules.mk b/users/nchristus/rules.mk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/users/ninjonas/combos.c b/users/ninjonas/combos.c index 9453ba84dc..8d1cd6510f 100644 --- a/users/ninjonas/combos.c +++ b/users/ninjonas/combos.c @@ -23,7 +23,7 @@ combo_t key_combos[COMBO_COUNT] = { [XV_PASTE] = COMBO_ACTION(paste_combo), }; -void process_combo_event(uint8_t combo_index, bool pressed) { +void process_combo_event(uint16_t combo_index, bool pressed) { switch(combo_index) { case EQ_QUIT: if (pressed) { diff --git a/users/pvinis/rules.mk b/users/pvinis/rules.mk index f6f09e54d9..6c7b47399a 100644 --- a/users/pvinis/rules.mk +++ b/users/pvinis/rules.mk @@ -14,6 +14,6 @@ SRC += pvinis.c # add userspace file ## Some extra stuff to make firmware smaller. -# LINK_TIME_OPTIMIZATION_ENABLE = yes +# LTO_ENABLE = yes # CONSOLE_ENABLE = no # COMMAND_ENABLE = no diff --git a/users/riblee/readme.md b/users/riblee/readme.md new file mode 100644 index 0000000000..54f5cc8bb0 --- /dev/null +++ b/users/riblee/readme.md @@ -0,0 +1,14 @@ +Copyright 2020 Janos Daniel Reibl @riblee + +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 . diff --git a/users/riblee/riblee.c b/users/riblee/riblee.c new file mode 100644 index 0000000000..e1fe607ef2 --- /dev/null +++ b/users/riblee/riblee.c @@ -0,0 +1,166 @@ +/* Copyright 2020 Janos Daniel Reibl @riblee + * + * 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 "riblee.h" + +const uint8_t shift = MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT); + +// Tap Dance functions +void dance_key_a (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + SEND_STRING("a"); + reset_tap_dance(state); + } else if (state->count == 2) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("á"); + } else { + send_unicode_string("Á"); + } + + reset_tap_dance(state); + } +} + +void dance_key_e (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + SEND_STRING("e"); + reset_tap_dance(state); + } else if (state->count == 2) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("é"); + } else { + send_unicode_string("É"); + } + + reset_tap_dance(state); + } +} + +void dance_key_i (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + SEND_STRING("i"); + reset_tap_dance(state); + } else if (state->count == 2) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("í"); + } else { + send_unicode_string("Í"); + } + + reset_tap_dance(state); + } +} + +void dance_key_o (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + SEND_STRING("o"); + reset_tap_dance(state); + } else if (state->count == 2) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("ó"); + } else { + send_unicode_string("Ó"); + } + + reset_tap_dance(state); + } else if (state->count == 3) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("ö"); + } else { + send_unicode_string("Ö"); + } + + reset_tap_dance(state); + } else if (state->count == 4) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("ő"); + } else { + send_unicode_string("Ő"); + } + + reset_tap_dance(state); + } +} + +void dance_key_u (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + SEND_STRING("u"); + reset_tap_dance(state); + } else if (state->count == 2) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("ú"); + } else { + send_unicode_string("Ú"); + } + + reset_tap_dance(state); + } else if (state->count == 3) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("ü"); + } else { + send_unicode_string("Ü"); + } + + reset_tap_dance(state); + } else if (state->count == 4) { + if (!(keyboard_report->mods & shift)) { + send_unicode_string("ű"); + } else { + send_unicode_string("Ű"); + } + + reset_tap_dance(state); + } +} + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case 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 BACKLIT: + if (record->event.pressed) { + register_code(keycode_config(KC_LGUI)); +#ifdef BACKLIGHT_ENABLE + backlight_step(); +#endif + } else { + unregister_code(keycode_config(KC_LGUI)); + } + return false; + break; + } + return true; +}; diff --git a/users/riblee/riblee.h b/users/riblee/riblee.h new file mode 100644 index 0000000000..bdaa9f3211 --- /dev/null +++ b/users/riblee/riblee.h @@ -0,0 +1,56 @@ +/* Copyright 2020 Janos Daniel Reibl @riblee + * + * 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 . + */ + +#pragma once + +#include QMK_KEYBOARD_H + +enum preonic_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + BACKLIT +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +// Tap Dance declarations +enum { + TD_A, + TD_E, + TD_I, + TD_O, + TD_U, +}; + +void dance_key_a (qk_tap_dance_state_t *, void *); +void dance_key_e (qk_tap_dance_state_t *, void *); +void dance_key_i (qk_tap_dance_state_t *, void *); +void dance_key_o (qk_tap_dance_state_t *, void *); +void dance_key_u (qk_tap_dance_state_t *, void *); + +layer_state_t layer_state_set_user(layer_state_t); +bool process_record_user(uint16_t keycode, keyrecord_t *record); \ No newline at end of file diff --git a/users/riblee/rules.mk b/users/riblee/rules.mk new file mode 100644 index 0000000000..31c0645d78 --- /dev/null +++ b/users/riblee/rules.mk @@ -0,0 +1 @@ +SRC += riblee.c \ No newline at end of file diff --git a/users/spotpuff/rules.mk b/users/spotpuff/rules.mk new file mode 100644 index 0000000000..2790548373 --- /dev/null +++ b/users/spotpuff/rules.mk @@ -0,0 +1 @@ +BOOTMAGIC_ENABLE = no diff --git a/users/stanrc85/rgblight_layers.c b/users/stanrc85/rgblight_layers.c index 780555e7b5..1fbd541498 100644 --- a/users/stanrc85/rgblight_layers.c +++ b/users/stanrc85/rgblight_layers.c @@ -3,44 +3,7 @@ static uint8_t middle = 0; static uint8_t bottom = 0; -const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {3, 2, HSV_RED}, - {10, 2, HSV_RED} -); - -const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {3, 1, HSV_GREEN}, - {11, 1, HSV_GREEN} -); - -const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {3, 1, HSV_BLUE}, - {11, 1, HSV_BLUE} -); - -const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {3, 1, HSV_WHITE}, - {11, 1, HSV_WHITE} -); - -// Now define the array of layers. Later layers take precedence -const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( - my_capslock_layer, - my_layer1_layer, - my_layer2_layer, - my_layer3_layer -); - -void keyboard_post_init_user(void) { - // Enable the LED layers - rgblight_layers = my_rgb_layers; -} - layer_state_t layer_state_set_user(layer_state_t state) { - // Both layers will light up if both kb layers are active - rgblight_set_layer_state(1, layer_state_cmp(state, 1)); - rgblight_set_layer_state(2, layer_state_cmp(state, 2)); - rgblight_set_layer_state(3, layer_state_cmp(state, 3)); middle = bottom = 0; switch (get_highest_layer(state)) { case _FN1_60: @@ -60,7 +23,6 @@ layer_state_t layer_state_set_user(layer_state_t state) { } bool led_update_user(led_t led_state) { - //rgblight_set_layer_state(0, led_state.caps_lock); writePin(INDICATOR_PIN_0, !led_state.caps_lock); writePin(INDICATOR_PIN_1, !middle); writePin(INDICATOR_PIN_2, !bottom); diff --git a/users/stanrc85/rules.mk b/users/stanrc85/rules.mk index 5c572c0af3..54f0f76260 100644 --- a/users/stanrc85/rules.mk +++ b/users/stanrc85/rules.mk @@ -10,24 +10,10 @@ NKRO_ENABLE = no SRC += stanrc85.c -ifeq ($(strip $(KEYBOARD)), 1upkeyboards/1up60hse) - SRC += layer_rgb.c - VIA_ENABLE = yes - LTO_ENABLE = yes -endif -ifeq ($(strip $(KEYBOARD)), dz60) - SRC += layer_rgb.c - VIA_ENABLE = yes - LTO_ENABLE = yes -endif -ifeq ($(strip $(KEYBOARD)), projectkb/alice/rev1) - SRC += rgblight_layers.c - VIA_ENABLE = yes - LTO_ENABLE = no - VELOCIKEY_ENABLE=yes -endif ifeq ($(strip $(KEYBOARD)), projectkb/alice/rev2) SRC += rgblight_layers.c + SRC += startup_fanfare.c + OPT_DEFS += -DHAS_INDICATORS VIA_ENABLE = yes LTO_ENABLE = no VELOCIKEY_ENABLE=yes diff --git a/users/stanrc85/stanrc85.c b/users/stanrc85/stanrc85.c index c1aaad1a1a..2dbd41974b 100644 --- a/users/stanrc85/stanrc85.c +++ b/users/stanrc85/stanrc85.c @@ -44,8 +44,42 @@ void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data) { } } +#if defined(HAS_INDICATORS) + static uint8_t led_user = 0; +#endif + +void lock_unlock (qk_tap_dance_state_t *state, void *user_data) { + td_state = cur_dance(state); + switch (td_state) { + case SINGLE_TAP: // Ctl + Alt + Del to unlock workstation + tap_code16(KC_CAD); + #if defined(HAS_INDICATORS) + led_user = 0; + writePin(INDICATOR_PIN_0, !led_user); + wait_ms(200); + writePin(INDICATOR_PIN_1, !led_user); + wait_ms(200); + writePin(INDICATOR_PIN_2, !led_user); + #endif + break; + case SINGLE_HOLD: + break; + case DOUBLE_TAP: //Lock workstation + tap_code16(KC_LOCK); + #if defined(HAS_INDICATORS) + led_user = 1; + writePin(INDICATOR_PIN_2, !led_user); + wait_ms(200); + writePin(INDICATOR_PIN_1, !led_user); + wait_ms(200); + writePin(INDICATOR_PIN_0, !led_user); + #endif + break; + } +} + qk_tap_dance_action_t tap_dance_actions[] = { - [TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK), + [TD_WIN] = ACTION_TAP_DANCE_FN(lock_unlock), [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV), [TD_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctl_copy_finished, ctl_copy_reset) }; diff --git a/users/stanrc85/startup_fanfare.c b/users/stanrc85/startup_fanfare.c new file mode 100644 index 0000000000..507d9e389c --- /dev/null +++ b/users/stanrc85/startup_fanfare.c @@ -0,0 +1,43 @@ +#include "stanrc85.h" + +static uint8_t top = 0; +static uint8_t middle = 0; +static uint8_t bottom = 0; + +static bool is_enabled = true; +static bool is_rgblight_startup = true; +static uint16_t rgblight_startup_loop_timer; + +void matrix_scan_user(void) { + // Boot up "fanfare" + if (is_rgblight_startup && is_keyboard_master()) { + if (timer_elapsed(rgblight_startup_loop_timer) > 10) { + static uint8_t counter; + counter++; + if (counter == 1) { + top = 1; + writePin(INDICATOR_PIN_0, !top); + wait_ms(200); + top = 0; + writePin(INDICATOR_PIN_0, !top); + } + if (counter == 2) { + middle = 1; + writePin(INDICATOR_PIN_1, !middle); + wait_ms(200); + middle = 0; + writePin(INDICATOR_PIN_1, !middle); + } + if (counter == 3) { + bottom = 1; + writePin(INDICATOR_PIN_2, !bottom); + wait_ms(200); + bottom = 0; + writePin(INDICATOR_PIN_2, !bottom); + } + if (counter == 4) { + is_enabled = is_rgblight_startup = false; + } + } + } +} diff --git a/users/yanfali/rules.mk b/users/yanfali/rules.mk index 456d3bf320..a7208daa2c 100644 --- a/users/yanfali/rules.mk +++ b/users/yanfali/rules.mk @@ -2,7 +2,7 @@ BOOTMAGIC = lite DYNAMIC_KEYMAP_ENABLE = no CONSOLE_ENABLE = yes COMMAND_ENABLE = yes -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes AUDIO_ENABLE = no # only enable audio on specific boards diff --git a/users/yet-another-developer/combo.c b/users/yet-another-developer/combo.c index b4e8e84ae5..0a58e02770 100644 --- a/users/yet-another-developer/combo.c +++ b/users/yet-another-developer/combo.c @@ -1,6 +1,6 @@ #include "combo.h" -void process_combo_event(uint8_t combo_index, bool pressed){ +void process_combo_event(uint16_t combo_index, bool pressed){ switch(combo_index) { case ZV_COPY: if (pressed) { diff --git a/users/yet-another-developer/rules.mk b/users/yet-another-developer/rules.mk index 597df6d0b9..64cf1f2fce 100644 --- a/users/yet-another-developer/rules.mk +++ b/users/yet-another-developer/rules.mk @@ -1,7 +1,7 @@ SRC += yet-another-developer.c \ process_records.c -LINK_TIME_OPTIMIZATION_ENABLE = yes +LTO_ENABLE = yes SPACE_CADET_ENABLE = no ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) diff --git a/util/activate_msys2.sh b/util/activate_msys2.sh index b003c1a787..b37bee8597 100755 --- a/util/activate_msys2.sh +++ b/util/activate_msys2.sh @@ -3,8 +3,6 @@ function export_variables { local util_dir=~/qmk_utils export PATH=$PATH:$util_dir - export PATH=$PATH:$util_dir/avr8-gnu-toolchain/bin - export PATH=$PATH:$util_dir/gcc-arm-none-eabi/bin } export_variables diff --git a/util/chibios-upgrader.sh b/util/chibios-upgrader.sh index 2174da3cf1..ebc12abe7d 100755 --- a/util/chibios-upgrader.sh +++ b/util/chibios-upgrader.sh @@ -38,7 +38,11 @@ find_chibi_files() { local search_path="$1" shift local conditions=( "$@" ) - find -L "$search_path" -not -path '*/lib/chibios*' -and -not -path '*/lib/ugfx*' -and -not -path '*/util/*' -and \( "${conditions[@]}" \) | sort + for file in $(find -L "$search_path" -not -path '*/lib/chibios*' -and -not -path '*/lib/ugfx*' -and -not -path '*/util/*' -and \( "${conditions[@]}" \) | sort) ; do + if [ -z "$(grep 'include_next' "$file")" ] ; then + echo $file + fi + done } revert_chibi_files() { diff --git a/util/msys2_install.sh b/util/msys2_install.sh index 1351aa5d73..c223e52fae 100755 --- a/util/msys2_install.sh +++ b/util/msys2_install.sh @@ -2,76 +2,18 @@ dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) download_dir=~/qmk_utils -avrtools=avr8-gnu-toolchain -armtools=gcc-arm-none-eabi util_dir=$(dirname "$0") -echo "Installing dependencies needed for the installation (quazip)" -pacman --needed --noconfirm --disable-download-timeout -Sy base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang git mingw-w64-x86_64-python3-pip unzip +echo "Installing dependencies needed for the installation" +pacman --needed --noconfirm --disable-download-timeout -Sy \ + base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang git unzip \ + mingw-w64-x86_64-python-pip \ + mingw-w64-x86_64-avr-binutils mingw-w64-x86_64-avr-gcc mingw-w64-x86_64-avr-libc \ + mingw-w64-x86_64-arm-none-eabi-binutils mingw-w64-x86_64-arm-none-eabi-gcc mingw-w64-x86_64-arm-none-eabi-newlib \ + mingw-w64-x86_64-avrdude mingw-w64-x86_64-bootloadhid mingw-w64-x86_64-dfu-programmer mingw-w64-x86_64-dfu-util mingw-w64-x86_64-teensy-loader-cli source "$dir/win_shared_install.sh" -function install_avr { - rm -f -r "$avrtools" - wget "https://blog.zakkemble.net/download/avr-gcc-8.3.0-x86-mingw.zip" - echo "Extracting AVR toolchain..." - unzip -q -d . avr-gcc-8.3.0-x86-mingw.zip - mv avr-gcc-8.3.0-x86-mingw avr8-gnu-toolchain - rm avr8-gnu-toolchain/bin/make.exe - rm avr-gcc-8.3.0-x86-mingw.zip - - pacman --needed --noconfirm --disable-download-timeout -S mingw-w64-x86_64-avrdude mingw-w64-x86_64-bootloadhid mingw-w64-x86_64-dfu-programmer mingw-w64-x86_64-teensy-loader-cli -} - -function install_arm { - rm -f -r "$armtools" - wget -O gcc-arm-none-eabi-8-2019-q3-update-win32.zip "https://developer.arm.com/-/media/Files/downloads/gnu-rm/8-2019q3/RC1.1/gcc-arm-none-eabi-8-2019-q3-update-win32.zip" - echo "Extracting ARM toolchain..." - unzip -q -d gcc-arm-none-eabi gcc-arm-none-eabi-8-2019-q3-update-win32.zip - rm gcc-arm-none-eabi-8-2019-q3-update-win32.zip - - pacman --needed --noconfirm --disable-download-timeout -S mingw-w64-x86_64-dfu-util -} - -pushd "$download_dir" - -if [ ! -d "$avrtools" ]; then - echo - echo "The AVR toolchain is not installed." - echo "This is needed for building AVR based keyboards." - install_avr -else - while true; do - echo - echo "The AVR toolchain is already installed" - read -p "Do you want to reinstall? (Y/N) " res - case $res in - [Yy]* ) install_avr; break;; - [Nn]* ) break;; - * ) echo "Invalid answer";; - esac - done -fi - -if [ ! -d "$armtools" ]; then - echo - echo "The ARM toolchain is not installed." - echo "This is needed for building ARM based keyboards." - install_arm -else - while true; do - echo - echo "The ARM toolchain is already installed" - read -p "Do you want to reinstall? (Y/N) " res - case $res in - [Yy]* ) install_arm; break;; - [Nn]* ) break;; - * ) echo "Invalid answer";; - esac - done -fi -popd - pip3 install -r "${util_dir}/../requirements.txt" cp -f "$dir/activate_msys2.sh" "$download_dir/" diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 68f6d5c114..195a87208b 100755 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -13,7 +13,7 @@ if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; the # fix formatting git checkout master git diff --diff-filter=AM --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | xargs -0 dos2unix -git diff --diff-filter=AM --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} '*.c' '*.h' '*.cpp' | grep -z -e '^drivers' -e '^quantum' -e '^tests' -e '^tmk_core' | grep -zv -e 'quantum/template' -e 'tmk_core/protocol/usb_hid' | xargs -0 clang-format-7 -i +git diff --diff-filter=AM --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} '*.c' '*.h' '*.cpp' | grep -z -e '^drivers' -e '^quantum' -e '^tests' -e '^tmk_core' | grep -zv -e 'quantum/template' -e 'tmk_core/protocol/usb_hid' -e 'platforms/chibios' | xargs -0 clang-format-7 -i git diff --diff-filter=AM --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | xargs -0 git add git commit -m "format code according to conventions [skip ci]" && git push git@github.com:qmk/qmk_firmware.git master