diff --git a/common_features.mk b/common_features.mk index 7645025c20e..6e947fc2207 100644 --- a/common_features.mk +++ b/common_features.mk @@ -127,6 +127,12 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes) SRC += $(QUANTUM_DIR)/pointing_device.c endif +ifeq ($(strip $(PROGRAMMABLE_BUTTON_ENABLE)), yes) + OPT_DEFS += -DPROGRAMMABLE_BUTTON_ENABLE + SRC += $(QUANTUM_DIR)/programmable_button.c + SRC += $(QUANTUM_DIR)/process_keycode/process_programmable_button.c +endif + VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c spi EEPROM_DRIVER ?= vendor ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),) @@ -157,31 +163,45 @@ else # Automatically provided by avr-libc, nothing required else ifeq ($(PLATFORM),CHIBIOS) ifeq ($(MCU_SERIES), STM32F3xx) + OPT_DEFS += -DEEPROM_DRIVER + COMMON_VPATH += $(DRIVER_PATH)/eeprom + SRC += eeprom_driver.c SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c OPT_DEFS += -DEEPROM_EMU_STM32F303xC - OPT_DEFS += -DSTM32_EEPROM_ENABLE else ifeq ($(MCU_SERIES), STM32F1xx) + OPT_DEFS += -DEEPROM_DRIVER + COMMON_VPATH += $(DRIVER_PATH)/eeprom + SRC += eeprom_driver.c SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c OPT_DEFS += -DEEPROM_EMU_STM32F103xB - OPT_DEFS += -DSTM32_EEPROM_ENABLE else ifeq ($(MCU_SERIES)_$(MCU_LDSCRIPT), STM32F0xx_STM32F072xB) + OPT_DEFS += -DEEPROM_DRIVER + COMMON_VPATH += $(DRIVER_PATH)/eeprom + SRC += eeprom_driver.c SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c OPT_DEFS += -DEEPROM_EMU_STM32F072xB - OPT_DEFS += -DSTM32_EEPROM_ENABLE + else ifneq ($(filter $(MCU_SERIES)_$(MCU_LDSCRIPT),STM32F4xx_STM32F401xC STM32F4xx_STM32F411xE),) + OPT_DEFS += -DEEPROM_DRIVER + COMMON_VPATH += $(DRIVER_PATH)/eeprom + SRC += eeprom_driver.c + SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c + SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c + OPT_DEFS += -DEEPROM_EMU_STM32F401xC else ifeq ($(MCU_SERIES)_$(MCU_LDSCRIPT), STM32F0xx_STM32F042x6) - # Stack sizes: Since this chip has limited RAM capacity, the stack area needs to be reduced. # This ensures that the EEPROM page buffer fits into RAM USE_PROCESS_STACKSIZE = 0x600 USE_EXCEPTIONS_STACKSIZE = 0x300 + OPT_DEFS += -DEEPROM_DRIVER + COMMON_VPATH += $(DRIVER_PATH)/eeprom + SRC += eeprom_driver.c SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c OPT_DEFS += -DEEPROM_EMU_STM32F042x6 - OPT_DEFS += -DSTM32_EEPROM_ENABLE else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),) OPT_DEFS += -DEEPROM_DRIVER COMMON_VPATH += $(DRIVER_PATH)/eeprom diff --git a/docs/_summary.md b/docs/_summary.md index 2f6309e41d1..4b528d99676 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -72,6 +72,7 @@ * [Mod-Tap](mod_tap.md) * [Macros](feature_macros.md) * [Mouse Keys](feature_mouse_keys.md) + * [Programmable Button](feature_programmable_button.md) * [Space Cadet Shift](feature_space_cadet.md) * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) diff --git a/docs/audio_driver.md b/docs/audio_driver.md index 7cd5a98d9f4..81c33900740 100644 --- a/docs/audio_driver.md +++ b/docs/audio_driver.md @@ -57,14 +57,14 @@ This driver needs one Timer per enabled/used DAC channel, to trigger conversion; Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timers 6, 7 and 8: -``` c +```c //halconf.h: #define HAL_USE_DAC TRUE #define HAL_USE_GPT TRUE #include_next ``` -``` c +```c // mcuconf.h: #include_next #undef STM32_DAC_USE_DAC1_CH1 @@ -93,14 +93,14 @@ only needs one timer (GPTD6, Tim6) to trigger the DAC unit to do a conversion; t Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timer 6: -``` c +```c //halconf.h: #define HAL_USE_DAC TRUE #define HAL_USE_GPT TRUE #include_next ``` -``` c +```c // mcuconf.h: #include_next #undef STM32_DAC_USE_DAC1_CH1 @@ -153,7 +153,7 @@ This driver uses the ChibiOS-PWM system to produce a square-wave on specific out The hardware directly toggles the pin via its alternate function. See your MCU's data-sheet for which pin can be driven by what timer - looking for TIMx_CHy and the corresponding alternate function. A configuration example for the STM32F103C8 would be: -``` c +```c //halconf.h: #define HAL_USE_PWM TRUE #define HAL_USE_PAL TRUE @@ -161,7 +161,7 @@ A configuration example for the STM32F103C8 would be: #include_next ``` -``` c +```c // mcuconf.h: #include_next #undef STM32_PWM_USE_TIM1 @@ -177,7 +177,7 @@ If we now target pin A8, looking through the data-sheet of the STM32F103C8, for - TIM1_CH4 = PA11 with all this information, the configuration would contain these lines: -``` c +```c //config.h: #define AUDIO_PIN A8 #define AUDIO_PWM_DRIVER PWMD1 diff --git a/docs/cli_development.md b/docs/cli_development.md index 0f4f401b33b..62be3b3d8c4 100644 --- a/docs/cli_development.md +++ b/docs/cli_development.md @@ -14,7 +14,7 @@ If you intend to maintain keyboards and/or contribute to QMK, you can enable the This will allow you to see all available subcommands. **Note:** You will have to install additional requirements: -```bash +``` python3 -m pip install -r requirements-dev.txt ``` diff --git a/docs/configurator_default_keymaps.md b/docs/configurator_default_keymaps.md index 30f9fa72f32..c52342cf16e 100644 --- a/docs/configurator_default_keymaps.md +++ b/docs/configurator_default_keymaps.md @@ -20,7 +20,7 @@ Keymaps in this directory require four key-value pairs: Additionally, most keymaps contain a `commit` key. This key is not consumed by the API that back-stops QMK Configurator, but is used by Configurator's maintainers to tell which version of a keymap was used to create the JSON keymap in this repository. The value is the SHA of the last commit to modify a board's default `keymap.c` in the `qmk_firmware` repository. The SHA is found by checking out [the `master` branch of the `qmk/qmk_firmware` repository](https://github.com/qmk/qmk_firmware/tree/master/) and running `git log -1 --pretty=oneline -- keyboards//keymaps/default/keymap.c` (use `keymap.json` if the keyboard in question has this file instead), which should return something similar to: -```shell +``` f14629ed1cd7c7ec9089604d64f29a99981558e8 Remove/migrate action_get_macro()s from default keymaps (#5625) ``` @@ -31,7 +31,7 @@ In this example, `f14629ed1cd7c7ec9089604d64f29a99981558e8` is the value that sh If one wished to add a default keymap for the H87a by Hineybush, one would run the `git log` command above against the H87a's default keymap in `qmk_firmware`: -```shell +``` user ~/qmk_firmware (master) $ git log -1 --pretty=oneline master -- keyboards/hineybush/h87a/keymaps/default/keymap.c ef8878fba5d3786e3f9c66436da63a560cd36ac9 Hineybush h87a lock indicators (#8237) diff --git a/docs/custom_matrix.md b/docs/custom_matrix.md index cfa900a33d3..8f6878f94a6 100644 --- a/docs/custom_matrix.md +++ b/docs/custom_matrix.md @@ -15,7 +15,7 @@ The reasons to use this feature include: Implementing custom matrix usually involves compilation of an additional source file. It is recommended that for consistency, this file is called `matrix.c`. Add a new file to your keyboard directory: -```text +``` keyboards//matrix.c ``` diff --git a/docs/faq_debug.md b/docs/faq_debug.md index 1afa38a6243..28b8c817594 100644 --- a/docs/faq_debug.md +++ b/docs/faq_debug.md @@ -62,7 +62,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { ``` Example output -```text +``` Waiting for device:....... Listening: KL: kc: 169, col: 0, row: 0, pressed: 1 @@ -82,7 +82,7 @@ When testing performance issues, it can be useful to know the frequency at which ``` Example output -```text +``` > matrix scan frequency: 315 > matrix scan frequency: 313 > matrix scan frequency: 316 diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index d47ecc68242..79782cf5649 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md @@ -8,7 +8,7 @@ The MCU can only supply so much current to its GPIO pins. Instead of powering th Most keyboards have backlighting enabled by default if they support it, but if it is not working for you, check that your `rules.mk` includes the following: -```makefile +```make BACKLIGHT_ENABLE = yes ``` @@ -54,7 +54,7 @@ If backlight breathing is enabled (see below), the following functions are also To select which driver to use, configure your `rules.mk` with the following: -```makefile +```make BACKLIGHT_DRIVER = software ``` @@ -87,7 +87,7 @@ This functionality is configured at the keyboard level with the `BACKLIGHT_ON_ST The `pwm` driver is configured by default, however the equivalent setting within `rules.mk` would be: -```makefile +```make BACKLIGHT_DRIVER = pwm ``` @@ -143,7 +143,7 @@ The breathing effect is the same as in the hardware PWM implementation. While still in its early stages, ARM backlight support aims to eventually have feature parity with AVR. The `pwm` driver is configured by default, however the equivalent setting within `rules.mk` would be: -```makefile +```make BACKLIGHT_DRIVER = pwm ``` @@ -167,7 +167,7 @@ Currently only hardware PWM is supported, not timer assisted, and does not provi 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`: -```makefile +```make BACKLIGHT_DRIVER = software ``` @@ -188,7 +188,7 @@ To activate multiple backlight pins, add something like this to your `config.h`, If none of the above drivers apply to your board (for example, you are using a separate IC to control the backlight), you can implement a custom backlight driver using this simple API provided by QMK. To enable, add this to your `rules.mk`: -```makefile +```make BACKLIGHT_DRIVER = custom ``` diff --git a/docs/feature_bluetooth.md b/docs/feature_bluetooth.md index 7860ad54787..1b6a825e7a1 100644 --- a/docs/feature_bluetooth.md +++ b/docs/feature_bluetooth.md @@ -30,7 +30,7 @@ The currently supported Bluetooth chipsets do not support [N-Key Rollover (NKRO) Add the following to your `rules.mk`: -```makefile +```make BLUETOOTH_ENABLE = yes BLUETOOTH_DRIVER = AdafruitBLE # or RN42 ``` diff --git a/docs/feature_digitizer.md b/docs/feature_digitizer.md index 9b6aeddbaa9..ac2d64f9777 100644 --- a/docs/feature_digitizer.md +++ b/docs/feature_digitizer.md @@ -4,7 +4,7 @@ The digitizer HID interface allows setting the mouse cursor position at absolute To enable the digitizer interface, add the following line to your rules.mk: -```makefile +```make DIGITIZER_ENABLE = yes ``` diff --git a/docs/feature_joystick.md b/docs/feature_joystick.md index 95702d6a239..fe33517a161 100644 --- a/docs/feature_joystick.md +++ b/docs/feature_joystick.md @@ -15,7 +15,7 @@ or send gamepad reports based on values computed by the keyboard. To use analog input you must first enable it in `rules.mk`: -```makefile +```make JOYSTICK_ENABLE = yes JOYSTICK_DRIVER = analog # or 'digital' ``` diff --git a/docs/feature_layouts.md b/docs/feature_layouts.md index b34fd442d5c..93d040b5542 100644 --- a/docs/feature_layouts.md +++ b/docs/feature_layouts.md @@ -25,7 +25,7 @@ The `layouts/default/` and `layouts/community/` are two examples of layout "repo Each layout folder is named (`[a-z0-9_]`) after the physical aspects of the layout, in the most generic way possible, and contains a `readme.md` with the layout to be defined by the keyboard: -```md +```markdown # 60_ansi LAYOUT_60_ansi diff --git a/docs/feature_led_indicators.md b/docs/feature_led_indicators.md index a415b4b4dfc..59a9f7accc9 100644 --- a/docs/feature_led_indicators.md +++ b/docs/feature_led_indicators.md @@ -1,6 +1,6 @@ # LED Indicators -?> Currently, this feature is not supported for split keyboards +?> This feature requires additional configuration to work on both halves of a split keyboard see [Data sync options](feature_split_keyboard.md#data-sync-options) QMK provides methods to read 5 of the LEDs defined in the HID spec: diff --git a/docs/feature_midi.md b/docs/feature_midi.md index ab29d89db6d..3da5c4940a3 100644 --- a/docs/feature_midi.md +++ b/docs/feature_midi.md @@ -4,7 +4,7 @@ First, enable MIDI by adding the following to your `rules.mk`: -```makefile +```make MIDI_ENABLE = yes ``` diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index 49a3f0b3e36..908bd801c44 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md @@ -18,7 +18,7 @@ Hardware configurations using Arm-based microcontrollers or different sizes of O ## Usage -To enable the OLED feature, there are three steps. First, when compiling your keyboard, you'll need to add the following to your `rules.mk`: +To enable the OLED feature, there are two steps. First, when compiling your keyboard, you'll need to add the following to your `rules.mk`: ```make OLED_ENABLE = yes diff --git a/docs/feature_pointing_device.md b/docs/feature_pointing_device.md index 905c2a8f95a..badeadc12be 100644 --- a/docs/feature_pointing_device.md +++ b/docs/feature_pointing_device.md @@ -4,7 +4,7 @@ Pointing Device is a generic name for a feature intended to be generic: moving t To enable Pointing Device, uncomment the following line in your rules.mk: -```makefile +```make POINTING_DEVICE_ENABLE = yes ``` diff --git a/docs/feature_programmable_button.md b/docs/feature_programmable_button.md new file mode 100644 index 00000000000..b1ef555d16a --- /dev/null +++ b/docs/feature_programmable_button.md @@ -0,0 +1,74 @@ +## Programmable Button + +Programmable button is a feature that can be used to send keys that have no +predefined meaning. +This means they can be processed on the host side by custom software without +colliding without the operating system trying to interpret these keys. + +The keycodes are emitted according to the HID usage +"Telephony Device Page" (0x0B), "Programmable button usage" (0x07). +On Linux (> 5.14) they are handled automatically and translated to `KEY_MACRO#` +keycodes. +(Up to `KEY_MACRO30`) + +### Enabling Programmable Button support + +To enable Programmable Button, add the following line to your keymap’s `rules.mk`: + +```c +PROGRAMMABLE_BUTTON_ENABLE = yes +``` + +### Mapping + +In your keymap you can use the following keycodes to map key presses to Programmable Buttons: + +|Key |Description | +|------------------------|----------------------| +|`PROGRAMMABLE_BUTTON_1` |Programmable button 1 | +|`PROGRAMMABLE_BUTTON_2` |Programmable button 2 | +|`PROGRAMMABLE_BUTTON_3` |Programmable button 3 | +|`PROGRAMMABLE_BUTTON_4` |Programmable button 4 | +|`PROGRAMMABLE_BUTTON_5` |Programmable button 5 | +|`PROGRAMMABLE_BUTTON_6` |Programmable button 6 | +|`PROGRAMMABLE_BUTTON_7` |Programmable button 7 | +|`PROGRAMMABLE_BUTTON_8` |Programmable button 8 | +|`PROGRAMMABLE_BUTTON_9` |Programmable button 9 | +|`PROGRAMMABLE_BUTTON_10`|Programmable button 10| +|`PROGRAMMABLE_BUTTON_11`|Programmable button 11| +|`PROGRAMMABLE_BUTTON_12`|Programmable button 12| +|`PROGRAMMABLE_BUTTON_13`|Programmable button 13| +|`PROGRAMMABLE_BUTTON_14`|Programmable button 14| +|`PROGRAMMABLE_BUTTON_15`|Programmable button 15| +|`PROGRAMMABLE_BUTTON_16`|Programmable button 16| +|`PROGRAMMABLE_BUTTON_17`|Programmable button 17| +|`PROGRAMMABLE_BUTTON_18`|Programmable button 18| +|`PROGRAMMABLE_BUTTON_19`|Programmable button 19| +|`PROGRAMMABLE_BUTTON_20`|Programmable button 20| +|`PROGRAMMABLE_BUTTON_21`|Programmable button 21| +|`PROGRAMMABLE_BUTTON_22`|Programmable button 22| +|`PROGRAMMABLE_BUTTON_23`|Programmable button 23| +|`PROGRAMMABLE_BUTTON_24`|Programmable button 24| +|`PROGRAMMABLE_BUTTON_25`|Programmable button 25| +|`PROGRAMMABLE_BUTTON_26`|Programmable button 26| +|`PROGRAMMABLE_BUTTON_27`|Programmable button 27| +|`PROGRAMMABLE_BUTTON_28`|Programmable button 28| +|`PROGRAMMABLE_BUTTON_29`|Programmable button 29| +|`PROGRAMMABLE_BUTTON_30`|Programmable button 30| +|`PROGRAMMABLE_BUTTON_31`|Programmable button 31| +|`PROGRAMMABLE_BUTTON_32`|Programmable button 32| +|`PB_1` to `PB_32` |Aliases for keymaps | + +### API + +You can also use a dedicated API defined in `programmable_button.h` to interact with this feature: + +``` +void programmable_button_clear(void); +void programmable_button_send(void); +void programmable_button_on(uint8_t code); +void programmable_button_off(uint8_t code); +bool programmable_button_is_on(uint8_t code); +uint32_t programmable_button_get_report(void); +void programmable_button_set_report(uint32_t report); +``` diff --git a/docs/feature_ps2_mouse.md b/docs/feature_ps2_mouse.md index 776a33150ec..433a47fa9b8 100644 --- a/docs/feature_ps2_mouse.md +++ b/docs/feature_ps2_mouse.md @@ -30,7 +30,7 @@ Note: This is not recommended, you may encounter jerky movement or unsent inputs In rules.mk: -```makefile +```make PS2_MOUSE_ENABLE = yes PS2_USE_BUSYWAIT = yes ``` @@ -56,7 +56,7 @@ The following example uses D2 for clock and D5 for data. You can use any INT or In rules.mk: -```makefile +```make PS2_MOUSE_ENABLE = yes PS2_USE_INT = yes ``` @@ -118,7 +118,7 @@ To use USART on the ATMega32u4, you have to use PD5 for clock and PD2 for data. In rules.mk: -```makefile +```make PS2_MOUSE_ENABLE = yes PS2_USE_USART = yes ``` diff --git a/docs/feature_rawhid.md b/docs/feature_rawhid.md index 4a688fcba72..558a23a80fb 100644 --- a/docs/feature_rawhid.md +++ b/docs/feature_rawhid.md @@ -15,7 +15,7 @@ RAW_ENABLE = yes In your `keymap.c` include `"raw_hid.h"` and implement the following: -```C +```c void raw_hid_receive(uint8_t *data, uint8_t length) { // Your code goes here. data is the packet received from host. } @@ -23,7 +23,7 @@ void raw_hid_receive(uint8_t *data, uint8_t length) { The `"raw_hid.h"` header also declares `void raw_hid_send(uint8_t *data, uint8_t length);` which allows sending packets from keyboard to host. As an example, it can also be used for debugging when building your host application by returning all data back to the host. -```C +```c void raw_hid_receive(uint8_t *data, uint8_t length) { raw_hid_send(data, length); } diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 8d6bb934e5b..f3189bf844e 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -10,7 +10,7 @@ If you want to use single color LED's you should use the [LED Matrix Subsystem]( There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`: -```makefile +```make RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = IS31FL3731 ``` @@ -71,7 +71,7 @@ Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet] There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`: -```makefile +```make RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = IS31FL3733 ``` @@ -141,7 +141,7 @@ Where `X_Y` is the location of the LED in the matrix defined by [the datasheet]( There is basic support for addressable RGB matrix lighting with the I2C IS31FL3737 RGB controller. To enable it, add this to your `rules.mk`: -```makefile +```make RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = IS31FL3737 ``` @@ -206,7 +206,7 @@ Where `X_Y` is the location of the LED in the matrix defined by [the datasheet]( There is basic support for addressable RGB matrix lighting with a WS2811/WS2812{a,b,c} addressable LED strand. To enable it, add this to your `rules.mk`: -```makefile +```make RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 ``` @@ -226,7 +226,7 @@ Configure the hardware via your `config.h`: There is basic support for APA102 based addressable LED strands. To enable it, add this to your `rules.mk`: -```makefile +```make RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = APA102 ``` @@ -246,7 +246,7 @@ Configure the hardware via your `config.h`: ### AW20216 :id=aw20216 There is basic support for addressable RGB matrix lighting with the SPI AW20216 RGB controller. To enable it, add this to your `rules.mk`: -```makefile +```make RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = AW20216 ``` diff --git a/docs/feature_split_keyboard.md b/docs/feature_split_keyboard.md index 27df46a82ac..c8ba18beeb7 100644 --- a/docs/feature_split_keyboard.md +++ b/docs/feature_split_keyboard.md @@ -219,47 +219,52 @@ One communication attempt will be allowed everytime this amount of time has pass Set to 0 to disable this throttling of communications while disconnected. This can save you a couple of bytes of firmware size. + +### Data Sync Options + +The following sync options add overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled. These can be enabled by adding the chosen option(s) to your `config.h` file. + ```c #define SPLIT_TRANSPORT_MIRROR ``` -This mirrors the master side matrix to the slave side for features that react or require knowledge of master side key presses on the slave side. The purpose of this feature is to support cosmetic use of key events (e.g. RGB reacting to keypresses). This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled. +This mirrors the master side matrix to the slave side for features that react or require knowledge of master side key presses on the slave side. The purpose of this feature is to support cosmetic use of key events (e.g. RGB reacting to keypresses). ```c #define SPLIT_LAYER_STATE_ENABLE ``` -This enables syncing of the layer state between both halves of the split keyboard. The main purpose of this feature is to enable support for use of things like OLED display of the currently active layer. This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled. +This enables syncing of the layer state between both halves of the split keyboard. The main purpose of this feature is to enable support for use of things like OLED display of the currently active layer. ```c #define SPLIT_LED_STATE_ENABLE ``` -This enables syncing of the Host LED status (caps lock, num lock, etc) between both halves of the split keyboard. The main purpose of this feature is to enable support for use of things like OLED display of the Host LED status. This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled. +This enables syncing of the Host LED status (caps lock, num lock, etc) between both halves of the split keyboard. The main purpose of this feature is to enable support for use of things like OLED display of the Host LED status. ```c #define SPLIT_MODS_ENABLE ``` -This enables transmitting modifier state (normal, weak and oneshot) to the non primary side of the split keyboard. The purpose of this feature is to support cosmetic use of modifer state (e.g. displaying status on an OLED screen). This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled. +This enables transmitting modifier state (normal, weak and oneshot) to the non primary side of the split keyboard. The purpose of this feature is to support cosmetic use of modifer state (e.g. displaying status on an OLED screen). ```c #define SPLIT_WPM_ENABLE ``` -This enables transmitting the current WPM to the slave side of the split keyboard. The purpose of this feature is to support cosmetic use of WPM (e.g. displaying the current value on an OLED screen). This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled. +This enables transmitting the current WPM to the slave side of the split keyboard. The purpose of this feature is to support cosmetic use of WPM (e.g. displaying the current value on an OLED screen). ```c #define SPLIT_OLED_ENABLE ``` -This enables transmitting the current OLED on/off status to the slave side of the split keyboard. The purpose of this feature is to support state (on/off state only) syncing. This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled. +This enables transmitting the current OLED on/off status to the slave side of the split keyboard. The purpose of this feature is to support state (on/off state only) syncing. ```c #define SPLIT_ST7565_ENABLE ``` -This enables transmitting the current ST7565 on/off status to the slave side of the split keyboard. The purpose of this feature is to support state (on/off state only) syncing. This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled. +This enables transmitting the current ST7565 on/off status to the slave side of the split keyboard. The purpose of this feature is to support state (on/off state only) syncing. ### Custom data sync between sides :id=custom-data-sync diff --git a/docs/feature_stenography.md b/docs/feature_stenography.md index af4754ed783..92a5c3f8480 100644 --- a/docs/feature_stenography.md +++ b/docs/feature_stenography.md @@ -32,7 +32,7 @@ GeminiPR encodes 42 keys into a 6-byte packet. While TX Bolt contains everything Firstly, enable steno in your keymap's Makefile. You may also need disable mousekeys, extra keys, or another USB endpoint to prevent conflicts. The builtin USB stack for some processors only supports a certain number of USB endpoints and the virtual serial port needed for steno fills 3 of them. -```makefile +```make STENO_ENABLE = yes MOUSEKEY_ENABLE = no ``` diff --git a/docs/feature_swap_hands.md b/docs/feature_swap_hands.md index cbc574b6b86..b0239bb802c 100644 --- a/docs/feature_swap_hands.md +++ b/docs/feature_swap_hands.md @@ -6,7 +6,7 @@ The swap-hands action allows support for one-handed typing without requiring a s The configuration table is a simple 2-dimensional array to map from column/row to new column/row. Example `hand_swap_config` for Planck: -```C +```c const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md index 8b001e3ce21..115ab717530 100644 --- a/docs/feature_userspace.md +++ b/docs/feature_userspace.md @@ -240,7 +240,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { For boards that may not have a shift button (such as on a macro pad), we need a way to always include the bootloader option. To do that, add the following to the `rules.mk` in your userspace folder: -```make +```make ifeq ($(strip $(FLASH_BOOTLOADER)), yes) OPT_DEFS += -DFLASH_BOOTLOADER endif diff --git a/docs/flashing_bootloadhid.md b/docs/flashing_bootloadhid.md index 9879ec999ee..213c7c1321a 100644 --- a/docs/flashing_bootloadhid.md +++ b/docs/flashing_bootloadhid.md @@ -44,7 +44,7 @@ For native Windows flashing, the `bootloadHID.exe` can be used outside of the MS ### Linux Manual Installation 1. Install libusb development dependency: - ```bash + ``` # This depends on OS - for Debian the following works sudo apt-get install libusb-dev ``` diff --git a/docs/getting_started_docker.md b/docs/getting_started_docker.md index f9c3b366a4f..c4da8af968d 100644 --- a/docs/getting_started_docker.md +++ b/docs/getting_started_docker.md @@ -12,13 +12,13 @@ The main prerequisite is a working `docker` or `podman` install. Acquire a local copy of the QMK's repository (including submodules): -```bash +``` git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git cd qmk_firmware ``` Run the following command to build a keymap: -```bash +``` util/docker_build.sh : # For example: util/docker_build.sh planck/rev6:default ``` @@ -27,14 +27,14 @@ This will compile the desired keyboard/keymap and leave the resulting `.hex` or There is also support for building _and_ flashing the keyboard straight from Docker by specifying the `target` as well: -```bash +``` util/docker_build.sh keyboard:keymap:target # For example: util/docker_build.sh planck/rev6:default:flash ``` You can also start the script without any parameters, in which case it will ask you to input the build parameters one by one, which you may find easier to use: -```bash +``` util/docker_build.sh # Reads parameters as input (leave blank for all keyboards/keymaps) ``` @@ -42,7 +42,7 @@ util/docker_build.sh You can manually set which container runtime you want to use by setting the `RUNTIME` environment variable to it's name or path. By default docker or podman are automatically detected and docker is preferred over podman. -```bash +``` RUNTIME="podman" util/docker_build.sh keyboard:keymap:target ``` diff --git a/docs/getting_started_vagrant.md b/docs/getting_started_vagrant.md index 114f8756714..b5b5ce1539d 100644 --- a/docs/getting_started_vagrant.md +++ b/docs/getting_started_vagrant.md @@ -31,26 +31,26 @@ The development environment is configured to run the QMK Docker image, `qmkfm/qm ### Why am I seeing issues under Virtualbox? Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12. **Alternately, you can try running the following command:** -```console +``` vagrant plugin install vagrant-vbguest ``` ### How do I remove an existing environment? Finished with your environment? From anywhere inside the folder where you checked out this project, Execute: -```console +``` vagrant destroy ``` ### What if I want to use Docker directly? Want to benefit from the Vagrant workflow without a virtual machine? The Vagrantfile is configured to bypass running a virtual machine, and run the container directly. Execute the following when bringing up the environment to force the use of Docker: -```console +``` vagrant up --provider=docker ``` ### How do I access the virtual machine instead of the Docker container? Execute the following to bypass the `vagrant` user booting directly to the official qmk builder image: -```console +``` vagrant ssh -c 'sudo -i' ``` diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index 17be7ee6aaa..f975f37f55b 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -156,12 +156,12 @@ Many of the settings written in the `rules.mk` file are interpreted by `common_f The `post_rules.mk` file can interpret `features` of a keyboard-level before `common_features.mk`. For example, when your designed keyboard has the option to implement backlighting or underglow using rgblight.c, writing the following in the `post_rules.mk` makes it easier for the user to configure the `rules.mk`. * `keyboards/top_folder/keymaps/a_keymap/rules.mk` - ```makefile + ```make # Please set the following according to the selection of the hardware implementation option. RGBLED_OPTION_TYPE = backlight ## none, backlight or underglow ``` * `keyboards/top_folder/post_rules.mk` - ```makefile + ```make ifeq ($(filter $(strip $(RGBLED_OPTION_TYPE))x, nonex backlightx underglowx x),) $(error unknown RGBLED_OPTION_TYPE value "$(RGBLED_OPTION_TYPE)") endif diff --git a/docs/how_keyboards_work.md b/docs/how_keyboards_work.md index 3dcbc645222..36cbfb4d9a6 100644 --- a/docs/how_keyboards_work.md +++ b/docs/how_keyboards_work.md @@ -9,7 +9,7 @@ firmware directly. Whenever you type on 1 particular key, here is the chain of actions taking place: -``` text +``` +------+ +-----+ +----------+ +----------+ +----+ | User |-------->| Key |------>| Firmware |----->| USB wire |---->| OS | +------+ +-----+ +----------+ +----------+ +----+ diff --git a/docs/keycodes.md b/docs/keycodes.md index a134c5a1b28..770a4525a50 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -677,6 +677,46 @@ See also: [One Shot Keys](one_shot_keys.md) |`OS_OFF` |Turns One Shot keys off | |`OS_TOGG` |Toggles One Shot keys status | +## Programmable Button Support :id=programmable-button + +See also: [Programmable Button](feature_programmable_button.md) + +|Key |Description | +|------------------------|----------------------| +|`PROGRAMMABLE_BUTTON_1` |Programmable button 1 | +|`PROGRAMMABLE_BUTTON_2` |Programmable button 2 | +|`PROGRAMMABLE_BUTTON_3` |Programmable button 3 | +|`PROGRAMMABLE_BUTTON_4` |Programmable button 4 | +|`PROGRAMMABLE_BUTTON_5` |Programmable button 5 | +|`PROGRAMMABLE_BUTTON_6` |Programmable button 6 | +|`PROGRAMMABLE_BUTTON_7` |Programmable button 7 | +|`PROGRAMMABLE_BUTTON_8` |Programmable button 8 | +|`PROGRAMMABLE_BUTTON_9` |Programmable button 9 | +|`PROGRAMMABLE_BUTTON_10`|Programmable button 10| +|`PROGRAMMABLE_BUTTON_11`|Programmable button 11| +|`PROGRAMMABLE_BUTTON_12`|Programmable button 12| +|`PROGRAMMABLE_BUTTON_13`|Programmable button 13| +|`PROGRAMMABLE_BUTTON_14`|Programmable button 14| +|`PROGRAMMABLE_BUTTON_15`|Programmable button 15| +|`PROGRAMMABLE_BUTTON_16`|Programmable button 16| +|`PROGRAMMABLE_BUTTON_17`|Programmable button 17| +|`PROGRAMMABLE_BUTTON_18`|Programmable button 18| +|`PROGRAMMABLE_BUTTON_19`|Programmable button 19| +|`PROGRAMMABLE_BUTTON_20`|Programmable button 20| +|`PROGRAMMABLE_BUTTON_21`|Programmable button 21| +|`PROGRAMMABLE_BUTTON_22`|Programmable button 22| +|`PROGRAMMABLE_BUTTON_23`|Programmable button 23| +|`PROGRAMMABLE_BUTTON_24`|Programmable button 24| +|`PROGRAMMABLE_BUTTON_25`|Programmable button 25| +|`PROGRAMMABLE_BUTTON_26`|Programmable button 26| +|`PROGRAMMABLE_BUTTON_27`|Programmable button 27| +|`PROGRAMMABLE_BUTTON_28`|Programmable button 28| +|`PROGRAMMABLE_BUTTON_29`|Programmable button 29| +|`PROGRAMMABLE_BUTTON_30`|Programmable button 30| +|`PROGRAMMABLE_BUTTON_31`|Programmable button 31| +|`PROGRAMMABLE_BUTTON_32`|Programmable button 32| +|`PB_1` to `PB_32` |Aliases for keymaps | + ## Space Cadet :id=space-cadet See also: [Space Cadet](feature_space_cadet.md) diff --git a/docs/newbs_git_resynchronize_a_branch.md b/docs/newbs_git_resynchronize_a_branch.md index 3e7acdba7ad..1d0e4dda163 100644 --- a/docs/newbs_git_resynchronize_a_branch.md +++ b/docs/newbs_git_resynchronize_a_branch.md @@ -8,7 +8,7 @@ Suppose you have committed to your `master` branch, and now need to update your No one wants to lose work if it can be helped. If you want to save the changes you've already made to your `master` branch, the simplest way to do so is to simply create a duplicate of your "dirty" `master` branch: -```sh +``` git branch old_master master ``` @@ -18,7 +18,7 @@ Now you have a branch named `old_master` that is a duplicate of your `master` br Now it's time to resynchronize your `master` branch. For this step, you'll want to have QMK's repository configured as a remote in Git. To check your configured remotes, run `git remote -v`, which should return something similar to: -```sh +``` QMKuser ~/qmk_firmware (master) $ git remote -v origin https://github.com//qmk_firmware.git (fetch) @@ -29,7 +29,7 @@ upstream https://github.com/qmk/qmk_firmware.git (push) If you only see one fork referenced: -```sh +``` QMKuser ~/qmk_firmware (master) $ git remote -v origin https://github.com/qmk/qmk_firmware.git (fetch) @@ -38,31 +38,31 @@ origin https://github.com/qmk/qmk_firmware.git (push) add a new remote with: -```sh +``` git remote add upstream https://github.com/qmk/qmk_firmware.git ``` Then, redirect the `origin` remote to your own fork with: -```sh +``` git remote set-url origin https://github.com//qmk_firmware.git ``` Now that you have both remotes configured, you need to update the references for the upstream repository, which is QMK's, by running: -```sh +``` git fetch upstream ``` At this point, resynchronize your branch to QMK's by running: -```sh +``` git reset --hard upstream/master ``` These steps will update the repository on your computer, but your GitHub fork will still be out of sync. To resynchronize your fork on GitHub, you need to push to your fork, instructing Git to override any remote changes that are not reflected in your local repository. To do this, run: -```sh +``` git push --force-with-lease ``` diff --git a/docs/unit_testing.md b/docs/unit_testing.md index a0eef51cb63..7310da8d0bc 100644 --- a/docs/unit_testing.md +++ b/docs/unit_testing.md @@ -44,7 +44,7 @@ If there are problems with the tests, you can find the executable in the `./buil To forward any [debug messages](unit_testing.md#debug-api) to `stderr`, the tests can run with `DEBUG=1`. For example -```console +``` make test:all DEBUG=1 ``` diff --git a/drivers/led/apa102.c b/drivers/led/apa102.c index 7396dc3c551..19e0bfc1890 100644 --- a/drivers/led/apa102.c +++ b/drivers/led/apa102.c @@ -25,7 +25,7 @@ # include "hal.h" # if defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F3XX) || defined(STM32F4XX) || defined(STM32L0XX) -# define APA102_NOPS (100 / (1000000000L / (STM32_SYSCLK / 4))) // This calculates how many loops of 4 nops to run to delay 100 ns +# define APA102_NOPS (100 / (1000000000L / (CPU_CLOCK / 4))) // This calculates how many loops of 4 nops to run to delay 100 ns # else # error("APA102_NOPS configuration required") # define APA102_NOPS 0 // this just pleases the compile so the above error is easier to spot diff --git a/drivers/led/issi/is31fl3741.c b/drivers/led/issi/is31fl3741.c index 1b533c9b6a6..24a273514ed 100644 --- a/drivers/led/issi/is31fl3741.c +++ b/drivers/led/issi/is31fl3741.c @@ -73,7 +73,7 @@ uint8_t g_twi_transfer_buffer[20] = {0xFF}; // buffers and the transfers in IS31FL3741_write_pwm_buffer() but it's // probably not worth the extra complexity. uint8_t g_pwm_buffer[DRIVER_COUNT][ISSI_MAX_LEDS]; -bool g_pwm_buffer_update_required = false; +bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false}; bool g_scaling_registers_update_required[DRIVER_COUNT] = {false}; uint8_t g_scaling_registers[DRIVER_COUNT][ISSI_MAX_LEDS]; @@ -169,10 +169,10 @@ 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]; - 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; + 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[led.driver] = true; } } @@ -206,12 +206,12 @@ void IS31FL3741_set_led_control_register(uint8_t index, bool red, bool green, bo g_scaling_registers_update_required[led.driver] = true; } -void IS31FL3741_update_pwm_buffers(uint8_t addr1, uint8_t addr2) { - if (g_pwm_buffer_update_required) { - IS31FL3741_write_pwm_buffer(addr1, g_pwm_buffer[0]); +void IS31FL3741_update_pwm_buffers(uint8_t addr, uint8_t index) { + if (g_pwm_buffer_update_required[index]) { + IS31FL3741_write_pwm_buffer(addr, g_pwm_buffer[index]); } - g_pwm_buffer_update_required = false; + g_pwm_buffer_update_required[index] = false; } void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue) { @@ -219,7 +219,7 @@ void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, g_pwm_buffer[pled->driver][pled->g] = green; g_pwm_buffer[pled->driver][pled->b] = blue; - g_pwm_buffer_update_required = true; + g_pwm_buffer_update_required[pled->driver] = true; } void IS31FL3741_update_led_control_registers(uint8_t addr, uint8_t index) { diff --git a/drivers/led/issi/is31fl3741.h b/drivers/led/issi/is31fl3741.h index cea6761ca88..163a0352338 100644 --- a/drivers/led/issi/is31fl3741.h +++ b/drivers/led/issi/is31fl3741.h @@ -45,8 +45,8 @@ void IS31FL3741_set_led_control_register(uint8_t index, bool red, bool green, bo // (eg. from a timer interrupt). // Call this while idle (in between matrix scans). // If the buffer is dirty, it will update the driver with the buffer. -void IS31FL3741_update_pwm_buffers(uint8_t addr1, uint8_t addr2); -void IS31FL3741_update_led_control_registers(uint8_t addr1, uint8_t addr2); +void IS31FL3741_update_pwm_buffers(uint8_t addr, uint8_t index); +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); void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue); diff --git a/keyboards/aya/aya.c b/keyboards/aya/aya.c new file mode 100644 index 00000000000..95bc5794d8b --- /dev/null +++ b/keyboards/aya/aya.c @@ -0,0 +1,17 @@ +/* Copyright 2021 Dan Nixon + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "aya.h" diff --git a/keyboards/aya/aya.h b/keyboards/aya/aya.h new file mode 100644 index 00000000000..36ba18220c4 --- /dev/null +++ b/keyboards/aya/aya.h @@ -0,0 +1,39 @@ +/* Copyright 2021 Dan Nixon + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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( \ + L06, L05, L04, L03, L02, L01, L00, R00, R01, R02, R03, R04, R05, R06, \ + L16, L15, L14, L13, L12, L11, L10, R10, R11, R12, R13, R14, R15, R16, \ + L26, L25, L24, L23, L22, L21, L20, L40, R40, R20, R21, R22, R23, R24, R25, R26, \ + L36, L35, L34, L33, L32, L31, L30, L43, L44, R44, R43, R30, R31, R32, R33, R34, R35, R36, \ + L42, L41, L45, L46, R46, R45, R41, R42 \ + ) \ +{ \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R00, R01, R02, R03, R04, R05, R06 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25, R26 }, \ + { R30, R31, R32, R33, R34, R35, R36 }, \ + { R40, R41, R42, R43, R44, R45, R46 } \ +} diff --git a/keyboards/aya/config.h b/keyboards/aya/config.h new file mode 100644 index 00000000000..1ad9716d45d --- /dev/null +++ b/keyboards/aya/config.h @@ -0,0 +1,37 @@ +/* Copyright 2021 Dan Nixon + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 0xBEEF +#define PRODUCT_ID 0x0003 +#define DEVICE_VER 0x0001 +#define MANUFACTURER DanNixon +#define PRODUCT Aya + +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } +#define DIODE_DIRECTION ROW2COL + +#define DEBOUNCE 5 + +#define SPLIT_HAND_PIN B5 +#define USE_I2C diff --git a/keyboards/aya/info.json b/keyboards/aya/info.json new file mode 100644 index 00000000000..8db200eb6a2 --- /dev/null +++ b/keyboards/aya/info.json @@ -0,0 +1,10 @@ +{ + "keyboard_name": "Aya", + "url": "https://github.com/DanNixon/aya", + "maintainer": "dannixon", + "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":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "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":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "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":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}, {"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":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":16, "y":3}, {"x":17, "y":3}, {"x":18, "y":3}, {"x":5, "y":4}, {"x":6, "y":4}, {"x":7, "y":4}, {"x":8, "y":4}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}] + } + } +} diff --git a/keyboards/aya/keymaps/default/config.h b/keyboards/aya/keymaps/default/config.h new file mode 100644 index 00000000000..5ef534d04f8 --- /dev/null +++ b/keyboards/aya/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2021 Dan Nixon + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/aya/keymaps/default/keymap.c b/keyboards/aya/keymaps/default/keymap.c new file mode 100644 index 00000000000..255e13d7b76 --- /dev/null +++ b/keyboards/aya/keymaps/default/keymap.c @@ -0,0 +1,87 @@ +/* Copyright 2021 Dan Nixon + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 _LG_ESC LGUI_T(KC_ESC) +#define _RC_SPC RCTL_T(KC_SPC) +#define _RS_BSP RSFT_T(KC_BSPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ,-----------------------------------------. .-----------------------------------------. + * | | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | = | + * |-----+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+-----| + * | | RMB | Q | W | E | R | T | | Y | U | I | O | P | [ | ] | + * |-----+-----+-----+-----+-----+-----+-----+-----. .-----+-----+-----+-----+-----+-----+-----+-----| + * | | LMB | A | S | D | F | G | | | | H | J | K | L | ; | ' | # | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----. .-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | | \ | Z | X | C | V | B | Alt |M Lyr| | | Del | N | M | , | . | / | | | + * '-----------------------------+-----+-----+-----+-----| +-----+-----+-----+-----+-----------------------------' + * |Shift| Esc | Tab |F Lyr| | |Enter|Space|Bspce| (tap) + * |Shift| GUI | Tab |F Lyr| | |Enter| Ctrl|Shift| (hold) + * '-----------------------' '-----------------------' + */ + [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_MINS, KC_EQL, + _______, KC_BTN2, 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_BTN1, 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_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B, KC_LALT, MO(2) , _______, KC_DEL , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______, + KC_LSFT, _LG_ESC, KC_TAB , MO(1) , _______, KC_ENT, _RC_SPC, _RS_BSP + ), + + /* + * ,-----------------------------------------. .-----------------------------------------. + * | | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |-----+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+-----| + * | | | | | | | | | Home|Pg Dn|Pg Up| End | | | | + * |-----+-----+-----+-----+-----+-----+-----+-----. .-----+-----+-----+-----+-----+-----+-----+-----| + * | | | | | | | | | | | Left| Down| Up |Right| | | | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----. .-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | | | | | | | | | | | | | | | | | | | | + * '-----------------------------+-----+-----+-----+-----| +-----+-----+-----+-----+-----------------------------' + * | | | | | | | | | | + * '-----------------------' '-----------------------' + */ + [1] = LAYOUT( + _______, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , + _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* + * ,-----------------------------------------. .-----------------------------------------. + * | | | | | | | | | | | | | | | | + * |-----+-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----+-----| + * | | | | | | | | |W Lft|W Dwn|W Up |W Rgt| | | | + * |-----+-----+-----+-----+-----+-----+-----+-----. .-----+-----+-----+-----+-----+-----+-----+-----| + * | | | | | | | | | | |M Lft|M Dwn|M Up |M Rgt| | | | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----. .-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | | | | | | | | | | | | | | | | | | | | + * '-----------------------------+-----+-----+-----+-----| +-----+-----+-----+-----+-----------------------------' + * | | | | | | | | LMB | RMB | + * '-----------------------' '-----------------------' + */ + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_BTN1, KC_BTN2 + ), +}; diff --git a/keyboards/aya/readme.md b/keyboards/aya/readme.md new file mode 100644 index 00000000000..4e8e4228a0f --- /dev/null +++ b/keyboards/aya/readme.md @@ -0,0 +1,20 @@ +# Aya + +![Aya](https://raw.githubusercontent.com/DanNixon/aya/main/docs/both_sides.jpg) + +A column staggered, symmetrical split keyboard. + +* Keyboard Maintainer: [Dan Nixon](https://github.com/dannixon) +* Hardware Supported: Aya PCB, Pro Micro +* Hardware Availability: CAD files [here](https://github.com/DanNixon/aya) + +Make example for this keyboard (after setting up your build environment): + + make aya:default + +Enter the bootloader in 2 ways: + +* **Command**: Hold down both shift keys and press B +* **Physical reset button**: Briefly short the pads on the read of the PCB (directly behind the Pro Micro) + +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/aya/rules.mk b/keyboards/aya/rules.mk new file mode 100644 index 00000000000..3036ebe1db6 --- /dev/null +++ b/keyboards/aya/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 # Enable Bootmagic Lite +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +SPLIT_KEYBOARD = yes diff --git a/keyboards/boardsource/technik_s/technik_s.c b/keyboards/boardsource/technik_s/technik_s.c index a1fe68d1a3a..bb7245c73d5 100644 --- a/keyboards/boardsource/technik_s/technik_s.c +++ b/keyboards/boardsource/technik_s/technik_s.c @@ -18,9 +18,9 @@ #ifdef RGB_MATRIX_ENABLE led_config_t g_led_config = { { {10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21}, - {22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32}, + {22, NO_LED, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32}, {33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44}, - {45, 46, 47, 48, 49, 50, 51, 52, 53, 54} + {45, 46, 47, 48, NO_LED, 49, 50, NO_LED, 51, 52, 53, 54} }, { {220, 17}, {172, 17}, {112, 17}, { 50, 17}, { 4, 17}, { 4, 56}, { 50, 56}, {112, 56}, {172, 56}, {220, 56}, { 0, 0}, { 20, 0}, { 40, 0}, { 61, 0}, { 81, 0}, {101, 0}, {122, 0}, {142, 0}, {162, 0}, {183, 0}, {203, 0}, {224, 0}, diff --git a/keyboards/dubba175/keymaps/default/keymap.c b/keyboards/dubba175/keymaps/default/keymap.c index e502e949817..37bae5b435b 100644 --- a/keyboards/dubba175/keymaps/default/keymap.c +++ b/keyboards/dubba175/keymaps/default/keymap.c @@ -18,7 +18,6 @@ enum layers{ _BASE, _NUM, - _NAV, _FN }; @@ -36,9 +35,9 @@ enum combo_events { const uint16_t PROGMEM esc_combo[] = {KC_Q, KC_W, COMBO_END}; const uint16_t PROGMEM bspc_combo[] = {KC_O, KC_P, COMBO_END}; const uint16_t PROGMEM tab_combo[] = {KC_A, KC_S, COMBO_END}; -const uint16_t PROGMEM del_combo[] = {KC_Q, KC_P, COMBO_END}; +const uint16_t PROGMEM del_combo[] = {KC_I, KC_O, COMBO_END}; const uint16_t PROGMEM enter_combo[] = {KC_L, KC_SCLN, COMBO_END}; -const uint16_t PROGMEM quot_combo[] = {KC_P, KC_SCLN, COMBO_END}; +const uint16_t PROGMEM quot_combo[] = {KC_K, KC_L, COMBO_END}; const uint16_t PROGMEM lprn_combo[] = {KC_X, KC_C, COMBO_END}; const uint16_t PROGMEM rprn_combo[] = {KC_COMM, KC_DOT, COMBO_END}; @@ -55,7 +54,6 @@ combo_t key_combos[COMBO_COUNT] = { }; #define NUM MO(_NUM) -#define NAV MO(_NAV) #define FN MO(_FN) #define xxx KC_TRNS @@ -64,29 +62,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), - KC_LCTL, KC_LALT, NUM, KC_SPC, NAV, FN + KC_LALT, KC_LCTL, NUM, KC_SPC, KC_RGUI, FN ), - [_NUM] = LAYOUT( 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_MINS, KC_EQL, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_HOME, KC_END, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, - KC_PGUP, KC_PGDN, xxx, xxx, KC_PGUP, KC_PGDN - ), - - [_NAV] = LAYOUT( - xxx, KC_UP, xxx, xxx, xxx, xxx, xxx, xxx, KC_UP, xxx, - KC_LEFT, KC_DOWN, KC_RGHT, xxx, xxx, xxx, xxx, KC_LEFT, KC_DOWN, KC_RGHT, - xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, - xxx, xxx, xxx, xxx, xxx, xxx + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_HOME, KC_END, KC_PIPE, KC_BSLS, KC_DQUO, KC_QUOT, + xxx, xxx, xxx, xxx, KC_PGUP, KC_PGDN ), - + [_FN] = LAYOUT( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, KC_F11, KC_F12, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, - xxx, xxx, xxx, xxx, xxx, xxx + xxx, xxx, xxx, xxx, xxx, xxx ) }; diff --git a/keyboards/dz60/dz60.h b/keyboards/dz60/dz60.h index cccc9b62f32..afaf271c140 100644 --- a/keyboards/dz60/dz60.h +++ b/keyboards/dz60/dz60.h @@ -735,3 +735,30 @@ { k30, KC_NO, 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 } \ } + +/* LAYOUT_64_ansi_split_bs + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │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 │3b │3c │3d │3e │ + * ├────┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┼───┤ + * │40 │41 │43 │46 │4a │4b │4c │4d │4e │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ +*/ +#define LAYOUT_64_ansi_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, 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, 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, k0d, 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, 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/dz60/info.json b/keyboards/dz60/info.json index f5b68707254..bb607a4a294 100644 --- a/keyboards/dz60/info.json +++ b/keyboards/dz60/info.json @@ -1939,6 +1939,75 @@ {"x":13, "y":4}, {"x":14, "y":4} ] + }, + "LAYOUT_64_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":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/keyboards/ergodox_ez/keymaps/ifohancroft/keymap.c b/keyboards/ergodox_ez/keymaps/ifohancroft/keymap.c index 9de4818c1b7..27524b17827 100644 --- a/keyboards/ergodox_ez/keymaps/ifohancroft/keymap.c +++ b/keyboards/ergodox_ez/keymaps/ifohancroft/keymap.c @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |---------+---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------+---------| * | Shift | Z | X | C | V | B | | N | M | , | . | / | Shift | * |---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------| - * | Ctrl | Super | Alt | MO(3) | MO(2) | | MO(2) | Left | Down | Up | Right | + * | Ctrl | Super | Alt | TT(3) | MO(2) | | MO(2) | Left | Down | Up | Right | * *-------------------------------------------------* *-------------------------------------------------* * * *-------------------* *-------------------* @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, 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_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LGUI, KC_LALT, MO(3), MO(2), MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + KC_LCTL, KC_LGUI, KC_LALT, TT(3), MO(2), MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, TG(1), KC_NO, KC_NO, KC_NO, KC_NO, @@ -92,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| * | | | Up | | | | | | | | | | | | | * |---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| - * | | Left | Down | Right | | | | | | | | | | | | + * | | Left | Down | Right | | | | | | Left | Down | Up | Right | | | * |---------+---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------+---------| * | | | | | | | | | | | | | | * |---------+---------+---------+---------+---------+---------* *---------+---------+---------+---------+---------+---------| @@ -111,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_ergodox_pretty( _______, 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_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/ergodox_ez/keymaps/ifohancroft/readme.md b/keyboards/ergodox_ez/keymaps/ifohancroft/readme.md index 25c043cfd00..6bda1f2fc55 100644 --- a/keyboards/ergodox_ez/keymaps/ifohancroft/readme.md +++ b/keyboards/ergodox_ez/keymaps/ifohancroft/readme.md @@ -1,4 +1,4 @@ -![IFo Hancroft ErgoDox EZ Layout Image](https://i.imgur.com/8LRokp5.png) +![IFo Hancroft ErgoDox EZ Layout Image](https://i.imgur.com/v0kRHX5.png) # IFo Hancroft's ErgoDox EZ Layout diff --git a/keyboards/fjlabs/bks65/config.h b/keyboards/fjlabs/bks65/config.h index 05bcaa56f20..37cb2b687b9 100644 --- a/keyboards/fjlabs/bks65/config.h +++ b/keyboards/fjlabs/bks65/config.h @@ -63,7 +63,16 @@ along with this program. If not, see . /* Define RGB Underglow */ #define RGB_DI_PIN B0 #define RGBLED_NUM 24 -#define RGBLIGHT_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 +#define RGBLIGHT_EFFECT_TWINKLE /* #define RGBLIGHT_LAYER_BLINK*/ /* Define Indicator LED's */ diff --git a/keyboards/fjlabs/bks65/rules.mk b/keyboards/fjlabs/bks65/rules.mk index 11de777e854..37fccd0e9b2 100644 --- a/keyboards/fjlabs/bks65/rules.mk +++ b/keyboards/fjlabs/bks65/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fjlabs/bks65solder/config.h b/keyboards/fjlabs/bks65solder/config.h index 94bb5157e68..6b3839c8c89 100644 --- a/keyboards/fjlabs/bks65solder/config.h +++ b/keyboards/fjlabs/bks65solder/config.h @@ -63,7 +63,16 @@ along with this program. If not, see . /* Define RGB Underglow */ #define RGB_DI_PIN B0 #define RGBLED_NUM 24 -#define RGBLIGHT_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 +#define RGBLIGHT_EFFECT_TWINKLE /* #define RGBLIGHT_LAYER_BLINK*/ /* Define less important options */ diff --git a/keyboards/fjlabs/bks65solder/rules.mk b/keyboards/fjlabs/bks65solder/rules.mk index 11de777e854..37fccd0e9b2 100644 --- a/keyboards/fjlabs/bks65solder/rules.mk +++ b/keyboards/fjlabs/bks65solder/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fjlabs/bolsa65/config.h b/keyboards/fjlabs/bolsa65/config.h index c38da97076a..c53d2ab6562 100644 --- a/keyboards/fjlabs/bolsa65/config.h +++ b/keyboards/fjlabs/bolsa65/config.h @@ -63,7 +63,16 @@ along with this program. If not, see . /* Define RGB Underglow #define RGB_DI_PIN B0 #define RGBLED_NUM 24 -#define RGBLIGHT_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 +#define RGBLIGHT_EFFECT_TWINKLE */ /* #define RGBLIGHT_LAYER_BLINK*/ /* Define less important options */ diff --git a/keyboards/fjlabs/bolsa65/rules.mk b/keyboards/fjlabs/bolsa65/rules.mk index 59b02d34f24..956c2f9ce0d 100644 --- a/keyboards/fjlabs/bolsa65/rules.mk +++ b/keyboards/fjlabs/bolsa65/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fjlabs/kf87/rules.mk b/keyboards/fjlabs/kf87/rules.mk index 0aa4feb9991..e8e606b5b15 100644 --- a/keyboards/fjlabs/kf87/rules.mk +++ b/keyboards/fjlabs/kf87/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fjlabs/ldk65/rules.mk b/keyboards/fjlabs/ldk65/rules.mk index 521853c65da..2bee6a4b919 100644 --- a/keyboards/fjlabs/ldk65/rules.mk +++ b/keyboards/fjlabs/ldk65/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fjlabs/midway60/rules.mk b/keyboards/fjlabs/midway60/rules.mk index 4c426416fa0..57c789f909d 100644 --- a/keyboards/fjlabs/midway60/rules.mk +++ b/keyboards/fjlabs/midway60/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fjlabs/polaris/rules.mk b/keyboards/fjlabs/polaris/rules.mk index 4c426416fa0..57c789f909d 100644 --- a/keyboards/fjlabs/polaris/rules.mk +++ b/keyboards/fjlabs/polaris/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fjlabs/ready100/config.h b/keyboards/fjlabs/ready100/config.h index a0e8d561487..a32f9d94acc 100644 --- a/keyboards/fjlabs/ready100/config.h +++ b/keyboards/fjlabs/ready100/config.h @@ -63,7 +63,16 @@ along with this program. If not, see . /* Define RGB Underglow */ #define RGB_DI_PIN F7 #define RGBLED_NUM 64 -#define RGBLIGHT_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 +#define RGBLIGHT_EFFECT_TWINKLE #define RGBLIGHT_LIMIT_VAL 108 #define RGB_VAL_STEP 12 /* #define RGBLIGHT_LAYER_BLINK*/ diff --git a/keyboards/fjlabs/ready100/rules.mk b/keyboards/fjlabs/ready100/rules.mk index 3223e004595..fb8e1bc71e6 100644 --- a/keyboards/fjlabs/ready100/rules.mk +++ b/keyboards/fjlabs/ready100/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/boop65/rgb/config.h b/keyboards/kbdfans/boop65/rgb/config.h new file mode 100644 index 00000000000..71db0f8b57d --- /dev/null +++ b/keyboards/kbdfans/boop65/rgb/config.h @@ -0,0 +1,62 @@ +/* Copyright 2021 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 0x1000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KBDFANS +#define PRODUCT BOOP65RGB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 +#define MATRIX_ROW_PINS { F0, F1, F4, E6, C6 } +#define MATRIX_COL_PINS { F7, F6, F5, C7, B0, B1, B2, B3, B4, D7, D6, D4, D5, D3, D2} +#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 +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#define USB_SUSPEND_WAKEUP_DELAY 5000 + +#ifdef RGB_MATRIX_ENABLE +# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +# define RGB_MATRIX_KEYPRESSES +# define RGB_MATRIX_LED_PROCESS_LIMIT 4 +# define RGB_MATRIX_LED_FLUSH_LIMIT 26 +# 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_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL +# define DRIVER_ADDR_1 0b0110000 +# define DRIVER_COUNT 1 +# define DRIVER_1_LED_TOTAL 83 +# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_INDICATOR_LED_TOTAL 0 +#endif + +#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 \ No newline at end of file diff --git a/keyboards/kbdfans/boop65/rgb/info.json b/keyboards/kbdfans/boop65/rgb/info.json new file mode 100644 index 00000000000..8cec4110984 --- /dev/null +++ b/keyboards/kbdfans/boop65/rgb/info.json @@ -0,0 +1,10 @@ +{ + "keyboard_name": "boop65_rgb", + "url": "", + "maintainer": "moyi4681", + "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}] + } + } +} \ No newline at end of file diff --git a/keyboards/kbdfans/boop65/rgb/keymaps/default/keymap.c b/keyboards/kbdfans/boop65/rgb/keymaps/default/keymap.c new file mode 100644 index 00000000000..fed67baf2e7 --- /dev/null +++ b/keyboards/kbdfans/boop65/rgb/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2021 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] = { + [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_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, + 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, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + [1] = LAYOUT_65_ansi_blocker( + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, 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, + KC_TRNS, 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_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), + [3] = 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/kbdfans/boop65/rgb/keymaps/via/keymap.c b/keyboards/kbdfans/boop65/rgb/keymaps/via/keymap.c new file mode 100644 index 00000000000..f2aee1a1ffa --- /dev/null +++ b/keyboards/kbdfans/boop65/rgb/keymaps/via/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2021 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] = { + [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_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, + 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, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + [1] = LAYOUT_65_ansi_blocker( + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, 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, + KC_TRNS, 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_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), + [3] = 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/kbdfans/boop65/rgb/keymaps/via/rules.mk b/keyboards/kbdfans/boop65/rgb/keymaps/via/rules.mk new file mode 100644 index 00000000000..43061db1dd4 --- /dev/null +++ b/keyboards/kbdfans/boop65/rgb/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/kbdfans/boop65/rgb/readme.md b/keyboards/kbdfans/boop65/rgb/readme.md new file mode 100644 index 00000000000..9b24b62af46 --- /dev/null +++ b/keyboards/kbdfans/boop65/rgb/readme.md @@ -0,0 +1,21 @@ +# BOOP65 RGB + +A customizable 65% RGB keyboard. + +* Keyboard Maintainer: [moyi4681](https://github.com/moyi4681) +* Hardware Supported: KBDFANS +* Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/) + +Make example for this keyboard (after setting up your build environment): + + make kbdfans/boop65/rgb:default + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `RESET` if it is available + +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/boop65/rgb/rgb.c b/keyboards/kbdfans/boop65/rgb/rgb.c new file mode 100644 index 00000000000..5682ee28949 --- /dev/null +++ b/keyboards/kbdfans/boop65/rgb/rgb.c @@ -0,0 +1,148 @@ +/* Copyright 2021 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 "rgb.h" + +#ifdef RGB_MATRIX_ENABLE + +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { + {0, CS21_SW1, CS20_SW1, CS19_SW1}, + {0, CS21_SW2, CS20_SW2, CS19_SW2}, + {0, CS21_SW3, CS20_SW3, CS19_SW3}, + {0, CS21_SW4, CS20_SW4, CS19_SW4}, + {0, CS21_SW5, CS20_SW5, CS19_SW5}, + {0, CS21_SW6, CS20_SW6, CS19_SW6}, + {0, CS21_SW7, CS20_SW7, CS19_SW7}, + {0, CS21_SW8, CS20_SW8, CS19_SW8}, + {0, CS24_SW1, CS23_SW1, CS22_SW1}, + {0, CS24_SW2, CS23_SW2, CS22_SW2}, + {0, CS24_SW3, CS23_SW3, CS22_SW3}, + {0, CS24_SW4, CS23_SW4, CS22_SW4}, + {0, CS24_SW5, CS23_SW5, CS22_SW5}, + {0, CS24_SW6, CS23_SW6, CS22_SW6}, + {0, CS24_SW7, CS23_SW7, CS22_SW7}, + + {0, CS15_SW1, CS14_SW1, CS13_SW1}, + {0, CS15_SW2, CS14_SW2, CS13_SW2}, + {0, CS15_SW3, CS14_SW3, CS13_SW3}, + {0, CS15_SW4, CS14_SW4, CS13_SW4}, + {0, CS15_SW5, CS14_SW5, CS13_SW5}, + {0, CS15_SW6, CS14_SW6, CS13_SW6}, + {0, CS15_SW7, CS14_SW7, CS13_SW7}, + {0, CS15_SW8, CS14_SW8, CS13_SW8}, + {0, CS30_SW1, CS29_SW1, CS28_SW1}, + {0, CS30_SW2, CS29_SW2, CS28_SW2}, + {0, CS30_SW3, CS29_SW3, CS28_SW3}, + {0, CS30_SW4, CS29_SW4, CS28_SW4}, + {0, CS30_SW5, CS29_SW5, CS28_SW5}, + {0, CS30_SW6, CS29_SW6, CS28_SW6}, + {0, CS30_SW7, CS29_SW7, CS28_SW7}, + + {0, CS12_SW1, CS11_SW1, CS10_SW1}, + {0, CS12_SW2, CS11_SW2, CS10_SW2}, + {0, CS12_SW3, CS11_SW3, CS10_SW3}, + {0, CS12_SW4, CS11_SW4, CS10_SW4}, + {0, CS12_SW5, CS11_SW5, CS10_SW5}, + {0, CS12_SW6, CS11_SW6, CS10_SW6}, + {0, CS12_SW7, CS11_SW7, CS10_SW7}, + {0, CS12_SW8, CS11_SW8, CS10_SW8}, + {0, CS33_SW1, CS32_SW1, CS31_SW1}, + {0, CS33_SW2, CS32_SW2, CS31_SW2}, + {0, CS33_SW3, CS32_SW3, CS31_SW3}, + {0, CS33_SW4, CS32_SW4, CS31_SW4}, + {0, CS33_SW5, CS32_SW5, CS31_SW5}, + {0, CS33_SW7, CS32_SW7, CS31_SW7}, + + {0, CS9_SW1, CS8_SW1, CS7_SW1}, + {0, CS9_SW2, CS8_SW2, CS7_SW2}, + {0, CS9_SW3, CS8_SW3, CS7_SW3}, + {0, CS9_SW4, CS8_SW4, CS7_SW4}, + {0, CS9_SW5, CS8_SW5, CS7_SW5}, + {0, CS9_SW6, CS8_SW6, CS7_SW6}, + {0, CS9_SW7, CS8_SW7, CS7_SW7}, + {0, CS9_SW8, CS8_SW8, CS7_SW8}, + {0, CS36_SW1, CS35_SW1, CS34_SW1}, + {0, CS36_SW2, CS35_SW2, CS34_SW2}, + {0, CS36_SW3, CS35_SW3, CS34_SW3}, + {0, CS36_SW4, CS35_SW4, CS34_SW4}, + {0, CS36_SW5, CS35_SW5, CS34_SW5}, + {0, CS36_SW7, CS35_SW7, CS34_SW7}, + + {0, CS3_SW1, CS2_SW1, CS1_SW1}, + {0, CS3_SW2, CS2_SW2, CS1_SW2}, + {0, CS3_SW3, CS2_SW3, CS1_SW3}, + {0, CS3_SW6, CS2_SW6, CS1_SW6}, + {0, CS39_SW2, CS38_SW2, CS37_SW2}, + {0, CS39_SW3, CS38_SW3, CS37_SW3}, + {0, CS39_SW4, CS38_SW4, CS37_SW4}, + {0, CS39_SW5, CS38_SW5, CS37_SW5}, + {0, CS39_SW7, CS38_SW7, CS37_SW7}, + +/* underglow */ + + {0, CS18_SW1, CS17_SW1, CS16_SW1}, + {0, CS18_SW3, CS17_SW3, CS16_SW3}, + {0, CS18_SW5, CS17_SW5, CS16_SW5}, + {0, CS18_SW7, CS17_SW7, CS16_SW7}, + {0, CS27_SW2, CS26_SW2, CS25_SW2}, + {0, CS27_SW4, CS26_SW4, CS25_SW4}, + {0, CS27_SW6, CS26_SW6, CS25_SW6}, + {0, CS27_SW7, CS26_SW7, CS25_SW7}, + + {0, CS6_SW1, CS5_SW1, CS4_SW1}, + {0, CS6_SW3, CS5_SW3, CS4_SW3}, + {0, CS6_SW4, CS5_SW4, CS4_SW4}, + {0, CS6_SW7, CS5_SW7, CS4_SW7}, + {0, CS39_SW1, CS38_SW1, CS37_SW1}, + {0, CS33_SW6, CS32_SW6, CS31_SW6}, + {0, CS36_SW6, CS35_SW6, CS34_SW6}, + {0, CS39_SW6, CS38_SW6, CS37_SW6} + +}; +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, 38, 39, 40, 41, NO_LED,42, 43 }, + { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED,56, 57 }, + { 58, 59, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, NO_LED, 63, 64, NO_LED, 65, 66 } +}, { + {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},{203,0},{224,0}, + {4,16},{23,16},{38,16},{53,16},{68,16},{83,16},{98,16},{113,16},{128,16},{143,16},{158,16},{173,16},{188,16},{206,16},{224,16}, + {6,32},{26,32},{41,32},{56,32},{71,32},{86,32},{101,32},{116,32},{131,32},{146,32},{161,32},{176,32},{201,32},{224,32}, + {9,48},{34,48},{49,48},{64,48},{79,48},{94,48},{109,48},{124,48},{139,48},{154,48},{169,48},{189,48},{210,48},{224,48}, + {2,64},{21,64},{39,64},{96,64},{152,64},{171,64},{195,64},{210,64},{224,64}, + {0,8},{32,8},{64,8},{96,8},{128,8},{160,8},{192,8},{224,8}, + {0,56},{32,56},{64,56},{96,56},{128,56},{160,56},{192,56},{224,56} +}, { + 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, 4, 1, + 1, 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, 4, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2 +} }; + +__attribute__ ((weak)) +void rgb_matrix_indicators_user(void) +{ + if (host_keyboard_led_state().caps_lock) + { + rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); + } +} +#endif + diff --git a/keyboards/kbdfans/boop65/rgb/rgb.h b/keyboards/kbdfans/boop65/rgb/rgb.h new file mode 100644 index 00000000000..16fa7c1b87f --- /dev/null +++ b/keyboards/kbdfans/boop65/rgb/rgb.h @@ -0,0 +1,32 @@ +/* Copyright 2021 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 +#define XXX KC_NO +#include "quantum.h" +#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, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ + K40, K41, K42, K45, K48, K4A, K4B, 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, XXX, K3D, K3E }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, K48, XXX, K4A, K4B, XXX, K4D, K4E } \ +} diff --git a/keyboards/kbdfans/boop65/rgb/rules.mk b/keyboards/kbdfans/boop65/rgb/rules.mk new file mode 100644 index 00000000000..c7ff60a4a89 --- /dev/null +++ b/keyboards/kbdfans/boop65/rgb/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 = yes # Enable Bootmagic Lite +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 +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = yes # Use RGB matrix +RGB_MATRIX_DRIVER = IS31FL3741 diff --git a/keyboards/kbdfans/kbd75hs/config.h b/keyboards/kbdfans/kbd75hs/config.h new file mode 100644 index 00000000000..e23e50636fa --- /dev/null +++ b/keyboards/kbdfans/kbd75hs/config.h @@ -0,0 +1,68 @@ +/* Copyright 2021 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 0x6062 +#define DEVICE_VER 0x0003 +#define MANUFACTURER KBDFANS +#define PRODUCT KBD75_HOTSWAP + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 +#define MATRIX_ROW_PINS { E6, B0, B1, B2, B3, B6 } +#define MATRIX_COL_PINS { F7, F6, F5, F4, F1, D0, D1, D2, D3, D5, D4, D6, D7, B4, B5} +#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 FORCE_NKRO +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#define LED_CAPS_LOCK_PIN C6 +#define LED_PIN_ON_STATE 1 + +#define RGB_DI_PIN F0 +#ifdef RGB_DI_PIN +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_KNIGHT +#define RGBLIGHT_EFFECT_CHRISTMAS +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +#define RGBLIGHT_EFFECT_RGB_TEST +#define RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_TWINKLE +#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_EFFECT_RAINBOW_MOOD + 6) +#define RGBLIGHT_DEFAULT_SPD 15 +#define RGBLED_NUM 18 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 10 +#define RGBLIGHT_VAL_STEP 10 +#define RGBLIGHT_SLEEP +#endif +#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 diff --git a/keyboards/kbdfans/kbd75hs/info.json b/keyboards/kbdfans/kbd75hs/info.json new file mode 100644 index 00000000000..f1d3368827e --- /dev/null +++ b/keyboards/kbdfans/kbd75hs/info.json @@ -0,0 +1,9 @@ +{ + "keyboard_name": "KBD75HS", + "maintainer": "DZTECH", + "layouts": { + "LAYOUT_75_ansi": { + "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":"!", "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":"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":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Page Down", "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":"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}, {"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}] + } + } +} \ No newline at end of file diff --git a/keyboards/kbdfans/kbd75hs/kbd75hs.c b/keyboards/kbdfans/kbd75hs/kbd75hs.c new file mode 100644 index 00000000000..e22c2675754 --- /dev/null +++ b/keyboards/kbdfans/kbd75hs/kbd75hs.c @@ -0,0 +1,17 @@ +/* Copyright 2021 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 "kbd75hs.h" diff --git a/keyboards/kbdfans/kbd75hs/kbd75hs.h b/keyboards/kbdfans/kbd75hs/kbd75hs.h new file mode 100644 index 00000000000..60fa4729966 --- /dev/null +++ b/keyboards/kbdfans/kbd75hs/kbd75hs.h @@ -0,0 +1,35 @@ +/* Copyright 2021 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 XXX KC_NO + +#define LAYOUT_75_ansi( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K312, 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, K313, K314, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \ + K500, K501, K502, K505, K508, K509, K510, K511, K513, K514 \ +) { \ + { 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, K312, K313, K314 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414 }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, K508, K509, K510, K511, KC_NO, K513, K514 } \ +} diff --git a/keyboards/kbdfans/kbd75hs/keymaps/default/keymap.c b/keyboards/kbdfans/kbd75hs/keymaps/default/keymap.c new file mode 100644 index 00000000000..0957a41d74e --- /dev/null +++ b/keyboards/kbdfans/kbd75hs/keymaps/default/keymap.c @@ -0,0 +1,55 @@ +/* Copyright 2021 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] = { + + [0] = LAYOUT_75_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_INS, 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_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_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_75_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_75_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_75_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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/kbd75hs/keymaps/via/keymap.c b/keyboards/kbdfans/kbd75hs/keymaps/via/keymap.c new file mode 100644 index 00000000000..0957a41d74e --- /dev/null +++ b/keyboards/kbdfans/kbd75hs/keymaps/via/keymap.c @@ -0,0 +1,55 @@ +/* Copyright 2021 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] = { + + [0] = LAYOUT_75_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_INS, 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_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_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_75_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_75_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_75_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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/kbd75hs/keymaps/via/rules.mk b/keyboards/kbdfans/kbd75hs/keymaps/via/rules.mk new file mode 100644 index 00000000000..36b7ba9cbc9 --- /dev/null +++ b/keyboards/kbdfans/kbd75hs/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/kbdfans/kbd75hs/readme.md b/keyboards/kbdfans/kbd75hs/readme.md new file mode 100644 index 00000000000..4f7943d4fee --- /dev/null +++ b/keyboards/kbdfans/kbd75hs/readme.md @@ -0,0 +1,21 @@ +# KBD75 HOTSWAP + +A customizable 75% HOTSWAP keyboard. + +* Keyboard Maintainer: [moyi4681](https://github.com/moyi4681) +* Hardware Supported: KBDFANS +* Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/) + +Make example for this keyboard (after setting up your build environment): + + make kbdfans/kbd75hs:default + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix +* **Physical reset button**: Briefly press the button on the back of the PCB +* **Keycode in layout**: Press the key mapped to `RESET` if it is available + +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/kbd75hs/rules.mk b/keyboards/kbdfans/kbd75hs/rules.mk new file mode 100644 index 00000000000..76adc51e1c6 --- /dev/null +++ b/keyboards/kbdfans/kbd75hs/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 = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 75_ansi diff --git a/keyboards/keybee/keybee65/config.h b/keyboards/keybee/keybee65/config.h new file mode 100644 index 00000000000..25c7b508373 --- /dev/null +++ b/keyboards/keybee/keybee65/config.h @@ -0,0 +1,64 @@ +/* +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 0x6265 // KeyBee +#define PRODUCT_ID 0x0001 // Keybee65 +#define DEVICE_VER 0x0001 // Version 1 +#define MANUFACTURER KeyBee +#define PRODUCT KeyBee65 + +/* 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) + * +*/ + +// Checked with Eagle Schematic +#define MATRIX_ROW_PINS { D3, D2, D0, B0, F0 } +#define MATRIX_COL_PINS { E6, D1, D5, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } +#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 + +// The pin connected to the data pin of the LEDs +#define RGB_DI_PIN B0 +// The number of LEDs connected +#define DRIVER_LED_TOTAL 80 + +#define RGB_MATRIX_KEYPRESSES +#define RGB_DISABLE_WHEN_USB_SUSPENDED + +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/keybee/keybee65/info.json b/keyboards/keybee/keybee65/info.json new file mode 100644 index 00000000000..63f05c9c2ad --- /dev/null +++ b/keyboards/keybee/keybee65/info.json @@ -0,0 +1,361 @@ +{ + "keyboard_name": "KeyBee65", + "url": "", + "maintainer": "ToastyStoemp", + "layouts": { + "LAYOUT_65_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": "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": "|", + "x": 13.5, + "y": 1, + "w": 1.5 + }, + { + "label": "Page Up", + "x": 15, + "y": 1 + }, + { + "label": "Caps Lock", + "x": 0, + "y": 2, + "w": 1.75 + }, + { + "label": "A", + "x": 1.75, + "y": 2 + }, + { + "label": "S", + "x": 2.75, + "y": 2 + }, + { + "label": "D", + "x": 3.75, + "y": 2 + }, + { + "label": "F", + "x": 4.75, + "y": 2 + }, + { + "label": "G", + "x": 5.75, + "y": 2 + }, + { + "label": "H", + "x": 6.75, + "y": 2 + }, + { + "label": "J", + "x": 7.75, + "y": 2 + }, + { + "label": "K", + "x": 8.75, + "y": 2 + }, + { + "label": "L", + "x": 9.75, + "y": 2 + }, + { + "label": ":", + "x": 10.75, + "y": 2 + }, + { + "label": "\"", + "x": 11.75, + "y": 2 + }, + { + "label": "Enter", + "x": 12.75, + "y": 2, + "w": 2.25 + }, + { + "label": "Page Down", + "x": 15, + "y": 2 + }, + { + "label": "Shift", + "x": 0, + "y": 3, + "w": 2.25 + }, + { + "label": "Z", + "x": 2.25, + "y": 3 + }, + { + "label": "X", + "x": 3.25, + "y": 3 + }, + { + "label": "C", + "x": 4.25, + "y": 3 + }, + { + "label": "V", + "x": 5.25, + "y": 3 + }, + { + "label": "B", + "x": 6.25, + "y": 3 + }, + { + "label": "N", + "x": 7.25, + "y": 3 + }, + { + "label": "M", + "x": 8.25, + "y": 3 + }, + { + "label": "<", + "x": 9.25, + "y": 3 + }, + { + "label": ">", + "x": 10.25, + "y": 3 + }, + { + "label": "?", + "x": 11.25, + "y": 3 + }, + { + "label": "Shift", + "x": 12.25, + "y": 3, + "w": 1.75 + }, + { + "label": "UP", + "x": 14, + "y": 3 + }, + { + "label": "End", + "x": 15, + "y": 3 + }, + { + "label": "Ctrl", + "x": 0, + "y": 4, + "w": 1.25 + }, + { + "label": "Win", + "x": 1.25, + "y": 4, + "w": 1.25 + }, + { + "label": "Alt", + "x": 2.5, + "y": 4, + "w": 1.25 + }, + { + "x": 3.75, + "y": 4, + "w": 6.25 + }, + { + "label": "Alt", + "x": 10, + "y": 4 + }, + { + "label": "Fn", + "x": 11, + "y": 4 + }, + { + "label": "Ctrl", + "x": 12, + "y": 4 + }, + { + "label": "LEFT", + "x": 13, + "y": 4 + }, + { + "label": "DOWN", + "x": 14, + "y": 4 + }, + { + "label": "RIGHT", + "x": 15, + "y": 4 + } + ] + } + } +} \ No newline at end of file diff --git a/keyboards/keybee/keybee65/keybee65.c b/keyboards/keybee/keybee65/keybee65.c new file mode 100644 index 00000000000..12422f08893 --- /dev/null +++ b/keyboards/keybee/keybee65/keybee65.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 "keybee65.h" + +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, NO_LED, 13, 14 }, + { 29, NO_LED, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 }, + { 30, NO_LED, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, 43 }, + { 57, NO_LED, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, NO_LED, 45, 44 }, + { 58, 59, 60, NO_LED, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, 63, 64, 65, 66, 67 } +}, { + // LED Index to Physical Position + {6, 2}, {20, 2}, {35, 11}, {49, 11}, {64, 11}, {78, 11}, {92, 11}, {107, 11}, {120, 11}, {135, 11}, {148, 11}, {164, 11}, {177, 11}, {198, 11}, {220, 11}, + {9, 24}, {26, 24}, {42, 24}, {56, 24}, {70, 24}, {85, 24}, {100, 24}, {113, 24}, {128, 24}, {143, 24}, {156, 24}, {170, 24}, {184, 24}, {202, 24}, {220, 24}, + {11, 38}, {29, 38}, {46, 38}, {60, 38}, {74, 38}, {88, 38}, {103, 38}, {118, 38}, {132, 38}, {146, 38}, {160, 38}, {174, 38}, {198, 38}, {220, 38}, + {16, 53}, {37, 53}, {52, 53}, {66, 53}, {80, 53}, {96, 53}, {110, 53}, {125, 53}, {140, 53}, {153, 53}, {168, 53}, {187, 53}, {207, 53}, {220, 53}, + {6, 68}, {25, 68}, {44, 68}, +}, { + // LED Index to Flag + 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, 4, 4, + + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 +} }; \ No newline at end of file diff --git a/keyboards/keybee/keybee65/keybee65.h b/keyboards/keybee/keybee65/keybee65.h new file mode 100644 index 00000000000..484f8977aa9 --- /dev/null +++ b/keyboards/keybee/keybee65/keybee65.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" + +/* Keybee65 Keymap Definitions */ +#define LAYOUT_65_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \ + K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, K2F, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, K3F, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E, K2F }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, K3E, K3F }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F } \ +} diff --git a/keyboards/keybee/keybee65/keymaps/default/keymap.c b/keyboards/keybee/keybee65/keymaps/default/keymap.c new file mode 100644 index 00000000000..13d1ba1f9d1 --- /dev/null +++ b/keyboards/keybee/keybee65/keymaps/default/keymap.c @@ -0,0 +1,84 @@ +/* +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( + 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_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_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_LAYER1] = LAYOUT_65_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_TRNS, KC_TRNS, + 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_PAUSE, RESET, KC_TRNS, + KC_TRNS, 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_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, NK_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AUDIO_VOL_UP, KC_AUDIO_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER): { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_INDICATOR); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_INDICATOR: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable_noeeprom(); + } + break; + } + } + return false; + default: + return true; //Process all other keycodes normally + } +} + +void rgb_matrix_indicators_kb(void) { + led_t host_leds = host_keyboard_led_state(); + if (host_leds.caps_lock) { + rgb_matrix_set_color(30, 254, 189, 41); // set caps lock led color first nunber is index, R G B + } +} \ No newline at end of file diff --git a/keyboards/keybee/keybee65/keymaps/via/keymap.c b/keyboards/keybee/keybee65/keymaps/via/keymap.c new file mode 100644 index 00000000000..811e13ef55e --- /dev/null +++ b/keyboards/keybee/keybee65/keymaps/via/keymap.c @@ -0,0 +1,105 @@ +/* +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( + 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_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_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_LAYER1] = LAYOUT_65_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_TRNS, KC_TRNS, + 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_PAUSE, RESET, KC_TRNS, + KC_TRNS, 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_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, NK_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AUDIO_VOL_UP, KC_AUDIO_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK + ), + + [_LAYER2] = LAYOUT_65_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 + ), + + [_LAYER3] = LAYOUT_65_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 + ), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER): { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_INDICATOR); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_INDICATOR: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable_noeeprom(); + } + break; + } + } + return false; + default: + return true; //Process all other keycodes normally + } +} + +void rgb_matrix_indicators_kb(void) { + led_t host_leds = host_keyboard_led_state(); + if (host_leds.caps_lock) { + rgb_matrix_set_color(30, 254, 189, 41); // set caps lock led color first nunber is index, R G B + } else if (!(rgb_matrix_get_flags() & LED_FLAG_MODIFIER)) { + rgb_matrix_set_color(30, 0, 0, 0); + } +} \ No newline at end of file diff --git a/keyboards/keybee/keybee65/keymaps/via/rules.mk b/keyboards/keybee/keybee65/keymaps/via/rules.mk new file mode 100644 index 00000000000..1e5b99807cb --- /dev/null +++ b/keyboards/keybee/keybee65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/keybee/keybee65/readme.md b/keyboards/keybee/keybee65/readme.md new file mode 100644 index 00000000000..afe9cfd225a --- /dev/null +++ b/keyboards/keybee/keybee65/readme.md @@ -0,0 +1,26 @@ +# KeyBee 65 + +The following is the QMK Firmware for the KeyBee 65 Hotswap PCB. + +The PCB features: +* QMK & VIA compatibility +* Hotswap +* RGB underglow +* Per-Key RGB + +--- + +* Keyboard Maintainer: [ToastyStoemp](https://github.com/ToastyStoemp) +* Hardware Supported: Pollen65 +* Hardware Availability: [keybeeshop.com](https://www.keybeeshop.com/collections/keyboards/products/pollen65-mechanical-keyboard-kit) + +Make example for this keyboard (after setting up your build environment): + + make keybee/keybee65: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 Enter the bootloader in 3 ways: +* **Bootmagic reset**: Hold down the key ESC key and plug in the keyboard (Top Left most switch) +* **Physical reset button**: Briefly press the button on the back of the PCB +* **Keycode in layout**: Press the Enter key on layer 1 which is mapped to `RESET` \ No newline at end of file diff --git a/keyboards/keybee/keybee65/rules.mk b/keyboards/keybee/keybee65/rules.mk new file mode 100644 index 00000000000..17b1906d46c --- /dev/null +++ b/keyboards/keybee/keybee65/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 = yes # Enable Bootmagic Lite +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 +AUDIO_ENABLE = no # Audio output +KEYBOARD_LOCK_ENABLE = yes +ENCODER_ENABLE = no +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 + +LAYOUTS = 65_ansi diff --git a/keyboards/lucid/alexa/rules.mk b/keyboards/lucid/alexa/rules.mk index 200fb53ef50..b1d63c68228 100644 --- a/keyboards/lucid/alexa/rules.mk +++ b/keyboards/lucid/alexa/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lucid/kbd8x_hs/rules.mk b/keyboards/lucid/kbd8x_hs/rules.mk index e742728c29b..ca14808aa49 100644 --- a/keyboards/lucid/kbd8x_hs/rules.mk +++ b/keyboards/lucid/kbd8x_hs/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lucid/phantom_hs/rules.mk b/keyboards/lucid/phantom_hs/rules.mk index 59b02d34f24..b1d63c68228 100644 --- a/keyboards/lucid/phantom_hs/rules.mk +++ b/keyboards/lucid/phantom_hs/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lucid/phantom_solder/rules.mk b/keyboards/lucid/phantom_solder/rules.mk index 6a4e682c016..58e569b7393 100644 --- a/keyboards/lucid/phantom_solder/rules.mk +++ b/keyboards/lucid/phantom_solder/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lucid/scarlet/rules.mk b/keyboards/lucid/scarlet/rules.mk index 02bd5f08fb5..916eb9fbbda 100644 --- a/keyboards/lucid/scarlet/rules.mk +++ b/keyboards/lucid/scarlet/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/matrix/me/config.h b/keyboards/matrix/me/config.h new file mode 100644 index 00000000000..033198ef655 --- /dev/null +++ b/keyboards/matrix/me/config.h @@ -0,0 +1,68 @@ +/** + * config.h + * + Copyright 2021 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 0x454D // ME +#define DEVICE_VER 0x0001 +#define MANUFACTURER Matrix Lab +#define PRODUCT Matrix ME + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 +#define MATRIX_ROW_PINS {D3, D5, D4, D6, B5, B4} +#define MATRIX_COL_PINS {B7, B3, B2, B1, B0, F0, F1, F4, F5, F6, F7, C7, C6, B6, D7} +#define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + +/* 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 RGBLED_NUM 4 +#define RGB_DI_PIN E2 +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_KNIGHT +#define RGBLIGHT_EFFECT_CHRISTMAS +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +#define RGBLIGHT_EFFECT_RGB_TEST +#define RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_TWINKLE +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +// led pins +#define LED_CAPS_LOCK_PIN E6 +#define LED_SCROLL_LOCK_PIN D2 diff --git a/keyboards/matrix/me/info.json b/keyboards/matrix/me/info.json new file mode 100644 index 00000000000..cad1b3f70e1 --- /dev/null +++ b/keyboards/matrix/me/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Matrix ME", + "url": "", + "maintainer": "qmk", + "layouts": { + "LAYOUT_tkl_ansi_tsangan": { + "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.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":"Menu", "x":12.5, "y":5.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}] + }, + "LAYOUT_tkl_iso_tsangan": { + "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":"\u2191", "x":16.25, "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":"AltGr", "x":11, "y":5.5, "w":1.5}, {"label":"Menu", "x":12.5, "y":5.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}] + } + } +} diff --git a/keyboards/matrix/me/keymaps/default/keymap.c b/keyboards/matrix/me/keymaps/default/keymap.c new file mode 100644 index 00000000000..9858753a501 --- /dev/null +++ b/keyboards/matrix/me/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/** + * keymap.c + * + Copyright 2021 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_tkl_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, 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_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, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1]=LAYOUT_tkl_ansi_tsangan( + KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + _______, _______, _______, KC_MPLY, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT), +}; diff --git a/keyboards/matrix/me/keymaps/via/keymap.c b/keyboards/matrix/me/keymaps/via/keymap.c new file mode 100644 index 00000000000..d5a05ef9443 --- /dev/null +++ b/keyboards/matrix/me/keymaps/via/keymap.c @@ -0,0 +1,56 @@ +/** + * keymap.c + * + Copyright 2021 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_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_BSLS, KC_ENT, + KC_LSFT, KC_LGUI, 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_all( + KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_F24, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + _______, _______, _______, KC_MPLY, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT), + + [2]=LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [3]=LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/keyboards/matrix/me/keymaps/via/rules.mk b/keyboards/matrix/me/keymaps/via/rules.mk new file mode 100644 index 00000000000..43061db1dd4 --- /dev/null +++ b/keyboards/matrix/me/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/matrix/me/me.c b/keyboards/matrix/me/me.c new file mode 100644 index 00000000000..c99f26e6238 --- /dev/null +++ b/keyboards/matrix/me/me.c @@ -0,0 +1,17 @@ +/** + * me.c + * + Copyright 2021 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 "me.h" diff --git a/keyboards/matrix/me/me.h b/keyboards/matrix/me/me.h new file mode 100644 index 00000000000..f10417f58f0 --- /dev/null +++ b/keyboards/matrix/me/me.h @@ -0,0 +1,70 @@ +/** + * me.h + * + Copyright 2021 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_tkl_ansi_tsangan( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \ + \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K415, \ + K500, K501, K502, K507, K511, K512, K513, K514, K515, K516 \ +) { \ + { 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, K016}, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K114}, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K115}, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K415, KC_NO}, \ + { K500, K501, K502, K507, KC_NO, K511, K512, K513, K514, K515, K516, K216, K215, K214, K116}, \ +} + +#define LAYOUT_tkl_iso_tsangan( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \ + \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K415, \ + K500, K501, K502, K507, K511, K512, K513, K514, K515, K516 \ +) { \ + { 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, K016}, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K114}, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K115}, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K415, KC_NO}, \ + { K500, K501, K502, K507, KC_NO, K511, K512, K513, K514, K515, K516, K216, K215, K214, K116}, \ +} + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \ + \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K415, \ + K500, K501, K502, K507, K508, K511, K512, K513, K514, K515, K516 \ +) { \ + { 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, K016}, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K114}, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K115}, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K415, KC_NO}, \ + { K500, K501, K502, K507, K508, K511, K512, K513, K514, K515, K516, K216, K215, K214, K116}, \ +} diff --git a/keyboards/matrix/me/readme.md b/keyboards/matrix/me/readme.md new file mode 100644 index 00000000000..6a39bb0398b --- /dev/null +++ b/keyboards/matrix/me/readme.md @@ -0,0 +1,25 @@ +# Matrix ME + +A TKL keyboard with top gasket + +* Keyboard Maintainer: [astro](https://github.com/yulei) +* Hardware Supported: Matrix ME keyboard +* Hardware Availability: GB + +Make example for this keyboard (after setting up your build environment): + + make matrix/me:default + +Flashing example for this keyboard: + + make matrix/me:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard. +* **Physical reset button**: Briefly short cut the *RST* pin with the *GND* pin (pin at the topside of the *RST*) on the back of the PCB. +* **Keycode in layout**: Press the key mapped to `RESET` if it is available. \ No newline at end of file diff --git a/keyboards/matrix/me/rules.mk b/keyboards/matrix/me/rules.mk new file mode 100644 index 00000000000..eec8ecbaa06 --- /dev/null +++ b/keyboards/matrix/me/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 = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/melgeek/mach80/config.h b/keyboards/melgeek/mach80/config.h new file mode 100755 index 00000000000..99fced67584 --- /dev/null +++ b/keyboards/melgeek/mach80/config.h @@ -0,0 +1,51 @@ +/* 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" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xEDED +#define PRODUCT_ID 0x0080 +#define DEVICE_VER 0x0001 +#define MANUFACTURER MelGeek +#define PRODUCT Mach80 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +/* 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 // 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_COUNT 1 + diff --git a/keyboards/melgeek/mach80/info.json b/keyboards/melgeek/mach80/info.json new file mode 100755 index 00000000000..e786df7c176 --- /dev/null +++ b/keyboards/melgeek/mach80/info.json @@ -0,0 +1,196 @@ +{ + "keyboard_name": "Mach80", + "url": "", + "maintainer": "melgeek001365", + "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}, + {"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, "w":2.0}, + {"x":15.25, "y":1}, + {"x":16.25, "y":1}, + {"x":17.25, "y":1}, + + {"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":13.5, "y":2, "w":1.5}, + {"x":15.25, "y":2}, + {"x":16.25, "y":2}, + {"x":17.25, "y":2}, + + {"x":0, "y":3, "w":1.75}, + {"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}, + {"x":10.75, "y":3}, + {"x":11.75, "y":3}, + {"x":12.75, "y":3, "w":2.25}, + + {"x":0, "y":4, "w":2.25}, + {"x":2.25, "y":4}, + {"x":3.25, "y":4}, + {"x":4.25, "y":4}, + {"x":5.25, "y":4}, + {"x":6.25, "y":4}, + {"x":7.25, "y":4}, + {"x":8.25, "y":4}, + {"x":9.25, "y":4}, + {"x":10.25, "y":4}, + {"x":11.25, "y":4}, + {"x":12.25, "y":4, "w":2.75}, + {"x":16.25, "y":4}, + + {"x":0, "y":5, "w":1.25}, + {"x":1.25, "y":5, "w":1.25}, + {"x":2.5, "y":5, "w":1.25}, + {"x":3.75, "y":5, "w":6.25}, + {"x":10, "y":5, "w":1.25}, + {"x":11.25, "y":5, "w":1.25}, + {"x":12.5, "y":5, "w":1.25}, + {"x":13.75, "y":5, "w":1.25}, + {"x":15.25, "y":5}, + {"x":16.25, "y":5}, + {"x":17.25, "y":5} + ] + }, + "LAYOUT_tkl_ansi_wkl": { + "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}, + {"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, "w":2.0}, + {"x":15.25, "y":1}, + {"x":16.25, "y":1}, + {"x":17.25, "y":1}, + + {"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":13.5, "y":2, "w":1.5}, + {"x":15.25, "y":2}, + {"x":16.25, "y":2}, + {"x":17.25, "y":2}, + + {"x":0, "y":3, "w":1.75}, + {"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}, + {"x":10.75, "y":3}, + {"x":11.75, "y":3}, + {"x":12.75, "y":3, "w":2.25}, + + {"x":0, "y":4, "w":2.25}, + {"x":2.25, "y":4}, + {"x":3.25, "y":4}, + {"x":4.25, "y":4}, + {"x":5.25, "y":4}, + {"x":6.25, "y":4}, + {"x":7.25, "y":4}, + {"x":8.25, "y":4}, + {"x":9.25, "y":4}, + {"x":10.25, "y":4}, + {"x":11.25, "y":4}, + {"x":12.25, "y":4, "w":2.75}, + {"x":16.25, "y":4}, + + {"x":0, "y":5, "w":1.5}, + {"x":2.5, "y":5, "w":1.5}, + {"x":4, "y":5, "w":7}, + {"x":11, "y":5, "w":1.5}, + {"x":13.5, "y":5, "w":1.5}, + {"x":15.25, "y":5}, + {"x":16.25, "y":5}, + {"x":17.25, "y":5} + ] + } + } +} diff --git a/keyboards/melgeek/mach80/keymaps/default/keymap.c b/keyboards/melgeek/mach80/keymaps/default/keymap.c new file mode 100755 index 00000000000..235f0c40db4 --- /dev/null +++ b/keyboards/melgeek/mach80/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* 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_tkl_ansi( /* Base */ + 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, MO(1), KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_tkl_ansi( /* FN */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, KC_END, _______, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, RESET, _______, KC_INS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ) +}; diff --git a/keyboards/melgeek/mach80/keymaps/tkl/keymap.c b/keyboards/melgeek/mach80/keymaps/tkl/keymap.c new file mode 100755 index 00000000000..17aa4e6d367 --- /dev/null +++ b/keyboards/melgeek/mach80/keymaps/tkl/keymap.c @@ -0,0 +1,37 @@ +/* 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_tkl_ansi( /* Base */ + 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, MO(1), KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_tkl_ansi( /* FN */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, KC_END, _______, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, RESET, _______, KC_INS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ) +}; diff --git a/keyboards/melgeek/mach80/keymaps/via/keymap.c b/keyboards/melgeek/mach80/keymaps/via/keymap.c new file mode 100755 index 00000000000..058786d1d25 --- /dev/null +++ b/keyboards/melgeek/mach80/keymaps/via/keymap.c @@ -0,0 +1,53 @@ +/* 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_tkl_ansi( /* Base */ + 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, MO(1), KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_tkl_ansi( /* FN */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, KC_END, _______, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, RESET, _______, KC_INS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ), + [2] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/melgeek/mach80/keymaps/via/rules.mk b/keyboards/melgeek/mach80/keymaps/via/rules.mk new file mode 100755 index 00000000000..36b7ba9cbc9 --- /dev/null +++ b/keyboards/melgeek/mach80/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/melgeek/mach80/keymaps/wkl/keymap.c b/keyboards/melgeek/mach80/keymaps/wkl/keymap.c new file mode 100755 index 00000000000..7fcf43bd01d --- /dev/null +++ b/keyboards/melgeek/mach80/keymaps/wkl/keymap.c @@ -0,0 +1,37 @@ +/* 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_tkl_ansi_wkl( /* Base */ + 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_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_tkl_ansi_wkl( /* FN */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, KC_END, _______, + _______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, RESET, _______, KC_INS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_VOLU, + _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT + ) +}; diff --git a/keyboards/melgeek/mach80/mach80.c b/keyboards/melgeek/mach80/mach80.c new file mode 100755 index 00000000000..28d21b22b15 --- /dev/null +++ b/keyboards/melgeek/mach80/mach80.c @@ -0,0 +1,17 @@ +/* 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 "mach80.h" diff --git a/keyboards/melgeek/mach80/mach80.h b/keyboards/melgeek/mach80/mach80.h new file mode 100755 index 00000000000..6e954a91856 --- /dev/null +++ b/keyboards/melgeek/mach80/mach80.h @@ -0,0 +1,53 @@ +/* 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_tkl_ansi( \ + K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K3D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K3E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K3F, \ + 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, K4E, \ + K50, K51, K52, K55, K59, K5A, K5B, K5C, K5D, K5E, K5F \ +) { \ + {K00, XXX, 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, K2F}, \ + {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F}, \ + {K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, XXX, XXX, K4E, XXX}, \ + {K50, K51, K52, XXX, XXX, K55, XXX, XXX, XXX, K59, K5A, K5B, K5C, K5D, K5E, K5F} \ +} + +#define LAYOUT_tkl_ansi_wkl( \ + K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K3D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K3E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K3F, \ + 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, K4E, \ + K50, K52, K55, K59, K5C, K5D, K5E, K5F \ +) { \ + {K00, XXX, 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, K2F}, \ + {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F}, \ + {K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, XXX, XXX, K4E, XXX}, \ + {K50, XXX, K52, XXX, XXX, K55, XXX, XXX, XXX, K59, XXX, XXX, K5C, K5D, K5E, K5F} \ +} diff --git a/keyboards/melgeek/mach80/readme.md b/keyboards/melgeek/mach80/readme.md new file mode 100755 index 00000000000..f4c8572c4d5 --- /dev/null +++ b/keyboards/melgeek/mach80/readme.md @@ -0,0 +1,21 @@ +# MelGeek Mach80 + +![Mach80](https://www.melgeek.com/collections/pcb-plate/products/melgeek-mach80-tkl87-hotswappable-rgb-pcba) + +A hotswap 80% RGB Custom Mechanical keyboard. + +* Keyboard Maintainer: [melgeek001365](https://github.com/melgeek001365) +* Hardware Supported: Mach80 rev1 20210819 +* Hardware Availability: [MelGeek](https://www.melgeek.com/) + +Make example for this keyboard (after setting up your build environment): + + make melgeek/mach80/rev1:default + +Enter the bootloader in 3 ways: + +**Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard * +**Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead * +**Keycode in layout**: Press the key mapped to `RESET` if it is available * + +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/mach80/rev1/config.h b/keyboards/melgeek/mach80/rev1/config.h new file mode 100755 index 00000000000..e3ae4de76d4 --- /dev/null +++ b/keyboards/melgeek/mach80/rev1/config.h @@ -0,0 +1,43 @@ +/* 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 + +/* + * 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, E6 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, D2, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, D3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +#define DRIVER_1_LED_TOTAL 97 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_INDICATOR_LED_TOTAL 3 + + +#define RGB_MATRIX_CENTER { 108, 30 } + diff --git a/keyboards/melgeek/mach80/rev1/rev1.c b/keyboards/melgeek/mach80/rev1/rev1.c new file mode 100755 index 00000000000..5a79708570c --- /dev/null +++ b/keyboards/melgeek/mach80/rev1/rev1.c @@ -0,0 +1,193 @@ +/* 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 "mach80.h" + +#ifdef RGB_MATRIX_ENABLE + + +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { + {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ + {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */ + {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */ + {0, CS9_SW4, CS8_SW4, CS7_SW4}, /* RGB4 */ + {0, CS9_SW5, CS8_SW5, CS7_SW5}, /* RGB5 */ + {0, CS9_SW6, CS8_SW6, CS7_SW6}, /* RGB6 */ + {0, CS9_SW7, CS8_SW7, CS7_SW7}, /* RGB7 */ + {0, CS9_SW8, CS8_SW8, CS7_SW8}, /* RGB8 */ + {0, CS9_SW9, CS8_SW9, CS7_SW9}, /* RGB9 */ + {0, CS27_SW1, CS26_SW1, CS25_SW1}, /* RGB65 */ + {0, CS27_SW2, CS26_SW2, CS25_SW2}, /* RGB56 */ + {0, CS27_SW3, CS26_SW3, CS25_SW3}, /* RGB57 */ + {0, CS27_SW4, CS26_SW4, CS25_SW4}, /* RGB58 */ + {0, CS27_SW5, CS26_SW5, CS25_SW5}, /* RGB59 */ + {0, CS27_SW6, CS26_SW6, CS25_SW6}, /* RGB67 */ + {0, CS27_SW7, CS26_SW7, CS25_SW7}, /* RGB68 */ + {0, CS12_SW1, CS11_SW1, CS10_SW1}, /* RGB10 */ + {0, CS12_SW2, CS11_SW2, CS10_SW2}, /* RGB11 */ + {0, CS12_SW3, CS11_SW3, CS10_SW3}, /* RGB12 */ + {0, CS12_SW4, CS11_SW4, CS10_SW4}, /* RGB13 */ + {0, CS12_SW5, CS11_SW5, CS10_SW5}, /* RGB14 */ + {0, CS12_SW6, CS11_SW6, CS10_SW6}, /* RGB15 */ + {0, CS12_SW7, CS11_SW7, CS10_SW7}, /* RGB16 */ + {0, CS12_SW8, CS11_SW8, CS10_SW8}, /* RGB17 */ + {0, CS12_SW9, CS11_SW9, CS10_SW9}, /* RGB18 */ + {0, CS27_SW8, CS26_SW8, CS25_SW8}, /* RGB69 */ + {0, CS27_SW9, CS26_SW9, CS25_SW9}, /* RGB70 */ + {0, CS30_SW1, CS29_SW1, CS28_SW1}, /* RGB64 */ + {0, CS30_SW2, CS29_SW2, CS28_SW2}, /* RGB55 */ + {0, CS30_SW3, CS29_SW3, CS28_SW3}, /* RGB71 */ + {0, CS30_SW4, CS29_SW4, CS28_SW4}, /* RGB72 */ + {0, CS30_SW5, CS29_SW5, CS28_SW5}, /* RGB66 */ + {0, CS30_SW6, CS29_SW6, CS28_SW6}, /* RGB60 */ + {0, CS30_SW7, CS29_SW7, CS28_SW7}, /* RGB61 */ + {0, CS30_SW8, CS29_SW8, CS28_SW8}, /* RGB73 */ + {0, CS15_SW1, CS14_SW1, CS13_SW1}, /* RGB19 */ + {0, CS15_SW2, CS14_SW2, CS13_SW2}, /* RGB20 */ + {0, CS15_SW3, CS14_SW3, CS13_SW3}, /* RGB21 */ + {0, CS15_SW4, CS14_SW4, CS13_SW4}, /* RGB22 */ + {0, CS15_SW5, CS14_SW5, CS13_SW5}, /* RGB23 */ + {0, CS15_SW6, CS14_SW6, CS13_SW6}, /* RGB24 */ + {0, CS15_SW7, CS14_SW7, CS13_SW7}, /* RGB25 */ + {0, CS15_SW8, CS14_SW8, CS13_SW8}, /* RGB26 */ + {0, CS15_SW9, CS14_SW9, CS13_SW9}, /* RGB27 */ + {0, CS30_SW9, CS29_SW9, CS28_SW9}, /* RGB74 */ + {0, CS33_SW1, CS32_SW1, CS31_SW1}, /* RGB75 */ + {0, CS33_SW2, CS32_SW2, CS31_SW2}, /* RGB76 */ + {0, CS33_SW3, CS32_SW3, CS31_SW3}, /* RGB77 */ + {0, CS33_SW4, CS32_SW4, CS31_SW4}, /* RGB78 */ + {0, CS33_SW5, CS32_SW5, CS31_SW5}, /* RGB79 */ + {0, CS33_SW6, CS32_SW6, CS31_SW6}, /* RGB80 */ + {0, CS33_SW7, CS32_SW7, CS31_SW7}, /* RGB83 */ + {0, CS18_SW1, CS17_SW1, CS16_SW1}, /* RGB28 */ + {0, CS18_SW2, CS17_SW2, CS16_SW2}, /* RGB29 */ + {0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB30 */ + {0, CS18_SW4, CS17_SW4, CS16_SW4}, /* RGB31 */ + {0, CS18_SW5, CS17_SW5, CS16_SW5}, /* RGB32 */ + {0, CS18_SW6, CS17_SW6, CS16_SW6}, /* RGB33 */ + {0, CS18_SW7, CS17_SW7, CS16_SW7}, /* RGB34 */ + {0, CS18_SW8, CS17_SW8, CS16_SW8}, /* RGB35 */ + {0, CS18_SW9, CS17_SW9, CS16_SW9}, /* RGB36 */ + {0, CS33_SW8, CS32_SW8, CS31_SW8}, /* RGB81 */ + {0, CS33_SW9, CS32_SW9, CS31_SW9}, /* RGB82 */ + {0, CS36_SW1, CS35_SW1, CS34_SW1}, /* RGB89 */ + {0, CS36_SW2, CS35_SW2, CS34_SW2}, /* RGB90 */ + {0, CS36_SW3, CS35_SW3, CS34_SW3}, /* RGB91 */ + {0, CS36_SW4, CS35_SW4, CS34_SW4}, /* RGB92 */ + {0, CS21_SW1, CS20_SW1, CS19_SW1}, /* RGB37 */ + {0, CS21_SW2, CS20_SW2, CS19_SW2}, /* RGB38 */ + {0, CS21_SW3, CS20_SW3, CS19_SW3}, /* RGB39 */ + {0, CS21_SW4, CS20_SW4, CS19_SW4}, /* RGB40 */ + {0, CS21_SW5, CS20_SW5, CS19_SW5}, /* RGB41 */ + {0, CS21_SW6, CS20_SW6, CS19_SW6}, /* RGB42 */ + {0, CS21_SW7, CS20_SW7, CS19_SW7}, /* RGB43 */ + {0, CS21_SW8, CS20_SW8, CS19_SW8}, /* RGB44 */ + {0, CS21_SW9, CS20_SW9, CS19_SW9}, /* RGB45 */ + {0, CS36_SW5, CS35_SW5, CS34_SW5}, /* RGB84 */ + {0, CS36_SW6, CS35_SW6, CS34_SW6}, /* RGB85 */ + {0, CS36_SW7, CS35_SW7, CS34_SW7}, /* RGB88 */ + {0, CS36_SW8, CS35_SW8, CS34_SW8}, /* RGB86 */ + {0, CS36_SW9, CS35_SW9, CS34_SW9}, /* RGB87 */ + {0, CS39_SW1, CS38_SW1, CS37_SW1}, /* RGB98 */ + {0, CS39_SW2, CS38_SW2, CS37_SW2}, /* RGB99 */ + {0, CS39_SW3, CS38_SW3, CS37_SW3}, /* RGB100 */ + {0, CS24_SW1, CS23_SW1, CS22_SW1}, /* RGB46 */ + {0, CS24_SW2, CS23_SW2, CS22_SW2}, /* RGB47 */ + {0, CS24_SW3, CS23_SW3, CS22_SW3}, /* RGB48 */ + {0, CS24_SW4, CS23_SW4, CS22_SW4}, /* RGB49 */ + {0, CS24_SW5, CS23_SW5, CS22_SW5}, /* RGB50 */ + {0, CS24_SW6, CS23_SW6, CS22_SW6}, /* RGB51 */ + {0, CS24_SW7, CS23_SW7, CS22_SW7}, /* RGB52 */ + {0, CS24_SW8, CS23_SW8, CS22_SW8}, /* RGB53 */ + {0, CS24_SW9, CS23_SW9, CS22_SW9}, /* RGB54 */ + {0, CS39_SW4, CS38_SW4, CS37_SW4}, /* RGB101 */ + {0, CS39_SW5, CS38_SW5, CS37_SW5}, /* RGB110 */ + {0, CS39_SW6, CS38_SW6, CS37_SW6}, /* RGB111 */ + {0, CS39_SW7, CS38_SW7, CS37_SW7}, /* RGB112 */ +}; +led_config_t g_led_config = { + { + /* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 */ + { 0, NO_LED, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, /* R0 */ + { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 32, 33 }, /* R1 */ + { 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50 }, /* R2 */ + { 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 15, 34, 51 }, /* R3 */ + { 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, NO_LED, NO_LED, 83, NO_LED }, /* R4 */ + { 84, 85, 86, NO_LED, NO_LED, 88, NO_LED, NO_LED, NO_LED, 90, 91, 92, 93, 94, 95, 96 } /* R5 */ + }, { + {0, 0}, {12, 0}, {24, 0}, {36, 0}, {48, 0}, {60, 0}, {72, 0}, {84, 0}, {96, 0}, {108, 0}, {120, 0}, {132, 0}, {144, 0}, {156, 0}, {168, 0}, {180, 0}, //16 + {0, 12}, {12, 12}, {24, 12}, {36, 12}, {48, 12}, {60, 12}, {72, 12}, {84, 12}, {96, 12}, {108, 12}, {120, 12}, {132, 12}, {144, 12}, {156, 12}, {168, 12}, {180, 12}, {192, 12}, {204, 12}, {216, 12}, //19 + {0, 24}, {12, 24}, {24, 24}, {36, 24}, {48, 24}, {60, 24}, {72, 24}, {84, 24}, {96, 24}, {108, 24}, {120, 24}, {132, 24}, {144, 24}, {156, 24}, {168, 24}, {180, 24}, {192, 24}, //17 + {0, 36}, {12, 36}, {24, 36}, {36, 36}, {48, 36}, {60, 36}, {72, 36}, {84, 36}, {96, 36}, {108, 36}, {120, 36}, {132, 36}, {144, 36}, {156, 36}, {168, 36}, //15 + {0, 48}, {12, 48}, {24, 48}, {36, 48}, {48, 48}, {60, 48}, {72, 48}, {84, 48}, {96, 48}, {108, 48}, {120, 48}, {132, 48}, {144, 48}, {156, 48}, {168, 48}, {180, 48}, {192, 48}, //17 + {0, 60}, {12, 60}, {24, 60}, {36, 60}, {48, 60}, {60, 60}, {72, 60}, {84, 60}, {96, 60}, {108, 60}, {120, 60}, {132, 60}, {144, 60} //13 + }, { + 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, 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, + } +}; + +const is31_led g_is31_indicator_leds[3] = { + {0, CS6_SW1, CS5_SW1, CS4_SW1}, /* RGB107 */ + {0, CS6_SW2, CS5_SW2, CS4_SW2}, /* RGB108 */ + {0, CS6_SW3, CS5_SW3, CS4_SW3}, /* RGB109 */ +}; + +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + if (led_state.caps_lock) { + IS31FL3741_set_pwm_buffer(&g_is31_indicator_leds[2], 0x00, 0x00, 0xff); + } else { + IS31FL3741_set_pwm_buffer(&g_is31_indicator_leds[2], 0x00, 0x00, 0x00); + } + + if (led_state.num_lock) { + IS31FL3741_set_pwm_buffer(&g_is31_indicator_leds[1], 0xff, 0x00, 0x00); + } else { + IS31FL3741_set_pwm_buffer(&g_is31_indicator_leds[1], 0x00, 0x00, 0x00); + } + + if (led_state.scroll_lock) { + IS31FL3741_set_pwm_buffer(&g_is31_indicator_leds[0], 0x00, 0xff, 0x00); + } else { + IS31FL3741_set_pwm_buffer(&g_is31_indicator_leds[0], 0x00, 0x00, 0x00); + } + } + return true; +} + +void matrix_init_kb(void) { + for (int i = 0; i < DRIVER_INDICATOR_LED_TOTAL; ++i) { + is31_led led = g_is31_indicator_leds[i]; + IS31FL3741_set_scaling_registers(&led, 0xFF, 0xFF, 0xFF); + } + + IS31FL3741_update_led_control_registers(DRIVER_ADDR_1, 0); + + matrix_init_user(); +} + + +void keyboard_pre_init_kb(void) { + setPinOutput(B7); + writePinHigh(B7); + keyboard_pre_init_user(); +} +#endif diff --git a/keyboards/melgeek/mach80/rev1/rules.mk b/keyboards/melgeek/mach80/rev1/rules.mk new file mode 100755 index 00000000000..a4d72064932 --- /dev/null +++ b/keyboards/melgeek/mach80/rev1/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 = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# 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 +RGB_MATRIX_ENABLE = yes # Use RGB matrix +RGB_MATRIX_DRIVER = IS31FL3741 + +LAYOUTS = tkl_ansi diff --git a/keyboards/mxss/rgblight.c b/keyboards/mxss/rgblight.c index d2d79815cd0..b2df351c55c 100644 --- a/keyboards/mxss/rgblight.c +++ b/keyboards/mxss/rgblight.c @@ -23,10 +23,6 @@ #ifdef EEPROM_ENABLE # include "eeprom.h" #endif -#ifdef STM32_EEPROM_ENABLE -# include -# include "eeprom_stm32.h" -#endif #include "wait.h" #include "progmem.h" #include "timer.h" diff --git a/keyboards/peranekofactory/tone/rev2/rev2.h b/keyboards/peranekofactory/tone/rev2/rev2.h index f5d3d7d0166..47f6423391e 100644 --- a/keyboards/peranekofactory/tone/rev2/rev2.h +++ b/keyboards/peranekofactory/tone/rev2/rev2.h @@ -27,8 +27,8 @@ * represents the switch matrix. */ #define LAYOUT( \ - K04, K05, K06, K07, \ - K00, K01, K02, K03 \ + K00, K01, K02, K03, \ + K04, K05, K06, K07 \ ) \ { \ { K00, K01, K02, K03, K04, K05, K06, K07 }, \ diff --git a/keyboards/primekb/prime_e/keymaps/peott-fr/keymap.c b/keyboards/primekb/prime_e/keymaps/peott-fr/keymap.c index d36fe3813fd..7724c2b4356 100644 --- a/keyboards/primekb/prime_e/keymaps/peott-fr/keymap.c +++ b/keyboards/primekb/prime_e/keymaps/peott-fr/keymap.c @@ -1,4 +1,4 @@ - 0414/* Copyright 2021 Pierre-Emmanuel Ott +/* Copyright 2021 Pierre-Emmanuel Ott * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,29 +35,29 @@ The 3 LEDs on the board show Caps Lock/L1/L2 respectively. L3 has no LED. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( - 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, - LCTL_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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, - LCTL_T(KC_MPRV), LALT_T(KC_MPLY), FN_NUM, SPC_LFT, BSP_FUNC, LGUI_T(KC_DEL), RALT_T(KC_HOME), RCTL_T(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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, 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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + LCTL_T(KC_MPRV), LALT_T(KC_MPLY), FN_NUM, SPC_LFT, BSP_FUNC, LGUI_T(KC_DEL), RALT_T(KC_HOME), RCTL_T(KC_END) + ), [_LEFTHAND] = LAYOUT( - 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_LCTL, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, - KC_LSFT, KC_CALC, KC_MYCM, KC_TRNS, KC_ENT, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, - KC_LCTL, KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_PGUP - ), + 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_ESC, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, + KC_LSFT, KC_CALC, KC_MYCM, KC_PSCR, KC_ENT, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RSFT, + KC_LCTL, KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_RGUI, KC_PGDN, KC_PGUP + ), [_NUM] = 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_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), + 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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_PLUS, KC_BSLS, + 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_RSFT, + KC_LCTL, KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_RGUI, KC_RALT, KC_RCTL + ), [_FUNC] = 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, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ) + 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_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, KC_TRNS, KC_TRNS, + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_RSFT, + KC_LCTL, KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_RGUI, KC_RALT, KC_RCTL + ) }; void matrix_init_user(void) { diff --git a/keyboards/sofle/keymaps/via/config.h b/keyboards/sofle/keymaps/via/config.h index 32139d8b1c2..c2e48ea7d25 100644 --- a/keyboards/sofle/keymaps/via/config.h +++ b/keyboards/sofle/keymaps/via/config.h @@ -1,19 +1,19 @@ /* 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 . - */ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 @@ -22,8 +22,16 @@ see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness for more options. */ -//Add RGB underglow +//Add RGB underglow and top facing lighting #define RGB_DI_PIN D3 -#define RGBLED_NUM 14 -#define RGBLED_SPLIT {7,7} -#define RGBLIGHT_ANIMATIONS \ No newline at end of file +#ifdef RGB_MATRIX_ENABLE +#define RGBLED_NUM 36 // Number of LEDs +#define DRIVER_LED_TOTAL RGBLED_NUM +#endif +#define RGBLED_NUM 70 +#define RGBLED_SPLIT {36,36} +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 diff --git a/keyboards/xbows/knight/config.h b/keyboards/xbows/knight/config.h index 2b15cbbb3fc..1c89b83ecfc 100644 --- a/keyboards/xbows/knight/config.h +++ b/keyboards/xbows/knight/config.h @@ -28,9 +28,12 @@ #define MATRIX_ROW_PINS { F7, F6, F5, F4, F1, F0 } #define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6 } #define DIODE_DIRECTION COL2ROW - #define DEBOUNCE 3 +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_LED_PROCESS_LIMIT 18 # define RGB_MATRIX_LED_FLUSH_LIMIT 16 @@ -39,7 +42,7 @@ # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 # define RGB_MATRIX_CENTER \ - { 92, 43 } + { 92, 33 } # define DRIVER_ADDR_1 0b1110100 # define DRIVER_ADDR_2 0b1110110 diff --git a/keyboards/xbows/knight/keymaps/default/config.h b/keyboards/xbows/knight/keymaps/default/config.h index 8e1b68f97f2..22a7112f8cc 100644 --- a/keyboards/xbows/knight/keymaps/default/config.h +++ b/keyboards/xbows/knight/keymaps/default/config.h @@ -17,27 +17,34 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set + +# define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue # define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes # define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right # define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right # define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAT // Single hue spinning spiral fades saturation +# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +# define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +# define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +# define DISABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back +# define DISABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left +# define DISABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right # define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation # define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -//# define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out # define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out # define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out -//# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out #endif diff --git a/keyboards/xbows/knight_plus/config.h b/keyboards/xbows/knight_plus/config.h index 6293a6ffb14..5282476b4f1 100644 --- a/keyboards/xbows/knight_plus/config.h +++ b/keyboards/xbows/knight_plus/config.h @@ -28,9 +28,12 @@ #define MATRIX_ROW_PINS { F7, F6, F5, F4, F1, F0 } #define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6 } #define DIODE_DIRECTION COL2ROW - #define DEBOUNCE 3 +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_LED_PROCESS_LIMIT 18 # define RGB_MATRIX_LED_FLUSH_LIMIT 16 diff --git a/keyboards/xbows/knight_plus/keymaps/default/config.h b/keyboards/xbows/knight_plus/keymaps/default/config.h index 8e1b68f97f2..22a7112f8cc 100644 --- a/keyboards/xbows/knight_plus/keymaps/default/config.h +++ b/keyboards/xbows/knight_plus/keymaps/default/config.h @@ -17,27 +17,34 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set + +# define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue # define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes # define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right # define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right # define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAT // Single hue spinning spiral fades saturation +# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +# define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +# define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +# define DISABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back +# define DISABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left +# define DISABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right # define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation # define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -//# define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out # define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out # define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out -//# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out #endif diff --git a/keyboards/xbows/nature/config.h b/keyboards/xbows/nature/config.h index e321f7ee1e6..2c886533bbc 100644 --- a/keyboards/xbows/nature/config.h +++ b/keyboards/xbows/nature/config.h @@ -28,31 +28,51 @@ #define MATRIX_ROW_PINS { F7, F6, F5, F4, F1, F0 } #define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6 } #define DIODE_DIRECTION COL2ROW - #define DEBOUNCE 3 +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_LED_PROCESS_LIMIT 18 # define RGB_MATRIX_LED_FLUSH_LIMIT 16 # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# 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 DISABLE_RGB_MATRIX_DIGITAL_RAIN +# define RGB_MATRIX_CENTER \ + { 92, 33 } + +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set +# define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +# define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support +# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes +# define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +# define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation +# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +# define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +# define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +# define DISABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back +# define DISABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left +# define DISABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right + +# define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +# define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! + +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +# define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +# define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out # define DRIVER_ADDR_1 0b1110100 # define DRIVER_ADDR_2 0b1110110 diff --git a/keyboards/xbows/nature/keymaps/via/keymap.c b/keyboards/xbows/nature/keymaps/via/keymap.c new file mode 100644 index 00000000000..dabbc6c9b3e --- /dev/null +++ b/keyboards/xbows/nature/keymaps/via/keymap.c @@ -0,0 +1,63 @@ +/* Copyright 2021 Shulin Huang + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Keymap VANILLA: (Base Layer) Default Layer + * + * |---------------------------------------------------------------------------------------------------------------------------------| + * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | Prtsc | + * |---------------------------------------------------------------------------------------------------------------------------------| + * | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | + * |---------------------------------------------------------------------------------------------------------------------------------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | [ | ] | \ | PgUp | + * |---------------------------------------------------------------------------------------------------------------------------------| + * | Ctl | A | S | D | F | G | Bksp | H | J | K | L | ; | '" | Enter | PgDn | + * |---------------------------------------------------------------------------------------------------------------------------------| + * |Shift| Z | X | C | V | B | Enter | N | M | , | . | /? | Shift| | Up | + * |---------------------------------------------------------------------------------------------------------------------------------| + * |Ctrl | GUI | Alter | Space | Ctrl | Shift | Space | Alter | FN | Ctrl | Lft | Dn | Rig | + * |---------------------------------------------------------------------------------------------------------------------------------| + */ + [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_DEL, KC_PSCR, + 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_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_BSPC, 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_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LCTL, KC_LSFT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + [1] = LAYOUT( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_MYCM, KC_MSEL, KC_MAIL, NK_TOGG, EEP_RST, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NLCK, + RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, + KC_TRNS, RGB_SPD, RGB_VAD, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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/xbows/nature/keymaps/via/rules.mk b/keyboards/xbows/nature/keymaps/via/rules.mk new file mode 100644 index 00000000000..1e5b99807cb --- /dev/null +++ b/keyboards/xbows/nature/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/xbows/numpad/config.h b/keyboards/xbows/numpad/config.h index 832da03a2c5..d3ef6ed9d12 100644 --- a/keyboards/xbows/numpad/config.h +++ b/keyboards/xbows/numpad/config.h @@ -28,9 +28,12 @@ #define MATRIX_ROW_PINS { B5, B4, C6, B6, D7, B3 } #define MATRIX_COL_PINS { D4, D6, B2, B1 } #define DIODE_DIRECTION COL2ROW - #define DEBOUNCE 3 +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_LED_PROCESS_LIMIT 18 # define RGB_MATRIX_LED_FLUSH_LIMIT 16 diff --git a/keyboards/xbows/numpad/keymaps/default/config.h b/keyboards/xbows/numpad/keymaps/default/config.h index c8235f51618..22a7112f8cc 100644 --- a/keyboards/xbows/numpad/keymaps/default/config.h +++ b/keyboards/xbows/numpad/keymaps/default/config.h @@ -13,31 +13,38 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - #pragma once +#pragma once - #ifdef RGB_MATRIX_ENABLE - # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set - # define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support - # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes - # define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right - # define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right - # define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation - # define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAT // Single hue spinning spiral fades saturation - # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in - # define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set - # define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation - # define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! +# define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +# define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support +# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes +# define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +# define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation +# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +# define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +# define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +# define DISABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back +# define DISABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left +# define DISABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right - # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out - # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out - # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out - # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out - # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out - # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out - //# define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out - # define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out - # define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out - //# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out +# define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +# define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! - #endif +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +# define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +# define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out + +#endif diff --git a/keyboards/xbows/numpad/numpad.c b/keyboards/xbows/numpad/numpad.c index 4e05473b67c..8f25152e338 100644 --- a/keyboards/xbows/numpad/numpad.c +++ b/keyboards/xbows/numpad/numpad.c @@ -33,14 +33,14 @@ {0, C9_4, C8_4, C7_4}, // L12 {0, C3_11, C2_11, C1_11}, // L13 - {0, C3_12, C2_12, C1_12}, // L14 - {0, C3_13, C2_13, C1_13}, // L15 - {0, C3_14, C2_14, C1_14}, // L16 + {0, C3_12, C2_12, C1_12}, // L14 + {0, C3_13, C2_13, C1_13}, // L15 + {0, C3_14, C2_14, C1_14}, // L16 {0, C6_9, C5_9, C4_9}, // L17 - {0, C6_10, C5_10, C4_10}, // L18 - {0, C6_11, C5_11, C4_11}, // L19 - {0, C6_14, C5_14, C4_14}, // L20 + {0, C6_10, C5_10, C4_10}, // L18 + {0, C6_11, C5_11, C4_11}, // L19 + {0, C6_14, C5_14, C4_14}, // L20 {0, C6_16, C5_16, C4_16}, // L21 {0, C6_15, C5_15, C4_15}, // L22 diff --git a/keyboards/xbows/numpad/rules.mk b/keyboards/xbows/numpad/rules.mk index 3abc8b3974f..c3b73b76602 100644 --- a/keyboards/xbows/numpad/rules.mk +++ b/keyboards/xbows/numpad/rules.mk @@ -14,7 +14,6 @@ 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 = yes # Breathing sleep LED during USB suspend -NO_USB_STARTUP_CHECK = no # Disables usb supend check after keyboard startup # 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 diff --git a/keyboards/xbows/ranger/config.h b/keyboards/xbows/ranger/config.h index fda06228d82..7a67afd7dad 100644 --- a/keyboards/xbows/ranger/config.h +++ b/keyboards/xbows/ranger/config.h @@ -40,7 +40,6 @@ # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES -# define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 # define RGB_MATRIX_CENTER { 103, 32 } # define DRIVER_ADDR_1 0b1110100 diff --git a/keyboards/xbows/ranger/keymaps/default/config.h b/keyboards/xbows/ranger/keymaps/default/config.h index 56b98fd46da..22a7112f8cc 100644 --- a/keyboards/xbows/ranger/keymaps/default/config.h +++ b/keyboards/xbows/ranger/keymaps/default/config.h @@ -28,9 +28,11 @@ # define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness # define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right # define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard # define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard # define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation # define DISABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back # define DISABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left # define DISABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right diff --git a/platforms/chibios/boards/common/ld/STM32F401xC.ld b/platforms/chibios/boards/common/ld/STM32F401xC.ld new file mode 100644 index 00000000000..8fae66cec9a --- /dev/null +++ b/platforms/chibios/boards/common/ld/STM32F401xC.ld @@ -0,0 +1,85 @@ +/* + 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. +*/ + +/* + * STM32F401xC memory setup. + */ +MEMORY +{ + flash0 (rx) : org = 0x08000000, len = 16k /* Sector 0 - Init code as ROM bootloader assumes application starts here */ + flash1 (rx) : org = 0x08004000, len = 16k /* Sector 1 - Emulated eeprom */ + flash2 (rx) : org = 0x08008000, len = 256k - 32k /* Sector 2..6 - Rest of firmware */ + flash3 (rx) : org = 0x00000000, len = 0 + flash4 (rx) : org = 0x00000000, len = 0 + flash5 (rx) : org = 0x00000000, len = 0 + flash6 (rx) : org = 0x00000000, len = 0 + flash7 (rx) : org = 0x00000000, len = 0 + ram0 (wx) : org = 0x20000000, len = 64k + ram1 (wx) : org = 0x00000000, len = 0 + ram2 (wx) : org = 0x00000000, len = 0 + ram3 (wx) : org = 0x00000000, len = 0 + ram4 (wx) : org = 0x00000000, len = 0 + ram5 (wx) : org = 0x00000000, len = 0 + ram6 (wx) : org = 0x00000000, len = 0 + ram7 (wx) : org = 0x00000000, len = 0 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash2); +REGION_ALIAS("XTORS_FLASH_LMA", flash2); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash2); +REGION_ALIAS("TEXT_FLASH_LMA", flash2); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash2); +REGION_ALIAS("RODATA_FLASH_LMA", flash2); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash2); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash2); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/platforms/chibios/boards/common/ld/STM32F411xE.ld b/platforms/chibios/boards/common/ld/STM32F411xE.ld new file mode 100644 index 00000000000..aea8084b516 --- /dev/null +++ b/platforms/chibios/boards/common/ld/STM32F411xE.ld @@ -0,0 +1,85 @@ +/* + 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. +*/ + +/* + * STM32F411xE memory setup. + */ +MEMORY +{ + flash0 (rx) : org = 0x08000000, len = 16k /* Sector 0 - Init code as ROM bootloader assumes application starts here */ + flash1 (rx) : org = 0x08004000, len = 16k /* Sector 1 - Emulated eeprom */ + flash2 (rx) : org = 0x08008000, len = 512k - 32k /* Sector 2..7 - Rest of firmware */ + flash3 (rx) : org = 0x00000000, len = 0 + flash4 (rx) : org = 0x00000000, len = 0 + flash5 (rx) : org = 0x00000000, len = 0 + flash6 (rx) : org = 0x00000000, len = 0 + flash7 (rx) : org = 0x00000000, len = 0 + ram0 (wx) : org = 0x20000000, len = 128k + ram1 (wx) : org = 0x00000000, len = 0 + ram2 (wx) : org = 0x00000000, len = 0 + ram3 (wx) : org = 0x00000000, len = 0 + ram4 (wx) : org = 0x00000000, len = 0 + ram5 (wx) : org = 0x00000000, len = 0 + ram6 (wx) : org = 0x00000000, len = 0 + ram7 (wx) : org = 0x00000000, len = 0 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash2); +REGION_ALIAS("XTORS_FLASH_LMA", flash2); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash2); +REGION_ALIAS("TEXT_FLASH_LMA", flash2); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash2); +REGION_ALIAS("RODATA_FLASH_LMA", flash2); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash2); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash2); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/platforms/chibios/drivers/i2c_master.c b/platforms/chibios/drivers/i2c_master.c index 9af5c71c3f9..471901c2bef 100644 --- a/platforms/chibios/drivers/i2c_master.c +++ b/platforms/chibios/drivers/i2c_master.c @@ -71,8 +71,8 @@ __attribute__((weak)) void i2c_init(void) { palSetLineMode(I2C1_SCL_PIN, I2C1_SCL_PAL_MODE); palSetLineMode(I2C1_SDA_PIN, I2C1_SDA_PAL_MODE); #else - palSetLineMode(I2C1_SCL_PIN, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); - palSetLineMode(I2C1_SDA_PIN, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); + palSetLineMode(I2C1_SCL_PIN, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_MODE_OUTPUT_OPENDRAIN); + palSetLineMode(I2C1_SDA_PIN, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_MODE_OUTPUT_OPENDRAIN); #endif } } diff --git a/platforms/chibios/drivers/i2c_master.h b/platforms/chibios/drivers/i2c_master.h index 303aa69907b..ce32fd2457a 100644 --- a/platforms/chibios/drivers/i2c_master.h +++ b/platforms/chibios/drivers/i2c_master.h @@ -70,10 +70,10 @@ #ifdef USE_GPIOV1 # ifndef I2C1_SCL_PAL_MODE -# define I2C1_SCL_PAL_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN +# define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATE_OPENDRAIN # endif # ifndef I2C1_SDA_PAL_MODE -# define I2C1_SDA_PAL_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN +# define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATE_OPENDRAIN # endif #else // The default PAL alternate modes are used to signal that the pins are used for I2C diff --git a/platforms/chibios/drivers/serial.c b/platforms/chibios/drivers/serial.c index f54fbcee4ec..ef6f0aa8d5f 100644 --- a/platforms/chibios/drivers/serial.c +++ b/platforms/chibios/drivers/serial.c @@ -19,7 +19,7 @@ # error "chSysPolledDelayX method not supported on this platform" #else # undef wait_us -# define wait_us(x) chSysPolledDelayX(US2RTC(STM32_SYSCLK, x)) +# define wait_us(x) chSysPolledDelayX(US2RTC(CPU_CLOCK, x)) #endif #ifndef SELECT_SOFT_SERIAL_SPEED diff --git a/platforms/chibios/drivers/serial_usart.c b/platforms/chibios/drivers/serial_usart.c index ea4473791cc..c05003b12ee 100644 --- a/platforms/chibios/drivers/serial_usart.c +++ b/platforms/chibios/drivers/serial_usart.c @@ -104,9 +104,9 @@ static inline bool receive(uint8_t* destination, const size_t size) { __attribute__((weak)) void usart_init(void) { # if defined(MCU_STM32) # if defined(USE_GPIOV1) - palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_STM32_ALTERNATE_OPENDRAIN); + palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE_OPENDRAIN); # else - palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_TX_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); + palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_TX_PAL_MODE) | PAL_MODE_OUTPUT_OPENDRAIN); # endif # if defined(USART_REMAP) @@ -125,11 +125,11 @@ __attribute__((weak)) void usart_init(void) { __attribute__((weak)) void usart_init(void) { # if defined(MCU_STM32) # if defined(USE_GPIOV1) - palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_STM32_ALTERNATE_PUSHPULL); + palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE_PUSHPULL); palSetLineMode(SERIAL_USART_RX_PIN, PAL_MODE_INPUT); # else - palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_TX_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); - palSetLineMode(SERIAL_USART_RX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_RX_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); + palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_TX_PAL_MODE) | PAL_MODE_OUTPUT_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST); + palSetLineMode(SERIAL_USART_RX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_RX_PAL_MODE) | PAL_MODE_OUTPUT_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST); # endif # if defined(USART_REMAP) diff --git a/platforms/chibios/drivers/spi_master.c b/platforms/chibios/drivers/spi_master.c index 28ddcbb2ba6..6495dd6e69a 100644 --- a/platforms/chibios/drivers/spi_master.c +++ b/platforms/chibios/drivers/spi_master.c @@ -42,9 +42,9 @@ __attribute__((weak)) void spi_init(void) { palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), SPI_MOSI_PAL_MODE); palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), SPI_MISO_PAL_MODE); #else - palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_ALTERNATE(SPI_SCK_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); - palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_ALTERNATE(SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); - palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_ALTERNATE(SPI_MISO_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); + palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_ALTERNATE(SPI_SCK_PAL_MODE) | PAL_MODE_OUTPUT_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST); + palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_ALTERNATE(SPI_MOSI_PAL_MODE) | PAL_MODE_OUTPUT_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST); + palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_ALTERNATE(SPI_MISO_PAL_MODE) | PAL_MODE_OUTPUT_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST); #endif } } diff --git a/platforms/chibios/drivers/spi_master.h b/platforms/chibios/drivers/spi_master.h index b5a6ef1437d..6a3ce481f1a 100644 --- a/platforms/chibios/drivers/spi_master.h +++ b/platforms/chibios/drivers/spi_master.h @@ -33,7 +33,7 @@ #ifndef SPI_SCK_PAL_MODE # if defined(USE_GPIOV1) -# define SPI_SCK_PAL_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL +# define SPI_SCK_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL # else # define SPI_SCK_PAL_MODE 5 # endif @@ -45,7 +45,7 @@ #ifndef SPI_MOSI_PAL_MODE # if defined(USE_GPIOV1) -# define SPI_MOSI_PAL_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL +# define SPI_MOSI_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL # else # define SPI_MOSI_PAL_MODE 5 # endif @@ -57,7 +57,7 @@ #ifndef SPI_MISO_PAL_MODE # if defined(USE_GPIOV1) -# define SPI_MISO_PAL_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL +# define SPI_MISO_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL # else # define SPI_MISO_PAL_MODE 5 # endif diff --git a/platforms/chibios/drivers/uart.c b/platforms/chibios/drivers/uart.c index 030335b342f..4744935da30 100644 --- a/platforms/chibios/drivers/uart.c +++ b/platforms/chibios/drivers/uart.c @@ -29,11 +29,11 @@ void uart_init(uint32_t baud) { serialConfig.speed = baud; #if defined(USE_GPIOV1) - palSetLineMode(SD1_TX_PIN, PAL_MODE_STM32_ALTERNATE_OPENDRAIN); - palSetLineMode(SD1_RX_PIN, PAL_MODE_STM32_ALTERNATE_OPENDRAIN); + palSetLineMode(SD1_TX_PIN, PAL_MODE_ALTERNATE_OPENDRAIN); + palSetLineMode(SD1_RX_PIN, PAL_MODE_ALTERNATE_OPENDRAIN); #else - palSetLineMode(SD1_TX_PIN, PAL_MODE_ALTERNATE(SD1_TX_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); - palSetLineMode(SD1_RX_PIN, PAL_MODE_ALTERNATE(SD1_RX_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); + palSetLineMode(SD1_TX_PIN, PAL_MODE_ALTERNATE(SD1_TX_PAL_MODE) | PAL_MODE_OUTPUT_OPENDRAIN); + palSetLineMode(SD1_RX_PIN, PAL_MODE_ALTERNATE(SD1_RX_PAL_MODE) | PAL_MODE_OUTPUT_OPENDRAIN); #endif sdStart(&SERIAL_DRIVER, &serialConfig); } diff --git a/platforms/chibios/drivers/ws2812.c b/platforms/chibios/drivers/ws2812.c index 0d12e2fb79a..ffcdcff2421 100644 --- a/platforms/chibios/drivers/ws2812.c +++ b/platforms/chibios/drivers/ws2812.c @@ -23,7 +23,7 @@ #endif #define NUMBER_NOPS 6 -#define CYCLES_PER_SEC (STM32_SYSCLK / NUMBER_NOPS * NOP_FUDGE) +#define CYCLES_PER_SEC (CPU_CLOCK / NUMBER_NOPS * NOP_FUDGE) #define NS_PER_SEC (1000000000L) // Note that this has to be SIGNED since we want to be able to check for negative values of derivatives #define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC) #define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE) diff --git a/platforms/chibios/drivers/ws2812_pwm.c b/platforms/chibios/drivers/ws2812_pwm.c index e6af55b6b36..0a6f6e3e31b 100644 --- a/platforms/chibios/drivers/ws2812_pwm.c +++ b/platforms/chibios/drivers/ws2812_pwm.c @@ -40,15 +40,15 @@ // Default Push Pull #ifndef WS2812_EXTERNAL_PULLUP # if defined(USE_GPIOV1) -# define WS2812_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL +# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE_PUSHPULL # else -# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_PWM_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING +# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_PWM_PAL_MODE) | PAL_MODE_OUTPUT_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST | PAL_PUPDR_FLOATING # endif #else # if defined(USE_GPIOV1) -# define WS2812_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN +# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE_PUSHPULL # else -# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_PWM_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING +# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_PWM_PAL_MODE) | PAL_MODE_OUTPUT_OPENDRAIN | PAL_OUTPUT_SPEED_HIGHEST | PAL_PUPDR_FLOATING # endif #endif @@ -59,7 +59,7 @@ /* --- PRIVATE CONSTANTS ---------------------------------------------------- */ -#define WS2812_PWM_FREQUENCY (STM32_SYSCLK / 2) /**< Clock frequency of PWM, must be valid with respect to system clock! */ +#define WS2812_PWM_FREQUENCY (CPU_CLOCK / 2) /**< Clock frequency of PWM, must be valid with respect to system clock! */ #define WS2812_PWM_PERIOD (WS2812_PWM_FREQUENCY / WS2812_PWM_TARGET_PERIOD) /**< Clock period in ticks. 1 / 800kHz = 1.25 uS (as per datasheet) */ /** diff --git a/platforms/chibios/drivers/ws2812_spi.c b/platforms/chibios/drivers/ws2812_spi.c index fe14b478ab6..fb0bd2386c8 100644 --- a/platforms/chibios/drivers/ws2812_spi.c +++ b/platforms/chibios/drivers/ws2812_spi.c @@ -24,15 +24,15 @@ // Default Push Pull #ifndef WS2812_EXTERNAL_PULLUP # if defined(USE_GPIOV1) -# define WS2812_MOSI_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL +# define WS2812_MOSI_OUTPUT_MODE PAL_MODE_ALTERNATE_PUSHPULL # else -# define WS2812_MOSI_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL +# define WS2812_MOSI_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_SPI_MOSI_PAL_MODE) | PAL_MODE_OUTPUT_PUSHPULL # endif #else # if defined(USE_GPIOV1) -# define WS2812_MOSI_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN +# define WS2812_MOSI_OUTPUT_MODE PAL_MODE_ALTERNATE_OPENDRAIN # else -# define WS2812_MOSI_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN +# define WS2812_MOSI_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_SPI_MOSI_PAL_MODE) | PAL_MODE_OUTPUT_OPENDRAIN # endif #endif @@ -68,9 +68,9 @@ #endif #if defined(USE_GPIOV1) -# define WS2812_SCK_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL +# define WS2812_SCK_OUTPUT_MODE PAL_MODE_ALTERNATE_PUSHPULL #else -# define WS2812_SCK_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_SPI_SCK_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL +# define WS2812_SCK_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_SPI_SCK_PAL_MODE) | PAL_MODE_OUTPUT_PUSHPULL #endif #define BYTES_FOR_LED_BYTE 4 diff --git a/quantum/action.c b/quantum/action.c index be135f18f20..95f39d23d45 100644 --- a/quantum/action.c +++ b/quantum/action.c @@ -18,6 +18,7 @@ along with this program. If not, see . #include "keycode.h" #include "keyboard.h" #include "mousekey.h" +#include "programmable_button.h" #include "command.h" #include "led.h" #include "action_layer.h" @@ -988,6 +989,10 @@ void clear_keyboard_but_mods_and_keys() { mousekey_clear(); mousekey_send(); #endif +#ifdef PROGRAMMABLE_BUTTON_ENABLE + programmable_button_clear(); + programmable_button_send(); +#endif } /** \brief Utilities for actions. (FIXME: Needs better description) diff --git a/quantum/audio/driver_chibios_pwm_hardware.c b/quantum/audio/driver_chibios_pwm_hardware.c index 3c7d89b290b..cd40019ee7c 100644 --- a/quantum/audio/driver_chibios_pwm_hardware.c +++ b/quantum/audio/driver_chibios_pwm_hardware.c @@ -109,9 +109,9 @@ void audio_driver_initialize(void) { // connect the AUDIO_PIN to the PWM hardware #if defined(USE_GPIOV1) // STM32F103C8 - palSetLineMode(AUDIO_PIN, PAL_MODE_STM32_ALTERNATE_PUSHPULL); + palSetLineMode(AUDIO_PIN, PAL_MODE_ALTERNATE_PUSHPULL); #else // GPIOv2 (or GPIOv3 for f4xx, which is the same/compatible at this command) - palSetLineMode(AUDIO_PIN, PAL_STM32_MODE_ALTERNATE | PAL_STM32_ALTERNATE(AUDIO_PWM_PAL_MODE)); + palSetLineMode(AUDIO_PIN, PAL_MODE_ALTERNATE(AUDIO_PWM_PAL_MODE)); #endif gptStart(&AUDIO_STATE_TIMER, &gptCFG); diff --git a/quantum/backlight/backlight_chibios.c b/quantum/backlight/backlight_chibios.c index 4d5a69e14e3..7c6edd10d6e 100644 --- a/quantum/backlight/backlight_chibios.c +++ b/quantum/backlight/backlight_chibios.c @@ -8,9 +8,13 @@ # define BACKLIGHT_LIMIT_VAL 255 #endif -// GPIOV2 && GPIOV3 #ifndef BACKLIGHT_PAL_MODE -# define BACKLIGHT_PAL_MODE 2 +# if defined(USE_GPIOV1) +# define BACKLIGHT_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL +# else +// GPIOV2 && GPIOV3 +# define BACKLIGHT_PAL_MODE 5 +# endif #endif // GENERIC @@ -70,7 +74,7 @@ static uint32_t rescale_limit_val(uint32_t val) { void backlight_init_ports(void) { #ifdef USE_GPIOV1 - palSetPadMode(PAL_PORT(BACKLIGHT_PIN), PAL_PAD(BACKLIGHT_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL); + palSetPadMode(PAL_PORT(BACKLIGHT_PIN), PAL_PAD(BACKLIGHT_PIN), BACKLIGHT_PAL_MODE); #else palSetPadMode(PAL_PORT(BACKLIGHT_PIN), PAL_PAD(BACKLIGHT_PIN), PAL_MODE_ALTERNATE(BACKLIGHT_PAL_MODE)); #endif diff --git a/quantum/eeconfig.c b/quantum/eeconfig.c index 92f0ac44399..4c2ad2490ce 100644 --- a/quantum/eeconfig.c +++ b/quantum/eeconfig.c @@ -4,11 +4,6 @@ #include "eeconfig.h" #include "action_layer.h" -#ifdef STM32_EEPROM_ENABLE -# include -# include "eeprom_stm32.h" -#endif - #if defined(EEPROM_DRIVER) # include "eeprom_driver.h" #endif @@ -43,9 +38,6 @@ __attribute__((weak)) void eeconfig_init_kb(void) { * FIXME: needs doc */ void eeconfig_init_quantum(void) { -#ifdef STM32_EEPROM_ENABLE - EEPROM_Erase(); -#endif #if defined(EEPROM_DRIVER) eeprom_driver_erase(); #endif @@ -111,9 +103,6 @@ void eeconfig_enable(void) { eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_N * FIXME: needs doc */ void eeconfig_disable(void) { -#ifdef STM32_EEPROM_ENABLE - EEPROM_Erase(); -#endif #if defined(EEPROM_DRIVER) eeprom_driver_erase(); #endif diff --git a/quantum/keyboard.c b/quantum/keyboard.c index b98fc64e453..6054faa03b7 100644 --- a/quantum/keyboard.c +++ b/quantum/keyboard.c @@ -76,6 +76,9 @@ along with this program. If not, see . #ifdef JOYSTICK_ENABLE # include "process_joystick.h" #endif +#ifdef PROGRAMMABLE_BUTTON_ENABLE +# include "programmable_button.h" +#endif #ifdef HD44780_ENABLE # include "hd44780.h" #endif @@ -97,9 +100,6 @@ along with this program. If not, see . #ifdef DIP_SWITCH_ENABLE # include "dip_switch.h" #endif -#ifdef STM32_EEPROM_ENABLE -# include "eeprom_stm32.h" -#endif #ifdef EEPROM_DRIVER # include "eeprom_driver.h" #endif @@ -246,9 +246,6 @@ void keyboard_setup(void) { disable_jtag(); #endif print_set_sendchar(sendchar); -#ifdef STM32_EEPROM_ENABLE - EEPROM_Init(); -#endif #ifdef EEPROM_DRIVER eeprom_driver_init(); #endif @@ -548,6 +545,10 @@ MATRIX_LOOP_END: digitizer_task(); #endif +#ifdef PROGRAMMABLE_BUTTON_ENABLE + programmable_button_send(); +#endif + // update LED if (led_status != host_keyboard_leds()) { led_status = host_keyboard_leds(); diff --git a/quantum/process_keycode/process_programmable_button.c b/quantum/process_keycode/process_programmable_button.c new file mode 100644 index 00000000000..c6e77faacc0 --- /dev/null +++ b/quantum/process_keycode/process_programmable_button.c @@ -0,0 +1,31 @@ +/* +Copyright 2021 Thomas Weißschuh + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "process_programmable_button.h" +#include "programmable_button.h" + +bool process_programmable_button(uint16_t keycode, keyrecord_t *record) { + if (keycode >= PROGRAMMABLE_BUTTON_MIN && keycode <= PROGRAMMABLE_BUTTON_MAX) { + uint8_t button = keycode - PROGRAMMABLE_BUTTON_MIN + 1; + if (record->event.pressed) { + programmable_button_on(button); + } else { + programmable_button_off(button); + } + } + return true; +} diff --git a/quantum/process_keycode/process_programmable_button.h b/quantum/process_keycode/process_programmable_button.h new file mode 100644 index 00000000000..47c6ce56144 --- /dev/null +++ b/quantum/process_keycode/process_programmable_button.h @@ -0,0 +1,23 @@ +/* +Copyright 2021 Thomas Weißschuh + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 "quantum.h" + +bool process_programmable_button(uint16_t keycode, keyrecord_t *record); diff --git a/quantum/programmable_button.c b/quantum/programmable_button.c new file mode 100644 index 00000000000..be828fd17cd --- /dev/null +++ b/quantum/programmable_button.c @@ -0,0 +1,37 @@ +/* +Copyright 2021 Thomas Weißschuh + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "programmable_button.h" +#include "host.h" + +#define REPORT_BIT(index) (((uint32_t)1) << (index - 1)) + +static uint32_t programmable_button_report = 0; + +void programmable_button_clear(void) { programmable_button_report = 0; } + +void programmable_button_send(void) { host_programmable_button_send(programmable_button_report); } + +void programmable_button_on(uint8_t index) { programmable_button_report |= REPORT_BIT(index); } + +void programmable_button_off(uint8_t index) { programmable_button_report &= ~REPORT_BIT(index); } + +bool programmable_button_is_on(uint8_t index) { return !!(programmable_button_report & REPORT_BIT(index)); }; + +uint32_t programmable_button_get_report(void) { return programmable_button_report; }; + +void programmable_button_set_report(uint32_t report) { programmable_button_report = report; } diff --git a/quantum/programmable_button.h b/quantum/programmable_button.h new file mode 100644 index 00000000000..e89b8b9fd6a --- /dev/null +++ b/quantum/programmable_button.h @@ -0,0 +1,30 @@ +/* +Copyright 2021 Thomas Weißschuh + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 +#include "report.h" + +void programmable_button_clear(void); +void programmable_button_send(void); +void programmable_button_on(uint8_t index); +void programmable_button_off(uint8_t index); +bool programmable_button_is_on(uint8_t index); +uint32_t programmable_button_get_report(void); +void programmable_button_set_report(uint32_t report); diff --git a/quantum/quantum.c b/quantum/quantum.c index 9d77fa4383d..326c8370b11 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -295,6 +295,9 @@ bool process_record_quantum(keyrecord_t *record) { #endif #ifdef JOYSTICK_ENABLE process_joystick(keycode, record) && +#endif +#ifdef PROGRAMMABLE_BUTTON_ENABLE + process_programmable_button(keycode, record) && #endif true)) { return false; diff --git a/quantum/quantum.h b/quantum/quantum.h index a0e767520d3..ec7879fc88e 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -147,6 +147,10 @@ extern layer_state_t layer_state; # include "process_joystick.h" #endif +#ifdef PROGRAMMABLE_BUTTON_ENABLE +# include "process_programmable_button.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 ef4b0f457b4..2ea81dd4c8a 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -524,6 +524,40 @@ enum quantum_keycodes { // Additional magic key MAGIC_TOGGLE_GUI, + // Programmable Button + PROGRAMMABLE_BUTTON_1, + PROGRAMMABLE_BUTTON_2, + PROGRAMMABLE_BUTTON_3, + PROGRAMMABLE_BUTTON_4, + PROGRAMMABLE_BUTTON_5, + PROGRAMMABLE_BUTTON_6, + PROGRAMMABLE_BUTTON_7, + PROGRAMMABLE_BUTTON_8, + PROGRAMMABLE_BUTTON_9, + PROGRAMMABLE_BUTTON_10, + PROGRAMMABLE_BUTTON_11, + PROGRAMMABLE_BUTTON_12, + PROGRAMMABLE_BUTTON_13, + PROGRAMMABLE_BUTTON_14, + PROGRAMMABLE_BUTTON_15, + PROGRAMMABLE_BUTTON_16, + PROGRAMMABLE_BUTTON_17, + PROGRAMMABLE_BUTTON_18, + PROGRAMMABLE_BUTTON_19, + PROGRAMMABLE_BUTTON_20, + PROGRAMMABLE_BUTTON_21, + PROGRAMMABLE_BUTTON_22, + PROGRAMMABLE_BUTTON_23, + PROGRAMMABLE_BUTTON_24, + PROGRAMMABLE_BUTTON_25, + PROGRAMMABLE_BUTTON_26, + PROGRAMMABLE_BUTTON_27, + PROGRAMMABLE_BUTTON_28, + PROGRAMMABLE_BUTTON_29, + PROGRAMMABLE_BUTTON_30, + PROGRAMMABLE_BUTTON_31, + PROGRAMMABLE_BUTTON_32, + // Start of custom keycode range for keyboards and keymaps - always leave at the end SAFE_RANGE }; @@ -854,3 +888,39 @@ enum quantum_keycodes { #define OS_TOGG ONESHOT_TOGGLE #define OS_ON ONESHOT_ENABLE #define OS_OFF ONESHOT_DISABLE + +// Programmable Button aliases +#define PB_1 PROGRAMMABLE_BUTTON_1 +#define PB_2 PROGRAMMABLE_BUTTON_2 +#define PB_3 PROGRAMMABLE_BUTTON_3 +#define PB_4 PROGRAMMABLE_BUTTON_4 +#define PB_5 PROGRAMMABLE_BUTTON_5 +#define PB_6 PROGRAMMABLE_BUTTON_6 +#define PB_7 PROGRAMMABLE_BUTTON_7 +#define PB_8 PROGRAMMABLE_BUTTON_8 +#define PB_9 PROGRAMMABLE_BUTTON_9 +#define PB_10 PROGRAMMABLE_BUTTON_10 +#define PB_11 PROGRAMMABLE_BUTTON_11 +#define PB_12 PROGRAMMABLE_BUTTON_12 +#define PB_13 PROGRAMMABLE_BUTTON_13 +#define PB_14 PROGRAMMABLE_BUTTON_14 +#define PB_15 PROGRAMMABLE_BUTTON_15 +#define PB_16 PROGRAMMABLE_BUTTON_16 +#define PB_17 PROGRAMMABLE_BUTTON_17 +#define PB_18 PROGRAMMABLE_BUTTON_18 +#define PB_19 PROGRAMMABLE_BUTTON_19 +#define PB_20 PROGRAMMABLE_BUTTON_20 +#define PB_21 PROGRAMMABLE_BUTTON_21 +#define PB_22 PROGRAMMABLE_BUTTON_22 +#define PB_23 PROGRAMMABLE_BUTTON_23 +#define PB_24 PROGRAMMABLE_BUTTON_24 +#define PB_25 PROGRAMMABLE_BUTTON_25 +#define PB_26 PROGRAMMABLE_BUTTON_26 +#define PB_27 PROGRAMMABLE_BUTTON_27 +#define PB_28 PROGRAMMABLE_BUTTON_28 +#define PB_29 PROGRAMMABLE_BUTTON_29 +#define PB_30 PROGRAMMABLE_BUTTON_30 +#define PB_31 PROGRAMMABLE_BUTTON_31 +#define PB_32 PROGRAMMABLE_BUTTON_32 +#define PROGRAMMABLE_BUTTON_MIN PROGRAMMABLE_BUTTON_1 +#define PROGRAMMABLE_BUTTON_MAX PROGRAMMABLE_BUTTON_32 diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c index bfaedaa4a07..2cec162e22c 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix/rgb_matrix_drivers.c @@ -172,7 +172,12 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color_all = IS31FL3737_set_color_all, }; # else -static void flush(void) { IS31FL3741_update_pwm_buffers(DRIVER_ADDR_1, DRIVER_ADDR_2); } +static void flush(void) { + IS31FL3741_update_pwm_buffers(DRIVER_ADDR_1, 0); +# if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility + IS31FL3741_update_pwm_buffers(DRIVER_ADDR_2, 1); +# endif +} const rgb_matrix_driver_t rgb_matrix_driver = { .init = init, diff --git a/show_options.mk b/show_options.mk index cb3a32d39a0..35d0c2daadc 100644 --- a/show_options.mk +++ b/show_options.mk @@ -83,7 +83,8 @@ OTHER_OPTION_NAMES = \ RGB_MATRIX_KEYPRESSES \ LED_MIRRORED \ RGBLIGHT_FULL_POWER \ - LTO_ENABLE + LTO_ENABLE \ + PROGRAMMABLE_BUTTON_ENABLE define NAME_ECHO @printf " %-30s = %-16s # %s\\n" "$1" "$($1)" "$(origin $1)" diff --git a/tmk_core/common/chibios/_wait.h b/tmk_core/common/chibios/_wait.h index b740afbd242..2f36c64a2e6 100644 --- a/tmk_core/common/chibios/_wait.h +++ b/tmk_core/common/chibios/_wait.h @@ -43,8 +43,6 @@ void wait_us(uint16_t duration); #include "_wait.c" -#define CPU_CLOCK STM32_SYSCLK - /* For GPIOs on ARM-based MCUs, the input pins are sampled by the clock of the bus * to which the GPIO is connected. * The connected buses differ depending on the various series of MCUs. diff --git a/tmk_core/common/chibios/chibios_config.h b/tmk_core/common/chibios/chibios_config.h index 23c65f94284..6a57d889bb9 100644 --- a/tmk_core/common/chibios/chibios_config.h +++ b/tmk_core/common/chibios/chibios_config.h @@ -19,22 +19,31 @@ # define SPLIT_USB_DETECT // Force this on when dedicated pin is not used #endif -#if defined(STM32F1XX) -# define USE_GPIOV1 -#endif +// STM32 compatibility +#if defined(MCU_STM32) +# define CPU_CLOCK STM32_SYSCLK -#if defined(STM32F1XX) || defined(STM32F2XX) || defined(STM32F4XX) || defined(STM32L1XX) -# define USE_I2CV1 -#endif +# if defined(STM32F1XX) +# define USE_GPIOV1 +# define PAL_MODE_ALTERNATE_OPENDRAIN PAL_MODE_STM32_ALTERNATE_OPENDRAIN +# define PAL_MODE_ALTERNATE_PUSHPULL PAL_MODE_STM32_ALTERNATE_PUSHPULL +# else +# define PAL_OUTPUT_SPEED_HIGHEST PAL_STM32_OSPEED_HIGHEST +# define PAL_PUPDR_FLOATING PAL_STM32_PUPDR_FLOATING +# endif -// teensy -#if defined(K20x) || defined(KL2x) -# define USE_I2CV1 -# define USE_I2CV1_CONTRIB // for some reason a bunch of ChibiOS-Contrib boards only have clock_speed -# define USE_GPIOV1 -# define STM32_SYSCLK KINETIS_SYSCLK_FREQUENCY +# if defined(STM32F1XX) || defined(STM32F2XX) || defined(STM32F4XX) || defined(STM32L1XX) +# define USE_I2CV1 +# endif #endif -#if defined(MK66F18) -# define STM32_SYSCLK KINETIS_SYSCLK_FREQUENCY -#endif +// teensy compatibility +#if defined(MCU_KINETIS) +# define CPU_CLOCK KINETIS_SYSCLK_FREQUENCY + +# if defined(K20x) || defined(KL2x) +# define USE_I2CV1 +# define USE_I2CV1_CONTRIB // for some reason a bunch of ChibiOS-Contrib boards only have clock_speed +# define USE_GPIOV1 +# endif +#endif \ No newline at end of file diff --git a/tmk_core/common/chibios/eeprom_stm32.c b/tmk_core/common/chibios/eeprom_stm32.c index 1fdf8c1e29b..acc6a48516c 100644 --- a/tmk_core/common/chibios/eeprom_stm32.c +++ b/tmk_core/common/chibios/eeprom_stm32.c @@ -620,48 +620,11 @@ uint16_t EEPROM_ReadDataWord(uint16_t Address) { } /***************************************************************************** - * Wrap library in AVR style functions. + * Bind to eeprom_driver.c *******************************************************************************/ -uint8_t eeprom_read_byte(const uint8_t *Address) { return EEPROM_ReadDataByte((const uintptr_t)Address); } +void eeprom_driver_init(void) { EEPROM_Init(); } -void eeprom_write_byte(uint8_t *Address, uint8_t Value) { EEPROM_WriteDataByte((uintptr_t)Address, Value); } - -void eeprom_update_byte(uint8_t *Address, uint8_t Value) { EEPROM_WriteDataByte((uintptr_t)Address, Value); } - -uint16_t eeprom_read_word(const uint16_t *Address) { return EEPROM_ReadDataWord((const uintptr_t)Address); } - -void eeprom_write_word(uint16_t *Address, uint16_t Value) { EEPROM_WriteDataWord((uintptr_t)Address, Value); } - -void eeprom_update_word(uint16_t *Address, uint16_t Value) { EEPROM_WriteDataWord((uintptr_t)Address, Value); } - -uint32_t eeprom_read_dword(const uint32_t *Address) { - const uint16_t p = (const uintptr_t)Address; - /* Check word alignment */ - if (p % 2) { - /* Not aligned */ - return (uint32_t)EEPROM_ReadDataByte(p) | (uint32_t)(EEPROM_ReadDataWord(p + 1) << 8) | (uint32_t)(EEPROM_ReadDataByte(p + 3) << 24); - } else { - /* Aligned */ - return EEPROM_ReadDataWord(p) | (EEPROM_ReadDataWord(p + 2) << 16); - } -} - -void eeprom_write_dword(uint32_t *Address, uint32_t Value) { - uint16_t p = (const uintptr_t)Address; - /* Check word alignment */ - if (p % 2) { - /* Not aligned */ - EEPROM_WriteDataByte(p, (uint8_t)Value); - EEPROM_WriteDataWord(p + 1, (uint16_t)(Value >> 8)); - EEPROM_WriteDataByte(p + 3, (uint8_t)(Value >> 24)); - } else { - /* Aligned */ - EEPROM_WriteDataWord(p, (uint16_t)Value); - EEPROM_WriteDataWord(p + 2, (uint16_t)(Value >> 16)); - } -} - -void eeprom_update_dword(uint32_t *Address, uint32_t Value) { eeprom_write_dword(Address, Value); } +void eeprom_driver_erase(void) { EEPROM_Erase(); } void eeprom_read_block(void *buf, const void *addr, size_t len) { const uint8_t *src = (const uint8_t *)addr; @@ -670,14 +633,14 @@ void eeprom_read_block(void *buf, const void *addr, size_t len) { /* Check word alignment */ if (len && (uintptr_t)src % 2) { /* Read the unaligned first byte */ - *dest++ = eeprom_read_byte(src++); + *dest++ = EEPROM_ReadDataByte((const uintptr_t)src++); --len; } uint16_t value; bool aligned = ((uintptr_t)dest % 2 == 0); while (len > 1) { - value = eeprom_read_word((uint16_t *)src); + value = EEPROM_ReadDataWord((const uintptr_t)((uint16_t *)src)); if (aligned) { *(uint16_t *)dest = value; dest += 2; @@ -689,7 +652,7 @@ void eeprom_read_block(void *buf, const void *addr, size_t len) { len -= 2; } if (len) { - *dest = eeprom_read_byte(src); + *dest = EEPROM_ReadDataByte((const uintptr_t)src); } } @@ -700,7 +663,7 @@ void eeprom_write_block(const void *buf, void *addr, size_t len) { /* Check word alignment */ if (len && (uintptr_t)dest % 2) { /* Write the unaligned first byte */ - eeprom_write_byte(dest++, *src++); + EEPROM_WriteDataByte((uintptr_t)dest++, *src++); --len; } @@ -712,15 +675,13 @@ void eeprom_write_block(const void *buf, void *addr, size_t len) { } else { value = *(uint8_t *)src | (*(uint8_t *)(src + 1) << 8); } - eeprom_write_word((uint16_t *)dest, value); + EEPROM_WriteDataWord((uintptr_t)((uint16_t *)dest), value); dest += 2; src += 2; len -= 2; } if (len) { - eeprom_write_byte(dest, *src); + EEPROM_WriteDataByte((uintptr_t)dest, *src); } } - -void eeprom_update_block(const void *buf, void *addr, size_t len) { eeprom_write_block(buf, addr, len); } diff --git a/tmk_core/common/chibios/eeprom_stm32_defs.h b/tmk_core/common/chibios/eeprom_stm32_defs.h index 22b4ab858ee..57de42c6bac 100644 --- a/tmk_core/common/chibios/eeprom_stm32_defs.h +++ b/tmk_core/common/chibios/eeprom_stm32_defs.h @@ -32,6 +32,13 @@ # ifndef FEE_PAGE_COUNT # define FEE_PAGE_COUNT 4 // How many pages are used # endif +# elif defined(STM32F401xC) || defined(STM32F411xE) +# ifndef FEE_PAGE_SIZE +# define FEE_PAGE_SIZE 0x4000 // Page size = 16KByte +# endif +# ifndef FEE_PAGE_COUNT +# define FEE_PAGE_COUNT 1 // How many pages are used +# endif # endif #endif @@ -40,17 +47,19 @@ # define FEE_MCU_FLASH_SIZE 32 // Size in Kb # elif defined(STM32F103xB) || defined(STM32F072xB) || defined(STM32F070xB) # define FEE_MCU_FLASH_SIZE 128 // Size in Kb -# elif defined(STM32F303xC) +# elif defined(STM32F303xC) || defined(STM32F401xC) # define FEE_MCU_FLASH_SIZE 256 // Size in Kb -# elif defined(STM32F103xE) +# elif defined(STM32F103xE) || defined(STM32F411xE) # define FEE_MCU_FLASH_SIZE 512 // Size in Kb # endif #endif /* Start of the emulated eeprom */ #if !defined(FEE_PAGE_BASE_ADDRESS) -# if 0 -/* TODO: Add support for F4 */ +# if defined(STM32F401xC) || defined(STM32F411xE) +# ifndef FEE_PAGE_BASE_ADDRESS +# define FEE_PAGE_BASE_ADDRESS 0x08004000 // bodge to force 2nd 16k page +# endif # else # ifndef FEE_FLASH_BASE # define FEE_FLASH_BASE 0x8000000 diff --git a/tmk_core/common/chibios/flash_stm32.c b/tmk_core/common/chibios/flash_stm32.c index 6b80ff71c36..8f10903d3d9 100644 --- a/tmk_core/common/chibios/flash_stm32.c +++ b/tmk_core/common/chibios/flash_stm32.c @@ -23,6 +23,29 @@ # define FLASH_SR_WRPERR FLASH_SR_WRPRTERR #endif +#if defined(EEPROM_EMU_STM32F401xC) +# define FLASH_SR_PGERR (FLASH_SR_PGSERR | FLASH_SR_PGPERR | FLASH_SR_PGAERR) + +# define FLASH_KEY1 0x45670123U +# define FLASH_KEY2 0xCDEF89ABU + +static uint8_t ADDR2PAGE(uint32_t Page_Address) { + switch (Page_Address) { + case 0x08000000 ... 0x08003FFF: + return 0; + case 0x08004000 ... 0x08007FFF: + return 1; + case 0x08008000 ... 0x0800BFFF: + return 2; + case 0x0800C000 ... 0x0800FFFF: + return 3; + } + + // TODO: bad times... + return 7; +} +#endif + /* Delay definition */ #define EraseTimeout ((uint32_t)0x00000FFF) #define ProgramTimeout ((uint32_t)0x0000001F) @@ -53,7 +76,9 @@ FLASH_Status FLASH_GetStatus(void) { if ((FLASH->SR & FLASH_SR_WRPERR) != 0) return FLASH_ERROR_WRP; +#if defined(FLASH_OBR_OPTERR) if ((FLASH->SR & FLASH_OBR_OPTERR) != 0) return FLASH_ERROR_OPT; +#endif return FLASH_COMPLETE; } @@ -95,15 +120,24 @@ FLASH_Status FLASH_ErasePage(uint32_t Page_Address) { if (status == FLASH_COMPLETE) { /* if the previous operation is completed, proceed to erase the page */ +#if defined(FLASH_CR_SNB) + FLASH->CR &= ~FLASH_CR_SNB; + FLASH->CR |= FLASH_CR_SER | (ADDR2PAGE(Page_Address) << FLASH_CR_SNB_Pos); +#else FLASH->CR |= FLASH_CR_PER; FLASH->AR = Page_Address; +#endif FLASH->CR |= FLASH_CR_STRT; /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(EraseTimeout); if (status != FLASH_TIMEOUT) { - /* if the erase operation is completed, disable the PER Bit */ + /* if the erase operation is completed, disable the configured Bits */ +#if defined(FLASH_CR_SNB) + FLASH->CR &= ~(FLASH_CR_SER | FLASH_CR_SNB); +#else FLASH->CR &= ~FLASH_CR_PER; +#endif } FLASH->SR = (FLASH_SR_EOP | FLASH_SR_PGERR | FLASH_SR_WRPERR); } @@ -126,6 +160,11 @@ FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data) { status = FLASH_WaitForLastOperation(ProgramTimeout); if (status == FLASH_COMPLETE) { /* if the previous operation is completed, proceed to program the new data */ + +#if defined(FLASH_CR_PSIZE) + FLASH->CR &= ~FLASH_CR_PSIZE; + FLASH->CR |= FLASH_CR_PSIZE_0; +#endif FLASH->CR |= FLASH_CR_PG; *(__IO uint16_t*)Address = Data; /* Wait for last operation to be completed */ diff --git a/tmk_core/common/chibios/suspend.c b/tmk_core/common/chibios/suspend.c index 991fe6e08b6..9310a999209 100644 --- a/tmk_core/common/chibios/suspend.c +++ b/tmk_core/common/chibios/suspend.c @@ -7,6 +7,7 @@ #include "action.h" #include "action_util.h" #include "mousekey.h" +#include "programmable_button.h" #include "host.h" #include "suspend.h" #include "led.h" @@ -79,6 +80,9 @@ void suspend_wakeup_init(void) { #ifdef MOUSEKEY_ENABLE mousekey_clear(); #endif /* MOUSEKEY_ENABLE */ +#ifdef PROGRAMMABLE_BUTTON_ENABLE + programmable_button_clear(); +#endif /* PROGRAMMABLE_BUTTON_ENABLE */ #ifdef EXTRAKEY_ENABLE host_system_send(0); host_consumer_send(0); diff --git a/tmk_core/common/host.c b/tmk_core/common/host.c index f0c396b189a..56d4bb08471 100644 --- a/tmk_core/common/host.c +++ b/tmk_core/common/host.c @@ -30,8 +30,9 @@ extern keymap_config_t keymap_config; #endif static host_driver_t *driver; -static uint16_t last_system_report = 0; -static uint16_t last_consumer_report = 0; +static uint16_t last_system_report = 0; +static uint16_t last_consumer_report = 0; +static uint32_t last_programmable_button_report = 0; void host_set_driver(host_driver_t *d) { driver = d; } @@ -122,6 +123,16 @@ void host_digitizer_send(digitizer_t *digitizer) { __attribute__((weak)) void send_digitizer(report_digitizer_t *report) {} +void host_programmable_button_send(uint32_t report) { + if (report == last_programmable_button_report) return; + last_programmable_button_report = report; + + if (!driver) return; + (*driver->send_programmable_button)(report); +} + uint16_t host_last_system_report(void) { return last_system_report; } uint16_t host_last_consumer_report(void) { return last_consumer_report; } + +uint32_t host_last_programmable_button_report(void) { return last_programmable_button_report; } diff --git a/tmk_core/common/host.h b/tmk_core/common/host.h index 2cffef6e15a..6b15f0d0c10 100644 --- a/tmk_core/common/host.h +++ b/tmk_core/common/host.h @@ -47,9 +47,11 @@ void host_keyboard_send(report_keyboard_t *report); void host_mouse_send(report_mouse_t *report); void host_system_send(uint16_t data); void host_consumer_send(uint16_t data); +void host_programmable_button_send(uint32_t data); uint16_t host_last_system_report(void); uint16_t host_last_consumer_report(void); +uint32_t host_last_programmable_button_report(void); #ifdef __cplusplus } diff --git a/tmk_core/common/host_driver.h b/tmk_core/common/host_driver.h index 2aebca043d9..affd0dcb348 100644 --- a/tmk_core/common/host_driver.h +++ b/tmk_core/common/host_driver.h @@ -29,6 +29,7 @@ typedef struct { void (*send_mouse)(report_mouse_t *); void (*send_system)(uint16_t); void (*send_consumer)(uint16_t); + void (*send_programmable_button)(uint32_t); } host_driver_t; void send_digitizer(report_digitizer_t *report); \ No newline at end of file diff --git a/tmk_core/common/report.h b/tmk_core/common/report.h index 063ac953272..24886795fca 100644 --- a/tmk_core/common/report.h +++ b/tmk_core/common/report.h @@ -29,6 +29,7 @@ enum hid_report_ids { REPORT_ID_MOUSE, REPORT_ID_SYSTEM, REPORT_ID_CONSUMER, + REPORT_ID_PROGRAMMABLE_BUTTON, REPORT_ID_NKRO, REPORT_ID_JOYSTICK, REPORT_ID_DIGITIZER, @@ -196,6 +197,11 @@ typedef struct { uint16_t usage; } __attribute__((packed)) report_extra_t; +typedef struct { + uint8_t report_id; + uint32_t usage; +} __attribute__((packed)) report_programmable_button_t; + typedef struct { #ifdef MOUSE_SHARED_EP uint8_t report_id; diff --git a/tmk_core/common/test/rules.mk b/tmk_core/common/test/rules.mk index 48632a095b5..73d2302da77 100644 --- a/tmk_core/common/test/rules.mk +++ b/tmk_core/common/test/rules.mk @@ -16,6 +16,7 @@ eeprom_stm32_tiny_INC := $(eeprom_stm32_INC) eeprom_stm32_large_INC := $(eeprom_stm32_INC) eeprom_stm32_SRC := \ + $(TOP_DIR)/drivers/eeprom/eeprom_driver.c \ $(TMK_PATH)/common/test/eeprom_stm32_tests.cpp \ $(TMK_PATH)/common/test/flash_stm32_mock.c \ $(TMK_PATH)/common/chibios/eeprom_stm32.c diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index cf5e1f49089..3d931e7a46f 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -146,7 +146,8 @@ 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); -host_driver_t lufa_driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer}; +static void send_programmable_button(uint32_t data); +host_driver_t lufa_driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer, send_programmable_button}; #ifdef VIRTSER_ENABLE // clang-format off @@ -852,29 +853,35 @@ static void send_mouse(report_mouse_t *report) { #endif } -/** \brief Send Extra - * - * FIXME: Needs doc - */ -#ifdef EXTRAKEY_ENABLE -static void send_extra(uint8_t report_id, uint16_t data) { +#if defined(EXTRAKEY_ENABLE) || defined(PROGRAMMABLE_BUTTON_ENABLE) +static void send_report(void *report, size_t size) { uint8_t timeout = 255; if (USB_DeviceState != DEVICE_STATE_Configured) return; - static report_extra_t r; - r = (report_extra_t){.report_id = report_id, .usage = data}; Endpoint_SelectEndpoint(SHARED_IN_EPNUM); /* Check if write ready for a polling interval around 10ms */ while (timeout-- && !Endpoint_IsReadWriteAllowed()) _delay_us(40); if (!Endpoint_IsReadWriteAllowed()) return; - Endpoint_Write_Stream_LE(&r, sizeof(report_extra_t), NULL); + Endpoint_Write_Stream_LE(report, size, NULL); Endpoint_ClearIN(); } #endif +/** \brief Send Extra + * + * FIXME: Needs doc + */ +#ifdef EXTRAKEY_ENABLE +static void send_extra(uint8_t report_id, uint16_t data) { + static report_extra_t r; + r = (report_extra_t){.report_id = report_id, .usage = data}; + send_report(&r, sizeof(r)); +} +#endif + /** \brief Send System * * FIXME: Needs doc @@ -914,6 +921,14 @@ static void send_consumer(uint16_t data) { #endif } +static void send_programmable_button(uint32_t data) { +#ifdef PROGRAMMABLE_BUTTON_ENABLE + static report_programmable_button_t r; + r = (report_programmable_button_t){.report_id = REPORT_ID_PROGRAMMABLE_BUTTON, .usage = data}; + send_report(&r, sizeof(r)); +#endif +} + /******************************************************************************* * sendchar ******************************************************************************/ diff --git a/tmk_core/protocol/usb_descriptor.c b/tmk_core/protocol/usb_descriptor.c index 9f9f3f8fad2..9ffff8ddd8d 100644 --- a/tmk_core/protocol/usb_descriptor.c +++ b/tmk_core/protocol/usb_descriptor.c @@ -237,6 +237,25 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM SharedReport[] = { HID_RI_END_COLLECTION(0), #endif +#ifdef PROGRAMMABLE_BUTTON_ENABLE + HID_RI_USAGE_PAGE(8, 0x0C), // Consumer + HID_RI_USAGE(8, 0x01), // Consumer Control + HID_RI_COLLECTION(8, 0x01), // Application + HID_RI_REPORT_ID(8, REPORT_ID_PROGRAMMABLE_BUTTON), + HID_RI_USAGE(8, 0x09), // Programmable Buttons + HID_RI_COLLECTION(8, 0x04), // Named Array + HID_RI_USAGE_PAGE(8, 0x09), // Button + HID_RI_USAGE_MINIMUM(8, 0x01), // Button 1 + HID_RI_USAGE_MAXIMUM(8, 0x20), // Button 32 + HID_RI_LOGICAL_MINIMUM(8, 0x01), + HID_RI_LOGICAL_MAXIMUM(8, 0x01), + HID_RI_REPORT_COUNT(8, 32), + HID_RI_REPORT_SIZE(8, 1), + HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), + HID_RI_END_COLLECTION(0), + HID_RI_END_COLLECTION(0), +#endif + #ifdef NKRO_ENABLE HID_RI_USAGE_PAGE(8, 0x01), // Generic Desktop HID_RI_USAGE(8, 0x06), // Keyboard diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index 485b20c900e..e4db5d06549 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -226,8 +226,9 @@ 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 void send_programmable_button(uint32_t data); -static host_driver_t driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer}; +static host_driver_t driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer, send_programmable_button}; host_driver_t *vusb_driver(void) { return &driver; } @@ -296,6 +297,19 @@ void send_digitizer(report_digitizer_t *report) { #ifdef DIGITIZER_ENABLE if (usbInterruptIsReadyShared()) { usbSetInterruptShared((void *)report, sizeof(report_digitizer_t)); +#endif +} + +static void send_programmable_button(uint32_t data) { +#ifdef PROGRAMMABLE_BUTTON_ENABLE + static report_programmable_button_t report = { + .report_id = REPORT_ID_PROGRAMMABLE_BUTTON, + }; + + report.usage = data; + + if (usbInterruptIsReadyShared()) { + usbSetInterruptShared((void *)&report, sizeof(report)); } #endif } @@ -558,6 +572,26 @@ const PROGMEM uchar shared_hid_report[] = { 0xC0 // End Collection #endif +#ifdef PROGRAMMABLE_BUTTON_ENABLE + // Programmable buttons report descriptor + 0x05, 0x0C, // Usage Page (Consumer) + 0x09, 0x01, // Usage (Consumer Control) + 0xA1, 0x01, // Collection (Application) + 0x85, REPORT_ID_PROGRAMMABLE_BUTTON, // Report ID + 0x09, 0x03, // Usage (Programmable Buttons) + 0xA1, 0x04, // Collection (Named Array) + 0x05, 0x09, // Usage Page (Button) + 0x19, 0x01, // Usage Minimum (Button 1) + 0x29, 0x20, // Usage Maximum (Button 32) + 0x15, 0x00, // Logical Minimum (0) + 0x25, 0x01, // Logical Maximum (1) + 0x95, 0x20, // Report Count (32) + 0x75, 0x01, // Report Size (1) + 0x81, 0x02, // Input (Data, Variable, Absolute) + 0xC0, // End Collection + 0xC0 // End Collection +#endif + #ifdef SHARED_EP_ENABLE }; #endif